🔗sol
Last updated
Last updated
The txStatus
function is used to check the status of a transaction on the Solana blockchain. It takes a transaction hash and an environment as inputs and returns the status of the transaction. The function first validates the transaction hash and environment inputs, then uses the Solana RPC URL corresponding to the given environment to connect to the Solana blockchain. Finally, it retrieves the transaction status and returns it.
Parameter Name | Data Type | Description |
---|---|---|
Field Name | 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 txStatus
request using the Nest SDK:
Wallet Applications: Wallet applications can use this function to retrieve the status of transactions made by the user and update the transaction history accordingly.
Explorers: Blockchain explorers can use this function to provide information on the status of transactions on the Solana blockchain.
txHash
string
The hash of the transaction to check the status for
env
string
The environment to connect to (e.g. 'devnet', 'mainnet')
code
number
A code indicating the result of the function (1 for success, 0 for failure)
result
string
The status of the transaction ('confirmed' if successful, 'failed' if not)
error
string
An error message, returned if code is 0