signatureSubscribe
Subscribe to receive a notification when the transaction with the given signature reaches the specified commitment level.
Parameters
string
(required)
string
(required)The transaction signature, as a base-58 encoded string.
Info:
The transaction signature must be the first signature from the transaction.
object
(optional)
object
(optional)Configuration object containing the following fields:
commitment
(string, optional): Specifies the desired level of commitment.enableReceivedNotification
(bool, optional): Determines whether to subscribe for notifications when signatures are received by the RPC, in addition to when they are processed.
Result
Returns an <integer>
representing the subscription ID. This ID is required for unsubscribing.
Code Sample
Request Example:
Response Example:
Notification Format
The notification is an RpcResponse
JSON object with the following fields in value
:
slot
(u64
): The corresponding slot.value
(object | string
):If
enableReceivedNotification
istrue
and the signature is received, the literal string"receivedSignature"
.When the signature is processed:
err
(object | null
):null
if the transaction succeeded at the specified commitment level.A
TransactionError
object if the transaction failed.
Example Responses
Notification for a Successfully Processed Transaction:
Notification for a Successfully Received Transaction Signature:
Last updated