signatureSubscribe RPC Method
Parameters
tx_sig
The transaction signature as base-58 encoded string
object
array
The configuration object with the following fields:
commitment
All fields are strings.
finalized
the node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized.
confirmed
the node will query the most recent block that has been voted on by supermajority of the cluster.
processed
the node will query its most recent block. Note that the block may not be complete.
Returns
result
The result will be an RpcResponse JSON object with id equal to the subscription id (needed to unsubscribe)
Notification Format:
result
Error if the transaction failed and null if the transaction succeeded
Request
1const web3 = require("@solana/web3.js");2(async () => {3const txId =4"2KDXTegj8bDQRXJYQeJtFYHrYL6U68EPBHK3zGdkwwcKA1pFBvkTwmdmE9mME9BQkVakg73WssPzgGgbEvL52ivw";5const solanaConnection = new web3.Connection("https://docs-demo.solana-mainnet.quiknode.pro/", {6wsEndpoint: "",7});8solanaConnection.onSignature(txId, (updatedTxInfo, context) =>9console.log("Updated account info: ", updatedTxInfo)10);11})();12
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free