Skip to main content

Transaction History

This guide covers querying and paginating transaction history in the Privacy Boost React Native SDK.

Basic Usage

getTransactionHistory is async and returns a paginated result, not a raw array. Iterate over result.data:

Transaction Type

Each Transaction groups the on-chain event with zero or more shielded notes it produced or consumed. Money movement lives in value/tokenId/notes — not in the pre-0.2 amount/tokenAddress/receivers shape.
To resolve a tokenId to a token address/symbol, call sdk.getRegisteredTokens() once and cache the lookup.

Filtering History

By Transaction Type

With Limit

Pagination

The previous page’s next cursor is the third argument:

Parameters

Token filtering is not a parameter on this method — fetch all types and filter client-side by tx.tokenId, or use sdk.getUnspentNotes(tokenAddress) for balance-level queries.

Complete Example

Error Handling

Best Practices

1. Page through results

Always pass a limit and follow the next cursor. Unbounded history fetches get expensive fast for active accounts.

2. Cache token metadata

Transaction.tokenId is a numeric ID. Resolve to display symbol/decimals via sdk.getRegisteredTokens() and cache the result — the registered-token list changes rarely.

3. Refresh after operations

Call getTransactionHistory (with no cursor) after a successful shield / unshield / transfer so the UI reflects the new state.

Next Steps