RPC

Transactions

Send, simulate, and inspect transaction data on Surfnet

These methods handle the creation, simulation, and inspection of transactions on the blockchain. They are essential for executing state changes, estimating fees, checking transaction outcomes, and monitoring transaction lifecycles.

getSignatureStatuses

Returns the signature statuses for a given signature.

Parameters
NameTypeDescription
signatures*
array[string]An array of transaction signatures to query, as base-58 encoded strings.
config
objectConfiguration object for the query.
searchTransactionHistory
booleanWhether to search the transaction history.
Result
FieldTypeDescription
context
object
apiVersion
stringThe API version
slot
integerThe current slot
value
array<any>
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "getSignatureStatuses",  "params": [    [      "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"    ],    {      "searchTransactionHistory": true    }  ]}

requestAirdrop

Requests an airdrop to a given address.

Parameters
NameTypeDescription
pubkey*
stringThe public key of the account to receive the airdrop, as a base-58 encoded string.
lamports*
integerThe amount of lamports to airdrop.
config
objectConfiguration object for the query.
commitment
string | string | stringThe commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
Result
FieldTypeDescription
result
stringrequestAirdrop - Requests an airdrop to a given address
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "requestAirdrop",  "params": [    "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",    1000000000,    {      "commitment": "Processed"    }  ]}

sendTransaction

Sends a transaction to the cluster.

Parameters
NameTypeDescription
transaction*
stringThe signed transaction, as a base-64 encoded string.
config
objectConfiguration object for the query.
encoding
stringThe encoding for the transaction.
maxRetries
integerThe maximum number of retries for the transaction.
minContextSlot
integerThe minimum context slot for the transaction.
preflightCommitment
stringThe commitment level for the preflight check.
skipPreflight
booleanWhether to skip the preflight check.
skipSigVerify
booleanWhether to skip signature verification for the transaction.
Result
FieldTypeDescription
result
stringsendTransaction - Sends a transaction to the cluster
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "sendTransaction",  "params": [    "<some-transaction>",    {      "encoding": "binary",      "maxRetries": 0,      "minContextSlot": 123456789,      "preflightCommitment": "Processed",      "skipPreflight": true,      "skipSigVerify": true    }  ]}

simulateTransaction

Simulates a transaction.

Parameters
NameTypeDescription
transaction*
stringThe transaction to simulate, as a base-64 encoded string.
config
objectConfiguration object for the query.
accounts
objectAccounts to return in the simulation result.
addresses
array[string]An array of account addresses to return, as base-58 encoded strings.
encoding
stringEncoding for the account data.
commitment
string | string | stringThe commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
encoding
stringEncoding for the transaction data.
innerInstructions
booleanWhether to include inner instructions in the simulation result.
minContextSlot
integerMincontextslot
replaceRecentBlockhash
booleanWhether to replace the recent blockhash with a new one.
sigVerify
booleanWhether to verify transaction signatures.
Result
FieldTypeDescription
context
object
apiVersion
stringThe API version
slot
integerThe current slot
value
object
accounts
array
err
object
errorType
stringError type
message
stringError message
innerInstructions
array
logs
array
replacementBlockhash
object
blockhash
string
lastValidBlockHeight
integer
returnData
object
data
array<string>Returned data
programId
stringProgram ID that returned the data
unitsConsumed
integer
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "simulateTransaction",  "params": [    "<some-transaction>",    {      "accounts": {        "addresses": [          "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"        ],        "encoding": "binary"      },      "commitment": "Processed",      "encoding": "binary",      "innerInstructions": true,      "minContextSlot": 123456789,      "replaceRecentBlockhash": true,      "sigVerify": true    }  ]}

getTransaction

Returns the transaction for a given signature.

Parameters
NameTypeDescription
signature*
stringThe transaction signature to query, as a base-58 encoded string.
config
objectConfiguration object for the query.
commitment
objectThe commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'.
commitment
string | string | stringThe commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
maxSupportedTransactionVersion
integerThe maximum transaction version to support.
Result
FieldTypeDescription
blockTime
integerBlock time
meta
objectTransaction metadata
computeUnitsConsumed
integerCompute units consumed
err
objectTransaction error
errorType
stringError type
message
stringError message
fee
integerTransaction fee
innerInstructions
arrayInner instructions
logMessages
arrayLog messages
postBalances
array<integer>Account balances after transaction
postTokenBalances
arrayPost token balances
preBalances
array<integer>Account balances before transaction
preTokenBalances
arrayPre token balances
returnData
objectReturn data
data
array<string>Returned data
programId
stringProgram ID that returned the data
slot
integerThe transaction slot
transaction
objectThe encoded transaction
message
objectTransaction message
accountKeys
array<string>List of account keys
addressTableLookups
arrayList of address table lookups
instructions
array<InstructionSchema>List of instructions
[]
objectArray item
accounts
array<integer>Account indices
data
stringInstruction data
programIdIndex
integerProgram ID index
numReadonlySignedAccounts
integerNumber of readonly signed accounts
numReadonlyUnsignedAccounts
integerNumber of readonly unsigned accounts
numRequiredSignatures
integerNumber of required signatures
recentBlockhash
stringRecent blockhash
signatures
array<string>List of signatures
version
integerTransaction version
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "getTransaction",  "params": [    "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",    {      "commitment": {        "commitment": "Processed"      },      "maxSupportedTransactionVersion": 0    }  ]}

getSignaturesForAddress

Returns the signatures for a given address.

Parameters
NameTypeDescription
address*
stringThe address to query for transaction signatures, as a base-58 encoded string.
before
stringStart searching backwards from this transaction signature.
limit
integerThe maximum number of signatures to return.
until
stringSearch until this transaction signature.
Result
FieldTypeDescription
result
array<RpcConfirmedTransactionStatusWithSignature>getSignaturesForAddress - Returns signatures for an address
[]
objectArray item
blockTime
integer
confirmationStatus
object
status
stringConfirmation level
err
object
errorType
stringError type
message
stringError message
memo
string
signature
string
slot
integer
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "getSignaturesForAddress",  "params": [    "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",    "<some-before>",    0,    "<some-until>"  ]}

getFeeForMessage

Returns the fee for a given message.

Parameters
NameTypeDescription
message*
stringThe message to calculate the fee for, as a base-64 encoded string.
config
objectConfiguration object for the query.
commitment
string | string | stringThe commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
minContextSlot
integerThe minimum context slot for the context.
Result
FieldTypeDescription
context
object
apiVersion
stringThe API version
slot
integerThe current slot
value
integer
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "getFeeForMessage",  "params": [    "<some-message>",    {      "commitment": "Processed",      "minContextSlot": 123456789    }  ]}

getStakeMinimumDelegation

Returns the stake minimum delegation.

Parameters
NameTypeDescription
config
objectConfiguration object for the query.
commitment
string | string | stringThe commitment describes how finalized a block is at that point in time. Options are 'processed', 'confirmed', or 'finalized'
minContextSlot
integerThe minimum context slot for the context.
Result
FieldTypeDescription
context
object
apiVersion
stringThe API version
slot
integerThe current slot
value
integer
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "getStakeMinimumDelegation",  "params": [    {      "commitment": "Processed",      "minContextSlot": 123456789    }  ]}

On this page