🔗checkIfAddress
Last updated
Last updated
The checkIfAddress
function is an asynchronous function that verifies whether an address or contract is valid on a specific blockchain
Parameter | Data Type | Description |
---|---|---|
Field | Data Type | Description |
---|---|---|
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:
Here is an example of how to make a depositEther
request using the Nest SDK:
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.
address
string
The address or contract to be validated.
blockchain
string
The name or symbol of the target blockchain.
code
Number
A numeric value indicating the execution status (1 for success, 0 for error).
valid
boolean
Indicates whether the provided address or contract is valid on the specified blockchain.
error
any
The error object containing details about the encountered error, if applicable.