MoonProvider
@moonup/ethers Package Documentation
Summary
Usage Examples
import { MoonSDK } from '@moonup/moon-sdk';
import { MoonProvider } from '@moonup/ethers';
import { ethers } from 'ethers';
const SDK = new MoonSDK({ /* your configuration */ });
const address = '0xYourEthereumAddress';
const chainId = 1; // mainnet
const provider = new MoonProvider({ SDK, address, chainId });
// Now you can use the provider with ethers
const signer = provider.getSigner();
const balance = await signer.getBalance();
console.log(`Balance: ${ethers.utils.formatEther(balance)} ETH`);API Reference
MoonProvider
MoonProviderLast updated