Skip to main content

Transaction History

This guide covers querying and filtering transaction history in the Privacy Boost Android SDK.

Basic Usage

Transaction Type

Filtering History

By Transaction Type

By Token

With Limit

Combined Filters

By Token ID, Direction, or Collapsed Gateway Rows

For the filters getTransactionHistory does not take, pass a TransactionHistoryQuery to queryTransactionHistory. It accepts the same type filter and page size plus tokenId (the registered token id, from getRegisteredTokens()), direction (TransactionDirection.INCOMING or OUTGOING relative to the wallet), a cursor for the next page, and collapseGateway, which folds each Gateway operation’s two rows into one so an activity list can show a swap as a single entry. null fields are unfiltered, and every field is defaulted, so name only the ones you want.
ChainContextHandle exposes the same method for other chains.

Filter Parameters

TransactionHistoryQuery adds:

ViewModel Integration

Displaying Transactions in Compose

Error Handling

Best Practices

1. Paginate Results

For apps with many transactions, use the limit parameter:

2. Refresh After Operations

Fetch updated history after deposits, withdrawals, or transfers:

Next Steps