Opens login modal of Pay3 web wallet. User will be able to connect to the wallet using Social, Email & Phone OTP or Wallet connect.
On completion of connecting pay3-sdk-login-status event is published to the DApp.
Return true if the user has successfully connected with Pay3 Wallet, else returns false.
Returns wallet address of the connected wallet.
Returns logged in user's balance in the connected chain. It accepts an optional ERC20 Address in which case it returns user token address balance on the chain. The amount is returned is in WEI.
- rpcUrl: You can pass your favourite rpcUrl that matches your dApp's chain. This URL is used for reading data from block chain from the JS sdk with in the dApp's / client application context.
- tokenAddress (Type string, Optional): Address of any ERC20 token available on the connected chain. If tokenAddress is undefined the function returns coin balance of the connected user.
Get chain native coin balance
Get ERC20 token balance
Pay3 readContract is a helpful utility which accepts parameters for read functionality for any contract interaction deployed on blockchain. This uses the rpcUrl passed in the constructor to interact with blockchain.
- Contract Details
- contractAddress (string): Contract address deployed on the connected chain.
- abi (Array of Objects): ABI of the function that is being called.
- functionName (string): Name of the function that need to be invoked.
- args (Array of Objects: Optional): List of arguments to be passed while invoking the function.
- rpcUrl (string): You can pass your favourite rpcUrl that matches your dApp's chain.
Opens Pay3 Web Wallet and triggers logout for the user. Emits pay3-sdk-login-status event.
On completion of disconnect pay3-sdk-login-status ,event is published to the DApp.