🔗btc
Description
The getBalanceByMnemonic
function retrieves the balance of a specific address associated with a mnemonic phrase on the Solana Blockchain.
Parameters
Parameter | Data Type | Description |
---|---|---|
| string | The blockchain network associated with the mnemonic (in this case, btc) |
| string | The mnemonic phrase used to derive the address. |
Response
Field | Data Type | Description |
---|---|---|
| number | The status code indicating the success or failure. |
| number | The balance of the specified address in the network. |
| any | An error object containing details if an error occurs. |
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 getBalanceByMnemonic
request using the Nest SDK:
Response
Use Cases
Cryptocurrency Exchanges: Cryptocurrency exchanges can employ this function to fetch the balance of users' addresses associated with their mnemonic phrases. This information is crucial for displaying accurate wallet balances, calculating available funds for trading, and managing user accounts.
Blockchain Explorers: Blockchain explorers can utilize this function to provide users with real-time balance information for specific addresses. By integrating this function, blockchain explorers can display the current balance of any address based on the mnemonic phrase provided.
Decentralized Applications (DApps): DApps running on blockchain networks can make use of this function to retrieve the balance associated with the user's address derived from their mnemonic phrase. This balance information is vital for displaying account balances within the DApp, enabling users to manage their funds and interact with the application seamlessly.
Last updated