⛏️getBalance
Description
The getBalance
function allows developers to retrieve the account balance of a specified public key on the Casper blockchain.
Parameters
Parameter | Type | Description |
---|---|---|
| string | The public key of the account to retrieve the balance for |
| string | The RPC API endpoint of the Casper network |
Response
Name | Type | Description |
---|---|---|
| string | The balance of the account as a string |
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 getBalance
request using the Nest SDK:
Response
Use Cases
Wallets: The function can be used by cryptocurrency wallets to display the account balance of the user.
DApps: The function can be used by decentralized applications on the Casper network to retrieve the account balance of a user.
Exchanges: The function can be used by cryptocurrency exchanges to check the balance of user accounts before allowing them to make trades.
Last updated