Skip to main content
IntentClient wraps the IntentRouter contract. Access it via client.intent.

Methods

postIntent

Post a new deposit intent to the auction system.
Parameters (PostIntentParams): Returns: Promise<Hash>

submitBid

Submit a solver bid on an open intent.
Parameters (SubmitBidParams): Returns: Promise<Hash>

settleAuction

Settle the auction for an intent (callable by anyone after the deadline).
Returns: Promise<Hash>

cancelIntent

Cancel an open intent before the deadline (intent creator only).
Returns: Promise<Hash>

getOpenIntents

Fetch recent open intents by scanning backwards from the latest ID.
For production use, query The Graph subgraph instead of using this method — it scans the chain directly and can be slow for large intent counts.
Returns: Promise<IntentData[]>

getIntent / getBid