# Integra Protocol: API reference > The 37 pages of the section API reference of https://lcp.integraledger.com/llms.txt, in its order. They document @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. # @integraledger/lcp > The package root of `@integraledger/lcp`: the core functions of `@integraledger/lcp/core`, the registry of every pairing (`BINDINGS`, `pairingOf`) and its types, and the return after an agreement. Source: https://lcp.integraledger.com/reference/api Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The package root of `@integraledger/lcp`: the core functions of `@integraledger/lcp/core`, the registry of every pairing (`BINDINGS`, `pairingOf`) and its types, and the return after an agreement. The core functions assemble an ATR and hash its exact bytes, compare hashes, give the hash's string and structured forms, and hold the https-link rule, `isRefusal` and `readToRepeat`. The return after an agreement is the `Legal-Context` header, its check, and the charge options an agreement option serves. The root also exports MPP's challenge id and its hash (`challengeId`, `challengeH`, `challengeHash`); the package's size bounds; and `FETCHED`, the key under which a pairing's `fetchPresented` writes the seller's read onto a credential. ## Interfaces ### AgreementData Present where the pairing's payment can itself be an agreement. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `fee` | `readonly` | `string` | Who can pay the fee, by the chain and the published scheme. | | `feePayer?` | `readonly` | [`FeePayer`](https://lcp.integraledger.com/reference/api.md#feepayer) | `fee` as data: the parties that can pay it, and the one that pays where the option names none. | | `floor` | `readonly` | `"0"` \| `` `1${string}` `` \| `` `2${string}` `` \| `` `3${string}` `` \| `` `4${string}` `` \| `` `5${string}` `` \| `` `6${string}` `` \| `` `7${string}` `` \| `` `8${string}` `` \| `` `9${string}` `` \| `"rule"` | The smallest amount the scheme and token admit, in base units: `"0"`, or a decimal with no sign and no leading zero; or `rule`, a rule over a ledger parameter that the pairing's profile states and its entry point's floor function evaluates: `cardanoFloor`, `suiFloor` or `starknetFloor`. | | `only?` | `readonly` | `true` | Present where the form is offered as an agreement and never as a charge. | | `succeeded` | `readonly` | `string` | The fields that show the transaction succeeded. | *** ### AptosPaymentPayload #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.transaction` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### Authorizer The optional member of a pull pairing whose payer signs an authorization that the chain executes later: the account whose signature authorises the pull, from the presented payment, as lowercase hex. With a `reference` that records the authorization as `authorization` (its scheme, the contract that records its use, its nonce, deadline and token), as the MPP EVM `authorization` and `permit2` charges' and the `usdc` EVM charge's do, it is what `authorizationUsed` (`@integraledger/lcp/evm`) needs to read the authorization's use before any transaction is named. The x402 pull pairings' references record no `authorization`. #### Methods ##### authorizer()? > `optional` **authorizer**(`presented`): `Promise`\<`string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<`string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> *** ### BatchPaymentPayload #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.type` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### CardanoPaymentPayload #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`CardanoPayload`](https://lcp.integraledger.com/reference/api/cardano.md#cardanopayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### Carrier Where H rides. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `member?` | `readonly` | readonly `string`[] | The member of the option or challenge request the seller writes H into, as a path from the option (x402) or from the decoded request (MPP); absent where the seller writes it into none. | | `signed` | `readonly` | `string` \| `null` | The field of what the payer signs that carries H, in the profile's words; null where none does. | *** ### CarrierAfterH The optional member of a pairing whose carrier the seller writes after H: `advertise`'s checks and placement, without the checks on that carrier. It takes the arguments its pairing's `advertise` takes. #### Methods ##### advertiseBeforeCarrier()? > `optional` **advertiseBeforeCarrier**(`doc`, `h`, `link`, `offer`, ...`rest`): `unknown` ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | `never` | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | `never` | | ...`rest` | `never`[] | ###### Returns `unknown` *** ### CloudflarePaymentPayload The request's payment document: the option's amount and asset, with the challenge's `extensions` echoed. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions` | `object` | | `payload` | `object` | | `payload.amount` | `string` | | `payload.asset` | `string` | | `x402Version` | `2` | *** ### Codec A pairing's codec. `Presented` is what the payer presents, `Ref` the reference `reference` gives, `Reader` the reader the caller supplies to `status`, `recover` and `fetchPresented`, and `F` the family's other types. A pairing with no read has no `status` and no `recover`, and takes `never` for `Reader`, and for `Ref` where it has no `reference`. `build`, `bound` and `reference` take the act, and `bound` and `reference` H with it, where the caller gives them; absent means the act `payment`. On a pairing whose single-use value is H itself or H's low bits, the act `agreement` makes each use the agreement's own value (`agreementValue`, or its low bits as the pairing takes H's) where the payment uses H; on every other pairing the act changes nothing. `status` takes the act in its query. #### Type Parameters | Type Parameter | | ------ | | `Presented` | | `Ref` | | `Reader` | | `F` *extends* [`Family`](https://lcp.integraledger.com/reference/api.md#family) | #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `advertise` | `readonly` | (`doc`, `h`, `link`, `offer`, ...`rest`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `F`\[`"advertised"`\] | The seller's placement: a copy of the document with H and the link placed for `offer` as this pairing places them, and the agreement URL where one is given; the arguments after `offer` are the family's (`F["rest"]`). | | `advertiseBeforeCarrier?` | `readonly` | (`doc`, `h`, `link`, `offer`, ...`rest`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `F`\[`"advertised"`\] | `advertise` without the checks on a carrier the seller writes after H. | | `bound` | `readonly` | (`presented`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | H as what was presented carries it. Given the act `agreement` and H on a pairing whose agreement has its own value, it checks that what was presented carries that value in H's place, and gives H where it does. | | `broadcaster` | `readonly` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> | Who broadcasts what the payer presents: `"payer"` or `"payee"` (`Broadcaster`). A payment of a type or kind the pairing does not take gets the refusal `bound` gives it. | | `build?` | `readonly` | (`choice`, `h`, `act?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `F`\[`"unsigned"`\]\> | What the payer signs, with H in place, or for the act `agreement` on a pairing whose agreement has its own value, that value. Absent where lcp builds no payment for the pairing: the payer's own client builds it. | | `channel?` | `readonly` | `object` | For a channel, a session or a subscription. | | `channel.boundWithin` | `readonly` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | H as a payment within the channel carries it. A pairing whose payments within the channel carry no hash refuses every one (on MPP, `mpp/not-bound-within`). | | `channel.kind` | `readonly` | (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind) | Whether the presented payment opens the channel, pays within it, or closes it (`ChannelKind`). | | `channel.ref` | `readonly` | (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\> | The network and channel the presented payment belongs to; a payment `kind` refuses gets `kind`'s refusal. | | `channel.until` | `readonly` | (`presented`) => `number` \| `undefined` | The time, in Unix seconds, after which the channel takes no payment, where the payment states one. | | `fetchPresented?` | `readonly` | (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Presented`\> | For a form its payer broadcasts: the presented payment completed with the landed transaction it names. | | `keyProves?` | `readonly` | `string` | What the record proves for a transfer `keySearch` finds. | | `keySearch?` | `readonly` | (`ref`, `receipt`, `h`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Ref` | The read keys of a transfer made under a key the payer authorised over H, from the receipt that registered it. | | `landedTx?` | `readonly` | (`presented`) => `string` \| `undefined` | For a form its payer broadcasts: the transaction the presented payment names, or undefined. | | `read` | `readonly` | (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `F`\[`"offered"`\] | The buyer's reading of the advertised document: H, the link, the agreement URL where the document carries one, and the offer this pairing serves in it (on x402, an `X402Offer`: the document and the options the pairing serves). | | `recover?` | `readonly` | (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | The value a landed transaction carries in H's place, in H's spelling: H, or H's low bits as the pairing carries them; and from an agreement's transaction on a pairing whose agreement has its own value, that value, which a holder of the ATR compares with `agreementValue` of its own H, since a digest is not read back to H. | | `reference?` | `readonly` | (`presented`, `option`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Ref`\> | The read keys of a presented payment, with the payee of the option it answers; given the act `agreement` and H on a pairing whose agreement has its own value, the single-use value it names is that value. | | `status?` | `readonly` | (`ref`, `reader`, `query`) => `Promise`\<`F`\[`"answer"`\]\> | The read of the act the query asks about, from the reference and what the landed transaction adds to it. | *** ### DataMembers The members of a pairing's data that do not turn on its coverage. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `asset?` | `readonly` | `string` | How the asset is identified in the landed transaction. | | `broadcasts` | `readonly` | [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster) \| `"either"` | The answers the codec's `broadcaster` can give over every credential type the pairing takes. | | `cardLike?` | `readonly` | `true` | Present where the pairing's payment is card-like: a card, checkout or processor payment, on no ledger or payment network a CAIP-2 id names, which the seller or its processor takes and reports. Lightning's pairings, whose invoice is on an `lnbtc` network, do not have it. | | `carrier` | `readonly` | [`Carrier`](https://lcp.integraledger.com/reference/api.md#carrier) | - | | `confirmed` | `readonly` | `"no"` \| `"yes"` | Whether something outside lcp has shown the form as its profile defines it. | | `destination?` | `readonly` | `string` | How the account the act names is identified in the landed transaction. | | `nonce` | `readonly` | `"unshown"` \| `"single-use"` \| `"reusable"` | Whether the identical instrument can land more than once; `unshown` until a vector or a run shows single use. | | `option?` | `readonly` | [`OptionData`](https://lcp.integraledger.com/reference/api.md#optiondata) | Present where the pairing's option filter requires members of the option's `extra` to hold fixed values, which `extra` names, so a resource server writes them into the option from the data. | | `payeePreconditions?` | `readonly` | readonly `string`[] | What the payee's account must hold or be on chain before a payment through the pairing can reach it, each in the profile's words: an account, a token association, an asset already held, a funded key. Absent where the pairing's profile states none. | | `payer?` | `readonly` | `string` | How the payer is identified in the landed transaction. | | `proves` | `readonly` | `string` | What the read establishes of a payment through the pairing. | | `read?` | `readonly` | [`ReadData`](https://lcp.integraledger.com/reference/api.md#readdata) | Absent where no public ledger records the payment. | | `source` | `readonly` | `string` | Who writes H: lcp's client, or a stock client and release, with the member it copies H from. | *** ### Family A family's own types, as one descriptor: what `read` and `advertise` take and give, what `build` takes and gives, the option a payment answers, and what `status` and `recover` take and answer. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `advertised` | `readonly` | `unknown` | What `advertise` gives. | | `answer` | `readonly` | `unknown` | What `status` answers. | | `choice` | `readonly` | `unknown` | The buyer's inputs `build` takes. | | `doc` | `readonly` | `unknown` | The advertised document `read` reads. | | `landed` | `readonly` | `unknown` | The members of `status`'s reference that `reference` does not give, which the caller adds: the landed transaction, and where the read takes them, H and the position its search starts from; `unknown` where there are none. | | `network` | `readonly` | `unknown` | The network `recover` takes. | | `offer` | `readonly` | `unknown` | The offer `advertise` places H on: the x402 option, the MPP challenge, or the protocol's own option. | | `offered` | `readonly` | `unknown` | What `read` gives: the hash, the link, the agreement URL where the document carries one, and the offer. | | `option` | `readonly` | `unknown` | The x402 option or MPP challenge a payment answers, which `reference` and `recover` take. | | `placedIn` | `readonly` | `unknown` | What `advertise` places H in: the document, or nothing where H goes into values the seller places itself. | | `query` | `readonly` | `unknown` | What `status` takes beside the reference and the reader. | | `receipt?` | `readonly` | `unknown` | The receipt `keySearch` reads; absent where the pairing has no `keySearch`. | | `rest` | `readonly` | readonly `unknown`[] | The arguments `advertise` takes after `offer`: on MPP the challenge's position, the act, then the agreement URL. | | `unsigned` | `readonly` | `unknown` | What `build` gives the payer to sign. | *** ### FeePayer Who can pay an agreement's fee, as data. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `default?` | `readonly` | [`FeeParty`](https://lcp.integraledger.com/reference/api.md#feeparty) | The party that pays it where the option names no fee payer, one of `may`; absent where the option always names one, or the pairing's profile states none. | | `may` | `readonly` | readonly [`FeeParty`](https://lcp.integraledger.com/reference/api.md#feeparty)[] | Each party that can pay it, by the chain and the published scheme, each once. | *** ### ForeignItem A transaction that carries H, succeeded, and is not the act asked about. #### Type Parameters | Type Parameter | | ------ | | `Position` | #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `authority?` | `readonly` | `string` | The authority the ledger records for its signer, where the read records one. | | `moved?` | `readonly` | readonly [`Moved`](https://lcp.integraledger.com/reference/api.md#moved)[] | - | | `named?` | `readonly` | `string` | The account it names apart from what it moved, where the read records one, as `Named.named` states it. | | `position?` | `readonly` | `Position` | - | | `reason` | `readonly` | [`ForeignReason`](https://lcp.integraledger.com/reference/api.md#foreignreason) | - | | `signer?` | `readonly` | `string` | - | | `transaction` | `readonly` | `string` | - | *** ### LegalContextRecord What a resource server's own record holds for the request a return names: the sale's H, and its return value where it has one. #### Properties | Property | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | | `returnValue?` | `Uint8Array`\<`ArrayBufferLike`\> | *** ### LegalContextReturn What a `Legal-Context` header carries: H, and the sale's return value where it has one, as 32 bytes. #### Properties | Property | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | | `returnValue?` | `Uint8Array`\<`ArrayBufferLike`\> | *** ### Life The longest a signed payment can stay payable where the rail itself bounds it, with the chain rule it comes from. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `rule` | `readonly` | `string` | | `unit` | `readonly` | `string` | | `value` | `readonly` | `number` | *** ### Moved One transfer or deposit an act made, as the read observed it, named by its transaction and its place in it, so that two answers that name one transfer are told from two transfers. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `amount` | `readonly` | `string` | - | | `asset` | `readonly` | `string` | - | | `beneficiary?` | `readonly` | `string` | On a deposit into a contract, the account that contract names as the payment's beneficiary, where the act names one; absent on a transfer, and on a deposit that names none. Observed, and never judged. | | `contract?` | `readonly` | `string` | On a deposit into a contract, the contract it was deposited into, in the chain's own spelling, as the act names it: on EVM the contract's address, on the XRP Ledger the channel's id, on Solana the channel's account, on Cardano the script's address in Bech32. Absent on a transfer, so that its presence marks a deposit. Observed, and never judged. | | `decimals?` | `readonly` | `number` | Where the ledger states it for the asset, the number of decimals in which `amount` is written: `amount` counts the asset's smallest unit, and the amount in the asset's own unit is `amount` × 10^-`decimals`. Observed, and never compared with anything. | | `partial?` | `readonly` | `true` | True where the ledger records that the payer signed the payment as one that may deliver less than the amount it names, and `amount` is then what it delivered; absent otherwise. Observed, and never judged. | | `place?` | `readonly` | `string` \| `number` | Its place in that transaction, in the pairing's own spelling: on EVM the position of its `Transfer` log among the receipt's logs; elsewhere the position of the instruction, operation, output or event it was read from. | | `to` | `readonly` | `string` | The account it reached; on a deposit into a contract, as each pairing's profile states, the beneficiary the contract names or the contract itself. `contract` and `beneficiary` name the two apart. | | `transaction?` | `readonly` | `string` | The transaction it was read from. | *** ### Named #### Type Parameters | Type Parameter | | ------ | | `Position` | | `Mark` | #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `authority?` | `readonly` | `string` | - | | `finality?` | `readonly` | `Mark` | The mark the read reached for the transaction it names. | | `moved?` | `readonly` | readonly [`Moved`](https://lcp.integraledger.com/reference/api.md#moved)[] | - | | `named?` | `readonly` | `string` | The account the act names apart from what it moved, where the read records one: on an activation, the one recipient the key authorization it carries lets its key pay, whether or not the act moved anything to it. Absent where the act names no such account. Observed, and never judged. | | `position?` | `readonly` | `Position` | - | | `signer?` | `readonly` | `string` | - | | `transaction?` | `readonly` | `string` | - | *** ### OptionData What an option of the pairing holds, as data. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `extra` | `readonly` | `object` | The members of the option's `extra` the pairing's option filter requires, each with the one value it takes, as the pairing's profile states them: an option that lacks one, or holds another value, is not served as this pairing. | *** ### PresentedOn What the buyer presents as payment, per surface: the union of the payment types of every pairing on it. Every pairing's `bound` and `reference` take `unknown` and check what they are given. `Presented` indexes it by every surface, so a pairing on a surface it does not name does not compile. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `ack` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | ACK defines no payer signature; its `bound` refuses whatever is presented. | | `acp` | [`Presented`](https://lcp.integraledger.com/reference/api/acp.md#presented) | - | | `ap2` | [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented) \| [`X402Presented`](https://lcp.integraledger.com/reference/api/ap2.md#x402presented) | - | | `card` | [`TapPresented`](https://lcp.integraledger.com/reference/api/card.md#tappresented) \| [`VicPresented`](https://lcp.integraledger.com/reference/api/card.md#vicpresented) \| [`ViImmediate`](https://lcp.integraledger.com/reference/api/card.md#viimmediate) \| [`ViAutonomous`](https://lcp.integraledger.com/reference/api/card.md#viautonomous) | - | | `mpp` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) | - | | `spend-permissions` | [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) | - | | `ucp` | [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented) \| [`AgentSignedPresented`](https://lcp.integraledger.com/reference/api/ucp.md#agentsignedpresented) | - | | `x402` | [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) \| [`LnPaymentPayload`](https://lcp.integraledger.com/reference/api/lightning.md#lnpaymentpayload) \| [`SvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#svmpaymentpayload) \| [`UptoSvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#uptosvmpaymentpayload) \| [`XrplPaymentPayload`](https://lcp.integraledger.com/reference/api.md#xrplpaymentpayload) \| [`HederaPaymentPayload`](https://lcp.integraledger.com/reference/api.md#hederapaymentpayload) \| [`ExecutorPaymentPayload`](https://lcp.integraledger.com/reference/api.md#executorpaymentpayload) \| [`AptosPaymentPayload`](https://lcp.integraledger.com/reference/api.md#aptospaymentpayload) \| [`AvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#avmpaymentpayload) \| [`CardanoPaymentPayload`](https://lcp.integraledger.com/reference/api.md#cardanopaymentpayload) \| [`CasperPaymentPayload`](https://lcp.integraledger.com/reference/api.md#casperpaymentpayload) \| [`CcdPaymentPayload`](https://lcp.integraledger.com/reference/api.md#ccdpaymentpayload) \| [`NearPayment`](https://lcp.integraledger.com/reference/api.md#nearpayment) \| [`PolkadotPaymentPayload`](https://lcp.integraledger.com/reference/api.md#polkadotpaymentpayload) \| [`StarknetPayment`](https://lcp.integraledger.com/reference/api.md#starknetpayment) \| [`StellarPaymentPayload`](https://lcp.integraledger.com/reference/api.md#stellarpaymentpayload) \| [`SuiPaymentPayload`](https://lcp.integraledger.com/reference/api.md#suipaymentpayload) \| [`TronPayment`](https://lcp.integraledger.com/reference/api.md#tronpayment) \| [`TvmPayment`](https://lcp.integraledger.com/reference/api.md#tvmpayment) \| [`BatchPaymentPayload`](https://lcp.integraledger.com/reference/api.md#batchpaymentpayload) \| [`CloudflarePaymentPayload`](https://lcp.integraledger.com/reference/api.md#cloudflarepaymentpayload) \| [`UptoXrplPaymentPayload`](https://lcp.integraledger.com/reference/api/x402-upto-xrpl.md#uptoxrplpaymentpayload) | - | *** ### PushMode The optional member of a push-mode pairing: the transaction its credential names, or undefined. #### Methods ##### landedTx()? > `optional` **landedTx**(`presented`): `string` \| `undefined` ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `string` \| `undefined` *** ### ReadData What a read of the pairing needs. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `chains?` | `readonly` | `object` | The networks, as CAIP-2 ids, each contract it names is deployed on, keyed by its name in `contracts`, where the pairing's profile or the package states them; a contract it does not key has no networks stated here. | | `contracts` | `readonly` | readonly `string`[] | The contracts the read names. | | `endpoint` | `readonly` | readonly [`EndpointKind`](https://lcp.integraledger.com/reference/api.md#endpointkind)[] | The endpoint kinds the read goes through, each of which a network declares for the read to be made there. | | `fallback?` | `readonly` | [`EndpointKind`](https://lcp.integraledger.com/reference/api.md#endpointkind) | The kind of a declared archival endpoint the read goes on to where the endpoint does not hold the history or state it needs; absent where the read has none. | | `history?` | `readonly` | `string` | The history the read needs; absent where the pairing's entry states none. | | `lapse?` | `readonly` | `string` | The signed fact after which the payment can no longer land; absent where the pairing's entry states none. | | `life?` | `readonly` | [`Life`](https://lcp.integraledger.com/reference/api.md#life) | Absent where the rail sets no bound or the pairing's entry states none. | | `note?` | `readonly` | `string` | What the read asks of its endpoints beyond their kinds; absent where nothing. | | `search` | `readonly` | `string` | The search key and its bound. | *** ### RecoverInput What `recover` takes: the network, the transaction id, and the option or challenge the ATR's binding slot holds. #### Type Parameters | Type Parameter | | ------ | | `Network` | | `Option` | #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `Network` | | `option` | `readonly` | `Option` | | `tx` | `readonly` | `string` | *** ### StatusQuery What `status` takes beside the reference and the reader: the act, the finality asked for, and, where the caller gives them, the final position the transaction must come after, the search position an earlier answer returned, and the other acts under the same H. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `Ref` | - | | `Position` | - | | `Mark` | - | | `Cursor` | `Position` | #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `act` | `readonly` | [`Act`](https://lcp.integraledger.com/reference/api.md#act) | | `after?` | `readonly` | `Position` | | `finality` | `readonly` | `Mark` | | `others?` | `readonly` | readonly [`OtherAct`](https://lcp.integraledger.com/reference/api.md#otheract)\<`Ref`\>[] | | `search?` | `readonly` | `Cursor` | *** ### StellarPaymentPayload A Stellar x402 payment: the base64 XDR of the transaction with the payer's entry signed. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.transaction` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### SuiPaymentPayload #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`SuiPayload`](https://lcp.integraledger.com/reference/api/sui.md#suipayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### SvmPaymentPayload A payment on `x402/exact/solana`: the base64 partially signed versioned transaction. `../x402-exact-solana.ts` returns it from `complete`, and the root names it among the payments `Presented` covers; both export it. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.transaction` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### UptoSvmPaymentPayload A payment on `x402/upto/solana`: the opening's signed fields and its base64 partially signed transaction. `../x402-upto-solana.ts` returns it from `complete`, and the root names it among the payments `Presented` covers; both export it. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`UptoSvmPayload`](https://lcp.integraledger.com/reference/api/x402-upto-solana.md#uptosvmpayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### XrplPaymentPayload A payment on `x402/exact/xrpl`: the wallet's signed blob, hex. `../x402-exact-xrpl.ts` returns it from `complete`, and the root names it among the payments `Presented` covers; both export the name. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.signedTxBlob` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | ## Type Aliases ### Act > **Act** = `"payment"` \| `"agreement"` The act `status` is asked about. *** ### AtrHash > **AtrHash** = `` `0x${string}` `` `0x` followed by 64 hex digits. Every hash this module emits is lowercase. *** ### AvmPaymentPayload > **AvmPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<[`AvmPresented`](https://lcp.integraledger.com/reference/api/avm.md#avmpresented)\> *** ### Binding > **Binding** = [`X402Binding`](https://lcp.integraledger.com/reference/api.md#x402binding) \| [`MppBinding`](https://lcp.integraledger.com/reference/api.md#mppbinding) \| *typeof* [`paymentRequest`](https://lcp.integraledger.com/reference/api/ack.md#paymentrequest) \| *typeof* [`delegated`](https://lcp.integraledger.com/reference/api/acp.md#delegated) \| *typeof* [`undelegated`](https://lcp.integraledger.com/reference/api/acp.md#undelegated) \| *typeof* [`checkoutMandate`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutmandate) \| *typeof* [`viAutonomous`](https://lcp.integraledger.com/reference/api/card.md#viautonomous-1) \| *typeof* [`viImmediate`](https://lcp.integraledger.com/reference/api/card.md#viimmediate-1) \| *typeof* [`sellerReference`](https://lcp.integraledger.com/reference/api/card.md#sellerreference) \| *typeof* [`visaTap`](https://lcp.integraledger.com/reference/api/card.md#visatap) \| *typeof* [`agentPay`](https://lcp.integraledger.com/reference/api/card.md#agentpay) \| *typeof* [`visaVic`](https://lcp.integraledger.com/reference/api/card.md#visavic) \| *typeof* [`bookingAp2Mandate`](https://lcp.integraledger.com/reference/api/ucp.md#bookingap2mandate) \| *typeof* [`bookingUnsigned`](https://lcp.integraledger.com/reference/api/ucp.md#bookingunsigned) \| *typeof* [`ap2Mandate`](https://lcp.integraledger.com/reference/api/ucp.md#ap2mandate) \| *typeof* [`unsigned`](https://lcp.integraledger.com/reference/api/ucp.md#unsigned-1) \| *typeof* [`checkoutMandateX402`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutmandatex402) \| *typeof* [`agentSigned`](https://lcp.integraledger.com/reference/api/ucp.md#agentsigned) \| *typeof* [`spendPermissionsEip155`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionseip155) & [`PushMode`](https://lcp.integraledger.com/reference/api.md#pushmode) & [`CarrierAfterH`](https://lcp.integraledger.com/reference/api.md#carrierafterh) & [`Authorizer`](https://lcp.integraledger.com/reference/api.md#authorizer) A pairing of protocol, scheme and rail. *** ### Broadcaster > **Broadcaster** = `"payer"` \| `"payee"` Who broadcasts what a payer presents under a pairing: `"payer"`, which sent the payment before presenting it, or `"payee"`, the seller, or the facilitator or processor acting for it, which sends or executes it after. A pairing's `broadcaster` gives this only for a payment of a type and kind the pairing takes, within the shape gate its `bound` applies first; any other payment gets the refusal `bound` gives that fault. Where a payment has a second fault that `bound` finds first, in H or the challenge, the two codes differ. A session's or batch channel's `bound` reads the opening alone, so for any other action the reader is `channel.kind`: a payment it refuses for its own content gets its refusal (a batch channel reads the payload alone, under any `accepted` option), and one a session's `channel.kind` refuses for what the challenge decides is answered. *** ### CasperPaymentPayload > **CasperPaymentPayload** = `object` #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"extensions"`\] | | `payload` | `object` | | `payload.authorization` | [`CasperAuthorization`](https://lcp.integraledger.com/reference/api/casper.md#casperauthorization) | | `payload.publicKey` | `string` | | `payload.signature` | `string` | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"resource"`\] | | `x402Version` | `2` | *** ### CcdPaymentPayload > **CcdPaymentPayload** = `object` #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"extensions"`\] | | `payload` | `object` | | `payload.signedTransaction` | `object` | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"resource"`\] | | `x402Version` | `2` | *** ### ChannelKind > **ChannelKind** = `"open"` \| `"within"` \| `"close"` What a channel's `kind` names a payment: its opening, a payment within it, or its close. *** ### CoreRefusal > **CoreRefusal** = `object` A refusal of the core, `assemble` and the JSON checks under it: one of the `core/` codes. #### Properties | Property | Type | | ------ | ------ | | `code` | `"core/slot-name"` \| `"core/slot-reserved"` \| `"core/slot-duplicate"` \| `"core/content-not-json"` \| `"core/binding-not-json"` \| `"core/too-large"` | | `refused` | `true` | *** ### Coverage > **Coverage** = `"full"` \| `"none"` `full`: the payer's own signed act, on a public ledger, binds all of H, a 256-bit digest over a preimage that holds H, or on Starknet H's low 250 bits. `none`: no public payer-signed act carries H. *** ### EndpointKind > **EndpointKind** = `"fullnode-http"` \| `"fullnode-rest"` \| `"graphql"` \| `"grpc-v2"` \| `"indexer-rest"` \| `"json-rpc"` \| `"mirror-rest"` \| `"rest-api"` \| `"rippled"` \| `"stacks-api-rest"` \| `"toncenter-v3"` A kind of endpoint a read goes through, as the pairing's chain names it. *** ### Entry > **Entry**\<`Id`, `Presented`, `Ref`, `Reader`, `F`\> = [`Codec`](https://lcp.integraledger.com/reference/api.md#codec)\<`Presented`, `Ref`, `Reader`, `F`\> & [`NoneWhereNever`](https://lcp.integraledger.com/reference/api.md#nonewherenever)\<`Presented`, `Ref`, `Reader`\> & `object` A registry entry: its id, its data and its codec. It takes `never` for `Reader` only where the codec has no member that takes a reader, for `Ref` only where it has no `reference`, and never for `Presented`. #### Type Declaration | Name | Type | | ------ | ------ | | `data` | [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata) | | `id` | `Id` | #### Type Parameters | Type Parameter | | ------ | | `Id` *extends* `string` | | `Presented` | | `Ref` | | `Reader` | | `F` *extends* [`Family`](https://lcp.integraledger.com/reference/api.md#family) | *** ### ExecutorPayload > **ExecutorPayload** = `object` The x402 `transferExecutor` payload. #### Properties | Property | Type | | ------ | ------ | | `authorization` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `executor` | `string` | | `payer` | `string` | *** ### ExecutorPaymentPayload > **ExecutorPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<[`ExecutorPayload`](https://lcp.integraledger.com/reference/api.md#executorpayload)\> *** ### FailedReason > **FailedReason** = `"instrument-unused"` \| `"instrument-consumed"` \| `"transaction-failed"` \| `"before-position"` The reasons of a `failed` answer. *** ### FeeParty > **FeeParty** = `"buyer"` \| `"settler"` \| `"paymaster"` \| `"none"` A party that can pay an agreement's fee: the buyer; the settler, the party that submits the payment the buyer signed; a paymaster the buyer's user operation names; or `none`, on a path where the chain charges the buyer's transaction no fee. *** ### ForeignReason > **ForeignReason** = `"payee-signed"` \| `"other-signer"` \| `"given"` \| `"other-kind"` \| `"other-account"` Why a transaction that carries H is not the act asked about, in the order in which they are tried. *** ### HederaPayload > **HederaPayload** = `object` The x402 `exact` payload on Hedera: the partially signed transaction, base64. #### Properties | Property | Type | | ------ | ------ | | `transaction` | `string` | *** ### HederaPaymentPayload > **HederaPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<[`HederaPayload`](https://lcp.integraledger.com/reference/api.md#hederapayload)\> *** ### IsNever > **IsNever**\<`T`\> = \[`T`\] *extends* \[`never`\] ? `true` : `false` True where `T` is `never`. #### Type Parameters | Type Parameter | | ------ | | `T` | *** ### Json > **Json** = `string` \| `number` \| `boolean` \| `null` \| readonly [`Json`](https://lcp.integraledger.com/reference/api.md#json)[] \| \{\[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json); \} A JSON value: what `parseJson` reads, and what `canonicalJson`, `digestJson` and `assemble`'s binding value accept. These three take `unknown` and refuse, at run time, a value that is not JSON. Numbers in a binding value must be safe integers. *** ### MppBinding > **MppBinding** = *typeof* [`MPP_BINDINGS`](https://lcp.integraledger.com/reference/api/mpp.md#mpp_bindings)\[`number`\] An MPP pairing of intent and method. *** ### NearPayment > **NearPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<\{ `signedDelegateAction`: `string`; \}\> *** ### NoneWhereNever > **NoneWhereNever**\<`Presented`, `Ref`, `Reader`\> = [`IsNever`](https://lcp.integraledger.com/reference/api.md#isnever)\<`Presented`\> *extends* `true` ? `never` : `unknown` & [`IsNever`](https://lcp.integraledger.com/reference/api.md#isnever)\<`Reader`\> *extends* `true` ? `object` : `unknown` & [`IsNever`](https://lcp.integraledger.com/reference/api.md#isnever)\<`Ref`\> *extends* `true` ? `object` : `unknown` The members a codec may not have where its entry takes `never`: none where `Presented` is `never`, since `bound` takes what is presented; no member that takes the reader where `Reader` is; none that gives or takes the reference where `Ref` is. #### Type Parameters | Type Parameter | | ------ | | `Presented` | | `Ref` | | `Reader` | *** ### NonZeroDigit > **NonZeroDigit** = `"1"` \| `"2"` \| `"3"` \| `"4"` \| `"5"` \| `"6"` \| `"7"` \| `"8"` \| `"9"` A decimal digit other than zero. *** ### OtherAct > **OtherAct**\<`Ref`\> = \{ `ref`: `Ref`; \} \| \{ `transaction`: `string`; \} Another act under the same H, which `status` never settles on: by its reference, or by its transaction. #### Type Parameters | Type Parameter | | ------ | | `Ref` | *** ### PairingData > **PairingData** = [`DataMembers`](https://lcp.integraledger.com/reference/api.md#datamembers) & \{ `agreement?`: [`AgreementData`](https://lcp.integraledger.com/reference/api.md#agreementdata); `agreementOn?`: `never`; `coverage`: `"full"`; `link?`: `never`; \} \| \{ `agreement?`: `never`; `agreementOn?`: `"any"` \| `"same-network"` \| `` `x402/${string}` `` \| `` `mpp/${string}` ``; `coverage`: `"none"`; `link`: `"h"` \| `"pointer"` \| `"none"`; \} A pairing's data. At coverage `full` it has no `link` and no `agreementOn`; at coverage `none` it has a `link` and no `agreement`, since only a payment that is itself a public proof of H can be an agreement. Every pairing's data also has `carrier` (`Carrier`), where H rides; `source`, who writes H: lcp's client, or a stock client and release, with the member it copies H from; `nonce`, whether the identical instrument can land more than once (`single-use`, `reusable`, or `unshown` until a vector or a run shows single use); `broadcasts`, the answers the codec's `broadcaster` can give over every credential type the pairing takes; `confirmed`, whether something outside lcp has shown the form as its profile defines it (`yes` or `no`); and `proves`, what the read establishes of a payment through the pairing. Where a public ledger records the payment it has `read` (`ReadData`), what a read of the pairing needs; and, where the pairing's entry states them, `destination`, `asset` and `payer`: how the account the act names, the asset and the payer are identified in the landed transaction. Where the pairing's profile states them it has `payeePreconditions`, what the payee's account must hold before it can be paid; where the payment is card-like, on no network a CAIP-2 id names, `cardLike`; and where the pairing's option filter requires members of the option's `extra` to hold fixed values, `option` (`OptionData`), whose `extra` names each with its value. *** ### PairingId > **PairingId** = [`Binding`](https://lcp.integraledger.com/reference/api.md#binding)\[`"id"`\] The id of a pairing this package implements: the `id` of an entry of `BINDINGS`. *** ### PairingOn > **PairingOn**\<`S`\> = `Extract`\<[`PairingId`](https://lcp.integraledger.com/reference/api.md#pairingid), `` `${S}/${string}` ``\> The pairing ids of one surface. #### Type Parameters | Type Parameter | | ------ | | `S` *extends* [`Surface`](https://lcp.integraledger.com/reference/api.md#surface) | *** ### PendingReason > **PendingReason** = `"below-mark"` \| `"instrument-live"` \| `"search-incomplete"` \| `"not-found"` The reasons of a `pending` answer, in the order in which they are answered: the first that holds. *** ### PolkadotPayload > **PolkadotPayload** = `object` The x402 payload: the signed extrinsic and its call, lowercase hex. #### Properties | Property | Type | | ------ | ------ | | `call` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `extrinsic` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | *** ### PolkadotPaymentPayload > **PolkadotPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<[`PolkadotPayload`](https://lcp.integraledger.com/reference/api.md#polkadotpayload)\> *** ### Presented > **Presented** = [`PresentedOn`](https://lcp.integraledger.com/reference/api.md#presentedon)\[[`Surface`](https://lcp.integraledger.com/reference/api.md#surface)\] What the buyer presents as payment. *** ### Refusal > **Refusal** = `object` A refusal returned as a value. `code` is `/`. #### Properties | Property | Type | | ------ | ------ | | `code` | `string` | | `refused` | `true` | *** ### StarknetPayment > **StarknetPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<\{ `from`: [`Felt`](https://lcp.integraledger.com/reference/api/starknet.md#felt); `outsideExecution`: \{ `signature`: readonly [`Felt`](https://lcp.integraledger.com/reference/api/starknet.md#felt)[]; `typedData`: [`OutsideExecutionTypedData`](https://lcp.integraledger.com/reference/api/starknet.md#outsideexecutiontypeddata); \}; \}\> *** ### StatusAnswer > **StatusAnswer**\<`Position`, `Mark`, `Cursor`\> = [`Named`](https://lcp.integraledger.com/reference/api.md#named)\<`Position`, `Mark`\> & `object` \| [`Named`](https://lcp.integraledger.com/reference/api.md#named)\<`Position`, `Mark`\> & `object` \| [`Named`](https://lcp.integraledger.com/reference/api.md#named)\<`Position`, `Mark`\> & `object` \| \{ `foreign`: readonly [`ForeignItem`](https://lcp.integraledger.com/reference/api.md#foreignitem)\<`Position`\>[]; `reason`: [`UnreadableReason`](https://lcp.integraledger.com/reference/api.md#unreadablereason); `state`: `"unreadable"`; \} The answer of `status`: one state, one reason of a closed list, what it read, and the foreign items it met. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `Position` | - | | `Mark` | - | | `Cursor` | `Position` | #### Union Members [`Named`](https://lcp.integraledger.com/reference/api.md#named)\<`Position`, `Mark`\> & `object` *** [`Named`](https://lcp.integraledger.com/reference/api.md#named)\<`Position`, `Mark`\> & `object` *** [`Named`](https://lcp.integraledger.com/reference/api.md#named)\<`Position`, `Mark`\> & `object` *** ##### Type Literal \{ `foreign`: readonly [`ForeignItem`](https://lcp.integraledger.com/reference/api.md#foreignitem)\<`Position`\>[]; `reason`: [`UnreadableReason`](https://lcp.integraledger.com/reference/api.md#unreadablereason); `state`: `"unreadable"`; \} *** ### Surface > **Surface** = [`SurfaceOf`](https://lcp.integraledger.com/reference/api.md#surfaceof)\<[`PairingId`](https://lcp.integraledger.com/reference/api.md#pairingid)\> The surfaces: each pairing id's first "/" segment. *** ### SurfaceOf > **SurfaceOf**\<`I`\> = `I` *extends* `` `${infer S}/${string}` `` ? `S` : `never` #### Type Parameters | Type Parameter | | ------ | | `I` | *** ### TronPayment > **TronPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<\{ `transaction`: `string`; \}\> *** ### TvmPayment > **TvmPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api.md#x402payment)\<\{ `asset`: `string`; `settlementBoc`: `string`; \}\> *** ### UnreadableReason > **UnreadableReason** = `"history-gap"` \| `"transport"` \| `"unparseable"` \| `"too-large"` \| `"chain-mismatch"` The reasons of an `unreadable` answer. *** ### UrlAuthority > **UrlAuthority** = `object` What the basic URL parser gives for an absolute URL's scheme and authority. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `credentials` | `boolean` | Whether the URL has a username or a password that is not empty. | | `host` | `string` \| `null` | The serialized host, or null for a URL with no authority. | | `port` | `number` \| `null` | The port, or null where the URL names none or names its scheme's default port, as the URL record holds it. | | `scheme` | `string` | The scheme, lowercased. | *** ### X402Binding > **X402Binding** = *typeof* [`exactEip3009`](https://lcp.integraledger.com/reference/api/x402.md#exacteip3009) \| *typeof* [`authCaptureEip3009`](https://lcp.integraledger.com/reference/api/x402.md#authcaptureeip3009) \| *typeof* [`authCapturePermit2`](https://lcp.integraledger.com/reference/api/x402.md#authcapturepermit2) \| *typeof* [`batchCloudflare`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchcloudflare) \| *typeof* [`batchEvm`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchevm) \| *typeof* [`batchSvm`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchsvm) \| *typeof* [`exactAvm`](https://lcp.integraledger.com/reference/api/avm.md#exactavm) \| *typeof* [`exactAptos`](https://lcp.integraledger.com/reference/api/aptos.md#exactaptos) \| *typeof* [`exactCardano`](https://lcp.integraledger.com/reference/api/cardano.md#exactcardano) \| *typeof* [`exactCardanoLock`](https://lcp.integraledger.com/reference/api/cardano.md#exactcardanolock) \| *typeof* [`exactCasper`](https://lcp.integraledger.com/reference/api/casper.md#exactcasper) \| *typeof* [`exactCcd`](https://lcp.integraledger.com/reference/api/ccd.md#exactccd) \| *typeof* [`exactErc7710`](https://lcp.integraledger.com/reference/api/x402.md#exacterc7710) \| *typeof* [`exactErc7710Salt`](https://lcp.integraledger.com/reference/api/x402.md#exacterc7710salt) \| *typeof* [`exactPermit2`](https://lcp.integraledger.com/reference/api/x402.md#exactpermit2) \| *typeof* [`exactHedera`](https://lcp.integraledger.com/reference/api/hedera.md#exacthedera) \| *typeof* [`exactHederaExecutor`](https://lcp.integraledger.com/reference/api/hedera.md#exacthederaexecutor) \| *typeof* [`exactLnbtcPaymentHash`](https://lcp.integraledger.com/reference/api/lightning.md#exactlnbtcpaymenthash) \| *typeof* [`exactNear`](https://lcp.integraledger.com/reference/api/near.md#exactnear) \| *typeof* [`exactPolkadotRemark`](https://lcp.integraledger.com/reference/api/polkadot.md#exactpolkadotremark) \| *typeof* [`exactSvm`](https://lcp.integraledger.com/reference/api/x402-exact-solana.md#exactsvm) \| *typeof* [`exactStarknet`](https://lcp.integraledger.com/reference/api/starknet.md#exactstarknet) \| *typeof* [`exactStellarPrecondition`](https://lcp.integraledger.com/reference/api/x402-exact-stellar.md#exactstellarprecondition) \| *typeof* [`exactSui`](https://lcp.integraledger.com/reference/api/sui.md#exactsui) \| *typeof* [`exactTronMemo`](https://lcp.integraledger.com/reference/api/tron.md#exacttronmemo) \| *typeof* [`exactTvm`](https://lcp.integraledger.com/reference/api/tvm.md#exacttvm) \| *typeof* [`exactXrpl`](https://lcp.integraledger.com/reference/api/x402-exact-xrpl.md#exactxrpl) \| *typeof* [`uptoPermit2`](https://lcp.integraledger.com/reference/api/x402.md#uptopermit2) \| *typeof* [`uptoSvm`](https://lcp.integraledger.com/reference/api/x402-upto-solana.md#uptosvm) \| *typeof* [`exactGatewayBatched`](https://lcp.integraledger.com/reference/api/x402.md#exactgatewaybatched) \| *typeof* [`uptoXrpl`](https://lcp.integraledger.com/reference/api/x402-upto-xrpl.md#uptoxrpl) An x402 pairing of scheme and rail. *** ### X402Payment > **X402Payment**\<`P`\> = `Omit`\<[`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload), `"payload"`\> & `object` An x402 v2 payment whose `payload` is the pairing's own. #### Type Declaration | Name | Type | | ------ | ------ | | `payload` | `P` | #### Type Parameters | Type Parameter | | ------ | | `P` | ## Variables ### BINDINGS > `const` **BINDINGS**: readonly [`Binding`](https://lcp.integraledger.com/reference/api.md#binding)[] Every pairing this package implements. *** ### FETCHED > `const` **FETCHED**: unique `symbol` The key of the one member that holds what a seller's reader wrote onto a credential: `fetchPresented` writes the credential with its read under this key, and `bound`, `reference` and `buildWithin` read a rail's read from this member and from no other. A string-keyed member of any name, such as `landed` or `tables`, is never read as a read: a credential carrying one gives the answer the same credential without it gives. The registered symbol `Symbol.for("@integraledger/lcp/fetched")` is the same in every copy of the package in a process. No wire form carries it: `JSON.parse` and `structuredClone` make no symbol-keyed member, and `JSON.stringify` and `structuredClone` drop it, so the seller keeps the object `fetchPresented` returned, or a spread or `Object.assign` copy of it, both of which copy the member. One symbol, exported from `@integraledger/lcp`, `@integraledger/lcp/mpp` and `@integraledger/lcp/hedera`, the entry points whose pairings write it. *** ### LEGAL\_CONTEXT\_HEADER > `const` **LEGAL\_CONTEXT\_HEADER**: `"Legal-Context"` = `"Legal-Context"` The header's name. *** ### LEGAL\_CONTEXT\_META > `const` **LEGAL\_CONTEXT\_META**: `"com.integraledger.lcp/legal-context"` = `"com.integraledger.lcp/legal-context"` The `_meta` key under which an MCP tool result, and each later tool call's `params`, carry the header's value. *** ### LEGAL\_CONTEXT\_SERVES > `const` **LEGAL\_CONTEXT\_SERVES**: `"legalContextServes"` = `"legalContextServes"` The member by which an agreement option names the charge options it serves: in an x402 option's `extra`, in an MPP challenge's `opaque`. *** ### MAX\_ATR\_BYTES > `const` **MAX\_ATR\_BYTES**: `1048576` = `1_048_576` The largest ATR `assemble` writes, in bytes: 1 MiB. A smaller `limits.maxBytes` lowers it for one call; no larger one raises it. *** ### MAX\_CHALLENGE\_DEPTH > `const` **MAX\_CHALLENGE\_DEPTH**: `16` = `16` The deepest nesting of arrays and objects lcp reads in an MPP challenge's decoded `request` and `opaque`. A challenge is read before anything is bound to it, so it is held to less depth than an ATR. *** ### MAX\_CHALLENGES > `const` **MAX\_CHALLENGES**: `32` = `32` The most challenges lcp reads in one MPP response. A challenge id lcp derives from H names the challenge's position in the response, and an id holds the positions 0 to 31. *** ### MAX\_CREDENTIAL\_BYTES > `const` **MAX\_CREDENTIAL\_BYTES**: `65536` = `65_536` The largest MPP credential lcp decodes, in bytes. The MPP draft sets no size. *** ### MAX\_HEADER\_BYTES > `const` **MAX\_HEADER\_BYTES**: `65536` = `65_536` The largest JSON lcp decodes from a header field value, in bytes: an x402 header, `PAYMENT-REQUIRED` and the others, and MPP's `Payment-Receipt`. Neither x402 nor MPP sets a size. *** ### MAX\_JSON\_DEPTH > `const` **MAX\_JSON\_DEPTH**: `64` = `64` The deepest nesting of arrays and objects in any JSON lcp writes or reads, an ATR's among it. RFC 8259 permits any depth; a parser's recursion is bounded by it. *** ### MAX\_LINK\_LENGTH > `const` **MAX\_LINK\_LENGTH**: `2048` = `2048` The longest link, in characters, that a placement writes or a reader accepts: the ATR's link and the agreement's URL. No specification of a link's carrier fixes a length. *** ### MAX\_OPTIONS > `const` **MAX\_OPTIONS**: `32` = `32` The most options lcp reads in one x402 document (`accepts`). x402 sets no count. *** ### MAX\_REQUEST\_BYTES > `const` **MAX\_REQUEST\_BYTES**: `1048576` = `1_048_576` The most bytes the x402 request commitment reads of one part of a request: the body, the RFC 8785 form of an MCP tool call's arguments, and a named header field's value, its lines joined. x402 sets no size; a larger part is refused. *** ### MAX\_SIGNATURE\_BYTES > `const` **MAX\_SIGNATURE\_BYTES**: `8192` = `8192` The longest signature lcp decodes, in bytes. A smart-contract wallet's signature (ERC-1271, and ERC-6492's wrapped form) has no length its standard fixes, so lcp bounds it here, for every pairing that reads one. *** ### MAX\_SLOT\_NAME\_LENGTH > `const` **MAX\_SLOT\_NAME\_LENGTH**: `64` = `64` The longest slot name `assemble` accepts, in characters: 64, each from `A-Z`, `a-z`, `0-9`, `.`, `_` and `-`, the first a letter or a digit. It bounds the binding's slot and every party slot alike. *** ### RETURN\_VALUE\_BYTES > `const` **RETURN\_VALUE\_BYTES**: `32` = `32` The length of a sale's return value, in bytes. ## Functions ### agreementValue() > **agreementValue**(`h`): `Promise`\<`` `0x${string}` ``\> The agreement's own value for H (read-status.md, rule 1): SHA-256 over the 16 ASCII bytes `lcp-agreement-v1` followed by H's 32 bytes, as `0x` and lowercase hex. On a pairing whose single-use value is H itself or H's low bits, an agreement carries this value, or its low bits as the pairing takes H's, where a payment carries H, so the two acts under one H never share a single-use value; a holder of the ATR compares it with what `recover` reads from an agreement's transaction. Rejects with a TypeError when `h` is not a 32-byte hash. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `Promise`\<`` `0x${string}` ``\> *** ### assemble() > **assemble**(`id`, `binding`, `content`, `limits?`): `Promise`\<[`CoreRefusal`](https://lcp.integraledger.com/reference/api.md#corerefusal) \| \{ `atrHash`: `` `0x${string}` ``; `bytes`: `Uint8Array`\<`ArrayBuffer`\>; \}\> Writes the ATR's bytes and hashes them. The same inputs always give the same bytes. Every problem with the inputs is returned as a refusal, from the first check that fails, in this order: 1. `limits.maxBytes`, when given, is a non-negative safe integer (`core/too-large`). The limit applied is the smaller of it and 1 MiB (`MAX_ATR_BYTES`). 2. `id` is a string (`core/binding-not-json`), `binding` is an array of two (`core/slot-name`), and `content` is an array (`core/content-not-json`). 3. The binding's slot name matches the slot-name pattern, 1 to 64 characters (`MAX_SLOT_NAME_LENGTH`) (`core/slot-name`), and is not `atrVersion` or `id` (`core/slot-reserved`). 4. There are at most 64 party slots (`core/too-large`). 5. Each party slot, in the order given, is an array of two (`core/slot-name`); its name matches the pattern (`core/slot-name`), is not `atrVersion`, `id` or the binding's slot name (`core/slot-reserved`) and has not appeared before (`core/slot-duplicate`); its bytes are a `Uint8Array` (`core/content-not-json`). 6. The binding value is a JSON value `JSON.stringify` writes exactly, every number a safe integer, nested at most 64 levels (`core/binding-not-json`). 7. The assembled length is at most the limit (`core/too-large`). 8. Each party's bytes, in order, are one JSON value in which no object repeats a member name, names compared after their escapes are decoded, no number overflows a double, and no integer lies beyond 2^53 - 1 either way (`core/content-not-json`). Each input is read once: each array's length and members, each party's name, bytes and size, and each member of the binding value, in the one walk that checks the value and writes it. What is checked is what is written, an input behind an accessor included. #### Parameters | Parameter | Type | | ------ | ------ | | `id` | `string` | | `binding` | readonly \[`string`, `unknown`\] | | `content` | readonly readonly \[`string`, `Uint8Array`\<`ArrayBufferLike`\>\][] | | `limits?` | \{ `maxBytes?`: `number`; \} | | `limits.maxBytes?` | `number` | #### Returns `Promise`\<[`CoreRefusal`](https://lcp.integraledger.com/reference/api.md#corerefusal) \| \{ `atrHash`: `` `0x${string}` ``; `bytes`: `Uint8Array`\<`ArrayBuffer`\>; \}\> *** ### base64Bytes() > **base64Bytes**(`s`, `maxBytes`): `Uint8Array`\<`ArrayBuffer`\> \| `"too-large"` \| `"malformed"` The bytes of `s` as `fromBase64` reads them, or "too-large" when they would be more than `maxBytes`, or "malformed". The size is read from the text's length before anything is decoded, so a text past the bound is never decoded. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | | `maxBytes` | `number` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| `"too-large"` \| `"malformed"` *** ### base64UrlBytes() > **base64UrlBytes**(`s`, `maxBytes`): `Uint8Array`\<`ArrayBuffer`\> \| `"too-large"` \| `"malformed"` The bytes of `s` as `fromBase64Url` reads them, or "too-large" when they would be more than `maxBytes`, or "malformed". The size is read from the text's length before anything is decoded, so a text past the bound is never decoded. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | | `maxBytes` | `number` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| `"too-large"` \| `"malformed"` *** ### canonicalJson() > **canonicalJson**(`v`): `string` \| [`CoreRefusal`](https://lcp.integraledger.com/reference/api.md#corerefusal) The RFC 8785 form of `v`: object members sorted by the UTF-16 code units of their names, recursively, and every primitive written as `JSON.stringify` writes it. Takes any value and refuses what `digestJson` refuses. #### Parameters | Parameter | Type | | ------ | ------ | | `v` | `unknown` | #### Returns `string` \| [`CoreRefusal`](https://lcp.integraledger.com/reference/api.md#corerefusal) *** ### challengeH() > **challengeH**(`id`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` H from an id `challengeId` wrote, or from the bare base64url of H; anything else is `mpp/id-not-ours`. #### Parameters | Parameter | Type | | ------ | ------ | | `id` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### challengeHash() > **challengeHash**(`id`, `realm`): `` `0x${string}` `` keccak256(UTF-8(JSON.stringify([id, realm]))), lowercase: the id and realm framed as a JSON array of two strings, as `mppx` computes MPP's EVM challenge hash from 0.13.1, so that no two pairs give one preimage. A string that is not well-formed is written as `JSON.stringify` writes it, with each lone surrogate escaped as `\uXXXX`; the pairings refuse such an id or realm before they call it. #### Parameters | Parameter | Type | | ------ | ------ | | `id` | `string` | | `realm` | `string` | #### Returns `` `0x${string}` `` *** ### challengeId() > **challengeId**(`h`, `index`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) base64url, without padding, of H's 32 bytes, then `.` and the challenge's position (0 to 31). #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | | `index` | `number` | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### checkLegalContextReturn() > **checkLegalContextReturn**(`value`, `record`): `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The check a resource server makes of a return: `value`, a `Legal-Context` header's value or the same value from an MCP `_meta`, read as `fromLegalContextHeader` reads it (`return/header-malformed`); its H the record's H (`return/not-this-sale`); and its return value the record's, compared in constant time, an `rv` given where the record holds none and none given where it holds one refused alike (`return/value-mismatch`). True where all hold. A record whose H is not a 32-byte hash is `return/not-this-sale`, and one whose return value is not 32 bytes is `return/value-mismatch`. #### Parameters | Parameter | Type | | ------ | ------ | | `value` | `unknown` | | `record` | [`LegalContextRecord`](https://lcp.integraledger.com/reference/api.md#legalcontextrecord) | #### Returns `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### digestJson() > **digestJson**(`v`): `Promise`\<`` `0x${string}` `` \| [`CoreRefusal`](https://lcp.integraledger.com/reference/api.md#corerefusal)\> SHA-256 over the RFC 8785 form of `v`. Takes any value and refuses, as `core/content-not-json`, a value deeper than 64 levels, a non-finite number, a string with an unpaired surrogate, or anything else that is not a JSON value. #### Parameters | Parameter | Type | | ------ | ------ | | `v` | `unknown` | #### Returns `Promise`\<`` `0x${string}` `` \| [`CoreRefusal`](https://lcp.integraledger.com/reference/api.md#corerefusal)\> *** ### domainToAscii() > **domainToAscii**(`domain`, `beStrict?`): `string` \| `null` The URL Standard's domain parser (§3.3, "IDNA"): the ASCII form of a domain, or null for failure. With `beStrict` false, the URL parser's call: an ASCII domain is lowercased, and any other is read by UTS #46 ToASCII (Unicode 17.0.0) with CheckBidi and CheckJoiners, nontransitional processing, and CheckHyphens, UseSTD3ASCIIRules and VerifyDnsLength false; the result fails when it is empty or holds a forbidden domain code point. With `beStrict` true, every domain is read by ToASCII with CheckHyphens, UseSTD3ASCIIRules and VerifyDnsLength true as well, and its result is the answer. A lone surrogate is read as U+FFFD, which every domain parse refuses. A domain of length n takes O(n log n) time. The Standard sets no bound on the length when `beStrict` is false. #### Parameters | Parameter | Type | Default value | | ------ | ------ | ------ | | `domain` | `string` | `undefined` | | `beStrict` | `boolean` | `false` | #### Returns `string` \| `null` *** ### fromBase64() > **fromBase64**(`s`): `Uint8Array`\<`ArrayBuffer`\> \| `null` The bytes of `s` when it is padded standard base64 (RFC 4648 §4) in its canonical form (RFC 4648 §3.5), or null: the standard alphabet, `=` padding to a multiple of four characters, and zero bits past the last whole byte in the last character before the padding. A text whose last character before the padding has a bit set past the last byte is not that form. Every rail's standard base64 is read by this one function, in one pass over the text. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| `null` *** ### fromBase64Url() > **fromBase64Url**(`s`): `Uint8Array`\<`ArrayBuffer`\> \| `null` The bytes of `s` when it is base64url without padding (RFC 4648 §5), the base64url of RFC 7515 §2, in its canonical form (RFC 4648 §3.5), or null: the URL-safe alphabet alone, no `=` padding, a length that is not one more than a multiple of four, and zero bits past the last whole byte in the last character. Every base64url this package reads, a JWS or SD-JWT segment's and an MPP challenge's included, is read by this one function, in one pass over the text. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| `null` *** ### fromLcpString() > **fromLcpString**(`s`): `` `0x${string}` `` \| `null` Decodes `lcp:sha256:0x…`, returning the lowercase hash, or null for anything else. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `string` | #### Returns `` `0x${string}` `` \| `null` *** ### fromLegalContext() > **fromLegalContext**(`o`): \{ `h`: `` `0x${string}` ``; `url`: `string`; \} \| `null` Decodes the structured form: `type` "sha256", a 32-byte hash, and an `https://` link in either spelling. Returns the lowercase hash and the link, or null for anything else, including two spellings that disagree. Other members are ignored. #### Parameters | Parameter | Type | | ------ | ------ | | `o` | `unknown` | #### Returns \{ `h`: `` `0x${string}` ``; `url`: `string`; \} \| `null` *** ### fromLegalContextHeader() > **fromLegalContextHeader**(`value`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LegalContextReturn`](https://lcp.integraledger.com/reference/api.md#legalcontextreturn) H, and the return value where the header carries `rv`, from a `Legal-Context` header's value, parsed as an RFC 9651 Item (section 4.2): spaces before and after the item and after each `;`; a bare item that is a token, H's LCP string in lowercase hex; and parameters whose keys are `rv` alone, a repeated key overwriting the value before it (section 4.2.3.2). `rv` is a byte sequence of 32 bytes in the standard base64 alphabet, read with its `=` padding absent and with bits set past its last byte, which section 4.2.7 says a parser should not refuse. Any other value is `return/header-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `value` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LegalContextReturn`](https://lcp.integraledger.com/reference/api.md#legalcontextreturn) *** ### fromRawBytes() > **fromRawBytes**(`b`): `` `0x${string}` `` \| `null` The lowercase hash of exactly 32 raw bytes, or null. #### Parameters | Parameter | Type | | ------ | ------ | | `b` | `Uint8Array` | #### Returns `` `0x${string}` `` \| `null` *** ### hash() > **hash**(`bytes`): `Promise`\<`` `0x${string}` ``\> SHA-256 over the bytes as given, as `0x` and lowercase hex. Rejects with a TypeError when `bytes` is not a `Uint8Array`. #### Parameters | Parameter | Type | | ------ | ------ | | `bytes` | `Uint8Array` | #### Returns `Promise`\<`` `0x${string}` ``\> *** ### hashEquals() > **hashEquals**(`a`, `b`): `boolean` True when `a` and `b` are each `0x` and 64 hex digits, in either case, and decode to the same 32 bytes (LCP §2.5). Anything else is false. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | `string` | | `b` | `string` | #### Returns `boolean` *** ### isHttpsLink() > **isHttpsLink**(`s`): `s is string` The one https-link rule. The raw string holds no whitespace, control character or backslash; it parses as an absolute URL by the WHATWG URL Standard's basic URL parser, with no base; its scheme is `https`, compared case-insensitively (RFC 3986 §3.1); its authority has a host, a DNS name or an IP literal, and no userinfo. The scheme, the authority, the host and the port are read by this package's own copy of the Standard's parser and host parser (`parseHost`), so the answer is the same on every runtime; the path, query and fragment never fail that parse. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | #### Returns `s is string` *** ### isOtherSchemeLink() > **isOtherSchemeLink**(`s`): `s is string` True for a string of at most 2048 characters that parses as an absolute URL whose scheme is not `https`, by the WHATWG URL Standard's basic URL parser with no base, read by this package's own copy of it as `isHttpsLink` reads one: the one failing link a pairing's `read` refuses as `link-not-https`, where every other failing link is `legal-context-malformed`. Card's, ACK's and AP2's `read` refuse every link that is not `https` as `legal-context-malformed`. A pairing's `advertise`, and MPP's and A2A's `place`, refuse every link that is not `https` as `link-not-https`. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | #### Returns `s is string` *** ### isRefusal() > **isRefusal**(`v`): `v is Refusal` True only for a refusal a copy of this package made: a value whose own property keyed by the registered symbol `Symbol.for("@integraledger/lcp/refusal")` holds `true`, the mark `refusal` sets as a non-enumerable property. Every installed copy of the package recognises the refusals of every other, as when two installs serve one process. A caller's value shaped `{ refused: true, … }`, a value read from JSON, and a spread or `structuredClone` copy of a refusal hold no mark, so none of them is a refusal, and no such input is ever passed on as one. `JSON.stringify` writes a refusal as `{"refused":true,"code":…}`. Never throws. #### Parameters | Parameter | Type | | ------ | ------ | | `v` | `unknown` | #### Returns `v is Refusal` *** ### newAtrId() > **newAtrId**(): `string` A random RFC 9562 version 4 UUID, lowercase. #### Returns `string` *** ### pairingOf() > **pairingOf**(`option`): [`PairingOn`](https://lcp.integraledger.com/reference/api.md#pairingon)\<`"x402"`\> \| `undefined` The x402 pairing that serves an option: the first x402 pairing in `BINDINGS` whose `read` offers it, on a document holding that option alone. Undefined when none does. Each pairing's `read` applies the one filter its `advertise`, `build`, `bound` and `reference` apply, so the pairing named takes the option at every step. No two x402 pairings' `read` offers one option, except the two ERC-7710 levels, which share the `erc7710` option: this names `x402/exact/eip155/erc7710`, and `pairingOfPayment` names the level from a payment. A Worker that serves one pairing need not import this function, which loads every pairing: the pairing's own `read`, on a document holding the option, or its `bound`, on a presented payment, answers for that pairing alone. #### Parameters | Parameter | Type | | ------ | ------ | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | #### Returns [`PairingOn`](https://lcp.integraledger.com/reference/api.md#pairingon)\<`"x402"`\> \| `undefined` *** ### parseHost() > **parseHost**(`input`, `isOpaque?`): `string` \| `null` The URL Standard's host parser (§3.5), with the host serializer (§3.6): the serialized host, or null for failure. `[…]` is read by the IPv6 parser and serialized in brackets, compressed. With `isOpaque` true (the host of a URL whose scheme is not special) any other input is an opaque host: it fails on a forbidden host code point, and is otherwise UTF-8 percent-encoded with the C0 control percent-encode set. Otherwise the input is percent-decoded, decoded as UTF-8, and read by the domain parser (`domainToAscii` with `beStrict` false); a domain whose last label, after one trailing dot, is a number is read by the IPv4 parser, in decimal, `0x` hex or `0`-led octal parts, and serialized as four decimal numbers. The empty string is an opaque host, and a failure otherwise. A lone surrogate is read as U+FFFD, and so are percent-encoded bytes that are not UTF-8, which the domain parser fails on. An input of length n takes O(n log n) time. The Standard sets no bound on the length. #### Parameters | Parameter | Type | Default value | | ------ | ------ | ------ | | `input` | `string` | `undefined` | | `isOpaque` | `boolean` | `false` | #### Returns `string` \| `null` *** ### parseJson() > **parseJson**(`text`): `unknown` The value of JSON text nested at most 64 levels deep; undefined for text that is deeper or is not JSON. #### Parameters | Parameter | Type | | ------ | ------ | | `text` | `string` | #### Returns `unknown` *** ### readToRepeat() > **readToRepeat**(`code`): `boolean` True when `code` is a read to repeat: a refusal whose answer rests on a read of the rail that may answer differently later, with nothing the caller must change. The caller asks again later, since the payment may already have moved. These are each reader's `/unreadable` (the reader failed, or answered out of its documented form) and `/not-found` (the reader holds no landed transaction for the reference yet), and the codes of a transaction that is not final yet: `casper/not-executed`, `ccd/not-finalized`, `xrpl/not-validated`, `evm/not-final` (a revert, or a receipt without what the read looks for, in a block above the reader's `finalized` mark, which can be replaced by one in which the transaction succeeds or holds other logs), `polkadot/not-final` (an extrinsic not dispatched as the payment, in a block above the finalized height), `stacks/not-final` (a failure in a Stacks block fewer than two tenures below the tip, which can be replaced), `starknet/not-final` (a revert, or no single matching transfer, in a pre-confirmed block, which can change), `svm/not-final` (a transaction at Solana's `confirmed` not found at `finalized`, with an error or none) and `tempo/not-final` (as `evm/not-final`, on Tempo). The refusal code reference marks each of them. False for every other string. A verdict is not a read to repeat: a later read gives the same answer. Nor is a call the caller must change before it can succeed: `/wrong-reader` (a reader for another network, or a ref the rail cannot read) and `/read-first` (`bound` or `reference` on a push credential before `fetchPresented` has read it), a missing peer dependency, and malformed input. A string the package does not return is false. #### Parameters | Parameter | Type | | ------ | ------ | | `code` | `string` | #### Returns `boolean` *** ### readUrl() > **readUrl**(`input`): [`UrlAuthority`](https://lcp.integraledger.com/reference/api.md#urlauthority) \| `null` The scheme and authority of a string that the URL Standard's basic URL parser (§4.4) reads, with no base, as an absolute URL, or null where it returns failure. Only the scheme and the authority can fail: the parser's path, query and fragment states accept every input, so they are not read. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | `string` | #### Returns [`UrlAuthority`](https://lcp.integraledger.com/reference/api.md#urlauthority) \| `null` *** ### servesOf() > **servesOf**(`option`, `atr?`): readonly `string`[] \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `undefined` The charge options an agreement option names as those it serves: each `/`, the option at index `i` of the charge options the ATR binding slot of that name holds: `accepts` of `x402`, `challenges` of `mpp`, `paymentOptions` of `ack`, and `options` of `acp`, `ap2`, `card` and `ucp`. On an x402 option the member is `extra.legalContextServes`, an array of those strings; on an MPP challenge it is `opaque`'s `legalContextServes`, those strings joined by one space. Undefined where the option carries no such member; `return/serves-malformed` where the member is not 1 to 32 distinct such strings. Where `atr`, the ATR's bytes, is given, each name is also resolved against it: a name whose slot is not the ATR's binding slot (its member after `atrVersion` and `id`), or whose index is not below the number of charge options that slot holds, is `return/serves-malformed`, and so is every name where `atr` is not the bytes of a UTF-8 JSON object of at most 1 MiB. #### Parameters | Parameter | Type | | ------ | ------ | | `option` | `unknown` | | `atr?` | `Uint8Array`\<`ArrayBufferLike`\> | #### Returns readonly `string`[] \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `undefined` *** ### toBase64() > **toBase64**(`b`): `string` Padded standard base64 (RFC 4648 §4) of `b`, in the canonical form `fromBase64` reads, in one pass over the bytes. #### Parameters | Parameter | Type | | ------ | ------ | | `b` | `Uint8Array` | #### Returns `string` *** ### toBase64Url() > **toBase64Url**(`b`): `string` base64url without padding (RFC 4648 §5) of `b`, in the canonical form `fromBase64Url` reads, in one pass over the bytes. #### Parameters | Parameter | Type | | ------ | ------ | | `b` | `Uint8Array` | #### Returns `string` *** ### toLcpString() > **toLcpString**(`h`): `string` LCP §8.1 string form: `lcp:sha256:0x…`. Throws TypeError when `h` is not a 32-byte hash. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `string` *** ### toLegalContext() > **toLegalContext**(`h`, `url`, `spelling?`): `object` LCP §8.1 structured form, with the link beside the digest. `spelling` "snake" writes `legal_context_url`. Throws TypeError when `h` is not a 32-byte hash or `url` is not an `https://` URL. #### Parameters | Parameter | Type | Default value | | ------ | ------ | ------ | | `h` | `` `0x${string}` `` | `undefined` | | `url` | `string` | `undefined` | | `spelling` | `"camel"` \| `"snake"` | `"camel"` | #### Returns `object` | Name | Type | | ------ | ------ | | `legalContext` | `object` | | `legalContext.legal_context_url?` | `string` | | `legalContext.legalContextUrl?` | `string` | | `legalContext.type` | `"sha256"` | | `legalContext.value` | `` `0x${string}` `` | *** ### toLegalContextHeader() > **toLegalContextHeader**(`h`, `returnValue?`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The header's value, an RFC 9651 Item: H's LCP string as a token, and, where `returnValue` is given, the parameter `rv`, its 32 bytes as a byte sequence. An H that is not a 32-byte hash, or a return value that is not 32 bytes, is `return/header-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | | `returnValue?` | `Uint8Array`\<`ArrayBufferLike`\> | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### toRawBytes() > **toRawBytes**(`h`): `Uint8Array`\<`ArrayBuffer`\> The raw 32 bytes of a hash. Throws TypeError when `h` is not a 32-byte hash. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBuffer`\> ## References ### LcpPattern Re-exports [LcpPattern](https://lcp.integraledger.com/reference/api/x402.md#lcppattern) --- # @integraledger/lcp/a2a > The LCP extension for A2A: the ATR hash and the link to the seller's copy delivered in a Task's `metadata`, keyed by the extension's URI. A2A signs nothing per transaction, so this is a carrier and exports no pairing. Pure; no I/O. Source: https://lcp.integraledger.com/reference/api/a2a Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The LCP extension for A2A: the ATR hash and the link to the seller's copy delivered in a Task's `metadata`, keyed by the extension's URI. A2A signs nothing per transaction, so this is a carrier and exports no pairing. Pure; no I/O. ## Interfaces ### A2aAgentExtension #### Properties | Property | Type | | ------ | ------ | | `description` | `string` | | `required` | `boolean` | | `uri` | `string` | *** ### A2aTask #### Indexable > \[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json) \| `undefined` #### Properties | Property | Type | | ------ | ------ | | `metadata?` | `object` | ## Variables ### A2A\_EXTENSION\_URIS > `const` **A2A\_EXTENSION\_URIS**: readonly `string`[] The extension's URIs, in order of preference. The first is the one written when the client activated none. *** ### binding > `const` **binding**: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) A2A signs nothing per transaction, so it has no pairing: a caller asked for an A2A pairing can answer with this refusal. *** ### delivery > `const` **delivery**: `object` What the carrier proves. #### Type Declaration | Name | Type | | ------ | ------ | | `proves` | `string` | ## Functions ### agentExtension() > **agentExtension**(`o?`): [`A2aAgentExtension`](https://lcp.integraledger.com/reference/api/a2a.md#a2aagentextension)[] One Agent Card `capabilities.extensions[]` entry per listed URI. `required` defaults to false. #### Parameters | Parameter | Type | | ------ | ------ | | `o?` | \{ `required?`: `boolean`; \} | | `o.required?` | `boolean` | #### Returns [`A2aAgentExtension`](https://lcp.integraledger.com/reference/api/a2a.md#a2aagentextension)[] *** ### place() > **place**(`task`, `h`, `link`, `a2aExtensions?`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`A2aTask`](https://lcp.integraledger.com/reference/api/a2a.md#a2atask) A copy of the task whose `metadata` carries `{type, value, legalContextUrl}` under the listed URI the request's `A2A-Extensions` value activated, or the first listed URI. Other metadata is kept. A task that is not an object, or that carries a `refused` member, is `a2a/legal-context-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `task` | [`A2aTask`](https://lcp.integraledger.com/reference/api/a2a.md#a2atask) | | `h` | `` `0x${string}` `` | | `link` | `string` | | `a2aExtensions?` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`A2aTask`](https://lcp.integraledger.com/reference/api/a2a.md#a2atask) *** ### read() > **read**(`task`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `link`: `string`; \} The hash and the link from the task's `metadata`, under a listed URI. No other key is read. Values under two listed URIs must agree. #### Parameters | Parameter | Type | | ------ | ------ | | `task` | [`A2aTask`](https://lcp.integraledger.com/reference/api/a2a.md#a2atask) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `link`: `string`; \} *** ### requested() > **requested**(`a2aExtensions`): `boolean` True when the request's `A2A-Extensions` value names a listed URI exactly: the value split on commas, each element trimmed of SP and HTAB, compared case-sensitively. The value is at most 8,192 characters with at most 64 elements; a longer value, or one with more elements, is false. #### Parameters | Parameter | Type | | ------ | ------ | | `a2aExtensions` | `string` \| `undefined` | #### Returns `boolean` --- # @integraledger/lcp/ack > ACK Payment Requests and receipts, and the pairing `ack/payment-request`: the ATR hash as the `id` of the seller-signed Payment Request, in LCP's string form, with the link beside the request in the 402 body. Source: https://lcp.integraledger.com/reference/api/ack Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. ACK Payment Requests and receipts, and the pairing `ack/payment-request`: the ATR hash as the `id` of the seller-signed Payment Request, in LCP's string form, with the link beside the request in the 402 body. ACK defines no payer signature, so `build` and `bound` always refuse. The token is read under the name ACK's SDKs write from 0.10.0, `paymentRequestToken`, and under `paymentToken`, the name they wrote before it, in the 402 body and in a receipt's credential subject alike. Pure; no I/O. No token or receipt signature is verified here. ## Interfaces ### AckBody The 402 body. The seller-signed token is `paymentRequestToken`, as ACK's SDKs write it from 0.10.0, or `paymentToken`, as they wrote it before; a body that carries both carries one token under both names. #### Properties | Property | Type | | ------ | ------ | | `legalContext` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | | `paymentRequest?` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | | `paymentRequestToken?` | `string` | | `paymentToken?` | `string` | *** ### AckPaymentOption An ACK payment option as the seller wrote it. #### Indexable > \[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json) #### Properties | Property | Type | | ------ | ------ | | `id` | `string` | *** ### AckValues What the seller's stack places: the Payment Request's `id`, and the legal context beside the request, with the agreement URL after the link when one is given. #### Properties | Property | Type | | ------ | ------ | | `legalContext` | `object` | | `legalContext.legalContextAgreementUrl?` | `string` | | `legalContext.legalContextUrl` | `string` | | `legalContext.type` | `"sha256"` | | `legalContext.value` | `` `0x${string}` `` | | `paymentRequestId` | `string` | ## Variables ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api.md#digestjson) = `digestJson` The option digest the issuer keeps: SHA-256 over the RFC 8785 form. *** ### paymentRequest > `const` **paymentRequest**: `Readonly`\<\{ `advertise`: (`_doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AckValues`](https://lcp.integraledger.com/reference/api/ack.md#ackvalues); `bound`: (`_presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\>; `broadcaster`: (`presented`) => `Promise`\<[`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\>; `build`: (`_doc`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"ack/payment-request"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `options`: readonly [`Json`](https://lcp.integraledger.com/reference/api.md#json)[]; \}; \}; `tie`: (`options`) => \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](https://lcp.integraledger.com/reference/api/ack.md#ackpaymentoption)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AckPaymentOption`](https://lcp.integraledger.com/reference/api/ack.md#ackpaymentoption); \}\> `ack/payment-request`. The payer broadcasts (`broadcaster` answers `"payer"`): it pays the Payment Request through its payment service before presenting the receipt. Settlement is the seller's report: the seller verifies the receipt, and `fromReceipt` reads the hash from it; no `fetchPresented`, `status` or `recover` reads it. ## Functions ### fromReceipt() > **fromReceipt**(`credentialSubject`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The hash in a receipt: the `id` of the Payment Request token embedded in its `credentialSubject`, under either of the token's two names. Verifies nothing; a party calls it on a receipt it has verified. #### Parameters | Parameter | Type | | ------ | ------ | | `credentialSubject` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### tie() > **tie**(`options`): \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](https://lcp.integraledger.com/reference/api/ack.md#ackpaymentoption)[]; \}\] The binding slot: the Payment Request's options exactly as issued. #### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly [`AckPaymentOption`](https://lcp.integraledger.com/reference/api/ack.md#ackpaymentoption)[] | #### Returns \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](https://lcp.integraledger.com/reference/api/ack.md#ackpaymentoption)[]; \}\] ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) --- # @integraledger/lcp/acp > ACP checkout sessions and delegate-payment allowances, and the pairings `acp/checkout/delegated` and `acp/checkout/undelegated`: the ATR hash as the checkout session's `id`. Source: https://lcp.integraledger.com/reference/api/acp Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. ACP checkout sessions and delegate-payment allowances, and the pairings `acp/checkout/delegated` and `acp/checkout/undelegated`: the ATR hash as the checkout session's `id`. The link rides beside it in the session's `metadata.legal_context`, and, where the handler requires `delegate_payment`, the hash is also the allowance's `checkout_session_id`. Pure; no I/O. Nothing here signs or verifies a signature. ## Interfaces ### AcpBinding The shape of an ACP pairing: its id, data, binding record and codec. #### Type Parameters | Type Parameter | | ------ | | `Id` *extends* `string` | #### Properties | Property | Type | | ------ | ------ | | `claims` | `boolean` | | `data` | [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata) | | `id` | `Id` | | `pattern` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern) | | `tie` | (`options`) => \[`"acp"`, \{ `options`: readonly [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption)[]; \}\] | #### Methods ##### advertise() > **advertise**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session) ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session) | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption) | | `agreementUrl?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session) ##### bound() > **bound**(`presented`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ##### broadcaster() > **broadcaster**(`presented`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> Who broadcasts what the payer presents: the seller, which completes the payment (`"payee"`). ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> ##### build() > **build**(`choice`, `h`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](https://lcp.integraledger.com/reference/api/acp.md#unsigned)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `choice` | [`AcpChoice`](https://lcp.integraledger.com/reference/api/acp.md#acpchoice) | | `h` | `` `0x${string}` `` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](https://lcp.integraledger.com/reference/api/acp.md#unsigned)\> ##### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `session`: [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session); \}; \} ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `session`: [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session); \}; \} ##### unplaced() > **unplaced**(`option`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption) ###### Parameters | Parameter | Type | | ------ | ------ | | `option` | [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption) *** ### AcpChoice The buyer's own values for the allowance, and the session it pays. #### Properties | Property | Type | | ------ | ------ | | `currency` | `string` | | `expires_at` | `string` | | `max_amount` | `number` | | `merchant_id` | `string` | | `session` | [`Session`](https://lcp.integraledger.com/reference/api/acp.md#session) | *** ### ChargePresented What the seller presents of a charge: its own reference for it, the processor's identifier of the payment. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `charge` | `string` | 1 to 255 visible ASCII characters: a Stripe PaymentIntent's `id`, an Adyen `pspReference`. | *** ### ChargeRef The reference of a charge: the checkout of the option it answers, where the option names one, and the charge. #### Properties | Property | Type | | ------ | ------ | | `charge` | `string` | | `checkout?` | `string` | *** ### Unsigned #### Properties | Property | Type | | ------ | ------ | | `allowance` | [`Allowance`](https://lcp.integraledger.com/reference/api/acp.md#allowance) | #### Methods ##### complete() > **complete**(`request`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Presented`](https://lcp.integraledger.com/reference/api/acp.md#presented) ###### Parameters | Parameter | Type | | ------ | ------ | | `request` | [`Presented`](https://lcp.integraledger.com/reference/api/acp.md#presented) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Presented`](https://lcp.integraledger.com/reference/api/acp.md#presented) ## Type Aliases ### Allowance > **Allowance** = `object` ACP's Allowance: six members, closed. #### Properties | Property | Type | | ------ | ------ | | `checkout_session_id` | `string` | | `currency` | `string` | | `expires_at` | `string` | | `max_amount` | `number` | | `merchant_id` | `string` | | `reason` | `"one_time"` | *** ### HandlerOption > **HandlerOption** = `object` The kind of payment handler a session offers: ACP's own `requires_delegate_payment` flag. #### Properties | Property | Type | | ------ | ------ | | `requires_delegate_payment` | `boolean` | *** ### Presented > **Presented** = `object` & `object` The `delegate_payment` request as the agent signs it. #### Type Declaration | Name | Type | | ------ | ------ | | `allowance` | [`Allowance`](https://lcp.integraledger.com/reference/api/acp.md#allowance) | *** ### Session > **Session** = `object` & `object` A CheckoutSession. Every member other than `id` and `metadata.legal_context` is carried untouched. #### Type Declaration | Name | Type | | ------ | ------ | | `id?` | `string` | | `metadata?` | `object` | ## Variables ### delegated > `const` **delegated**: [`AcpBinding`](https://lcp.integraledger.com/reference/api/acp.md#acpbinding)\<`"acp/checkout/delegated"`\> `acp/checkout/delegated`. The payee broadcasts (`broadcaster` answers `"payee"` for a payment within `bound`'s shape gate, `allowanceShape`): the seller's PSP charges the vault token the buyer's agent obtained; nothing here reads it. Any other value gets `acp/allowance-malformed`, as `bound` refuses it. *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api.md#digestjson) = `digestJson` SHA-256 over the RFC 8785 form of an issued handler option. *** ### METADATA\_KEY > `const` **METADATA\_KEY**: `"legal_context"` = `"legal_context"` The member of a CheckoutSession's `metadata` that carries the ATR hash and link. *** ### undelegated > `const` **undelegated**: [`AcpBinding`](https://lcp.integraledger.com/reference/api/acp.md#acpbinding)\<`"acp/checkout/undelegated"`\> & `object` `acp/checkout/undelegated`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's payment handler charges the payment the checkout completed; nothing here reads it. `reference` names the charge by the seller's own reference for it. #### Type Declaration | Name | Type | | ------ | ------ | | `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChargeRef`](https://lcp.integraledger.com/reference/api/acp.md#chargeref)\> | ## Functions ### tie() > **tie**(`options`): \[`"acp"`, \{ `options`: readonly [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption)[]; \}\] The binding slot: one option per kind of payment handler the session offers, and nothing from the checkout. #### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption)[] | #### Returns \[`"acp"`, \{ `options`: readonly [`HandlerOption`](https://lcp.integraledger.com/reference/api/acp.md#handleroption)[]; \}\] ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) --- # @integraledger/lcp/ap2 > AP2 v0.2 checkouts and closed Checkout Mandates, and the `ap2/checkout-mandate` pairing: the ATR hash as the `legalContext` member of the merchant-signed `checkout_jwt` payload, which the buyer's closed Checkout Mandate commits to through `checkout_hash`. Source: https://lcp.integraledger.com/reference/api/ap2 Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. AP2 v0.2 checkouts and closed Checkout Mandates, and the `ap2/checkout-mandate` pairing: the ATR hash as the `legalContext` member of the merchant-signed `checkout_jwt` payload, which the buyer's closed Checkout Mandate commits to through `checkout_hash`. The hash is read back from the checkout JWT presented beside the mandate. The mandate is presented alone, or last in AP2's chain after the open mandate. In AP2's push funding, where the payer's side sends the funds, the presentation also carries the confirmation of funds sent, `payment_receipt`. Nothing here verifies a signature, a `cnf` delegation or a link between hops. ## Interfaces ### Ap2Offer The offer `read` gives, and the buyer's input to `build`: the merchant's `checkout_jwt` (`checkoutJwt`), its decoded payload, and the checkout's own `id` (`checkout`). #### Properties | Property | Type | | ------ | ------ | | `checkout` | `string` | | `checkoutJwt` | `string` | | `payload` | [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload) | *** ### MandateContent #### Properties | Property | Type | | ------ | ------ | | `checkout_hash` | `string` | | `checkout_jwt?` | `string` | *** ### Presented #### Extended by - [`X402Presented`](https://lcp.integraledger.com/reference/api/ap2.md#x402presented) #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `checkout_jwt` | `string` | The checkout JWT presented beside the mandate. For AP2's latest-checkout check, the seller passes the one it last sent for this checkout; the buyer's copy shows only that the mandate and that JWT agree. | | `checkout_mandate` | `string` | The closed Checkout Mandate as presented: one SD-JWT, or AP2's chain of the open mandate's SD-JWT and the closed mandate's, joined by `~~`. | | `payment_receipt?` | `object` | Present only in AP2's push funding, where the payment method pushes funds to the merchant and the merchant receives confirmation of funds sent instead of a payment credential: that confirmation, AP2's Payment Receipt as the payer's side gives it, a JSON object carried whole and read by nothing here. Absent where the merchant initiates the charge. | *** ### Unsigned #### Properties | Property | Type | | ------ | ------ | | `content` | `object` | | `content.checkout_hash` | `string` | | `content.checkout_jwt` | `string` | | `content.vct` | `"mandate.checkout.1"` | #### Methods ##### complete() > **complete**(`checkout_mandate`): [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented) ###### Parameters | Parameter | Type | | ------ | ------ | | `checkout_mandate` | `string` | ###### Returns [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented) *** ### X402Authorization The EIP-3009 `TransferWithAuthorization` AP2's x402 credential carries, its numbers as decimal strings. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `from` | `string` | - | | `nonce` | `string` | keccak-256 of the payment mandate chain's UTF-8 text, as 64 hex digits, with or without `0x`. | | `to` | `string` | - | | `validAfter` | `string` | - | | `validBefore` | `string` | - | | `value` | `string` | - | *** ### X402Bundle AP2's x402 payment credential: the payment mandate chain, its nonce, and the signed EIP-3009 authorization. #### Properties | Property | Type | | ------ | ------ | | `eip_3009_payload` | `object` | | `eip_3009_payload.authorization` | [`X402Authorization`](https://lcp.integraledger.com/reference/api/ap2.md#x402authorization) | | `eip_3009_payload.signature` | `string` | | `payment_mandate_chain` | `string` | | `payment_nonce` | `string` | *** ### X402Method AP2's x402 payment method, as the merchant names it in the checkout's `accepted_payment_methods`, with the token the authorization moves, which AP2's method does not name. #### Indexable > \[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json) #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `address` | `string` | The account the payment pays. | | `asset` | `string` | The token under whose EIP-712 domain the authorization is signed, a 20-byte address: the merchant's own configuration of the method, as x402's option names it `asset`. | | `network` | `string` | The network: an `eip155:` CAIP-2 id, or an x402 v1 EVM network name as AP2 writes it (`base-sepolia`). | | `type` | `"x402"` | - | *** ### X402Presented The checkout mandate as `ap2/checkout-mandate` takes it, with the x402 credential the merchant received. #### Extends - [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented) #### Properties | Property | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | | `checkout_jwt` | `string` | The checkout JWT presented beside the mandate. For AP2's latest-checkout check, the seller passes the one it last sent for this checkout; the buyer's copy shows only that the mandate and that JWT agree. | [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented).[`checkout_jwt`](https://lcp.integraledger.com/reference/api/ap2.md#property-checkout_jwt-1) | | `checkout_mandate` | `string` | The closed Checkout Mandate as presented: one SD-JWT, or AP2's chain of the open mandate's SD-JWT and the closed mandate's, joined by `~~`. | [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented).[`checkout_mandate`](https://lcp.integraledger.com/reference/api/ap2.md#property-checkout_mandate) | | `payment` | [`X402Bundle`](https://lcp.integraledger.com/reference/api/ap2.md#x402bundle) | - | - | | `payment_receipt?` | `object` | Present only in AP2's push funding, where the payment method pushes funds to the merchant and the merchant receives confirmation of funds sent instead of a payment credential: that confirmation, AP2's Payment Receipt as the payer's side gives it, a JSON object carried whole and read by nothing here. Absent where the merchant initiates the charge. | [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented).[`payment_receipt`](https://lcp.integraledger.com/reference/api/ap2.md#property-payment_receipt) | ## Type Aliases ### CheckoutOption > **CheckoutOption** = `object` The checkout's own `id`, 1–256 characters. #### Properties | Property | Type | | ------ | ------ | | `checkout` | `string` | *** ### EvmMark > **EvmMark** = `"latest"` \| `"safe"` \| `"finalized"` The marks of an EVM read, from the lowest: the block at the head, at or below `safe`, at or below `finalized`. *** ### EvmQuery > **EvmQuery**\<`Ref`\> = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<`Ref`, `bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\> What an EVM `status` takes beside the reference and the reader. #### Type Parameters | Type Parameter | | ------ | | `Ref` | *** ### Jws > **Jws** = `string` A compact JWS: three base64url segments joined by ".". *** ### Payload > **Payload** = `object` The `checkout_jwt` payload: the commerce object. #### Index Signature \[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json) *** ### X402Ref > **X402Ref** = [`Eip3009Ref`](https://lcp.integraledger.com/reference/api/evm.md#eip3009ref) & `Omit`\<[`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref), `"network"` \| `"payee"` \| `"transaction"`\> & `object` The read keys of the x402 credential: the keys of `x402/exact/eip155/eip3009`'s reference, the authorization's own nonce standing where that pairing's reference has H, so that the carried pairing's `status` reads the payment; and the authorization's members as presented. The authorization's `nonce` is its single-use value. #### Type Declaration | Name | Type | | ------ | ------ | | `authorization` | [`PullAuthorization`](https://lcp.integraledger.com/reference/api/evm.md#pullauthorization) | | `from` | `string` | | `idDigest` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `nonce` | `string` | | `to` | `string` | | `transferLog` | [`TransferLog`](https://lcp.integraledger.com/reference/api/evm.md#transferlog) | | `validAfter` | `string` | | `validBefore` | `string` | | `value` | `string` | ## Variables ### CHECKOUT\_VCT > `const` **CHECKOUT\_VCT**: `"mandate.checkout.1"` = `"mandate.checkout.1"` *** ### checkoutMandate > `const` **checkoutMandate**: `Readonly`\<\{ `advertise`: (`payload`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload); `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`: (`offer`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](https://lcp.integraledger.com/reference/api/ap2.md#unsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"ap2/checkout-mandate"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`Ap2Offer`](https://lcp.integraledger.com/reference/api/ap2.md#ap2offer); \}; `tie`: (`options`) => \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption); \}\> `ap2/checkout-mandate`. Where the merchant initiates the charge, the payee broadcasts (`broadcaster` answers `"payee"`): the seller's payment processor executes the payment the closed Checkout Mandate authorizes. In AP2's push funding the presentation carries `payment_receipt` and the payer broadcasts (`"payer"`): its side sent the funds before the merchant saw them. Nothing here reads the payment. A value outside `bound`'s shape gate gets the refusal `bound` gives it. *** ### checkoutMandateX402 > `const` **checkoutMandateX402**: `Readonly`\<\{ `advertise`: (`payload`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload); `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`: (`offer`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](https://lcp.integraledger.com/reference/api/ap2.md#unsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"ap2/checkout-mandate/x402"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`Ap2Offer`](https://lcp.integraledger.com/reference/api/ap2.md#ap2offer); \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Ref`](https://lcp.integraledger.com/reference/api/ap2.md#x402ref)\>; `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`: (`options`) => \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption); \}\> `ap2/checkout-mandate/x402`. The payee broadcasts (`broadcaster` answers `"payee"`): the merchant forwards AP2's x402 credential to its payment processor, which submits the authorization. `status` reads it by this pairing's `reference` as `x402/exact/eip155/eip3009`'s read does, at coverage `none`, the authorization's own nonce standing where that pairing has H. A value that is not a JSON object gets `ap2/mandate-malformed`, as `bound` refuses it. *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api.md#digestjson) = `digestJson` The option digest the issuer keeps: SHA-256 over the RFC 8785 form. ## Functions ### checkoutBinding() > **checkoutBinding**(`p`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `payload`: [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload); \}\> AP2's merchant check: the mandate's `checkout_hash` is the hash of the presented `checkout_jwt`, and a disclosed `checkout_jwt` is that JWT. Returns that JWT's payload. It checks that the mandate commits to the latest checkout when the seller presents the `checkout_jwt` it last sent for this checkout; with the buyer's copy, it checks only that the mandate and that JWT agree. #### Parameters | Parameter | Type | | ------ | ------ | | `p` | `unknown` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `payload`: [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload); \}\> *** ### checkoutJwtOf() > **checkoutJwtOf**(`m`): `Promise`\<`string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> The `checkout_jwt` the mandate discloses. #### Parameters | Parameter | Type | | ------ | ------ | | `m` | `string` | #### Returns `Promise`\<`string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> *** ### jwsPayload() > **jwsPayload**(`j`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload) The payload of a compact JWS, decoded as one JSON object. Each segment is base64url without padding in its canonical form (RFC 7515 §2, RFC 4648 §3.5); a JWS with a segment in another form is `ap2/jws-malformed`. The signature is never verified. #### Parameters | Parameter | Type | | ------ | ------ | | `j` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Payload`](https://lcp.integraledger.com/reference/api/ap2.md#payload) *** ### readMandate() > **readMandate**(`m`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MandateContent`](https://lcp.integraledger.com/reference/api/ap2.md#mandatecontent)\> The closed Checkout Mandate in a presentation, one SD-JWT or AP2's chain of the open and closed mandates joined by `~~` (at most these two hops, each an SD-JWT): exactly one resolved object of the last SD-JWT whose `vct` is `mandate.checkout.1`, its `checkout_hash`, and its `checkout_jwt` when disclosed. No signature is verified, nor the open mandate's `cnf` delegation to the closed mandate's signer, nor the closed mandate's `sd_hash` or `issuer_jwt_hash` link to the open one; the open mandate's constraints are not read. Each segment of each hop's issuer-signed JWT and each disclosure is base64url without padding in its canonical form (RFC 4648 §3.5), or the mandate is `ap2/mandate-malformed`; the last hop's Key Binding JWT is not read. A hop whose payload, with each disclosed value where its reference sits, nests more than 64 levels is `ap2/too-large`. #### Parameters | Parameter | Type | | ------ | ------ | | `m` | `unknown` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MandateContent`](https://lcp.integraledger.com/reference/api/ap2.md#mandatecontent)\> *** ### tie() > **tie**(`options`): \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption)[]; \}\] The binding slot: the checkouts this ATR was minted for, each by its own `id`. #### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption)[] | #### Returns \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ap2.md#checkoutoption)[]; \}\] *** ### x402MethodNetwork() > **x402MethodNetwork**(`network`): `` `eip155:${string}` `` \| `undefined` The CAIP-2 id of the network an AP2 x402 method names, as AP2's merchant and x402 credential provider write it (`base-sepolia`, `merchant_agent_mcp/server.py:763` and `x402_credentials_provider_mcp/server.py:264` at AP2 `e1ea56d`): an `eip155:` id as given, or an x402 v1 EVM network name as `eip155:` and the chain id `@x402/evm` 2.31.0's v1 table maps it to; undefined for any other value. `ap2/checkout-mandate/x402`'s `reference` names the method's network so. #### Parameters | Parameter | Type | | ------ | ------ | | `network` | `unknown` | #### Returns `` `eip155:${string}` `` \| `undefined` ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) --- # @integraledger/lcp/aptos > Aptos, and the `x402/exact/aptos` pairing, served at the seller-tied level: no field of a standard Aptos transfer carries the ATR hash, so the hash is advertised in the challenge and tied to the payment by the seller's claim. Source: https://lcp.integraledger.com/reference/api/aptos Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Aptos, and the `x402/exact/aptos` pairing, served at the seller-tied level: no field of a standard Aptos transfer carries the ATR hash, so the hash is advertised in the challenge and tied to the payment by the seller's claim. The hash is read back from the echoed extension. The settlement is found by the payer's sender and sequence number, and identified by a digest of the transfer the payer signed and by the expiry it signed. ## Interfaces ### AptosAccount The account's sequence number, at the ledger of that answer: its time, and its oldest version held. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `oldestVersion` | `bigint` | The answer's `X-Aptos-Ledger-Oldest-Version`. | | `sequenceNumber` | `bigint` | The account's `sequence_number`; 0 where the node does not hold the account. | | `timestampUsecs` | `bigint` | The answer's `X-Aptos-Ledger-TimestampUsec`. | *** ### AptosCommitted A committed user transaction as the REST API returns it, with every member the read needs: its `events` and its `changes` whole, as the node returns them. A reader that leaves either out returns an answer out of this form, which the read answers `unreadable`, `unparseable`, and never reads as a transaction that deposited nothing. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `changes` | `object`[] | Every write-set change of the transaction: at a deposit's store address, `0x1::object::ObjectCore`'s `owner` and `0x1::fungible_asset::FungibleStore`'s `metadata`, each a `write_resource` whose `data` is `{type, data}`. | | `events` | `object`[] | Every event of the transaction, each with its type and data: a deposit is `0x1::fungible_asset::Deposit`, `{store, amount}`. | | `expiration_timestamp_secs` | `string` | - | | `gas_unit_price?` | `string` | - | | `hash` | `string` | - | | `max_gas_amount?` | `string` | - | | `payload` | `object` | The payload as signed: an entry function's `function`, `type_arguments` and `arguments`, or another kind's members. The read takes a transaction of any payload at the signed number for its deposits. | | `payload.arguments?` | `unknown`[] | - | | `payload.function?` | `string` | - | | `payload.type` | `string` | - | | `payload.type_arguments?` | `string`[] | - | | `sender` | `string` | - | | `sequence_number` | `string` | - | | `success` | `boolean` | - | | `type` | `"user_transaction"` | - | | `version` | `string` | - | *** ### AptosInstrument The transfer the payer signed, in one normal form shared by the signed bytes and the chain's REST answer. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `arguments` | readonly `string`[] | - | | `chainId` | `number` | - | | `expiresAt` | `bigint` | - | | `function` | `string` | - | | `gasUnitPrice?` | `bigint` | - | | `maxGasAmount?` | `bigint` | The signed gas members; absent in a normal form read from a REST answer that does not show them. | | `sender` | `` `0x${string}` `` | - | | `sequenceNumber` | `bigint` | - | | `typeArguments` | readonly `string`[] | - | *** ### AptosReader Bounded, read-only calls against one network's REST endpoint. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`; any rejection reads as unreadable. A committed transaction is returned whole, with its `events` and its `changes` (`AptosCommitted`); an answer without them is `unparseable`. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `aptos:${number}` `` | #### Methods ##### account() > **account**(`sender`): `Promise`\<[`AptosAccount`](https://lcp.integraledger.com/reference/api/aptos.md#aptosaccount)\> `GET /v1/accounts/{sender}`: the account's sequence number with the ledger time and floor of that answer. ###### Parameters | Parameter | Type | | ------ | ------ | | `sender` | `` `0x${string}` `` | ###### Returns `Promise`\<[`AptosAccount`](https://lcp.integraledger.com/reference/api/aptos.md#aptosaccount)\> ##### byHash() > **byHash**(`hash`): `Promise`\<[`AptosCommitted`](https://lcp.integraledger.com/reference/api/aptos.md#aptoscommitted) \| \{ `type`: `"pending_transaction"`; \} \| `null`\> `GET /v1/transactions/by_hash/{hash}`; null on 404. ###### Parameters | Parameter | Type | | ------ | ------ | | `hash` | `` `0x${string}` `` | ###### Returns `Promise`\<[`AptosCommitted`](https://lcp.integraledger.com/reference/api/aptos.md#aptoscommitted) \| \{ `type`: `"pending_transaction"`; \} \| `null`\> ##### bySequence() > **bySequence**(`sender`, `n`): `Promise`\<[`AptosCommitted`](https://lcp.integraledger.com/reference/api/aptos.md#aptoscommitted) \| \{ `notFound`: `true`; `oldestVersion?`: `bigint`; `timestampUsecs`: `bigint`; \}\> `GET /v1/accounts/{sender}/transactions?start=n&limit=1`, kept only when its `sequence_number` is n. When there is none, `notFound` with `timestampUsecs`, the ledger timestamp of that answer, its `X-Aptos-Ledger-TimestampUsec` header, and `oldestVersion`, its `X-Aptos-Ledger-Oldest-Version` header. ###### Parameters | Parameter | Type | | ------ | ------ | | `sender` | `` `0x${string}` `` | | `n` | `bigint` | ###### Returns `Promise`\<[`AptosCommitted`](https://lcp.integraledger.com/reference/api/aptos.md#aptoscommitted) \| \{ `notFound`: `true`; `oldestVersion?`: `bigint`; `timestampUsecs`: `bigint`; \}\> ##### ledger() > **ledger**(): `Promise`\<\{ `chainId`: `number`; `timestampUsecs`: `bigint`; \}\> `GET /v1`. ###### Returns `Promise`\<\{ `chainId`: `number`; `timestampUsecs`: `bigint`; \}\> *** ### AptosRef #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `expiresAt` | `string` | - | | `gasUnitPrice?` | `string` | - | | `idDigest` | `` `0x${string}` `` | - | | `maxGasAmount?` | `string` | The signed gas members, decimal strings: with the members above, the payment presented. | | `network` | `` `aptos:${number}` `` | - | | `payee` | `string` | The option's `payTo`. | | `sender` | `` `0x${string}` `` | - | | `sequenceNumber` | `string` | Decimal strings. | | `transaction?` | `` `0x${string}` `` | The facilitator's transaction hash, once named: a hint, since a fee payer's signature changes it. | *** ### AptosUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `request.kind` | `"aptos-transaction"` | #### Methods ##### complete() > **complete**(`signed`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosPaymentPayload`](https://lcp.integraledger.com/reference/api.md#aptospaymentpayload) The payment of the signed transaction, once `reference` reads its keys; a transaction `reference` refuses gets the code `reference` gives it, such as `aptos/chain-mismatch` for a transaction signed for a chain other than the option's network. ###### Parameters | Parameter | Type | | ------ | ------ | | `signed` | \{ `transaction`: `string`; \} | | `signed.transaction` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosPaymentPayload`](https://lcp.integraledger.com/reference/api.md#aptospaymentpayload) *** ### X402Read What a pairing's `read` returns: the hash, the link, the agreement URL when the document carries one, the offer. #### Properties | Property | Type | | ------ | ------ | | `agreement?` | `string` | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | [`X402Offer`](https://lcp.integraledger.com/reference/api/x402.md#x402offer) | ## Type Aliases ### AptosNetwork > **AptosNetwork** = `` `aptos:${number}` `` CAIP-2: `aptos:` and the numeric chain id. *** ### AptosStatus > **AptosStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, `"committed"`, `bigint`\> The answer of `aptosStatus`: positions are ledger versions, and the one mark is `committed`, a transaction the REST endpoint serves as committed, which is final. ## Variables ### exactAptos > `const` **exactAptos**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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) \| [`AptosUnsigned`](https://lcp.integraledger.com/reference/api/aptos.md#aptosunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/aptos"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosRef`](https://lcp.integraledger.com/reference/api/aptos.md#aptosref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`AptosStatus`](https://lcp.integraledger.com/reference/api/aptos.md#aptosstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/aptos`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator submits the transaction the payer signed and names its hash; `status` finds it by that hash, else by the payer's sender and sequence number. *** ### MAX\_APTOS\_READ\_ITEMS > `const` **MAX\_APTOS\_READ\_ITEMS**: `4096` = `4096` The most events, and the most write-set changes, the read takes of one committed transaction: lcp's own bound on the work one reader's answer asks of it. Aptos sets no count a REST answer is held to; an answer over it is `unparseable`. *** ### MAX\_APTOS\_TX\_BYTES > `const` **MAX\_APTOS\_TX\_BYTES**: `number` The largest Aptos transaction lcp decodes, in bytes: the chain's `max_transaction_size_in_bytes`, 64 KiB, beyond which the chain refuses a transaction. A larger one is `aptos/tx-too-large`. ## Functions ### aptosIdDigest() > **aptosIdDigest**(`i`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> SHA-256 over the RFC 8785 form of `{sender, sequenceNumber, function, typeArguments, arguments}`. #### Parameters | Parameter | Type | | ------ | ------ | | `i` | [`AptosInstrument`](https://lcp.integraledger.com/reference/api/aptos.md#aptosinstrument) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### aptosStatus() > **aptosStatus**(`ref`, `reader`, `query`): `Promise`\<[`AptosStatus`](https://lcp.integraledger.com/reference/api/aptos.md#aptosstatus)\> The read of the payment as the profile `x402/exact/aptos` states it, answered by the profile `read-status` at coverage `none`. The act is the sender's committed transaction at the signed sequence number, found by the sender and that number; a named hash is a hint, read first, since a fee payer's signature changes it, and a transaction the node holds uncommitted ends nothing. The transaction found is classified from what landed: its signer, the sender, against the option's payee; the account it names, the owner of each fungible-asset store a `Deposit` event credits, read from the transaction's `ObjectCore` change at that store, against the payee; and whether it is another act the caller gave, by its reference's sender and sequence number. A `settled` answer states `presented`: whether the transaction's signed members, the sender, sequence number, entry function and arguments, gas members and expiry, are those the reference holds. Where nothing is at the number, the account's own sequence number is read with that answer's ledger time and history floor: a number the account has passed is consumed, its transaction not returned; one it has not passed is live until the ledger's time in whole seconds reaches the signed expiry (aptos-core's `transaction_validation.move` takes a transaction only while `timestamp::now_seconds() < txn_expiration_time`), and unused after it, but only where the floor of each answer is at or below the position given, else `history-gap`. A reader for another network, or a ledger for another chain, is `chain-mismatch`; a rejected read is `transport`, or by a `ReaderError`'s kind `too-large` or `unparseable`; an answer of another shape, or a deposit whose store's owner the answer does not show, or a committed answer without its events or its changes, is `unparseable`, never a transaction that deposited nothing; a ref or query that is not one is `unparseable`, with nothing read. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`AptosRef`](https://lcp.integraledger.com/reference/api/aptos.md#aptosref) | | `reader` | [`AptosReader`](https://lcp.integraledger.com/reference/api/aptos.md#aptosreader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`AptosRef`](https://lcp.integraledger.com/reference/api/aptos.md#aptosref), `bigint`, `"committed"`, `bigint`\> | #### Returns `Promise`\<[`AptosStatus`](https://lcp.integraledger.com/reference/api/aptos.md#aptosstatus)\> *** ### committedInstrument() > **committedInstrument**(`t`, `chainId`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosInstrument`](https://lcp.integraledger.com/reference/api/aptos.md#aptosinstrument) The REST answer in the normal form: every address as `0x` and 64 lowercase hex, `{"inner": a}` as `a`, and the amount as its decimal string. The REST answer carries no chain id, so the caller supplies the ledger's. #### Parameters | Parameter | Type | | ------ | ------ | | `t` | [`AptosCommitted`](https://lcp.integraledger.com/reference/api/aptos.md#aptoscommitted) | | `chainId` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosInstrument`](https://lcp.integraledger.com/reference/api/aptos.md#aptosinstrument) *** ### decodeAptosTx() > **decodeAptosTx**(`transaction`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosInstrument`](https://lcp.integraledger.com/reference/api/aptos.md#aptosinstrument) Reads the `RawTransaction` prefix of a base64 transaction, in either wire form: the scheme's BCS bytes, or x402's reference form, base64 of the JSON `{"transaction": [bytes], "senderAuthenticator": [bytes]}`. Only an entry function call to a framework fungible-asset transfer is accepted. Module, function and struct names are read as their exact bytes, a leading U+FEFF included, and each must be an ASCII letter or underscore followed by up to 254 ASCII letters, digits and underscores, else `aptos/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `transaction` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AptosInstrument`](https://lcp.integraledger.com/reference/api/aptos.md#aptosinstrument) ## References ### AptosPaymentPayload Re-exports [AptosPaymentPayload](https://lcp.integraledger.com/reference/api.md#aptospaymentpayload) *** ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) --- # @integraledger/lcp/avm > Algorand: the pairing `x402/exact/algorand`, in which the payer signs an asset transfer whose note is the ATR hash's LCP string, and the settlement read from an Indexer by the transaction id computed from the signed bytes. Source: https://lcp.integraledger.com/reference/api/avm Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Algorand: the pairing `x402/exact/algorand`, in which the payer signs an asset transfer whose note is the ATR hash's LCP string, and the settlement read from an Indexer by the transaction id computed from the signed bytes. `algosdk` is an optional peer: this module loads it when present, and `build` writes the transactions with it. The addresses and the payment entries are read without it, so the option filter, `advertise`, `read`, `bound`, `reference` and `avmCarrier` need no peer, and `build` refuses `avm/peer-missing` only after every check that needs none. ## Interfaces ### AvmAssetTransfer An asset transfer's members, as the Indexer reports them under `asset-transfer-transaction`. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `amount` | `bigint` | `aamt`: `amount`. | | `assetId` | `bigint` | `xaid`: `asset-id`. | | `assetSender` | `string` \| `null` | `asnd`: the asset transfer's `sender`, set only on a clawback; null where unset. | | `closeAmount` | `bigint` | `close-amount`: what the close moved to `closeTo`; 0 where there is no close. | | `closeTo` | `string` \| `null` | `aclose`: `close-to`; null where unset. | | `receiver` | `string` | `arcv`: `receiver`. | *** ### AvmIndexed A transaction as the Indexer reports it, with the members the read needs. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `authAddr` | `string` \| `null` | `auth-addr`: `sgnr`, the signer where it is not the sender; null where the signer is the sender. | | `confirmedRound` | `bigint` | `confirmed-round`. | | `id` | `string` | `id`, the transaction id. An inner transaction carries its root's. | | `inner` | readonly [`AvmIndexed`](https://lcp.integraledger.com/reference/api/avm.md#avmindexed)[] | `inner-txns`. | | `note` | `Uint8Array` | `note`, decoded from its base64. | | `sender` | `string` | `sender`: `snd`. | | `signature` | `"none"` \| `"sig"` \| `"multisig"` \| `"pqsig"` \| `"logicsig"` | The member of `signature` that is set: `sig`, `multisig`, `logicsig` or `pqsig`; `none` on an inner transaction. | | `transfer` | [`AvmAssetTransfer`](https://lcp.integraledger.com/reference/api/avm.md#avmassettransfer) \| `null` | `asset-transfer-transaction`, where `type` is `axfer`; null otherwise. | | `type` | `string` | `tx-type`: `axfer` for an asset transfer. | *** ### AvmPage One page of an account's transactions, as the Indexer answers it. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `currentRound` | `bigint` | The answer's `current-round`. | | `next?` | `string` | `next-token`; absent on the page that holds no transaction. | | `transactions` | readonly ([`AvmIndexed`](https://lcp.integraledger.com/reference/api/avm.md#avmindexed) \| \{ `id`: `string`; `unparseable`: `true`; \})[] | The page's transactions, newest first; one the reader cannot parse is `{ unparseable: true, id }`, by its id. | *** ### AvmParams The buyer's read of algod `GET /v2/transactions/params`. `genesisHash` is its base64. #### Properties | Property | Type | | ------ | ------ | | `feePerByte` | `bigint` | | `firstValid` | `bigint` | | `genesisHash` | `string` | | `genesisId` | `string` | | `minFee` | `bigint` | *** ### AvmPresented The x402 payload on Algorand. #### Properties | Property | Type | | ------ | ------ | | `paymentGroup` | readonly `string`[] | | `paymentIndex` | `number` | *** ### AvmReader Bounded, read-only calls against one network's Indexer. Every failure rejects. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `archival?` | `readonly` | `boolean` | True where the Indexer is declared archival: it holds every round, so the history is shown without a read. | | `network` | `readonly` | `` `algorand:${string}` `` | - | #### Methods ##### accountPage() > **accountPage**(`account`, `q`): `Promise`\<[`AvmPage`](https://lcp.integraledger.com/reference/api/avm.md#avmpage)\> `GET /v2/accounts/{account}/transactions` with `min-round`, and `max-round` and `next` where given. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `q` | \{ `maxRound?`: `bigint`; `minRound`: `bigint`; `next?`: `string`; \} | | `q.maxRound?` | `bigint` | | `q.minRound` | `bigint` | | `q.next?` | `string` | ###### Returns `Promise`\<[`AvmPage`](https://lcp.integraledger.com/reference/api/avm.md#avmpage)\> ##### header() > **header**(`round`): `Promise`\<`boolean`\> `GET /v2/blocks/{round}?header-only=true`: true where it answers the block's header, false where it holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `round` | `bigint` | ###### Returns `Promise`\<`boolean`\> ##### transaction() > **transaction**(`txid`): `Promise`\<\{ `currentRound`: `bigint`; `found`: [`AvmIndexed`](https://lcp.integraledger.com/reference/api/avm.md#avmindexed) \| `null`; \}\> `GET /v2/transactions?txid=…`: the answer's `current-round`, and the transaction, or null where it holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `txid` | `string` | ###### Returns `Promise`\<\{ `currentRound`: `bigint`; `found`: [`AvmIndexed`](https://lcp.integraledger.com/reference/api/avm.md#avmindexed) \| `null`; \}\> *** ### AvmRef The read keys `reference` returns, computed from the signed bytes with no network: the network, the transaction id, its last valid round as a decimal string, H, the payer `snd`, the signer the payment entry names (`sgnr` where set, else `snd`), and the option's payee. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `h` | `` `0x${string}` `` | The hash the payment's note carries: the search for H's key. | | `lastValid` | `string` | - | | `network` | `` `algorand:${string}` `` | - | | `payee` | `string` | The option's `payTo`. | | `sender` | `string` | The payer, `snd`: the account whose transactions the search for H reads. | | `signer` | `string` | The signer the presented entry names: `sgnr` where set, else `snd`. | | `txid` | `string` | - | *** ### AvmSearch The search's position: the round through which it is read whole, and, for a sub-range under way, its top and the `next` token of the last page read. #### Properties | Property | Type | | ------ | ------ | | `next?` | `string` | | `through` | `bigint` | | `top?` | `bigint` | *** ### AvmUnsigned The bytes the payer signs, and how the signature completes the payment. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | "TX" ‖ msgpack(txn) | | `request.bytes` | `Uint8Array`\<`ArrayBuffer`\> | - | | `request.kind` | `"algorand-txn"` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#avmpaymentpayload) Completes the payment with the payer's 64-byte Ed25519 signature over `request.bytes`; a signature of any other length is `avm/signature-malformed`. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#avmpaymentpayload) ## Type Aliases ### AlgorandNetwork > **AlgorandNetwork** = `` `algorand:${string}` `` CAIP-2: the first 32 characters of the URL-safe base64 genesis hash. *** ### AvmStatus > **AvmStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, `"final"`, [`AvmSearch`](https://lcp.integraledger.com/reference/api/avm.md#avmsearch)\> The answer of `avmStatus`: positions are confirmed rounds, the one mark is `final`, and the search's position is `AvmSearch`. A `settled` answer states `presented`: `yes` where the act is the transaction the reference was built from, `no` where it is another. Each transfer of what moved is named by its transaction id and its place, the member naming the account it reached (`arcv`, or `aclose` for a holding closed to it). ## Variables ### AVM\_MAX\_ENTRY > `const` **AVM\_MAX\_ENTRY**: `8192` = `8192` lcp's own resource bound on one payment entry: at most 8,192 base64 characters, so that no entry costs more to read than a signed asset transfer with the largest note the chain admits and a multisignature of many keys. *** ### AVM\_MAX\_GROUP > `const` **AVM\_MAX\_GROUP**: `16` = `16` The most transactions a payment group holds: x402's Algorand scheme's bound, the chain's own group size. *** ### AVM\_MAX\_LIFE > `const` **AVM\_MAX\_LIFE**: `1000` = `1000` The longest a signed transaction stays payable, in rounds after its first valid round: the chain's maximum transaction life, which lcp's client never exceeds when it sets the last valid round. *** ### AVM\_MAX\_NOTE > `const` **AVM\_MAX\_NOTE**: `4096` = `4096` lcp's own resource bound on a payment entry's note, 4,096 bytes, above the chain's 1,024, so that the reader refuses no note algod could take and reads no unbounded one. *** ### AVM\_SEARCH\_PAGES > `const` **AVM\_SEARCH\_PAGES**: `32` = `32` lcp's own resource bound on one read: the search for H reads at most 32 pages of the payer's transactions in one call, and an answer that stops there carries the search's position, from which the next call resumes. *** ### exactAvm > `const` **exactAvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AvmUnsigned`](https://lcp.integraledger.com/reference/api/avm.md#avmunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/algorand"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AvmRef`](https://lcp.integraledger.com/reference/api/avm.md#avmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`AvmStatus`](https://lcp.integraledger.com/reference/api/avm.md#avmstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/algorand`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator submits the signed transaction `complete` returns; `status` reads it by the transaction id computed from the signed bytes. *** ### MSGPACK\_MAX\_DEPTH > `const` **MSGPACK\_MAX\_DEPTH**: `32` = `32` The deepest nesting of msgpack arrays and maps `avmCarrier` reads in a payment entry, the outermost container being level 1. algod's signed transaction nests at most 10 (a state proof's reveal, down to a byte string written as an array of numbers), so the cap refuses no entry algod decodes. ## Functions ### avmCarrier() > **avmCarrier**(`p`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `lastValid`: `bigint`; `sender`: `string`; `signer`: `string`; `txid`: `string`; \} The payment transaction of an x402 Algorand payload: `paymentGroup[paymentIndex]`, read as a signed asset transfer whose note is an LCP string. Gives the hash, the transaction id and the last valid round. On the x402 path the entry has two readers: the facilitator decodes it, and algod decodes the bytes the facilitator submits, which are the entry's own. The entry is read only when it is one msgpack value nesting at most `MSGPACK_MAX_DEPTH` deep, algod's decoder takes it as a signed transaction of a type algod knows with no member of another type set, the facilitator's decoder takes it as an asset transfer, and both read the same signed transaction: their canonical encodings are equal, and the facilitator can compute its id (it has a genesis hash). An entry a Falcon signature (`pqsig`) authorises, which the facilitator's decoder does not read, is read by algod's decoder alone, where `pqsig` is its one signature, Falcon-1024's, within go-codec's bounds. Any other entry is `avm/txn-malformed`, and one algod reads as another type is `avm/not-axfer`. So a repeated scalar key, keys out of order, a member written at its default, an integer or length in a longer format than it needs, a nil member, or a binary and a string in each other's place reads as algod reads it, and the transaction id is the one algod computes, from the transaction's canonical encoding. Where the two read different transactions the entry is refused: a repeated struct whose earlier occurrences set a member the last one does not, which algod merges in and the facilitator does not read, a repeated list whose elements algod decodes into those an earlier list left, and a fixed-length byte member of another length. A byte member written as a msgpack string is read as its bytes, whatever they are; a string member (`type`, `gen`) is refused when its bytes are not UTF-8, which the facilitator reads as other text. Each answer is a function of the entry's bytes alone. Both readers are the package's own (`readEntry`), so nothing here needs algosdk: every answer is the same without it. Then, the note carrying H, an entry a logic signature authorises is `avm/logic-signature` and one that names an asset sender, `asnd`, is `avm/clawback`: under a logic signature no key signs the transaction, and a transfer that names `asnd` is the act of the asset's clawback address, so neither is the payer's signed act. Gives H, the transaction id, the last valid round, the sender `snd` and the signer, `sgnr` where the payment entry names one and `snd` otherwise. #### Parameters | Parameter | Type | | ------ | ------ | | `p` | [`AvmPresented`](https://lcp.integraledger.com/reference/api/avm.md#avmpresented) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `lastValid`: `bigint`; `sender`: `string`; `signer`: `string`; `txid`: `string`; \} *** ### avmRecover() > **avmRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The hash from the landed payment's note, for anyone holding the transaction id. An input whose `tx` is not the 52 base32 characters of a 32-byte hash, or whose option is not an object, is `avm/wrong-reader`, with nothing read; the option is not read further. One call. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `algorand:${string}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`AvmReader`](https://lcp.integraledger.com/reference/api/avm.md#avmreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### avmStatus() > **avmStatus**(`ref`, `reader`, `query`): `Promise`\<[`AvmStatus`](https://lcp.integraledger.com/reference/api/avm.md#avmstatus)\> The read of the payment by the transaction id and, where it decides, the search for H, as the profiles `read-status` and `x402/exact/algorand/note` answer it. The facts the search rests on are not yet shown by a run, so a search read whole answers `pending`, `search-incomplete`, where it would answer `failed`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`AvmRef`](https://lcp.integraledger.com/reference/api/avm.md#avmref) | | `reader` | [`AvmReader`](https://lcp.integraledger.com/reference/api/avm.md#avmreader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`AvmRef`](https://lcp.integraledger.com/reference/api/avm.md#avmref), `bigint`, `"final"`, [`AvmSearch`](https://lcp.integraledger.com/reference/api/avm.md#avmsearch)\> | #### Returns `Promise`\<[`AvmStatus`](https://lcp.integraledger.com/reference/api/avm.md#avmstatus)\> ## References ### AvmPaymentPayload Re-exports [AvmPaymentPayload](https://lcp.integraledger.com/reference/api.md#avmpaymentpayload) *** ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/card > The `card` entry point: the ATR hash on a card checkout, on five paths: Visa TAP, Mastercard Agent Pay, Visa Intelligent Commerce, Mastercard Verifiable Intent (Immediate and Autonomous) and the plain card checkout. Source: https://lcp.integraledger.com/reference/api/card Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The `card` entry point: the ATR hash on a card checkout, on five paths: Visa TAP, Mastercard Agent Pay, Visa Intelligent Commerce, Mastercard Verifiable Intent (Immediate and Autonomous) and the plain card checkout. - Visa TAP and Mastercard Agent Pay: the hash rides in what the agent's message signature covers: its `nonce`, the base64 of the hash followed by 32 random bytes, or the merchant's checkout path, whose last segment is the hash. - Visa Intelligent Commerce: the hash is the `transactionReferenceId` the agent writes when it asks for the sale's credential, as unpadded base64url. - Mastercard Verifiable Intent: the hash rides in the `checkout_jwt`, whose SHA-256 the user's L2 mandate (Immediate) or the agent's L3b mandate (Autonomous) signs as `checkout_hash`. - The plain card checkout: nothing the buyer signs carries the hash. The seller shows it with the link before payment and places it in its processor reference. Pure: no I/O, no state. WebCrypto supplies SHA-256 and ES256. No function throws. ## Interfaces ### CardOption One card option offered at a checkout. `checkout` is the seller's own id: 1–128 visible ASCII characters. #### Properties | Property | Type | | ------ | ------ | | `checkout` | `string` | | `scheme` | [`CardScheme`](https://lcp.integraledger.com/reference/api/card.md#cardscheme) | *** ### CardPairing #### Type Parameters | Type Parameter | | ------ | | `PairingId` *extends* [`CardPairingId`](https://lcp.integraledger.com/reference/api/card.md#cardpairingid) | | `U` | #### Properties | Property | Type | | ------ | ------ | | `claims` | `boolean` | | `data` | [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata) | | `id` | `PairingId` | | `pattern` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern) | | `tie` | (`options`) => \[`"card"`, \{ `options`: readonly [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption)[]; \}\] | #### Methods ##### advertise() > **advertise**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardValues`](https://lcp.integraledger.com/reference/api/card.md#cardvalues) ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | `Record`\<`string`, `never`\> | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption) | | `agreementUrl?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardValues`](https://lcp.integraledger.com/reference/api/card.md#cardvalues) ##### bound() > **bound**(`presented`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ##### broadcaster() > **broadcaster**(`presented`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> Who broadcasts what the payer presents: the seller, which completes the payment (`"payee"`). ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> ##### build() > **build**(`doc`, `h`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `U`\> ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | `unknown` | | `h` | `` `0x${string}` `` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `U`\> ##### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; \} ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | `unknown` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; \} ##### unplaced() > **unplaced**(`option`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption) ###### Parameters | Parameter | Type | | ------ | ------ | | `option` | [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption) *** ### CardValues The values the seller's own stack places: the legal context shown before payment, with the agreement URL after the link when one is given, and the processor reference. #### Properties | Property | Type | | ------ | ------ | | `legalContext` | `object` | | `legalContext.legalContextAgreementUrl?` | `string` | | `legalContext.legalContextUrl` | `string` | | `legalContext.type` | `"sha256"` | | `legalContext.value` | `` `0x${string}` `` | | `reference` | `string` | *** ### TapPresented A TAP or Agent Pay request as the merchant received it: its two signature fields and, where the merchant's checkout path carries the hash, the request's absolute path without its query, as RFC 9421 §2.2.6 defines `@path`. #### Properties | Property | Type | | ------ | ------ | | `path?` | `string` | | `signature` | `string` | | `signatureInput` | `string` | *** ### TapUnsigned What the agent's own RFC 9421 signer places in every message signature of its checkout request: the `nonce`, the padded base64 of the hash's 32 bytes followed by 32 random bytes. #### Properties | Property | Type | | ------ | ------ | | `nonce` | `string` | *** ### ViAutonomous The Autonomous chain. `l2` is exactly the presentation that L3b's `sd_hash` covers. #### Properties | Property | Type | | ------ | ------ | | `l1` | `string` | | `l2` | `string` | | `l3b` | `string` | *** ### ViCheckoutChoice Immediate mode with a `checkout_jwt` the agent creates: the checkout payload it will sign, and the JSON the seller showed, whose `legalContext` member `build` writes into the payload. #### Properties | Property | Type | | ------ | ------ | | `checkout` | `object` | | `shown` | `unknown` | *** ### ViCheckoutUnsigned The checkout payload with the seller's `legalContext` member, for the agent to sign as its `checkout_jwt`. #### Properties | Property | Type | | ------ | ------ | | `checkout` | `object` | *** ### VicPresented A VIC transaction reference as the merchant reads it from the credential payload Visa signs for the sale. #### Properties | Property | Type | | ------ | ------ | | `transactionReferenceId` | `string` | *** ### VicUnsigned The transaction reference the agent writes into its VIC credential request: the hash as unpadded base64url. #### Properties | Property | Type | | ------ | ------ | | `transactionReferenceId` | `string` | *** ### ViImmediate L2 as presented: its JWS, then its disclosures, `~`-separated, ending in `~`. #### Properties | Property | Type | | ------ | ------ | | `l2` | `string` | *** ### ViUnsigned The checkout mandate for the wallet (L2) or the agent (L3b) to sign, and the payment mandate's `transaction_id`. #### Properties | Property | Type | | ------ | ------ | | `checkoutMandate` | `object` | | `checkoutMandate.checkout_hash` | `string` | | `checkoutMandate.checkout_jwt` | `string` | | `checkoutMandate.vct` | `"mandate.checkout.1"` | | `transactionId` | `string` | ## Type Aliases ### CardPairingId > **CardPairingId** = `"card/visa-tap"` \| `"card/mastercard-vi/immediate"` \| `"card/mastercard-vi/autonomous"` \| `"card/seller-reference"` \| `"card/visa-vic"` \| `"card/mastercard-agent-pay"` *** ### CardScheme > **CardScheme** = `"visa-tap"` \| `"mastercard-vi"` \| `"seller-reference"` \| `"visa-vic"` \| `"mastercard-agent-pay"` ## Variables ### agentPay > `const` **agentPay**: [`CardPairing`](https://lcp.integraledger.com/reference/api/card.md#cardpairing)\<`"card/mastercard-agent-pay"`, [`TapUnsigned`](https://lcp.integraledger.com/reference/api/card.md#tapunsigned)\> `card/mastercard-agent-pay`. TAP's carrier under Mastercard's two published `tag` spellings. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment to its processor; nothing here reads it. A value that is not an object gets `card/tap-signature-input-malformed`, as `bound` refuses it. *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api.md#digestjson) = `digestJson` The option digest the issuer keeps: SHA-256 over the RFC 8785 form. *** ### MAX\_CHARGE\_REFERENCE > `const` **MAX\_CHARGE\_REFERENCE**: `255` = `255` The longest charge reference lcp reads, in characters: a resource bound on what the seller presents, the bound lcp's Stripe subscription key takes for a Stripe ID (`mpp-card-stripe.ts`), which an Adyen `pspReference` (16 characters) is well within. *** ### MAX\_CHECKOUT\_ID > `const` **MAX\_CHECKOUT\_ID**: `128` = `128` The longest checkout id a card option names, in characters. *** ### MAX\_CHECKOUT\_JWT > `const` **MAX\_CHECKOUT\_JWT**: `16384` = `16_384` The longest `checkout_jwt` lcp reads, in characters. *** ### MAX\_TAP\_COMPONENTS > `const` **MAX\_TAP\_COMPONENTS**: `32` = `32` The most items lcp parses in one inner list of a TAP signature field: a signature's covered components. *** ### MAX\_TAP\_FIELD > `const` **MAX\_TAP\_FIELD**: `8192` = `8192` The longest TAP `Signature-Input` or `Signature` field lcp parses, in characters. *** ### MAX\_TAP\_MEMBERS > `const` **MAX\_TAP\_MEMBERS**: `16` = `16` The most members lcp parses in one TAP signature field, an RFC 9651 Dictionary. *** ### MAX\_TAP\_PATH > `const` **MAX\_TAP\_PATH**: `2048` = `2048` The longest request path lcp reads from a TAP or Agent Pay request, in characters. *** ### MAX\_VI\_DISCLOSURES > `const` **MAX\_VI\_DISCLOSURES**: `32` = `32` The most disclosures lcp reads in one Verifiable Intent layer. *** ### MAX\_VI\_LAYER > `const` **MAX\_VI\_LAYER**: `65536` = `65_536` The longest Verifiable Intent layer, an SD-JWT with its disclosures, lcp reads, in characters. *** ### sellerReference > `const` **sellerReference**: [`CardPairing`](https://lcp.integraledger.com/reference/api/card.md#cardpairing)\<`"card/seller-reference"`, `never`\> & `object` `card/seller-reference`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment to its processor, with H in its processor reference; nothing here reads it. `reference` names the charge by the seller's own reference for it. #### Type Declaration | Name | Type | | ------ | ------ | | `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChargeRef`](https://lcp.integraledger.com/reference/api/acp.md#chargeref)\> | *** ### viAutonomous > `const` **viAutonomous**: [`CardPairing`](https://lcp.integraledger.com/reference/api/card.md#cardpairing)\<`"card/mastercard-vi/autonomous"`, [`ViUnsigned`](https://lcp.integraledger.com/reference/api/card.md#viunsigned)\> `card/mastercard-vi/autonomous`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment the mandates authorize to its processor; nothing here reads it. A value that is not an object gets `card/vi-malformed`, as `bound` refuses it. *** ### viImmediate > `const` **viImmediate**: [`CardPairing`](https://lcp.integraledger.com/reference/api/card.md#cardpairing)\<`"card/mastercard-vi/immediate"`, [`ViUnsigned`](https://lcp.integraledger.com/reference/api/card.md#viunsigned) \| [`ViCheckoutUnsigned`](https://lcp.integraledger.com/reference/api/card.md#vicheckoutunsigned)\> `card/mastercard-vi/immediate`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment the mandate authorizes to its processor; nothing here reads it. A value that is not an object gets `card/vi-malformed`, as `bound` refuses it. *** ### visaTap > `const` **visaTap**: [`CardPairing`](https://lcp.integraledger.com/reference/api/card.md#cardpairing)\<`"card/visa-tap"`, [`TapUnsigned`](https://lcp.integraledger.com/reference/api/card.md#tapunsigned)\> `card/visa-tap`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment to its processor; nothing here reads it. A value that is not an object gets `card/tap-signature-input-malformed`, as `bound` refuses it. *** ### visaVic > `const` **visaVic**: [`CardPairing`](https://lcp.integraledger.com/reference/api/card.md#cardpairing)\<`"card/visa-vic"`, [`VicUnsigned`](https://lcp.integraledger.com/reference/api/card.md#vicunsigned)\> `card/visa-vic`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment with the credential Visa issued for the sale to its processor; nothing here reads it. A value that is not an object gets `card/vic-reference-malformed`, as `bound` refuses it. ## Functions ### disclosureDigest() > **disclosureDigest**(`s`): `Promise`\<`string`\> base64url, unpadded, of SHA-256 over the US-ASCII characters of `s` (RFC 9901 §4.2.3). #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `string` | #### Returns `Promise`\<`string`\> *** ### tie() > **tie**(`options`): \[`"card"`, \{ `options`: readonly [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption)[]; \}\] The binding slot: every card option offered at this checkout, exactly as issued. #### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption)[] | #### Returns \[`"card"`, \{ `options`: readonly [`CardOption`](https://lcp.integraledger.com/reference/api/card.md#cardoption)[]; \}\] ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### ChargePresented Re-exports [ChargePresented](https://lcp.integraledger.com/reference/api/acp.md#chargepresented) *** ### ChargeRef Re-exports [ChargeRef](https://lcp.integraledger.com/reference/api/acp.md#chargeref) --- # @integraledger/lcp/cardano > Cardano, and its two pairings: `x402/exact/cardano`, x402's address-to-address method, and `x402/exact/cardano/lock`, its two lock methods (`masumi` and `script`). Each carries the ATR hash as a CIP-20 message that the payer's signed body commits to. Source: https://lcp.integraledger.com/reference/api/cardano Updated 2026-11-19. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Cardano, and its two pairings: `x402/exact/cardano`, x402's address-to-address method, and `x402/exact/cardano/lock`, its two lock methods (`masumi` and `script`). Each carries the ATR hash as a CIP-20 message that the payer's signed body commits to. The two are told apart by the option's `extra.assetTransferMethod`. The message has metadata label 674, and the body commits to it through `auxiliary_data_hash`. The transaction id is the Blake2b-256 of the body as received, so a payment is named by an id fixed before any money moves, and its single-use value is the input `payload.nonce` names, which the body spends. ## Interfaces ### CardanoOnChain #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `blockHeight` | `bigint` | - | | `cbor?` | `Uint8Array`\<`ArrayBufferLike`\> | The transaction as included, when asked for. | | `slot` | `bigint` | - | | `valid` | `boolean` | db-sync's `tx.valid_contract`. | *** ### CardanoOutput An output an input names, as the endpoint answers it: the address that holds it, in Bech32 (a Byron address in any other spelling holds no payment credential); where it is spent, `spentBy`: the transaction that spent it, or null where the endpoint cannot name it; and `slot`, as `transaction`'s not-found answer names it. An unspent output is read at the latest head only where that slot is at or past the tip's read first. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `address` | `string` | - | | `slot?` | `bigint` | The slot of the latest block the indexer that answered held, read before the output; absent where unread. | | `spentBy?` | `` `0x${string}` `` \| `null` | - | *** ### CardanoPage One page of a payment credential's transactions: `through`, the height of the latest block the endpoint held, named by it before the page; the transactions with block heights in the range asked, ordered by height and then by id; and `more`, true where the range holds more after this page. #### Properties | Property | Type | | ------ | ------ | | `more` | `boolean` | | `through` | `bigint` | | `transactions` | readonly `object`[] | *** ### CardanoPayload The payload x402's Cardano scheme defines. #### Properties | Property | Type | | ------ | ------ | | `nonce` | `string` | | `transaction` | `string` | *** ### CardanoReader Bounded, read-only calls against one network's indexer. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`; any rejection reads as unreadable. `slotAt` answers the slot of the block at a height, or null when the indexer holds no block at it. `transaction` answers `notFound` when the indexer does not hold the transaction, with `slot`: the slot of the latest block the indexer that answered held, read from that same indexer before the lookup, or null when the reader cannot read it from that indexer. A lookup naming no slot never reads failed. `securityParam` is the ledger's security parameter from the endpoint's genesis, the count of confirmations that is the final mark. `output` answers the output an input names (`#`), or `notFound` where the endpoint documents the transaction that created it as absent. `inputAddresses` answers the addresses that hold a transaction's inputs, in its body's order. `credentialTransactions` answers one page of the transactions of a payment credential (`key:` or `script:` and its 28 bytes in hex) with block heights from `from` through `to`. No run has yet shown that any endpoint's listing holds every transaction that spends an output of the credential, or that a page with `more` false is the last (the profile `x402-exact-cardano`), so no search through it is read whole. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`CardanoNetwork`](https://lcp.integraledger.com/reference/api/cardano.md#cardanonetwork) | #### Methods ##### credentialTransactions() > **credentialTransactions**(`credential`, `from`, `to`, `offset`): `Promise`\<[`CardanoPage`](https://lcp.integraledger.com/reference/api/cardano.md#cardanopage)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `credential` | `string` | | `from` | `bigint` | | `to` | `bigint` | | `offset` | `number` | ###### Returns `Promise`\<[`CardanoPage`](https://lcp.integraledger.com/reference/api/cardano.md#cardanopage)\> ##### inputAddresses() > **inputAddresses**(`txId`): `Promise`\ ###### Parameters | Parameter | Type | | ------ | ------ | | `txId` | `` `0x${string}` `` | ###### Returns `Promise`\ ##### output() > **output**(`input`): `Promise`\<[`CardanoOutput`](https://lcp.integraledger.com/reference/api/cardano.md#cardanooutput) \| \{ `notFound`: `true`; \}\> ###### Parameters | Parameter | Type | | ------ | ------ | | `input` | `string` | ###### Returns `Promise`\<[`CardanoOutput`](https://lcp.integraledger.com/reference/api/cardano.md#cardanooutput) \| \{ `notFound`: `true`; \}\> ##### securityParam() > **securityParam**(): `Promise`\<`bigint`\> ###### Returns `Promise`\<`bigint`\> ##### slotAt() > **slotAt**(`blockHeight`): `Promise`\<`bigint` \| `null`\> ###### Parameters | Parameter | Type | | ------ | ------ | | `blockHeight` | `bigint` | ###### Returns `Promise`\<`bigint` \| `null`\> ##### tip() > **tip**(): `Promise`\<\{ `blockHeight`: `bigint`; `slot`: `bigint`; \}\> ###### Returns `Promise`\<\{ `blockHeight`: `bigint`; `slot`: `bigint`; \}\> ##### transaction() > **transaction**(`txId`, `withCbor`): `Promise`\<[`CardanoOnChain`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoonchain) \| \{ `notFound`: `true`; `slot`: `bigint` \| `null`; \}\> ###### Parameters | Parameter | Type | | ------ | ------ | | `txId` | `` `0x${string}` `` | | `withCbor` | `boolean` | ###### Returns `Promise`\<[`CardanoOnChain`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoonchain) \| \{ `notFound`: `true`; `slot`: `bigint` \| `null`; \}\> *** ### CardanoRef The read keys of a presented payment. `txId` is the Blake2b-256 of the body the payer signed, which holds every member of the payment presented, so a landed act is the payment presented exactly where its id is this one. `ttlSlot` is the slot from which the body cannot land (body key 3, `invalid_hereafter`), absent for a body that sets none. `input` is the input `payload.nonce` names, the single-use value. `payee` is the option's payee, the key of the read's two party tests: its `payTo`, or on a Masumi lock the seller its `extra.terms.sellerAddress` names. `escrow`, on a Masumi lock alone, is the option's `payTo`, the escrow every seller of the deployment shares: only a deposit into it names, by its datum, the seller. `h` is the hash the body carries, the key of the search for H. #### Properties | Property | Type | | ------ | ------ | | `escrow?` | `string` | | `h` | `` `0x${string}` `` | | `input` | `string` | | `method` | [`CardanoMethod`](https://lcp.integraledger.com/reference/api/cardano.md#cardanomethod) | | `network` | [`CardanoNetwork`](https://lcp.integraledger.com/reference/api/cardano.md#cardanonetwork) | | `payee` | `string` | | `ttlSlot?` | `string` | | `txId` | `` `0x${string}` `` | *** ### CardanoTx #### Properties | Property | Type | | ------ | ------ | | `h` | [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` | | `ttlSlot` | `bigint` \| `null` | | `txId` | `` `0x${string}` `` | *** ### CardanoUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `request.auxiliaryData` | `Uint8Array`\<`ArrayBuffer`\> | | `request.kind` | `"cardano-transaction"` | #### Methods ##### complete() > **complete**(`signed`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardanoPaymentPayload`](https://lcp.integraledger.com/reference/api.md#cardanopaymentpayload)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `signed` | [`CardanoPayload`](https://lcp.integraledger.com/reference/api/cardano.md#cardanopayload) | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardanoPaymentPayload`](https://lcp.integraledger.com/reference/api.md#cardanopaymentpayload)\> ## Type Aliases ### CardanoMethod > **CardanoMethod** = `"default"` \| `"masumi"` \| `"script"` x402's Cardano asset transfer methods: `default` is the address method, `masumi` and `script` the two locks. *** ### CardanoNetwork > **CardanoNetwork** = `"cardano:mainnet"` \| `"cardano:preprod"` \| `"cardano:preview"` *** ### CardanoQuery > **CardanoQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`CardanoRef`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoref), `bigint`, `bigint`, `bigint`\> *** ### CardanoStatus > **CardanoStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, `bigint`, `bigint`\> The answer of `cardanoStatus`: positions and the search's position are block heights, and marks are counts of confirmations, the newer blocks above the transaction's; the final mark is the ledger's security parameter. Each transfer of what moved is named by its transaction's id and, as `place`, its output's index among the body's outputs. A `settled` answer states `presented`: `yes` where the act is the body the reference was built from, `no` where it is another. ## Variables ### CARDANO\_MAX\_TX\_BYTES > `const` **CARDANO\_MAX\_TX\_BYTES**: `number` lcp's bound on a presented or read transaction: 64 KiB. The ledger's own `maxTxSize` is 16,384 bytes on mainnet and the public testnets; lcp reads up to four times that, so that a parameter change does not refuse a payment the ledger takes, and refuses beyond it so that a stranger's bytes cost a bounded decode. *** ### CARDANO\_SEARCH\_BOUND > `const` **CARDANO\_SEARCH\_BOUND**: `1000` = `1000` lcp's bound on the work of one `status` call: at most 1,000 transactions of the payer's credential read whole by the search for H, the size of one page of Koios's listing. A search with more to read answers `pending`, `search-incomplete`, with its position, and the next call resumes from it. *** ### exactCardano > `const` **exactCardano**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `coinsPerUtxoByte`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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) \| [`CardanoUnsigned`](https://lcp.integraledger.com/reference/api/cardano.md#cardanounsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/cardano"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardanoRef`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`CardanoStatus`](https://lcp.integraledger.com/reference/api/cardano.md#cardanostatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/cardano`, the address method (`extra.assetTransferMethod` absent or `"default"`). The payee broadcasts (`broadcaster` answers `"payee"`): the settler submits the transaction the payer signed; `status` reads it by the id its body fixes and by the input it spends. *** ### exactCardanoLock > `const` **exactCardanoLock**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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) \| [`CardanoUnsigned`](https://lcp.integraledger.com/reference/api/cardano.md#cardanounsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/cardano/lock"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardanoRef`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`CardanoStatus`](https://lcp.integraledger.com/reference/api/cardano.md#cardanostatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/cardano/lock`, the two lock methods (`extra.assetTransferMethod` `"masumi"` or `"script"`): a deposit into an escrow or a contract the seller defines, which is a charge and never an agreement. Its payee is the seller the option's `extra.terms.sellerAddress` names on a Masumi lock, whose `payTo` is the escrow every seller of the deployment shares, and `payTo` on a script lock. *** ### LCP\_MARKER > `const` **LCP\_MARKER**: `"lcp:sha256:0x"` = `"lcp:sha256:0x"` CIP-20 line 1 of the carrier; line 2 is the hash's 64 lowercase hex digits. ## Functions ### auxiliaryData() > **auxiliaryData**(`h`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The exact auxiliary data the payer attaches: `#6.259({0: {674: {"msg": [LCP_MARKER, <64 hex>]}}})`. A value that is not a 32-byte hash is `x402/payload-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### cardanoFloor() > **cardanoFloor**(`input`): `bigint` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The smallest lovelace an output to `payTo` can hold, the ledger's minimum (x402's Cardano scheme, *Minimum UTXO Value*): `(160 + |serialized output|) × coinsPerUtxoByte`, the output being `{0: address, 1: value}` in the post-Alonzo map form, its value the coin alone for a lovelace option, or the coin with one unit of the option's native token (`.`). The coin's own encoding is part of the output, so the minimum is the least coin whose output it covers. `coinsPerUtxoByte` is the protocol parameter, read live by the caller, since governance can change it. An address that is not a Shelley address in Bech32, an asset not in that form, or a parameter that is not a positive bigint is `cardano/floor-input`. An agreement's amount below it cannot be built. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | \{ `asset`: `string`; `coinsPerUtxoByte`: `bigint`; `payTo`: `string`; \} | | `input.asset` | `string` | | `input.coinsPerUtxoByte` | `bigint` | | `input.payTo` | `string` | #### Returns `bigint` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### cardanoInputs() > **cardanoInputs**(`tx`): readonly `string`[] \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The inputs a transaction's body spends (body key 0), each as `#`, in the body's order: the inputs whose addresses `CardanoReader.inputAddresses` answers. `tx` is the transaction's CBOR bytes as included (`CardanoOnChain.cbor`), `[body, witness set, validity, auxiliary data]`, read with definite and indefinite lengths and at most 64 levels of nesting. Bytes over `CARDANO_MAX_TX_BYTES` are `cardano/tx-too-large`; bytes that are not one such array whose body is a map of unique unsigned keys holding, at key 0, a set of `[32-byte id, index]` inputs, an array or one under tag 258, are `cardano/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `Uint8Array` | #### Returns readonly `string`[] \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### cardanoRecover() > **cardanoRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Reads the hash back from the included transaction alone, by its id, `input.tx`. An input whose `tx` is not a 32-byte hash, or whose option is not an object, is `cardano/wrong-reader`, with nothing read; the option is not read further. Bytes that are not one CBOR array whose first item, the body, has the id as its Blake2b-256 are not the transaction the id names, and are `cardano/unreadable`, as a failed read is, whatever the decoder answers for them; its refusals answer only for bytes whose body has the id. One call. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<[`CardanoNetwork`](https://lcp.integraledger.com/reference/api/cardano.md#cardanonetwork), [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`CardanoReader`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### cardanoStatus() > **cardanoStatus**(`ref`, `reader`, `query`): `Promise`\<[`CardanoStatus`](https://lcp.integraledger.com/reference/api/cardano.md#cardanostatus)\> The read of the act the query asks about, as the profile `read-status` answers it. Positions are block heights and marks counts of confirmations, from 0, the transaction included at the tip, to the ledger's security parameter, the final mark, read from the reader. It reads, in order: the security parameter; the tip, read first; the block at the position the caller gives, where the endpoint answers no such block the answer being `unreadable`, `history-gap` (where the caller gives none, the genesis block shows the history the act would be in); the output the reference's input names, with the payment credential that holds it, the payer's, and the transaction that spent it; the transaction the reference names, by its id; the spending transaction; and the search for H: the transactions of the payer's payment credential from the block after the position given, or after the position an earlier answer returned, to the tip read first, each read whole, at most `CARDANO_SEARCH_BOUND` of them. Each transaction met is classified from what landed: it carries H where its label 674 holds the reference's H; it consumed the input where it is valid and spends it, or is invalid and takes it as collateral; its signer is the option's payee where an input of the payee's payment credential is among its inputs, the payer where one of the payer's is, and another account otherwise; it is of another kind where it deposits into a contract (an output to a script credential with an inline datum) and the reference is the address method, or deposits into none and the reference is a Masumi lock; and it names the payee's account where an output's address has the payee's payment credential, whatever its stake part, an output naming its own payment credential except, on a Masumi lock, a deposit into the reference's escrow, which names the `seller` its datum names and none where the datum does not decode; and no account where no output other than to the payer's credential names one, read from the body whatever its result. What moved is each output to another credential than the payer's, as observed, compared with nothing, and none for a transaction included with `valid_contract` false, which created no output; each is named by the transaction's id and its output's index. A `settled` answer states `presented`, `yes` where the act's id is the reference's and `no` where it is another. The search is never read whole: no run has yet shown that a listing holds every transaction of the credential (the profile `x402-exact-cardano`), so every `failed` but `before-position` answers `pending`, `search-incomplete`. Every page is read to the last; the search is held at the lowest height the endpoint named before a page where that is below the tip, or before the first listed transaction it did not read where the bound or an absent transaction stopped it. A listed transaction that does not decode is named, and the answer holds the search there, no item past the position the search is held at; a search read to the tip gives no position. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`CardanoRef`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoref) | | `reader` | [`CardanoReader`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoreader) | | `query` | [`CardanoQuery`](https://lcp.integraledger.com/reference/api/cardano.md#cardanoquery) | #### Returns `Promise`\<[`CardanoStatus`](https://lcp.integraledger.com/reference/api/cardano.md#cardanostatus)\> *** ### decodeCardanoTx() > **decodeCardanoTx**(`base64`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardanoTx`](https://lcp.integraledger.com/reference/api/cardano.md#cardanotx)\> Decodes a base64 transaction `[body, witness set, bool, auxiliary data / nil]`, keeping each item's bytes as received. The id is the Blake2b-256 of the body's bytes; the auxiliary data must hash to the body's key 7. #### Parameters | Parameter | Type | | ------ | ------ | | `base64` | `string` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CardanoTx`](https://lcp.integraledger.com/reference/api/cardano.md#cardanotx)\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### CardanoPaymentPayload Re-exports [CardanoPaymentPayload](https://lcp.integraledger.com/reference/api.md#cardanopaymentpayload) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/casper > CEP-3009 on Casper and the `x402/exact/casper` pairing: the ATR hash as the authorization's 32-byte `nonce`, written by the buyer's signer, read back from what the payer signed, and read from the executed call's arguments. Source: https://lcp.integraledger.com/reference/api/casper Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. CEP-3009 on Casper and the `x402/exact/casper` pairing: the ATR hash as the authorization's 32-byte `nonce`, written by the buyer's signer, read back from what the payer signed, and read from the executed call's arguments. ## Interfaces ### CasperBlockCall A call among a block's transactions, with the hash of the transaction that made it, 64 hex digits. #### Extends - [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall) #### Properties | Property | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | | `args` | `object` | The call's arguments as the token takes them: `from` is the authorization's `from`, or on `cancel_authorization` the authorizer whose nonce it cancels; `validAfter` and `validBefore` where the reader shows them. | [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall).[`args`](https://lcp.integraledger.com/reference/api/casper.md#property-args-1) | | `args.from?` | `string` | - | - | | `args.nonce?` | `Uint8Array`\<`ArrayBufferLike`\> | - | - | | `args.to?` | `string` | - | - | | `args.validAfter?` | `bigint` | - | - | | `args.validBefore?` | `bigint` | - | - | | `args.value?` | `bigint` | - | - | | `blockHeight` | `bigint` \| `null` | - | [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall).[`blockHeight`](https://lcp.integraledger.com/reference/api/casper.md#property-blockheight-1) | | `entryPoint` | `string` \| `null` | - | [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall).[`entryPoint`](https://lcp.integraledger.com/reference/api/casper.md#property-entrypoint-1) | | `error` | `string` \| `null` | - | [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall).[`error`](https://lcp.integraledger.com/reference/api/casper.md#property-error-1) | | `executed` | `boolean` | - | [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall).[`executed`](https://lcp.integraledger.com/reference/api/casper.md#property-executed-1) | | `packageHash` | `string` \| `null` | - | [`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall).[`packageHash`](https://lcp.integraledger.com/reference/api/casper.md#property-packagehash-1) | | `transaction` | `string` | - | - | *** ### CasperBlockPage One page of a block's executed transactions, in the block's order: `next` starts the next page, null at its end. #### Properties | Property | Type | | ------ | ------ | | `calls` | readonly [`CasperBlockCall`](https://lcp.integraledger.com/reference/api/casper.md#casperblockcall)[] | | `next` | `number` \| `null` | *** ### CasperCall One executed contract call, as the reader reports it. #### Extended by - [`CasperBlockCall`](https://lcp.integraledger.com/reference/api/casper.md#casperblockcall) #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `args` | `object` | The call's arguments as the token takes them: `from` is the authorization's `from`, or on `cancel_authorization` the authorizer whose nonce it cancels; `validAfter` and `validBefore` where the reader shows them. | | `args.from?` | `string` | - | | `args.nonce?` | `Uint8Array`\<`ArrayBufferLike`\> | - | | `args.to?` | `string` | - | | `args.validAfter?` | `bigint` | - | | `args.validBefore?` | `bigint` | - | | `args.value?` | `bigint` | - | | `blockHeight` | `bigint` \| `null` | - | | `entryPoint` | `string` \| `null` | - | | `error` | `string` \| `null` | - | | `executed` | `boolean` | - | | `packageHash` | `string` \| `null` | - | *** ### CasperChoice #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `from` | `string` | | `now` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | *** ### CasperCursor The search's position: a height at which the item was read unset, above which the block that set it lies; or that block, the start of the next page of its transactions to read, and the transaction that set the item where an earlier page held it. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `block?` | `readonly` | `bigint` | | `found?` | `readonly` | `string` | | `next?` | `readonly` | `number` | | `unset?` | `readonly` | `bigint` | *** ### CasperHead The newest block a node has executed, every block being final: its height and its own timestamp in Unix milliseconds. #### Properties | Property | Type | | ------ | ------ | | `height` | `bigint` | | `timestamp` | `bigint` | *** ### CasperReader Bounded, read-only calls against one network's node or its sidecar. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`; any rejection reads as unreadable. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `casper:${string}` `` | #### Methods ##### blockCalls() > **blockCalls**(`height`, `start`): `Promise`\<[`CasperBlockPage`](https://lcp.integraledger.com/reference/api/casper.md#casperblockpage) \| `null`\> The page of the executed transactions of the block at `height` that starts at `start`; null where the node does not serve the block. ###### Parameters | Parameter | Type | | ------ | ------ | | `height` | `bigint` | | `start` | `number` | ###### Returns `Promise`\<[`CasperBlockPage`](https://lcp.integraledger.com/reference/api/casper.md#casperblockpage) \| `null`\> ##### head() > **head**(): `Promise`\<[`CasperHead`](https://lcp.integraledger.com/reference/api/casper.md#casperhead)\> The newest block the node has executed. ###### Returns `Promise`\<[`CasperHead`](https://lcp.integraledger.com/reference/api/casper.md#casperhead)\> ##### lowest() > **lowest**(): `Promise`\<`bigint`\> The lowest block height whose state the node serves, its `available_block_range.low`. ###### Returns `Promise`\<`bigint`\> ##### nonceUsed() > **nonceUsed**(`asset`, `from`, `nonce`, `height`): `Promise`\<`boolean` \| `null`\> The item of `(from, nonce)` in `asset`'s `used_nonces` dictionary, read with `state_get_dictionary_item` at the state root of the block at `height`: true where it is set, false where the node answers in the form it documents for a missing item, and null where the node does not serve that block's state. ###### Parameters | Parameter | Type | | ------ | ------ | | `asset` | `string` | | `from` | `string` | | `nonce` | `Uint8Array` | | `height` | `bigint` | ###### Returns `Promise`\<`boolean` \| `null`\> ##### transaction() > **transaction**(`hash`): `Promise`\<[`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall) \| `null`\> `info_get_transaction`, as a `Version1` transaction and then as a `Deploy`; null when the node knows neither. ###### Parameters | Parameter | Type | | ------ | ------ | | `hash` | `string` | ###### Returns `Promise`\<[`CasperCall`](https://lcp.integraledger.com/reference/api/casper.md#caspercall) \| `null`\> *** ### CasperRef The read keys `reference` returns: the network, the token package, the authorization's `from`, the signed nonce (H on a payment, the agreement's value on an agreement), `settleBy`, which is `validBefore` up to `Number.MAX_SAFE_INTEGER`, the payee, the `payTo` of the option the payment answers, and the authorization as presented, for `presented`. Addresses and hashes are lowercase. #### Properties | Property | Type | | ------ | ------ | | `asset` | `string` | | `from` | `string` | | `network` | `` `casper:${string}` `` | | `nonce` | `` `0x${string}` `` | | `payee` | `string` | | `presented` | [`CasperAuthorization`](https://lcp.integraledger.com/reference/api/casper.md#casperauthorization) | | `settleBy` | `number` | *** ### CasperUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.kind` | `"casper-eip712"` | | `request.typedData` | [`Cep3009TypedData`](https://lcp.integraledger.com/reference/api/casper.md#cep3009typeddata) | #### Methods ##### complete() > **complete**(`publicKey`, `signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CasperPaymentPayload`](https://lcp.integraledger.com/reference/api.md#casperpaymentpayload) Both arguments are hex with a one-byte algorithm tag: `01` ed25519, `02` secp256k1. ###### Parameters | Parameter | Type | | ------ | ------ | | `publicKey` | `string` | | `signature` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CasperPaymentPayload`](https://lcp.integraledger.com/reference/api.md#casperpaymentpayload) *** ### Cep3009TypedData #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `domain` | `object` | - | | `domain.chain_name` | `` `casper:${string}` `` | - | | `domain.contract_package_hash` | `string` | - | | `domain.name` | `string` | - | | `domain.version` | `string` | - | | `message` | `object` | - | | `message.from` | `string` | - | | `message.nonce` | `string` | 64 hex digits, no prefix. | | `message.to` | `string` | - | | `message.validAfter` | `bigint` | - | | `message.validBefore` | `bigint` | - | | `message.value` | `bigint` | - | | `primaryType` | `"TransferWithAuthorization"` | - | | `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)[] | - | ## Type Aliases ### CasperAddress > **CasperAddress** = `string` 66 hex digits, no prefix: tag `00` (account hash) or `01` (package hash), then 32 bytes. *** ### CasperAuthorization > **CasperAuthorization** = `object` #### Properties | Property | Type | | ------ | ------ | | `from` | `string` | | `nonce` | `string` | | `to` | `string` | | `validAfter` | `string` | | `validBefore` | `string` | | `value` | `string` | *** ### CasperNetwork > **CasperNetwork** = `` `casper:${string}` `` CAIP-2: `casper:` and the chainspec name. *** ### CasperRefRead > **CasperRefRead** = [`CasperRef`](https://lcp.integraledger.com/reference/api/casper.md#casperref) & `object` The reference `status` reads with: the read keys, and H, which the caller adds, from which the other act's value comes. #### Type Declaration | Name | Type | | ------ | ------ | | `h` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | *** ### CasperStatus > **CasperStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, `"finalized"`, [`CasperCursor`](https://lcp.integraledger.com/reference/api/casper.md#caspercursor)\> The answer of `casperStatus`: positions are block heights, and the one mark is `finalized`, since the node serves only executed transactions of final blocks; the search's position is a `CasperCursor`; `presented` on `settled` compares the executed call with the authorization as presented. *** ### PackageHash > **PackageHash** = `string` 64 hex digits, no prefix. *** ### X402Advertise > **X402Advertise** = (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) A pairing's `advertise`: the document with the legal context placed, and the agreement URL when one is given. A document, or an option in its `accepts`, that carries a `refused` member is `x402/option-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `doc` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | | `h` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | | `link` | `string` | | `offer` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `agreementUrl?` | `string` | #### Returns [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) ## Variables ### CASPER\_DOMAIN\_TYPEHASH > `const` **CASPER\_DOMAIN\_TYPEHASH**: `"0xe20dd13933eeb9d6099b53d5ffd59cfd50fe774983038681a378371664fad4fb"` keccak256("EIP712Domain(string name,string version,string chain_name,bytes32 contract_package_hash)") *** ### CASPER\_MAX\_NAME\_LENGTH > `const` **CASPER\_MAX\_NAME\_LENGTH**: `64` = `64` The longest token `name` or `version` lcp reads from a Casper option, in characters. CEP-3009 fixes no length; lcp bounds what it hashes into the domain. *** ### CASPER\_MAX\_PAGE\_CALLS > `const` **CASPER\_MAX\_PAGE\_CALLS**: `1024` = `1024` The most calls lcp reads on one page of a block's transactions, the reader's page being its own choice. A page that gives more is beyond the read's bound, `unreadable`, `too-large`. *** ### CASPER\_MAX\_PAGES > `const` **CASPER\_MAX\_PAGES**: `8` = `8` The most pages of a block's transactions one `status` call reads. A block's size is the chain's; a search cut short returns its position, from which the next call resumes. *** ### CASPER\_MAX\_PROBES > `const` **CASPER\_MAX\_PROBES**: `64` = `64` The most reads of the nonce's item one `status` call makes to find the block that set it: a bisection of 64-bit block heights ends within 64. A search cut short returns its position, from which the next call resumes. *** ### CASPER\_MAX\_PUBLIC\_KEY\_HEX > `const` **CASPER\_MAX\_PUBLIC\_KEY\_HEX**: `68` = `68` The longest tagged public key lcp reads, in hex digits: a one-byte tag and a 33-byte secp256k1 key. *** ### CASPER\_MAX\_SIGNATURE\_HEX > `const` **CASPER\_MAX\_SIGNATURE\_HEX**: `132` = `132` The longest tagged signature lcp reads, in hex digits: a one-byte tag and a 65-byte signature. *** ### exactCasper > `const` **exactCasper**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `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`: (`c`, `h`, `act?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CasperUnsigned`](https://lcp.integraledger.com/reference/api/casper.md#casperunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/casper"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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) \| [`CasperRef`](https://lcp.integraledger.com/reference/api/casper.md#casperref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`CasperStatus`](https://lcp.integraledger.com/reference/api/casper.md#casperstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/casper`. The payee broadcasts (`broadcaster` answers `"payee"`): the settler submits the call that executes the payer's signed authorization; `status` reads the nonce's item, the block that set it and its transactions. ## Functions ### casperIdDigest() > **casperIdDigest**(`from`, `to`, `value`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> SHA-256 over the 33 + 33 bytes of the two addresses and the value as a 32-byte big-endian integer. #### Parameters | Parameter | Type | | ------ | ------ | | `from` | `string` | | `to` | `string` | | `value` | `bigint` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### casperRecover() > **casperRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The value a settlement transaction carries in H's place, from the transaction alone (profile rule 23): the `nonce` argument of the executed authorization call on the token package the option names, `option.asset`, which is H on a payment and the agreement's value on an agreement, which a holder of the ATR compares with `agreementValue` of its own H. An input whose `tx` is not 64 hex digits, or whose option names no package hash of 64 hex digits as its `asset`, is `casper/wrong-reader`, with nothing read. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `casper:${string}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`CasperReader`](https://lcp.integraledger.com/reference/api/casper.md#casperreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### casperStatus() > **casperStatus**(`ref`, `reader`, `query`): `Promise`\<[`CasperStatus`](https://lcp.integraledger.com/reference/api/casper.md#casperstatus)\> The read of the act the query asks about, as the profile `read-status` answers it through the profile `x402/exact/casper`'s rules 12 to 22: the nonce's item, the block that set it and its transactions. A query, a reference or a search position that is not one, a reference without the authorization as presented among them, is `unreadable`, `unparseable`, with nothing read, and a reader for another network `chain-mismatch`; a read the node does not serve is `history-gap`. On `settled` the answer states `presented`, the executed call compared with the authorization as presented. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`CasperRefRead`](https://lcp.integraledger.com/reference/api/casper.md#casperrefread) | | `reader` | [`CasperReader`](https://lcp.integraledger.com/reference/api/casper.md#casperreader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`CasperRefRead`](https://lcp.integraledger.com/reference/api/casper.md#casperrefread), `bigint`, `"finalized"`, [`CasperCursor`](https://lcp.integraledger.com/reference/api/casper.md#caspercursor)\> | #### Returns `Promise`\<[`CasperStatus`](https://lcp.integraledger.com/reference/api/casper.md#casperstatus)\> *** ### cep3009TypedData() > **cep3009TypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Cep3009TypedData`](https://lcp.integraledger.com/reference/api/casper.md#cep3009typeddata) The CEP-3009 typed data for `TransferWithAuthorization`, with `validAfter` 0 and the hash as the nonce. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | \{ `asset`: `string`; `from`: `string`; `name`: `string`; `network`: `` `casper:${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `string`; `validBefore`: `bigint`; `value`: `string`; `version`: `string`; \} | | `a.asset` | `string` | | `a.from` | `string` | | `a.name` | `string` | | `a.network` | `` `casper:${string}` `` | | `a.nonce` | `` `0x${string}` `` | | `a.to` | `string` | | `a.validBefore` | `bigint` | | `a.value` | `string` | | `a.version` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Cep3009TypedData`](https://lcp.integraledger.com/reference/api/casper.md#cep3009typeddata) ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### CasperPaymentPayload Re-exports [CasperPaymentPayload](https://lcp.integraledger.com/reference/api.md#casperpaymentpayload) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/ccd > Concordium and the `x402/exact/ccd` pairing: the ATR hash in LCP's string form, as a CBOR text string, in the memo of the one transfer the sender signs; read back from the signed transaction, and read from the finalized transfer event. Source: https://lcp.integraledger.com/reference/api/ccd Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Concordium and the `x402/exact/ccd` pairing: the ATR hash in LCP's string form, as a CBOR text string, in the memo of the one transfer the sender signs; read back from the signed transaction, and read from the finalized transfer event. The signed transaction is read in x402's wire form, the JSON-serialized V1 sponsored transaction: with `@concordium/web-sdk`, `JSON.parse(Transaction.toJSONString(tx))`. Any other value, such as the SDK's object before serialization, whose header holds bigints, is `ccd/transaction-malformed`. ## Interfaces ### CcdChoice #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `now` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | *** ### CcdReader Bounded, read-only calls against one network's node (gRPC v2). Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`: a `ReaderError` reads by its kind (`too-large` as `too-large`, `malformed` as `unparseable`), and any other rejection as `transport`. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `ccd:${string}` `` | #### Methods ##### block() > **block**(`height`): `Promise`\<\{ `slotTime`: `bigint`; \} \| `null`\> `GetBlockInfo` at a finalized height: its `slot_time`, in milliseconds; null where the node does not hold it. ###### Parameters | Parameter | Type | | ------ | ------ | | `height` | `bigint` | ###### Returns `Promise`\<\{ `slotTime`: `bigint`; \} \| `null`\> ##### item() > **item**(`hash`): `Promise`\<[`CcdItem`](https://lcp.integraledger.com/reference/api/ccd.md#ccditem) \| `null`\> `GetBlockItemStatus`; null when the node does not know the item. ###### Parameters | Parameter | Type | | ------ | ------ | | `hash` | `string` | ###### Returns `Promise`\<[`CcdItem`](https://lcp.integraledger.com/reference/api/ccd.md#ccditem) \| `null`\> ##### items() > **items**(`height`): `Promise`\ `GetBlockItems` on a finalized height, every item of the block. ###### Parameters | Parameter | Type | | ------ | ------ | | `height` | `bigint` | ###### Returns `Promise`\ ##### lastFinal() > **lastFinal**(): `Promise`\<`bigint`\> `GetConsensusInfo`'s last finalized block height. ###### Returns `Promise`\<`bigint`\> ##### nextNonce() > **nextNonce**(`account`, `at`): `Promise`\<`bigint` \| `null`\> `GetAccountInfo(account, block).sequence_number`, the account's next sequence number, at a finalized height or at the latest head (`best`); null where the node answers that it has no such account at that block, or no such block, which the read tells apart with `block`. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `at` | `bigint` \| `"best"` | ###### Returns `Promise`\<`bigint` \| `null`\> *** ### CcdRef The read keys `reference` returns: the network, H, the header's sender and its signed sequence number (a decimal string), the signed `expiry` in seconds, the option's `payTo`, and the digest of what the sender signed. The caller may add `transaction`, a hash a settler named, which the read takes as a hint. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `expiry` | `number` | - | | `h` | `` `0x${string}` `` | - | | `network` | `` `ccd:${string}` `` | - | | `nonce` | `string` | - | | `payee` | `string` | The option's `payTo`. | | `sender` | `string` | - | | `signed` | `` `0x${string}` `` | SHA-256 over the members the sender signed (the profile's rule 14). | | `transaction?` | `string` | - | *** ### CcdSearch The search's position: the next of the sender's sequence numbers to locate. #### Properties | Property | Type | | ------ | ------ | | `next` | `bigint` | *** ### CcdTransfer One transfer an item's effects or events list: CCD, its amount in microCCD (concordium-grpc-api `v2/concordium/types.proto` L328, `Amount`), or a PLT by its token id, its amount the `value` of the event's `TokenAmount` and `decimals` that amount's own (`v2/concordium/protocol-level-tokens.proto` L43-50 at 30c79ca0). #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `amount` | `bigint` | - | | `decimals?` | `number` | A PLT's: the `decimals` of its `TokenAmount`. A CCD transfer gives none, microCCD being six. | | `kind` | `"ccd"` \| `"plt"` | - | | `memo` | `Uint8Array`\<`ArrayBufferLike`\> \| `null` | - | | `receiver` | `Uint8Array` | - | | `tokenId?` | `string` | - | *** ### CcdUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.amount` | `string` | | `request.asset` | `string` | | `request.expiresBy` | `number` | | `request.kind` | `"ccd-transfer"` | | `request.memo` | `Uint8Array`\<`ArrayBuffer`\> | | `request.network` | `` `ccd:${string}` `` | | `request.sponsor` | `string` | | `request.toAddress` | `string` | #### Methods ##### complete() > **complete**(`signedTransaction`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CcdPaymentPayload`](https://lcp.integraledger.com/reference/api.md#ccdpaymentpayload) Takes the sender-signed V1 sponsored transaction in x402's wire form: with `@concordium/web-sdk`, `JSON.parse(Transaction.toJSONString(tx))`. A value that is not a JSON object is `ccd/transaction-malformed`. ###### Parameters | Parameter | Type | | ------ | ------ | | `signedTransaction` | `unknown` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CcdPaymentPayload`](https://lcp.integraledger.com/reference/api.md#ccdpaymentpayload) ## Type Aliases ### CcdBlockItem > **CcdBlockItem** = \{ `energy`: `bigint`; `expiry`: `bigint`; `hash`: `string`; `nonce`: `bigint`; `payload`: `Uint8Array`; `sender`: `Uint8Array`; `sponsor`: `Uint8Array` \| `null`; \} \| \{ `hash`: `string`; `undecoded`: `true`; \} One item of gRPC v2 `GetBlockItems` on a finalized block, as the reader gives it: an account transaction's hash, its signed header (the sender's 32 bytes, its sequence number, `expiry` in seconds, the energy and, on a sponsored transaction, the sponsor's 32 bytes) and its payload in the protocol's binary form, `raw_payload`, which lcp decodes; or an item the reader cannot read as one, by its hash. *** ### CcdItem > **CcdItem** = \{ `state`: `"received"`; \} \| \{ `height?`: `bigint`; `nonce?`: `bigint`; `sender`: `Uint8Array` \| `null`; `state`: `"committed"` \| `"finalized"`; `success`: `boolean`; `transfers`: readonly [`CcdTransfer`](https://lcp.integraledger.com/reference/api/ccd.md#ccdtransfer)[]; `unknown?`: `boolean`; \} An answer of gRPC v2 `GetBlockItemStatus` in the reader's form: received; or in a block, `committed` or `finalized`, with its outcome: whether it succeeded, its sender, each transfer its effects or events list in their order, and `unknown`, set where an effect or event kind is one the reader does not know (never read as "no transfer"). For an item in a block the reader may add the height of the block that holds it and its header's sequence number, read with `GetBlockInfo` and `GetBlockItems` on that block; `status` takes an item a hint names only with its height. *** ### CcdMark > **CcdMark** = `"committed"` \| `"finalized"` The marks of a block item in a block, ascending: `committed`, below the one mark, and `finalized`. *** ### CcdNetwork > **CcdNetwork** = `` `ccd:${string}` `` CAIP-2: `ccd:` and the first 32 lowercase hex digits of the genesis block hash. *** ### CcdStatus > **CcdStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`CcdMark`](https://lcp.integraledger.com/reference/api/ccd.md#ccdmark), [`CcdSearch`](https://lcp.integraledger.com/reference/api/ccd.md#ccdsearch)\> The answer of `ccdStatus`. Positions are finalized block heights; the one mark is `finalized`, and an item read above the last finalized block is at `committed`, below it; the search's position is `CcdSearch`. ## Variables ### CCD\_EXPIRY\_MARGIN > `const` **CCD\_EXPIRY\_MARGIN**: `5` = `5` The margin the stock client takes off an expiry, in seconds: it signs `now` plus `maxTimeoutSeconds` less this, so that the stock facilitator, which refuses an expiry past its own clock plus `maxTimeoutSeconds`, takes the payment. *** ### CCD\_MAX\_ADDRESS > `const` **CCD\_MAX\_ADDRESS**: `64` = `64` lcp's own resource bound on an account address's text, in characters: a base58check account address is 50. *** ### CCD\_MAX\_MEMO > `const` **CCD\_MAX\_MEMO**: `256` = `256` The longest memo the chain takes, in bytes: Concordium's `Memo` holds at most 256. *** ### CCD\_MAX\_OPERATIONS > `const` **CCD\_MAX\_OPERATIONS**: `4096` = `4096` lcp's own resource bound on a PLT `tokenUpdate`'s operations, in bytes: one `transfer` operation with a memo at the chain's bound is far below it. *** ### CCD\_MAX\_TRANSACTION > `const` **CCD\_MAX\_TRANSACTION**: `16384` = `16384` lcp's own resource bound on the presented signed transaction's canonical JSON, in bytes: one transfer with a memo at the chain's bound and its signatures is far below it. *** ### CCD\_SEARCH\_NUMBERS > `const` **CCD\_SEARCH\_NUMBERS**: `16` = `16` lcp's own resource bound on one read: the search for H locates at most 16 of the sender's sequence numbers in one call, and an answer that stops there carries the next number to locate, from which the next call resumes. *** ### exactCcd > `const` **exactCcd**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CcdUnsigned`](https://lcp.integraledger.com/reference/api/ccd.md#ccdunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/ccd"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CcdRef`](https://lcp.integraledger.com/reference/api/ccd.md#ccdref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`CcdStatus`](https://lcp.integraledger.com/reference/api/ccd.md#ccdstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/ccd`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator, the sponsor, signs and submits the sponsored transaction the payer signed; `status` reads the finalized transfer. ## Functions ### accountBytes() > **accountBytes**(`address`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The 32 bytes of a base58check account address whose version byte is 1: its last four bytes are the first four of the double SHA-256 of the 33 before them. #### Parameters | Parameter | Type | | ------ | ------ | | `address` | `string` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### ccdMemo() > **ccdMemo**(`h`): `Uint8Array`\<`ArrayBuffer`\> The CBOR text string of `toLcpString(h)`: `78 4d` and the 77 ASCII bytes. Throws TypeError when `h` is not a 32-byte hash. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBuffer`\> *** ### ccdRecover() > **ccdRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The hash from a settlement block item alone, when it is finalized and successful: the memo of its one transfer whose memo `memoCarrier` reads (a PLT memo with tag 24 unwrapped), as `status` counts the transfers whose memo carries `ref.h`. A transfer without a memo, or whose memo `memoCarrier` refuses, is passed over; no such transfer, or more than one, is `ccd/no-carrier`. An input whose `tx` is not 64 hex digits, or whose option is not an object, is `ccd/wrong-reader`, with nothing read; the option is not read further. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `ccd:${string}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`CcdReader`](https://lcp.integraledger.com/reference/api/ccd.md#ccdreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### ccdStatus() > **ccdStatus**(`ref`, `reader`, `query`): `Promise`\<[`CcdStatus`](https://lcp.integraledger.com/reference/api/ccd.md#ccdstatus)\> The read of the act asked about, as the profiles `read-status` and `x402/exact/ccd` answer it: by the sender's signed sequence number, the item that consumed it, and the search for H over the sender's numbers (the profile's rules 8 to 15). A hash the reference names is a hint. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`CcdRef`](https://lcp.integraledger.com/reference/api/ccd.md#ccdref) | | `reader` | [`CcdReader`](https://lcp.integraledger.com/reference/api/ccd.md#ccdreader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`CcdRef`](https://lcp.integraledger.com/reference/api/ccd.md#ccdref), `bigint`, `"finalized"`, [`CcdSearch`](https://lcp.integraledger.com/reference/api/ccd.md#ccdsearch)\> | #### Returns `Promise`\<[`CcdStatus`](https://lcp.integraledger.com/reference/api/ccd.md#ccdstatus)\> *** ### memoCarrier() > **memoCarrier**(`memo`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The hash a memo carries: exactly one CBOR text string, nothing after it, whose bytes are `ccdMemo` of the hash it names (LCP's string form with lowercase hex, under the preferred two-byte head). `bound`, `status` and `recover` all read a memo through this one function. #### Parameters | Parameter | Type | | ------ | ------ | | `memo` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### pltMemo() > **pltMemo**(`h`): `Uint8Array`\<`ArrayBuffer`\> CBOR tag 24 around a byte string holding `ccdMemo(h)`: `d8 18 58 4f` and the 79 bytes. Throws as `ccdMemo` does. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBuffer`\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### CcdPaymentPayload Re-exports [CcdPaymentPayload](https://lcp.integraledger.com/reference/api.md#ccdpaymentpayload) *** ### 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) --- # @integraledger/lcp/core > The core alone: assembling an ATR and hashing its exact bytes, comparing hashes, the hash's forms, the https-link rule, the JSON and base64 forms they read and write, `isRefusal` and `readToRepeat`, with no pairing, rail or optional peer. Source: https://lcp.integraledger.com/reference/api/core Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The core alone: assembling an ATR and hashing its exact bytes, comparing hashes, the hash's forms, the https-link rule, the JSON and base64 forms they read and write, `isRefusal` and `readToRepeat`, with no pairing, rail or optional peer. Besides those, it holds the agreement's own value of a hash; the hash's string and structured forms; the URL Standard's host and domain parsers the https-link rule reads a link with; the RFC 8785 form of a JSON value and its digest; JSON reading capped at 64 levels; and padded standard base64 and unpadded base64url, each read in its canonical form only (with or without a bound on its size) and written. It imports no pairing, no rail and no optional peer, so a bundle of it holds these functions and nothing else. The package root exports the same functions: each is one function, reached by either path. ## References ### agreementValue Re-exports [agreementValue](https://lcp.integraledger.com/reference/api.md#agreementvalue) *** ### assemble Re-exports [assemble](https://lcp.integraledger.com/reference/api.md#assemble) *** ### AtrHash Re-exports [AtrHash](https://lcp.integraledger.com/reference/api.md#atrhash) *** ### base64Bytes Re-exports [base64Bytes](https://lcp.integraledger.com/reference/api.md#base64bytes) *** ### base64UrlBytes Re-exports [base64UrlBytes](https://lcp.integraledger.com/reference/api.md#base64urlbytes) *** ### canonicalJson Re-exports [canonicalJson](https://lcp.integraledger.com/reference/api.md#canonicaljson) *** ### CoreRefusal Re-exports [CoreRefusal](https://lcp.integraledger.com/reference/api.md#corerefusal) *** ### digestJson Re-exports [digestJson](https://lcp.integraledger.com/reference/api.md#digestjson) *** ### domainToAscii Re-exports [domainToAscii](https://lcp.integraledger.com/reference/api.md#domaintoascii) *** ### fromBase64 Re-exports [fromBase64](https://lcp.integraledger.com/reference/api.md#frombase64) *** ### fromBase64Url Re-exports [fromBase64Url](https://lcp.integraledger.com/reference/api.md#frombase64url) *** ### fromLcpString Re-exports [fromLcpString](https://lcp.integraledger.com/reference/api.md#fromlcpstring) *** ### fromLegalContext Re-exports [fromLegalContext](https://lcp.integraledger.com/reference/api.md#fromlegalcontext) *** ### fromRawBytes Re-exports [fromRawBytes](https://lcp.integraledger.com/reference/api.md#fromrawbytes) *** ### hash Re-exports [hash](https://lcp.integraledger.com/reference/api.md#hash) *** ### hashEquals Re-exports [hashEquals](https://lcp.integraledger.com/reference/api.md#hashequals) *** ### isHttpsLink Re-exports [isHttpsLink](https://lcp.integraledger.com/reference/api.md#ishttpslink) *** ### isOtherSchemeLink Re-exports [isOtherSchemeLink](https://lcp.integraledger.com/reference/api.md#isotherschemelink) *** ### isRefusal Re-exports [isRefusal](https://lcp.integraledger.com/reference/api.md#isrefusal) *** ### Json Re-exports [Json](https://lcp.integraledger.com/reference/api.md#json) *** ### newAtrId Re-exports [newAtrId](https://lcp.integraledger.com/reference/api.md#newatrid) *** ### parseHost Re-exports [parseHost](https://lcp.integraledger.com/reference/api.md#parsehost) *** ### parseJson Re-exports [parseJson](https://lcp.integraledger.com/reference/api.md#parsejson) *** ### readToRepeat Re-exports [readToRepeat](https://lcp.integraledger.com/reference/api.md#readtorepeat) *** ### readUrl Re-exports [readUrl](https://lcp.integraledger.com/reference/api.md#readurl) *** ### Refusal Re-exports [Refusal](https://lcp.integraledger.com/reference/api.md#refusal) *** ### toBase64 Re-exports [toBase64](https://lcp.integraledger.com/reference/api.md#tobase64) *** ### toBase64Url Re-exports [toBase64Url](https://lcp.integraledger.com/reference/api.md#tobase64url) *** ### toLcpString Re-exports [toLcpString](https://lcp.integraledger.com/reference/api.md#tolcpstring) *** ### toLegalContext Re-exports [toLegalContext](https://lcp.integraledger.com/reference/api.md#tolegalcontext) *** ### toRawBytes Re-exports [toRawBytes](https://lcp.integraledger.com/reference/api.md#torawbytes) *** ### UrlAuthority Re-exports [UrlAuthority](https://lcp.integraledger.com/reference/api.md#urlauthority) --- # @integraledger/lcp/discovery > The discovery document of LCP §2, served at `/.well-known/legal-context.json`: `parse` reads one, and `emit` writes one. Source: https://lcp.integraledger.com/reference/api/discovery Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The discovery document of LCP §2, served at `/.well-known/legal-context.json`: `parse` reads one, and `emit` writes one. `emit` writes the members in the order of LCP §2.4–§2.5's tables, absent members omitted, no whitespace, UTF-8. Both check the members LCP §2.4–§2.5 define, with these bounds: each string member non-empty, `terms` an https URL, at most 65,536 bytes, and JSON nested at most 64 levels. Neither throws or does I/O. ## Interfaces ### LegalContextDocument LCP §2.4–§2.5; members in the order of their tables. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `acceptanceRequired?` | `boolean` | - | | `api?` | `string` | - | | `atrHash?` | `` `0x${string}` `` | The digest of the document at `terms` (LCP §2.5). | | `contact?` | `object` | - | | `contact.legal?` | `string` | - | | `contact.technical?` | `string` | - | | `disputeResolution?` | `object` | - | | `disputeResolution.catalog?` | `string` | - | | `disputeResolution.clauseId?` | `string` | - | | `disputeResolution.contact?` | `string` | - | | `disputeResolution.jurisdiction?` | `string` | - | | `disputeResolution.method?` | `string` | - | | `disputeResolution.source?` | `string` | - | | `returns?` | `string` | - | | `terms` | `string` | Absolute https URL of the terms document. | | `termsFormat?` | `string` | - | ## Variables ### MAX\_DOCUMENT\_BYTES > `const` **MAX\_DOCUMENT\_BYTES**: `65536` = `65_536` The largest discovery document `parse` reads and `emit` writes, in bytes. *** ### WELL\_KNOWN\_PATH > `const` **WELL\_KNOWN\_PATH**: `"/.well-known/legal-context.json"` = `"/.well-known/legal-context.json"` The path at which the discovery document is served (LCP §2). ## Functions ### emit() > **emit**(`document`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The document's bytes: its checked members in table order, `atrHash` in lowercase, and no other member. #### Parameters | Parameter | Type | | ------ | ------ | | `document` | [`LegalContextDocument`](https://lcp.integraledger.com/reference/api/discovery.md#legalcontextdocument) | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### parse() > **parse**(`bytes`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `document`: [`LegalContextDocument`](https://lcp.integraledger.com/reference/api/discovery.md#legalcontextdocument); `ignored`: `string`[]; \} One UTF-8 JSON object of at most `MAX_DOCUMENT_BYTES`, nested at most 64 levels, with the members LCP §2.4–§2.5 define checked: each string member non-empty and `terms` an https URL. Unknown members, at the top level or inside `disputeResolution` and `contact`, are left out of `document` and named in `ignored` by dotted path. #### Parameters | Parameter | Type | | ------ | ------ | | `bytes` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `document`: [`LegalContextDocument`](https://lcp.integraledger.com/reference/api/discovery.md#legalcontextdocument); `ignored`: `string`[]; \} --- # @integraledger/lcp/evm > eip155 rail pieces: EIP-3009 and Permit2 typed data, the settlement read from a token's events, the read of a signed pull authorization's use, ERC-7710 permission contexts, the commerce-payments escrow's pieces, and x402's Permit2 proxy addresses. Source: https://lcp.integraledger.com/reference/api/evm Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. eip155 rail pieces: EIP-3009 and Permit2 typed data, the settlement read from a token's events, the read of a signed pull authorization's use, ERC-7710 permission contexts, the commerce-payments escrow's pieces, and x402's Permit2 proxy addresses. The settlement read is from the token's `AuthorizationUsed` event and the transfer it produced, and a pull authorization's use is read before any transaction is named. It also holds the identity digest of a transfer; the ERC-7710 permission-context decoder and MetaMask's DelegationManager address; and the commerce-payments escrow's payment hash and the salt commitment to a receiver authorizer and policy. ## Classes ### ReaderError Why a reader's call gave no answer: it timed out, its answer exceeded the reader's bound or the endpoint refused the range asked, it did not complete, its answer was malformed, or the endpoint does not hold the history or state asked for (`history`), which a read answers `unreadable`, `history-gap`. #### Extends - `Error` #### Constructors ##### Constructor > **new ReaderError**(`kind`, `message?`): [`ReaderError`](https://lcp.integraledger.com/reference/api/evm.md#readererror) ###### Parameters | Parameter | Type | | ------ | ------ | | `kind` | `"history"` \| `"transport"` \| `"timeout"` \| `"too-large"` \| `"malformed"` | | `message?` | `string` | ###### Returns [`ReaderError`](https://lcp.integraledger.com/reference/api/evm.md#readererror) ###### Overrides `Error.constructor` #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `cause?` | `public` | `unknown` | - | `Error.cause` | | `kind` | `readonly` | `"history"` \| `"transport"` \| `"timeout"` \| `"too-large"` \| `"malformed"` | - | - | | `message` | `public` | `string` | - | `Error.message` | | `name` | `public` | `string` | - | `Error.name` | | `stack?` | `public` | `string` | - | `Error.stack` | | `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | #### Methods ##### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ###### Parameters | Parameter | Type | | ------ | ------ | | `targetObject` | `object` | | `constructorOpt?` | `Function` | ###### Returns `void` ###### Inherited from `Error.captureStackTrace` ##### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` ###### Parameters | Parameter | Type | | ------ | ------ | | `err` | `Error` | | `stackTraces` | `CallSite`[] | ###### Returns `any` ###### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces ###### Inherited from `Error.prepareStackTrace` ## Interfaces ### AuthCaptureRef The reference the `auth-capture` reads take. #### Extends - [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `asset` | `readonly` | `` `0x${string}` `` | - | - | | `escrow` | `readonly` | `` `0x${string}` `` | The escrow deployment and the event of the option's flow. | - | | `event` | `readonly` | `` `0x${string}` `` | - | - | | `expiry` | `readonly` | `string` | `preApprovalExpiry`, in decimal. | - | | `h` | `readonly` | `` `0x${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`h`](https://lcp.integraledger.com/reference/api/evm.md#property-h-5) | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-9) | | `payee` | `readonly` | `string` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-8) | | `payer` | `readonly` | `` `0x${string}` `` | The escrow's `PaymentInfo.payer`, the token authorization's signer. | - | | `paymentId` | `readonly` | `` `0x${string}` `` | The escrow's payment hash of the presented `PaymentInfo`, and that hash with payer zero, the signed nonce. | - | | `salt` | `readonly` | `` `0x${string}` `` | `PaymentInfo.salt`: H, or the commitment to the receiver authorizer, the policy and H. | - | | `scheme` | `readonly` | `"permit2"` \| `"eip3009"` | - | - | | `signatureNonce` | `readonly` | `` `0x${string}` `` | - | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-7) | *** ### BatchEvmRef The reference the read of `x402/batch-settlement/eip155` takes: the channel the opening deposits into, by its id and its config whole (the payer, who signs the deposit authorization; the payer authorizer; the receiver; the receiver authorizer; the token; the withdrawal delay; the salt), which the id commits to, and the deposit authorization's nonce, its bound and the amount it moves. #### Extends - [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `amount` | `readonly` | `string` | - | - | | `asset` | `readonly` | `` `0x${string}` `` | The channel's token. | - | | `channel` | `readonly` | `` `0x${string}` `` | The channel id, and the config's other members. | - | | `h` | `readonly` | `` `0x${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`h`](https://lcp.integraledger.com/reference/api/evm.md#property-h-5) | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-9) | | `nonce` | `readonly` | `` `0x${string}` `` | The deposit authorization's nonce, a 32-byte word: keccak256(abi.encode(channelId, authSalt)) on ERC-3009, the permit's nonce on Permit2. | - | | `payee` | `readonly` | `string` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-8) | | `payer` | `readonly` | `` `0x${string}` `` | The channel's payer, the deposit authorization's signer. | - | | `payerAuthorizer` | `readonly` | `` `0x${string}` `` | - | - | | `receiver` | `readonly` | `` `0x${string}` `` | - | - | | `receiverAuthorizer` | `readonly` | `` `0x${string}` `` | - | - | | `refundAuthorizer?` | `readonly` | `` `0x${string}` `` | In the scheme's refund-authorizer mode, the option's refund authorizer, whose 20 bytes end the channel salt: H is then the deposit authorization's salt, or the permit's nonce, and not the channel salt. | - | | `salt` | `readonly` | `` `0x${string}` `` | - | - | | `scheme` | `readonly` | `"permit2"` \| `"eip3009"` | - | - | | `settleBy` | `readonly` | `string` | The deposit authorization's `validBefore` or `deadline`, and the deposit's amount, in decimal. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-7) | | `withdrawDelay` | `readonly` | `number` | - | - | *** ### Delegation #### Properties | Property | Type | | ------ | ------ | | `authority` | `` `0x${string}` `` | | `caveats` | `object`[] | | `delegate` | `` `0x${string}` `` | | `delegator` | `` `0x${string}` `` | | `salt` | `` `0x${string}` `` | | `signature` | `` `0x${string}` `` | *** ### Eip3009Ref The reference the `exact` EIP-3009 read takes. #### Extends - [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `asset` | `readonly` | `` `0x${string}` `` | The token under whose domain the authorization is signed, the option's `asset`. | - | | `h` | `readonly` | `` `0x${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`h`](https://lcp.integraledger.com/reference/api/evm.md#property-h-5) | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-9) | | `payee` | `readonly` | `string` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-8) | | `payer` | `readonly` | `` `0x${string}` `` | The authorization's `from`, the signer of H. | - | | `presented` | `readonly` | [`Signed`](https://lcp.integraledger.com/reference/api/evm.md#signed) | The members of the payment presented: the token, `from`, `to`, `value` and `nonce`, lowercase, value in decimal. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-7) | | `validBefore` | `readonly` | `string` | The authorization's `validBefore`, in decimal: the lapse's deadline, no member compared. | - | *** ### Eip3009TypedData #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `number` | | `domain.name` | `string` | | `domain.verifyingContract` | `` `0x${string}` `` | | `domain.version` | `string` | | `message` | `object` | | `message.from` | `` `0x${string}` `` | | `message.nonce` | `` `0x${string}` `` | | `message.to` | `` `0x${string}` `` | | `message.validAfter` | `bigint` | | `message.validBefore` | `bigint` | | `message.value` | `bigint` | | `primaryType` | `"TransferWithAuthorization"` | | `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)[] | *** ### Erc7710Ref The reference the ERC-7710 reads take. #### Extends - [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `asset` | `readonly` | `` `0x${string}` `` | - | - | | `h` | `readonly` | `` `0x${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`h`](https://lcp.integraledger.com/reference/api/evm.md#property-h-5) | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-9) | | `payee` | `readonly` | `string` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-8) | | `payer` | `readonly` | `` `0x${string}` `` | The payment's `delegator`: at the salt level the root delegator, whose account the transfer comes from. | - | | `presented?` | `readonly` | `Readonly`\<`Record`\<`string`, `string`\>\> | The payment presented: `delegation`, the EIP-712 hash of the leaf delegation its permission context encodes (`delegationHash`), which covers the leaf's caveats and, through its `authority`, every delegation above it, and which `status` compares with the leaf a `RedeemedDelegation` log carries. Absent where the context does not decode as the reference manager's: the read then shows no member, and `presented` is `unshown`. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-7) | *** ### EvmLog One receipt log: the emitter, its topics and its data. #### Extended by - [`EvmLogEntry`](https://lcp.integraledger.com/reference/api/mpp.md#evmlogentry) #### Properties | Property | Type | | ------ | ------ | | `address` | `` `0x${string}` `` | | `data` | `` `0x${string}` `` | | `topics` | readonly `` `0x${string}` ``[] | *** ### EvmReader Bounded, read-only calls against one network's endpoint. Every failure rejects, for example with `ReaderError`; a rejected `receipt`, `transaction` or `call` reads as unreadable. A rejected `blockNumber` counts as a mark not reached where a read places a receipt it has read against the marks; where a read takes the marks before anything else, as the x402 reads on eip155 do with a reader that has no `block`, a rejected `finalized` mark is unreadable and a rejected `safe` mark reads as the final one. #### Extended by - [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader) #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `eip155:${string}` `` \| [`HederaNetwork`](https://lcp.integraledger.com/reference/api/evm.md#hederanetwork) | #### Methods ##### block()? > `optional` **block**(`at`): `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; \}\> `eth_getBlockByNumber(at, false)`: its number and timestamp. Rejects with a `ReaderError` of kind `history` where the endpoint does not hold that block. Absent where the reader reads no block; a read that needs a block's time then reads no lapse. ###### Parameters | Parameter | Type | | ------ | ------ | | `at` | `bigint` \| `"safe"` \| `"finalized"` \| `"latest"` | ###### Returns `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; \}\> ##### blockNumber() > **blockNumber**(`tag`): `Promise`\<`bigint`\> `eth_getBlockByNumber(tag, false).number`. ###### Parameters | Parameter | Type | | ------ | ------ | | `tag` | `"safe"` \| `"finalized"` | ###### Returns `Promise`\<`bigint`\> ##### call() > **call**(`to`, `data`, `block`): `Promise`\<`` `0x${string}` ``\> `eth_call` of `data` to the contract `to`, in the state after block `block`: the return data. ###### Parameters | Parameter | Type | | ------ | ------ | | `to` | `` `0x${string}` `` | | `data` | `` `0x${string}` `` | | `block` | `bigint` | ###### Returns `Promise`\<`` `0x${string}` ``\> ##### logs()? > `optional` **logs**(`filter`): `Promise`\ `eth_getLogs` over `fromBlock` to `toBlock`: `address` absent, every contract's; a topic `null`, any value there. Rejects with a `ReaderError` of kind `too-large` for a range the endpoint refuses, and of kind `history` where the endpoint does not hold the history of the range. Absent where the reader makes no log query: a read that needs a search then holds its search open and answers no `failed` that rests on one. ###### Parameters | Parameter | Type | | ------ | ------ | | `filter` | \{ `address?`: `` `0x${string}` ``; `fromBlock`: `bigint`; `toBlock`: `bigint`; `topics`: readonly (`` `0x${string}` `` \| `null`)[]; \} | | `filter.address?` | `` `0x${string}` `` | | `filter.fromBlock` | `bigint` | | `filter.toBlock` | `bigint` | | `filter.topics` | readonly (`` `0x${string}` `` \| `null`)[] | ###### Returns `Promise`\ ##### receipt() > **receipt**(`tx`): `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> `eth_getTransactionReceipt`; null when the node holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> ##### transaction() > **transaction**(`tx`): `Promise`\<[`EvmTransaction`](https://lcp.integraledger.com/reference/api/evm.md#evmtransaction) \| `null`\> `eth_getTransactionByHash`: the sender, the recipient (null for a contract creation) and the calldata; null when none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmTransaction`](https://lcp.integraledger.com/reference/api/evm.md#evmtransaction) \| `null`\> *** ### EvmReadRefBase The reference every read over `statusOf` takes: the network, the option's payee, and a named transaction as a hint. #### Extended by - [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase) - [`SpendPermissionRef`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionref) #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `network` | `readonly` | `` `eip155:${string}` `` | - | | `payee` | `readonly` | `string` | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | *** ### EvmReceipt #### Properties | Property | Type | | ------ | ------ | | `blockNumber` | `bigint` | | `logs` | readonly [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog)[] | | `status` | `0` \| `1` | *** ### EvmRef The read keys for a later settlement read of an EVM payment, and nothing else. #### Extended by - [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref) #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `authorization?` | [`PullAuthorization`](https://lcp.integraledger.com/reference/api/evm.md#pullauthorization) | The signed pull authorization and where the chain records its use, where the pairing's reference records one. | | `bindingLog?` | \{ address: \`0x$\{string\}\`; topic0: \`0x$\{string\}\`; value: \`0x$\{string\}\`; \} & (\{ index: 2 \| 1 \| 3; \} \| \{ dataWord: number; \}) | The log carrying H or its commitment: in topic `index`, or in 32-byte data word `dataWord`. | | `network` | `` `eip155:${string}` `` \| [`HederaNetwork`](https://lcp.integraledger.com/reference/api/evm.md#hederanetwork) | - | | `payee` | `string` | The option's payee, which `reference` takes from the option the payment answers. | | `search?` | `object` | The log filter that finds the transaction when none is named; absent, only a named transaction is read. | | `search.address` | `` `0x${string}` `` | - | | `search.topics` | readonly (`` `0x${string}` `` \| `null`)[] | - | | `settleBy?` | `string` | Decimal Unix seconds after which the payment can no longer execute. | | `transferLog?` | [`TransferLog`](https://lcp.integraledger.com/reference/api/evm.md#transferlog) | The token transfer this payment made, identified by the digest of the named fields. | *** ### EvmTransaction A transaction as `eth_getTransactionByHash` gives it: `from`, the address that signed it; `to`; and `input`. #### Properties | Property | Type | | ------ | ------ | | `from` | `` `0x${string}` `` | | `input` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` \| `null` | *** ### EvmTxRef The reference an EIP-3009 `status` reads: the network, the token, the transaction and the option's payee. #### Properties | Property | Type | | ------ | ------ | | `asset` | `` `0x${string}` `` | | `network` | `` `eip155:${string}` `` | | `payee` | `string` | | `transaction` | `` `0x${string}` `` | *** ### Field #### Properties | Property | Type | | ------ | ------ | | `name` | `string` | | `type` | `string` | *** ### PaymentInfo #### Properties | Property | Type | | ------ | ------ | | `authorizationExpiry` | `bigint` | | `feeReceiver` | `` `0x${string}` `` | | `maxAmount` | `bigint` | | `maxFeeBps` | `number` | | `minFeeBps` | `number` | | `operator` | `` `0x${string}` `` | | `payer` | `` `0x${string}` `` | | `preApprovalExpiry` | `bigint` | | `receiver` | `` `0x${string}` `` | | `refundExpiry` | `bigint` | | `salt` | `` `0x${string}` `` | | `token` | `` `0x${string}` `` | *** ### Permit2Ref The reference the Permit2 reads take. #### Extends - [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `asset` | `readonly` | `` `0x${string}` `` | - | - | | `deadline` | `readonly` | `string` | The permit's `deadline`, in decimal. | - | | `h` | `readonly` | `` `0x${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`h`](https://lcp.integraledger.com/reference/api/evm.md#property-h-5) | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-9) | | `payee` | `readonly` | `string` | - | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-8) | | `payer` | `readonly` | `` `0x${string}` `` | The permit's owner, the signer of H. | - | | `presented` | `readonly` | [`Signed`](https://lcp.integraledger.com/reference/api/evm.md#signed) | The members of the payment presented: the permit's `token`, `amount`, `nonce` and `deadline`, its `spender`, the `owner`, and the witness's `to` and `validAfter`, with `facilitator` on `upto`. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | [`X402EvmRefBase`](https://lcp.integraledger.com/reference/api/evm.md#x402evmrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-7) | *** ### Permit2TypedData #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `number` | | `domain.name` | `"Permit2"` | | `domain.verifyingContract` | `` `0x${string}` `` | | `message` | `object` | | `message.deadline` | `bigint` | | `message.nonce` | `bigint` | | `message.permitted` | \{ `amount`: `bigint`; `token`: `` `0x${string}` ``; \} \| `object`[] | | `message.spender` | `` `0x${string}` `` | | `message.witness?` | `object` | | `primaryType` | `"PermitTransferFrom"` \| `"PermitWitnessTransferFrom"` \| `"PermitBatchWitnessTransferFrom"` | | `types` | `object` | | `types.EIP712Domain` | [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] | | `types.TokenPermissions` | [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] | *** ### PullAuthorization The signed pull authorization of a payment that has not landed, as the chain records its use: what a settlement reader needs to decide, with `authorizationUsed` and the payment's authorizer, whether it executed or can still execute. - `eip3009`: the token `at` answers `authorizationState(authorizer, nonce)`, true once the authorization is used. It executes only in a block whose timestamp is below `deadline` (EIP-3009's `validBefore`). - `permit2`: the Permit2 deployment `at` answers `nonceBitmap(authorizer, nonce >> 8)`, whose bit `nonce & 0xff` is set once the nonce is used. The permit executes only in a block whose timestamp is at most `deadline`. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `asset` | `` `0x${string}` `` | The token the authorization moves. | | `at` | `` `0x${string}` `` | The contract that records the nonce's use: the token for `eip3009`, the Permit2 deployment for `permit2`. | | `deadline` | `string` | The signed time bound, in decimal Unix seconds. | | `nonce` | `` `0x${string}` `` | The nonce the payer signed, as that contract records it: `0x` and 64 lowercase hex digits. | | `scheme` | `"permit2"` \| `"eip3009"` | - | *** ### TransferLog A token transfer, identified by the core's `hash` over the fields `identity` names (see `transferDigest`). #### Properties | Property | Type | | ------ | ------ | | `address` | `` `0x${string}` `` | | `digest` | `` `0x${string}` `` | | `identity` | [`TransferIdentity`](https://lcp.integraledger.com/reference/api/evm.md#transferidentity) | | `topic0` | `` `0x${string}` `` | *** ### X402EvmRefBase The reference every x402 eip155 read takes: `EvmReadRefBase` and H. #### Extends - [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase) #### Extended by - [`AuthCaptureRef`](https://lcp.integraledger.com/reference/api/evm.md#authcaptureref) - [`BatchEvmRef`](https://lcp.integraledger.com/reference/api/evm.md#batchevmref) - [`Eip3009Ref`](https://lcp.integraledger.com/reference/api/evm.md#eip3009ref) - [`Erc7710Ref`](https://lcp.integraledger.com/reference/api/evm.md#erc7710ref) - [`Permit2Ref`](https://lcp.integraledger.com/reference/api/evm.md#permit2ref) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `h` | `readonly` | `` `0x${string}` `` | - | - | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-5) | | `payee` | `readonly` | `string` | - | [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-4) | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-4) | ## Type Aliases ### Eip155 > **Eip155** = `` `eip155:${string}` `` CAIP-2 for EVM chains; the reference is the decimal chain id. *** ### EvmBreadthStatus > **EvmBreadthStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\> What the EVM breadth pairings' `status` answers, in the same terms as `EvmStatus`. *** ### EvmLogEntry > **EvmLogEntry** = [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog) & `object` A log as `eth_getLogs` gives it: the log, the transaction that emitted it, its block and its index in the block. #### Type Declaration | Name | Type | | ------ | ------ | | `blockNumber` | `bigint` | | `logIndex` | `number` | | `transactionHash` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | *** ### EvmStatus > **EvmStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\> What an EVM `status` answers: its positions are block numbers, its marks `EvmMark`. *** ### HederaNetwork > **HederaNetwork** = `"hedera:mainnet"` \| `"hedera:testnet"` \| `"hedera:previewnet"` \| `"hedera:devnet"` Hedera's CAIP-2 networks, read through their JSON-RPC relay with the same reader shape. *** ### Hex > **Hex** = `` `0x${string}` `` *** ### Signed > **Signed** = `Readonly`\<`Record`\<`string`, `string`\>\> The members of what the payer signed, as read from a landed act or as presented, each a lowercase string. *** ### TransferIdentity > **TransferIdentity** = `"from,to,value"` \| `"from,to"` \| `"from"` \| `"to,value"` \| `"to"` ## Variables ### AUTHORIZATION\_CANCELED\_TOPIC > `const` **AUTHORIZATION\_CANCELED\_TOPIC**: `` `0x${string}` `` keccak256("AuthorizationCanceled(address,bytes32)") *** ### AUTHORIZATION\_STATE\_SELECTOR > `const` **AUTHORIZATION\_STATE\_SELECTOR**: `"0xe94a0102"` keccak256("authorizationState(address,bytes32)")[0..4] *** ### AUTHORIZATION\_USED\_TOPIC > `const` **AUTHORIZATION\_USED\_TOPIC**: `"0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5"` keccak256("AuthorizationUsed(address,bytes32)") *** ### DELEGATION\_MANAGER > `const` **DELEGATION\_MANAGER**: `"0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3"` MetaMask's reference DelegationManager, v1.3.0, at one CREATE2 address. *** ### DELEGATION\_MANAGER\_CHAINS > `const` **DELEGATION\_MANAGER\_CHAINS**: readonly `number`[] The chain ids on which an `erc7710` payment through `DELEGATION_MANAGER` is read at the salt level, `x402/exact/eip155/erc7710-salt`; on any other chain that pairing refuses it with `x402/manager-not-reference`. *** ### eip3009Status > `const` **eip3009Status**: (`ref`, `reader`, `query`) => `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> `status` of `x402/exact/eip155/eip3009`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`Eip3009Ref`](https://lcp.integraledger.com/reference/api/evm.md#eip3009ref) | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | | `query` | [`EvmQuery`](https://lcp.integraledger.com/reference/api/ap2.md#evmquery)\<`unknown`\> | #### Returns `Promise`\<[`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\> *** ### ESCROW > `const` **ESCROW**: \{ readonly \[d in "v1.1" \| "v1.0"\]: \{ chargedTopic: Hex; eip3009Collector: Hex; escrow: Hex; permit2Collector: Hex \} \} The commerce-payments escrow's two deployments: the escrow, its two token collectors, and `PaymentCharged`'s topic. *** ### EXACT\_PERMIT2\_PROXY > `const` **EXACT\_PERMIT2\_PROXY**: `"0x402085c248EeA27D92E8b30b2C58ed07f9E20001"` *** ### MAX\_SEARCH\_PAGES > `const` **MAX\_SEARCH\_PAGES**: `8` = `8` lcp's own bound on the pages one `status` call reads, so that one call makes a bounded number of reader calls; a search with range left answers its position, from which the next call resumes. *** ### NONCE\_BITMAP\_SELECTOR > `const` **NONCE\_BITMAP\_SELECTOR**: `"0x4fe02b44"` keccak256("nonceBitmap(address,uint256)")[0..4] *** ### PAYMENT\_AUTHORIZED\_TOPIC > `const` **PAYMENT\_AUTHORIZED\_TOPIC**: `"0x1c81fb2e3bab27f6bb09bee9a0dddf61600b7cbaf2c12683e4864e0cbdb9d284"` *** ### PAYMENT\_INFO\_TYPEHASH > `const` **PAYMENT\_INFO\_TYPEHASH**: `"0xae68ac7ce30c86ece8196b61a7c486d8f0061f575037fbd34e7fe4e2820c6591"` *** ### PERMIT2 > `const` **PERMIT2**: `"0x000000000022D473030F116dDEE9F6B43aC78BA3"` *** ### REDEEMED\_DELEGATION\_TOPIC > `const` **REDEEMED\_DELEGATION\_TOPIC**: `"0x40dadaa36c6c2e3d7317e24757451ffb2d603d875f0ad5e92c5dd156573b1873"` *** ### SALT\_BINDING\_TYPEHASH > `const` **SALT\_BINDING\_TYPEHASH**: `"0x8a2a7e41a0bda000ded071ff38b79401d2603e1826516ff2635b11fe9e30877f"` *** ### SEARCH\_PAGE\_BLOCKS > `const` **SEARCH\_PAGE\_BLOCKS**: `10000` = `10_000` The blocks one page of a search reads: a public endpoint refuses a wider range (Arc's refused a range above 10,000 blocks on 2026-11-16), and a page an endpoint refuses is halved. *** ### TRANSFER\_TOPIC > `const` **TRANSFER\_TOPIC**: `"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"` keccak256("Transfer(address,address,uint256)") *** ### TRANSFER\_WITH\_AUTHORIZATION\_TYPEHASH > `const` **TRANSFER\_WITH\_AUTHORIZATION\_TYPEHASH**: `"0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267"` keccak256("TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)") *** ### UNORDERED\_NONCE\_INVALIDATION\_TOPIC > `const` **UNORDERED\_NONCE\_INVALIDATION\_TOPIC**: `` `0x${string}` `` keccak256("UnorderedNonceInvalidation(address,uint256,uint256)"), Permit2's cancellation of a word of nonces. *** ### UPTO\_PERMIT2\_PROXY > `const` **UPTO\_PERMIT2\_PROXY**: `"0x4020A4f3b7b90ccA423B9fabCc0CE57C6C240002"` ## Functions ### authorizationIdDigest() > **authorizationIdDigest**(`from`, `to`, `value`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> SHA-256 over the 72 bytes of `abi.encodePacked(address from, address to, uint256 value)`: the identity of one transfer, which a `Transfer(from, to, value)` log in the settlement transaction reproduces. #### Parameters | Parameter | Type | | ------ | ------ | | `from` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` | | `value` | `string` \| `bigint` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### authorizationUsed() > **authorizationUsed**(`ref`, `authorizer`, `block`, `reader`): `Promise`\<`boolean` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> Whether `authorizer` had used the payment's pull authorization, `ref.authorization`, in the state after block `block`: one `eth_call` to `authorization.at`, of `authorizationState(authorizer, nonce)` for `eip3009`, or of `nonceBitmap(authorizer, nonce >> 8)` for `permit2`, whose bit `nonce & 0xff` is then read. A reader for another network than `ref.network` is `evm/wrong-reader`. A failed call, or an answer that is not one 32-byte word (for `eip3009`, one holding 0 or 1), is `evm/unreadable`. A ref with no well-formed `authorization`, an authorizer that is not an address, or a block that is not a non-negative bigint is `evm/field-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | `Pick`\<[`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref), `"network"` \| `"authorization"`\> | | `authorizer` | `` `0x${string}` `` | | `block` | `bigint` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | #### Returns `Promise`\<`boolean` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> *** ### bindSalt() > **bindSalt**(`receiverAuthorizer`, `policy`, `h`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` keccak256(abi.encode(SALT_BINDING_TYPEHASH, receiverAuthorizer, policy, h)). #### Parameters | Parameter | Type | | ------ | ------ | | `receiverAuthorizer` | `` `0x${string}` `` | | `policy` | `` `0x${string}` `` | | `h` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### decodePermissionContext() > **decodePermissionContext**(`ctx`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Delegation`](https://lcp.integraledger.com/reference/api/evm.md#delegation)[] Decodes `abi.encode(Delegation[])` of at most 32 KiB, strictly: the input is a non-empty multiple of 32 bytes, every offset and length word lies inside it at a 32-byte-aligned position, every offset is a multiple of 32, address words carry 12 zero bytes, and there are at most 8 delegations, 16 caveats each, and 8 KiB per `bytes`; the padding after a `bytes` value is not read. The array is returned in the input's order, leaf first. An empty array decodes to `[]`. #### Parameters | Parameter | Type | | ------ | ------ | | `ctx` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Delegation`](https://lcp.integraledger.com/reference/api/evm.md#delegation)[] *** ### eip3009Recover() > **eip3009Recover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Recovers the hash from a settlement transaction alone: the one distinct nonce among the `AuthorizationUsed` logs that the option's `asset` emitted in it; none is `evm/no-authorization-use`, and more than one `evm/ambiguous`. A failed read, a reader answer that is neither `null` nor a receipt, or a receipt holding a log that is not an object with a string `address`, an array of string `topics` and a string `data`, is `evm/unreadable`; no receipt (`null`) is `evm/not-found`. A reverted transaction is `evm/reverted`. A revert, `evm/no-authorization-use` and `evm/ambiguous` are given only where the receipt's block is at or below the reader's `finalized` mark; above it, or where that mark cannot be read, each is `evm/not-final`, a read to repeat: a block above the mark can be replaced by one in which the transaction succeeds or holds other logs, and a refusal names no mark. The mark is read only for those. An input or reader that is not an object, a reader for another network, a `tx` that is not a 32-byte hash, or an option whose `asset` is not an address, is `evm/wrong-reader`, with nothing read. At most two calls. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `eip155:${string}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)\> | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### eip3009TypedData() > **eip3009TypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) The EIP-712 typed data for `TransferWithAuthorization`, with the field lists in EIP-3009's order. The domain's `verifyingContract` is the token. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | \{ `asset`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `name`: `string`; `network`: `` `eip155:${string}` ``; `nonce`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `validAfter`: `bigint`; `validBefore`: `bigint`; `value`: `string`; `version`: `string`; \} | | `a.asset` | `` `0x${string}` `` | | `a.from` | `` `0x${string}` `` | | `a.name` | `string` | | `a.network` | `` `eip155:${string}` `` | | `a.nonce` | `` `0x${string}` `` | | `a.to` | `` `0x${string}` `` | | `a.validAfter` | `bigint` | | `a.validBefore` | `bigint` | | `a.value` | `string` | | `a.version` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) *** ### evmStatus() > **evmStatus**(`ref`, `reader`, `query`): `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\> Reads the named transaction, and answers as the profile `read-status` does for what it observed, at coverage `full`: the ref names the log that carries H. The read is settled when the receipt succeeded and each log the ref names is present, emitted by the named contract: the binding log with `value` in its topic or data word, and the transfer log whose named fields hash to the digest. Where the binding log is EIP-3009's `AuthorizationUsed` and the transfer log names `from`, the two are one authorization's, paired as `eip3009Status` pairs them: the transfer is the one paired with a use of the binding's value, from its authorizer (topic 1). Where the binding log and the transfer log name one event of one contract, as Tempo's `TransferWithMemo` carries the memo and the transfer together, they are one log: the transfer counts only from a log that carries the binding. Where the binding log is the DelegationManager's `RedeemedDelegation`, only a leaf's log carries it: one whose delegate (data word 1) is the redeemer (topic 2) or the wildcard delegate, as `redeemedLeafRecover` reads it. The transfer's `from` is then that leaf's root delegator (topic 1); two leaves of one root delegator redeemed in one transaction are read alike, so one transfer from it counts for either. Settled carries the highest finality mark reached and the receipt's block as the position: the act at that mark, `settled` at or above the finality asked for and `below-mark` under it. A receipt the reader does not hold, a reverted one, a missing log, and a transfer a Tempo receive policy sent to `RECEIVE_POLICY_GUARD` are no act, and with no search for H yet answer `pending` `search-incomplete`. A reader that rejects is unreadable by its error (`rejected`), a reader for another network `chain-mismatch`, and a ref whose `transaction` is not a 32-byte hash, or whose `bindingLog` or `transferLog` is present and not of the form a reference writes, a malformed reader answer, or a query that is not one `status` takes, `unparseable`, with nothing read for a ref or a query. At most three calls. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & `object` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | | `query` | [`EvmQuery`](https://lcp.integraledger.com/reference/api/ap2.md#evmquery)\<[`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & `object`\> | #### Returns `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\> *** ### paymentHash() > **paymentHash**(`chainId`, `escrow`, `p`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The escrow's `getHash`: keccak256(abi.encode(chainId, escrow, keccak256(abi.encode(PAYMENT_INFO_TYPEHASH, p)))). With `payer` zero it is x402's `signatureNonce`. #### Parameters | Parameter | Type | | ------ | ------ | | `chainId` | `number` | | `escrow` | `` `0x${string}` `` | | `p` | [`PaymentInfo`](https://lcp.integraledger.com/reference/api/evm.md#paymentinfo) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### permit2TypedData() > **permit2TypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata) Permit2's typed data under its domain (`name` "Permit2", no version). No witness gives `PermitTransferFrom`; a witness gives `PermitWitnessTransferFrom`, or `PermitBatchWitnessTransferFrom` when `permitted` is an array. An empty `permitted` array, one of more than 32 entries, and an array with no witness are refused `evm/field-malformed`. So is a witness that is not an object; whose `type` is not an upper-case letter followed by up to 63 letters and digits, or is `TokenPermissions` or starts with `Permit`; whose `fields` is not an array of objects with a string `name` and `type`; or whose `value` is not an object. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | \{ `chainId`: `number`; `deadline`: `bigint`; `nonce`: `bigint`; `permitted`: \{ `amount`: `bigint`; `token`: `` `0x${string}` ``; \} \| readonly `object`[]; `spender`: `` `0x${string}` ``; `verifyingContract?`: `` `0x${string}` ``; `witness?`: \{ `fields`: readonly [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[]; `type`: `string`; `value`: \{\[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}; \}; \} | | `a.chainId` | `number` | | `a.deadline` | `bigint` | | `a.nonce` | `bigint` | | `a.permitted` | \{ `amount`: `bigint`; `token`: `` `0x${string}` ``; \} \| readonly `object`[] | | `a.spender` | `` `0x${string}` `` | | `a.verifyingContract?` | `` `0x${string}` `` | | `a.witness?` | \{ `fields`: readonly [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[]; `type`: `string`; `value`: \{\[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}; \} | | `a.witness.fields` | readonly [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] | | `a.witness.type` | `string` | | `a.witness.value` | \{\[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json); \} | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata) *** ### transferDigest() > **transferDigest**(`v`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> the core's `hash` over the fields present, in the order `from`, `to`, `value`: 20, 20 and 32 bytes, the value as a big-endian uint256. `authorizationIdDigest(from, to, value)` equals `transferDigest({from, to, value})`. #### Parameters | Parameter | Type | | ------ | ------ | | `v` | \{ `from?`: `` `0x${string}` ``; `to?`: `` `0x${string}` ``; `value?`: `bigint`; \} | | `v.from?` | `` `0x${string}` `` | | `v.to?` | `` `0x${string}` `` | | `v.value?` | `bigint` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ## References ### 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) --- # @integraledger/lcp/hedera > Hedera: the x402 pairings `x402/exact/hedera` (the ATR hash as the signed body memo) and `x402/exact/hedera/transfer-executor` (the hash advertised in the challenge only), with the transaction wire form and the Mirror Node settlement read. Source: https://lcp.integraledger.com/reference/api/hedera Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Hedera: the x402 pairings `x402/exact/hedera` (the ATR hash as the signed body memo) and `x402/exact/hedera/transfer-executor` (the hash advertised in the challenge only), with the transaction wire form and the Mirror Node settlement read. The wire form is read and written by hand (protobuf, five messages). The entry point also holds the escrow channel pieces `hederaChannelId` and `hederaVoucher`, and `FETCHED`, the key under which a pairing's `fetchPresented` writes the seller's read onto a credential. ## Interfaces ### ExecutorRef #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `asset` | `string` | - | | `idDigest` | `` `0x${string}` `` | `hederaIdDigest` of the payer. | | `network` | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/hedera.md#hederanetwork) | - | | `payee` | `string` | The option's `payTo`. | | `settleBy` | `number` | Unix seconds: the time `reference` ran plus `maxTimeoutSeconds`. | | `transaction?` | `string` | The facilitator's `SettlementResponse.transaction`, mirror form. | *** ### HederaBody #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `bodyBytes` | `Uint8Array`\<`ArrayBuffer`\> | - | | `id` | [`HederaTxId`](https://lcp.integraledger.com/reference/api/hedera.md#hederatxid) | - | | `maxFee` | `string` | `transactionFee`: the most the fee payer pays, in tinybars, a decimal integer. | | `memo` | `string` | - | | `node` | `string` | `nodeAccountID`: the node the body is for. | | `transfer?` | [`HederaTransfer`](https://lcp.integraledger.com/reference/api/hedera.md#hederatransfer) | The body's `cryptoTransfer`; absent where the body is another transaction. | | `validDuration` | `number` | `transactionValidDuration`, in seconds. | *** ### HederaChannelConfig #### Properties | Property | Type | | ------ | ------ | | `authorizedSigner` | `` `0x${string}` `` | | `chainId` | `295` \| `296` | | `escrow` | `` `0x${string}` `` | | `payee` | `` `0x${string}` `` | | `payer` | `` `0x${string}` `` | | `salt` | `` `0x${string}` `` | | `token` | `` `0x${string}` `` | *** ### HederaPresented The members of the body the payer signed that the read compares with the landed entry, as presented. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `maxFee` | `string` | - | | `nodes` | readonly `string`[] | The node of each body the presented list holds; one for a single `Transaction`. | | `transfer` | [`HederaTransfer`](https://lcp.integraledger.com/reference/api/hedera.md#hederatransfer) | - | *** ### HederaReader Bounded, read-only calls against one network's Mirror Node. Every failure rejects. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/hedera.md#hederanetwork) | #### Methods ##### accountTransactions() > **accountTransactions**(`q`): `Promise`\<[`MirrorPage`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorpage)\> One page of an account's transactions, oldest first: `GET /api/v1/transactions` with `account.id` the account, `timestamp` `gt:` `after` and `lte:` `until`, `order` `asc` and `limit` 100. ###### Parameters | Parameter | Type | | ------ | ------ | | `q` | \{ `account`: `string`; `after`: `string`; `until`: `string`; \} | | `q.account` | `string` | | `q.after` | `string` | | `q.until` | `string` | ###### Returns `Promise`\<[`MirrorPage`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorpage)\> ##### latest() > **latest**(): `Promise`\<`string`\> The mirror's latest consensus timestamp: the end of its newest block, `timestamp.to` of `GET /api/v1/blocks?order=desc&limit=1`. ###### Returns `Promise`\<`string`\> ##### oldest() > **oldest**(): `Promise`\<`string`\> How far back the mirror holds records: the start of its oldest block, `timestamp.from` of `GET /api/v1/blocks?order=asc&limit=1`, or `archival` where the endpoint is declared archival. ###### Returns `Promise`\<`string`\> ##### transactions() > **transactions**(`mirrorId`): `Promise`\ `GET /api/v1/transactions/{id}`: the answer's `transactions`; null on the mirror's 404 for the id. ###### Parameters | Parameter | Type | | ------ | ------ | | `mirrorId` | `string` | ###### Returns `Promise`\ *** ### HederaRef The read keys `reference` returns. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `expectMemo` | `string` | The body's memo: H's LCP string. | | `network` | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/hedera.md#hederanetwork) | - | | `payee` | `string` | The option's `payTo`. | | `payer` | `string` | The one account the signed body debits: the payer, the signer the read names, and the search's key. | | `presented` | [`HederaPresented`](https://lcp.integraledger.com/reference/api/hedera.md#hederapresented) | The rest of the members of the payment presented. | | `transactionId` | `string` | The transaction id, the single-use value, in the Mirror Node's form. | | `validDuration` | `number` | `transactionValidDuration`, in seconds. | | `validStart` | `string` | The valid start the id names, as a consensus timestamp `seconds.nanos`, nanoseconds in nine digits. | *** ### HederaRow One row of a transfer list, as the signed body or the mirror holds it: the account and its signed change. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `account` | `string` | - | | `amount` | `string` | The change in the asset's smallest unit, a decimal integer, negative for a debit. | | `isApproval` | `boolean` | `is_approval`: true where the row spends an allowance the account granted, so the account did not sign it. | *** ### HederaTransfer A crypto transfer as the signed body holds it: its HBAR rows, and its rows per token. #### Properties | Property | Type | | ------ | ------ | | `hbar` | readonly [`HederaRow`](https://lcp.integraledger.com/reference/api/hedera.md#hederarow)[] | | `tokens` | readonly `object`[] | *** ### HederaTxId #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `account` | `string` | "shard.realm.num" | | `nanos` | `number` | An integer from 0 to 999,999,999. | | `seconds` | `bigint` | A non-negative bigint. | *** ### HederaUnsigned The body the payer signs, and how its signature completes the wire transaction. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.bodyBytes` | `Uint8Array`\<`ArrayBuffer`\> | | `request.kind` | `"hedera-body"` | #### Methods ##### complete() > **complete**(`s`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The signed `Transaction`, base64. ###### Parameters | Parameter | Type | | ------ | ------ | | `s` | \{ `publicKey`: `Uint8Array`; `signature`: `Uint8Array`; `type`: `"ed25519"` \| `"ecdsa-secp256k1"`; \} | | `s.publicKey` | `Uint8Array` | | `s.signature` | `Uint8Array` | | `s.type` | `"ed25519"` \| `"ecdsa-secp256k1"` | ###### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### HederaVoucherTypedData The EIP-712 voucher a Hedera session's payer signs: `Voucher(bytes32 channelId,uint128 cumulativeAmount)`. #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `295` \| `296` | | `domain.name` | `"Hedera Stream Channel"` | | `domain.verifyingContract` | `` `0x${string}` `` | | `domain.version` | `"1"` | | `message` | `object` | | `message.channelId` | `` `0x${string}` `` | | `message.cumulativeAmount` | `bigint` | | `primaryType` | `"Voucher"` | | `types` | `object` | | `types.Voucher` | \[\{ `name`: `"channelId"`; `type`: `"bytes32"`; \}, \{ `name`: `"cumulativeAmount"`; `type`: `"uint128"`; \}\] | *** ### MirrorEntry The Mirror Node's `Transaction` entry: the fields read here. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `assessed_custom_fees?` | readonly `unknown`[] | The custom fees a token transfer assessed (the detail of `GET /api/v1/transactions/{id}`); they change its rows. | | `charged_tx_fee?` | `number` | The fee charged to the transaction's fee payer, in tinybars; its `transfers` row includes it. | | `consensus_timestamp` | `string` | - | | `max_fee?` | `string` | - | | `memo_base64` | `string` \| `null` | - | | `name?` | `string` | The transaction's type: `CRYPTOTRANSFER` for a transfer. | | `node?` | `string` \| `null` | The node the transaction was submitted through. | | `nonce` | `number` | - | | `result` | `string` | - | | `scheduled` | `boolean` | - | | `staking_reward_transfers?` | readonly [`MirrorRow`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorrow)[] | HIP-406 staking rewards paid by this transaction, in tinybars. `transfers` already holds each account's total change, so a reward is in the rewarded account's credit there, and the staking reward account `0.0.800` pays it. | | `token_transfers?` | readonly [`MirrorRow`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorrow)[] | - | | `transaction_id?` | `string` | The transaction id, `shard.realm.num-seconds-nanos`. | | `transfers?` | readonly [`MirrorRow`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorrow)[] | - | | `valid_duration_seconds?` | `string` | - | | `valid_start_timestamp?` | `string` | - | *** ### MirrorPage One page of the account's transactions: the answer's `transactions` and its `links.next`. #### Properties | Property | Type | | ------ | ------ | | `next` | `string` \| `null` | | `transactions` | readonly [`MirrorEntry`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorentry)[] | *** ### MirrorRow A transfer row of a Mirror Node entry: `transfers`, `token_transfers` (with `token_id`) or `staking_reward_transfers`. #### Properties | Property | Type | | ------ | ------ | | `account` | `string` | | `amount` | `number` | | `is_approval?` | `boolean` | | `token_id?` | `string` | ## Type Aliases ### HederaCloseRef > **HederaCloseRef** = `object` A close: the transaction whose `ChannelClosed` log from the escrow names the channel, and `search`, the log filter that finds that transaction when no one reports it. #### Properties | Property | Type | | ------ | ------ | | `channel` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `escrow` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `network` | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/hedera.md#hederanetwork) | | `phase` | `"close"` | | `search` | `object` | | `search.address` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `search.topics` | readonly ([`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) \| `null`)[] | | `transaction` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | *** ### HederaNetwork > **HederaNetwork** = `"hedera:mainnet"` \| `"hedera:testnet"` \| `"hedera:previewnet"` \| `"hedera:devnet"` *** ### HederaQuery > **HederaQuery**\<`Ref`\> = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<`Ref`, `string`, `"consensus"`, `string`\> #### Type Parameters | Type Parameter | | ------ | | `Ref` | *** ### HederaStatus > **HederaStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`string`, `"consensus"`, `string`\> The answer of `hederaStatus` and `executorStatus`: positions are the Mirror Node's `consensus_timestamp` (`seconds.nanos`), and the one mark is `consensus`, the record the Mirror Node serves, which is final. A `settled` answer of `hederaStatus` states `presented` (the profile `x402/exact/hedera`, rule 12). ## Variables ### CHANNEL\_CLOSED\_TOPIC > `const` **CHANNEL\_CLOSED\_TOPIC**: `"0x92ed5fe0fe56b3f4185e688efb342e92a4492b9df29ad5de596c44e64d097b51"` = `"0x92ed5fe0fe56b3f4185e688efb342e92a4492b9df29ad5de596c44e64d097b51"` `ChannelClosed(bytes32,address,address,uint256,uint256)`. *** ### CHANNEL\_OPENED\_TOPIC > `const` **CHANNEL\_OPENED\_TOPIC**: `"0xcd6e60364f8ee4c2b0d62afc07a1fb04fd267ce94693f93f8f85daaa099b5c94"` = `"0xcd6e60364f8ee4c2b0d62afc07a1fb04fd267ce94693f93f8f85daaa099b5c94"` `ChannelOpened(bytes32,address,address,address,address,bytes32,uint256)`: channel, payer, payee indexed. *** ### exactHedera > `const` **exactHedera**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`HederaUnsigned`](https://lcp.integraledger.com/reference/api/hedera.md#hederaunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/hedera"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`HederaRef`](https://lcp.integraledger.com/reference/api/hedera.md#hederaref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/hedera`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator, the transaction's fee payer, adds its signature to the transaction the payer signed and submits it; `status` reads it by its transaction id. *** ### exactHederaExecutor > `const` **exactHederaExecutor**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `request`: \{ `amount`: `string`; `asset`: `string`; `executors`: readonly `string`[]; `kind`: `"hedera-executor"`; `network`: [`HederaNetwork`](https://lcp.integraledger.com/reference/api/hedera.md#hederanetwork); `payTo`: `string`; `validBefore`: `number`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ExecutorPaymentPayload`](https://lcp.integraledger.com/reference/api.md#executorpaymentpayload); \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/hedera/transfer-executor"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ExecutorRef`](https://lcp.integraledger.com/reference/api/hedera.md#executorref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/hedera/transfer-executor`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator submits the executor's transfer under the authorization the payer signed, and names its transaction; `status` reads it. ## Functions ### decodeHederaTx() > **decodeHederaTx**(`wire`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `bodies`: readonly [`HederaBody`](https://lcp.integraledger.com/reference/api/hedera.md#hederabody)[]; \} Reads a wire `Transaction`, or the SDK's `TransactionList` of them (a top-level field 1): each body's transaction id, node, maximum fee, valid duration, memo, crypto transfer and exact bytes, the bytes a copy of `wire`'s. Every body of a list must equal the first in all but its node, else `hedera/list-inconsistent`; a valid duration above the chain's 180 seconds is `hedera/valid-duration`. #### Parameters | Parameter | Type | | ------ | ------ | | `wire` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `bodies`: readonly [`HederaBody`](https://lcp.integraledger.com/reference/api/hedera.md#hederabody)[]; \} *** ### executorStatus() > **executorStatus**(`ref`, `reader`, `query`): `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\> The read of the executor's transfer by the transaction the facilitator named, as the profile `read-status` answers it at coverage `none` (the profile `x402/exact/hedera`, rule 15): the named transaction is the act, read in its merged consensus record, the user entry and its child entries, each account's net change in every asset taken with HIP-406 staking rewards taken back out and the user entry's `charged_tx_fee` added back to the fee payer. Its signer is the one account the record debits, which is the payer where its digest is the one `reference` recorded and the option's payee where it is that account; it pays where it credits the payee. The named transaction id is single-use: an entry under it that decides consumed it, and with none it lapses once its valid start plus the chain's longest valid duration, 180 seconds, is strictly before the mirror's latest consensus timestamp, read first, the mirror holding records back to that valid start; no search is made, the act being the transaction named. A ref whose `transaction` is not a Mirror Node transaction id, whose `asset` is not `shard.realm.num` (it is read for nothing else), or whose `idDigest` is not `0x` and 64 hex digits, is `unparseable`, with nothing read; a record whose rows are not well formed is `unparseable`, and more than 64 entries `too-large`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`ExecutorRef`](https://lcp.integraledger.com/reference/api/hedera.md#executorref) & `object` | | `reader` | [`HederaReader`](https://lcp.integraledger.com/reference/api/hedera.md#hederareader) | | `query` | [`HederaQuery`](https://lcp.integraledger.com/reference/api/hedera.md#hederaquery)\<[`ExecutorRef`](https://lcp.integraledger.com/reference/api/hedera.md#executorref) & `object`\> | #### Returns `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\> *** ### hederaChannelId() > **hederaChannelId**(`c`): `` `0x${string}` `` keccak256(abi.encode(payer, payee, token, salt, authorizedSigner, escrow, chainId)), lowercase. Throws TypeError when an address is not `0x` and 40 hex digits, the salt is not a 32-byte hash, or the chain id is not 295 or 296. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`HederaChannelConfig`](https://lcp.integraledger.com/reference/api/hedera.md#hederachannelconfig) | #### Returns `` `0x${string}` `` *** ### hederaIdDigest() > **hederaIdDigest**(`payer`): `Promise`\<`` `0x${string}` ``\> The core's hash over the ASCII of `payer`: the payer's identity, never shown in the clear. #### Parameters | Parameter | Type | | ------ | ------ | | `payer` | `string` | #### Returns `Promise`\<`` `0x${string}` ``\> *** ### hederaStatus() > **hederaStatus**(`ref`, `reader`, `query`): `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\> The read of the act the query asks about (the profiles `read-status` and `x402/exact/hedera`). The mirror's latest consensus timestamp is read first, then the entries under the presented transaction id, its single-use value. An entry under the id that decides consumed the id: it is the act where it succeeded, its memo is H's string, it is the payer's own transfer and, for the act `payment`, it credits the option's payee; a failed result under the id is the act's own failed result. With no such entry the id is unconsumed, live while the mirror holds records back to the valid start (else `history-gap`), and lapsed once the valid start plus the valid duration is strictly before the timestamp read first. Before a `failed`, the search for H over the payer's transactions, from the position the caller gives, or the search position an earlier answer returned, to that timestamp; an act it finds is the act, and with none found the answer is `pending`, `search-incomplete`, at the search's position, the search proving no absence until a run shows its three facts. A `settled` answer states `presented`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`HederaRef`](https://lcp.integraledger.com/reference/api/hedera.md#hederaref) | | `reader` | [`HederaReader`](https://lcp.integraledger.com/reference/api/hedera.md#hederareader) | | `query` | [`HederaQuery`](https://lcp.integraledger.com/reference/api/hedera.md#hederaquery)\<[`HederaRef`](https://lcp.integraledger.com/reference/api/hedera.md#hederaref)\> | #### Returns `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\> *** ### hederaVoucher() > **hederaVoucher**(`c`, `cumulative`): [`HederaVoucherTypedData`](https://lcp.integraledger.com/reference/api/hedera.md#hederavouchertypeddata) The voucher for `cumulative` on a channel, under the escrow's domain. Throws TypeError when the channel id is not a 32-byte hash, the escrow not `0x` and 40 hex digits, the chain id not 295 or 296, or `cumulative` not a bigint that fits a uint128. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | \{ `chainId`: `295` \| `296`; `channelId`: `` `0x${string}` ``; `escrow`: `` `0x${string}` ``; \} | | `c.chainId` | `295` \| `296` | | `c.channelId` | `` `0x${string}` `` | | `c.escrow` | `` `0x${string}` `` | | `cumulative` | `bigint` | #### Returns [`HederaVoucherTypedData`](https://lcp.integraledger.com/reference/api/hedera.md#hederavouchertypeddata) *** ### txIdMirror() > **txIdMirror**(`id`): `string` "0.0.1235-1700000000-000000000", the Mirror Node's form. Throws TypeError on an id that is not a `HederaTxId`. #### Parameters | Parameter | Type | | ------ | ------ | | `id` | [`HederaTxId`](https://lcp.integraledger.com/reference/api/hedera.md#hederatxid) | #### Returns `string` *** ### txIdText() > **txIdText**(`id`): `string` "0.0.1235@1700000000.000000000". Throws TypeError on an id that is not a `HederaTxId`. #### Parameters | Parameter | Type | | ------ | ------ | | `id` | [`HederaTxId`](https://lcp.integraledger.com/reference/api/hedera.md#hederatxid) | #### Returns `string` ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### ExecutorPayload Re-exports [ExecutorPayload](https://lcp.integraledger.com/reference/api.md#executorpayload) *** ### ExecutorPaymentPayload Re-exports [ExecutorPaymentPayload](https://lcp.integraledger.com/reference/api.md#executorpaymentpayload) *** ### FETCHED Re-exports [FETCHED](https://lcp.integraledger.com/reference/api.md#fetched) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/lightning > BOLT11 invoices and the Lightning pairings: on x402 (`x402/exact/lnbtc/payment-hash`) the ATR commits the option's `extra.paymentHash`, and on MPP the seller's node writes the ATR hash as the invoice's description hash `h`. Source: https://lcp.integraledger.com/reference/api/lightning Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. BOLT11 invoices and the Lightning pairings: on x402 (`x402/exact/lnbtc/payment-hash`) the ATR commits the option's `extra.paymentHash`, and on MPP the seller's node writes the ATR hash as the invoice's description hash `h`. The payment hash is that of the invoice the seller's node issues after the agreement. The payer signs nothing; it pays the invoice. ## Interfaces ### Bolt11 A decoded BOLT11 invoice. `B` is what its bytes are backed by: `decodeBolt11` gives `Bolt11`, each byte field in its own fresh `ArrayBuffer`, and a function that reads one takes any backing. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` | #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `amountMsat` | `bigint` \| `null` | - | | `currency` | `"bc"` \| `"tb"` \| `"tbs"` \| `"bcrt"` | - | | `description` | `string` \| `null` | The `d` field as strict UTF-8, a leading byte-order mark kept as a character; null when the invoice has none. | | `descriptionHash` | `Uint8Array`\<`B`\> \| `null` | - | | `expiry` | `number` | - | | `metadata` | `Uint8Array`\<`B`\> \| `null` | - | | `paymentHash` | `Uint8Array`\<`B`\> | - | | `signer` | `string` | The compressed secp256k1 public key that signed the invoice, as 66 lowercase hex digits: the `n` field's key where the invoice has one, and otherwise the key recovered from the signature. | | `tags` | readonly `number`[] | Every tagged field's type, in invoice order. | | `timestamp` | `number` | - | *** ### LnChoice The buyer's choice: the 402 document, the option it pays, its validation time in Unix seconds, and its own request. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | | `now` | `number` | - | | `request` | [`LnbtcRequest`](https://lcp.integraledger.com/reference/api/lightning.md#lnbtcrequest) | The request the buyer means to make, from which `build` computes the scheme's request hash. | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | *** ### LnMppChoice #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - | | `returnInvoice?` | `string` | session only: the payer's return invoice, a BOLT11 invoice with no amount, which the open action registers. | *** ### LnMppUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.invoice` | `string` | | `request.kind` | `"bolt11-pay"` | #### Methods ##### complete() > **complete**(`preimage`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The credential for the paid invoice's preimage. A credential over the credential size bound, 64 KiB, its echoed challenge included, is `mpp/credential-malformed`, as `bound` refuses it, and is read first; a preimage that is not 64 lowercase hex digits is `ln/preimage-malformed`. ###### Parameters | Parameter | Type | | ------ | ------ | | `preimage` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### LnRef The read keys `reference` returns: the invoice's payment hash as lowercase hex, and when the payment can land. #### Properties | Property | Type | | ------ | ------ | | `network` | `string` | | `paymentHash` | `string` | | `settleBy` | `number` | *** ### LnUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | The payer's node pays exactly this invoice. | | `request.invoice` | `string` | - | | `request.kind` | `"bolt11-pay"` | - | #### Methods ##### complete() > **complete**(`preimage`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnPaymentPayload`](https://lcp.integraledger.com/reference/api/lightning.md#lnpaymentpayload) ###### Parameters | Parameter | Type | | ------ | ------ | | `preimage` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnPaymentPayload`](https://lcp.integraledger.com/reference/api/lightning.md#lnpaymentpayload) ## Type Aliases ### ExactLnbtcReason > **ExactLnbtcReason** = `"unsupported_scheme"` \| `"network_mismatch"` \| `"unsupported_network"` \| `"invalid_exact_lnbtc_asset"` \| `"invalid_exact_lnbtc_amount"` \| `"invalid_exact_lnbtc_amount_mismatch"` \| `"invalid_exact_lnbtc_pay_to_mismatch"` \| `"invalid_exact_lnbtc_pay_to_malformed"` \| `"invalid_exact_lnbtc_max_timeout_mismatch"` \| `"invalid_exact_lnbtc_extra_mismatch"` \| `"invalid_exact_lnbtc_request_binding"` \| `"invalid_exact_lnbtc_request_mismatch"` \| `"invalid_exact_lnbtc_asset_transfer_method"` \| `"invalid_exact_lnbtc_payment_flow"` \| `"invalid_exact_lnbtc_invoice_missing"` \| `"invalid_exact_lnbtc_invoice_decode_failed"` \| `"invalid_exact_lnbtc_invoice_description"` \| `"invalid_exact_lnbtc_invoice_request_mismatch"` \| `"invalid_exact_lnbtc_invoice_payee_mismatch"` \| `"invalid_exact_lnbtc_invoice_currency_mismatch"` \| `"invalid_exact_lnbtc_invoice_amount_mismatch"` \| `"invalid_exact_lnbtc_max_timeout"` \| `"invalid_exact_lnbtc_invoice_expiry_mismatch"` \| `"invalid_exact_lnbtc_invoice_created_in_future"` \| `"invalid_exact_lnbtc_invoice_payment_hash_mismatch"` \| `"invalid_exact_lnbtc_preimage_missing"` \| `"invalid_exact_lnbtc_preimage_malformed"` \| `"invalid_exact_lnbtc_preimage_length"` \| `"invalid_exact_lnbtc_preimage_hash_mismatch"` \| `"invalid_exact_lnbtc_invoice_expired"` The scheme's `errorReason` strings its validation gives, and this form's one more. *** ### ExactLnbtcValidation > **ExactLnbtcValidation** = \{ `network`: [`LnNetwork`](https://lcp.integraledger.com/reference/api/lightning.md#lnnetwork); `paymentHash`: `string`; `valid`: `true`; \} \| \{ `reason`: [`ExactLnbtcReason`](https://lcp.integraledger.com/reference/api/lightning.md#exactlnbtcreason); `valid`: `false`; \} The validation's answer: the network and payment hash of the scheme's consumption key, or the scheme's reason. *** ### LnbtcRequest > **LnbtcRequest** = \{ `body`: `Uint8Array`; `headers?`: [`LnHeaderFields`](https://lcp.integraledger.com/reference/api/lightning.md#lnheaderfields); `method`: `string`; `profile`: `"http:1"`; `url`: `string`; \} \| \{ `arguments?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `meta?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `name`: `string`; `profile`: `"mcp:1"`; `server`: `string`; \} The buyer's intended request, which the scheme's request binding commits to. #### Union Members ##### Type Literal \{ `body`: `Uint8Array`; `headers?`: [`LnHeaderFields`](https://lcp.integraledger.com/reference/api/lightning.md#lnheaderfields); `method`: `string`; `profile`: `"http:1"`; `url`: `string`; \} | Name | Type | Description | | ------ | ------ | ------ | | `body` | `Uint8Array` | The content bytes after transfer decoding; empty where the request has no body. | | `headers?` | [`LnHeaderFields`](https://lcp.integraledger.com/reference/api/lightning.md#lnheaderfields) | - | | `method` | `string` | The method, case kept. | | `profile` | `"http:1"` | An HTTP request (the scheme's `http:1`). | | `url` | `string` | The absolute URL the request is made to, its query included. | *** ##### Type Literal \{ `arguments?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `meta?`: [`Json`](https://lcp.integraledger.com/reference/api.md#json); `name`: `string`; `profile`: `"mcp:1"`; `server`: `string`; \} | Name | Type | Description | | ------ | ------ | ------ | | `arguments?` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | `params.arguments`; absent is `{}`. | | `meta?` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | `params._meta`; absent is `{}`. | | `name` | `string` | - | | `profile` | `"mcp:1"` | An MCP `tools/call` (the scheme's `mcp:1`). | | `server` | `string` | The MCP server the buyer means to call, as its own configuration spells it. | *** ### LnHeaderFields > **LnHeaderFields** = `Readonly`\<`Record`\<`string`, `string` \| readonly `string`[]\>\> A request's header fields as received: each field's name, in any case, with its lines in order, or its one line. *** ### LnNetwork > **LnNetwork** = `"lnbtc:000000000019d6689c085ae165831e93"` \| `"lnbtc:000000000933ea01ad0ee984209779ba"` x402's `lnbtc` network ids, in CAIP-2 form: `lnbtc:` and the first 32 hex digits of the genesis block hash of Bitcoin mainnet or testnet3. `lnbtc` is x402's own namespace. *** ### LnPaymentPayload > **LnPaymentPayload** = `object` #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"extensions"`\] | | `payload` | `object` | | `payload.preimage` | `string` | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"resource"`\] | | `x402Version` | `2` | ## Variables ### chargeLightning > `const` **chargeLightning**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`LnMppUnsigned`](https://lcp.integraledger.com/reference/api/lightning.md#lnmppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](https://lcp.integraledger.com/reference/api/lightning.md#lnref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/lightning`. The payer broadcasts (`broadcaster` answers `"payer"`): its node pays the invoice before the preimage is presented. The seller's node, which received the payment, confirms it; `reference` names the invoice, and no `status` reads it. *** ### exactLnbtcPaymentHash > `const` **exactLnbtcPaymentHash**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `advertiseBeforeCarrier`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnUnsigned`](https://lcp.integraledger.com/reference/api/lightning.md#lnunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/lnbtc/payment-hash"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](https://lcp.integraledger.com/reference/api/lightning.md#lnref)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/lnbtc/payment-hash`. The payer broadcasts (`broadcaster` answers `"payer"`): its node pays the invoice before the preimage is presented. No ledger shows the payment, and no `status` reads it. `advertiseBeforeCarrier` places the offer the seller issues before its node writes the invoice; `advertise` the option with the invoice. *** ### sessionLightning > `const` **sessionLightning**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`LnMppUnsigned`](https://lcp.integraledger.com/reference/api/lightning.md#lnmppunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](https://lcp.integraledger.com/reference/api/lightning.md#lnref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/session/lightning`. `broadcaster` answers by the payment's action (`sessionBroadcasts`), for the actions `channel.kind` takes. `"payer"`: the opening and a top-up, whose deposits the payer's node paid, and a bearer proof, which draws on them; the seller's node, which received each deposit, confirms it, and no `status` reads it. `"payee"`: the close, whose refund the seller's node pays. Any other action gets `ln/no-payment-in-action`, as `bound` refuses it. ## Functions ### checkPreimage() > **checkPreimage**(`preimage`, `paymentHash`): `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The preimage check: `true` where `preimage` is 64 lowercase hex digits whose SHA-256 is `paymentHash`, itself 64 lowercase hex digits; else `ln/preimage-malformed`, `ln/payment-hash-required` or `ln/preimage-mismatch`, in that order. A resource server makes it before it serves a Lightning payment. #### Parameters | Parameter | Type | | ------ | ------ | | `preimage` | `string` | | `paymentHash` | `string` | #### Returns `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### decodeBolt11() > **decodeBolt11**(`invoice`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Bolt11`](https://lcp.integraledger.com/reference/api/lightning.md#bolt11)\<`ArrayBuffer`\>\> Decodes a BOLT11 invoice of up to 8,192 characters strictly, past Bech32's 90-character limit, which BOLT 11 lets an invoice exceed: exactly one `p` and one `s` field, at most one `n` field, and a signature that verifies, by the `n` key where the invoice has one (a low `s` required) and otherwise by public-key recovery; `signer` is that key. An invoice that fails is `ln/invoice-malformed`; one of more characters, or of more than 64 tagged fields, is `ln/invoice-too-large`. #### Parameters | Parameter | Type | | ------ | ------ | | `invoice` | `string` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Bolt11`](https://lcp.integraledger.com/reference/api/lightning.md#bolt11)\<`ArrayBuffer`\>\> *** ### invoiceH() > **invoiceH**(`b`, `field`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The one 32-byte `h` or `m` field of an invoice, as the hash it carries. #### Parameters | Parameter | Type | | ------ | ------ | | `b` | [`Bolt11`](https://lcp.integraledger.com/reference/api/lightning.md#bolt11) | | `field` | `"h"` \| `"m"` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### requestHash() > **requestHash**(`profile`, `params`, `request`, `resourceUrl`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The scheme's request hash of `request` under `profile` and `params`, as 64 lowercase hex digits: SHA-256 of the UTF-8 of RFC 8785's form of the profile's binding object. `ln/request-hash-mismatch` where the request is not of `profile`, where on `http:1` `resourceUrl` is not the request's URL, or on `mcp:1` the option's `server` is not the request's; `ln/request-binding-malformed` where `params` are not the profile's or the request cannot be bound: a method that is not a token, a URL that is not an absolute `http` or `https` URL in ASCII without user information or fragment, a body that is not bytes or is over 1 MiB, a header record that is not a record of strings or lists of strings or a bound field's value outside the scheme's form, a tool name that is empty, arguments or `_meta` that are not a JSON object, or a value RFC 8785 cannot write. A seller's server computes it from the request that will execute, with the option's `extra.requestBindingProfile` and `extra.requestBindingParams` and the document's `resource.url`, and writes it as the option's `extra.requestHash`, the invoice's `h` and the requirements it validates a payment against (profile `x402/exact/lnbtc/payment-hash`, rules 2, 5 and 10); the buyer's `build` computes it from the buyer's intended request and holds it to `extra.requestHash`. #### Parameters | Parameter | Type | | ------ | ------ | | `profile` | `unknown` | | `params` | `unknown` | | `request` | `unknown` | | `resourceUrl` | `unknown` | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### validateExactLnbtc() > **validateExactLnbtc**(`payload`, `requirements`, `at`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ExactLnbtcValidation`](https://lcp.integraledger.com/reference/api/lightning.md#exactlnbtcvalidation) x402's validation of `exact` on `lnbtc` (the scheme's Facilitator Validation, checks 1 to 7 and its Paid-but-expired Policy), in the scheme's order, with this form's one check added at the end of check 5: the accepted invoice's `p` is `requirements.extra.paymentHash` (`invalid_exact_lnbtc_invoice_payment_hash_mismatch`). `payload` is the payment presented; `requirements` the ones the resource server built from its own record of the sale; `now` the validation time and `skew` the clock-skew allowance, in seconds, 60 by default. A failure answers the scheme's `errorReason`; a success answers the network and the payment hash of the scheme's consumption key. It moves nothing, reads nothing, and records nothing: the resource server or a settler records the key once after it. A `now` or `skew` that is not a non-negative safe integer is `ln/time-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `payload` | `unknown` | | `requirements` | `unknown` | | `at` | \{ `now`: `number`; `skew?`: `number`; \} | | `at.now` | `number` | | `at.skew?` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ExactLnbtcValidation`](https://lcp.integraledger.com/reference/api/lightning.md#exactlnbtcvalidation) ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### 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) --- # @integraledger/lcp/mpp > The `mpp` entry point: MPP's challenge pieces, its three fields (`encodeChallenge` writes a `WWW-Authenticate` value, `encodeCredential` and `decodeCredential` write and read an `Authorization` value, `encodeReceipt` and `decodeReceipt` write and read a `Payment-Receipt` value) and its pairings: the EVM charges, defined here, and every other MPP charge, session and subscription pairing but Lightning's, re-exported from its module. Source: https://lcp.integraledger.com/reference/api/mpp Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The `mpp` entry point: MPP's challenge pieces, its three fields (`encodeChallenge` writes a `WWW-Authenticate` value, `encodeCredential` and `decodeCredential` write and read an `Authorization` value, `encodeReceipt` and `decodeReceipt` write and read a `Payment-Receipt` value) and its pairings: the EVM charges, defined here, and every other MPP charge, session and subscription pairing but Lightning's, re-exported from its module. The EVM charges are `authorization` (the signed nonce is keccak256 of the JSON array [id, realm]), `permit2` (the signed witness carries that value), and `transaction` and `hash` (nothing signed carries H). The re-exported charges are the card, Stripe, Solana, XRP Ledger, NEAR Intents, `usdc`, `lcp` and Tempo split-memo charges. `FETCHED` is the key under which a pairing's `fetchPresented` writes the seller's read onto a credential. ## Interfaces ### ChargeRefBase The reference fields every logs-searching read takes. #### Extended by - [`MppEip3009Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mppeip3009ref) - [`MppPermit2Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mpppermit2ref) - [`MppSessionOpeningRef`](https://lcp.integraledger.com/reference/api/mpp.md#mppsessionopeningref) #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `network` | `readonly` | `` `eip155:${string}` `` | - | | `payee` | `readonly` | `string` | - | | `payer` | `readonly` | `` `0x${string}` `` | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed. | *** ### EvmLogEntry A log as `eth_getLogs` gives it: the log, the transaction that emitted it, its block and its index in that block. #### Extends - [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog) #### Properties | Property | Type | Inherited from | | ------ | ------ | ------ | | `address` | `` `0x${string}` `` | [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog).[`address`](https://lcp.integraledger.com/reference/api/evm.md#property-address) | | `blockNumber` | `bigint` | - | | `data` | `` `0x${string}` `` | [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog).[`data`](https://lcp.integraledger.com/reference/api/evm.md#property-data) | | `logIndex` | `number` | - | | `topics` | readonly `` `0x${string}` ``[] | [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog).[`topics`](https://lcp.integraledger.com/reference/api/evm.md#property-topics) | | `transactionHash` | `` `0x${string}` `` | - | *** ### EvmSearchReader An `EvmReader` that also answers a log query, a block by mark or number, and a transaction's signed bytes. Every failure rejects, as `EvmReader`'s do: a range the endpoint refuses rejects, and is never read as an empty answer. #### Extends - [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) #### Extended by - [`TempoSearchReader`](https://lcp.integraledger.com/reference/api/tempo.md#temposearchreader) #### Properties | Property | Modifier | Type | Inherited from | | ------ | ------ | ------ | ------ | | `network` | `readonly` | `` `eip155:${string}` `` \| [`HederaNetwork`](https://lcp.integraledger.com/reference/api/evm.md#hederanetwork) | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-4) | #### Methods ##### block() > **block**(`at`): `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; \}\> `eth_getBlockByNumber(at, false)`: the block's number and its timestamp, in seconds. ###### Parameters | Parameter | Type | | ------ | ------ | | `at` | `bigint` \| `"safe"` \| `"finalized"` \| `"latest"` | ###### Returns `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; \}\> ###### Overrides [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`block`](https://lcp.integraledger.com/reference/api/evm.md#block) ##### blockNumber() > **blockNumber**(`tag`): `Promise`\<`bigint`\> `eth_getBlockByNumber(tag, false).number`. ###### Parameters | Parameter | Type | | ------ | ------ | | `tag` | `"safe"` \| `"finalized"` | ###### Returns `Promise`\<`bigint`\> ###### Inherited from [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`blockNumber`](https://lcp.integraledger.com/reference/api/evm.md#blocknumber) ##### call() > **call**(`to`, `data`, `block`): `Promise`\<`` `0x${string}` ``\> `eth_call` of `data` to the contract `to`, in the state after block `block`: the return data. ###### Parameters | Parameter | Type | | ------ | ------ | | `to` | `` `0x${string}` `` | | `data` | `` `0x${string}` `` | | `block` | `bigint` | ###### Returns `Promise`\<`` `0x${string}` ``\> ###### Inherited from [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`call`](https://lcp.integraledger.com/reference/api/evm.md#call) ##### logs() > **logs**(`filter`): `Promise`\ `eth_getLogs` over `[fromBlock, toBlock]`: `address` absent reads every contract, and each topic is matched by its position, `null` matching any. ###### Parameters | Parameter | Type | | ------ | ------ | | `filter` | \{ `address?`: `` `0x${string}` ``; `fromBlock`: `bigint`; `toBlock`: `bigint`; `topics`: readonly (`` `0x${string}` `` \| `null`)[]; \} | | `filter.address?` | `` `0x${string}` `` | | `filter.fromBlock` | `bigint` | | `filter.toBlock` | `bigint` | | `filter.topics` | readonly (`` `0x${string}` `` \| `null`)[] | ###### Returns `Promise`\ ###### Overrides [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`logs`](https://lcp.integraledger.com/reference/api/evm.md#logs) ##### raw() > **raw**(`tx`): `Promise`\<`` `0x${string}` `` \| `null`\> `eth_getRawTransactionByHash`: the signed transaction's bytes; null when the node holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<`` `0x${string}` `` \| `null`\> ##### receipt() > **receipt**(`tx`): `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> `eth_getTransactionReceipt`; null when the node holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> ###### Inherited from [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`receipt`](https://lcp.integraledger.com/reference/api/evm.md#receipt) ##### transaction() > **transaction**(`tx`): `Promise`\<[`EvmTransaction`](https://lcp.integraledger.com/reference/api/evm.md#evmtransaction) \| `null`\> `eth_getTransactionByHash`: the sender, the recipient (null for a contract creation) and the calldata; null when none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmTransaction`](https://lcp.integraledger.com/reference/api/evm.md#evmtransaction) \| `null`\> ###### Inherited from [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#transaction) *** ### GatewayChargeChoice The buyer's inputs to the Gateway build: the chosen challenge; `sourceNetwork`, the CAIP-2 network the burn intent spends from, for which the next two were read; the `burnIntentExpirationHeight` Circle Gateway's `GET /v1/info` serves for that network; and that network's Gateway Wallet's `withdrawalDelay()`, in blocks, each of the two a decimal string below 2^256. #### Properties | Property | Type | | ------ | ------ | | `burnIntentExpirationHeight` | `string` | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `sourceNetwork` | `string` | | `withdrawalDelay` | `string` | *** ### GatewaySaltInput The inputs of `usdc`'s Gateway salt, every one a string. #### Properties | Property | Type | | ------ | ------ | | `amount` | `string` | | `destinationNetwork` | `string` | | `destinationRecipient` | `string` | | `id` | `string` | | `maxFee` | `string` | | `realm` | `string` | | `recipient` | `string` | | `requestHash` | `` `0x${string}` `` | | `sourceDepositor` | `string` | | `sourceNetwork` | `string` | | `sourceSigner` | `string` | *** ### HederaSessionUnsigned A Hedera escrow channel opening for the payer's signer: two calls broadcast in order, and the zero voucher to sign. No pairing's `build` in this package answers this kind. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.calls` | `object`[] | | `request.chainId` | `295` \| `296` | | `request.kind` | `"hedera-session-open"` | | `request.voucher` | [`HederaVoucherTypedData`](https://lcp.integraledger.com/reference/api/hedera.md#hederavouchertypeddata) | #### Methods ##### complete() > **complete**(`signed`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The opening's credential for the broadcast transaction's hash and the zero voucher's signature. A credential over the credential size bound, 64 KiB, its echoed challenge included, is `mpp/credential-malformed`, as `bound` refuses it. ###### Parameters | Parameter | Type | | ------ | ------ | | `signed` | \{ `openTx`: `` `0x${string}` ``; `signature`: `` `0x${string}` ``; \} | | `signed.openTx` | `` `0x${string}` `` | | `signed.signature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### HederaStockReader The reader of a stock session: the network's JSON-RPC relay, and three reads of its mirror. Every failure rejects. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/mpp.md#hederanetwork) | #### Methods ##### account() > **account**(`address`): `Promise`\<`string` \| `null`\> `GET /api/v1/accounts/{address}` of the mirror: the account id its `account` member names, `shard.realm.num`; null on the mirror's 404. ###### Parameters | Parameter | Type | | ------ | ------ | | `address` | `` `0x${string}` `` | ###### Returns `Promise`\<`string` \| `null`\> ##### contractResult() > **contractResult**(`tx`): `Promise`\<`string` \| `null`\> `GET /api/v1/contracts/results/{transactionIdOrHash}` of the mirror for the transaction hash: the answer's `result`, the transaction's result as the network records it, `CONTRACT_REVERT_EXECUTED` for a revert executed in the EVM; null on the mirror's 404. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<`string` \| `null`\> ##### oldestBlock() > **oldestBlock**(): `Promise`\<`bigint` \| `"archival"`\> The number of the oldest block the mirror holds, from which the relay answers, `number` of `GET /api/v1/blocks?order=asc&limit=1`, or `archival` where the endpoint is declared archival. ###### Returns `Promise`\<`bigint` \| `"archival"`\> ##### receipt() > **receipt**(`tx`): `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> `eth_getTransactionReceipt` through the relay; null when it holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> ##### transaction() > **transaction**(`tx`): `Promise`\<\{ `input`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; \} \| `null`\> `eth_getTransactionByHash` through the relay: the recipient and the calldata the sender signed; null when none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<\{ `input`: `` `0x${string}` ``; `to`: `` `0x${string}` `` \| `null`; \} \| `null`\> *** ### HederaStockRef The read keys of a stock opening: the network, the opening's transaction hash its credential names, the escrow the challenge names, the channel the credential names, and the challenge's `recipient`, the payee. Addresses and hashes are lowercase. The position the opening must come after, the relay's block number read when the agreement settled, is the caller's. #### Properties | Property | Type | | ------ | ------ | | `channel` | `` `0x${string}` `` | | `escrow` | `` `0x${string}` `` | | `network` | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/mpp.md#hederanetwork) | | `payee` | `` `0x${string}` `` | | `transaction` | `` `0x${string}` `` | *** ### LandedCredential A push credential with a landed EVM transaction, its block and its receipt's logs under `FETCHED`. No pairing's `fetchPresented` in this package writes it. #### Extends - [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) #### Properties | Property | Type | Inherited from | | ------ | ------ | ------ | | `[FETCHED]` | `object` | - | | `[FETCHED].blockNumber` | `bigint` | - | | `[FETCHED].logs` | readonly [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog)[] | - | | `[FETCHED].transaction` | `` `0x${string}` `` | - | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`challenge`](https://lcp.integraledger.com/reference/api/mpp.md#property-challenge-4) | | `payload` | `object` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`payload`](https://lcp.integraledger.com/reference/api/mpp.md#property-payload-1) | | `source?` | `string` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`source`](https://lcp.integraledger.com/reference/api/mpp.md#property-source-1) | *** ### LcpHederaChoice The buyer's inputs to `build`: the paying account, the node, the valid start, the maximum fee and, for a token, its decimals. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - | | `decimals?` | `number` | A token's decimals, written as the token list's `expected_decimals`. | | `maxFee` | `bigint` | The most the fee payer pays, in tinybars. | | `node` | `string` | The node the body is for, `shard.realm.num`. | | `payer` | `string` | The buyer's account, `shard.realm.num`: the one account the body debits. | | `validStart` | `object` | - | | `validStart.nanos` | `number` | - | | `validStart.seconds` | `bigint` | - | *** ### LcpHederaLanded What `fetchPresented` writes under `FETCHED` for a `hash` credential: the landed `SUCCESS` entry. #### Properties | Property | Type | | ------ | ------ | | `entry` | [`MirrorEntry`](https://lcp.integraledger.com/reference/api/hedera.md#mirrorentry) | *** ### LcpHederaUnsigned The body the buyer signs, and how its signature completes the credential. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.bodyBytes` | `Uint8Array`\<`ArrayBuffer`\> | | `request.kind` | `"hedera-body"` | #### Methods ##### complete() > **complete**(`s`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The credential `{type: "transaction", transaction}`, `transaction` the base64 of the wire `Transaction` the one signature completes, measured against the credential bound (`mpp/credential-malformed`); a signature pair of the wrong key or signature length is `hedera/tx-malformed`. ###### Parameters | Parameter | Type | | ------ | ------ | | `s` | \{ `publicKey`: `Uint8Array`; `signature`: `Uint8Array`; `type`: `"ed25519"` \| `"ecdsa-secp256k1"`; \} | | `s.publicKey` | `Uint8Array` | | `s.signature` | `Uint8Array` | | `s.type` | `"ed25519"` \| `"ecdsa-secp256k1"` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### LcpValidation What a rail's `validate` answers for a payment that passes every check it made: H, and each check it did not make for want of a reader, by name. A party submits only on an answer whose `notMade` is empty. #### Properties | Property | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | | `notMade` | readonly `string`[] | *** ### MppChallenge A challenge's auth-params after quoted-string unescaping. `request` and `opaque` are base64url-nopad JSON. #### Properties | Property | Type | | ------ | ------ | | `description?` | `string` | | `digest?` | `string` | | `expires?` | `string` | | `header?` | `string` | | `id?` | `string` | | `intent` | `string` | | `method` | `string` | | `opaque?` | `string` | | `realm` | `string` | | `request` | `string` | *** ### MppChoice The buyer's inputs to `build`. `build` holds the chosen challenge as `bound` holds an echoed one (`chosenHeld`), from a snapshot of its own members that the credential carries, checks the other inputs' form and that the challenge's id carries H; it compares no deal value. #### Extended by - [`SessionChoice`](https://lcp.integraledger.com/reference/api/mpp.md#sessionchoice) #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - | | `from` | `` `0x${string}` `` | - | | `now` | `number` | - | | `spender?` | `` `0x${string}` `` | permit2 only: the seller server's submitting address. | | `tokenDomain?` | `object` | authorization only: the token's EIP-712 name and version. | | `tokenDomain.name` | `string` | - | | `tokenDomain.version` | `string` | - | *** ### MppCredential An MPP credential, as the buyer presents it: the challenge it answers, echoed with its `id`; an optional `source` naming the payer, where the method writes one; and the method's `payload`. #### Extended by - [`LandedCredential`](https://lcp.integraledger.com/reference/api/mpp.md#landedcredential) - [`TempoLandedCredential`](https://lcp.integraledger.com/reference/api/mpp.md#tempolandedcredential) - [`SolanaTablesCredential`](https://lcp.integraledger.com/reference/api/mpp.md#solanatablescredential) #### Properties | Property | Type | | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `payload` | `object` | | `source?` | `string` | *** ### MppEip3009Ref The reference an MPP EIP-3009 charge's read takes; the pairing's `reference` writes it. #### Extends - [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `authorization` | `readonly` | `object` | The challenge's `currency`, the token under whose domain the payer signed, which records the nonce's use. | - | | `authorization.at` | `readonly` | `` `0x${string}` `` | - | - | | `authorization.deadline` | `readonly` | `string` | - | - | | `authorization.nonce` | `readonly` | `` `0x${string}` `` | - | - | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`network`](https://lcp.integraledger.com/reference/api/mpp.md#property-network) | | `payee` | `readonly` | `string` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`payee`](https://lcp.integraledger.com/reference/api/mpp.md#property-payee) | | `payer` | `readonly` | `` `0x${string}` `` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`payer`](https://lcp.integraledger.com/reference/api/mpp.md#property-payer) | | `presented` | `readonly` | [`Signed`](https://lcp.integraledger.com/reference/api/mpp.md#signed) | The members of the payment presented: the token, `from`, `to`, `value` and `nonce`, lowercase, `value` in decimal. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed. | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`transaction`](https://lcp.integraledger.com/reference/api/mpp.md#property-transaction) | *** ### MppNamedRef The reference the named-transaction read takes: the transaction the credential carries or names, its payer, the payee. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `network` | `readonly` | `` `eip155:${string}` `` | - | | `payee` | `readonly` | `string` | - | | `payer` | `readonly` | `` `0x${string}` `` | - | | `transaction` | `readonly` | `` `0x${string}` `` | The transaction the credential names (`hash`) or carries (`transaction`, by the hash of its signed bytes). | *** ### MppPermit2Ref The reference the MPP Permit2 charge's read takes; the pairing's `reference` writes it. #### Extends - [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `authorization` | `readonly` | `object` | The Permit2 deployment that records the owner's nonce, the nonce, and the permit's `deadline`. | - | | `authorization.at` | `readonly` | `` `0x${string}` `` | - | - | | `authorization.deadline` | `readonly` | `string` | - | - | | `authorization.nonce` | `readonly` | `` `0x${string}` `` | - | - | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`network`](https://lcp.integraledger.com/reference/api/mpp.md#property-network) | | `payee` | `readonly` | `string` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`payee`](https://lcp.integraledger.com/reference/api/mpp.md#property-payee) | | `payer` | `readonly` | `` `0x${string}` `` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`payer`](https://lcp.integraledger.com/reference/api/mpp.md#property-payer) | | `presented` | `readonly` | [`Signed`](https://lcp.integraledger.com/reference/api/mpp.md#signed) | The members of the payment presented: the permit's `permitted` list (`token:amount`, comma-separated), `nonce` and `deadline`, the `owner`, the transfer details (`to:requestedAmount`, comma-separated) and the witness's hash. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed. | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`transaction`](https://lcp.integraledger.com/reference/api/mpp.md#property-transaction) | | `witnesses?` | `readonly` | readonly `` `0x${string}` ``[] | The witness words the search counts: the chosen challenge's, and each of the other challenges of the sale's issue on this pairing and chain that `reference` was given. Absent, the presented `witness` alone. | - | *** ### MppSessionOpeningRef The reference the EVM session's opening read takes; the pairing's `reference` writes it. #### Extends - [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `funding` | `readonly` | `object` | The funding the payer signed: its type; the challenge's `currency`; the contract that keeps its single-use value, the token for an `authorization` and the Permit2 deployment for a `permit2`; that value, the authorization's nonce or the permit's nonce as a 32-byte word; and its signed bound, `validBefore` or `deadline`, in decimal. | - | | `funding.at` | `readonly` | `` `0x${string}` `` | - | - | | `funding.deadline` | `readonly` | `string` | - | - | | `funding.nonce` | `readonly` | `` `0x${string}` `` | - | - | | `funding.token` | `readonly` | `` `0x${string}` `` | - | - | | `funding.type` | `readonly` | `"permit2"` \| `"authorization"` | - | - | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`network`](https://lcp.integraledger.com/reference/api/mpp.md#property-network) | | `opens` | `readonly` | `object` | The escrow, the channel the opening opens, H and the chain. | - | | `opens.chainId` | `readonly` | `number` | - | - | | `opens.channel` | `readonly` | `` `0x${string}` `` | - | - | | `opens.escrow` | `readonly` | `` `0x${string}` `` | - | - | | `opens.h` | `readonly` | `` `0x${string}` `` | - | - | | `payee` | `readonly` | `string` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`payee`](https://lcp.integraledger.com/reference/api/mpp.md#property-payee) | | `payer` | `readonly` | `` `0x${string}` `` | - | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`payer`](https://lcp.integraledger.com/reference/api/mpp.md#property-payer) | | `presented` | `readonly` | [`Signed`](https://lcp.integraledger.com/reference/api/mpp.md#signed) | The members of the payment presented, lowercase, numbers in decimal: `funding`, the type; on an `authorization` the token, `from`, `to` and `value` and `nonce`, EIP-3009's members; on a `permit2` the token, `amount`, `nonce`, `deadline`, `spender` and `owner`, and `witness`, the witness's `payee:salt:authorizedSigner`. | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed. | [`ChargeRefBase`](https://lcp.integraledger.com/reference/api/mpp.md#chargerefbase).[`transaction`](https://lcp.integraledger.com/reference/api/mpp.md#property-transaction) | *** ### NearIntentsRef The read keys of a NEAR Intents deposit: the origin network the challenge names, `methodDetails.originNetwork`, and the deposit's transaction hash as the credential presents it, in that network's spelling. The pairing has no `status`, so the reference names no payee. #### Properties | Property | Type | | ------ | ------ | | `network` | `string` | | `transaction` | `string` | *** ### RailSessionChoice The buyer's inputs to a session opening's `build`. The deposit and the XRPL channel terms are the funder's. #### Properties | Property | Type | | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `deposit` | `bigint` | | `from` | `string` | | `now` | `number` | | `xrpl?` | `object` | | `xrpl.cancelAfter?` | `number` | | `xrpl.fee` | `string` | | `xrpl.lastLedgerSequence` | `number` | | `xrpl.publicKey` | `string` | | `xrpl.sequence` | `number` | | `xrpl.settleDelay` | `number` | *** ### Seen A transaction a read met, as the pairing's read classified it against the reference and the option. #### Type Parameters | Type Parameter | | ------ | | `Position` | | `Mark` | #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `account` | `readonly` | `"none"` \| `"other"` \| `"payee"` | The account it names against the option's payee's: `none` where it names no account. For a transaction with a failed result, which moved nothing, the destination in what the payer signed, as the pairing identifies it. | | `authority?` | `readonly` | `string` | - | | `carries` | `readonly` | `boolean` | Whether it carries H, or for an agreement on a pairing that has one, the agreement's own value. | | `consumed` | `readonly` | `boolean` | Whether it consumed the act's single-use value. | | `given?` | `readonly` | `boolean` | True where the pairing's read matched it to an other act the caller gave by its reference. | | `kind` | `readonly` | `"other"` \| `"same"` | Whether it is an act of the reference's pairing and of the act's kind. | | `mark` | `readonly` | `Mark` | The highest mark the read reached for it. | | `moved?` | `readonly` | readonly [`Moved`](https://lcp.integraledger.com/reference/api.md#moved)[] | - | | `named?` | `readonly` | `string` | The account it names apart from what it moved, where the read records one, as `Named.named` states it. | | `party` | `readonly` | `"other"` \| `"payer"` \| `"payee"` | Its signer against the reference's payer and the option's payee. | | `position?` | `readonly` | `Position` | - | | `presented` | `readonly` | `"no"` \| `"yes"` \| `"unshown"` | Whether the message signed in it equals, member by member as the pairing's form names them, the payment presented: `yes`; `no` where a member differs; `unshown` where the read could not read every member. A `settled` answer states the act's. | | `result` | `readonly` | `"failed"` \| `"succeeded"` | `succeeded`, or included with a failed result. | | `signer?` | `readonly` | `string` | - | | `transaction` | `readonly` | `string` | - | *** ### SessionChoice The buyer's inputs to `build`. `build` checks their form and that the chosen challenge's id carries H; it compares no deal value. #### Extends - [`MppChoice`](https://lcp.integraledger.com/reference/api/mpp.md#mppchoice) #### Properties | Property | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | | `authorizedSigner?` | `` `0x${string}` `` | sessions: default the zero address, which means the payer. | - | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - | [`MppChoice`](https://lcp.integraledger.com/reference/api/mpp.md#mppchoice).[`challenge`](https://lcp.integraledger.com/reference/api/mpp.md#property-challenge-3) | | `credentialType?` | `"permit2"` \| `"authorization"` | EVM: default the first listed type. | - | | `deposit?` | `bigint` | sessions: the buyer's deposit; `suggestedDeposit` is advice. | - | | `from` | `` `0x${string}` `` | - | [`MppChoice`](https://lcp.integraledger.com/reference/api/mpp.md#mppchoice).[`from`](https://lcp.integraledger.com/reference/api/mpp.md#property-from) | | `now` | `number` | - | [`MppChoice`](https://lcp.integraledger.com/reference/api/mpp.md#mppchoice).[`now`](https://lcp.integraledger.com/reference/api/mpp.md#property-now) | | `spender?` | `` `0x${string}` `` | permit2 only: the seller server's submitting address. | [`MppChoice`](https://lcp.integraledger.com/reference/api/mpp.md#mppchoice).[`spender`](https://lcp.integraledger.com/reference/api/mpp.md#property-spender) | | `tokenDomain?` | `object` | authorization only: the token's EIP-712 name and version. | [`MppChoice`](https://lcp.integraledger.com/reference/api/mpp.md#mppchoice).[`tokenDomain`](https://lcp.integraledger.com/reference/api/mpp.md#property-tokendomain) | | `tokenDomain.name` | `string` | - | - | | `tokenDomain.version` | `string` | - | - | *** ### SessionRef The settlement read keys of these pairings. #### Extends - [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) #### Properties | Property | Modifier | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | ------ | | `accessKey?` | `public` | `object` | The subscription's access key: its id, the token it spends, and `transferDigest({to: recipient})`; `expiry`, the key authorization's signed expiry in decimal Unix seconds, absent where it signs none. With `account`, the read keys of a transfer made under the key for that account. | - | | `accessKey.account?` | `public` | `` `0x${string}` `` | - | - | | `accessKey.expiry?` | `public` | `string` | - | - | | `accessKey.keyId` | `public` | `` `0x${string}` `` | - | - | | `accessKey.to` | `public` | `` `0x${string}` `` | - | - | | `accessKey.token` | `public` | `` `0x${string}` `` | - | - | | `authorization?` | `public` | [`PullAuthorization`](https://lcp.integraledger.com/reference/api/evm.md#pullauthorization) | The signed pull authorization and where the chain records its use, where the pairing's reference records one. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`authorization`](https://lcp.integraledger.com/reference/api/evm.md#property-authorization) | | `bindingLog?` | `public` | \{ address: \`0x$\{string\}\`; topic0: \`0x$\{string\}\`; value: \`0x$\{string\}\`; \} & (\{ index: 2 \| 1 \| 3; \} \| \{ dataWord: number; \}) | The log carrying H or its commitment: in topic `index`, or in 32-byte data word `dataWord`. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`bindingLog`](https://lcp.integraledger.com/reference/api/evm.md#property-bindinglog) | | `closes?` | `public` | `object` | The close of an EVM session: a call to `escrow` of one of `EVM_CLOSE_SELECTORS` naming `channel`. | - | | `closes.channel` | `public` | `` `0x${string}` `` | - | - | | `closes.escrow` | `public` | `` `0x${string}` `` | - | - | | `funding?` | `public` | `object` | The EVM opening's funding, as `MppSessionOpeningRef` names it: its type, token, value's keeper, nonce and bound. | - | | `funding.at` | `readonly` | `` `0x${string}` `` | - | - | | `funding.deadline` | `readonly` | `string` | - | - | | `funding.nonce` | `readonly` | `` `0x${string}` `` | - | - | | `funding.token` | `readonly` | `` `0x${string}` `` | - | - | | `funding.type` | `readonly` | `"permit2"` \| `"authorization"` | - | - | | `network` | `public` | `` `eip155:${string}` `` \| [`HederaNetwork`](https://lcp.integraledger.com/reference/api/evm.md#hederanetwork) | - | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-6) | | `nonce?` | `public` | `object` | On a Tempo session, the opening transaction's single-use value: its nonce key and nonce, in decimal, and its signed `validBefore` in decimal Unix seconds, absent where it signs none. `status` reads the value by its key at the final mark and at the latest head, through a reader that reads a block's state (`TempoSearchReader`). | - | | `nonce.key` | `public` | `string` | - | - | | `nonce.value` | `public` | `string` | - | - | | `opened?` | `public` | `object` | - | - | | `opened.address` | `public` | `` `0x${string}` `` | - | - | | `opened.chainId` | `public` | `number` | - | - | | `opened.channel` | `public` | `` `0x${string}` `` | - | - | | `opened.h` | `public` | `` `0x${string}` `` | - | - | | `opened.version` | `public` | `"v1"` \| `"v2"` | - | - | | `opens?` | `public` | `object` | The opening of an EVM session: the escrow's open call whose salt is `h`, and whose payer, payee, token and authorized signer, with `h`, the escrow and `chainId`, give `channel`. With `payer`, `funding` and `presented`, `status` reads the opening by its funding (`mppSessionOpeningStatus`). | - | | `opens.chainId` | `public` | `number` | - | - | | `opens.channel` | `public` | `` `0x${string}` `` | - | - | | `opens.escrow` | `public` | `` `0x${string}` `` | - | - | | `opens.h` | `public` | `` `0x${string}` `` | - | - | | `payee` | `public` | `string` | The option's payee, which `reference` takes from the option the payment answers. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-5) | | `payer?` | `public` | `` `0x${string}` `` | The payer: on a Tempo session the sender of the opening's transaction, recovered from its `0x76` form, on an EVM session the account its authorization or permit is signed by, and on a subscription the account whose root key signed the key authorization (`keyAuthorizationSigner`). With `opened`, `status` reads the Tempo opening by the search for its `ChannelOpened` (`tempoOpeningStatus`); with a binding log under `KeyAuthorizationWitness`, the activation by the search for that log (`activationStatus`). | - | | `presented?` | `public` | `Readonly`\<`Record`\<`string`, `string`\>\> | The members of the EVM opening's payment presented, as `MppSessionOpeningRef` names them. | - | | `revokes?` | `public` | `object` | The close of a subscription: the account keychain's `KeyRevoked` whose topic 1 is `account` and topic 2 `keyId`. | - | | `revokes.account` | `public` | `` `0x${string}` `` | - | - | | `revokes.keyId` | `public` | `` `0x${string}` `` | - | - | | `search?` | `public` | `object` | The log filter that finds the transaction when none is named; absent, only a named transaction is read. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`search`](https://lcp.integraledger.com/reference/api/evm.md#property-search) | | `search.address` | `public` | `` `0x${string}` `` | - | - | | `search.topics` | `public` | readonly (`` `0x${string}` `` \| `null`)[] | - | - | | `settleBy?` | `public` | `string` | Decimal Unix seconds after which the payment can no longer execute. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`settleBy`](https://lcp.integraledger.com/reference/api/evm.md#property-settleby-1) | | `signed?` | `public` | `` `0x${string}` `` | What the payer signed, as presented: on a Tempo session `expiringNonceHash` over the opening transaction's sender-signed fields, in the `0x76` form whatever envelope carried it, under its sender; on a subscription keccak-256 over the signed key authorization's bytes, the authorization and its root signature whole. A reference that `status` reads by the search, with `payer`, holds it, and one without it is `unparseable`. | - | | `transaction?` | `public` | `` `0x${string}` `` | The transaction the credential presents, where the payer broadcast the opening before presenting it. | - | | `transferLog?` | `public` | [`TransferLog`](https://lcp.integraledger.com/reference/api/evm.md#transferlog) | The token transfer this payment made, identified by the digest of the named fields. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref).[`transferLog`](https://lcp.integraledger.com/reference/api/evm.md#property-transferlog) | | `validBefore?` | `public` | `string` | - | - | *** ### SessionWithin The buyer's inputs to an in-channel payment: the within 402's challenge, which the in-channel credential echoes as `buildWithin` reads it, a snapshot of its own members (`withinChecks`); the held opening, exactly as signed; the cumulative amount to sign; and the action. #### Properties | Property | Type | | ------ | ------ | | `action` | `"close"` \| `"voucher"` | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `cumulativeAmount` | `bigint` | | `opening` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) | *** ### SessionWithinUnsigned One signing request; `complete` takes its one signature and returns the in-channel credential, measured as `bound` measures every credential: one over the credential size bound, 64 KiB, its challenge included, is `mpp/credential-malformed`, as each session pairing's `channel.kind`, `channel.ref` and `channel.boundWithin` refuse it. #### Properties | Property | Type | | ------ | ------ | | `requests` | readonly [`WithinSigningRequest`](https://lcp.integraledger.com/reference/api/mpp.md#withinsigningrequest)[] | #### Methods ##### complete() > **complete**(`signatures`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) ###### Parameters | Parameter | Type | | ------ | ------ | | `signatures` | readonly `string`[] | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### SolanaChargeChoice The buyer's inputs to `build`. The request's `decimals`, `tokenProgram` and `recentBlockhash` win when present. #### Properties | Property | Type | | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `computeUnitLimit?` | `number` | | `computeUnitPrice?` | `bigint` | | `decimals?` | `number` | | `payer` | `string` | | `recentBlockhash?` | `string` | | `tokenProgram?` | `string` | *** ### SolanaChargeUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.kind` | `"solana-message"` | | `request.message` | `Uint8Array`\<`ArrayBuffer`\> | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The payer's 64-byte Ed25519 signature over `message`. A credential over the credential size bound, 64 KiB, its echoed challenge included, is `mpp/credential-malformed`, as `bound` refuses it. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### SolanaSessionChoice The buyer's inputs to the memo session's `build`. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `authorizedSigner` | `string` | The session key that signs vouchers. | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - | | `deposit?` | `bigint` | The deposit; the request's `cap` where absent. | | `gracePeriod?` | `number` | The close's grace period in seconds; 900 where absent, as the stock client opens. | | `mint?` | `string` | The mint the request's `currency` names: the currency itself where it is a key, else the caller's resolution. | | `openSlot?` | `bigint` | The channel's `openSlot`; the request's `recentSlot` wins when present. | | `payer` | `string` | The payer, whose token account funds the deposit. | | `recentBlockhash?` | `string` | The request's `recentBlockhash` wins when present. | | `salt` | `bigint` | The PDA salt; lcp draws nothing. | | `tokenProgram?` | `string` | Token where absent. | *** ### SolanaSessionUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | - | | `request.channel` | `string` | - | | `request.kind` | `"solana-session-open"` | - | | `request.message` | `Uint8Array`\<`ArrayBuffer`\> | The message the payer signs: the stock `open` with one Memo instruction carrying H's LCP string. | | `request.size` | `number` | The composed transaction's size in bytes, its two signatures included, at most 1,232. | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The open credential for the payer's 64-byte Ed25519 signature over `message`, the operator's slot left zero. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### SolanaTablesCredential A Solana channel opening with its message's address lookup tables under `FETCHED`. No pairing in this package writes or reads it. #### Extends - [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) #### Properties | Property | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | | `[FETCHED]` | `object` | - | - | | `[FETCHED].tables` | readonly `object`[] | For each address table lookup of the opening's message, in order: the table's address, and the table's entries at the lookup's writable and read-only indexes, in order, each a base58 key. Empty for a message without lookups. | - | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | - | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`challenge`](https://lcp.integraledger.com/reference/api/mpp.md#property-challenge-4) | | `payload` | `object` | - | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`payload`](https://lcp.integraledger.com/reference/api/mpp.md#property-payload-1) | | `source?` | `string` | - | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`source`](https://lcp.integraledger.com/reference/api/mpp.md#property-source-1) | *** ### StacksChargeChoice The buyer's inputs to the Stacks build: the chosen challenge and the payer's c32 standard principal. #### Properties | Property | Type | | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `from` | `string` | *** ### StripeSubscriptionReceipt The Stripe subscription's activation receipt: the `Payment-Receipt` payload the seller's server answered the opening with, decoded from its base64url JSON (or the MCP transport's receipt object as given). `channel.ref` takes it with the opening. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `externalId?` | `string` | - | | `method` | `"stripe"` | - | | `reference` | `string` | The Stripe invoice whose payment activated the subscription. | | `status` | `"success"` | - | | `stripeSubscription` | `string` | The Stripe subscription ID. | | `subscriptionId` | `string` | The seller's own identifier for the subscription. | | `timestamp` | `string` | - | *** ### TempoLandedCredential A push credential with the named transaction's receipt and signed bytes under `FETCHED`. #### Extends - [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) #### Properties | Property | Type | Inherited from | | ------ | ------ | ------ | | `[FETCHED]` | `object` | - | | `[FETCHED].blockNumber` | `bigint` | - | | `[FETCHED].logs` | readonly [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog)[] | - | | `[FETCHED].raw` | `` `0x${string}` `` | - | | `[FETCHED].transaction` | `` `0x${string}` `` | - | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`challenge`](https://lcp.integraledger.com/reference/api/mpp.md#property-challenge-4) | | `payload` | `object` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`payload`](https://lcp.integraledger.com/reference/api/mpp.md#property-payload-1) | | `source?` | `string` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential).[`source`](https://lcp.integraledger.com/reference/api/mpp.md#property-source-1) | *** ### TempoSplitLanded What the caller adds to the reference: the act's own transaction where it knows it, on pull the one it broadcast. #### Properties | Property | Type | | ------ | ------ | | `transaction?` | `` `0x${string}` `` | *** ### TempoSplitRef The read keys of a split-memo payment: the network, the payer (the transaction's sender), the option's payee (the request's `recipient`), the token the split names (`currency`), H, the signed `validBefore` in decimal Unix seconds (absent where the transaction signs none), the transaction's own nonce, its key and value in decimal, and the payment presented: `signed`, the hash over the fields the sender signed, in the `0x76` form whatever envelope carried them, as `expiringNonceHash` computes it; on push also `named`, the transaction the credential names. #### Properties | Property | Type | | ------ | ------ | | `currency` | `` `0x${string}` `` | | `h` | `` `0x${string}` `` | | `named?` | `` `0x${string}` `` | | `network` | `` `eip155:${number}` `` | | `nonce` | `object` | | `nonce.key` | `string` | | `nonce.value` | `string` | | `payee` | `` `0x${string}` `` | | `payer` | `` `0x${string}` `` | | `signed` | `` `0x${string}` `` | | `validBefore?` | `string` | *** ### TokenDomain The token's EIP-712 domain `name` and `version`, which x402's verification reads from `extra` and no MPP challenge carries. #### Properties | Property | Type | | ------ | ------ | | `name` | `string` | | `version` | `string` | *** ### VoucherTypedData #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `number` | | `domain.name` | `"EVM Payment Channel"` \| `"Tempo Stream Channel"` \| `"TIP20 Channel Reserve"` | | `domain.verifyingContract` | `` `0x${string}` `` | | `domain.version` | `"1"` | | `message` | `object` | | `message.channelId` | `` `0x${string}` `` | | `message.cumulativeAmount` | `bigint` | | `primaryType` | `"Voucher"` | | `types` | `object` | | `types.Voucher` | \[\{ `name`: `"channelId"`; `type`: `"bytes32"`; \}, \{ `name`: `"cumulativeAmount"`; `type`: `"uint128"` \| `"uint96"`; \}\] | *** ### X402Mapped x402's `exact` EIP-3009 payment and the requirements it answers, from one MPP credential. #### Properties | Property | Type | | ------ | ------ | | `paymentPayload` | [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) | | `paymentRequirements` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | *** ### XrplChargeChoice The buyer's inputs to `build`: the paying account and the buyer's own reads of fee, sequence and ledger. #### Properties | Property | Type | | ------ | ------ | | `account` | `string` | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) & `object` | | `fee` | `string` | | `lastLedgerSequence` | `number` | | `sequence` | `number` | *** ### XrplChargeUnsigned #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.kind` | `"xrpl-tx"` | | `request.txJson` | [`XrplTxJson`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpltxjson) | #### Methods ##### complete() > **complete**(`signedBlob`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential)\> The wallet's signed blob, hex, as a credential that names its payer by `source`, `did:pkh:xrpl:{network}:{account}`, the challenge's network name and the account `build` was given, as the stock client writes it and the stock server reads it first (`xrpl-mpp-sdk` 0.1.0-beta.4, `dist/client/index.js:376-385`, `dist/chunk-ZKD7D3D6.js:149-170`). It is read as `bound` reads the credential, in its order: a credential over the credential size bound, 64 KiB, its echoed challenge and `source` included, is `mpp/credential-malformed`; a blob that does not decode gets the refusal `bound` gives it (one over 8,192 hex digits, the stock server's bound, is `xrpl/blob-too-large`, and one that is not hex bytes `xrpl/blob-malformed`); and one whose `NetworkID` the challenge's network does not take is `xrpl/network-mismatch`. ###### Parameters | Parameter | Type | | ------ | ------ | | `signedBlob` | `string` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential)\> *** ### XrplSessionUnsigned An XRPL `PaymentChannelCreate` for the wallet to sign, and the first claim's bytes. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.claim` | `object` | | `request.claim.bytes` | `Uint8Array`\<`ArrayBuffer`\> | | `request.claim.channelId` | `string` | | `request.claim.drops` | `bigint` | | `request.kind` | `"xrpl-session-open"` | | `request.txJson` | [`XrplTxJson`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpltxjson) | #### Methods ##### complete() > **complete**(`signed`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `signed` | \{ `claimSignature`: `string`; `signedBlob`: `string`; \} | | `signed.claimSignature` | `string` | | `signed.signedBlob` | `string` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential)\> ## Type Aliases ### EvmMoved > **EvmMoved** = [`Moved`](https://lcp.integraledger.com/reference/api.md#moved) & `object` One transfer an act made, named by its transaction and its `Transfer` log's position among the receipt's logs. #### Type Declaration | Name | Type | | ------ | ------ | | `place` | `number` | | `transaction` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | *** ### GatewayPreimage > **GatewayPreimage** = `Pick`\<[`GatewaySaltInput`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaysaltinput), `"id"` \| `"realm"` \| `"requestHash"` \| `"recipient"`\> The salt's inputs a Gateway signing request carries from the chosen challenge. *** ### HederaNetwork > **HederaNetwork** = `"hedera:mainnet"` \| `"hedera:testnet"` \| `"hedera:previewnet"` \| `"hedera:devnet"` *** ### HederaQuery > **HederaQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`LcpHederaRef`](https://lcp.integraledger.com/reference/api/mpp.md#lcphederaref), `string`, `"consensus"`, `string`\> *** ### HederaStockStatus > **HederaStockStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, `"finalized"`, `bigint`\> What `status` answers: positions are the relay's block numbers, and its one mark `finalized`, which is final. *** ### LcpHederaRef > **LcpHederaRef** = [`HederaRef`](https://lcp.integraledger.com/reference/api/hedera.md#hederaref) & `object` The read keys of a presented payment: `HederaRef`; for a `transaction` credential `bodyDigest`, the SHA-256 of the signed body's bytes, which with the network, the debited account and the transaction id names the instrument; and `named` where the credential is a `hash` one, which presents the transaction its payer broadcast and nothing beside it. #### Type Declaration | Name | Type | | ------ | ------ | | `bodyDigest?` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | | `named?` | `true` | *** ### LcpRail > **LcpRail** = `"hedera"` \| `"stellar"` The rails the method names in `methodDetails.rail`. *** ### MppEvmReader > **MppEvmReader** = [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader) & `object` The reader of an MPP EVM charge's read: `EvmSearchReader`, and `archival`, set where the seller declares the endpoint archival, by which a lookup at coverage `none` shows that it holds the history its transaction would be in. #### Type Declaration | Name | Type | | ------ | ------ | | `archival?` | `boolean` | *** ### MppEvmStatus > **MppEvmStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\> What an MPP EVM charge's `status` answers: `read-status`'s answer, with `presented` on `settled`. *** ### MppIntent > **MppIntent** = `"charge"` \| `"session"` \| `"subscription"` *** ### MppMethod > **MppMethod** = `"evm"` \| `"tempo"` \| `"solana"` \| `"lightning"` \| `"card"` \| `"stripe"` \| `"usdc"` \| `"nearintents"` \| `"stellar"` \| `"xrpl"` \| `"hedera"` \| `"lcp"` The MPP payment methods this package knows a challenge's `method` as: the methods of a checked challenge (`Checked.method`) and the keys of `CARRIER`. *** ### MppPairingId > **MppPairingId** = `"mpp/charge/evm/permit2"` \| `"mpp/charge/evm/authorization"` \| `"mpp/charge/evm/transaction"` \| `"mpp/charge/evm/hash"` \| `"mpp/session/evm"` \| `"mpp/charge/tempo/split-memo"` \| `"mpp/charge/tempo/split-memo/push"` \| `"mpp/session/tempo"` \| `"mpp/subscription/tempo"` \| `"mpp/charge/lightning"` \| `"mpp/session/lightning"` \| `"mpp/charge/solana"` \| `"mpp/charge/solana/unsponsored"` \| `"mpp/subscription/solana"` \| `"mpp/session/solana/memo"` \| `"mpp/session/solana/stock"` \| `"mpp/charge/xrpl"` \| `"mpp/charge/nearintents"` \| `"mpp/session/xrpl"` \| `"mpp/session/xrpl/stock"` \| `"mpp/session/hedera/stock"` \| `"mpp/charge/lcp/hedera"` \| `"mpp/charge/card"` \| `"mpp/charge/stripe"` \| `"mpp/subscription/stripe"` \| `"mpp/charge/usdc/evm"` \| `"mpp/charge/usdc/solana"` \| `"mpp/charge/usdc/stacks"` \| `"mpp/charge/usdc/gateway"` The id of each MPP pairing `pairingsOf` can name. *** ### MppReceipt > **MppReceipt** = `object` MPP's `Payment-Receipt` payload: `status` `success`, the payment `method`, the RFC 3339 `timestamp` of settlement and the method's `reference`, such as a transaction hash. A method's specification may define other members. #### Indexable > \[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json) \| `undefined` #### Properties | Property | Type | | ------ | ------ | | `method` | `string` | | `reference` | `string` | | `status` | `"success"` | | `timestamp` | `string` | *** ### MppUnsigned > **MppUnsigned** = \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} \| \{ `request`: \{ `broadcast`: `boolean`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `chainId`: `number`; `kind`: `"evm-call"`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} What the buyer's signer is handed for each EVM charge, and how its answer completes the credential. Each `complete` measures the credential it would return as `bound` measures every credential, its echoed challenge included, and refuses one over the credential size bound, 64 KiB, with `mpp/credential-malformed`, the code `bound` gives it. #### Union Members ##### Type Literal \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} *** ##### Type Literal \{ `request`: \{ `broadcast`: `boolean`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `chainId`: `number`; `kind`: `"evm-call"`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} | Name | Type | Description | | ------ | ------ | ------ | | `request` | `object` | An EIP-1559 transaction of the call, or its hash once broadcast. Unbroadcast, `complete` takes the signed transaction: one that is not 1 to 65,536 bytes of hex, or whose credential is over the credential size bound, is `mpp/credential-malformed`, the code `bound` gives that credential before its verdict, `mpp/no-signed-place`; then one that is not an EIP-1559 transaction (`0x02` and the RLP list of its twelve fields) is `mpp/credential-malformed`, and one signed for a chain other than `chainId` is `evm/chain-mismatch`. | | `request.broadcast` | `boolean` | - | | `request.call` | `object` | - | | `request.call.data` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | - | | `request.call.to` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | - | | `request.chainId` | `number` | - | | `request.kind` | `"evm-call"` | - | | `complete()` | (`signedTxOrHash`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) | - | *** ### Presentation > **Presentation** = [`Seen`](https://lcp.integraledger.com/reference/api/mpp.md#seen)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\>\[`"presented"`\] Whether an act is the payment the reference was built from, `Seen.presented`. *** ### RailSessionUnsigned > **RailSessionUnsigned** = [`HederaSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#hederasessionunsigned) \| [`SolanaSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanasessionunsigned) \| [`XrplSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#xrplsessionunsigned) *** ### ReceiveTypedData > **ReceiveTypedData** = `Omit`\<[`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata), `"primaryType"` \| `"types"`\> & `object` EIP-3009's `ReceiveWithAuthorization`: the same fields as `TransferWithAuthorization`, for a payee contract. #### Type Declaration | Name | Type | | ------ | ------ | | `primaryType` | `"ReceiveWithAuthorization"` | | `types` | `object` | | `types.EIP712Domain` | [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] | | `types.ReceiveWithAuthorization` | [`Field`](https://lcp.integraledger.com/reference/api/evm.md#field)[] | *** ### SessionStatus > **SessionStatus** = [`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus) What these pairings' `status` answers, in the terms of `EvmBreadthStatus`. *** ### SessionUnsigned > **SessionUnsigned** = `object` #### Properties | Property | Type | | ------ | ------ | | `funding` | \{ `kind`: `"eip712"`; `opening?`: \{ `authorizedSigner`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `payee`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `salt`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `typedData`: [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#receivetypeddata) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata); \} \| \{ `approve?`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `broadcast`: `false`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \}; `chainId`: `number`; `kind`: `"tempo-call"`; `validBefore`: `number`; \} | #### Methods ##### complete() > **complete**(`funded`, `voucherSignature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The opening's credential for `funded` and the voucher signature. On every funding it is measured as `bound` measures every credential, its echoed challenge included: one over the credential size bound, 64 KiB, is `mpp/credential-malformed`, the code `bound` gives it. ###### Parameters | Parameter | Type | | ------ | ------ | | `funded` | `` `0x${string}` `` | | `voucherSignature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) ##### voucher() > **voucher**(`funded`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`VoucherTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#vouchertypeddata) `funded`: the funding signature, transaction hash or signed `0x76` transaction. A `tempo-call` funding's `complete` returns no credential `bound` refuses: it gives the code `bound` gives the credential it would give for the signed transaction, and `voucher` refuses the same transactions, with the shortest voucher signature `complete` takes, one byte. So both refuse a transaction that does not decode, an empty one among them, is signed for a chain other than `funding.chainId`, whose signature gives no sender (a keychain signature of type `0x03` among them), or whose `aa_authorization_list` holds an entry that is not a list of four items ending in a signature or one signed with a keychain signature of type `0x03` (`tempo/tx-malformed`); one without the `open` call `funding.call` describes, to its escrow with H as its salt; one whose sender is not the build's `from`, or whose `open` call names another payee, operator, token or authorizedSigner, which the credential's descriptor or channel id names; and one whose credential is over the credential size bound (`mpp/credential-malformed`). On an `eip712` funding, `voucher` likewise gives what `complete` gives `funded` with a one-byte voucher signature where that is a refusal: a funding signature or hash not in the form `complete` takes, or a credential over the credential size bound, each `mpp/credential-malformed`. ###### Parameters | Parameter | Type | | ------ | ------ | | `funded` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`VoucherTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#vouchertypeddata) *** ### Signed > **Signed** = `Readonly`\<`Record`\<`string`, `string`\>\> The members of what the payer signed, as read from a landed act or as presented, each a lowercase string. *** ### StockQuery > **StockQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`HederaStockRef`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockref), `bigint`, `"finalized"`, `bigint`\> *** ### TempoSplitQuery > **TempoSplitQuery** = [`EvmQuery`](https://lcp.integraledger.com/reference/api/ap2.md#evmquery)\<[`TempoSplitRef`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitref)\> What `status` takes beside the reference and the reader: its search position is a block number. *** ### TempoSplitStatus > **TempoSplitStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`EvmMark`](https://lcp.integraledger.com/reference/api/ap2.md#evmmark)\> What `status` answers: block numbers, EVM marks, the search position a block number. *** ### UsdcUnsigned > **UsdcUnsigned** = \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} \| \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash); `recipient`: `string`; `sender`: `string`; \}; `chainId`: `number`; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} \| \{ `request`: \{ `challengeRequest`: `string`; `kind`: `"gateway-burn-intent"`; `maxBlockHeight`: `string`; `preimage`: [`GatewayPreimage`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaypreimage); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} What the signer is handed for each `usdc` profile, and how its answer completes the credential. Each `complete` measures the credential it would return as `bound` measures every credential, its echoed challenge included, and refuses one over the credential size bound, 64 KiB, with `mpp/credential-malformed`, the code `bound` gives it. #### Union Members ##### Type Literal \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm.md#eip3009typeddata); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} *** ##### Type Literal \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash); `recipient`: `string`; `sender`: `string`; \}; `chainId`: `number`; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} | Name | Type | Description | | ------ | ------ | ------ | | `request` | `object` | The transfer to sign for the challenge's chain, `chainId`, at that network's version: 0x00 on chain 1, mainnet, and 0x80 on any other. `complete` takes the signed transaction's bytes, and refuses a value that is not a `Uint8Array` with `mpp/credential-malformed`. It then checks in `bound`'s order: a credential over the credential size bound, its echoed challenge included, is `mpp/credential-malformed`, read first; then bytes that are empty, over 16,384 bytes or that a Stacks node does not decode are `mpp/stacks-tx-malformed`, and a transaction of another chain id or version is `stacks/chain-mismatch`, as `bound` refuses them. | | `request.anchorMode` | `"onChainOnly"` | - | | `request.args` | `object` | - | | `request.args.amount` | `string` | - | | `request.args.memo` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | - | | `request.args.recipient` | `string` | - | | `request.args.sender` | `string` | - | | `request.chainId` | `number` | - | | `request.contract` | `string` | - | | `request.functionName` | `"transfer"` | - | | `request.kind` | `"stacks-contract-call"` | - | | `request.postCondition` | `"SentEq"` | - | | `request.postConditionMode` | `"deny"` | - | | `complete()` | (`serializedTx`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) | - | *** ##### Type Literal \{ `request`: \{ `challengeRequest`: `string`; `kind`: `"gateway-burn-intent"`; `maxBlockHeight`: `string`; `preimage`: [`GatewayPreimage`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaypreimage); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \} | Name | Type | Description | | ------ | ------ | ------ | | `request` | `object` | The salt's preimage from the chosen challenge, and the `maxBlockHeight` the burn intent signs, a decimal string. `complete` refuses a burn intent whose `maxBlockHeight`, read as a decimal, is not that value, with `mpp/max-block-height-changed`. `challengeRequest` is the chosen challenge's `request` parameter as issued (base64url): `usdcRequestHash(challengeRequest)` is `preimage.requestHash`, and it holds the amount, the currency, the destination network and the `maxFee` the burn intent grants, so a client can show them and hold the hash to them. | | `request.challengeRequest` | `string` | - | | `request.kind` | `"gateway-burn-intent"` | - | | `request.maxBlockHeight` | `string` | - | | `request.preimage` | [`GatewayPreimage`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaypreimage) | - | | `complete()` | (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) | - | *** ### WithinSigningRequest > **WithinSigningRequest** = \{ `kind`: `"eip712"`; `typedData`: [`VoucherTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#vouchertypeddata) \| [`HederaVoucherTypedData`](https://lcp.integraledger.com/reference/api/hedera.md#hederavouchertypeddata); \} \| \{ `kind`: `"ed25519-raw"`; `message`: `Uint8Array`\<`ArrayBuffer`\>; `signer`: `string`; \} \| \{ `bytes`: `Uint8Array`\<`ArrayBuffer`\>; `channelId`: `string`; `drops`: `bigint`; `kind`: `"xrpl-claim"`; \} A request to the buyer's signer for an in-channel payment. *** ### XrplQuery > **XrplQuery**\<`Ref`\> = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<`Ref`, `number`, [`XrplMark`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplmark)\> What an XRPL status read takes with the reference and the reader. #### Type Parameters | Type Parameter | | ------ | | `Ref` | ## Variables ### CARRIER > `const` **CARRIER**: \{ readonly \[i in MppIntent\]: \{ readonly \[m in MppMethod\]?: readonly string\[\] \| null \} \} = `CARRIERS.byMethod` The request member a pairing writes H into, by intent and method; null where no request member carries it. It is derived from the MPP entries' `carrier` datum: each pairing's `carrier.member`, keyed by the intent and method its id names. `usdc` carries H in a request member only on its Solana profile, which `USDC_CARRIER` keys by profile. *** ### chargeCard > `const` **chargeCard**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/card"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/card`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller submits the card payment the payer's credential authorizes to its processor; nothing here reads it. *** ### chargeLcpHedera > `const` **chargeLcpHedera**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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) \| [`LcpHederaUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#lcphederaunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/lcp/hedera"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LcpHederaRef`](https://lcp.integraledger.com/reference/api/mpp.md#lcphederaref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); `validate`: (`input`, `now`, `_reader?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LcpValidation`](https://lcp.integraledger.com/reference/api/mpp.md#lcpvalidation)\>; \}\> `mpp/charge/lcp/hedera`. `broadcaster` answers by the credential's `type`: `transaction`, `"payee"`, the party that submits sends the buyer's bytes unchanged, and `status` reads them; `hash`, `"payer"`, the payer broadcast the body, which `fetchPresented` reads. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. `validate` is the method's validation that moves nothing. *** ### chargeNearIntents > `const` **chargeNearIntents**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`, `named?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`credential`) => `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/nearintents"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`credential`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`NearIntentsRef`](https://lcp.integraledger.com/reference/api/mpp.md#nearintentsref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/nearintents`. The payer broadcasts (`broadcaster` answers `"payer"` for a credential of `type` `hash`): it sends its deposit before presenting the deposit's hash. Settlement is the resource server's report: no `fetchPresented`, `status` or `recover` reads it, and `reference` names the deposit by its origin network and hash. A credential of any other type gets `near/not-hash-credential`, as `bound` refuses it. *** ### chargeSolana > `const` **chargeSolana**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanachargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/solana"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/solana`: a challenge whose `methodDetails.feePayer` is `true`, under which the stock client refuses to broadcast from `@solana/mpp` 0.6.0. A `signature` credential, which an older client pushes, is a payment that already moved. *** ### chargeSolanaUnsponsored > `const` **chargeSolanaUnsponsored**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanachargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/solana/unsponsored"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/solana/unsponsored`: a challenge of the `solana` method that does not set `feePayer: true`. *** ### chargeStripe > `const` **chargeStripe**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/stripe`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's server creates the Stripe payment with the payer's shared payment token; nothing here reads it. *** ### chargeUsdcEvm > `const` **chargeUsdcEvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `authorizer`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`input`) => `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) \| [`UsdcUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#usdcunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/evm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppEip3009Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mppeip3009ref)\>; `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`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/usdc/evm`. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `authorization`): the payer signs an EIP-3009 authorization, and the seller's server submits it and pays the gas; `status` reads that transaction. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### chargeUsdcGateway > `const` **chargeUsdcGateway**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| \{ `request`: \{ `challengeRequest`: `string`; `kind`: `"gateway-burn-intent"`; `maxBlockHeight`: `string`; `preimage`: [`GatewayPreimage`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaypreimage); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/gateway"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/usdc/gateway`. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `transfer`): the seller's server submits the burn intent the payer signed through Circle Gateway, which settles it; no `status` reads it. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### chargeUsdcSolana > `const` **chargeUsdcSolana**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanachargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/usdc/solana`, which takes only `type="transaction"` credentials. The payee broadcasts (`broadcaster` answers `"payee"` for them): the seller's server broadcasts the transaction the payer signed, and `status` reads it. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### chargeUsdcStacks > `const` **chargeUsdcStacks**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: `` `0x${string}` ``; `recipient`: `string`; `sender`: `string`; \}; `chainId`: `number`; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/stacks"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`StacksRef`](https://lcp.integraledger.com/reference/api/stacks.md#stacksref), `"payee"`\> & `object`\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`StacksStatus`](https://lcp.integraledger.com/reference/api/stacks.md#stacksstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/usdc/stacks`. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `transaction`): the seller's server sponsors and broadcasts the Stacks transaction the payer signed; `status` reads it. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### chargeXrpl > `const` **chargeXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`XrplChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#xrplchargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/xrpl"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/xrpl`. `broadcaster` answers by the credential's `type`. `transaction`, `"payee"`: the seller's server submits the signed blob, and `status` reads it. `hash`, `"payer"`: the payer broadcast the transaction, which `fetchPresented` reads, then `status`. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### evmAuthorization > `const` **evmAuthorization**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `authorizer`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`input`) => `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/authorization"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppEip3009Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mppeip3009ref)\>; `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`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/charge/evm/authorization`. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `authorization`): the payer signs an EIP-3009 authorization, and the seller's server submits `transferWithAuthorization` with it; `status` reads that transaction. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### evmHash > `const` **evmHash**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/hash"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppNamedRef`](https://lcp.integraledger.com/reference/api/mpp.md#mppnamedref) & `object`\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/charge/evm/hash`, whose `build` writes `broadcast: true`. `broadcaster` answers by the credential's `type`, as `reference` and `status` take either: `hash`, `"payer"`, a transaction the payer broadcast, which `status` reads by that hash; `transaction`, `"payee"`, a signed transaction the seller's server broadcasts, naming its hash to `status`. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it; `bound` gives every credential of either type `mpp/no-signed-place`. *** ### evmPermit2 > `const` **evmPermit2**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `authorizer`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`input`) => `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/permit2"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`, `_given?`, `issue?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppPermit2Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mpppermit2ref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/charge/evm/permit2`. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `permit2`): the payer signs a Permit2 transfer, and the seller's server, the `spender` it names, submits it to Permit2; `status` reads that transaction. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### evmTransaction > `const` **evmTransaction**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/transaction"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppNamedRef`](https://lcp.integraledger.com/reference/api/mpp.md#mppnamedref) & `object`\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/charge/evm/transaction`, whose `build` writes `broadcast: false`. `broadcaster` answers by the credential's `type`, as `reference` and `status` take either: `transaction`, `"payee"`, a signed transaction the seller's server broadcasts, naming its hash to `status`; `hash`, `"payer"`, a transaction the payer broadcast, which `status` reads by that hash. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it; `bound` gives every credential of either type `mpp/no-signed-place`. *** ### LEGAL\_CONTEXT\_METADATA\_KEY > `const` **LEGAL\_CONTEXT\_METADATA\_KEY**: `"legal_context"` = `"legal_context"` The Stripe metadata key the seller places H under: at most 40 characters, no square brackets. *** ### MPP\_BINDINGS > `const` **MPP\_BINDINGS**: readonly \[`Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `authorizer`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`input`) => `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/authorization"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppEip3009Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mppeip3009ref)\>; `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`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `authorizer`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`input`) => `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/permit2"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`, `_given?`, `issue?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppPermit2Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mpppermit2ref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/transaction"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppNamedRef`](https://lcp.integraledger.com/reference/api/mpp.md#mppnamedref) & `object`\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`MppUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#mppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/evm/hash"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppNamedRef`](https://lcp.integraledger.com/reference/api/mpp.md#mppnamedref) & `object`\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/tempo/split-memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TempoSplitRef`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`TempoSplitStatus`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TempoLandedCredential`](https://lcp.integraledger.com/reference/api/mpp.md#tempolandedcredential)\>; `id`: `"mpp/charge/tempo/split-memo/push"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TempoSplitRef`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`TempoSplitStatus`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionWithinUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionwithinunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/evm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionWithinUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionwithinunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/tempo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`KeyAuthorizationUnsigned`](https://lcp.integraledger.com/reference/api/tempo.md#keyauthorizationunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `_channel`, `account?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/subscription/tempo"`; `keyProves`: `string`; `keySearch`: (`ref`, `receipt`, `h`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `pattern`: \{ `forwardIndexable`: `true`; `onChain`: `true`; `pattern`: `"native-field"`; `profile`: `string`; `zeroPartyRecoverable`: `true`; \}; `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`LnMppUnsigned`](https://lcp.integraledger.com/reference/api/lightning.md#lnmppunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](https://lcp.integraledger.com/reference/api/lightning.md#lnref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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) \| [`LnMppUnsigned`](https://lcp.integraledger.com/reference/api/lightning.md#lnmppunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LnRef`](https://lcp.integraledger.com/reference/api/lightning.md#lnref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`c`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanachargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/solana"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanachargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/solana/unsponsored"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/subscription/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanasessionunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/solana/memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `false`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/session/solana/stock"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`XrplChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#xrplchargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/xrpl"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`, `named?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`credential`) => `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/nearintents"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`credential`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`NearIntentsRef`](https://lcp.integraledger.com/reference/api/mpp.md#nearintentsref)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`XrplSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#xrplsessionunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionWithinUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionwithinunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplCloseRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplcloseref), `"transaction"`\>; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: () => `number` \| `undefined`; \}\>; `claims`: `false`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/xrpl/stock"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplChannelRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: () => `number` \| `undefined`; \}\>; `claims`: `false`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/hedera/stock"`; `pattern`: \{ `forwardIndexable`: `false`; `onChain`: `false`; `pattern`: `"opaque-challenge"`; `profile`: `string`; `zeroPartyRecoverable`: `false`; \}; `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`HederaStockRef`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`HederaStockStatus`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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) \| [`LcpHederaUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#lcphederaunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/charge/lcp/hedera"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LcpHederaRef`](https://lcp.integraledger.com/reference/api/mpp.md#lcphederaref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera.md#hederastatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); `validate`: (`input`, `now`, `_reader?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`LcpValidation`](https://lcp.integraledger.com/reference/api/mpp.md#lcpvalidation)\>; \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/card"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`_presented`) => `"open"`; `ref`: (`_presented`, `receipt?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/subscription/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `authorizer`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `bound`: (`input`) => `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) \| [`UsdcUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#usdcunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/evm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`EvmRef`](https://lcp.integraledger.com/reference/api/evm.md#evmref) & [`MppEip3009Ref`](https://lcp.integraledger.com/reference/api/mpp.md#mppeip3009ref)\>; `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`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaChargeUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanachargeunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: `` `0x${string}` ``; `recipient`: `string`; `sender`: `string`; \}; `chainId`: `number`; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/stacks"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`StacksRef`](https://lcp.integraledger.com/reference/api/stacks.md#stacksref), `"payee"`\> & `object`\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`StacksStatus`](https://lcp.integraledger.com/reference/api/stacks.md#stacksstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| \{ `request`: \{ `challengeRequest`: `string`; `kind`: `"gateway-burn-intent"`; `maxBlockHeight`: `string`; `preimage`: [`GatewayPreimage`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaypreimage); \}; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential); \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/usdc/gateway"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\>\] Every MPP pairing this entry point implements. *** ### sessionEvm > `const` **sessionEvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionWithinUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionwithinunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/evm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/session/evm`. `broadcaster` answers by the payment's action and type (`evmBroadcasts`), for the actions `channel.kind` takes, and every answer is `"payee"`: an opening or a top-up of type `authorization` or `permit2`, which the seller's server submits to the escrow; a voucher, which it redeems when it settles or closes; and the close, the escrow call it sends, which `closeRef` and `status` read. An opening funded by a `hash`, a transaction the buyer's client broadcasts, is no part of the pairing: it gets the refusal `bound` gives it, `mpp/credential-type`, as an opening of any other type does, and `mpp/not-an-opening` for a top-up of another type or any other action. *** ### sessionHederaStock > `const` **sessionHederaStock**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: () => `number` \| `undefined`; \}\>; `claims`: `false`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/hedera/stock"`; `pattern`: \{ `forwardIndexable`: `false`; `onChain`: `false`; `pattern`: `"opaque-challenge"`; `profile`: `string`; `zeroPartyRecoverable`: `false`; \}; `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`HederaStockRef`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`HederaStockStatus`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/session/hedera/stock`, the stock client's session at coverage `none`, served after the agreement. `broadcaster` answers `"payer"` for the opening and a top-up, which the buyer's client sends, and `"payee"` for a voucher and the close; `status` reads the opening (`hederaStockStatus`). *** ### sessionSolanaMemo > `const` **sessionSolanaMemo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SolanaSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#solanasessionunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/solana/memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/session/solana/memo`. The payee broadcasts every payment the session takes (`broadcaster` answers `"payee"` for the actions `channel.kind` takes: the opening, which the seller's server co-signs as the operator and submits, a voucher, a commit and the close). A top-up, which the payer's client broadcasts, and any other action get `mpp/not-an-opening`, as `bound` refuses them. *** ### sessionSolanaStock > `const` **sessionSolanaStock**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `false`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) & `object`\>; `id`: `"mpp/session/solana/stock"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/session/solana/stock`, at coverage `none`: the buyer's client broadcasts the stock opening, which carries no H, after the agreement is recorded. `broadcaster` answers `"payer"` for the opening; every later credential is `mpp/not-an-opening`. The opening's account is the `open`'s payer (account 0), never its `authorizedSigner`. *** ### sessionTempo > `const` **sessionTempo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`SessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionWithinUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionwithinunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/tempo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/session/tempo`, whose `build` writes `broadcast: false`. The payee broadcasts every payment the session takes (`broadcaster` answers `"payee"` for the actions `channel.kind` takes, and an opening of `type` `transaction`), as draft-tempo-session-00 has it: the seller's server broadcasts the signed transaction of an opening or a top-up, which `status` reads, redeems vouchers when it settles or closes, and sends the close, which `closeRef` and `status` read. Any other credential gets `mpp/not-an-opening`, as `bound` refuses it. *** ### sessionXrpl > `const` **sessionXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`XrplSessionUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#xrplsessionunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionWithinUnsigned`](https://lcp.integraledger.com/reference/api/mpp.md#sessionwithinunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplCloseRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplcloseref), `"transaction"`\>; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/session/xrpl`. The payee broadcasts every payment the session takes (`broadcaster` answers `"payee"` for the actions `channel.kind` takes: the opening, a voucher and the close): the seller's server submits the signed `PaymentChannelCreate` the opening carries, which `status` reads, redeems claims when it closes, and sends the close, which `closeRef` and `status` read. Any other action, a top-up among them, gets `mpp/session-action`, as `bound` refuses it. *** ### sessionXrplStock > `const` **sessionXrplStock**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`, `_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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelKind`](https://lcp.integraledger.com/reference/api.md#channelkind); `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: () => `number` \| `undefined`; \}\>; `claims`: `false`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/session/xrpl/stock"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`input`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplChannelRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/session/xrpl/stock`, a stock client's session at coverage `none`, served after the agreement. The buyer's client opens the channel itself, out of band, which is no credential of the pairing, and presents vouchers that name it. The payee broadcasts every payment the pairing takes: it redeems the vouchers and submits the close's `PaymentChannelClaim` from the recipient's wallet (`xrpl-mpp-sdk` 0.1.0-beta.4, `dist/channel/server/index.js:686-697`), so `broadcaster` answers `"payee"` for a voucher and for a close; an `open` is `mpp/session-action`. `status` reads the channel's create (`xrplChannelStatus`). *** ### subscriptionSolana > `const` **subscriptionSolana**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/subscription/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/subscription/solana`. The payee broadcasts (`broadcaster` answers `"payee"` for a `type="transaction"` credential): the activation's `transfer_subscription` needs the signature of the challenge's `puller`, the seller's key, which the payer's client does not hold (`@solana/pay-kit` 0.13.1 `dist/chunk-SSATEZ72.js:2393-2394`, `:2431-2443`), so the seller's server co-signs and submits it. A credential of any other type is `mpp/credential-type`, as `bound` refuses it. *** ### subscriptionStripe > `const` **subscriptionStripe**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`_presented`) => `"open"`; `ref`: (`_presented`, `receipt?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_presented`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/subscription/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/subscription/stripe`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's server creates the Stripe subscription with the payer's shared payment token and reports its activation; nothing here reads it. *** ### subscriptionTempo > `const` **subscriptionTempo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `bound`: (`input`) => `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) \| [`KeyAuthorizationUnsigned`](https://lcp.integraledger.com/reference/api/tempo.md#keyauthorizationunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`presented`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`presented`) => `number` \| `undefined`; \}\>; `claims`: `true`; `closeRef`: (`chosen`, `_channel`, `account?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/subscription/tempo"`; `keyProves`: `string`; `keySearch`: (`ref`, `receipt`, `h`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref); `pattern`: \{ `forwardIndexable`: `true`; `onChain`: `true`; `pattern`: `"native-field"`; `profile`: `string`; `zeroPartyRecoverable`: `true`; \}; `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `recover`: (`input`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `reference`: (`input`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}\> `mpp/subscription/tempo`. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `keyAuthorization`, the one `channel.kind` takes): the payer's root key signs a key authorization, and the seller's server sends the activation transaction that registers its access key, and each later transfer under that key; `status` reads the activation, and `keySearch` the transfers. A credential of any other type gets `mpp/not-an-opening`, as `bound` refuses it. *** ### tempoSplitMemo > `const` **tempoSplitMemo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"mpp/charge/tempo/split-memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TempoSplitRef`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`TempoSplitStatus`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/tempo/split-memo`, the pull form. The payee broadcasts (`broadcaster` answers `"payee"` for a credential of `type` `transaction`): the resource server's settler broadcasts the signed transaction the credential carries. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. *** ### tempoSplitMemoPush > `const` **tempoSplitMemoPush**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `position`, `act?`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `fetchPresented`: (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TempoLandedCredential`](https://lcp.integraledger.com/reference/api/mpp.md#tempolandedcredential)\>; `id`: `"mpp/charge/tempo/split-memo/push"`; `landedTx`: (`presented`) => `string` \| `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \}; `reference`: (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TempoSplitRef`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`TempoSplitStatus`](https://lcp.integraledger.com/reference/api/mpp.md#temposplitstatus)\>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge); \}\> `mpp/charge/tempo/split-memo/push`. The payer broadcasts (`broadcaster` answers `"payer"` for a credential of `type` `hash`) and names the transaction by its hash: `fetchPresented` reads it, then `bound` reads H in its signed bytes. A credential of any other type gets `mpp/credential-type`, as `bound` refuses it. ## Functions ### attributionMemo() > **attributionMemo**(`realm`, `challengeId`, `clientId?`): `` `0x${string}` `` MPP's 32-byte attribution memo: keccak256("mpp")[0..3], `0x01`, keccak256(realm)[0..9], keccak256(clientId)[0..9] or ten zero bytes, then keccak256(challengeId)[0..6], each over the string's UTF-8. A string that is not well-formed is written as `TextEncoder` writes it, with U+FFFD for each lone surrogate. No pairing in this package calls it. #### Parameters | Parameter | Type | | ------ | ------ | | `realm` | `string` | | `challengeId` | `string` | | `clientId?` | `string` | #### Returns `` `0x${string}` `` *** ### challengeBound() > **challengeBound**(`c`, `recorded`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `request`: \{\[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}; \} H from an echoed challenge: its id derives from H in the form its intent and method take and equals, whole, `recorded`, the id the resource server recorded when it issued that challenge, else `mpp/id-not-ours`; its `opaque` names H; and its `request` decodes. A `recorded` that is not an id in a form `challengeId` writes, or the bare base64url of H, is `mpp/input-malformed`, before the credential is read. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | `unknown` | | `recorded` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `request`: \{\[`k`: `string`\]: [`Json`](https://lcp.integraledger.com/reference/api.md#json); \}; \} *** ### checkAttribution() > **checkAttribution**(`memo`, `realm`, `challengeId`): `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) Checks a memo's tag, version, server id for `realm` and nonce for `challengeId`. The client id is not read. A `realm` or `challengeId` that is not well-formed is hashed as `attributionMemo` hashes it, with U+FFFD for each lone surrogate. No pairing in this package calls it. #### Parameters | Parameter | Type | | ------ | ------ | | `memo` | `string` | | `realm` | `string` | | `challengeId` | `string` | #### Returns `true` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### decodeCredential() > **decodeCredential**(`fieldValue`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The credential a `Payment` credential field value carries: `Payment`, matched without regard to case, one or more spaces, then base64url without padding in its canonical form, of at most 65,536 bytes, that are well-formed UTF-8 of a JSON object, held to `credentialShape`'s gate, which every MPP `bound` applies first. It reads a field's value, not its name: the caller holds a credential to the field its challenge selected, `Authorization`, or `Payment-Authorization` where the challenge carries `header`, and `issuedDigest` compares the `header` the credential echoes with the one issued. Any other value is `mpp/credential-malformed`, which `problem` answers 402 `malformed-credential`. Nothing else is read: H, the challenge's id and the payment are the reads of `challengeBound`, `issuedDigest` and the pairing's `bound`. #### Parameters | Parameter | Type | | ------ | ------ | | `fieldValue` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### decodeReceipt() > **decodeReceipt**(`fieldValue`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppReceipt`](https://lcp.integraledger.com/reference/api/mpp.md#mppreceipt) The receipt a `Payment-Receipt` field value carries, the inverse of `encodeReceipt`: base64url without padding in its canonical form only, the form `mppx` 0.17.6's `Receipt.serialize` writes and the one `decodeCredential` reads (padded base64 is refused), of at most 65,536 bytes (`MAX_HEADER_BYTES`, the bound lcp applies to a header field value), measured before it decodes, of well-formed UTF-8 of one JSON object nested at most 64 levels deep, held to the receipt `encodeReceipt` writes: `status` `success`, a `method` of lowercase ASCII letters, an RFC 3339 `timestamp` and a string `reference`; every other member is kept as given. A value that does not decode so, a longer one among them, and a receipt `encodeReceipt` refuses, is `mpp/receipt-malformed`. A buyer's client reads it from a successful response; the receipt says what the seller reports, and nothing here reads the payment. #### Parameters | Parameter | Type | | ------ | ------ | | `fieldValue` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppReceipt`](https://lcp.integraledger.com/reference/api/mpp.md#mppreceipt) *** ### encodeChallenge() > **encodeChallenge**(`challenge`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) One `Payment` challenge as a `WWW-Authenticate` field value: `Payment`, a space, then each member the challenge holds as an auth-param whose value is a quoted-string, `"` and `\` written as quoted-pairs, joined by `, `, in the order `id`, `realm`, `method`, `intent`, `request`, `description`, `digest`, `expires`, `header`, `opaque`: the form `mppx` 0.17.6's `Challenge.serialize` writes. The challenge is read as its JSON form carries it, its own members only (as a pairing's `build` reads a chosen challenge), and each member is written as given: `request` and `opaque` stay the base64url that `place` and each pairing's `advertise` write. `parseChallenges` reads the value back as the same members. A challenge that is not an object, carries a `refused` member, lacks a string `id`, `realm`, `method`, `intent` or `request` or holds one empty, has another member that is not a string, has a `header` other than `Payment-Authorization`, the one value MPP allows it, holds a character no quoted-string carries (a control character other than tab, DEL, or one above U+00FF), or whose field value is over 8,192 characters, which `parseChallenges` refuses, is `mpp/challenge-malformed`. A response offering several challenges sends one `WWW-Authenticate` field line for each. #### Parameters | Parameter | Type | | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### encodeCredential() > **encodeCredential**(`credential`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) A credential as a `Payment` credential field value, which `decodeCredential` reads back: `Payment`, a space, then base64url without padding of the UTF-8 of its JSON, in the form `mppx` 0.17.6's `Credential.serialize` writes: `challenge`, its own members in their order but `meta`, which is left out, with `opaque` and then `request` last, then `payload`, then `source` where the credential has one that is not empty, an empty `source` being left out. Each other member is written as given: `request` and `opaque` stay the base64url the challenge carries, and a member whose value is `undefined` is left out of the challenge. The client sends it in the field its challenge selects, `Authorization`, or `Payment-Authorization` where the challenge carries `header`. A credential `credentialShape`'s gate refuses, one that is not then JSON (an `undefined` inside the payload, a function, a `bigint`, a non-finite number, a lone surrogate or an instance of a class), and one whose value `decodeCredential` refuses, over 65,536 bytes among them, is `mpp/credential-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `credential` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### encodeReceipt() > **encodeReceipt**(`receipt`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) A receipt as a `Payment-Receipt` field value: `JSON.stringify` of the receipt, in its own member order, as UTF-8, in base64url without padding, the form `mppx` 0.17.6's `Receipt.serialize` writes. A member whose value is `undefined` is left out, as `JSON.stringify` leaves it out, and every other member is written as given. A receipt is issued on success alone: one whose `status` is not `success`, whose `method` is not a method identifier (lowercase ASCII letters), whose `timestamp` is not an RFC 3339 date-time or whose `reference` is not a string, one that carries a `refused` member or an enumerable symbol-keyed member, and one that is not then a JSON object (no other `undefined`, function, `bigint`, non-finite number, lone surrogate or instance of a class, and at most 64 levels deep) is `mpp/receipt-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `receipt` | [`MppReceipt`](https://lcp.integraledger.com/reference/api/mpp.md#mppreceipt) | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### evmChannelId() > **evmChannelId**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` keccak256(abi.encode(payer, payee, token, salt, authorizedSigner, escrow, chainId)); also Tempo v1's. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | \{ `authorizedSigner`: `` `0x${string}` ``; `chainId`: `number`; `escrow`: `` `0x${string}` ``; `payee`: `` `0x${string}` ``; `payer`: `` `0x${string}` ``; `salt`: `` `0x${string}` ``; `token`: `` `0x${string}` ``; \} | | `c.authorizedSigner` | `` `0x${string}` `` | | `c.chainId` | `number` | | `c.escrow` | `` `0x${string}` `` | | `c.payee` | `` `0x${string}` `` | | `c.payer` | `` `0x${string}` `` | | `c.salt` | `` `0x${string}` `` | | `c.token` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### evmSessionAuthorizationNonce() > **evmSessionAuthorizationNonce**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The nonce an `mpp/session/evm` opening funded by an EIP-3009 `authorization` signs: keccak256(abi.encode(address from, address payee, address token, bytes32 salt, address authorizedSigner)), which the escrow recomputes in `openWithAuthorization` before it receives the deposit. Any value that is not an address, or a salt that is not a 32-byte hash, is `mpp/input-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | \{ `authorizedSigner`: `` `0x${string}` ``; `from`: `` `0x${string}` ``; `payee`: `` `0x${string}` ``; `salt`: `` `0x${string}` ``; `token`: `` `0x${string}` ``; \} | | `c.authorizedSigner` | `` `0x${string}` `` | | `c.from` | `` `0x${string}` `` | | `c.payee` | `` `0x${string}` `` | | `c.salt` | `` `0x${string}` `` | | `c.token` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### hederaStockStatus() > **hederaStockStatus**(`ref`, `reader`, `query`): `Promise`\<[`HederaStockStatus`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockstatus)\> The read of a stock opening, as the profile `read-status` answers it at coverage `none` (the profile `mpp/session/hedera-solana-xrpl`): the transaction the credential names, by its receipt through the relay, at its one mark, `finalized`, every block the relay serves being final. A revert took the sender nonce it signed only where it was executed in the EVM, the mirror's contract result for the hash being `CONTRACT_REVERT_EXECUTED`, one that failed the node's validations before the EVM leaving the nonce as it was (HIP-844, *Rationale*). Such a revert is the act's own failed result, `transaction-failed`, where its sender signed the escrow's `open` to the challenge's recipient, as `eth_getTransactionByHash` gives the call; an `open` to another account consumed the opening's nonce, `instrument-consumed`, and so does a revert of any other call. Any other failed result, or none on the mirror, shows no nonce taken, `INSUFFICIENT_GAS` coming both before and in the EVM (HIP-844, *Backward Compatibility*), and the same signed bytes can still land under the same hash: with the value unread and the lookup not ended, it is `pending`, `search-incomplete`, never `failed`. A receipt that succeeded holding exactly one `ChannelOpened` from the escrow naming the channel, whose members give the channel id it names, is the opening: its signer is the account id the mirror resolves its payer to, or the payer's address where the mirror resolves none, an address of no account; it is the payee's own act where that account is the one the challenge's `recipient` resolves to; and it names the payee's account where its `payee` is the `recipient` or resolves to the same account. What moved is the deposit, its beneficiary the log's `payee` (no contract, the read resolving no id for the escrow), by the transaction and the log's place among the receipt's logs. Any other receipt that succeeded consumed the opening's transaction and is no opening of the channel. No receipt is `not-found` where the mirror holds the blocks after the position the caller gives, or is archival, and `history-gap` otherwise. The read reads no nonce state and makes no search, the named transaction's receipt, and for a revert its contract result, being all it reads of the opening's sender nonce; it reads the payer against no account: the caller compares the signer with the account that signed the agreement. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`HederaStockRef`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockref) | | `reader` | [`HederaStockReader`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockreader) | | `query` | [`StockQuery`](https://lcp.integraledger.com/reference/api/mpp.md#stockquery) | #### Returns `Promise`\<[`HederaStockStatus`](https://lcp.integraledger.com/reference/api/mpp.md#hederastockstatus)\> *** ### issuedDigest() > **issuedDigest**(`given`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> the core's `digestJson` over the bound members, with `request` decoded and its carrier removed (`asIssued`), and `opaque` decoded without the LCP members (omitted when that leaves it empty). A value that does not decode is its string. An `opaque` that is the object of its members, as a credential may echo it (`opaqueMembers`), is read by those members. A challenge of a pairing whose quote or invoice the seller writes after H is read as `unplacedChallenge` gives it, so that the digest covers the members fixed at issue alone. #### Parameters | Parameter | Type | | ------ | ------ | | `given` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### keySearch() > **keySearch**(`ref`, `receipt`, `h`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref) The read keys of a transfer made under the subscription's access key, from a receipt of the key's registration: the account whose key authorization carried `h` and registered the key, then `accessKey` with that account, the token's `Transfer` to the recipient's digest, and the keychain's `AccessKeySpend` filter for the account, the key and the token. Refused when `ref` carries no access key (`tempo/no-access-key`), when `h` is not a 32-byte hash (`mpp/input-malformed`), or when the receipt did not register the key under `h`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref) | | `receipt` | [`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) | | `h` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref) *** ### network() > **network**(`challenge`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The CAIP-2 network an MPP challenge pays on, read from its method, intent and `methodDetails` as each method defines it, with that method's default where it names one. A method whose challenge names no network is refused. #### Parameters | Parameter | Type | | ------ | ------ | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### pairingsOf() > **pairingsOf**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| readonly [`MppPairingId`](https://lcp.integraledger.com/reference/api/mpp.md#mpppairingid)[] Checks a challenge as issued (no LCP member in `opaque`) and names its pairings, in the order they are offered. An `expires` that is present must be an RFC 3339 date-time, else `mpp/expires-required`. Without `expires`, the pairings whose `build` writes it into what the payer signs, and the NEAR Intents and XRP Ledger charges, whose drafts require it, are left out, and a challenge left with no pairing is `mpp/expires-required`; a `charge` on the `lcp` method whose `rail` is `hedera` or `stellar` is `mpp/expires-required` without it, by the method's own filter. These checks are each pairing's one filter: they include every check its `build`, `bound` and `reference` make on the challenge alone, and those take only a challenge `pairingsOfPlaced` names for the pairing, refusing any other with the code these checks give it (`mpp/not-this-pairing` where they name only other pairings). #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| readonly [`MppPairingId`](https://lcp.integraledger.com/reference/api/mpp.md#mpppairingid)[] *** ### pairingsOfPlaced() > **pairingsOfPlaced**(`c`): readonly [`MppPairingId`](https://lcp.integraledger.com/reference/api/mpp.md#mpppairingid)[] The pairings a placed challenge offers: `pairingsOf`'s checks over the challenge with the LCP members `place` writes allowed in its `opaque`, which must decode as a map of strings, so they are not read as an occupied carrier, and with the carrier the seller writes after `place` required where `pairingsOf` takes a challenge without it (the Lightning invoice). These are the pairings whose `build` takes the challenge and whose `bound` and `reference` take it echoed. None when the challenge does not read. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | #### Returns readonly [`MppPairingId`](https://lcp.integraledger.com/reference/api/mpp.md#mpppairingid)[] *** ### parseChallenges() > **parseChallenges**(`fieldValues`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] Reads `WWW-Authenticate` field values by RFC 9110's challenge grammar and keeps the `Payment` challenges, with quoted-strings unescaped and unknown parameters dropped. At most 8 KiB per value and 32 `Payment` challenges. #### Parameters | Parameter | Type | | ------ | ------ | | `fieldValues` | readonly `string`[] | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] *** ### place() > **place**(`doc`, `h`, `link`, `option`, `position`, `act?`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] A copy of `doc` in which the challenge whose bound members equal `option` carries the id derived from H at `position` and an `opaque` holding the seller's map plus `legalContext`, `legalContextUrl` and, when given, `legalContextAgreementUrl`. The caller gives each challenge of a sale its own position, 0 to 31, the charge and agreement challenges of the sale together; a Tempo subscription challenge takes `null`, its id being the bare base64url of H. A position out of that range, a number for a Tempo subscription challenge or `null` for any other is `mpp/challenge-malformed`, and a position whose id another challenge of `doc` already carries is `mpp/position-taken`. A `doc` holding a challenge that carries a `refused` member is `mpp/challenge-malformed`, as one holding a challenge without the required members is. `act` names what the challenge asks for: `payment`, the default, or `agreement`; any other value is `mpp/input-malformed`. An agreement challenge states `expires`, else `mpp/expires-required`: composed again for a re-challenge, it takes the position, and so the id, of the challenge it replaces. #### Parameters | Parameter | Type | Default value | | ------ | ------ | ------ | | `doc` | readonly [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] | `undefined` | | `h` | `` `0x${string}` `` | `undefined` | | `link` | `string` | `undefined` | | `option` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | `undefined` | | `position` | `number` \| `null` | `undefined` | | `act` | [`Act`](https://lcp.integraledger.com/reference/api.md#act) | `"payment"` | | `agreementUrl?` | `string` | `undefined` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] *** ### problem() > **problem**(`code`): `object` The Payment scheme's problem type and HTTP status for a refusal code this package returns, from the scheme's Status Codes and Error Codes tables, under `https://paymentauth.org/problems/`: - 402 `malformed-credential`: `mpp/credential-malformed`, `mpp/request-malformed` and `mpp/opaque-malformed`; - 402 `invalid-challenge`: `mpp/id-not-ours`; - 500 `internal-payment-error`: a read to repeat, a code `readToRepeat` answers true for, so the seller asks again later: a reader that failed or answered out of its form (`/unreadable`), no landed transaction yet (`/not-found`), or a transaction not final yet, such as a revert above the reader's `finalized` mark (`tempo/not-final`) or one not in a validated ledger (`xrpl/not-validated`); - 500 `internal-payment-error`: a call that cannot read the payment, which gives the same code until the seller changes the call: a reader that is not for the network the challenge or reference names, or a ref `recover` cannot read (`tempo/wrong-reader`, `svm/wrong-reader`, `xrpl/wrong-reader` and `hedera/wrong-reader`), and `bound` or `reference` on a push credential before `fetchPresented` has read it (`svm/read-first`, `xrpl/read-first`, `hedera/read-first` and `tempo/read-first`); - 402 `verification-failed`: every other code this package returns; - 500 `internal-payment-error`: a code this package does not return. The caller answers its own codes itself. The seller answers a 402 with a fresh challenge and a 500 with no challenge: a challenge goes out only with a 402. Neither carries `Payment-Receipt`. #### Parameters | Parameter | Type | | ------ | ------ | | `code` | `string` | #### Returns `object` | Name | Type | | ------ | ------ | | `status` | `402` \| `500` | | `type` | `string` | *** ### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \} The buyer's reading: the challenges whose `opaque` carries an LCP hash and an `https` link and whose id derives from that hash, in document order. `agreement` is their agreement URL when one is present. A link or agreement URL of at most 2048 characters that parses as an absolute URL with a scheme other than `https` is `mpp/link-not-https`, and any other value that is not a link is `mpp/legal-context-malformed`; with no challenge read, a link of another scheme in any challenge gives `mpp/link-not-https`, else a malformed link gives `mpp/legal-context-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `doc` | readonly [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}; \} *** ### sessionResume() > **sessionResume**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \} \| `null` The network and channel a session challenge names for the client to resume, spelled as the pairing's `channel.ref` spells it: EVM, Tempo and Hedera in `methodDetails.channelId` (a bytes32, lowercase), XRPL in the request's `channelId` (64 hex characters, upper case). Null when the challenge names no channel; refused for a challenge of no session pairing, or a channel or network that cannot be read. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \} \| `null` *** ### sessionStatus() > **sessionStatus**(`ref`, `reader`, `query`): `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\> The status of an opening or a close of any of the three pairings, answered as the profile `read-status` does at the coverage of the pairing whose keys the ref names. The read is `evmStatus`'s on the named logs, then, where `ref.opened` is present, one `ChannelOpened` log from `opened.address` naming the channel: on v2 its data word 3 (the salt) is `h`; on v1 the channel id recomputed from the event with salt `h` is the channel. A ref with `opens` is the EVM session's opening, read by its funding (`mppSessionOpeningStatus`), not by the named transaction. Where `ref.closes` is present, the succeeded transaction must be a call to that escrow whose calldata starts with one of `EVM_CLOSE_SELECTORS` and whose first argument is that channel. Where `ref.accessKey.account` is present, the succeeded receipt must also hold the account keychain's `AccessKeySpend` log naming that account, key and token. Where `ref.revokes` is present, the succeeded receipt must hold the account keychain's `KeyRevoked` log naming that account and key. A transaction that fails one of these checks (an open call for another channel, any other transaction, one sent through an ERC-4337 EntryPoint included, a call that is not the close, a missing log) is no act, and with no search for H yet answers `pending` `search-incomplete`, as `evmStatus`'s reasons do. Settled carries the highest mark reached and the receipt's block. An `opened` that is not one whose `address` is an address, `version` `v1` or `v2`, `channel` and `h` 32-byte hashes and `chainId` a positive integer, a `closes` that is not an object whose `escrow` is an address and `channel` a 32-byte hash, an `accessKey` that is not an object whose `keyId` and `token` are addresses, `to` a 32-byte hash and `account`, when present, an address, or a `revokes` that is not an object whose `account` and `keyId` are addresses, is unreadable `unparseable`, with no call made; so is a ref that names none of the keys the three pairings' `reference`, `closeRef` and `keySearch` write for the opening or the close (`opens`, `opened`, `closes`, `revokes`, an `accessKey` with `account`, or a binding log under `ChannelClosed` or `KeyAuthorizationWitness`), and a query that is not one `status` takes. A reader that is not an object is unreadable `transport`; what `evmStatus` reads as unreadable is unreadable for the same reason. At most four calls. This function accepts a key of any of the three pairings. Each pairing's own `status` reads a ref only when it names one of the keys that pairing writes and none of the other two pairings' keys: on `mpp/session/evm` `opens` or `closes`; on `mpp/session/tempo` `opened` or a binding log under `ChannelClosed`; on `mpp/subscription/tempo` `revokes`, an `accessKey` with `account` or a binding log under `KeyAuthorizationWitness`. Any other ref is unreadable `unparseable` there, with no call made. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref) & `object` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | | `query` | [`EvmQuery`](https://lcp.integraledger.com/reference/api/ap2.md#evmquery)\<[`SessionRef`](https://lcp.integraledger.com/reference/api/mpp.md#sessionref) & `object`\> | #### Returns `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmbreadthstatus)\> *** ### tie() > **tie**(`options`): \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\] The binding slot: the distinct challenges among `options`, each with exactly MPP's bound members, as issued. A challenge of a pairing whose quote or invoice the seller writes after H is bound as `unplacedChallenge` gives it. #### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[] | #### Returns \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)[]; \}\] *** ### toX402() > **toX402**(`credential`, `token`, `issued`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Mapped`](https://lcp.integraledger.com/reference/api/mpp.md#x402mapped) The x402 `exact` EIP-3009 payment and requirements of an MPP `evm` `authorization` credential or `usdc` EVM credential: `scheme` `exact`, `network` `eip155:`, `amount`, `asset` and `payTo` the request's `amount`, `currency` and `recipient`, `extra` the token's EIP-712 `name` and `version` the caller gives, and `maxTimeoutSeconds` the echoed challenge's `expires` less `issued`, the Unix second at which the resource server issued the challenge, never the window the payer signed; the payload's `authorization` is the credential's `from`, `to`, `value`, `validAfter`, `validBefore` and `nonce`, with its `signature`. The echoed challenge is held to the pairing's filter as an issued one is, so it need not carry H. A credential of any other form, a Permit2 witness, a Gateway burn intent, a challenge with splits and every non-EVM form among them, is `mpp/no-x402-twin`; a challenge with no `expires`, which offers neither form, is `mpp/expires-required`; a payload member out of its form, or a `validBefore` not after `validAfter`, is `mpp/credential-malformed`; a token domain that is not two strings of 1 to 256 characters, or an `issued` that is not a non-negative safe integer before `expires`, is `mpp/input-malformed`. It compares nothing the payment pays with the challenge: the facilitator's verification does. #### Parameters | Parameter | Type | | ------ | ------ | | `credential` | `unknown` | | `token` | [`TokenDomain`](https://lcp.integraledger.com/reference/api/mpp.md#tokendomain) | | `issued` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Mapped`](https://lcp.integraledger.com/reference/api/mpp.md#x402mapped) *** ### transferPresent() > **transferPresent**(`ref`, `reader`, `query`): `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\> The `status` of the EVM `transaction` and `hash` charges, whose data both give coverage `none`: the act is the transaction the reference names, which the credential carries (`transaction`, by the hash of its signed bytes) or names (`hash`). Found, it is read whole: its signer, the transaction's `from`, against the reference's payer and the option's payee, so that one the payee signed is no act of the payer's; what it moved, each `Transfer` from its signer by its log, with its token, amount and recipient, never the system emitter's log that Arc adds beside each USDC transfer; the account test, a transfer to the challenge's `recipient`, its token and amount compared with nothing, and for a reverted one, which moved nothing, the recipient of the `transfer` call that is the transaction's own; and its result, the payer's account nonce consumed by its inclusion. So a reverted one whose call pays the `recipient` is `failed`, `transaction-failed`, any other reverted one `failed`, `instrument-consumed`, and one that succeeded with no transfer to the `recipient` `failed`, `instrument-consumed`, `other-account`, each at the final mark, and `pending`, `below-mark`, under it. Not found, it is `pending`, `not-found`, where the reader shows it holds the history the transaction would be in: an endpoint the seller declares archival (`archival`), or one that answers a read at the position the caller gives; otherwise `unreadable`, `history-gap`. `settled` states `presented: "yes"`, the act being the transaction the credential names. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`MppNamedRef`](https://lcp.integraledger.com/reference/api/mpp.md#mppnamedref) | | `reader` | [`MppEvmReader`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmreader) | | `query` | [`EvmQuery`](https://lcp.integraledger.com/reference/api/ap2.md#evmquery)\<`unknown`\> | #### Returns `Promise`\<[`MppEvmStatus`](https://lcp.integraledger.com/reference/api/mpp.md#mppevmstatus)\> *** ### usdcGatewaySalt() > **usdcGatewaySalt**(`i`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` `usdc`'s Gateway salt: keccak256 of the JCS of the inputs with `method` "usdc", `intent` "charge", `type` "gateway". #### Parameters | Parameter | Type | | ------ | ------ | | `i` | [`GatewaySaltInput`](https://lcp.integraledger.com/reference/api/mpp.md#gatewaysaltinput) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### usdcNonce() > **usdcNonce**(`id`, `realm`, `requestHash`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` `usdc`'s EIP-3009 nonce: keccak256 of the JCS of `{id, method: "usdc", realm, intent: "charge", requestHash}`, with `requestHash` written as `0x` and 64 lowercase hex. #### Parameters | Parameter | Type | | ------ | ------ | | `id` | `string` | | `realm` | `string` | | `requestHash` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### usdcRequestHash() > **usdcRequestHash**(`requestParam`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> keccak256 of the challenge's `request` parameter's decoded bytes, as `0x` and lowercase hex. The bytes must be the RFC 8785 form of their own parse, else `mpp/request-not-jcs`; they are hashed as received. #### Parameters | Parameter | Type | | ------ | ------ | | `requestParam` | `string` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### challengeH Re-exports [challengeH](https://lcp.integraledger.com/reference/api.md#challengeh) *** ### challengeHash Re-exports [challengeHash](https://lcp.integraledger.com/reference/api.md#challengehash) *** ### challengeId Re-exports [challengeId](https://lcp.integraledger.com/reference/api.md#challengeid) *** ### ChannelKind Re-exports [ChannelKind](https://lcp.integraledger.com/reference/api.md#channelkind) *** ### 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) *** ### FETCHED Re-exports [FETCHED](https://lcp.integraledger.com/reference/api.md#fetched) *** ### HederaVoucherTypedData Re-exports [HederaVoucherTypedData](https://lcp.integraledger.com/reference/api/hedera.md#hederavouchertypeddata) --- # @integraledger/lcp/near > NEAR: the pairing `x402/exact/near`. The payer signs a NEP-366 delegate action for one NEP-141 `ft_transfer` whose `memo` argument is the ATR hash's LCP string; a facilitator's relayer submits it. Source: https://lcp.integraledger.com/reference/api/near Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. NEAR: the pairing `x402/exact/near`. The payer signs a NEP-366 delegate action for one NEP-141 `ft_transfer` whose `memo` argument is the ATR hash's LCP string; a facilitator's relayer submits it. The read finds the payer's act by the payer's access key, through a bounded reader, and searches every access key of the payer's account for H. ## Interfaces ### NearChoice #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | | `accessKeyNonce` | `bigint` | `view_access_key`'s nonce for the key. | | `finalHeight` | `bigint` | `block` at finality "final": its height. | | `payer` | `string` | The payer's account: a NEAR account id, as nearcore reads a delegate action's sender, or `x402/option-malformed`. | | `publicKey` | `string` | The access key, read as nearcore's `PublicKey::from_str` reads it: the key type before the first `:`, `ed25519` or `secp256k1` in ASCII letters of either case, or no key type, which is Ed25519; then the base58 of exactly that type's key size, 32 bytes or 64. Any other text is `x402/option-malformed`. | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | *** ### NearFunctionCall A function call of a delegate action: its method, its base64 arguments, its gas, and its deposit in yoctoNEAR. #### Properties | Property | Type | | ------ | ------ | | `argsBase64` | `string` | | `deposit` | `bigint` | | `gas` | `bigint` | | `methodName` | `string` | *** ### NearKeyChange One change of an access key, as the RPC's `changes` answers it for `single_access_key_changes` and `all_access_key_changes` (https://docs.near.org/api-reference/post-changes, read 2026-11-16): the height of the block it is in; the key, written as the RPC writes one; the key's nonce after it, or null where it deleted the key (`access_key_deletion`); and, where the reader can name them, the transaction that carried it and that transaction's signer. The change's `cause` names a transaction (`transaction_processing`) or a receipt (`receipt_processing`), which for a delegate action is the receipt the relayer's transaction made; the reader names the transaction from it where it can, as a run on `near:testnet` showed (the profile `x402-exact-near-memo`, rule 9). #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `height` | `readonly` | `bigint` | | `nonce` | `readonly` | `bigint` \| `null` | | `publicKey` | `readonly` | `string` | | `transaction?` | `readonly` | `object` | | `transaction.hash` | `readonly` | `string` | | `transaction.signer` | `readonly` | `string` | *** ### NearOutcome A transaction as nearcore's `EXPERIMENTAL_tx_status` answers it (NEAR RPC, `RpcTransactionResponse`, https://docs.near.org/api-reference/post-experimental_tx_status, read 2026-11-16). #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `delegate` | \{ `actions`: readonly ([`NearFunctionCall`](https://lcp.integraledger.com/reference/api/near.md#nearfunctioncall) \| `null`)[]; `maxBlockHeight`: `bigint`; `nonce`: `bigint`; `publicKey`: `string`; `receiverId`: `string`; `senderId`: `string`; \} \| `null` | The delegate action the transaction carries, as the RPC writes a `Delegate` action's `delegate_action` (NEP-366): its `sender_id`, `public_key`, `nonce`, `max_block_height` and `receiver_id`, and its actions in order, each a `FunctionCall` or null for an action of any other kind. The sender and the receiver are NEAR account ids, and the key is written as the RPC writes one. Null: the transaction carries no delegate action. | | `receipts` | readonly `object`[] | Each receipt of `receipts_outcome`: its `id`, its `executor_id`, a NEAR account id, its outcome (`SuccessValue` or `SuccessReceiptId` as `success`, `Failure` as `failure`, `Unknown` as `pending`), and the height of the block it executed in, which the reader reads from the outcome's `block_hash`, absent while it has not executed. | | `status` | `string` | `final_execution_status`: `FINAL` once the transaction and all its receipts are in final blocks. | *** ### NearReader Bounded, read-only calls against one network's RPC (https://docs.near.org/api/rpc/introduction, read 2026-11-16). Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`: a `ReaderError` reads by its kind (`too-large` as `too-large`, `malformed` as `unparseable`), any other rejection as `transport`. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`NearNetwork`](https://lcp.integraledger.com/reference/api/near.md#nearnetwork) | #### Methods ##### accessKeyChanges() > **accessKeyChanges**(`account`, `publicKey`, `from`, `to`): `Promise`\<[`NearKeyChanges`](https://lcp.integraledger.com/reference/api/near.md#nearkeychanges)\> `changes` `single_access_key_changes` for the account's one key, block by block from `from` to `to`. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `publicKey` | `string` | | `from` | `bigint` | | `to` | `bigint` | ###### Returns `Promise`\<[`NearKeyChanges`](https://lcp.integraledger.com/reference/api/near.md#nearkeychanges)\> ##### accessKeyNonce() > **accessKeyNonce**(`account`, `publicKey`, `finality`): `Promise`\<\{ `blockHeight`: `bigint`; `nonce`: `bigint` \| `null`; \}\> `query` `view_access_key` at the finality asked, "final" or "optimistic" (the latest head), for the account and the key, written as the RPC writes one: the key's nonce, or null where the account holds no such key, and the `block_height` of the block whose state the answer reads, which the RPC gives in both answers. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `publicKey` | `string` | | `finality` | [`NearMark`](https://lcp.integraledger.com/reference/api/near.md#nearmark) | ###### Returns `Promise`\<\{ `blockHeight`: `bigint`; `nonce`: `bigint` \| `null`; \}\> ##### accountKeyChanges() > **accountKeyChanges**(`account`, `from`, `to`): `Promise`\<[`NearKeyChanges`](https://lcp.integraledger.com/reference/api/near.md#nearkeychanges)\> `changes` `all_access_key_changes` for every key of the account, block by block from `from` to `to`. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `from` | `bigint` | | `to` | `bigint` | ###### Returns `Promise`\<[`NearKeyChanges`](https://lcp.integraledger.com/reference/api/near.md#nearkeychanges)\> ##### finalHeight() > **finalHeight**(): `Promise`\<`bigint`\> `block` at finality "final": its header's height. ###### Returns `Promise`\<`bigint`\> ##### txStatus() > **txStatus**(`txHash`, `sender?`): `Promise`\<[`NearOutcome`](https://lcp.integraledger.com/reference/api/near.md#nearoutcome) \| `null`\> `EXPERIMENTAL_tx_status` with `wait_until` "NONE", for the transaction's hash and its signer's account where the read knows it (the RPC's `sender_account_id`); null: unknown. The RPC refuses a hash named without its signer, so a reader resolves the signer itself, as a seller's reader can from the accounts that relayed its payments (the profile `x402-exact-near-memo`, rule 9). ###### Parameters | Parameter | Type | | ------ | ------ | | `txHash` | `string` | | `sender?` | `string` | ###### Returns `Promise`\<[`NearOutcome`](https://lcp.integraledger.com/reference/api/near.md#nearoutcome) \| `null`\> *** ### NearRef The read keys `reference` returns, JSON-serialisable: the option's payee (`payTo`), the key of the read's two party tests; the network; and the delegate action the payer signed, whole, its signature apart: its sender (`payer`), its receiver (`asset`), its key, `nonce` and `maxBlockHeight` as decimal strings, and its one function call, an `ft_transfer` whose arguments are held by their SHA-256 (`argsDigest`, `0x` and lowercase hex) with its `gas` and `deposit` as decimal strings; and `h`, the hash its memo carries. `transaction` is a hint where a settler names one: it shortens the search and proves nothing. #### Properties | Property | Type | | ------ | ------ | | `argsDigest` | `` `0x${string}` `` | | `asset` | `string` | | `deposit` | `string` | | `gas` | `string` | | `h` | `` `0x${string}` `` | | `maxBlockHeight` | `string` | | `network` | [`NearNetwork`](https://lcp.integraledger.com/reference/api/near.md#nearnetwork) | | `nonce` | `string` | | `payee` | `string` | | `payer` | `string` | | `publicKey` | `string` | | `transaction?` | `string` | *** ### NearUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | What the key signs. `delegateAction` is the borsh of the NEP-366 `DelegateAction`; `hash` is the SHA-256 of the NEP-461 prefix, `NEP461_DELEGATE` as a little-endian u32, followed by those bytes. `nearRequest` reads them. | | `request.delegateAction` | `Uint8Array`\<`ArrayBuffer`\> | - | | `request.hash` | `Uint8Array`\<`ArrayBuffer`\> | - | | `request.kind` | `"near-delegate"` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`NearPayment`](https://lcp.integraledger.com/reference/api.md#nearpayment) Takes the key type (0 Ed25519, 1 secp256k1) and its 64- or 65-byte signature. An Ed25519 signature whose last byte is 0x20 or more is `x402/signature-malformed`: nearcore reads none, and a valid signature never has one. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | \{ `bytes`: `Uint8Array`; `keyType`: `0` \| `1`; \} | | `signature.bytes` | `Uint8Array` | | `signature.keyType` | `0` \| `1` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`NearPayment`](https://lcp.integraledger.com/reference/api.md#nearpayment) ## Type Aliases ### Answer > **Answer** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`NearMark`](https://lcp.integraledger.com/reference/api/near.md#nearmark), `bigint`\> *** ### NearKeyChanges > **NearKeyChanges** = \{ `changes`: readonly [`NearKeyChange`](https://lcp.integraledger.com/reference/api/near.md#nearkeychange)[]; `through`: `bigint`; \} \| \{ `history`: `"missing"`; \} A range read of access-key changes: every change in the blocks from `from` to `through`, the last height the reader read, at most the range's end, a height with no block holding none; or `history: "missing"` where the node holds no block at the range's start (the RPC's `GARBAGE_COLLECTED_BLOCK` or `UNKNOWN_BLOCK` for a height it should hold). *** ### NearMark > **NearMark** = `"optimistic"` \| `"final"` The marks of a NEAR read, lowest first: optimistic (the latest head) and `FINAL`, the final mark. *** ### NearNetwork > **NearNetwork** = `"near:mainnet"` \| `"near:testnet"` x402's NEAR network identifiers. *** ### NearQuery > **NearQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`NearRef`](https://lcp.integraledger.com/reference/api/near.md#nearref), `bigint`, [`NearMark`](https://lcp.integraledger.com/reference/api/near.md#nearmark), `bigint`\> What `status` takes beside the reference and the reader, as the profile `read-status` states it: positions and the search position are block heights. *** ### NearStatus > **NearStatus** = [`Answer`](https://lcp.integraledger.com/reference/api/near.md#answer) The answer of `status`, as the profile `read-status` gives it, positions being block heights. A `settled` answer states `presented`: `yes` where the delegate action it settled on is, member by member, the one the reference was built from, `no` where a member differs, `unshown` where the read could not read the delegate. Each transfer it names in `moved` is named by the transaction and, as `place`, the id of the receipt the token contract executed for it. ## Variables ### exactNear > `const` **exactNear**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`NearUnsigned`](https://lcp.integraledger.com/reference/api/near.md#nearunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/near"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`NearRef`](https://lcp.integraledger.com/reference/api/near.md#nearref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`Answer`](https://lcp.integraledger.com/reference/api/near.md#answer)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/near`. The payee broadcasts (`broadcaster` answers `"payee"`): a relayer of the seller's facilitator submits the delegate action the payer signed; `status` finds it by the payer's access key and searches every key of the payer's account for H. *** ### FT\_TRANSFER\_GAS > `const` **FT\_TRANSFER\_GAS**: `30000000000000n` = `30_000_000_000_000n` *** ### MAX\_FT\_TRANSFER\_ARGS\_BYTES > `const` **MAX\_FT\_TRANSFER\_ARGS\_BYTES**: `4096` = `4096` The longest `ft_transfer` arguments lcp reads, in bytes: lcp's own resource bound. NEP-141 sets no size for a memo; the bound holds the arguments lcp's client writes, a NEAR account id, a 128-bit amount and an LCP string, many times over, and bounds the JSON every read of the arguments parses. *** ### MAX\_SIGNED\_DELEGATE\_BASE64 > `const` **MAX\_SIGNED\_DELEGATE\_BASE64**: `8192` = `8192` The longest `signedDelegateAction` lcp decodes, in base64 characters: lcp's own resource bound. x402's NEAR scheme sets no size for it; it bounds the text `bound`, `reference` and `nearCarrier` decode before anything is read, and holds a delegate whose one `ft_transfer` carries arguments of `MAX_FT_TRANSFER_ARGS_BYTES`. *** ### NEP461\_DELEGATE > `const` **NEP461\_DELEGATE**: `1073742190` = `1073742190` The NEP-461 prefix for a delegate action: (1 << 30) + 366. ## Functions ### ftTransferArgs() > **ftTransferArgs**(`payTo`, `amount`, `h`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) `ft_transfer`'s arguments: `receiver_id`, `amount` and `memo`, in that order, as `JSON.stringify` writes them. A `payTo` that is not a NEAR account id, or an `amount` that is not the canonical decimal string of a positive integer below 2^128, is `near/option-malformed`, as the option filter answers an option carrying it, since the token contract reads `receiver_id` as an `AccountId` and `amount` as a `U128` and refuses anything else; then a value that is not a 32-byte hash is `x402/payload-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `payTo` | `string` | | `amount` | `string` | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### nearCarrier() > **nearCarrier**(`signedDelegateAction`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `asset`: `string`; `h`: `` `0x${string}` ``; `maxBlockHeight`: `bigint`; `nonce`: `bigint`; `payer`: `string`; `publicKey`: `string`; \} Reads a base64 `SignedDelegateAction` whose one action is a `FunctionCall` of `ft_transfer` with a JSON object of arguments whose `receiver_id` is a NEAR account id and whose `memo` is an LCP string. The bytes are read in the order nearcore reads them: the sender and the receiver, where one that is not UTF-8, or not a NEAR account id, is `near/sda-malformed`, then the count of actions, where a count other than one is `near/actions`, then the action's variant index, where any index other than `FunctionCall`'s is `near/not-ft-transfer`, the bytes after it unread. Otherwise the bytes must be exactly the borsh encoding of what is read, every string in it UTF-8, the key and the signature each Ed25519 or secp256k1, and an Ed25519 signature's last byte below 0x20, as nearcore reads one, or they are `near/sda-malformed`. The arguments are strict UTF-8 JSON text whose leading byte-order mark is kept as a character, so arguments that begin with one are `near/args-malformed`. So are arguments the token contract refuses: it reads them as near-sdk does, with serde's derived reader over `receiver_id: AccountId`, `amount: U128` and `memo: Option`. Those are arguments whose object names `receiver_id`, `amount` or `memo` more than once, each key read with its escapes decoded, or has a key that decodes to a lone surrogate, or whose `receiver_id` is not a NEAR account id, or whose `amount` is not a string of an optional `+` and one or more ASCII digits below 2^128, leading zeros allowed (Rust's `u128::from_str`). Any other key is ignored, however often it repeats. Then a `memo` that is not a string is `near/memo-missing`, and one that is not an LCP string `near/memo-not-lcp`. The amount is not compared with the option's. A NEAR account id is 2 to 64 characters, each a lowercase ASCII letter, a digit, `-`, `_` or `.`, where a separator (`-`, `_` or `.`) is never first, never last, and never follows another (near-account-id's `AccountId`). borsh reads the bytes from the sender on, the action count and variant included. Without it, a value that is not a string, is too long or is not base64 gets the code it gets with borsh, as those checks need no peer, and any other value is `near/peer-missing`. #### Parameters | Parameter | Type | | ------ | ------ | | `signedDelegateAction` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `asset`: `string`; `h`: `` `0x${string}` ``; `maxBlockHeight`: `bigint`; `nonce`: `bigint`; `payer`: `string`; `publicKey`: `string`; \} *** ### nearRecover() > **nearRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Recovers the hash from a transaction: the `memo` in its delegate action's one `ft_transfer`. The input is `{network, tx, option}`: the network, the transaction's hash, and the option the payment answers, an object, of which the read needs no member; the transaction is read by its hash alone, its signer unknown. A transaction that carries no delegate action, or whose delegate's one action is not a function call of `ft_transfer`, is `near/not-ft-transfer`, and one with more than one action `near/actions`; one the reader does not know is `near/not-found`. A failed read, an outcome that is not well formed, or a delegate whose arguments are not base64 in its canonical form (RFC 4648 §3.5) is `near/unreadable`. An input that is not one, a reader for another network, a `tx` that is not a non-empty string, or an option that is not an object, is `near/wrong-reader`, with nothing read. The arguments are read as `nearCarrier` reads them, as the token contract reads them: arguments over the size bound, not UTF-8 JSON, not an object, or that the contract refuses are `near/args-malformed`; then a `memo` that is not a string is `near/memo-missing`, and one that is not an LCP string `near/memo-not-lcp`. The hash is recovered whatever the transfer's outcome. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<[`NearNetwork`](https://lcp.integraledger.com/reference/api/near.md#nearnetwork), [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`NearReader`](https://lcp.integraledger.com/reference/api/near.md#nearreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### nearRequest() > **nearRequest**(`delegateAction`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `amount`: `string`; `asset`: `string`; `deposit`: `bigint`; `gas`: `bigint`; `h`: `` `0x${string}` ``; `hash`: `Uint8Array`\<`ArrayBuffer`\>; `maxBlockHeight`: `bigint`; `nonce`: `bigint`; `payer`: `string`; `payTo`: `string`; `publicKey`: `string`; \}\> Reads the delegate action a `near-delegate` request carries, its borsh bytes, as `nearCarrier` reads the delegate action of a signed one, with its codes, and gives `hash`, the SHA-256 of the NEP-461 prefix followed by those bytes, which is the request's `hash` when the bytes are its `delegateAction`. It gives every member the bytes hold: the sender (`payer`) and its access key, the token contract (`asset`, the receiver), the one function call's gas and attached deposit in yoctoNEAR, the nonce, `maxBlockHeight`, the last block height at which the action can run, and the `ft_transfer` arguments' `receiver_id` (`payTo`), `amount` and the hash in `memo`. A delegate action holds one action, an `ft_transfer`, or it is refused, so nothing else runs under the signature. A value that is not a `Uint8Array` is `near/sda-malformed`, and bytes longer than those of the longest signed delegate action lcp decodes are `near/sda-too-large`; without borsh, bytes within the bound are `near/peer-missing`. #### Parameters | Parameter | Type | | ------ | ------ | | `delegateAction` | `Uint8Array` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `amount`: `string`; `asset`: `string`; `deposit`: `bigint`; `gas`: `bigint`; `h`: `` `0x${string}` ``; `hash`: `Uint8Array`\<`ArrayBuffer`\>; `maxBlockHeight`: `bigint`; `nonce`: `bigint`; `payer`: `string`; `payTo`: `string`; `publicKey`: `string`; \}\> *** ### nearStatus() > **nearStatus**(`ref`, `reader`, `query`): `Promise`\<[`Answer`](https://lcp.integraledger.com/reference/api/near.md#answer)\> Answers `status` as the profile `read-status` gives it, from what the read observed. The read holds the single-use value, the payer's access key's nonce, read at `final` and at the latest head; and, from the block after the position the caller gives (the first block where it gives none): - the access-key search: where the nonce is read at or past the signed one, the changes of that key up to the block it was read so at, for the change that carried the nonce to or past the signed one, and the transaction that carried it; - the search for H: the changes of every access key of the payer's account up to the latest head the reader serves, each read through the transaction that carried it, from the search position an earlier answer returned where the caller gives one; - the transaction the reference names as a hint, which proves nothing and stops no search. A transaction read is a delegate of the payer's that carries H where one of its function calls is an `ft_transfer` or `ft_transfer_call` whose memo is H's LCP string, read as the token contract reads the arguments; it is this pairing's kind where it holds exactly one action, an `ft_transfer`. Its signer is the delegate's sender, compared with the reference's payer and the option's payee; the account it names is its `receiver_id`, compared with the payee; it consumed the single-use value where it carried the key's nonce to or past the signed one; it succeeded where the payer's account ran the delegate and the token contract's receipt for it succeeded, and failed where either failed; and one whose token receipt has not run is kept below the final mark. Its mark is `final` where the RPC's `final_execution_status` is `FINAL` and its change is at or below the final height, `optimistic` otherwise. What it moved is the transfer the token contract ran: the token, the amount the arguments name and the `receiver_id`, named by the transaction and, as `place`, the id of the token contract's receipt. A transaction it is given as another act under the same H is matched by its hash, or, given by its reference, by the delegate's sender, key and nonce. A change whose transaction the reader cannot name stops the search at the block before it; a transaction it cannot read is named as one the search could not decode, held at the block before it, and the search reads on (one the caller gave is named `given`). The value is read at the final mark and at the latest head: consumed where the nonce is at or past the signed one; lapsed where it is below the signed one at a block past `max_block_height`; a key that is absent at either read leaves the value unread, and holds the search short of whole whatever it reads, since the value may have been taken before the key went: such a read answers `pending`, `search-incomplete`, never `not-found`. No run has yet shown the search across the account's keys whole, so the search is never read whole, and every `failed` but `before-position` answers `pending`, `search-incomplete`. A `settled` answer states `presented`: `yes` where the delegate is, member by member, the one the reference holds, `no` otherwise. A read that rejects is unreadable by its reason; an answer outside the reader's documented form, a change outside the range asked among them, `unparseable`; a range the node holds no history for, `history-gap`; a reader for another network than the reference's, `chain-mismatch`; a reference, reader or query that is not one, `unparseable`, with nothing read. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`NearRef`](https://lcp.integraledger.com/reference/api/near.md#nearref) | | `reader` | [`NearReader`](https://lcp.integraledger.com/reference/api/near.md#nearreader) | | `query` | [`NearQuery`](https://lcp.integraledger.com/reference/api/near.md#nearquery) | #### Returns `Promise`\<[`Answer`](https://lcp.integraledger.com/reference/api/near.md#answer)\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### NearPayment Re-exports [NearPayment](https://lcp.integraledger.com/reference/api.md#nearpayment) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/polkadot > Polkadot Asset Hub: the profile pairing `x402/exact/polkadot/lcp-assets-remark`, in which the payer signs one extrinsic that transfers an asset and remarks the ATR hash's LCP string. Source: https://lcp.integraledger.com/reference/api/polkadot Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Polkadot Asset Hub: the profile pairing `x402/exact/polkadot/lcp-assets-remark`, in which the payer signs one extrinsic that transfers an asset and remarks the ATR hash's LCP string. Its call is `utility.batch_all([assets.transfer_keep_alive, system.remark_with_event])`, the remark the hash's LCP string; the settlement is read by the signer's account nonce through polkadot-rest-api. SCALE is encoded and decoded here for these shapes only. ## Interfaces ### PolkadotCursor The search's position, which a `pending` answer returns while the search has range left and the next call takes: the next block to read, never above the finalized height's next, and the timepoints the search met at or below the finalized height, which the next call reads again. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `hits` | `readonly` | readonly `string`[] | - | | `next` | `readonly` | `bigint` | - | | `validated?` | `readonly` | `bigint` | The head at which the chain's validation of the presented extrinsic answered valid, which proves the era's last block; kept in the position so that the next call takes it back. | *** ### PolkadotExtrinsic #### Properties | Property | Type | | ------ | ------ | | `at` | `object` | | `at.hash` | `` `0x${string}` `` | | `at.height` | `bigint` | | `events` | readonly `object`[] | | `hash` | `` `0x${string}` `` | | `success` | `boolean` | *** ### PolkadotReader Bounded, read-only calls against one network's `polkadot-rest-api`, and its declared `json-rpc` side endpoint for the validation of a presented extrinsic. Every failure rejects. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`PolkadotNetwork`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotnetwork) | #### Methods ##### accountNonce() > **accountNonce**(`account`, `at`): `Promise`\<`bigint`\> `GET /accounts/{account}/balance-info?at=` → nonce: the account's nonce at the finalized block, or at the head. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `` `0x${string}` `` | | `at` | `"head"` \| `"finalized"` | ###### Returns `Promise`\<`bigint`\> ##### extrinsic() > **extrinsic**(`block`, `index`): `Promise`\<[`PolkadotExtrinsic`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotextrinsic) \| `null`\> `GET /blocks/{block}/extrinsics/{index}`; null when the block or extrinsic does not exist. ###### Parameters | Parameter | Type | | ------ | ------ | | `block` | `bigint` \| `` `0x${string}` `` | | `index` | `number` | ###### Returns `Promise`\<[`PolkadotExtrinsic`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotextrinsic) \| `null`\> ##### finalizedHeight() > **finalizedHeight**(): `Promise`\<`bigint`\> `GET /blocks/head/header` → number: the most recently finalized height. ###### Returns `Promise`\<`bigint`\> ##### headHeight() > **headHeight**(): `Promise`\<`bigint`\> `GET /blocks/head/header?finalized=false` → number: the latest head the endpoint serves. ###### Returns `Promise`\<`bigint`\> ##### rawExtrinsics() > **rawExtrinsics**(`block`): `Promise`\ `GET /blocks/{block}/extrinsics-raw`; null when the block does not exist. ###### Parameters | Parameter | Type | | ------ | ------ | | `block` | `bigint` \| `` `0x${string}` `` | ###### Returns `Promise`\ ##### validate() > **validate**(`extrinsic`): `Promise`\<\{ `head`: `bigint`; `valid`: `boolean`; \}\> `TaggedTransactionQueue_validate_transaction` of the extrinsic at the best block, through the `json-rpc` endpoint: whether it answered valid, and the height of the block the call ran at, `state_call`'s `at`, pinned before the call, never a head read apart from it. ###### Parameters | Parameter | Type | | ------ | ------ | | `extrinsic` | `` `0x${string}` `` | ###### Returns `Promise`\<\{ `head`: `bigint`; `valid`: `boolean`; \}\> *** ### PolkadotRef The read keys of the presented extrinsic, from its signed bytes: the signer's 32-byte account, the account nonce and the era it signed, and the extrinsic itself, which the read validates and compares with what landed; with the accepted option's network and the payee, the `payTo` of the option the payment answers, the key of the two party tests and no search key. #### Properties | Property | Type | | ------ | ------ | | `era` | [`PolkadotEra`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotera) | | `extrinsic` | `` `0x${string}` `` | | `network` | [`PolkadotNetwork`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotnetwork) | | `nonce` | `string` | | `payee` | `string` | | `signer` | `` `0x${string}` `` | *** ### PolkadotUnsigned The call the payer's signer wraps in an extrinsic, and how that extrinsic completes the payment. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.call` | `Uint8Array`\<`ArrayBuffer`\> | | `request.kind` | `"substrate-call"` | | `request.network` | [`PolkadotNetwork`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotnetwork) | #### Methods ##### complete() > **complete**(`extrinsic`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PolkadotPaymentPayload`](https://lcp.integraledger.com/reference/api.md#polkadotpaymentpayload) ###### Parameters | Parameter | Type | | ------ | ------ | | `extrinsic` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PolkadotPaymentPayload`](https://lcp.integraledger.com/reference/api.md#polkadotpaymentpayload) *** ### ProfileCall The profile's call. `B` is what its bytes are backed by: `decodeProfileCall` gives `ProfileCall`, each byte field in its own fresh `ArrayBuffer`, and `encodeProfileCall` takes any backing. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` | #### Properties | Property | Type | | ------ | ------ | | `amount` | `bigint` | | `assetId` | `number` | | `dest` | `Uint8Array`\<`B`\> | | `remark` | `Uint8Array`\<`B`\> | ## Type Aliases ### PolkadotEra > **PolkadotEra** = \{ `period`: `number`; `phase`: `number`; \} \| `"immortal"` A signed extrinsic's era: mortal, with its period and phase, or immortal. *** ### PolkadotLanded > **PolkadotLanded** = [`PolkadotRef`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotref) & `object` The reference with what the caller adds: H, and the timepoint a settler named, a hint. #### Type Declaration | Name | Type | | ------ | ------ | | `h` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | | `transaction?` | `string` | *** ### PolkadotMark > **PolkadotMark** = `"head"` \| `"finalized"` *** ### PolkadotNetwork > **PolkadotNetwork** = `"polkadot:68d56f15f85d3136970ec16946040bc1"` \| `"polkadot:67f9723393ef76214df0118c34bbbd3d"` *** ### PolkadotQuery > **PolkadotQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`PolkadotLanded`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotlanded), `bigint`, [`PolkadotMark`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotmark), [`PolkadotCursor`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotcursor)\> What `polkadotStatus` takes beside the reference and the reader: the profile `read-status`'s query. *** ### PolkadotStatus > **PolkadotStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`PolkadotMark`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotmark), [`PolkadotCursor`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotcursor)\> The answer of `polkadotStatus`, as the profile `read-status` gives it. Its marks are `head` and `finalized`, in that order, and its position the block height. A transaction is named by its timepoint, `-`. A `settled` answer states `presented`: `yes` where the landed extrinsic's signed body, its signature apart, is the presented one's, `no` where it is not. Each transfer of what moved is named by the timepoint and its place: the event's index among the extrinsic's events, or, for a transfer call of zero, which emits no event, `call` and the index of each call on the path from the extrinsic's own call down to it (`call 0` for the profile's own). Its `signer` is the extrinsic's signer, and its `authority` the wrapper it acted through for the payer, `proxy.proxy` or `multisig.as_multi_threshold_1`, absent where it signed as the payer. A `pending` answer that holds the head at which the chain's validation of the presented extrinsic answered valid keeps it in its search position, `validated`, for the next call. ## Variables ### CALL > `const` **CALL**: `Readonly`\<\{ `batchAll`: readonly `number`[]; `remarkWithEvent`: readonly `number`[]; `transferKeepAlive`: readonly `number`[]; \}\> Pallet and call indices, the same on both networks. *** ### exactPolkadotRemark > `const` **exactPolkadotRemark**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PolkadotUnsigned`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotunsigned)\>; `claims`: `true`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/polkadot/lcp-assets-remark"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PolkadotRef`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`PolkadotStatus`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/polkadot/lcp-assets-remark`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator submits the extrinsic the payer signed and names where it landed; `status` reads it by the signer's account nonce, the timepoint the facilitator named being a hint. *** ### LCP\_ASSETS\_REMARK > `const` **LCP\_ASSETS\_REMARK**: `"lcp-assets-remark"` = `"lcp-assets-remark"` The profile's `assetTransferMethod`. *** ### POLKADOT\_BOUNDS > `const` **POLKADOT\_BOUNDS**: `Readonly`\<\{ `blockHashCount`: `4096`; `call`: `141`; `extrinsic`: `4096`; `remark`: `77`; `searchBlocks`: `64`; \}\> The pairing's bounds, each lcp's own or the chain's, with its reason. `extrinsic`: lcp's bound on a signed extrinsic's bytes, length prefix included, which the profile's extrinsic fits many times over and which bounds what is decoded. `remark`: the 77 ASCII bytes `lcp:sha256:` and H. `call`: the longest profile call, both compacts in their widest form, a `u32` asset id and a `u128` amount. `blockHashCount`: the chain's `BlockHashCount`, the number of block hashes an extrinsic's era can name (the profile's rule 7). `searchBlocks`: lcp's resource bound, the blocks one call of `polkadotStatus` reads of its search, so that each call's reads are bounded; the next call takes the search's position. The search holds the signer's own items alone to `extrinsic`. ## Functions ### decodeProfileCall() > **decodeProfileCall**(`call`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ProfileCall`](https://lcp.integraledger.com/reference/api/polkadot.md#profilecall)\<`ArrayBuffer`\> The profile's call, exactly, with canonical compacts and no trailing byte. Its bytes are copies of `call`'s. #### Parameters | Parameter | Type | | ------ | ------ | | `call` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ProfileCall`](https://lcp.integraledger.com/reference/api/polkadot.md#profilecall)\<`ArrayBuffer`\> *** ### encodeProfileCall() > **encodeProfileCall**(`c`): `Uint8Array`\<`ArrayBuffer`\> `batch_all([transfer_keep_alive(assetId, Id(dest), amount), remark_with_event(remark)])`, the inverse of `decodeProfileCall`. Throws TypeError on a call that `decodeProfileCall` never gives: `assetId` must be an integer from 0 to 2^32 − 1, `dest` 32 bytes, `amount` a bigint from 0 to 2^128 − 1, and `remark` 77 bytes. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`ProfileCall`](https://lcp.integraledger.com/reference/api/polkadot.md#profilecall) | #### Returns `Uint8Array`\<`ArrayBuffer`\> *** ### extrinsicHash() > **extrinsicHash**(`xt`): `` `0x${string}` `` BLAKE2b-256 of the extrinsic's bytes, its length prefix included. Throws TypeError when `xt` is not a `Uint8Array`. #### Parameters | Parameter | Type | | ------ | ------ | | `xt` | `Uint8Array` | #### Returns `` `0x${string}` `` *** ### polkadotRecover() > **polkadotRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The hash from the landed extrinsic alone, for anyone holding its timepoint. It reads the block's raw extrinsics, then the chain's record of the extrinsic at the index, and ties the two before anything else: the raw bytes' BLAKE2b-256 must be the record's hash. A block or a record the reader does not have is `polkadot/not-found`, and a block whose extrinsics hold no entry at the index is `polkadot/not-located`. Extrinsics that are not an array, an entry that is not a hex string, a record that is not an extrinsic's, or raw bytes whose hash is not the record's are `polkadot/unreadable`. The bytes so tied must end with the profile call, after the signature, whose remark is the hash's LCP string with lowercase hex. The record read is then chosen as `polkadotStatus` chooses it, and a named block that the finalized chain does not hold, with no copy of the extrinsic at that index of the canonical block at its height, is `polkadot/not-located`. That record must show the extrinsic dispatched with the `Remarked` event for the remark, whatever it moved: one that does not is `polkadot/no-remark` once the finalized chain holds its block, and `polkadot/not-final` while the block is above the finalized height, since that block can be replaced. The input's `tx` is the timepoint, and its `option` the option the payment answers, an object, of which the read needs no member. An input whose `tx` is not a `-` timepoint, or whose option is not an object, is `polkadot/wrong-reader`, with nothing read. At most four calls. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<[`PolkadotNetwork`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotnetwork), [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`PolkadotReader`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### polkadotStatus() > **polkadotStatus**(`ref`, `reader`, `query`): `Promise`\<[`PolkadotStatus`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotstatus)\> Answers the read of the act the query asks about as the profile `read-status` gives it, by the pairing's profile, rule 8: the payment is read by the signer's account nonce, never by the extrinsic's hash. The read takes the finalized height, the latest head, and the account's nonce at each; then reads the timepoint a settler named, the hint, and the search's earlier finds; then searches every block after the position the caller gave up to the latest head, at most `POLKADOT_BOUNDS.searchBlocks` blocks a call, decoding each item's preamble, a signed v4 extrinsic's or, on Polkadot Asset Hub, that of a v5 general transaction `VerifyMultiSignature` signs: the signer's extrinsic at the signed nonce is the instrument's, and every extrinsic whose bytes hold the remark of H is read for the search for H. An extrinsic meets the profile's success where it dispatched (`success`) with `Remarked` for the remark; on the act `payment` it names the payee's account where a transfer it made reaches `payTo`'s 32-byte account. The era's last block is proven only by the chain's validation of the presented extrinsic answering valid, at the head it names (the search position's `validated`), and the lapse is the finalized height past it with the account nonce not past the signed one. A ref, a reader or a query that is not one is unreadable `unparseable`, with nothing read; a reader for another network `chain-mismatch`; a read that rejects `transport`; a block of the range at or below the finalized height that the endpoint does not hold `history-gap`; an item of the signer's over `POLKADOT_BOUNDS.extrinsic` bytes `too-large`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`PolkadotLanded`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotlanded) | | `reader` | [`PolkadotReader`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotreader) | | `query` | [`PolkadotQuery`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotquery) | #### Returns `Promise`\<[`PolkadotStatus`](https://lcp.integraledger.com/reference/api/polkadot.md#polkadotstatus)\> *** ### splitSigned() > **splitSigned**(`xt`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `end`: `number`; `signer`: `Uint8Array`\<`ArrayBuffer`\>; \} The preamble of a signed v4 extrinsic: the length prefix, `0x84`, `MultiAddress::Id` and a `MultiSignature`. Gives the signer, a copy, and the index after the signature; the extension bytes that follow are not decoded. #### Parameters | Parameter | Type | | ------ | ------ | | `xt` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `end`: `number`; `signer`: `Uint8Array`\<`ArrayBuffer`\>; \} *** ### ss58Decode() > **ss58Decode**(`address`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) A simple-format SS58 address: one prefix byte 0–63, a 32-byte account, and a two-byte checksum. #### Parameters | Parameter | Type | | ------ | ------ | | `address` | `string` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### PolkadotPayload Re-exports [PolkadotPayload](https://lcp.integraledger.com/reference/api.md#polkadotpayload) *** ### PolkadotPaymentPayload Re-exports [PolkadotPaymentPayload](https://lcp.integraledger.com/reference/api.md#polkadotpaymentpayload) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/spend-permissions > The Spend Permission exchange and the pairing `spend-permissions/eip155`: an account's approval, on the SpendPermissionManager, of a Spend Permission whose `salt` is the ATR hash, as the sale's agreement. Source: https://lcp.integraledger.com/reference/api/spend-permissions Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The Spend Permission exchange and the pairing `spend-permissions/eip155`: an account's approval, on the SpendPermissionManager, of a Spend Permission whose `salt` is the ATR hash, as the sale's agreement. The offer in a `402` body, the typed data the account signs or the `approve` call it makes, the `Spend-Permission` return header, the resource server's checks, the permission's hash as the manager computes it, and the read of the approval by that hash, as the profile `spend-permissions/eip155` states them. No key is held, nothing is signed, and nothing is read but through the reader a caller supplies. ## Interfaces ### SpendPermission A Spend Permission as the exchange writes it: its nine members, each integer a string of decimal digits with no sign and no leading zero, each address `0x` and 40 hex digits, `extraData` `0x` and an even number of hex digits. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `account` | `readonly` | `` `0x${string}` `` | - | | `allowance` | `readonly` | `string` | A uint160. | | `end` | `readonly` | `string` | A uint48, a Unix time in seconds. | | `extraData` | `readonly` | `` `0x${string}` `` | - | | `period` | `readonly` | `string` | A uint48, in seconds. | | `salt` | `readonly` | `string` | A uint256: H, as a decimal. | | `spender` | `readonly` | `` `0x${string}` `` | - | | `start` | `readonly` | `string` | A uint48, a Unix time in seconds. | | `token` | `readonly` | `` `0x${string}` `` | - | *** ### SpendPermissionBody The `402` body: the offer, and on a refused return the code that refused it. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `error?` | `readonly` | [`SpendPermissionError`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionerror) | | `spendPermission` | `readonly` | [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer) | *** ### SpendPermissionChoice The buyer's inputs to `build`: the offer as `read` gave it, and the account that approves. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `account` | `readonly` | `` `0x${string}` `` | | `offer` | `readonly` | [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer) | *** ### SpendPermissionOffer The offer the `402` body's `spendPermission` member holds. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `accepts` | `readonly` | readonly [`SpendPermissionRoute`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionroute)[] | The routes the resource server takes, each once. | | `legalContext` | `readonly` | `object` | - | | `legalContext.legalContextUrl` | `readonly` | `string` | - | | `legalContext.type` | `readonly` | `"sha256"` | - | | `legalContext.value` | `readonly` | `` `0x${string}` `` | - | | `manager` | `readonly` | `` `0x${string}` `` | The SpendPermissionManager's address on `network`. | | `network` | `readonly` | `` `eip155:${string}` `` | - | | `permission` | `readonly` | [`OfferedPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#offeredpermission) | Every member of the permission but `account`, `salt` being H. | *** ### SpendPermissionOfferInput What the resource server offers before H is placed: the offer without `legalContext`, and `salt` absent or H. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `accepts` | `readonly` | readonly [`SpendPermissionRoute`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionroute)[] | | `manager` | `readonly` | `` `0x${string}` `` | | `network` | `readonly` | `` `eip155:${string}` `` | | `permission` | `readonly` | `Omit`\<[`OfferedPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#offeredpermission), `"salt"`\> & `object` | *** ### SpendPermissionRef The reference the read takes: the option's payee is the permission's `spender`. #### Extends - [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase) #### Properties | Property | Modifier | Type | Description | Overrides | Inherited from | | ------ | ------ | ------ | ------ | ------ | ------ | | `h` | `readonly` | `` `0x${string}` `` | H, the permission's `salt`. | - | - | | `hash` | `readonly` | `` `0x${string}` `` | The permission's hash, the search key. | - | - | | `manager` | `readonly` | `` `0x${string}` `` | The SpendPermissionManager the permission is approved on. | - | - | | `network` | `readonly` | `` `eip155:${string}` `` | - | [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase).[`network`](https://lcp.integraledger.com/reference/api/evm.md#property-network-5) | - | | `payee` | `readonly` | `string` | - | - | [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase).[`payee`](https://lcp.integraledger.com/reference/api/evm.md#property-payee-4) | | `permission` | `readonly` | [`SpendPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermission) | The permission whole, as presented: the members `presented` compares, and the argument of the value's two reads. | - | - | | `transaction?` | `readonly` | `` `0x${string}` `` | A transaction a settler or the caller named, read beside the search; never needed. | - | [`EvmReadRefBase`](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase).[`transaction`](https://lcp.integraledger.com/reference/api/evm.md#property-transaction-4) | *** ### SpendPermissionTypedData The EIP-712 typed data of the permission in the manager's domain, as a signer takes it. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `domain` | `readonly` | `object` | | `domain.chainId` | `readonly` | `number` | | `domain.name` | `readonly` | `string` | | `domain.verifyingContract` | `readonly` | `` `0x${string}` `` | | `domain.version` | `readonly` | `string` | | `message` | `readonly` | `object` | | `message.account` | `readonly` | `` `0x${string}` `` | | `message.allowance` | `readonly` | `bigint` | | `message.end` | `readonly` | `bigint` | | `message.extraData` | `readonly` | `` `0x${string}` `` | | `message.period` | `readonly` | `bigint` | | `message.salt` | `readonly` | `bigint` | | `message.spender` | `readonly` | `` `0x${string}` `` | | `message.start` | `readonly` | `bigint` | | `message.token` | `readonly` | `` `0x${string}` `` | | `primaryType` | `readonly` | `"SpendPermission"` | | `types` | `readonly` | `object` | | `types.SpendPermission` | `readonly` | readonly `object`[] | *** ### SpendPermissionUnsigned What `build` gives the account: the whole permission, its hash, the typed data it signs on `"signature"`, and the manager's `approve` call it makes on `"transaction"`. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `approve` | `readonly` | `object` | | `approve.data` | `readonly` | `` `0x${string}` `` | | `approve.to` | `readonly` | `` `0x${string}` `` | | `hash` | `readonly` | `` `0x${string}` `` | | `permission` | `readonly` | [`SpendPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermission) | | `typedData` | `readonly` | [`SpendPermissionTypedData`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissiontypeddata) | ## Type Aliases ### OfferedPermission > **OfferedPermission** = `Omit`\<[`SpendPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermission), `"account"`\> The permission as the offer writes it: every member but `account`. *** ### SpendPermissionError > **SpendPermissionError** = `"spend-permissions/not-bound"` \| `"spend-permissions/signature-invalid"` \| `"spend-permissions/not-approved"` \| `"spend-permissions/revoked"` \| `"spend-permissions/ended"` \| `"spend-permissions/header-malformed"` \| `"spend-permissions/route-not-accepted"` \| `"spend-permissions/account-is-spender"` The codes a refused return is answered with, in the `402` body's `error` member. *** ### SpendPermissionReturn > **SpendPermissionReturn** = `object` & \{ `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); `transaction?`: `never`; \} \| \{ `signature?`: `never`; `transaction`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} The return a `Spend-Permission` header carries: the whole permission, and the account's signature or transaction. #### Type Declaration | Name | Type | | ------ | ------ | | `manager` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `network` | [`Eip155`](https://lcp.integraledger.com/reference/api/evm.md#eip155) | | `permission` | [`SpendPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermission) | *** ### SpendPermissionRoute > **SpendPermissionRoute** = `"signature"` \| `"transaction"` The route the account's act took: its signature, or its own transaction. ## Variables ### APPROVE\_SELECTOR > `const` **APPROVE\_SELECTOR**: `` `0x${string}` `` `approve(SpendPermission)`. *** ### APPROVE\_WITH\_SIGNATURE\_SELECTOR > `const` **APPROVE\_WITH\_SIGNATURE\_SELECTOR**: `` `0x${string}` `` `approveWithSignature(SpendPermission,bytes)`. *** ### IS\_APPROVED\_SELECTOR > `const` **IS\_APPROVED\_SELECTOR**: `` `0x${string}` `` `isApproved(SpendPermission)`. *** ### IS\_REVOKED\_SELECTOR > `const` **IS\_REVOKED\_SELECTOR**: `` `0x${string}` `` `isRevoked(SpendPermission)`. *** ### SPEND\_PERMISSION\_APPROVED\_TOPIC > `const` **SPEND\_PERMISSION\_APPROVED\_TOPIC**: `` `0x${string}` `` `SpendPermissionApproved(bytes32,SpendPermission)`'s topic. *** ### SPEND\_PERMISSION\_DOMAIN > `const` **SPEND\_PERMISSION\_DOMAIN**: `Readonly`\<\{ `name`: `"Spend Permission Manager"`; `version`: `"1"`; \}\> The manager's EIP-712 domain name and version. *** ### SPEND\_PERMISSION\_HEADER > `const` **SPEND\_PERMISSION\_HEADER**: `"Spend-Permission"` = `"Spend-Permission"` The request header field that carries the return. *** ### SPEND\_PERMISSION\_REVOKED\_TOPIC > `const` **SPEND\_PERMISSION\_REVOKED\_TOPIC**: `` `0x${string}` `` `SpendPermissionRevoked(bytes32,SpendPermission)`'s topic. *** ### SPEND\_PERMISSION\_TYPEHASH > `const` **SPEND\_PERMISSION\_TYPEHASH**: `` `0x${string}` `` keccak256 of the manager's `SpendPermission` type (`SPEND_PERMISSION_TYPEHASH`). *** ### spendPermissionsEip155 > `const` **spendPermissionsEip155**: `Readonly`\<\{ `advertise`: (`_doc`, `h`, `link`, `offer`, `error?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionBody`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionbody); `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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionUnsigned`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"spend-permissions/eip155"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `error?`: [`SpendPermissionError`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionerror); `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer); \}; `reference`: (`presented`, `option`, `given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionRef`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`EvmStatus`](https://lcp.integraledger.com/reference/api/evm.md#evmstatus)\>; `tie`: (`offer`) => \[`"spendPermission"`, [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer)\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer) \| [`SpendPermissionOfferInput`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionofferinput); \}\> `spend-permissions/eip155`. On `"signature"` the resource server submits the approval (`broadcaster` answers `"payee"`); on `"transaction"` the account has already made it (`"payer"`). `status` reads the approval by the permission's hash; `approvedIn` reads the transaction that should hold it. ## Functions ### approvedIn() > **approvedIn**(`presented`, `reader`, `transaction?`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `block`: `bigint`; `transaction`: `` `0x${string}` ``; \}\> The read of the transaction that should hold the approval: on `"transaction"` the one the return names, and on `"signature"` the resource server's own submission of `approveWithSignature`, given as `transaction`. It gives the block of a transaction whose receipt's `status` is 1 and that holds the manager's `SpendPermissionApproved` for the permission's hash, the permission whole; otherwise `spend-permissions/revoked` where the manager reads the permission revoked in the state after its block, and `spend-permissions/not-approved`. The return is read as rule 8 takes it. `evm/wrong-reader` for a reader of another network, `evm/not-found` where the reader holds no receipt yet and `evm/unreadable` where a read failed or answered out of its form, each before anything is decided. #### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | | `transaction?` | `` `0x${string}` `` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `block`: `bigint`; `transaction`: `` `0x${string}` ``; \}\> *** ### checkReturn() > **checkReturn**(`presented`, `offer`, `now`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) The resource server's checks of a return before it submits or serves, in the profile's order (rule 9): the return as rule 8 takes it (`header-malformed`, `signature-invalid`); `network`, `manager` and every offered member of the permission equal to the offer's, `salt` being H (`not-bound`); a route the offer accepts (`route-not-accepted`); `account` not `spender` (`account-is-spender`); and `end` later than `now`, the caller's clock in Unix seconds (`ended`). The offer is the `spendPermission` the resource server issued (`offer-malformed`, or as `read` refuses its legal context, where it is not one); a `now` that is not a non-negative safe integer is `choice-malformed`. Whether `salt` is an H the resource server issued for this request and has not seen used is its own record's. #### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | | `offer` | [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer) | | `now` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) *** ### decodeSpendPermissionHeader() > **decodeSpendPermissionHeader**(`header`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) The return a `Spend-Permission` header's value carries: base64url without padding in its canonical form (RFC 4648 §5), of at most `MAX_HEADER_BYTES` bytes, that are well-formed UTF-8 of one JSON object and nothing after it, at most 64 levels deep, holding the members rule 8 names and no other; else `spend-permissions/header-malformed`, or `spend-permissions/signature-invalid` where only its signature is malformed. Addresses and hex come back lowercase. #### Parameters | Parameter | Type | | ------ | ------ | | `header` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) *** ### encodeSpendPermissionHeader() > **encodeSpendPermissionHeader**(`value`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The `Spend-Permission` header's value: base64url without padding of the UTF-8 of `JSON.stringify` of the return, which must be a return the profile's rule 8 takes, of at most `MAX_HEADER_BYTES` bytes; else `spend-permissions/header-malformed`, or `spend-permissions/signature-invalid` for a malformed signature. #### Parameters | Parameter | Type | | ------ | ------ | | `value` | [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### issuedDigest() > **issuedDigest**(`given`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The digest a resource server keeps of an offer it issued (profile rule 9): SHA-256 over the RFC 8785 form of `{network, manager, permission}`, `permission` holding `spender`, `token`, `allowance`, `period`, `start`, `end` and `extraData` in the wire form, addresses and hex lowercase: the members the resource server fixes at issue alone. It takes the offer as `advertise` takes it, `salt` absent or present; the offer the `402` body places, as `read` takes it; and a return, as rule 8 takes it, on either route. It leaves out `salt`, which is H, `account`, which is the account's, and `accepts`, which a return does not carry, so the offer as issued, as placed and as returned has one digest, and an offer that differs in a member it covers has another. Any other value is `spend-permissions/option-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `given` | [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer) \| [`SpendPermissionOfferInput`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionofferinput) \| [`SpendPermissionReturn`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionreturn) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### permissionHash() > **permissionHash**(`permission`, `network`, `manager`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The permission's hash as the SpendPermissionManager's `getHash` computes it: the EIP-712 digest of the whole permission in the manager's domain on the network, the digest the account signs and the approval event's topic. `spend-permissions/header-malformed` where the permission, the network or the manager is not in the wire form. #### Parameters | Parameter | Type | | ------ | ------ | | `permission` | [`SpendPermission`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermission) | | `network` | `` `eip155:${string}` `` | | `manager` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### tie() > **tie**(`offer`): \[`"spendPermission"`, [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer)\] The ATR's binding slot: the offer exactly as issued. #### Parameters | Parameter | Type | | ------ | ------ | | `offer` | [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer) | #### Returns \[`"spendPermission"`, [`SpendPermissionOffer`](https://lcp.integraledger.com/reference/api/spend-permissions.md#spendpermissionoffer)\] ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### 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) *** ### EvmReadRefBase Re-exports [EvmReadRefBase](https://lcp.integraledger.com/reference/api/evm.md#evmreadrefbase) --- # @integraledger/lcp/stacks > Stacks rail pieces: the transaction id, the reader a read goes through, the read of a payment by its origin and the nonce the origin signed, and the zero-party recovery of the ATR hash from a mined transaction. Source: https://lcp.integraledger.com/reference/api/stacks Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Stacks rail pieces: the transaction id, the reader a read goes through, the read of a payment by its origin and the nonce the origin signed, and the zero-party recovery of the ATR hash from a mined transaction. The read searches for H over the origin's nonces. The profile `mpp/charge/usdc/stacks` states the read. ## Interfaces ### StacksAssetEvent A `fungible_token_asset` event of `asset_event_type` `transfer`, as the API lists it among a transaction's events. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `amount` | `bigint` | - | | `assetId` | `string` | `asset.asset_id`: the token's contract, `::` and the token's name. | | `index` | `number` | `event_index`: its place among the transaction's events, as the endpoint lists them. | | `recipient` | `string` | - | | `sender` | `string` | - | *** ### StacksLanded A mined transaction as the Stacks Blockchain API reports it (`GET /extended/v1/tx/`, stacks-blockchain-api 9.9.0 `src/api/schemas/v1/entities/transactions.ts`). `raw` is the transaction's bytes (`GET /extended/v1/tx//raw`), or null where the reader does not read them. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `blockHeight` | `bigint` | - | | `call` | \{ `args`: readonly `` `0x${string}` ``[]; `contractId`: `string`; `functionName`: `string`; \} \| `null` | The contract call, with each argument's consensus serialization as `0x` hex; null for any other payload. | | `canonical` | `boolean` | `canonical`: the block is on the canonical chain. | | `events` | readonly [`StacksAssetEvent`](https://lcp.integraledger.com/reference/api/stacks.md#stacksassetevent)[] | Its `fungible_token_asset` `transfer` events. | | `mined` | `true` | - | | `raw` | `Uint8Array`\<`ArrayBufferLike`\> \| `null` | - | | `sender` | `object` | `sender_address` and `nonce`: the origin, never the sponsor. | | `sender.address` | `string` | - | | `sender.nonce` | `bigint` | - | | `sponsor` | `string` \| `null` | `sponsor_address`, or null for a standard authorization. | | `status` | `"success"` \| `"abort_by_response"` \| `"abort_by_post_condition"` \| `"problematic_skipped"` | - | | `transfer` | \{ `amount`: `bigint`; `memo`: `` `0x${string}` ``; `recipient`: `string`; \} \| `null` | A token transfer's `recipient_address`, `amount` and 34-byte `memo` as `0x` hex; null for any other payload. | | `txid` | `` `0x${string}` `` | `tx_id`. | | `unanchored` | `boolean` | `is_unanchored`: in a microblock no anchor block has confirmed, so no block places it. | *** ### StacksListed A transaction as a list of the API's names it: its id, its origin and its nonce. #### Properties | Property | Type | | ------ | ------ | | `nonce` | `bigint` | | `sender` | `string` | | `txid` | `` `0x${string}` `` | *** ### StacksMempool An unmined transaction: `pending`, or one of the `dropped_…` states. It decides nothing. #### Properties | Property | Type | | ------ | ------ | | `mined` | `false` | | `status` | `string` | *** ### StacksPage A page of a list, with the count the list holds in all (`total`). #### Properties | Property | Type | | ------ | ------ | | `results` | readonly [`StacksListed`](https://lcp.integraledger.com/reference/api/stacks.md#stackslisted)[] | | `total` | `number` | *** ### StacksReader Bounded reads of one network's Stacks Blockchain API, stacks-blockchain-api 9.9.0's routes. Any failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`: one of kind `too-large` reads as `too-large`, one of kind `malformed` as `unparseable`, and any other rejection as `transport`. A route that answers 404 for a height it does not know answers `{ unknownHeight: true }`, which is never absence. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `stacks:${string}` `` | #### Methods ##### byNonce() > **byNonce**(`principal`, `nonce`): `Promise`\ `GET /extended/v1/tx/?from_address=&nonce=`: the results, each by its id, origin and nonce. ###### Parameters | Parameter | Type | | ------ | ------ | | `principal` | `string` | | `nonce` | `bigint` | ###### Returns `Promise`\ ##### byOrigin() > **byOrigin**(`principal`, `offset`): `Promise`\<[`StacksPage`](https://lcp.integraledger.com/reference/api/stacks.md#stackspage)\> `GET /extended/v1/tx/?from_address=&order=asc&limit=50&offset=`: a page of the origin's transactions. ###### Parameters | Parameter | Type | | ------ | ------ | | `principal` | `string` | | `offset` | `number` | ###### Returns `Promise`\<[`StacksPage`](https://lcp.integraledger.com/reference/api/stacks.md#stackspage)\> ##### inBlock() > **inBlock**(`height`, `offset`): `Promise`\<[`StacksPage`](https://lcp.integraledger.com/reference/api/stacks.md#stackspage) \| \{ `unknownHeight`: `true`; \}\> `GET /extended/v1/tx/block_height/?limit=50&offset=`: a page of a block's transactions. ###### Parameters | Parameter | Type | | ------ | ------ | | `height` | `bigint` | | `offset` | `number` | ###### Returns `Promise`\<[`StacksPage`](https://lcp.integraledger.com/reference/api/stacks.md#stackspage) \| \{ `unknownHeight`: `true`; \}\> ##### lastNonce() > **lastNonce**(`principal`, `height?`): `Promise`\<\{ `nonce`: `bigint` \| `null`; \} \| \{ `unknownHeight`: `true`; \}\> `GET /extended/v1/address//nonces`, at `height` where given (`?block_height=`), else at the tip: `last_executed_tx_nonce`, null where the principal has none. ###### Parameters | Parameter | Type | | ------ | ------ | | `principal` | `string` | | `height?` | `bigint` | ###### Returns `Promise`\<\{ `nonce`: `bigint` \| `null`; \} \| \{ `unknownHeight`: `true`; \}\> ##### nextTenureBurn() > **nextTenureBurn**(`height`): `Promise`\<`bigint` \| `null`\> The Bitcoin height of the burn block of the first tenure that starts after the tenure of the Stacks block at `height` and builds on it, read from the tenures the indexer lists with their burn blocks; null where it lists none yet. ###### Parameters | Parameter | Type | | ------ | ------ | | `height` | `bigint` | ###### Returns `Promise`\<`bigint` \| `null`\> ##### tip() > **tip**(): `Promise`\<\{ `burnHeight`: `bigint`; `height`: `bigint`; \}\> `GET /extended`: the chain tip's Stacks block height and the Bitcoin block height the indexer serves. ###### Returns `Promise`\<\{ `burnHeight`: `bigint`; `height`: `bigint`; \}\> ##### transaction() > **transaction**(`txid`): `Promise`\<[`StacksLanded`](https://lcp.integraledger.com/reference/api/stacks.md#stackslanded) \| [`StacksMempool`](https://lcp.integraledger.com/reference/api/stacks.md#stacksmempool) \| \{ `notFound`: `true`; \}\> `GET /extended/v1/tx/` with its events, and its bytes; `notFound` where the API does not know it. ###### Parameters | Parameter | Type | | ------ | ------ | | `txid` | `` `0x${string}` `` | ###### Returns `Promise`\<[`StacksLanded`](https://lcp.integraledger.com/reference/api/stacks.md#stackslanded) \| [`StacksMempool`](https://lcp.integraledger.com/reference/api/stacks.md#stacksmempool) \| \{ `notFound`: `true`; \}\> *** ### StacksRef The read keys of a Stacks payment: its network, the origin and the nonce it signed as a decimal string, the payee, the recipient of the challenge the payment answers, for the read's two party tests, each a principal as a Stacks node writes it (the API's spelling, which the read compares as written), `signed`, the digest of what the origin signed (`0x` and 64 hex digits), the member `presented` compares, and `transaction`, the id of a standard authorization's transaction, which is a hint the read takes first. A sponsored transaction's id is fixed only by the sponsor's signature, so its reference names none. #### Properties | Property | Type | | ------ | ------ | | `network` | `` `stacks:${string}` `` | | `nonce` | `string` | | `origin` | `string` | | `payee` | `string` | | `signed` | `` `0x${string}` `` | | `transaction?` | `` `0x${string}` `` | ## Type Aliases ### StacksMark > **StacksMark** = `"block"` \| `"bitcoin"` A Stacks mark: the block (`block`), and Bitcoin finality (`bitcoin`), the final one. *** ### StacksNetwork > **StacksNetwork** = `` `stacks:${string}` `` CAIP-2: `stacks:1` (mainnet), `stacks:2147483648` (testnet). *** ### StacksQuery > **StacksQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`StacksRef`](https://lcp.integraledger.com/reference/api/stacks.md#stacksref), `bigint`, [`StacksMark`](https://lcp.integraledger.com/reference/api/stacks.md#stacksmark), `bigint`\> What `stacksStatus` takes beside the reference and the reader. *** ### StacksStatus > **StacksStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`StacksMark`](https://lcp.integraledger.com/reference/api/stacks.md#stacksmark), `bigint`\> The answer of `stacksStatus`, as the profile `read-status` gives it. Its marks are `block` and `bitcoin`, in that order, its position the block height, its search position the next of the origin's nonces to read, and a transfer's place the index of its event among the transaction's events, or `payload` for an STX token transfer. ## Variables ### MAX\_SEARCH\_NONCES > `const` **MAX\_SEARCH\_NONCES**: `32` = `32` The most of an origin's nonces one read searches for H: 32. The search covers every nonce the origin used after the position it starts from, which a busy origin makes long, so one read reads at most these and answers `search-incomplete` with the next nonce to read, from which the next read resumes. *** ### MAX\_STACKS\_TX\_BYTES > `const` **MAX\_STACKS\_TX\_BYTES**: `16384` = `16_384` The largest Stacks transaction lcp decodes, in bytes: 16,384. A credential carries the transaction whole, and no Stacks specification lcp reads bounds a transaction's size below a block's, so lcp bounds the work of decoding one. ## Functions ### stacksRecover() > **stacksRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Zero-party: H from a mined, successful transaction: the fourth argument of its call to the contract's `transfer`, or an STX token transfer's memo, H followed by two zero bytes; in one reader call, or three for a failed one. A failed status is `stacks/not-success` once 6 Bitcoin blocks stand on the block that anchors the transaction's block, as `stacksStatus` reads `bitcoin`, and `stacks/not-final` below that or where a mark read fails, since that block can be replaced. An input or reader that is not one, a reader for another network, or an input whose `tx` is not a 32-byte hash or whose option is not a challenge whose decoded request names a contract in `methodDetails.stacks` (its `contractAddress`, `.` and its `contractName`) is `stacks/wrong-reader`, with nothing read; a failed read or an answer of no documented shape, `stacks/unreadable`; an unknown or unmined transaction, or one not on the canonical chain, `stacks/not-found`; no H in either form, `stacks/no-memo`. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `stacks:${string}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`StacksReader`](https://lcp.integraledger.com/reference/api/stacks.md#stacksreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### stacksStatus() > **stacksStatus**(`ref`, `reader`, `query`): `Promise`\<[`StacksStatus`](https://lcp.integraledger.com/reference/api/stacks.md#stacksstatus)\> Answers the read of the act the query asks about as the profile `read-status` gives it, by the origin and the nonce it signed (the profile `mpp/charge/usdc/stacks`). The read takes the tip, then the reference's transaction where it names one, a hint that decides only where it is the origin's at the signed nonce; then the origin's last executed nonce at the tip, the signed nonce being consumed where that is at or past it; then, where the hint has not, the origin's transaction at the signed nonce (`transactionAt`). That transaction, where it is the act at or above the finality asked for, settles; otherwise the read searches for H every nonce the origin executed after the position it starts from: the query's `search` where given, else the nonce after the one the origin had executed at the height of the query's `after`, else 0; through the last it executed at the tip, at most `MAX_SEARCH_NONCES` in one read. A search from `after` rests on the nonce route's answer at a height, which no run has yet shown, so it proves no absence and is never read whole. A transaction counts only on the canonical chain and included; its mark is `bitcoin` once 6 Bitcoin blocks stand on the block that anchors it (`nextTenureBurn` against the tip's Bitcoin height), else `block`. A Stacks transaction has no expiry, so the signed nonce never lapses; read at the tip, a nonce unconsumed there is unconsumed at the final mark. A transaction the search's lookup names whose answer the read cannot decode, and two that decide at one nonce, an answer no chain gives, are named as items it could not decode, held at their nonce, and the search reads on; at the signed nonce, which the read names by its number, or as the reference's own, either is `unparseable`. A reference whose payee or origin is not a principal as a Stacks node writes it is `unparseable`. A rejected read is `transport`, `too-large` or `unparseable` by its kind, an answer of no documented shape `unparseable`, a height a route does not know `history-gap`, and a reader for another network than the reference's `chain-mismatch`. A reference or query not of its form is `unparseable`, with nothing read. A `settled` answer states `presented`: `yes` where the digest of what the landed transaction's origin signed is the reference's `signed`, `no` where it differs, and `unshown` where the reader gives no bytes that are the transaction's. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`StacksRef`](https://lcp.integraledger.com/reference/api/stacks.md#stacksref) & `object` | | `reader` | [`StacksReader`](https://lcp.integraledger.com/reference/api/stacks.md#stacksreader) | | `query` | [`StacksQuery`](https://lcp.integraledger.com/reference/api/stacks.md#stacksquery) | #### Returns `Promise`\<[`StacksStatus`](https://lcp.integraledger.com/reference/api/stacks.md#stacksstatus)\> *** ### stacksTxid() > **stacksTxid**(`wire`): `` `0x${string}` `` SHA-512/256 of a transaction's whole consensus serialization, as `0x` and lowercase hex. Throws TypeError when `wire` is not a `Uint8Array`. #### Parameters | Parameter | Type | | ------ | ------ | | `wire` | `Uint8Array` | #### Returns `` `0x${string}` `` --- # @integraledger/lcp/starknet > Starknet: the pairing `x402/exact/starknet`. The payer signs a SNIP-12 `OutsideExecution` (SNIP-9 v2) authorizing one token `transfer`; its `Nonce` is the ATR hash's low 250 bits, or on an agreement the agreement value's. Source: https://lcp.integraledger.com/reference/api/starknet Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Starknet: the pairing `x402/exact/starknet`. The payer signs a SNIP-12 `OutsideExecution` (SNIP-9 v2) authorizing one token `transfer`; its `Nonce` is the ATR hash's low 250 bits, or on an agreement the agreement value's. The read is of that nonce on the payer's account, as state, and of the asset's `Transfer` events, receipts and traces, through a bounded reader. The chain holds 250 of the hash's bits, so a holder of the ATR confirms the hash from it but nothing recovers the hash. ## Interfaces ### Field #### Properties | Property | Type | | ------ | ------ | | `name` | `string` | | `type` | `string` | *** ### OutsideExecutionTypedData SNIP-12 revision 1, SNIP-9 v2, as x402's Starknet scheme prints it. #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `` `0x${string}` `` | | `domain.name` | `"Account.execute_from_outside"` | | `domain.revision` | `1` | | `domain.version` | `2` | | `message` | `object` | | `message.Caller` | `` `0x${string}` `` | | `message.Calls` | \[\{ `Calldata`: \[`` `0x${string}` ``, `` `0x${string}` ``, `` `0x${string}` ``\]; `Selector`: `"0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e"`; `To`: `` `0x${string}` ``; \}\] | | `message.Execute After` | `"1"` | | `message.Execute Before` | `string` | | `message.Nonce` | `` `0x${string}` `` | | `primaryType` | `"OutsideExecution"` | | `types` | `object` | | `types.Call` | [`Field`](https://lcp.integraledger.com/reference/api/starknet.md#field)[] | | `types.OutsideExecution` | [`Field`](https://lcp.integraledger.com/reference/api/starknet.md#field)[] | | `types.StarknetDomain` | [`Field`](https://lcp.integraledger.com/reference/api/starknet.md#field)[] | *** ### StarknetCall One call of an outside execution: the contract, the selector and the calldata, each a felt. #### Properties | Property | Type | | ------ | ------ | | `calldata` | readonly `` `0x${string}` ``[] | | `selector` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` | *** ### StarknetCursor The search's position: the blocks it reads (`from` to `to`, both included; `to` absent where the nonce has not been read consumed), the continuation of the page to read, and the events of that page already read. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `continuation?` | `readonly` | `string` | | `from` | `readonly` | `bigint` | | `skip?` | `readonly` | `number` | | `to?` | `readonly` | `bigint` | *** ### StarknetEmittedEvent One event of `starknet_getEvents`: the event, the transaction that emitted it and that transaction's block. #### Extends - [`StarknetEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetevent) #### Properties | Property | Type | Inherited from | | ------ | ------ | ------ | | `blockNumber` | `bigint` \| `null` | - | | `data` | readonly `` `0x${string}` ``[] | [`StarknetEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetevent).[`data`](https://lcp.integraledger.com/reference/api/starknet.md#property-data-1) | | `fromAddress` | `` `0x${string}` `` | [`StarknetEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetevent).[`fromAddress`](https://lcp.integraledger.com/reference/api/starknet.md#property-fromaddress-1) | | `keys` | readonly `` `0x${string}` ``[] | [`StarknetEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetevent).[`keys`](https://lcp.integraledger.com/reference/api/starknet.md#property-keys-1) | | `transaction` | `` `0x${string}` `` | - | *** ### StarknetEvent One event of a receipt: the emitting contract, its keys and its data. #### Extended by - [`StarknetEmittedEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetemittedevent) #### Properties | Property | Type | | ------ | ------ | | `data` | readonly `` `0x${string}` ``[] | | `fromAddress` | `` `0x${string}` `` | | `keys` | readonly `` `0x${string}` ``[] | *** ### StarknetEventPage One page of `starknet_getEvents`: its events in the chain's order, and the token of the next page, null at the end. #### Properties | Property | Type | | ------ | ------ | | `continuation` | `string` \| `null` | | `events` | readonly [`StarknetEmittedEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetemittedevent)[] | *** ### StarknetEventQuery What one page of `starknet_getEvents` asks: the emitting contract, the keys, the blocks (both included) and the page. #### Properties | Property | Type | | ------ | ------ | | `address` | `` `0x${string}` `` | | `continuation?` | `string` | | `from` | `bigint` | | `keys` | readonly readonly `` `0x${string}` ``[][] | | `to` | `bigint` | *** ### StarknetHead The newest block at a mark: its number, and its own timestamp in Unix seconds. #### Properties | Property | Type | | ------ | ------ | | `number` | `bigint` | | `timestamp` | `bigint` | *** ### StarknetInvocation #### Properties | Property | Type | | ------ | ------ | | `calldata` | readonly `` `0x${string}` ``[] | | `calls` | readonly [`StarknetInvocation`](https://lcp.integraledger.com/reference/api/starknet.md#starknetinvocation)[] | | `contract` | `` `0x${string}` `` | | `reverted` | `boolean` | | `selector` | `` `0x${string}` `` | *** ### StarknetOutsideExecution An outside execution as the payer signed it, its signature apart, every member a felt in its shortest spelling. #### Properties | Property | Type | | ------ | ------ | | `caller` | `` `0x${string}` `` | | `calls` | readonly [`StarknetCall`](https://lcp.integraledger.com/reference/api/starknet.md#starknetcall)[] | | `executeAfter` | `` `0x${string}` `` | | `executeBefore` | `` `0x${string}` `` | | `nonce` | `` `0x${string}` `` | *** ### StarknetReader Bounded, read-only calls against one network's JSON-RPC node. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`; any rejection reads as unreadable. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork) | #### Methods ##### events() > **events**(`query`): `Promise`\<[`StarknetEventPage`](https://lcp.integraledger.com/reference/api/starknet.md#starkneteventpage) \| `null`\> One page of `starknet_getEvents`; null where the node does not hold the range. ###### Parameters | Parameter | Type | | ------ | ------ | | `query` | [`StarknetEventQuery`](https://lcp.integraledger.com/reference/api/starknet.md#starkneteventquery) | ###### Returns `Promise`\<[`StarknetEventPage`](https://lcp.integraledger.com/reference/api/starknet.md#starkneteventpage) \| `null`\> ##### head() > **head**(`mark`): `Promise`\<[`StarknetHead`](https://lcp.integraledger.com/reference/api/starknet.md#starknethead)\> The newest block at `mark`: `ACCEPTED_ON_L2` the block `latest` names, `ACCEPTED_ON_L1` the newest accepted on L1. ###### Parameters | Parameter | Type | | ------ | ------ | | `mark` | [`StarknetMark`](https://lcp.integraledger.com/reference/api/starknet.md#starknetmark) | ###### Returns `Promise`\<[`StarknetHead`](https://lcp.integraledger.com/reference/api/starknet.md#starknethead)\> ##### nonceValid() > **nonceValid**(`account`, `nonce`, `block`): `Promise`\<`boolean` \| `null`\> `is_valid_outside_execution_nonce(nonce)` on `account`, by `starknet_call` at the block numbered `block`: true where the nonce is unused there, false where it is used, null where the node does not serve that block's state. Where the node answers the call with a JSON-RPC error, it rejects with an error whose `code` member is that error's code, as starknet.js's `RpcError` does: `CONTRACT_NOT_FOUND` (20) and `ENTRYPOINT_NOT_FOUND` (21) read as an account that runs no outside execution at that block, its nonce unconsumed there. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `` `0x${string}` `` | | `nonce` | `` `0x${string}` `` | | `block` | `bigint` | ###### Returns `Promise`\<`boolean` \| `null`\> ##### receipt() > **receipt**(`tx`): `Promise`\<[`StarknetReceipt`](https://lcp.integraledger.com/reference/api/starknet.md#starknetreceipt) \| `null`\> `starknet_getTransactionReceipt`, with its events; null: unknown hash. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`StarknetReceipt`](https://lcp.integraledger.com/reference/api/starknet.md#starknetreceipt) \| `null`\> ##### trace() > **trace**(`tx`): `Promise`\<[`StarknetInvocation`](https://lcp.integraledger.com/reference/api/starknet.md#starknetinvocation) \| `null`\> `starknet_traceTransaction`'s `execute_invocation`; null: none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`StarknetInvocation`](https://lcp.integraledger.com/reference/api/starknet.md#starknetinvocation) \| `null`\> *** ### StarknetReceipt #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `blockNumber` | `bigint` \| `null` | - | | `events` | readonly [`StarknetEvent`](https://lcp.integraledger.com/reference/api/starknet.md#starknetevent)[] | The receipt's `events`. A call that failed, and every call under it, leaves none here. | | `execution` | `"SUCCEEDED"` \| `"REVERTED"` | - | | `finality` | `"PRE_CONFIRMED"` \| `"ACCEPTED_ON_L2"` \| `"ACCEPTED_ON_L1"` | - | *** ### StarknetRef The read keys `reference` returns: the network, the payer's account (the contract whose outside-execution nonce is `nonce`), the asset, which is the event search's key, the signed nonce (H's low 250 bits on a payment, the agreement value's on an agreement), `settleBy`, which is `Execute Before`, the payee, the `payTo` of the option the payment answers, and the outside execution as presented, for `presented`. #### Properties | Property | Type | | ------ | ------ | | `asset` | `` `0x${string}` `` | | `from` | `` `0x${string}` `` | | `network` | [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork) | | `nonce` | `` `0x${string}` `` | | `payee` | `string` | | `presented` | [`StarknetOutsideExecution`](https://lcp.integraledger.com/reference/api/starknet.md#starknetoutsideexecution) | | `settleBy` | `number` | *** ### StarknetUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | The typed data the account's key signs; SNIP-12 hashes the account in. | | `request.account` | `` `0x${string}` `` | - | | `request.kind` | `"starknet-snip12"` | - | | `request.typedData` | [`OutsideExecutionTypedData`](https://lcp.integraledger.com/reference/api/starknet.md#outsideexecutiontypeddata) | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StarknetPayment`](https://lcp.integraledger.com/reference/api.md#starknetpayment) Takes the signature as 1 to 32 felts. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | readonly `` `0x${string}` ``[] | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StarknetPayment`](https://lcp.integraledger.com/reference/api.md#starknetpayment) ## Type Aliases ### Felt > **Felt** = `` `0x${string}` `` Lowercase `0x` hex with no leading zero digit, below FELT_P. *** ### StarknetMark > **StarknetMark** = `"ACCEPTED_ON_L2"` \| `"ACCEPTED_ON_L1"` The read's marks, lowest first: `ACCEPTED_ON_L2`, the newest block (`latest`), and `ACCEPTED_ON_L1`, the final one. *** ### StarknetNetwork > **StarknetNetwork** = `"starknet:SN_MAIN"` \| `"starknet:SN_SEPOLIA"` *** ### StarknetRefRead > **StarknetRefRead** = [`StarknetRef`](https://lcp.integraledger.com/reference/api/starknet.md#starknetref) & `object` The reference `status` reads with: the read keys, H, which the caller adds, and the transaction a settler named. #### Type Declaration | Name | Type | | ------ | ------ | | `h` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | | `transaction?` | [`Felt`](https://lcp.integraledger.com/reference/api/starknet.md#felt) | *** ### StarknetStatus > **StarknetStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`StarknetMark`](https://lcp.integraledger.com/reference/api/starknet.md#starknetmark), [`StarknetCursor`](https://lcp.integraledger.com/reference/api/starknet.md#starknetcursor)\> The answer of `starknetStatus`, as the profile `read-status` gives it. Its marks are `ACCEPTED_ON_L2` and `ACCEPTED_ON_L1`, in that order, its position the block number, and its search position a `StarknetCursor`. Each transfer it names carries its transaction and its `place`: a `Transfer` its event's index among its receipt's `events`, a number; a transfer call of zero the indexes of the calls that lead to it from the trace's root, joined by `.`, a string. ## Variables ### ANY\_CALLER > `const` **ANY\_CALLER**: `"0x414e595f43414c4c4552"` = `"0x414e595f43414c4c4552"` The SNIP-9 any-caller sentinel, the short string `ANY_CALLER`. *** ### EVENT\_TRANSFER > `const` **EVENT\_TRANSFER**: `"0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9"` = `"0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9"` sn_keccak("Transfer"): the first key of a SNIP-2 token's `Transfer` event. *** ### exactStarknet > `const` **exactStarknet**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`, `act?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StarknetUnsigned`](https://lcp.integraledger.com/reference/api/starknet.md#starknetunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/starknet"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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) \| [`StarknetRef`](https://lcp.integraledger.com/reference/api/starknet.md#starknetref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`StarknetStatus`](https://lcp.integraledger.com/reference/api/starknet.md#starknetstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/starknet`. The payee broadcasts (`broadcaster` answers `"payee"`): the settler executes the outside execution the payer signed as its named `Caller`; `status` reads the nonce on the payer's account and finds the transaction that consumed it; `recover` reads the nonce back from a transaction. *** ### FELT\_P > `const` **FELT\_P**: `bigint` *** ### MASK\_250 > `const` **MASK\_250**: `bigint` *** ### SELECTOR\_EXECUTE\_FROM\_OUTSIDE\_V2 > `const` **SELECTOR\_EXECUTE\_FROM\_OUTSIDE\_V2**: `"0x34cc13b274446654ca3233ed2c1620d4c5d1d32fd20b47146a3371064bdc57d"` = `"0x34cc13b274446654ca3233ed2c1620d4c5d1d32fd20b47146a3371064bdc57d"` sn_keccak("execute_from_outside_v2") *** ### SELECTOR\_TRANSFER > `const` **SELECTOR\_TRANSFER**: `"0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e"` = `"0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e"` sn_keccak("transfer") *** ### STARKNET\_MAX\_CANDIDATES > `const` **STARKNET\_MAX\_CANDIDATES**: `16` = `16` The most candidate transactions, each a receipt and a trace, one `status` call reads. A search cut short returns its position, from which the next call resumes. It is also the most other acts a caller gives by their transaction, each read the same way; a query that gives more is `unreadable`, `too-large`, with nothing read. *** ### STARKNET\_MAX\_CONTINUATION > `const` **STARKNET\_MAX\_CONTINUATION**: `1024` = `1024` The longest continuation token, in characters, lcp carries in a search position. *** ### STARKNET\_MAX\_EVENT\_PAGES > `const` **STARKNET\_MAX\_EVENT\_PAGES**: `8` = `8` The most pages of `starknet_getEvents` one `status` call reads. A range's size is the chain's; a search cut short returns its position, from which the next call resumes. *** ### STARKNET\_MAX\_EVENTS > `const` **STARKNET\_MAX\_EVENTS**: `1024` = `1024` The most events lcp reads in one receipt, and in one page of `starknet_getEvents`. More are beyond the read's bound. *** ### STARKNET\_MAX\_SIGNATURE\_FELTS > `const` **STARKNET\_MAX\_SIGNATURE\_FELTS**: `32` = `32` The most felts of a signature lcp takes, x402's Starknet scheme's suggested bound: an account's signature is one or a few felts, a multisig's one pair per signer. *** ### STARKNET\_MAX\_TRACE\_DEPTH > `const` **STARKNET\_MAX\_TRACE\_DEPTH**: `16` = `16` The deepest trace lcp walks, in levels, the root being 1: a forwarder, the payer's account, a proxy's library call and the token's transfer sit well within it. A deeper trace is beyond the read's bound. *** ### STARKNET\_MAX\_TRACE\_INVOCATIONS > `const` **STARKNET\_MAX\_TRACE\_INVOCATIONS**: `512` = `512` The most invocations of one trace lcp walks. A larger trace is beyond the read's bound. *** ### STARKNET\_MAX\_TYPED\_DATA\_BYTES > `const` **STARKNET\_MAX\_TYPED\_DATA\_BYTES**: `16384` = `16_384` The largest presented typed data lcp reads, in bytes of its JSON; one call's typed data is under 2 KiB. ## Functions ### chainIdFelt() > **chainIdFelt**(`n`): `` `0x${string}` `` The network's reference as a short-string felt. Throws TypeError on a network that is not a `StarknetNetwork`. #### Parameters | Parameter | Type | | ------ | ------ | | `n` | [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork) | #### Returns `` `0x${string}` `` *** ### outsideExecution() > **outsideExecution**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`OutsideExecutionTypedData`](https://lcp.integraledger.com/reference/api/starknet.md#outsideexecutiontypeddata) x402's `OutsideExecution` for one `transfer(payTo, amount)` on `asset`, with the fee payer as `Caller`. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | \{ `amount`: `bigint`; `asset`: `` `0x${string}` ``; `executeBefore`: `number`; `feePayer`: `` `0x${string}` ``; `network`: [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork); `nonce`: `` `0x${string}` ``; `payTo`: `` `0x${string}` ``; \} | | `a.amount` | `bigint` | | `a.asset` | `` `0x${string}` `` | | `a.executeBefore` | `number` | | `a.feePayer` | `` `0x${string}` `` | | `a.network` | [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork) | | `a.nonce` | `` `0x${string}` `` | | `a.payTo` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`OutsideExecutionTypedData`](https://lcp.integraledger.com/reference/api/starknet.md#outsideexecutiontypeddata) *** ### snNonce() > **snNonce**(`h`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The hash's low 250 bits as a felt: the way Starknet fits a 256-bit hash into a felt. A value that is not a 32-byte hash is `x402/payload-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### starknetFloor() > **starknetFloor**(`input`): `bigint` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The agreement's floor on the token `asset` of `network`, in its base units (the profile `x402-exact-starknet`, rule 24): 0 on a token a run has shown to emit a `Transfer` for a transfer of zero on that network (`ZERO_TRANSFER_SHOWN`), since the search finds a payment by its `Transfer` alone, and 1 on any other, and on any token where no network is given. An `asset` that is not a felt is `starknet/felt-malformed`; a `network` given that is not a Starknet network, `starknet/network-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | \{ `asset`: `string`; `network?`: [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork); \} | | `input.asset` | `string` | | `input.network?` | [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork) | #### Returns `bigint` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### starknetIdDigest() > **starknetIdDigest**(`from`, `to`, `amount`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> the core's `hash` over `from`, `to` and `amount` as three 32-byte big-endian words: the identity of one transfer. #### Parameters | Parameter | Type | | ------ | ------ | | `from` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` | | `amount` | `bigint` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### starknetLandedNonce() > **starknetLandedNonce**(`ref`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The nonce that landed in the named transaction for this transfer, for a party holding the ATR to compare with the hash's low 250 bits: the nonce of the `execute_from_outside_v2` below which, at any depth, a `transfer` call on `ref.asset` has this payment's identity, the digest of its sender, recipient and amount (`starknetIdDigest`). It is found by that identity, not by a recorded nonce. A ref or reader that is not an object, a reader for another network, or a ref whose `transaction` or `asset` is not a felt or whose `idDigest` is not a 32-byte hash, is `starknet/wrong-reader`, with nothing read. A failed read, a receipt that is not well formed, or a trace that is missing or holds an invocation that is not well formed, is `starknet/unreadable`, and no receipt `starknet/not-found`. A receipt at `ACCEPTED_ON_L2` or `ACCEPTED_ON_L1` gives the verdict: a reverted transaction is `starknet/reverted`; a trace that holds no such transfer, or that is nested deeper than 16 levels or holds more than 512 invocations, which it reads no further, is `starknet/no-transfer`; and transfers under more than one nonce are `starknet/ambiguous`. A `PRE_CONFIRMED` receipt, or one with no block number, gives each of these as `starknet/not-final`, since a pre-confirmed block can change. Two calls. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | \{ `asset`: `` `0x${string}` ``; `idDigest`: `` `0x${string}` ``; `network`: [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork); `transaction`: `` `0x${string}` ``; \} | | `ref.asset` | `` `0x${string}` `` | | `ref.idDigest` | `` `0x${string}` `` | | `ref.network` | [`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork) | | `ref.transaction` | `` `0x${string}` `` | | `reader` | [`StarknetReader`](https://lcp.integraledger.com/reference/api/starknet.md#starknetreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### starknetRecover() > **starknetRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> The value a settlement transaction carries in H's place, from the transaction alone (profile rule 23): the nonce of its executed outside execution whose calls reach a `transfer` on the token the option names, `option.asset`, as `0x` and 64 hex digits; H's low 250 bits on a payment, the agreement value's on an agreement, which a holder of the ATR compares with the same bits of its own H, or of `agreementValue` of it. A reader for another network, or an input whose `tx` or option's `asset` is not a felt, is `starknet/wrong-reader`, with nothing read. A failed read, a receipt that is not well formed, or a trace that is missing, holds an invocation that is not well formed, or is beyond lcp's bounds, which it reads no further, is `starknet/unreadable`, and no receipt `starknet/not-found`. A receipt at `ACCEPTED_ON_L2` or `ACCEPTED_ON_L1` gives the verdict: a reverted transaction is `starknet/reverted`; a trace that holds no such execution `starknet/no-transfer`; and executions under more than one nonce `starknet/ambiguous`. A `PRE_CONFIRMED` receipt, or one with no block number, gives each of these as `starknet/not-final`. Two calls. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<[`StarknetNetwork`](https://lcp.integraledger.com/reference/api/starknet.md#starknetnetwork), [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`StarknetReader`](https://lcp.integraledger.com/reference/api/starknet.md#starknetreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### starknetStatus() > **starknetStatus**(`ref`, `reader`, `query`): `Promise`\<[`StarknetStatus`](https://lcp.integraledger.com/reference/api/starknet.md#starknetstatus)\> The read of the act the query asks about, as the profile `read-status` answers it through the profile `x402/exact/starknet`'s rules 12 to 22: the named transaction, the nonce as state, and the event search. A query, a reference or a search position that is not one is `unreadable`, `unparseable`, with nothing read, a reader for another network `chain-mismatch`, and a query that gives more than `STARKNET_MAX_CANDIDATES` other acts by their transaction `too-large`. Felts compare as numbers, and transactions are named in their shortest lowercase spelling. On `settled` the answer states `presented`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`StarknetRefRead`](https://lcp.integraledger.com/reference/api/starknet.md#starknetrefread) | | `reader` | [`StarknetReader`](https://lcp.integraledger.com/reference/api/starknet.md#starknetreader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`StarknetRefRead`](https://lcp.integraledger.com/reference/api/starknet.md#starknetrefread), `bigint`, [`StarknetMark`](https://lcp.integraledger.com/reference/api/starknet.md#starknetmark), [`StarknetCursor`](https://lcp.integraledger.com/reference/api/starknet.md#starknetcursor)\> | #### Returns `Promise`\<[`StarknetStatus`](https://lcp.integraledger.com/reference/api/starknet.md#starknetstatus)\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### StarknetPayment Re-exports [StarknetPayment](https://lcp.integraledger.com/reference/api.md#starknetpayment) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/stellar > Stellar rail pieces: the payer-signed Soroban `transfer` and the digest of its authorization entry, the signed-payload precondition over H, the search for a buyer's acts, and the read of the agreement `x402/exact/stellar/precondition`. Source: https://lcp.integraledger.com/reference/api/stellar Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Stellar rail pieces: the payer-signed Soroban `transfer` and the digest of its authorization entry, the signed-payload precondition over H, the search for a buyer's acts, and the read of the agreement `x402/exact/stellar/precondition`. It also holds the position P of a transaction and the muxed address `M(payee, P)`; the precondition's 40-byte payload; and the events that show what moved. Every read goes through a bounded reader. ## Interfaces ### PayloadSigner A signed-payload signer of a transaction's preconditions: its Ed25519 key as a `G…` strkey, and its payload. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `key` | `readonly` | `string` | | `payload` | `readonly` | `Uint8Array` | *** ### StellarCandidate A transaction the search found, read whole: its hash, its position P, its result, its envelope, and its events. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `envelopeXdr` | `readonly` | `string` | - | | `events` | `readonly` | readonly [`StellarEvent`](https://lcp.integraledger.com/reference/api/stellar.md#stellarevent) & `object`[] | The events of the transaction the search met, each with its id and its contract, in the RPC's order. | | `position` | `readonly` | `string` | - | | `result` | `readonly` | `"failed"` \| `"succeeded"` | - | | `transaction` | `readonly` | `string` | - | *** ### StellarEvent What a Stellar Asset Contract event shows: its kind, its `from` and its `to` (non-muxed), `to_muxed_id`, and the amount. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `amount` | `readonly` | `bigint` | - | | `from` | `readonly` | `string` \| `null` | The `from` topic: absent from a `mint`. | | `kind` | `readonly` | `"transfer"` \| `"mint"` \| `"burn"` | - | | `toBase` | `readonly` | `string` \| `null` | The `to` topic, its base account: absent from a `burn`. | | `toMuxedId` | `readonly` | `bigint` \| `null` | - | *** ### StellarEventRow One event `getEvents` answers, as the reader gives it. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `contractId` | `readonly` | `string` | The contract that emitted it, a `C…` strkey. | | `id` | `readonly` | `string` | The RPC's event id: the operation's TOID in 19 decimal digits, `-`, and the event's index in 10. | | `ledger` | `readonly` | `number` | - | | `topic` | `readonly` | readonly `string`[] | Its topics, each the base64 XDR of an ScVal. | | `txHash` | `readonly` | `string` | - | | `value` | `readonly` | `string` | Its data, the base64 XDR of an ScVal. | *** ### StellarLanded What the caller adds to the reference for `stellarStatus`: `fromLedger`, the ledger the search starts from, the ledger recorded at issue. #### Properties | Property | Type | | ------ | ------ | | `fromLedger` | `number` | *** ### StellarPayment #### Properties | Property | Type | | ------ | ------ | | `amount` | `bigint` | | `asset` | `string` | | `auth` | `object` | | `auth.address` | `string` | | `auth.expiration` | `number` | | `auth.nonce` | `bigint` | | `auth.preimageHash` | `` `0x${string}` `` | | `auth.v2` | `boolean` | | `from` | `string` | | `to` | `string` | | `toBase` | `string` | | `toId` | `bigint` \| `null` | *** ### StellarReader Bounded, read-only calls against one network's Stellar RPC. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`: a `ReaderError` reads by its kind (`too-large` as `too-large`, `malformed` as `unparseable`), and any other rejection as `transport`. A throttled call is retried by the reader, never answered as absence. #### Methods ##### events() > **events**(`f`): `Promise`\<\{ `cursor?`: `string`; `events`: readonly [`StellarEventRow`](https://lcp.integraledger.com/reference/api/stellar.md#stellareventrow)[]; `latestLedger`: `number`; `oldestLedger`: `number`; \}\> One page of `getEvents` of contract events on every contract, by a filter that names no contract and holds `topics`, each a topic filter of base64 XDR segments, `*` and `**`, from `fromLedger` through `toLedger`, both inclusive. `cursor` is present while more pages remain: until the RPC has scanned through `toLedger`, or through its own `latestLedger` where that is lower. Stellar RPC's `getEvents` treats `endLedger` as exclusive and takes a cursor or a ledger range but not both, so a reader over it sends `startLedger: fromLedger` and `endLedger: toLedger + 1` on the first page and only the cursor on later pages, and keeps only the events through `toLedger`. ###### Parameters | Parameter | Type | | ------ | ------ | | `f` | \{ `cursor?`: `string`; `fromLedger`: `number`; `toLedger`: `number`; `topics`: readonly readonly `string`[][]; \} | | `f.cursor?` | `string` | | `f.fromLedger` | `number` | | `f.toLedger` | `number` | | `f.topics` | readonly readonly `string`[][] | ###### Returns `Promise`\<\{ `cursor?`: `string`; `events`: readonly [`StellarEventRow`](https://lcp.integraledger.com/reference/api/stellar.md#stellareventrow)[]; `latestLedger`: `number`; `oldestLedger`: `number`; \}\> ##### latestLedger() > **latestLedger**(): `Promise`\<\{ `closeTime?`: `number`; `sequence`: `number`; \}\> `getLatestLedger`: the latest closed ledger's sequence, and its close time in Unix seconds where the RPC gives it. ###### Returns `Promise`\<\{ `closeTime?`: `number`; `sequence`: `number`; \}\> ##### passphrase() > **passphrase**(): `Promise`\<`string`\> `getNetwork`: the network's passphrase. ###### Returns `Promise`\<`string`\> ##### sequence()? > `optional` **sequence**(`account`): `Promise`\<`bigint` \| `null`\> `getLedgerEntries` of an account: its sequence number, or null where the account does not exist. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | ###### Returns `Promise`\<`bigint` \| `null`\> ##### transaction() > **transaction**(`hash`): `Promise`\<\{ `applicationOrder?`: `number`; `envelopeXdr?`: `string`; `latestLedger`: `number`; `ledger?`: `number`; `oldestLedger`: `number`; `status`: `"SUCCESS"` \| `"FAILED"` \| `"NOT_FOUND"`; \}\> `getTransaction`: its status, and, where it was included, its envelope, its ledger and its application order in that ledger; with the oldest and latest ledgers the RPC holds. ###### Parameters | Parameter | Type | | ------ | ------ | | `hash` | `string` | ###### Returns `Promise`\<\{ `applicationOrder?`: `number`; `envelopeXdr?`: `string`; `latestLedger`: `number`; `ledger?`: `number`; `oldestLedger`: `number`; `status`: `"SUCCESS"` \| `"FAILED"` \| `"NOT_FOUND"`; \}\> *** ### StellarRef The read keys `reference` returns for `x402/exact/stellar/precondition`: the network; the option's payee (`payTo`), the key of the read's two party tests; the buyer; the asset and the `to` base account of the transfer the buyer's entry signs; that entry's nonce (an `int64` in decimal), its expiration ledger and the SHA-256 of its `HashIDPreimage` (`authDigest`, `0x` and 64 lowercase hex digits), which names the entry under any envelope; and the 40-byte payload as presented (`0x` and 80 lowercase hex digits), whose first 32 bytes are H. #### Properties | Property | Type | | ------ | ------ | | `asset` | `string` | | `authDigest` | `` `0x${string}` `` | | `buyer` | `string` | | `expiration` | `number` | | `network` | [`StellarNetwork`](https://lcp.integraledger.com/reference/api/stellar.md#stellarnetwork) | | `nonce` | `string` | | `payee` | `string` | | `payload` | `string` | | `toBase` | `string` | *** ### StellarSearch What a search found: the candidates read whole; the items it could not decode, each with the position held at it; whether it read through to the latest closed ledger at the read within its bounds; the position the next call resumes at where it did not; and that ledger. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `at?` | `readonly` | `string` | | `candidates` | `readonly` | readonly [`StellarCandidate`](https://lcp.integraledger.com/reference/api/stellar.md#stellarcandidate)[] | | `latest` | `readonly` | `number` | | `through` | `readonly` | `boolean` | | `undecoded` | `readonly` | readonly `object`[] | *** ### StellarUnsigned What the buyer signs for `x402/exact/stellar/precondition`, with one key: SHA-256 of `preimage`, the authorization entry's `HashIDPreimage`, and `payload` itself, the 40 bytes of the signed-payload precondition (CAP-40); and how the two signatures complete the payment. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.kind` | `"stellar-precondition"` | | `request.payload` | `Uint8Array`\<`ArrayBuffer`\> | | `request.preimage` | `Uint8Array`\<`ArrayBuffer`\> | #### Methods ##### complete() > **complete**(`signatures`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarPaymentPayload`](https://lcp.integraledger.com/reference/api.md#stellarpaymentpayload) The x402 payment: the entry's signature written as a Stellar account's, the payload's as a decorated signature of the envelope. A signature that is not 64 bytes is `stellar/tx-malformed`, and a signed envelope over 8,192 characters `stellar/tx-too-large`. ###### Parameters | Parameter | Type | | ------ | ------ | | `signatures` | \{ `entry`: `Uint8Array`; `payload`: `Uint8Array`; \} | | `signatures.entry` | `Uint8Array` | | `signatures.payload` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarPaymentPayload`](https://lcp.integraledger.com/reference/api.md#stellarpaymentpayload) ## Type Aliases ### StellarMark > **StellarMark** = `"finalized"` The one mark: a transaction in a closed ledger, which is final. *** ### StellarNetwork > **StellarNetwork** = `"stellar:pubnet"` \| `"stellar:testnet"` *** ### StellarQuery > **StellarQuery** = `Omit`\<[`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`StellarRef`](https://lcp.integraledger.com/reference/api/stellar.md#stellarref), `string`, [`StellarMark`](https://lcp.integraledger.com/reference/api/stellar.md#stellarmark), `string`\>, `"after"`\> & `object` What `stellarStatus` takes beside the reference and the reader: the act, the finality, and, where the caller gives them, `after`, the ledger sequence a transaction must come after (one in that ledger or below answers `before-position`), `search`, the position an earlier answer returned, and the other acts under the same H. #### Type Declaration | Name | Type | | ------ | ------ | | `after?` | `number` | *** ### StellarStatus > **StellarStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`string`, [`StellarMark`](https://lcp.integraledger.com/reference/api/stellar.md#stellarmark), `string`\> The answer of `stellarStatus`: positions, and the search position, are positions P (`stellar-position.ts`), and the one mark is `finalized`. ## Variables ### MAX\_CANDIDATES > `const` **MAX\_CANDIDATES**: `50` = `50` The candidate transactions one search reads in one call. Any contract can emit an event naming the buyer, so a stranger can fill it; a search that reaches it is not read through, and resumes at the position it returns. *** ### MAX\_ORDER > `const` **MAX\_ORDER**: `1048575` = `0xfffff` The largest application order a position holds: 20 bits. *** ### MAX\_PAGES > `const` **MAX\_PAGES**: `10` = `10` The events pages one search reads in one call. *** ### PASSPHRASE > `const` **PASSPHRASE**: `Readonly`\<`Record`\<[`StellarNetwork`](https://lcp.integraledger.com/reference/api/stellar.md#stellarnetwork), `string`\>\> Each network's passphrase; its SHA-256 is the network id. *** ### PAYLOAD\_BYTES > `const` **PAYLOAD\_BYTES**: `40` = `40` The length of the signed-payload precondition's payload: H's 32 bytes, then an `int64`'s 8. *** ### SCVAL\_MAX\_DEPTH > `const` **SCVAL\_MAX\_DEPTH**: `64` = `64` The deepest nesting of ScVal vectors and maps (a contract instance's storage counting as a map) within one ScVal, the outermost container being level 1, and of authorized invocations within one authorization entry, the root invocation being level 1. It bounds what is read of an envelope, the operation and the payer's authorization entry, and an event's topics and data. It does not apply to the rest of an envelope (another authorization entry, a delegate, the footprint, another operation), which is decoded whatever its depth, so nesting there does not make the envelope unreadable. ## Functions ### decodeStellarTx() > **decodeStellarTx**(`xdrB64`, `network`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarPayment`](https://lcp.integraledger.com/reference/api/stellar.md#stellarpayment) Decodes a base64 `TransactionEnvelope` (v1, or a fee bump's inner v1) of at most 8,192 base64 characters (6 KiB of XDR) holding exactly one `invokeHostFunction` operation that calls `transfer(from, to, amount)` on a contract, and the one authorization entry with address credentials (`sorobanCredentialsAddress` or `sorobanCredentialsAddressV2`) whose address is `from`. The entry's `rootInvocation` must be that same `transfer`, byte for byte, with no sub-invocations; the payment's contract, `to` and amount are the signed invocation's. The base64 is read strictly (RFC 4648 §4, zero padding bits), and the XDR must be consumed whole. The operation and that entry nest ScVals and authorized invocations at most `SCVAL_MAX_DEPTH` levels (`stellar/tx-malformed` past it); the cap does not apply to the rest of the envelope (another entry, a delegate, the footprint, another operation), which is decoded whatever its depth, so its nesting does not refuse the envelope. `preimageHash` is SHA-256 of that entry's `HashIDPreimage` under the network's passphrase: the V1 form, or for V2 the form with the address. An entry with source-account credentials is not one: without an address entry of `from` the envelope is `stellar/no-address-auth`. #### Parameters | Parameter | Type | | ------ | ------ | | `xdrB64` | `string` | | `network` | [`StellarNetwork`](https://lcp.integraledger.com/reference/api/stellar.md#stellarnetwork) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarPayment`](https://lcp.integraledger.com/reference/api/stellar.md#stellarpayment) *** ### muxedFor() > **muxedFor**(`payee`, `position`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The `M…` strkey of the account `payee` and the id P, the position of a transaction. A `payee` that is not a `G…` strkey is `stellar/option-malformed`, the code of a recipient that cannot take a muxed id; a P the position's codec refuses is `stellar/position-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `payee` | `string` | | `position` | `string` | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### parseStellarPosition() > **parseStellarPosition**(`p`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `ledger`: `number`; `order`: `number`; \} The ledger and the application order of a position. A value that is not a decimal string with no sign and no leading zero below 2^64, one whose low 12 bits are not zero, or one whose order is 0, is `stellar/position-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `p` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `ledger`: `number`; `order`: `number`; \} *** ### readSignedPayload() > **readSignedPayload**(`bytes`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `value`: `bigint`; \} H and the `int64` of a 40-byte payload: bytes of any other length, trailing bytes among them, are `stellar/carrier-mismatch`. #### Parameters | Parameter | Type | | ------ | ------ | | `bytes` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `value`: `bigint`; \} *** ### signedPayload() > **signedPayload**(`h`, `value`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The 40-byte payload of the signed-payload precondition: H's 32 bytes, then `value`, an `int64` (the authorization entry's nonce, or a transaction's sequence number), 8 bytes big-endian two's complement. An `h` that is not a 32-byte hash is `x402/payload-malformed`, as the other rails' carrier writers answer one; a `value` that is not a bigint in the `int64` range `stellar/carrier-mismatch`. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | | `value` | `bigint` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### stellarLocate() > **stellarLocate**(`q`, `reader`): `Promise`\<[`StellarSearch`](https://lcp.integraledger.com/reference/api/stellar.md#stellarsearch) \| \{ `unreadable`: [`UnreadableReason`](https://lcp.integraledger.com/reference/api.md#unreadablereason); \}\> The search for a buyer's acts: `getEvents` on every contract with `transferEventTopics(buyer)`, from `fromLedger` (or, given `search`, the position an earlier search returned, from which it resumes) through the latest closed ledger at the read, and each candidate transaction read whole by `getTransaction`. An event's transaction is placed by its id's position, the operation's TOID with its low 12 bits cleared, which must be the position `getTransaction` gives it (its ledger and application order); an event that does not decode, or whose transaction is not found, does not decode or sits at another position, is an item the search could not decode, held at that position. At most `MAX_PAGES` pages and `MAX_CANDIDATES` candidates: a search that reaches either, or whose events index answers below the latest closed ledger read first, is not read through, and gives the position the next call resumes at. A network whose passphrase is not the reference's is `chain-mismatch`; an RPC whose oldest ledger is above the ledger the search starts from, `history-gap`; an answer out of the reader's form, `unparseable`; a rejected read by its reason. The search needs @stellar/stellar-sdk to write its filter and decode events: without it, it is `unparseable`. #### Parameters | Parameter | Type | | ------ | ------ | | `q` | \{ `buyer`: `string`; `fromLedger`: `number`; `network`: [`StellarNetwork`](https://lcp.integraledger.com/reference/api/stellar.md#stellarnetwork); `search?`: `string`; \} | | `q.buyer` | `string` | | `q.fromLedger` | `number` | | `q.network` | [`StellarNetwork`](https://lcp.integraledger.com/reference/api/stellar.md#stellarnetwork) | | `q.search?` | `string` | | `reader` | [`StellarReader`](https://lcp.integraledger.com/reference/api/stellar.md#stellarreader) | #### Returns `Promise`\<[`StellarSearch`](https://lcp.integraledger.com/reference/api/stellar.md#stellarsearch) \| \{ `unreadable`: [`UnreadableReason`](https://lcp.integraledger.com/reference/api.md#unreadablereason); \}\> *** ### stellarPosition() > **stellarPosition**(`ledger`, `order`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The position of the transaction at application order `order` of ledger `ledger`, as its decimal string. A `ledger` that is not a ledger sequence, or an `order` that is not an integer from 1 to 2^20 − 1, is `stellar/position-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `ledger` | `number` | | `order` | `number` | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### stellarRecover() > **stellarRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> H as the landed transaction `tx` carries it: the first 32 bytes of the one signed-payload signer of its preconditions, whose payload is 40 bytes. A transaction with none or more than one is `stellar/no-carrier`, and a payload of another length `stellar/carrier-mismatch`; a transaction the reader does not know is `stellar/not-found`; a rejected read, or an answer out of the reader's form, is `stellar/unreadable`. An input that is not one, a `tx` that is not 64 hex digits, or a reader whose passphrase is not the network's, is `stellar/wrong-reader`. The envelope is read as `scanEnvelope` reads it. H is recovered whatever the transaction's result. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<[`StellarNetwork`](https://lcp.integraledger.com/reference/api/stellar.md#stellarnetwork), `unknown`\> | | `reader` | [`StellarReader`](https://lcp.integraledger.com/reference/api/stellar.md#stellarreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### stellarStatus() > **stellarStatus**(`ref`, `reader`, `query`): `Promise`\<[`StellarStatus`](https://lcp.integraledger.com/reference/api/stellar.md#stellarstatus)\> The read of `x402/exact/stellar/precondition`, as the profile `read-status` answers it, through `stellarLocate`'s search from the reference's `fromLedger`. A candidate that succeeded and is of the form (its one operation the `transfer` the buyer's entry signs) is the agreement where the five checks hold for H and the buyer: its preconditions hold exactly one signed-payload signer, whose payload is H then the nonce of the entry the transaction consumed; that payload's key is a key whose signature the entry carries; the transfer's `from` is not the option's payee; and the buyer is an account whose entry has address credentials. A candidate whose payload key is the payee's, or whose `from` is the payee, is the payee's; one whose payload key the entry did not sign carries H under another account's signature; one of the form that fails the payload's layout is of another kind. A candidate that consumed the entry's nonce is its consumer; one not of the form that holds an entry of the buyer's over that nonce is an item the search could not decode, since the read cannot tell whether the host used that entry. The nonce is read only by the search read through, which shows it consumed where a candidate consumed it, and its validity passed where the latest closed ledger is above the entry's expiration ledger; a search not read through, or that met an item it could not decode, reads it neither consumed nor unconsumed. The search proves no absence until a run shows that the event search with no contract named holds every act of the buyer, so the read never reports it read whole, and every answer it decides but `before-position` is `pending`, `search-incomplete`. `presented` is `yes` where the landed entry's digest and payload are the reference's, `no` otherwise. Each transfer is named by its transaction and its event's id. A reference, reader or query that is not one is `unparseable`, with nothing read. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`StellarRef`](https://lcp.integraledger.com/reference/api/stellar.md#stellarref) & [`StellarLanded`](https://lcp.integraledger.com/reference/api/stellar.md#stellarlanded) | | `reader` | [`StellarReader`](https://lcp.integraledger.com/reference/api/stellar.md#stellarreader) | | `query` | [`StellarQuery`](https://lcp.integraledger.com/reference/api/stellar.md#stellarquery) | #### Returns `Promise`\<[`StellarStatus`](https://lcp.integraledger.com/reference/api/stellar.md#stellarstatus)\> *** ### transferEventOf() > **transferEventOf**(`topic`, `value`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarEvent`](https://lcp.integraledger.com/reference/api/stellar.md#stellarevent) A Stellar Asset Contract event, as CAP-67 writes it: `transfer` (`from`, `to`, then any trailing topic), `burn` (`from`), or `mint` (`to`; or `admin` then `to`, where the third topic is an address); its data the `i128` amount, or a map holding `amount` and, for a muxed recipient, `to_muxed_id` (read where it is a `u64`). The first topic and the map's keys are symbols, compared byte for byte. Every refusal is `stellar/event-malformed`. The topics' and the value's form (2 to 4 topics, each one and the value base64 of at most 1,024 characters) is checked before the SDK is needed, which reads the XDR. #### Parameters | Parameter | Type | | ------ | ------ | | `topic` | readonly `string`[] | | `value` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarEvent`](https://lcp.integraledger.com/reference/api/stellar.md#stellarevent) *** ### transferEventTopics() > **transferEventTopics**(`buyer`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| readonly readonly `string`[][] The `getEvents` topic filters of the buyer's acts, as base64 XDR segments: `transfer` events whose `from` topic is the buyer, and `burn` events whose `from` topic is the buyer, each with any trailing topics. A `mint` event names no `from` (CAP-67 removed the admin from its topics), so no filter of `mint` names the buyer. A buyer that is not an account or contract strkey is `stellar/option-malformed`, which needs no SDK: the SDK is needed after it, to write the XDR. #### Parameters | Parameter | Type | | ------ | ------ | | `buyer` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| readonly readonly `string`[][] ## References ### StellarPaymentPayload Re-exports [StellarPaymentPayload](https://lcp.integraledger.com/reference/api.md#stellarpaymentpayload) --- # @integraledger/lcp/sui > Sui, and the `x402/exact/sui` pairing: the ATR hash as the one `Pure` input of the payer's programmable transaction that no command uses. Source: https://lcp.integraledger.com/reference/api/sui Updated 2026-11-19. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Sui, and the `x402/exact/sui` pairing: the ATR hash as the one `Pure` input of the payer's programmable transaction that no command uses. The payer's signature covers it, the rail executes the transaction unchanged, and the hash stays on chain in the transaction's input list. Settlement is read by the transaction digest, which the signed bytes fix before any money moves. BCS decoding uses @mysten/sui, loaded once when this module is, and decoding a transaction's bytes is the one step that needs it: without it a function refuses `sui/peer-missing` only when it reaches that step, after the checks that need no peer; `build` gives the request it gives with it; and `status` reads as it does with it until it meets a transaction's bytes, where the transaction the digest names is unreadable `unparseable`, and each transaction of the sender's that the search passes is an item it could not decode, at which the search is held. A digest is base58, read and written with the package's own dependency @scure/base, so it is checked without the peer. ## Interfaces ### SuiBalanceChange One owner's net change in one coin type, an entry of the effects' `balanceChanges`. #### Properties | Property | Type | | ------ | ------ | | `amount` | `bigint` | | `coinType` | `string` | | `owner` | `string` | *** ### SuiExecuted #### Extended by - [`SuiFound`](https://lcp.integraledger.com/reference/api/sui.md#suifound) #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `balanceChanges` | readonly [`SuiBalanceChange`](https://lcp.integraledger.com/reference/api/sui.md#suibalancechange)[] | The effects' balance changes, each owner's net change in each coin type (`balanceChangesJson`). | | `checkpoint` | `bigint` \| `null` | The checkpoint that holds the effects, or null for a transaction executed and not yet in one. | | `status` | `"SUCCESS"` \| `"FAILURE"` | - | | `transactionBcs` | `Uint8Array` | - | *** ### SuiFound A transaction a page of the search returns: its digest as the endpoint names it, with the read's members. #### Extends - [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted) #### Properties | Property | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | | `balanceChanges` | readonly [`SuiBalanceChange`](https://lcp.integraledger.com/reference/api/sui.md#suibalancechange)[] | The effects' balance changes, each owner's net change in each coin type (`balanceChangesJson`). | [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted).[`balanceChanges`](https://lcp.integraledger.com/reference/api/sui.md#property-balancechanges) | | `checkpoint` | `bigint` \| `null` | The checkpoint that holds the effects, or null for a transaction executed and not yet in one. | [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted).[`checkpoint`](https://lcp.integraledger.com/reference/api/sui.md#property-checkpoint) | | `digest` | `string` | - | - | | `status` | `"SUCCESS"` \| `"FAILURE"` | - | [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted).[`status`](https://lcp.integraledger.com/reference/api/sui.md#property-status) | | `transactionBcs` | `Uint8Array` | - | [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted).[`transactionBcs`](https://lcp.integraledger.com/reference/api/sui.md#property-transactionbcs) | *** ### SuiPage One page of the sender's transactions, in checkpoint order, with the endpoint's `pageInfo`. #### Properties | Property | Type | | ------ | ------ | | `endCursor` | `string` \| `null` | | `hasNextPage` | `boolean` | | `transactions` | readonly [`SuiFound`](https://lcp.integraledger.com/reference/api/sui.md#suifound)[] | *** ### SuiPayload The payload x402's Sui scheme defines. #### Properties | Property | Type | | ------ | ------ | | `signature` | `string` | | `transaction` | `string` | *** ### SuiReader Bounded, read-only calls against one network's GraphQL endpoint. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`; any rejection reads as unreadable. `read` is one request, so one snapshot: `query($d:String!){transaction(digest:$d){transactionBcs effects{status checkpoint{sequenceNumber} balanceChangesJson}} checkpoint{epoch{epochId}} serviceConfig{availableRange(type:"Query",field:"transaction"){first{sequenceNumber}} sender:availableRange(type:"Query",field:"transactions",filters:["sentAddress"]){first{sequenceNumber} last{sequenceNumber epoch{epochId}}}}}`. `epoch` is the latest checkpoint's epoch. `firstCheckpoint` is the first checkpoint from which the endpoint holds transactions (the available range's inclusive lower bound), or null when the endpoint states none. `searchRange` is the range it states for the sender filter, its first and last checkpoints and the last one's epoch (`SuiSearchRange`). Every executed transaction carries its effects' balance changes (`balanceChangesJson`), each owner's net change in each coin type, whole: an answer without them is `unparseable`. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | [`SuiNetwork`](https://lcp.integraledger.com/reference/api/sui.md#suinetwork) | #### Methods ##### read() > **read**(`digest`): `Promise`\<\{ `epoch`: `bigint`; `firstCheckpoint`: `bigint` \| `null`; `searchRange?`: [`SuiSearchRange`](https://lcp.integraledger.com/reference/api/sui.md#suisearchrange) \| `null`; `tx`: [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted) \| `null`; \}\> ###### Parameters | Parameter | Type | | ------ | ------ | | `digest` | `string` | ###### Returns `Promise`\<\{ `epoch`: `bigint`; `firstCheckpoint`: `bigint` \| `null`; `searchRange?`: [`SuiSearchRange`](https://lcp.integraledger.com/reference/api/sui.md#suisearchrange) \| `null`; `tx`: [`SuiExecuted`](https://lcp.integraledger.com/reference/api/sui.md#suiexecuted) \| `null`; \}\> ##### search() > **search**(`sender`, `afterCheckpoint`, `beforeCheckpoint`, `cursor`): `Promise`\<[`SuiPage`](https://lcp.integraledger.com/reference/api/sui.md#suipage)\> One page of the sender's transactions: `transactions(first, after: cursor, filter: {sentAddress: sender, afterCheckpoint, beforeCheckpoint}) { pageInfo { hasNextPage endCursor } nodes { digest transactionBcs effects { status checkpoint { sequenceNumber } balanceChangesJson } } }`, `cursor` null for the first page. ###### Parameters | Parameter | Type | | ------ | ------ | | `sender` | `string` | | `afterCheckpoint` | `bigint` | | `beforeCheckpoint` | `bigint` | | `cursor` | `string` \| `null` | ###### Returns `Promise`\<[`SuiPage`](https://lcp.integraledger.com/reference/api/sui.md#suipage)\> *** ### SuiRef The read keys: the network, the digest, the epoch bound, the payee, the `payTo` of the option the payment answers, and the sender, by which the search for H finds the payer's acts. The digest is over the whole transaction data the payer signed, its signatures apart, so it also names the payment presented. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `digest` | `string` | - | | `network` | [`SuiNetwork`](https://lcp.integraledger.com/reference/api/sui.md#suinetwork) | - | | `payee` | `string` | - | | `sender` | `string` | - | | `untilEpoch` | `string` \| `null` | The last epoch the transaction can execute in, as a decimal string, or null when it sets no maximum epoch. | *** ### SuiSearchRange The range of checkpoints the endpoint states it holds for the sender filter of `transactions` (`serviceConfig.availableRange(type: "Query", field: "transactions", filters: ["sentAddress"])`): its first and last checkpoints, and the epoch of the last. #### Properties | Property | Type | | ------ | ------ | | `epoch` | `bigint` | | `first` | `bigint` | | `last` | `bigint` | *** ### SuiTransfer A transfer a signed command names: `TransferObjects` to an address given as a `Pure` input, or a call of `0x2::coin::send_funds(coin, recipient)` with the recipient given so. `command` is the command's index among the transaction's commands; `coinType` is the type the command shows, `T` of `send_funds`, or `0x2::sui::SUI` where every object transferred is split from the gas coin, and absent where the bytes do not show it. #### Properties | Property | Type | | ------ | ------ | | `coinType?` | `string` | | `command` | `number` | | `recipient` | `string` | *** ### SuiTx A decoded `TransactionData`: the bytes as received, their digest, the unused `Pure` inputs, and the epoch bound. `B` is what its bytes are backed by: `decodeSuiTx` gives `SuiTx`, each byte field in its own fresh `ArrayBuffer`, and `suiCarrier` takes any backing. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` | #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `bytes` | `Uint8Array`\<`B`\> | - | | `digest` | `string` | Base58 of Blake2b-256 over `"TransactionData::"` followed by the bytes. | | `sender` | `string` | The sender, who signed the bytes: `0x` and 64 lowercase hex digits. | | `transfers` | readonly [`SuiTransfer`](https://lcp.integraledger.com/reference/api/sui.md#suitransfer)[] | The transfers the signed commands name, each with the recipient it names (`SuiTransfer`). | | `untilEpoch` | `bigint` \| `null` | - | | `unusedPure` | readonly `Uint8Array`\<`B`\>[] | - | *** ### SuiUnsigned What `build` hands the payer's wallet, and how it checks what comes back. #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `request.expiration` | `"epoch-bounded"` | | `request.kind` | `"sui-transaction"` | | `request.pureInput` | `Uint8Array`\<`ArrayBuffer`\> | #### Methods ##### complete() > **complete**(`signed`, `sent?`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SuiPaymentPayload`](https://lcp.integraledger.com/reference/api.md#suipaymentpayload) The payment, once the signed transaction carries H. `sent` is the transaction the client sent to the option's gas station (`extra.gasStation`), base64 of its `TransactionData`: on the sponsored path it is required, and the signed transaction must equal it in everything but the gas data (its owner, payment, price and budget), else `sui/not-as-sent`, since a gas station that changed the sender, an input, a command or the expiration could raise the amount or remove the lapse under a valid H. ###### Parameters | Parameter | Type | | ------ | ------ | | `signed` | [`SuiPayload`](https://lcp.integraledger.com/reference/api/sui.md#suipayload) | | `sent?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SuiPaymentPayload`](https://lcp.integraledger.com/reference/api.md#suipaymentpayload) ## Type Aliases ### SuiMark > **SuiMark** = `"executed"` \| `"final"` *** ### SuiNetwork > **SuiNetwork** = `"sui:mainnet"` \| `"sui:testnet"` \| `"sui:devnet"` *** ### SuiStatus > **SuiStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`SuiMark`](https://lcp.integraledger.com/reference/api/sui.md#suimark), `bigint`\> The answer of `suiStatus`, as the profile `read-status` gives it, and on `settled` whether its act is the payment presented. Positions are checkpoint sequence numbers, and so is the search's position. The one mark a query can ask for is `final`, certified effects in a checkpoint; `executed`, a transaction the endpoint returns with no checkpoint, is the state below it that the endpoint tells apart and no query names. ## Variables ### exactSui > `const` **exactSui**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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) \| [`SuiUnsigned`](https://lcp.integraledger.com/reference/api/sui.md#suiunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/sui"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SuiRef`](https://lcp.integraledger.com/reference/api/sui.md#suiref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SuiStatus`](https://lcp.integraledger.com/reference/api/sui.md#suistatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/sui`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator executes the transaction the payer signed; `status` reads it by the digest the signed bytes fix. *** ### MAX\_SUI\_BALANCE\_CHANGES > `const` **MAX\_SUI\_BALANCE\_CHANGES**: `4096` = `4096` The most balance changes the read takes of one executed transaction: lcp's own bound on the work one reader's answer asks of it. Sui sets no count a GraphQL answer is held to; a transaction with more is out of the reader's form. *** ### MAX\_SUI\_COIN\_TYPE\_LENGTH > `const` **MAX\_SUI\_COIN\_TYPE\_LENGTH**: `4096` = `4096` The longest coin type, in characters, the read takes from a balance change: lcp's own bound on a reader's answer. Sui bounds a type by its nesting (16) and its identifiers, not by its text; a coin type with type parameters, such as a pool's share `…::reserve::CToken`, is a coin type all the same. *** ### MAX\_SUI\_SEARCH\_PAGES > `const` **MAX\_SUI\_SEARCH\_PAGES**: `8` = `8` The pages one call of `status` reads of the search before it answers with the search's position: lcp's own bound on the reads one call makes. The next call resumes from that position. ## Functions ### decodeSuiTx() > **decodeSuiTx**(`base64`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SuiTx`](https://lcp.integraledger.com/reference/api/sui.md#suitx)\<`ArrayBuffer`\> Decodes a base64 `TransactionData` V1 with a programmable kind. A programmable transaction with a type (a call's type argument, a vector's element type, a funds withdrawal's type) that has a node at depth 16, Sui's type depth limit, is `sui/tx-malformed`, the code of bytes that do not decode: @mysten/sui decodes a type by recursion, and the bound gives the same answer whether this host's stack would hold the type or not. A V1 `TransactionData` of another kind is `sui/not-programmable`, answered from its kind's tag before its body is decoded. The base64, the size bound and the two tags are read without @mysten/sui: without it, bytes they refuse get the code they get with it, and any other bytes are `sui/peer-missing`. #### Parameters | Parameter | Type | | ------ | ------ | | `base64` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SuiTx`](https://lcp.integraledger.com/reference/api/sui.md#suitx)\<`ArrayBuffer`\> *** ### suiCarrier() > **suiCarrier**(`tx`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The hash carried by exactly one unused `Pure` input of exactly 32 bytes. A `tx` that is not a decoded transaction, an object whose `unusedPure` is an array of `Uint8Array`s, is `sui/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | [`SuiTx`](https://lcp.integraledger.com/reference/api/sui.md#suitx) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### suiFloor() > **suiFloor**(`input`): `bigint` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The agreement's floor, the smallest amount an agreement option can name, in the coin type's base units, by the gas path the option fixes (the profile `x402-exact-sui`, rules 7 and 16): 0 where the buyer pays gas (`buyer`, the option carrying neither `extra.gasStation` nor `extra.gasless`) or a sponsor does (`sponsored`, `extra.gasStation`); on the gasless path (`gasless`, `extra.gasless` true) the larger of 1 and the coin type's smallest transfer on the network, `smallestTransfer`: the minimum Sui's protocol configuration lists beside the coin type among the tokens a gasless transaction may move (`gasless_allowed_token_types`), which the caller reads for the option's network, since a protocol upgrade can change it; the option filter refuses an amount of `"0"` on that path. A gas path not one of the three, or on the gasless path a `smallestTransfer` that is not a non-negative bigint, is `sui/floor-input`. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | \{ `gasPath`: `"buyer"` \| `"gasless"` \| `"sponsored"`; `smallestTransfer?`: `bigint`; \} | | `input.gasPath` | `"buyer"` \| `"gasless"` \| `"sponsored"` | | `input.smallestTransfer?` | `bigint` | #### Returns `bigint` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### suiRecover() > **suiRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Reads the hash back from the executed transaction alone, by its digest, the input's `tx`; the input's `option` is the option the payment answers, an object, of which the read needs no member. An input whose `tx` is not base58 of 32 bytes, or whose option is not an object, is `sui/wrong-reader`, with nothing read. Bytes that do not hash to the digest are `sui/unreadable`; bytes that do, and that `decodeSuiTx` refuses, give its refusal, as `suiStatus` reads no act in them. Without @mysten/sui the transaction cannot be decoded: bytes that hash to the digest, of a transaction that did not abort, are `sui/peer-missing`, after the input, the reader and the read are checked, which need no peer. One call. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<[`SuiNetwork`](https://lcp.integraledger.com/reference/api/sui.md#suinetwork), [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`SuiReader`](https://lcp.integraledger.com/reference/api/sui.md#suireader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### suiStatus() > **suiStatus**(`ref`, `reader`, `query`): `Promise`\<[`SuiStatus`](https://lcp.integraledger.com/reference/api/sui.md#suistatus)\> Answers the read of the recorded digest as the profile `read-status` gives it, with the search for H the profile `x402/exact/sui` states. The digest is the single-use value: Sui derives it from the signed bytes alone, so the transaction with it, succeeded or not, consumed it. That transaction must be these bytes carrying this hash, else the answer is unreadable `unparseable`. It is classified from what landed: its signer, the sender, against the option's payee and the reference's sender; the account it names, a positive balance change the payee's address owns or a recipient a signed transfer names, against the payee; and whether it is another act the caller gave by its reference. One with no checkpoint is in the state `executed`, after every checkpoint, so after the position given, and below the final mark. An absent transaction can still land while the endpoint holds transactions from the position given and the epoch at the search's head is not past its bound, or it has none; past it, it lapsed. Where the read would answer `failed` for any reason but `before-position`, it reads the search for H: the sender's transactions after the position given, or after the search's position an earlier answer returned, to the last checkpoint the endpoint states it holds for the sender filter, at most `MAX_SUI_SEARCH_PAGES` pages a call, each transaction read as `bound` reads one, those that carry H classified as the digest's is. A transaction it passes that does not hash to its digest or does not decode is named among the items the search could not decode, held at the checkpoint before it. A rejected read is unreadable `transport`; an answer out of the reader's form `unparseable`; transaction bytes over the bound `too-large`; a reader for another network `chain-mismatch`; a ref, a reader or a query that is not one is `unparseable`, with nothing read. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`SuiRef`](https://lcp.integraledger.com/reference/api/sui.md#suiref) & `object` | | `reader` | [`SuiReader`](https://lcp.integraledger.com/reference/api/sui.md#suireader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`SuiRef`](https://lcp.integraledger.com/reference/api/sui.md#suiref) & `object`, `bigint`, [`SuiMark`](https://lcp.integraledger.com/reference/api/sui.md#suimark), `bigint`\> | #### Returns `Promise`\<[`SuiStatus`](https://lcp.integraledger.com/reference/api/sui.md#suistatus)\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### SuiPaymentPayload Re-exports [SuiPaymentPayload](https://lcp.integraledger.com/reference/api.md#suipaymentpayload) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/svm > Solana rail pieces: the wire transaction and its one Memo instruction carrying the ATR hash in LCP string form, the settlement read, and the payment-channels program's pieces. Source: https://lcp.integraledger.com/reference/api/svm Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Solana rail pieces: the wire transaction and its one Memo instruction carrying the ATR hash in LCP string form, the settlement read, and the payment-channels program's pieces. It also holds the digest of the message the payer signed. The settlement is read through a bounded reader. The payment-channels pieces are its instructions and PDAs, the voucher, the session proof, and the channel's status read. ## Interfaces ### ChannelBuildInput #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `computeUnitLimit` | `number` | - | | `computeUnitPrice` | `bigint` | - | | `feePayer` | `string` | - | | `instruction` | \{ `channel`: `string`; `deposit`: `bigint`; `gracePeriod`: `number`; `kind`: `"open"`; `openSlot`: `bigint`; `recipient`: `string`; `salt`: `bigint`; `signer`: `string`; \} \| \{ `amount`: `bigint`; `channel`: `string`; `kind`: `"top_up"`; \} \| \{ `channel`: `string`; `kind`: `"request_close"`; \} | - | | `memo?` | `string` | The one Memo v3 instruction's text, a well-formed string; absent, the message carries no memo. | | `mint` | `string` | - | | `payer` | `string` | - | | `recentBlockhash` | `string` | - | | `tokenProgram` | `string` | - | | `v1?` | [`SvmV1Header`](https://lcp.integraledger.com/reference/api/svm.md#svmv1header) | Present, a version-1 message (SIMD-0385) whose header carries the compute budget in this form; absent, v0. | *** ### ChannelIx #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `channel` | `string` | - | | `data` | `Uint8Array`\<`ArrayBuffer`\> | A copy of the instruction's data. | | `kind` | `"open"` \| `"top_up"` \| `"request_close"` | - | *** ### SvmBuildInput #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `amount` | `bigint` | - | | `computeUnitLimit` | `number` | - | | `computeUnitPrice` | `bigint` | - | | `decimals` | `number` | - | | `feePayer` | `string` | - | | `memo` | `string` | - | | `mint` | `string` | - | | `payer` | `string` | - | | `payTo` | `string` | - | | `recentBlockhash` | `string` | - | | `tokenProgram` | `string` | - | | `v1?` | [`SvmV1Header`](https://lcp.integraledger.com/reference/api/svm.md#svmv1header) | Present, a version-1 message (SIMD-0385) whose header carries the compute budget in this form; absent, v0. | *** ### SvmCursor The search's handle, which a `pending` answer returns and the next call takes: `before`, the signature below which the buyer's account has range left to read; `head`, the newest signature an earlier pass read, so the next pass reads the head down to it; `met`, the signatures of the transactions carrying H an earlier pass met that the answer rests on, each a transaction that consumed the value or one the payer signed, other than those the caller gave, which the next pass looks up by signature, since the ranges it resumes no longer list them; and `validAt`, the context slot of the first `isBlockhashValid` answer of `true` at `confirmed`, as a decimal string, which bounds the blockhash's own slot from above. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `before?` | `readonly` | `string` | | `head?` | `readonly` | `string` | | `met?` | `readonly` | readonly `string`[] | | `validAt?` | `readonly` | `string` | *** ### SvmInner One instruction of `meta.innerInstructions`: the top-level instruction it ran under (`index`), and its own fields. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accounts` | readonly `number`[] | - | | `data` | `Uint8Array` | - | | `index` | `number` | The index, among the message's top-level instructions, of the instruction it ran under. | | `program` | `number` | Indexes the static keys, then `loaded.writable`, then `loaded.readonly`, as a top-level instruction does. | *** ### SvmInstruction One compiled instruction of an `SvmTx`; `B` is what its data is backed by, as for `SvmTx`. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` | #### Properties | Property | Type | | ------ | ------ | | `accounts` | readonly `number`[] | | `data` | `Uint8Array`\<`B`\> | | `program` | `number` | *** ### SvmLanded A landed transaction as `getTransaction` returns it with encoding `base64` and `maxSupportedTransactionVersion` 1, the highest message version this package decodes. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `err` | `unknown` | - | | `inner` | readonly [`SvmInner`](https://lcp.integraledger.com/reference/api/svm.md#svminner)[] | `meta.innerInstructions`, in the node's order, each with the top-level instruction it ran under. | | `loaded` | `object` | - | | `loaded.readonly` | readonly `Uint8Array`\<`ArrayBufferLike`\>[] | - | | `loaded.writable` | readonly `Uint8Array`\<`ArrayBufferLike`\>[] | - | | `post?` | readonly [`SvmTokenBalance`](https://lcp.integraledger.com/reference/api/svm.md#svmtokenbalance)[] | `meta.postTokenBalances`; absent read as none. | | `pre?` | readonly [`SvmTokenBalance`](https://lcp.integraledger.com/reference/api/svm.md#svmtokenbalance)[] | `meta.preTokenBalances`; absent read as none. | | `slot?` | `bigint` | The slot of the block that holds it, as `getTransaction` gives it; absent where the endpoint gives none. | | `wire` | `Uint8Array` | - | *** ### SvmNonce The durable nonce a message uses: the nonce account its `AdvanceNonceAccount` instruction names, and the nonce value the message carries in its blockhash field. #### Properties | Property | Type | | ------ | ------ | | `account` | `string` | | `value` | `string` | *** ### SvmReader Bounded, read-only calls against one network's endpoint. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`, and no function in this package reads a rejection as finding nothing: a rejected call is `unreadable`, `transport` (`too-large` or `unparseable` for a `ReaderError` of kind `too-large` or `malformed`). #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `solana:${string}` `` | #### Methods ##### account() > **account**(`address`, `commitment`): `Promise`\<\{ `slot`: `bigint`; `value`: \{ `data`: `Uint8Array`; `owner`: `string`; \} \| `null`; \}\> `getAccountInfo` at that commitment with encoding `base64`: the response's context slot, and the account's owner and data, or null when no account exists at that address. ###### Parameters | Parameter | Type | | ------ | ------ | | `address` | `string` | | `commitment` | [`SvmCommitment`](https://lcp.integraledger.com/reference/api/svm.md#svmcommitment) | ###### Returns `Promise`\<\{ `slot`: `bigint`; `value`: \{ `data`: `Uint8Array`; `owner`: `string`; \} \| `null`; \}\> ##### blockhashValid() > **blockhashValid**(`blockhash`, `commitment`): `Promise`\<\{ `slot`: `bigint`; `valid`: `boolean`; \}\> `isBlockhashValid` at that commitment: `valid` is the response's `value`, and `slot` its context slot, the slot the node evaluated it at. ###### Parameters | Parameter | Type | | ------ | ------ | | `blockhash` | `string` | | `commitment` | [`SvmCommitment`](https://lcp.integraledger.com/reference/api/svm.md#svmcommitment) | ###### Returns `Promise`\<\{ `slot`: `bigint`; `valid`: `boolean`; \}\> ##### firstAvailableBlock() > **firstAvailableBlock**(): `Promise`\<`bigint`\> `getFirstAvailableBlock`: the lowest slot whose block the node still holds. ###### Returns `Promise`\<`bigint`\> ##### signatures() > **signatures**(`address`, `page`): `Promise`\ `getSignaturesForAddress` at that commitment, newest first, `before` and `until` as the RPC takes them (each exclusive), and `minContextSlot`, "the minimum slot that the request can be evaluated at", so a node that has not reached it fails the call. ###### Parameters | Parameter | Type | | ------ | ------ | | `address` | `string` | | `page` | \{ `before?`: `string`; `commitment`: [`SvmCommitment`](https://lcp.integraledger.com/reference/api/svm.md#svmcommitment); `limit`: `1000`; `minContextSlot?`: `bigint`; `until?`: `string`; \} | | `page.before?` | `string` | | `page.commitment` | [`SvmCommitment`](https://lcp.integraledger.com/reference/api/svm.md#svmcommitment) | | `page.limit` | `1000` | | `page.minContextSlot?` | `bigint` | | `page.until?` | `string` | ###### Returns `Promise`\ ##### slot() > **slot**(`commitment`): `Promise`\<`bigint`\> `getSlot` at that commitment. ###### Parameters | Parameter | Type | | ------ | ------ | | `commitment` | [`SvmCommitment`](https://lcp.integraledger.com/reference/api/svm.md#svmcommitment) | ###### Returns `Promise`\<`bigint`\> ##### transaction() > **transaction**(`signature`, `commitment`): `Promise`\<[`SvmLanded`](https://lcp.integraledger.com/reference/api/svm.md#svmlanded) \| \{ `notFound`: `true`; `slot`: `bigint` \| `null`; \}\> `getTransaction` at that commitment, with encoding `base64` and `maxSupportedTransactionVersion: 1`, or `notFound` with the node's slot there (`getSlot`, read from the same node before the lookup), or null when the reader cannot read it. A reader must ask with 1: a node asked with 0 answers a version-1 transaction with an error (-32015). ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `string` | | `commitment` | [`SvmCommitment`](https://lcp.integraledger.com/reference/api/svm.md#svmcommitment) | ###### Returns `Promise`\<[`SvmLanded`](https://lcp.integraledger.com/reference/api/svm.md#svmlanded) \| \{ `notFound`: `true`; `slot`: `bigint` \| `null`; \}\> *** ### SvmRef The read keys of a presented payment, which `reference` returns: the network; the transaction id once the message is signed in its first slot; the digest of the message the payer signed, the payment presented compared whole, absent where the payment was presented as a transaction alone; the buyer's account, which the search pages and whose signature is the act's; H as the presented payment carries it, which the search looks for; the option's payee, the key of the read's two party tests; the fee payer; and what bounds the message's life: its recent blockhash, or the durable nonce it uses. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `blockhash?` | `string` | The recent blockhash; absent for a durable-nonce message and for a transaction alone. | | `digest?` | `` `0x${string}` `` | - | | `feePayer?` | `string` | - | | `h` | `` `0x${string}` `` | - | | `network` | `` `solana:${string}` `` | - | | `nonce?` | [`SvmNonce`](https://lcp.integraledger.com/reference/api/svm.md#svmnonce) | Present exactly when the message uses a durable nonce. | | `payee` | `string` | - | | `payer` | `string` | - | | `transaction?` | `string` | - | *** ### SvmSignature One entry of `getSignaturesForAddress`. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `memo` | `string` \| `null` | The RPC's rendering of the transaction's memos (`[len] text`, joined by `; `), or null when it has none. | | `signature` | `string` | - | | `slot` | `bigint` | - | *** ### SvmTokenBalance One entry of `meta.preTokenBalances` or `meta.postTokenBalances`. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `account` | `number` | `accountIndex`: the token account, indexing the keys as an instruction does. | | `mint` | `string` | - | | `owner?` | `string` | The token account's owner, which the read requires: a landed transaction whose balances name no owner cannot show whose account a transfer reached, so the search holds it as an item it could not decode, never another account. | *** ### SvmTx A decoded wire transaction. `B` is what its bytes are backed by: `decodeSvmTx` gives `SvmTx`, each byte field in its own fresh `ArrayBuffer`, and a function that reads one takes any backing. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` | #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `blockhash` | `Uint8Array`\<`B`\> | - | | `instructions` | readonly [`SvmInstruction`](https://lcp.integraledger.com/reference/api/svm.md#svminstruction)\<`B`\>[] | - | | `keys` | readonly `Uint8Array`\<`B`\>[] | The static account keys, in order. | | `message` | `Uint8Array`\<`B`\> | Exactly the bytes every signer signed. | | `signatures` | readonly `Uint8Array`\<`B`\>[] | - | *** ### SvmV1Header The form of a version-1 message's header, which carries the compute budget in place of Compute Budget instructions: the compute unit limit, the priority fee in lamports for the limit at the budget's price per unit, rounded up, and the loaded-account-data limit. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `loadedAccountsDataSizeLimit` | `number` | The loaded-account-data limit the header carries, in bytes. | | `zeroPriorityFee` | `boolean` | Whether the header carries a priority fee of 0 lamports; otherwise a fee of 0 is left out. | ## Type Aliases ### ChannelStatus > **ChannelStatus** = [`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus) A channel opening's read: the answer `svmStatus` gives. *** ### SolanaNetwork > **SolanaNetwork** = `` `solana:${string}` `` CAIP-2: `solana:` and 32 base58 characters. *** ### SvmCloseRef > **SvmCloseRef** = `object` #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `channel` | `string` | - | | `network` | [`SolanaNetwork`](https://lcp.integraledger.com/reference/api/svm.md#solananetwork) | - | | `payee` | `string` | The option's payee. | | `phase` | `"close"` | - | | `program` | `string` | - | | `transaction` | `string` | - | *** ### SvmCloseStatus > **SvmCloseStatus** = [`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus) A reported close's read, as the profile `read-status` answers it: the answer `SvmStatus` names. *** ### SvmCommitment > **SvmCommitment** = `"confirmed"` \| `"finalized"` A commitment an RPC call names: `finalized`, the mark, or `confirmed`, a block a supermajority of the cluster voted on, which is the latest head the search for H and the lookups read on to before a `failed`, and no mark. *** ### SvmMark > **SvmMark** = `"finalized"` The one Solana mark: `finalized`, a block at maximum lockout, the default and the final mark. A seller names it alone, and a caller asks for it alone. *** ### SvmQuery > **SvmQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref), `bigint`, [`SvmMark`](https://lcp.integraledger.com/reference/api/svm.md#svmmark), [`SvmCursor`](https://lcp.integraledger.com/reference/api/svm.md#svmcursor)\> What a Solana status read takes with the reference and the reader. *** ### SvmStatus > **SvmStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`SvmMark`](https://lcp.integraledger.com/reference/api/svm.md#svmmark), [`SvmCursor`](https://lcp.integraledger.com/reference/api/svm.md#svmcursor)\> A Solana settlement read, as the profile `read-status` answers it, the position a slot and the one mark `finalized`. A `settled` answer states `presented`: `yes` where the landed message is the one the reference holds, by its digest, or, for a payment presented as a transaction alone, where the act is that transaction; `no` otherwise; never `unshown`, since the read decodes every message it settles on. A `pending` or `failed` answer that names a transaction met only above the final head names no finality. ## Variables ### ATA\_PROGRAM > `const` **ATA\_PROGRAM**: `"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"` = `"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"` The Associated Token Account program id. *** ### COMPUTE\_BUDGET > `const` **COMPUTE\_BUDGET**: `"ComputeBudget111111111111111111111111111111"` = `"ComputeBudget111111111111111111111111111111"` The Compute Budget program id. *** ### MEMO\_V3 > `const` **MEMO\_V3**: `"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"` = `"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"` An SPL Memo program id: a top-level instruction to it is a Memo instruction. *** ### MEMO\_V4 > `const` **MEMO\_V4**: `"Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH"` = `"Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH"` An SPL Memo program id: a top-level instruction to it is a Memo instruction. *** ### OPEN\_DISCRIMINATOR > `const` **OPEN\_DISCRIMINATOR**: `1` = `1` *** ### PAYMENT\_CHANNELS > `const` **PAYMENT\_CHANNELS**: `"CHNLxYvVA28MJP9PrFuDXccuoGXAx7jBacfLEkahyGsX"` = `"CHNLxYvVA28MJP9PrFuDXccuoGXAx7jBacfLEkahyGsX"` The payment-channels program id. *** ### RENT\_SYSVAR > `const` **RENT\_SYSVAR**: `"SysvarRent111111111111111111111111111111111"` = `"SysvarRent111111111111111111111111111111111"` The Rent sysvar id. *** ### SEAL\_DISCRIMINATOR > `const` **SEAL\_DISCRIMINATOR**: `6` = `6` *** ### SETTLE\_AND\_SEAL\_DISCRIMINATOR > `const` **SETTLE\_AND\_SEAL\_DISCRIMINATOR**: `4` = `4` *** ### SVM\_MAX\_CANDIDATES > `const` **SVM\_MAX\_CANDIDATES**: `50` = `50` The most candidates one pass of the search reads: lcp's own bound, since each candidate costs up to two `getTransaction` calls, so one pass makes at most 100 lookups beside its 10 pages. A pass that meets more is not read whole, and the next call resumes it. *** ### SVM\_SEARCH\_SHOWN > `const` **SVM\_SEARCH\_SHOWN**: `false` = `false` Whether a run has shown the fact the search's completeness rests on: that every transaction the buyer signs is listed under its account's signatures (`getSignaturesForAddress`), which no run has shown yet. Until a run shows it, a search read whole proves no absence (read-status rule 25): the read answers no `failed` but `before-position`, and where it would answer `failed` it answers `pending`, `search-incomplete`. A later release sets it from that run. *** ### SYSTEM > `const` **SYSTEM**: `"11111111111111111111111111111111"` = `"11111111111111111111111111111111"` The System program id. *** ### TOKEN > `const` **TOKEN**: `"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"` = `"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"` The SPL Token program id. *** ### TOKEN\_2022 > `const` **TOKEN\_2022**: `"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"` = `"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"` The SPL Token-2022 program id. ## Functions ### buildChannelMessage() > **buildChannelMessage**(`i`): `Promise`\<`Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> The message for a channel instruction: `SetComputeUnitLimit`, `SetComputeUnitPrice`, the payment-channels instruction with its accounts in the program's order, then one v3 Memo instruction when `memo` is given, as a v0 message; with `v1`, the same without the two Compute Budget instructions, as a version-1 message whose header carries the budget (`compileV1`). The fee payer is also the `open`'s rent payer and payee. A memo that is not a well-formed string (one holding a lone surrogate has no UTF-8 form) is `svm/input-malformed`, with nothing built. #### Parameters | Parameter | Type | | ------ | ------ | | `i` | [`ChannelBuildInput`](https://lcp.integraledger.com/reference/api/svm.md#channelbuildinput) | #### Returns `Promise`\<`Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> *** ### buildSvmMessage() > **buildSvmMessage**(`i`): `Promise`\<`Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> The versioned message bytes for a token payment: `SetComputeUnitLimit`, `SetComputeUnitPrice`, `TransferChecked` from the payer's associated token account to the payee's, then one v3 Memo instruction whose data is the memo's UTF-8 bytes, as a v0 message; with `v1`, the same without the two Compute Budget instructions, as a version-1 message whose header carries the budget (`compileV1`). No lookup tables. A memo that is not a well-formed string (one holding a lone surrogate has no UTF-8 form) is `svm/input-malformed`, with nothing built. #### Parameters | Parameter | Type | | ------ | ------ | | `i` | [`SvmBuildInput`](https://lcp.integraledger.com/reference/api/svm.md#svmbuildinput) | #### Returns `Promise`\<`Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> *** ### channelInstruction() > **channelInstruction**(`tx`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelIx`](https://lcp.integraledger.com/reference/api/svm.md#channelix) The transaction's one top-level payment-channels instruction, by its discriminator. A `tx` that is not a decoded transaction is `svm/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | [`SvmTx`](https://lcp.integraledger.com/reference/api/svm.md#svmtx) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChannelIx`](https://lcp.integraledger.com/reference/api/svm.md#channelix) *** ### channelPda() > **channelPda**(`a`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The channel PDA: seeds "channel", payer, payee, mint, signer, u64le(salt), u64le(openSlot). #### Parameters | Parameter | Type | | ------ | ------ | | `a` | \{ `mint`: `string`; `openSlot`: `bigint`; `payee`: `string`; `payer`: `string`; `salt`: `bigint`; `signer`: `string`; \} | | `a.mint` | `string` | | `a.openSlot` | `bigint` | | `a.payee` | `string` | | `a.payer` | `string` | | `a.salt` | `bigint` | | `a.signer` | `string` | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### channelVoucherMessage() > **channelVoucherMessage**(`channelId`, `cumulative`, `expiresAt`): `Uint8Array`\<`ArrayBuffer`\> The 50 bytes a channel voucher signs: `56 01` ‖ channelId ‖ cumulative u64 LE ‖ expiresAt i64 LE. Throws TypeError when the channel id is not a base58 key or a number is out of range. #### Parameters | Parameter | Type | | ------ | ------ | | `channelId` | `string` | | `cumulative` | `bigint` | | `expiresAt` | `bigint` | #### Returns `Uint8Array`\<`ArrayBuffer`\> *** ### decodeSvmTx() > **decodeSvmTx**(`wire`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmTx`](https://lcp.integraledger.com/reference/api/svm.md#svmtx)\<`ArrayBuffer`\> Decodes a legacy or v0 wire transaction of at most 1,232 bytes, or a v1 wire transaction (SIMD-0385) of at most 4,096 bytes; a longer one is `svm/tx-too-large`. Bytes that are not one well-formed transaction are `svm/tx-malformed`, as is a v0 message with an address table lookup that names no index, which the runtime refuses ("each lookup table must be used to load at least one account"), and a v1 message that SIMD-0385's sanitization refuses (`decodeV1`). Each byte field is a copy, so none shares memory with `wire`. #### Parameters | Parameter | Type | | ------ | ------ | | `wire` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmTx`](https://lcp.integraledger.com/reference/api/svm.md#svmtx)\<`ArrayBuffer`\> *** ### findPda() > **findPda**(`seeds`, `program`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `address`: `string`; `bump`: `number`; \} The program-derived address of `seeds` under `program`: for bumps 255 down to 0, the first SHA-256(seeds ‖ bump ‖ program ‖ "ProgramDerivedAddress") that does not decompress to an Ed25519 point. #### Parameters | Parameter | Type | | ------ | ------ | | `seeds` | readonly `Uint8Array`\<`ArrayBufferLike`\>[] | | `program` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `address`: `string`; `bump`: `number`; \} *** ### isKey() > **isKey**(`s`): `s is string` True when `s` is a Solana public key: a base58 string of 32 to 44 characters that decodes to exactly 32 bytes. An account address, a program id and a recent blockhash all take this form. #### Parameters | Parameter | Type | | ------ | ------ | | `s` | `unknown` | #### Returns `s is string` *** ### openInstructionData() > **openInstructionData**(`a`): `Uint8Array`\<`ArrayBuffer`\> The `open` instruction's data: `01` ‖ salt u64 ‖ deposit u64 ‖ gracePeriod u32 ‖ openSlot u64 ‖ one recipient (`01000000` ‖ recipient ‖ bps 10 000 as u16), little-endian. 67 bytes. Throws TypeError on a value out of range. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | \{ `deposit`: `bigint`; `gracePeriod`: `number`; `openSlot`: `bigint`; `recipient`: `string`; `salt`: `bigint`; \} | | `a.deposit` | `bigint` | | `a.gracePeriod` | `number` | | `a.openSlot` | `bigint` | | `a.recipient` | `string` | | `a.salt` | `bigint` | #### Returns `Uint8Array`\<`ArrayBuffer`\> *** ### openOf() > **openOf**(`tx`, `program`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `salt`: `bigint`; \} The one top-level instruction of `program` whose data starts with `OPEN_DISCRIMINATOR`, with at least 33 bytes of data and 6 accounts: its salt (data bytes 1–8, little-endian) and its channel (account 5). Else `svm/open-not-found`, as is a channel named through an address lookup table: the message holds the table's address and an index, not the account, and this function reads no table. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | [`SvmTx`](https://lcp.integraledger.com/reference/api/svm.md#svmtx) | | `program` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `salt`: `bigint`; \} *** ### sessionProof() > **sessionProof**(`p`): `Uint8Array`\<`ArrayBuffer`\> The UTF-8 of the core's `canonicalJson` of `{channelId, domain: "mpp-session-auth-v1", payer, sessionChallengeId}`. Throws TypeError when `p` is not an object, or when its `channelId`, `payer` or `challengeId` is not a well-formed string (one holding a lone surrogate has no UTF-8 form): it never returns a message the caller did not write. #### Parameters | Parameter | Type | | ------ | ------ | | `p` | \{ `challengeId`: `string`; `channelId`: `string`; `payer`: `string`; \} | | `p.challengeId` | `string` | | `p.channelId` | `string` | | `p.payer` | `string` | #### Returns `Uint8Array`\<`ArrayBuffer`\> *** ### solanaVoucher() > **solanaVoucher**(`channelId`, `cumulative`, `expiresAt?`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The 50 bytes a voucher signs: `56 01` ‖ channel id ‖ cumulative u64 LE ‖ expiresAt i64 LE (0 when absent). A malformed channel id or an out-of-range number is `svm/input-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `channelId` | `string` | | `cumulative` | `bigint` | | `expiresAt?` | `bigint` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### svmCarrier() > **svmCarrier**(`tx`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `memo`: `string`; \} The one top-level Memo instruction (v3 or v4) and the ATR hash its UTF-8 data carries in LCP string form. None, or more than one, is `svm/memo-count`. The memo must be `toLcpString(h)` exactly, in lowercase hex; the same hash in any other spelling is `svm/carrier-not-canonical`. A `tx` that is not a decoded transaction is `svm/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | [`SvmTx`](https://lcp.integraledger.com/reference/api/svm.md#svmtx) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `memo`: `string`; \} *** ### svmChannelStatus() > **svmChannelStatus**(`ref`, `reader`, `query`): `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\> The read of a channel opening that carries H (`x402/upto/solana`, `x402/batch-settlement/solana`, `mpp/session/solana/memo`). #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref) | | `reader` | [`SvmReader`](https://lcp.integraledger.com/reference/api/svm.md#svmreader) | | `query` | [`SvmQuery`](https://lcp.integraledger.com/reference/api/svm.md#svmquery) | #### Returns `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\> *** ### svmDigest() > **svmDigest**(`tx`): `Promise`\<`` `0x${string}` ``\> SHA-256 over the message bytes every signer signed. Rejects with a TypeError when `tx` is not an object whose `message` is a `Uint8Array`. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | [`SvmTx`](https://lcp.integraledger.com/reference/api/svm.md#svmtx) | #### Returns `Promise`\<`` `0x${string}` ``\> *** ### svmOpeningStatus() > **svmOpeningStatus**(`ref`, `reader`, `query`): `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\> The read of a named channel opening at coverage `none` (`mpp/session/solana/stock`): the opening the reference names is the act, whether or not it carries H, and the read makes no search. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref) | | `reader` | [`SvmReader`](https://lcp.integraledger.com/reference/api/svm.md#svmreader) | | `query` | [`SvmQuery`](https://lcp.integraledger.com/reference/api/svm.md#svmquery) | #### Returns `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\> *** ### svmRecover() > **svmRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Zero-party recovery: the ATR hash in the landed transaction's one memo, read by `tx`, the transaction's signature, at `finalized`; `option`, the x402 option or MPP challenge the ATR's binding slot holds, must be an object, and no member of it is read. A transaction that landed with an error at `finalized` is `svm/err`; one the read at `confirmed` alone holds, with an error or none, is `svm/not-final`, a read to repeat, since a block not yet finalized can be replaced. A landed wire that does not decode is `svm/unreadable`. An input or option that is not an object, and a `tx` that is not a signature, are `svm/wrong-reader`, with nothing read. One or two calls. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `solana:${string}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`SvmReader`](https://lcp.integraledger.com/reference/api/svm.md#svmreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### svmStatus() > **svmStatus**(`ref`, `reader`, `query`): `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\> The read of a transfer pairing (`x402/exact/solana`, the three MPP charges, `mpp/subscription/solana`). #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref) | | `reader` | [`SvmReader`](https://lcp.integraledger.com/reference/api/svm.md#svmreader) | | `query` | [`SvmQuery`](https://lcp.integraledger.com/reference/api/svm.md#svmquery) | #### Returns `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\> --- # @integraledger/lcp/tempo > Tempo rail pieces: the `0x76` transaction's calls, the TIP-20 `transferWithMemo` calldata, the TIP-20 channel reserve's descriptor and ids, and the account keychain's key authorizations. Source: https://lcp.integraledger.com/reference/api/tempo Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Tempo rail pieces: the `0x76` transaction's calls, the TIP-20 `transferWithMemo` calldata, the TIP-20 channel reserve's descriptor and ids, and the account keychain's key authorizations. Tempo serves eip155 JSON-RPC, so the reader is `EvmReader`. Nothing here throws on a caller's value; refusals are values. ## Interfaces ### KeyAuthorizationUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | `digest` is keccak256(rlp(authorization)); the root key signs it. | | `request.authorization` | [`TempoKeyAuthorization`](https://lcp.integraledger.com/reference/api/tempo.md#tempokeyauthorization) | - | | `request.digest` | `` `0x${string}` `` | - | | `request.kind` | `"tempo-key-authorization"` | - | #### Methods ##### complete() > **complete**(`rootSignature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) The credential for the root key's signature over `digest`, checked in `bound`'s order: a credential over the credential size bound, 64 KiB, its echoed challenge included, is `mpp/credential-malformed`, then a signed key authorization over 8,192 bytes is `tempo/key-authorization-malformed`, as `bound` refuses each. ###### Parameters | Parameter | Type | | ------ | ------ | | `rootSignature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp.md#mppcredential) *** ### TempoCall #### Properties | Property | Type | | ------ | ------ | | `input` | `Uint8Array`\<`ArrayBuffer`\> | | `to` | `` `0x${string}` `` \| `null` | | `value` | `bigint` | *** ### TempoDescriptor #### Properties | Property | Type | | ------ | ------ | | `authorizedSigner` | `` `0x${string}` `` | | `expiringNonceHash` | `` `0x${string}` `` | | `operator` | `` `0x${string}` `` | | `payee` | `` `0x${string}` `` | | `payer` | `` `0x${string}` `` | | `salt` | `` `0x${string}` `` | | `token` | `` `0x${string}` `` | *** ### TempoKeyAuthorization #### Properties | Property | Type | | ------ | ------ | | `allowedCalls` | `object`[] | | `chainId` | `bigint` | | `expiry` | `bigint` | | `keyId` | `` `0x${string}` `` | | `keyType` | `0` \| `1` \| `2` | | `limits` | `object`[] | | `witness` | `` `0x${string}` `` | *** ### TempoSearchReader A reader of a Tempo network: an `EvmSearchReader` that also reads a storage slot, an account's protocol nonce and the transactions of a block, each in the state after the block named. Every failure rejects. #### Extends - [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader) #### Properties | Property | Modifier | Type | Inherited from | | ------ | ------ | ------ | ------ | | `network` | `readonly` | `` `eip155:${string}` `` \| [`HederaNetwork`](https://lcp.integraledger.com/reference/api/evm.md#hederanetwork) | [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`network`](https://lcp.integraledger.com/reference/api/mpp.md#property-network-1) | #### Methods ##### block() > **block**(`at`): `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; \}\> `eth_getBlockByNumber(at, false)`: the block's number and its timestamp, in seconds. ###### Parameters | Parameter | Type | | ------ | ------ | | `at` | `bigint` \| `"safe"` \| `"finalized"` \| `"latest"` | ###### Returns `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; \}\> ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`block`](https://lcp.integraledger.com/reference/api/mpp.md#block) ##### blockNumber() > **blockNumber**(`tag`): `Promise`\<`bigint`\> `eth_getBlockByNumber(tag, false).number`. ###### Parameters | Parameter | Type | | ------ | ------ | | `tag` | `"safe"` \| `"finalized"` | ###### Returns `Promise`\<`bigint`\> ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`blockNumber`](https://lcp.integraledger.com/reference/api/mpp.md#blocknumber) ##### blockTransactions() > **blockTransactions**(`block`): `Promise`\ `eth_getBlockByNumber(block, false)`'s `transactions`: the hashes of the block's transactions, in its order. ###### Parameters | Parameter | Type | | ------ | ------ | | `block` | `bigint` | ###### Returns `Promise`\ ##### call() > **call**(`to`, `data`, `block`): `Promise`\<`` `0x${string}` ``\> `eth_call` of `data` to the contract `to`, in the state after block `block`: the return data. ###### Parameters | Parameter | Type | | ------ | ------ | | `to` | `` `0x${string}` `` | | `data` | `` `0x${string}` `` | | `block` | `bigint` | ###### Returns `Promise`\<`` `0x${string}` ``\> ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`call`](https://lcp.integraledger.com/reference/api/mpp.md#call) ##### logs() > **logs**(`filter`): `Promise`\ `eth_getLogs` over `[fromBlock, toBlock]`: `address` absent reads every contract, and each topic is matched by its position, `null` matching any. ###### Parameters | Parameter | Type | | ------ | ------ | | `filter` | \{ `address?`: `` `0x${string}` ``; `fromBlock`: `bigint`; `toBlock`: `bigint`; `topics`: readonly (`` `0x${string}` `` \| `null`)[]; \} | | `filter.address?` | `` `0x${string}` `` | | `filter.fromBlock` | `bigint` | | `filter.toBlock` | `bigint` | | `filter.topics` | readonly (`` `0x${string}` `` \| `null`)[] | ###### Returns `Promise`\ ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`logs`](https://lcp.integraledger.com/reference/api/mpp.md#logs) ##### nonceAt() > **nonceAt**(`account`, `block`): `Promise`\<`bigint`\> `eth_getTransactionCount(account, block)`. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `` `0x${string}` `` | | `block` | `bigint` | ###### Returns `Promise`\<`bigint`\> ##### raw() > **raw**(`tx`): `Promise`\<`` `0x${string}` `` \| `null`\> `eth_getRawTransactionByHash`: the signed transaction's bytes; null when the node holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<`` `0x${string}` `` \| `null`\> ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`raw`](https://lcp.integraledger.com/reference/api/mpp.md#raw) ##### receipt() > **receipt**(`tx`): `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> `eth_getTransactionReceipt`; null when the node holds none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm.md#evmreceipt) \| `null`\> ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`receipt`](https://lcp.integraledger.com/reference/api/mpp.md#receipt) ##### storageAt() > **storageAt**(`address`, `slot`, `block`): `Promise`\<`` `0x${string}` ``\> `eth_getStorageAt(address, slot, block)`: the 32-byte word. ###### Parameters | Parameter | Type | | ------ | ------ | | `address` | `` `0x${string}` `` | | `slot` | `` `0x${string}` `` | | `block` | `bigint` | ###### Returns `Promise`\<`` `0x${string}` ``\> ##### transaction() > **transaction**(`tx`): `Promise`\<[`EvmTransaction`](https://lcp.integraledger.com/reference/api/evm.md#evmtransaction) \| `null`\> `eth_getTransactionByHash`: the sender, the recipient (null for a contract creation) and the calldata; null when none. ###### Parameters | Parameter | Type | | ------ | ------ | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmTransaction`](https://lcp.integraledger.com/reference/api/evm.md#evmtransaction) \| `null`\> ###### Inherited from [`EvmSearchReader`](https://lcp.integraledger.com/reference/api/mpp.md#evmsearchreader).[`transaction`](https://lcp.integraledger.com/reference/api/mpp.md#transaction) ## Variables ### ACCESS\_KEY\_SPEND\_TOPIC > `const` **ACCESS\_KEY\_SPEND\_TOPIC**: `"0xe0815e3aaadddf4dd75bde97fc060f0c38afe18e87a169be86a3f5c28247f192"` AccessKeySpend(address,address,address,uint256,uint256): the account, the key id and the token are topics 1 to 3; the keychain emits it for each spend an access key with enforced limits makes against its limit. *** ### ACCOUNT\_KEYCHAIN > `const` **ACCOUNT\_KEYCHAIN**: `"0xaaaaaaaa00000000000000000000000000000000"` The account keychain precompile. *** ### CHANNEL\_CLOSED\_V1\_TOPIC > `const` **CHANNEL\_CLOSED\_V1\_TOPIC**: `"0x92ed5fe0fe56b3f4185e688efb342e92a4492b9df29ad5de596c44e64d097b51"` ChannelClosed(bytes32,address,address,uint256,uint256), the v1 escrow's event. *** ### CHANNEL\_CLOSED\_V2\_TOPIC > `const` **CHANNEL\_CLOSED\_V2\_TOPIC**: `"0x5613aed96d5bf39f928408dbe1d4143490b9bb5957eac2dd8e69b5dc4b2206e6"` ChannelClosed(bytes32,address,address,uint96,uint96) *** ### CHANNEL\_OPENED\_V1\_TOPIC > `const` **CHANNEL\_OPENED\_V1\_TOPIC**: `"0xcd6e60364f8ee4c2b0d62afc07a1fb04fd267ce94693f93f8f85daaa099b5c94"` ChannelOpened(bytes32,address,address,address,address,bytes32,uint256), the v1 escrow's event as it is deployed and as `mppx`'s legacy escrow ABI has it (0.15.0 `dist/tempo/legacy/session/escrow.abi.js:517-561`): the channel id, the payer and the payee indexed; the token, the authorized signer, the salt and the deposit, data words 0 to 3. *** ### CHANNEL\_OPENED\_V2\_TOPIC > `const` **CHANNEL\_OPENED\_V2\_TOPIC**: `"0xdebaba36f0e9c7978f536fed432d9360b1f9646d7ca88531c34c3eae43f154a7"` ChannelOpened(bytes32,address,address,address,address,address,bytes32,bytes32,uint96) *** ### KEY\_AUTHORIZATION\_WITNESS\_TOPIC > `const` **KEY\_AUTHORIZATION\_WITNESS\_TOPIC**: `"0x1f09d8956d18ea185372a3f7f40aca24bb45f303920c37c5f0605f4871da41f6"` KeyAuthorizationWitness(address,bytes32) *** ### KEY\_REVOKED\_TOPIC > `const` **KEY\_REVOKED\_TOPIC**: `"0x14ce4f0c8c12936436b733974fb13d10fc13e8c41c06dc8e19d82001c93d7989"` KeyRevoked(address,address) *** ### OPEN\_V1\_SELECTOR > `const` **OPEN\_V1\_SELECTOR**: `"0xc79ea485"` open(address,address,uint128,bytes32,address) *** ### OPEN\_V2\_SELECTOR > `const` **OPEN\_V2\_SELECTOR**: `"0xedc53b00"` open(address,address,address,uint96,bytes32,address) *** ### RECEIVE\_POLICY\_GUARD > `const` **RECEIVE\_POLICY\_GUARD**: `"0xb10c000000000000000000000000000000000000"` Where a Tempo receive policy sends a blocked transfer. *** ### TIP20\_CHANNEL\_RESERVE > `const` **TIP20\_CHANNEL\_RESERVE**: `"0x4d50500000000000000000000000000000000000"` The TIP-20 channel reserve precompile. *** ### TRANSFER\_WITH\_MEMO\_SELECTOR > `const` **TRANSFER\_WITH\_MEMO\_SELECTOR**: `"0x95777d59"` The first four bytes of keccak256("transferWithMemo(address,uint256,bytes32)"). *** ### TRANSFER\_WITH\_MEMO\_TOPIC > `const` **TRANSFER\_WITH\_MEMO\_TOPIC**: `"0x57bc7354aa85aed339e000bccffabbc529466af35f0772c8f8ee1145927de7f0"` keccak256("TransferWithMemo(address,address,uint256,bytes32)") ## Functions ### decodeKeyAuthorization() > **decodeKeyAuthorization**(`signed`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `allowedCalls`: `object`[]; `digest`: `` `0x${string}` ``; `keyId`: `` `0x${string}` ``; `limits`: `object`[]; `witness?`: `` `0x${string}` ``; \} Reads a signed key authorization: an RLP list of the authorization (3 to 9 items) and a byte-string signature. The digest is keccak256 over the authorization's bytes as received. The witness is item 6, 32 bytes, when present. The scope the payer signed is item 4, the limits (each a 20-byte token, a limit and, when non-zero, a period; an absent period is 0), and item 5, the allowed calls (each a 20-byte target and its selector rules, each a 4-byte selector and 20-byte recipients). An absent item and an empty list both read as an empty list, though Tempo gives them opposite meanings (absent: no limit or no call restriction; empty: no spending or no calls). #### Parameters | Parameter | Type | | ------ | ------ | | `signed` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `allowedCalls`: `object`[]; `digest`: `` `0x${string}` ``; `keyId`: `` `0x${string}` ``; `limits`: `object`[]; `witness?`: `` `0x${string}` ``; \} *** ### decodeTempoTx() > **decodeTempoTx**(`wire`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `calls`: [`TempoCall`](https://lcp.integraledger.com/reference/api/tempo.md#tempocall)[]; `chainId`: `bigint`; `validBefore`: `bigint` \| `null`; \} The chain id, the calls and `valid_before` of a signed `0x76` transaction. Each call is `rlp([to, value, input])`, with an empty `to` read as null and `input` a copy of `wire`'s bytes. `valid_before` written empty is null. #### Parameters | Parameter | Type | | ------ | ------ | | `wire` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `calls`: [`TempoCall`](https://lcp.integraledger.com/reference/api/tempo.md#tempocall)[]; `chainId`: `bigint`; `validBefore`: `bigint` \| `null`; \} *** ### encodeKeyAuthorization() > **encodeKeyAuthorization**(`a`, `signature?`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) rlp([chain_id, key_type, key_id, expiry, limits, allowed_calls, witness]); with a signature, rlp([that list, signature]). At most 16 limits and 16 scopes, 16 selector rules each and 16 recipients each. Every item is written, the empty ones included: an `expiry` of 0 as `0x80`, which Tempo reads as no expiry, and an empty `limits` or `allowedCalls` as an empty list, which Tempo reads as no spending or no calls, never as the absent item. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | [`TempoKeyAuthorization`](https://lcp.integraledger.com/reference/api/tempo.md#tempokeyauthorization) | | `signature?` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### expiringNonceHash() > **expiringNonceHash**(`signedTx`, `sender`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` keccak256(`0x76` ‖ rlp(every envelope field before the sender's signature) ‖ sender). When a fee payer has signed, `fee_token` is written as `0x80` and the fee payer's signature as `0x00`, as the sender signed them. #### Parameters | Parameter | Type | | ------ | ------ | | `signedTx` | `Uint8Array` | | `sender` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### keyAuthorizationDigest() > **keyAuthorizationDigest**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The digest a key authorization's root key signs: keccak256 of `encodeKeyAuthorization(a)`, the authorization with no signature, the `digest` of `KeyAuthorizationUnsigned`'s request. An authorization `encodeKeyAuthorization` refuses is refused the same way. #### Parameters | Parameter | Type | | ------ | ------ | | `a` | [`TempoKeyAuthorization`](https://lcp.integraledger.com/reference/api/tempo.md#tempokeyauthorization) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### memoCalldata() > **memoCalldata**(`to`, `amount`, `memo`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` `transferWithMemo(to, amount, memo)` calldata: the selector, then the three 32-byte words. #### Parameters | Parameter | Type | | ------ | ------ | | `to` | `` `0x${string}` `` | | `amount` | `bigint` | | `memo` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### tempoChannelId() > **tempoChannelId**(`d`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The TIP-20 channel reserve's channel id: keccak256(abi.encode(payer, payee, operator, token, salt, authorizedSigner, expiringNonceHash, escrow, chainId)). #### Parameters | Parameter | Type | | ------ | ------ | | `d` | [`TempoDescriptor`](https://lcp.integraledger.com/reference/api/tempo.md#tempodescriptor) & `object` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### witnessRecover() > **witnessRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Reads the transaction's receipt and returns topic 2 of its one `KeyAuthorizationWitness` log from the account keychain: none is `tempo/no-witness`, and more than one `tempo/ambiguous`. A failed read is `tempo/unreadable`, no receipt `tempo/not-found` and a revert `tempo/reverted`, as `readReceiptAtMark` answers. A revert, `tempo/no-witness` and `tempo/ambiguous` are given only where the receipt's block is at or below the reader's `finalized` mark: above it, or where that mark cannot be read, each is `tempo/not-final`, a read to repeat, since a block above the mark can be replaced by one in which the transaction succeeds or holds other logs. The mark is read only for those. The challenge is not read. An input or reader that is not an object, an input whose `tx` is not a 32-byte hash, or a reader for another network than the input names, is `tempo/wrong-reader`, with nothing read. At most two calls. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`string`, [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm.md#evmreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> --- # @integraledger/lcp/tron > Tron: the pairing `x402/exact/tron/lcp-trc20-memo`, whose payer-signed TRC-20 transfer carries the ATR hash as its memo, `raw_data.data`, in LCP string form, and the transaction pieces it uses. Source: https://lcp.integraledger.com/reference/api/tron Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Tron: the pairing `x402/exact/tron/lcp-trc20-memo`, whose payer-signed TRC-20 transfer carries the ATR hash as its memo, `raw_data.data`, in LCP string form, and the transaction pieces it uses. The pieces are protobuf for the fields the profile uses, base58check addresses and the transaction id. Settlement is read by transaction id through a bounded reader. ## Interfaces ### TronBlock A block as `getblockbylimitnext` and `getblockbynum` give it: its `blockID`, the `number` and `parentHash` of its header's `raw_data`, and the `raw_data_hex` of each of its `transactions`, in order (java-tron at `4e8389f1`, `framework/src/main/java/org/tron/core/services/http/Util.java:137-148`, `:295-298`). #### Properties | Property | Type | | ------ | ------ | | `blockId` | `` `0x${string}` `` | | `number` | `bigint` | | `parentHash` | `` `0x${string}` `` | | `transactions` | readonly `string`[] | *** ### TronChoice #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | | `feeLimit` | `bigint` | In sun, from 1 to 15,000,000,000. | | `now` | `bigint` | Milliseconds since the epoch. | | `payer` | `string` | The payer's base58check address. | | `refBlock` | `object` | A recent block from the buyer's FullNode. | | `refBlock.id` | `` `0x${string}` `` | - | | `refBlock.number` | `bigint` | - | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | *** ### TronCursor The search's position: the last block it linked, by its number and `blockID`, at or below the solidified head. A `pending` answer returns it, and the next call takes it as `query.search` and reads on from the block after it. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `blockId` | `readonly` | `` `0x${string}` `` | | `number` | `readonly` | `bigint` | *** ### TronInfo #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `blockNumber` | `bigint` | - | | `logs` | readonly `object`[] | `address` is 20-byte hex as the node returns it; `data`, where given, the log's data in hex. | | `result` | `string` | `receipt.result` as the node returns it: "SUCCESS", "REVERT", … | *** ### TronNow A node's latest block at a level, as its `getnowblock` names it: its number, its `blockID` and its time in ms. #### Properties | Property | Type | | ------ | ------ | | `blockId` | `` `0x${string}` `` | | `number` | `bigint` | | `timestamp` | `bigint` | *** ### TronRaw The `Transaction.raw` fields this profile uses. `B` is what its bytes are backed by: `decodeTronTx` gives `TronRaw`, each byte field in its own fresh `ArrayBuffer`, and `encodeTronRaw` and `tronCarrier` take any backing. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `B` *extends* `ArrayBufferLike` | `ArrayBufferLike` | #### Properties | Property | Type | | ------ | ------ | | `callData` | `Uint8Array`\<`B`\> | | `contractAddress` | `Uint8Array`\<`B`\> | | `data` | `Uint8Array`\<`B`\> | | `expiration` | `bigint` | | `feeLimit` | `bigint` | | `owner` | `Uint8Array`\<`B`\> | | `refBlockBytes` | `Uint8Array`\<`B`\> | | `refBlockHash` | `Uint8Array`\<`B`\> | | `timestamp` | `bigint` | *** ### TronReader Bounded, read-only calls against one network's FullNode: its `/walletsolidity` API for solidified data and its `/wallet` API at the head. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`, and reads as unreadable `transport`; a rejection whose `kind` is `too-large`, as `ReaderError` carries it, is an answer over the reader's byte bound. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `archival?` | `readonly` | `boolean` | Declared by the caller where its node holds the chain's whole history, so that with no position given absence can be read; absent, it is not declared. | | `network` | `readonly` | `` `tron:${number}` `` | - | #### Methods ##### block() > **block**(`num`, `level`): `Promise`\<\{ `block`: [`TronBlock`](https://lcp.integraledger.com/reference/api/tron.md#tronblock) \| `null`; `head`: `bigint` \| `null`; \}\> `getblockbynum` at the level: the block, or null for the node's `{}`; and `head`, as `blocks` gives it. ###### Parameters | Parameter | Type | | ------ | ------ | | `num` | `bigint` | | `level` | [`TronLevel`](https://lcp.integraledger.com/reference/api/tron.md#tronlevel) | ###### Returns `Promise`\<\{ `block`: [`TronBlock`](https://lcp.integraledger.com/reference/api/tron.md#tronblock) \| `null`; `head`: `bigint` \| `null`; \}\> ##### blocks() > **blocks**(`start`, `end`, `level`): `Promise`\<\{ `blocks`: readonly [`TronBlock`](https://lcp.integraledger.com/reference/api/tron.md#tronblock)[]; `head`: `bigint` \| `null`; \}\> `getblockbylimitnext` under `/walletsolidity` ("solid") or `/wallet` ("head"): the blocks from `start` up to `end`, not including it, at most 100, in the order the node gives them, none for its `{}`; and `head`, the number of that node's latest block at that level, read from that same node before the call, or null where the reader cannot. ###### Parameters | Parameter | Type | | ------ | ------ | | `start` | `bigint` | | `end` | `bigint` | | `level` | [`TronLevel`](https://lcp.integraledger.com/reference/api/tron.md#tronlevel) | ###### Returns `Promise`\<\{ `blocks`: readonly [`TronBlock`](https://lcp.integraledger.com/reference/api/tron.md#tronblock)[]; `head`: `bigint` \| `null`; \}\> ##### info() > **info**(`txid`, `level`): `Promise`\<[`TronInfo`](https://lcp.integraledger.com/reference/api/tron.md#troninfo) \| \{ `notFound`: `true`; `timestamp`: `bigint` \| `null`; \}\> `/walletsolidity/gettransactioninfobyid` ("solid") or `/wallet/gettransactioninfobyid` ("head"). When the node does not know the transaction, `notFound` with `timestamp`: the time in milliseconds of the latest block at that level on the node that answered (`/walletsolidity/getnowblock` or `/wallet/getnowblock`), read from that same node before the lookup, or null when the reader cannot read it from that node. A lookup naming no time never reads failed. ###### Parameters | Parameter | Type | | ------ | ------ | | `txid` | `` `0x${string}` `` | | `level` | [`TronLevel`](https://lcp.integraledger.com/reference/api/tron.md#tronlevel) | ###### Returns `Promise`\<[`TronInfo`](https://lcp.integraledger.com/reference/api/tron.md#troninfo) \| \{ `notFound`: `true`; `timestamp`: `bigint` \| `null`; \}\> ##### now() > **now**(`level`): `Promise`\<[`TronNow`](https://lcp.integraledger.com/reference/api/tron.md#tronnow)\> `/walletsolidity/getnowblock` ("solid") or `/wallet/getnowblock` ("head"): the latest block at that level. ###### Parameters | Parameter | Type | | ------ | ------ | | `level` | [`TronLevel`](https://lcp.integraledger.com/reference/api/tron.md#tronlevel) | ###### Returns `Promise`\<[`TronNow`](https://lcp.integraledger.com/reference/api/tron.md#tronnow)\> ##### transaction() > **transaction**(`txid`): `Promise`\<\{ `rawDataHex`: `string`; \} \| `null`\> `/walletsolidity/gettransactionbyid`; null: none. ###### Parameters | Parameter | Type | | ------ | ------ | | `txid` | `` `0x${string}` `` | ###### Returns `Promise`\<\{ `rawDataHex`: `string`; \} \| `null`\> *** ### TronRef The read keys `reference` returns, JSON-serialisable. `raw` is the `raw_data` the owner signed, lowercase hex, which is the payment presented; `txid` its SHA-256, the single-use value; `asset` the contract's 21-byte address; `expiration` decimal milliseconds; `payer` the transaction's owner in base58check, read from the signed bytes; and `payee` the `payTo` of the option the payment answers, the key of the two party tests and no search key. #### Properties | Property | Type | | ------ | ------ | | `asset` | `` `0x${string}` `` | | `expiration` | `string` | | `network` | `` `tron:${number}` `` | | `payee` | `string` | | `payer` | `string` | | `raw` | `string` | | `txid` | `` `0x${string}` `` | *** ### TronUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | What the payer signs. `rawBytes` is the transaction's `raw_data`, `Transaction.raw` as `encodeTronRaw` writes it; `txid` is its SHA-256, the 32-byte transaction id. `tronRequest` reads them. | | `request.kind` | `"tron-txid"` | - | | `request.rawBytes` | `Uint8Array`\<`ArrayBuffer`\> | - | | `request.txid` | `Uint8Array`\<`ArrayBuffer`\> | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TronPayment`](https://lcp.integraledger.com/reference/api.md#tronpayment) Takes the 65-byte secp256k1 signature `r ‖ s ‖ v`, v in {0, 1, 27, 28}. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TronPayment`](https://lcp.integraledger.com/reference/api.md#tronpayment) ## Type Aliases ### TronLevel > **TronLevel** = `"solid"` \| `"head"` The level a read goes through: the full node's `/walletsolidity` API ("solid") or its `/wallet` API ("head"). *** ### TronMark > **TronMark** = `"head"` \| `"solidified"` *** ### TronNetwork > **TronNetwork** = `` `tron:${number}` `` CAIP-2 with the decimal chain id: tron:728126428 mainnet, tron:3448148188 Nile, tron:2494104990 Shasta. *** ### TronQuery > **TronQuery** = [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`TronRef`](https://lcp.integraledger.com/reference/api/tron.md#tronref), `bigint`, [`TronMark`](https://lcp.integraledger.com/reference/api/tron.md#tronmark), [`TronCursor`](https://lcp.integraledger.com/reference/api/tron.md#troncursor)\> The query `tronStatus` takes: the profile `read-status`'s, its search position a `TronCursor`. *** ### TronStatus > **TronStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`TronMark`](https://lcp.integraledger.com/reference/api/tron.md#tronmark), [`TronCursor`](https://lcp.integraledger.com/reference/api/tron.md#troncursor)\> The answer of `tronStatus`, as the profile `read-status` gives it. Its marks are `head` and `solidified`, in that order, its position the block number and its search position a `TronCursor`. A `settled` answer states `presented`: `yes` where the settled transaction's id is the reference's, the id being the SHA-256 of the `raw_data` the owner signed, and `no` otherwise; its `signer` is the transaction's owner in base58check, and its `authority` the contract's `Permission_id`, as `Permission_id 0`, 0 where the transaction names none. ## Variables ### exactTronMemo > `const` **exactTronMemo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TronUnsigned`](https://lcp.integraledger.com/reference/api/tron.md#tronunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/tron/lcp-trc20-memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TronRef`](https://lcp.integraledger.com/reference/api/tron.md#tronref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`TronStatus`](https://lcp.integraledger.com/reference/api/tron.md#tronstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/tron/lcp-trc20-memo`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator broadcasts the TRC-20 transfer the payer signed; `status` reads it by transaction id. *** ### LCP\_TRC20\_MEMO > `const` **LCP\_TRC20\_MEMO**: `"lcp-trc20-memo"` = `"lcp-trc20-memo"` *** ### TRANSFER\_SELECTOR > `const` **TRANSFER\_SELECTOR**: `"a9059cbb"` = `"a9059cbb"` transfer(address,uint256) *** ### TRANSFER\_TOPIC > `const` **TRANSFER\_TOPIC**: `"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"` = `"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"` keccak256("Transfer(address,address,uint256)") *** ### TRIGGER\_SMART\_CONTRACT > `const` **TRIGGER\_SMART\_CONTRACT**: `31` = `31` *** ### TRIGGER\_URL > `const` **TRIGGER\_URL**: `"type.googleapis.com/protocol.TriggerSmartContract"` = `"type.googleapis.com/protocol.TriggerSmartContract"` *** ### TRON\_BOUNDS > `const` **TRON\_BOUNDS**: `Readonly`\<\{ `callData`: `68`; `feeLimit`: `15000000000`; `maxTimeoutSeconds`: `86340`; `rangeBlocks`: `100`; `searchBlocks`: `200`; `signatureBytes`: `65`; `signatures`: `5`; `transactionHex`: `8192`; \}\> The pairing's bounds, each the chain's, the profile's or lcp's own resource bound, with its reason. `transactionHex`: lcp's bound on a signed transaction's hex digits, which the profile's transaction fits many times over and which bounds what is decoded. `signatures`: lcp's bound on the signatures decoded, enough for an owner's permission of five keys. `signatureBytes`: a secp256k1 signature `r ‖ s ‖ v`. `callData`: `transfer(address,uint256)`, its selector and two 32-byte words. `feeLimit`: the network's largest `fee_limit` in sun. `maxTimeoutSeconds`: the profile's, which keeps a signed `expiration` within the node's 24-hour cap. `rangeBlocks`: the node's own bound on a range of `getblockbylimitnext` (java-tron at `4e8389f1`, `GetBlockByLimitNextServlet.java:18`). `searchBlocks`: lcp's resource bound, the blocks one call of `tronStatus` reads of its search, two full ranges, so that each call's reads are bounded; the next call takes the search's position. ## Functions ### decodeTronTx() > **decodeTronTx**(`hex`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `raw`: [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw)\<`ArrayBuffer`\>; `rawBytes`: `Uint8Array`\<`ArrayBuffer`\>; `signatures`: `Uint8Array`\<`ArrayBuffer`\>[]; \} Decodes a signed `Transaction` from lowercase hex: `raw_data` with exactly one `TriggerSmartContract` and only the fields TronRaw names, and 1 to 5 signatures of 65 bytes. The raw bytes must be exactly what `encodeTronRaw` writes for the fields read. #### Parameters | Parameter | Type | | ------ | ------ | | `hex` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `raw`: [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw)\<`ArrayBuffer`\>; `rawBytes`: `Uint8Array`\<`ArrayBuffer`\>; `signatures`: `Uint8Array`\<`ArrayBuffer`\>[]; \} *** ### encodeTronRaw() > **encodeTronRaw**(`r`): `Uint8Array`\<`ArrayBuffer`\> `Transaction.raw` as java-tron serialises it: fields in ascending order, default values omitted. Throws TypeError when `r` is not an object, a bytes field is not a `Uint8Array`, or `expiration`, `timestamp` or `feeLimit` is not a bigint from 0 below 2^63, the values `decodeTronTx` reads back. #### Parameters | Parameter | Type | | ------ | ------ | | `r` | [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw) | #### Returns `Uint8Array`\<`ArrayBuffer`\> *** ### tronAddress() > **tronAddress**(`address`): `Promise`\<`Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> Decodes a base58check address to its 21 bytes, which begin 0x41. The checksum is SHA-256 twice. #### Parameters | Parameter | Type | | ------ | ------ | | `address` | `string` | #### Returns `Promise`\<`Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> *** ### tronCarrier() > **tronCarrier**(`tx`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `txid`: `` `0x${string}` ``; \}\> The hash in the memo of a transaction whose one contract calls `transfer`, and the transaction id. A `tx` that is not `decodeTronTx`'s `{ raw, rawBytes }` is `tron/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `tx` | \{ `raw`: [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw); `rawBytes`: `Uint8Array`; \} | | `tx.raw` | [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw) | | `tx.rawBytes` | `Uint8Array` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `txid`: `` `0x${string}` ``; \}\> *** ### tronRecover() > **tronRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Recovers the hash from the transaction id alone: the memo of the transaction whose raw bytes hash to the id. A ref whose `txid` is not a 32-byte hash is `tron/wrong-reader`, with nothing read. Raw data longer than the size bound `decodeTronTx` reads is `tron/tx-too-large`, the code that function gives such a transaction. Raw data whose SHA-256 is not the id is not the transaction it names, and is `tron/unreadable`, as a failed read is. The input's `tx` is the id, and its `option` the option the payment answers, an object, of which the read needs no member; an input whose `tx` is not a 32-byte hash, or whose option is not an object, is `tron/wrong-reader`, with nothing read. One call. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `tron:${number}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`TronReader`](https://lcp.integraledger.com/reference/api/tron.md#tronreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### tronRequest() > **tronRequest**(`rawBytes`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `amount`: `string`; `asset`: `string`; `h`: `` `0x${string}` ``; `payer`: `string`; `payTo`: `string`; `raw`: [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw)\<`ArrayBuffer`\>; `txid`: `Uint8Array`\<`ArrayBuffer`\>; \}\> Reads the `raw_data` a `tron-txid` request carries, as `decodeTronTx` reads a signed transaction's and `tronCarrier` reads its call and memo, with their codes, and gives `txid`, its SHA-256, which is the request's `txid` when the bytes are its `rawBytes`. `raw` is every field the bytes hold, which are all the fields `decodeTronTx` admits: the reference block's bytes and hash, `expiration` and `timestamp` in milliseconds, the memo `data`, `fee_limit` in sun, and the one contract, a `TriggerSmartContract` with no call value from `owner` to `contractAddress` whose call data is `transfer(address,uint256)`. Read from them: `payer`, the owner, and `asset`, the contract, in base58check; `payTo`, the transfer's recipient, its address word's last 20 bytes under 0x41, in base58check; `amount`, the transfer's value, in decimal; and `h`, the hash the memo carries. Bytes longer than the longest transaction `decodeTronTx` reads, 4,096 bytes, are `tron/tx-too-large`, and a value that is not a `Uint8Array` `tron/tx-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `rawBytes` | `Uint8Array` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `amount`: `string`; `asset`: `string`; `h`: `` `0x${string}` ``; `payer`: `string`; `payTo`: `string`; `raw`: [`TronRaw`](https://lcp.integraledger.com/reference/api/tron.md#tronraw)\<`ArrayBuffer`\>; `txid`: `Uint8Array`\<`ArrayBuffer`\>; \}\> *** ### tronStatus() > **tronStatus**(`ref`, `reader`, `query`): `Promise`\<[`TronStatus`](https://lcp.integraledger.com/reference/api/tron.md#tronstatus)\> Answers the read of the act the query asks about as the profile `read-status` gives it, by the pairing's profile, rule 8. The single-use value is the transaction id, the SHA-256 of the `raw_data` the owner signed, which the reference holds whole as the payment presented. The read takes the latest solidified block first, then the transaction by id at the solidified level and at the head, each lookup naming its own node's latest block time. Found, the transaction consumed the id: it is the payer's act where its owner is the reference's payer and not the option's payee, it succeeded where its receipt's result is `SUCCESS`, and what it moved is each `Transfer` log of its receipt whose sender is the owner, named by the id and the log's place among the receipt's logs, or, where the receipt holds no `Transfer` log and its signed call is a transfer of zero, that call's transfer of zero to its `to`; on the act `payment` it is the payment only where one of those names `payTo`. Its owner is the answer's signer, and its `Permission_id` the answer's authority. Absent from both lookups, each lookup's node at or past the solidified head's time, and the node holding the block at the position the caller gave (or declared archival where it gave none), the id is unconsumed: before the lapse, two slots past `expiration`, `instrument-live`. Only a `failed` answer needs the search for H, which the read makes only then: it reads every block after the position given, or after the search position an earlier answer returned, up to the solidified head read first through `/walletsolidity`, then on to the full node's head under `/wallet`, at most `TRON_BOUNDS.rangeBlocks` a call and `TRON_BOUNDS.searchBlocks` a read, each block linked to the one before it by its `parentHash`. Each transaction whose `data`, field 10 of its `raw_data`, is H's LCP string, its hex digits in either case as `bound` reads it, is read by its id: one of the form whose owner is the payer and that meets the act's tests is the act asked about; any other is named as a foreign item where a reason holds. Until a run shows that a block's answer lists every transaction of its block, a search read whole proves no absence, so no `failed` but `before-position` is answered. A ref, a reader or a query that is not one, a ref whose `raw` does not hash to its `txid`, is not the form's or is not owned by its `payer`, or a search position that is not a `TronCursor`, is unreadable `unparseable`, with nothing read; a reader for another network `chain-mismatch`; a read that rejects `transport`; one block over the reader's byte bound `too-large`; and absence where the node does not hold the history `history-gap`. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`TronRef`](https://lcp.integraledger.com/reference/api/tron.md#tronref) | | `reader` | [`TronReader`](https://lcp.integraledger.com/reference/api/tron.md#tronreader) | | `query` | [`TronQuery`](https://lcp.integraledger.com/reference/api/tron.md#tronquery) | #### Returns `Promise`\<[`TronStatus`](https://lcp.integraledger.com/reference/api/tron.md#tronstatus)\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### TronPayment Re-exports [TronPayment](https://lcp.integraledger.com/reference/api.md#tronpayment) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/tvm > TON: the pairing `x402/exact/tvm`. The ATR hash rides in the scheme's `extra.forwardPayload` as a TEP-74 text comment holding its LCP string. Source: https://lcp.integraledger.com/reference/api/tvm Updated 2026-11-19. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. TON: the pairing `x402/exact/tvm`. The ATR hash rides in the scheme's `extra.forwardPayload` as a TEP-74 text comment holding its LCP string. The payer's W5 wallet signs a request whose one Jetton transfer carries that payload; settlement is read from the W5 wallet's transaction with that request and the Jetton wallets' transactions it led to, through a bounded reader. ## Interfaces ### TonAccountState An account's status and data hash, as TON Center v3 states them before or after a transaction. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `dataHash` | `string` \| `null` | The representation hash of the account's data, in the index's spelling; null where the account holds none. | | `status` | [`TonAccountStatus`](https://lcp.integraledger.com/reference/api/tvm.md#tonaccountstatus) | - | *** ### TonCell A TON cell, as `@ton/core`'s `Cell` gives one: its data bits, its references and its representation hash. The entry point's public types name this shape rather than the optional peer's class, and a `Cell` is one. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `bits` | `readonly` | `object` | | `bits.length` | `readonly` | `number` | | `refs` | `readonly` | readonly [`TonCell`](https://lcp.integraledger.com/reference/api/tvm.md#toncell)[] | #### Methods ##### hash() > **hash**(`level?`): `Uint8Array` ###### Parameters | Parameter | Type | | ------ | ------ | | `level?` | `number` | ###### Returns `Uint8Array` *** ### TonIndexed The index's statement of the masterchain blocks it holds: every block from `first` through `last`, a finalized block. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `first` | `bigint` | - | | `last` | `bigint` | - | | `utime` | `number` | `last`'s `gen_utime`. | *** ### TonLink A transaction of the wallet's list by the two members its successor links it by: its hash and its logical time. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `hash` | `readonly` | `string` | - | | `lt` | `readonly` | `string` | In decimal. | *** ### TonOutMsg A transaction's out message: its hash, its body's opcode (null where it has none), and its body as a BoC. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `body?` | `Uint8Array`\<`ArrayBufferLike`\> \| `null` | The body as a bag of cells (`message_content.body`); absent or null where the index gives none. | | `hash` | `string` | - | | `opcode` | `number` \| `null` | - | *** ### TonTx A transaction as a TON Center v3 endpoint reports it. `inBody` is the inbound message body as a BoC, or null when the transaction has no inbound message body (its `in_msg`, or that message's `message_content.body`, is null). The members after `outMsgs` are the ones the expiry read takes, from `/api/v3/transactions`: a transaction lacking one cannot be placed, linked or classed, and the read holds its search there. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `aborted` | `boolean` | - | | `account` | `string` | - | | `after?` | [`TonAccountState`](https://lcp.integraledger.com/reference/api/tvm.md#tonaccountstate) | The account's state after it: its status TON Center v3's `end_status`, its data hash `account_state_after`'s `data_hash`. | | `before?` | [`TonAccountState`](https://lcp.integraledger.com/reference/api/tvm.md#tonaccountstate) | The account's state before it: its status TON Center v3's `orig_status`, its data hash `account_state_before`'s `data_hash`. A transaction whose account did not exist before it, the account's deploy, carries it with the status `nonexist`, its `orig_status`, though `account_state_before` then states no `account_status`; so given, the expiry read does not hold its search there. | | `finality` | `0` \| `1` \| `2` | TON Center v3's `FinalityState`: 0 pending, 1 confirmed, 2 finalized. | | `hash` | `string` | - | | `inBody` | `Uint8Array`\<`ArrayBufferLike`\> \| `null` | - | | `inSource?` | `string` \| `null` | The inbound message's source, raw (`in_msg.source`); null for an external message. | | `lt?` | `string` | Its logical time, in decimal (`lt`). | | `mcSeqno?` | `bigint` \| `null` | The masterchain block that holds it (`mc_block_seqno`); null while none does. | | `outMsgs` | readonly [`TonOutMsg`](https://lcp.integraledger.com/reference/api/tvm.md#tonoutmsg)[] | - | | `prev?` | \{ `hash`: `string`; `lt`: `string`; \} \| `null` | Its predecessor on the account (`prev_trans_hash`, `prev_trans_lt`); null for the account's first. | *** ### TonWalletState A wallet's state as the index holds it (`walletStates`): status, code hash, sequence number, last transaction. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `codeHash` | `` `0x${string}` `` \| `null` | The representation hash of the account's code, `0x` and 64 hex digits; null where it holds none. | | `last` | \{ `hash`: `string`; `lt`: `string`; \} \| `null` | The account's last transaction; null where it has none. | | `seqno` | `number` \| `null` | The wallet's sequence number; null where the account holds no data. | | `status` | [`TonAccountStatus`](https://lcp.integraledger.com/reference/api/tvm.md#tonaccountstatus) | - | *** ### TvmChoice #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | | `attachNanotons` | `bigint` | The value attached to the outgoing message, above `forwardTonAmount`. | | `jettonWallet` | `string` | The payer's Jetton wallet for `asset`, raw (`get_wallet_address` on the master), on a workchain as `wallet` is. | | `now` | `number` | Seconds since the epoch. | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | | `seqno` | `number` | - | | `stateInit?` | `string` \| [`TonCell`](https://lcp.integraledger.com/reference/api/tvm.md#toncell) | The wallet's state init, for a wallet not yet deployed: a cell, or a base64 BoC of one root cell. It must be exactly one `StateInit`, as TON reads a message's state init: no bit or reference after its fields, at most 1,024 cells read, and at most two Merkle proofs or updates nested in it. It must be one TON deploys a wallet from at the configuration of the option's network: no libraries dictionary (global version 15), a fixed prefix length of at most ConfigParam 43's `max_acc_fixed_prefix_length`, 8 (global version 10), and a representation hash that is `wallet`'s 256-bit address, except the first fixed-prefix-length bits, which may differ, since TON deploys an account only from a state init whose hash is its address (`check_in_msg_state_hash`). Else `x402/option-malformed`. The settlement message carries it as its `init` exactly as given. | | `wallet` | `string` | The payer's W5 wallet, raw, on a workchain TON's configuration holds (-1 or 0; else `x402/option-malformed`). | | `walletId` | `number` | `get_subwallet_id`. | *** ### TvmReader Bounded, read-only calls against one network's TON Center v3 endpoint. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`: one of kind `too-large` reads as `too-large`, one of kind `malformed` as `unparseable`, and any other rejection as `transport`. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `tvm:${number}` `` | #### Methods ##### byHash() > **byHash**(`txHash`): `Promise`\<[`TonTx`](https://lcp.integraledger.com/reference/api/tvm.md#tontx) \| `null`\> GET /api/v3/transactions?hash=… ###### Parameters | Parameter | Type | | ------ | ------ | | `txHash` | `string` | ###### Returns `Promise`\<[`TonTx`](https://lcp.integraledger.com/reference/api/tvm.md#tontx) \| `null`\> ##### byInBody() > **byInBody**(`bodyHash`): `Promise`\ GET /api/v3/transactionsByMessage?body_hash=…&direction=in: the transactions that took a message with this body. ###### Parameters | Parameter | Type | | ------ | ------ | | `bodyHash` | `` `0x${string}` `` | ###### Returns `Promise`\ ##### byInMessage() > **byInMessage**(`msgHash`): `Promise`\ GET /api/v3/transactionsByMessage?msg_hash=…&direction=in ###### Parameters | Parameter | Type | | ------ | ------ | | `msgHash` | `string` | ###### Returns `Promise`\ ##### headUtime() > **headUtime**(): `Promise`\<`number`\> GET /api/v3/masterchainInfo: the latest masterchain block's gen_utime, the latest head the endpoint serves. ###### Returns `Promise`\<`number`\> ##### indexed() > **indexed**(): `Promise`\<[`TonIndexed`](https://lcp.integraledger.com/reference/api/tvm.md#tonindexed) \| `null`\> The index's own statement of the masterchain blocks through which it holds every block, from the same index that answers the other calls, or null where it states none. `masterchainInfo`'s `last` is no such statement: it can be ahead of an earlier block the index has not finished writing. ###### Returns `Promise`\<[`TonIndexed`](https://lcp.integraledger.com/reference/api/tvm.md#tonindexed) \| `null`\> ##### jettonMaster() > **jettonMaster**(`jettonWallet`): `Promise`\<`string`\> `runGetMethod` `get_wallet_data` on a Jetton wallet: its master, raw. ###### Parameters | Parameter | Type | | ------ | ------ | | `jettonWallet` | `string` | ###### Returns `Promise`\<`string`\> ##### jettonWallet() > **jettonWallet**(`master`, `owner`): `Promise`\<`string`\> `runGetMethod` `get_wallet_address` on a Jetton master for an owner: the owner's Jetton wallet, raw. ###### Parameters | Parameter | Type | | ------ | ------ | | `master` | `string` | | `owner` | `string` | ###### Returns `Promise`\<`string`\> ##### transactions() > **transactions**(`account`, `from`, `limit`): `Promise`\ GET /api/v3/transactions?account=…&end_lt=…&sort=desc&limit=…: the account's transactions from `from` back, newest first, at most `limit`, each with the members the expiry read takes. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `from` | \{ `hash`: `string`; `lt`: `string`; \} | | `from.hash` | `string` | | `from.lt` | `string` | | `limit` | `number` | ###### Returns `Promise`\ ##### walletState() > **walletState**(`account`): `Promise`\<[`TonWalletState`](https://lcp.integraledger.com/reference/api/tvm.md#tonwalletstate)\> GET /api/v3/walletStates?address=…: the wallet's state as the index holds it. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | ###### Returns `Promise`\<[`TonWalletState`](https://lcp.integraledger.com/reference/api/tvm.md#tonwalletstate)\> *** ### TvmRef The read keys a payment's settlement is read by, the members of the payment presented, and the payee, the `payTo` of the option the payment answers, for both party tests and no search key. It names no asset. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `codeHash?` | `` `0x${string}` `` | The representation hash of the code in the state init the payment carries; absent where it carries none. | | `h` | `` `0x${string}` `` | H, which the request's Jetton transfer carries: the search for H looks for it in every run of the wallet. | | `jettonWallet` | `string` | The payer's Jetton wallet, raw: the address TON sends the W5 request's one message to. | | `network` | `` `tvm:${number}` `` | - | | `payee` | `string` | - | | `requestBodyHash` | `` `0x${string}` `` | The representation hash of the signed W5 request: the whole body of the message to the payer's wallet, its signature and any bit or reference after `has_other_actions` 0, which W5 does not read, included. | | `seqno` | `number` | The sequence number the request was signed against: the single-use value. | | `signedHash` | `` `0x${string}` `` | The representation hash of the W5 request with its signature removed, its last 512 bits: the hash the wallet's key signs. It holds the members of the payment presented, the request the payer signed, whole, its signature apart. | | `transferBodyHash` | `` `0x${string}` `` | The representation hash of the Jetton transfer body the W5 request sends. | | `validUntil` | `number` | - | | `wallet` | `string` | The payer's W5 wallet, raw: the address TON sends the settlement message to. | *** ### TvmSearch The search position of the expiry read, from which the next read resumes: `top`, the newest transaction of the wallet the search had listed, and `next`, the transaction it reads next, at or below which nothing is read yet. The next read lists the wallet's transactions above `top`, which landed since, then reads on from `next`; the ones between were read. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `next` | `readonly` | [`TonLink`](https://lcp.integraledger.com/reference/api/tvm.md#tonlink) | | `top` | `readonly` | [`TonLink`](https://lcp.integraledger.com/reference/api/tvm.md#tonlink) | *** ### TvmUnsigned #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `request` | `object` | What the wallet key signs. `signedBoc` is the W5 request, its signature not in it, as a base64 bag of cells of one root; `hash` is that root cell's 32-byte representation hash. `tvmRequest` reads them. | | `request.hash` | `Uint8Array`\<`ArrayBuffer`\> | - | | `request.kind` | `"ton-w5"` | - | | `request.signedBoc` | `string` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TvmPayment`](https://lcp.integraledger.com/reference/api.md#tvmpayment) Takes the 64-byte Ed25519 signature. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TvmPayment`](https://lcp.integraledger.com/reference/api.md#tvmpayment) ## Type Aliases ### TonAccountStatus > **TonAccountStatus** = `"active"` \| `"uninit"` \| `"nonexist"` \| `"frozen"` An account's status as TON Center v3 states it. *** ### TvmMark > **TvmMark** = `"confirmed"` \| `"finalized"` *** ### TvmNetwork > **TvmNetwork** = `` `tvm:${number}` `` tvm:: tvm:-239 mainnet, tvm:-3 testnet. *** ### TvmStatus > **TvmStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`bigint`, [`TvmMark`](https://lcp.integraledger.com/reference/api/tvm.md#tvmmark), [`TvmSearch`](https://lcp.integraledger.com/reference/api/tvm.md#tvmsearch)\> The answer of `tvmStatus`, as the profile `read-status` gives it: each transfer of what moved named by the W5 transaction and, as its `place`, the hash of the Jetton `transfer` message that made it. Its marks are `confirmed` and `finalized`, TON Center v3's finality states 1 and 2, in that order; a position is a masterchain block's sequence number, and the search position a `TvmSearch`. ## Variables ### exactTvm > `const` **exactTvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TvmUnsigned`](https://lcp.integraledger.com/reference/api/tvm.md#tvmunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/tvm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TvmRef`](https://lcp.integraledger.com/reference/api/tvm.md#tvmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`TvmStatus`](https://lcp.integraledger.com/reference/api/tvm.md#tvmstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/tvm`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator sends the request the payer's W5 wallet signed; `status` reads the wallet's transaction and the Jetton transfers it led to. *** ### MAX\_TVM\_ATTACHED\_ABOVE\_FORWARD > `const` **MAX\_TVM\_ATTACHED\_ABOVE\_FORWARD**: `30000000n` = `30_000_000n` The most nanotons `build` attaches above the option's forward TON amount: x402's TON facilitator (`@x402/tvm`) refuses a request whose attached value is above `forwardTonAmount` plus this (`@x402/tvm` 2.30.0, `src/exact/facilitator/scheme.ts:326-329`, `DEFAULT_JETTON_WALLET_MESSAGE_AMOUNT` in `src/constants.ts:14`). *** ### MAX\_TVM\_BOC\_BYTES > `const` **MAX\_TVM\_BOC\_BYTES**: `8192` = `8192` The largest bag of cells the pairing reads, in bytes: lcp's own resource bound, far above the settlement message of one W5 request with a deploying state init (a few hundred bytes). *** ### MAX\_TVM\_CELLS > `const` **MAX\_TVM\_CELLS**: `512` = `512` The most distinct cells a bag of cells the pairing reads may hold: lcp's own resource bound, as above. *** ### MAX\_TVM\_DEPTH > `const` **MAX\_TVM\_DEPTH**: `32` = `32` The deepest a bag of cells the pairing reads may be: lcp's own resource bound, as above. *** ### MAX\_TVM\_LISTED > `const` **MAX\_TVM\_LISTED**: `256` = `256` The most transactions of the payer's wallet one read lists, back from its latest: lcp's own resource bound. Past it the search is held at the last masterchain block read. *** ### OP > `const` **OP**: `object` #### Type Declaration | Name | Type | Default value | | ------ | ------ | ------ | | `internalSigned` | `1936289396` | `0x73696e74` | | `internalTransfer` | `395134233` | `0x178d4519` | | `jettonTransfer` | `260734629` | `0x0f8a7ea5` | | `sendMsg` | `247711853` | `0x0ec3c86d` | *** ### TVM\_EXPIRY\_MARGIN > `const` **TVM\_EXPIRY\_MARGIN**: `60` = `60` The seconds a masterchain block's time must pass `validUntil` by before the read takes the request's validity as passed at that block: a W5 transaction runs at its shard block's time, and a masterchain block references that shard block only later, so the masterchain head can pass `validUntil` before an index holds a transaction that ran in time. *** ### W5R1\_CODE\_HASH > `const` **W5R1\_CODE\_HASH**: `"0x20834b7b72b112147e1b2fb457b84e74d1a30f04f737d4f62a668e9552d2b72f"` = `"0x20834b7b72b112147e1b2fb457b84e74d1a30f04f737d4f62a668e9552d2b72f"` W5R1's code hash, the one entry of the scheme's list of wallets (`scheme_exact_ton.md:166` at `x402-foundation/x402@88b66dd4`). ## Functions ### lcpComment() > **lcpComment**(`h`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TonCell`](https://lcp.integraledger.com/reference/api/tvm.md#toncell) TEP-74's text comment: 32 zero bits, then the UTF-8 of the hash's LCP string. A value that is not a 32-byte hash is `x402/payload-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`TonCell`](https://lcp.integraledger.com/reference/api/tvm.md#toncell) *** ### tvmCarrier() > **tvmCarrier**(`settlementBoc`, `network`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `codeHash?`: `` `0x${string}` ``; `h`: `` `0x${string}` ``; `jettonWallet`: `string`; `payload`: [`TonCell`](https://lcp.integraledger.com/reference/api/tvm.md#toncell); `requestBodyHash`: `` `0x${string}` ``; `seqno`: `number`; `signedHash`: `` `0x${string}` ``; `transferBodyHash`: `` `0x${string}` ``; `validUntil`: `number`; `wallet`: `string`; \} Reads the signed request in a settlement BoC: an internal message whose body is a W5 `internal_signed` request with exactly one `action_send_msg` behind an empty list, carrying a Jetton transfer whose forward payload is a reference to a text comment holding an LCP string. The request is read as W5's `internal_signed` path reads it (ton-blockchain/wallet-contract-v5 `contracts/wallet_v5.fc`, `recv_internal`, `process_signed_request` and `process_actions`): at least 640 bits, its signature the body's last 512 bits, and the signed part the rest with all its references, in which the wallet id, `valid_until`, seqno, the action list's `Maybe ^Cell` and `has_other_actions` are read; W5 reads nothing after `has_other_actions` 0, and neither does this, so bits and references there are carried, not read. A body W5 does not run as a signed request, or whose signed part ends before those fields, is `tvm/not-w5-signed`, and an empty action list or `has_other_actions` 1 is `tvm/actions`. The signature is not verified. The BoC's bytes are read as TON deserializes a bag of cells, and bytes TON refuses are `tvm/boc-malformed`. `requestBodyHash` and `transferBodyHash` are the representation hashes TON gives, for any cell TON reads, a pruned branch of any level mask included. Each message is read as TON's action phase sends it, at the configuration lcp holds for `network`, as `bound` and `reference` read the payment of an option on that network: a source of `addr_none` or an `addr_std` with no anycast (the outgoing message's the W5 wallet's own), a destination TON sends to, a value and an `extra_flags` of at most 3 each in its shortest form, its state init validated as TON validates it, a referenced body that is an ordinary cell with nothing after it, and at most two nested Merkle proofs or updates; the W5 action's send mode is one TON sends with. The network is `tvm:-239` (mainnet) or `tvm:-3` (testnet), and any other is `tvm/network-malformed`. The settlement message TON would not send is `tvm/boc-malformed`, and the outgoing one `tvm/not-jetton-transfer`; a send mode other than 1 or 3, the two the scheme admits, is `tvm/actions`. It also gives the request's sequence number, `signedHash`, the representation hash of the request less its signature, which the wallet's key signs, and, where the message carries a state init, the hash of its code. The settlement message's source names the account that relays it, which the BoC cannot show: one naming another account is read, and TON sends it when that account relays it. `wallet` and `jettonWallet` are the addresses TON sends to: an `addr_var` of 256 bits names its `addr_std`. The network, the base64, the 8 KiB bound, the bag-of-cells layout and its CRC32C need no peer: without @ton/core they give the codes they give with it, and a BoC that passes them is `tvm/peer-missing`. #### Parameters | Parameter | Type | | ------ | ------ | | `settlementBoc` | `string` | | `network` | `` `tvm:${number}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `codeHash?`: `` `0x${string}` ``; `h`: `` `0x${string}` ``; `jettonWallet`: `string`; `payload`: [`TonCell`](https://lcp.integraledger.com/reference/api/tvm.md#toncell); `requestBodyHash`: `` `0x${string}` ``; `seqno`: `number`; `signedHash`: `` `0x${string}` ``; `transferBodyHash`: `` `0x${string}` ``; `validUntil`: `number`; `wallet`: `string`; \} *** ### tvmRecover() > **tvmRecover**(`input`, `reader`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> Recovers the hash from the payer Jetton wallet's transaction: the comment in its inbound Jetton transfer. A transaction with no inbound message body, or whose body is not a Jetton `transfer`, is `tvm/not-jetton-transfer`. A body that is not a bag of cells with one root is an answer out of the reader's documented form, `tvm/unreadable`. A ref that names no `transaction` string is `tvm/wrong-reader`, with nothing read. Without @ton/core the body's cells cannot be read: a transaction with an inbound message body is `tvm/peer-missing`, after the ref, the reader, the read and the body's size, bag-of-cells layout and CRC32C are checked, which need no peer, so an empty body is `tvm/unreadable` and one over 8 KiB `tvm/boc-too-large` either way. The input's `tx` is the transaction's hash, and its `option` the option the payment answers, an object, of which the read needs no member; an input whose `tx` is not a non-empty string, or whose option is not an object, is `tvm/wrong-reader`, with nothing read. One call. #### Parameters | Parameter | Type | | ------ | ------ | | `input` | [`RecoverInput`](https://lcp.integraledger.com/reference/api.md#recoverinput)\<`` `tvm:${number}` ``, [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp.md#mppchallenge)\> | | `reader` | [`TvmReader`](https://lcp.integraledger.com/reference/api/tvm.md#tvmreader) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> *** ### tvmRequest() > **tvmRequest**(`signedBoc`, `network`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `amount`: `string`; `attachNanotons`: `bigint`; `customPayload?`: `string`; `extraCurrencies`: `object`[]; `forwardTonAmount`: `string`; `h`: `` `0x${string}` ``; `hash`: `Uint8Array`\<`ArrayBuffer`\>; `jettonWallet`: `string`; `mode`: `number`; `payTo`: `string`; `queryId`: `bigint`; `responseDestination`: `string` \| `null`; `seqno`: `number`; `stateInit?`: `string`; `validUntil`: `number`; `walletId`: `number`; \} Reads the W5 request a `ton-w5` request carries, `signedBoc`, as `tvmCarrier` reads the signed part of a settlement message's body at the network's configuration, with its codes, and gives `hash`, the root cell's representation hash, which is the request's `hash` when the text is its `signedBoc`. The root must be an ordinary cell whose op is `internal_signed`, or it is `tvm/not-w5-signed`. It gives every member W5 reads: the wallet id, `validUntil`, the sequence number and the one action's send mode; and of the one message that action sends, its destination (`jettonWallet`), the nanotons it attaches, each extra currency it attaches by its id, and its state init, where it carries one, as a base64 bag of cells; and of the Jetton `transfer` it carries, the query id, `amount`, the destination (`payTo`), the response destination or null for `addr_none`, the custom payload where it carries one, as a base64 bag of cells, the forward TON amount and the hash the forward payload's comment holds. Addresses are raw. A request holds one action, sending one Jetton `transfer`, or it is refused, so nothing else runs under the signature; W5 reads nothing after `has_other_actions`, and neither does this. The request names no wallet, so the message's source is read as the settlement message's sender is, by its form alone. #### Parameters | Parameter | Type | | ------ | ------ | | `signedBoc` | `string` | | `network` | `` `tvm:${number}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `amount`: `string`; `attachNanotons`: `bigint`; `customPayload?`: `string`; `extraCurrencies`: `object`[]; `forwardTonAmount`: `string`; `h`: `` `0x${string}` ``; `hash`: `Uint8Array`\<`ArrayBuffer`\>; `jettonWallet`: `string`; `mode`: `number`; `payTo`: `string`; `queryId`: `bigint`; `responseDestination`: `string` \| `null`; `seqno`: `number`; `stateInit?`: `string`; `validUntil`: `number`; `walletId`: `number`; \} *** ### tvmStatus() > **tvmStatus**(`ref`, `reader`, `query`): `Promise`\<[`TvmStatus`](https://lcp.integraledger.com/reference/api/tvm.md#tvmstatus)\> Answers the read of the request as the profile `read-status` gives it, from the facts the profile `x402-exact-tvm` (rule 6) names, with `presented` on `settled`. The read takes, from one TON Center v3 index: the latest head's time; the index's statement of the masterchain blocks it holds; the W5 wallet's transactions with the request's body; the wallet's state; and, for a W5 wallet, its transactions from the latest back, each by its predecessor, to the first at or before the position given (the expiry read, which is the search for H). Every run of the wallet whose Jetton `transfer` carries H is followed to the payer's Jetton wallet and from its `internal_transfer` to the Jetton wallet that took it, and tested by the two party tests: the W5 wallet is not the option's payee, on either act; and, on the act `payment`, the delivering account is the payee's Jetton wallet of the payer's Jetton wallet's master, read by `get_wallet_address` for `payTo` through the reader. Positions are masterchain block sequence numbers. The single-use value is the signed sequence number: consumed where a listed run is at it, where the active wallet's number is above it, or where a listed transaction removed or deployed the account; lapsed where the latest head is more than 60 seconds past `validUntil`, and read at the final mark only where the stated finalized block is too. The search is read whole only through a reader that declares `listsWhole`. A wallet that is not W5 gets no expiry read: its value is not read, and the body-hash lookup is its search, read whole where the stated block is at or past the latest head. The read decodes the cells it reads itself, without @ton/core, and compares raw addresses itself, so every answer is the same with it and without it. A ref, a reader or a query that is not one, or a ref whose hashes are not `0x` and 64 hex digits, is unreadable `unparseable`, with nothing read; a reader for another network than the ref's is `chain-mismatch`; a rejected read is `transport`, or `too-large` or `unparseable` for a `ReaderError` of that kind; an answer out of the reader's form is `unparseable`. A frozen account, its code removed, runs no request until a message restores the state its hash fixes, its number among it, so it reads as `uninit` and `nonexist` do: the number not passed. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`TvmRef`](https://lcp.integraledger.com/reference/api/tvm.md#tvmref) | | `reader` | [`TvmReader`](https://lcp.integraledger.com/reference/api/tvm.md#tvmreader) | | `query` | [`StatusQuery`](https://lcp.integraledger.com/reference/api.md#statusquery)\<[`TvmRef`](https://lcp.integraledger.com/reference/api/tvm.md#tvmref), `bigint`, [`TvmMark`](https://lcp.integraledger.com/reference/api/tvm.md#tvmmark), [`TvmSearch`](https://lcp.integraledger.com/reference/api/tvm.md#tvmsearch)\> | #### Returns `Promise`\<[`TvmStatus`](https://lcp.integraledger.com/reference/api/tvm.md#tvmstatus)\> ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### TvmPayment Re-exports [TvmPayment](https://lcp.integraledger.com/reference/api.md#tvmpayment) *** ### X402Payment Re-exports [X402Payment](https://lcp.integraledger.com/reference/api.md#x402payment) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/ucp > UCP checkouts and bookings, and five pairings, each of which carries the ATR hash and link as one `links[]` entry of type `legal_context` in the checkout response. Source: https://lcp.integraledger.com/reference/api/ucp Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. UCP checkouts and bookings, and five pairings, each of which carries the ATR hash and link as one `links[]` entry of type `legal_context` in the checkout response. The `ap2-mandate` pairings read the hash from the checkout JWT presented beside the buyer's checkout mandate, after AP2's `checkout_hash` check, the mandate presented alone or last in AP2's chain after the open mandate; `ucp/checkout/agent-signed` reads it from the `legal_context` member of the platform's signed request, once the request's `Content-Digest` matches its body; the `unsigned` pairings have nothing signed to read. Nothing here takes a key, signs, or verifies a signature, a `cnf` delegation or a link between chained mandates. ## Interfaces ### AgentSignedPresented The platform's signed request as the business received it: its body, as text, and its `Content-Digest` value. #### Properties | Property | Type | | ------ | ------ | | `body` | `string` | | `contentDigest` | `string` | *** ### AgentSignedUnsigned The member the platform writes into the request that completes the checkout, before it signs the request. #### Properties | Property | Type | | ------ | ------ | | `legal_context` | `object` | | `legal_context.type` | `"sha256"` | | `legal_context.value` | `` `0x${string}` `` | *** ### UcpBinding The shape of a UCP pairing: its id, data, binding record and codec, over the checkout or booking option `O`. #### Type Parameters | Type Parameter | | ------ | | `Id` *extends* `string` | | `O` *extends* [`Option`](https://lcp.integraledger.com/reference/api/ucp.md#option) | #### Properties | Property | Type | | ------ | ------ | | `claims` | `boolean` | | `data` | [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata) | | `id` | `Id` | | `pattern` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern) | #### Methods ##### advertise() > **advertise**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | `O` | | `agreementUrl?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) ##### bound() > **bound**(`presented`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> ##### broadcaster() > **broadcaster**(`presented`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> Who broadcasts what the payer presents: the seller, which completes the payment (`"payee"`). ###### Parameters | Parameter | Type | | ------ | ------ | | `presented` | `unknown` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster)\> ##### build() > **build**(`offer`, `h`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](https://lcp.integraledger.com/reference/api/ucp.md#unsigned)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `offer` | [`UcpOffer`](https://lcp.integraledger.com/reference/api/ucp.md#ucpoffer) | | `h` | `` `0x${string}` `` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Unsigned`](https://lcp.integraledger.com/reference/api/ucp.md#unsigned)\> ##### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`UcpOffer`](https://lcp.integraledger.com/reference/api/ucp.md#ucpoffer); \} ###### Parameters | Parameter | Type | | ------ | ------ | | `doc` | [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`UcpOffer`](https://lcp.integraledger.com/reference/api/ucp.md#ucpoffer); \} ##### tie() > **tie**(`options`): \[`"ucp"`, \{ `options`: readonly `O`[]; \}\] ###### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly `O`[] | ###### Returns \[`"ucp"`, \{ `options`: readonly `O`[]; \}\] ##### unplaced() > **unplaced**(`option`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `O` ###### Parameters | Parameter | Type | | ------ | ------ | | `option` | `O` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `O` *** ### UcpOffer The offer a UCP pairing's `read` gives, and the buyer's input to its `build`: the checkout the business returned, carrying the `legal_context` link. #### Properties | Property | Type | | ------ | ------ | | `checkout` | [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) | *** ### Unsigned The checkout as the business signed it, and the claims the buyer's checkout mandate carries for it: the checkout JWT (`checkoutJwt`) and its hash. `complete` takes the signed mandate and returns it beside that JWT. #### Properties | Property | Type | | ------ | ------ | | `checkout` | [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) | | `content` | `object` | | `content.checkout_hash` | `string` | | `content.checkout_jwt` | `string` | | `content.vct` | `"mandate.checkout.1"` | #### Methods ##### complete() > **complete**(`checkout_mandate`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented)\> ###### Parameters | Parameter | Type | | ------ | ------ | | `checkout_mandate` | `string` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Presented`](https://lcp.integraledger.com/reference/api/ap2.md#presented)\> ## Type Aliases ### BookingOption > **BookingOption** = `object` A booking session's own `id`, 1–256 characters. #### Properties | Property | Type | | ------ | ------ | | `booking` | `string` | *** ### Checkout > **Checkout** = `object` & `object` #### Type Declaration | Name | Type | | ------ | ------ | | `ap2?` | `object` & `object` | | `id` | `string` | | `links?` | [`Link`](https://lcp.integraledger.com/reference/api/ucp.md#link)[] | *** ### CheckoutOption > **CheckoutOption** = `object` A checkout's own `id`, 1–256 characters. #### Properties | Property | Type | | ------ | ------ | | `checkout` | `string` | *** ### Link > **Link** = `object` #### Properties | Property | Type | | ------ | ------ | | `title?` | `string` | | `type` | `string` | | `url` | `string` | *** ### Option > **Option** = [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ucp.md#checkoutoption) \| [`BookingOption`](https://lcp.integraledger.com/reference/api/ucp.md#bookingoption) ## Variables ### agentSigned > `const` **agentSigned**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout); `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`: (`offer`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`AgentSignedUnsigned`](https://lcp.integraledger.com/reference/api/ucp.md#agentsignedunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"ucp/checkout/agent-signed"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`UcpOffer`](https://lcp.integraledger.com/reference/api/ucp.md#ucpoffer); \}; `tie`: (`options`) => \[`"ucp"`, \{ `options`: readonly [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ucp.md#checkoutoption)[]; \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ucp.md#checkoutoption); \}\> `ucp/checkout/agent-signed`. The payee broadcasts (`broadcaster` answers `"payee"`): the business's payment handler executes the payment the signed request completes; nothing here reads it. A value that is not an object gets `ucp/request-malformed`, as `bound` refuses it. *** ### ap2Mandate > `const` **ap2Mandate**: [`UcpBinding`](https://lcp.integraledger.com/reference/api/ucp.md#ucpbinding)\<`"ucp/checkout/ap2-mandate"`, [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ucp.md#checkoutoption)\> `ucp/checkout/ap2-mandate`. The payee broadcasts (`broadcaster` answers `"payee"`): the business's payment handler executes the payment the buyer's checkout mandate authorizes; nothing here reads it. A value that is not a JSON object gets `ap2/mandate-malformed`, as `bound` refuses it. *** ### bookingAp2Mandate > `const` **bookingAp2Mandate**: [`UcpBinding`](https://lcp.integraledger.com/reference/api/ucp.md#ucpbinding)\<`"ucp/booking/ap2-mandate"`, [`BookingOption`](https://lcp.integraledger.com/reference/api/ucp.md#bookingoption)\> `ucp/booking/ap2-mandate`. The payee broadcasts (`broadcaster` answers `"payee"`): the business's payment handler executes the payment the buyer's checkout mandate authorizes; nothing here reads it. A value that is not a JSON object gets `ap2/mandate-malformed`, as `bound` refuses it. *** ### bookingUnsigned > `const` **bookingUnsigned**: [`UcpBinding`](https://lcp.integraledger.com/reference/api/ucp.md#ucpbinding)\<`"ucp/booking/unsigned"`, [`BookingOption`](https://lcp.integraledger.com/reference/api/ucp.md#bookingoption)\> `ucp/booking/unsigned`. The payee broadcasts (`broadcaster` answers `"payee"`): the business's payment handler executes the payment the booking completed; nothing here reads it. *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api.md#digestjson) = `digestJson` The option digest the issuer keeps: SHA-256 over the RFC 8785 form. *** ### LINK\_TYPE > `const` **LINK\_TYPE**: `"legal_context"` = `"legal_context"` *** ### unsigned > `const` **unsigned**: [`UcpBinding`](https://lcp.integraledger.com/reference/api/ucp.md#ucpbinding)\<`"ucp/checkout/unsigned"`, [`CheckoutOption`](https://lcp.integraledger.com/reference/api/ucp.md#checkoutoption)\> & `object` `ucp/checkout/unsigned`. The payee broadcasts (`broadcaster` answers `"payee"`): the business's payment handler executes the payment the checkout completed; nothing here reads it. `reference` names the charge by the seller's own reference for it. #### Type Declaration | Name | Type | | ------ | ------ | | `reference()` | (`presented`, `option`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ChargeRef`](https://lcp.integraledger.com/reference/api/acp.md#chargeref)\> | ## Functions ### checkoutJwt() > **checkoutJwt**(`c`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The checkout JWT a buyer's checkout mandate commits to, for a checkout the business signed: its detached `ap2.merchant_authorization` with the payload reinserted, `header.payload.signature`, the payload being the base64url of the RFC 8785 form of the checkout without its `ap2` member, the bytes that signature covers (UCP 2026-08-25, the AP2 Mandates extension, *Business Authorization*). UCP does not say which bytes are the checkout JWT; this is the second of the two readings its open issue 905 sets out, and the profile states it as provisional. A checkout with no `ap2.merchant_authorization` of the form `header..signature` is `ucp/ap2-not-active`; one with no RFC 8785 form is `ucp/checkout-malformed`. No signature is verified. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### legalContextLink() > **legalContextLink**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `link`: `string`; \} The hash and link of the checkout's one `legal_context` link. Nothing else of the checkout is read. #### Parameters | Parameter | Type | | ------ | ------ | | `c` | [`Checkout`](https://lcp.integraledger.com/reference/api/ucp.md#checkout) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `h`: `` `0x${string}` ``; `link`: `string`; \} *** ### tie() > **tie**\<`O`\>(`options`): \[`"ucp"`, \{ `options`: readonly `O`[]; \}\] The binding slot: the checkouts or bookings this ATR was minted for, each by its own `id`. #### Type Parameters | Type Parameter | | ------ | | `O` *extends* [`Option`](https://lcp.integraledger.com/reference/api/ucp.md#option) | #### Parameters | Parameter | Type | | ------ | ------ | | `options` | readonly `O`[] | #### Returns \[`"ucp"`, \{ `options`: readonly `O`[]; \}\] ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### ChargePresented Re-exports [ChargePresented](https://lcp.integraledger.com/reference/api/acp.md#chargepresented) *** ### ChargeRef Re-exports [ChargeRef](https://lcp.integraledger.com/reference/api/acp.md#chargeref) --- # @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. 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`](https://lcp.integraledger.com/reference/api/x402.md#x402choice) #### Properties | Property | Type | Inherited from | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`accepted`](https://lcp.integraledger.com/reference/api/x402.md#property-accepted-1) | | `from` | `` `0x${string}` `` | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`from`](https://lcp.integraledger.com/reference/api/x402.md#property-from-1) | | `minValiditySeconds` | `number` | - | | `now` | `number` | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`now`](https://lcp.integraledger.com/reference/api/x402.md#property-now-1) | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`required`](https://lcp.integraledger.com/reference/api/x402.md#property-required-1) | *** ### GatewayBatchedTypedData The EIP-712 typed data the payer signs: `TransferWithAuthorization` in the Gateway Wallet's domain. #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `number` | | `domain.name` | `string` | | `domain.salt?` | `` `0x${string}` `` | | `domain.verifyingContract` | `` `0x${string}` `` | | `domain.version` | `"1"` \| `"2"` | | `message` | `object` | | `message.from` | `` `0x${string}` `` | | `message.nonce` | `` `0x${string}` `` | | `message.to` | `` `0x${string}` `` | | `message.validAfter` | `bigint` | | `message.validBefore` | `bigint` | | `message.value` | `bigint` | | `primaryType` | `"TransferWithAuthorization"` | | `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 | | ------ | ------ | | `typedData` | [`GatewayBatchedTypedData`](https://lcp.integraledger.com/reference/api/x402.md#gatewaybatchedtypeddata) | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`GatewayBatchedPayment`](https://lcp.integraledger.com/reference/api/x402.md#gatewaybatchedpayment) ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`GatewayBatchedPayment`](https://lcp.integraledger.com/reference/api/x402.md#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 | | ------ | ------ | ------ | | `digest` | `readonly` | `` `0x${string}` `` \| `null` | | `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 | | ------ | ------ | | `body` | `Uint8Array` | | `headers?` | `Readonly`\<`Record`\<`string`, `string` \| readonly `string`[]\>\> | | `method` | `string` | | `target` | `string` | *** ### ToolCall An MCP `tools/call` request's tool call, as received: its `params.name` and `params.arguments`. #### Properties | Property | Type | | ------ | ------ | | `arguments?` | `object` | | `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 | | ------ | ------ | | `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`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#gatewaybatchedchoice) #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `from` | `` `0x${string}` `` | | `now` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#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 | | ------ | ------ | | `options` | readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[] | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | ## Type Aliases ### BatchedAuthorization > **BatchedAuthorization** = `object` The batched authorization, every member a string, as Circle's client writes it. #### Properties | Property | Type | | ------ | ------ | | `from` | `string` | | `nonce` | `string` | | `to` | `string` | | `validAfter` | `string` | | `validBefore` | `string` | | `value` | `string` | *** ### BreadthBase > **BreadthBase**\<`Id`\> = `object` The members every x402 EVM breadth pairing shares. #### Type Parameters | Type Parameter | | ------ | | `Id` *extends* [`BreadthId`](https://lcp.integraledger.com/reference/api/x402.md#breadthid) | #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `advertise` | `readonly` | [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise) | | `broadcaster` | `readonly` | (`presented`) => `Promise`\<[`Broadcaster`](https://lcp.integraledger.com/reference/api.md#broadcaster) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal)\> | | `claims` | `readonly` | `boolean` | | `data` | `readonly` | [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata) | | `id` | `readonly` | `Id` | | `pattern` | `readonly` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern) | | `read` | `readonly` | (`doc`) => [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) | | `tie` | `readonly` | *typeof* [`tie`](https://lcp.integraledger.com/reference/api/x402.md#tie) | | `unplaced` | `readonly` | (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) | *** ### BreadthId > **BreadthId** = `Exclude`\<`Extract`\, `"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 | | ------ | ------ | | `from` | `string` | | `nonce` | `string` | | `to` | `string` | | `validAfter` | `string` | | `validBefore` | `string` | | `value` | `string` | *** ### Eip3009Payment > **Eip3009Payment** = [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) & `object` A payment of the `x402/exact/eip155/eip3009` pairing. #### Type Declaration | Name | Type | | ------ | ------ | | `payload` | `object` | | `payload.authorization` | [`Eip3009Authorization`](https://lcp.integraledger.com/reference/api/x402.md#eip3009authorization) | | `payload.signature` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | *** ### GatewayBatchedPayment > **GatewayBatchedPayment** = [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) & `object` A payment of `x402/exact/eip155/gateway-batched`. #### Type Declaration | Name | Type | | ------ | ------ | | `payload` | `object` | | `payload.authorization` | [`BatchedAuthorization`](https://lcp.integraledger.com/reference/api/x402.md#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 | | ------ | ------ | | `forwardIndexable` | `boolean` | | `onChain` | `boolean` | | `pattern?` | `"native-field"` \| `"overlay-contract"` \| `"sidecar-attestation"` \| `"opaque-challenge"` \| `"id-reuse"` \| `"protocol-extension"` \| `"http-advisory"` | | `profile?` | `string` | | `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 | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"extensions"`\] | | `payload` | [`X402SchemePayload`](https://lcp.integraledger.com/reference/api/x402.md#x402schemepayload) | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired)\[`"resource"`\] | | `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 | | ------ | ------ | | `accepts` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[] | | `error?` | `string` | | `extensions?` | `object` | | `resource` | `object` | | `resource.url` | `string` | | `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 | | ------ | ------ | | `amount` | `string` | | `asset` | `string` | | `extra?` | `object` | | `maxTimeoutSeconds` | `number` | | `network` | `string` | | `payTo` | `string` | | `scheme` | `string` | *** ### Permit2Authorization > **Permit2Authorization** = `object` #### Properties | Property | Type | | ------ | ------ | | `deadline` | `string` | | `from` | `string` | | `nonce` | `string` | | `permitted` | `object` | | `permitted.amount` | `string` | | `permitted.token` | `string` | | `spender` | `string` | | `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 | | ------ | ------ | | `bodyDigest` | [`AtrHash`](https://lcp.integraledger.com/reference/api.md#atrhash) | | `headers?` | readonly [`HeaderDigest`](https://lcp.integraledger.com/reference/api/x402.md#headerdigest)[] | | `method` | `string` | | `path` | `string` | | `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 | | ------ | ------ | | `errorReason?` | `string` | | `network` | `string` | | `payer?` | `string` | | `success` | `boolean` | | `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 | | ------ | ------ | | `argumentsDigest` | [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex) | | `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`](https://lcp.integraledger.com/reference/api/x402.md#eip3009authorization); `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} \| \{ `permit2Authorization`: [`Permit2Authorization`](https://lcp.integraledger.com/reference/api/x402.md#permit2authorization); `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} \| \{ `delegationManager`: `string`; `delegator`: `string`; `permissionContext`: `string`; \} \| \{ `authorization`: [`Eip3009Authorization`](https://lcp.integraledger.com/reference/api/x402.md#eip3009authorization); `salt`: `string`; `saltNonce?`: `string`; `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm.md#hex); \} \| \{ `permit2Authorization`: [`Permit2Authorization`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload); \} ## Variables ### authCaptureEip3009 > `const` **authCaptureEip3009**: [`BreadthBase`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#unsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/eip155/eip3009"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#gatewaybatchedunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/eip155/gateway-batched"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) *** ### decodePaymentResponse() > **decodePaymentResponse**(`header`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SettlementResponse`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#settlementresponse) *** ### decodePaymentSignature() > **decodePaymentSignature**(`header`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) \| [`SettlementResponse`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentpayload) | #### Returns `"x402/exact/eip155/gateway-batched"` \| [`X402PairingId`](https://lcp.integraledger.com/reference/api/x402.md#x402pairingid) \| `undefined` *** ### requestCommitment() > **requestCommitment**(`r`, `fields?`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#httprequest) | | `fields?` | readonly `string`[] | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment)\> *** ### tie() > **tie**(`accepts`, `request`): \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[] | | `request` | [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment) | #### Returns \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\] *** ### toolCallCommitment() > **toolCallCommitment**(`call`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#toolcall) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#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) --- # @integraledger/lcp/x402-batch-settlement > x402 `batch-settlement`: one ATR per channel, its hash the EVM channel configuration's `salt`, the Solana opening transaction's seller Memo instruction, or, on Cloudflare, the echoed `extensions.legalContext` of each request. Source: https://lcp.integraledger.com/reference/api/x402-batch-settlement Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. x402 `batch-settlement`: one ATR per channel, its hash the EVM channel configuration's `salt`, the Solana opening transaction's seller Memo instruction, or, on Cloudflare, the echoed `extensions.legalContext` of each request. On EVM the channel id commits to the `salt`, and every signature signs it; on Solana the seller Memo instruction (`extra.memo`) sits beside x402's receiver-authorizer binding memo; on Cloudflare there is no channel. ## Interfaces ### BatchEvmOpen 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`. #### Extends - [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice) #### Properties | Property | Type | Description | Inherited from | | ------ | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`accepted`](https://lcp.integraledger.com/reference/api/x402.md#property-accepted-1) | | `authSalt` | `` `0x${string}` `` | 32 bytes the caller draws at random: the deposit authorization's salt (ERC-3009) or the deposit permit's nonce (Permit2); under an option in the scheme's refund-authorizer mode, where H is that salt or nonce, the entropy the channel salt packs. | - | | `deposit` | `bigint` | - | - | | `from` | `` `0x${string}` `` | - | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`from`](https://lcp.integraledger.com/reference/api/x402.md#property-from-1) | | `now` | `number` | - | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`now`](https://lcp.integraledger.com/reference/api/x402.md#property-now-1) | | `payerAuthorizer` | `` `0x${string}` `` | - | - | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402.md#x402choice).[`required`](https://lcp.integraledger.com/reference/api/x402.md#property-required-1) | *** ### BatchSvmOpen #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `computeUnitLimit?` | `number` | | `computeUnitPrice?` | `bigint` | | `deposit` | `bigint` | | `openSlot` | `bigint` | | `payer` | `string` | | `payerAuthorizer` | `string` | | `recentBlockhash` | `string` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | | `salt` | `bigint` | | `tokenProgram` | `string` | *** ### BatchUnsigned Several signing requests, signed in order. `complete` takes one signature per request: `0x` hex for `eip712`, base58 for `solana-message` and `ed25519-raw`. #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `authSalt?` | `` `0x${string}` `` | On an EVM opening, the deposit authorization's salt: the ERC-3009 deposit's nonce is `erc3009DepositNonce(channelId, authSalt)` and the Permit2 deposit's nonce is `authSalt` as a uint256. It is the caller's `authSalt`, or H under an option in the refund-authorizer mode, so a client holds each nonce to it without repeating the mode test. No other build gives it. | | `config?` | [`ChannelConfig`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#channelconfig) | On an EVM opening, the channel's configuration: `batchChannelId(chainId, config)` is the `channelId` the deposit authorization and the voucher sign, `chainId` their domain's. It names the receiver and the authorizers the signatures grant, so a client can show them and hold the channel id to them. No other build gives it. | | `requests` | readonly [`SigningRequest`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#signingrequest)[] | - | #### Methods ##### complete() > **complete**(`signatures`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchPaymentPayload`](https://lcp.integraledger.com/reference/api.md#batchpaymentpayload) ###### Parameters | Parameter | Type | | ------ | ------ | | `signatures` | readonly `string`[] | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchPaymentPayload`](https://lcp.integraledger.com/reference/api.md#batchpaymentpayload) *** ### BatchWithin #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | | `channelConfig` | [`Json`](https://lcp.integraledger.com/reference/api.md#json) | Exactly as sent at the opening. | | `computeUnitLimit?` | `number` | SVM refund's `request_close`: the Compute Budget values, 200 000 units and 1 microlamport when absent. | | `computeUnitPrice?` | `bigint` | - | | `maxClaimableAmount` | `bigint` | - | | `recentBlockhash?` | `string` | SVM refund: the blockhash of its `request_close`. Given, the refund carries that transaction, which x402 sends only on a retry after `invalid_batch_settlement_svm_receiver_binding_unavailable`. | | `refund?` | `object` | A refund. EVM: its amount, absent for a full refund. SVM: `{}`, a full refund carrying the voucher for `maxClaimableAmount`, the server's accepted cumulative amount, and, with `recentBlockhash`, a payer-signed `request_close` built here. | | `refund.amount?` | `bigint` | - | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | *** ### ChannelConfig #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `payer` | `` `0x${string}` `` | - | | `payerAuthorizer` | `` `0x${string}` `` | - | | `receiver` | `` `0x${string}` `` | - | | `receiverAuthorizer` | `` `0x${string}` `` | - | | `salt` | `` `0x${string}` `` | `0x` and 64 hex digits. | | `token` | `` `0x${string}` `` | - | | `withdrawDelay` | `number` | - | *** ### ChannelMembers #### Properties | Property | Type | | ------ | ------ | | `channel` | `object` | | `channel.boundWithin` | `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\> | | `channel.kind` | `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"` | | `channel.ref` | `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\> | | `channel.until` | `number` \| `undefined` | *** ### Eip712Request An EIP-712 request for the buyer's signer; numbers in `message` are decimal strings. #### Properties | Property | Type | | ------ | ------ | | `domain` | `object` | | `domain.chainId` | `number` | | `domain.name` | `string` | | `domain.verifyingContract` | `` `0x${string}` `` | | `domain.version?` | `string` | | `message` | `object` | | `primaryType` | `string` | | `types` | `object` | ## Type Aliases ### SigningRequest > **SigningRequest** = \{ `kind`: `"eip712"`; `typedData`: [`Eip712Request`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#eip712request) \| [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/mpp.md#receivetypeddata) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm.md#permit2typeddata); \} \| \{ `kind`: `"solana-message"`; `message`: `Uint8Array`\<`ArrayBuffer`\>; \} \| \{ `kind`: `"ed25519-raw"`; `message`: `Uint8Array`\<`ArrayBuffer`\>; `signer`: `string`; \} A request to the buyer's signer. ## Variables ### BATCH\_SETTLEMENT > `const` **BATCH\_SETTLEMENT**: `"0x4020074e9dF2ce1deE5A9C1b5c3f541D02a10003"` *** ### batchCloudflare > `const` **batchCloudflare**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/casper.md#x402advertise); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`CloudflarePaymentPayload`](https://lcp.integraledger.com/reference/api.md#cloudflarepaymentpayload)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/batch-settlement/cloudflare"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/batch-settlement/cloudflare`. The payee broadcasts (`broadcaster` answers `"payee"`): Cloudflare, for the seller, verifies the agent's signed request and bills its registered identity off chain; no `status` reads it. *** ### batchEvm > `const` **batchEvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchUnsigned`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchunsigned)\>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchUnsigned`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`p`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`p`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_p`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/batch-settlement/eip155"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchEvmRef`](https://lcp.integraledger.com/reference/api/evm.md#batchevmref)\>; `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`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/batch-settlement/eip155`. The payee broadcasts (`broadcaster` answers `"payee"` for each payment type `channel.kind` takes): for every payment of the channel: the seller's facilitator executes the deposit's token authorization, redeems vouchers when it claims, and executes a refund; `status` reads them, and `channel.kind` classifies each payment. A payment of any other type gets `x402/not-an-opening`, as `bound` refuses it. `bound` reads a deposit alone, so `channel.kind` reads the rest: a refund whose `amount` is not a positive decimal below 2^128 gets `x402/payload-malformed`, as `channel.kind` refuses it. *** ### batchSvm > `const` **batchSvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchUnsigned`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchunsigned)\>; `buildWithin`: (`w`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`BatchUnsigned`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#batchunsigned)\>; `channel`: `Readonly`\<\{ `boundWithin`: (`_p`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` ``\>; `kind`: (`p`) => `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `"within"`; `ref`: (`p`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channel`: `string`; `network`: `string`; \}\>; `until`: (`_p`) => `number` \| `undefined`; \}\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/batch-settlement/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/batch-settlement/solana`. The payee broadcasts (`broadcaster` answers `"payee"` for each payment type `channel.kind` takes): for every payment of the channel: the seller's facilitator, the `feePayer`, co-signs and sends the deposit and top-up transactions the payer signed, redeems vouchers when it settles, and sends the refund; `status` reads them, and `channel.kind` classifies each payment. A payment of any other type gets `x402/not-an-opening`, as `bound` refuses it. *** ### CHANNEL\_CONFIG\_TYPEHASH > `const` **CHANNEL\_CONFIG\_TYPEHASH**: `"0x1c9a06ceab9b0ebbd3301dc56c9111bb6d9af421356dc9ccb3b7084c755db308"` *** ### CHANNEL\_CREATED\_TOPIC > `const` **CHANNEL\_CREATED\_TOPIC**: `"0x69d8248d5566bdb2ebc4d218970710d8378a2ff9b709a999e052b71970f808fa"` *** ### DEPOSITED\_TOPIC > `const` **DEPOSITED\_TOPIC**: `"0x6c2a09353b5e75e70d0b9778b80a413809bb235d46c211811c474b3346791d89"` *** ### ERC3009\_DEPOSIT\_COLLECTOR > `const` **ERC3009\_DEPOSIT\_COLLECTOR**: `"0x4020806089470a89826cB9fB1f4059150b550004"` *** ### PERMIT2\_DEPOSIT\_COLLECTOR > `const` **PERMIT2\_DEPOSIT\_COLLECTOR**: `"0x4020425FAf3B746C082C2f942b4E5159887B0005"` *** ### VOUCHER\_TYPEHASH > `const` **VOUCHER\_TYPEHASH**: `"0x1e1bd6ff84c3e0d9029a292b212e039c0ca97ec497c55191a4a5874294609a69"` ## Functions ### batchChannelCreated() > **batchChannelCreated**(`log`, `chainId`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channelId`: `` `0x${string}` ``; `config`: [`ChannelConfig`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#channelconfig); \} The config and id of a `ChannelCreated(channelId, config)` log, the id recomputed from the 7-word data. #### Parameters | Parameter | Type | | ------ | ------ | | `log` | [`EvmLog`](https://lcp.integraledger.com/reference/api/evm.md#evmlog) | | `chainId` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `channelId`: `` `0x${string}` ``; `config`: [`ChannelConfig`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#channelconfig); \} *** ### batchChannelId() > **batchChannelId**(`chainId`, `c`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The channel id: the EIP-712 digest of the configuration under the `x402 Batch Settlement` domain. #### Parameters | Parameter | Type | | ------ | ------ | | `chainId` | `number` | | `c` | [`ChannelConfig`](https://lcp.integraledger.com/reference/api/x402-batch-settlement.md#channelconfig) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` *** ### erc3009DepositNonce() > **erc3009DepositNonce**(`channelId`, `authSalt`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` The EIP-3009 deposit's nonce: keccak256(abi.encode(bytes32 channelId, uint256 authSalt)). A `channelId` or `authSalt` that is not a string of `0x` and 64 hex digits is `evm/field-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `channelId` | `` `0x${string}` `` | | `authSalt` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `` `0x${string}` `` ## References ### BatchPaymentPayload Re-exports [BatchPaymentPayload](https://lcp.integraledger.com/reference/api.md#batchpaymentpayload) *** ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### CloudflarePaymentPayload Re-exports [CloudflarePaymentPayload](https://lcp.integraledger.com/reference/api.md#cloudflarepaymentpayload) *** ### 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) --- # @integraledger/lcp/x402-exact-solana > The `x402/exact/solana` pairing: the ATR hash placed as the option's `extra.memo` in LCP string form, written by the payer as the transaction's one Memo instruction, read back from the signed message, and read from the settlement. Source: https://lcp.integraledger.com/reference/api/x402-exact-solana Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The `x402/exact/solana` pairing: the ATR hash placed as the option's `extra.memo` in LCP string form, written by the payer as the transaction's one Memo instruction, read back from the signed message, and read from the settlement. ## Interfaces ### SvmChoice #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | - | | `computeUnitLimit?` | `number` | - | | `computeUnitPrice?` | `bigint` | - | | `decimals` | `number` | - | | `payer` | `string` | - | | `reader?` | `Pick`\<[`SvmReader`](https://lcp.integraledger.com/reference/api/svm.md#svmreader), `"network"` \| `"account"`\> | A reader of the option's network, through whose `account` `build` reads a Token-2022 mint at `confirmed` and, where its `TransferHook` extension names a program, the accounts the transfer hook needs (the profile's rule 9). Absent, `build` reads nothing and writes `TransferChecked` with its four accounts, which a mint whose hook names a program does not take. | | `recentBlockhash` | `string` | - | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | - | | `tokenProgram` | `string` | - | *** ### SvmUnsigned What the payer signs, and how its signature completes the payment. #### Type Parameters | Type Parameter | Default type | | ------ | ------ | | `P` | [`SvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#svmpaymentpayload) | #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.kind` | `"solana-message"` | | `request.message` | `Uint8Array`\<`ArrayBuffer`\> | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `P` A 64-byte Ed25519 signature by the payer. ###### Parameters | Parameter | Type | | ------ | ------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `P` ## Variables ### exactSvm > `const` **exactSvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmUnsigned`](https://lcp.integraledger.com/reference/api/x402-exact-solana.md#svmunsigned)\<[`SvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#svmpaymentpayload)\>\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/solana`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator, the option's `feePayer`, co-signs and sends the transaction the payer signed; `status` reads it. ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### SvmPaymentPayload Re-exports [SvmPaymentPayload](https://lcp.integraledger.com/reference/api.md#svmpaymentpayload) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/x402-exact-stellar > Stellar on x402: the pairing `x402/exact/stellar/precondition` (`exactStellarPrecondition`), an agreement in which the buyer signs a Soroban authorization of `transfer(buyer, payTo, amount)` and a 40-byte payload of H and that authorization's nonce. Source: https://lcp.integraledger.com/reference/api/x402-exact-stellar Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. Stellar on x402: the pairing `x402/exact/stellar/precondition` (`exactStellarPrecondition`), an agreement in which the buyer signs a Soroban authorization of `transfer(buyer, payTo, amount)` and a 40-byte payload of H and that authorization's nonce. The transaction carries that payload as a signed-payload precondition. The entry point also exports the pairing's choice type `StellarPreconditionChoice`, its `assetTransferMethod` `LCP_PRECONDITION`, and the `Broadcaster` type, which every pairing's `broadcaster` answers. ## Interfaces ### StellarPreconditionChoice The buyer's inputs to `build`: the chosen option, the buyer's simulated transaction, the current ledger, and the buyer's account (`G…`), which must be the simulated transfer's `from`. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `currentLedger` | `number` | | `payer` | `string` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | | `simulatedXdr` | `string` | ## Variables ### exactStellarPrecondition > `const` **exactStellarPrecondition**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarUnsigned`](https://lcp.integraledger.com/reference/api/stellar.md#stellarunsigned)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/stellar/precondition"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`StellarRef`](https://lcp.integraledger.com/reference/api/stellar.md#stellarref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`StellarStatus`](https://lcp.integraledger.com/reference/api/stellar.md#stellarstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/stellar/precondition`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's settler submits the transaction as its source; `status` finds it by the buyer's events and holds it to the five checks. *** ### LCP\_PRECONDITION > `const` **LCP\_PRECONDITION**: `"lcp-precondition"` = `"lcp-precondition"` The profile's `assetTransferMethod`, which tells this form's option from every other Stellar option. ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/x402-exact-xrpl > The `x402/exact/xrpl` pairing: the ATR hash's LCP string placed as the option's `extra.invoiceId`, whose SHA-256 the payer signs as the Payment's `InvoiceID`. Source: https://lcp.integraledger.com/reference/api/x402-exact-xrpl Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The `x402/exact/xrpl` pairing: the ATR hash's LCP string placed as the option's `extra.invoiceId`, whose SHA-256 the payer signs as the Payment's `InvoiceID`. The hash is read back from the signed blob, single-signed or multisigned, and settlement is read by the payer's instrument, its `Account` with the signed `Sequence` or ticket. ## Interfaces ### XrplChoice #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `account` | `string` | | `fee` | `string` | | `lastLedgerSequence` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | | `sequence` | `number` | | `ticketSequence?` | `number` | ## Variables ### exactXrpl > `const` **exactXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`XrplUnsigned`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplunsigned)\<[`XrplPaymentPayload`](https://lcp.integraledger.com/reference/api.md#xrplpaymentpayload)\>\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/exact/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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) \| `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/exact/xrpl`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator submits the signed `Payment` blob; `status` reads it by the payer's instrument (`xrplStatus`). `recover` returns the value the landed `Payment` carries in H's place, its `InvoiceID`, the SHA-256 of H's LCP string, as `0x` and 64 lowercase hex digits (`xrplInvoiceOf`): a digest is not read back to H, so a holder of the ATR computes the SHA-256 of its own H's LCP string and compares the two. ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) *** ### XrplPaymentPayload Re-exports [XrplPaymentPayload](https://lcp.integraledger.com/reference/api.md#xrplpaymentpayload) *** ### XrplQuery Re-exports [XrplQuery](https://lcp.integraledger.com/reference/api/mpp.md#xrplquery) --- # @integraledger/lcp/x402-upto-solana > The `x402/upto/solana` pairing: the ATR hash placed as the option's `extra.memo` in LCP string form, written by the payer as the one Memo instruction of the transaction that opens a one-request payment channel. Source: https://lcp.integraledger.com/reference/api/x402-upto-solana Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The `x402/upto/solana` pairing: the ATR hash placed as the option's `extra.memo` in LCP string form, written by the payer as the one Memo instruction of the transaction that opens a one-request payment channel. The channel escrows the signed maximum. The hash is read back from that transaction, and settlement is read from the opening. ## Interfaces ### UptoSvmChoice #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `computeUnitLimit?` | `number` | | `computeUnitPrice?` | `bigint` | | `nonce` | `bigint` | | `now` | `number` | | `openSlot` | `bigint` | | `payer` | `string` | | `recentBlockhash` | `string` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired) | | `tokenProgram` | `string` | *** ### UptoSvmPayload #### Properties | Property | Type | Description | | ------ | ------ | ------ | | `authorizedSigner` | `string` | - | | `channelId` | `string` | - | | `deposit` | `string` | - | | `expiresAt` | `number` | - | | `from` | `string` | - | | `maxAmount` | `string` | - | | `nonce` | `string` | - | | `openSlot` | `number` | - | | `openTransaction` | `string` | Base64 of the partially signed `open` transaction. | | `validAfter` | `number` | - | ## Variables ### uptoSvm > `const` **uptoSvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmUnsigned`](https://lcp.integraledger.com/reference/api/x402-exact-solana.md#svmunsigned)\<[`UptoSvmPaymentPayload`](https://lcp.integraledger.com/reference/api.md#uptosvmpaymentpayload)\>\>; `claims`: `true`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/upto/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#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`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`SvmRef`](https://lcp.integraledger.com/reference/api/svm.md#svmref)\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm.md#svmstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/upto/solana`. The payee broadcasts (`broadcaster` answers `"payee"`): the seller's facilitator, the option's `feePayer`, co-signs and sends the opening the payer signed, and settles the metered amount in a later transaction; `status` reads the opening. ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### UptoSvmPaymentPayload Re-exports [UptoSvmPaymentPayload](https://lcp.integraledger.com/reference/api.md#uptosvmpaymentpayload) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/x402-upto-xrpl > The `x402/upto/xrpl` pairing: x402's `upto` scheme on the XRP Ledger, at coverage `none`, its payment following an agreement on the same network. Source: https://lcp.integraledger.com/reference/api/x402-upto-xrpl Updated 2026-11-18. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. The `x402/upto/xrpl` pairing: x402's `upto` scheme on the XRP Ledger, at coverage `none`, its payment following an agreement on the same network. The payer opens a payment channel to the option's `payTo` itself and presents the channel and its own account, so nothing it signs carries the ATR hash. Settlement is read from the channel's create. ## Interfaces ### UptoXrplPayload What the payer presents: the channel's id, the maximum its claim signs, the claim's signature, the channel's `PublicKey` and the channel's `Account` (`specs/schemes/upto/scheme_upto_xrpl.md:172-188` at x402 `88b66dd4`). #### Properties | Property | Type | | ------ | ------ | | `channelId` | `string` | | `maxAmount` | `string` | | `payer` | `string` | | `publicKey` | `string` | | `signature` | `string` | *** ### UptoXrplPaymentPayload A payment on `x402/upto/xrpl`. #### Properties | Property | Type | | ------ | ------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`UptoXrplPayload`](https://lcp.integraledger.com/reference/api/x402-upto-xrpl.md#uptoxrplpayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | ## Variables ### uptoXrpl > `const` **uptoXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequired); `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)\>; `claims`: `boolean`; `data`: [`PairingData`](https://lcp.integraledger.com/reference/api.md#pairingdata); `id`: `"x402/upto/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402.md#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`X402Read`](https://lcp.integraledger.com/reference/api/aptos.md#x402read); `reference`: (`presented`, `option`, `_given?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `Omit`\<[`XrplChannelRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelref), `"fromLedger"`\>\>; `status`: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements)[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402.md#requestcommitment) \| [`ToolCallCommitment`](https://lcp.integraledger.com/reference/api/x402.md#toolcallcommitment); \}\]; `unplaced`: (`option`) => [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402.md#paymentrequirements); \}\> `x402/upto/xrpl`. The payer broadcasts (`broadcaster` answers `"payer"`): its client submits the channel's create before it presents the payment, and the payment names that channel. `status` reads the create (`xrplChannelStatus`). It has no `build`, the payer's own client opening the channel, and no `recover`, nothing on the ledger carrying H. ## References ### Broadcaster Re-exports [Broadcaster](https://lcp.integraledger.com/reference/api.md#broadcaster) *** ### X402Read Re-exports [X402Read](https://lcp.integraledger.com/reference/api/aptos.md#x402read) --- # @integraledger/lcp/xrpl > XRP Ledger rail pieces: the signed blob, its `InvoiceID` or memo carrying the ATR hash in each scheme's form, the transaction hash computed from the blob, the reads of a payment, an opening, a channel and a close through a bounded reader, and the payment channel's id and claim. Source: https://lcp.integraledger.com/reference/api/xrpl Updated 2026-11-20. Documents @integraledger/lcp 0.6.3 and @integraledger/profile-facilitator 0.5.1. XRP Ledger rail pieces: the signed blob, its `InvoiceID` or memo carrying the ATR hash in each scheme's form, the transaction hash computed from the blob, the reads of a payment, an opening, a channel and a close through a bounded reader, and the payment channel's id and claim. ## Interfaces ### XrplChannelEntry A `PayChannel` ledger entry. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `account` | `readonly` | `string` | | `amount` | `readonly` | `string` | | `destination` | `readonly` | `string` | *** ### XrplChannelRef The read keys of a channel at coverage `none`: the network, the channel the presented payment names, in upper case, the payer it names, the option's payee, and the ledger index the create must come after, which is the caller's. #### Properties | Property | Type | | ------ | ------ | | `channel` | `string` | | `fromLedger` | `number` | | `network` | `` `xrpl:${number}` `` | | `payee` | `string` | | `payer` | `string` | *** ### XrplLanded A transaction as the server answers it: its signed blob and what its metadata shows. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `blob` | `readonly` | `string` | The signed transaction, hex (`tx_blob`); an inner `Batch` transaction's own serialization. | | `createdChannels?` | `readonly` | readonly `string`[] | The ids of the `PayChannel` entries the metadata creates. | | `deletedChannels?` | `readonly` | readonly `string`[] | The ids of the `PayChannel` entries the metadata deletes. | | `delivered?` | `readonly` | [`XrplAmount`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplamount) | `meta.delivered_amount` where the metadata gives one: drops, or an issued or MPT amount. | | `hash` | `readonly` | `string` | The transaction's hash, 64 hex digits, as the server names it. | | `ledgerIndex?` | `readonly` | `number` | The index of the ledger that holds it; absent where the server names none. | | `parent?` | `readonly` | `string` | For an inner `Batch` transaction, the hash of the `Batch` that holds it (`meta.ParentBatchID`). | | `result` | `readonly` | `string` | `meta.TransactionResult`. | | `validated` | `readonly` | `boolean` | Whether the ledger that holds it is validated. | *** ### XrplPage One page of `account_tx`, forward, in binary form: the transactions, the ledgers it covered, and its marker. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `marker?` | `readonly` | `unknown` | `marker`, where more of the range is left to read. | | `max` | `readonly` | `number` | - | | `min` | `readonly` | `number` | `ledger_index_min` and `ledger_index_max` as the server answers them: the ledgers the page's search covered. | | `transactions` | `readonly` | readonly [`XrplLanded`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpllanded)[] | - | *** ### XrplReader Bounded, read-only calls against one network's server. Every failure rejects, for example with `ReaderError` from `@integraledger/lcp/evm`; any rejection reads as unreadable. A call the server refuses because it names ledgers the server does not hold, as rippled on API version 2 refuses `account_tx` from a ledger below those it holds with `lgrIdxMalformed`, rejects with `ReaderError` of kind `history`, which reads as `history-gap`. A call that names a ledger answers with the index of the ledger it read. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `network` | `readonly` | `` `xrpl:${number}` `` | #### Methods ##### accountInfo() > **accountInfo**(`account`, `ledger`): `Promise`\<\{ `ledgerIndex`: `number`; `sequence`: `number`; \} \| \{ `ledgerIndex`: `number`; `notFound`: `true`; \}\> `account_info` at the ledger named: the account's `Sequence`, or no such account (`actNotFound`). ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `ledger` | [`XrplLedgerName`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplledgername) | ###### Returns `Promise`\<\{ `ledgerIndex`: `number`; `sequence`: `number`; \} \| \{ `ledgerIndex`: `number`; `notFound`: `true`; \}\> ##### accountTx() > **accountTx**(`account`, `range`, `marker?`): `Promise`\<[`XrplPage`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplpage)\> `account_tx` for `account`, forward, binary, over the range, resuming at `marker`: one page. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `range` | \{ `max`: `number`; `min`: `number`; \} | | `range.max` | `number` | | `range.min?` | `number` | | `marker?` | `unknown` | ###### Returns `Promise`\<[`XrplPage`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplpage)\> ##### channel() > **channel**(`id`, `ledger`): `Promise`\<[`XrplChannelEntry`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelentry) \| \{ `ledgerIndex`: `number`; `notFound`: `true`; \}\> `ledger_entry` of a `PayChannel` at the ledger named, or no such entry (`entryNotFound`). ###### Parameters | Parameter | Type | | ------ | ------ | | `id` | `string` | | `ledger` | [`XrplLedgerName`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplledgername) | ###### Returns `Promise`\<[`XrplChannelEntry`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelentry) \| \{ `ledgerIndex`: `number`; `notFound`: `true`; \}\> ##### server() > **server**(): `Promise`\<[`XrplServer`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplserver)\> `server_info`. ###### Returns `Promise`\<[`XrplServer`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplserver)\> ##### ticket() > **ticket**(`account`, `ticketSequence`, `ledger`): `Promise`\<\{ `ledgerIndex`: `number`; `present`: `boolean`; \}\> `ledger_entry` of the account's `Ticket` at the ledger named: whether it is present. ###### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `ticketSequence` | `number` | | `ledger` | [`XrplLedgerName`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplledgername) | ###### Returns `Promise`\<\{ `ledgerIndex`: `number`; `present`: `boolean`; \}\> ##### tx() > **tx**(`hash`, `range`): `Promise`\<[`XrplLanded`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpllanded) \| \{ `notFound`: `true`; `searchedAll`: `boolean`; \}\> `tx` by hash, with `min_ledger` and `max_ledger` where a range is given: the transaction, or not found. ###### Parameters | Parameter | Type | | ------ | ------ | | `hash` | `string` | | `range` | \{ `max`: `number`; `min`: `number`; \} \| `null` | ###### Returns `Promise`\<[`XrplLanded`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpllanded) \| \{ `notFound`: `true`; `searchedAll`: `boolean`; \}\> *** ### XrplRef The read keys `reference` returns: the network; the presented transaction's hash, a way to look and never the identity; H; the option's payee, which `reference` takes from the option the payment answers; and, where the payment presents its blob, the payer's instrument and signed body. `fromLedger`, the ledger index the search starts from, the issue ledger, is the caller's. #### Properties | Property | Type | | ------ | ------ | | `fromLedger` | `number` | | `h` | `` `0x${string}` `` | | `network` | `` `xrpl:${number}` `` | | `payee` | `string` | | `signed?` | [`XrplSigned`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplsigned) | | `transaction` | `string` | *** ### XrplServer What `server_info` states: the ledgers the server holds and serves, and the network it serves. #### Properties | Property | Modifier | Type | Description | | ------ | ------ | ------ | ------ | | `completeLedgers` | `readonly` | `string` | `complete_ledgers`, as the server writes it: `"empty"`, or ranges `a-b` and single indexes joined by commas. | | `latest` | `readonly` | `number` | The index of the latest ledger the server serves at the read, validated or not, to which a search reads. | | `networkId?` | `readonly` | `number` | `network_id`, where the server states one. | | `validated` | `readonly` | `number` | `validated_ledger.seq`: the index of the latest validated ledger. | *** ### XrplSigned The payer's instrument and the message it signed, read from a presented blob: the signed `Account`, its `Sequence` or, where `Sequence` is 0, its `TicketSequence`, its `LastLedgerSequence` or null, and the signed body, the blob's fields but `TxnSignature`, `SigningPubKey` and `Signers`, in the codec's canonical encoding, hex. #### Properties | Property | Modifier | Type | | ------ | ------ | ------ | | `account` | `readonly` | `string` | | `body` | `readonly` | `string` | | `lastLedgerSequence` | `readonly` | `number` \| `null` | | `sequence` | `readonly` | `number` | | `ticket?` | `readonly` | `number` | *** ### XrplTxJson #### Indexable > \[`field`: `string`\]: `unknown` #### Properties | Property | Type | | ------ | ------ | | `Account` | `string` | | `InvoiceID?` | `string` | | `LastLedgerSequence?` | `number` | | `Memos?` | `unknown` | | `TransactionType` | `string` | *** ### XrplUnsigned What the wallet signs, and how its signed blob completes the payment. #### Type Parameters | Type Parameter | | ------ | | `P` | #### Properties | Property | Type | | ------ | ------ | | `request` | `object` | | `request.kind` | `"xrpl-tx"` | | `request.txJson` | [`XrplTxJson`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpltxjson) | #### Methods ##### complete() > **complete**(`signedBlob`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `P`\> The payment of the wallet's signed blob, hex, read as `bound` reads it: a blob that does not decode, or is multi-signed, gets the refusal `bound` gives it, and one whose `NetworkID` a node of the option's network does not take, as rippled reads it, is `xrpl/network-mismatch`. ###### Parameters | Parameter | Type | | ------ | ------ | | `signedBlob` | `string` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| `P`\> ## Type Aliases ### XrplAmount > **XrplAmount** = `string` \| \{ `currency`: `string`; `issuer`: `string`; `value`: `string`; \} \| \{ `mpt_issuance_id`: `string`; `value`: `string`; \} An amount as rippled writes it: drops of XRP, an issued currency's value, or an MPT's. *** ### XrplCloseRef > **XrplCloseRef** = `object` The read keys of a reported close: the network, the channel, the close's transaction and the option's payee. #### Properties | Property | Type | | ------ | ------ | | `channel` | `string` | | `network` | [`XrplNetwork`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplnetwork) | | `payee` | `string` | | `phase` | `"close"` | | `transaction` | `string` | *** ### XrplCloseStatus > **XrplCloseStatus** = [`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus) A reported close's read, as the profile `read-status` answers it: the answer `XrplStatus` names. *** ### XrplLedgerName > **XrplLedgerName** = `"validated"` \| `"current"` The ledger an `account_info` or `ledger_entry` call names: the latest validated one, or the current one. *** ### XrplMark > **XrplMark** = `"validated"` The XRP Ledger's one mark, `validated`: a state of a transaction its servers tell apart, the default and the final mark, and the only finality a query names. *** ### XrplNetwork > **XrplNetwork** = `` `xrpl:${number}` `` CAIP-2: `xrpl:` and the chain's NetworkID, 0 to 4294967295. *** ### XrplReached > **XrplReached** = [`XrplMark`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplmark) \| `"current"` What a read reached for a transaction it names: `validated`, the mark, or `current`, a ledger the server serves above the latest validated one, up to the latest ledger the search for H reads on to. `current` is no mark a query names: an act or a lapse read there is `pending`, `below-mark`. *** ### XrplStatus > **XrplStatus** = [`StatusAnswer`](https://lcp.integraledger.com/reference/api.md#statusanswer)\<`number`, [`XrplReached`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplreached)\> An XRPL read, as the profile `read-status` answers it. The position is a ledger index, and so is the search's. ## Variables ### XRPL\_MAX\_BLOB\_BYTES > `const` **XRPL\_MAX\_BLOB\_BYTES**: `16384` = `16_384` The largest signed blob lcp decodes, in bytes: lcp's own bound, read by every XRPL pairing. It holds a Payment or a PaymentChannelCreate signed by the 32 signers a signer list admits at most (rippled `3c72fb54`, `include/xrpl/protocol/STTx.h:49`), with the paths a stock client finds and memos of rippled's 1,024 bytes (`src/libxrpl/protocol/STTx.cpp:697`); rippled's own bound on a transaction, 1 MB (`include/xrpl/protocol/Protocol.h:38`), is no payment's. *** ### XRPL\_MAX\_DEPTH > `const` **XRPL\_MAX\_DEPTH**: `10` = `10` The deepest level a field of a transaction sits at, rippled's limit: its deserializer refuses a field whose depth is above 10 (rippled 3.4.1, `src/libxrpl/protocol/STVar.cpp` L104-108, the `STVar` constructor that reads a `SerialIter`). A top-level field is at level 1, each field inside an STObject or STArray field one level below that field, and an array's member object one level below the array. An end marker that closes its own object or array sits at no level, so an object or array at this level holds no field. *** ### XRPL\_MAX\_PAGES > `const` **XRPL\_MAX\_PAGES**: `16` = `16` The most `account_tx` pages one read takes: lcp's own bound on the calls a read makes. A search with pages left answers `pending`, `search-incomplete`, with the ledger the next read resumes from. *** ### xrplChargeStatus > `const` **xrplChargeStatus**: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> The read of `mpp/charge/xrpl`: `xrplPaymentStatus` of MPP's `InvoiceID`, H itself. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref) | | `reader` | [`XrplReader`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplreader) | | `query` | [`XrplQuery`](https://lcp.integraledger.com/reference/api/mpp.md#xrplquery)\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref)\> | #### Returns `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> *** ### xrplOpenStatus > `const` **xrplOpenStatus**: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> The read of an in-band opening, `mpp/session/xrpl`: `xrplPaymentStatus` of the opening's one LCP memo. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref) | | `reader` | [`XrplReader`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplreader) | | `query` | [`XrplQuery`](https://lcp.integraledger.com/reference/api/mpp.md#xrplquery)\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref)\> | #### Returns `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> *** ### xrplStatus > `const` **xrplStatus**: (`ref`, `reader`, `query`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> The read of `x402/exact/xrpl`: `xrplPaymentStatus` of x402's `InvoiceID`, the SHA-256 of H's LCP string. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref) | | `reader` | [`XrplReader`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplreader) | | `query` | [`XrplQuery`](https://lcp.integraledger.com/reference/api/mpp.md#xrplquery)\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplref)\> | #### Returns `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> ## Functions ### decodeBlob() > **decodeBlob**(`hex`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `hash`: `string`; `tx`: [`XrplTxJson`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpltxjson); \}\> Decodes a signed blob of at most `XRPL_MAX_BLOB_BYTES` bytes, and computes its transaction hash as the ledger does: SHA-512Half over `54584E00` and the blob, in upper case. Before the codec decodes it, a single pass over its fields refuses a blob with a field deeper than `XRPL_MAX_DEPTH`, or with an end marker in an object or array it does not close, as rippled refuses either. The blob must be the canonical serialization of what it decodes to: the codec's encoding of the decoded fields gives back the same bytes, so nothing follows a top-level end marker and every array member is an object. #### Parameters | Parameter | Type | | ------ | ------ | | `hex` | `string` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) \| \{ `hash`: `string`; `tx`: [`XrplTxJson`](https://lcp.integraledger.com/reference/api/xrpl.md#xrpltxjson); \}\> *** ### mppInvoiceId() > **mppInvoiceId**(`h`): `string` The hash's 64 hex digits in upper case, without `0x`: MPP's `methodDetails.invoiceId`. Throws TypeError when `h` is not a 32-byte hash. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `string` *** ### x402InvoiceId() > **x402InvoiceId**(`h`): `Promise`\<`string`\> Uppercase hex of SHA-256 over the UTF-8 bytes of the hash's LCP string: x402's `InvoiceID` for `extra.invoiceId`. Rejects with a TypeError when `h` is not a 32-byte hash. #### Parameters | Parameter | Type | | ------ | ------ | | `h` | `` `0x${string}` `` | #### Returns `Promise`\<`string`\> *** ### xrplChannelId() > **xrplChannelId**(`account`, `destination`, `sequence`): `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The PayChannel id: SHA-512Half of `0x0078` ‖ the source's AccountID ‖ the destination's AccountID ‖ the creating transaction's sequence (or ticket sequence), big-endian; upper-case hex. An address that is not a classic address, or a sequence that is not a UInt32, is `mpp/input-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `account` | `string` | | `destination` | `string` | | `sequence` | `number` | #### Returns `string` \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) *** ### xrplChannelStatus() > **xrplChannelStatus**(`ref`, `reader`, `query`): `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> The read of a channel at coverage `none`, as the profile `read-status` answers it: the `PayChannel` at the validated ledger (`ledger_entry`); then the `account_tx` of the channel's `Account`, or, where the validated ledger does not show the channel, of the payer the presented payment names, from the ledger the create must come after, or the search position the query gives, to the latest ledger the server serves, for the `PaymentChannelCreate` whose metadata creates the channel's entry, or, where the metadata names none, whose `Account`, `Destination` and sequence or ticket give the channel's id. That create is the act where its `Account` is the payer and its `Destination` the payee; one another account opened, or one to another account, took the channel and answers `failed`, `instrument-consumed`; one at or before the query's `after`, `failed`, `before-position`. A channel the validated ledger shows whose create the search, read whole, does not hold is `unreadable`, `history-gap` where the server does not hold the range; where it holds it, the create was made at or before the search's start, so at or before the query's `after` where the search began no later than the ledger after it, `failed`, `before-position`, since `account_tx` lists every transaction of the opener's account, a delegated create and an inner `Batch` create among them. A channel it does not show whose create the search does not hold is `pending`, `not-found`, where the history holds, and `unreadable`, `history-gap` where it does not. `presented` is `yes` where the create's `Account` is the payer the payment names, the create being the one whose metadata made the channel's entry, so on every `settled` answer. #### Parameters | Parameter | Type | | ------ | ------ | | `ref` | [`XrplChannelRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelref) | | `reader` | [`XrplReader`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplreader) | | `query` | [`XrplQuery`](https://lcp.integraledger.com/reference/api/mpp.md#xrplquery)\<[`XrplChannelRef`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplchannelref)\> | #### Returns `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl.md#xrplstatus)\> *** ### xrplClaim() > **xrplClaim**(`channelId`, `drops`): `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) The bytes a channel claim signs: `CLM\0` ‖ channel id (32 bytes) ‖ drops as u64 big-endian. A channel id that is not 64 hex digits, or drops that are not a `bigint` UInt64, is `mpp/input-malformed`. #### Parameters | Parameter | Type | | ------ | ------ | | `channelId` | `string` | | `drops` | `bigint` | #### Returns `Uint8Array`\<`ArrayBuffer`\> \| [`Refusal`](https://lcp.integraledger.com/reference/api.md#refusal) ## References ### XrplQuery Re-exports [XrplQuery](https://lcp.integraledger.com/reference/api/mpp.md#xrplquery)