🔗near
Description
The getBalanceByMnemonic
function is used to retrieve the account balance associated with a specified mnemonic and account ID. It allows you to query the balance of a Near Protocol account by providing the mnemonic, the account ID, and the environment (e.g., testnet, mainnet) in which the account exists.
Parameters
blockchain
string
The blockchain network associated with the mnemonic (in this case, near)
mnemonic
string
The mnemonic associated with the Near Protocol account.
accountId
string
The ID of the Near Protocol account.
Response
total
numeric
The total balance of the specified Near Protocol account.
Example Request and Response
Prerequisites
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:
Request
Here is an example of how to make a txStatus
request using the Nest SDK:
Response
Use Cases
Online Wallets: Online wallets can use this function to retrieve the status of transactions made on their platform. By querying the account balance using the
getBalanceByMnemonic
function, online wallets can provide users with real-time information about their account balances.Trading Platforms: Trading platforms can use this function to verify the status of transactions made by their users on different blockchain networks. By checking the account balance of a specific Near Protocol account using the
getBalanceByMnemonic
function, trading platforms can ensure that the necessary funds are available for executing transactions and updating the user's portfolio accordingly.
Last updated