🔗evm
Description
The transfer
function is used to transfer cryptocurrency from one account to another on a specified blockchain network. This function requires the sender's private key, the value to be transferred, the receiver's address, the blockchain network, and the environment (testnet or mainnet).
Parameters
Parameter | Type | Description |
---|---|---|
| string | The private key of the account sending the cryptocurrency. |
| string | The value of cryptocurrency to be transferred, specified in the smallest unit of the cryptocurrency. |
| string | The address of the account that will receive the cryptocurrency. |
| string | The blockchain network on which the transfer will occur. |
| string | The environment on which the transfer will occur (testnet or mainnet). |
Response
Field | Type | Description |
---|---|---|
| number | The status code of the operation (0 for failure, 1 for success). |
| object | The receipt of the transaction if the operation was successful. |
| string | The error message if the operation failed. |
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 transfer
request using the Nest SDK:
Response
Use Cases
Crypto Wallets: The
transfer
function can be used by crypto wallets to transfer cryptocurrency from one account to another.Decentralized Exchanges: The
transfer
function can be used by decentralized exchanges to transfer cryptocurrency from one account to another when users are exchanging one cryptocurrency for another.Crypto Payment Gateways: The
transfer
function can be used by crypto payment gateways to facilitate cryptocurrency transactions between buyers and sellers.
Last updated