Overview
TheSearchIntents endpoint allows you to search for intents using various criteria such as owner address, intent address, or deposit transaction hash. This is useful for finding all intents associated with a wallet or tracking specific transactions.
Use Cases
- Find all intents for a specific wallet address
- Look up an intent by its deposit transaction hash
- Track intents associated with a specific intent contract address
- Build transaction history interfaces
- Audit and analytics
- Retrieve intent IDs for status monitoring
Request Parameters
All parameters are optional, but at least one should be provided:- byOwnerAddress (string): Search by wallet address that created the intent
- byOriginIntentAddress (string): Search by origin chain intent contract address
- byDepositTransactionHash (string): Search by deposit transaction hash
Response
The response includes:- intents (Intent[]): Array of matching intent objects
GetIntent endpoint.
Examples
Search by Owner Address
Find all intents created by a specific wallet:Search by Deposit Transaction Hash
Look up an intent using its deposit transaction:Search by Origin Intent Address
Find all intents using a specific intent contract:Building a Transaction History
Create a user-friendly transaction history:UI Component Example
Filtering and Analytics
Pagination Considerations
Best Practices
- Cache results: Store search results locally to reduce API calls
- Filter on client: Apply additional filters on the client side after fetching
- Limit date range: Use
createdAttimestamps to filter by date range - Combine with GetIntentReceipt: Fetch receipts for intents that need transaction hashes
Example: Recent Active Intents
For paginated transaction history with optimized summary data, use the
GetIntentTransactionHistory endpoint instead.Next Steps
- Use
GetIntentto get full details for specific intents - Use
GetIntentReceiptto get transaction hashes and status - Use
GetIntentTransactionHistoryfor paginated history views
Authorizations
API Key for authenticating requests, get an access key at https://trails.build and request early access
Body
application/json
Response
Successful response
[]Intent