Overview
TheGetIntentTransactionHistory endpoint provides a paginated view of intent transaction history with summary information optimized for display. Unlike SearchIntents, this endpoint returns lightweight IntentSummary objects and supports cursor-based pagination for efficient browsing of large histories.
Use Cases
- Build transaction history pages with pagination
- Display user transaction history in UI
- Create activity feeds
- Export transaction data
- Analytics and reporting
- Mobile apps with infinite scroll
Request Parameters
All parameters are optional:- page (Page): Pagination configuration
- column (string): Column to paginate by (typically “id” or “createdAt”)
- before (object): Cursor for previous page
- after (object): Cursor for next page
- sort (SortBy[]): Sorting configuration
- column (string): Column to sort by
- order (SortOrder):
DESCorASC
- pageSize (number): Number of results per page (default: 20)
- more (boolean): Indicates if more pages are available
Response
The response includes:- intents (IntentSummary[]): Array of intent summary objects
- nextPage (Page): Pagination cursor for the next page
IntentSummary Structure
Lightweight summary object containing:- id (number): Internal database ID
- intentId (string): Unique intent identifier
- status (IntentStatus): Current status
- ownerAddress (string): Wallet address
- originChainId (number): Source chain ID
- destinationChainId (number): Destination chain ID
- originIntentAddress (string): Origin intent contract address
- destinationIntentAddress (string): Destination intent contract address
Transaction Hashes
- depositTransactionHash (string): Deposit transaction hash
- depositTransactionStatus (TransactionStatus): Deposit status
- originTransactionHash (string): Origin transaction hash
- originTransactionStatus (TransactionStatus): Origin status
- destinationTransactionHash (string): Destination transaction hash
- destinationTransactionStatus (TransactionStatus): Destination status
Token Information
- originTokenAddress (string): Source token contract
- originTokenAmount (number): Source token amount
- originTokenMetadata (TokenMetadata): Source token details (symbol, decimals, logo)
- destinationTokenAddress (string): Destination token contract
- destinationTokenAmount (number): Destination token amount
- destinationTokenMetadata (TokenMetadata): Destination token details
Timestamps
- createdAt (string): Creation timestamp
- updatedAt (string): Last update timestamp
Examples
Basic Request (First Page)
Paginated Loading
Infinite Scroll Component
Sorting Options
Filtering by Status
Performance Considerations
IntentSummary objects are much lighter than full Intent objects. Use this endpoint for list views and only fetch full intent details when needed using GetIntent.Best Practices
- Use reasonable page sizes: 20-50 items is optimal for most UIs
- Implement infinite scroll: Better UX than traditional pagination buttons
- Cache responses: Store pages locally to avoid refetching
- Show loading states: Display spinners while loading next page
- Handle errors gracefully: Network failures shouldn’t break the entire list
Next Steps
- Use
GetIntentto fetch full details when user clicks on an intent - Use
GetIntentReceiptto show detailed transaction information - Implement search/filter functionality on top of pagination
- Add real-time updates using
WaitIntentReceiptfor pending intents
Authorizations
API Key for authenticating requests, get an access key at https://trails.build and request early access