availableContracts
Description
The availableContracts
function is an asynchronous function that retrieves a list of available contracts for a specific blockchain.
Parameters
blockchain
string
The blockchain for which to fetch available contracts.
Response
code
number
A numeric value indicating the execution status (1 for success, 0 for error).
error
any
The error object containing details about the encountered error, if applicable.
types
array
An array of available contract types for the specified blockchain. Each contract type is represented as a string.
Example Request and Response
Prerequisites
Before making requests with NO.AI SDK, you must have it installed.
You can install NO.AI SDK using either npm
or yarn
. Use the following commands to install NO.AI SDK:
Request
Here is an example of how to make a availableContracts
request using the NO.AI SDK:
Response
Use Cases
The
listAvailableContracts
function can be used to fetch a list of available contracts for a specific blockchain supported by the blockchain gateway. It can be helpful when providing a selection of contract types for users to choose from or when validating the contract type input in other functions.
Last updated