AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.

Start building today!     

Contents

getConfirmedTransaction RPC Method

This method is deprecated and will not be supported in future versions. For a similar method, you can use solana's getTransaction RPC method.

The API credit value for this method is 4 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. tx_sig - string - The transaction signature as base-58 encoded string
  2. object - (optional) The configuration object with the following fields:

    encoding - string - (optional) (default: json) The encoding format for the transaction data. The values can be one of json, jsonParsed, base58 (slow), base64

    Commitment - string - (optional) (default: finalized) The level of commitment required for the query. The options include:

    Finalized - string - The node will query the most recent block confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized

    Confirmed - string - The node will query the most recent block that has been voted on by the supermajority of the cluster

Returns:

  1. result - Null if the specified transaction is not confirmed otherwise an object with the following fields:

    blockTime - The estimated production time, as Unix timestamp (seconds since the Unix epoch). It's null if not available

    meta - The transaction status metadata object, which contains additional information about the block and its transactions. The meta object can be null, or it may contain the following fields:

    err - Error code if the transaction failed or null if the transaction succeed

    fee - The total fees paid by all transactions in the block encoded as u64 integer

    innerInstructions - An array of objects representing the inner instructions of all transactions in the block (omitted if inner instruction recording is not enabled). Each object has the following fields:

    loadedAddresses - An array of base58-encoded public keys representing the addresses (accounts) involved in the transaction

    readonly - A subset of the loadedAddresses that contains accounts that are only read from and not modified by the transaction

    writable - A subset of the loadedAddresses that contains accounts that are read from and modified by the transaction

    logMessages - An array of strings containing any log messages generated by the block's transactions (omitted if inner instruction recording is not enabled)

    postBalances - An array of lamport balances for each account in the block after the transactions were processed

    postTokenBalances - An array of token balances for each token account in the block after the transactions were processed (omitted if inner instruction recording is not enabled)

    preBalances - An array of lamport balances for each account in the block before the transactions were processed

    preTokenBalances - An array of token balances for each token account in the block before the transactions were processed (omitted if inner instruction recording is not enabled)

    rewards - An object containing information about the rewards earned by the block's validators (only present if the rewards are requested). It has the following fields:

    status - The status of the transaction. It returns Ok if the transaction was successful and Err if the transaction failed with TransactionError

    slot - The slot number of the block to retrieve encoded as u64 (64-bit unsigned integer) integer

    transaction - The transaction object. It could be either JSON format or encoded binary data, depending on the encoding parameter

    message - The core data of the transaction, including its header, account keys, recent blockhash, and instructions

    accountKeys - An array of base58-encoded public keys representing the accounts involved in the transactionAn array of base58-encoded public keys representing the accounts involved in the transaction

    header - An object containing information about the number of required signatures and readonly accounts in the transaction

    numReadonlySignedAccounts - The number of readonly accounts that also require a signature

    numReadonlyUnsignedAccounts - The number of readonly accounts that do not require a signature

    numRequiredSignatures - The number of signatures required to authorize the transaction

    instructions - An array of instructions that were executed in the block's transactions

    accounts - An array of base58-encoded public keys representing the accounts to be passed to the instruction

    data - A string containing the encoded data to be passed to the instruction

    programIdIndex - An integer representing the index of the program ID in the accountKeys array. The program ID is the public key of the on-chain program that executed the instruction

    recentBlockhash - The recent block hash for the account's cluster

    signatures - An array of signatures strings corresponding to the transaction order in the block

Code Examples:

curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc": "2.0","id": 1,"method": "getConfirmedTransaction","params": ["3Pdh1xgS7HYXcPquN1JQQXs8C6Tn2ZTkHg86wXMwDEEnJxVVZsE3WgxHSx258boUtHcMVkKCGbT9dYWWfk7CWV2m","json"]}'
Ready to get started? Create a free account