Skip to main content

Transaction History

This guide covers querying and filtering transaction history in the Privacy Boost iOS 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 (.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. nil 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:

Displaying Transactions in SwiftUI

Error Handling

Best Practices

1. Paginate Results

For apps with many transactions, use the limit parameter to load in pages:

2. Refresh After Operations

Fetch updated history after deposits, withdrawals, or transfers to show the latest state:

Next Steps