πŸ”—evm

Description

The getBalanceByMnemonic function is used to retrieve the balance of a wallet address associated with a given mnemonic phrase.

Parameters

Parameter
Data Type
Description

blockchain

string

The name of the blockchain network.

mnemonic

string

The mnemonic phrase associated with the wallet.

env

string

The environment or network configuration.

Response

Field
Data Type
Description

code

number

The status code indicating the result of the operation.

result

any

The balance of the wallet address in the specified network.

error

any

An error message or object if an error occurs during the operation.

Example Request and Response

Prerequisites

Before making requests with Volary SDK, you must have it installed.

You can install Volary SDK using either npm or yarn. Use the following commands to install Volary SDK:

Request

Here is an example of how to make a getBalanceByMnemonicrequest using the Volary SDK:

Response

Use Cases

  • Online Wallets: By providing the mnemonic, the online wallet service can obtain the balance of a wallet address associated with a specific user. This information can be used to display the available balance to the user, track transaction history, or perform further operations related to the wallet.

  • Trading Platforms: Trading platforms can utilize this function to verify the status of transactions made by their users on different blockchain networks. By utilizing the getBalanceByMnemonic function with the appropriate blockchain and mnemonic, the trading platform can fetch the balance of a user's wallet address.

Last updated