🔗checkIfAddress
Description
The checkIfAddress
function is an asynchronous function that verifies whether an address or contract is valid on a specific blockchain
Parameters
Parameter | Data Type | Description |
---|---|---|
| string | The address or contract to be validated. |
| string | The name or symbol of the target blockchain. |
Response
Field | Data Type | Description |
---|---|---|
| Number | A numeric value indicating the execution status (1 for success, 0 for error). |
| boolean | Indicates whether the provided address or contract is valid on the specified blockchain. |
| any | The error object containing details about the encountered error, if applicable. |
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 depositEther
request using the Nest SDK:
Response
Use Cases
Checking blockchain availability: This function communicates with an external API to fetch available blockchains and verifies if the provided blockchain is supported.
Handling errors: In case of any error during the execution of the function or if the blockchain is not found, the returned object will contain the error details.
Last updated