⛏️estimateTransferToken
Description
The estimateTransferToken
function is an asynchronous function that provides an estimate of the transfer token amount. It returns an object containing the code and the result, or an error object if an error occurs during execution.
Parameter
This function does not take any parameter.
Response
Field | Data Type | Description |
---|---|---|
| Number | A numeric value indicating the execution status (1 for success, 0 for error). |
| String | The estimated transfer token amount. |
| String | The error message if an error occurs during execution. |
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 estimateTransferToken
request using the NEST® SDK:
Response
Use Cases
Obtaining an estimate of the transfer token amount: By invoking this function, you can fetch an estimated value for the transfer token amount.
Checking execution status: The returned
code
value can be used to determine the success or failure status of the function call.Retrieving the estimated amount: If the estimation is successful, the resulting estimated transfer token amount will be provided for further reference.
Handling errors: In case of any error during the execution of the function, the returned object will contain the error message.
Last updated