signatureSubscribe

(Subscription Websocket) Subscribe to a transaction signature to receive notification when the transaction is confirmed. Note: On signatureNotification, the subscription is automatically cancelled.

This method will use 20 Compute Units.


Parameters

  • tx_sig The transaction signature as base-58 encoded string.

  • object optional. Configuration object containing the following fields:

    • commitment string. The level of commitment required for the query. The options include:

      • finalized string. The node will query the most recent block confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized.

      • confirmed string. The node will query the most recent block that has been voted on by the supermajority of the cluster.

      • processed string. 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.

// Result
{ "jsonrpc": "2.0", "result": 0, "id": 1 }
wscat -c wss://mainnet.solana.validationcloud.io/v1/<YOUR_API_KEY_HERE>
# wait for connection
{"id":1,"jsonrpc":"2.0","method":"signatureSubscribe","params":["51y9Hf2cFzrUPDH24qvL6b6PtPMDGQSX3WwiHsSvkdfGiFTKdoJwGkvqS3gny6XNPLtUtRwGERAs45639EfR5XfT"]}
    

Last updated

Was this helpful?