> ## Documentation Index
> Fetch the complete documentation index at: https://0xcaptain.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# IntentClient: post intents and submit solver bids

> Reference for the @agentbank/sdk IntentClient — postIntent, submitBid, settleAuction, cancelIntent, getOpenIntents, getIntent, and getBid methods.

`IntentClient` wraps the `IntentRouter` contract. Access it via `client.intent`.

## Methods

### postIntent

Post a new deposit intent to the auction system.

```typescript theme={null}
const txHash = await client.intent.postIntent({
  asset: "0x...",
  amount: "10000",
  minApyBps: 500,
  maxDrawdownBps: 200,
  duration: 30 * 86400,
});
```

**Parameters** (`PostIntentParams`):

| Field | Type | Description |
| - | - | - |
| `asset` | `Address` | Deposit token |
| `amount` | `string` | Human-readable deposit amount |
| `minApyBps` | `number` | Minimum APY in basis points |
| `maxDrawdownBps` | `number` | Max acceptable drawdown in bps |
| `duration` | `number` | Lock duration in seconds |
| `decimals` | `number` | Asset decimals (default 18) |

**Returns**: `Promise<Hash>`

***

### submitBid

Submit a solver bid on an open intent.

```typescript theme={null}
const txHash = await client.intent.submitBid({
  intentId: 42n,
  tierVault: "0xC44C061D257Af305dEAea2eD093E878a615d856d",
  promisedApy: 650,
  bondAmount: "1000",
});
```

**Parameters** (`SubmitBidParams`):

| Field | Type | Description |
| - | - | - |
| `intentId` | `bigint` | The intent to bid on |
| `tierVault` | `Address` | Vault address the solver proposes |
| `promisedApy` | `number` | Promised APY in bps |
| `bondAmount` | `string` | Bond amount (human-readable) |
| `decimals` | `number` | Bond token decimals (default 18) |

**Returns**: `Promise<Hash>`

***

### settleAuction

Settle the auction for an intent (callable by anyone after the deadline).

```typescript theme={null}
await client.intent.settleAuction(42n);
```

**Returns**: `Promise<Hash>`

***

### cancelIntent

Cancel an open intent before the deadline (intent creator only).

```typescript theme={null}
await client.intent.cancelIntent(42n);
```

**Returns**: `Promise<Hash>`

***

### getOpenIntents

Fetch recent open intents by scanning backwards from the latest ID.

```typescript theme={null}
const intents = await client.intent.getOpenIntents(50);
```

> [!NOTE]
>
> 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

```typescript theme={null}
const intent = await client.intent.getIntent(42n);
// intent.status: IntentStatus enum (Open=0, Filled=1, Expired=2, Cancelled=3)

const bid = await client.intent.getBid(7n);
// bid.solver, bid.promisedApy, bid.bondPosted, etc.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.