# @integraledger/lcp/x402

> x402 v2 documents, the request commitment, and the x402 pairings on eip155 chains: `exact` over EIP-3009, Permit2 and ERC-7710 (with its salt level), `upto` over Permit2, `auth-capture` over EIP-3009 and Permit2, and `exact` in Circle Gateway's batched domain.

Source: https://lcp.integraledger.com/reference/api/x402

Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Every page of this site is listed in https://lcp.integraledger.com/llms.txt.

x402 v2 documents, the request commitment, and the x402 pairings on eip155 chains: `exact` over EIP-3009, Permit2 and
ERC-7710 (with its salt level), `upto` over Permit2, `auth-capture` over EIP-3009 and Permit2, and `exact` in Circle
Gateway's batched domain.

The ATR hash is advertised in the challenge's `extensions.legalContext`; each pairing's `pattern` record states how
the pairing binds it.

## Interfaces

### GatewayBatchedChoice

The buyer's choice: x402's, with the `minValiditySeconds` Circle Gateway's `/supported` serves for the network.

#### Extends

- [`X402Choice`](#x402choice)

#### Properties

| Property | Type | Inherited from |
| ------ | ------ | ------ |
| <a id="property-accepted"></a> `accepted` | [`PaymentRequirements`](#paymentrequirements) | [`X402Choice`](#x402choice).[`accepted`](#property-accepted-1) |
| <a id="property-from"></a> `from` | `` `0x${string}` `` | [`X402Choice`](#x402choice).[`from`](#property-from-1) |
| <a id="property-minvalidityseconds"></a> `minValiditySeconds` | `number` | - |
| <a id="property-now"></a> `now` | `number` | [`X402Choice`](#x402choice).[`now`](#property-now-1) |
| <a id="property-required"></a> `required` | [`PaymentRequired`](#paymentrequired) | [`X402Choice`](#x402choice).[`required`](#property-required-1) |

***

### GatewayBatchedTypedData

The EIP-712 typed data the payer signs: `TransferWithAuthorization` in the Gateway Wallet's domain.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-domain"></a> `domain` | `object` |
| `domain.chainId` | `number` |
| `domain.name` | `string` |
| `domain.salt?` | `` `0x${string}` `` |
| `domain.verifyingContract` | `` `0x${string}` `` |
| `domain.version` | `"1"` \| `"2"` |
| <a id="property-message"></a> `message` | `object` |
| `message.from` | `` `0x${string}` `` |
| `message.nonce` | `` `0x${string}` `` |
| `message.to` | `` `0x${string}` `` |
| `message.validAfter` | `bigint` |
| `message.validBefore` | `bigint` |
| `message.value` | `bigint` |
| <a id="property-primarytype"></a> `primaryType` | `"TransferWithAuthorization"` |
| <a id="property-types"></a> `types` | `object` |
| `types.EIP712Domain` | [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] |
| `types.TransferWithAuthorization` | [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] |

***

### GatewayBatchedUnsigned

What `build` gives: the typed data to sign, and the step that wraps the signature in the payment.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-typeddata"></a> `typedData` | [`GatewayBatchedTypedData`](#gatewaybatchedtypeddata) |

#### Methods

##### complete()

> **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`GatewayBatchedPayment`](#gatewaybatchedpayment)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `signature` | `` `0x${string}` `` |

###### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`GatewayBatchedPayment`](#gatewaybatchedpayment)

***

### HeaderDigest

One named field of a request commitment: its lower-cased name, and SHA-256 of its value, null where the request lacks it.

#### Properties

| Property | Modifier | Type |
| ------ | ------ | ------ |
| <a id="property-digest"></a> `digest` | `readonly` | `` `0x${string}` `` \| `null` |
| <a id="property-name"></a> `name` | `readonly` | `string` |

***

### HttpRequest

An HTTP request as received: the method token, the raw origin-form target and the body bytes, and, where the
commitment names header fields, the request's header fields, each name with its lines in the order received.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-body"></a> `body` | `Uint8Array` |
| <a id="property-headers"></a> `headers?` | `Readonly`\<`Record`\<`string`, `string` \| readonly `string`[]\>\> |
| <a id="property-method"></a> `method` | `string` |
| <a id="property-target"></a> `target` | `string` |

***

### ToolCall

An MCP `tools/call` request's tool call, as received: its `params.name` and `params.arguments`.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-arguments"></a> `arguments?` | `object` |
| <a id="property-name-1"></a> `name` | `string` |

***

### Unsigned

What `exactEip3009.build` gives: the EIP-712 typed data the payer signs (`typedData`), and `complete`, which takes
the payer's signature and gives the `PaymentPayload` to present, or `x402/signature-malformed` for a signature that
is not one.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-typeddata-1"></a> `typedData` | [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) |

#### Methods

##### complete()

> **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `signature` | `` `0x${string}` `` |

###### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload)

***

### X402Choice

The buyer's inputs to the `build` of an x402 pairing on an eip155 chain: the document (`required`), the option chosen
from its `accepts` (`accepted`), the payer's address (`from`), and the current time in Unix seconds (`now`); the
authorization's deadline is `now` plus the option's `maxTimeoutSeconds`.

#### Extended by

- [`BatchEvmOpen`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchevmopen)
- [`GatewayBatchedChoice`](#gatewaybatchedchoice)

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-accepted-1"></a> `accepted` | [`PaymentRequirements`](#paymentrequirements) |
| <a id="property-from-1"></a> `from` | `` `0x${string}` `` |
| <a id="property-now-1"></a> `now` | `number` |
| <a id="property-required-1"></a> `required` | [`PaymentRequired`](#paymentrequired) |

***

### X402Offer

The offer an x402 pairing's `read` gives: the document read (`required`), and the options of its `accepts` that the
pairing serves, through its option filter, in document order.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-options"></a> `options` | readonly [`PaymentRequirements`](#paymentrequirements)[] |
| <a id="property-required-2"></a> `required` | [`PaymentRequired`](#paymentrequired) |

## Type Aliases

### BatchedAuthorization

> **BatchedAuthorization** = `object`

The batched authorization, every member a string, as Circle's client writes it.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-from-2"></a> `from` | `string` |
| <a id="property-nonce"></a> `nonce` | `string` |
| <a id="property-to"></a> `to` | `string` |
| <a id="property-validafter"></a> `validAfter` | `string` |
| <a id="property-validbefore"></a> `validBefore` | `string` |
| <a id="property-value"></a> `value` | `string` |

***

### BreadthBase

> **BreadthBase**\<`Id`\> = `object`

The members every x402 EVM breadth pairing shares.

#### Type Parameters

| Type Parameter |
| ------ |
| `Id` *extends* [`BreadthId`](#breadthid) |

#### Properties

| Property | Modifier | Type |
| ------ | ------ | ------ |
| <a id="property-advertise"></a> `advertise` | `readonly` | [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise) |
| <a id="property-broadcaster"></a> `broadcaster` | `readonly` | (`presented`) => `Promise`\<[`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> |
| <a id="property-claims"></a> `claims` | `readonly` | `boolean` |
| <a id="property-data"></a> `data` | `readonly` | [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata) |
| <a id="property-id"></a> `id` | `readonly` | `Id` |
| <a id="property-pattern"></a> `pattern` | `readonly` | [`LcpPattern`](#lcppattern) |
| <a id="property-read"></a> `read` | `readonly` | (`doc`) => [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) |
| <a id="property-tie"></a> `tie` | `readonly` | *typeof* [`tie`](#tie) |
| <a id="property-unplaced"></a> `unplaced` | `readonly` | (`option`) => [`PaymentRequirements`](#paymentrequirements) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) |

***

### BreadthId

> **BreadthId** = `Exclude`\<`Extract`\<keyof *typeof* `EIP155_X402`, `` `x402/${string}` ``\>, `"x402/exact/eip155/eip3009"` \| `"x402/batch-settlement/eip155"` \| `"x402/batch-settlement/cloudflare"` \| `"x402/exact/eip155/gateway-batched"`\>

The x402 EVM breadth pairings: those with data in the EVM family's module but EIP-3009 `exact`.

***

### Eip3009Authorization

> **Eip3009Authorization** = `object`

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-from-3"></a> `from` | `string` |
| <a id="property-nonce-1"></a> `nonce` | `string` |
| <a id="property-to-1"></a> `to` | `string` |
| <a id="property-validafter-1"></a> `validAfter` | `string` |
| <a id="property-validbefore-1"></a> `validBefore` | `string` |
| <a id="property-value-1"></a> `value` | `string` |

***

### Eip3009Payment

> **Eip3009Payment** = [`PaymentPayload`](#paymentpayload) & `object`

A payment of the `x402/exact/eip155/eip3009` pairing.

#### Type Declaration

| Name | Type |
| ------ | ------ |
| `payload` | `object` |
| `payload.authorization` | [`Eip3009Authorization`](#eip3009authorization) |
| `payload.signature` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) |

***

### GatewayBatchedPayment

> **GatewayBatchedPayment** = [`PaymentPayload`](#paymentpayload) & `object`

A payment of `x402/exact/eip155/gateway-batched`.

#### Type Declaration

| Name | Type |
| ------ | ------ |
| `payload` | `object` |
| `payload.authorization` | [`BatchedAuthorization`](#batchedauthorization) |
| `payload.signature` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) |

***

### HeaderFields

> **HeaderFields** = `Readonly`\<`Record`\<`string`, `string` \| readonly `string`[]\>\>

A request's header fields as received: each field's name, in any case, with its field lines in the order received,
or with its one line. Each line is the field's value as HTTP parses it; its leading and trailing spaces and tabs are
not part of it.

***

### LcpPattern

> **LcpPattern** = `object`

A pairing's binding record: its binding pattern, absent where none of these names it; the profile that defines the
binding, where one does; whether the binding is visible on a public ledger; whether the hash can be recovered from
the chain alone; and whether the chain indexes it.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-forwardindexable"></a> `forwardIndexable` | `boolean` |
| <a id="property-onchain"></a> `onChain` | `boolean` |
| <a id="property-pattern-1"></a> `pattern?` | `"native-field"` \| `"overlay-contract"` \| `"sidecar-attestation"` \| `"opaque-challenge"` \| `"id-reuse"` \| `"protocol-extension"` \| `"http-advisory"` |
| <a id="property-profile"></a> `profile?` | `string` |
| <a id="property-zeropartyrecoverable"></a> `zeroPartyRecoverable` | `boolean` |

***

### Pairings

> **Pairings**\<`K`\> = `{ readonly [id in K]: PairingData }`

A family's pairings' data, keyed by pairing id.

#### Type Parameters

| Type Parameter |
| ------ |
| `K` *extends* `string` |

***

### PaymentPayload

> **PaymentPayload** = `object`

An x402 v2 payment, as the `PAYMENT-SIGNATURE` header carries it: the option it answers (`accepted`), the scheme's
payload, and the resource and extensions echoed from the document.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-accepted-2"></a> `accepted` | [`PaymentRequirements`](#paymentrequirements) |
| <a id="property-extensions"></a> `extensions?` | [`PaymentRequired`](#paymentrequired)\[`"extensions"`\] |
| <a id="property-payload"></a> `payload` | [`X402SchemePayload`](#x402schemepayload) |
| <a id="property-resource"></a> `resource?` | [`PaymentRequired`](#paymentrequired)\[`"resource"`\] |
| <a id="property-x402version"></a> `x402Version` | `2` |

***

### PaymentRequired

> **PaymentRequired** = `object`

An x402 v2 402 document, as the `PAYMENT-REQUIRED` header carries it: the resource, the options it accepts and its
extensions. A pairing's `advertise` places the ATR hash and link in `extensions.legalContext`, and its `read` reads
them from there.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-accepts"></a> `accepts` | [`PaymentRequirements`](#paymentrequirements)[] |
| <a id="property-error"></a> `error?` | `string` |
| <a id="property-extensions-1"></a> `extensions?` | `object` |
| <a id="property-resource-1"></a> `resource` | `object` |
| `resource.url` | `string` |
| <a id="property-x402version-1"></a> `x402Version` | `2` |

***

### PaymentRequirements

> **PaymentRequirements** = `object`

An x402 v2 payment option, one entry of a `PaymentRequired` document's `accepts`: the scheme, the CAIP-2 network,
the amount in the asset's base units, the asset, the payee (`payTo`), the longest the payment may take in seconds
(`maxTimeoutSeconds`), and the scheme's `extra` members.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-amount"></a> `amount` | `string` |
| <a id="property-asset"></a> `asset` | `string` |
| <a id="property-extra"></a> `extra?` | `object` |
| <a id="property-maxtimeoutseconds"></a> `maxTimeoutSeconds` | `number` |
| <a id="property-network"></a> `network` | `string` |
| <a id="property-payto"></a> `payTo` | `string` |
| <a id="property-scheme"></a> `scheme` | `string` |

***

### Permit2Authorization

> **Permit2Authorization** = `object`

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-deadline"></a> `deadline` | `string` |
| <a id="property-from-4"></a> `from` | `string` |
| <a id="property-nonce-2"></a> `nonce` | `string` |
| <a id="property-permitted"></a> `permitted` | `object` |
| `permitted.amount` | `string` |
| `permitted.token` | `string` |
| <a id="property-spender"></a> `spender` | `string` |
| <a id="property-witness"></a> `witness?` | `object` |

***

### RequestCommitment

> **RequestCommitment** = `object`

The commitment to an HTTP request: its method, path, query and body's digest, and, where the resource server names
header fields, `headers`: each named field's lower-cased name and SHA-256 of its value, never the value.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-bodydigest"></a> `bodyDigest` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) |
| <a id="property-headers-1"></a> `headers?` | readonly [`HeaderDigest`](#headerdigest)[] |
| <a id="property-method-1"></a> `method` | `string` |
| <a id="property-path"></a> `path` | `string` |
| <a id="property-query"></a> `query` | `string` |

***

### SettlementResponse

> **SettlementResponse** = `object`

x402's settlement response, as `PAYMENT-RESPONSE` carries it; any other member is kept as it is.

#### Indexable

> \[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json) \| `undefined`

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-errorreason"></a> `errorReason?` | `string` |
| <a id="property-network-1"></a> `network` | `string` |
| <a id="property-payer"></a> `payer?` | `string` |
| <a id="property-success"></a> `success` | `boolean` |
| <a id="property-transaction"></a> `transaction` | `string` |

***

### ToolCallCommitment

> **ToolCallCommitment** = `object`

The commitment to an MCP tool call: the tool's name, and SHA-256 over the RFC 8785 form of its arguments.

#### Properties

| Property | Type |
| ------ | ------ |
| <a id="property-argumentsdigest"></a> `argumentsDigest` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) |
| <a id="property-tool"></a> `tool` | `string` |

***

### X402PairingId

> **X402PairingId** = `"x402/exact/eip155/eip3009"` \| `"x402/exact/eip155/permit2"` \| `"x402/exact/eip155/erc7710"` \| `"x402/exact/eip155/erc7710-salt"` \| `"x402/upto/eip155/permit2"` \| `"x402/auth-capture/eip155/eip3009"` \| `"x402/auth-capture/eip155/permit2"`

***

### X402SchemePayload

> **X402SchemePayload** = \{ `authorization`: [`Eip3009Authorization`](#eip3009authorization); `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} \| \{ `permit2Authorization`: [`Permit2Authorization`](#permit2authorization); `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} \| \{ `delegationManager`: `string`; `delegator`: `string`; `permissionContext`: `string`; \} \| \{ `authorization`: [`Eip3009Authorization`](#eip3009authorization); `salt`: `string`; `saltNonce?`: `string`; `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} \| \{ `permit2Authorization`: [`Permit2Authorization`](#permit2authorization); `salt`: `string`; `saltNonce?`: `string`; `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}

The payload of each x402 EVM scheme this package carries; every member is a string.

***

### X402Unsigned

> **X402Unsigned** = \{ `request`: \{ `escrow?`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `kind`: `"eip712"`; `paymentInfo?`: [`PaymentInfo`](https://lcp.integraledger.com/reference/api/evm.md#paymentinfo); `typedData`: [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata) \| [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) \| [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#receivetypeddata); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload); \} \| \{ `request`: \{ `amount`: `bigint`; `chainId`: `number`; `kind`: `"erc7710"`; `payTo`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `salt`: [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash); `token`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload); \}

What a breadth pairing's `build` asks the buyer's signer for, and how the answer completes the payment.

#### Union Members

##### Type Literal

\{ `request`: \{ `escrow?`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `kind`: `"eip712"`; `paymentInfo?`: [`PaymentInfo`](https://lcp.integraledger.com/reference/api/evm.md#paymentinfo); `typedData`: [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata) \| [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) \| [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#receivetypeddata); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload); \}

| Name | Type | Description |
| ------ | ------ | ------ |
| `request` | `object` | On `x402/auth-capture/eip155`, `paymentInfo` and `escrow` are what the typed data's nonce is the hash of: `paymentHash(chainId, escrow, paymentInfo)`, `chainId` the typed data's domain's, `paymentInfo`'s payer the zero address, as the escrow's collectors compute it. They name the operator, the receiver and both expiries the signature grants, so a client can show them and hold the nonce to them. No other pairing gives them. |
| `request.escrow?` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | - |
| `request.kind` | `"eip712"` | - |
| `request.paymentInfo?` | [`PaymentInfo`](https://lcp.integraledger.com/reference/api/evm.md#paymentinfo) | - |
| `request.typedData` | [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata) \| [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) \| [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#receivetypeddata) | - |
| `complete()` | (`sig`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload) | - |

***

##### Type Literal

\{ `request`: \{ `amount`: `bigint`; `chainId`: `number`; `kind`: `"erc7710"`; `payTo`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `salt`: [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash); `token`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload); \}

## Variables

### authCaptureEip3009

> `const` **authCaptureEip3009**: [`BreadthBase`](#breadthbase)\<`"x402/auth-capture/eip155/eip3009"`\> & `object`

`x402/auth-capture/eip155/eip3009`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's
facilitator submits the escrow call that executes the authorization the payer signed, and names its transaction;
`status` reads it.

#### Type Declaration

| Name | Type | Default value |
| ------ | ------ | ------ |
| `authorizer()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `bound()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `build()` | (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Unsigned`](#x402unsigned)\> | - |
| `recover()` | (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AuthCaptureRef`](https://lcp.integraledger.com/reference/api/evm.md#authcaptureref)\> | - |
| `status()` | (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> | `authCaptureRead` |

***

### authCapturePermit2

> `const` **authCapturePermit2**: [`BreadthBase`](#breadthbase)\<`"x402/auth-capture/eip155/permit2"`\> & `object`

`x402/auth-capture/eip155/permit2`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's
facilitator submits the escrow call that executes the Permit2 transfer the payer signed, and names its transaction;
`status` reads it.

#### Type Declaration

| Name | Type | Default value |
| ------ | ------ | ------ |
| `authorizer()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `bound()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `build()` | (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Unsigned`](#x402unsigned)\> | - |
| `recover()` | (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AuthCaptureRef`](https://lcp.integraledger.com/reference/api/evm.md#authcaptureref)\> | - |
| `status()` | (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> | `authCaptureRead` |

***

### exactEip3009

> `const` **exactEip3009**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `authorizer`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`presented`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `broadcaster`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\>; `build`: (`choice`, `h`, `act?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](#unsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/eip155/eip3009"`; `pattern`: [`LcpPattern`](#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`presented`, `option`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Eip3009Ref`](https://lcp.integraledger.com/reference/api/evm.md#eip3009ref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)[]; `request`: [`RequestCommitment`](#requestcommitment) \| [`ToolCallCommitment`](#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](#paymentrequirements); \}\>

`x402/exact/eip155/eip3009`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator submits
`transferWithAuthorization` with the authorization the payer signed, and names its transaction; `status` reads it.

***

### exactErc7710

> `const` **exactErc7710**: [`BreadthBase`](#breadthbase)\<`"x402/exact/eip155/erc7710"`\> & `object`

`x402/exact/eip155/erc7710`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator redeems
the delegation the payer signed. Nothing the delegator signed carries H, so a read of the chain alone never settles
it: its `status` reads the transaction the caller names, after the position of the agreement's own settlement, which
the caller gives, and holds it to a `Transfer` from the payment's `delegator` to the option's payee.

#### Type Declaration

| Name | Type | Default value |
| ------ | ------ | ------ |
| `bound()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | `erc7710Bound` |
| `build()` | (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Unsigned`](#x402unsigned)\> | `erc7710Build` |
| `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Erc7710Ref`](https://lcp.integraledger.com/reference/api/evm.md#erc7710ref)\> | - |
| `status()` | (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> | `erc7710Read` |

***

### exactErc7710Salt

> `const` **exactErc7710Salt**: [`BreadthBase`](#breadthbase)\<`"x402/exact/eip155/erc7710-salt"`\> & `object`

`x402/exact/eip155/erc7710-salt`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's
facilitator redeems the delegation the payer signed, and names its transaction; `status` reads it.

#### Type Declaration

| Name | Type | Default value |
| ------ | ------ | ------ |
| `authorizer()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | `erc7710SaltAuthorizer` |
| `bound()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | `erc7710SaltBound` |
| `build()` | (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Unsigned`](#x402unsigned)\> | `erc7710Build` |
| `recover()` | (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | `redeemedLeafRecover` |
| `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Erc7710Ref`](https://lcp.integraledger.com/reference/api/evm.md#erc7710ref)\> | - |
| `status()` | (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> | `erc7710SaltRead` |

***

### exactGatewayBatched

> `const` **exactGatewayBatched**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `authorizer`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `broadcaster`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`GatewayBatchedUnsigned`](#gatewaybatchedunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/eip155/gateway-batched"`; `pattern`: [`LcpPattern`](#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)[]; `request`: [`RequestCommitment`](#requestcommitment) \| [`ToolCallCommitment`](#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](#paymentrequirements); \}\>

`x402/exact/eip155/gateway-batched`. The payee broadcasts (`broadcaster` answers `"payee"`): the resource server
hands the authorization the payer signed to Circle Gateway, which settles it; no `status` reads it.

***

### exactPermit2

> `const` **exactPermit2**: [`BreadthBase`](#breadthbase)\<`"x402/exact/eip155/permit2"`\> & `object`

`x402/exact/eip155/permit2`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator
submits the Permit2 transfer the payer signed, and names its transaction; `status` reads it.

#### Type Declaration

| Name | Type | Default value |
| ------ | ------ | ------ |
| `authorizer()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `bound()` | (`presented`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `build()` | (`choice`, `h`, `act?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Unsigned`](#x402unsigned)\> | - |
| `recover()` | (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `reference()` | (`presented`, `option`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Permit2Ref`](https://lcp.integraledger.com/reference/api/evm.md#permit2ref)\> | - |
| `status()` | (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> | `permit2ExactRead` |

***

### LEGAL\_CONTEXT

> `const` **LEGAL\_CONTEXT**: `"legalContext"` = `"legalContext"`

The key of the x402 extension that carries the ATR hash and link, in a document's or payment's `extensions`.

***

### LEGAL\_CONTEXT\_SCHEMA

> `const` **LEGAL\_CONTEXT\_SCHEMA**: [`Json`](https://lcp.integraledger.com/reference/api.md#json)

The JSON Schema `advertise` writes as the `schema` of the `legalContext` extension: an object whose `type` is
`"sha256"`, whose `value` is H as `0x` and 64 lowercase hex digits, and whose `legalContextUrl` is an `https` URL.

***

### PAYMENT\_REQUIRED

> `const` **PAYMENT\_REQUIRED**: `"PAYMENT-REQUIRED"` = `"PAYMENT-REQUIRED"`

The response header that carries `PaymentRequired`.

***

### PAYMENT\_RESPONSE

> `const` **PAYMENT\_RESPONSE**: `"PAYMENT-RESPONSE"` = `"PAYMENT-RESPONSE"`

The response header that carries the settlement response.

***

### PAYMENT\_SIGNATURE

> `const` **PAYMENT\_SIGNATURE**: `"PAYMENT-SIGNATURE"` = `"PAYMENT-SIGNATURE"`

The request header that carries `PaymentPayload`.

***

### uptoPermit2

> `const` **uptoPermit2**: [`BreadthBase`](#breadthbase)\<`"x402/upto/eip155/permit2"`\> & `object`

`x402/upto/eip155/permit2`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator,
the witness's `facilitator`, submits the Permit2 transfer the payer signed for the amount it settles, and names its
transaction; `status` reads it.

#### Type Declaration

| Name | Type | Default value |
| ------ | ------ | ------ |
| `authorizer()` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `bound()` | (`presented`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `build()` | (`choice`, `h`, `act?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Unsigned`](#x402unsigned)\> | - |
| `recover()` | (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | - |
| `reference()` | (`presented`, `option`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Permit2Ref`](https://lcp.integraledger.com/reference/api/evm.md#permit2ref)\> | - |
| `status()` | (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> | `permit2UptoRead` |

## Functions

### decodePaymentRequired()

> **decodePaymentRequired**(`header`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](#paymentrequired)

`PAYMENT-REQUIRED`'s value: an x402 v2 `PaymentRequired`, else as `decodeHeader` refuses it.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `header` | `unknown` |

#### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](#paymentrequired)

***

### decodePaymentResponse()

> **decodePaymentResponse**(`header`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SettlementResponse`](#settlementresponse)

`PAYMENT-RESPONSE`'s value: a settlement response, whose `success` is a boolean, else as `decodeHeader` refuses it.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `header` | `unknown` |

#### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SettlementResponse`](#settlementresponse)

***

### decodePaymentSignature()

> **decodePaymentSignature**(`header`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload)

`PAYMENT-SIGNATURE`'s value: an x402 v2 `PaymentPayload`, else as `decodeHeader` refuses it.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `header` | `unknown` |

#### Returns

[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](#paymentpayload)

***

### encodeHeader()

> **encodeHeader**(`value`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)

A header's value as `@x402/core` 2.30.0 writes it (`src/http/index.ts:17-18`, `:50-51`, `:76-80`): `JSON.stringify`
of `value`, in its own member order, as UTF-8, in padded standard base64 (RFC 4648 §4). A member whose value is
`undefined`, at any depth, is left out, as `JSON.stringify` leaves it out, and a top-level `extensionResponses` is
left out, as `encodePaymentResponseHeader` deletes it; no x402 `PaymentRequired` or `PaymentPayload` has that member.
Nothing else that `JSON.stringify` would leave out or rewrite is taken (an `undefined` array item, a function, a
`bigint`): a value that is not then a JSON object, or whose UTF-8 is over `MAX_HEADER_BYTES`, is
`x402/header-malformed`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | [`PaymentPayload`](#paymentpayload) \| [`PaymentRequired`](#paymentrequired) \| [`SettlementResponse`](#settlementresponse) |

#### Returns

`string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)

***

### issuedDigest()

> **issuedDigest**(`v`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>

SHA-256 over the RFC 8785 form of an issued option or request commitment. Takes any value and refuses one that is not
JSON as `core/content-not-json`, as `digestJson` does.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `v` | `unknown` |

#### Returns

`Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>

***

### pairingOfPayment()

> **pairingOfPayment**(`p`): `"x402/exact/eip155/gateway-batched"` \| [`X402PairingId`](#x402pairingid) \| `undefined`

The eip155 pairing of this entry point that serves a presented payment: the `exact`, `upto` or `auth-capture` pairing
its `accepted` names, Circle Gateway's batched `exact` option being `x402/exact/eip155/gateway-batched`, except that an `erc7710` payment is the salt level only where its delegation manager is
`DELEGATION_MANAGER`, on a chain in `DELEGATION_MANAGER_CHAINS`, and the leaf delegation of its permission context
carries as its salt the H its echoed `extensions.legalContext.info` names. Every other delegation, a stock client's
whose leaf salt is drawn at random among them, or one whose context or extension does not decode, is the level that
signs no H. Undefined for any other option, an option on another rail included; the root `pairingOf` names the x402
pairing of an option on any rail.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `p` | [`PaymentPayload`](#paymentpayload) |

#### Returns

`"x402/exact/eip155/gateway-batched"` \| [`X402PairingId`](#x402pairingid) \| `undefined`

***

### requestCommitment()

> **requestCommitment**(`r`, `fields?`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`RequestCommitment`](#requestcommitment)\>

The commitment to the request a challenge answers (x402-request-commitment.md): the method as received, a token (RFC
9110 §9.1, else `x402/request-target-invalid`), the target split at its first `?`, and SHA-256 over the body bytes
exactly as received; and, where `fields` names request header fields, `headers`: for each, in the order named, its
lower-cased name and SHA-256 of its value as `r.headers` gives it, the lines of a field given more than once joined
by a comma and a space, `cookie`'s by a semicolon and a space, and `null` for a field the request lacks. With no
field named the commitment has no `headers` member. Names that are not distinct field names, fields named with no
`r.headers`, header fields that are not a record of strings or lists of strings, two keys naming one named field, or
a named field's value holding a character outside visible ASCII, the space and the tab, are
`x402/request-header-invalid`; a named field's value over 1 MiB is `x402/request-too-large`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `r` | [`HttpRequest`](#httprequest) |
| `fields?` | readonly `string`[] |

#### Returns

`Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`RequestCommitment`](#requestcommitment)\>

***

### tie()

> **tie**(`accepts`, `request`): \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)[]; `request`: [`RequestCommitment`](#requestcommitment) \| [`ToolCallCommitment`](#toolcallcommitment); \}\]

The binding slot: every option the challenge offers, exactly as issued, and the request they answer, an HTTP request
(`requestCommitment`) or an MCP tool call (`toolCallCommitment`).

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `accepts` | readonly [`PaymentRequirements`](#paymentrequirements)[] |
| `request` | [`RequestCommitment`](#requestcommitment) \| [`ToolCallCommitment`](#toolcallcommitment) |

#### Returns

\[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)[]; `request`: [`RequestCommitment`](#requestcommitment) \| [`ToolCallCommitment`](#toolcallcommitment); \}\]

***

### toolCallCommitment()

> **toolCallCommitment**(`call`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ToolCallCommitment`](#toolcallcommitment)\>

The commitment to the MCP tool call a challenge answers (x402-request-commitment.md): the tool's `name` as received,
and SHA-256 over the RFC 8785 form of its `arguments`, absent read as `{}`. Nothing else of the request is read:
`params._meta`, where the payment rides, and the JSON-RPC envelope are not committed. A call that is not an object, a
name that is not a well-formed string of 1 to 8192 characters, or arguments that are not a JSON object, is
`x402/tool-call-malformed`; arguments over 1 MiB in that form are `x402/request-too-large`.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `call` | [`ToolCall`](#toolcall) |

#### Returns

`Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ToolCallCommitment`](#toolcallcommitment)\>

## References

### Broadcaster

Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster)

***

### Eip3009TypedData

Re-exports [Eip3009TypedData](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata)

***

### EvmMark

Re-exports [EvmMark](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)

***

### EvmQuery

Re-exports [EvmQuery](https://lcp.integraledger.com/reference/api/ap2.md#evmquery)

***

### X402Advertise

Re-exports [X402Advertise](https://lcp.integraledger.com/reference/api/casper.md#x402advertise)

***

### X402Read

Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read)
