getSignatureStatuses RPC Method
Returns the statuses of a list of signatures. Each signature must be a txid, the first signature of a transaction.
Info
Unless the searchTransactionHistory
configuration parameter is included,
this method only searches the recent status cache of signatures, which retains
statuses for all active slots plus MAX_RECENT_BLOCKHASHES
rooted slots.
Parameters #
array
required
An array of transaction signatures to confirm, as base-58 encoded strings (up to a maximum of 256)
object
optional
Configuration object containing the following fields:
searchTransactionHistory bool
optional
if true
- a Solana node will search its ledger cache for any signatures not
found in the recent status cache
Result #
An array of RpcResponse<object>
consisting of either:
<null>
- Unknown transaction, or<object>
slot: <u64>
- The slot the transaction was processedconfirmations: <usize|null>
- Number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the clustererr: <object|null>
- Error if transaction failed, null if transaction succeeded. See TransactionError definitionsconfirmationStatus: <string|null>
- The transaction's cluster confirmation status; Eitherprocessed
,confirmed
, orfinalized
. See Commitment for more on optimistic confirmation.- DEPRECATED:
status: <object>
- Transaction status"Ok": <null>
- Transaction was successful"Err": <ERR>
- Transaction failed with TransactionError
Code sample #
curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSignatureStatuses",
"params": [
[
"5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"
],
{
"searchTransactionHistory": true
}
]
}
'
Response #
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 82
},
"value": [
{
"slot": 48,
"confirmations": null,
"err": null,
"status": {
"Ok": null
},
"confirmationStatus": "finalized"
},
null
]
},
"id": 1
}