Learn getTransaction use cases, code examples, request parameters, response structure, and tips.
The getTransaction RPC method in CoinVera allows you to retrieve detailed information about a confirmed transaction using its signature. This includes metadata such as slot, block time, fees, execution status, balance changes, logs, and the full transaction structure.
β Common Use Cases
Transaction Verification
Confirm that a transaction was processed and check if it succeeded or failed.
Transaction History Display
Show detailed transaction info in wallets or explorers.
Auditing and Analysis
Analyze executed instructions, accounts touched, and fees paid.
Debugging Failed Transactions
Inspect logMessages and err fields to identify why a transaction failed.
Data Indexing
Extract structured transaction data for off-chain storage and querying.
π§Ύ Request Parameters
[ transactionSignature: string,// Required β base-58 transaction signature options?:{ commitment?: string,// Optional β "finalized", "confirmed", etc. encoding?: string,// Optional β Recommended: "jsonParsed" maxSupportedTransactionVersion?: number // Optional β Set to 0 to support legacy + versioned}]
transactionSignature: Required. The base-58 encoded transaction ID.
commitment: Optional. Affects finality level (finalized recommended for accuracy).
encoding: Optional. Use "jsonParsed" for human-readable output; "json", "base58", and "base64" are also supported.
maxSupportedTransactionVersion: Optional but strongly recommended.
Set to 0 to support both legacy and versioned transactions.
π¦ Response Structure
Returns null if the transaction is not found or hasnβt reached the specified commitment. Otherwise, it returns an object with:
slot: Slot number where the transaction was confirmed.
blockTime: Estimated UNIX timestamp (nullable).
meta: Metadata about execution:
err: Error info if the transaction failed, or null on success.
fee: Lamports paid.
preBalances / postBalances: Lamport balances of involved accounts.
innerInstructions: CPI calls and their instructions.
logMessages: Logs emitted during execution.
loadedAddresses: Accounts loaded via address lookup tables (for versioned txns).
returnData: Output returned by the transaction, if applicable.
computeUnitsConsumed: Compute units used (if available).
transaction:
If jsonParsed or json: Includes message, signatures, etc.
If base58 or base64: Raw encoded transaction.
version: "legacy" or a number (e.g., 0 for versioned txns); undefined if not requested properly.
π§ͺ Example
Code Examples
Example Response
π‘ Developer Tips
Always Set maxSupportedTransactionVersion: 0
To handle both legacy and versioned transactions reliably.
Use jsonParsed When Possible
Easier to inspect instructions, accounts, and tokensβespecially for wallet or dApp UIs.
Expect Large Payloads
Complex transactions with many instructions/logs can return very large JSON objects.
Check for null Values
The method will return null for:
Incorrect or unknown signatures
Unconfirmed transactions (depending on commitment)
Incompatible transaction versions (if not configured)
Parsing Limitations
If a custom program is not recognized, jsonParsed may fallback to base64 format for that instruction.
Provider Differences
While the RPC spec is consistent, CoinVera may offer enhanced transaction decoding or additional metadata compared to other providers.
The getTransaction method is critical for building detailed transaction explorers, debugging tools, and analytics platforms on Solana. By using jsonParsed and maxSupportedTransactionVersion: 0, you can ensure broad compatibility and full visibility into on-chain activity through CoinVera.