signatureSubscribe RPC Method
Subscribe to receive a notification when the transaction with the given signature reaches the specified commitment level.
This is a subscription to a single notification. It is automatically cancelled
by the server once the notification, signatureNotification
, is sent by the
RPC.
Parameters
string
required
transaction signature, as base-58 encoded string
The transaction signature must be the first signature from the transaction (see transaction id for more details).
object
optional
Configuration object containing the following fields:
commitment string
optional
enableReceivedNotification bool
optional
Whether or not to subscribe for notifications when signatures are received by the RPC, in addition to when they are processed.
Result
<integer>
- subscription id (needed to unsubscribe)
Code sample
Response
Notification Format:
The notification will be an RpcResponse JSON object with value containing an object with:
slot: <u64>
- The corresponding slot.value: <object|string>
- a notification value ofRpcSignatureResult
, resulting in either:- when
enableReceivedNotification
istrue
and the signature is received: the literal string"receivedSignature"
, or - when the signature is processed:
err: <object|null>
:null
if the transaction succeeded in being processed at the specified commitment level, or- a
TransactionError
, if the transaction failed
- when
Example responses:
The following is an example response of a notification from a successfully processed transactions:
The following is an example response of a notification from a successfully received transaction signature: