⛏️testChainBalances
Description
The testChainBalances
function is an asynchronous function used for testing purposes to retrieve the balances of various cryptocurrencies on different blockchain networks. It takes a mnemonic (a string representing a mnemonic phrase), an environment (a string indicating the blockchain network environment), and an ecc
parameter (presumably representing an elliptic curve cryptography library).
Parameters
mnemonic
string
A mnemonic phrase used for generating the wallet's private key.
env
string
A string indicating the blockchain network environment.
ecc
any
An elliptic curve cryptography library or object.
Response
code
number
Indicates the status code. 1 for success, 0 for error.
balances
object
Contains the balances of various cryptocurrencies on different blockchain networks.
error
any
(Optional) Contains the error object if an error occurred during the process.
message
string
(Optional) Provides additional information about the error, typically indicating an inappropriate mnemonic.
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 testChainBalances
request using the Nest SDK:
Response
Use Cases
Testing chain balances: By invoking this function with a mnemonic and an environment, you can retrieve the balances of various cryptocurrencies on different blockchain networks.
Error handling: If there is an error during the execution of the function, an error object is returned with the appropriate error message, indicating an inappropriate mnemonic.
Last updated