solana
solana copied to clipboard
Add transaction signature to getSignatureStatuses response in JSON RPC API
Problem
Currently when you use the getSignatureStatuses method on JSON RPC API statuses are in the same order as passed to the function and that is all you know. It will be very useful to also have a transaction signature for which this status is in a separate field. Small change but makes it easier to manage those statuses.
Proposed Solution
Add transaction signature to response from getSignatureStatuses. Example:
{
"jsonrpc":"2.0",
"result":{
"context":{
"apiVersion":"1.10.26",
"slot":139706152
},
"value":[
{
"signature":"3xFCbyfYKvGqZnyDotB86NKsUaUiAwZDYh7tLY6NWGHBQdawykkdSwgftsr5eq6ThxAg19kxrFqgTPacKsBrkCTL",
"confirmationStatus":"confirmed",
"confirmations":6,
"err":"None",
"slot":139706145,
"status":{
"Ok":"None"
}
},
{
"signature":"3VQoXNrjUEaMp7QmUeKLoJkXgHYeoTY77dUcWFGdNBenSnaQpZqAWx7C48UQm3MCpKt6KPDXE6ru5SxMLQ2pniiW",
"confirmationStatus":"confirmed",
"confirmations":6,
"err":"None",
"slot":139706145,
"status":{
"Ok":"None"
}
}
]
},
"id":3
}
+1 But now we can consider that the order may not be respected though.
I'm disinclined to send 100+ more bytes per status over the wire. Given that the order will always be respected, it should be straightforward to build objects like your example from the list of signatures and the response. Closing this as not planned for now.