🔗transfer
Description
The transfer
function is an asynchronous function that facilitates the transfer of assets or tokens for a given contract on a specified blockchain.
Parameters
Parameter | Data Type | Description |
---|---|---|
| string | The type of contract ('ERC721', 'ERC1155', 'ERC20'). |
| string | The name or symbol of the blockchain. |
| string | The address of the contract on the blockchain. |
| string | The private key of the sender's account. |
| object | The transfer parameters containing information such as the receiver's address, amount, token ID, and additional data. The structure of the transferParams object may vary depending on the contract type and implementation. |
| string | The environment or network where the contract exists (e.g., 'mainnet', 'testnet'). |
Response
Field | Data Type | Description |
---|---|---|
| number | A numeric value indicating the execution status (1 for success, 0 for error). |
| any | The error object containing details about the encountered error, if applicable. |
| any | The result object containing the outcome of the transfer operation. The structure of the deployedContract object may vary depending on the contract type and implementation. |
| any | The token ID associated with the transferred asset or token. |
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 bulkMint request using the NEST® SDK:
Response
Use Cases
The
transfer
function can be used to transfer assets or tokens from one account to another on a specified blockchain. It supports different contract types such as ERC721, ERC1155, and ERC20. By providing the necessary parameters, such as the contract type, blockchain, contract address, private key, transfer parameters (e.g., receiver's address, amount, token ID, additional data), and environment, the function performs the transfer operation and returns the result.
Last updated