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": {    "signatures": [      "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"    ],    "config": {      "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": {    "pubkey": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",    "lamports": 1000000000,    "config": {      "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.
Result
FieldTypeDescription
result
stringsendTransaction - Sends a transaction to the cluster
Example
{  "jsonrpc": "2.0",  "id": 1,  "method": "sendTransaction",  "params": {    "transaction": "<some-transaction>",    "config": {      "encoding": "binary",      "maxRetries": 0,      "minContextSlot": 123456789,      "preflightCommitment": "Processed",      "skipPreflight": 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": {    "transaction": "<some-transaction>",    "config": {      "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": {    "signature": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",    "config": {      "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": {    "address": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",    "before": "<some-before>",    "limit": 0,    "until": "<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": {    "message": "<some-message>",    "config": {      "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": {    "config": {      "commitment": "Processed",      "minContextSlot": 123456789    }  }}

On this page