getConfirmedTransaction

Returns a confirmed transaction with the specified signature.

❗️

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

Parameters

  • tx_sig: The transaction signature as a base-58 encoded string.
  • object: The configuration object with the following fields:
    • encoding: (default: json) The encoding format for the transaction data. Possible values are json, jsonParsed, base58 (slow), or base64.
    • commitment: (default: finalized) The level of commitment required for the query. Options include:
      • finalized: 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: The node will query the most recent block that has been voted on by the supermajority of the cluster.

Returns

  • result: Null if the specified transaction is not confirmed; otherwise, an object with the following fields:
    • blockTime: The estimated production time, as a Unix timestamp (seconds since the Unix epoch). 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 succeeded.
      • fee: The total fees paid by all transactions in the block encoded as a 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).
        • 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 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.
            • stackHeight: The current depth of the execution stack.
            • recentBlockhash: The recent block hash for the account's cluster.
            • signatures: An array of signatures strings corresponding to the transaction order in the block.
Language
Authorization
Header
Click Try It! to start a request and see the response here!