🔗getBalance
Last updated
Last updated
The getBalance
function takes a blockchain network name and an account address as inputs and returns the balance of that account in the specified cryptocurrency
Parameter | Type | Description |
---|---|---|
Property | Type | Description |
---|---|---|
Before making requests with Nest SDK, you must have it installed.
You can install Nest SDK using either npm
or yarn
. Use the following commands to install Nest SDK:
Here is an example of how to make a getBalance
request using the Nest SDK:
Wallet Balance: The function can be used to get the balance of a wallet address for a specific blockchain network, helping users to keep track of their crypto assets.
Payment Systems: Payment systems can use the function to verify the balance of a user's account before processing transactions, ensuring that the user has sufficient funds to complete the payment.
blockchain
string
Takes a string parameter specifying the name of the blockchain network (For eg. bsc, polygon, eth, ava, gnosis, moonbeam)
address
string
The address for which to retrieve the balance
Promise<BigNumber>
BigNumber
Returns the current ether balance of the specified address on the specified blockchain network blockchain.