getTransactionWithCompressionInfo RPC method returns transaction data along with compression information showing which compressed accounts were opened (created) and closed (consumed) during the transaction. This method helps with transaction analysis, account lifecycle tracking, and debugging of compression operations.
You can test this method via the OpenAPI example or custom examples below.
- Transaction Analysis: Understand what compressed accounts were affected by a transaction
- Account Lifecycle Tracking: Monitor when compressed accounts are created and consumed
- Debugging: Identify which accounts changed during failed or unexpected transactions
- Audit Trails: Track compressed account state changes for compliance
signature(string, required): Base58-encoded transaction signature to query compression information for.
compressionInfo(object): Contains details about compressed account changesclosedAccounts(array): Compressed accounts consumed (spent) in this transactionaccount(object): Complete compressed account data with merkle contextmaybeTokenData(object | null): Token data if this is a compressed token account
openedAccounts(array): New compressed accounts created in this transactionaccount(object): Complete compressed account data with merkle contextmaybeTokenData(object | null): Token data if this is a compressed token account
preTokenBalances(array, optional): Token balances before transactionowner(PublicKey): Public key of token account ownermint(PublicKey): Public key of token mintamount(BN): Token amount as BN object
postTokenBalances(array, optional): Token balances after transactionowner(PublicKey): Public key of token account ownermint(PublicKey): Public key of token mintamount(BN): Token amount as BN object
transaction(object): Standard Solana transaction data
- Compression-only: This method only works with transactions that involve compressed accounts
- Real signatures required: Use actual transaction signatures from compression operations
- Account lifecycle: opened = created, closed = consumed/spent in the transaction
- Token data: maybeTokenData is null for regular compressed accounts, populated for token accounts
- Balance tracking: Use pre/postTokenBalances for detailed token amount changes
- State analysis: Compare opened vs closed accounts to understand transaction effects
Transaction not found
Transaction not found
Invalid or non-existent transaction signatureVerify the signature format and check transaction existence:
No compression info
No compression info
Transaction exists but has no compression dataThis method only returns data for transactions involving compressed accounts:
Empty account arrays
Empty account arrays
Transaction has compression info but no account changes shownSome compression operations may not create/consume accounts:
Body
application/json
An ID to identify the request.
Available options:
test-account The version of the JSON-RPC protocol.
Available options:
2.0 The name of the method to invoke.
Available options:
getTransactionWithCompressionInfo