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
EachTransaction 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.
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’snext cursor is the third argument:
Parameters
| Parameter | Type | Description |
|---|---|---|
txType | string? | Filter by type: "shield", "unshield", "transfer" |
limit | number? | Page size |
cursor | string? | Opaque continuation token from previous result.next |
Token filtering is not a parameter on this method — fetch all types and filter client-side bytx.tokenId, or usesdk.getUnspentNotes(tokenAddress)for balance-level queries.
Complete Example
Error Handling
Best Practices
1. Page through results
Always pass alimit 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
CallgetTransactionHistory (with no cursor) after a successful shield /
unshield / transfer so the UI reflects the new state.