# Integra Protocol > The Legal Context Protocol's reference implementation: assemble an Agentic Transaction Record (ATR), hash its exact bytes, and bind the hash into x402, MPP and agentic checkout payments. Site: https://lcp.integraledger.com · Index: https://lcp.integraledger.com/llms.txt # Overview > The Legal Context Protocol reference implementation: the ATR, its hash, and the hash bound into payments. Source: https://lcp.integraledger.com/ When one AI agent buys from another, it reads terms, perhaps negotiates, and pays. The **Legal Context Protocol (LCP)** makes the payment prove what was agreed: the payment carries the hash of the agreement's record, so paying is agreeing to that exact record. [`@integraledger/lcp`](https://github.com/IntegraLedger/integra-protocol/tree/main/lcp) is its reference implementation, for TypeScript and JavaScript. It assembles the record, hashes it, and binds the hash into payments on x402, MPP, agentic checkouts and card networks, across EVM chains, Solana, Stellar, the XRP Ledger and every other rail the [rails guide](https://lcp.integraledger.com/guides/rails) lists. ## How it works ```mermaid sequenceDiagram participant B as Buyer participant S as Seller B->>S: request Note over S: assemble the ATR, hash it (H), store the bytes at a link S-->>B: payment challenge carrying H and the link B->>S: fetch the link S-->>B: the ATR's exact bytes Note over B: SHA-256(bytes) equals H, or stop Note over B: build the payment with H in its field, sign it B->>S: payment carrying H Note over S: H read back from the payment equals the H it issued ``` 1. **The seller assembles the record.** The Agentic Transaction Record holds a format marker, a per-transaction id, the values that tie it to this payment, and whatever the parties agreed, byte for byte. 2. **The seller advertises its hash.** H goes into the payment challenge, beside an `https` link to the seller's copy. 3. **The buyer compares before it signs.** It fetches the bytes, hashes them, and signs nothing unless they hash to H. 4. **The payment carries H.** The buyer signs a payment with H in the field its protocol or rail provides: a nonce, a memo, a salt, an invoice field. 5. **Anyone holding the record can match it.** The seller reads H back from the payment, and on most rails from the settlement on chain. The package fixes the bytes, the hash and where H rides. It does not decide what the record says, and it never compares amount, payee, asset, timing or payer with the record's content: that is between the parties, and the record is what they agreed. ## Terms These pages use each term in one sense: | Term | Meaning | | ------------------------------------ | ------------------------------------------------------------------------------------------------------- | | **Agentic Transaction Record (ATR)** | The agreement's record, a JSON document the seller serves. | | **ATR hash (H)** | SHA-256 over the ATR's exact bytes. | | **Legal Context Protocol (LCP)** | The pattern this package implements: the payment carries H, so paying is agreeing to that exact record. | | **Pairing** | A payment protocol, scheme and rail combination, such as `x402/exact/eip155/eip3009`. | | **Binding** | How H rides in a pairing's payment: the field its specification defines. | | **Buyer gate** | The buyer-side check that compares the served bytes with H before anything is signed. | | **Seller** | The party serving the resource. | | **Facilitator** | The x402 role that verifies and settles. | | **Vectors** | The shared test cases that fix the rules byte for byte across languages. | ## Where to start | You are | Read | | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | New to LCP | [Getting started](https://lcp.integraledger.com/getting-started): one x402 payment, both sides, in one program. | | Building a seller | [Seller](https://lcp.integraledger.com/guides/seller): assemble, advertise, check the payment, read the settlement. | | Building a buyer | [Buyer](https://lcp.integraledger.com/guides/buyer) and [the buyer gate](https://lcp.integraledger.com/concepts/buyer-gate). | | Selling by channel, session or subscription | [Channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions). | | Working on one protocol | [x402](https://lcp.integraledger.com/guides/x402), [MPP](https://lcp.integraledger.com/guides/mpp), or [agentic checkouts](https://lcp.integraledger.com/guides/checkouts) for ACP, UCP, AP2, ACK, card networks and A2A. | | Working on one chain | [Rails](https://lcp.integraledger.com/guides/rails): the field H rides in on each chain and network. | | Publishing your terms | [Discovery](https://lcp.integraledger.com/guides/discovery): the document at `/.well-known/legal-context.json`. | | Implementing LCP in another language | [Vectors](https://lcp.integraledger.com/concepts/vectors) and the [vector files](https://lcp.integraledger.com/reference/vectors). | ## The documentation * **Concepts** explain each rule: [the ATR](https://lcp.integraledger.com/concepts/atr), [the ATR hash](https://lcp.integraledger.com/concepts/atr-hash), [binding](https://lcp.integraledger.com/concepts/binding), [pairings](https://lcp.integraledger.com/concepts/pairings), [the buyer gate](https://lcp.integraledger.com/concepts/buyer-gate), [refusals](https://lcp.integraledger.com/concepts/refusals) and [vectors](https://lcp.integraledger.com/concepts/vectors). * **Guides** walk each flow with a program you can run: [seller](https://lcp.integraledger.com/guides/seller), [buyer](https://lcp.integraledger.com/guides/buyer), [channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions), [x402](https://lcp.integraledger.com/guides/x402), [MPP](https://lcp.integraledger.com/guides/mpp), [agentic checkouts](https://lcp.integraledger.com/guides/checkouts), [rails](https://lcp.integraledger.com/guides/rails) and [discovery](https://lcp.integraledger.com/guides/discovery). * **Reference** is generated from the package: [entry points](https://lcp.integraledger.com/reference/entry-points), [pairings](https://lcp.integraledger.com/reference/pairings), [refusal codes](https://lcp.integraledger.com/reference/refusals), [vector files](https://lcp.integraledger.com/reference/vectors) and the [API](https://lcp.integraledger.com/reference/api). Every TypeScript program in these pages is compiled and run against the package in CI, and its output is checked against what the page shows. ## For AI agents The documentation site publishes [`llms.txt`](https://lcp.integraledger.com/llms.txt), an index of every page, [`llms-full.txt`](https://lcp.integraledger.com/llms-full.txt), every page in one file, and each page as Markdown under `/md/`, such as [`/md/getting-started.md`](https://lcp.integraledger.com/md/getting-started.md). ## Source and license The source is at [github.com/IntegraLedger/integra-protocol](https://github.com/IntegraLedger/integra-protocol), under the [Apache-2.0](https://github.com/IntegraLedger/integra-protocol/blob/main/LICENSE) license. The buyer packages are in [`integra-agentic-terms`](https://github.com/IntegraLedger/integra-agentic-terms), and the seller door's contract and connectors in [`integra-agentic-connectors`](https://github.com/IntegraLedger/integra-agentic-connectors). --- # Getting started > Install @integraledger/lcp, assemble an ATR, and carry its hash through one x402 payment. Source: https://lcp.integraledger.com/getting-started This page takes you from an empty folder to one x402 payment whose signed nonce is the hash of the agreement's record. You play both parties, the seller and the buyer, in one program. Nothing touches a network: a `Map` stands in for the seller's storage, and a random key for the buyer's wallet. Three terms carry the whole page: * The **Agentic Transaction Record (ATR)** is the agreement's record, a JSON document the seller serves. * The **ATR hash (H)** is SHA-256 over the ATR's exact bytes. * **Binding** is how H rides in a pairing's payment: the field its specification defines. Here it is the `nonce` of the EIP-3009 authorization the buyer signs. ## Requirements * Node.js `>=26.10.0`. Node runs the TypeScript files on this page directly, by stripping their types. * An ESM project. With TypeScript, set `"module"` and `"moduleResolution"` to `"nodenext"` (or `"moduleResolution"` to `"bundler"`), so the package's subpath exports resolve. ## Install ```sh mkdir lcp-start && cd lcp-start npm init -y npm pkg set type=module npm install @integraledger/lcp viem ``` `@integraledger/lcp` is the package; [viem](https://viem.sh) signs for the buyer in step 3. Any EIP-712 signer works in its place: the package holds no key and signs nothing. ## 1. Assemble an ATR The seller writes the record. `assemble(id, binding, content)` writes one JSON object in a fixed order: the format marker, the per-transaction id, the binding slot that ties the record to one payment, and then the parties' content, byte for byte as given. It returns the bytes and H. Save this as `assemble.ts` and run `node assemble.ts`: ```ts import { assemble } from "@integraledger/lcp"; const terms = new TextEncoder().encode('{"text":"One market report for 10000 base units of USDC."}'); const atr = await assemble("0f8fad5b-d9cb-469f-a165-70867728950e", ["x402", { accepts: [] }], [["terms", terms]]); if ("refused" in atr) throw new Error(atr.code); console.log(new TextDecoder().decode(atr.bytes)); console.log(atr.atrHash); ``` ```text {"atrVersion":"1","id":"0f8fad5b-d9cb-469f-a165-70867728950e","x402":{"accepts":[]},"terms":{"text":"One market report for 10000 base units of USDC."}} 0x505084d776e5fe9e674b530133325906510c09f6cab2ac5e94b416c0f0917189 ``` This page fixes the id so your output matches. For a real transaction, pass `newAtrId()`, a random RFC 9562 UUID: the fresh id makes every H unique, even for identical terms. Every function in the package returns its result or a [refusal](https://lcp.integraledger.com/concepts/refusals), a value with a code, so check for `refused` before you use a result. ## 2. Compare the bytes with H The buyer never trusts a record it has not hashed. It fetches the bytes the seller serves, hashes them, and compares the result with the H the seller advertised. One changed byte, here the final `.` of the terms turned into `!`, gives another hash: ```ts import { assemble, hash, hashEquals } from "@integraledger/lcp"; const terms = new TextEncoder().encode('{"text":"One market report for 10000 base units of USDC."}'); const atr = await assemble("0f8fad5b-d9cb-469f-a165-70867728950e", ["x402", { accepts: [] }], [["terms", terms]]); if ("refused" in atr) throw new Error(atr.code); const served = atr.bytes.slice(); console.log("as served:", hashEquals(await hash(served), atr.atrHash)); served[served.length - 4] = 0x21; console.log("one byte changed:", hashEquals(await hash(served), atr.atrHash)); ``` ```text as served: true one byte changed: false ``` `hashEquals` compares the 32 bytes the two strings decode to, in either case. This comparison is the [buyer gate](https://lcp.integraledger.com/concepts/buyer-gate): if it fails, the buyer signs nothing. ## 3. Carry H through one x402 payment The whole exchange, on `x402/exact/eip155/eip3009`: USDC on Base Sepolia, paid with an EIP-3009 authorization. Save this as `pay.ts` and run `node pay.ts`: ```ts import { assemble, hash, hashEquals, newAtrId } from "@integraledger/lcp"; import { exactEip3009, requestCommitment, tie, type PaymentRequired, type PaymentRequirements, } from "@integraledger/lcp/x402"; import type { TypedDataDefinition } from "viem"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; // Seller: the x402 challenge for GET /v1/report, with one option. const option: PaymentRequirements = { scheme: "exact", network: "eip155:84532", amount: "10000", asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", payTo: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", maxTimeoutSeconds: 60, extra: { name: "USDC", version: "2" }, }; const challenge: PaymentRequired = { x402Version: 2, resource: { url: "https://api.seller.example/v1/report" }, accepts: [option], }; // Seller, a: assemble the ATR for this request. Its binding slot records the options and the request. const request = await requestCommitment({ method: "GET", target: "/v1/report", body: new Uint8Array() }); if ("refused" in request) throw new Error(request.code); const terms = new TextEncoder().encode('{"text":"One market report for 10000 base units of USDC."}'); const atr = await assemble(newAtrId(), tie(challenge.accepts, request), [["terms", terms]]); if ("refused" in atr) throw new Error(atr.code); // Seller, b: store the bytes at an https link before the challenge goes out. const link = `https://atr.seller.example/${atr.atrHash}`; const storage = new Map([[link, atr.bytes]]); // Seller, c: advertise H and the link in the challenge's legalContext extension. const advertised = exactEip3009.advertise(challenge, atr.atrHash, link, option); if ("refused" in advertised) throw new Error(advertised.code); const info = advertised.extensions?.["legalContext"]?.info as { value?: string } | undefined; console.log("1. challenge carries H:", info?.value === atr.atrHash); // Buyer, d: read H and the link, fetch the bytes, and compare. const offer = exactEip3009.read(advertised); if ("refused" in offer) throw new Error(offer.code); const served = storage.get(offer.link); if (served === undefined || !hashEquals(await hash(served), offer.h)) throw new Error("decline: hash-mismatch"); console.log("2. the served bytes hash to H"); // Buyer, e: build the authorization with H as its nonce, sign it, and complete the payment. const payer = privateKeyToAccount(generatePrivateKey()); const unsigned = await exactEip3009.build( { required: advertised, accepted: offer.offer.options[0]!, from: payer.address, now: Math.floor(Date.now() / 1000) }, offer.h, ); if ("refused" in unsigned) throw new Error(unsigned.code); const { primaryType, message } = unsigned.typedData; console.log("3. the buyer signs", primaryType, "with nonce H:", message.nonce === offer.h); const payment = unsigned.complete(await payer.signTypedData(unsigned.typedData as TypedDataDefinition)); if ("refused" in payment) throw new Error(payment.code); // Seller, f: read H back from what the buyer signed, and match it to the H it issued. const bound = await exactEip3009.bound(payment); if (typeof bound !== "string") throw new Error(bound.code); console.log("4. the payment is bound to the ATR:", hashEquals(bound, atr.atrHash)); ``` ```text 1. challenge carries H: true 2. the served bytes hash to H 3. the buyer signs TransferWithAuthorization with nonce H: true 4. the payment is bound to the ATR: true ``` What each step did: | Step | Side | Call | What it gives | | ---- | ------ | -------------------------------------- | ----------------------------------------------------------------------------------------- | | a | seller | `requestCommitment`, `tie`, `assemble` | The ATR's bytes and H, with the challenge's options and the request in the binding slot. | | b | seller | your storage | The bytes at an `https` link, before any buyer can ask for them. | | c | seller | `advertise` | The challenge with `extensions.legalContext` set to H and the link. | | d | buyer | `read`, `hash`, `hashEquals` | H and the link from the challenge, and the check that the served bytes hash to H. | | e | buyer | `build`, `complete` | EIP-712 typed data whose `nonce` is H, and the x402 payment around the buyer's signature. | | f | seller | `bound` | H read back from the signed authorization. | On a live network, the buyer sends `payment` in x402's `PAYMENT-SIGNATURE` header, the seller's facilitator verifies and settles it, and the token contract's `AuthorizationUsed` event carries H on chain. The [seller guide](https://lcp.integraledger.com/guides/seller) continues from step f to the settlement read. ## Next * **Building a seller?** Read [Seller](https://lcp.integraledger.com/guides/seller), then [x402](https://lcp.integraledger.com/guides/x402) or [MPP](https://lcp.integraledger.com/guides/mpp). * **Building a buyer?** Read [Buyer](https://lcp.integraledger.com/guides/buyer) and [the buyer gate](https://lcp.integraledger.com/concepts/buyer-gate). The buyer packages in [`integra-agentic-terms`](https://github.com/IntegraLedger/integra-agentic-terms) give you the gate ready-made. * **Paying on another rail?** [Rails](https://lcp.integraledger.com/guides/rails) gives the field H rides in on each chain and network. * **Want the details?** [The ATR](https://lcp.integraledger.com/concepts/atr), [the ATR hash](https://lcp.integraledger.com/concepts/atr-hash) and [binding](https://lcp.integraledger.com/concepts/binding) explain each rule the program above relies on. --- # The Agentic Transaction Record > What an ATR is, and how assemble writes its exact bytes. Source: https://lcp.integraledger.com/concepts/atr An **Agentic Transaction Record (ATR)** is the agreement's record: one JSON document that the seller serves and the buyer fetches before it pays. The payment carries the ATR's hash, so paying is agreeing to that exact record. This package decides nothing about what an ATR says. It fixes only three things: a format marker, a per-transaction identifier, and the values that tie the record to one payment. Everything else is the parties' content, carried exactly as given. ## The byte layout `assemble` writes one UTF-8 JSON object with its members in a fixed order: | Position | Member | Value | | -------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1 | `atrVersion` | Always the string `"1"`. | | 2 | `id` | The per-transaction identifier you pass, as a JSON string. `newAtrId()` gives a random RFC 9562 version 4 UUID. | | 3 | the binding slot | The values that tie this record to one payment, written with `JSON.stringify`. The pairing's `tie` gives the slot: `x402` for x402, `mpp` for MPP, and so on. | | 4 onward | the party slots | Each party slot's bytes, exactly as received, in the order given. | ```mermaid flowchart LR A["atrVersion"] --> B["id"] B --> C["binding slot: the payment's values"] C --> D["party slots: the parties' bytes, untouched"] D --> E["SHA-256 over every byte: H"] ``` The party slots are never parsed into values, re-serialised or canonicalised. `assemble` checks only that each one holds exactly one JSON value in well-formed UTF-8, then copies its bytes. A seller that stores the returned bytes and a buyer that fetches them hash the same thing. ## Assembling an ATR This example assembles the ATR of the package's first core vector, and prints its bytes and its hash: ```ts import { assemble } from "@integraledger/lcp"; const utf8 = new TextEncoder(); const atr = await assemble( "6f1c2b0e-8d4a-4c3b-9e2f-1a7d5c9b3e40", ["bind", { k: "v", n: 7, list: ["a", "b"] }], [ ["terms", utf8.encode('"Pay 10000 base units of USDC for one report."')], ["seller", utf8.encode('{"name":"Acme Reports"}')], ], ); if ("refused" in atr) throw new Error(atr.code); console.log(new TextDecoder().decode(atr.bytes)); console.log(atr.atrHash); ``` ```text {"atrVersion":"1","id":"6f1c2b0e-8d4a-4c3b-9e2f-1a7d5c9b3e40","bind":{"k":"v","n":7,"list":["a","b"]},"terms":"Pay 10000 base units of USDC for one report.","seller":{"name":"Acme Reports"}} 0xf693f8353bd93131403120d11e849c7646ad8976857560b9f72ac2ebe08de12f ``` The same inputs always give the same bytes. A party slot keeps its own spacing and member order: a slot received as `{ "b": 1, "a": 2 }` is written with that spacing and in that order. ## The rules `assemble` enforces `assemble(id, binding, content, limits?)` returns `{ bytes, atrHash }`, or a [refusal](https://lcp.integraledger.com/concepts/refusals) that names the first rule an input breaks: | Rule | Refusal | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | | Every slot name matches `^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$`. | `core/slot-name` | | No slot is named `atrVersion` or `id`, and no party slot takes the binding slot's name. | `core/slot-reserved` | | No two party slots share a name. | `core/slot-duplicate` | | Each party slot's bytes are well-formed UTF-8 without a byte-order mark, and hold exactly one JSON value (RFC 8259) nested at most 64 levels deep. | `core/content-not-json` | | The binding value is a JSON value that `JSON.stringify` writes exactly: every number a safe integer, every string free of unpaired surrogates, nested at most 64 levels deep. | `core/binding-not-json` | | At most 64 party slots, and the whole record at most `limits.maxBytes` bytes (1 MiB by default, and never more than 1 MiB). | `core/too-large` | ## Who stores it The ATR is delivered, not kept by this package. The seller writes the bytes to its own storage and serves them at an `https` link, and the buyer keeps its own copy. `assemble` holds nothing after it returns. ## Next * [The ATR hash](https://lcp.integraledger.com/concepts/atr-hash): the hash of these bytes, and the forms it is written in. * [Binding](https://lcp.integraledger.com/concepts/binding): how the hash rides in a payment. --- # The ATR hash > SHA-256 over the ATR's exact bytes, the forms it is written in, and how two hashes are compared. Source: https://lcp.integraledger.com/concepts/atr-hash The **ATR hash (H)** is SHA-256 over the ATR's exact bytes: the bytes the seller serves, as they arrive. Nothing is parsed, trimmed or re-encoded before hashing. `hash(bytes)` computes it, and `assemble` returns it beside the bytes it wrote. Every ATR carries its own random `id`, so two ATRs with the same terms still have different hashes. H is unpredictable before the seller issues it and unique to one transaction. ## The forms of H The same 32 bytes are written in four forms. The package writes every hash in lowercase and reads either case. | Form | Example | Written by | Read by | | ----------------------- | -------------------------------------------------------------------------------- | ------------------ | --------------------------- | | Hex | `0xba7816bf…f20015ad` | `hash`, `assemble` | `hashEquals`, every `bound` | | LCP string (`LCP §8.1`) | `lcp:sha256:0xba7816bf…f20015ad` | `toLcpString` | `fromLcpString` | | Structured (`LCP §8.1`) | `{"legalContext":{"type":"sha256","value":"0x…","legalContextUrl":"https://…"}}` | `toLegalContext` | `fromLegalContext` | | Raw bytes | 32 bytes | `toRawBytes` | `fromRawBytes` | The structured form puts the link to the seller's copy beside the hash. `toLegalContext(h, url, "snake")` writes the link as `legal_context_url` for protocols that use snake case, and `fromLegalContext` reads either spelling. ```ts import { fromLcpString, hash, hashEquals, toLcpString, toLegalContext, toRawBytes } from "@integraledger/lcp"; const h = await hash(new TextEncoder().encode("abc")); console.log(h); console.log(toLcpString(h)); console.log(JSON.stringify(toLegalContext(h, "https://atr.seller.example/abc"))); console.log(toRawBytes(h).length); const upper = `0x${h.slice(2).toUpperCase()}`; console.log(hashEquals(h, upper), fromLcpString(toLcpString(h)) === h); ``` ```text 0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad lcp:sha256:0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad {"legalContext":{"type":"sha256","value":"0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad","legalContextUrl":"https://atr.seller.example/abc"}} 32 true true ``` ## Comparing two hashes `hashEquals(a, b)` is the one comparison (`LCP §2.5`). It is true only when both strings are `0x` followed by 64 hex digits, in either case, and they decode to the same 32 bytes. Anything else, including a hash in another form, is false. It compares every byte, whatever the first difference. Compare with `hashEquals`, never with `===`: a hash that arrives in upper case is the same hash. ## The link The link beside H is an `https` URL that serves the ATR's exact bytes. `isHttpsLink` is the one rule every pairing applies to it: * the string holds no whitespace, control character or backslash; * it parses as an absolute URL whose scheme is `https`, in either case; * its authority has a host, a DNS name or an IP literal, and no user information. A pairing refuses a link of another scheme as `/link-not-https`, and any other link that fails the rule as `/legal-context-malformed`. A link is at most 2048 characters. ## Next * [Binding](https://lcp.integraledger.com/concepts/binding): where H rides in each payment. * [The buyer gate](https://lcp.integraledger.com/concepts/buyer-gate): comparing the served bytes with H before signing. --- # Binding > How the ATR hash rides in a payment, the binding patterns, and what each binding proves. Source: https://lcp.integraledger.com/concepts/binding **Binding** is how H rides in a pairing's payment: the field its specification defines. The seller places H where the protocol or rail provides a place, and the buyer approves a payment that carries H, or carries a value from which anyone holding the ATR can confirm exactly that H. Binding is the whole of what this package checks about a payment. It never compares amount, payee, asset, timing or payer with the ATR's content. A discrepancy between the payment and the record is between the parties, and the record is what they agreed to. ## Where H rides Each pairing places H in one field. Some examples, all from the package's own pairings: | Pairing | Where H rides | | ------------------------------ | ------------------------------------------------------------------------------------------ | | `x402/exact/eip155/eip3009` | The `nonce` of the EIP-3009 authorization the payer signs. | | `x402/exact/solana` | The option's `extra.memo`, written by the payer as the transaction's one Memo instruction. | | `x402/exact/xrpl` | The Payment's `InvoiceID`, which is SHA-256 of H's LCP string. | | `mpp/charge/evm/authorization` | The MPP challenge `id`, from which the signed nonce is derived. | | `x402/batch-settlement/eip155` | The channel configuration's `salt`, which every signature in the channel signs. | | `card/visa-tap` | An `lcp-hash` field covered by the agent's `agent-payer-auth` message signature. | The [pairings reference](https://lcp.integraledger.com/reference/pairings) gives every pairing with the sentence its record states. ## The patterns Every pairing declares one binding pattern in its `pattern.pattern`. The six this package's pairings use: | Pattern | What it means in this package's pairings | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `native-field` | H itself, or its LCP string, sits in a field the protocol or rail defines: a nonce, memo, note, remark, salt, session id or invoice field. | | `id-reuse` | An identifier the payment already carries is derived from H: MPP's challenge id through the signed nonce, an escrow's salt, the XRPL `InvoiceID`, or a card checkout's hash. | | `opaque-challenge` | H rides in the challenge or checkout the seller issues, and what the buyer presents echoes it or commits to it. | | `truncated-field` | A signed or landed field holds part of H: its first 8 bytes, or its low 250 bits. Anyone holding the ATR confirms H from it; nothing recovers H from it. | | `protocol-extension` | H rides in a protocol extension: a field the agent's message signature covers, or an extension echoed on each request. | | `http-advisory` | H and its link are advertised in the exchange, and nothing the buyer signs or the rail carries holds H. | The `LcpPattern` type also names `overlay-contract` and `sidecar-attestation`. No pairing in this package uses them. ## What each binding proves Each pairing's `pattern` record states what a payment through it shows, and never claims more: | Field | Meaning | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pattern` | The binding pattern above. | | `buyerSigns` | The buyer's signature covers H, or a value derived from H. | | `onChain` | H itself is on chain after settlement. | | `publicProof` | Settlement leaves a public record that commits to H. | | `zeroPartyRecoverable` | H can be read back from the settled transaction alone, without either party (the pairing's `recover`). | | `forwardIndexable` | A search by H finds the settlement. | | `profile` | The LCP profile that defines the binding, where one does. The profiles ship in the package's [`profiles/`](https://github.com/IntegraLedger/integra-protocol/tree/main/lcp/profiles). | | `instrument` | `"landed"` where the buyer presents standing authority that is redeemed once per payment, so a payment is the transfer that lands. | | `canonical` | A flag the record declares. Nothing in this package reads it. | | `proves` | One paragraph stating what the payment shows and what it does not. | Where the buyer's approval does not sign H, the record says so, and says what the payment does show. For example, `x402/exact/eip155/permit2` states: > The payer signed a Permit2 witness transfer whose nonce is this ATR's hash, with the scheme's x402 proxy as spender > and the payee in the witness. Permit2 verified the signature when the proxy executed the transfer, and the hash is > in the settlement transaction's calldata as the Permit2 nonce; no event carries it. This does not show that amount, > payee, asset or timing match the ATR's content. This example prints the pattern record of every pairing whose buyer does not sign H: ```ts import { BINDINGS } from "@integraledger/lcp"; const unsigned = BINDINGS.filter((b) => !b.pattern.buyerSigns).map((b) => `${b.id} (${b.pattern.pattern})`); console.log(unsigned.length > 0, unsigned.includes("mpp/charge/stripe (opaque-challenge)")); ``` ```text true true ``` ## Binding the request too On x402, the ATR's binding slot also records the request the challenge answers: its method, path, query and a SHA-256 of its body (`requestCommitment`), beside every option the challenge offers, exactly as issued (`tie`). On MPP, the binding slot records every challenge's bound parameters as issued. H therefore commits to the payment options and the request, as well as to the parties' content. ## Next * [Pairings](https://lcp.integraledger.com/concepts/pairings): the members every pairing has. * [Rails](https://lcp.integraledger.com/guides/rails): where H rides on each chain and payment network. --- # Pairings > A payment protocol, scheme and rail combination, the members every pairing has, and the registry. Source: https://lcp.integraledger.com/concepts/pairings A **pairing** is a payment protocol, scheme and rail combination, such as `x402/exact/eip155/eip3009`. Its id reads from the protocol outward: the surface (`x402`), the scheme or intent (`exact`), then the rail and its method (`eip155`, `eip3009`). Each pairing is one frozen object that carries the whole binding for that combination, on both sides of the payment. The package holds 67 pairings on seven surfaces: `x402`, `mpp`, `acp`, `ucp`, `ap2`, `ack` and `card`. The [pairings reference](https://lcp.integraledger.com/reference/pairings) lists each one, generated from the registry. ## The members Every pairing has these members. The types differ per surface; the roles do not. | Member | Side | What it does | | ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | both | The pairing's id. | | `pattern` | both | The [binding record](https://lcp.integraledger.com/concepts/binding#what-each-binding-proves): the pattern and what a payment through this pairing proves. | | `claims` | seller | `true` when what the buyer presents carries a value bound to H that `bound` reads; `false` when it does not, and a seller has nothing in the payment itself to match. | | `unplaced(option)` | seller | The option as the seller issued it, before the pairing's carrier was placed in it. | | `tie(...)` | seller | The ATR's binding slot: `[slot, value]`, the values that tie the record to this payment. | | `advertise(doc, h, link, offer, agreementUrl?)` | seller | A copy of the challenge or checkout with H, the link and, where the pairing has one, the carrier placed. | | `read(doc)` | buyer | H, the link, the agreement URL when one is present, and the options this pairing can pay, from an advertised document. | | `build(choice, h)` | buyer | What the buyer's signer signs, with H in its place, and a `complete` that turns the signature into the payment. | | `bound(presented)` | seller | H as it appears in what the buyer presented. | Pairings that settle on a rail the package can read also have: | Member | What it does | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `reference(presented)` | The read keys for finding this payment's settlement later: the network, and the log, transfer or transaction that carries H. | | `status(ref, reader)` | The settlement's state, read through a bounded reader you supply: settled with its finality, pending, or failed with the reason. | | `recover(tx, reader)` | H read back from a settled transaction alone, where the rail keeps it (`pattern.zeroPartyRecoverable`). | Some pairings carry members for their own shape of payment: | Member | Where | What it does | | ---------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `carrier` | pairings that place H in the option or request | The path of the field that carries H, or `null` where no option field does. | | `channel` | channels, sessions and subscriptions | `kind` classifies a later payment as the opening, a payment within, or the close; `ref` names the channel; `boundWithin` reads H from a payment within, where one carries it; `until` gives the channel's end, where it has one. | | `buildWithin` | channels and sessions | Builds a later payment within an open channel. | | `closeRef` | sessions and subscriptions | The read keys of the channel's close. | | `landedTx`, `fetchPresented` | push-mode pairings | The transaction a credential names, and the credential completed with that landed transaction. | | `txId` | rails that spell one transaction id several ways | The one spelling a record keeps. `canonicalTx(binding, tx)` applies it. | | `advertiseBeforeCarrier` | pairings whose carrier the seller writes after H | `advertise`'s checks and placement, without the checks on that carrier. | ## The registry `BINDINGS` holds every pairing. `pairingOf(option)` names the x402 pairing that serves an x402 option; MPP's `pairingsOf(challenge)` names the MPP pairings a challenge offers. ```ts import { BINDINGS, pairingOf } from "@integraledger/lcp"; import type { PaymentRequirements } from "@integraledger/lcp/x402"; const option: PaymentRequirements = { scheme: "exact", network: "eip155:84532", amount: "10000", asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", payTo: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", maxTimeoutSeconds: 60, extra: { name: "USDC", version: "2" }, }; console.log(pairingOf(option)); console.log(pairingOf({ ...option, extra: { ...option.extra, assetTransferMethod: "permit2" } })); console.log([...new Set(BINDINGS.map((b) => b.id.split("/")[0]))].sort().join(" ")); ``` ```text x402/exact/eip155/eip3009 x402/exact/eip155/permit2 ack acp ap2 card mpp ucp x402 ``` ## What no pairing serves `pairingOf` returns `undefined` for an option no pairing serves, and each pairing's `read` refuses a document in which it can pay no option (`x402/no-payable-option` on x402). Where a protocol gives the buyer nothing to sign, the pairing says so instead of inventing a place: ACK's `build` and `bound` refuse `ack/no-signed-place`. ## Next * [The buyer gate](https://lcp.integraledger.com/concepts/buyer-gate): what the buyer checks before `build`. * [Seller](https://lcp.integraledger.com/guides/seller) and [Buyer](https://lcp.integraledger.com/guides/buyer): the members in order, in a working flow. --- # The buyer gate > Compare the served bytes with the hash before anything is signed. Source: https://lcp.integraledger.com/concepts/buyer-gate The **buyer gate** is the buyer-side check that compares the served bytes with H before anything is signed. It is the one step that makes paying mean agreeing: the buyer signs only a payment bound to a record it has fetched, hashed and kept. ```mermaid sequenceDiagram participant B as Buyer participant S as Seller B->>S: request the resource S-->>B: 402 challenge carrying H and the link B->>S: fetch the link S-->>B: the ATR's exact bytes Note over B: SHA-256 over the bytes received, compared with H alt the hashes differ, or the fetch fails Note over B: decline, and sign nothing else the hashes are equal Note over B: build the payment with H in its place, then sign B->>S: the payment, carrying H end ``` ## The steps 1. **Read.** The pairing's `read(doc)` gives H, the link, and the options this pairing can pay. A document without a well-formed hash and `https` link is refused before anything is fetched. 2. **Fetch.** Fetch the link and keep the bytes exactly as received. Bound the fetch: this package's shared vectors fix a limit of 1 MiB on the body, a 10-second deadline, and no redirects. 3. **Compare.** `hashEquals(await hash(bytes), h)`. On any difference, stop: nothing is signed. 4. **Build and sign.** The pairing's `build(choice, h)` returns what the signer signs, with H in its place. Pass the H you compared, never a value read again from the document. 5. **Finish.** `complete(signature)` gives the payment. Before sending it, `bound(payment)` reads H back from what was signed; it must equal the H you compared. 6. **Keep the bytes.** The buyer's copy of the ATR is its record of what it agreed to. ## One changed byte The comparison is over bytes, not meaning. Re-serialising the same JSON, or changing one byte, gives another hash: ```ts import { hash, hashEquals } from "@integraledger/lcp"; const utf8 = new TextEncoder(); const served = utf8.encode('{"atrVersion":"1","id":"0f8fad5b-d9cb-469f-a165-70867728950e","terms":"10000 units"}'); const h = await hash(served); const reformatted = utf8.encode(JSON.stringify(JSON.parse(new TextDecoder().decode(served)), null, 1)); const edited = served.slice(); edited[served.length - 3] = 0x31; console.log(hashEquals(await hash(served), h)); console.log(hashEquals(await hash(reformatted), h)); console.log(hashEquals(await hash(edited), h)); ``` ```text true false false ``` ## The gate as a package This package gives the gate's pieces: `read`, `hash`, `hashEquals`, `build` and `bound`. The buyer packages in [`integra-agentic-terms`](https://github.com/IntegraLedger/integra-agentic-terms) assemble them into one gate with a bounded fetch and named declines, for TypeScript, Python and MCP clients. They follow the rows of [`vectors/buyer.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/buyer.json), which this package ships: | Row outcome | When | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | `hash-mismatch` | The served bytes do not hash to H: one changed byte, the same JSON written another way, or an agreement resource advertising another ATR's hash. | | `signed-not-bound` | What the signer returned does not carry the H the buyer compared. | | `offer-unreadable` | The pairing's `read` refused the document; the row carries its refusal code. | | `link-not-https` | The link or the agreement URL is not `https`. Nothing is fetched. | | `atr-unfetchable` | The fetch redirected, returned an error status, failed, or did not answer in time. | | `atr-too-large` | The body is larger than 1 MiB. The fetch is cancelled. | | `signer-failed` | The signer rejected. | | `no-payable-option` | No option is payable by the buyer's accounts. Nothing is fetched. | | `pairing-not-supported` | The pairing id is not one the gate implements. | | `agreement-pending` | An agreement payment was made and its receipt did not arrive in time; the full payment is not signed. | | `agreement-failed` | The agreement's receipt names another ATR's hash; the full payment is not signed. | ## The agreement URL Where a pairing's payment carries H in nothing public, the seller may advertise an **agreement URL** (`legalContextAgreementUrl`) beside the link. The buyer first pays that URL, whose payment carries H publicly, and pays the full payment only after its `200` receipt names the same H. Where the chosen pairing's payment is itself a public proof of H (`pattern.publicProof`), the buyer does not pay the agreement URL. The buyer vector rows `BA1` to `BA7` fix this order. ## Next * [Buyer](https://lcp.integraledger.com/guides/buyer): the gate in code, step by step. * [Vectors](https://lcp.integraledger.com/concepts/vectors): running the shared rows. --- # Refusals > Every failure is a value with a code. Source: https://lcp.integraledger.com/concepts/refusals Failures are values. A function in this package returns its result, or a **refusal**: a plain object that names what is wrong with its input. ```ts no-check type Refusal = { refused: true; code: string }; ``` A code is `/`, such as `core/slot-name`, `x402/link-not-https` or `svm/memo-not-lcp`. The namespace is the entry point or rail that refused. The same reason means the same thing on every surface: `link-not-https` is always a link of another scheme, and `legal-context-malformed` is always a hash, link or agreement URL that does not read. The [refusal code reference](https://lcp.integraledger.com/reference/refusals) lists every code with its meaning. ## Checking a result Test for `refused` before using a result. Where a result is a string, such as the hash `bound` returns, test its type: ```ts import { assemble, newAtrId } from "@integraledger/lcp"; const result = await assemble(newAtrId(), ["bind", {}], [["id", new TextEncoder().encode("{}")]]); if ("refused" in result) { console.log(result.code); } else { console.log(result.atrHash); } ``` ```text core/slot-reserved ``` ## Where the core throws Three core functions take a value the caller controls completely, and throw a `TypeError` when it is wrong: `toLcpString`, `toLegalContext` and `toRawBytes` throw when the hash is not 32 bytes, and `toLegalContext` also when the link is not an `https` URL. Their `from…` counterparts return `null` instead of throwing. ## Readers The functions that read a rail (`status`, `recover`, `fetchPresented`) take a reader you supply, so the network calls are yours. A reader that fails, times out or answers for another network is never a failed payment: `status` returns a pending state with the reason `unreadable`, and a later read can settle it. ## Next * [Refusal codes](https://lcp.integraledger.com/reference/refusals): every code, with its meaning. --- # Vectors > The shared test cases that fix the rules byte for byte across languages. Source: https://lcp.integraledger.com/concepts/vectors **Vectors** are the shared test cases that fix the rules byte for byte across languages. The package ships them in `vectors/`, one JSON file per entry point or pairing. Any implementation of the Legal Context Protocol, in any language, that passes them assembles the same bytes, computes the same hashes, and places and reads H in the same fields as this package. Every expected value in a vector file comes from outside this package: a specification's published example, a standard's test value such as SHA-256 of `"abc"` from FIPS 180-2, a transaction read from a live network, or an independent tool (Python's `json` and `hashlib`, `sha256sum`, `openssl`, viem, eth-account, a rail's own SDK). Each file's `about` names its sources. ## What they fix | Area | Files | What the rows fix | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | The core | `core-vectors.json` | The ATR's exact bytes and hash for given inputs, each `assemble` refusal, the https-link rule, and the JSON nesting cap. | | The buyer gate | `buyer.json` | What a buyer does with an advertised challenge: when it signs, and each decline. | | Each pairing | `x402-*.json`, `mpp-*.json`, `acp-checkout.json`, `ucp.json`, `ap2-checkout-mandate.json`, `ack-payment-request.json`, `card.json` | The placed challenge, what the payer signs with H in it, H read back from the payment, and the settlement read. | | Shared readers | `sd-jwt.json`, `decoder-caps.json`, `discovery.json`, `a2a-legal-context.json` | The SD-JWT reader, the decoders' limits, the discovery document and the A2A extension. | The [vector files reference](https://lcp.integraledger.com/reference/vectors) lists every file with its `about`. ## Running them The files ship inside the package, beside `dist/`. This example runs the core rows of `core-vectors.json` through `assemble` and checks each expected hash: ```ts import { readFile } from "node:fs/promises"; import { assemble, type Json } from "@integraledger/lcp"; const url = new URL("../vectors/core-vectors.json", import.meta.resolve("@integraledger/lcp")); const core = JSON.parse(await readFile(url, "utf8")) as { vectors: { name: string; id?: string; binding?: [string, Json]; content?: [string, string][]; expectHash: string }[]; }; for (const v of core.vectors) { if (v.id === undefined || v.binding === undefined || v.content === undefined) continue; const content = v.content.map(([slot, hex]) => [slot, Uint8Array.from(Buffer.from(hex, "hex"))] as const); const atr = await assemble(v.id, v.binding, content); console.log(v.name, !("refused" in atr) && atr.atrHash === v.expectHash); } ``` ```text V1 true V2 true V3 true ``` The package's own test suite runs every file this way, in full. The buyer packages in [`integra-agentic-terms`](https://github.com/IntegraLedger/integra-agentic-terms) run the same files from TypeScript and from Python, so the rules hold in both languages. ## Plants A row marked `plant` is a deliberate wrong input with a known outcome: bytes one changed byte away from the ATR, a receipt with the hash in the wrong topic, an agreement resource advertising another ATR's hash. A check that accepts a plant is broken, whatever else it passes. --- # Seller > Assemble the ATR, advertise its hash, check the payment, and read the settlement. Source: https://lcp.integraledger.com/guides/seller The **seller** is the party serving the resource. Its side of the binding has four steps: assemble the ATR for this request, advertise H in the challenge, read H back from the payment it receives, and read the settlement from the rail. This guide walks them on x402 with `x402/exact/eip155/eip3009`. Every pairing has the same members, so the shape is the same on every surface. ```mermaid sequenceDiagram participant B as Buyer participant S as Seller participant St as Seller's storage participant F as Facilitator B->>S: GET /v1/quote Note over S: requestCommitment, tie, assemble S->>St: write the ATR's bytes at the link Note over S: advertise H and the link in the 402 S-->>B: 402 PaymentRequired B->>S: the payment, carrying H Note over S: bound(payment) equals the H it issued S->>F: verify and settle F-->>S: the settlement transaction Note over S: reference, then status through a reader ``` The **facilitator** is the x402 role that verifies and settles. It is the seller's to choose; this package does not call it. ## 1. Assemble the ATR for this request The ATR's binding slot ties the record to one payment. On x402, `tie(accepts, request)` records every option the challenge offers, exactly as issued, and the commitment to the request it answers: the method, the path, the query and SHA-256 over the body exactly as received. The party slots carry whatever the parties agreed, as bytes. ## 2. Store the bytes and link them Write the ATR's bytes to your own storage before the challenge goes out, and serve them unchanged at an `https` link. If the write fails, send no challenge: a buyer that cannot fetch the record declines. ## 3. Advertise H `advertise(doc, h, link, offer)` returns a copy of the challenge with `extensions.legalContext` set to `{"type":"sha256","value":H,"legalContextUrl":link}`, and leaves every other extension and every option as they were. On pairings that carry H in the option itself, such as `x402/exact/solana` (`extra.memo`), it also places H there. ## 4. Check the payment `bound(payment)` reads H from what the buyer presented: here, the EIP-3009 authorization's `nonce`. Match it with `hashEquals` against the H you issued for this request. The token contract verifies the signature when it executes the transfer; `bound` does not. Refuse a payment whose H you did not issue for this request, and one whose H you have already accepted. Those two facts are your records, not this package's. ## 5. Read the settlement `reference(payment)` gives the keys for finding this payment on chain: the network, the token, the time bound, a digest of the transfer, and the log that carries H. After the facilitator settles, `status` reads the settlement transaction through a reader you supply, and `recover` reads H back from that transaction alone. ## The whole flow This program runs every step above. A `Map` stands in for the seller's storage, a random key for the buyer's signer, and a reader built from one receipt for the chain. No network is used. ```ts import { assemble, hashEquals, newAtrId } from "@integraledger/lcp"; import { AUTHORIZATION_USED_TOPIC, type EvmReader, type Hex } from "@integraledger/lcp/evm"; import { exactEip3009, requestCommitment, tie, type PaymentRequired, type PaymentRequirements, } from "@integraledger/lcp/x402"; import type { TypedDataDefinition } from "viem"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; const option: PaymentRequirements = { scheme: "exact", network: "eip155:84532", amount: "10000", asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", payTo: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", maxTimeoutSeconds: 60, extra: { name: "USDC", version: "2" }, }; const challenge: PaymentRequired = { x402Version: 2, resource: { url: "https://api.seller.example/v1/quote" }, accepts: [option], }; // 1. Assemble the ATR for this request. const request = await requestCommitment({ method: "GET", target: "/v1/quote", body: new Uint8Array() }); if ("refused" in request) throw new Error(request.code); const terms = new TextEncoder().encode('{"text":"One quote for 10000 base units of USDC."}'); const atr = await assemble(newAtrId(), tie(challenge.accepts, request), [["terms", terms]]); if ("refused" in atr) throw new Error(atr.code); // 2. Store the bytes and link them. const link = `https://atr.seller.example/${atr.atrHash}`; const storage = new Map([[link, atr.bytes]]); // 3. Advertise H. const advertised = exactEip3009.advertise(challenge, atr.atrHash, link, option); if ("refused" in advertised) throw new Error(advertised.code); console.log("advertised:", JSON.stringify(advertised.extensions?.["legalContext"]?.info) === JSON.stringify({ type: "sha256", value: atr.atrHash, legalContextUrl: link, })); // The buyer's side, in brief: see the buyer guide. const payer = privateKeyToAccount(generatePrivateKey()); const unsigned = await exactEip3009.build({ required: advertised, accepted: option, from: payer.address, now: 1790000000 }, atr.atrHash); if ("refused" in unsigned) throw new Error(unsigned.code); const payment = unsigned.complete(await payer.signTypedData(unsigned.typedData as TypedDataDefinition)); if ("refused" in payment) throw new Error(payment.code); // 4. Check the payment. const h = await exactEip3009.bound(payment); if (typeof h !== "string") throw new Error(h.code); console.log("bound to the issued H:", hashEquals(h, atr.atrHash), storage.has(link)); // 5. Read the settlement. The facilitator's settle answer names the transaction. const ref = await exactEip3009.reference(payment); if ("refused" in ref) throw new Error(ref.code); const transaction: Hex = `0x${"11".repeat(32)}`; const reader: EvmReader = { network: "eip155:84532", receipt: async () => ({ status: 1, blockNumber: 100n, logs: [ { address: option.asset as Hex, topics: [AUTHORIZATION_USED_TOPIC, `0x${payer.address.slice(2).toLowerCase().padStart(64, "0")}`, h], data: "0x", }, ], }), blockNumber: async (tag) => (tag === "finalized" ? 100n : 105n), transaction: async () => null, }; const status = await exactEip3009.status({ network: ref.network, asset: ref.asset, transaction, h }, reader); console.log("status:", status.state, "finality" in status ? status.finality : status.why); const recovered = await exactEip3009.recover({ network: ref.network, asset: ref.asset, transaction }, reader); console.log("recovered from the chain alone:", typeof recovered === "string" && hashEquals(recovered, atr.atrHash)); ``` ```text advertised: true bound to the issued H: true true status: settled finalized recovered from the chain alone: true ``` ## What the seller keeps Keep H, the link and the reference for each payment. The bytes live in your storage at the link; the buyer keeps its own copy. ## What this package does not do It holds no key and signs nothing. It does not call the facilitator, move funds, or decide whether to serve a request. It never compares amount, payee, asset, timing or payer with the ATR's content: the binding is the one thing it checks. ## On other surfaces The members are the same everywhere; what `tie`, `advertise` and `bound` handle differs: * [x402](https://lcp.integraledger.com/guides/x402): the `legalContext` extension, and every x402 pairing. * [MPP](https://lcp.integraledger.com/guides/mpp): H as the challenge id. * [Agentic checkouts](https://lcp.integraledger.com/guides/checkouts): ACP, UCP, AP2, ACK, card networks and A2A. * [Channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions): one ATR for a whole channel. --- # Buyer > Read the challenge, compare the served bytes with H, build and sign, and finish. Source: https://lcp.integraledger.com/guides/buyer The buyer's side of the binding is the [buyer gate](https://lcp.integraledger.com/concepts/buyer-gate): compare, then build and sign, then finish. This guide writes it with this package's pieces on x402 with `x402/exact/eip155/eip3009`. For a ready-made gate with the fetch bounds and declines already in place, use the buyer packages in [`integra-agentic-terms`](https://github.com/IntegraLedger/integra-agentic-terms). ## 1. Compare `read(doc)` gives H, the link, and the options the pairing can pay. Fetch the link with bounds, keep the bytes exactly as received, and compare their hash with H. On any failure, stop before anything is signed. The fetch below is the one the shared vectors fix: one `GET`, no redirects, a 10-second deadline over headers and body, and at most 1 MiB, counted as the body streams. It asks with `redirect: "manual"` and reads a `3xx` answer, or the `opaqueredirect` answer with status `0` that browsers give, as a failure. Cloudflare Workers refuse `redirect: "error"` with a `TypeError`, and under `"manual"` a Worker's `fetch` answers a redirect with the `3xx` itself (measured on Cloudflare's runtime with wrangler 4.141.0). ## 2. Build and sign `build(choice, h)` returns what the signer signs with H in its place. On `x402/exact/eip155/eip3009` that is EIP-712 typed data for `TransferWithAuthorization` whose `nonce` is H, valid until `now` plus the option's `maxTimeoutSeconds`. Your signer signs it; this package never holds a key. Pass the H you compared. Never read H from the document again between the comparison and `build`. ## 3. Finish `complete(signature)` gives the x402 payment, echoing the challenge's `resource` and `extensions` unchanged. Before sending it, read H back with `bound(payment)` and check that it equals the H you compared: the signer signed what you asked it to sign. ## The whole flow The seller's challenge below was advertised for an ATR the buyer can fetch. A stand-in `fetch` serves the bytes, so no network is used. ```ts import { hash, hashEquals } from "@integraledger/lcp"; import { exactEip3009, type PaymentRequired } from "@integraledger/lcp/x402"; import type { TypedDataDefinition } from "viem"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; const MAX_ATR_BYTES = 1_048_576; /** One GET, no redirects, a 10-second deadline, and at most 1 MiB. The bytes as received, or why not. */ async function fetchAtr(link: string, get: typeof fetch = fetch): Promise { const controller = new AbortController(); const timer = setTimeout(() => controller.abort(), 10_000); try { const response = await get(link, { redirect: "manual", signal: controller.signal }); const redirected = response.type === "opaqueredirect" || (response.status >= 300 && response.status <= 399); if (redirected || response.status !== 200 || response.body === null) return "atr-unfetchable"; const chunks: Uint8Array[] = []; let size = 0; for await (const chunk of response.body) { size += chunk.length; if (size > MAX_ATR_BYTES) { controller.abort(); return "atr-too-large"; } chunks.push(chunk); } const bytes = new Uint8Array(size); let at = 0; for (const c of chunks) { bytes.set(c, at); at += c.length; } return bytes; } catch { return "atr-unfetchable"; } finally { clearTimeout(timer); } } // What the seller served: the ATR's bytes at the link, and the 402 challenge that advertises their hash. const atrBytes = new TextEncoder().encode('{"atrVersion":"1","id":"0f8fad5b-d9cb-469f-a165-70867728950e","terms":"10000 units"}'); const link = "https://atr.seller.example/quote-0001"; const H = await hash(atrBytes); const challenge: PaymentRequired = { x402Version: 2, resource: { url: "https://api.seller.example/v1/quote" }, accepts: [ { scheme: "exact", network: "eip155:84532", amount: "10000", asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", payTo: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", maxTimeoutSeconds: 60, extra: { name: "USDC", version: "2" }, }, ], extensions: { legalContext: { info: { type: "sha256", value: H, legalContextUrl: link }, schema: {}, }, }, }; const sellerFetch: typeof fetch = async () => new Response(atrBytes); // 1. Compare. const offer = exactEip3009.read(challenge); if ("refused" in offer) throw new Error(`decline: ${offer.code}`); const served = await fetchAtr(offer.link, sellerFetch); if (typeof served === "string") throw new Error(`decline: ${served}`); if (!hashEquals(await hash(served), offer.h)) throw new Error("decline: hash-mismatch"); console.log("compared:", offer.h === H); // 2. Build and sign. const payer = privateKeyToAccount(generatePrivateKey()); const accepted = offer.offer.options[0]!; const unsigned = await exactEip3009.build( { required: challenge, accepted, from: payer.address, now: Math.floor(Date.now() / 1000) }, offer.h, ); if ("refused" in unsigned) throw new Error(`decline: ${unsigned.code}`); console.log("signing:", unsigned.typedData.primaryType, "with nonce H:", unsigned.typedData.message.nonce === offer.h); const signature = await payer.signTypedData(unsigned.typedData as TypedDataDefinition); // 3. Finish. const payment = unsigned.complete(signature); if ("refused" in payment) throw new Error(`decline: ${payment.code}`); const signed = await exactEip3009.bound(payment); if (typeof signed !== "string" || !hashEquals(signed, offer.h)) throw new Error("decline: signed-not-bound"); console.log("finished: the payment carries H"); ``` ```text compared: true signing: TransferWithAuthorization with nonce H: true finished: the payment carries H ``` Send `payment` to the seller in x402's `PAYMENT-SIGNATURE` header, as the x402 specification describes, and keep `served`: it is your copy of what you agreed to. ## Choosing among options A challenge may offer several options on several rails. `pairingOf(option)` names the pairing that serves each one, and each pairing's `read` returns only the options it can pay. Choose an option your accounts can pay, then use that pairing's `build`. The same H rides in whichever you choose. ## When the challenge carries an agreement URL Some pairings' payments carry H in nothing public. For those, `read` also returns `agreement`: an `https` URL the buyer pays first, whose payment carries H publicly. Pay the full payment only after the agreement's `200` receipt names the same H. See [the agreement URL](https://lcp.integraledger.com/concepts/buyer-gate#the-agreement-url). ## Channels and sessions In a channel, the buyer compares once, at the opening: one ATR covers the whole channel. See [Channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions). --- # Channels, sessions and subscriptions > One ATR for a whole channel, session or subscription, bound where it opens. Source: https://lcp.integraledger.com/guides/sessions Some payments are not one-off. An x402 `batch-settlement` channel takes a deposit and then pays each request with a voucher. An MPP `session` does the same with a payment channel, and an MPP `subscription` activates once and renews each period. Paying request by request under a fresh ATR each time would make every voucher an agreement of its own. These pairings bind **one ATR to the whole channel, session or subscription**. H rides where the channel opens: in its salt, its memo, or the authorization that activates it. The later payments within it carry no ATR of their own. Another agreement opens another channel. ```mermaid sequenceDiagram participant B as Buyer participant S as Seller S-->>B: challenge carrying H and the link Note over B: buyer gate: fetch, compare with H, once B->>S: the opening, with H in its salt, memo or witness Note over S: bound(opening) equals the H it issued, channel.kind is open loop each later request B->>S: a voucher within the channel Note over S: channel.kind is within, channel.ref names the same channel end B->>S: the close Note over S: channel.kind is close ``` The buyer compares the served bytes with H once, at the opening. After that, a payment within the channel is tied to the ATR through the channel it belongs to. ## The pairings Ten pairings have a `channel` member. The table says where H rides at the opening, which later payments count as within the channel, and what `channel.boundWithin` and `channel.until` read. | Pairing | H at the opening | Within, and the close | `boundWithin` | `until` | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | | `x402/batch-settlement/eip155` | The channel configuration's `salt`. The channel id, which the deposit authorization and every voucher sign, commits to it. | A voucher, or a refund with an amount, is within; a full refund is the close. | The `salt` of the payment's channel configuration, once it hashes to the voucher's channel id. | none | | `x402/batch-settlement/solana` | The opening transaction's one Memo instruction, H's LCP string (the option's `extra.memo`). | A voucher or a top-up is within; a refund is the close. | Refuses `x402/not-bound-within`. | none | | `mpp/session/evm` | The channel's `salt`: in the signed `open` call, the EIP-3009 nonce MPP derives over the channel parameters and the salt, or the Permit2 witness. | A voucher or a top-up is within; `close` is the close. | Refuses `mpp/not-bound-within`. | none | | `mpp/session/tempo` | The `salt` of the signed `open` call to the channel escrow. | A voucher or a top-up is within; `close` is the close. | On the v2 escrow, the salt in the payment's channel descriptor, once the descriptor's channel id is the payment's channel. | none | | `mpp/session/hedera` | The `salt` of the escrow's `open`. | A voucher, a top-up or a `use` is within; `close` is the close. | Refuses `mpp/not-bound-within`. | none | | `mpp/session/solana` | The `open` instruction's `salt`: H's first 8 bytes. | A voucher, a top-up or a `use` is within; `close` is the close. | H from a `use` credential whose session proof names the opening challenge's id. | none | | `mpp/session/xrpl` | The `PaymentChannelCreate`'s one memo, H's LCP string. | A voucher is within; `close` is the close. | Refuses `mpp/not-bound-within`. | The opening's `CancelAfter`, where it sets one. | | `mpp/session/lightning` | The deposit invoice's description hash `h`, which the seller's node signs. | A bearer proof or a top-up is within; `close` is the close. | Refuses `mpp/not-bound-within`. | none | | `mpp/subscription/tempo` | The `witness` of the key authorization the payer's root key signs. | Only the activation, a key authorization, is classified: it is the opening. | Refuses `mpp/not-bound-within`. | The request's `subscriptionExpires`. | | `mpp/subscription/stripe` | The request's `methodDetails.metadata.legal_context`. | Every payment the seller reports on this pairing is the activation. | Refuses `mpp/not-bound-within`. | none | This example lists them from the registry: ```ts import { BINDINGS } from "@integraledger/lcp"; const channels = BINDINGS.filter((b) => "channel" in b).map((b) => b.id); console.log(channels.length); console.log(channels.sort().join("\n")); ``` ```text 10 mpp/session/evm mpp/session/hedera mpp/session/lightning mpp/session/solana mpp/session/tempo mpp/session/xrpl mpp/subscription/stripe mpp/subscription/tempo x402/batch-settlement/eip155 x402/batch-settlement/solana ``` Two x402 pairings carry a request-scoped form of the same idea, with no `channel` member: `x402/batch-settlement/cloudflare` echoes H in the `legalContext` extension of each request, and `x402/upto/solana` opens a one-request payment channel whose opening transaction carries H as its memo. The LCP profiles [`x402/batch-settlement/eip155`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-batch-settlement-eip155.md), [`mpp/session/evm-tempo`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-evm-tempo.md) and [`mpp/session/hedera-solana-xrpl`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-hedera-solana-xrpl.md) state the rules for these bindings. ## The channel members On top of the members every pairing has, a channel pairing has: | Member | Side | What it does | | ------------------------------ | ------ | ------------------------------------------------------------------------------------------------------- | | `channel.kind(payment)` | seller | `"open"`, `"within"` or `"close"`, from the payment's own action or type, or a refusal. | | `channel.ref(payment)` | seller | The channel's key: `{ network, channel }`. The opening and every payment within share it. | | `channel.boundWithin(payment)` | seller | H from a payment within the channel, where the pairing's payments within carry it; otherwise a refusal. | | `channel.until(payment)` | seller | The channel's end in Unix seconds, where its opening sets one. | | `buildWithin(within, h)` | buyer | A later voucher, or the close, for a channel opened under H. It refuses a channel that was not. | | `closeRef(challenge, channel)` | seller | The read keys of the channel's close, on the MPP sessions and on `mpp/subscription/tempo`. | `buildWithin` exists on the two x402 channels and the MPP sessions on EVM, Tempo, Hedera, Solana and the XRP Ledger. On MPP it builds a voucher or the close. It does not build a top-up, which is a further deposit, or Solana's operator `use`. `mpp/subscription/stripe`'s `channel.ref` takes the payment's receipt as a second argument: the Stripe subscription it names is the channel. ## One channel, end to end This program opens an x402 `batch-settlement` channel on an EVM chain, pays one voucher within it, and closes it. Both sides run in one process: a random key stands in for the buyer's signer and no network is used. Signing uses [viem](https://viem.sh). ```ts import { assemble, hashEquals, newAtrId } from "@integraledger/lcp"; import { requestCommitment, tie, type PaymentRequired, type PaymentRequirements } from "@integraledger/lcp/x402"; import { batchEvm, type SigningRequest } from "@integraledger/lcp/x402-batch-settlement"; import type { TypedDataDefinition } from "viem"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; const payer = privateKeyToAccount(generatePrivateKey()); async function sign(requests: readonly SigningRequest[]): Promise { const out: string[] = []; for (const r of requests) { if (r.kind !== "eip712") throw new Error(`this signer signs EIP-712 only, not ${r.kind}`); out.push(await payer.signTypedData(r.typedData as TypedDataDefinition)); } return out; } // Seller: the channel option. 1000 base units of USDC per request, on Base Sepolia. const option: PaymentRequirements = { scheme: "batch-settlement", network: "eip155:84532", amount: "1000", asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", payTo: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", maxTimeoutSeconds: 60, extra: { name: "USDC", version: "2", receiverAuthorizer: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", withdrawDelay: 900, }, }; const challenge: PaymentRequired = { x402Version: 2, resource: { url: "https://api.seller.example/v1/stream" }, accepts: [option], }; // Seller: one ATR for the whole channel, and H advertised in the challenge. const request = await requestCommitment({ method: "GET", target: "/v1/stream", body: new Uint8Array() }); if ("refused" in request) throw new Error(request.code); const terms = new TextEncoder().encode('{"text":"1000 base units of USDC per request."}'); const atr = await assemble(newAtrId(), tie(challenge.accepts, request), [["terms", terms]]); if ("refused" in atr) throw new Error(atr.code); const advertised = batchEvm.advertise(challenge, atr.atrHash, `https://atr.seller.example/${atr.atrHash}`, option); if ("refused" in advertised) throw new Error(advertised.code); // Buyer: read H, compare the served bytes with it as the buyer guide shows, then open the channel with H as its salt. const offer = batchEvm.read(advertised); if ("refused" in offer) throw new Error(offer.code); const accepted = offer.offer.options[0]!; const unsignedOpening = await batchEvm.build( { required: advertised, accepted, from: payer.address, payerAuthorizer: payer.address, deposit: 100_000n, authSalt: `0x${"01".repeat(32)}`, now: Math.floor(Date.now() / 1000), }, offer.h, ); if ("refused" in unsignedOpening) throw new Error(unsignedOpening.code); const kinds = unsignedOpening.requests.map((r) => (r.kind === "eip712" ? r.typedData.primaryType : r.kind)); console.log("the opening signs:", kinds); const opening = unsignedOpening.complete(await sign(unsignedOpening.requests)); if ("refused" in opening) throw new Error(opening.code); // Seller: the opening is bound to the H it issued, and names the channel. const h = await batchEvm.bound(opening); const channel = await batchEvm.channel.ref(opening); if ("refused" in channel) throw new Error(channel.code); console.log(batchEvm.channel.kind(opening), "bound to H:", typeof h === "string" && hashEquals(h, atr.atrHash)); // Buyer: a later voucher in the same channel, for a cumulative 2000 base units. const channelConfig = opening.payload["channelConfig"]!; const unsignedVoucher = await batchEvm.buildWithin( { required: advertised, accepted, channelConfig, maxClaimableAmount: 2000n }, offer.h, ); if ("refused" in unsignedVoucher) throw new Error(unsignedVoucher.code); const voucher = unsignedVoucher.complete(await sign(unsignedVoucher.requests)); if ("refused" in voucher) throw new Error(voucher.code); // Seller: the voucher is within the same channel, and its configuration still carries H. const sameChannel = await batchEvm.channel.ref(voucher); const within = await batchEvm.channel.boundWithin(voucher); const same = !("refused" in sameChannel) && sameChannel.channel === channel.channel; console.log(batchEvm.channel.kind(voucher), "same channel:", same); console.log("within bound to H:", typeof within === "string" && hashEquals(within, atr.atrHash)); const notAnOpening = await batchEvm.bound(voucher); console.log("bound(voucher):", typeof notAnOpening === "string" ? notAnOpening : notAnOpening.code); // Buyer: the close, a full refund of what is left. const unsignedClose = await batchEvm.buildWithin( { required: advertised, accepted, channelConfig, maxClaimableAmount: 2000n, refund: {} }, offer.h, ); if ("refused" in unsignedClose) throw new Error(unsignedClose.code); const close = unsignedClose.complete(await sign(unsignedClose.requests)); if ("refused" in close) throw new Error(close.code); console.log(batchEvm.channel.kind(close)); ``` ```text the opening signs: [ 'ReceiveWithAuthorization', 'Voucher' ] open bound to H: true within same channel: true within bound to H: true bound(voucher): x402/not-an-opening close ``` Keep the opening exactly as the buyer signed it: every payment within the channel is built from its channel configuration, and `buildWithin` refuses a configuration whose salt is not H (`x402/channel-id-mismatch`). ## What each side keeps **The seller** refuses an opening whose H it did not issue for that request, or has already seen claimed. After that, it matches each later payment to an open channel by `channel.ref`, and so to that channel's ATR. What a voucher is worth, and when to settle, are the seller's to decide under the scheme. The channel members classify a payment and name its channel; none of them reads a voucher's amount. **The buyer** keeps the ATR's bytes it compared at the opening, and the opening itself. On MPP, a session challenge that names a `channelId` resumes a channel (`evmSessionResume` reads it on EVM and Tempo): the buyer pays it with a voucher only for a channel it opened for an ATR it compared. ## What the record says Each channel pairing's `pattern.proves` states what the opening shows, and then that the later payments in the channel, session or subscription were made under the same ATR. Some also say what those payments sign: on the EVM, Tempo and Hedera sessions and the EVM batch-settlement channel, each voucher signs a commitment to H; on the XRP Ledger session, each voucher signs the channel id and an amount, not H. The [pairings reference](https://lcp.integraledger.com/reference/pairings#what-each-binding-proves) quotes each one. ## Reading settlement `reference(opening)` and `status(ref, reader)` read the opening's settlement, as on any pairing. On the MPP sessions and `mpp/subscription/tempo`, `closeRef(challenge, channel)` gives the read keys of the close from the issued challenge and the channel, and `status` reads the close through the same reader. On `mpp/session/evm`, a transaction that is not a call closing that channel reads as pending, with the reason `not-a-close`. ## Next * [x402](https://lcp.integraledger.com/guides/x402) and [MPP](https://lcp.integraledger.com/guides/mpp): the surfaces these channels run on. * [Buyer](https://lcp.integraledger.com/guides/buyer): the comparison the buyer makes before the opening. --- # x402 > The legalContext extension, the request commitment, and the x402 pairings. Source: https://lcp.integraledger.com/guides/x402 [x402](https://github.com/coinbase/x402) is HTTP 402 payment: the seller answers a request with a `PaymentRequired` document listing the options it accepts, and the buyer retries with a payment for one of them. This package reads and writes x402 version 2 documents. Import the x402 pieces from `@integraledger/lcp/x402`. ## The `legalContext` extension Every x402 pairing advertises H in the same place: the document's `extensions.legalContext`, as x402's extension mechanism defines it (an `info` object and a JSON Schema for it). ```json no-check { "extensions": { "legalContext": { "info": { "type": "sha256", "value": "0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "legalContextUrl": "https://atr.seller.example/0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" }, "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object" } } } } ``` `LEGAL_CONTEXT` is the extension's key and `LEGAL_CONTEXT_SCHEMA` the full schema every pairing writes. The buyer echoes `extensions` unchanged in its payment, as x402 requires. Where the pairing's payment carries H in nothing public, `info` also carries `legalContextAgreementUrl` ([the agreement URL](https://lcp.integraledger.com/concepts/buyer-gate#the-agreement-url)). One document has one legal context. Each pairing that advertises into the same document with the same H and link leaves it as it is; a different H or link is refused as `x402/legal-context-conflict`. A challenge offering options on several rails therefore carries one H, and the buyer's payment on any of them is bound to the same ATR. ## The request commitment `requestCommitment({ method, target, body })` commits to the request the challenge answers: the method as received, the request-target split at its first `?` into `path` and `query`, and `bodyDigest`, SHA-256 over the body bytes exactly as received. The target is at most 8 KiB of visible ASCII starting with `/`, and the body at most 1 MiB. `tie(accepts, request)` is the ATR's binding slot for every x402 pairing: `["x402", { accepts, request }]`, with every option exactly as issued. `issuedDigest` is SHA-256 over the RFC 8785 form of one option or one commitment, for a seller that keeps a digest of what it issued. ## Advertising several options This example advertises one H into a challenge with two EVM options, one for EIP-3009 and one for Permit2, and shows which pairing serves each option: ```ts import { hash, pairingOf } from "@integraledger/lcp"; import { exactEip3009, exactPermit2, requestCommitment, type PaymentRequired, type PaymentRequirements, } from "@integraledger/lcp/x402"; const base: PaymentRequirements = { scheme: "exact", network: "eip155:84532", amount: "10000", asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", payTo: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", maxTimeoutSeconds: 60, extra: { name: "USDC", version: "2" }, }; const viaPermit2: PaymentRequirements = { ...base, extra: { ...base.extra, assetTransferMethod: "permit2" } }; const doc: PaymentRequired = { x402Version: 2, resource: { url: "https://api.seller.example/v1/quote" }, accepts: [base, viaPermit2], }; const h = await hash(new TextEncoder().encode("the ATR's bytes")); const link = `https://atr.seller.example/${h}`; const first = exactEip3009.advertise(doc, h, link, base); if ("refused" in first) throw new Error(first.code); const both = exactPermit2.advertise(first, h, link, viaPermit2); if ("refused" in both) throw new Error(both.code); console.log(pairingOf(base), pairingOf(viaPermit2)); const read = exactPermit2.read(both); console.log("refused" in read ? read.code : `${read.offer.options.length} option, H ${read.h === h ? "matches" : "differs"}`); const other = await hash(new TextEncoder().encode("another ATR")); const clash = exactPermit2.advertise(first, other, link, viaPermit2); console.log("refused" in clash ? clash.code : "placed"); console.log(await requestCommitment({ method: "POST", target: "/v1/quote?tier=1", body: new TextEncoder().encode("{}") })); ``` ```text x402/exact/eip155/eip3009 x402/exact/eip155/permit2 1 option, H matches x402/legal-context-conflict { method: 'POST', path: '/v1/quote', query: 'tier=1', bodyDigest: '0x44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a' } ``` ## The x402 pairings The x402 pairings, by scheme. The [pairings reference](https://lcp.integraledger.com/reference/pairings) states what each one proves, and [Rails](https://lcp.integraledger.com/guides/rails) gives each rail's field. | Scheme | Pairings | Where H rides | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `exact` on EVM | `x402/exact/eip155/eip3009`, `x402/exact/eip155/permit2` | The signed authorization's nonce. | | `exact` on EVM, ERC-7710 | `x402/exact/eip155/erc7710-salt`, `x402/exact/eip155/erc7710` | The salt of the redeemed leaf delegation, through MetaMask's DelegationManager; or, where the delegation signs no hash, the echoed extension only. | | `upto` on EVM | `x402/upto/eip155/permit2` | The Permit2 nonce, for a signed maximum. | | `auth-capture` on EVM | `x402/auth-capture/eip155/eip3009`, `x402/auth-capture/eip155/permit2` | The escrow payment's salt, or its salt nonce when the option binds a receiver authorizer or policy. | | `batch-settlement` | `x402/batch-settlement/eip155`, `x402/batch-settlement/solana`, `x402/batch-settlement/cloudflare` | The channel's salt, the opening transaction's memo, or each request's echoed extension. See [Channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions). | | `exact` on other rails | Solana, Stellar, XRPL, Hedera, Algorand, Aptos, Cardano, Casper, Concordium, NEAR, Polkadot Asset Hub, Starknet, Sui, Tron, TON, Lightning | Each rail's own field; see [Rails](https://lcp.integraledger.com/guides/rails). | | `upto` on Solana | `x402/upto/solana` | The Memo instruction of the transaction that opens a one-request payment channel. | ## Building on x402 `build(choice, h)` takes the document, the chosen option, the payer's account and the time in Unix seconds: ```ts no-check interface X402Choice { required: PaymentRequired; accepted: PaymentRequirements; from: Hex; now: number; } ``` It returns what the buyer's signer signs, in the rail's own form, and `complete`, which turns the signer's answer into the x402 payment. On `x402/exact/eip155/eip3009` that is EIP-712 typed data; on the other EVM pairings a request whose `kind` names the form (`"eip712"`, or `"erc7710"` for a delegation); on other rails a transaction or message to sign. ## Reading the payment `bound(payment)` reads H from the payment; `reference(payment)` gives the keys to find its settlement; `status(ref, reader)` reads the settlement through an `EvmReader` you supply, which answers three JSON-RPC calls: `eth_getTransactionReceipt`, `eth_getBlockByNumber` for the `safe` and `finalized` marks, and `eth_getTransactionByHash`. A reader that throws `ReaderError`, or answers for another network, leaves the payment pending, never failed. `pairingOfPayment(payment)` names the pairing that serves a presented EVM payment. --- # MPP > The ATR hash as the MPP challenge id, the opaque members, and the MPP pairings. Source: https://lcp.integraledger.com/guides/mpp MPP, the Machine Payments Protocol, carries payment in HTTP authentication, as the [Payment HTTP authentication scheme](https://paymentauth.org) defines it: the seller answers with one or more `WWW-Authenticate: Payment` challenges, each naming a `method` (such as `evm`, `tempo`, `solana` or `stripe`) and an `intent` (`charge`, `session` or `subscription`), and the buyer answers with a credential that echoes the challenge it pays. Import the MPP pieces from `@integraledger/lcp/mpp`. ## Where H rides On every MPP pairing, H rides in the challenge itself, in two places: * **The challenge `id`** is the base64url (no padding) of H's 32 bytes, then `.` and the challenge's position in the 402 response. A Tempo `subscription` challenge's id is the bare base64url of H. `challengeId(h, index)` writes it and `challengeH(id)` reads H back. * **The challenge's `opaque`** map carries `legalContext`, H's LCP string, and `legalContextUrl`, the link. Where the pairing's payment carries H in nothing public, it also carries `legalContextAgreementUrl`. MPP binds the credential to the challenge it echoes, so whatever the payer signs over the challenge id, or over a value derived from it, commits to H. Some methods also carry H in a request member the payer signs; `CARRIER` names that member for each intent and method (for example `externalId` for `solana` charges, and `methodDetails.invoiceId` for `xrpl`). ## Placing and reading `place(doc, h, link, option)` is the seller's placement over a list of challenges: the challenge whose bound members equal `option` gets the id derived from H and an `opaque` holding the seller's own map plus the LCP members. `read(doc)` is the buyer's reading: the challenges whose `opaque` carries an LCP hash and an `https` link and whose id derives from that hash. `pairingsOf(challenge)` names the pairings a challenge offers, and `tie(challenges)` is the ATR's binding slot: every challenge's bound members, as issued. ```ts import { hash } from "@integraledger/lcp"; import { challengeH, pairingsOf, place, read, type MppChallenge } from "@integraledger/lcp/mpp"; const request = Buffer.from( JSON.stringify({ amount: "10000", currency: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", methodDetails: { chainId: 84532, credentialTypes: ["permit2", "authorization"], permit2Address: "0x000000000022D473030F116dDEE9F6B43aC78BA3", }, recipient: "0x209693Bc6afc0C5328bA36FaF03C514EF312287C", }), ).toString("base64url"); const issued: MppChallenge = { id: "issued-by-the-seller", realm: "api.seller.example", method: "evm", intent: "charge", request, expires: "2026-09-21T14:14:20Z", }; console.log(pairingsOf(issued)); const h = await hash(new TextEncoder().encode("abc")); const placed = place([issued], h, `https://atr.seller.example/${h}`, issued); if ("refused" in placed) throw new Error(placed.code); const id = placed[0]!.id!; console.log(id, challengeH(id) === h); console.log(Buffer.from(placed[0]!.opaque!, "base64url").toString()); const offer = read(placed); if ("refused" in offer) throw new Error(offer.code); console.log(offer.h === h, offer.offer.challenges.length); ``` ```text [ 'mpp/charge/evm/permit2', 'mpp/charge/evm/authorization' ] ungWv48Bz-pBQUDeXa4iI7ADYaOWF3qctBD_YfIAFa0.0 true {"legalContext":"lcp:sha256:0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad","legalContextUrl":"https://atr.seller.example/0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"} true 1 ``` `parseChallenges(fieldValues)` parses `WWW-Authenticate` field values into challenges, and `problem(code)` gives the Payment scheme's problem type and HTTP status for a refusal code. ## The MPP pairings | Method | Pairings | Where H rides in what the payer signs or lands | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `evm` | `mpp/charge/evm/authorization`, `mpp/charge/evm/permit2` | The signed nonce, or the witness's `challengeHash`: keccak256 of the challenge id and realm (`challengeHash`). | | `evm` | `mpp/charge/evm/transaction`, `mpp/charge/evm/hash` | Nothing signed or landed; H is in the challenge. | | `tempo` | `mpp/charge/tempo/memo`, `mpp/charge/tempo/push` | MPP's attribution memo on the `transferWithMemo`, whose last 7 bytes are from keccak256 of the challenge id (`attributionMemo`). | | `solana` | `mpp/charge/solana` | The one Memo instruction, holding H's LCP string (the request's `externalId`). | | `stellar` | `mpp/charge/stellar` | The seller's muxed recipient address, whose 8-byte id is H's first 8 bytes. | | `xrpl` | `mpp/charge/xrpl` | The Payment's `InvoiceID`: H itself (the request's `methodDetails.invoiceId`). | | `hedera` | `mpp/charge/hedera` | MPP's attribution memo as the signed body memo. | | `lightning` | `mpp/charge/lightning` | The BOLT11 invoice's description hash `h`, which the seller's node signs. | | `usdc` | `mpp/charge/usdc/evm`, `mpp/charge/usdc/gateway` | The EIP-3009 nonce, or the Gateway burn intent's salt: `usdc`'s derivation over the challenge id. | | `usdc` | `mpp/charge/usdc/solana`, `mpp/charge/usdc/stacks` | The signed Memo instruction (H's LCP string), or the SIP-010 `transfer` memo (H's 32 bytes). | | `nearintents` | `mpp/charge/nearintents` | The request's `externalId`; the deposit carries nothing. | | `card`, `stripe` | `mpp/charge/card`, `mpp/charge/stripe`, `mpp/subscription/stripe` | The request's `externalId`, or `methodDetails.metadata.legal_context`, which Stripe copies into the PaymentIntent. The buyer's card or token signs nothing that carries H. | | sessions | `mpp/session/evm`, `mpp/session/tempo`, `mpp/session/hedera`, `mpp/session/solana`, `mpp/session/xrpl`, `mpp/session/lightning` | Where the channel opens. See [Channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions). | | subscription | `mpp/subscription/tempo` | The key authorization the payer's root key signs, whose witness is H. | Each pairing's `build(choice, h)` takes the chosen challenge (`MppChoice`) and returns what the buyer signs. Its `bound(credential)` reads H from the echoed challenge and checks that what was signed carries it; `reference` and `status` read the settlement where the method lands on a chain. The LCP profile [`mpp/charge`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-charge.md) states these rules in full. --- # Agentic checkouts > The ATR hash on ACP, UCP, AP2 and ACK checkouts, on card networks, and in A2A task metadata. Source: https://lcp.integraledger.com/guides/checkouts Not every agent pays through a `402` challenge. Many buy through a checkout: the seller opens a checkout or a payment request, the buyer's agent completes it, and a payment service provider, a card network or a credential provider moves the money. This package binds H into each of these checkouts in the field its protocol provides, and says so plainly where the protocol gives the buyer nothing to sign. The members are the ones [every pairing has](https://lcp.integraledger.com/concepts/pairings#the-members). What differs is the document the seller advertises into and what the buyer presents: | Protocol | Entry point | Pairings | Where H rides | Buyer signs H | | ------------- | ------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | ACP | `@integraledger/lcp/acp` | `acp/checkout/delegated`, `acp/checkout/undelegated` | The checkout session's `id`, and the delegate-payment allowance's `checkout_session_id` where the handler requires one. | no | | UCP | `@integraledger/lcp/ucp` | `ucp/checkout/ap2-mandate`, `ucp/checkout/unsigned`, `ucp/booking/ap2-mandate`, `ucp/booking/unsigned` | A `legal_context` entry in the checkout's `links[]`, before the business signs the checkout. | with an AP2 mandate | | AP2 | `@integraledger/lcp/ap2` | `ap2/checkout-mandate` | The `legalContext` member of the merchant-signed `checkout_jwt`, which the buyer's Checkout Mandate commits to. | yes | | ACK | `@integraledger/lcp/ack` | `ack/payment-request` | The `id` of the seller-signed Payment Request, as H's LCP string. | no | | Card networks | `@integraledger/lcp/card` | `card/visa-tap`, `card/mastercard-vi/immediate`, `card/mastercard-vi/autonomous`, `card/seller-reference` | A covered `lcp-hash` field of the agent's message signature, the `checkout_jwt` a Verifiable Intent mandate signs, or the seller's processor reference. | Visa TAP and Verifiable Intent | | A2A | `@integraledger/lcp/a2a` | none | The Task's `metadata`, under the extension's URI. Delivery only. | no | The "Buyer signs H" column is each pairing's `pattern.buyerSigns`. The [pairings reference](https://lcp.integraledger.com/reference/pairings#what-each-binding-proves) gives the sentence each pairing's record states about what a payment through it proves, including which signatures this package verifies and which it leaves to the network or the provider. Where the buyer's approval does not sign H, the seller may advertise an [agreement URL](https://lcp.integraledger.com/concepts/buyer-gate#the-agreement-url) beside the link. Every checkout pairing's `advertise` takes it as its last argument and writes it where the protocol keeps the link, and its `read` returns it as `agreement`. ## ACP In the [Agentic Commerce Protocol](https://www.agenticcommerce.dev), the seller creates a checkout session and the buyer's agent completes it with a payment handler. This package makes H the session's `id`, and puts the link beside it in the session's `metadata.legal_context`, in snake case: ```json no-check { "id": "0x1be27e75ea3728b55834ec54ff6709669427b11c9ba47a6d9f182b0be46513be", "metadata": { "legal_context": { "type": "sha256", "value": "0x1be27e75ea3728b55834ec54ff6709669427b11c9ba47a6d9f182b0be46513be", "legal_context_url": "https://atr.seller.example/0x1be27e75ea3728b55834ec54ff6709669427b11c9ba47a6d9f182b0be46513be" } } } ``` The ATR's binding slot, `tie(options)`, holds one option per kind of payment handler the session offers, each ACP's own `{ "requires_delegate_payment": boolean }`, and nothing from the checkout. The two pairings differ in that flag: * **`acp/checkout/delegated`**: the handler requires `delegate_payment`. `build` returns the allowance the agent's `delegate_payment` request carries: ACP's six members, with `reason` `"one_time"` and `checkout_session_id` set to H. The agent signs its request; `complete(request)` returns the request only when its allowance is exactly the one built, and refuses `acp/allowance-changed` otherwise. `bound` reads `checkout_session_id` back. It verifies no signature. * **`acp/checkout/undelegated`**: nothing the buyer signs names the session. `build` refuses `acp/nothing-to-sign` and `bound` refuses `acp/not-buyer-signed`. ```ts import { assemble, hash, hashEquals, newAtrId } from "@integraledger/lcp"; import { delegated, tie, type HandlerOption, type Session } from "@integraledger/lcp/acp"; // Seller: the session offers a handler that requires delegate_payment. const handler: HandlerOption = { requires_delegate_payment: true }; const terms = new TextEncoder().encode('{"line_items":[{"id":"li_1","quantity":1}],"total":19900}'); const atr = await assemble(newAtrId(), tie([handler]), [["order", terms]]); if ("refused" in atr) throw new Error(atr.code); const link = `https://atr.seller.example/${atr.atrHash}`; const opened: Session = { currency: "usd", metadata: { order_ref: "A-100" } }; const session = delegated.advertise(opened, atr.atrHash, link, handler); if ("refused" in session) throw new Error(String(session.code)); console.log("session id is H:", session.id === atr.atrHash, Object.keys(session.metadata ?? {})); // Buyer: read H and the link, fetch and compare, then build the allowance. const offer = delegated.read(session); if ("refused" in offer) throw new Error(offer.code); if (!hashEquals(await hash(atr.bytes), offer.h)) throw new Error("decline: hash-mismatch"); const unsigned = await delegated.build( { session, max_amount: 19900, currency: "usd", merchant_id: "acme", expires_at: "2026-10-01T00:00:00Z" }, offer.h, ); if ("refused" in unsigned) throw new Error(unsigned.code); const { checkout_session_id, ...rest } = unsigned.allowance; console.log("checkout_session_id is H:", checkout_session_id === offer.h, rest); // Buyer: the agent's own stack builds and signs its delegate_payment request around the allowance. // complete returns the request only when the allowance in it is the one built. const request = unsigned.complete({ allowance: unsigned.allowance, payment_method: { type: "card" } }); if ("refused" in request) throw new Error(String(request.code)); const changed = unsigned.complete({ allowance: { ...unsigned.allowance, max_amount: 99900 } }); console.log("refused" in changed ? changed.code : "accepted"); // Seller: H back out of what the agent signed. const bound = await delegated.bound(request); console.log("bound to H:", typeof bound === "string" && hashEquals(bound, atr.atrHash)); ``` ```text session id is H: true [ 'order_ref', 'legal_context' ] checkout_session_id is H: true { reason: 'one_time', max_amount: 19900, currency: 'usd', merchant_id: 'acme', expires_at: '2026-10-01T00:00:00Z' } acp/allowance-changed bound to H: true ``` `advertise` keeps every other member and metadata key, sets the session `id` only when it is absent or already H (`acp/id-conflict` otherwise), and refuses a session larger than 1 MiB as JSON. `read` takes H from `id` alone and refuses a `metadata.legal_context` whose value is another hash (`acp/legal-context-conflict`). The LCP profile [`acp/checkout/session-id`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/acp-checkout-session-id.md) states the rules. ## UCP In the [Universal Commerce Protocol](https://ucp.dev), the business returns a checkout, and, under UCP's AP2 Mandates extension, signs it (`ap2.merchant_authorization`). This package appends one entry to the checkout's `links[]` before the business signs it: ```json no-check { "type": "legal_context", "url": "https://atr.seller.example/0x…", "title": "lcp:sha256:0x…" } ``` and, with an agreement URL, a second entry of type `legal_context_agreement`. The option names the checkout or the booking by its own `id` (`{ "checkout": "…" }` or `{ "booking": "…" }`), and `tie(options)` records those ids. `advertise` refuses a checkout the business has already signed (`ucp/already-signed`) and one whose `id` is not the option's (`ucp/option-not-this-checkout`). | Pairing | Buyer side | `bound` | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ucp/checkout/ap2-mandate`, `ucp/booking/ap2-mandate` | `read` requires the business's `ap2.merchant_authorization` (`ucp/ap2-not-active` otherwise). `build` returns the checkout unchanged for the buyer's mandate issuer, once its link carries H, and `complete(checkout_mandate)` gives what the buyer presents. | Checks AP2's `checkout_hash` against the checkout inside the buyer's mandate, then reads H from that checkout's `legal_context` link. It verifies no signature. | | `ucp/checkout/unsigned`, `ucp/booking/unsigned` | `read` gives H and the link. `build` refuses `ucp/nothing-to-sign`: UCP without the AP2 Mandates extension defines no buyer signature. | Refuses `ucp/not-buyer-signed`. | `legalContextLink(checkout)` reads the one `legal_context` entry of any checkout: two such entries are `ucp/legal-context-conflict`. The LCP profile [`ucp/checkout/legal-context`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ucp-checkout-legal-context.md) states the rules. ```ts import { hash } from "@integraledger/lcp"; import { legalContextLink, unsigned, type Checkout } from "@integraledger/lcp/ucp"; const h = await hash(new TextEncoder().encode("the ATR's bytes")); const link = `https://atr.seller.example/${h}`; const checkout: Checkout = { id: "chk_123", status: "ready_for_complete", links: [{ type: "terms_of_service", url: "https://seller.example/tos" }], }; const placed = unsigned.advertise(checkout, h, link, { checkout: "chk_123" }); if ("refused" in placed) throw new Error(String(placed.code)); console.log(placed.links); const found = legalContextLink(placed); console.log("refused" in found ? found.code : found.h === h); const wrong = unsigned.advertise(checkout, h, link, { checkout: "chk_999" }); console.log("refused" in wrong ? wrong.code : "placed"); console.log("refused" in (await unsigned.build({ checkout: placed }, h))); ``` ```text [ { type: 'terms_of_service', url: 'https://seller.example/tos' }, { type: 'legal_context', url: 'https://atr.seller.example/0x3283f4fc90a2f6d2782b0345c3b274acbe0218ec84ce2d8c3a1fdbe6d1cff263', title: 'lcp:sha256:0x3283f4fc90a2f6d2782b0345c3b274acbe0218ec84ce2d8c3a1fdbe6d1cff263' } ] true ucp/option-not-this-checkout true ``` ## AP2 In [AP2](https://ap2-protocol.org), the merchant signs a `checkout_jwt` and the buyer's closed Checkout Mandate commits to it through `checkout_hash`, the SHA-256 of that JWT. This package puts H in the JWT's payload: * **Seller.** `advertise(payload, h, link, { checkout: id })` appends a `legalContext` member, `{"type":"sha256","value":H,"legalContextUrl":link}`, to the checkout payload whose `id` is the option's. The seller's own stack signs the result as its `checkout_jwt`. * **Buyer.** `read(checkoutJwt)` decodes the JWT's payload and returns H, the link and the checkout. `build(offer, h)` returns the Checkout Mandate's required claims: `vct` `"mandate.checkout.1"`, the `checkout_jwt`, and `checkout_hash`, the unpadded base64url of SHA-256 over the JWT. The buyer's mandate signer issues the mandate as an SD-JWT, and `complete(checkout_mandate)` gives what the buyer presents: the mandate and the JWT. * **Seller, on payment.** `bound(presented)` finds the one closed Checkout Mandate in the SD-JWT, checks that its `checkout_hash` is the hash of the presented `checkout_jwt` (`ap2/checkout-not-latest` otherwise), and reads H from that JWT's payload. It verifies no signature. `jwsPayload`, `readMandate` and `checkoutBinding` expose those steps one by one. The LCP profile [`ap2/checkout-mandate`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ap2-checkout-mandate.md) states the rules. ```ts import { hash } from "@integraledger/lcp"; import { checkoutMandate } from "@integraledger/lcp/ap2"; const h = await hash(new TextEncoder().encode("the ATR's bytes")); const checkout = { id: "chk_42", total: { currency: "USD", value: "19.90" } }; const payload = checkoutMandate.advertise(checkout, h, `https://atr.seller.example/${h}`, { checkout: "chk_42" }); if ("refused" in payload) throw new Error(String(payload.code)); console.log(Object.keys(payload)); // The seller's stack signs the payload. A placeholder signature stands in: the buyer's side verifies none. const segment = (v: object) => Buffer.from(JSON.stringify(v)).toString("base64url"); const signature = Buffer.from("signature").toString("base64url"); const checkoutJwt = `${segment({ alg: "ES256", typ: "JWT" })}.${segment(payload)}.${signature}`; const offer = checkoutMandate.read(checkoutJwt); if ("refused" in offer) throw new Error(offer.code); const unsigned = await checkoutMandate.build(offer.offer, offer.h); if ("refused" in unsigned) throw new Error(unsigned.code); console.log(unsigned.content.vct, unsigned.content.checkout_hash.length); ``` ```text [ 'id', 'total', 'legalContext' ] mandate.checkout.1 43 ``` ## ACK In the payment flow of the [Agent Commerce Kit (ACK)](https://www.agentcommercekit.com), the seller answers with a `402` whose body carries a signed Payment Request token, and a receipt issued after settlement embeds that token. This package makes H the Payment Request's `id`, in LCP string form, and puts the link beside the request in the `402` body: * **Seller.** `advertise({}, h, link, option)` returns the values the seller's stack places: `paymentRequestId`, `lcp:sha256:0x…`, for the token it signs, and `legalContext`, `{type, value, legalContextUrl}`, for the body beside it. `tie(options)` records the Payment Request's options exactly as issued. * **Buyer.** `read(body)` takes H from the signed token's `id`, which must equal the body's `legalContext` (`ack/legal-context-conflict` otherwise), and returns the token's payment options. The body's unsigned `paymentRequest` copy is never read. The token's signature is not verified here. * **After settlement.** `fromReceipt(credentialSubject)` reads H from the Payment Request token a receipt embeds. It verifies nothing: call it on a receipt you have verified. ACK defines no payer signature, so there is no place for H in what the buyer signs. `build` and `bound` refuse `ack/no-signed-place`. The LCP profile [`ack/payment-request`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ack-payment-request.md) states the rules. ## Card networks The `card` entry point covers three ways to pay a card checkout. The option is the seller's own `{ scheme, checkout }`, where `scheme` is `"visa-tap"`, `"mastercard-vi"` or `"seller-reference"` and `checkout` is the seller's checkout id; `pairingsOf(option)` names the pairings that pay it. `advertise` gives the same values for every card pairing: the `legalContext` the seller shows before payment, and `reference`, H's LCP string, for the seller to place in its processor reference. * **[Visa Trusted Agent Protocol](https://developer.visa.com/capabilities/trusted-agent-protocol).** The agent sends H in an `lcp-hash` field and lists that field among the covered components of its `agent-payer-auth` message signature (RFC 9421). `build` returns the field for the agent's signer to add: `{ field: "lcp-hash", value: H, component: "lcp-hash" }`. `bound` reads the one `lcp-hash` line when an `agent-payer-auth` signature lists `"lcp-hash"` without parameters. It verifies no signature, key, window or nonce. The LCP profile [`card/visa-tap`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/card-visa-tap.md) states the rules. * **[Mastercard Verifiable Intent](https://github.com/agent-intent/verifiable-intent).** H rides in the merchant's `checkout_jwt` as its `legalContext`, and a mandate signs that JWT's SHA-256 as `checkout_hash`. `build` returns the checkout mandate to sign and the payment mandate's `transactionId`, both that digest. `card/mastercard-vi/immediate` reads H from the checkout mandate the user's L2 mandate references, and checks the `checkout_hash` and any disclosed `transaction_id`; it verifies no signature. `card/mastercard-vi/autonomous` reads H from the agent's L3b checkout mandate, and verifies the ES256 signatures of L2 and L3b and their `sd_hash` links, but not the L1 issuer's signature. The LCP profile [`card/mastercard-vi`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/card-mastercard-vi.md) states the rules. * **`card/seller-reference`.** A plain card checkout: nothing the buyer signs carries H. The seller shows H and the link before payment and places `reference` in its processor reference. `build` and `bound` refuse `card/no-signed-place`. ```ts import { hash } from "@integraledger/lcp"; import { pairingsOf, visaTap, type CardOption } from "@integraledger/lcp/card"; const h = await hash(new TextEncoder().encode("the ATR's bytes")); const option: CardOption = { scheme: "visa-tap", checkout: "order-7731" }; console.log(pairingsOf(option), pairingsOf({ scheme: "mastercard-vi", checkout: "order-7731" })); const shown = visaTap.advertise({}, h, `https://atr.seller.example/${h}`, option); if ("refused" in shown) throw new Error(shown.code); console.log(shown.reference === `lcp:sha256:${h}`); const field = await visaTap.build(shown, h); if ("refused" in field) throw new Error(field.code); console.log(field.field, field.component, field.value === h); ``` ```text [ 'card/visa-tap' ] [ 'card/mastercard-vi/immediate', 'card/mastercard-vi/autonomous' ] true lcp-hash lcp-hash true ``` ## A2A The [Agent2Agent protocol](https://a2a-protocol.org) signs nothing per transaction, so it has no place for H in a payment. What it can do is deliver H and the link with the task. This package defines an A2A extension for that, and exports no pairing: `binding` is the refusal `a2a/no-signed-place`, and the payment made for the task uses its own pairing, whose record states what it proves. | Export | What it does | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `A2A_EXTENSION_URIS` | The extension's URI: `https://integraledger.com/lcp/a2a/legal-context/v1`. | | `agentExtension({ required? })` | The Agent Card `capabilities.extensions[]` entry that declares it. | | `requested(header)` | Whether a request's `A2A-Extensions` header value names the extension. | | `place(task, h, link, header?)` | A copy of the Task with `{type, value, legalContextUrl}` in its `metadata`, under the extension's URI. Other metadata is kept. | | `read(task)` | H and the link from the Task's `metadata`. | | `delivery.proves` | What the delivery shows: nothing about the payment. | ```ts import { hash } from "@integraledger/lcp"; import { agentExtension, place, read, requested, type A2aTask } from "@integraledger/lcp/a2a"; console.log(agentExtension()[0]?.uri); const h = await hash(new TextEncoder().encode("the ATR's bytes")); const header = "https://integraledger.com/lcp/a2a/legal-context/v1"; console.log(requested(header)); const task: A2aTask = { id: "task-1", contextId: "ctx-1", status: { state: "input-required" }, kind: "task" }; const delivered = place(task, h, `https://atr.seller.example/${h}`, header); if ("refused" in delivered) throw new Error(String(delivered.code)); const got = read(delivered); console.log("refused" in got ? got.code : got.h === h && got.link.endsWith(h)); console.log(read(task)); ``` ```text https://integraledger.com/lcp/a2a/legal-context/v1 true true { refused: true, code: 'a2a/no-legal-context' } ``` The LCP profile [`a2a-legal-context-v1`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/a2a-legal-context-v1.md) states the extension's rules. ## Next * [Buyer](https://lcp.integraledger.com/guides/buyer): the gate every checkout on this page runs before the buyer approves. * [Pairings reference](https://lcp.integraledger.com/reference/pairings): each checkout pairing's pattern and what its record proves. --- # Rails > Where the ATR hash rides on each chain and payment network, and how each rail's settlement is read. Source: https://lcp.integraledger.com/guides/rails A **rail** is where the payment settles: an EVM chain, Solana, the XRP Ledger, a Lightning node. x402 and MPP each define how a payment is authorized on a rail, and each rail offers different fields a payment can carry: a nonce, a memo, a note, a salt, an invoice field. This page gives, for every rail this package supports, the field H rides in, the pairings that use it, and how the settlement is read. Each rail's pieces are in their own entry point, such as `@integraledger/lcp/evm` or `@integraledger/lcp/sui`: the signed form the payer produces, where H sits in it, and the settlement read. The pairings that use a rail are exported from the protocol's entry point or the rail's own, as the [pairings reference](https://lcp.integraledger.com/reference/pairings) lists. ## The forms H takes on a rail A rail field holds H in one of these forms: | Form | Size | Used where | | ------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | H's 32 bytes | 32 bytes | EVM nonces and salts, the Casper nonce, Sui's unused `Pure` input, the Stacks memo, the MPP XRPL `InvoiceID`, the Lightning invoice field. | | H's LCP string, `lcp:sha256:0x…` | 77 bytes | Memos and notes: Solana, Algorand, Hedera, NEAR, Tron, TON, Concordium, the Polkadot remark, Cardano's CIP-20 message, the XRPL session memo. | | H's first 8 bytes | 8 bytes | The Stellar muxed id, and the MPP Solana session salt. | | H's low 250 bits | one felt | The Starknet nonce. | | SHA-256 of H's LCP string | 32 bytes | The x402 XRPL `InvoiceID`. | | A value derived from the challenge id | varies | The MPP charges on EVM, Tempo and Hedera, and `usdc` on EVM and Gateway, whose nonce, salt or memo derives from the challenge id that carries H. | A field that holds only part of H, or a value derived from it, lets anyone holding the ATR confirm H, but does not let anyone recover H from the chain alone. Each pairing's `pattern` says which it is: `zeroPartyRecoverable` is true only where the chain keeps H itself. This example prints the forms for one H, using each rail's own helper: ```ts import { hash, toLcpString } from "@integraledger/lcp"; import { challengeId } from "@integraledger/lcp/mpp"; import { snNonce } from "@integraledger/lcp/starknet"; import { muxedId } from "@integraledger/lcp/stellar"; import { mppInvoiceId, x402InvoiceId } from "@integraledger/lcp/xrpl"; const h = await hash(new TextEncoder().encode("abc")); console.log("H: ", h); console.log("LCP string (memos): ", toLcpString(h)); console.log("Stellar muxed id: ", muxedId(h)); console.log("Starknet nonce: ", snNonce(h)); console.log("x402 XRPL InvoiceID: ", await x402InvoiceId(h)); console.log("MPP XRPL InvoiceID: ", mppInvoiceId(h)); console.log("MPP challenge id: ", challengeId(h, 0)); ``` ```text H: 0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad LCP string (memos): lcp:sha256:0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad Stellar muxed id: 13436514500253700074n Starknet nonce: 0x27816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad x402 XRPL InvoiceID: FD9AF578DE2AF5DFC44BE5821EEF4EFE048BB2268AC8F59D58162E8310A3AB73 MPP XRPL InvoiceID: BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD MPP challenge id: ungWv48Bz-pBQUDeXa4iI7ADYaOWF3qctBD_YfIAFa0.0 ``` ## Rail by rail | Rail | Entry point | Pairings | Where H rides | | --------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | EVM chains (`eip155`) | `evm` | `x402/exact/eip155/eip3009`, `x402/exact/eip155/permit2`, `x402/upto/eip155/permit2` | The nonce of the EIP-3009 authorization, or of the Permit2 witness transfer, the payer signs. | | | | `x402/auth-capture/eip155/eip3009`, `x402/auth-capture/eip155/permit2` | The escrow payment's salt, or a commitment over it with the receiver authorizer and policy, which the token authorization's nonce commits to. | | | | `x402/exact/eip155/erc7710-salt`, `x402/exact/eip155/erc7710` | The salt of the redeemed leaf delegation; or, where the delegation signs no hash, the echoed extension only. | | | | `x402/batch-settlement/eip155`, `mpp/session/evm` | The channel's salt. See [Channels, sessions and subscriptions](https://lcp.integraledger.com/guides/sessions). | | | | `mpp/charge/evm/authorization`, `mpp/charge/evm/permit2`, `mpp/charge/usdc/evm`, `mpp/charge/usdc/gateway` | A nonce or salt derived from the MPP challenge id. | | | | `mpp/charge/evm/transaction`, `mpp/charge/evm/hash` | The challenge only; the payment transaction carries nothing. | | Tempo | `tempo` | `mpp/charge/tempo/memo`, `mpp/charge/tempo/push` | MPP's attribution memo on `transferWithMemo`, whose last 7 bytes derive from the challenge id. | | | | `mpp/session/tempo`, `mpp/subscription/tempo` | The channel's salt, or the key authorization's witness. | | Solana | `svm`, `x402-exact-solana`, `x402-upto-solana` | `x402/exact/solana`, `x402/upto/solana`, `x402/batch-settlement/solana`, `mpp/charge/solana`, `mpp/charge/usdc/solana` | The transaction's one Memo instruction, holding H's LCP string. | | | | `mpp/session/solana` | The session channel's salt: H's first 8 bytes. | | Stellar | `stellar`, `x402-exact-stellar` | `x402/exact/stellar`, `mpp/charge/stellar` | The seller's muxed address, whose 8-byte id is H's first 8 bytes, as the Soroban `transfer`'s `to`. | | XRP Ledger | `xrpl`, `x402-exact-xrpl` | `x402/exact/xrpl` | The Payment's `InvoiceID`: SHA-256 of H's LCP string. | | | | `mpp/charge/xrpl` | The Payment's `InvoiceID`: H. | | | | `mpp/session/xrpl` | The `PaymentChannelCreate`'s one memo: H's LCP string. | | Hedera | `hedera` | `x402/exact/hedera` | The signed transaction body's memo: H's LCP string. | | | | `mpp/charge/hedera` | MPP's attribution memo, as the signed body memo. | | | | `mpp/session/hedera` | The escrow channel's salt. | | | | `x402/exact/hedera/transfer-executor` | The challenge only. | | Algorand | `avm` | `x402/exact/algorand` | The asset transfer's `note`: H's LCP string. | | Aptos | `aptos` | `x402/exact/aptos` | The challenge only. No field of a standard Aptos transfer carries H; the seller ties the payment to H when it claims it for the request. | | Cardano | `cardano` | `x402/exact/cardano` | A CIP-20 message (metadata label 674) holding H's LCP string as two strings, `lcp:sha256:0x` and the 64 hex digits, which the signed body commits to through `auxiliary_data_hash`. | | Casper | `casper` | `x402/exact/casper` | The CEP-3009 authorization's `nonce`. | | Concordium | `ccd` | `x402/exact/ccd` | The one transfer's memo: H's LCP string as a CBOR text string, which a PLT transfer wraps in CBOR tag 24. | | NEAR | `near` | `x402/exact/near` | The `memo` of the one NEP-141 `ft_transfer` in the NEP-366 delegate action the payer signs. | | | `mpp` | `mpp/charge/nearintents` | The challenge's `externalId`. The deposit carries nothing. | | Polkadot Asset Hub | `polkadot` | `x402/exact/polkadot/lcp-assets-remark` | A `system.remark_with_event` holding H's LCP string, batched atomically with the asset transfer in one signed extrinsic. | | Starknet | `starknet` | `x402/exact/starknet` | The SNIP-9 outside execution's nonce: H's low 250 bits. | | Sui | `sui` | `x402/exact/sui` | One `Pure` input, H's 32 bytes, that no command uses. | | Tron | `tron` | `x402/exact/tron/lcp-trc20-memo` | The TRC-20 transfer's memo, `raw_data.data`: H's LCP string. | | TON | `tvm` | `x402/exact/tvm` | The Jetton transfer's forward payload: a TEP-74 text comment holding H's LCP string. | | Stacks | `stacks` | `mpp/charge/usdc/stacks` | The SIP-010 `transfer`'s memo: H's 32 bytes. | | Lightning | `lightning` | `x402/exact/lnbtc` | The BOLT11 invoice's `m` field, which the seller's node signs. | | | | `x402/exact/lnbtc/invoice-named` | Nothing in the invoice: the ATR's binding slot names the invoice instead. | | | | `mpp/charge/lightning`, `mpp/session/lightning` | The BOLT11 invoice's description hash `h`, which the seller's node signs. | Where a profile defines the binding, the [pairings reference](https://lcp.integraledger.com/reference/pairings) links it, and the profile states the rail's rules clause by clause. ## Peer dependencies Some rails parse their wire formats with the rail's own library, which the package declares as an optional peer dependency. Install the one for each rail you use: | Rail | Install | | ---------- | --------------------------------------------------- | | Solana | `@solana/kit` | | Stellar | `@stellar/stellar-sdk` | | XRP Ledger | `ripple-binary-codec` | | Sui | `@mysten/sui` | | NEAR | `@near-js/crypto`, `@near-js/transactions`, `borsh` | | TON | `@ton/core` | | Algorand | `algosdk` | | Stacks | `@stacks/transactions` | Without its peer, a rail's functions refuse with `/peer-missing`, or the pairing serves no option. Every other rail needs nothing more than the package. ## Reading settlement `status(ref, reader)` reads a payment's settlement through a **reader** you supply: an object with a few read-only calls against one network's endpoint. The package makes those calls and nothing else, so the endpoint, the credentials, the timeouts and the retries are yours. Each `status` makes a bounded number of calls. A reader that throws, times out, or answers for another network never makes a payment failed: `status` answers pending, with the reason `unreadable`, and a later read can settle it. Failed means the rail itself says so: a reverted, aborted or expired transaction, or one that does not carry this payment. | Rail | Reader | Its calls | Settled carries | | ------------------ | ---------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | EVM chains, Tempo | `EvmReader` | `eth_getTransactionReceipt`, `eth_getBlockByNumber` for the `safe` and `finalized` marks, `eth_getTransactionByHash` | the finality mark reached: `latest`, `safe` or `finalized` | | Solana | `SvmReader` | `getTransaction` at a commitment, `getSignaturesForAddress`, `isBlockhashValid`, `getFirstAvailableBlock` | the commitment: `confirmed` or `finalized` | | Stellar | `StellarReader` | `getTransaction`, SEP-41 `transfer` events, `getLatestLedger` | the ledger | | XRP Ledger | `XrplReader` | `tx` by hash, `tx` as a binary blob, the validated ledger index | the validated ledger index | | Hedera | `HederaReader` | the Mirror Node's transaction by id; the MPP session reads its escrow through an `EvmReader` on Hedera's JSON-RPC relay | the consensus timestamp | | Algorand | `AvmReader` | the Indexer's transaction search by id | the confirmed round | | Aptos | `AptosReader` | the transaction by hash, the sender's transaction by sequence number, the ledger info | the version | | Cardano | `CardanoReader` | the chain tip, the transaction by id | the confirmations | | Casper | `CasperReader` | `info_get_transaction` | the finalized block height | | Concordium | `CcdReader` | gRPC `GetBlockItemStatus` | `finalized` | | NEAR | `NearReader` | `EXPERIMENTAL_tx_status`, the final block height, `view_access_key` | `final` or `optimistic` | | Polkadot Asset Hub | `PolkadotReader` | Sidecar's extrinsic by block and index, a block's raw extrinsics, the finalized head | `finalized` or `head` | | Starknet | `StarknetReader` | `starknet_getTransactionReceipt`, `starknet_traceTransaction` | `ACCEPTED_ON_L2` or `ACCEPTED_ON_L1` | | Sui | `SuiReader` | the transaction by digest, with the current epoch | the checkpoint | | Tron | `TronReader` | `gettransactioninfobyid` at the solidified or head level, `gettransactionbyid`, the latest solidified block | `solidified` or `head` | | TON | `TvmReader` | Toncenter's transactions by message body hash, by message hash and by hash, and the masterchain head | `confirmed` or `finalized` | | Stacks | `StacksReader` | the transaction by id, a block's tenure height, the tip's tenure height, an account's confirmed nonce | `block` or `bitcoin` | On EVM chains, a reader rejects with `ReaderError` and one of the kinds `timeout`, `too-large`, `transport` or `malformed`. The [seller guide](https://lcp.integraledger.com/guides/seller#the-whole-flow) builds an `EvmReader` from one receipt and reads a settlement through it. Lightning has no settlement read: the invoice and its preimage, which the parties hold, are the proof of payment, and no public ledger shows it. Its pairings give `reference` and no `status`. ## Recovering H from the chain alone On some rails the settled transaction keeps H itself, so anyone can read it back without either party. Those pairings have `recover(tx, reader)` and `pattern.zeroPartyRecoverable` set. This example lists them from the registry: ```ts import { BINDINGS } from "@integraledger/lcp"; const recoverable = BINDINGS.filter((b) => b.pattern.zeroPartyRecoverable).map((b) => b.id); console.log(recoverable.length); console.log(recoverable.sort().join("\n")); ``` ```text 23 mpp/charge/solana mpp/charge/usdc/solana mpp/charge/usdc/stacks mpp/charge/xrpl mpp/session/hedera mpp/session/xrpl mpp/subscription/tempo x402/batch-settlement/eip155 x402/batch-settlement/solana x402/exact/algorand x402/exact/cardano x402/exact/casper x402/exact/ccd x402/exact/eip155/eip3009 x402/exact/eip155/erc7710-salt x402/exact/hedera x402/exact/near x402/exact/polkadot/lcp-assets-remark x402/exact/solana x402/exact/sui x402/exact/tron/lcp-trc20-memo x402/exact/tvm x402/upto/solana ``` ## Where the payment is not a public proof On some pairings the settlement leaves no public record that commits to H: `pattern.publicProof` is false. H still rides in the challenge, and each pairing's record says what its payment shows. On most of them nothing the buyer signs carries H either. On Lightning the invoice carries H, but the invoice and its preimage are held by the parties, and no public ledger shows them. For these pairings the seller can advertise an [agreement URL](https://lcp.integraledger.com/concepts/buyer-gate#the-agreement-url): the buyer first pays that URL, whose payment is a public proof of H, and then the full payment. This example lists the x402 and MPP pairings it applies to: ```ts import { BINDINGS } from "@integraledger/lcp"; const rails = BINDINGS.filter((b) => /^(x402|mpp)\//.test(b.id) && !b.pattern.publicProof).map((b) => b.id); console.log(rails.sort().join("\n")); ``` ```text mpp/charge/card mpp/charge/evm/hash mpp/charge/evm/transaction mpp/charge/lightning mpp/charge/nearintents mpp/charge/stripe mpp/session/lightning mpp/subscription/stripe x402/batch-settlement/cloudflare x402/exact/aptos x402/exact/eip155/erc7710 x402/exact/hedera/transfer-executor x402/exact/lnbtc x402/exact/lnbtc/invoice-named ``` The checkout pairings are the same where the buyer's approval does not sign H; see [Agentic checkouts](https://lcp.integraledger.com/guides/checkouts). ## Next * [Binding](https://lcp.integraledger.com/concepts/binding): the binding patterns and the `pattern` record. * [x402](https://lcp.integraledger.com/guides/x402) and [MPP](https://lcp.integraledger.com/guides/mpp): the protocols these rails settle under. --- # Discovery > The discovery document a seller publishes at /.well-known/legal-context.json, and how emit and parse write and read it. Source: https://lcp.integraledger.com/guides/discovery A seller can publish a **discovery document** (`LCP §2`): one small JSON object, served at `/.well-known/legal-context.json` on the seller's host, that names the seller's terms document and how to reach the seller. Because the path is fixed, an agent finds it from the host name alone. The discovery document is not an ATR. It describes the seller's standing terms and is the same for every request; an ATR is the record of one transaction, and its hash rides in that transaction's payment. Nothing in a pairing reads the discovery document. Import the pieces from `@integraledger/lcp/discovery`: | Export | What it is | | ---------------------- | ------------------------------------------------------------------------------------- | | `emit(document)` | The document's bytes: its members checked and written in a fixed order, or a refusal. | | `parse(bytes)` | The document read from bytes, with the names of the members it ignored, or a refusal. | | `WELL_KNOWN_PATH` | `"/.well-known/legal-context.json"` | | `MAX_DOCUMENT_BYTES` | `65536`: the largest document either function accepts. | | `LegalContextDocument` | The document's type. | Neither function throws or does any I/O. Serving the bytes, and fetching them, are yours. ## The members These are the members `LCP §2.4` and `LCP §2.5` define, in the order their tables list them. Their meanings are the specification's; the last column is what `emit` and `parse` check. | Member | Type | Checked | | -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `terms` | string | Required. An absolute `https` URL that meets the [link rule](https://lcp.integraledger.com/concepts/atr-hash#the-link). | | `termsFormat` | string | Not empty. | | `atrHash` | string | The digest of the document at `terms` (`LCP §2.5`): `0x` and 64 hex digits, in either case. It is written in lowercase. | | `acceptanceRequired` | boolean | A boolean. | | `disputeResolution` | object | Its members `method`, `jurisdiction`, `contact`, `clauseId`, `source` and `catalog`, in that order, each a non-empty string. `clauseId` is `sha256:0x` and 64 hex digits. | | `returns` | string | Not empty. | | `contact` | object | Its members `legal` and `technical`, each a non-empty string. | | `api` | string | Not empty. | Every member other than `terms` is optional. An absent member is left out, never written as `null`. ## Writing the document `emit(document)` checks each member, then writes the members in the table's order, with no whitespace, strings escaped as `JSON.stringify` escapes them, and `atrHash` in lowercase. A member the table does not name is not written. The result is at most `MAX_DOCUMENT_BYTES`. This example writes the reference document from the package's vectors, whose `atrHash` is SHA-256 of `"abc"` given in upper case: ```ts import { hash } from "@integraledger/lcp"; import { emit, WELL_KNOWN_PATH, type LegalContextDocument } from "@integraledger/lcp/discovery"; const document: LegalContextDocument = { terms: "https://seller.example/terms/v3.md", termsFormat: "markdown", atrHash: "0xBA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD", acceptanceRequired: false, contact: { legal: "legal@seller.example" }, }; const bytes = emit(document); if ("refused" in bytes) throw new Error(bytes.code); console.log(WELL_KNOWN_PATH); console.log(new TextDecoder().decode(bytes)); console.log(bytes.length, "bytes"); console.log(`ETag: "${(await hash(bytes)).slice(2)}"`); ``` ```text /.well-known/legal-context.json {"terms":"https://seller.example/terms/v3.md","termsFormat":"markdown","atrHash":"0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad","acceptanceRequired":false,"contact":{"legal":"legal@seller.example"}} 220 bytes ETag: "027d93681365deb2f485c4c34f7b0da7de8741db90a9fa6ea2437aa70bebd31a" ``` Serve those bytes at `WELL_KNOWN_PATH`. The same input always gives the same bytes, so a strong ETag over them is stable: [`vectors/discovery.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/discovery.json) fixes it as the SHA-256 in hex, in double quotes. ## Reading a document `parse(bytes)` reads what a seller served. It accepts one JSON object of at most `MAX_DOCUMENT_BYTES`, in well-formed UTF-8 without a byte-order mark, nested at most 64 levels deep, and checks each member as the table says. Where a member appears twice, the last one is read, as `JSON.parse` reads it. A member the table does not name, at the top level or inside `disputeResolution` or `contact`, is left out of `document` and named in `ignored` by its dotted path, so you can see what the seller sent that the specification does not define. ```ts import { parse } from "@integraledger/lcp/discovery"; const served = new TextEncoder().encode( JSON.stringify({ terms: "https://seller.example/terms/v3.md", atrHash: "0xBA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD", contact: { legal: "legal@seller.example", phone: "+1 555 0100" }, "x-region": "eu", }), ); const read = parse(served); if ("refused" in read) throw new Error(read.code); console.log(read.document); console.log(read.ignored); const overHttp = parse(new TextEncoder().encode('{"terms":"http://seller.example/terms/v3.md"}')); console.log("refused" in overHttp ? overHttp.code : "read"); ``` ```text { terms: 'https://seller.example/terms/v3.md', atrHash: '0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad', contact: { legal: 'legal@seller.example' } } [ 'contact.phone', 'x-region' ] discovery/terms-not-https ``` `emit` over the `document` that `parse` returns writes it in the fixed order, so every reader of one document can hold the same bytes. ## Refusals | Code | When | | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `discovery/too-large` | The bytes, or the document `emit` would write, exceed `MAX_DOCUMENT_BYTES`. | | `discovery/not-json-object` | The bytes are not one JSON object: not JSON, not UTF-8, a byte-order mark, an array, or nested more than 64 levels. `emit` gives it for an input that is not an object. | | `discovery/terms-missing` | `terms` is absent. | | `discovery/terms-not-https` | `terms` is not an absolute `https` URL that meets the link rule. | | `discovery/atr-hash-malformed` | `atrHash` is not `0x` and 64 hex digits. | | `discovery/clause-id-malformed` | `disputeResolution.clauseId` is not `sha256:0x` and 64 hex digits. | | `discovery/member-malformed/` | The member at `` has the wrong type, or is an empty string: for example `discovery/member-malformed/contact.legal`. | ## Fetching it The fetch is yours. Bound it as you bound any fetch of a seller's bytes: one `GET` to `https:///.well-known/legal-context.json`, a deadline, and a body cancelled once it passes `MAX_DOCUMENT_BYTES`. Then pass the bytes to `parse`. ## Next * [The ATR](https://lcp.integraledger.com/concepts/atr): the per-transaction record a payment is bound to. * [Vectors](https://lcp.integraledger.com/concepts/vectors): `vectors/discovery.json` fixes what `emit` writes and what `parse` reads or refuses, including every example of `LCP §2.7`. --- # Entry points > Every entry point of @integraledger/lcp and what it exports. Source: https://lcp.integraledger.com/reference/entry-points This page is generated from the package by `node scripts/docs-reference.mjs`, and CI checks that it matches. Import each entry point by its subpath. Every entry point is ESM with its own type declarations. The [API reference](https://lcp.integraledger.com/reference/api) gives each export's signature and documentation. | Entry point | What it holds | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`@integraledger/lcp`](#integraledgerlcp) | The core: assembling an ATR and hashing its exact bytes, comparing hashes, the hash's string and structured forms, the https-link rule, and the registry of every pairing (`BINDINGS`, `pairingOf`, `canonicalTx`). | | [`@integraledger/lcp/a2a`](#integraledgerlcpa2a) | 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. | | [`@integraledger/lcp/ack`](#integraledgerlcpack) | 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. Pure; no I/O. No token or receipt signature is verified here. | | [`@integraledger/lcp/acp`](#integraledgerlcpacp) | 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`, with the link beside it in the session's `metadata.legal_context`, and, where the handler requires `delegate_payment`, as the allowance's `checkout_session_id`. Pure; no I/O. Nothing here signs or verifies a signature. | | [`@integraledger/lcp/ap2`](#integraledgerlcpap2) | 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, committed to by the buyer's closed Checkout Mandate through `checkout_hash`, and read back from inside the mandate. Nothing here verifies a signature. | | [`@integraledger/lcp/aptos`](#integraledgerlcpaptos) | 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, read back from the echoed extension, and tied to the payment by the seller's claim. The settlement is found by the payer's sender and sequence number, and identified by a digest of the transfer the payer signed. | | [`@integraledger/lcp/avm`](#integraledgerlcpavm) | 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 without it the pairing serves no option. | | [`@integraledger/lcp/card`](#integraledgerlcpcard) | The `card` entry point: the ATR hash on a card checkout, on three paths. | | [`@integraledger/lcp/cardano`](#integraledgerlcpcardano) | Cardano, and the `x402/exact/cardano` pairing: the ATR hash as a CIP-20 message (metadata label 674) that the payer's signed body commits to through `auxiliary_data_hash`. The transaction id is the Blake2b-256 of the body as received, so settlement is read by an id fixed before any money moves. | | [`@integraledger/lcp/casper`](#integraledgerlcpcasper) | 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. | | [`@integraledger/lcp/ccd`](#integraledgerlcpccd) | 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. | | [`@integraledger/lcp/discovery`](#integraledgerlcpdiscovery) | The discovery document of LCP §2, served at `/.well-known/legal-context.json`. `parse` reads one; `emit` writes one, members in the order of LCP §2.4–§2.5's tables, absent members omitted, no whitespace, UTF-8. Both check only what LCP §2 states. Neither throws or does I/O. | | [`@integraledger/lcp/evm`](#integraledgerlcpevm) | EIP-3009 on eip155 chains: the typed data a payer signs, the identity digest of a transfer, and the settlement read from the token's `AuthorizationUsed` event. Nothing here knows x402. | | [`@integraledger/lcp/hedera`](#integraledgerlcphedera) | Hedera: the transaction wire form read and written by hand (protobuf, five messages), the Mirror Node settlement read, and 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); and MPP's `mpp/charge/hedera`, whose signed memo is MPP's attribution memo, its nonce keccak256 of the challenge id that carries the hash. | | [`@integraledger/lcp/lightning`](#integraledgerlcplightning) | BOLT11 invoices and the Lightning pairings on x402 and MPP. On `x402/exact/lnbtc` the seller's node writes the ATR hash as the invoice's `m` field and signs it; on `x402/exact/lnbtc/invoice-named` the invoice carries no hash and the ATR's `x402` slot names the invoice instead. On MPP the seller's node writes the ATR hash as the invoice's description hash `h`. The payer signs nothing; it pays the invoice. | | [`@integraledger/lcp/mpp`](#integraledgerlcpmpp) | The `mpp` entry point: MPP's challenge pieces and its pairings. The charge pairings here are EVM `authorization` (the signed nonce is keccak256(id ‖ realm)), EVM `permit2` (the signed witness carries that value), EVM `transaction` and `hash` (nothing signed carries H), and Tempo pull and push (the signed `transferWithMemo` carries MPP's attribution memo, whose nonce is keccak256 of the id). The session and subscription pairings are re-exported from their module. | | [`@integraledger/lcp/near`](#integraledgerlcpnear) | 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. Settlement is read from the relayed transaction's receipts through a bounded reader. | | [`@integraledger/lcp/polkadot`](#integraledgerlcppolkadot) | Polkadot Asset Hub: the profile pairing `x402/exact/polkadot/lcp-assets-remark`, in which the payer signs one extrinsic whose call is `utility.batch_all([assets.transfer_keep_alive, system.remark_with_event])` with the ATR hash's LCP string as the remark; the settlement is read by block and index through Sidecar. SCALE is encoded and decoded here for these shapes only. | | [`@integraledger/lcp/stacks`](#integraledgerlcpstacks) | Stacks rail pieces: the transaction id, the reader a settlement read goes through, the reading of a SIP-010 `transfer` whose memo argument is the ATR hash's 32 bytes, and the zero-party recovery of that hash from a mined transaction. | | [`@integraledger/lcp/starknet`](#integraledgerlcpstarknet) | 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. Settlement is read from the executed call's trace 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. | | [`@integraledger/lcp/stellar`](#integraledgerlcpstellar) | Stellar rail pieces: the payer-signed Soroban `transfer`, its muxed `to` whose 8-byte id is the ATR hash's first 8 bytes, the digest of the signed authorization entry, and settlement read through a bounded reader. | | [`@integraledger/lcp/sui`](#integraledgerlcpsui) | 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 and base58 use @mysten/sui, loaded once when this module is; without it every function that needs it refuses `sui/peer-missing`, and `status` reads as pending `unreadable`. | | [`@integraledger/lcp/svm`](#integraledgerlcpsvm) | Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. | | [`@integraledger/lcp/tempo`](#integraledgerlcptempo) | 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. | | [`@integraledger/lcp/tron`](#integraledgerlcptron) | Tron: the transaction pieces (protobuf for the fields the profile uses, base58check addresses, the transaction id) and 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. Settlement is read by transaction id through a bounded reader. | | [`@integraledger/lcp/tvm`](#integraledgerlcptvm) | 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 Jetton wallets' transactions through a bounded reader. | | [`@integraledger/lcp/ucp`](#integraledgerlcpucp) | UCP checkouts and bookings, and four pairings: 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 inside the buyer's checkout mandate, after AP2's `checkout_hash` check; the `unsigned` pairings have nothing signed to read. Nothing here takes a key, signs or verifies a signature. | | [`@integraledger/lcp/x402`](#integraledgerlcpx402) | x402 v2 documents and the `x402/exact/eip155/eip3009` pairing: the ATR hash advertised in the challenge's `extensions.legalContext`, signed by the payer as the EIP-3009 nonce, read back from the payment, and read from the settlement. | | [`@integraledger/lcp/x402-batch-settlement`](#integraledgerlcpx402-batch-settlement) | x402 `batch-settlement`: one ATR per channel. On EVM the ATR hash is the channel configuration's `salt`, which the channel id commits to and every signature signs; on Solana it is the opening transaction's one memo; on Cloudflare it rides the echoed `extensions.legalContext` of each request, with no channel. | | [`@integraledger/lcp/x402-exact-solana`](#integraledgerlcpx402-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. | | [`@integraledger/lcp/x402-exact-stellar`](#integraledgerlcpx402-exact-stellar) | The `x402/exact/stellar` pairing: the ATR hash advertised in the challenge's `extensions.legalContext`, and its first 8 bytes carried as the muxed id of the option's `payTo`, which the payer signs as the Soroban `transfer`'s `to`. | | [`@integraledger/lcp/x402-exact-xrpl`](#integraledgerlcpx402-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`, read back from the signed blob, and settlement read by the blob's hash. | | [`@integraledger/lcp/x402-upto-solana`](#integraledgerlcpx402-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 escrowing the signed maximum; read back from that transaction, and settlement read from the opening. | | [`@integraledger/lcp/xrpl`](#integraledgerlcpxrpl) | XRP Ledger rail pieces: the signed Payment blob, its `InvoiceID` carrying the ATR hash in each scheme's form, the transaction hash computed from the blob, and settlement read by that hash through a bounded reader. | ## `@integraledger/lcp` The core: assembling an ATR and hashing its exact bytes, comparing hashes, the hash's string and structured forms, the https-link rule, and the registry of every pairing (`BINDINGS`, `pairingOf`, `canonicalTx`). ```ts no-check import { assemble, BINDINGS, canonicalJson, … } from "@integraledger/lcp"; ``` **Values (22):** `assemble`, `BINDINGS`, `canonicalJson`, `canonicalTx`, `digestJson`, `fromLcpString`, `fromLegalContext`, `fromRawBytes`, `hash`, `hashEquals`, `isHashWithNonHttpsLink`, `isHttpsLink`, `isOtherSchemeLink`, `jsonWithinDepth`, `MAX_JSON_DEPTH`, `newAtrId`, `pairingOf`, `pairingsOfPlaced`, `parseJson`, `toLcpString`, `toLegalContext`, `toRawBytes`. **Types (17):** `AtrHash`, `Binding`, `CarrierAfterH`, `CoreRefusal`, `Json`, `LcpPattern`, `MppBinding`, `PairingId`, `PairingOn`, `Presented`, `PresentedOn`, `PushMode`, `Refusal`, `Surface`, `TieRequestOn`, `TxSpelling`, `X402Binding`. ## `@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. ```ts no-check import { A2A_EXTENSION_URIS, agentExtension, binding, … } from "@integraledger/lcp/a2a"; ``` **Values (7):** `A2A_EXTENSION_URIS`, `agentExtension`, `binding`, `delivery`, `place`, `read`, `requested`. **Types (2):** `A2aAgentExtension`, `A2aTask`. ## `@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. ACK defines no payer signature, so `build` and `bound` always refuse. Pure; no I/O. No token or receipt signature is verified here. ```ts no-check import { fromReceipt, paymentRequest, tie } from "@integraledger/lcp/ack"; ``` **Pairings:** `ack/payment-request`. **Values (3):** `fromReceipt`, `paymentRequest`, `tie`. **Types (3):** `AckBody`, `AckPaymentOption`, `AckValues`. ## `@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`, with the link beside it in the session's `metadata.legal_context`, and, where the handler requires `delegate_payment`, as the allowance's `checkout_session_id`. Pure; no I/O. Nothing here signs or verifies a signature. ```ts no-check import { delegated, issuedDigest, METADATA_KEY, … } from "@integraledger/lcp/acp"; ``` **Pairings:** `acp/checkout/delegated`, `acp/checkout/undelegated`. **Values (5):** `delegated`, `issuedDigest`, `METADATA_KEY`, `tie`, `undelegated`. **Types (7):** `AcpBinding`, `AcpChoice`, `Allowance`, `HandlerOption`, `Presented`, `Session`, `Unsigned`. ## `@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, committed to by the buyer's closed Checkout Mandate through `checkout_hash`, and read back from inside the mandate. Nothing here verifies a signature. ```ts no-check import { CHECKOUT_VCT, checkoutBinding, checkoutJwtOf, … } from "@integraledger/lcp/ap2"; ``` **Pairings:** `ap2/checkout-mandate`. **Values (8):** `CHECKOUT_VCT`, `checkoutBinding`, `checkoutJwtOf`, `checkoutMandate`, `issuedDigest`, `jwsPayload`, `readMandate`, `tie`. **Types (7):** `Ap2Offer`, `CheckoutOption`, `Jws`, `MandateContent`, `Payload`, `Presented`, `Unsigned`. ## `@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, read back from the echoed extension, and tied to the payment by the seller's claim. The settlement is found by the payer's sender and sequence number, and identified by a digest of the transfer the payer signed. ```ts no-check import { aptosIdDigest, aptosOptionCheck, aptosPairingOf, … } from "@integraledger/lcp/aptos"; ``` **Pairings:** `x402/exact/aptos`. **Values (7):** `aptosIdDigest`, `aptosOptionCheck`, `aptosPairingOf`, `aptosStatus`, `committedInstrument`, `decodeAptosTx`, `exactAptos`. **Types (8):** `AptosCommitted`, `AptosInstrument`, `AptosNetwork`, `AptosPaymentPayload`, `AptosReader`, `AptosRef`, `AptosStatus`, `AptosUnsigned`. ## `@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. `algosdk` is an optional peer: this module loads it when present, and without it the pairing serves no option. ```ts no-check import { avmCarrier, avmPairingOf, avmRecover, … } from "@integraledger/lcp/avm"; ``` **Pairings:** `x402/exact/algorand`. **Values (7):** `avmCarrier`, `avmPairingOf`, `avmRecover`, `avmStatus`, `exactAvm`, `MSGPACK_MAX_DEPTH`, `msgpackWithinCaps`. **Types (8):** `AlgorandNetwork`, `AvmParams`, `AvmPaymentPayload`, `AvmPresented`, `AvmReader`, `AvmRef`, `AvmStatus`, `AvmUnsigned`. ## `@integraledger/lcp/card` The `card` entry point: the ATR hash on a card checkout, on three paths. ```ts no-check import { disclosureDigest, pairingsOf, sellerReference, … } from "@integraledger/lcp/card"; ``` **Pairings:** `card/mastercard-vi/autonomous`, `card/mastercard-vi/immediate`, `card/seller-reference`, `card/visa-tap`. **Values (8):** `disclosureDigest`, `pairingsOf`, `sellerReference`, `TAP_FIELD`, `tie`, `viAutonomous`, `viImmediate`, `visaTap`. **Types (10):** `CardOption`, `CardPairing`, `CardPairingId`, `CardScheme`, `CardValues`, `TapPresented`, `TapUnsigned`, `ViAutonomous`, `ViImmediate`, `ViUnsigned`. ## `@integraledger/lcp/cardano` Cardano, and the `x402/exact/cardano` pairing: the ATR hash as a CIP-20 message (metadata label 674) that the payer's signed body commits to through `auxiliary_data_hash`. The transaction id is the Blake2b-256 of the body as received, so settlement is read by an id fixed before any money moves. ```ts no-check import { auxiliaryData, cardanoOptionCheck, cardanoPairingOf, … } from "@integraledger/lcp/cardano"; ``` **Pairings:** `x402/exact/cardano`. **Values (8):** `auxiliaryData`, `cardanoOptionCheck`, `cardanoPairingOf`, `cardanoRecover`, `cardanoStatus`, `decodeCardanoTx`, `exactCardano`, `LCP_MARKER`. **Types (9):** `CardanoNetwork`, `CardanoOnChain`, `CardanoPayload`, `CardanoPaymentPayload`, `CardanoReader`, `CardanoRef`, `CardanoStatus`, `CardanoTx`, `CardanoUnsigned`. ## `@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. ```ts no-check import { CASPER_DOMAIN_TYPEHASH, casperIdDigest, casperOption, … } from "@integraledger/lcp/casper"; ``` **Pairings:** `x402/exact/casper`. **Values (7):** `CASPER_DOMAIN_TYPEHASH`, `casperIdDigest`, `casperOption`, `casperRecover`, `casperStatus`, `cep3009TypedData`, `exactCasper`. **Types (12):** `CasperAddress`, `CasperAuthorization`, `CasperCall`, `CasperChoice`, `CasperNetwork`, `CasperPaymentPayload`, `CasperReader`, `CasperRef`, `CasperStatus`, `CasperUnsigned`, `Cep3009TypedData`, `PackageHash`. ## `@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. ```ts no-check import { accountBytes, ccdIdDigest, ccdMemo, … } from "@integraledger/lcp/ccd"; ``` **Pairings:** `x402/exact/ccd`. **Values (9):** `accountBytes`, `ccdIdDigest`, `ccdMemo`, `ccdOption`, `ccdRecover`, `ccdStatus`, `exactCcd`, `memoCarrier`, `pltMemo`. **Types (9):** `CcdChoice`, `CcdItem`, `CcdNetwork`, `CcdPaymentPayload`, `CcdReader`, `CcdRef`, `CcdStatus`, `CcdTransfer`, `CcdUnsigned`. ## `@integraledger/lcp/discovery` The discovery document of LCP §2, served at `/.well-known/legal-context.json`. `parse` reads one; `emit` writes one, members in the order of LCP §2.4–§2.5's tables, absent members omitted, no whitespace, UTF-8. Both check only what LCP §2 states. Neither throws or does I/O. ```ts no-check import { emit, MAX_DOCUMENT_BYTES, parse, … } from "@integraledger/lcp/discovery"; ``` **Values (4):** `emit`, `MAX_DOCUMENT_BYTES`, `parse`, `WELL_KNOWN_PATH`. **Types (1):** `LegalContextDocument`. ## `@integraledger/lcp/evm` EIP-3009 on eip155 chains: the typed data a payer signs, the identity digest of a transfer, and the settlement read from the token's `AuthorizationUsed` event. Nothing here knows x402. ```ts no-check import { AUTHORIZATION_USED_TOPIC, authorizationIdDigest, bindSalt, … } from "@integraledger/lcp/evm"; ``` **Values (32):** `AUTHORIZATION_USED_TOPIC`, `authorizationIdDigest`, `bindSalt`, `carriesBinding`, `decodePermissionContext`, `DELEGATION_MANAGER`, `DELEGATION_MANAGER_CHAINS`, `eip3009Recover`, `eip3009Status`, `eip3009TypedData`, `ESCROW`, `evmStatus`, `EXACT_PERMIT2_PROXY`, `isLog`, `isReceipt`, `PAYMENT_AUTHORIZED_TOPIC`, `PAYMENT_INFO_TYPEHASH`, `paymentHash`, `PERMIT2`, `permit2TypedData`, `ReaderError`, `RECEIVE_POLICY_GUARD`, `receiveTypedData`, `REDEEMED_DELEGATION_TOPIC`, `redeemedLeafRecover`, `SALT_BINDING_TYPEHASH`, `settledAt`, `TRANSFER_TOPIC`, `TRANSFER_WITH_AUTHORIZATION_TYPEHASH`, `transferDigest`, `transferParts`, `UPTO_PERMIT2_PROXY`. **Types (18):** `Delegation`, `Eip155`, `Eip3009Ref`, `Eip3009TypedData`, `EvmBreadthStatus`, `EvmLog`, `EvmReader`, `EvmReceipt`, `EvmRef`, `EvmStatus`, `EvmTransaction`, `EvmTxRef`, `Field`, `Hex`, `PaymentInfo`, `Permit2TypedData`, `ReceiveTypedData`, `TransferIdentity`. ## `@integraledger/lcp/hedera` Hedera: the transaction wire form read and written by hand (protobuf, five messages), the Mirror Node settlement read, and 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); and MPP's `mpp/charge/hedera`, whose signed memo is MPP's attribution memo, its nonce keccak256 of the challenge id that carries the hash. ```ts no-check import { APPROVE_SELECTOR, approveCalldata, CHANNEL_CLOSED_TOPIC, … } from "@integraledger/lcp/hedera"; ``` **Pairings:** `mpp/charge/hedera`, `x402/exact/hedera`, `x402/exact/hedera/transfer-executor`. **Values (22):** `APPROVE_SELECTOR`, `approveCalldata`, `CHANNEL_CLOSED_TOPIC`, `CHANNEL_OPENED_TOPIC`, `chargeHedera`, `decodeHederaTx`, `ESCROW_OPEN_SELECTOR`, `exactHedera`, `exactHederaExecutor`, `executorStatus`, `HEDERA_CHAIN_IDS`, `HEDERA_NETWORKS`, `hederaChannelId`, `hederaChargeRequest`, `hederaIdDigest`, `hederaNetworkOfChainId`, `hederaPairingOf`, `hederaStatus`, `hederaVoucher`, `openCalldata`, `txIdMirror`, `txIdText`. **Types (20):** `ExecutorPayload`, `ExecutorPaymentPayload`, `ExecutorRef`, `HederaBody`, `HederaChannelConfig`, `HederaCloseRef`, `HederaEvmReader`, `HederaLandedCharge`, `HederaNetwork`, `HederaPayload`, `HederaPaymentPayload`, `HederaReader`, `HederaRef`, `HederaSessionRef`, `HederaStatus`, `HederaTxId`, `HederaUnsigned`, `HederaVoucherTypedData`, `MirrorEntry`, `MppHederaRequest`. ## `@integraledger/lcp/lightning` BOLT11 invoices and the Lightning pairings on x402 and MPP. On `x402/exact/lnbtc` the seller's node writes the ATR hash as the invoice's `m` field and signs it; on `x402/exact/lnbtc/invoice-named` the invoice carries no hash and the ATR's `x402` slot names the invoice instead. On MPP the seller's node writes the ATR hash as the invoice's description hash `h`. The payer signs nothing; it pays the invoice. ```ts no-check import { atrNamesInvoice, chargeLightning, decodeBolt11, … } from "@integraledger/lcp/lightning"; ``` **Pairings:** `mpp/charge/lightning`, `mpp/session/lightning`, `x402/exact/lnbtc`, `x402/exact/lnbtc/invoice-named`. **Values (8):** `atrNamesInvoice`, `chargeLightning`, `decodeBolt11`, `exactLnbtc`, `exactLnbtcNamed`, `invoiceH`, `lnbtcPairingOf`, `sessionLightning`. **Types (8):** `Bolt11`, `LnMppChoice`, `LnMppPairing`, `LnMppUnsigned`, `LnNetwork`, `LnPaymentPayload`, `LnRef`, `LnUnsigned`. ## `@integraledger/lcp/mpp` The `mpp` entry point: MPP's challenge pieces and its pairings. The charge pairings here are EVM `authorization` (the signed nonce is keccak256(id ‖ realm)), EVM `permit2` (the signed witness carries that value), EVM `transaction` and `hash` (nothing signed carries H), and Tempo pull and push (the signed `transferWithMemo` carries MPP's attribution memo, whose nonce is keccak256 of the id). The session and subscription pairings are re-exported from their module. ```ts no-check import { attributionMemo, CARRIER, challengeBound, … } from "@integraledger/lcp/mpp"; ``` **Pairings:** `mpp/charge/card`, `mpp/charge/evm/authorization`, `mpp/charge/evm/hash`, `mpp/charge/evm/permit2`, `mpp/charge/evm/transaction`, `mpp/charge/hedera`, `mpp/charge/nearintents`, `mpp/charge/solana`, `mpp/charge/stellar`, `mpp/charge/stripe`, `mpp/charge/tempo/memo`, `mpp/charge/tempo/push`, `mpp/charge/usdc/evm`, `mpp/charge/usdc/gateway`, `mpp/charge/usdc/solana`, `mpp/charge/usdc/stacks`, `mpp/charge/xrpl`, `mpp/session/evm`, `mpp/session/hedera`, `mpp/session/solana`, `mpp/session/tempo`, `mpp/session/xrpl`, `mpp/subscription/stripe`, `mpp/subscription/tempo`. **Values (54):** `attributionMemo`, `CARRIER`, `challengeBound`, `challengeH`, `challengeHash`, `challengeId`, `chargeCard`, `chargeHedera`, `chargeNearIntents`, `chargeSolana`, `chargeStellar`, `chargeStripe`, `chargeUsdcEvm`, `chargeUsdcGateway`, `chargeUsdcSolana`, `chargeUsdcStacks`, `chargeXrpl`, `checkAttribution`, `EVM_CLOSE_SELECTORS`, `evmAuthorization`, `evmChannelId`, `evmHash`, `evmPermit2`, `evmTransaction`, `gatewayAccount`, `issuedDigest`, `keySearch`, `LEGAL_CONTEXT_METADATA_KEY`, `MPP_BINDINGS`, `mppSvmCarrier`, `network`, `pairingsOf`, `pairingsOfPlaced`, `parseChallenges`, `place`, `problem`, `read`, `sessionEvm`, `sessionHedera`, `sessionResume`, `sessionSolana`, `sessionStatus`, `sessionTempo`, `sessionXrpl`, `subscriptionStripe`, `subscriptionTempo`, `tempoMemo`, `tempoPush`, `tie`, `transferPresent`, `USDC_CARRIER`, `usdcGatewaySalt`, `usdcNonce`, `usdcRequestHash`. **Types (34):** `GatewayPreimage`, `GatewaySaltInput`, `HederaLandedCredential`, `HederaSessionUnsigned`, `LandedCredential`, `MppChallenge`, `MppChoice`, `MppCredential`, `MppIntent`, `MppMethod`, `MppPairing`, `MppUnsigned`, `RailSessionChoice`, `RailSessionUnsigned`, `ReceiveTypedData`, `SessionChoice`, `SessionRef`, `SessionStatus`, `SessionUnsigned`, `SessionWithin`, `SessionWithinUnsigned`, `SolanaChargeChoice`, `SolanaChargeUnsigned`, `SolanaSessionUnsigned`, `StacksChargeChoice`, `StellarChargeChoice`, `StellarChargeUnsigned`, `StripeSubscriptionReceipt`, `UsdcUnsigned`, `VoucherTypedData`, `WithinSigningRequest`, `XrplChargeChoice`, `XrplChargeUnsigned`, `XrplSessionUnsigned`. ## `@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. Settlement is read from the relayed transaction's receipts through a bounded reader. ```ts no-check import { exactNear, FT_TRANSFER_GAS, ftTransferArgs, … } from "@integraledger/lcp/near"; ``` **Pairings:** `x402/exact/near`. **Values (9):** `exactNear`, `FT_TRANSFER_GAS`, `ftTransferArgs`, `nearCarrier`, `nearLapsed`, `nearRecover`, `nearStatus`, `NEP461_DELEGATE`, `pairingOf`. **Types (8):** `NearChoice`, `NearNetwork`, `NearOutcome`, `NearPayment`, `NearReader`, `NearRef`, `NearStatus`, `NearUnsigned`. ## `@integraledger/lcp/polkadot` Polkadot Asset Hub: the profile pairing `x402/exact/polkadot/lcp-assets-remark`, in which the payer signs one extrinsic whose call is `utility.batch_all([assets.transfer_keep_alive, system.remark_with_event])` with the ATR hash's LCP string as the remark; the settlement is read by block and index through Sidecar. SCALE is encoded and decoded here for these shapes only. ```ts no-check import { CALL, decodeProfileCall, encodeProfileCall, … } from "@integraledger/lcp/polkadot"; ``` **Pairings:** `x402/exact/polkadot/lcp-assets-remark`. **Values (13):** `CALL`, `decodeProfileCall`, `encodeProfileCall`, `exactPolkadotRemark`, `extrinsicHash`, `LCP_ASSETS_REMARK`, `POLKADOT_NETWORKS`, `polkadotLocate`, `polkadotPairingOf`, `polkadotRecover`, `polkadotStatus`, `splitSigned`, `ss58Decode`. **Types (9):** `PolkadotExtrinsic`, `PolkadotNetwork`, `PolkadotPayload`, `PolkadotPaymentPayload`, `PolkadotReader`, `PolkadotRef`, `PolkadotStatus`, `PolkadotUnsigned`, `ProfileCall`. ## `@integraledger/lcp/stacks` Stacks rail pieces: the transaction id, the reader a settlement read goes through, the reading of a SIP-010 `transfer` whose memo argument is the ATR hash's 32 bytes, and the zero-party recovery of that hash from a mined transaction. ```ts no-check import { MEMO_PREFIX, memoArgument, memoHash, … } from "@integraledger/lcp/stacks"; ``` **Values (6):** `MEMO_PREFIX`, `memoArgument`, `memoHash`, `stacksRecover`, `stacksStatus`, `stacksTxid`. **Types (6):** `StacksLanded`, `StacksMempool`, `StacksNetwork`, `StacksReader`, `StacksRef`, `StacksStatus`. ## `@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. Settlement is read from the executed call's trace 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. ```ts no-check import { ANY_CALLER, chainIdFelt, exactStarknet, … } from "@integraledger/lcp/starknet"; ``` **Pairings:** `x402/exact/starknet`. **Values (13):** `ANY_CALLER`, `chainIdFelt`, `exactStarknet`, `FELT_P`, `MASK_250`, `outsideExecution`, `pairingOf`, `SELECTOR_EXECUTE_FROM_OUTSIDE_V2`, `SELECTOR_TRANSFER`, `snNonce`, `starknetIdDigest`, `starknetLandedNonce`, `starknetStatus`. **Types (11):** `Felt`, `Field`, `OutsideExecutionTypedData`, `StarknetInvocation`, `StarknetNetwork`, `StarknetPayment`, `StarknetReader`, `StarknetReceipt`, `StarknetRef`, `StarknetStatus`, `StarknetUnsigned`. ## `@integraledger/lcp/stellar` Stellar rail pieces: the payer-signed Soroban `transfer`, its muxed `to` whose 8-byte id is the ATR hash's first 8 bytes, the digest of the signed authorization entry, and settlement read through a bounded reader. ```ts no-check import { decodeStellarTx, muxedFor, muxedId, … } from "@integraledger/lcp/stellar"; ``` **Values (11):** `decodeStellarTx`, `muxedFor`, `muxedId`, `PASSPHRASE`, `SCVAL_MAX_DEPTH`, `SCVAL_MAX_ELEMENTS`, `scValsWithinCaps`, `stellarLocate`, `stellarStatus`, `transferEventOf`, `transferEventTopics`. **Types (6):** `StellarNetwork`, `StellarPayment`, `StellarReader`, `StellarRef`, `StellarStatus`, `StellarUnsigned`. ## `@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. 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 and base58 use @mysten/sui, loaded once when this module is; without it every function that needs it refuses `sui/peer-missing`, and `status` reads as pending `unreadable`. ```ts no-check import { decodeSuiTx, exactSui, suiCarrier, … } from "@integraledger/lcp/sui"; ``` **Pairings:** `x402/exact/sui`. **Values (7):** `decodeSuiTx`, `exactSui`, `suiCarrier`, `suiOptionCheck`, `suiPairingOf`, `suiRecover`, `suiStatus`. **Types (9):** `SuiExecuted`, `SuiNetwork`, `SuiPayload`, `SuiPaymentPayload`, `SuiReader`, `SuiRef`, `SuiStatus`, `SuiTx`, `SuiUnsigned`. ## `@integraledger/lcp/svm` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. ```ts no-check import { ATA_PROGRAM, buildChannelMessage, buildSvmMessage, … } from "@integraledger/lcp/svm"; ``` **Values (31):** `ATA_PROGRAM`, `buildChannelMessage`, `buildSvmMessage`, `channelInstruction`, `channelPda`, `channelVoucherMessage`, `COMPUTE_BUDGET`, `decodeSvmTx`, `findPda`, `MEMO_V3`, `MEMO_V4`, `OPEN_DISCRIMINATOR`, `openInstructionData`, `openOf`, `PAYMENT_CHANNELS`, `RENT_SYSVAR`, `SEAL_DISCRIMINATOR`, `sessionProof`, `sessionSalt`, `SETTLE_AND_SEAL_DISCRIMINATOR`, `solanaVoucher`, `svmCarrier`, `svmChannelStatus`, `svmCloseStatus`, `svmDigest`, `svmLocate`, `svmRecover`, `svmStatus`, `SYSTEM`, `TOKEN`, `TOKEN_2022`. **Types (12):** `ChannelBuildInput`, `ChannelIx`, `ChannelStatus`, `SolanaNetwork`, `SvmBuildInput`, `SvmCloseRef`, `SvmCloseStatus`, `SvmLanded`, `SvmReader`, `SvmRef`, `SvmStatus`, `SvmTx`. ## `@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. Tempo serves eip155 JSON-RPC, so the reader is `EvmReader`. Nothing here throws on a caller's value; refusals are values. ```ts no-check import { ACCESS_KEY_SPEND_TOPIC, ACCOUNT_KEYCHAIN, CHANNEL_CLOSED_V1_TOPIC, … } from "@integraledger/lcp/tempo"; ``` **Values (23):** `ACCESS_KEY_SPEND_TOPIC`, `ACCOUNT_KEYCHAIN`, `CHANNEL_CLOSED_V1_TOPIC`, `CHANNEL_CLOSED_V2_TOPIC`, `CHANNEL_OPENED_V1_TOPIC`, `CHANNEL_OPENED_V2_TOPIC`, `decodeKeyAuthorization`, `decodeTempoTx`, `encodeKeyAuthorization`, `expiringNonceHash`, `KEY_AUTHORIZATION_WITNESS_TOPIC`, `KEY_AUTHORIZED_TOPIC`, `KEY_REVOKED_TOPIC`, `keyAccount`, `memoCalldata`, `OPEN_V1_SELECTOR`, `OPEN_V2_SELECTOR`, `RECEIVE_POLICY_GUARD`, `tempoChannelId`, `TIP20_CHANNEL_RESERVE`, `TRANSFER_WITH_MEMO_SELECTOR`, `TRANSFER_WITH_MEMO_TOPIC`, `witnessRecover`. **Types (4):** `KeyAuthorizationUnsigned`, `TempoCall`, `TempoDescriptor`, `TempoKeyAuthorization`. ## `@integraledger/lcp/tron` Tron: the transaction pieces (protobuf for the fields the profile uses, base58check addresses, the transaction id) and 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. Settlement is read by transaction id through a bounded reader. ```ts no-check import { decodeTronTx, encodeTronRaw, exactTronMemo, … } from "@integraledger/lcp/tron"; ``` **Pairings:** `x402/exact/tron/lcp-trc20-memo`. **Values (14):** `decodeTronTx`, `encodeTronRaw`, `exactTronMemo`, `LCP_TRC20_MEMO`, `pairingOf`, `TRANSFER_SELECTOR`, `TRANSFER_TOPIC`, `TRIGGER_SMART_CONTRACT`, `TRIGGER_URL`, `tronAddress`, `tronCarrier`, `tronRecover`, `tronStatus`, `tronTxId`. **Types (9):** `TronChoice`, `TronInfo`, `TronNetwork`, `TronPayment`, `TronRaw`, `TronReader`, `TronRef`, `TronStatus`, `TronUnsigned`. ## `@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. The payer's W5 wallet signs a request whose one Jetton transfer carries that payload; settlement is read from the Jetton wallets' transactions through a bounded reader. ```ts no-check import { exactTvm, lcpComment, OP, … } from "@integraledger/lcp/tvm"; ``` **Pairings:** `x402/exact/tvm`. **Values (8):** `exactTvm`, `lcpComment`, `OP`, `pairingOf`, `tvmCarrier`, `tvmRecover`, `tvmStatus`, `tvmTxId`. **Types (9):** `TonCell`, `TonTx`, `TvmChoice`, `TvmNetwork`, `TvmPayment`, `TvmReader`, `TvmRef`, `TvmStatus`, `TvmUnsigned`. ## `@integraledger/lcp/ucp` UCP checkouts and bookings, and four pairings: 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 inside the buyer's checkout mandate, after AP2's `checkout_hash` check; the `unsigned` pairings have nothing signed to read. Nothing here takes a key, signs or verifies a signature. ```ts no-check import { AGREEMENT_LINK_TYPE, ap2Mandate, bookingAp2Mandate, … } from "@integraledger/lcp/ucp"; ``` **Pairings:** `ucp/booking/ap2-mandate`, `ucp/booking/unsigned`, `ucp/checkout/ap2-mandate`, `ucp/checkout/unsigned`. **Values (9):** `AGREEMENT_LINK_TYPE`, `ap2Mandate`, `bookingAp2Mandate`, `bookingUnsigned`, `issuedDigest`, `legalContextLink`, `LINK_TYPE`, `tie`, `unsigned`. **Types (7):** `BookingOption`, `Checkout`, `CheckoutOption`, `Link`, `UcpBinding`, `UcpOffer`, `Unsigned`. ## `@integraledger/lcp/x402` x402 v2 documents and the `x402/exact/eip155/eip3009` pairing: the ATR hash advertised in the challenge's `extensions.legalContext`, signed by the payer as the EIP-3009 nonce, read back from the payment, and read from the settlement. ```ts no-check import { advertiseFor, authCaptureEip3009, authCapturePermit2, … } from "@integraledger/lcp/x402"; ``` **Pairings:** `x402/auth-capture/eip155/eip3009`, `x402/auth-capture/eip155/permit2`, `x402/exact/eip155/eip3009`, `x402/exact/eip155/erc7710`, `x402/exact/eip155/erc7710-salt`, `x402/exact/eip155/permit2`, `x402/upto/eip155/permit2`. **Values (25):** `advertiseFor`, `authCaptureEip3009`, `authCapturePermit2`, `chosen`, `exactEip3009`, `exactErc7710`, `exactErc7710Salt`, `exactPermit2`, `filterOf`, `issuedDigest`, `LEGAL_CONTEXT`, `LEGAL_CONTEXT_SCHEMA`, `legalContextOf`, `offeredAt`, `optionPairingOf`, `pairingOfPayment`, `paymentWith`, `presentedWith`, `readFor`, `requestCommitment`, `tie`, `uptoPermit2`, `withExtra`, `withOption`, `withoutExtra`. **Types (20):** `Eip3009Authorization`, `Eip3009Payment`, `Eip3009TypedData`, `HttpRequest`, `LcpPattern`, `OptionFilter`, `PaymentPayload`, `PaymentRequired`, `PaymentRequirements`, `Permit2Authorization`, `RequestCommitment`, `Unsigned`, `X402Advertise`, `X402Choice`, `X402Offer`, `X402PairingId`, `X402Payment`, `X402Read`, `X402SchemePayload`, `X402Unsigned`. ## `@integraledger/lcp/x402-batch-settlement` x402 `batch-settlement`: one ATR per channel. On EVM the ATR hash is the channel configuration's `salt`, which the channel id commits to and every signature signs; on Solana it is the opening transaction's one memo; on Cloudflare it rides the echoed `extensions.legalContext` of each request, with no channel. ```ts no-check import { BATCH_SETTLEMENT, batchChannelCreated, batchChannelId, … } from "@integraledger/lcp/x402-batch-settlement"; ``` **Pairings:** `x402/batch-settlement/cloudflare`, `x402/batch-settlement/eip155`, `x402/batch-settlement/solana`. **Values (14):** `BATCH_SETTLEMENT`, `batchChannelCreated`, `batchChannelId`, `batchCloudflare`, `batchEvm`, `batchSvm`, `CHANNEL_CONFIG_TYPEHASH`, `CHANNEL_CREATED_TOPIC`, `DEPOSITED_TOPIC`, `ERC3009_DEPOSIT_COLLECTOR`, `erc3009DepositNonce`, `pairingOf`, `PERMIT2_DEPOSIT_COLLECTOR`, `VOUCHER_TYPEHASH`. **Types (11):** `BatchEvmOpen`, `BatchPairingId`, `BatchPaymentPayload`, `BatchSvmOpen`, `BatchUnsigned`, `BatchWithin`, `ChannelConfig`, `ChannelMembers`, `CloudflarePaymentPayload`, `Eip712Request`, `SigningRequest`. ## `@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. ```ts no-check import { exactSvm, pairingOf } from "@integraledger/lcp/x402-exact-solana"; ``` **Pairings:** `x402/exact/solana`. **Values (2):** `exactSvm`, `pairingOf`. **Types (3):** `SvmChoice`, `SvmPaymentPayload`, `SvmUnsigned`. ## `@integraledger/lcp/x402-exact-stellar` The `x402/exact/stellar` pairing: the ATR hash advertised in the challenge's `extensions.legalContext`, and its first 8 bytes carried as the muxed id of the option's `payTo`, which the payer signs as the Soroban `transfer`'s `to`. ```ts no-check import { exactStellar, pairingOf } from "@integraledger/lcp/x402-exact-stellar"; ``` **Pairings:** `x402/exact/stellar`. **Values (2):** `exactStellar`, `pairingOf`. **Types (2):** `StellarChoice`, `StellarPaymentPayload`. ## `@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`, read back from the signed blob, and settlement read by the blob's hash. ```ts no-check import { exactXrpl, pairingOf } from "@integraledger/lcp/x402-exact-xrpl"; ``` **Pairings:** `x402/exact/xrpl`. **Values (2):** `exactXrpl`, `pairingOf`. **Types (2):** `XrplChoice`, `XrplPaymentPayload`. ## `@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 escrowing the signed maximum; read back from that transaction, and settlement read from the opening. ```ts no-check import { pairingOf, uptoSvm } from "@integraledger/lcp/x402-upto-solana"; ``` **Pairings:** `x402/upto/solana`. **Values (2):** `pairingOf`, `uptoSvm`. **Types (3):** `UptoSvmChoice`, `UptoSvmPayload`, `UptoSvmPaymentPayload`. ## `@integraledger/lcp/xrpl` XRP Ledger rail pieces: the signed Payment blob, its `InvoiceID` carrying the ATR hash in each scheme's form, the transaction hash computed from the blob, and settlement read by that hash through a bounded reader. ```ts no-check import { cancelAfterOf, decodeBlob, mppInvoiceId, … } from "@integraledger/lcp/xrpl"; ``` **Values (11):** `cancelAfterOf`, `decodeBlob`, `mppInvoiceId`, `x402InvoiceId`, `XRPL_MAX_DEPTH`, `XRPL_MAX_FIELDS`, `xrplChannelId`, `xrplClaim`, `xrplCloseStatus`, `xrplOpenStatus`, `xrplStatus`. **Types (9):** `XrplCloseRef`, `XrplCloseStatus`, `XrplLanded`, `XrplNetwork`, `XrplReader`, `XrplRef`, `XrplStatus`, `XrplTxJson`, `XrplUnsigned`. --- # Pairings > Every pairing @integraledger/lcp implements, generated from its registry. Source: https://lcp.integraledger.com/reference/pairings This page is generated from the package by `node scripts/docs-reference.mjs`, and CI checks that it matches. `BINDINGS` holds 67 pairings on 7 surfaces (`ack`, `acp`, `ap2`, `card`, `mpp`, `ucp`, `x402`). Each row gives the pairing's id, the export that implements it, and its `pattern` record: the binding pattern, whether the buyer's signature covers the ATR hash, whether the hash itself is on chain, whether the settlement is a public proof, whether the hash can be recovered from the chain alone, and the LCP profile that defines the binding, where one does. [Binding](https://lcp.integraledger.com/concepts/binding) explains each field. ## `ack` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | --------------------- | ---------------------------------------------- | -------------- | ------------- | ---------- | ------------ | ---------------------- | ------- | | `ack/payment-request` | `paymentRequest` from `@integraledger/lcp/ack` | `native-field` | no | no | no | no | | ## `acp` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | -------------------------- | ------------------------------------------- | --------------- | ------------- | ---------- | ------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `acp/checkout/delegated` | `delegated` from `@integraledger/lcp/acp` | `native-field` | no | no | no | no | [`acp/checkout/session-id`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/acp-checkout-session-id.md) | | `acp/checkout/undelegated` | `undelegated` from `@integraledger/lcp/acp` | `http-advisory` | no | no | no | no | [`acp/checkout/session-id`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/acp-checkout-session-id.md) | ## `ap2` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | ---------------------- | ----------------------------------------------- | ------------------ | ------------- | ---------- | ------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------- | | `ap2/checkout-mandate` | `checkoutMandate` from `@integraledger/lcp/ap2` | `opaque-challenge` | yes | no | no | no | [`ap2/checkout-mandate`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ap2-checkout-mandate.md) | ## `card` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | ------------------------------- | ------------------------------------------------ | -------------------- | ------------- | ---------- | ------------ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `card/mastercard-vi/autonomous` | `viAutonomous` from `@integraledger/lcp/card` | `id-reuse` | yes | no | no | no | [`card/mastercard-vi`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/card-mastercard-vi.md) | | `card/mastercard-vi/immediate` | `viImmediate` from `@integraledger/lcp/card` | `id-reuse` | yes | no | no | no | [`card/mastercard-vi`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/card-mastercard-vi.md) | | `card/seller-reference` | `sellerReference` from `@integraledger/lcp/card` | `http-advisory` | no | no | no | no | | | `card/visa-tap` | `visaTap` from `@integraledger/lcp/card` | `protocol-extension` | yes | no | no | no | [`card/visa-tap`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/card-visa-tap.md) | ## `mpp` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | ------------------------------ | ----------------------------------------------------------------------------------------------- | ------------------ | ------------- | ---------- | ------------ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `mpp/charge/card` | `chargeCard` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | no | no | | | `mpp/charge/evm/authorization` | `evmAuthorization` from `@integraledger/lcp/mpp` | `id-reuse` | yes | yes | yes | no | | | `mpp/charge/evm/hash` | `evmHash` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | no | no | | | `mpp/charge/evm/permit2` | `evmPermit2` from `@integraledger/lcp/mpp` | `id-reuse` | yes | yes | yes | no | | | `mpp/charge/evm/transaction` | `evmTransaction` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | no | no | | | `mpp/charge/hedera` | `chargeHedera` from `@integraledger/lcp/hedera`
`chargeHedera` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | yes | no | | | `mpp/charge/lightning` | `chargeLightning` from `@integraledger/lcp/lightning` | `native-field` | no | no | no | no | [`mpp/charge`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-charge.md) | | `mpp/charge/nearintents` | `chargeNearIntents` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | no | no | | | `mpp/charge/solana` | `chargeSolana` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | [`mpp/charge/solana`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-charge-solana.md) | | `mpp/charge/stellar` | `chargeStellar` from `@integraledger/lcp/mpp` | `truncated-field` | no | yes | yes | no | | | `mpp/charge/stripe` | `chargeStripe` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | no | no | | | `mpp/charge/tempo/memo` | `tempoMemo` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | yes | no | | | `mpp/charge/tempo/push` | `tempoPush` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | yes | no | | | `mpp/charge/usdc/evm` | `chargeUsdcEvm` from `@integraledger/lcp/mpp` | `id-reuse` | yes | yes | yes | no | | | `mpp/charge/usdc/gateway` | `chargeUsdcGateway` from `@integraledger/lcp/mpp` | `id-reuse` | yes | no | yes | no | | | `mpp/charge/usdc/solana` | `chargeUsdcSolana` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | [`mpp/charge/solana`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-charge-solana.md) | | `mpp/charge/usdc/stacks` | `chargeUsdcStacks` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | [`mpp/charge/usdc/stacks`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-charge-usdc-stacks.md) | | `mpp/charge/xrpl` | `chargeXrpl` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | | | `mpp/session/evm` | `sessionEvm` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | no | [`mpp/session/evm-tempo`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-evm-tempo.md) | | `mpp/session/hedera` | `sessionHedera` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | [`mpp/session/hedera-solana-xrpl`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-hedera-solana-xrpl.md) | | `mpp/session/lightning` | `sessionLightning` from `@integraledger/lcp/lightning` | `native-field` | no | no | no | no | [`mpp/charge`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-charge.md) | | `mpp/session/solana` | `sessionSolana` from `@integraledger/lcp/mpp` | `truncated-field` | no | yes | yes | no | [`mpp/session/hedera-solana-xrpl`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-hedera-solana-xrpl.md) | | `mpp/session/tempo` | `sessionTempo` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | no | [`mpp/session/evm-tempo`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-evm-tempo.md) | | `mpp/session/xrpl` | `sessionXrpl` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | [`mpp/session/hedera-solana-xrpl`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/mpp-session-hedera-solana-xrpl.md) | | `mpp/subscription/stripe` | `subscriptionStripe` from `@integraledger/lcp/mpp` | `opaque-challenge` | no | no | no | no | | | `mpp/subscription/tempo` | `subscriptionTempo` from `@integraledger/lcp/mpp` | `native-field` | yes | yes | yes | yes | | ## `ucp` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | -------------------------- | ------------------------------------------------- | ------------------ | ------------- | ---------- | ------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `ucp/booking/ap2-mandate` | `bookingAp2Mandate` from `@integraledger/lcp/ucp` | `opaque-challenge` | yes | no | no | no | [`ucp/checkout/legal-context`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ucp-checkout-legal-context.md) | | `ucp/booking/unsigned` | `bookingUnsigned` from `@integraledger/lcp/ucp` | `http-advisory` | no | no | no | no | [`ucp/checkout/legal-context`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ucp-checkout-legal-context.md) | | `ucp/checkout/ap2-mandate` | `ap2Mandate` from `@integraledger/lcp/ucp` | `opaque-challenge` | yes | no | no | no | [`ucp/checkout/legal-context`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ucp-checkout-legal-context.md) | | `ucp/checkout/unsigned` | `unsigned` from `@integraledger/lcp/ucp` | `http-advisory` | no | no | no | no | [`ucp/checkout/legal-context`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/ucp-checkout-legal-context.md) | ## `x402` | Pairing | Export | Pattern | Buyer signs H | H on chain | Public proof | Recoverable from chain | Profile | | --------------------------------------- | ----------------------------------------------------------------- | -------------------- | ------------- | ---------- | ------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `x402/auth-capture/eip155/eip3009` | `authCaptureEip3009` from `@integraledger/lcp/x402` | `id-reuse` | yes | yes | yes | no | [`x402/auth-capture/eip155`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-auth-capture-eip155.md) | | `x402/auth-capture/eip155/permit2` | `authCapturePermit2` from `@integraledger/lcp/x402` | `id-reuse` | yes | yes | yes | no | [`x402/auth-capture/eip155`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-auth-capture-eip155.md) | | `x402/batch-settlement/cloudflare` | `batchCloudflare` from `@integraledger/lcp/x402-batch-settlement` | `protocol-extension` | yes | no | no | no | | | `x402/batch-settlement/eip155` | `batchEvm` from `@integraledger/lcp/x402-batch-settlement` | `native-field` | yes | yes | yes | yes | [`x402/batch-settlement/eip155`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-batch-settlement-eip155.md) | | `x402/batch-settlement/solana` | `batchSvm` from `@integraledger/lcp/x402-batch-settlement` | `native-field` | yes | yes | yes | yes | | | `x402/exact/algorand` | `exactAvm` from `@integraledger/lcp/avm` | `native-field` | yes | yes | yes | yes | [`x402/exact/algorand/note`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-algorand-note.md) | | `x402/exact/aptos` | `exactAptos` from `@integraledger/lcp/aptos` | `http-advisory` | no | no | no | no | | | `x402/exact/cardano` | `exactCardano` from `@integraledger/lcp/cardano` | `native-field` | yes | yes | yes | yes | [`x402/exact/cardano`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-cardano.md) | | `x402/exact/casper` | `exactCasper` from `@integraledger/lcp/casper` | `native-field` | yes | yes | yes | yes | [`x402/exact/casper`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-casper.md) | | `x402/exact/ccd` | `exactCcd` from `@integraledger/lcp/ccd` | `native-field` | yes | yes | yes | yes | [`x402/exact/ccd`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-ccd.md) | | `x402/exact/eip155/eip3009` | `exactEip3009` from `@integraledger/lcp/x402` | `native-field` | yes | yes | yes | yes | [`x402/exact/eip155/eip3009`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-eip155-eip3009.md) | | `x402/exact/eip155/erc7710` | `exactErc7710` from `@integraledger/lcp/x402` | `http-advisory` | no | no | no | no | | | `x402/exact/eip155/erc7710-salt` | `exactErc7710Salt` from `@integraledger/lcp/x402` | `native-field` | yes | yes | yes | yes | [`x402/exact/eip155/erc7710-salt`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-eip155-erc7710-salt.md) | | `x402/exact/eip155/permit2` | `exactPermit2` from `@integraledger/lcp/x402` | `native-field` | yes | yes | yes | no | [`x402/exact/eip155/permit2`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-eip155-permit2.md) | | `x402/exact/hedera` | `exactHedera` from `@integraledger/lcp/hedera` | `native-field` | yes | yes | yes | yes | [`x402/exact/hedera`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-hedera.md) | | `x402/exact/hedera/transfer-executor` | `exactHederaExecutor` from `@integraledger/lcp/hedera` | `http-advisory` | no | no | no | no | | | `x402/exact/lnbtc` | `exactLnbtc` from `@integraledger/lcp/lightning` | `native-field` | no | no | no | no | [`x402/exact/lnbtc`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-lnbtc.md) | | `x402/exact/lnbtc/invoice-named` | `exactLnbtcNamed` from `@integraledger/lcp/lightning` | `http-advisory` | no | no | no | no | | | `x402/exact/near` | `exactNear` from `@integraledger/lcp/near` | `native-field` | yes | yes | yes | yes | [`x402/exact/near/memo`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-near-memo.md) | | `x402/exact/polkadot/lcp-assets-remark` | `exactPolkadotRemark` from `@integraledger/lcp/polkadot` | `native-field` | yes | yes | yes | yes | [`x402/exact/polkadot/lcp-assets-remark`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-polkadot-lcp-assets-remark.md) | | `x402/exact/solana` | `exactSvm` from `@integraledger/lcp/x402-exact-solana` | `native-field` | yes | yes | yes | yes | | | `x402/exact/starknet` | `exactStarknet` from `@integraledger/lcp/starknet` | `truncated-field` | yes | yes | yes | no | [`x402/exact/starknet`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-starknet.md) | | `x402/exact/stellar` | `exactStellar` from `@integraledger/lcp/x402-exact-stellar` | `truncated-field` | no | yes | yes | no | | | `x402/exact/sui` | `exactSui` from `@integraledger/lcp/sui` | `native-field` | yes | yes | yes | yes | [`x402/exact/sui`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-sui.md) | | `x402/exact/tron/lcp-trc20-memo` | `exactTronMemo` from `@integraledger/lcp/tron` | `native-field` | yes | yes | yes | yes | [`x402/exact/tron/lcp-trc20-memo`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-exact-tron-lcp-trc20-memo.md) | | `x402/exact/tvm` | `exactTvm` from `@integraledger/lcp/tvm` | `native-field` | yes | yes | yes | yes | | | `x402/exact/xrpl` | `exactXrpl` from `@integraledger/lcp/x402-exact-xrpl` | `id-reuse` | yes | yes | yes | no | | | `x402/upto/eip155/permit2` | `uptoPermit2` from `@integraledger/lcp/x402` | `native-field` | yes | yes | yes | no | [`x402/upto/eip155/permit2`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/profiles/x402-upto-eip155-permit2.md) | | `x402/upto/solana` | `uptoSvm` from `@integraledger/lcp/x402-upto-solana` | `native-field` | yes | yes | yes | yes | | ## What each binding proves Each pairing's `pattern.proves` states what a payment through it shows, and what it does not. The text is the package's own, quoted as it is. Where it names `` and ``, the record fills them in. ### `ack/payment-request` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . This ATR's hash was issued to the seller as the id of its signed ACK Payment Request, with the link to deliver beside it before payment; a receipt for that request, issued after settlement, embeds the signed request. Neither the request nor the receipt was seen in making this record. ACK defines no payer signature, so nothing the buyer signed carries the hash. The seller checked nothing the buyer signed, and settlement is the seller's report. This does not show that the buyer's approval carried the hash. ### `acp/checkout/delegated` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The checkout session this payment completed has this ATR's hash as its id, and its responses carried the ATR's link in metadata. The payment handler required delegate\_payment, so ACP has the buyer's agent obtain a vault token whose allowance names this session as checkout\_session\_id, in a request the agent signs (a MUST in one section of ACP and RECOMMENDED in another) and the PSP SHOULD verify. The seller neither saw nor verified that allowance or its signature, and ACP does not require the PSP to hold the token to that session. The seller tied the payment to the hash in its report. This does not show that amount, payee or timing match the ATR's content. ### `acp/checkout/undelegated` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The checkout session this payment completed has this ATR's hash as its id, and its responses carried the ATR's link in metadata. The payment handler did not require delegate\_payment, so nothing the buyer signed for the payment names the hash. The seller tied the payment to the hash in its report. ### `ap2/checkout-mandate` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The buyer's closed AP2 Checkout Mandate carries checkout\_hash, the SHA-256 of the checkout JWT the seller last sent, and that JWT's payload carries this ATR's hash as its legalContext member. The seller read both from inside the mandate. The mandate's signer is the user's trusted surface, or the agent under the user's open mandate. The seller did not verify that signature: AP2 has the Credential Provider verify the Payment Mandate, whose transaction\_id is the same hash, before a payment credential issues. The seller reported the payment. This does not show that amount, payee or timing match the ATR's content. ### `card/mastercard-vi/autonomous` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The buyer's agent signed a Verifiable Intent L3b checkout mandate whose checkout\_hash is the SHA-256 of a checkout\_jwt carrying this ATR's hash, with the key the user's L2 mandate delegates to it. The seller verified both ES256 signatures and the sd\_hash links, but not the L1 issuer's signature. The user's own signature does not cover the hash, and the seller did not see the L3a payment mandate the network received, whose transaction\_id Verifiable Intent requires to equal this checkout\_hash. This does not show that amount, payee or timing match the ATR's content. ### `card/mastercard-vi/immediate` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The user's Verifiable Intent L2 mandate lists a checkout mandate whose checkout\_hash is the SHA-256 of a checkout\_jwt carrying this ATR's hash, and the payment mandate's transaction\_id, where disclosed, equals it. The seller checked those values and did not verify the user's signature, which Verifiable Intent has the payment network validate before authorization. The card authorization itself does not carry the hash. This does not show that amount, payee or timing match the ATR's content. ### `card/seller-reference` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR was in the seller's storage before payment, and its hash and link were given to the seller to show the buyer and to place in its processor reference. Nothing the buyer signed carries the hash. The seller checked nothing the buyer signed, and settlement is the seller's report. This record does not show that the buyer's approval carried the hash. ### `card/visa-tap` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The buyer's agent sent this ATR's hash in the lcp-hash field and listed that field among the covered components of its TAP agent-payer-auth message signature. The seller checked that listing and did not verify the signature here, which belongs to its TAP recognition step. The card authorization itself does not carry the hash. This does not show that amount, payee or timing match the ATR's content. ### `mpp/charge/card` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR was in the seller's storage before payment. The seller's MPP challenge carried this ATR's hash in its id and its opaque reference, bound to the challenge by the seller's own server, and the buyer's credential echoed that challenge. The seller also placed the hash in the method's reference field (externalId for card; the PaymentIntent's metadata for Stripe). Nothing the buyer or its card or Stripe token signed carries the hash, and the seller checked nothing the buyer signed. Settlement is the seller's report. This record does not show that the buyer's approval carried the hash. ### `mpp/charge/evm/authorization` The payer signed an EIP-3009 transfer authorization whose nonce is keccak256 of this challenge's id and realm, and the id is this ATR's hash in base64url with the challenge's position. The token contract verified the signature when it executed the transfer, and the nonce is on chain as the nonce topic of its AuthorizationUsed event. A holder of the ATR and the realm can confirm the hash from that nonce; the chain alone does not reveal it. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/evm/hash` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The payment is an ERC-20 transfer the buyer signed as a whole transaction (`transaction`), or broadcast itself and named by its hash (`hash`), answering a challenge whose id and opaque carry this ATR's hash. The payment transaction does not carry the hash; the seller's server bound the challenge, and the settlement transaction it reported succeeded and moved the token. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/evm/permit2` The payer signed a Permit2 transfer, single or batch, whose witness carries keccak256 of this challenge's id and realm, and the id is this ATR's hash in base64url with the challenge's position. Permit2 verified the signature when it executed the transfer; a batch's transfers all executed in that one call. The witness is in the settlement transaction's calldata only as a hash, and no event carries it. This does not show that amount, payee, asset, splits or timing match the ATR's content. ### `mpp/charge/evm/transaction` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The payment is an ERC-20 transfer the buyer signed as a whole transaction (`transaction`), or broadcast itself and named by its hash (`hash`), answering a challenge whose id and opaque carry this ATR's hash. The payment transaction does not carry the hash; the seller's server bound the challenge, and the settlement transaction it reported succeeded and moved the token. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/hedera` The ATR was assembled, written to the seller's storage and linked in the challenge before approval, and its hash is in the MPP challenge this payment answered, protected by the server's binding of the challenge, not by the payer's signature. The payer signed a memo whose 7-byte nonce is keccak256 of that challenge's id: it ties the payment to the challenge instance, and does not exclude another challenge with the same 7 bytes. This does not show that amount, recipient, token or timing match the ATR's content. ### `mpp/charge/lightning` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The seller's node signed a BOLT11 invoice whose description hash is this ATR's hash, and whose payment hash the ATR commits. The payer paid that invoice, and its node checked the node signature before paying. The payer signed nothing that carries the hash, and the seller did not verify the invoice signature. The invoice and its preimage, which the parties hold, are the proof of the payment. No public ledger shows it. This does not show that amount, payee or timing match the ATR's content. ### `mpp/charge/nearintents` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The seller's MPP challenge carried this ATR's hash in its externalId, bound by the seller's own key to a deposit address issued for that challenge only, and the seller reported delivery. The buyer's deposit does not carry the hash, and the buyer did not sign it. The NEAR Intents backend, not a contract the buyer signed, links the deposit to the seller. ### `mpp/charge/solana` The payer signed a Solana transaction whose one Memo instruction carries this ATR's hash in LCP string form, and the transaction executed without error, carrying a token or SOL transfer. The memo is in the transaction's instruction data on chain. This does not show that amount, recipient, mint or timing match the ATR's content. ### `mpp/charge/stellar` The ATR was assembled, written to the seller's storage and linked in the challenge before approval, and its hash is in the payment challenge, which the payer did not sign. The payer signed a transfer to the seller's muxed address whose 8-byte id is the first 8 bytes of this ATR's hash, and the transaction succeeded. The id matches this hash by prefix only; it does not exclude another ATR whose hash begins with the same 8 bytes. This does not show that amount, asset or timing match the ATR's content. ### `mpp/charge/stripe` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR was in the seller's storage before payment. The seller's MPP challenge carried this ATR's hash in its id and its opaque reference, bound to the challenge by the seller's own server, and the buyer's credential echoed that challenge. The seller also placed the hash in the method's reference field (externalId for card; the PaymentIntent's metadata for Stripe). Nothing the buyer or its card or Stripe token signed carries the hash, and the seller checked nothing the buyer signed. Settlement is the seller's report. This record does not show that the buyer's approval carried the hash. ### `mpp/charge/tempo/memo` The ATR's hash is in the MPP challenge this payment answered: its id is the hash in base64url with the challenge's position, protected by the server's binding of the challenge. The payer signed a Tempo transaction whose transferWithMemo call carries MPP's attribution memo, whose 7-byte nonce is keccak256 of that id. The chain verified the signature when it executed the call, and the memo is on chain as the memo topic of the token's TransferWithMemo event. It ties the payment to the challenge instance, and does not exclude another challenge with the same 7 bytes. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/tempo/push` The ATR's hash is in the MPP challenge this payment answered: its id is the hash in base64url with the challenge's position, protected by the server's binding of the challenge. The payer signed and broadcast a Tempo transaction whose transferWithMemo call carries MPP's attribution memo, whose 7-byte nonce is keccak256 of that id. The chain verified the signature when it executed the call, and the memo is on chain as the memo topic of the token's TransferWithMemo event, read after the money had moved. It ties the payment to the challenge instance, and does not exclude another challenge with the same 7 bytes. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/usdc/evm` The payer signed an EIP-3009 authorization whose nonce is keccak256 of the JCS of this challenge's id, realm and request hash, and the id is this ATR's hash in base64url with the challenge's position. The token contract verified the signature when it executed the transfer, and the nonce is on chain in its AuthorizationUsed event. A holder of the ATR, the realm and the request can confirm the hash; the chain alone does not reveal it. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/usdc/gateway` The payer signed a Circle Gateway burn intent whose TransferSpec salt is keccak256 of the JCS of this challenge's id and parameters, and the id is this ATR's hash in base64url with the challenge's position. Circle Gateway validated the signature. The salt travels inside the TransferSpec that the destination mint carries, and the Gateway Minter emits that TransferSpec's keccak256 hash; this record reads no chain, and settlement is the seller's report. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/usdc/solana` The payer signed a Solana transaction whose one Memo instruction carries this ATR's hash in LCP string form, and the transaction executed without error, carrying a token or SOL transfer. The memo is in the transaction's instruction data on chain. This does not show that amount, recipient, mint or timing match the ATR's content. ### `mpp/charge/usdc/stacks` The payer signed a Stacks transaction whose SIP-010 transfer carries this ATR's hash as its memo argument. The chain verified the signature, the transaction executed with status success, and the memo is in the mined transaction on chain. This does not show that amount, payee, asset or timing match the ATR's content. ### `mpp/charge/xrpl` The payer signed an XRPL Payment whose InvoiceID is this ATR's hash, and the Payment is in a validated ledger with tesSUCCESS. This does not show that amount, destination, asset or timing match the ATR's content. ### `mpp/session/evm` The ATR's hash is in the MPP session challenge this channel opened under: its id is the hash in base64url with the challenge's position. The payer opened a payment channel whose salt is this ATR's hash, so the channel id, keccak256 over the payer, payee, token, salt, authorized signer, escrow and chain, commits to it. The payer signed that opening as an open call carrying the salt, an EIP-3009 authorization whose nonce is MPP's hash over the channel parameters and the salt, or a Permit2 transfer whose witness carries the salt, and the escrow and the token verified it on chain. The seller read that the opening transaction succeeded and moved the payer's deposit to the escrow; the seller's server verified that it created this channel. This does not show that amount, payee, asset or timing match the ATR's content. Later requests in this channel were paid under this ATR by vouchers the seller did not meter; each voucher signs a commitment to this ATR's hash. ### `mpp/session/hedera` The payer signed a Hedera EVM transaction that opened an MPP session channel on the escrow contract named in the challenge, with this ATR's hash as the channel's salt, and it reached consensus. The escrow's ChannelOpened event carries the salt, and the channel id is keccak256 over an encoding that includes it. The hash is also in the MPP challenge the opening answered. Later requests in this channel were paid under this ATR by vouchers the seller did not meter. Each voucher signs that channel id, which commits to this ATR's hash. This does not show that amount, deposit, recipient, token or timing match the ATR's content. ### `mpp/session/lightning` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The seller's node signed a BOLT11 invoice whose description hash is this ATR's hash, and whose payment hash the ATR commits. The payer paid that invoice, and its node checked the node signature before paying. The payer signed nothing that carries the hash, and the seller did not verify the invoice signature. The invoice and its preimage, which the parties hold, are the proof of the payment. No public ledger shows it. This does not show that amount, payee or timing match the ATR's content. Later requests in this session were paid under this ATR from its deposit, by bearer proofs the seller did not meter. The close is the seller's report. ### `mpp/session/solana` The ATR was assembled, written to the seller's storage and linked in the challenge before approval, and its hash is in the MPP challenge the opening answered, protected by the server's binding of the challenge. The payer signed a Solana transaction that opened a session channel on the channel program named in the challenge, with the first 8 bytes of this ATR's hash as the channel's salt, and it executed without error. The salt matches this hash by prefix only; it does not exclude another ATR whose hash begins with the same 8 bytes. Later requests in this channel were paid under this ATR by vouchers the seller did not meter. Where the operator signs the vouchers, each request also carried the payer's session proof, which signs the opening challenge's id and so this ATR's hash. This does not show that amount, deposit, recipient, mint or timing match the ATR's content. ### `mpp/session/tempo` The ATR's hash is in the MPP session challenge this channel opened under: its id is the hash in base64url with the challenge's position. The payer signed a Tempo transaction whose one call to the channel escrow opens a channel with this ATR's hash as its salt, and the chain verified that signature when it executed the call. The escrow's ChannelOpened event names the channel, whose id commits to the salt; on the TIP-1034 escrow the event also carries the salt itself. This does not show that amount, payee, asset or timing match the ATR's content. Later requests in this channel were paid under this ATR by vouchers the seller did not meter; each voucher signs a commitment to this ATR's hash. ### `mpp/session/xrpl` The payer signed an XRPL PaymentChannelCreate whose one LCP memo carries this ATR's hash, and it is in a validated ledger with tesSUCCESS. The memo is in the public transaction. Later requests in this channel were paid under this ATR by vouchers the seller did not meter; each signs the channel id and an amount, not the hash. This does not show that amount, deposit, destination, settle delay or timing match the ATR's content. ### `mpp/subscription/stripe` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR was in the seller's storage before payment. The seller's MPP challenge carried this ATR's hash in its id and its opaque reference, bound to the challenge by the seller's own server, and the buyer's credential echoed that challenge. The seller also placed the hash in the method's reference field (externalId for card; the PaymentIntent's metadata for Stripe). Nothing the buyer or its card or Stripe token signed carries the hash, and the seller checked nothing the buyer signed. Settlement is the seller's report. This record does not show that the buyer's approval carried the hash. Later billing periods were paid under this ATR by renewal invoices the seller did not read. The close is the seller's report. ### `mpp/subscription/tempo` The ATR's hash is the MPP subscription challenge's id, in base64url. The payer's root key signed a Tempo key authorization whose witness is this ATR's hash, granting the seller's access key a per-period limit. The chain verified that signature when the activation transaction registered the key, and the account keychain's KeyAuthorizationWitness event carries the payer's account and this hash as topics. The same transaction transferred the first period's payment to the recipient. This does not show that amount, period, payee, asset or timing match the ATR's content. Later billing periods were paid under this ATR by renewal transfers the seller did not read. ### `ucp/booking/ap2-mandate` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The booking response carried this ATR's hash and link as its legal\_context link before the business signed it (ap2.merchant\_authorization, the seller's signature). The buyer's checkout mandate, issued by the platform or the user's credential under UCP's AP2 Mandates extension, carries checkout\_hash, the SHA-256 of that signed booking, and the seller read the hash from the booking inside it. The seller did not verify the mandate's signature; the PSP verifies the payment mandate over the same booking hash. The seller reported the payment. This does not show that amount, payee or timing match the ATR's content. ### `ucp/booking/unsigned` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The booking response the platform received carried this ATR's hash and link as its legal\_context link before the buyer completed the booking, and the ATR was in the seller's storage before that. UCP without the AP2 Mandates extension defines no buyer signature, so the buyer's approval, given in the platform's interface, did not sign the hash. The seller tied the payment to the hash in its report. ### `ucp/checkout/ap2-mandate` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The checkout response carried this ATR's hash and link as its legal\_context link before the business signed it (ap2.merchant\_authorization, the seller's signature). The buyer's checkout mandate, issued by the platform or the user's credential under UCP's AP2 Mandates extension, carries checkout\_hash, the SHA-256 of that signed checkout, and the seller read the hash from the checkout inside it. The seller did not verify the mandate's signature; the PSP verifies the payment mandate over the same checkout hash. The seller reported the payment. This does not show that amount, payee or timing match the ATR's content. ### `ucp/checkout/unsigned` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The checkout response the platform received carried this ATR's hash and link as its legal\_context link before the buyer completed the checkout, and the ATR was in the seller's storage before that. UCP without the AP2 Mandates extension defines no buyer signature, so the buyer's approval, given in the platform's interface, did not sign the hash. The seller tied the payment to the hash in its report. ### `x402/auth-capture/eip155/eip3009` The payer signed a token authorization whose nonce commits, through the escrow's PaymentInfo, to a salt that is this ATR's hash when unbound, or a commitment over it with the receiver authorizer and policy when bound. The token contract or Permit2 verified the signature when the escrow collected the payment, and the escrow's event carries the salt. A holder of the ATR can confirm the hash from the salt; the chain alone does not reveal it. This record covers that first collection; capture, void, refund and reclaim are the operator's and the payer's. ### `x402/auth-capture/eip155/permit2` The payer signed a token authorization whose nonce commits, through the escrow's PaymentInfo, to a salt that is this ATR's hash when unbound, or a commitment over it with the receiver authorizer and policy when bound. The token contract or Permit2 verified the signature when the escrow collected the payment, and the escrow's event carries the salt. A holder of the ATR can confirm the hash from the salt; the chain alone does not reveal it. This record covers that first collection; capture, void, refund and reclaim are the operator's and the payer's. ### `x402/batch-settlement/cloudflare` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The buyer's agent signed, with the HTTP message signature key it registered with Cloudflare, a request whose PAYMENT-SIGNATURE header echoes this ATR's hash in the x402 legalContext extension. Cloudflare verifies that signature and bills the agent's registered identity off chain. This does not show that amount, asset or timing match the ATR's content. ### `x402/batch-settlement/eip155` The payer signed a token authorization for a deposit into an x402 batch-settlement channel whose identifier, the EIP-712 hash of the channel's configuration, commits to this ATR's hash as the configuration's salt. The token contract or Permit2 verified that signature when the channel contract collected the deposit, and the hash is on chain as the salt in the channel's ChannelCreated event. Later requests in this channel were paid under this ATR by vouchers the seller did not meter; each voucher signs a commitment to this ATR's hash. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/batch-settlement/solana` The payer signed a Solana transaction whose one Memo instruction carries this ATR's hash in LCP string form, and which opened an x402 batch-settlement payment channel; it executed without error. The memo is in the transaction's instruction data on chain. Later requests in this channel were paid under this ATR by vouchers the seller did not meter. This does not show that amount, recipient, mint or timing match the ATR's content. ### `x402/exact/algorand` The payer signed an Algorand asset transfer whose note is this ATR's hash in LCP string form. The ledger verified that signature when it confirmed the transaction, which is final on confirmation, and the note is on chain in it. This does not show that amount, receiver, asset or timing match the ATR's content. ### `x402/exact/aptos` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR was assembled and written to the seller's storage before the challenge went out, and the challenge advertised its hash and link. The payer's signed Aptos transaction does not carry the hash. The seller tied the hash to this payment when it claimed it for this request, and identified the settlement as the payer's committed transaction by sender, sequence number and a digest of its transfer. This does not show that the buyer's approval carried the hash, or that amount, payee, asset or timing match the ATR's content. ### `x402/exact/cardano` The payer signed a Cardano transaction whose body commits, through its auxiliary\_data\_hash, to a CIP-20 message (label 674) carrying this ATR's hash. The ledger included the transaction as valid, at the stated depth; the rail allows a rollback of fewer than k blocks. The hash is in the transaction's metadata on chain. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/casper` The payer signed a CEP-3009 transfer authorization whose nonce is this ATR's hash. The token contract verified that signature, and that the signing key is the payer's, when it executed the transfer, and the hash is on chain as the nonce argument of that call. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/ccd` The payer signed a Concordium transaction whose one transfer carries this ATR's hash, in LCP string form, as its memo. The chain accepted the transaction only with the sender's valid signature, and the memo is on chain in the finalized transfer event. This does not show that amount, payee, token or timing match the ATR's content. ### `x402/exact/eip155/eip3009` The payer signed an EIP-3009 transfer authorization whose nonce is this ATR's hash. The token contract verified that signature when it executed the transfer, and the hash is on chain as the nonce topic of its AuthorizationUsed event in the settlement transaction. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/eip155/erc7710` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR was assembled, written to the seller's storage and linked in the challenge before approval, and the buyer's payment payload echoed this ATR's hash in the x402 legalContext extension. The buyer's delegation does not sign the hash, and the settlement transaction does not carry it. ### `x402/exact/eip155/erc7710-salt` The leaf delegation of the permission context redeemed for this payment, made through MetaMask's DelegationManager, carries this ATR's hash as its signed salt. The manager verified every delegation's signature when it redeemed them, and the leaf, with its salt, is in a RedeemedDelegation event in the settlement transaction. The leaf's signer is its delegator, which may be an account the paying account authorised rather than the paying account itself. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/eip155/permit2` The payer signed a Permit2 witness transfer whose nonce is this ATR's hash, with the scheme's x402 proxy as spender and the payee in the witness. Permit2 verified the signature when the proxy executed the transfer, and the hash is in the settlement transaction's calldata as the Permit2 nonce; no event carries it. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/hedera` The payer signed a Hedera transaction body whose memo carries this ATR's hash in LCP string form, and the transaction reached consensus with SUCCESS. The memo is in the public transaction record. This does not show that amount, recipient, token or timing match the ATR's content. The seller read the landed entry by its transaction id and memo; the fee payer, the seller's facilitator, could land another body under the same id. ### `x402/exact/hedera/transfer-executor` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The payment is an x402 transferExecutor payment on Hedera: the payer's executor contract moved the funds under an authorization the seller did not read, and the facilitator submitted the transaction. The hash reached the payer only in the challenge's extension, and nothing the payer signed carries it. The seller read the merged consensus record of the named transaction, and found the transfer whose payer, payee and amount match the digest recorded at claim. This does not show that amount, recipient, token or timing match the ATR's content. ### `x402/exact/lnbtc` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The seller's node signed a BOLT11 invoice whose payment metadata is this ATR's hash, and whose description hash is x402's request hash. The payer paid that invoice, and its node checked the node signature before paying. The payer signed nothing that carries the hash, and the seller did not verify the invoice signature. The invoice and its preimage, which the parties hold, are the proof of the payment. No public ledger shows it. This does not show that amount, payee or timing match the ATR's content. ### `x402/exact/lnbtc/invoice-named` Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on , recorded in . The ATR names this payment: its binding slot holds the payment option as issued, including the seller node's signed BOLT11 invoice, whose payment hash the payer paid and whose description hash is x402's request hash. The invoice does not carry this ATR's hash, and the payer signed nothing that does. The buyer's gate paid only an invoice its ATR names, and the seller checked that the paid invoice is the one issued with this ATR. The invoice and its preimage, which the parties hold, are the proof of the payment. No public ledger shows it. This does not show that amount, payee or timing match the ATR's content. ### `x402/exact/near` The payer signed a NEP-366 delegate action whose one ft\_transfer carries this ATR's hash in its memo, in LCP string form. The runtime verified that signature and executed the transfer on the token contract, and the memo is on chain in the delegated call's arguments. This does not show that amount, receiver, token or timing match the ATR's content. ### `x402/exact/polkadot/lcp-assets-remark` The payer signed one Polkadot Asset Hub extrinsic whose call is an atomic batch of a transfer of the asset and an on-chain remark whose bytes are this ATR's hash in LCP string form. The chain verified the signature, which covers the call, and executed the batch, which applies both calls or neither. Its Remarked event carries the BLAKE2b-256 of the remark, and its Transferred event names the asset, at the finality recorded. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/solana` The payer signed a Solana transaction whose one Memo instruction carries this ATR's hash in LCP string form, and the transaction executed without error, carrying a token or SOL transfer. The memo is in the transaction's instruction data on chain. This does not show that amount, recipient, mint or timing match the ATR's content. ### `x402/exact/starknet` The payer signed a SNIP-12 outside execution whose nonce is the low 250 bits of this ATR's hash. The payer's account contract verified that signature when it executed the transfer call, and the nonce is in the settlement transaction's calldata. A holder of the ATR can confirm the hash from the nonce; the chain alone does not reveal all of it, and no event indexes it. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/stellar` The ATR was assembled, written to the seller's storage and linked in the challenge before approval, and its hash is in the payment challenge, which the payer did not sign. The payer signed a transfer to the seller's muxed address whose 8-byte id is the first 8 bytes of this ATR's hash, and the transaction succeeded. The id matches this hash by prefix only; it does not exclude another ATR whose hash begins with the same 8 bytes. This does not show that amount, asset or timing match the ATR's content. ### `x402/exact/sui` The payer signed a Sui transaction whose one unused Pure input is this ATR's hash. The network executed that transaction successfully, and the hash is on chain in its input list, readable by its digest while a node retains it. This does not show that amount, payee, coin type or timing match the ATR's content. ### `x402/exact/tron/lcp-trc20-memo` The payer signed a Tron transaction whose memo is this ATR's hash in LCP string form, and whose one contract calls transfer on the token. The network verified the signature, which covers the memo through the transaction id. The call succeeded with the token's Transfer event, at the finality recorded. The memo is on chain in the transaction. This does not show that amount, payee, token or timing match the ATR's content. ### `x402/exact/tvm` The payer's W5 wallet signed a request whose one Jetton transfer carries this ATR's hash in its forward payload, as a TEP-74 text comment in LCP string form. The payer's Jetton wallet executed that transfer, and the payee's Jetton wallet accepted it. The comment is on chain in the transfer's message bodies. This does not show that amount, payee, asset or timing match the ATR's content. ### `x402/exact/xrpl` The payer signed an XRPL Payment whose InvoiceID is the SHA-256 of this ATR's hash in LCP string form, and the Payment is in a validated ledger with tesSUCCESS. The hash can be confirmed from the ATR's bytes but not recovered from the ledger alone. This does not show that amount, destination, asset or timing match the ATR's content. ### `x402/upto/eip155/permit2` The payer signed a Permit2 witness transfer whose nonce is this ATR's hash, with the scheme's x402 proxy as spender and the payee in the witness. Permit2 verified the signature when the proxy executed the transfer, and the hash is in the settlement transaction's calldata as the Permit2 nonce; no event carries it. This does not show that amount, payee, asset or timing match the ATR's content. The amount settled is the facilitator's, at most the signed maximum. ### `x402/upto/solana` The payer signed a Solana transaction whose one Memo instruction carries this ATR's hash in LCP string form, and which opened a one-request payment channel escrowing the signed maximum; it executed without error. The memo is in the transaction's instruction data on chain. The amount charged from the escrow, which may be zero, is the seller's metering, settled by the facilitator in a later transaction that does not carry the hash, and the rest returns to the payer. This does not show that amount, recipient, mint or timing match the ATR's content. --- # Refusal codes > Every refusal code @integraledger/lcp returns, with its meaning. Source: https://lcp.integraledger.com/reference/refusals Every failure in this package is a value, `{ refused: true, code }`, and every code is `/` ([Refusals](https://lcp.integraledger.com/concepts/refusals)). This page lists all 476 codes the package can return, by namespace. CI checks that every code the source names in `refusal(…)` or `refuse(…)` is listed here. | Namespace | Codes | Returned by | | ------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | [`core`](#core) | 6 | The core: `assemble` and the JSON checks under it. | | [`discovery`](#discovery) | 20 | The discovery document (`@integraledger/lcp/discovery`). | | [`x402`](#x402) | 31 | x402 documents, the request commitment, and the checks every x402 pairing shares (`@integraledger/lcp/x402` and the x402 pairings on each rail). | | [`mpp`](#mpp) | 51 | MPP challenges and credentials, and the checks every MPP pairing shares (`@integraledger/lcp/mpp`). | | [`ack`](#ack) | 10 | ACK Payment Requests and receipts (`@integraledger/lcp/ack`). | | [`acp`](#acp) | 15 | ACP checkout sessions and delegated payments (`@integraledger/lcp/acp`). | | [`ap2`](#ap2) | 17 | AP2 checkouts, Checkout Mandates and the SD-JWT reader under them (`@integraledger/lcp/ap2`). | | [`ucp`](#ucp) | 13 | UCP checkouts and bookings (`@integraledger/lcp/ucp`). | | [`card`](#card) | 25 | Visa TAP, Mastercard Verifiable Intent and the plain card checkout (`@integraledger/lcp/card`). | | [`a2a`](#a2a) | 6 | The A2A extension (`@integraledger/lcp/a2a`). | | [`evm`](#evm) | 12 | EVM chains: typed data, logs and the settlement read (`@integraledger/lcp/evm`). | | [`tempo`](#tempo) | 16 | Tempo: transactions, memos, channels and key authorizations (`@integraledger/lcp/tempo`). | | [`svm`](#svm) | 25 | Solana (`@integraledger/lcp/svm` and the Solana pairings). | | [`stellar`](#stellar) | 15 | Stellar (`@integraledger/lcp/stellar` and the Stellar pairings). | | [`xrpl`](#xrpl) | 21 | The XRP Ledger (`@integraledger/lcp/xrpl` and the XRPL pairings). | | [`hedera`](#hedera) | 19 | Hedera (`@integraledger/lcp/hedera`). | | [`avm`](#avm) | 12 | Algorand (`@integraledger/lcp/avm`). | | [`aptos`](#aptos) | 6 | Aptos (`@integraledger/lcp/aptos`). | | [`cardano`](#cardano) | 12 | Cardano (`@integraledger/lcp/cardano`). | | [`casper`](#casper) | 13 | Casper (`@integraledger/lcp/casper`). | | [`ccd`](#ccd) | 17 | Concordium (`@integraledger/lcp/ccd`). | | [`near`](#near) | 16 | NEAR (`@integraledger/lcp/near`). | | [`polkadot`](#polkadot) | 18 | Polkadot Asset Hub (`@integraledger/lcp/polkadot`). | | [`starknet`](#starknet) | 13 | Starknet (`@integraledger/lcp/starknet`). | | [`sui`](#sui) | 12 | Sui (`@integraledger/lcp/sui`). | | [`tron`](#tron) | 15 | Tron (`@integraledger/lcp/tron`). | | [`tvm`](#tvm) | 15 | TON (`@integraledger/lcp/tvm`). | | [`ln`](#ln) | 19 | Lightning: BOLT11 invoices and the Lightning pairings (`@integraledger/lcp/lightning`). | | [`stacks`](#stacks) | 6 | Stacks (`@integraledger/lcp/stacks`). | ## core The core: `assemble` and the JSON checks under it. | Code | Meaning | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `core/binding-not-json` | `assemble` refuses a binding value that is not serialisable JSON with safe-integer numbers and at most 64 levels of nesting. | | `core/content-not-json` | `assemble` refuses party content that is not a `Uint8Array` holding exactly one JSON value, and `canonicalJson` and `digestJson` refuse a value that is not JSON (deeper than 64 levels, a non-finite number, a string with an unpaired surrogate, or a non-JSON type). | | `core/slot-duplicate` | `assemble` refuses two party slots with the same name. | | `core/slot-name` | `assemble` refuses a binding slot or party slot name that is not a string of 1 to 64 characters from `A-Z`, `a-z`, `0-9`, `.`, `_` and `-` starting with a letter or digit. | | `core/slot-reserved` | `assemble` refuses a slot named `atrVersion` or `id`, or a party slot that reuses the binding slot's name. | | `core/too-large` | `assemble` refuses a `maxBytes` limit that is not a non-negative safe integer, more than 64 party slots, or an ATR whose bytes would exceed the limit (at most 1 MiB). | ## discovery The discovery document (`@integraledger/lcp/discovery`). | Code | Meaning | | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | `discovery/atr-hash-malformed` | The discovery document's `atrHash` is not `0x` followed by 64 hex digits. | | `discovery/clause-id-malformed` | The discovery document's `disputeResolution.clauseId` is not `sha256:0x` followed by 64 hex digits. | | `discovery/member-malformed/acceptanceRequired` | `parse` or `emit` finds the discovery document's `acceptanceRequired` present but not a boolean. | | `discovery/member-malformed/api` | `parse` or `emit` finds the discovery document's `api` present but not a non-empty string. | | `discovery/member-malformed/contact` | `parse` or `emit` finds the discovery document's `contact` present but not an object. | | `discovery/member-malformed/contact.legal` | `parse` or `emit` finds the discovery document's `contact.legal` present but not a non-empty string. | | `discovery/member-malformed/contact.technical` | `parse` or `emit` finds the discovery document's `contact.technical` present but not a non-empty string. | | `discovery/member-malformed/disputeResolution` | `parse` or `emit` finds the discovery document's `disputeResolution` present but not an object. | | `discovery/member-malformed/disputeResolution.catalog` | `parse` or `emit` finds the discovery document's `disputeResolution.catalog` present but not a non-empty string. | | `discovery/member-malformed/disputeResolution.contact` | `parse` or `emit` finds the discovery document's `disputeResolution.contact` present but not a non-empty string. | | `discovery/member-malformed/disputeResolution.jurisdiction` | `parse` or `emit` finds the discovery document's `disputeResolution.jurisdiction` present but not a non-empty string. | | `discovery/member-malformed/disputeResolution.method` | `parse` or `emit` finds the discovery document's `disputeResolution.method` present but not a non-empty string. | | `discovery/member-malformed/disputeResolution.source` | `parse` or `emit` finds the discovery document's `disputeResolution.source` present but not a non-empty string. | | `discovery/member-malformed/returns` | `parse` or `emit` finds the discovery document's `returns` present but not a non-empty string. | | `discovery/member-malformed/terms` | `parse` or `emit` finds the discovery document's `terms` present but not a string. | | `discovery/member-malformed/termsFormat` | `parse` or `emit` finds the discovery document's `termsFormat` present but not a non-empty string. | | `discovery/not-json-object` | `parse` refuses bytes that are not UTF-8 JSON or whose value is not an object, and `emit` refuses a document that is not an object. | | `discovery/terms-missing` | The discovery document has no `terms` member. | | `discovery/terms-not-https` | The discovery document's `terms` is a string that is not an absolute `https` URL. | | `discovery/too-large` | `parse` refuses input that is not a `Uint8Array` or exceeds 65536 bytes, and `emit` refuses a document whose written bytes exceed 65536. | ## x402 x402 documents, the request commitment, and the checks every x402 pairing shares (`@integraledger/lcp/x402` and the x402 pairings on each rail). | Code | Meaning | | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `x402/channel-id-mismatch` | The EVM batch pairing finds that the voucher's `channelId` is not the id computed from the payment's channel config, or `buildWithin` is given a channel config whose `salt` is not H. | | `x402/channel-kind-unknown` | The batch pairing's `channel.kind` cannot classify the payment as an opening, a payment within the channel, or a close (an unknown payload `type`, or an SVM deposit whose channel instruction is neither `open` nor `top_up`). | | `x402/delegation-empty` | At the ERC-7710 salt level, the payment's permission context decodes to no delegations. | | `x402/deposit-authorization` | The EVM batch opening's `deposit.authorization` is not an object carrying exactly one of `erc3009Authorization` and `permit2Authorization`. | | `x402/escrow-not-canonical` | An `auth-capture` option's `extra.authCaptureEscrow` names neither the v1.1 nor the v1.0 canonical escrow deployment. | | `x402/facilitator-missing` | An `upto` option on an EVM network has no valid `extra.facilitatorAddress`. | | `x402/flow-missing` | The Solana `upto` pairing's `advertise` refuses an option whose `extra.paymentFlow` is not `escrow`. | | `x402/flow-not-carried` | An `auth-capture` option's `extra.paymentFlow` is neither `escrow` nor `authorization`, or its `extra.autoCapture` is `true`. | | `x402/legal-context-conflict` | `advertise` finds an `extensions.legalContext` already in the document with other values, or the Cloudflare batch pairing's `build` finds that the document's legal context carries a hash other than H. | | `x402/legal-context-malformed` | The link or agreement URL given to `advertise` is not a usable `https` URL of at most 2048 characters, H is invalid, or the document's `extensions` is not an object; or `extensions.legalContext.info` does not decode as a legal context, has a link over 2048 characters, or carries an agreement URL that is malformed or given in both spellings with different values. | | `x402/link-not-https` | The link or agreement URL given to `advertise`, or found in the document's `extensions.legalContext.info` by `read`, is an absolute URL of at most 2048 characters whose scheme is not `https`. | | `x402/manager-not-reference` | At the ERC-7710 salt level, the payment's `delegationManager` is not the reference DelegationManager on a chain where it is deployed. | | `x402/no-legal-context` | The document or presented payment has no `extensions.legalContext`, or (for the unsigned ERC-7710 level and Aptos `bound`) the echoed `extensions.legalContext.info` does not decode. | | `x402/no-payable-option` | `read` finds no option in the document's `accepts` that this pairing serves. | | `x402/nonce-malformed` | A presented Permit2 payment's `nonce` is not a decimal below 2^256 or `0x` followed by 64 hex digits. | | `x402/nonce-not-payment` | A presented `auth-capture` payment's signed nonce does not decode, or is not the escrow payment hash recomputed from the option's terms, the salt and the expiry. | | `x402/not-an-opening` | `bound` or `reference` refuses a presented payment that is not a channel opening: its payload `type` is not `deposit`, or its channel instruction is not `open`. | | `x402/not-bound-within` | The SVM batch pairing's `channel.boundWithin` always refuses, because a voucher within the channel carries no hash. | | `x402/not-v2` | The payment document given to `advertise`, `read` or `build`, or the payment presented to `bound` or `reference`, is not an object whose `x402Version` is 2. | | `x402/option-malformed` | The document's `accepts` is not an array of at most 32 options, an option this pairing names lacks what the pairing needs to pay it (a valid amount, asset, `payTo`, positive `maxTimeoutSeconds`, token name and version, or its scheme's required `extra` members), or the buyer's choice given to `build` carries an invalid payer address, `now`, key, nonce, sequence, deposit or amount. | | `x402/option-not-in-document` | The option given to `advertise` or chosen in `build` is not one of the document's `accepts`, compared by identity or RFC 8785 form. | | `x402/option-not-this-pairing` | The option offered, chosen or presented (as the payment's `accepted`) is not one this pairing serves: its scheme, network, asset transfer method, payment flow or fields belong to another pairing or to none. | | `x402/payload-malformed` | The presented payment's `accepted` or `payload` is not an object or lacks a member the pairing reads (authorization, Permit2 authorization, delegation fields, transaction, channel config, voucher or deposit), a member does not decode to a valid address, amount, deadline or digest, or H given to `build` is not a valid ATR hash. | | `x402/permission-context-malformed` | The ERC-7710 `permissionContext` given to `complete` is not hex of at most 32 KiB, or at the salt level it does not decode as a list of delegations. | | `x402/request-target-invalid` | `requestCommitment` refuses a request whose method or target is not a string, whose body is not a `Uint8Array`, or whose target does not start with `/` or contains a character outside visible ASCII. | | `x402/request-too-large` | `requestCommitment` refuses a request target longer than 8192 characters or a body larger than 1 MiB. | | `x402/salt-malformed` | A presented `auth-capture` payment's `salt`, or its `saltNonce` when the option binds a receiver authorizer or policy, is not `0x` followed by 64 hex digits. | | `x402/salt-not-bound` | A presented `auth-capture` payment's `salt` is not the commitment of its `saltNonce` to the option's receiver authorizer and policy. | | `x402/signature-malformed` | A signature given to `complete` or carried in the presented payload is missing, not hex (or bytes) of the length the pairing requires, or not the number of signatures the request asked for. | | `x402/signed-not-bound` | `complete` refuses a signed transaction from which the pairing cannot read H back (or its read keys), or which carries a hash other than H. | | `x402/spender-not-proxy` | A presented Permit2 payment's `spender` is not the x402 Permit2 proxy for its scheme (`exact` or `upto`). | ## mpp MPP challenges and credentials, and the checks every MPP pairing shares (`@integraledger/lcp/mpp`). | Code | Meaning | | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `mpp/access-key-malformed` | A Tempo subscription challenge's `methodDetails.accessKey` is not an object with an address `accessKeyAddress` and a `keyType` of `p256`, `secp256k1` or `webAuthn`. | | `mpp/attribution-malformed` | `checkAttribution` is given a memo that is not 32 bytes of hex, or a Hedera charge's memo is not UTF-8 or not an attribution memo. | | `mpp/attribution-mismatch` | An attribution memo's tag, version, server id for the realm, or nonce for the challenge id is not the expected value. | | `mpp/carrier-not-challenge` | The hash the payment carries (the Lightning invoice's description hash, the Solana memo, the XRPL `InvoiceID` or memo, the session opening's salt, or the NEAR Intents `externalId`) is not the hash the echoed challenge's id derives from. | | `mpp/carrier-occupied` | `advertise` for a card, Stripe or `usdc` Solana charge finds the carrier member already holding a value other than H's LCP string. | | `mpp/carrier-taken` | A challenge as issued already carries an LCP member (`legalContext`, `legalContextUrl` or `legalContextAgreementUrl`) in its `opaque`, or a Tempo charge challenge already has a `methodDetails.memo`. | | `mpp/chain-id-required` | An EVM session or Tempo subscription challenge has no positive integer `chainId`, a Tempo session challenge's `chainId` is present but not a positive integer, or a Tempo session using `sessionProtocol` `v2` lacks `chainId` or `escrowContract`. | | `mpp/challenge-malformed` | A challenge is not challenge-shaped: `parseChallenges` finds a repeated parameter or a missing or empty required one, `place`, `read` or `issuedDigest` is given more than 32 challenges or one without the required members, `challengeId` is given an invalid H or a position outside 0 to 31, a Hedera charge `build` is given a challenge without a string `id` and `realm`, or H or a value to hash cannot be written in its canonical form. | | `mpp/channel-named` | A session challenge as issued already names a channel (`channelId`, or an EVM or Tempo `sessionSnapshot`), so it is not a challenge to open one. | | `mpp/channel-not-bound` | An EVM session opening's `channelId` is not the channel id computed from the payer, payee, token, H as salt, signer, escrow and chain. | | `mpp/credential-malformed` | A credential is not an object with an echoed challenge carrying an `id`, an optional string `source` and a `payload` object, exceeds the credential size bound, or lacks a payload member the pairing reads (signature, nonce, hash, transaction, salt, channel id, authorization fields or landed logs) in the required form; or a signature or hash given to `complete` is not the required hex, or the Lightning `build` choice has no challenge with a string `id`. | | `mpp/credential-type` | The credential's payload `type` is not one the pairing accepts (such as `transaction`, `hash`, `authorization`, `permit2`, `transfer` or `keyAuthorization`). | | `mpp/credential-types` | The challenge's `credentialTypes` is not a non-empty array of types the method defines, or leaves no pairing (EVM `splits` allow only Permit2), or the credential type the buyer asks a session `build` for is not one the challenge lists. | | `mpp/escrow-malformed` | An EVM or Tempo session challenge's `methodDetails.escrowContract` is not an address. | | `mpp/expires-required` | The challenge has no `expires`, or its `expires` is not a valid RFC 3339 date-time. | | `mpp/gateway-unread` | The `usdc` Gateway credential's `authorization` is not a single `circle-gateway-v1` signed burn intent whose spec carries a bytes32 `salt`, decimal value and fee, and readable signer and recipient accounts. | | `mpp/header-malformed` | `parseChallenges` refuses field values that are not an array of strings of at most 8 KiB each, that do not parse by RFC 9110's challenge grammar, or that carry more than 32 `Payment` challenges. | | `mpp/id-not-ours` | A challenge id is not the base64url of an ATR hash in the form this package writes it (with a position 0 to 31, or bare for a Tempo subscription), or the id does not derive from H given to `build`, or a held session opening is bound to a hash other than H. | | `mpp/input-malformed` | The buyer's input to `build`, `buildWithin` or `complete` is not what the pairing needs: no chosen challenge object, or an invalid payer address, token domain, spender, client id, deposit, signer, cumulative amount, fee, key or other value the pairing reads. | | `mpp/legal-context-conflict` | `place` finds LCP members already in the challenge's `opaque` with other values, or `read` finds challenges that carry different hashes, links or agreement URLs. | | `mpp/legal-context-malformed` | The link or agreement URL given to `place` is not a usable `https` URL of at most 2048 characters, or `read` finds a challenge whose `legalContextUrl` or `legalContextAgreementUrl` is not one (and, for the link, no challenge reads). | | `mpp/link-not-https` | The link or agreement URL given to `place`, or found in a challenge's `opaque` by `read` when no challenge reads, is an absolute URL of at most 2048 characters whose scheme is not `https`. | | `mpp/metadata-malformed` | A Stripe challenge's `methodDetails.metadata` is not an object within Stripe's bounds (key count including the one `advertise` adds, key length and characters, string values of bounded length). | | `mpp/modes-pull-only` | A Tempo charge challenge leaves no mode to pay in: its `supportedModes` omits `pull`, and either omits `push` or the challenge sets `feePayer` to `true`. | | `mpp/network-unnamed` | `network` refuses a challenge whose method names no network, such as a `usdc` Gateway challenge. | | `mpp/no-legal-context` | `read` finds no challenge whose `opaque` carries an LCP hash and a link and whose id derives from that hash. | | `mpp/no-signed-place` | `bound` of the EVM `transaction` and `hash` charge pairings, and `build` and `bound` of the card and Stripe pairings, always refuse, because nothing the buyer signs carries H. | | `mpp/nonce-not-challenge-hash` | The EVM `authorization` credential's `nonce` is not keccak256 of the challenge's id and realm. | | `mpp/nonce-not-channel` | An EVM session opening of type `authorization` carries a `nonce` other than the one derived from the payer, recipient, currency, H and signer. | | `mpp/nonce-not-usdc-derivation` | The `usdc` EVM credential's `nonce` is not the `usdcNonce` derived from the challenge's id, realm and request hash. | | `mpp/not-an-opening` | The session credential presented as the opening is not one: its action is not `open` (EVM, Tempo) or its payload `type` is not the opening's (`transaction` on Tempo, `keyAuthorization` on a Tempo subscription). | | `mpp/not-bound-within` | `channel.boundWithin` refuses a payment within the channel that carries no hash: an EVM session, a Tempo session under `sessionProtocol` `v1`, a Tempo subscription, a Hedera or XRPL session, a Solana payment other than `use`, a Lightning bearer or top-up, or a Stripe renewal. | | `mpp/not-this-pairing` | The challenge's intent and method name no pairing this package defines, the challenge (offered, chosen, echoed or held) does not offer the pairing whose function was called, or `place` finds no challenge in the document whose bound members equal the option. | | `mpp/opaque-malformed` | The challenge's `opaque` does not decode as a base64url JSON object of strings, or the `opaque` that `place` would write is larger than 8 KiB. | | `mpp/opaque-not-this-hash` | The echoed challenge has no `opaque`, or its `opaque` does not carry a `legalContext` equal to the hash its id derives from. | | `mpp/receipt-malformed` | The Stripe subscription's activation receipt is not a successful `stripe` receipt with a Stripe subscription ID of 1 to 255 visible ASCII characters. | | `mpp/receipt-missing` | The Stripe subscription's `channel.ref` is given no activation receipt. | | `mpp/request-malformed` | A challenge's `request` does not decode as a base64url JSON object of at most 8 KiB, its `methodDetails` is not an object, a member its intent and method require (amount, currency, recipient, addresses, networks, period, channel id or profile fields) is missing or malformed, or the request re-encoded with the carrier placed would exceed 8 KiB. | | `mpp/request-not-jcs` | `usdcRequestHash` finds that the challenge's decoded `request` bytes are not the RFC 8785 form of their own parse. | | `mpp/salt-not-this-hash` | An EVM session opening's `salt`, or its Permit2 witness `salt`, is not the hash the echoed challenge's id derives from. | | `mpp/salt-not-usdc-derivation` | The `usdc` Gateway credential's TransferSpec `salt` is not the `usdcGatewaySalt` derived from the challenge and the credential's own values. | | `mpp/session-action` | A session credential's or `buildWithin` input's `action` is not one the pairing defines (such as `open`, `voucher`, `topUp`, `use`, `bearer` or `close`), or a credential presented as an opening does not have `action` `open`. | | `mpp/session-protocol` | A Tempo session challenge's `sessionProtocol` is neither `v1` nor `v2`. | | `mpp/source-required` | The credential's `source` is not a `did:pkh:eip155` DID naming the payer, which the EVM Permit2 `reference` and a `hash`-type EVM session opening need. | | `mpp/splits-malformed` | An EVM charge challenge's `methodDetails.splits` is not an array of 1 to 10 entries, each with an address `recipient` and a non-zero decimal `amount`. | | `mpp/stacks-memo-not-h` | The `usdc` Stacks transaction is not a contract call to `transfer` whose fourth argument is `(some H)`. | | `mpp/stacks-tx-malformed` | The `usdc` Stacks credential's `transactionFormat` is not the one read, or its `transaction` is not base64 of a non-empty Stacks transaction within the size bound that decodes and re-serialises to the same bytes. | | `mpp/usdc-profile` | A `usdc` charge challenge's `methodDetails.type` does not name one of `evm`, `solana`, `stacks` or `gateway`, the named profile's details are not an object, or `methodDetails` also holds another profile's details. | | `mpp/within-action-not-built` | `buildWithin` is asked for an action it does not build (`topUp`, `use` or `bearer`), or for a voucher on a Solana channel whose vouchers the operator signs. | | `mpp/witness-not-challenge-hash` | The EVM `permit2` credential's `witness.challengeHash` is not keccak256 of the challenge's id and realm. | | `mpp/witness-taken` | `place` refuses a Tempo subscription challenge in a document that holds another Tempo subscription challenge, because both would take the same id derived from H. | ## ack ACK Payment Requests and receipts (`@integraledger/lcp/ack`). | Code | Meaning | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ack/id-not-lcp` | `read` finds that the signed token's `id` is not an ATR hash in LCP's string form (`lcp:sha256:H`). | | `ack/legal-context-conflict` | `read` finds that the hash in the body's `legalContext` differs from the hash in the signed token's `id`. | | `ack/legal-context-malformed` | `advertise` refuses an invalid ATR hash, a link that is not a usable `https` URL of at most 2048 characters, or an agreement URL that is not a valid `https` link; `read` refuses a body `legalContext` that does not decode, whose link exceeds 2048 characters, or whose agreement URL is malformed or given twice with different values. | | `ack/link-not-https` | The link or agreement URL given to `advertise`, or found in the body's `legalContext` by `read`, is an absolute URL whose scheme is not `https`. | | `ack/no-legal-context` | `read` finds no `legalContext` in the 402 body. | | `ack/no-signed-place` | ACK defines no payer signature, so `build` and `bound` of `ack/payment-request` always return this refusal. | | `ack/option-malformed` | `advertise` refuses a payment option that is not an object with a non-empty string `id`. | | `ack/receipt-malformed` | `fromReceipt` refuses a `credentialSubject` that is not a serialisable JSON object or whose embedded `paymentRequestToken` does not carry an `id` in LCP's string form. | | `ack/token-malformed` | `read` refuses a 402 body that is not a serialisable JSON object, a `paymentRequestToken` that is not a compact JWS with a JSON object payload, or a token payload whose `paymentOptions` is not an array. | | `ack/too-large` | `read` refuses a 402 body over 64 KiB, a token over 16384 characters or more than 16 payment options, and `fromReceipt` refuses a `credentialSubject` over 64 KiB. | ## acp ACP checkout sessions and delegated payments (`@integraledger/lcp/acp`). | Code | Meaning | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `acp/allowance-changed` | The `complete` function returned by `build` refuses a `delegate_payment` request that is not an object or whose `allowance` differs from the one built. | | `acp/allowance-malformed` | `bound` refuses a presented request that is not an object or whose `allowance` is not exactly ACP's six members with `reason` `one_time`. | | `acp/choice-malformed` | `build` refuses a choice that is not an object, or whose `max_amount`, `currency`, `merchant_id` or `expires_at` is not a non-negative safe integer, a three-letter lowercase code, a non-empty string and an RFC 3339 date-time respectively. | | `acp/hash-not-session` | `build` refuses when H is not a valid ATR hash or the chosen session's `id` is not H. | | `acp/id-conflict` | `advertise` finds that the session already has an `id` other than H. | | `acp/id-not-hash` | `read` finds that the session's `id` is not an ATR hash, or `bound` finds that the allowance's `checkout_session_id` is not one. | | `acp/legal-context-conflict` | `advertise` finds a different `metadata.legal_context` already in the session, or `read` finds that the hash in `metadata.legal_context` differs from the session's `id`. | | `acp/legal-context-malformed` | `advertise` refuses an invalid ATR hash, a link that is not a usable `https` URL of at most 2048 characters, or a malformed agreement URL; `read` refuses a `metadata.legal_context` that does not decode, whose link exceeds 2048 characters, or whose agreement URL is malformed or given in both spellings with different values. | | `acp/link-not-https` | The link or agreement URL given to `advertise`, or found in `metadata.legal_context` by `read`, is an absolute URL whose scheme is not `https`. | | `acp/no-legal-context` | `read` finds no `metadata.legal_context` in the session. | | `acp/not-buyer-signed` | `bound` of `acp/checkout/undelegated` always refuses, because nothing the buyer signs names the hash. | | `acp/nothing-to-sign` | `build` of `acp/checkout/undelegated` always refuses, because a handler that does not require `delegate_payment` gives the buyer nothing to sign. | | `acp/option-malformed` | `advertise` refuses a handler option that is not an object with a boolean `requires_delegate_payment`. | | `acp/session-malformed` | `advertise` or `read` refuses a checkout session that is not a serialisable JSON object, or (in `advertise`) whose `metadata` is present but not an object. | | `acp/too-large` | The checkout session exceeds 1 MiB or (in `read`) its `id` is longer than a hash, or the buyer's choice given to `build` has a `merchant_id` over 256 characters or an `expires_at` over 64 characters. | ## ap2 AP2 checkouts, Checkout Mandates and the SD-JWT reader under them (`@integraledger/lcp/ap2`). | Code | Meaning | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ap2/checkout-hash-mismatch` | `bound` finds that the mandate discloses a `checkout_jwt` different from the presented one. | | `ap2/checkout-id-missing` | The checkout payload has no `id`, or its `id` is not a non-empty string. | | `ap2/checkout-not-latest` | `bound` finds that the mandate's `checkout_hash` is not the SHA-256 of the presented `checkout_jwt`. | | `ap2/disclosure-unreferenced` | The Checkout Mandate carries a disclosure that no digest in its payload references. | | `ap2/hash-not-in-checkout` | `build` finds that the hash in the offer's checkout JWT is not H. | | `ap2/jws-malformed` | A checkout JWT (given to `jwsPayload`, `read`, `build` or `bound`, or as a payload to `advertise`) is not a compact JWS whose payload is one JSON object, or `advertise` is given a payload that is not a serialisable JSON object. | | `ap2/legal-context-conflict` | `advertise` finds a different `legalContext` already in the checkout payload. | | `ap2/legal-context-malformed` | The link or agreement URL given to `advertise` is not a usable `https` URL of at most 2048 characters or H is invalid, or the checkout payload's `legalContext` does not decode, has a link over 2048 characters, or has an agreement URL that is malformed or given in both spellings with different values. | | `ap2/link-not-https` | The link or agreement URL given to `advertise`, or the link or agreement URL found in the checkout payload's `legalContext` by `read`, `build` or `bound`, is an absolute URL whose scheme is not `https`. | | `ap2/mandate-ambiguous` | The resolved SD-JWT contains more than one object whose `vct` is `mandate.checkout.1`. | | `ap2/mandate-malformed` | The Checkout Mandate is not a well-formed SD-JWT presentation (bad segments, disclosures, or a digest referenced twice), its `checkout_hash` is not 43 base64url characters, its `checkout_jwt` is present but not a string, the presentation given to `bound` is not an object, or `checkoutJwtOf` finds no disclosed `checkout_jwt`. | | `ap2/no-checkout-mandate` | The resolved SD-JWT contains no object whose `vct` is `mandate.checkout.1`. | | `ap2/no-legal-context` | The checkout payload read by `read`, `build` or `bound` has no `legalContext` member. | | `ap2/option-malformed` | `advertise` refuses an option that is not an object with exactly one member, `checkout`, a string of 1 to 256 characters. | | `ap2/option-not-this-checkout` | `advertise` finds that the option's `checkout` is not the payload's `id`. | | `ap2/sd-alg-unsupported` | The Checkout Mandate's `_sd_alg` names a digest algorithm other than `sha-256`. | | `ap2/too-large` | A checkout JWT, Checkout Mandate or checkout payload exceeds 1 MiB or nests deeper than 64 levels, a mandate carries too many disclosures or nests them too deeply, or a checkout `id` is longer than 256 characters. | ## ucp UCP checkouts and bookings (`@integraledger/lcp/ucp`). | Code | Meaning | | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ucp/already-signed` | `advertise` refuses a checkout that already carries `ap2.merchant_authorization`, because the link must be placed before the business signs. | | `ucp/ap2-not-active` | An AP2 Mandate pairing's `read` or `build` finds no `ap2.merchant_authorization` in the checkout in detached JWS form. | | `ucp/checkout-malformed` | The checkout (or booking) is not a serialisable JSON object with a non-empty string `id`, its `links` is present but not an array, or the offer given to `build` is not an object. | | `ucp/hash-not-in-checkout` | The AP2 Mandate pairing's `build` finds that the checkout's `legal_context` link carries a hash other than H. | | `ucp/legal-context-conflict` | The checkout has more than one `legal_context` link or more than one `legal_context_agreement` link, or `advertise` finds an existing `legal_context` or `legal_context_agreement` link whose values differ from the ones it would write (including an existing `legal_context` link with no agreement link when an agreement URL is given). | | `ucp/legal-context-malformed` | The `legal_context` link's `title` is not an ATR hash in LCP's string form, its `url` or a `legal_context_agreement` link's `url` is not a usable `https` URL of at most 2048 characters, or the link, agreement URL or H given to `advertise` is invalid. | | `ucp/link-not-https` | The link or agreement URL given to `advertise`, or the `url` of the checkout's `legal_context` or `legal_context_agreement` link, is an absolute URL whose scheme is not `https`. | | `ucp/no-legal-context` | The checkout has no `links` or no link whose `type` is `legal_context`. | | `ucp/not-buyer-signed` | `bound` of the unsigned checkout and booking pairings always refuses, because nothing the buyer signs carries the hash. | | `ucp/nothing-to-sign` | `build` of the unsigned checkout and booking pairings always refuses, because the buyer signs nothing. | | `ucp/option-malformed` | `advertise` refuses an option that is not an object with exactly one member, `checkout` or `booking` as the pairing requires, a string of 1 to 256 characters. | | `ucp/option-not-this-checkout` | `advertise` finds that the option names a checkout or booking other than the document's `id`. | | `ucp/too-large` | The checkout exceeds 1 MiB as JSON, its `id` exceeds 256 characters, or its `links` holds, or after `advertise` would hold, more than 64 entries. | ## card Visa TAP, Mastercard Verifiable Intent and the plain card checkout (`@integraledger/lcp/card`). | Code | Meaning | | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `card/legal-context-malformed` | The link or agreement URL given to `advertise` is not a usable `https` URL of at most 2048 characters, or H given to `advertise` or to the Visa TAP `build` is invalid, or a `legalContext` read from the shown JSON or a `checkout_jwt` does not decode, has a link over 2048 characters, or has an agreement URL that is malformed or given in both spellings with different values. | | `card/link-not-https` | The link or agreement URL given to `advertise`, or the link or agreement URL found in a `legalContext` by `read`, is an absolute URL whose scheme is not `https`. | | `card/no-legal-context` | The JSON the seller showed (for `card/visa-tap` and `card/seller-reference`) or the payload of a `checkout_jwt` (for Verifiable Intent) has no `legalContext` member. | | `card/no-signed-place` | `build` and `bound` of `card/seller-reference` always refuse, because nothing the buyer signs carries the hash. | | `card/option-malformed` | `advertise` refuses a card option that is not an object with a known `scheme` and a `checkout` of 1 to 128 visible ASCII characters. | | `card/tap-field-malformed` | The TAP request's `lcpHash` is not an array of strings, or its one line is not an ATR hash. | | `card/tap-field-missing` | The TAP request carries no `lcp-hash` field line. | | `card/tap-field-repeated` | The TAP request carries more than one `lcp-hash` field line. | | `card/tap-hash-not-covered` | No `agent-payer-auth` signature input lists the `lcp-hash` component without parameters. | | `card/tap-no-payer-signature` | No signature input in the TAP request has the `agent-payer-auth` tag. | | `card/tap-signature-input-malformed` | The Visa TAP `bound` refuses a presentation that is not an object, or a `signatureInput` that is not a string parsing as an RFC 9651 dictionary of signature inputs. | | `card/tap-signature-malformed` | The Visa TAP `bound` refuses a `signature` that is not a string parsing as an RFC 9651 dictionary of byte-sequence signatures. | | `card/tap-signature-missing` | No `agent-payer-auth` signature input that covers `lcp-hash` has a matching member in the `Signature` field. | | `card/too-large` | A `checkout_jwt` exceeds 16384 characters, a Verifiable Intent layer exceeds 65536 characters or 32 disclosures, a decoded payload nests too deeply, a TAP `Signature-Input` or `Signature` field exceeds 8192 characters, 16 members or 32 components, or an `lcp-hash` line exceeds 256 characters. | | `card/vi-checkout-hash-mismatch` | The checkout mandate's `checkout_hash` is not the digest of its `checkout_jwt`. | | `card/vi-disclosure-unreferenced` | A Verifiable Intent layer carries a disclosure that no digest in its payload references. | | `card/vi-key-malformed` | In autonomous mode, L2 does not delegate exactly one open checkout mandate whose `cnf.jwk` is an EC P-256 key with a string `kid`, L1's `cnf.jwk` is not an EC P-256 key, or a key cannot be imported for verification. | | `card/vi-kid-mismatch` | In autonomous mode, the `kid` in L3b's header is not the `kid` of the agent key that L2 delegates. | | `card/vi-legal-context-conflict` | The Verifiable Intent `build` finds that the hash in the `checkout_jwt` is not H. | | `card/vi-malformed` | A Verifiable Intent input is not what it must be: the presentation is not an object, a layer or `checkout_jwt` is not a string, not a well-formed compact JWS or SD-JWT with a JSON object payload, has no disclosures or trailing `~`, has an `_sd_alg` other than `sha-256`, or lacks a `delegate_payload` array of `{"...": digest}` entries. | | `card/vi-no-checkout-mandate` | A Verifiable Intent layer's `delegate_payload` does not reference exactly one `mandate.checkout.1` mandate. | | `card/vi-sd-hash-mismatch` | In autonomous mode, L3b's `sd_hash` is not the digest of L2, or L2's `sd_hash` is not the digest of L1. | | `card/vi-signature-invalid` | In autonomous mode, the ES256 signature on L3b or L2 is not 64 bytes or does not verify under the delegated key. | | `card/vi-transaction-id-mismatch` | A `mandate.payment.1` mandate in the same layer has a `transaction_id` other than the digest of the checkout mandate's `checkout_jwt`. | | `card/vi-typ` | A Verifiable Intent layer's header does not have `alg` `ES256` and the expected `typ`, or (in autonomous mode) L3b's header has no string `kid`. | ## a2a The A2A extension (`@integraledger/lcp/a2a`). | Code | Meaning | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `a2a/legal-context-conflict` | `place` finds a different legal context already under an extension URI in the task's `metadata`, or `read` finds values under two extension URIs that disagree. | | `a2a/legal-context-malformed` | `place` refuses a task or `metadata` that is not an object, an invalid ATR hash, or a link that is not a usable `https` URL of at most 2048 characters; `read` refuses a value under the extension URI that does not decode as a legal context or whose link exceeds 2048 characters. | | `a2a/link-not-https` | The link to the seller's copy, given to `place` or found by `read`, is an absolute URL whose scheme is not `https`. | | `a2a/no-legal-context` | `read` finds no legal context under any extension URI in the task's `metadata`. | | `a2a/no-signed-place` | The exported `binding` value: A2A signs nothing per transaction, so every request for an A2A pairing gets this refusal. | | `a2a/too-large` | The legal context value written by `place` or found by `read` under the extension URI is larger than 4096 bytes of JSON. | ## evm EVM chains: typed data, logs and the settlement read (`@integraledger/lcp/evm`). | Code | Meaning | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `evm/ambiguous` | An EVM `recover` finds more than one candidate hash in the transaction: several distinct `AuthorizationUsed` nonces, several distinct leaf salts, or several `ChannelCreated` logs. | | `evm/amount-malformed` | An amount given to an EVM typed-data, digest or payment-hash helper is not an unsigned integer within its type's width (uint256, or uint120 for an escrow `maxAmount`). | | `evm/channel-id-mismatch` | `batchChannelCreated` finds that the channel id computed from a `ChannelCreated` log's data is not the id in its topic. | | `evm/field-malformed` | A value given to an EVM helper is not what the ABI or EIP-712 type requires: an address, uint256, bytes32, time bound or fee outside its width, an empty or oversized Permit2 batch, an invalid witness type, a permission context or `ChannelCreated` log that does not decode strictly, or a malformed channel config. | | `evm/network-malformed` | A network is not an `eip155:` CAIP-2 name, or a chain id given to `eip3009TypedData`, `permit2TypedData` or `batchChannelId` is not a positive safe integer. | | `evm/no-authorization-use` | `eip3009Recover` finds no `AuthorizationUsed` log from the asset in the transaction. | | `evm/no-channel-created` | The EVM batch pairing's `recover` finds no `ChannelCreated` log from the batch-settlement contract in the transaction. | | `evm/no-leaf` | `redeemedLeafRecover` finds no `RedeemedDelegation` log from the DelegationManager whose delegate is the redeemer or the wildcard. | | `evm/not-found` | The reader found no receipt for the transaction the reference names. | | `evm/reverted` | The transaction the reference names reverted. | | `evm/unreadable` | The reader threw, or returned a receipt or log that is not well formed, when an EVM `recover` read the transaction. | | `evm/wrong-reader` | The reader passed to an EVM `recover` or `status` answers for a different network than the reference names. | ## tempo Tempo: transactions, memos, channels and key authorizations (`@integraledger/lcp/tempo`). | Code | Meaning | | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tempo/ambiguous` | More than one candidate carries the binding: several `transferWithMemo` calls or logs with the challenge's attribution memo, several `KeyAuthorizationWitness` logs, or several accounts whose key authorization carried H. | | `tempo/descriptor-mismatch` | A Tempo v2 session descriptor is missing or malformed (a non-address party, an invalid salt, nonce hash or chain), its channel id is not the payload's `channelId`, or its `salt` is not H. | | `tempo/key-authorization-malformed` | A Tempo key authorization does not encode or decode as the bounded RLP structure (items, limits, scopes, witness and signature), or the subscription credential's `signature` is not a string. | | `tempo/key-not-authorized` | `keyAccount` finds that the receipt has no `KeyAuthorized` log registering the key for the account whose key authorization carried H. | | `tempo/memo-not-bound` | The signed or landed Tempo transfer carries no `transferWithMemo` to the challenge's currency whose memo is the challenge's attribution memo. | | `tempo/no-access-key` | `keySearch` is given a reference with no well-formed access key (key id, token and recipient digest). | | `tempo/no-witness` | The Tempo subscription's key authorization carries no witness, or a receipt holds no `KeyAuthorizationWitness` log (for `witnessRecover`, or naming H for `keyAccount`). | | `tempo/not-found` | The reader found no receipt for the transaction, or the transaction hash is not a 32-byte hash. | | `tempo/open-ambiguous` | The signed Tempo session opening has more than one `open` call to the challenge's escrow contract. | | `tempo/open-not-found` | The signed Tempo session opening has no `open` call to the challenge's escrow contract. | | `tempo/reverted` | The Tempo transaction reverted. | | `tempo/salt-not-bound` | The salt word of the Tempo session opening's `open` call is not H. | | `tempo/tx-malformed` | A Tempo transaction does not decode as a type-`0x76` RLP envelope with the expected fields and at most the allowed calls, `memoCalldata` is given an invalid recipient, amount or memo, `expiringNonceHash` is given a sender that is not an address, or a Tempo session opening's `open` call input has the wrong length. | | `tempo/tx-too-large` | A Tempo transaction's wire bytes exceed the size bound. | | `tempo/unreadable` | The Tempo reader is missing, answers for another network or threw, the receipt or its logs are not well formed, or `keyAccount` is given an invalid H, key id or receipt, or finds a keychain log whose account topic is not a padded address. | | `tempo/witness-not-bound` | The Tempo subscription's key authorization witness is not the hash the echoed challenge's id derives from. | ## svm Solana (`@integraledger/lcp/svm` and the Solana pairings). | Code | Meaning | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `svm/bundle-empty` | An MPP Solana `bundle` credential's `transactions` is empty. | | `svm/carrier-mismatch` | The option's `extra.memo` or the challenge's `externalId` is not H's LCP string when `build` is called, or the memo in the presented Solana transaction is not the option's `extra.memo` or the challenge's `externalId`. | | `svm/carrier-occupied` | `advertise` finds the option's `extra.memo`, or the MPP Solana challenge's `externalId`, already holding a value other than H's LCP string. | | `svm/channel-id-mismatch` | In the SVM batch pairing, the voucher's `channelId` or the channel instruction's channel account is not the channel PDA derived from the payment's config. | | `svm/channel-instruction` | The Solana transaction has more than one payment-channels instruction, or its one instruction has an unknown discriminator or the wrong accounts. | | `svm/channel-mismatch` | The MPP Solana session opening's `channelId` is not the channel account its `open` instruction opens. | | `svm/err` | The landed Solana transaction failed with an error. | | `svm/input-malformed` | The buyer's input to a Solana `build`, `complete` or message helper is not valid: a payer, key or blockhash that is not a base58 key, a token program other than the option's, an out-of-range amount, slot or compute budget, a signature that is not 64 bytes or not for a required signer, a session challenge with malformed Solana details, or MPP `splits` or `confidential` transfers, which are not built. | | `svm/memo-count` | The Solana transaction has no top-level Memo instruction or more than one (x402), or more than one Memo instruction carrying an LCP string (MPP). | | `svm/memo-not-lcp` | The Solana transaction's one Memo instruction does not carry an ATR hash in LCP string form. | | `svm/memo-not-utf8` | The Solana transaction's one Memo instruction's data is not UTF-8. | | `svm/network-malformed` | A Solana network is not `mainnet`, `devnet` or `localnet` in an MPP challenge, or not a Solana CAIP-2 name in an x402 option. | | `svm/network-undeclared` | The MPP Solana challenge names `localnet`, which has no CAIP-2 network to read on. | | `svm/no-carrier` | The Solana transaction presented for an MPP charge has no Memo instruction carrying an ATR hash in LCP string form. | | `svm/no-channel-instruction` | The Solana transaction has no top-level payment-channels instruction. | | `svm/not-found` | The Solana reader found no landed transaction for the signature. | | `svm/open-not-found` | The MPP Solana session transaction has no single `open` instruction of the challenge's channel program with the required data and accounts, or the program key is invalid. | | `svm/pda-not-found` | `findPda` is given an invalid program key or too many or too long seeds, or no bump yields an off-curve address. | | `svm/peer-missing` | The optional peer dependency `@solana/kit` cannot be loaded to build a Solana message. | | `svm/proof-not-challenge` | The MPP Solana session credential's `authentication.challengeId` is not the echoed challenge's id, or a `use` credential carries no such proof. | | `svm/read-first` | An MPP Solana `signature` credential carries no transaction yet; the seller reads it with `fetchPresented` before `bound`. | | `svm/tx-malformed` | A Solana transaction is not non-empty base64 of a well-formed unversioned or v0 wire transaction (signature count, header, keys, instructions and lookup tables consistent and fully consumed), or an MPP `bundle` credential's `transactions` is not an array within the bound. | | `svm/tx-too-large` | A Solana transaction, or its base64 text, exceeds the wire size bound. | | `svm/unreadable` | The Solana reader threw or returned a landed transaction that is not well formed. | | `svm/wrong-reader` | The Solana reader answers for a different network than the reference or challenge names. | ## stellar Stellar (`@integraledger/lcp/stellar` and the Stellar pairings). | Code | Meaning | | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `stellar/carrier-mismatch` | The option's `payTo` or the challenge's `recipient` does not carry the muxed id derived from H, or the signed transfer's recipient or muxed id is not the one the option or challenge names. | | `stellar/carrier-occupied` | `advertise` finds the x402 option's `payTo` not a plain account, or the MPP challenge's `recipient` already muxed. | | `stellar/event-malformed` | `transferEventOf` is given topics or data that do not decode as a SEP-41 `transfer` event with an address recipient within the value caps. | | `stellar/network-malformed` | A Stellar network is not `stellar:pubnet` or `stellar:testnet`. | | `stellar/no-address-auth` | The Stellar operation does not carry exactly one address-credential authorization entry for the transfer's `from`, or the payer is not an Ed25519 account. | | `stellar/no-carrier` | The signed Stellar transfer's recipient is not a muxed address, so it carries no muxed id. | | `stellar/not-found` | The Stellar reader found no transaction envelope for the hash. | | `stellar/not-one-transfer` | The Stellar envelope does not hold exactly one `invokeHostFunction` operation calling a SEP-41 `transfer(from, to, amount)`, the payer's signed root invocation is not one such transfer with no sub-invocations, or the operation does not invoke exactly what the payer signed. | | `stellar/option-malformed` | An MPP Stellar challenge's `network`, `amount`, `currency`, `recipient` or `feePayer` is not of the required form, a recipient cannot take a muxed id, or `transferEventTopics` is given an address that is neither an account nor a contract. | | `stellar/peer-missing` | The optional peer dependency `@stellar/stellar-sdk` cannot be loaded. | | `stellar/read-first` | An MPP Stellar `hash` credential carries no transaction yet; the seller reads it with `fetchPresented` before `bound`. | | `stellar/tx-malformed` | A Stellar transaction envelope is not strict base64 of a v1 envelope XDR within the value caps, the signing inputs (current ledger, time, expiration, signature, envelope type) are invalid, or a credential or buyer choice carries no transaction where one is required. | | `stellar/tx-too-large` | A Stellar transaction envelope's base64 text exceeds the size bound. | | `stellar/unreadable` | The Stellar reader threw or returned a response that is not an object. | | `stellar/wrong-reader` | The Stellar reader answers for a different network than the challenge names. | ## xrpl The XRP Ledger (`@integraledger/lcp/xrpl` and the XRPL pairings). | Code | Meaning | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `xrpl/blob-malformed` | An XRPL signed blob is not a string of hex, does not decode within the field caps, is not the canonical serialization of what it decodes to, lacks `TransactionType` or `Account`, or a credential or `complete` call carries no string blob. | | `xrpl/blob-too-large` | An XRPL signed blob exceeds 4 KiB. | | `xrpl/carrier-mismatch` | The option's `extra.invoiceId` or the challenge's `invoiceId` is not the one derived from H when `build` is called, or the signed `Payment`'s `InvoiceID` is not the one the option or challenge names. | | `xrpl/carrier-not-lcp` | The x402 XRPL option's `extra.invoiceId` is not an ATR hash in LCP string form. | | `xrpl/carrier-occupied` | `advertise` finds the option's `extra.invoiceId`, or the MPP challenge's `invoiceId`, already holding a value other than the one derived from H. | | `xrpl/currency-not-xrp` | An MPP XRPL session challenge names a `currency` other than `XRP`. | | `xrpl/memo-count` | The XRPL session opening carries more than 8 memos, or more than one memo carrying an LCP string. | | `xrpl/memos-not-carried` | The MPP XRPL charge `build` refuses a challenge whose `methodDetails` carries `memos`. | | `xrpl/network-malformed` | The MPP XRPL challenge's `methodDetails.network` is not one of the XRPL network names this package maps. | | `xrpl/network-missing` | The MPP XRPL challenge's `methodDetails` names no `network`, which has no default. | | `xrpl/no-invoice-id` | The XRPL `Payment` carries no `InvoiceID`, or the validated transaction a recovery reads has no 256-bit `InvoiceID`. | | `xrpl/no-memo` | The XRPL session opening carries no memo whose `MemoData` is an ATR hash in LCP string form. | | `xrpl/not-channel-create` | The XRPL session opening or the transaction a recovery reads is not a `PaymentChannelCreate`, or `xrplChannelId` or `xrplClaim` is given a malformed address, sequence, channel id or amount. | | `xrpl/not-found` | The XRPL reader found no transaction for the reference. | | `xrpl/not-payment` | The XRPL signed blob presented for a charge is not a `Payment`. | | `xrpl/not-success` | The validated XRPL transaction is not a `Payment` with result `tesSUCCESS`. | | `xrpl/not-validated` | The XRPL transaction the reference names is not in a validated ledger. | | `xrpl/peer-missing` | The optional peer dependency `ripple-binary-codec` cannot be loaded to decode a blob. | | `xrpl/read-first` | An MPP XRPL `hash` credential carries no blob yet; the seller reads it by hash before `bound`. | | `xrpl/unreadable` | The XRPL reader threw or returned a response that is not well formed. | | `xrpl/wrong-reader` | The XRPL reader answers for a different network than the reference or challenge names. | ## hedera Hedera (`@integraledger/lcp/hedera`). | Code | Meaning | | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `hedera/chain-id-unnamed` | An MPP Hedera `chainId` is not 295 or 296, or a charge request names no `chainId` and no default network is given. | | `hedera/channel-id-mismatch` | The channel id recomputed from the Hedera `ChannelOpened` log is not the `channelId` the credential names. | | `hedera/channel-log-not-found` | The Hedera session opening's landed logs hold no single `ChannelOpened` log from the escrow naming the channel with readable parties, or the reference names no binding log. | | `hedera/deprecated-fields` | A Hedera `Transaction` uses the deprecated fields 1 to 4 instead of `signedTransactionBytes`. | | `hedera/executor-malformed` | The transfer-executor payload given to `complete` or presented is not an object with entity `payer` and `executor` and a hex `authorization` within the bound. | | `hedera/executor-not-offered` | The transfer-executor payload names an `executor` the option does not list. | | `hedera/list-inconsistent` | The bodies of a Hedera `TransactionList` do not all share one transaction id and memo. | | `hedera/memo-not-lcp` | The Hedera memo is not UTF-8 carrying an ATR hash in LCP string form. | | `hedera/network-malformed` | The network written by `fetchPresented` for an MPP Hedera charge is not a Hedera network. | | `hedera/no-legal-context` | The transfer-executor pairing's `bound` finds no decodable `extensions.legalContext.info` echoed in the payment. | | `hedera/no-memo` | The signed Hedera body, or the landed transaction a recovery reads, has an empty memo. | | `hedera/not-found` | The Hedera reader found no transaction, or no successful entry for it, or no receipt for the session transaction. | | `hedera/option-malformed` | A Hedera option names an unknown transfer method or lacks what its pairing needs (a servable amount, asset and `payTo`, a `feePayer`, or 1 to the allowed number of `executors`), the buyer's choice carries an invalid payer, node, valid start, fee or decimals, or an MPP Hedera charge request has an invalid amount, currency, recipient or splits (too many, not less than the amount, or repeating an account). | | `hedera/read-first` | An MPP Hedera `hash` charge credential or session opening carries no landed data yet; the seller reads it with `fetchPresented` before `bound`. | | `hedera/reverted` | The Hedera session opening transaction reverted. | | `hedera/tx-malformed` | A Hedera transaction is not base64 of a wire `Transaction` or `TransactionList` whose signed body decodes within the depth bound, a signature pair given to `complete` has the wrong key or signature length, or a push credential's `transactionId` is not `shard.realm.num@seconds.nanos`. | | `hedera/tx-too-large` | A Hedera transaction's wire bytes exceed the size bound. | | `hedera/unreadable` | The Hedera reader failed or returned a response that is not well formed, or (for a session) answers for a different network. | | `hedera/wrong-reader` | The Hedera reader is missing or answers for a different network than the reference or request names. | ## avm Algorand (`@integraledger/lcp/avm`). | Code | Meaning | | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `avm/group-too-large` | The Algorand payment group is empty or larger than the group bound. | | `avm/index-out-of-range` | The Algorand `paymentIndex` does not name a transaction in the payment group. | | `avm/network-malformed` | An Algorand option's network starts with `algorand:` but does not name a genesis hash in CAIP-2 form. | | `avm/network-mismatch` | The suggested parameters' genesis hash given to `build` is not 32 bytes or is not the network the option names. | | `avm/not-axfer` | The Algorand payment transaction is not an asset transfer. | | `avm/not-found` | The Algorand reader found no transaction for the id. | | `avm/note-not-lcp` | The Algorand transaction's note is not UTF-8 carrying an ATR hash in LCP string form. | | `avm/option-malformed` | An Algorand option's `extra` is not an object or names a transfer method or flow this pairing does not pay, its asset, `payTo`, fee payer, amount or timeout is invalid, or the buyer's payer or suggested parameters given to `build` are invalid (or `algosdk` is not loaded). | | `avm/signature-malformed` | The signature given to the Algorand `complete` is not 64 bytes. | | `avm/txn-malformed` | The Algorand payload has no `paymentGroup` array, the payment entry is not base64 msgpack within the caps that decodes as a signed transaction, its note exceeds the bound, or `algosdk` is not loaded. | | `avm/unreadable` | The Algorand reader threw or returned an answer that is not well formed. | | `avm/wrong-reader` | The Algorand reader is missing or answers for a different network than the reference names. | ## aptos Aptos (`@integraledger/lcp/aptos`). | Code | Meaning | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `aptos/chain-mismatch` | The presented Aptos transaction's chain id is not the chain of the option's network. | | `aptos/network-malformed` | An Aptos option's network starts with `aptos:` but names no known chain. | | `aptos/not-an-x402-transfer` | The Aptos transaction, or the committed transaction a reader returns, is not a call to the framework `primary_fungible_store::transfer` or `fungible_asset::transfer` with one struct type argument and three arguments (two addresses and a u64 amount). | | `aptos/not-entry-function` | The Aptos transaction's payload is not an entry function call. | | `aptos/tx-malformed` | `decodeAptosTx` is given text that is not base64 of an Aptos `RawTransaction` prefix (in BCS or x402's reference JSON form) that reads to the end of its fields. | | `aptos/tx-too-large` | `decodeAptosTx` is given a transaction larger than the size bound. | ## cardano Cardano (`@integraledger/lcp/cardano`). | Code | Meaning | | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `cardano/ambiguous` | The Cardano auxiliary data's label 674 `msg` lines carry more than one ATR hash. | | `cardano/aux-hash-mismatch` | The Blake2b-256 of the Cardano transaction's auxiliary data is not the hash in its body. | | `cardano/aux-missing` | The Cardano transaction's body has no auxiliary data hash (key 7), or it carries no auxiliary data. | | `cardano/hash-not-carried` | The Cardano auxiliary data's label 674 `msg` lines carry no LCP marker followed by an ATR hash. | | `cardano/network-malformed` | A Cardano option's network starts with `cardano:` or `cip34:` but is not one this package maps. | | `cardano/not-found` | The Cardano reader found no transaction for the id. | | `cardano/not-valid` | The Cardano transaction the reference names is on chain as invalid (its collateral was taken). | | `cardano/ttl-missing` | The Cardano transaction sets no TTL, so `reference` has no slot by which it settles. | | `cardano/tx-malformed` | A Cardano transaction is not base64 of one CBOR array `[body, witness set, validity, auxiliary data]` with a map body of unique unsigned keys, a valid TTL and a 32-byte auxiliary data hash. | | `cardano/tx-too-large` | `decodeCardanoTx` is given a transaction larger than the size bound. | | `cardano/unreadable` | The Cardano reader threw or returned a transaction that is not well formed, too large, or not the one the reference names. | | `cardano/wrong-reader` | The Cardano reader answers for a different network than the reference names. | ## casper Casper (`@integraledger/lcp/casper`). | Code | Meaning | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `casper/address-malformed` | A Casper `from` or `to` address, or the payer given to `build`, is not a valid Casper account or package address. | | `casper/amount-malformed` | A Casper amount is not a uint256. | | `casper/key-tag-mismatch` | The public key and signature given to the Casper `complete` carry different algorithm tags. | | `casper/network-malformed` | A Casper network given to `cep3009TypedData` is not a Casper CAIP-2 name. | | `casper/no-authorization-call` | The executed Casper transaction holds no authorization call on the asset carrying a nonce. | | `casper/not-executed` | The Casper transaction the reference names has not executed. | | `casper/not-found` | The Casper reader found no transaction for the reference. | | `casper/option-malformed` | A Casper asset is not a contract package hash, the token name or version is not a valid name, `validBefore` is out of range, or the `now` given to `build` is not a non-negative safe integer. | | `casper/payload-malformed` | The presented Casper payment is not x402 version 2 for a Casper option with a string CEP-3009 authorization (hex nonce), a tagged public key and signature, or its value or `validBefore` cannot be read, or H given to `cep3009TypedData` is not a valid ATR hash. | | `casper/reverted` | The Casper transaction executed with an error. | | `casper/signature-malformed` | The public key or signature given to the Casper `complete` is not tagged hex of the allowed length. | | `casper/unreadable` | The Casper reader threw or returned a call that is not well formed. | | `casper/wrong-reader` | The Casper reader answers for a different network than the reference names. | ## ccd Concordium (`@integraledger/lcp/ccd`). | Code | Meaning | | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ccd/address-malformed` | A Concordium account address is missing, is not base58check of the account form, or its bytes are not 32 long. | | `ccd/memo-not-cbor-text` | The Concordium memo is not exactly one CBOR text string within the memo bound. | | `ccd/memo-not-lcp` | The Concordium memo's text is not an ATR hash in LCP string form under the preferred encoding, or H given to `build` is not a valid ATR hash. | | `ccd/no-carrier` | The finalized Concordium block item does not hold exactly one transfer with a memo, or that memo carries no ATR hash. | | `ccd/no-memo` | The Concordium transaction is a plain `transfer` with no memo, or its PLT transfer operation has no memo. | | `ccd/not-finalized` | The Concordium block item is not finalized. | | `ccd/not-found` | The Concordium reader found no block item for the reference. | | `ccd/not-v1` | The Concordium signed transaction's `version` is not 1. | | `ccd/operation-count` | The Concordium PLT operations are not exactly one `transfer` operation. | | `ccd/operations-malformed` | The Concordium PLT operations are not a CBOR list whose transfer carries a byte-string memo, a tagged 32-byte recipient account and a decimal-fraction amount. | | `ccd/option-malformed` | The `now` given to the Concordium `build` is not a non-negative safe integer. | | `ccd/payload-kind` | The Concordium transaction's payload is neither `transferWithMemo` nor a PLT `tokenUpdate`. | | `ccd/rejected` | The Concordium block item was rejected. | | `ccd/too-large` | The Concordium signed transaction, its memo or its token operations exceed the size bound. | | `ccd/transaction-malformed` | The presented Concordium signed transaction is not an object with a header and payload, a valid expiry, a decimal amount below 2^64 and hex memo or operations of the stated length, or an amount given to `ccdIdDigest` is out of range, or the value given to `complete` is not an object. | | `ccd/unreadable` | The Concordium reader threw or returned a block item that is not well formed. | | `ccd/wrong-reader` | The Concordium reader answers for a different network than the reference names. | ## near NEAR (`@integraledger/lcp/near`). | Code | Meaning | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `near/actions` | The NEAR delegate action does not hold exactly one action. | | `near/args-malformed` | The `ft_transfer` arguments are over the size bound, not UTF-8 JSON, or not an object, or the arguments a recovery reads are not base64. | | `near/carrier-occupied` | `advertise` for the NEAR Intents charge finds the challenge's `externalId` already holding a value other than H's LCP string. | | `near/memo-missing` | The `ft_transfer` arguments carry no string `memo`. | | `near/memo-not-lcp` | The `ft_transfer` `memo`, or the NEAR Intents challenge's `externalId`, is not an ATR hash in LCP string form. | | `near/network-malformed` | A NEAR option's network starts with `near:` but is not `near:mainnet` or `near:testnet`. | | `near/no-relayer` | The NEAR reader lists no relayer to ask for the transaction status. | | `near/not-found` | No relayer the NEAR reader lists knows the transaction, or its outcome carries no delegate action. | | `near/not-ft-transfer` | The NEAR delegate action's one action is not a function call to `ft_transfer`. | | `near/not-hash-credential` | The NEAR Intents charge credential's payload `type` is not `hash`. | | `near/option-malformed` | A NEAR option's `extra` is not an object, or its `asset`, `payTo`, `amount` or `maxTimeoutSeconds` is not a valid account, u128 amount or positive timeout. | | `near/peer-missing` | The optional peer dependencies `@near-js/crypto`, `@near-js/transactions` and `borsh` cannot be loaded. | | `near/sda-malformed` | The NEAR signed delegate action is not non-empty base64 of a canonical Borsh `SignedDelegate`, or its public key cannot be read. | | `near/sda-too-large` | The NEAR signed delegate action's base64 text exceeds the size bound. | | `near/unreadable` | The NEAR reader threw or returned an outcome that is not well formed. | | `near/wrong-reader` | The NEAR reader answers for a different network than the reference names. | ## polkadot Polkadot Asset Hub (`@integraledger/lcp/polkadot`). | Code | Meaning | | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `polkadot/address-malformed` | A Polkadot address is not an SS58 string of at most 64 characters that decodes to 35 bytes with a simple prefix and a valid checksum. | | `polkadot/address-not-id` | The Polkadot extrinsic's signer is not a `MultiAddress::Id` of 32 bytes. | | `polkadot/call-not-profile` | The Polkadot call is not exactly the profile's `batchAll` of `transferKeepAlive` then `remarkWithEvent` with a remark of the fixed length, or the presented `call` is not lowercase hex, or the recovered extrinsic does not end with that remark. | | `polkadot/call-not-suffix` | The signed Polkadot extrinsic does not end with the profile call, after its signature. | | `polkadot/extrinsic-malformed` | A Polkadot extrinsic is not lowercase hex within the bound whose compact length prefix matches its length, or the raw extrinsic a recovery reads is not hex within the bound. | | `polkadot/extrinsic-too-large` | A Polkadot extrinsic exceeds the size bound. | | `polkadot/hash-mismatch` | The chain's record of the Polkadot extrinsic has a hash other than that of the raw bytes read. | | `polkadot/network-unsupported` | A Polkadot option's network starts with `polkadot:` but is not one this package supports. | | `polkadot/no-remark` | The Polkadot extrinsic did not dispatch successfully with a `Remarked` event for its remark. | | `polkadot/not-found` | The Polkadot reader found no block, no extrinsic at the index, or no record of the extrinsic. | | `polkadot/not-signed-v4` | The Polkadot extrinsic is not a signed version 4 extrinsic. | | `polkadot/option-malformed` | A Polkadot option does not name the `lcp-assets-remark` transfer method, names another flow, or has an invalid asset id, amount or timeout (1 to 3600 seconds), or the choice given to `build` is not an object. | | `polkadot/range` | `polkadotLocate` is given a block range that is not non-negative bigints in order spanning at most 256 blocks. | | `polkadot/remark-not-lcp` | The Polkadot remark is not UTF-8 carrying an ATR hash in LCP string form. | | `polkadot/signature-malformed` | The Polkadot extrinsic's `MultiSignature` has an unknown variant or runs past the end. | | `polkadot/transaction-malformed` | `polkadotRecover` is given a transaction reference that is not a `-` timepoint. | | `polkadot/unreadable` | The Polkadot reader threw or returned block extrinsics that are not an array. | | `polkadot/wrong-reader` | The Polkadot reader is missing or answers for a different network than the reference names. | ## starknet Starknet (`@integraledger/lcp/starknet`). | Code | Meaning | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `starknet/ambiguous` | The Starknet transaction holds matching transfers with more than one nonce. | | `starknet/caller-forbidden` | The Starknet option's fee payer is zero or the any-caller value, or the paying account is the fee payer itself. | | `starknet/felt-malformed` | A Starknet fee payer, asset, `payTo`, nonce, payer account or `from` is not a valid felt. | | `starknet/network-malformed` | A Starknet network is not one of the Starknet networks this package supports. | | `starknet/no-legal-context` | The Starknet payment echoes no decodable `extensions.legalContext.info`. | | `starknet/nonce-not-bound` | The Starknet signed `Nonce` is not the low 250 bits of the echoed hash. | | `starknet/not-found` | The Starknet reader found no receipt, or no transfer matching the reference in it. | | `starknet/option-malformed` | A Starknet option has no `extra` object, or its amount is not a u256 or its timeout is not positive, or the buyer's choice given to `build` is not an object or has an invalid `now`, or an amount or deadline given to a typed-data helper is out of range. | | `starknet/reverted` | The Starknet transaction the reference names reverted. | | `starknet/signature-malformed` | The signature given to the Starknet `complete` is not 1 to the allowed number of valid felts. | | `starknet/typed-data-malformed` | The presented Starknet `outsideExecution.typedData` is not an `OutsideExecution` under domain `Account.execute_from_outside` version 2 revision 1 on the option's chain with a felt `Nonce`, exceeds the bound, or lacks one transfer call's calldata and a decimal `Execute Before`. | | `starknet/unreadable` | The Starknet reader threw or returned a receipt or events that are not well formed. | | `starknet/wrong-reader` | The Starknet reader answers for a different network than the reference names. | ## sui Sui (`@integraledger/lcp/sui`). | Code | Meaning | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `sui/aborted` | The Sui transaction the reference names executed with status `FAILURE`. | | `sui/ambiguous` | The Sui transaction has more than one unused `Pure` input. | | `sui/expiration-unbounded` | The Sui transaction sets no maximum epoch, so `reference` has no time by which it settles. | | `sui/hash-not-carried` | The Sui transaction has no unused `Pure` input, or its one unused `Pure` input is not 32 bytes. | | `sui/network-malformed` | A Sui option's network starts with `sui:` but is not `sui:mainnet`, `sui:testnet` or `sui:devnet`. | | `sui/not-found` | The Sui reader found no transaction for the digest. | | `sui/not-programmable` | The Sui transaction is not `TransactionData` V1 with a programmable transaction kind. | | `sui/peer-missing` | The optional peer dependency `@mysten/sui` cannot be loaded. | | `sui/tx-malformed` | `decodeSuiTx` is given text that is not base64 of a canonical BCS `TransactionData`, or a `Pure` input that is not valid base64 within the bound. | | `sui/tx-too-large` | `decodeSuiTx` is given a transaction larger than the size bound. | | `sui/unreadable` | The Sui reader failed, or returned a transaction whose digest is not the reference's or that does not decode. | | `sui/wrong-reader` | The Sui reader answers for a different network than the reference names. | ## tron Tron (`@integraledger/lcp/tron`). | Code | Meaning | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tron/address-malformed` | A TRON address is not a base58check address of 34 characters starting with byte `0x41`. | | `tron/contracts` | The TRON raw data does not hold exactly one contract. | | `tron/fee-limit` | The fee limit given to the TRON `build` is not a bigint from 1 to the maximum. | | `tron/memo-not-lcp` | The TRON transaction's memo is not an ATR hash in LCP string form. | | `tron/network-malformed` | A TRON option's network is not `tron:` followed by a chain number. | | `tron/not-found` | The TRON reader found no transaction for the id. | | `tron/not-transfer` | The TRON contract's call data is not a TRC-20 `transfer`. | | `tron/not-trigger` | The TRON contract is not a `TriggerSmartContract`. | | `tron/option-malformed` | A TRON option's amount is not a uint256 or its `maxTimeoutSeconds` is outside 1 to the allowed maximum. | | `tron/raw-not-canonical` | The TRON raw data does not re-encode to the bytes received. | | `tron/signature-malformed` | A TRON transaction carries no signature, too many, or one that is not 65 bytes, or the signature given to `complete` is not 65 bytes with a recovery byte of 0, 1, 27 or 28. | | `tron/tx-malformed` | A TRON transaction is not lowercase hex of a protobuf `Transaction` whose raw data decodes with in-range fields, the raw bytes a recovery reads do not hash to the transaction id, or the reference block or time given to `build` is invalid. | | `tron/tx-too-large` | A TRON transaction's hex exceeds the size bound. | | `tron/unreadable` | The TRON reader threw or returned a transaction whose raw data is not hex within the bound. | | `tron/wrong-reader` | The TRON reader answers for a different network than the reference names. | ## tvm TON (`@integraledger/lcp/tvm`). | Code | Meaning | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tvm/actions` | The W5 request's action list is not exactly one `send_msg` action with no extended actions. | | `tvm/boc-malformed` | A TON bag of cells is not non-empty base64 that parses to exactly one root with no exotic cells, or the settlement message is not an internal message or its action list is exotic. | | `tvm/boc-too-large` | A TON bag of cells exceeds the byte, depth or cell-count bound. | | `tvm/carrier-mismatch` | The option's `extra.forwardPayload` is not H's comment when `build` is called, or the presented Jetton transfer's forward payload is not the option's. | | `tvm/carrier-occupied` | `advertise` finds the option's `extra.forwardPayload` already holding a payload other than H's comment. | | `tvm/network-malformed` | A TON option's network is not `tvm:` followed by a workchain number. | | `tvm/not-found` | The TON reader found no transaction for the reference. | | `tvm/not-jetton-transfer` | The W5 request's outgoing message is not an internal message whose body is a Jetton `transfer`. | | `tvm/not-w5-signed` | The TON settlement message body is not a W5 `internal_signed` request with a trailing signature and no further references. | | `tvm/option-malformed` | A TON option's `extra` is not an object, or its asset, `payTo`, response destination, forward TON amount, amount or timeout is invalid, or it does not set `areFeesSponsored` to `true`. | | `tvm/payload-not-lcp` | The Jetton transfer carries no forward payload, or its forward payload is not a comment carrying an ATR hash in LCP string form. | | `tvm/peer-missing` | The optional peer dependency `@ton/core` cannot be loaded. | | `tvm/unreadable` | The TON reader threw or returned a transaction that is not well formed or has no inbound body. | | `tvm/value-too-low` | The TON attached to the Jetton transfer is not more than the option's forward TON amount. | | `tvm/wrong-reader` | The TON reader answers for a different network than the reference names. | ## ln Lightning: BOLT11 invoices and the Lightning pairings (`@integraledger/lcp/lightning`). | Code | Meaning | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ln/currency-network` | The invoice's currency is not the one the option's or challenge's network names, or the MPP challenge names a network MPP Lightning does not define. | | `ln/description-inline` | The MPP challenge's invoice carries an inline `d` description. | | `ln/description-present` | The MPP Lightning challenge's request carries a `description`. | | `ln/expires-after-invoice` | The MPP challenge's `expires` is later than the invoice's own expiry. | | `ln/field-length` | The invoice's `h` or `m` field is not 32 bytes. | | `ln/field-repeated` | The invoice carries more than one `h` field or more than one `m` field. | | `ln/invoice-malformed` | A BOLT11 invoice is missing or not a string, mixes case, or does not decode (bech32 checksum, prefix, field lengths, exactly one payment hash, expiry width). | | `ln/invoice-not-named` | The invoice-named pairing's `build` finds that the ATR's `x402` slot does not name the option's invoice. | | `ln/invoice-too-large` | A BOLT11 invoice exceeds 8 KiB or carries more tagged fields than the bound. | | `ln/no-description-hash` | The invoice has no `h` (description hash) field. | | `ln/no-legal-context` | The invoice-named pairing's `bound` finds no decodable `extensions.legalContext.info` echoed in the payment. | | `ln/no-metadata` | The invoice for `x402/exact/lnbtc` has no `m` (metadata) field, or its `m` is not H. | | `ln/no-payment-in-action` | The MPP Lightning session credential whose payment is being bound is not the `open` action, the only one that pays the invoice. | | `ln/not-this-pairing` | An invoice for the invoice-named pairing carries an `m` field, which belongs to `x402/exact/lnbtc`. | | `ln/payment-hash-mismatch` | The invoice's payment hash is not the challenge's `paymentHash`. | | `ln/payment-hash-required` | An MPP Lightning challenge carries no payment hash of 64 lowercase hex digits (in `methodDetails.paymentHash` for charge, `paymentHash` for session). | | `ln/preimage-malformed` | The preimage given to `complete` is not 64 lowercase hex digits. | | `ln/request-hash-mismatch` | The option's `extra.requestHash` is not 64 hex digits, or the invoice's description hash is not that request hash. | | `ln/return-invoice-malformed` | The MPP Lightning session `build` is given a return invoice that is not an amountless BOLT11 invoice. | ## stacks Stacks (`@integraledger/lcp/stacks`). | Code | Meaning | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `stacks/no-memo` | The Stacks transaction is not a call to the reference's contract `transfer`, or its fourth argument is not `(some <32 bytes>)`. | | `stacks/not-found` | The reference's transaction id is not a 32-byte hash, or the Stacks reader found no mined transaction for it. | | `stacks/not-success` | The mined Stacks transaction's status is not `success`. | | `stacks/peer-missing` | The optional peer dependency `@stacks/transactions` cannot be loaded. | | `stacks/unreadable` | The reference or reader is not an object, or the Stacks reader threw. | | `stacks/wrong-reader` | The Stacks reader answers for a different network than the reference names. | --- # Vector files > Every vector file @integraledger/lcp ships, and what it fixes. Source: https://lcp.integraledger.com/reference/vectors This page is generated from the package by `node scripts/docs-reference.mjs`, and CI checks that it matches. The package ships 63 vector files in `vectors/`. Each file's `about` states what it covers and where its expected values come from; it is quoted here as it is. The [Vectors](https://lcp.integraledger.com/concepts/vectors) page explains how to run them. | File | About | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`a2a-legal-context.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/a2a-legal-context.json) | Vectors for the a2a entry point of @integraledger/lcp, the LCP A2A extension. Every expected value is fixed by the extension and its URI list, with H and L as in ack-payment-request.json. A value \{"$repeat": \[s, n]} in args stands for the string s repeated n times. | | [`ack-payment-request.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/ack-payment-request.json) | Vectors for the ack/payment-request pairing: the ack entry point of @integraledger/lcp. Every expected value is fixed by the pairing, with H, L and the JWS conventions of card.json: H = SHA-256("abc") (FIPS 180-2), L = [https://atr.seller.example/](https://atr.seller.example/), and each token base64url(JSON(header)).base64url(JSON(payload)).base64url(r\|\|s), JSON compact with members in the order written. T and the plant's token were built from that recipe with GNU coreutils basenc; their ES256 signatures verify over those signing inputs (cryptography 41.0.7). read verifies no signature. A token whose third segment is c2ln carries no signature at all. | | [`acp-checkout.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/acp-checkout.json) | Vectors for the acp/checkout/delegated and acp/checkout/undelegated pairings: the acp entry point of @integraledger/lcp. Every expected value is fixed by the pairing. A is a 287-byte ATR, H = SHA-256(A) (GNU coreutils sha256sum and openssl dgst -sha256 agree), L = [https://atr.seller.example/](https://atr.seller.example/), S0 a checkout session, and otherH ucp.json's H. A value \{"$repeat": \[s, n]} in args stands for the string s repeated n times. | | [`ap2-checkout-mandate.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/ap2-checkout-mandate.json) | Vectors for the ap2/checkout-mandate pairing and the SD-JWT reader it uses (the ap2 entry point of @integraledger/lcp). SHA-256 values were computed with GNU coreutils 9.4 sha256sum and basenc and agree with OpenSSL 3.0.13. The tests build J, D and M from the fixed strings; 'built' holds the same strings as written by Python 3's base64 and hashlib, for other languages. V6's token is AP2's published closed Checkout Mandate, docs/ap2/checkout\_mandate.md line 328 at commit e1ea56db of google-agentic-commerce/AP2, pinned by its SHA-256. The 'implementation' rows fix refusals that neither AP2 nor RFC 9901 names, and reader cases from RFC 9901 sections 4 and 7.1; their tokens were built with Python 3's base64 and hashlib. | | [`buyer.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/buyer.json) | The buyer gate's rows for the x402/exact/eip155/eip3009 pairing. A is a 138-byte ATR that the gate never parses; C is A with byte 124 changed from 0x30 to 0x31; D is the V5 document of x402-exact-eip155-eip3009.json advertising hash(A). The payer is the published Anvil key, account eip155:84532:0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, and now is 1790000000. SHA-256 values were computed with GNU coreutils sha256sum and agree with openssl dgst -sha256; B6's digest and signature with viem 2.56.7 and eth-account 0.14.0. Bodies are hex. A row whose input names a stub describes the stub's behaviour. | | [`card.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/card.json) | Vectors for the card entry point of @integraledger/lcp: Visa TAP, Mastercard Verifiable Intent and the plain card checkout. H is SHA-256("abc") from FIPS 180-2 and E is SHA-256 of the empty string. The TAP signatures are RFC 9421 Ed25519 under RFC 9421's test-key-ed25519. The VI strings are built from a recipe (compact JSON, members in the order written) with fixed ES256 signatures, which verify under USER (L2i, L2a) and AGENT (L3b); every digest was checked with Python 3.12.3 hashlib. | | [`core-vectors.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/core-vectors.json) | Core vectors for assemble, hash and hashEquals. Expected values were computed 2026-09-25 with sha256sum, openssl dgst -sha256, Python 3 json and Node v24.21.0 JSON.stringify. Content bytes are given as hex so that they are exact. | | [`decoder-caps.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/decoder-caps.json) | Decoder caps. XRPL: STObject and STArray fields nest at most 64 levels inside a transaction (an object or array field one level below its container, an array's member object one level below the array), and a blob holds at most 2048 fields and array members; the blobs were written by ripple-binary-codec 2.11.0's encode, each a Payment whose depth is by construction. msgpack: arrays and maps nest at most 32 levels, the outermost container being level 1, every declared length is at most the bytes left, and the bytes are exactly one value; each row is hand-written from the msgpack specification's formats. ScVal: vectors and maps nest at most 64 levels within one ScVal, the outermost container being level 1, and one envelope or ScVal holds at most 1536 vector elements and map entries; each ScVal is hand-written XDR (RFC 4506). Authorized invocations nest at most 64 levels, the root invocation being level 1. The envelopes are x402-exact-stellar.json V2's signed envelope with a second authorization entry, under the source account's credentials, added by @stellar/stellar-sdk 17.1.0's XDR types. 'accept' says whether the caps admit the input. | | [`discovery.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/discovery.json) | The discovery document (LCP §2): what emit writes and what parse reads or refuses. 'bytes' is UTF-8 text; 'bytesHex' is used where the bytes are not valid UTF-8 text. The LCP §2.7 examples are cut from LCP §2.7 byte for byte. Expected emitted bytes were written by Python's json.dumps with separators (',', ':') over members in LCP §2.4-§2.5's table order; digests with hashlib.sha256, agreeing with GNU coreutils sha256sum 9.4. The ETag is '"' + the digest's hex + '"'. 'inputRepeat' sets that member of 'input' to 'char' repeated 'count' times. 'padTo' is the bytes '\{"terms":"[https://seller.example/t.md","x-pad](https://seller.example/t.md","x-pad)":"' + 'a' repeated + '"}', exactly that many bytes long. | | [`mpp-challenge.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-challenge.json) | Vectors for MPP's challenge pieces in the mpp entry point of @integraledger/lcp, shared by every MPP pairing. H is SHA-256("abc") from FIPS 180-2. C\_E and C\_T are fixed challenges; their request values are JSON, base64url without padding. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. MV9's field values are MPP's own example (draft-httpauth-payment-01 at 08e7dd87, lines 1427-1430). | | [`mpp-charge-card.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-card.json) | Vectors for mpp/charge/card. H is SHA-256("abc"); fixed.MV1 is the MPP challenge id derived from H. The request is the M1 request, its JSON written in the order given here and encoded as base64url without padding. The issued digest is SHA-256 of the sorted JSON (printf of the sorted JSON piped to sha256sum). The proves text is the pairing's record, opening with the agreement transaction's sentence. | | [`mpp-charge-evm-authorization.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-evm-authorization.json) | Vectors for mpp/charge/evm/authorization. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0; the Permit2 spender is Anvil account 1. C\_E and C\_T are mpp-challenge.json's fixed challenges. | | [`mpp-charge-evm-hash.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-evm-hash.json) | Vectors for mpp/charge/evm/hash. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0; the Permit2 spender is Anvil account 1. C\_E and C\_T are mpp-challenge.json's fixed challenges. | | [`mpp-charge-evm-permit2.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-evm-permit2.json) | Vectors for mpp/charge/evm/permit2, single and batch. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0; the Permit2 spender is Anvil account 1. C\_E and C\_T are mpp-challenge.json's fixed challenges. | | [`mpp-charge-evm-transaction.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-evm-transaction.json) | Vectors for mpp/charge/evm/transaction. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0; the Permit2 spender is Anvil account 1. C\_E and C\_T are mpp-challenge.json's fixed challenges. | | [`mpp-charge-hedera.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-hedera.json) | Vectors for the mpp/charge/hedera pairing of @integraledger/lcp's hedera entry point. The attribution memos were computed with pycryptodome 3.23.0's keccak and the bodies with hiero-sdk-python 0.2.10's generated protobufs (protobuf 7.36.2, deterministic) and cryptography's Ed25519 on Python 3.12.3, 2026-09-25; the seed is not recorded. The request follows MPP's Hedera draft (git blob 414b52a85a): the payer's debit of amount, the recipient's remainder and each split, in currency. | | [`mpp-charge-lightning.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-lightning.json) | Vectors for the mpp/charge/lightning pairing: the lightning entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. L2 has p = x402's payment hash, s, h = H, x = 300 and features 8 and 14; it was made by an encoder that reproduced BOLT11's published h example byte for byte (@scure/base, @noble/curves and @noble/hashes 2.4.0) and decoded by light-bolt11-decoder 3.2.0 and bolt11 1.4.1. A challenge's request is given decoded; it is sent as base64url (no padding) of its JCS form. The issued digest is GNU coreutils sha256sum over the sorted JSON without the invoice; Python's json.dumps(sort\_keys=True, separators=(",",":")) agrees. | | [`mpp-charge-nearintents.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-nearintents.json) | Vectors for mpp/charge/nearintents, on MPP's own example request (draft-nearintents-charge-01, blob 6a389faa6b) without its externalId. The placed request is computed with Python 3 json and base64url. | | [`mpp-charge-solana.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-solana.json) | Vectors for mpp/charge/solana. Fixtures are seeds 01 and 02, devnet USDC, x402's payTo and blockhash, and x402-exact-solana.json's V2 and V3 wires. The placed request is computed with Python 3 json.dumps(sort\_keys=True, separators=(',',':')) and base64url without padding. Exactly one memo whose data parses as an LCP string, equal to the carrier; other memos are not read. | | [`mpp-charge-stellar.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-stellar.json) | Vectors for mpp/charge/stellar. Fixtures are seller seed 04, payer seed 05, an asset of 06×32, and x402-exact-stellar.json's V1 muxed address, V2 preimage hash and V3 envelope. The placed request is computed with Python 3 json and base64url. | | [`mpp-charge-stripe.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-stripe.json) | Vectors for mpp/charge/stripe, on MPP's own example request (draft-stripe-charge-00). Stripe metadata allows up to 50 keys, key names up to 40 characters and values up to 500; the legal\_context key has no square brackets. The refusal rows apply those bounds. | | [`mpp-charge-tempo-memo.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-tempo-memo.json) | Vectors for mpp/charge/tempo/memo and the tempo entry point's memo pieces. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0; the Permit2 spender is Anvil account 1. C\_E and C\_T are mpp-challenge.json's fixed challenges. | | [`mpp-charge-tempo-push.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-tempo-push.json) | Vectors for mpp/charge/tempo/push. Expected values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0; the Permit2 spender is Anvil account 1. C\_E and C\_T are mpp-challenge.json's fixed challenges. The log layout (from, to and memo as topics 1-3, the amount as data word 0) is that of a live TransferWithMemo on Tempo Moderato. | | [`mpp-charge-usdc-evm.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-usdc-evm.json) | Vectors for mpp/charge/usdc/evm. Expected values were computed with canonicalize 5.1.0, viem 2.56.8 and js-sha3 on Node, and json.dumps(sort\_keys=True, separators=(',',':')) with eth-utils keccak on Python 3.12.3. A.1 is the usdc draft's example (draft-usdc-charge-00, blob ec7fc1868b, lines 1035-1090), whose request parameter is copied verbatim. Truncated values hold their prefix and suffix. The payer key is the published Anvil development key #0. | | [`mpp-charge-usdc-gateway.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-usdc-gateway.json) | Vectors for mpp/charge/usdc/gateway. Expected values were computed with canonicalize 5.1.0 and viem keccak256, canonicalize and js-sha3, and Python json.dumps with eth-utils keccak, which agreed. The TransferSpec runs from Arc Testnet (domain 26) to Base Sepolia (domain 6), the testnet wallet and minter of gateway-api-testnet.circle.com /v1/info, each address left-padded to 32 bytes. The payer key is the published Anvil development key #0; the signature is made at test time and is not verified by bound. | | [`mpp-charge-usdc-solana.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-usdc-solana.json) | Vectors for mpp/charge/usdc/solana: the Solana charge with method usdc, its details read from methodDetails.solana, whose network is required (draft-usdc-charge-00, Solana profile). The request, the wire and the expected reference are mpp-charge-solana.json's, so the expected values are that file's. The usdc profile rule is the draft's: methodDetails.type names exactly one profile details object. | | [`mpp-charge-usdc-stacks.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-usdc-stacks.json) | Vectors for mpp/charge/usdc/stacks. R\_S is the usdc draft's A.3 request (draft-usdc-charge-00, blob ec7fc1868b) without description, externalId, feePayer and feePayerAddress. The transaction is built at test time with @stacks/transactions 7.6.0 from these inputs, signed by the private key whose scalar is 1 (compressed); its length, bytes and txid were computed with stacks.js txid(), noble sha512\_256, Python hashlib and OpenSSL, which agreed. The fixture transaction L's argument hexes are those of that transaction (Clarity serialization: uint, the sender and recipient standard principals, (some H)); block 9021832 at tenure 256356 is a Stacks mainnet block. The reference's nonce is a decimal string (references are JSON). Integers in L are decimal strings, read as bigints. M4's wireHex is that transaction's bytes, whose SHA-512/256 is the txid, for buyer-side tests without the SDK. | | [`mpp-charge-xrpl.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-charge-xrpl.json) | Vectors for mpp/charge/xrpl. Fixtures are payer r3sN…6dTC, destination rpjf…EyN, and x402-exact-xrpl.json's V2 x402 blob, V3 MPP blob and the plant's memo blob. The placed request is computed with Python 3 json and base64url. | | [`mpp-session-evm.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-session-evm.json) | Vectors for mpp/session/evm. Expected values were computed with eth-abi 6.0.0, eth-account 0.14.0, eth-hash 0.8.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and its ox 0.14.45 on Node 24.21.0, and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0. The session request's amount is a price per unit and enters no expected value. | | [`mpp-session-hedera-solana-xrpl.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-session-hedera-solana-xrpl.json) | Vectors for mpp/session/hedera, mpp/session/solana and mpp/session/xrpl. Where a value is shortened, the row holds its prefix and suffix. HS4's receipts are live testnet reads from testnet.hashio.io (eth\_getTransactionReceipt) at 2026-09-25T09:02Z. The placed challenges are computed with Python 3 json and base64url. | | [`mpp-session-lightning.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-session-lightning.json) | Vectors for the mpp/session/lightning pairing: the lightning entry point of @integraledger/lcp. The session challenge carries L2 (the mpp/charge/lightning vectors' invoice, h = H) as its depositInvoice and x402's payment hash as paymentHash, both at the top level of request as MPP's Lightning session draft places them. The rows follow the session draft's request members and actions (draft-lightning-session-00, blob 3bdcfd0184); no published session vector exists. The return invoice is BOLT11's published example "Please make a donation of any amount" (lightning/bolts 11-payment-encoding.md, blob ffd29a0909), which has no amount, as the session draft requires (draft-lightning-session-00, blob 3bdcfd0184: "returnInvoice: REQUIRED. BOLT11 invoice with no encoded amount"); light-bolt11-decoder 3.2.0 and bolt11 1.4.1 decode it with no amount. Only the open action is the session's payment; topUp, bearer and close are later actions in the session, with the draft's payload members. | | [`mpp-session-tempo.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-session-tempo.json) | Vectors for mpp/session/tempo and the tempo entry point's channel pieces. Expected values were computed with eth-abi 6.0.0, eth-account 0.14.0, eth-hash 0.8.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and its ox 0.14.45 on Node 24.21.0, and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0. L1 is a live v2 open on Tempo Moderato (eip155:42431), transaction 0x274c152568833e92246fdb8a01271e4af32c60edd2e561a53dcac3346865e1d1, read with eth\_getRawTransactionByHash and eth\_getTransactionReceipt from [https://rpc.moderato.tempo.xyz](https://rpc.moderato.tempo.xyz) on 2026-09-25 at 08:01Z; the receipt keeps status, block and logs. | | [`mpp-subscription-stripe.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-subscription-stripe.json) | Vectors for mpp/subscription/stripe: the same carrier as the Stripe charge, under intent subscription. No subscription request is published, so the rows state relations (the carrier's value, the issued digest unchanged by the carrier, and an emptied metadata object removed with it), not digests. | | [`mpp-subscription-tempo.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/mpp-subscription-tempo.json) | Vectors for mpp/subscription/tempo and the tempo entry point's key authorizations. Expected values were computed with eth-abi 6.0.0, eth-account 0.14.0, eth-hash 0.8.0 and pyrlp 5.0.0 on Python 3.12.3, viem 2.56.8 and its ox 0.14.45 on Node 24.21.0, and GNU coreutils 9.4. Where a value is truncated, the row holds its prefix and suffix. The payer key is the published Anvil development key #0. L2 is a live key authorization on Tempo Moderato (eip155:42431), transaction 0x6c1cdc57bf5a4a98961b7897cac3212636eea551540ab3b32038c45f9d3d8d1c, read with eth\_getRawTransactionByHash and eth\_getTransactionReceipt from [https://rpc.moderato.tempo.xyz](https://rpc.moderato.tempo.xyz) on 2026-09-25 at 08:01Z; the receipt keeps status, block and logs. | | [`sd-jwt.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/sd-jwt.json) | Rows for the SD-JWT reader (src/sd-jwt.ts). C4 is RFC 9901's published disclosures and digests (sections 4.2.3 and 4.2.4.2). C6 and C7 are Verifiable Intent presentations built with Python 3 as compact JSON with fixed ES256 signatures. The reader applies RFC 9901 section 7.1 with one allowance: a digest in \_sd that does not name a three-element disclosure is ignored there. The reader's refusal codes are the caller's; these rows name the reason: malformed, sd-alg-unsupported, unreferenced or too-large. | | [`ucp.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/ucp.json) | Vectors for the ucp/checkout/\{ap2-mandate,unsigned} and ucp/booking/\{ap2-mandate,unsigned} pairings (the ucp entry point of @integraledger/lcp). SHA-256 values were computed with GNU coreutils sha256sum and basenc and agree with OpenSSL. The tests build J, D and M from the fixed strings, J from V2's checkout written compactly in member order; 'built' holds the same strings as written by Python 3's base64, hashlib and json. V5 uses ap2-checkout-mandate.json's V6 token. The 'implementation' rows fix refusals that UCP does not name; their inputs were built with Python 3. | | [`x402-auth-capture-eip155-eip3009.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-auth-capture-eip155-eip3009.json) | Vectors for x402/auth-capture/eip155/eip3009 on the commerce-payments escrow v1.1. H is SHA-256("abc") (FIPS 180-2); the payer is the published Anvil development key #0; now is 1790000000. Values are written in full, or as their prefix and suffix where truncated. Refusal codes the specification leaves to the implementation are marked implementationCode. captureAuthorizer F is Anvil account 2, receiverAuthorizer R Anvil account 3, feeRecipient Anvil account 4; policy zero. | | [`x402-auth-capture-eip155-permit2.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-auth-capture-eip155-permit2.json) | Vectors for x402/auth-capture/eip155/permit2 on the commerce-payments escrow v1.1. H is SHA-256("abc") (FIPS 180-2); the payer is the published Anvil development key #0; now is 1790000000. Values are written in full, or as their prefix and suffix where truncated. Refusal codes the specification leaves to the implementation are marked implementationCode. | | [`x402-batch-settlement.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-batch-settlement.json) | Vectors for the x402 batch-settlement pairings (the x402-batch-settlement entry point of @integraledger/lcp). H is SHA-256("abc") and H' SHA-256("abd"); EVM keys are the published Anvil development accounts 0, 1 and 3; the EVM values were computed with eth-account 0.14.0, eth-abi 6.0.0, eth-utils 6.0.0 and viem 2.56.8 and read them on Base Sepolia; the SVM values with solders 0.26.0, PyNaCl 1.6.2 and @noble/curves 2.4.0. The SVM fixtures (ES4's top\_up, request\_close and nonce-memo wires, ES5's landed wire, the no-channel transaction) were built with solders 0.26.0 on Python 3.11; the same script reproduces ES1, ES2, ES3 and ES5's txid. | | [`x402-exact-algorand.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-algorand.json) | Vectors for the x402/exact/algorand pairing of @integraledger/lcp's avm entry point. H is SHA-256("abc") from FIPS 180-2. The values were computed with py-algorand-sdk 2.12.0 and PyNaCl 1.6.2 on Python 3.12.3, with hashlib's sha512\_256 as a second path, 2026-09-25; the seeds are not recorded here. Rounds are decimal strings. | | [`x402-exact-aptos.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-aptos.json) | Vectors for the x402/exact/aptos pairing: the aptos entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. The committed answer is Aptos mainnet transaction 0xde08191e…ef48ceb5 (version 7351075186) read over REST from api.mainnet.aptoslabs.com on 2026-09-25, trimmed to the members the reader returns. Fixture F's RawTransaction is built with @aptos-labs/ts-sdk 7.3.0 from that answer (max\_gas\_amount 15000, gas\_unit\_price 100, chain 1); its SHA-256 is Python's hashlib. idDigest is Python's hashlib.sha256 over json.dumps(sort\_keys=True, separators=(',',':')) of the normal form. Other answers are the real one with the named member changed. Ledger times are microseconds. | | [`x402-exact-cardano.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-cardano.json) | Vectors for the x402/exact/cardano pairing: the cardano entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. V1 is cbor2 5.7.1's encoding of the auxiliary data (pycardano 0.19.2's AuxiliaryData(AlonzoMetadata(...)).to\_cbor() is equal). V2 and V4 are built with pycardano 0.19.2 on Python 3.11; the one vkey witness is from a key generated when the fixture was built, which does not change the body or the id. V3 is Cardano preprod transaction 628eca29…c73ef4be, its CBOR read through Koios /tx\_cbor on 2026-09-25. Every Blake2b-256 is Python's hashlib.blake2b(digest\_size=32) over the item's bytes as located by cbor2's decoder. | | [`x402-exact-casper.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-casper.json) | Vectors for the x402/exact/casper pairing: the casper entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2; the option, payee and payer are x402's Casper example; the EIP-712 values were computed with @casper-ecosystem/casper-eip-712 1.2.1 and, separately, viem 2.56.8 over CEP-3009's formula by hand, on Node 24.21.0; every SHA-256 with GNU coreutils sha256sum. The public key and signature are placeholders of the tagged widths: bound verifies no signature. Byte strings are hex; uint256 values are decimal strings; a call's blockHeight is a decimal string. | | [`x402-exact-ccd.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-ccd.json) | Vectors for the x402/exact/ccd pairing: the ccd entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. The accounts are version byte 01 plus SHA-256 of a label, base58check-encoded with bs58check; x402's example addresses fail base58check. D1 was produced by cborg 6.1.2; D2 was hand-assembled to the steward's PLT encoder; the digests are GNU coreutils sha256sum. D3's CCD signedTransaction is the output of @concordium/web-sdk 12.0.2's Transaction.toJSONString for Transaction.transfer(payee, 1000000 microCCD, memo D1) with sender payer, nonce 7, expiry 1790000060 and sponsor with one signature, signed by Transaction.sign with buildBasicAccountSigner of the seed 0x00…01; its memo is DataBlob.toJSON, a 2-byte big-endian length then the bytes, and the refusal rows' memos are DataBlob.toJSON of their bytes. D3's PLT signedTransaction is the output of the same SDK's Transaction.toJSONString for Transaction.tokenUpdate(createTokenUpdatePayload(EURR, \{transfer: \{amount: TokenAmount.create(5000000, 6), recipient: CborAccountAddress.fromBase58(payee), memo: CborMemo.fromString(H's LCP string)}})) with the same sender, nonce, expiry, sponsor and seed; its operations are Cbor.toJSON, plain hex with no length, and its recipient is the SDK's tag-40307 map with the coin info (key 1, tag 40305 \{1: 919}) beside the address (key 3). bound verifies no signature. Byte strings are hex; amounts are decimal strings. A memo carries H only as ccdMemo(H) exactly: LCP's string form with lowercase hex, as one CBOR text string under RFC 8949 §4.1's preferred serialization (cborg 6.1.2's strict decode refuses the non-preferred head), so bound, status and recover read it alike. A map with a repeated key is malformed (RFC 8949 §5.6; cborg 6.1.2 with rejectDuplicateMapKeys refuses the repeated memo). | | [`x402-exact-eip155-eip3009.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-eip155-eip3009.json) | Vectors for the x402/exact/eip155/eip3009 pairing: the x402 and evm entry points of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2; O is the x402 specification's example option (section 5.2.1); the payer is the published Anvil development key. The EIP-712 values were computed with eth-account 0.14.0, eth-abi 6.0.0 and eth-utils 6.0.0 on Python 3.12.3; every SHA-256 with GNU coreutils sha256sum. Byte strings are hex; uint256 values are decimal strings. | | [`x402-exact-eip155-erc7710-salt.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-eip155-erc7710-salt.json) | Vectors for x402/exact/eip155/erc7710-salt, MetaMask's DelegationManager v1.3.0. H is SHA-256("abc") (FIPS 180-2); the payer is the published Anvil development key #0; now is 1790000000. Values are written in full, or as their prefix and suffix where truncated. Refusal codes the specification leaves to the implementation are marked implementationCode. The leaf L's caveat is arbitrary: bound never reads caveats. | | [`x402-exact-eip155-erc7710.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-eip155-erc7710.json) | Vectors for x402/exact/eip155/erc7710, the unsigned level. H is SHA-256("abc") (FIPS 180-2); the payer is the published Anvil development key #0; now is 1790000000. Values are written in full, or as their prefix and suffix where truncated. Refusal codes the specification leaves to the implementation are marked implementationCode. | | [`x402-exact-eip155-permit2.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-eip155-permit2.json) | Vectors for x402/exact/eip155/permit2. H is SHA-256("abc") (FIPS 180-2); the payer is the published Anvil development key #0; now is 1790000000. Values are written in full, or as their prefix and suffix where truncated. Refusal codes the specification leaves to the implementation are marked implementationCode. | | [`x402-exact-hedera-transfer-executor.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-hedera-transfer-executor.json) | Vectors for the x402/exact/hedera/transfer-executor pairing, from x402's own example at 8228bd6d. idDigest is printf '%s' '0.0.5001,0.0.4001,100000000' \| sha256sum, and Python hashlib printed the same. | | [`x402-exact-hedera.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-hedera.json) | Vectors for the x402/exact/hedera pairing of @integraledger/lcp's hedera entry point. H is SHA-256("abc") from FIPS 180-2. The bytes were computed with hiero-sdk-python 0.2.10's generated protobufs and protobuf 7.36.2 (SerializeToString(deterministic=True)) and cryptography's Ed25519 on Python 3.12.3, 2026-09-25; the signing seed is not recorded here. Byte strings are hex unless named base64. | | [`x402-exact-lnbtc-invoice-named.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-lnbtc-invoice-named.json) | Vectors for the x402/exact/lnbtc/invoice-named pairing: the lightning entry point of @integraledger/lcp. N has p = x402's payment hash, h = x402's request hash, x = 300 and no m; it was made by the encoder that reproduced BOLT11's L1 and decoded by light-bolt11-decoder 3.2.0 and bolt11 1.4.1. O\_N is x402's lnbtc example with N as its invoice. A\_N is the core's bytes for the id, the x402 slot \{accepts: \[O\_N], request} with members in that order, and no party slots; Python wrote them and Node's JSON.stringify(JSON.parse(bytes)) returns them unchanged. Digests are GNU coreutils sha256sum. | | [`x402-exact-lnbtc.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-lnbtc.json) | Vectors for the x402/exact/lnbtc pairing: the lightning entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. L1 is BOLT11's published example 'Now send $24 for an entire list of things (hashed)'. L4 was made by an encoder that reproduced L1 byte for byte (@scure/base, @noble/curves and @noble/hashes 2.4.0) and decoded by light-bolt11-decoder 3.2.0 and bolt11 1.4.1. The option is x402's lnbtc example with L4 as its invoice. Digests are GNU coreutils sha256sum over sorted JSON. The payee is the public key of x402's test-only key 1. | | [`x402-exact-near.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-near.json) | Vectors for the x402/exact/near pairing: the near entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. The payer's key is the Ed25519 seed 01 repeated 32 times and its implicit account. The option is x402's NEAR example. Expected values were computed with (borsh-construct 0.1.0, hashlib and PyNaCl 1.6.2, with @near-js/transactions 2.5.1 as a cross-check). Negative signed delegate actions are V1's with one part changed and a zero signature. Nonces and heights are decimal strings. | | [`x402-exact-polkadot-lcp-assets-remark.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-polkadot-lcp-assets-remark.json) | Vectors for the x402/exact/polkadot/lcp-assets-remark pairing of @integraledger/lcp's polkadot entry point. H is SHA-256("abc"). V1 is a real extrinsic read live (block 21,053,708, index 3); V2's call was printed by @polkadot/api 16.5.6 and equals a hand encoding in Python; V3's extrinsic was accepted by TaggedTransactionQueue\_validate\_transaction on Polkadot Asset Hub (Invalid(Payment): signature and extensions accepted, the account unfunded); every BLAKE2b-256 is b2sum -l 256 (GNU coreutils 9.4). Reader fixtures take Sidecar's answer shapes; heights are decimal strings. | | [`x402-exact-solana.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-solana.json) | Vectors for the x402/exact/solana pairing: the svm and x402/exact/solana entry points of @integraledger/lcp. Expected values: H is SHA-256("abc") from FIPS 180-2; keys from Ed25519 seeds 01x32 and 02x32; x402's example payTo and blockhash; devnet USDC, computed with solders 0.26.0 on Python 3.12.3. The transaction fixtures (V3's variants, V4's landed wire, the plant) were built with solders 0.26.0 on Python 3.11 from the same seeds; the same script reproduces the V2 wire and V4 txid. Byte strings are hex unless named base64. | | [`x402-exact-starknet.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-starknet.json) | Vectors for the x402/exact/starknet pairing: the starknet entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. The option and the payer are x402's Starknet example (scheme\_exact\_starknet.md at 0cb1a1f0). Expected values were computed with starknet 10.8.0 and @noble/hashes 2.4.0 on Node, Python 3.12.3 and GNU coreutils; the type hashes are SNIP-9's published values. Trace fixtures model starknet\_traceTransaction's execute\_invocation. | | [`x402-exact-stellar.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-stellar.json) | Vectors for the x402/exact/stellar pairing: the stellar and x402/exact/stellar entry points of @integraledger/lcp. The fixed inputs are H = SHA-256("abc") from FIPS 180-2, the seller from Ed25519 seed 04x32, the payer from 05x32 and the asset the contract strkey of 06x32, on testnet; the expected values were computed with stellar-sdk 13.0.0 on Python 3.12.3. The fixtures described without being printed (the unsigned simulated envelope, V4's plain-G envelope, the plant) were built with stellar-sdk 13.0.0 on Python 3.11 from V3's envelope; the same script reproduces V2's preimage digest and signature. The payer signs the authorization entry's rootInvocation, not the operation (CAP-46: the credentials' signature covers the HashIDPreimage of the network id, nonce, expiration and invocation; x402 scheme\_exact\_stellar: argument 1 (to) MUST equal payTo, and the rootInvocation MUST NOT contain subInvocations), so the payment is read from that invocation and the operation must invoke exactly it. V4's rows with a differing operation or signed invocation, and V4build, were built with @stellar/stellar-sdk 17.1.0 (its XDR codec, and authorizeEntry for the payer's signature, nonce 1, expiration 1000) from V2's simulated envelope; the same builder reproduces V3's envelope and V4's plain-G envelope byte for byte. V4's encoding rows follow RFC 4648 (section 3.3: characters outside the base alphabet are rejected; section 3.5: non-zero padding bits are rejected; section 4: the encoding is padded to a multiple of 4) and the XDR decoder of @stellar/stellar-sdk 17.1.0, which refuses bytes after the envelope. | | [`x402-exact-sui.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-sui.json) | Vectors for the x402/exact/sui pairing: the sui entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. V1 is Sui testnet transaction EV7D7z9gjzjrAQSKWSW8S1iLGdk8aEVPjn3zLA1aUSLE, its transactionBcs read over GraphQL (graphql.testnet.sui.io) on 2026-09-25. V2 and V3 are recipe R, built with @mysten/sui 2.31.3. Every digest is Python 3's hashlib.blake2b(b"TransactionData::" + bytes, digest\_size=32), then base58. O is a test option: the option's values are not read by the pairing beyond its filter. | | [`x402-exact-tron-lcp-trc20-memo.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-tron-lcp-trc20-memo.json) | Vectors for the x402/exact/tron/lcp-trc20-memo pairing: the tron entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. V1 is mainnet transaction 40662c9c…, read live from a Solidity node. V2's inputs are the published Anvil development key, USDT-TRC20, the payee bytes of x402's example option under 0x41, and solidified block 86542765. The signature was made with coincurve 21.0.0 (RFC 6979) and recovers to the payer; base58check with base58 2.1.1; the Transfer topic with pycryptodome 3.23.0 keccak; every SHA-256 with hashlib. Negative transactions are V2 with fields changed, written by hand from Tron.proto's field numbers. Byte strings are lowercase hex; int64 values are decimal strings. | | [`x402-exact-tvm.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-tvm.json) | Vectors for the x402/exact/tvm pairing: the tvm entry point of @integraledger/lcp. H is SHA-256("abc") from FIPS 180-2. The expected cell hashes, BoC and signature prefixes were computed with pytoniq-core 0.2.0 and PyNaCl 1.6.2. The payer's key is the Ed25519 seed 01 repeated 32 times. Negative settlement BoCs are V2's request with one part changed. Status fixtures model TON Center v3 answers; inBody is a BoC in hex. | | [`x402-exact-xrpl.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-exact-xrpl.json) | Vectors for the x402/exact/xrpl pairing: the xrpl and x402/exact/xrpl entry points of @integraledger/lcp. Expected values: H is SHA-256("abc") from FIPS 180-2; payer from Ed25519 entropy 01x16, destination from 02x16; 1 000 000 drops, Fee 12, Sequence 7, LastLedgerSequence 1000, computed with xrpl-py 4.1.0 on Python 3.12.3, GNU coreutils 9.4 and OpenSSL 3.0.13. The plant's blob was built with xrpl-py 4.1.0 on Python 3.11; the same script reproduces V2's and V3's blobs and hashes. | | [`x402-upto-eip155-permit2.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-upto-eip155-permit2.json) | Vectors for x402/upto/eip155/permit2. H is SHA-256("abc") (FIPS 180-2); the payer is the published Anvil development key #0; now is 1790000000. Values are written in full, or as their prefix and suffix where truncated. Refusal codes the specification leaves to the implementation are marked implementationCode. The upto facilitator F is Anvil account 2. | | [`x402-upto-solana.json`](https://github.com/IntegraLedger/integra-protocol/blob/main/lcp/vectors/x402-upto-solana.json) | Vectors for the x402/upto/solana pairing (the x402-upto-solana entry point of @integraledger/lcp). Expected values use x402-exact-solana.json's fixed inputs (receiverAuthorizer from seed 03x32; nonce 7; openSlot 341000000; amount 10000; withdrawDelay 3600), computed with solders 0.26.0, PyNaCl 1.6.2 and @noble/curves 2.4.0. The fixtures (EU5's landed wire, the no-channel transaction, the plants' wires) were built with solders 0.26.0 on Python 3.11; the same script reproduces EU1, EU3 and EU5's txid. The no-channel message's digest, d4e6becc...1c47, is recorded here in full. | --- # @integraledger/lcp > The exports of @integraledger/lcp. Source: https://lcp.integraledger.com/reference/api ## Interfaces ### 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. #### Methods ##### advertiseBeforeCarrier()? > `optional` **advertiseBeforeCarrier**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): `unknown` ###### Parameters | Parameter | Type | | --------------- | ------------------- | | `doc` | `never` | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | `never` | | `agreementUrl?` | `string` | ###### Returns `unknown` *** ### 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. #### Properties | Property | Type | Description | | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | `ack` | [`Json`](#json) | ACK defines no payer signature; its `bound` refuses whatever is presented. | | `acp` | [`Presented`](https://lcp.integraledger.com/reference/api/acp#presented) | - | | `ap2` | [`Presented`](https://lcp.integraledger.com/reference/api/ap2#presented) | - | | `card` | [`TapPresented`](https://lcp.integraledger.com/reference/api/card#tappresented) \| [`ViImmediate`](https://lcp.integraledger.com/reference/api/card#viimmediate) \| [`ViAutonomous`](https://lcp.integraledger.com/reference/api/card#viautonomous) | - | | `mpp` | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp#mppcredential) | - | | `ucp` | [`Presented`](https://lcp.integraledger.com/reference/api/ap2#presented) | - | | `x402` | [`PaymentPayload`](https://lcp.integraledger.com/reference/api/x402#paymentpayload) \| [`HederaPaymentPayload`](https://lcp.integraledger.com/reference/api/hedera#hederapaymentpayload) \| [`ExecutorPaymentPayload`](https://lcp.integraledger.com/reference/api/hedera#executorpaymentpayload) \| [`LnPaymentPayload`](https://lcp.integraledger.com/reference/api/lightning#lnpaymentpayload) \| [`AptosPaymentPayload`](https://lcp.integraledger.com/reference/api/aptos#aptospaymentpayload) \| [`AvmPaymentPayload`](https://lcp.integraledger.com/reference/api/avm#avmpaymentpayload) \| [`CardanoPaymentPayload`](https://lcp.integraledger.com/reference/api/cardano#cardanopaymentpayload) \| [`CasperPaymentPayload`](https://lcp.integraledger.com/reference/api/casper#casperpaymentpayload) \| [`CcdPaymentPayload`](https://lcp.integraledger.com/reference/api/ccd#ccdpaymentpayload) \| [`NearPayment`](https://lcp.integraledger.com/reference/api/near#nearpayment) \| [`PolkadotPaymentPayload`](https://lcp.integraledger.com/reference/api/polkadot#polkadotpaymentpayload) \| [`StarknetPayment`](https://lcp.integraledger.com/reference/api/starknet#starknetpayment) \| [`SuiPaymentPayload`](https://lcp.integraledger.com/reference/api/sui#suipaymentpayload) \| [`TronPayment`](https://lcp.integraledger.com/reference/api/tron#tronpayment) \| [`TvmPayment`](https://lcp.integraledger.com/reference/api/tvm#tvmpayment) \| [`BatchPaymentPayload`](https://lcp.integraledger.com/reference/api/x402-batch-settlement#batchpaymentpayload) \| [`CloudflarePaymentPayload`](https://lcp.integraledger.com/reference/api/x402-batch-settlement#cloudflarepaymentpayload) \| [`SvmPaymentPayload`](https://lcp.integraledger.com/reference/api/x402-exact-solana#svmpaymentpayload) \| [`StellarPaymentPayload`](https://lcp.integraledger.com/reference/api/x402-exact-stellar#stellarpaymentpayload) \| [`XrplPaymentPayload`](https://lcp.integraledger.com/reference/api/x402-exact-xrpl#xrplpaymentpayload) \| [`UptoSvmPaymentPayload`](https://lcp.integraledger.com/reference/api/x402-upto-solana#uptosvmpaymentpayload) | - | *** ### 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` *** ### TieRequestOn The request a surface's `tie` takes with its options: x402's request commitment; the others' `tie` takes none. #### Properties | Property | Type | | -------- | ------------------------------------------------------------ | | `ack` | `never` | | `acp` | `never` | | `ap2` | `never` | | `card` | `never` | | `mpp` | `never` | | `ucp` | `never` | | `x402` | [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment) | *** ### TxSpelling The optional member of a pairing whose rail spells one transaction id more than one way: the id in the one spelling a record keeps. #### Methods ##### txId()? > `optional` **txId**(`tx`): `string` ###### Parameters | Parameter | Type | | --------- | -------- | | `tx` | `string` | ###### Returns `string` ## Type Aliases ### AtrHash > **AtrHash** = `` `0x${string}` `` `0x` followed by 64 hex digits. Every hash this module emits is lowercase. *** ### Binding > **Binding** = [`X402Binding`](#x402binding) | [`MppBinding`](#mppbinding) | *typeof* [`paymentRequest`](https://lcp.integraledger.com/reference/api/ack#paymentrequest) | *typeof* [`delegated`](https://lcp.integraledger.com/reference/api/acp#delegated) | *typeof* [`undelegated`](https://lcp.integraledger.com/reference/api/acp#undelegated) | *typeof* [`checkoutMandate`](https://lcp.integraledger.com/reference/api/ap2#checkoutmandate) | *typeof* [`viAutonomous`](https://lcp.integraledger.com/reference/api/card#viautonomous-1) | *typeof* [`viImmediate`](https://lcp.integraledger.com/reference/api/card#viimmediate-1) | *typeof* [`sellerReference`](https://lcp.integraledger.com/reference/api/card#sellerreference) | *typeof* [`visaTap`](https://lcp.integraledger.com/reference/api/card#visatap) | *typeof* [`bookingAp2Mandate`](https://lcp.integraledger.com/reference/api/ucp#bookingap2mandate) | *typeof* [`bookingUnsigned`](https://lcp.integraledger.com/reference/api/ucp#bookingunsigned) | *typeof* [`ap2Mandate`](https://lcp.integraledger.com/reference/api/ucp#ap2mandate) | *typeof* [`unsigned`](https://lcp.integraledger.com/reference/api/ucp#unsigned-1) & [`PushMode`](#pushmode) & [`CarrierAfterH`](#carrierafterh) & [`TxSpelling`](#txspelling) A pairing of protocol, scheme and rail. *** ### CoreRefusal > **CoreRefusal** = `object` #### 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` | *** ### Json > **Json** = `string` | `number` | `boolean` | `null` | readonly [`Json`](#json)\[] | \{\[`k`: `string`]: [`Json`](#json); } A JSON value. Numbers in a binding value must be safe integers. *** ### MppBinding > **MppBinding** = *typeof* [`MPP_BINDINGS`](https://lcp.integraledger.com/reference/api/mpp#mpp_bindings)\[`number`] An MPP pairing of intent and method. *** ### PairingId > **PairingId** = [`Binding`](#binding)\[`"id"`] *** ### PairingOn > **PairingOn**\<`S`> = `Extract`\<[`PairingId`](#pairingid), `` `${S}/${string}` ``> The pairing ids of one surface. #### Type Parameters | Type Parameter | | ----------------------------------- | | `S` *extends* [`Surface`](#surface) | *** ### Presented > **Presented** = [`PresentedOn`](#presentedon)\[[`Surface`](#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` | *** ### Surface > **Surface** = keyof [`PresentedOn`](#presentedon) The surfaces: a pairing id's first "/" segment. *** ### X402Binding > **X402Binding** = *typeof* [`exactEip3009`](https://lcp.integraledger.com/reference/api/x402#exacteip3009) | *typeof* [`authCaptureEip3009`](https://lcp.integraledger.com/reference/api/x402#authcaptureeip3009) | *typeof* [`authCapturePermit2`](https://lcp.integraledger.com/reference/api/x402#authcapturepermit2) | *typeof* [`batchCloudflare`](https://lcp.integraledger.com/reference/api/x402-batch-settlement#batchcloudflare) | *typeof* [`batchEvm`](https://lcp.integraledger.com/reference/api/x402-batch-settlement#batchevm) | *typeof* [`batchSvm`](https://lcp.integraledger.com/reference/api/x402-batch-settlement#batchsvm) | *typeof* [`exactAvm`](https://lcp.integraledger.com/reference/api/avm#exactavm) | *typeof* [`exactAptos`](https://lcp.integraledger.com/reference/api/aptos#exactaptos) | *typeof* [`exactCardano`](https://lcp.integraledger.com/reference/api/cardano#exactcardano) | *typeof* [`exactCasper`](https://lcp.integraledger.com/reference/api/casper#exactcasper) | *typeof* [`exactCcd`](https://lcp.integraledger.com/reference/api/ccd#exactccd) | *typeof* [`exactErc7710`](https://lcp.integraledger.com/reference/api/x402#exacterc7710) | *typeof* [`exactErc7710Salt`](https://lcp.integraledger.com/reference/api/x402#exacterc7710salt) | *typeof* [`exactPermit2`](https://lcp.integraledger.com/reference/api/x402#exactpermit2) | *typeof* [`exactHedera`](https://lcp.integraledger.com/reference/api/hedera#exacthedera) | *typeof* [`exactHederaExecutor`](https://lcp.integraledger.com/reference/api/hedera#exacthederaexecutor) | *typeof* [`exactLnbtc`](https://lcp.integraledger.com/reference/api/lightning#exactlnbtc) | *typeof* [`exactLnbtcNamed`](https://lcp.integraledger.com/reference/api/lightning#exactlnbtcnamed) | *typeof* [`exactNear`](https://lcp.integraledger.com/reference/api/near#exactnear) | *typeof* [`exactPolkadotRemark`](https://lcp.integraledger.com/reference/api/polkadot#exactpolkadotremark) | *typeof* [`exactSvm`](https://lcp.integraledger.com/reference/api/x402-exact-solana#exactsvm) | *typeof* [`exactStarknet`](https://lcp.integraledger.com/reference/api/starknet#exactstarknet) | *typeof* [`exactStellar`](https://lcp.integraledger.com/reference/api/x402-exact-stellar#exactstellar) | *typeof* [`exactSui`](https://lcp.integraledger.com/reference/api/sui#exactsui) | *typeof* [`exactTronMemo`](https://lcp.integraledger.com/reference/api/tron#exacttronmemo) | *typeof* [`exactTvm`](https://lcp.integraledger.com/reference/api/tvm#exacttvm) | *typeof* [`exactXrpl`](https://lcp.integraledger.com/reference/api/x402-exact-xrpl#exactxrpl) | *typeof* [`uptoPermit2`](https://lcp.integraledger.com/reference/api/x402#uptopermit2) | *typeof* [`uptoSvm`](https://lcp.integraledger.com/reference/api/x402-upto-solana#uptosvm) An x402 pairing of scheme and rail. ## Variables ### BINDINGS > `const` **BINDINGS**: readonly [`Binding`](#binding)\[] Every pairing this package implements. *** ### MAX\_JSON\_DEPTH > `const` **MAX\_JSON\_DEPTH**: `64` = `64` The deepest nesting of arrays and objects in any JSON this package writes or reads. ## Functions ### assemble() > **assemble**(`id`, `binding`, `content`, `limits?`): `Promise`\<[`CoreRefusal`](#corerefusal) | \{ `atrHash`: `` `0x${string}` ``; `bytes`: `Uint8Array`; }> 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. #### Parameters | Parameter | Type | | ------------------ | ------------------------------------------------------------------ | | `id` | `string` | | `binding` | readonly \[`string`, [`Json`](#json)] | | `content` | readonly readonly \[`string`, `Uint8Array`\<`ArrayBufferLike`>]\[] | | `limits?` | \{ `maxBytes?`: `number`; } | | `limits.maxBytes?` | `number` | #### Returns `Promise`\<[`CoreRefusal`](#corerefusal) | \{ `atrHash`: `` `0x${string}` ``; `bytes`: `Uint8Array`; }> *** ### canonicalJson() > **canonicalJson**(`v`): `string` | [`CoreRefusal`](#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. Refuses what `digestJson` refuses. #### Parameters | Parameter | Type | | --------- | --------------- | | `v` | [`Json`](#json) | #### Returns `string` | [`CoreRefusal`](#corerefusal) *** ### canonicalTx() > **canonicalTx**(`binding`, `tx`): `string` A transaction id as a record keeps it: the pairing's `txId`, where it has one, else the id unchanged. #### Parameters | Parameter | Type | | --------- | ------------------------------------ | | `binding` | [`Binding`](#binding) \| `undefined` | | `tx` | `string` | #### Returns `string` *** ### digestJson() > **digestJson**(`v`): `Promise`\<`` `0x${string}` `` | [`CoreRefusal`](#corerefusal)> SHA-256 over the RFC 8785 form of `v`. Refuses a value deeper than 64 levels, a non-finite number, a string with an unpaired surrogate, or anything that is not a JSON value. #### Parameters | Parameter | Type | | --------- | --------------- | | `v` | [`Json`](#json) | #### Returns `Promise`\<`` `0x${string}` `` | [`CoreRefusal`](#corerefusal)> *** ### 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` *** ### 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. #### 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` *** ### isHashWithNonHttpsLink() > **isHashWithNonHttpsLink**(`info`): `boolean` True for a structured form's inner object that `fromLegalContext` would decode except that its one link, in either spelling, is a link of another scheme (`isOtherSchemeLink`). #### Parameters | Parameter | Type | | --------- | --------- | | `info` | `unknown` | #### 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; 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. #### 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`: the one failing link refused as `link-not-https`. Every other failing link is `legal-context-malformed`. #### Parameters | Parameter | Type | | --------- | --------- | | `s` | `unknown` | #### Returns `s is string` *** ### jsonWithinDepth() > **jsonWithinDepth**(`text`): `boolean` True when no array or object in JSON text is nested more than `MAX_JSON_DEPTH` deep. Brackets inside strings are skipped; nothing else about the text is checked. #### Parameters | Parameter | Type | | --------- | -------- | | `text` | `string` | #### Returns `boolean` *** ### newAtrId() > **newAtrId**(): `string` A random RFC 9562 version 4 UUID, lowercase. #### Returns `string` *** ### pairingOf() > **pairingOf**(`option`): [`PairingOn`](#pairingon)\<`"x402"`> | `undefined` The x402 pairing that serves an option: a Lightning option's by `lnbtcPairingOf`, which names `x402/exact/lnbtc` for an option whose invoice is not yet written; else the first x402 pairing in `BINDINGS` whose `read` offers it, on a document holding that option alone. Undefined when none does. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns [`PairingOn`](#pairingon)\<`"x402"`> | `undefined` *** ### pairingsOfPlaced() > **pairingsOfPlaced**(`c`): readonly [`MppPairing`](https://lcp.integraledger.com/reference/api/mpp#mpppairing)\[] The pairings a placed challenge offers: `pairingsOf` over the challenge with its `opaque` removed, so the LCP members `place` wrote are not read as an occupied carrier. None when the challenge does not read. #### Parameters | Parameter | Type | | --------- | ------------------------------------------------- | | `c` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge) | #### Returns readonly [`MppPairing`](https://lcp.integraledger.com/reference/api/mpp#mpppairing)\[] *** ### parseJson() > **parseJson**(`text`): `unknown` The value of JSON text nested at most `MAX_JSON_DEPTH` deep; undefined for text that is deeper or is not JSON. #### Parameters | Parameter | Type | | --------- | -------- | | `text` | `string` | #### Returns `unknown` *** ### 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}` `` | *** ### toRawBytes() > **toRawBytes**(`h`): `Uint8Array` 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` ## References ### LcpPattern Re-exports [LcpPattern](https://lcp.integraledger.com/reference/api/x402#lcppattern) --- # @integraledger/lcp/a2a > The exports of @integraledger/lcp/a2a. Source: https://lcp.integraledger.com/reference/api/a2a ## Interfaces ### A2aAgentExtension #### Properties | Property | Type | | -------------- | --------- | | `description` | `string` | | `required` | `boolean` | | `uri` | `string` | *** ### A2aTask #### Indexable > \[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#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#refusal) A2A binds nothing: the refusal given wherever an A2A pairing is asked for. *** ### delivery > `const` **delivery**: `object` What the carrier proves. #### Type Declaration | Name | Type | | --------- | -------- | | `proves` | `string` | ## Functions ### agentExtension() > **agentExtension**(`o?`): [`A2aAgentExtension`](#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`](#a2aagentextension)\[] *** ### place() > **place**(`task`, `h`, `link`, `a2aExtensions?`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`A2aTask`](#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. #### Parameters | Parameter | Type | | ---------------- | --------------------- | | `task` | [`A2aTask`](#a2atask) | | `h` | `` `0x${string}` `` | | `link` | `string` | | `a2aExtensions?` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`A2aTask`](#a2atask) *** ### read() > **read**(`task`): [`Refusal`](https://lcp.integraledger.com/reference/api#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`](#a2atask) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#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. #### Parameters | Parameter | Type | | --------------- | ----------------------- | | `a2aExtensions` | `string` \| `undefined` | #### Returns `boolean` --- # @integraledger/lcp/ack > The exports of @integraledger/lcp/ack. Source: https://lcp.integraledger.com/reference/api/ack ## Interfaces ### AckBody The 402 body. #### Properties | Property | Type | | ---------------------- | ----------------------------- | | `legalContext` | [`Json`](https://lcp.integraledger.com/reference/api#json) | | `paymentRequest?` | [`Json`](https://lcp.integraledger.com/reference/api#json) | | `paymentRequestToken` | `string` | *** ### AckPaymentOption An ACK payment option as the seller wrote it. #### Indexable > \[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#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 ### paymentRequest > `const` **paymentRequest**: `Readonly`\<\{ `advertise`: (`_doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AckValues`](#ackvalues); `bound`: (`_presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_doc`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `claims`: `boolean`; `id`: `"ack/payment-request"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `options`: readonly [`Json`](https://lcp.integraledger.com/reference/api#json)\[]; }; }; `tie`: (`options`) => \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](#ackpaymentoption)\[]; }]; `unplaced`: (`option`) => [`AckPaymentOption`](#ackpaymentoption); }> ## Functions ### fromReceipt() > **fromReceipt**(`credentialSubject`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The hash in a receipt: the `id` of the Payment Request token embedded in its `credentialSubject`. Verifies nothing; a party calls it on a receipt it has verified. #### Parameters | Parameter | Type | | ------------------- | --------- | | `credentialSubject` | `unknown` | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### tie() > **tie**(`options`): \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](#ackpaymentoption)\[]; }] The binding slot: the Payment Request's options exactly as issued. #### Parameters | Parameter | Type | | --------- | --------------------------------------------------- | | `options` | readonly [`AckPaymentOption`](#ackpaymentoption)\[] | #### Returns \[`"ack"`, \{ `paymentOptions`: readonly [`AckPaymentOption`](#ackpaymentoption)\[]; }] --- # @integraledger/lcp/acp > The exports of @integraledger/lcp/acp. Source: https://lcp.integraledger.com/reference/api/acp ## Interfaces ### AcpBinding #### Type Parameters | Type Parameter | | ----------------------- | | `Id` *extends* `string` | #### Properties | Property | Type | | ---------- | ----------------------------------------------------------------------------------------- | | `claims` | `boolean` | | `id` | `Id` | | `pattern` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern) | | `tie` | (`options`) => \[`"acp"`, \{ `options`: readonly [`HandlerOption`](#handleroption)\[]; }] | #### Methods ##### advertise() > **advertise**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Session`](#session) ###### Parameters | Parameter | Type | | --------------- | --------------------------------- | | `doc` | [`Session`](#session) | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | [`HandlerOption`](#handleroption) | | `agreementUrl?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Session`](#session) ##### bound() > **bound**(`presented`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ###### Parameters | Parameter | Type | | ----------- | --------- | | `presented` | `unknown` | ###### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ##### build() > **build**(`choice`, `h`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Unsigned`](#unsigned)> ###### Parameters | Parameter | Type | | --------- | ------------------------- | | `choice` | [`AcpChoice`](#acpchoice) | | `h` | `` `0x${string}` `` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Unsigned`](#unsigned)> ##### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `session`: [`Session`](#session); }; } ###### Parameters | Parameter | Type | | --------- | --------------------- | | `doc` | [`Session`](#session) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `session`: [`Session`](#session); }; } ##### unplaced() > **unplaced**(`option`): [`HandlerOption`](#handleroption) ###### Parameters | Parameter | Type | | --------- | --------------------------------- | | `option` | [`HandlerOption`](#handleroption) | ###### Returns [`HandlerOption`](#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`](#session) | *** ### Unsigned #### Properties | Property | Type | | ------------ | ------------------------- | | `allowance` | [`Allowance`](#allowance) | #### Methods ##### complete() > **complete**(`request`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Presented`](#presented) ###### Parameters | Parameter | Type | | --------- | ------------------------- | | `request` | [`Presented`](#presented) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Presented`](#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`](#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`](#acpbinding)\<`"acp/checkout/delegated"`> *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api#digestjson) = `digestJson` SHA-256 over the RFC 8785 form of an issued handler option. *** ### METADATA\_KEY > `const` **METADATA\_KEY**: `"legal_context"` = `"legal_context"` *** ### undelegated > `const` **undelegated**: [`AcpBinding`](#acpbinding)\<`"acp/checkout/undelegated"`> ## Functions ### tie() > **tie**(`options`): \[`"acp"`, \{ `options`: readonly [`HandlerOption`](#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`](#handleroption)\[] | #### Returns \[`"acp"`, \{ `options`: readonly [`HandlerOption`](#handleroption)\[]; }] --- # @integraledger/lcp/ap2 > The exports of @integraledger/lcp/ap2. Source: https://lcp.integraledger.com/reference/api/ap2 ## Interfaces ### Ap2Offer #### Properties | Property | Type | | -------------- | --------------------- | | `checkout` | `string` | | `checkoutJwt` | `string` | | `payload` | [`Payload`](#payload) | *** ### MandateContent #### Properties | Property | Type | | ---------------- | -------- | | `checkout_hash` | `string` | | `checkout_jwt?` | `string` | *** ### Presented #### Properties | Property | Type | Description | | ------------------- | -------- | ---------------------------------------------------- | | `checkout_jwt` | `string` | The checkout JWT the presenter names as the latest. | | `checkout_mandate` | `string` | The closed Checkout Mandate, an SD-JWT as presented. | *** ### 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`](#presented) ###### Parameters | Parameter | Type | | ------------------ | -------- | | `checkout_mandate` | `string` | ###### Returns [`Presented`](#presented) ## Type Aliases ### CheckoutOption > **CheckoutOption** = `object` The checkout's own `id`, 1–256 characters. #### Properties | Property | Type | | ----------- | -------- | | `checkout` | `string` | *** ### 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#json) ## 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#refusal) | [`Payload`](#payload); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`offer`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Unsigned`](#unsigned)>; `claims`: `boolean`; `id`: `"ap2/checkout-mandate"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`Ap2Offer`](#ap2offer); }; `tie`: (`options`) => \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](#checkoutoption)\[]; }]; `unplaced`: (`option`) => [`CheckoutOption`](#checkoutoption); }> *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api#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#refusal) | \{ `payload`: [`Payload`](#payload); }> AP2's merchant check: the mandate's `checkout_hash` is the hash of the presenter's latest `checkout_jwt`, and a disclosed `checkout_jwt` is that JWT. Returns that JWT's payload. #### Parameters | Parameter | Type | | --------- | --------- | | `p` | `unknown` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `payload`: [`Payload`](#payload); }> *** ### checkoutJwtOf() > **checkoutJwtOf**(`m`): `Promise`\<`string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The `checkout_jwt` the mandate discloses. #### Parameters | Parameter | Type | | --------- | -------- | | `m` | `string` | #### Returns `Promise`\<`string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### jwsPayload() > **jwsPayload**(`j`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Payload`](#payload) The payload of a compact JWS, decoded as one JSON object. The signature is never verified. #### Parameters | Parameter | Type | | --------- | -------- | | `j` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Payload`](#payload) *** ### readMandate() > **readMandate**(`m`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MandateContent`](#mandatecontent)> The closed Checkout Mandate inside an SD-JWT: exactly one resolved object whose `vct` is `mandate.checkout.1`, its `checkout_hash`, and its `checkout_jwt` when disclosed. #### Parameters | Parameter | Type | | --------- | --------- | | `m` | `unknown` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MandateContent`](#mandatecontent)> *** ### tie() > **tie**(`options`): \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](#checkoutoption)\[]; }] The binding slot: the checkouts this ATR was minted for, each by its own `id`. #### Parameters | Parameter | Type | | --------- | ----------------------------------------------- | | `options` | readonly [`CheckoutOption`](#checkoutoption)\[] | #### Returns \[`"ap2"`, \{ `options`: readonly [`CheckoutOption`](#checkoutoption)\[]; }] --- # @integraledger/lcp/aptos > The exports of @integraledger/lcp/aptos. Source: https://lcp.integraledger.com/reference/api/aptos ## Interfaces ### AptosCommitted A committed user transaction as the REST API returns it. #### Properties | Property | Type | | ---------------------------- | -------------------- | | `expiration_timestamp_secs` | `string` | | `hash` | `string` | | `payload` | `object` | | `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 | | ----------------- | -------------------- | | `arguments` | readonly `string`\[] | | `chainId` | `number` | | `expiresAt` | `bigint` | | `function` | `string` | | `sender` | `` `0x${string}` `` | | `sequenceNumber` | `bigint` | | `typeArguments` | readonly `string`\[] | *** ### AptosPaymentPayload #### Properties | Property | Type | | --------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.transaction` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### AptosReader Bounded, read-only calls against one network's REST endpoint. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ----------------------- | | `network` | `readonly` | `` `aptos:${number}` `` | #### Methods ##### byHash() > **byHash**(`hash`): `Promise`\<[`AptosCommitted`](#aptoscommitted) | \{ `type`: `"pending_transaction"`; } | `null`> `GET /v1/transactions/by_hash/{hash}`; null on 404. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `hash` | `` `0x${string}` `` | ###### Returns `Promise`\<[`AptosCommitted`](#aptoscommitted) | \{ `type`: `"pending_transaction"`; } | `null`> ##### bySequence() > **bySequence**(`sender`, `n`): `Promise`\<[`AptosCommitted`](#aptoscommitted) | `null`> `GET /v1/accounts/{sender}/transactions?start=n&limit=1`, kept only when its `sequence_number` is n. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `sender` | `` `0x${string}` `` | | `n` | `bigint` | ###### Returns `Promise`\<[`AptosCommitted`](#aptoscommitted) | `null`> ##### ledger() > **ledger**(): `Promise`\<\{ `chainId`: `number`; `timestampUsecs`: `bigint`; }> `GET /v1`. ###### Returns `Promise`\<\{ `chainId`: `number`; `timestampUsecs`: `bigint`; }> *** ### AptosRef #### Properties | Property | Type | Description | | ----------------- | ----------------------- | ----------------------------------------------- | | `expiresAt` | `string` | - | | `idDigest` | `` `0x${string}` `` | - | | `network` | `` `aptos:${number}` `` | - | | `sender` | `` `0x${string}` `` | - | | `sequenceNumber` | `string` | Decimal strings. | | `transaction?` | `` `0x${string}` `` | The facilitator's transaction hash, once named. | *** ### AptosUnsigned #### Properties | Property | Type | | ------------------ | ---------------------------------------------------------------- | | `request` | `object` | | `request.accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `request.kind` | `"aptos-transaction"` | #### Methods ##### complete() > **complete**(`signed`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosPaymentPayload`](#aptospaymentpayload) ###### Parameters | Parameter | Type | | -------------------- | ----------------------------- | | `signed` | \{ `transaction`: `string`; } | | `signed.transaction` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosPaymentPayload`](#aptospaymentpayload) ## Type Aliases ### AptosNetwork > **AptosNetwork** = `` `aptos:${number}` `` CAIP-2: `aptos:` and the numeric chain id. *** ### AptosStatus > **AptosStatus** = \{ `state`: `"settled"`; `transaction`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `version`: `bigint`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"in-mempool"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"aborted"` | `"superseded"` | `"expired"`; } ## Variables ### exactAptos > `const` **exactAptos**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosUnsigned`](#aptosunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/aptos"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosRef`](#aptosref)>; `status`: (`ref`, `reader`) => `Promise`\<[`AptosStatus`](#aptosstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### aptosIdDigest() > **aptosIdDigest**(`i`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> SHA-256 over the RFC 8785 form of `{sender, sequenceNumber, function, typeArguments, arguments}`. #### Parameters | Parameter | Type | | --------- | ------------------------------------- | | `i` | [`AptosInstrument`](#aptosinstrument) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### aptosOptionCheck() > **aptosOptionCheck**(`option`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` The pairing's filter: undefined for an option this pairing can pay, or the refusal naming why not. #### Parameters | Parameter | Type | | --------- | --------- | | `option` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` *** ### aptosPairingOf() > **aptosPairingOf**(`option`): `"x402/exact/aptos"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/aptos"` | `undefined` *** ### aptosStatus() > **aptosStatus**(`ref`, `reader`): `Promise`\<[`AptosStatus`](#aptosstatus)> Finds the payer's transaction by the facilitator's hash when named, else by sender and sequence number, and identifies it by the transfer's digest. Only `success` decides a committed, matching transaction. A failed read, or a reader for another network, is pending. At most three calls. #### Parameters | Parameter | Type | | --------- | ----------------------------- | | `ref` | [`AptosRef`](#aptosref) | | `reader` | [`AptosReader`](#aptosreader) | #### Returns `Promise`\<[`AptosStatus`](#aptosstatus)> *** ### committedInstrument() > **committedInstrument**(`t`, `chainId`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosInstrument`](#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`](#aptoscommitted) | | `chainId` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosInstrument`](#aptosinstrument) *** ### decodeAptosTx() > **decodeAptosTx**(`transaction`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosInstrument`](#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. #### Parameters | Parameter | Type | | ------------- | -------- | | `transaction` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AptosInstrument`](#aptosinstrument) --- # @integraledger/lcp/avm > The exports of @integraledger/lcp/avm. Source: https://lcp.integraledger.com/reference/api/avm ## Interfaces ### 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 | | ---------- | ---------- | -------------------------- | | `network` | `readonly` | `` `algorand:${string}` `` | #### Methods ##### search() > **search**(`txid`): `Promise`\<\{ `currentRound`: `bigint`; `found`: \{ `confirmedRound`: `bigint`; `note`: `Uint8Array`; } | `null`; }> `GET /v2/transactions?txid=…` ###### Parameters | Parameter | Type | | --------- | -------- | | `txid` | `string` | ###### Returns `Promise`\<\{ `currentRound`: `bigint`; `found`: \{ `confirmedRound`: `bigint`; `note`: `Uint8Array`; } | `null`; }> *** ### AvmRef The read keys recorded at claim, computed from the signed bytes. `lastValid` is a decimal string, so the issuer stores the reference as JSON. #### Properties | Property | Type | | ------------ | -------------------------- | | `lastValid` | `string` | | `network` | `` `algorand:${string}` `` | | `txid` | `string` | *** ### 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` | - | | `request.kind` | `"algorand-txn"` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AvmPaymentPayload`](#avmpaymentpayload) A 64-byte Ed25519 signature. ###### Parameters | Parameter | Type | | ----------- | ------------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AvmPaymentPayload`](#avmpaymentpayload) ## Type Aliases ### AlgorandNetwork > **AlgorandNetwork** = `` `algorand:${string}` `` CAIP-2: the first 32 characters of the URL-safe base64 genesis hash. *** ### AvmPaymentPayload > **AvmPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<[`AvmPresented`](#avmpresented)> *** ### AvmStatus > **AvmStatus** = \{ `finality`: `"final"`; `round`: `bigint`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"expired"`; } ## Variables ### exactAvm > `const` **exactAvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AvmUnsigned`](#avmunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/algorand"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`AvmRef`](#avmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`AvmStatus`](#avmstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### MSGPACK\_MAX\_DEPTH > `const` **MSGPACK\_MAX\_DEPTH**: `32` = `32` The deepest nesting of msgpack arrays and maps in a signed transaction, the outermost container being level 1. An Algorand signed transaction nests three (the signed transaction, its transaction, and a map or array inside that). ## Functions ### avmCarrier() > **avmCarrier**(`p`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `lastValid`: `bigint`; `txid`: `string`; } The payment transaction of an x402 Algorand payload: `paymentGroup[paymentIndex]`, decoded as a signed asset transfer whose note is an LCP string. Gives the hash, the transaction id and the last valid round. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `p` | [`AvmPresented`](#avmpresented) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `lastValid`: `bigint`; `txid`: `string`; } *** ### avmPairingOf() > **avmPairingOf**(`o`): `"x402/exact/algorand"` | `undefined` The pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `o` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/algorand"` | `undefined` *** ### avmRecover() > **avmRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The hash from the landed payment's note, for anyone holding the transaction id. One call. #### Parameters | Parameter | Type | | ------------- | ------------------------------------------------------------- | | `ref` | \{ `network`: `` `algorand:${string}` ``; `txid`: `string`; } | | `ref.network` | `` `algorand:${string}` `` | | `ref.txid` | `string` | | `reader` | [`AvmReader`](#avmreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### avmStatus() > **avmStatus**(`ref`, `reader`): `Promise`\<[`AvmStatus`](#avmstatus)> Reads the payment by its id. Found is settled and final; absent after the last valid round is expired; otherwise pending. A failed read, or a reader for another network, is pending. #### Parameters | Parameter | Type | | --------- | ------------------------- | | `ref` | [`AvmRef`](#avmref) | | `reader` | [`AvmReader`](#avmreader) | #### Returns `Promise`\<[`AvmStatus`](#avmstatus)> *** ### msgpackWithinCaps() > **msgpackWithinCaps**(`b`): `boolean` True when `b` is exactly one msgpack value (the msgpack specification's formats) whose arrays and maps nest at most `MSGPACK_MAX_DEPTH` deep, and whose every declared length (a string's, binary's or extension's bytes, an array's elements, a map's keys and values) is no more than the bytes that remain, so no count is trusted past the input. The value is scanned, never built. #### Parameters | Parameter | Type | | --------- | ------------ | | `b` | `Uint8Array` | #### Returns `boolean` --- # @integraledger/lcp/card > The exports of @integraledger/lcp/card. Source: https://lcp.integraledger.com/reference/api/card ## 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`](#cardscheme) | *** ### CardPairing #### Type Parameters | Type Parameter | | -------------------------------------------------- | | `Id` *extends* [`CardPairingId`](#cardpairingid-1) | | `U` | #### Properties | Property | Type | | ---------- | ------------------------------------------------------------------------------------ | | `claims` | `boolean` | | `id` | `Id` | | `pattern` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern) | | `tie` | (`options`) => \[`"card"`, \{ `options`: readonly [`CardOption`](#cardoption)\[]; }] | #### Methods ##### advertise() > **advertise**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardValues`](#cardvalues) ###### Parameters | Parameter | Type | | --------------- | ---------------------------- | | `doc` | `Record`\<`string`, `never`> | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | [`CardOption`](#cardoption) | | `agreementUrl?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardValues`](#cardvalues) ##### bound() > **bound**(`presented`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ###### Parameters | Parameter | Type | | ----------- | --------- | | `presented` | `unknown` | ###### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ##### build() > **build**(`doc`, `h`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `U`> ###### Parameters | Parameter | Type | | --------- | ------------------- | | `doc` | `unknown` | | `h` | `` `0x${string}` `` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `U`> ##### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; } ###### Parameters | Parameter | Type | | --------- | --------- | | `doc` | `unknown` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; } ##### unplaced() > **unplaced**(`option`): [`CardOption`](#cardoption) ###### Parameters | Parameter | Type | | --------- | --------------------------- | | `option` | [`CardOption`](#cardoption) | ###### Returns [`CardOption`](#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 payment request as received: the two signature fields and every `lcp-hash` field line. #### Properties | Property | Type | | ----------------- | -------------------- | | `lcpHash` | readonly `string`\[] | | `signature` | `string` | | `signatureInput` | `string` | *** ### TapUnsigned What the agent's own RFC 9421 signer adds: the field, its value, and the component it lists. #### Properties | Property | Type | | ------------ | ------------------- | | `component` | `"lcp-hash"` | | `field` | `"lcp-hash"` | | `value` | `` `0x${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` | *** ### 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"` *** ### CardScheme > **CardScheme** = `"visa-tap"` | `"mastercard-vi"` | `"seller-reference"` ## Variables ### sellerReference > `const` **sellerReference**: [`CardPairing`](#cardpairing)\<`"card/seller-reference"`, `never`> *** ### TAP\_FIELD > `const` **TAP\_FIELD**: `"lcp-hash"` = `"lcp-hash"` *** ### viAutonomous > `const` **viAutonomous**: [`CardPairing`](#cardpairing)\<`"card/mastercard-vi/autonomous"`, [`ViUnsigned`](#viunsigned)> *** ### viImmediate > `const` **viImmediate**: [`CardPairing`](#cardpairing)\<`"card/mastercard-vi/immediate"`, [`ViUnsigned`](#viunsigned)> *** ### visaTap > `const` **visaTap**: [`CardPairing`](#cardpairing)\<`"card/visa-tap"`, [`TapUnsigned`](#tapunsigned)> ## 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`> *** ### pairingsOf() > **pairingsOf**(`o`): readonly [`CardPairingId`](#cardpairingid-1)\[] The pairings a well-formed option can be paid through: Verifiable Intent has two. Anything else has none. #### Parameters | Parameter | Type | | --------- | --------------------------- | | `o` | [`CardOption`](#cardoption) | #### Returns readonly [`CardPairingId`](#cardpairingid-1)\[] *** ### tie() > **tie**(`options`): \[`"card"`, \{ `options`: readonly [`CardOption`](#cardoption)\[]; }] The binding slot: every card option offered at this checkout, exactly as issued. #### Parameters | Parameter | Type | | --------- | --------------------------------------- | | `options` | readonly [`CardOption`](#cardoption)\[] | #### Returns \[`"card"`, \{ `options`: readonly [`CardOption`](#cardoption)\[]; }] --- # @integraledger/lcp/cardano > The exports of @integraledger/lcp/cardano. Source: https://lcp.integraledger.com/reference/api/cardano ## 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`. | *** ### CardanoPayload The payload x402's Cardano scheme defines. #### Properties | Property | Type | | -------------- | -------- | | `nonce` | `string` | | `transaction` | `string` | *** ### CardanoPaymentPayload #### Properties | Property | Type | | -------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`CardanoPayload`](#cardanopayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### CardanoReader Bounded, read-only calls against one network's indexer. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ----------------------------------- | | `network` | `readonly` | [`CardanoNetwork`](#cardanonetwork) | #### Methods ##### tip() > **tip**(): `Promise`\<\{ `blockHeight`: `bigint`; `slot`: `bigint`; }> ###### Returns `Promise`\<\{ `blockHeight`: `bigint`; `slot`: `bigint`; }> ##### transaction() > **transaction**(`txId`, `withCbor`): `Promise`\<[`CardanoOnChain`](#cardanoonchain) | `null`> ###### Parameters | Parameter | Type | | ---------- | ------------------- | | `txId` | `` `0x${string}` `` | | `withCbor` | `boolean` | ###### Returns `Promise`\<[`CardanoOnChain`](#cardanoonchain) | `null`> *** ### CardanoRef #### Properties | Property | Type | Description | | ---------- | ----------------------------------- | --------------------------------------------------------------- | | `network` | [`CardanoNetwork`](#cardanonetwork) | - | | `ttlSlot` | `string` | The last slot the transaction can land in, as a decimal string. | | `txId` | `` `0x${string}` `` | - | *** ### CardanoTx #### Properties | Property | Type | | ---------- | ---------------------------------------------------------- | | `h` | `` `0x${string}` `` \| [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | | `ttlSlot` | `bigint` \| `null` | | `txId` | `` `0x${string}` `` | *** ### CardanoUnsigned #### Properties | Property | Type | | ----------------------- | ---------------------------------------------------------------- | | `request` | `object` | | `request.accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `request.auxiliaryData` | `Uint8Array` | | `request.kind` | `"cardano-transaction"` | #### Methods ##### complete() > **complete**(`signed`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardanoPaymentPayload`](#cardanopaymentpayload)> ###### Parameters | Parameter | Type | | --------- | ----------------------------------- | | `signed` | [`CardanoPayload`](#cardanopayload) | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardanoPaymentPayload`](#cardanopaymentpayload)> ## Type Aliases ### CardanoNetwork > **CardanoNetwork** = `"cardano:mainnet"` | `"cardano:preprod"` | `"cardano:preview"` *** ### CardanoStatus > **CardanoStatus** = \{ `blockHeight`: `bigint`; `confirmations`: `bigint`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"phase-2-invalid"` | `"expired"`; } ## Variables ### exactCardano > `const` **exactCardano**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardanoUnsigned`](#cardanounsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/cardano"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardanoRef`](#cardanoref)>; `status`: (`ref`, `reader`) => `Promise`\<[`CardanoStatus`](#cardanostatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### 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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### cardanoOptionCheck() > **cardanoOptionCheck**(`option`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` The pairing's filter: undefined for an option this pairing can pay, or the refusal naming why not. #### Parameters | Parameter | Type | | --------- | --------- | | `option` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` *** ### cardanoPairingOf() > **cardanoPairingOf**(`option`): `"x402/exact/cardano"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/cardano"` | `undefined` *** ### cardanoRecover() > **cardanoRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Reads the hash back from the included transaction alone, by its id. One call. #### Parameters | Parameter | Type | | ------------- | --------------------------------------------------------------------------------- | | `ref` | \{ `network`: [`CardanoNetwork`](#cardanonetwork); `txId`: `` `0x${string}` ``; } | | `ref.network` | [`CardanoNetwork`](#cardanonetwork) | | `ref.txId` | `` `0x${string}` `` | | `reader` | [`CardanoReader`](#cardanoreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### cardanoStatus() > **cardanoStatus**(`ref`, `reader`): `Promise`\<[`CardanoStatus`](#cardanostatus)> Reads the recorded id. A failed read, or a reader for another network, is pending. An absent transaction is expired once the tip's slot is past its TTL; a present one fails only when the ledger marks it invalid. Two calls. #### Parameters | Parameter | Type | | --------- | --------------------------------- | | `ref` | [`CardanoRef`](#cardanoref) | | `reader` | [`CardanoReader`](#cardanoreader) | #### Returns `Promise`\<[`CardanoStatus`](#cardanostatus)> *** ### decodeCardanoTx() > **decodeCardanoTx**(`base64`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CardanoTx`](#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#refusal) | [`CardanoTx`](#cardanotx)> --- # @integraledger/lcp/casper > The exports of @integraledger/lcp/casper. Source: https://lcp.integraledger.com/reference/api/casper ## Interfaces ### CasperCall One executed contract call, as the reader reports it. #### Properties | Property | Type | | -------------- | -------------------------------- | | `args` | `object` | | `args.from?` | `string` | | `args.nonce?` | `Uint8Array`\<`ArrayBufferLike`> | | `args.to?` | `string` | | `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#paymentrequirements) | | `from` | `string` | | `now` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | *** ### CasperReader Bounded, read-only calls against one network's node. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ------------------------ | | `network` | `readonly` | `` `casper:${string}` `` | #### Methods ##### transaction() > **transaction**(`hash`): `Promise`\<[`CasperCall`](#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`](#caspercall) | `null`> *** ### CasperRef The read keys recorded at claim. #### Properties | Property | Type | | --------------- | ------------------------ | | `asset` | `string` | | `idDigest` | `` `0x${string}` `` | | `network` | `` `casper:${string}` `` | | `settleBy` | `number` | | `transaction?` | `string` | *** ### CasperUnsigned #### Properties | Property | Type | | ------------------- | --------------------------------------- | | `request` | `object` | | `request.kind` | `"casper-eip712"` | | `request.typedData` | [`Cep3009TypedData`](#cep3009typeddata) | #### Methods ##### complete() > **complete**(`publicKey`, `signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CasperPaymentPayload`](#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#refusal) | [`CasperPaymentPayload`](#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#field)\[] | - | | `types.TransferWithAuthorization` | [`Field`](https://lcp.integraledger.com/reference/api/evm#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. *** ### CasperPaymentPayload > **CasperPaymentPayload** = `object` #### Properties | Property | Type | | ----------------------- | ------------------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired)\[`"extensions"`] | | `payload` | `object` | | `payload.authorization` | [`CasperAuthorization`](#casperauthorization) | | `payload.publicKey` | `string` | | `payload.signature` | `string` | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired)\[`"resource"`] | | `x402Version` | `2` | *** ### CasperStatus > **CasperStatus** = \{ `blockHeight`: `bigint`; `finality`: `"finalized"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"not-executed"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"reverted"` | `"not-this-instrument"`; } *** ### PackageHash > **PackageHash** = `string` 64 hex digits, no prefix. ## Variables ### CASPER\_DOMAIN\_TYPEHASH > `const` **CASPER\_DOMAIN\_TYPEHASH**: `"0xe20dd13933eeb9d6099b53d5ffd59cfd50fe774983038681a378371664fad4fb"` keccak256("EIP712Domain(string name,string version,string chain\_name,bytes32 contract\_package\_hash)") *** ### exactCasper > `const` **exactCasper**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/x402#x402advertise); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CasperUnsigned`](#casperunsigned)>; `claims`: `boolean`; `id`: `"x402/exact/casper"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CasperRef`](#casperref)>; `status`: (`ref`, `reader`) => `Promise`\<[`CasperStatus`](#casperstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### casperIdDigest() > **casperIdDigest**(`from`, `to`, `value`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> 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`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### casperOption() > **casperOption**(`o`): `o is PaymentRequirements` The pairing's filter: an `exact` option on a `casper:` network that `build` can turn into typed data. #### Parameters | Parameter | Type | | --------- | --------- | | `o` | `unknown` | #### Returns `o is PaymentRequirements` *** ### casperRecover() > **casperRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The hash from a settlement transaction alone: the `nonce` argument of the executed authorization call on `asset`. #### Parameters | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------------- | | `ref` | \{ `asset`: `string`; `network`: `` `casper:${string}` ``; `transaction`: `string`; } | | `ref.asset` | `string` | | `ref.network` | `` `casper:${string}` `` | | `ref.transaction` | `string` | | `reader` | [`CasperReader`](#casperreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### casperStatus() > **casperStatus**(`ref`, `reader`): `Promise`\<[`CasperStatus`](#casperstatus)> Reads the named transaction. Settled, at the height of its block, when it executed without error as a call to `ref.asset`'s `transfer_with_authorization` or `receive_with_authorization` whose `nonce` argument is `h` and whose `from`, `to` and `value` hash to `ref.idDigest`. A failed read, or a reader for another network, is pending. #### Parameters | Parameter | Type | | --------- | ------------------------------------ | | `ref` | [`CasperRef`](#casperref) & `object` | | `reader` | [`CasperReader`](#casperreader) | #### Returns `Promise`\<[`CasperStatus`](#casperstatus)> *** ### cep3009TypedData() > **cep3009TypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Cep3009TypedData`](#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#refusal) | [`Cep3009TypedData`](#cep3009typeddata) --- # @integraledger/lcp/ccd > The exports of @integraledger/lcp/ccd. Source: https://lcp.integraledger.com/reference/api/ccd ## Interfaces ### CcdChoice #### Properties | Property | Type | | ----------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `now` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | *** ### CcdReader Bounded, read-only calls against one network's node. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | --------------------- | | `network` | `readonly` | `` `ccd:${string}` `` | #### Methods ##### item() > **item**(`hash`): `Promise`\<[`CcdItem`](#ccditem) | `null`> gRPC v2 `GetBlockItemStatus`; null when the node does not know the item. ###### Parameters | Parameter | Type | | --------- | -------- | | `hash` | `string` | ###### Returns `Promise`\<[`CcdItem`](#ccditem) | `null`> *** ### CcdRef The read keys recorded at claim. #### Properties | Property | Type | | --------------- | --------------------- | | `asset` | `string` | | `idDigest` | `` `0x${string}` `` | | `network` | `` `ccd:${string}` `` | | `settleBy` | `number` | | `transaction?` | `string` | *** ### CcdTransfer #### Properties | Property | Type | | ----------- | ------------------------------------------ | | `amount` | `bigint` | | `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` | | `request.network` | `` `ccd:${string}` `` | | `request.sponsor` | `string` | | `request.toAddress` | `string` | #### Methods ##### complete() > **complete**(`signedTransaction`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CcdPaymentPayload`](#ccdpaymentpayload) Takes the sender-signed V1 sponsored transaction in the SDK's `signableToJSON` form. ###### Parameters | Parameter | Type | | ------------------- | ----------------------------- | | `signedTransaction` | [`Json`](https://lcp.integraledger.com/reference/api#json) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CcdPaymentPayload`](#ccdpaymentpayload) ## Type Aliases ### CcdItem > **CcdItem** = \{ `state`: `"received"`; } | \{ `state`: `"committed"`; } | \{ `sender`: `Uint8Array` | `null`; `state`: `"finalized"`; `success`: `boolean`; `transfers`: readonly [`CcdTransfer`](#ccdtransfer)\[]; } *** ### CcdNetwork > **CcdNetwork** = `` `ccd:${string}` `` CAIP-2: `ccd:` and the first 32 lowercase hex digits of the genesis block hash. *** ### CcdPaymentPayload > **CcdPaymentPayload** = `object` #### Properties | Property | Type | | --------------------------- | ------------------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired)\[`"extensions"`] | | `payload` | `object` | | `payload.signedTransaction` | `object` | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired)\[`"resource"`] | | `x402Version` | `2` | *** ### CcdStatus > **CcdStatus** = \{ `finality`: `"finalized"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"received"` | `"committed"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"rejected"` | `"not-this-instrument"`; } ## Variables ### exactCcd > `const` **exactCcd**: `Readonly`\<\{ `advertise`: [`X402Advertise`](https://lcp.integraledger.com/reference/api/x402#x402advertise); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CcdUnsigned`](#ccdunsigned)>; `claims`: `boolean`; `id`: `"x402/exact/ccd"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CcdRef`](#ccdref)>; `status`: (`ref`, `reader`) => `Promise`\<[`CcdStatus`](#ccdstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### accountBytes() > **accountBytes**(`address`): `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### ccdIdDigest() > **ccdIdDigest**(`sender`, `receiver`, `amount`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> SHA-256 over the 32 + 32 bytes of the two accounts and the amount as a 32-byte big-endian integer. #### Parameters | Parameter | Type | | ---------- | ------------ | | `sender` | `Uint8Array` | | `receiver` | `Uint8Array` | | `amount` | `bigint` | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### ccdMemo() > **ccdMemo**(`h`): `Uint8Array` The CBOR text string of `toLcpString(h)`: `78 4d` and the 77 ASCII bytes. #### Parameters | Parameter | Type | | --------- | ------------------- | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array` *** ### ccdOption() > **ccdOption**(`o`): `o is PaymentRequirements` The pairing's filter: an `exact` option on a `ccd:` network, for CCD or a token symbol, whose `payTo` and `extra.feePayer` are base58check account addresses. #### Parameters | Parameter | Type | | --------- | --------- | | `o` | `unknown` | #### Returns `o is PaymentRequirements` *** ### ccdRecover() > **ccdRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The hash from a settlement block item alone: its one memo-carrying transfer's memo, through `memoCarrier`. #### Parameters | Parameter | Type | | ----------------- | --------------------------------------------------------------- | | `ref` | \{ `network`: `` `ccd:${string}` ``; `transaction`: `string`; } | | `ref.network` | `` `ccd:${string}` `` | | `ref.transaction` | `string` | | `reader` | [`CcdReader`](#ccdreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### ccdStatus() > **ccdStatus**(`ref`, `reader`): `Promise`\<[`CcdStatus`](#ccdstatus)> Reads the named block item. Settled when it is finalized and successful, with exactly one transfer whose memo `memoCarrier` reads as `ref.h` (a PLT memo with tag 24 unwrapped) and whose sender, receiver and amount hash to `ref.idDigest`. Not final, unknown or unreadable is pending; a reader for another network is pending. #### Parameters | Parameter | Type | | --------- | ------------------------------ | | `ref` | [`CcdRef`](#ccdref) & `object` | | `reader` | [`CcdReader`](#ccdreader) | #### Returns `Promise`\<[`CcdStatus`](#ccdstatus)> *** ### memoCarrier() > **memoCarrier**(`memo`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### pltMemo() > **pltMemo**(`h`): `Uint8Array` CBOR tag 24 around a byte string holding `ccdMemo(h)`: `d8 18 58 4f` and the 79 bytes. #### Parameters | Parameter | Type | | --------- | ------------------- | | `h` | `` `0x${string}` `` | #### Returns `Uint8Array` --- # @integraledger/lcp/discovery > The exports of @integraledger/lcp/discovery. Source: https://lcp.integraledger.com/reference/api/discovery ## 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` *** ### WELL\_KNOWN\_PATH > `const` **WELL\_KNOWN\_PATH**: `"/.well-known/legal-context.json"` = `"/.well-known/legal-context.json"` ## Functions ### emit() > **emit**(`document`): `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The document's bytes: its checked members in table order, `atrHash` in lowercase, and no other member. #### Parameters | Parameter | Type | | ---------- | ----------------------------------------------- | | `document` | [`LegalContextDocument`](#legalcontextdocument) | #### Returns `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### parse() > **parse**(`bytes`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `document`: [`LegalContextDocument`](#legalcontextdocument); `ignored`: `string`\[]; } One UTF-8 JSON object of at most `MAX_DOCUMENT_BYTES`, checked as LCP §2 states. 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#refusal) | \{ `document`: [`LegalContextDocument`](#legalcontextdocument); `ignored`: `string`\[]; } --- # @integraledger/lcp/evm > The exports of @integraledger/lcp/evm. Source: https://lcp.integraledger.com/reference/api/evm ## Classes ### ReaderError #### Extends * `Error` #### Constructors ##### Constructor > **new ReaderError**(`kind`, `message?`): [`ReaderError`](#readererror) ###### Parameters | Parameter | Type | | ---------- | -------------------------------------------------------------- | | `kind` | `"transport"` \| `"timeout"` \| `"too-large"` \| `"malformed"` | | `message?` | `string` | ###### Returns [`ReaderError`](#readererror) ###### Overrides `Error.constructor` #### Properties | Property | Modifier | Type | Description | Inherited from | | ------------------ | ---------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | | `cause?` | `public` | `unknown` | - | `Error.cause` | | `kind` | `readonly` | `"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](https://v8.dev/docs/stack-trace-api#customizing-stack-traces) ###### Inherited from `Error.prepareStackTrace` ## Interfaces ### Delegation #### Properties | Property | Type | | ------------ | ------------------- | | `authority` | `` `0x${string}` `` | | `caveats` | `object`\[] | | `delegate` | `` `0x${string}` `` | | `delegator` | `` `0x${string}` `` | | `salt` | `` `0x${string}` `` | | `signature` | `` `0x${string}` `` | *** ### 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`](#field)\[] | | `types.TransferWithAuthorization` | [`Field`](#field)\[] | *** ### EvmLog One receipt log: the emitter, its topics and its data. #### 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 with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ------------------------------------------- | | `network` | `readonly` | `` `eip155:${string}` `` \| `HederaNetwork` | #### Methods ##### blockNumber() > **blockNumber**(`tag`): `Promise`\<`bigint`> `eth_getBlockByNumber(tag, false).number`. ###### Parameters | Parameter | Type | | --------- | ------------------------- | | `tag` | `"safe"` \| `"finalized"` | ###### Returns `Promise`\<`bigint`> ##### receipt() > **receipt**(`tx`): `Promise`\<[`EvmReceipt`](#evmreceipt) | `null`> `eth_getTransactionReceipt`; null when the node holds none. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmReceipt`](#evmreceipt) | `null`> ##### transaction() > **transaction**(`tx`): `Promise`\<[`EvmTransaction`](#evmtransaction) | `null`> `eth_getTransactionByHash`: the recipient (null for a contract creation) and the calldata; null when none. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`EvmTransaction`](#evmtransaction) | `null`> *** ### EvmReceipt #### Properties | Property | Type | | -------------- | ------------------------------- | | `blockNumber` | `bigint` | | `logs` | readonly [`EvmLog`](#evmlog)\[] | | `status` | `0` \| `1` | *** ### EvmRef What the issuer records at claim for an EVM payment: read keys only. #### Extended by * [`SessionRef`](https://lcp.integraledger.com/reference/api/mpp#sessionref) #### Properties | Property | Type | Description | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | `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` | - | | `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?` | `object` | The token transfer this payment made, identified by the digest of the named fields. | | `transferLog.address` | `` `0x${string}` `` | - | | `transferLog.digest` | `` `0x${string}` `` | - | | `transferLog.identity` | [`TransferIdentity`](#transferidentity) | - | | `transferLog.topic0` | `` `0x${string}` `` | - | *** ### EvmTransaction A transaction as `eth_getTransactionByHash` gives it: `to` and `input`. #### Properties | Property | Type | | -------- | ----------------------------- | | `input` | `` `0x${string}` `` | | `to` | `` `0x${string}` `` \| `null` | *** ### EvmTxRef #### Properties | Property | Type | | -------------- | ------------------------ | | `asset` | `` `0x${string}` `` | | `network` | `` `eip155:${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}` `` | *** ### 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`](#field)\[] | | `types.TokenPermissions` | [`Field`](#field)\[] | ## Type Aliases ### Eip155 > **Eip155** = `` `eip155:${string}` `` CAIP-2 for EVM chains; the reference is the decimal chain id. *** ### Eip3009Ref > **Eip3009Ref** = [`EvmRef`](#evmref) & `object` What a settlement reference holds for an EIP-3009 payment: read keys only. It is an `EvmRef` naming the `AuthorizationUsed` log and the transfer's identity, with the token, `validBefore` and the transfer digest. #### Type Declaration | Name | Type | Description | | ------------------- | ------------------- | ------------------------------------------------------------------------------------------------------- | | `asset` | [`Hex`](#hex) | - | | `idDigest` | [`Hex`](#hex) | - | | `maxTimeoutSeconds` | `number` | The option's `maxTimeoutSeconds`: the authorization was signed no earlier than `validBefore` less this. | | `network` | [`Eip155`](#eip155) | - | | `validBefore` | `string` | - | *** ### EvmBreadthStatus > **EvmBreadthStatus** = [`EvmStatus`](#evmstatus) | \{ `state`: `"failed"`; `why`: `"binding-log-not-found"` | `"transfer-not-found"` | `"receive-policy-blocked"`; } *** ### EvmStatus > **EvmStatus** = \{ `blockNumber`: `bigint`; `finality`: `"latest"` | `"safe"` | `"finalized"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"reverted"` | `"authorization-not-used"`; } *** ### Hex > **Hex** = `` `0x${string}` `` *** ### ReceiveTypedData > **ReceiveTypedData** = `Omit`\<[`Eip3009TypedData`](#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`](#field)\[] | | `types.ReceiveWithAuthorization` | [`Field`](#field)\[] | *** ### TransferIdentity > **TransferIdentity** = `"from,to,value"` | `"from,to"` | `"from"` | `"to,value"` | `"to"` ## Variables ### 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 whose deployment record holds a DelegationManager at `DELEGATION_MANAGER`. *** ### 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"` *** ### PAYMENT\_AUTHORIZED\_TOPIC > `const` **PAYMENT\_AUTHORIZED\_TOPIC**: `"0x1c81fb2e3bab27f6bb09bee9a0dddf61600b7cbaf2c12683e4864e0cbdb9d284"` *** ### PAYMENT\_INFO\_TYPEHASH > `const` **PAYMENT\_INFO\_TYPEHASH**: `"0xae68ac7ce30c86ece8196b61a7c486d8f0061f575037fbd34e7fe4e2820c6591"` *** ### PERMIT2 > `const` **PERMIT2**: `"0x000000000022D473030F116dDEE9F6B43aC78BA3"` *** ### RECEIVE\_POLICY\_GUARD > `const` **RECEIVE\_POLICY\_GUARD**: `"0xb10c000000000000000000000000000000000000"` Where a Tempo receive policy sends a blocked transfer. *** ### REDEEMED\_DELEGATION\_TOPIC > `const` **REDEEMED\_DELEGATION\_TOPIC**: `"0x40dadaa36c6c2e3d7317e24757451ffb2d603d875f0ad5e92c5dd156573b1873"` *** ### SALT\_BINDING\_TYPEHASH > `const` **SALT\_BINDING\_TYPEHASH**: `"0x8a2a7e41a0bda000ded071ff38b79401d2603e1826516ff2635b11fe9e30877f"` *** ### 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)") *** ### UPTO\_PERMIT2\_PROXY > `const` **UPTO\_PERMIT2\_PROXY**: `"0x4020A4f3b7b90ccA423B9fabCc0CE57C6C240002"` ## Functions ### authorizationIdDigest() > **authorizationIdDigest**(`from`, `to`, `value`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> 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`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### bindSalt() > **bindSalt**(`receiverAuthorizer`, `policy`, `h`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) keccak256(abi.encode(SALT\_BINDING\_TYPEHASH, receiverAuthorizer, policy, h)). #### Parameters | Parameter | Type | | -------------------- | ------------------- | | `receiverAuthorizer` | `` `0x${string}` `` | | `policy` | `` `0x${string}` `` | | `h` | `` `0x${string}` `` | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### carriesBinding() > **carriesBinding**(`log`, `b`): `boolean` A log from `address` whose topic `index`, or data word `dataWord`, equals `value` by bytes, under `topic0`. #### Parameters | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `log` | [`EvmLog`](#evmlog) | | `b` | `NonNullable`\<\{ address: \`0x$\{string}\`; topic0: \`0x$\{string}\`; value: \`0x$\{string}\`; } & (\{ index: 2 \| 1 \| 3; } \| \{ dataWord: number; }) \| `undefined`> | #### Returns `boolean` *** ### decodePermissionContext() > **decodePermissionContext**(`ctx`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Delegation`](#delegation)\[] Decodes `abi.encode(Delegation[])`, strictly: every offset and length lies inside the input and is 32-byte aligned, address words carry 12 zero bytes, and there are at most 8 delegations, 16 caveats each, and 8 KiB per `bytes`. 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#refusal) | [`Delegation`](#delegation)\[] *** ### eip3009Recover() > **eip3009Recover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Recovers the hash from a settlement transaction alone: the one distinct nonce among the `AuthorizationUsed` logs that `asset` emitted in it. One call. #### Parameters | Parameter | Type | | --------- | ------------------------- | | `ref` | [`EvmTxRef`](#evmtxref) | | `reader` | [`EvmReader`](#evmreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### eip3009Status() > **eip3009Status**(`ref`, `reader`): `Promise`\<[`EvmStatus`](#evmstatus)> Reads the named transaction. Settled when its receipt succeeded and holds a log from `asset` with exactly three topics, the first `AuthorizationUsed` and the third equal to `h`; the finality is the highest block mark at or above the receipt's block. A failed read, or a reader for another network, is pending, never failed. At most three calls. #### Parameters | Parameter | Type | | --------- | ---------------------------------- | | `ref` | [`EvmTxRef`](#evmtxref) & `object` | | `reader` | [`EvmReader`](#evmreader) | #### Returns `Promise`\<[`EvmStatus`](#evmstatus)> *** ### eip3009TypedData() > **eip3009TypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Eip3009TypedData`](#eip3009typeddata) The EIP-712 typed data for `TransferWithAuthorization`, with the field lists in ERC-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#refusal) | [`Eip3009TypedData`](#eip3009typeddata) *** ### evmStatus() > **evmStatus**(`ref`, `reader`): `Promise`\<[`EvmBreadthStatus`](#evmbreadthstatus)> Reads the named transaction. A reader for another network, or a failed read, is pending; no receipt is pending `not-found`; a revert is failed. On success each log the ref names must be present, emitted by the named contract: the binding log with `value` in its topic or data word, and the transfer log whose `from`, `to` and `value` hash to the digest. Settled carries the highest finality mark reached. At most three calls. #### Parameters | Parameter | Type | | --------- | ------------------------------ | | `ref` | [`EvmRef`](#evmref) & `object` | | `reader` | [`EvmReader`](#evmreader) | #### Returns `Promise`\<[`EvmBreadthStatus`](#evmbreadthstatus)> *** ### isLog() > **isLog**(`l`): `l is EvmLog` True for a log with a string address, string topics and string data. #### Parameters | Parameter | Type | | --------- | --------- | | `l` | `unknown` | #### Returns `l is EvmLog` *** ### isReceipt() > **isReceipt**(`r`): `r is EvmReceipt` True for a receipt with a 0 or 1 status, a bigint block number and a list of logs. #### Parameters | Parameter | Type | | --------- | --------- | | `r` | `unknown` | #### Returns `r is EvmReceipt` *** ### paymentHash() > **paymentHash**(`chainId`, `escrow`, `p`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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`](#paymentinfo) | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### permit2TypedData() > **permit2TypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Permit2TypedData`](#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. #### 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`](#field)\[]; `type`: `string`; `value`: \{\[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#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`](#field)\[]; `type`: `string`; `value`: \{\[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json); }; } | | `a.witness.fields` | readonly [`Field`](#field)\[] | | `a.witness.type` | `string` | | `a.witness.value` | \{\[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json); } | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Permit2TypedData`](#permit2typeddata) *** ### receiveTypedData() > **receiveTypedData**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ReceiveTypedData`](#receivetypeddata) The EIP-712 typed data for `ReceiveWithAuthorization`, built as `eip3009TypedData` builds its transfer form. #### 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#refusal) | [`ReceiveTypedData`](#receivetypeddata) *** ### redeemedLeafRecover() > **redeemedLeafRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Recovers H from a settlement transaction through MetaMask's DelegationManager: among its `RedeemedDelegation` logs, the leaves are those whose data word 1 (the delegate) is the redeemer in topic 2 or the wildcard delegate; exactly one distinct leaf salt (data word 5) is H. One call. #### Parameters | Parameter | Type | | ----------------- | ----------------------------------------------------------------------------- | | `ref` | \{ `network`: `` `eip155:${string}` ``; `transaction`: `` `0x${string}` ``; } | | `ref.network` | `` `eip155:${string}` `` | | `ref.transaction` | `` `0x${string}` `` | | `reader` | [`EvmReader`](#evmreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### settledAt() > **settledAt**(`at`, `reader`): `Promise`\<[`EvmStatus`](#evmstatus) & `object`> Settled at the highest finality mark whose block is at or above `at`; a failed mark read counts as not reached. #### Parameters | Parameter | Type | | --------- | ------------------------- | | `at` | `bigint` | | `reader` | [`EvmReader`](#evmreader) | #### Returns `Promise`\<[`EvmStatus`](#evmstatus) & `object`> *** ### transferDigest() > **transferDigest**(`v`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> 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`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### transferParts() > **transferParts**(`log`, `address`, `topic0`): \{ `from`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `value`: `bigint`; } | `undefined` `from` and `to` from topics 1 and 2 (their low 20 bytes) and `value` from data word 0, for a log from `address` under `topic0`. An ERC-20 `Transfer` has exactly three topics; an event that also indexes a memo has four. #### Parameters | Parameter | Type | | --------- | ------------------- | | `log` | [`EvmLog`](#evmlog) | | `address` | `` `0x${string}` `` | | `topic0` | `` `0x${string}` `` | #### Returns \{ `from`: `` `0x${string}` ``; `to`: `` `0x${string}` ``; `value`: `bigint`; } | `undefined` --- # @integraledger/lcp/hedera > The exports of @integraledger/lcp/hedera. Source: https://lcp.integraledger.com/reference/api/hedera ## Interfaces ### ExecutorRef #### Properties | Property | Type | Description | | --------------- | --------------------------------- | ---------------------------------------------------------------- | | `asset` | `string` | - | | `idDigest` | `` `0x${string}` `` | - | | `network` | [`HederaNetwork`](#hederanetwork) | - | | `settleBy` | `number` | Unix seconds: claim time plus `maxTimeoutSeconds`. | | `transaction?` | `string` | The facilitator's `SettlementResponse.transaction`, mirror form. | *** ### HederaBody #### Properties | Property | Type | Description | | ---------------- | --------------------------- | --------------------------------------- | | `bodyBytes` | `Uint8Array` | - | | `id` | [`HederaTxId`](#hederatxid) | - | | `memo` | `string` | - | | `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}` `` | *** ### HederaReader Bounded, read-only calls against one network's Mirror Node. Every failure rejects. #### Properties | Property | Modifier | Type | | ---------- | ---------- | --------------------------------- | | `network` | `readonly` | [`HederaNetwork`](#hederanetwork) | #### Methods ##### transactions() > **transactions**(`mirrorId`): `Promise`\ `GET /api/v1/transactions/{id}`; null on 404. ###### Parameters | Parameter | Type | | ---------- | -------- | | `mirrorId` | `string` | ###### Returns `Promise`\ *** ### HederaRef The read keys recorded at claim, taken from the signed body. #### Properties | Property | Type | Description | | ---------------- | --------------------------------- | -------------------------------------------------- | | `expectMemo` | `string` | - | | `network` | [`HederaNetwork`](#hederanetwork) | - | | `transactionId` | `string` | Mirror form. | | `validUntil` | `number` | Unix seconds: valid start plus the valid duration. | *** ### HederaTxId #### Properties | Property | Type | Description | | ---------- | -------- | ----------------- | | `account` | `string` | "shard.realm.num" | | `nanos` | `number` | - | | `seconds` | `bigint` | - | *** ### HederaUnsigned The body the payer signs, and how its signature completes the wire transaction. #### Properties | Property | Type | Description | | -------------------- | --------------- | ---------------------------------------------------------------------------------------- | | `request` | `object` | `broadcast: true` when the payer's signer signs and broadcasts the body itself (a push). | | `request.bodyBytes` | `Uint8Array` | - | | `request.broadcast?` | `true` | - | | `request.kind` | `"hedera-body"` | - | #### Methods ##### complete() > **complete**(`s`): `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#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#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 | | ---------------------- | -------------------- | | `consensus_timestamp` | `string` | | `memo_base64` | `string` \| `null` | | `nonce` | `number` | | `result` | `string` | | `scheduled` | `boolean` | | `token_transfers?` | readonly `object`\[] | | `transfers?` | readonly `object`\[] | ## Type Aliases ### ExecutorPayload > **ExecutorPayload** = `object` The x402 `transferExecutor` payload. #### Properties | Property | Type | | ---------------- | ------------------------------- | | `authorization` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | | `executor` | `string` | | `payer` | `string` | *** ### ExecutorPaymentPayload > **ExecutorPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<[`ExecutorPayload`](#executorpayload)> *** ### 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#hex) | | `escrow` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | | `network` | `HederaNetwork` | | `phase` | `"close"` | | `search` | `object` | | `search.address` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | | `search.topics` | readonly ([`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) \| `null`)\[] | | `transaction` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | *** ### HederaEvmReader > **HederaEvmReader** = `Omit`\<[`EvmReader`](https://lcp.integraledger.com/reference/api/evm#evmreader), `"network"`> & `object` A reader of a Hedera network's JSON-RPC relay: an `EvmReader` on a `hedera:` network. #### Type Declaration | Name | Type | | --------- | --------------- | | `network` | `HederaNetwork` | *** ### HederaLandedCharge > **HederaLandedCharge** = [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp#mppcredential) & `object` A Hedera charge credential with what `fetchPresented` read: the network, and for a push the landed memo. #### Type Declaration | Name | Type | | ---------------- | --------------------------------- | | `landed` | `object` | | `landed.memo?` | `string` | | `landed.network` | [`HederaNetwork`](#hederanetwork) | *** ### HederaNetwork > **HederaNetwork** = `"hedera:mainnet"` | `"hedera:testnet"` | `"hedera:previewnet"` | `"hedera:devnet"` *** ### 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/x402#x402payment)\<[`HederaPayload`](#hederapayload)> *** ### HederaSessionRef > **HederaSessionRef** = `Omit`\<[`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref), `"network"`> & `object` The opening's read keys: the reported open transaction and its `ChannelOpened` log from the escrow. #### Type Declaration | Name | Type | | ------------- | ------------------------------- | | `network` | `HederaNetwork` | | `transaction` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | *** ### HederaStatus > **HederaStatus** = \{ `consensus`: `string`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"not-this-instrument"` | `` `result:${string}` ``; } *** ### MppHederaRequest > **MppHederaRequest** = `object` An MPP Hedera charge request as decoded from the challenge's `request`. #### Index Signature \[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json) ## Variables ### APPROVE\_SELECTOR > `const` **APPROVE\_SELECTOR**: `"0x095ea7b3"` = `"0x095ea7b3"` *** ### CHANNEL\_CLOSED\_TOPIC > `const` **CHANNEL\_CLOSED\_TOPIC**: `"0x92ed5fe0fe56b3f4185e688efb342e92a4492b9df29ad5de596c44e64d097b51"` = `"0x92ed5fe0fe56b3f4185e688efb342e92a4492b9df29ad5de596c44e64d097b51"` *** ### CHANNEL\_OPENED\_TOPIC > `const` **CHANNEL\_OPENED\_TOPIC**: `"0xcd6e60364f8ee4c2b0d62afc07a1fb04fd267ce94693f93f8f85daaa099b5c94"` = `"0xcd6e60364f8ee4c2b0d62afc07a1fb04fd267ce94693f93f8f85daaa099b5c94"` `ChannelOpened(bytes32,address,address,address,address,bytes32,uint256)`: channel, payer, payee indexed. *** ### chargeHedera > `const` **chargeHedera**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`credentialChallenge`, `request`, `c`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaUnsigned`](#hederaunsigned)>; `carrier`: `"challenge"`; `claims`: `boolean`; `fetchPresented`: (`input`, `reader`, `defaultNetwork?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaLandedCharge`](#hederalandedcharge)>; `id`: `"mpp/charge/hedera"`; `landedTx`: (`presented`) => `string` | `undefined`; `network`: (`request`, `defaultNetwork?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaNetwork`](#hederanetwork); `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaRef`](#hederaref)>; `status`: (`ref`, `reader`) => `Promise`\<[`HederaStatus`](#hederastatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge); }> *** ### ESCROW\_OPEN\_SELECTOR > `const` **ESCROW\_OPEN\_SELECTOR**: `"0xc79ea485"` = `"0xc79ea485"` `open(address,address,uint128,bytes32,address)`. *** ### exactHedera > `const` **exactHedera**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaUnsigned`](#hederaunsigned)>; `carrier`: `"TransactionBody.memo"`; `claims`: `boolean`; `id`: `"x402/exact/hedera"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaRef`](#hederaref)>; `status`: (`ref`, `reader`) => `Promise`\<[`HederaStatus`](#hederastatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### exactHederaExecutor > `const` **exactHederaExecutor**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `request`: \{ `amount`: `string`; `asset`: `string`; `executors`: readonly `string`\[]; `kind`: `"hedera-executor"`; `network`: [`HederaNetwork`](#hederanetwork); `payTo`: `string`; `validBefore`: `number`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ExecutorPaymentPayload`](#executorpaymentpayload); }>; `claims`: `boolean`; `id`: `"x402/exact/hedera/transfer-executor"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ExecutorRef`](#executorref)>; `status`: (`ref`, `reader`) => `Promise`\<[`HederaStatus`](#hederastatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### HEDERA\_CHAIN\_IDS > `const` **HEDERA\_CHAIN\_IDS**: `Readonly`\<`Record`\<`number`, [`HederaNetwork`](#hederanetwork)>> MPP's EIP-155 chain ids for Hedera, mapped to their CAIP-2 networks. *** ### HEDERA\_NETWORKS > `const` **HEDERA\_NETWORKS**: readonly [`HederaNetwork`](#hederanetwork)\[] ## Functions ### approveCalldata() > **approveCalldata**(`spender`, `amount`): `` `0x${string}` `` `approve(spender, amount)` calldata. #### Parameters | Parameter | Type | | --------- | ------------------- | | `spender` | `` `0x${string}` `` | | `amount` | `bigint` | #### Returns `` `0x${string}` `` *** ### decodeHederaTx() > **decodeHederaTx**(`wire`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `bodies`: readonly [`HederaBody`](#hederabody)\[]; } Reads a wire `Transaction`, or the SDK's `TransactionList` of them (a top-level field 1): each body's transaction id, valid duration, memo and exact bytes. Every body of a list must share id and memo. #### Parameters | Parameter | Type | | --------- | ------------ | | `wire` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `bodies`: readonly [`HederaBody`](#hederabody)\[]; } *** ### executorStatus() > **executorStatus**(`ref`, `reader`): `Promise`\<[`HederaStatus`](#hederastatus)> Reads the merged consensus record of the named transaction: the user entry must be SUCCESS; each account's net change in the asset is summed over the user entry and its children, leaving out the fee payer; exactly one other account must be debited, and a credit of the same magnitude must give the recorded digest. #### Parameters | Parameter | Type | | --------- | ---------------------------------------- | | `ref` | [`ExecutorRef`](#executorref) & `object` | | `reader` | [`HederaReader`](#hederareader) | #### Returns `Promise`\<[`HederaStatus`](#hederastatus)> *** ### hederaChannelId() > **hederaChannelId**(`c`): `` `0x${string}` `` keccak256(abi.encode(payer, payee, token, salt, authorizedSigner, escrow, chainId)), lowercase. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `c` | [`HederaChannelConfig`](#hederachannelconfig) | #### Returns `` `0x${string}` `` *** ### hederaChargeRequest() > **hederaChargeRequest**(`c`): `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The Hedera request checks a charge challenge must pass before it is placed. #### Parameters | Parameter | Type | | --------- | ------------------------------------------------- | | `c` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge) | #### Returns `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### hederaIdDigest() > **hederaIdDigest**(`payer`, `payTo`, `amount`): `Promise`\<`` `0x${string}` ``> the core's hash over the ASCII of `payer,payTo,amount`: the identity of one transfer, never shown in the clear. #### Parameters | Parameter | Type | | --------- | -------- | | `payer` | `string` | | `payTo` | `string` | | `amount` | `string` | #### Returns `Promise`\<`` `0x${string}` ``> *** ### hederaNetworkOfChainId() > **hederaNetworkOfChainId**(`chainId`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaNetwork`](#hederanetwork) The CAIP-2 network of an MPP `methodDetails.chainId`: 295 and 296 only. #### Parameters | Parameter | Type | | --------- | --------- | | `chainId` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaNetwork`](#hederanetwork) *** ### hederaPairingOf() > **hederaPairingOf**(`o`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"x402/exact/hedera"` | `"x402/exact/hedera/transfer-executor"` | `undefined` The Hedera pairing an option names: `x402/exact/hedera` for `cryptoTransfer` (or no method), the transfer-executor pairing for `transferExecutor`; a Hedera option either cannot serve is `hedera/option-malformed`. Undefined for an option on another rail. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `o` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"x402/exact/hedera"` | `"x402/exact/hedera/transfer-executor"` | `undefined` *** ### hederaStatus() > **hederaStatus**(`ref`, `reader`): `Promise`\<[`HederaStatus`](#hederastatus)> Reads every Mirror Node entry for the transaction id. Duplicates, child and scheduled records are skipped; the user transaction with SUCCESS and the recorded memo is settled, with another memo it is not this instrument, and any other result is failed with that result. A failed read, or a reader for another network, is pending. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `ref` | [`HederaRef`](#hederaref) | | `reader` | [`HederaReader`](#hederareader) | #### Returns `Promise`\<[`HederaStatus`](#hederastatus)> *** ### hederaVoucher() > **hederaVoucher**(`c`, `cumulative`): [`HederaVoucherTypedData`](#hederavouchertypeddata) The voucher for `cumulative` on a channel, under the escrow's domain. #### 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`](#hederavouchertypeddata) *** ### openCalldata() > **openCalldata**(`payee`, `token`, `deposit`, `salt`, `authorizedSigner`): `` `0x${string}` `` The escrow's `open(payee, token, deposit, salt, authorizedSigner)` calldata. #### Parameters | Parameter | Type | | ------------------ | ------------------- | | `payee` | `` `0x${string}` `` | | `token` | `` `0x${string}` `` | | `deposit` | `bigint` | | `salt` | `` `0x${string}` `` | | `authorizedSigner` | `` `0x${string}` `` | #### Returns `` `0x${string}` `` *** ### txIdMirror() > **txIdMirror**(`id`): `string` "0.0.1235-1700000000-000000000", the Mirror Node's form. #### Parameters | Parameter | Type | | --------- | --------------------------- | | `id` | [`HederaTxId`](#hederatxid) | #### Returns `string` *** ### txIdText() > **txIdText**(`id`): `string` "0.0.1235\@1700000000.000000000" #### Parameters | Parameter | Type | | --------- | --------------------------- | | `id` | [`HederaTxId`](#hederatxid) | #### Returns `string` --- # @integraledger/lcp/lightning > The exports of @integraledger/lcp/lightning. Source: https://lcp.integraledger.com/reference/api/lightning ## Interfaces ### Bolt11 #### Properties | Property | Type | Description | | ------------------ | ------------------------------------------ | -------------------------------------------- | | `amountMsat` | `bigint` \| `null` | - | | `currency` | `"bc"` \| `"tb"` \| `"tbs"` \| `"bcrt"` | - | | `description` | `string` \| `null` | - | | `descriptionHash` | `Uint8Array`\<`ArrayBufferLike`> \| `null` | - | | `expiry` | `number` | - | | `metadata` | `Uint8Array`\<`ArrayBufferLike`> \| `null` | - | | `paymentHash` | `Uint8Array` | - | | `tags` | readonly `number`\[] | Every tagged field's type, in invoice order. | | `timestamp` | `number` | - | *** ### LnMppChoice #### Properties | Property | Type | Description | | ----------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | | `challenge` | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#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#refusal) | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp#mppcredential) ###### Parameters | Parameter | Type | | ---------- | -------- | | `preimage` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp#mppcredential) *** ### LnRef The read keys recorded at claim: 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#refusal) | [`LnPaymentPayload`](#lnpaymentpayload) ###### Parameters | Parameter | Type | | ---------- | -------- | | `preimage` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnPaymentPayload`](#lnpaymentpayload) ## Type Aliases ### LnMppPairing > **LnMppPairing** = *typeof* `LN_CHARGE` | *typeof* `LN_SESSION` *** ### LnNetwork > **LnNetwork** = `"lnbtc:000000000019d6689c085ae165831e93"` | `"lnbtc:000000000933ea01ad0ee984209779ba"` CAIP-2 for Lightning: `lnbtc:` and the first 32 hex digits of the Bitcoin network's genesis block hash. *** ### LnPaymentPayload > **LnPaymentPayload** = `object` #### Properties | Property | Type | | ------------------ | ------------------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired)\[`"extensions"`] | | `payload` | `object` | | `payload.preimage` | `string` | | `resource?` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired)\[`"resource"`] | | `x402Version` | `2` | ## Variables ### chargeLightning > `const` **chargeLightning**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnMppUnsigned`](#lnmppunsigned)>; `carrier`: `string`; `claims`: `boolean`; `id`: `"mpp/charge/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnRef`](#lnref)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge); }> *** ### exactLnbtc > `const` **exactLnbtc**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnUnsigned`](#lnunsigned)>; `carrier`: `"extra.invoice#m"`; `claims`: `boolean`; `id`: `"x402/exact/lnbtc"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnRef`](#lnref)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### exactLnbtcNamed > `const` **exactLnbtcNamed**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnUnsigned`](#lnunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/lnbtc/invoice-named"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnRef`](#lnref)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### sessionLightning > `const` **sessionLightning**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnMppUnsigned`](#lnmppunsigned)>; `carrier`: `string`; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `boolean`; `id`: `"mpp/session/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnRef`](#lnref)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](https://lcp.integraledger.com/reference/api/mpp#mppchallenge); }> ## Functions ### atrNamesInvoice() > **atrNamesInvoice**(`atr`, `invoice`): `boolean` True when the ATR's bytes are one JSON object whose `x402` slot's `accepts` holds an option whose `extra.invoice` is exactly `invoice`. Only that slot is read. #### Parameters | Parameter | Type | | --------- | ------------ | | `atr` | `Uint8Array` | | `invoice` | `string` | #### Returns `boolean` *** ### decodeBolt11() > **decodeBolt11**(`invoice`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Bolt11`](#bolt11)> Decodes a BOLT11 invoice without its length limit, up to 8 KiB. The signature is not verified. #### Parameters | Parameter | Type | | --------- | -------- | | `invoice` | `string` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Bolt11`](#bolt11)> *** ### invoiceH() > **invoiceH**(`b`, `field`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The one 32-byte `h` or `m` field of an invoice, as the hash it carries. #### Parameters | Parameter | Type | | --------- | ------------------- | | `b` | [`Bolt11`](#bolt11) | | `field` | `"h"` \| `"m"` | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### lnbtcPairingOf() > **lnbtcPairingOf**(`option`): `"x402/exact/lnbtc"` | `"x402/exact/lnbtc/invoice-named"` | `undefined` Which of the two x402 Lightning pairings an option belongs to: by whether its invoice has an `m` field. An option whose `extra` has no `invoice` is the offer the seller sends before its node writes the invoice, so it is `x402/exact/lnbtc`; an `invoice-named` option carries its invoice at issue. #### Parameters | Parameter | Type | | --------- | --------- | | `option` | `unknown` | #### Returns `"x402/exact/lnbtc"` | `"x402/exact/lnbtc/invoice-named"` | `undefined` --- # @integraledger/lcp/mpp > The exports of @integraledger/lcp/mpp. Source: https://lcp.integraledger.com/reference/api/mpp ## Interfaces ### 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 session opening for the payer's signer: two calls broadcast in order, and the zero voucher to sign. #### 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#hederavouchertypeddata) | #### Methods ##### complete() > **complete**(`signed`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) ###### 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#refusal) | [`MppCredential`](#mppcredential) *** ### LandedCredential A push credential with the landed receipt's logs from the currency. #### Extends * [`MppCredential`](#mppcredential) #### Properties | Property | Type | Inherited from | | -------------------- | ------------------------------------------------- | ---------------------------------------------------------------------- | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | [`MppCredential`](#mppcredential).[`challenge`](#property-challenge-2) | | `landed` | `object` | - | | `landed.blockNumber` | `bigint` | - | | `landed.logs` | readonly [`EvmLog`](https://lcp.integraledger.com/reference/api/evm#evmlog)\[] | - | | `landed.transaction` | `` `0x${string}` `` | - | | `payload` | `object` | [`MppCredential`](#mppcredential).[`payload`](#property-payload-1) | | `source?` | `string` | [`MppCredential`](#mppcredential).[`source`](#property-source-1) | *** ### 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`. No check reads them. #### Extended by * [`SessionChoice`](#sessionchoice) #### Properties | Property | Type | Description | | --------------------- | ------------------------------------------ | --------------------------------------------------------- | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | - | | `clientId?` | `string` | tempo only: the payer's label in the attribution memo. | | `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 #### Extended by * [`LandedCredential`](#landedcredential) #### Properties | Property | Type | | ------------ | ------------------------------------------ | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | | `payload` | `object` | | `source?` | `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`](#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` | *** ### SessionChoice The buyer's inputs to `build`. No check reads them. #### Extends * [`MppChoice`](#mppchoice) #### Properties | Property | Type | Description | Inherited from | | --------------------- | -------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------- | | `authorizedSigner?` | `` `0x${string}` `` | sessions: default the zero address, which means the payer. | - | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | - | [`MppChoice`](#mppchoice).[`challenge`](#property-challenge-1) | | `clientId?` | `string` | tempo only: the payer's label in the attribution memo. | [`MppChoice`](#mppchoice).[`clientId`](#property-clientid) | | `credentialType?` | `"authorization"` \| `"permit2"` \| `"hash"` | EVM: default the first listed type. | - | | `deposit?` | `bigint` | sessions: the buyer's deposit; `suggestedDeposit` is advice. | - | | `from` | `` `0x${string}` `` | - | [`MppChoice`](#mppchoice).[`from`](#property-from) | | `now` | `number` | - | [`MppChoice`](#mppchoice).[`now`](#property-now) | | `spender?` | `` `0x${string}` `` | permit2 only: the seller server's submitting address. | [`MppChoice`](#mppchoice).[`spender`](#property-spender) | | `tokenDomain?` | `object` | authorization only: the token's EIP-712 name and version. | [`MppChoice`](#mppchoice).[`tokenDomain`](#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#evmref) #### Properties | Property | Type | Description | Inherited from | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `accessKey?` | `object` | The subscription's access key: its id, the token it spends, and `transferDigest({to: recipient})`. With `account`, the read keys of a transfer made under the key for that account. | - | | `accessKey.account?` | `` `0x${string}` `` | - | - | | `accessKey.keyId` | `` `0x${string}` `` | - | - | | `accessKey.to` | `` `0x${string}` `` | - | - | | `accessKey.token` | `` `0x${string}` `` | - | - | | `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`. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref).[`bindingLog`](https://lcp.integraledger.com/reference/api/evm#property-bindinglog) | | `closes?` | `object` | The close of an EVM session: a call to `escrow` of one of `EVM_CLOSE_SELECTORS` naming `channel`. | - | | `closes.channel` | `` `0x${string}` `` | - | - | | `closes.escrow` | `` `0x${string}` `` | - | - | | `network` | `` `eip155:${string}` `` \| `HederaNetwork` | - | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref).[`network`](https://lcp.integraledger.com/reference/api/evm#property-network-1) | | `opened?` | `object` | - | - | | `opened.address` | `` `0x${string}` `` | - | - | | `opened.chainId` | `number` | - | - | | `opened.channel` | `` `0x${string}` `` | - | - | | `opened.h` | `` `0x${string}` `` | - | - | | `opened.version` | `"v1"` \| `"v2"` | - | - | | `search?` | `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#evmref).[`search`](https://lcp.integraledger.com/reference/api/evm#property-search) | | `search.address` | `` `0x${string}` `` | - | - | | `search.topics` | readonly (`` `0x${string}` `` \| `null`)\[] | - | - | | `settleBy?` | `string` | Decimal Unix seconds after which the payment can no longer execute. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref).[`settleBy`](https://lcp.integraledger.com/reference/api/evm#property-settleby) | | `transaction?` | `` `0x${string}` `` | The transaction the credential presents, where the payer broadcast the opening before the claim. | - | | `transferLog?` | `object` | The token transfer this payment made, identified by the digest of the named fields. | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref).[`transferLog`](https://lcp.integraledger.com/reference/api/evm#property-transferlog) | | `transferLog.address` | `` `0x${string}` `` | - | - | | `transferLog.digest` | `` `0x${string}` `` | - | - | | `transferLog.identity` | [`TransferIdentity`](https://lcp.integraledger.com/reference/api/evm#transferidentity) | - | - | | `transferLog.topic0` | `` `0x${string}` `` | - | - | *** ### SessionWithin The buyer's inputs to an in-channel payment: the within 402's challenge, echoed as given; the held opening, exactly as signed; the cumulative amount to sign; and the action. #### Properties | Property | Type | | ------------------- | ------------------------------------------ | | `action` | `"close"` \| `"voucher"` | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | | `cumulativeAmount` | `bigint` | | `opening` | [`MppCredential`](#mppcredential) | *** ### SessionWithinUnsigned One signing request; `complete` takes its one signature and returns the in-channel credential. #### Properties | Property | Type | | ----------- | ----------------------------------------------------------- | | `requests` | readonly [`WithinSigningRequest`](#withinsigningrequest)\[] | #### Methods ##### complete() > **complete**(`signatures`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) ###### Parameters | Parameter | Type | | ------------ | -------------------- | | `signatures` | readonly `string`\[] | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) *** ### SolanaChargeChoice The buyer's inputs to `build`. The request's `decimals`, `tokenProgram` and `recentBlockhash` win when present. #### Properties | Property | Type | | -------------------- | ------------------------------------------ | | `challenge` | [`MppChallenge`](#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` | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) The payer's 64-byte Ed25519 signature over `message`. ###### Parameters | Parameter | Type | | ----------- | ------------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) *** ### SolanaSessionUnsigned The values a Solana channel client composes the `open` from; `complete` takes the composed open payload. #### Properties | Property | Type | | ------------------------- | ------------------------ | | `request` | `object` | | `request.channelProgram` | `string` | | `request.kind` | `"solana-session-open"` | | `request.network` | `` `solana:${string}` `` | | `request.recentBlockhash` | `string` | | `request.recentSlot` | `bigint` | | `request.salt` | `bigint` | #### Methods ##### complete() > **complete**(`open`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) ###### Parameters | Parameter | Type | | --------- | ---------------------------------------------------- | | `open` | \{\[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json); } | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) *** ### StacksChargeChoice The buyer's inputs to the Stacks build: the chosen challenge and the payer's c32 standard principal. #### Properties | Property | Type | | ------------ | ------------------------------------------ | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | | `from` | `string` | *** ### StellarChargeChoice The buyer's inputs to `build`: the buyer's simulated transaction and its ledger and clock readings. #### Properties | Property | Type | | ---------------- | ------------------------------------------ | | `challenge` | [`MppChallenge`](#mppchallenge) & `object` | | `currentLedger` | `number` | | `now` | `number` | | `simulatedXdr` | `string` | *** ### StellarChargeUnsigned #### Properties | Property | Type | | ------------------ | ---------------- | | `request` | `object` | | `request.kind` | `"stellar-auth"` | | `request.preimage` | `Uint8Array` | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) The payer's Ed25519 signature over SHA-256 of `preimage`. ###### Parameters | Parameter | Type | | ----------- | ------------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) *** ### StripeSubscriptionReceipt The Stripe subscription's activation receipt, the `Payment-Receipt` payload decoded from its base64url JSON (or the MCP transport's receipt object as given). The seller passes it when it reports the opening paid. #### 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` | - | *** ### 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"`; }] | *** ### 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`](#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#xrpltxjson) | #### Methods ##### complete() > **complete**(`signedBlob`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) The wallet's signed blob, hex. ###### Parameters | Parameter | Type | | ------------ | -------- | | `signedBlob` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#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` | | `request.claim.channelId` | `string` | | `request.claim.drops` | `bigint` | | `request.kind` | `"xrpl-session-open"` | | `request.txJson` | [`XrplTxJson`](https://lcp.integraledger.com/reference/api/xrpl#xrpltxjson) | #### Methods ##### complete() > **complete**(`signed`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)> ###### Parameters | Parameter | Type | | ----------------------- | -------------------------------------------------------- | | `signed` | \{ `claimSignature`: `string`; `signedBlob`: `string`; } | | `signed.claimSignature` | `string` | | `signed.signedBlob` | `string` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)> ## Type Aliases ### GatewayPreimage > **GatewayPreimage** = `Pick`\<[`GatewaySaltInput`](#gatewaysaltinput), `"id"` | `"realm"` | `"requestHash"` | `"recipient"`> The salt's inputs a Gateway signing request carries from the chosen challenge. *** ### HederaLandedCredential > **HederaLandedCredential** = [`LandedCredential`](#landedcredential) A Hedera session opening with the landed receipt's logs from the escrow. *** ### MppIntent > **MppIntent** = `"charge"` | `"session"` | `"subscription"` *** ### MppMethod > **MppMethod** = `"evm"` | `"tempo"` | `"solana"` | `"lightning"` | `"card"` | `"stripe"` | `"usdc"` | `"nearintents"` | `"stellar"` | `"xrpl"` | `"hedera"` *** ### MppPairing > **MppPairing** = `"mpp/charge/evm/permit2"` | `"mpp/charge/evm/authorization"` | `"mpp/charge/evm/transaction"` | `"mpp/charge/evm/hash"` | `"mpp/charge/tempo/memo"` | `"mpp/charge/tempo/push"` | `"mpp/session/evm"` | `"mpp/session/tempo"` | `"mpp/subscription/tempo"` | `"mpp/charge/lightning"` | `"mpp/session/lightning"` | `"mpp/charge/hedera"` | `"mpp/charge/solana"` | `"mpp/charge/stellar"` | `"mpp/charge/xrpl"` | `"mpp/charge/nearintents"` | `"mpp/session/hedera"` | `"mpp/session/solana"` | `"mpp/session/xrpl"` | `"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"` Every MPP pairing `pairingsOf` can name. *** ### MppUnsigned > **MppUnsigned** = \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm#eip3009typeddata) | [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm#permit2typeddata); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } | \{ `request`: \{ `broadcast`: `boolean`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); }; `chainId`: `number`; `kind`: `"tempo-call"`; `validBefore`: `number`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } | \{ `request`: \{ `broadcast`: `boolean`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); }; `chainId`: `number`; `kind`: `"evm-call"`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } #### Union Members ##### Type Literal \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm#eip3009typeddata) | [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm#permit2typeddata); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } *** ##### Type Literal \{ `request`: \{ `broadcast`: `boolean`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); }; `chainId`: `number`; `kind`: `"tempo-call"`; `validBefore`: `number`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } | Name | Type | Description | | --------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `request` | `object` | push: the buyer's signer broadcasts, and `complete` takes the transaction hash. | | `request.broadcast` | `boolean` | - | | `request.call` | `object` | - | | `request.call.data` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | - | | `request.call.to` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | - | | `request.chainId` | `number` | - | | `request.kind` | `"tempo-call"` | - | | `request.validBefore` | `number` | - | | `complete()` | (`signedTxOrHash`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) \| [`MppCredential`](#mppcredential) | - | *** ##### Type Literal \{ `request`: \{ `broadcast`: `boolean`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); }; `chainId`: `number`; `kind`: `"evm-call"`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } | Name | Type | Description | | ------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | `request` | `object` | An EIP-1559 transaction of the call, or its hash once broadcast. | | `request.broadcast` | `boolean` | - | | `request.call` | `object` | - | | `request.call.data` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | - | | `request.call.to` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | - | | `request.chainId` | `number` | - | | `request.kind` | `"evm-call"` | - | | `complete()` | (`signedTxOrHash`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) \| [`MppCredential`](#mppcredential) | - | *** ### RailSessionUnsigned > **RailSessionUnsigned** = [`HederaSessionUnsigned`](#hederasessionunsigned) | [`SolanaSessionUnsigned`](#solanasessionunsigned) | [`XrplSessionUnsigned`](#xrplsessionunsigned) *** ### SessionStatus > **SessionStatus** = [`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus) | \{ `state`: `"pending"`; `why`: `"not-a-close"`; } *** ### SessionUnsigned > **SessionUnsigned** = `object` #### Properties | Property | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `funding` | \{ `kind`: `"eip712"`; `typedData`: [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/evm#receivetypeddata) \| [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm#permit2typeddata); } \| \{ `broadcast`: `true`; `calls`: `object`\[]; `chainId`: `number`; `kind`: `"evm-calls"`; } \| \{ `broadcast`: `false`; `call`: \{ `data`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `to`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); }; `chainId`: `number`; `kind`: `"tempo-call"`; `validBefore`: `number`; } | #### Methods ##### complete() > **complete**(`funded`, `voucherSignature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) ###### Parameters | Parameter | Type | | ------------------ | ------------------- | | `funded` | `` `0x${string}` `` | | `voucherSignature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential) ##### voucher() > **voucher**(`funded`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`VoucherTypedData`](#vouchertypeddata) `funded`: the funding signature, transaction hash or signed `0x76` transaction. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `funded` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`VoucherTypedData`](#vouchertypeddata) *** ### UsdcUnsigned > **UsdcUnsigned** = \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm#eip3009typeddata); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } | \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: [`AtrHash`](https://lcp.integraledger.com/reference/api#atrhash); `recipient`: `string`; `sender`: `string`; }; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } | \{ `request`: \{ `kind`: `"gateway-burn-intent"`; `preimage`: [`GatewayPreimage`](#gatewaypreimage); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); } What the signer is handed for each `usdc` profile, and how its answer completes the credential. *** ### WithinSigningRequest > **WithinSigningRequest** = \{ `kind`: `"eip712"`; `typedData`: [`VoucherTypedData`](#vouchertypeddata) | [`HederaVoucherTypedData`](https://lcp.integraledger.com/reference/api/hedera#hederavouchertypeddata); } | \{ `kind`: `"ed25519-raw"`; `message`: `Uint8Array`; `signer`: `string`; } | \{ `bytes`: `Uint8Array`; `channelId`: `string`; `drops`: `bigint`; `kind`: `"xrpl-claim"`; } A request to the buyer's signer for an in-channel payment. ## Variables ### CARRIER > `const` **CARRIER**: \{ readonly \[i in MppIntent]: \{ readonly \[m in MppMethod]?: readonly string\[] | null } } The request member a pairing writes H into, by intent and method; null where no request member carries it. `usdc` carries H in a request member only on its Solana profile (`USDC_CARRIER`). *** ### chargeCard > `const` **chargeCard**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_choice`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `string`; `claims`: `boolean`; `id`: `"mpp/charge/card"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeNearIntents > `const` **chargeNearIntents**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`credential`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `"request.externalId"`; `claims`: `boolean`; `id`: `"mpp/charge/nearintents"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeSolana > `const` **chargeSolana**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SolanaChargeUnsigned`](#solanachargeunsigned)>; `carrier`: `"request.externalId"`; `claims`: `boolean`; `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)>; `id`: `"mpp/charge/solana"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeStellar > `const` **chargeStellar**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarChargeUnsigned`](#stellarchargeunsigned)>; `carrier`: `"request.recipient"`; `claims`: `boolean`; `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)>; `id`: `"mpp/charge/stellar"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarRef`](https://lcp.integraledger.com/reference/api/stellar#stellarref)>; `status`: (`ref`, `reader`) => `Promise`\<[`StellarStatus`](https://lcp.integraledger.com/reference/api/stellar#stellarstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeStripe > `const` **chargeStripe**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_choice`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `string`; `claims`: `boolean`; `id`: `"mpp/charge/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeUsdcEvm > `const` **chargeUsdcEvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`UsdcUnsigned`](#usdcunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/evm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeUsdcGateway > `const` **chargeUsdcGateway**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `request`: \{ `kind`: `"gateway-burn-intent"`; `preimage`: [`GatewayPreimage`](#gatewaypreimage); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); }>; `carrier`: `null`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/gateway"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeUsdcSolana > `const` **chargeUsdcSolana**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SolanaChargeUnsigned`](#solanachargeunsigned)>; `carrier`: `"request.externalId"`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeUsdcStacks > `const` **chargeUsdcStacks**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: `` `0x${string}` ``; `recipient`: `string`; `sender`: `string`; }; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); }>; `carrier`: `null`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/stacks"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StacksRef`](https://lcp.integraledger.com/reference/api/stacks#stacksref)>; `status`: (`ref`, `reader`) => `Promise`\<[`StacksStatus`](https://lcp.integraledger.com/reference/api/stacks#stacksstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### chargeXrpl > `const` **chargeXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`XrplChargeUnsigned`](#xrplchargeunsigned)>; `carrier`: `"request.methodDetails.invoiceId"`; `claims`: `boolean`; `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)>; `id`: `"mpp/charge/xrpl"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplref), `"fromLedger"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### EVM\_CLOSE\_SELECTORS > `const` **EVM\_CLOSE\_SELECTORS**: readonly \[`"0x0d65c51d"`, `"0x79d35ded"`, `"0x8e19899e"`] The EVM session escrow's functions that finalize a channel, each taking the channel id as its first argument: `close(bytes32,uint128,bytes)`, `closeWithAuthorization(bytes32,uint128,uint256,uint256,bytes,bytes)` and `withdraw(bytes32)`. *** ### evmAuthorization > `const` **evmAuthorization**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/authorization"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### evmHash > `const` **evmHash**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/hash"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref) & `object`>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### evmPermit2 > `const` **evmPermit2**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/permit2"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### evmTransaction > `const` **evmTransaction**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/transaction"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref) & `object`>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### 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`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/authorization"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/permit2"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/transaction"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref) & `object`>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/evm/hash"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref) & `object`>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/tempo/memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `fetchPresented`: (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LandedCredential`](#landedcredential)>; `id`: `"mpp/charge/tempo/push"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionUnsigned`](#sessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `id`: `"mpp/session/evm"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SessionStatus`](#sessionstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionUnsigned`](#sessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `id`: `"mpp/session/tempo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SessionStatus`](#sessionstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`KeyAuthorizationUnsigned`](https://lcp.integraledger.com/reference/api/tempo#keyauthorizationunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `_channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `id`: `"mpp/subscription/tempo"`; `keyProves`: `string`; `keySearch`: (`ref`, `receipt`, `h`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `pattern`: \{ `buyerSigns`: `true`; `canonical`: `true`; `forwardIndexable`: `true`; `onChain`: `true`; `pattern`: `"native-field"`; `proves`: `string`; `publicProof`: `true`; `zeroPartyRecoverable`: `true`; }; `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SessionStatus`](#sessionstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnMppUnsigned`](https://lcp.integraledger.com/reference/api/lightning#lnmppunsigned)>; `carrier`: `string`; `claims`: `boolean`; `id`: `"mpp/charge/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnRef`](https://lcp.integraledger.com/reference/api/lightning#lnref)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `advertiseBeforeCarrier`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnMppUnsigned`](https://lcp.integraledger.com/reference/api/lightning#lnmppunsigned)>; `carrier`: `string`; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `boolean`; `id`: `"mpp/session/lightning"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LnRef`](https://lcp.integraledger.com/reference/api/lightning#lnref)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`credentialChallenge`, `request`, `c`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaUnsigned`](https://lcp.integraledger.com/reference/api/hedera#hederaunsigned)>; `carrier`: `"challenge"`; `claims`: `boolean`; `fetchPresented`: (`input`, `reader`, `defaultNetwork?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaLandedCharge`](https://lcp.integraledger.com/reference/api/hedera#hederalandedcharge)>; `id`: `"mpp/charge/hedera"`; `landedTx`: (`presented`) => `string` | `undefined`; `network`: (`request`, `defaultNetwork?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaNetwork`](https://lcp.integraledger.com/reference/api/hedera#hederanetwork); `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaRef`](https://lcp.integraledger.com/reference/api/hedera#hederaref)>; `status`: (`ref`, `reader`) => `Promise`\<[`HederaStatus`](https://lcp.integraledger.com/reference/api/hedera#hederastatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SolanaChargeUnsigned`](#solanachargeunsigned)>; `carrier`: `"request.externalId"`; `claims`: `boolean`; `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)>; `id`: `"mpp/charge/solana"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarChargeUnsigned`](#stellarchargeunsigned)>; `carrier`: `"request.recipient"`; `claims`: `boolean`; `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)>; `id`: `"mpp/charge/stellar"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarRef`](https://lcp.integraledger.com/reference/api/stellar#stellarref)>; `status`: (`ref`, `reader`) => `Promise`\<[`StellarStatus`](https://lcp.integraledger.com/reference/api/stellar#stellarstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`XrplChargeUnsigned`](#xrplchargeunsigned)>; `carrier`: `"request.methodDetails.invoiceId"`; `claims`: `boolean`; `fetchPresented`: (`credential`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential)>; `id`: `"mpp/charge/xrpl"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplref), `"fromLedger"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`credential`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `"request.externalId"`; `claims`: `boolean`; `id`: `"mpp/charge/nearintents"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaSessionUnsigned`](#hederasessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Kind`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_p`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`HederaCloseRef`](https://lcp.integraledger.com/reference/api/hedera#hederacloseref), `"transaction"`>; `fetchPresented`: (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LandedCredential`](#landedcredential)>; `id`: `"mpp/session/hedera"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaSessionRef`](https://lcp.integraledger.com/reference/api/hedera#hederasessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SolanaSessionUnsigned`](#solanasessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Kind`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_p`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmCloseRef`](https://lcp.integraledger.com/reference/api/svm#svmcloseref), `"transaction"`>; `id`: `"mpp/session/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus) | [`SvmCloseStatus`](https://lcp.integraledger.com/reference/api/svm#svmclosestatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`XrplSessionUnsigned`](#xrplsessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Kind`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplCloseRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplcloseref), `"transaction"`>; `id`: `"mpp/session/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplref), `"expect"` | `"fromLedger"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplstatus) | [`XrplCloseStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplclosestatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_choice`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `string`; `claims`: `boolean`; `id`: `"mpp/charge/card"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_choice`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `string`; `claims`: `boolean`; `id`: `"mpp/charge/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_choice`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `string`; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`_presented`) => `"open"`; `ref`: (`_presented`, `receipt?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `boolean`; `id`: `"mpp/subscription/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`UsdcUnsigned`](#usdcunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/evm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SolanaChargeUnsigned`](#solanachargeunsigned)>; `carrier`: `"request.externalId"`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `request`: \{ `anchorMode`: `"onChainOnly"`; `args`: \{ `amount`: `string`; `memo`: `` `0x${string}` ``; `recipient`: `string`; `sender`: `string`; }; `contract`: `string`; `functionName`: `"transfer"`; `kind`: `"stacks-contract-call"`; `postCondition`: `"SentEq"`; `postConditionMode`: `"deny"`; }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); }>; `carrier`: `null`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/stacks"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StacksRef`](https://lcp.integraledger.com/reference/api/stacks#stacksref)>; `status`: (`ref`, `reader`) => `Promise`\<[`StacksStatus`](https://lcp.integraledger.com/reference/api/stacks#stacksstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>, `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `request`: \{ `kind`: `"gateway-burn-intent"`; `preimage`: [`GatewayPreimage`](#gatewaypreimage); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](#mppcredential); }>; `carrier`: `null`; `claims`: `boolean`; `id`: `"mpp/charge/usdc/gateway"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }>] Every MPP pairing this entry point implements. *** ### sessionEvm > `const` **sessionEvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionUnsigned`](#sessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `id`: `"mpp/session/evm"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SessionStatus`](#sessionstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### sessionHedera > `const` **sessionHedera**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaSessionUnsigned`](#hederasessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Kind`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_p`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`HederaCloseRef`](https://lcp.integraledger.com/reference/api/hedera#hederacloseref), `"transaction"`>; `fetchPresented`: (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LandedCredential`](#landedcredential)>; `id`: `"mpp/session/hedera"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`HederaSessionRef`](https://lcp.integraledger.com/reference/api/hedera#hederasessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### sessionSolana > `const` **sessionSolana**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SolanaSessionUnsigned`](#solanasessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Kind`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_p`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmCloseRef`](https://lcp.integraledger.com/reference/api/svm#svmcloseref), `"transaction"`>; `id`: `"mpp/session/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus) | [`SvmCloseStatus`](https://lcp.integraledger.com/reference/api/svm#svmclosestatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### sessionTempo > `const` **sessionTempo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionUnsigned`](#sessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `id`: `"mpp/session/tempo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SessionStatus`](#sessionstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### sessionXrpl > `const` **sessionXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`XrplSessionUnsigned`](#xrplsessionunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionWithinUnsigned`](#sessionwithinunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Kind`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplCloseRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplcloseref), `"transaction"`>; `id`: `"mpp/session/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplref), `"expect"` | `"fromLedger"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplstatus) | [`XrplCloseStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplclosestatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`MppChallenge`](#mppchallenge); }> *** ### subscriptionStripe > `const` **subscriptionStripe**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`_choice`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `carrier`: `string`; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`_presented`) => `"open"`; `ref`: (`_presented`, `receipt?`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_presented`) => `number` | `undefined`; }>; `claims`: `boolean`; `id`: `"mpp/subscription/stripe"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`c`) => [`MppChallenge`](#mppchallenge); }> *** ### subscriptionTempo > `const` **subscriptionTempo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`KeyAuthorizationUnsigned`](https://lcp.integraledger.com/reference/api/tempo#keyauthorizationunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`_presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`presented`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`presented`) => `number` | `undefined`; }>; `claims`: `true`; `closeRef`: (`chosen`, `_channel`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `id`: `"mpp/subscription/tempo"`; `keyProves`: `string`; `keySearch`: (`ref`, `receipt`, `h`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref); `pattern`: \{ `buyerSigns`: `true`; `canonical`: `true`; `forwardIndexable`: `true`; `onChain`: `true`; `pattern`: `"native-field"`; `proves`: `string`; `publicProof`: `true`; `zeroPartyRecoverable`: `true`; }; `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SessionStatus`](#sessionstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### tempoMemo > `const` **tempoMemo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `id`: `"mpp/charge/tempo/memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### tempoPush > `const` **tempoPush**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[]; `bound`: (`input`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppUnsigned`](#mppunsigned)>; `claims`: `boolean`; `fetchPresented`: (`presented`, `reader`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`LandedCredential`](#landedcredential)>; `id`: `"mpp/charge/tempo/push"`; `landedTx`: (`presented`) => `string` | `undefined`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; }; `reference`: (`input`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`options`) => \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }]; `unplaced`: (`option`) => [`Json`](https://lcp.integraledger.com/reference/api#json); }> *** ### USDC\_CARRIER > `const` **USDC\_CARRIER**: `object` The request member `usdc` writes H into, by `methodDetails.type`; null where no request member carries it. #### Index Signature \[`profile`: `string`]: readonly `string`\[] | `null` ## 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. #### Parameters | Parameter | Type | | ------------- | -------- | | `realm` | `string` | | `challengeId` | `string` | | `clientId?` | `string` | #### Returns `` `0x${string}` `` *** ### challengeBound() > **challengeBound**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `request`: \{\[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json); }; } H from an echoed challenge: its id derives from H in the form its intent and method take, its `opaque` names H, and its `request` decodes. #### Parameters | Parameter | Type | | --------- | --------- | | `c` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `request`: \{\[`k`: `string`]: [`Json`](https://lcp.integraledger.com/reference/api#json); }; } *** ### challengeH() > **challengeH**(`id`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### challengeHash() > **challengeHash**(`id`, `realm`): `` `0x${string}` `` keccak256(UTF-8(id) ‖ UTF-8(realm)), lowercase: Solidity's `abi.encodePacked(string, string)`. #### Parameters | Parameter | Type | | --------- | -------- | | `id` | `string` | | `realm` | `string` | #### Returns `` `0x${string}` `` *** ### challengeId() > **challengeId**(`h`, `index`): `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#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#refusal) *** ### checkAttribution() > **checkAttribution**(`memo`, `realm`, `challengeId`): `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) Checks a memo's tag, version, server id for `realm` and nonce for `challengeId`. The client id is not read. #### Parameters | Parameter | Type | | ------------- | -------- | | `memo` | `string` | | `realm` | `string` | | `challengeId` | `string` | #### Returns `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### evmChannelId() > **evmChannelId**(`c`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### gatewayAccount() > **gatewayAccount**(`network`, `word`): `string` | `undefined` CAIP-10 of a TransferSpec `bytes32` account on `network`: on `eip155:*` the last 20 bytes as `0x` lowercase hex, the first 12 being zero; on `solana:*` base58 of the 32 bytes. Anything else is undefined. #### Parameters | Parameter | Type | | --------- | --------- | | `network` | `string` | | `word` | `unknown` | #### Returns `string` | `undefined` *** ### issuedDigest() > **issuedDigest**(`c`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> the core's `digestJson` over the bound members, with `request` decoded and its carrier member removed, and `opaque` decoded without the LCP members (omitted when that leaves it empty). A value that does not decode is its string. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `c` | [`MppChallenge`](#mppchallenge) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### keySearch() > **keySearch**(`ref`, `receipt`, `h`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#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 (`keyAccount`), 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, or the receipt did not register it under `h`. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `ref` | [`SessionRef`](#sessionref) | | `receipt` | [`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm#evmreceipt) | | `h` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SessionRef`](#sessionref) *** ### mppSvmCarrier() > **mppSvmCarrier**(`tx`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `memo`: `string`; } The one top-level Memo instruction (v3 or v4) whose UTF-8 data parses as an LCP string, and its hash. Memo instructions whose data is not an LCP string are not read. None is `svm/no-carrier`; more than one `svm/memo-count`. #### Parameters | Parameter | Type | | --------- | ----------------------------------- | | `tx` | [`SvmTx`](https://lcp.integraledger.com/reference/api/svm#svmtx) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `memo`: `string`; } *** ### network() > **network**(`challenge`): `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#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`](#mppchallenge) | #### Returns `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### pairingsOf() > **pairingsOf**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | readonly [`MppPairing`](#mpppairing)\[] Checks a challenge as issued (no LCP member in `opaque`) and names its pairings, in the order they are offered. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `c` | [`MppChallenge`](#mppchallenge) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | readonly [`MppPairing`](#mpppairing)\[] *** ### parseChallenges() > **parseChallenges**(`fieldValues`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#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#refusal) | [`MppChallenge`](#mppchallenge)\[] *** ### place() > **place**(`doc`, `h`, `link`, `option`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[] A copy of `doc` in which the challenge whose bound members equal `option` carries the id derived from H and an `opaque` holding the seller's map plus `legalContext`, `legalContextUrl` and, when given, `legalContextAgreementUrl`. A Tempo subscription challenge's id is the bare base64url of H. #### Parameters | Parameter | Type | | --------------- | ------------------------------------------- | | `doc` | readonly [`MppChallenge`](#mppchallenge)\[] | | `h` | `` `0x${string}` `` | | `link` | `string` | | `option` | [`MppChallenge`](#mppchallenge) | | `agreementUrl?` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppChallenge`](#mppchallenge)\[] *** ### problem() > **problem**(`code`): `object` The MPP problem type and status for a refusal code. #### Parameters | Parameter | Type | | --------- | -------- | | `code` | `string` | #### Returns `object` | Name | Type | | -------- | -------------- | | `status` | `402` \| `500` | | `type` | `string` | *** ### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#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`](#mppchallenge)\[] | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }; } *** ### sessionResume() > **sessionResume**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api#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), Solana in `methodDetails.channelId` (a base58 address), 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`](#mppchallenge) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; } | `null` *** ### sessionStatus() > **sessionStatus**(`ref`, `reader`): `Promise`\<[`SessionStatus`](#sessionstatus)> `evmStatus` 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. 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, else pending `not-a-close`. Where `ref.accessKey.account` is present, the succeeded receipt must also hold the account keychain's `AccessKeySpend` log naming that account, key and token, else failed `binding-log-not-found`. At most four calls. #### Parameters | Parameter | Type | | --------- | ------------------------------------------- | | `ref` | [`SessionRef`](#sessionref) & `object` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm#evmreader) | #### Returns `Promise`\<[`SessionStatus`](#sessionstatus)> *** ### tie() > **tie**(`options`): \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }] The binding slot: the distinct challenges among `options`, each with exactly MPP's bound members, as issued. #### Parameters | Parameter | Type | | --------- | ------------------------------------------- | | `options` | readonly [`MppChallenge`](#mppchallenge)\[] | #### Returns \[`"mpp"`, \{ `challenges`: [`MppChallenge`](#mppchallenge)\[]; }] *** ### transferPresent() > **transferPresent**(`ref`, `reader`): `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)> `evmStatus` on the reported transaction with no named log; settled also requires one log from `ref.asset` with three topics and `topics[0]` = `Transfer`, else failed `transfer-not-found`. At most three calls. #### Parameters | Parameter | Type | | --------- | ------------------------------------------------ | | `ref` | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref) & `object` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm#evmreader) | #### Returns `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)> *** ### usdcGatewaySalt() > **usdcGatewaySalt**(`i`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) `usdc`'s Gateway salt: keccak256 of the JCS of the inputs with `method` "usdc", `intent` "charge", `type` "gateway". #### Parameters | Parameter | Type | | --------- | --------------------------------------- | | `i` | [`GatewaySaltInput`](#gatewaysaltinput) | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### usdcNonce() > **usdcNonce**(`id`, `realm`, `requestHash`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) `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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### usdcRequestHash() > **usdcRequestHash**(`requestParam`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> 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`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ## References ### chargeHedera Re-exports [chargeHedera](https://lcp.integraledger.com/reference/api/hedera#chargehedera) *** ### pairingsOfPlaced Re-exports [pairingsOfPlaced](https://lcp.integraledger.com/reference/api#pairingsofplaced) *** ### ReceiveTypedData Re-exports [ReceiveTypedData](https://lcp.integraledger.com/reference/api/evm#receivetypeddata) --- # @integraledger/lcp/near > The exports of @integraledger/lcp/near. Source: https://lcp.integraledger.com/reference/api/near ## Interfaces ### NearChoice #### Properties | Property | Type | Description | | ----------------- | ---------------------------------------------------------------- | ---------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | - | | `accessKeyNonce` | `bigint` | `view_access_key`'s nonce for the key. | | `finalHeight` | `bigint` | `block` at finality "final": its height. | | `payer` | `string` | - | | `publicKey` | `string` | `ed25519:…` or `secp256k1:…`. | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | - | *** ### NearOutcome #### Properties | Property | Type | Description | | ----------- | ------------------------------------------------------------------------------------------------------ | ------------------------- | | `delegate` | \{ `argsBase64`: `string`; `nonce`: `bigint`; `publicKey`: `string`; `senderId`: `string`; } \| `null` | - | | `receipts` | readonly `object`\[] | - | | `status` | `string` | `final_execution_status`. | *** ### NearReader Bounded, read-only calls against one network's RPC. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | Description | | ----------- | ---------- | ----------------------------- | --------------------------------------------------- | | `network` | `readonly` | [`NearNetwork`](#nearnetwork) | - | | `relayers` | `readonly` | readonly `string`\[] | The facilitator's `/supported` `signers["near:*"]`. | #### Methods ##### accessKeyNonce() > **accessKeyNonce**(`account`, `publicKey`): `Promise`\<`bigint` | `null`> `view_access_key` at "final": the key's nonce; null: no such key. ###### Parameters | Parameter | Type | | ----------- | -------- | | `account` | `string` | | `publicKey` | `string` | ###### Returns `Promise`\<`bigint` | `null`> ##### finalHeight() > **finalHeight**(): `Promise`\<`bigint`> `block` at finality "final": its header's height. ###### Returns `Promise`\<`bigint`> ##### txStatus() > **txStatus**(`txHash`, `sender`): `Promise`\<[`NearOutcome`](#nearoutcome) | `null`> `EXPERIMENTAL_tx_status` with `wait_until` "NONE"; null: unknown. ###### Parameters | Parameter | Type | | --------- | -------- | | `txHash` | `string` | | `sender` | `string` | ###### Returns `Promise`\<[`NearOutcome`](#nearoutcome) | `null`> *** ### NearRef The read keys recorded at claim, JSON-serialisable: `nonce` and `maxBlockHeight` are decimal strings. `transaction` is added when the facilitator names it. #### Properties | Property | Type | | ----------------- | ----------------------------- | | `asset` | `string` | | `maxBlockHeight` | `string` | | `network` | [`NearNetwork`](#nearnetwork) | | `nonce` | `string` | | `payer` | `string` | | `publicKey` | `string` | | `transaction?` | `string` | *** ### NearUnsigned #### Properties | Property | Type | Description | | -------------- | ----------------- | -------------------------------------------------------------------- | | `request` | `object` | SHA-256 of the NEP-461-prefixed delegate action: what the key signs. | | `request.hash` | `Uint8Array` | - | | `request.kind` | `"near-delegate"` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`NearPayment`](#nearpayment) Takes the key type (0 Ed25519, 1 secp256k1) and its 64- or 65-byte signature. ###### Parameters | Parameter | Type | | ------------------- | -------------------------------------------------- | | `signature` | \{ `bytes`: `Uint8Array`; `keyType`: `0` \| `1`; } | | `signature.bytes` | `Uint8Array` | | `signature.keyType` | `0` \| `1` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`NearPayment`](#nearpayment) ## Type Aliases ### NearNetwork > **NearNetwork** = `"near:mainnet"` | `"near:testnet"` x402's NEAR network identifiers. *** ### NearPayment > **NearPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<\{ `signedDelegateAction`: `string`; }> *** ### NearStatus > **NearStatus** = \{ `finality`: `"final"` | `"optimistic"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"in-flight"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"not-this-instrument"` | `"transfer-failed"`; } ## Variables ### exactNear > `const` **exactNear**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`NearUnsigned`](#nearunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/near"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`NearRef`](#nearref)>; `status`: (`ref`, `reader`) => `Promise`\<[`NearStatus`](#nearstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### FT\_TRANSFER\_GAS > `const` **FT\_TRANSFER\_GAS**: `30000000000000n` = `30_000_000_000_000n` *** ### 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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) `ft_transfer`'s arguments: `receiver_id`, `amount` and `memo`, in that order, as `JSON.stringify` writes them. 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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### nearCarrier() > **nearCarrier**(`signedDelegateAction`): [`Refusal`](https://lcp.integraledger.com/reference/api#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 `memo` is an LCP string. The bytes must be exactly the borsh encoding of what is read. #### Parameters | Parameter | Type | | ---------------------- | -------- | | `signedDelegateAction` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `asset`: `string`; `h`: `` `0x${string}` ``; `maxBlockHeight`: `bigint`; `nonce`: `bigint`; `payer`: `string`; `publicKey`: `string`; } *** ### nearLapsed() > **nearLapsed**(`ref`, `reader`): `Promise`\<`boolean`> True only when the delegate action can never execute: the final height is past `maxBlockHeight` and the key's nonce is below the action's, or the key is gone. Two calls; a failed read is false. #### Parameters | Parameter | Type | | --------- | --------------------------- | | `ref` | [`NearRef`](#nearref) | | `reader` | [`NearReader`](#nearreader) | #### Returns `Promise`\<`boolean`> *** ### nearRecover() > **nearRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Recovers the hash from the settlement transaction: the `memo` in its delegated `ft_transfer` arguments. #### Parameters | Parameter | Type | | ----------------- | ----------------------------------------------------------------------- | | `ref` | \{ `network`: [`NearNetwork`](#nearnetwork); `transaction`: `string`; } | | `ref.network` | [`NearNetwork`](#nearnetwork) | | `ref.transaction` | `string` | | `reader` | [`NearReader`](#nearreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### nearStatus() > **nearStatus**(`ref`, `reader`): `Promise`\<[`NearStatus`](#nearstatus)> Finds the relayed transaction under each published relayer (at most four), then requires its delegate to be this instrument and reads the receipts the token contract executed: a failure is failed, a success is settled. A failed read, an empty relayer list, or a reader for another network is pending. #### Parameters | Parameter | Type | | --------- | -------------------------------- | | `ref` | [`NearRef`](#nearref) & `object` | | `reader` | [`NearReader`](#nearreader) | #### Returns `Promise`\<[`NearStatus`](#nearstatus)> *** ### pairingOf() > **pairingOf**(`option`): `"x402/exact/near"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/near"` | `undefined` --- # @integraledger/lcp/polkadot > The exports of @integraledger/lcp/polkadot. Source: https://lcp.integraledger.com/reference/api/polkadot ## Interfaces ### 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 Sidecar. Every failure rejects. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ------------------------------------- | | `network` | `readonly` | [`PolkadotNetwork`](#polkadotnetwork) | #### Methods ##### extrinsic() > **extrinsic**(`block`, `index`): `Promise`\<[`PolkadotExtrinsic`](#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`](#polkadotextrinsic) | `null`> ##### finalizedHeight() > **finalizedHeight**(): `Promise`\<`bigint`> `GET /blocks/head/header` → number: the most recently finalized height. ###### 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`\ *** ### PolkadotRef The read keys recorded at claim, computed from the signed bytes. #### Properties | Property | Type | | ---------------- | ------------------------------------- | | `assetId` | `number` | | `extrinsicHash` | `` `0x${string}` `` | | `network` | [`PolkadotNetwork`](#polkadotnetwork) | *** ### 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` | | `request.kind` | `"substrate-call"` | | `request.network` | [`PolkadotNetwork`](#polkadotnetwork) | #### Methods ##### complete() > **complete**(`extrinsic`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PolkadotPaymentPayload`](#polkadotpaymentpayload) ###### Parameters | Parameter | Type | | ----------- | ------------ | | `extrinsic` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PolkadotPaymentPayload`](#polkadotpaymentpayload) *** ### ProfileCall #### Properties | Property | Type | | ---------- | ------------ | | `amount` | `bigint` | | `assetId` | `number` | | `dest` | `Uint8Array` | | `remark` | `Uint8Array` | ## Type Aliases ### PolkadotNetwork > **PolkadotNetwork** = `"polkadot:68d56f15f85d3136970ec16946040bc1"` | `"polkadot:67f9723393ef76214df0118c34bbbd3d"` *** ### 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#hex) | | `extrinsic` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | *** ### PolkadotPaymentPayload > **PolkadotPaymentPayload** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<[`PolkadotPayload`](#polkadotpayload)> *** ### PolkadotStatus > **PolkadotStatus** = \{ `finality`: `"finalized"` | `"head"`; `height`: `bigint`; `state`: `"settled"`; `transaction`: `string`; } | \{ `state`: `"pending"`; `why`: `"not-located"` | `"not-found"` | `"unreadable"`; } | \{ `finality`: `"finalized"` | `"head"`; `height`: `bigint`; `state`: `"failed"`; `transaction`: `string`; `why`: `"not-this-extrinsic"` | `"dispatch-failed"` | `"no-remark"` | `"no-transfer"`; } A settlement or failure names the timepoint it read, `-`: the one given, or the canonical one when the given block left the chain and the canonical block at that height holds the same extrinsic at that index. Pending `not-located` asks for the payment to be located from the claim position. ## 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#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PolkadotUnsigned`](#polkadotunsigned)>; `carrier`: `null`; `claims`: `true`; `id`: `"x402/exact/polkadot/lcp-assets-remark"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PolkadotRef`](#polkadotref)>; `status`: (`ref`, `reader`) => `Promise`\<[`PolkadotStatus`](#polkadotstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### LCP\_ASSETS\_REMARK > `const` **LCP\_ASSETS\_REMARK**: `"lcp-assets-remark"` = `"lcp-assets-remark"` The profile's `assetTransferMethod`. *** ### POLKADOT\_NETWORKS > `const` **POLKADOT\_NETWORKS**: readonly [`PolkadotNetwork`](#polkadotnetwork)\[] ## Functions ### decodeProfileCall() > **decodeProfileCall**(`call`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ProfileCall`](#profilecall) The profile's call, exactly, with canonical compacts and no trailing byte. #### Parameters | Parameter | Type | | --------- | ------------ | | `call` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ProfileCall`](#profilecall) *** ### encodeProfileCall() > **encodeProfileCall**(`c`): `Uint8Array` `batch_all([transfer_keep_alive(assetId, Id(dest), amount), remark_with_event(remark)])` #### Parameters | Parameter | Type | | --------- | ----------------------------- | | `c` | [`ProfileCall`](#profilecall) | #### Returns `Uint8Array` *** ### extrinsicHash() > **extrinsicHash**(`xt`): `` `0x${string}` `` BLAKE2b-256 of the extrinsic's bytes, its length prefix included. #### Parameters | Parameter | Type | | --------- | ------------ | | `xt` | `Uint8Array` | #### Returns `` `0x${string}` `` *** ### polkadotLocate() > **polkadotLocate**(`ref`, `reader`, `from`, `to`): `Promise`\<`string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `null`> Finds a payment nobody named, by hashing every extrinsic of each block from `from` to `to` (at most 256 blocks). The first match gives its timepoint; a block that does not exist ends the scan with null. #### Parameters | Parameter | Type | | --------- | ----------------------------------- | | `ref` | [`PolkadotRef`](#polkadotref) | | `reader` | [`PolkadotReader`](#polkadotreader) | | `from` | `bigint` | | `to` | `bigint` | #### Returns `Promise`\<`string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `null`> *** ### polkadotPairingOf() > **polkadotPairingOf**(`o`): `"x402/exact/polkadot/lcp-assets-remark"` | `undefined` The pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `o` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/polkadot/lcp-assets-remark"` | `undefined` *** ### polkadotRecover() > **polkadotRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The hash from the landed extrinsic alone, for anyone holding its timepoint: its raw bytes end with the remark call, and the chain's record of it has the same hash, dispatched, with the `Remarked` event. Two calls. #### Parameters | Parameter | Type | | ----------------- | ------------------------------------------------------------------------------- | | `ref` | \{ `network`: [`PolkadotNetwork`](#polkadotnetwork); `transaction`: `string`; } | | `ref.network` | [`PolkadotNetwork`](#polkadotnetwork) | | `ref.transaction` | `string` | | `reader` | [`PolkadotReader`](#polkadotreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### polkadotStatus() > **polkadotStatus**(`ref`, `reader`): `Promise`\<[`PolkadotStatus`](#polkadotstatus)> Reads the extrinsic at its timepoint `-`. It must have the recorded hash, have dispatched, and carry the `Remarked` event for this hash's remark and a `Transferred` event of the recorded asset. A settlement and a failure alike carry the finality of the read: `finalized` when the finalized chain holds that block, `head` when it is above the finalized height. When the finalized chain holds another block at that height, the extrinsic at the same index of the canonical block is read instead if its hash is the recorded one; otherwise the answer is pending `not-located`. A block the reader does not have is pending `not-found`. A failed read, a bare broadcast hash or a reader for another network is pending. #### Parameters | Parameter | Type | | --------- | ---------------------------------------- | | `ref` | [`PolkadotRef`](#polkadotref) & `object` | | `reader` | [`PolkadotReader`](#polkadotreader) | #### Returns `Promise`\<[`PolkadotStatus`](#polkadotstatus)> *** ### splitSigned() > **splitSigned**(`xt`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `end`: `number`; `signer`: `Uint8Array`; } The preamble of a signed v4 extrinsic: the length prefix, `0x84`, `MultiAddress::Id` and a `MultiSignature`. Gives the signer 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#refusal) | \{ `end`: `number`; `signer`: `Uint8Array`; } *** ### ss58Decode() > **ss58Decode**(`address`): `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) --- # @integraledger/lcp/stacks > The exports of @integraledger/lcp/stacks. Source: https://lcp.integraledger.com/reference/api/stacks ## Interfaces ### StacksLanded A mined transaction as the Stacks Blockchain API reports it from the canonical chain. `result` is never read. #### 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. | | `mined` | `true` | - | | `sender` | `object` | - | | `sender.address` | `string` | - | | `sender.nonce` | `bigint` | - | | `status` | `"success"` \| `"abort_by_response"` \| `"abort_by_post_condition"` \| `"problematic_skipped"` | - | *** ### StacksMempool An unmined transaction: `pending`, or one of the `dropped_…` states. #### Properties | Property | Type | | --------- | -------- | | `mined` | `false` | | `status` | `string` | *** ### StacksReader Bounded reads of one network's Stacks Blockchain API. Any failure rejects with ReaderError. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ------------------------ | | `network` | `readonly` | `` `stacks:${string}` `` | #### Methods ##### blockTenure() > **blockTenure**(`height`): `Promise`\<`bigint`> The tenure height of the block at `height`. ###### Parameters | Parameter | Type | | --------- | -------- | | `height` | `bigint` | ###### Returns `Promise`\<`bigint`> ##### confirmedNonce() > **confirmedNonce**(`principal`): `Promise`\<`bigint` | `null`> The principal's last confirmed nonce, or null when it has none. ###### Parameters | Parameter | Type | | ----------- | -------- | | `principal` | `string` | ###### Returns `Promise`\<`bigint` | `null`> ##### tipTenure() > **tipTenure**(): `Promise`\<`bigint`> The tip's tenure height. ###### Returns `Promise`\<`bigint`> ##### transaction() > **transaction**(`txid`): `Promise`\<[`StacksLanded`](#stackslanded) | [`StacksMempool`](#stacksmempool) | `null`> The transaction by its `0x`-prefixed id, with its function arguments; null when the API does not know it. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `txid` | `` `0x${string}` `` | ###### Returns `Promise`\<[`StacksLanded`](#stackslanded) | [`StacksMempool`](#stacksmempool) | `null`> *** ### StacksRef The read keys of a Stacks payment: its network, the token contract, the origin and its nonce as a decimal string, and the transaction id (absent for a sponsored transaction, whose id is fixed only by the sponsor's signature). #### Properties | Property | Type | | --------------- | ------------------------ | | `contract` | `string` | | `network` | `` `stacks:${string}` `` | | `nonce` | `string` | | `origin` | `string` | | `transaction?` | `` `0x${string}` `` | ## Type Aliases ### StacksNetwork > **StacksNetwork** = `` `stacks:${string}` `` CAIP-2: `stacks:1` (mainnet), `stacks:2147483648` (testnet). *** ### StacksStatus > **StacksStatus** = \{ `blockHeight`: `bigint`; `finality`: `"block"` | `"bitcoin"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"mempool"` | `"dropped"` | `"unreadable"`; } | \{ `blockHeight`: `bigint`; `finality`: `"block"` | `"bitcoin"`; `state`: `"failed"`; `why`: `"abort-by-response"` | `"abort-by-post-condition"` | `"skipped"` | `"not-this-instrument"`; } | \{ `finality`: `"block"`; `state`: `"failed"`; `why`: `"nonce-used"`; } ## Variables ### MEMO\_PREFIX > `const` **MEMO\_PREFIX**: `"0x0a0200000020"` = `"0x0a0200000020"` The Clarity serialization of `(some <32-byte buffer>)` before its bytes: `0x0a`, `0x02`, then the length 32. ## Functions ### memoArgument() > **memoArgument**(`h`): `` `0x${string}` `` | `undefined` The memo argument's serialization for `h`: `(some h)` as a 32-byte buffer, lowercase. #### Parameters | Parameter | Type | | --------- | ------------------- | | `h` | `` `0x${string}` `` | #### Returns `` `0x${string}` `` | `undefined` *** ### memoHash() > **memoHash**(`arg`): `` `0x${string}` `` | `null` H from a memo argument that is `(some <32-byte buffer>)`, or null. #### Parameters | Parameter | Type | | --------- | --------- | | `arg` | `unknown` | #### Returns `` `0x${string}` `` | `null` *** ### stacksRecover() > **stacksRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Zero-party: H from the fourth argument of a mined, successful call to the contract's `transfer`, in one reader call. A wrong reader is `stacks/wrong-reader`, a failed read `stacks/unreadable`, an unknown or unmined transaction `stacks/not-found`, any other status `stacks/not-success`, and no `(some <32 bytes>)` memo of that call `stacks/no-memo`. #### Parameters | Parameter | Type | | ----------------- | --------------------------------------------------------------------------------------------------- | | `ref` | \{ `contract`: `string`; `network`: `` `stacks:${string}` ``; `transaction`: `` `0x${string}` ``; } | | `ref.contract` | `string` | | `ref.network` | `` `stacks:${string}` `` | | `ref.transaction` | `` `0x${string}` `` | | `reader` | [`StacksReader`](#stacksreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### stacksStatus() > **stacksStatus**(`ref`, `reader`): `Promise`\<[`StacksStatus`](#stacksstatus)> The payment's settlement, in at most three reader calls. A wrong reader, or a failed transaction or nonce read, is pending `unreadable`. A mined transaction must be the origin's at its nonce, calling the contract's `transfer` with `(some H)` as its fourth argument, else failed `not-this-instrument`; then the API's `status` decides. A mined transaction's answer, settled or failed, carries its finality: `bitcoin` once the tip's tenure height is at least the block's plus two, else `block`, and a failed tenure read counts as `block`. Unmined and dropped, or unknown, the origin's confirmed nonce at or above the transaction's is failed `nonce-used`, read at the API's tip: `block`. #### Parameters | Parameter | Type | | --------- | ------------------------------------ | | `ref` | [`StacksRef`](#stacksref) & `object` | | `reader` | [`StacksReader`](#stacksreader) | #### Returns `Promise`\<[`StacksStatus`](#stacksstatus)> *** ### stacksTxid() > **stacksTxid**(`wire`): `` `0x${string}` `` SHA-512/256 of a transaction's whole consensus serialization, as `0x` and lowercase hex. #### Parameters | Parameter | Type | | --------- | ------------ | | `wire` | `Uint8Array` | #### Returns `` `0x${string}` `` --- # @integraledger/lcp/starknet > The exports of @integraledger/lcp/starknet. Source: https://lcp.integraledger.com/reference/api/starknet ## 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`](#field)\[] | | `types.OutsideExecution` | [`Field`](#field)\[] | | `types.StarknetDomain` | [`Field`](#field)\[] | *** ### StarknetInvocation #### Properties | Property | Type | | ----------- | ------------------------------------------------------- | | `calldata` | readonly `` `0x${string}` ``\[] | | `calls` | readonly [`StarknetInvocation`](#starknetinvocation)\[] | | `contract` | `` `0x${string}` `` | | `reverted` | `boolean` | | `selector` | `` `0x${string}` `` | *** ### StarknetReader Bounded, read-only calls against one network's JSON-RPC node. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ------------------------------------- | | `network` | `readonly` | [`StarknetNetwork`](#starknetnetwork) | #### Methods ##### receipt() > **receipt**(`tx`): `Promise`\<[`StarknetReceipt`](#starknetreceipt) | `null`> `starknet_getTransactionReceipt`; null: unknown hash. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`StarknetReceipt`](#starknetreceipt) | `null`> ##### trace() > **trace**(`tx`): `Promise`\<[`StarknetInvocation`](#starknetinvocation) | `null`> `starknet_traceTransaction`'s `execute_invocation`; null: none. ###### Parameters | Parameter | Type | | --------- | ------------------- | | `tx` | `` `0x${string}` `` | ###### Returns `Promise`\<[`StarknetInvocation`](#starknetinvocation) | `null`> *** ### StarknetReceipt #### Properties | Property | Type | | -------------- | ------------------------------------------------------------- | | `blockNumber` | `bigint` \| `null` | | `execution` | `"SUCCEEDED"` \| `"REVERTED"` | | `finality` | `"PRE_CONFIRMED"` \| `"ACCEPTED_ON_L2"` \| `"ACCEPTED_ON_L1"` | *** ### StarknetRef The read keys recorded at claim; `transaction` is added when the facilitator names it. #### Properties | Property | Type | Description | | --------------- | ------------------------------------- | --------------------------------------------------------------------------- | | `asset` | `` `0x${string}` `` | - | | `from` | `` `0x${string}` `` | The payer's account: the contract whose outside-execution nonce is `nonce`. | | `idDigest` | `` `0x${string}` `` | - | | `network` | [`StarknetNetwork`](#starknetnetwork) | - | | `nonce` | `` `0x${string}` `` | - | | `settleBy` | `number` | - | | `transaction?` | `` `0x${string}` `` | - | *** ### 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`](#outsideexecutiontypeddata) | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StarknetPayment`](#starknetpayment) Takes the signature as 1 to 32 felts. ###### Parameters | Parameter | Type | | ----------- | ------------------------------- | | `signature` | readonly `` `0x${string}` ``\[] | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StarknetPayment`](#starknetpayment) ## Type Aliases ### Felt > **Felt** = `` `0x${string}` `` Lowercase `0x` hex with no leading zero digit, below FELT\_P. *** ### StarknetNetwork > **StarknetNetwork** = `"starknet:SN_MAIN"` | `"starknet:SN_SEPOLIA"` *** ### StarknetPayment > **StarknetPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<\{ `from`: [`Felt`](#felt); `outsideExecution`: \{ `signature`: readonly [`Felt`](#felt)\[]; `typedData`: [`OutsideExecutionTypedData`](#outsideexecutiontypeddata); }; }> *** ### StarknetStatus > **StarknetStatus** = \{ `blockNumber`: `bigint`; `finality`: `"ACCEPTED_ON_L2"` | `"ACCEPTED_ON_L1"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"pre-confirmed"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"reverted"` | `"not-this-instrument"`; } ## Variables ### ANY\_CALLER > `const` **ANY\_CALLER**: `"0x414e595f43414c4c4552"` = `"0x414e595f43414c4c4552"` The SNIP-9 any-caller sentinel, the short string `ANY_CALLER`. *** ### exactStarknet > `const` **exactStarknet**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StarknetUnsigned`](#starknetunsigned)>; `claims`: `boolean`; `id`: `"x402/exact/starknet"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StarknetRef`](#starknetref)>; `status`: (`ref`, `reader`) => `Promise`\<[`StarknetStatus`](#starknetstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### 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") ## Functions ### chainIdFelt() > **chainIdFelt**(`n`): `` `0x${string}` `` The network's reference as a short-string felt. #### Parameters | Parameter | Type | | --------- | ------------------------------------- | | `n` | [`StarknetNetwork`](#starknetnetwork) | #### Returns `` `0x${string}` `` *** ### outsideExecution() > **outsideExecution**(`a`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`OutsideExecutionTypedData`](#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`](#starknetnetwork); `nonce`: `` `0x${string}` ``; `payTo`: `` `0x${string}` ``; } | | `a.amount` | `bigint` | | `a.asset` | `` `0x${string}` `` | | `a.executeBefore` | `number` | | `a.feePayer` | `` `0x${string}` `` | | `a.network` | [`StarknetNetwork`](#starknetnetwork) | | `a.nonce` | `` `0x${string}` `` | | `a.payTo` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`OutsideExecutionTypedData`](#outsideexecutiontypeddata) *** ### pairingOf() > **pairingOf**(`option`): `"x402/exact/starknet"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/starknet"` | `undefined` *** ### snNonce() > **snNonce**(`h`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### starknetIdDigest() > **starknetIdDigest**(`from`, `to`, `amount`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> 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`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### starknetLandedNonce() > **starknetLandedNonce**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> 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. It is found by the transfer's identity on `ref.asset`, not by the recorded nonce. #### Parameters | Parameter | Type | | --------- | ---------------------------------------- | | `ref` | [`StarknetRef`](#starknetref) & `object` | | `reader` | [`StarknetReader`](#starknetreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### starknetStatus() > **starknetStatus**(`ref`, `reader`): `Promise`\<[`StarknetStatus`](#starknetstatus)> Reads the named transaction's receipt, then walks its trace for exactly one non-reverted `execute_from_outside_v2` whose calldata carries this nonce and whose direct, non-reverted call is `transfer` on `ref.asset` with this transfer's identity. A failed read, or a reader for another network, is pending. Two calls. #### Parameters | Parameter | Type | | --------- | ---------------------------------------- | | `ref` | [`StarknetRef`](#starknetref) & `object` | | `reader` | [`StarknetReader`](#starknetreader) | #### Returns `Promise`\<[`StarknetStatus`](#starknetstatus)> --- # @integraledger/lcp/stellar > The exports of @integraledger/lcp/stellar. Source: https://lcp.integraledger.com/reference/api/stellar ## Interfaces ### 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 RPC. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ----------------------------------- | | `network` | `readonly` | [`StellarNetwork`](#stellarnetwork) | #### Methods ##### latestLedger() > **latestLedger**(): `Promise`\<`number`> `getLatestLedger`. ###### Returns `Promise`\<`number`> ##### transaction() > **transaction**(`hash`): `Promise`\<\{ `envelopeXdr?`: `string`; `ledger?`: `number`; `oldestLedger`: `number`; `status`: `"SUCCESS"` | `"FAILED"` | `"NOT_FOUND"`; }> `getTransaction`. ###### Parameters | Parameter | Type | | --------- | -------- | | `hash` | `string` | ###### Returns `Promise`\<\{ `envelopeXdr?`: `string`; `ledger?`: `number`; `oldestLedger`: `number`; `status`: `"SUCCESS"` | `"FAILED"` | `"NOT_FOUND"`; }> ##### transfers() > **transfers**(`f`): `Promise`\<\{ `complete`: `boolean`; `cursor?`: `string`; `events`: readonly `object`\[]; `oldestLedger`: `number`; }> One page of SEP-41 `transfer` events of `asset` to `toBase` between two ledgers, with each event's `to_muxed_id`. `cursor` is present while more pages remain. `complete` is false when the RPC reports events disabled. `oldestLedger` is the oldest ledger the RPC still holds. ###### Parameters | Parameter | Type | | -------------- | -------------------------------------------------------------------------------------------------------------- | | `f` | \{ `asset`: `string`; `cursor?`: `string`; `fromLedger`: `number`; `toBase`: `string`; `toLedger`: `number`; } | | `f.asset` | `string` | | `f.cursor?` | `string` | | `f.fromLedger` | `number` | | `f.toBase` | `string` | | `f.toLedger` | `number` | ###### Returns `Promise`\<\{ `complete`: `boolean`; `cursor?`: `string`; `events`: readonly `object`\[]; `oldestLedger`: `number`; }> *** ### StellarRef The read keys recorded at claim. #### Properties | Property | Type | Description | | --------------- | ----------------------------------- | ---------------------------------- | | `asset` | `string` | - | | `authDigest` | `` `0x${string}` `` | - | | `expiration` | `number` | - | | `fromLedger` | `number` | - | | `network` | [`StellarNetwork`](#stellarnetwork) | - | | `toBase` | `string` | - | | `toId` | `string` | The muxed id, as a decimal string. | | `transaction?` | `string` | - | *** ### StellarUnsigned What the payer signs (the signer signs SHA-256 of `preimage`), and how the signature completes the transaction. #### Properties | Property | Type | | ------------------ | ---------------- | | `request` | `object` | | `request.kind` | `"stellar-auth"` | | `request.preimage` | `Uint8Array` | #### Methods ##### complete() > **complete**(`signature`): `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The base64 XDR of the transaction with the entry signed. ###### Parameters | Parameter | Type | | ----------- | ------------ | | `signature` | `Uint8Array` | ###### Returns `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) ## Type Aliases ### StellarNetwork > **StellarNetwork** = `"stellar:pubnet"` | `"stellar:testnet"` *** ### StellarStatus > **StellarStatus** = \{ `ledger`: `number`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"failed"` | `"not-this-instrument"`; } ## Variables ### PASSPHRASE > `const` **PASSPHRASE**: `Readonly`\<`Record`\<[`StellarNetwork`](#stellarnetwork), `string`>> Stellar rail pieces: the payer-signed Soroban `transfer`, its muxed `to` whose 8-byte id is the ATR hash's first 8 bytes, the digest of the signed authorization entry, and settlement read through a bounded reader. *** ### 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. *** ### SCVAL\_MAX\_ELEMENTS > `const` **SCVAL\_MAX\_ELEMENTS**: `number` The most ScVal vector elements and map entries in one envelope. Each takes at least its 4-byte discriminant, so no envelope within `MAX_XDR` base64 characters holds more. ## Functions ### decodeStellarTx() > **decodeStellarTx**(`xdrB64`, `network`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarPayment`](#stellarpayment) Decodes a base64 `TransactionEnvelope` (v1, or a fee bump's inner v1) of at most 8 KiB 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. `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. #### Parameters | Parameter | Type | | --------- | ----------------------------------- | | `xdrB64` | `string` | | `network` | [`StellarNetwork`](#stellarnetwork) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarPayment`](#stellarpayment) *** ### muxedFor() > **muxedFor**(`base`, `h`): `string` The `M…` strkey of a `G…` account and `muxedId(h)`. Throws TypeError when `base` is not a `G…` strkey. #### Parameters | Parameter | Type | | --------- | ------------------- | | `base` | `string` | | `h` | `` `0x${string}` `` | #### Returns `string` *** ### muxedId() > **muxedId**(`h`): `bigint` The hash's first 8 bytes, big-endian, as a u64. #### Parameters | Parameter | Type | | --------- | ------------------- | | `h` | `` `0x${string}` `` | #### Returns `bigint` *** ### scValsWithinCaps() > **scValsWithinCaps**(`wire`): `boolean` True when every ScVal in a decoded XDR value nests at most `SCVAL_MAX_DEPTH` vectors and maps, every authorized invocation at most `SCVAL_MAX_DEPTH` sub-invocations, and the value holds at most `SCVAL_MAX_ELEMENTS` vector elements and map entries. The walk keeps its own stack. #### Parameters | Parameter | Type | | --------- | --------- | | `wire` | `unknown` | #### Returns `boolean` *** ### stellarLocate() > **stellarLocate**(`ref`, `reader`): `Promise`\<\{ `complete`: `boolean`; `found?`: `string`; }> Finds the instrument when no transaction was named: the asset's transfer events to `toBase` from `fromLedger` to the entry's expiration, keeping those whose muxed id is `toId`, each read as `stellarStatus` does. `complete` is true only when every page was read, the reader reported events enabled on each, the RPC still held `fromLedger` (`oldestLedger` ≤ `fromLedger`), and every candidate was read: a listed candidate whose transaction reads pending leaves the search incomplete. At most 10 pages and 50 candidates. #### Parameters | Parameter | Type | | --------- | --------------------------------- | | `ref` | [`StellarRef`](#stellarref) | | `reader` | [`StellarReader`](#stellarreader) | #### Returns `Promise`\<\{ `complete`: `boolean`; `found?`: `string`; }> *** ### stellarStatus() > **stellarStatus**(`ref`, `reader`): `Promise`\<[`StellarStatus`](#stellarstatus)> Reads a named transaction. Settled when it succeeded and its authorization entry's preimage digest and `to` id are the ones recorded at claim. A failed read, or a reader for another network, is pending. One call. #### Parameters | Parameter | Type | | --------- | -------------------------------------- | | `ref` | [`StellarRef`](#stellarref) & `object` | | `reader` | [`StellarReader`](#stellarreader) | #### Returns `Promise`\<[`StellarStatus`](#stellarstatus)> *** ### transferEventOf() > **transferEventOf**(`topic`, `value`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `toBase`: `string`; `toMuxedId`: `bigint` | `null`; } A `transfer` event's recipient (the non-muxed `to` topic) and its `to_muxed_id`: the u64 in the event's data map, or null when the data carries none, or carries the string or bytes form. #### Parameters | Parameter | Type | | --------- | -------------------- | | `topic` | readonly `string`\[] | | `value` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `toBase`: `string`; `toMuxedId`: `bigint` | `null`; } *** ### transferEventTopics() > **transferEventTopics**(`toBase`): readonly `string`\[] | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The `getEvents` topic filter for SEP-41 `transfer` events to `toBase`, as base64 XDR segments: the symbol `transfer`, any `from`, `toBase` as an address, and any trailing topics (the Stellar Asset Contract adds its asset). #### Parameters | Parameter | Type | | --------- | -------- | | `toBase` | `string` | #### Returns readonly `string`\[] | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) --- # @integraledger/lcp/sui > The exports of @integraledger/lcp/sui. Source: https://lcp.integraledger.com/reference/api/sui ## Interfaces ### SuiExecuted #### Properties | Property | Type | | ----------------- | -------------------------- | | `checkpoint` | `bigint` \| `null` | | `status` | `"SUCCESS"` \| `"FAILURE"` | | `transactionBcs` | `Uint8Array` | *** ### SuiPayload The payload x402's Sui scheme defines. #### Properties | Property | Type | | -------------- | -------- | | `signature` | `string` | | `transaction` | `string` | *** ### SuiPaymentPayload #### Properties | Property | Type | | -------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`SuiPayload`](#suipayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### SuiReader Bounded, read-only calls against one network's GraphQL endpoint. Every failure rejects with `ReaderError`. `read` is one request, so one snapshot: `query($d:String!){transaction(digest:$d){transactionBcs effects{status checkpoint{sequenceNumber}}} checkpoint{epoch{epochId}}}`, where the last field is the latest checkpoint's epoch. #### Properties | Property | Modifier | Type | | ---------- | ---------- | --------------------------- | | `network` | `readonly` | [`SuiNetwork`](#suinetwork) | #### Methods ##### read() > **read**(`digest`): `Promise`\<\{ `epoch`: `bigint`; `tx`: [`SuiExecuted`](#suiexecuted) | `null`; }> ###### Parameters | Parameter | Type | | --------- | -------- | | `digest` | `string` | ###### Returns `Promise`\<\{ `epoch`: `bigint`; `tx`: [`SuiExecuted`](#suiexecuted) | `null`; }> *** ### SuiRef #### Properties | Property | Type | Description | | ------------- | --------------------------- | ------------------------------------------------------------------- | | `digest` | `string` | - | | `network` | [`SuiNetwork`](#suinetwork) | - | | `untilEpoch` | `string` | The last epoch the transaction can execute in, as a decimal string. | *** ### SuiTx A decoded `TransactionData`: the bytes as received, their digest, the unused `Pure` inputs, and the epoch bound. #### Properties | Property | Type | Description | | ------------- | -------------------------------------------- | ----------------------------------------------------------------------- | | `bytes` | `Uint8Array` | - | | `digest` | `string` | Base58 of Blake2b-256 over `"TransactionData::"` followed by the bytes. | | `untilEpoch` | `bigint` \| `null` | - | | `unusedPure` | readonly `Uint8Array`\<`ArrayBufferLike`>\[] | - | *** ### 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#paymentrequirements) | | `request.expiration` | `"epoch-bounded"` | | `request.kind` | `"sui-transaction"` | | `request.pureInput` | `Uint8Array` | #### Methods ##### complete() > **complete**(`signed`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SuiPaymentPayload`](#suipaymentpayload) ###### Parameters | Parameter | Type | | --------- | --------------------------- | | `signed` | [`SuiPayload`](#suipayload) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SuiPaymentPayload`](#suipaymentpayload) ## Type Aliases ### SuiNetwork > **SuiNetwork** = `"sui:mainnet"` | `"sui:testnet"` | `"sui:devnet"` *** ### SuiStatus > **SuiStatus** = \{ `checkpoint`: `bigint` | `null`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"aborted"` | `"expired"` | `"not-this-instrument"`; } ## Variables ### exactSui > `const` **exactSui**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SuiUnsigned`](#suiunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/sui"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SuiRef`](#suiref)>; `status`: (`ref`, `reader`) => `Promise`\<[`SuiStatus`](#suistatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### decodeSuiTx() > **decodeSuiTx**(`base64`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SuiTx`](#suitx) Decodes a base64 `TransactionData` V1 with a programmable kind. #### Parameters | Parameter | Type | | --------- | -------- | | `base64` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SuiTx`](#suitx) *** ### suiCarrier() > **suiCarrier**(`tx`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The hash carried by exactly one unused `Pure` input of exactly 32 bytes. #### Parameters | Parameter | Type | | --------- | ----------------- | | `tx` | [`SuiTx`](#suitx) | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### suiOptionCheck() > **suiOptionCheck**(`option`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` The pairing's filter: undefined for an option this pairing can pay, or the refusal naming why not. #### Parameters | Parameter | Type | | --------- | --------- | | `option` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` *** ### suiPairingOf() > **suiPairingOf**(`option`): `"x402/exact/sui"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/sui"` | `undefined` *** ### suiRecover() > **suiRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Reads the hash back from the executed transaction alone, by its digest. One call. #### Parameters | Parameter | Type | | ------------- | ---------------------------------------------------------------- | | `ref` | \{ `digest`: `string`; `network`: [`SuiNetwork`](#suinetwork); } | | `ref.digest` | `string` | | `ref.network` | [`SuiNetwork`](#suinetwork) | | `reader` | [`SuiReader`](#suireader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### suiStatus() > **suiStatus**(`ref`, `reader`): `Promise`\<[`SuiStatus`](#suistatus)> Reads the recorded digest. A failed read, or a reader for another network, is pending. An absent transaction is expired once the latest epoch is past its bound; a present one must be these bytes carrying this hash, and its effects' status decides. One call. #### Parameters | Parameter | Type | | --------- | ------------------------------ | | `ref` | [`SuiRef`](#suiref) & `object` | | `reader` | [`SuiReader`](#suireader) | #### Returns `Promise`\<[`SuiStatus`](#suistatus)> --- # @integraledger/lcp/svm > The exports of @integraledger/lcp/svm. Source: https://lcp.integraledger.com/reference/api/svm ## 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; absent, the message carries no memo. | | `mint` | `string` | - | | `payer` | `string` | - | | `recentBlockhash` | `string` | - | | `tokenProgram` | `string` | - | *** ### ChannelIx #### Properties | Property | Type | | ---------- | ------------------------------------------- | | `channel` | `string` | | `data` | `Uint8Array` | | `kind` | `"open"` \| `"top_up"` \| `"request_close"` | *** ### SvmBuildInput #### Properties | Property | Type | | ------------------- | -------- | | `amount` | `bigint` | | `computeUnitLimit` | `number` | | `computeUnitPrice` | `bigint` | | `decimals` | `number` | | `feePayer` | `string` | | `memo` | `string` | | `mint` | `string` | | `payer` | `string` | | `payTo` | `string` | | `recentBlockhash` | `string` | | `tokenProgram` | `string` | *** ### SvmLanded A landed transaction as `getTransaction` returns it with encoding `base64` and `maxSupportedTransactionVersion` 0. #### Properties | Property | Type | Description | | ----------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `err` | `unknown` | - | | `inner` | readonly `object`\[] | `meta.innerInstructions`, flattened; `program` indexes the static keys, then `loaded.writable`, then `loaded.readonly`. | | `loaded` | `object` | - | | `loaded.readonly` | readonly `Uint8Array`\<`ArrayBufferLike`>\[] | - | | `loaded.writable` | readonly `Uint8Array`\<`ArrayBufferLike`>\[] | - | | `wire` | `Uint8Array` | - | *** ### SvmReader Bounded, read-only calls against one network's endpoint. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ------------------------ | | `network` | `readonly` | `` `solana:${string}` `` | #### Methods ##### blockhashValid() > **blockhashValid**(`blockhash`): `Promise`\<`boolean`> `isBlockhashValid` at commitment `confirmed`. ###### Parameters | Parameter | Type | | ----------- | -------- | | `blockhash` | `string` | ###### Returns `Promise`\<`boolean`> ##### firstAvailableBlock() > **firstAvailableBlock**(): `Promise`\<`bigint`> `getFirstAvailableBlock`: the lowest slot whose block the node still holds. ###### Returns `Promise`\<`bigint`> ##### signatures() > **signatures**(`address`, `page`): `Promise`\ `getSignaturesForAddress`, newest first. `memo` is the RPC's rendering of the transaction's memos (`[len] text`, joined by `; `), or null when it has none. ###### Parameters | Parameter | Type | | -------------- | ------------------------------------------ | | `address` | `string` | | `page` | \{ `before?`: `string`; `limit`: `1000`; } | | `page.before?` | `string` | | `page.limit` | `1000` | ###### Returns `Promise`\ ##### transaction() > **transaction**(`signature`, `commitment`): `Promise`\<[`SvmLanded`](#svmlanded) | `null`> `getTransaction`; null when none is found at that commitment. ###### Parameters | Parameter | Type | | ------------ | ------------------------------ | | `signature` | `string` | | `commitment` | `"finalized"` \| `"confirmed"` | ###### Returns `Promise`\<[`SvmLanded`](#svmlanded) | `null`> *** ### SvmRef The read keys recorded at claim. `blockhash` is empty for a durable-nonce transaction, which never expires. #### Properties | Property | Type | Description | | --------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `blockhash` | `string` | - | | `channel?` | `string` | The channel account the transaction creates, for an opening that carries no memo: the search pages this address's signatures instead of the fee payer's, and reads each one as a candidate. | | `digest` | `` `0x${string}` `` | - | | `feePayer` | `string` | - | | `fromSlot` | `string` | The slot read at claim, as a decimal string. | | `network` | `` `solana:${string}` `` | - | | `transaction?` | `string` | - | *** ### SvmTx #### Properties | Property | Type | Description | | --------------- | -------------------------------------------- | -------------------------------------- | | `blockhash` | `Uint8Array` | - | | `instructions` | readonly `SvmInstruction`\[] | - | | `keys` | readonly `Uint8Array`\<`ArrayBufferLike`>\[] | The static account keys, in order. | | `message` | `Uint8Array` | Exactly the bytes every signer signed. | | `signatures` | readonly `Uint8Array`\<`ArrayBufferLike`>\[] | - | ## Type Aliases ### ChannelStatus > **ChannelStatus** = [`SvmStatus`](#svmstatus) | \{ `state`: `"failed"`; `why`: `"no-channel-instruction"`; } *** ### SolanaNetwork > **SolanaNetwork** = `` `solana:${string}` `` CAIP-2: `solana:` and 32 base58 characters. *** ### SvmCloseRef > **SvmCloseRef** = `object` #### Properties | Property | Type | | -------------- | --------------------------------- | | `channel` | `string` | | `network` | [`SolanaNetwork`](#solananetwork) | | `phase` | `"close"` | | `program` | `string` | | `transaction` | `string` | *** ### SvmCloseStatus > **SvmCloseStatus** = \{ `commitment`: `"confirmed"` | `"finalized"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"err"` | `"not-a-close"`; } *** ### SvmStatus > **SvmStatus** = \{ `commitment`: `"confirmed"` | `"finalized"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"err"` | `"not-this-instrument"` | `"no-transfer"`; } ## Variables ### ATA\_PROGRAM > `const` **ATA\_PROGRAM**: `"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"` = `"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### COMPUTE\_BUDGET > `const` **COMPUTE\_BUDGET**: `"ComputeBudget111111111111111111111111111111"` = `"ComputeBudget111111111111111111111111111111"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### MEMO\_V3 > `const` **MEMO\_V3**: `"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"` = `"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### MEMO\_V4 > `const` **MEMO\_V4**: `"Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH"` = `"Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### OPEN\_DISCRIMINATOR > `const` **OPEN\_DISCRIMINATOR**: `1` = `1` *** ### PAYMENT\_CHANNELS > `const` **PAYMENT\_CHANNELS**: `"CHNLxYvVA28MJP9PrFuDXccuoGXAx7jBacfLEkahyGsX"` = `"CHNLxYvVA28MJP9PrFuDXccuoGXAx7jBacfLEkahyGsX"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### RENT\_SYSVAR > `const` **RENT\_SYSVAR**: `"SysvarRent111111111111111111111111111111111"` = `"SysvarRent111111111111111111111111111111111"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### SEAL\_DISCRIMINATOR > `const` **SEAL\_DISCRIMINATOR**: `6` = `6` *** ### SETTLE\_AND\_SEAL\_DISCRIMINATOR > `const` **SETTLE\_AND\_SEAL\_DISCRIMINATOR**: `4` = `4` *** ### SYSTEM > `const` **SYSTEM**: `"11111111111111111111111111111111"` = `"11111111111111111111111111111111"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### TOKEN > `const` **TOKEN**: `"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"` = `"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. *** ### TOKEN\_2022 > `const` **TOKEN\_2022**: `"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"` = `"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"` Solana rail pieces: the wire transaction, its one Memo instruction carrying the ATR hash in LCP string form, the digest of the message the payer signed, and settlement read through a bounded reader. ## Functions ### buildChannelMessage() > **buildChannelMessage**(`i`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The v0 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. The fee payer is also the `open`'s rent payer and payee. #### Parameters | Parameter | Type | | --------- | ----------------------------------------- | | `i` | [`ChannelBuildInput`](#channelbuildinput) | #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### buildSvmMessage() > **buildSvmMessage**(`i`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> The versioned (v0) 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. No lookup tables. #### Parameters | Parameter | Type | | --------- | --------------------------------- | | `i` | [`SvmBuildInput`](#svmbuildinput) | #### Returns `Promise`\<`Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### channelInstruction() > **channelInstruction**(`tx`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ChannelIx`](#channelix) The transaction's one top-level payment-channels instruction, by its discriminator. #### Parameters | Parameter | Type | | --------- | ----------------- | | `tx` | [`SvmTx`](#svmtx) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`ChannelIx`](#channelix) *** ### channelPda() > **channelPda**(`a`): `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#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#refusal) *** ### channelVoucherMessage() > **channelVoucherMessage**(`channelId`, `cumulative`, `expiresAt`): `Uint8Array` 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` *** ### decodeSvmTx() > **decodeSvmTx**(`wire`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SvmTx`](#svmtx) Decodes a legacy or v0 wire transaction of at most 1,232 bytes. #### Parameters | Parameter | Type | | --------- | ------------ | | `wire` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SvmTx`](#svmtx) *** ### findPda() > **findPda**(`seeds`, `program`): [`Refusal`](https://lcp.integraledger.com/reference/api#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#refusal) | \{ `address`: `string`; `bump`: `number`; } *** ### openInstructionData() > **openInstructionData**(`a`): `Uint8Array` 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` *** ### openOf() > **openOf**(`tx`, `program`): [`Refusal`](https://lcp.integraledger.com/reference/api#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`. #### Parameters | Parameter | Type | | --------- | ----------------- | | `tx` | [`SvmTx`](#svmtx) | | `program` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `salt`: `bigint`; } *** ### sessionProof() > **sessionProof**(`p`): `Uint8Array` The UTF-8 of the core's `canonicalJson` of `{channelId, domain: "mpp-session-auth-v1", payer, sessionChallengeId}`. #### Parameters | Parameter | Type | | --------------- | ----------------------------------------------------------------------- | | `p` | \{ `challengeId`: `string`; `channelId`: `string`; `payer`: `string`; } | | `p.challengeId` | `string` | | `p.channelId` | `string` | | `p.payer` | `string` | #### Returns `Uint8Array` *** ### sessionSalt() > **sessionSalt**(`h`): `bigint` H's first 8 bytes read as a little-endian u64, so the salt's encoded bytes are exactly those 8 bytes. #### Parameters | Parameter | Type | | --------- | ------------------- | | `h` | `` `0x${string}` `` | #### Returns `bigint` *** ### solanaVoucher() > **solanaVoucher**(`channelId`, `cumulative`, `expiresAt?`): `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### svmCarrier() > **svmCarrier**(`tx`): [`Refusal`](https://lcp.integraledger.com/reference/api#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`. #### Parameters | Parameter | Type | | --------- | ----------------- | | `tx` | [`SvmTx`](#svmtx) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `memo`: `string`; } *** ### svmChannelStatus() > **svmChannelStatus**(`ref`, `reader`): `Promise`\<[`ChannelStatus`](#channelstatus)> `svmStatus` with the presence test replaced: exactly one top-level payment-channels instruction whose discriminator is `open` (1) or `top_up` (3). At most two calls. #### Parameters | Parameter | Type | | --------- | ------------------------------ | | `ref` | [`SvmRef`](#svmref) & `object` | | `reader` | [`SvmReader`](#svmreader) | #### Returns `Promise`\<[`ChannelStatus`](#channelstatus)> *** ### svmCloseStatus() > **svmCloseStatus**(`ref`, `reader`): `Promise`\<[`SvmCloseStatus`](#svmclosestatus)> Reads a reported close at `finalized`, then `confirmed`: a top-level instruction of `program` whose data byte 0 is `settleAndSeal` (channel at account 1) or `seal` (channel at account 0) naming the channel is settled; any other landed transaction is failed `not-a-close`. At most two calls. #### Parameters | Parameter | Type | | --------- | ----------------------------- | | `ref` | [`SvmCloseRef`](#svmcloseref) | | `reader` | [`SvmReader`](#svmreader) | #### Returns `Promise`\<[`SvmCloseStatus`](#svmclosestatus)> *** ### svmDigest() > **svmDigest**(`tx`): `Promise`\<`` `0x${string}` ``> SHA-256 over the message bytes every signer signed. #### Parameters | Parameter | Type | | --------- | ----------------- | | `tx` | [`SvmTx`](#svmtx) | #### Returns `Promise`\<`` `0x${string}` ``> *** ### svmLocate() > **svmLocate**(`ref`, `reader`, `h`, `status?`): `Promise`\<\{ `complete`: `boolean`; `found?`: `string`; }> Finds the instrument when no transaction was named: pages the fee payer's signatures, newest first, down to `fromSlot`, at most 10 pages of 1,000. A signature is a candidate only when its memo carries `h` in LCP string form. With `channel` in the reference, it pages that account's signatures instead, and every signature is a candidate. Each candidate is read through `status`, the pairing's own (`svmStatus` when none is given), at most 50 per pass. `complete` is true only when the node's first available block is at or before `fromSlot`, the pages reached `fromSlot` within those bounds, and every candidate was read: a listed candidate whose transaction reads pending leaves the search incomplete. #### Parameters | Parameter | Type | Default value | | --------- | -------------------------------------------------------------------------- | ------------- | | `ref` | [`SvmRef`](#svmref) | `undefined` | | `reader` | [`SvmReader`](#svmreader) | `undefined` | | `h` | `` `0x${string}` `` | `undefined` | | `status` | (`ref`, `reader`) => `Promise`\<\{ `state`: `string`; `why?`: `string`; }> | `svmStatus` | #### Returns `Promise`\<\{ `complete`: `boolean`; `found?`: `string`; }> *** ### svmRecover() > **svmRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Zero-party recovery: the ATR hash in the landed transaction's one memo. One or two calls. #### Parameters | Parameter | Type | | ----------------- | ------------------------------------------------------------------ | | `ref` | \{ `network`: `` `solana:${string}` ``; `transaction`: `string`; } | | `ref.network` | `` `solana:${string}` `` | | `ref.transaction` | `string` | | `reader` | [`SvmReader`](#svmreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### svmStatus() > **svmStatus**(`ref`, `reader`): `Promise`\<[`SvmStatus`](#svmstatus)> Reads a named transaction's settlement. It must be the message the payer signed (by digest), must have executed without error, and must carry a token or SOL transfer. A failed read, or a reader for another network, is pending. At most two calls. #### Parameters | Parameter | Type | | --------- | ------------------------------ | | `ref` | [`SvmRef`](#svmref) & `object` | | `reader` | [`SvmReader`](#svmreader) | #### Returns `Promise`\<[`SvmStatus`](#svmstatus)> --- # @integraledger/lcp/tempo > The exports of @integraledger/lcp/tempo. Source: https://lcp.integraledger.com/reference/api/tempo ## Interfaces ### KeyAuthorizationUnsigned #### Properties | Property | Type | Description | | ----------------------- | ------------------------------------------------- | ----------------------------------------------------------------- | | `request` | `object` | `digest` is keccak256(rlp(authorization)); the root key signs it. | | `request.authorization` | [`TempoKeyAuthorization`](#tempokeyauthorization) | - | | `request.digest` | `` `0x${string}` `` | - | | `request.kind` | `"tempo-key-authorization"` | - | #### Methods ##### complete() > **complete**(`rootSignature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp#mppcredential) ###### Parameters | Parameter | Type | | --------------- | ------------------- | | `rootSignature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`MppCredential`](https://lcp.integraledger.com/reference/api/mpp#mppcredential) *** ### TempoCall #### Properties | Property | Type | | -------- | ----------------------------- | | `input` | `Uint8Array` | | `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}` `` | ## 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**: `"0x4516edb7b2ea29d92a0dbb5ff857203558b677157f4115d582b66e07b90ac8a8"` ChannelOpened(bytes32,address,address,address,address,uint256) *** ### 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\_AUTHORIZED\_TOPIC > `const` **KEY\_AUTHORIZED\_TOPIC**: `"0x7c46af0758d3eca5e8195833bff1e5153f6249fc0f2968a878fd28544315a03c"` KeyAuthorized(address,address,uint8,uint64): the account and the key id are topics 1 and 2. *** ### 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) *** ### 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#refusal) | \{ `digest`: `` `0x${string}` ``; `keyId`: `` `0x${string}` ``; `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. #### Parameters | Parameter | Type | | --------- | ------------------- | | `signed` | `` `0x${string}` `` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `digest`: `` `0x${string}` ``; `keyId`: `` `0x${string}` ``; `witness?`: `` `0x${string}` ``; } *** ### decodeTempoTx() > **decodeTempoTx**(`wire`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `calls`: [`TempoCall`](#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. `valid_before` written empty is null. #### Parameters | Parameter | Type | | --------- | ------------ | | `wire` | `Uint8Array` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `calls`: [`TempoCall`](#tempocall)\[]; `chainId`: `bigint`; `validBefore`: `bigint` | `null`; } *** ### encodeKeyAuthorization() > **encodeKeyAuthorization**(`a`, `signature?`): `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#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. #### Parameters | Parameter | Type | | ------------ | ------------------------------------------------- | | `a` | [`TempoKeyAuthorization`](#tempokeyauthorization) | | `signature?` | `` `0x${string}` `` | #### Returns `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### expiringNonceHash() > **expiringNonceHash**(`signedTx`, `sender`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### keyAccount() > **keyAccount**(`receipt`, `h`, `keyId`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The account for which a receipt's key authorization carried witness `h` and registered `keyId`: topic 1 of the account keychain's `KeyAuthorizationWitness` logs whose topic 2 is `h`, when the keychain's `KeyAuthorized` log in the same receipt names that account and `keyId`. The receipt's status is not read: the authorization is applied before the transaction's calls run. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `receipt` | [`EvmReceipt`](https://lcp.integraledger.com/reference/api/evm#evmreceipt) | | `h` | `` `0x${string}` `` | | `keyId` | `` `0x${string}` `` | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### memoCalldata() > **memoCalldata**(`to`, `amount`, `memo`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) `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 `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### tempoChannelId() > **tempoChannelId**(`d`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) 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`](#tempodescriptor) & `object` | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### witnessRecover() > **witnessRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Reads the transaction's receipt and returns topic 2 of its one `KeyAuthorizationWitness` log from the account keychain. One call. #### Parameters | Parameter | Type | | ----------------- | ------------------------------------------------------------- | | `ref` | \{ `network`: `string`; `transaction`: `` `0x${string}` ``; } | | `ref.network` | `string` | | `ref.transaction` | `` `0x${string}` `` | | `reader` | [`EvmReader`](https://lcp.integraledger.com/reference/api/evm#evmreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ## References ### RECEIVE\_POLICY\_GUARD Re-exports [RECEIVE\_POLICY\_GUARD](https://lcp.integraledger.com/reference/api/evm#receive_policy_guard) --- # @integraledger/lcp/tron > The exports of @integraledger/lcp/tron. Source: https://lcp.integraledger.com/reference/api/tron ## Interfaces ### TronChoice #### Properties | Property | Type | Description | | ----------------- | ---------------------------------------------------------------- | ----------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#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#paymentrequired) | - | *** ### TronInfo #### Properties | Property | Type | Description | | -------------- | -------------------- | --------------------------------------------------------------- | | `blockNumber` | `bigint` | - | | `logs` | readonly `object`\[] | `address` is 20-byte hex as the node returns it. | | `result` | `string` | `receipt.result` as the node returns it: "SUCCESS", "REVERT", … | *** ### TronRaw The `Transaction.raw` fields this profile uses. #### Properties | Property | Type | | ------------------ | ------------ | | `callData` | `Uint8Array` | | `contractAddress` | `Uint8Array` | | `data` | `Uint8Array` | | `expiration` | `bigint` | | `feeLimit` | `bigint` | | `owner` | `Uint8Array` | | `refBlockBytes` | `Uint8Array` | | `refBlockHash` | `Uint8Array` | | `timestamp` | `bigint` | *** ### TronReader Bounded, read-only calls against one network's FullNode and SolidityNode. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ---------------------- | | `network` | `readonly` | `` `tron:${number}` `` | #### Methods ##### info() > **info**(`txid`, `level`): `Promise`\<[`TronInfo`](#troninfo) | `null`> `/walletsolidity/gettransactioninfobyid` ("solid") or `/wallet/gettransactioninfobyid` ("head"); null: none. ###### Parameters | Parameter | Type | | --------- | --------------------- | | `txid` | `` `0x${string}` `` | | `level` | `"head"` \| `"solid"` | ###### Returns `Promise`\<[`TronInfo`](#troninfo) | `null`> ##### solidHead() > **solidHead**(): `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; }> `/walletsolidity/getnowblock`: the latest solidified block's number and time in milliseconds. ###### Returns `Promise`\<\{ `number`: `bigint`; `timestamp`: `bigint`; }> ##### 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 recorded at claim, JSON-serialisable. `asset` is the contract's 21-byte address; `expiration` is decimal milliseconds. #### Properties | Property | Type | | ------------- | ---------------------- | | `asset` | `` `0x${string}` `` | | `expiration` | `string` | | `network` | `` `tron:${number}` `` | | `txid` | `` `0x${string}` `` | *** ### TronUnsigned #### Properties | Property | Type | Description | | -------------- | ------------- | ------------------------------------------- | | `request` | `object` | The 32-byte transaction id the payer signs. | | `request.kind` | `"tron-txid"` | - | | `request.txid` | `Uint8Array` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TronPayment`](#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#refusal) | [`TronPayment`](#tronpayment) ## Type Aliases ### TronNetwork > **TronNetwork** = `` `tron:${number}` `` CAIP-2 with the decimal chain id: tron:728126428 mainnet, tron:3448148188 Nile, tron:2494104990 Shasta. *** ### TronPayment > **TronPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<\{ `transaction`: `string`; }> *** ### TronStatus > **TronStatus** = \{ `blockNumber`: `bigint`; `finality`: `"solidified"` | `"head"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"unreadable"`; } | \{ `result?`: `string`; `state`: `"failed"`; `why`: `"contract-failed"` | `"no-transfer"` | `"expired"`; } ## Variables ### exactTronMemo > `const` **exactTronMemo**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TronUnsigned`](#tronunsigned)>; `carrier`: `null`; `claims`: `boolean`; `id`: `"x402/exact/tron/lcp-trc20-memo"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TronRef`](#tronref)>; `status`: (`ref`, `reader`) => `Promise`\<[`TronStatus`](#tronstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `txId`: (`tx`) => `string`; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### 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"` ## Functions ### decodeTronTx() > **decodeTronTx**(`hex`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `raw`: [`TronRaw`](#tronraw); `rawBytes`: `Uint8Array`; `signatures`: `Uint8Array`\<`ArrayBufferLike`>\[]; } 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#refusal) | \{ `raw`: [`TronRaw`](#tronraw); `rawBytes`: `Uint8Array`; `signatures`: `Uint8Array`\<`ArrayBufferLike`>\[]; } *** ### encodeTronRaw() > **encodeTronRaw**(`r`): `Uint8Array` `Transaction.raw` as java-tron serialises it: fields in ascending order, default values omitted. #### Parameters | Parameter | Type | | --------- | --------------------- | | `r` | [`TronRaw`](#tronraw) | #### Returns `Uint8Array` *** ### pairingOf() > **pairingOf**(`option`): `"x402/exact/tron/lcp-trc20-memo"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/tron/lcp-trc20-memo"` | `undefined` *** ### tronAddress() > **tronAddress**(`address`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#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`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### tronCarrier() > **tronCarrier**(`tx`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `txid`: `` `0x${string}` ``; }> The hash in the memo of a transaction whose one contract calls `transfer`, and the transaction id. #### Parameters | Parameter | Type | | ------------- | ------------------------------------------------------------ | | `tx` | \{ `raw`: [`TronRaw`](#tronraw); `rawBytes`: `Uint8Array`; } | | `tx.raw` | [`TronRaw`](#tronraw) | | `tx.rawBytes` | `Uint8Array` | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `txid`: `` `0x${string}` ``; }> *** ### tronRecover() > **tronRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Recovers the hash from the transaction id alone: the memo of the transaction whose raw bytes hash to the id. One call. #### Parameters | Parameter | Type | | ------------- | -------------------------------------------------------------------- | | `ref` | \{ `network`: `` `tron:${number}` ``; `txid`: `` `0x${string}` ``; } | | `ref.network` | `` `tron:${number}` `` | | `ref.txid` | `` `0x${string}` `` | | `reader` | [`TronReader`](#tronreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### tronStatus() > **tronStatus**(`ref`, `reader`): `Promise`\<[`TronStatus`](#tronstatus)> Reads the transaction by id: at the Solidity node first, then at the FullNode's head. Settled when its receipt result is `SUCCESS` and it holds a `Transfer` log from `ref.asset`. Failed as `expired` only when the latest solidified block is two slots past the expiration and no node holds it. A failed read, or a reader for another network, is pending. At most three calls. #### Parameters | Parameter | Type | | --------- | --------------------------- | | `ref` | [`TronRef`](#tronref) | | `reader` | [`TronReader`](#tronreader) | #### Returns `Promise`\<[`TronStatus`](#tronstatus)> *** ### tronTxId() > **tronTxId**(`tx`): `string` A Tron transaction id in one spelling: lowercase hex without `0x`, the SHA-256 of `raw_data` as the node's `txID` gives it, whether it is given with or without `0x` and in either case. Any other string is returned unchanged. #### Parameters | Parameter | Type | | --------- | -------- | | `tx` | `string` | #### Returns `string` --- # @integraledger/lcp/tvm > The exports of @integraledger/lcp/tvm. Source: https://lcp.integraledger.com/reference/api/tvm ## Interfaces ### 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`](#toncell)\[] | #### Methods ##### hash() > **hash**(`level?`): `Uint8Array` ###### Parameters | Parameter | Type | | --------- | -------- | | `level?` | `number` | ###### Returns `Uint8Array` *** ### TonTx A transaction as a TON Center v3 endpoint reports it. `inBody` is the inbound message body as a BoC. #### Properties | Property | Type | | ----------- | ------------------------------------------ | | `aborted` | `boolean` | | `account` | `string` | | `finality` | `0` \| `1` \| `2` | | `hash` | `string` | | `inBody` | `Uint8Array`\<`ArrayBufferLike`> \| `null` | | `outMsgs` | readonly `object`\[] | *** ### TvmChoice #### Properties | Property | Type | Description | | ----------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#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). | | `now` | `number` | Seconds since the epoch. | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | - | | `seqno` | `number` | - | | `stateInit?` | `string` \| [`TonCell`](#toncell) | The wallet's state init, for a wallet not yet deployed: a cell, or a base64 BoC of one root cell. | | `wallet` | `string` | The payer's W5 wallet, raw. | | `walletId` | `number` | `get_subwallet_id`. | *** ### TvmReader Bounded, read-only calls against one network's TON Center v3 endpoint. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | --------------------- | | `network` | `readonly` | `` `tvm:${number}` `` | #### Methods ##### byHash() > **byHash**(`txHash`): `Promise`\<[`TonTx`](#tontx) | `null`> GET /api/v3/transactions?hash=… ###### Parameters | Parameter | Type | | --------- | -------- | | `txHash` | `string` | ###### Returns `Promise`\<[`TonTx`](#tontx) | `null`> ##### byInBody() > **byInBody**(`bodyHash`): `Promise`\ GET /api/v3/transactionsByMessage?body\_hash=…\&direction=in ###### 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 last indexed block's gen\_utime. ###### Returns `Promise`\<`number`> *** ### TvmRef The read keys recorded at claim. #### Properties | Property | Type | | ------------------- | --------------------- | | `jettonWallet` | `string` | | `network` | `` `tvm:${number}` `` | | `transferBodyHash` | `` `0x${string}` `` | | `validUntil` | `number` | *** ### TvmUnsigned #### Properties | Property | Type | Description | | -------------- | ------------ | ----------------------------------------------------------------------- | | `request` | `object` | The 32-byte representation hash of the W5 request the wallet key signs. | | `request.hash` | `Uint8Array` | - | | `request.kind` | `"ton-w5"` | - | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TvmPayment`](#tvmpayment) Takes the 64-byte Ed25519 signature. ###### Parameters | Parameter | Type | | ----------- | ------------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TvmPayment`](#tvmpayment) ## Type Aliases ### TvmNetwork > **TvmNetwork** = `` `tvm:${number}` `` tvm:\: tvm:-239 mainnet, tvm:-3 testnet. *** ### TvmPayment > **TvmPayment** = [`X402Payment`](https://lcp.integraledger.com/reference/api/x402#x402payment)\<\{ `asset`: `string`; `settlementBoc`: `string`; }> *** ### TvmStatus > **TvmStatus** = \{ `finality`: `"confirmed"` | `"finalized"`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"in-flight"` | `"not-final"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"aborted"` | `"no-transfer"` | `"bounced"` | `"expired"`; } ## Variables ### exactTvm > `const` **exactTvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TvmUnsigned`](#tvmunsigned)>; `carrier`: `"extra.forwardPayload"`; `claims`: `boolean`; `id`: `"x402/exact/tvm"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TvmRef`](#tvmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`TvmStatus`](#tvmstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `txId`: (`tx`) => `string`; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### OP > `const` **OP**: `object` #### Type Declaration | Name | Type | Default value | | ------------------- | ------------ | ------------- | | `internalSigned` | `1936289396` | `0x73696e74` | | `internalTransfer` | `395134233` | `0x178d4519` | | `jettonTransfer` | `260734629` | `0x0f8a7ea5` | | `sendMsg` | `247711853` | `0x0ec3c86d` | ## Functions ### lcpComment() > **lcpComment**(`h`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`TonCell`](#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#refusal) | [`TonCell`](#toncell) *** ### pairingOf() > **pairingOf**(`option`): `"x402/exact/tvm"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/tvm"` | `undefined` *** ### tvmCarrier() > **tvmCarrier**(`settlementBoc`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `jettonWallet`: `string`; `payload`: [`TonCell`](#toncell); `transferBodyHash`: `` `0x${string}` ``; `validUntil`: `number`; } 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. #### Parameters | Parameter | Type | | --------------- | -------- | | `settlementBoc` | `string` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `jettonWallet`: `string`; `payload`: [`TonCell`](#toncell); `transferBodyHash`: `` `0x${string}` ``; `validUntil`: `number`; } *** ### tvmRecover() > **tvmRecover**(`ref`, `reader`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> Recovers the hash from the payer Jetton wallet's transaction: the comment in its inbound Jetton transfer. One call. #### Parameters | Parameter | Type | | ----------------- | --------------------------------------------------------------- | | `ref` | \{ `network`: `` `tvm:${number}` ``; `transaction`: `string`; } | | `ref.network` | `` `tvm:${number}` `` | | `ref.transaction` | `string` | | `reader` | [`TvmReader`](#tvmreader) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### tvmStatus() > **tvmStatus**(`ref`, `reader`): `Promise`\<[`TvmStatus`](#tvmstatus)> Finds the transfer by its body hash on the payer's Jetton wallet, then follows its `internal_transfer` to the payee's Jetton wallet. Settled when both executed without aborting, at the lower finality of the two. A transaction on any other account is ignored. A failed read, or a reader for another network, is pending. #### Parameters | Parameter | Type | | --------- | ------------------------- | | `ref` | [`TvmRef`](#tvmref) | | `reader` | [`TvmReader`](#tvmreader) | #### Returns `Promise`\<[`TvmStatus`](#tvmstatus)> *** ### tvmTxId() > **tvmTxId**(`tx`): `string` A TON transaction hash in one spelling: lowercase hex without `0x` (x402's TON scheme gives `transaction` as "Transaction hash (64-character hex string)"), whether it is given in hex, or in the base64 or base64url of its 32 bytes that TON Center answers. Any other string is returned unchanged. #### Parameters | Parameter | Type | | --------- | -------- | | `tx` | `string` | #### Returns `string` --- # @integraledger/lcp/ucp > The exports of @integraledger/lcp/ucp. Source: https://lcp.integraledger.com/reference/api/ucp ## Interfaces ### UcpBinding #### Type Parameters | Type Parameter | | ----------------------- | | `Id` *extends* `string` | | `O` *extends* `Option` | #### Properties | Property | Type | | ---------- | ---------------------------------------------- | | `claims` | `boolean` | | `id` | `Id` | | `pattern` | [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern) | #### Methods ##### advertise() > **advertise**(`doc`, `h`, `link`, `offer`, `agreementUrl?`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Checkout`](#checkout) ###### Parameters | Parameter | Type | | --------------- | ----------------------- | | `doc` | [`Checkout`](#checkout) | | `h` | `` `0x${string}` `` | | `link` | `string` | | `offer` | `O` | | `agreementUrl?` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Checkout`](#checkout) ##### bound() > **bound**(`presented`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ###### Parameters | Parameter | Type | | ----------- | --------- | | `presented` | `unknown` | ###### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> ##### build() > **build**(`offer`, `h`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Unsigned`](#unsigned)> ###### Parameters | Parameter | Type | | --------- | ----------------------- | | `offer` | [`UcpOffer`](#ucpoffer) | | `h` | `` `0x${string}` `` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Unsigned`](#unsigned)> ##### read() > **read**(`doc`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`UcpOffer`](#ucpoffer); } ###### Parameters | Parameter | Type | | --------- | ----------------------- | | `doc` | [`Checkout`](#checkout) | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `agreement?`: `string`; `h`: `` `0x${string}` ``; `link`: `string`; `offer`: [`UcpOffer`](#ucpoffer); } ##### tie() > **tie**(`options`): \[`"ucp"`, \{ `options`: readonly `O`\[]; }] ###### Parameters | Parameter | Type | | --------- | --------------- | | `options` | readonly `O`\[] | ###### Returns \[`"ucp"`, \{ `options`: readonly `O`\[]; }] ##### unplaced() > **unplaced**(`option`): `O` ###### Parameters | Parameter | Type | | --------- | ---- | | `option` | `O` | ###### Returns `O` *** ### UcpOffer #### Properties | Property | Type | | ----------- | ----------------------- | | `checkout` | [`Checkout`](#checkout) | *** ### Unsigned #### Properties | Property | Type | | ----------- | ----------------------- | | `checkout` | [`Checkout`](#checkout) | #### Methods ##### complete() > **complete**(`checkout_mandate`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Presented`](https://lcp.integraledger.com/reference/api/ap2#presented)> ###### Parameters | Parameter | Type | | ------------------ | -------- | | `checkout_mandate` | `string` | ###### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Presented`](https://lcp.integraledger.com/reference/api/ap2#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`](#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` | ## Variables ### AGREEMENT\_LINK\_TYPE > `const` **AGREEMENT\_LINK\_TYPE**: `"legal_context_agreement"` = `"legal_context_agreement"` *** ### ap2Mandate > `const` **ap2Mandate**: [`UcpBinding`](#ucpbinding)\<`"ucp/checkout/ap2-mandate"`, [`CheckoutOption`](#checkoutoption)> *** ### bookingAp2Mandate > `const` **bookingAp2Mandate**: [`UcpBinding`](#ucpbinding)\<`"ucp/booking/ap2-mandate"`, [`BookingOption`](#bookingoption)> *** ### bookingUnsigned > `const` **bookingUnsigned**: [`UcpBinding`](#ucpbinding)\<`"ucp/booking/unsigned"`, [`BookingOption`](#bookingoption)> *** ### issuedDigest > `const` **issuedDigest**: *typeof* [`digestJson`](https://lcp.integraledger.com/reference/api#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`](#ucpbinding)\<`"ucp/checkout/unsigned"`, [`CheckoutOption`](#checkoutoption)> ## Functions ### legalContextLink() > **legalContextLink**(`c`): [`Refusal`](https://lcp.integraledger.com/reference/api#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`](#checkout) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#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` | #### Parameters | Parameter | Type | | --------- | --------------- | | `options` | readonly `O`\[] | #### Returns \[`"ucp"`, \{ `options`: readonly `O`\[]; }] --- # @integraledger/lcp/x402 > The exports of @integraledger/lcp/x402. Source: https://lcp.integraledger.com/reference/api/x402 ## Interfaces ### HttpRequest An HTTP request as received: the method token, the raw origin-form target and the body bytes. #### Properties | Property | Type | | --------- | ------------ | | `body` | `Uint8Array` | | `method` | `string` | | `target` | `string` | *** ### Unsigned #### Properties | Property | Type | | ------------ | --------------------------------------------------------- | | `typedData` | [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm#eip3009typeddata) | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentPayload`](#paymentpayload) ###### Parameters | Parameter | Type | | ----------- | ------------------- | | `signature` | `` `0x${string}` `` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentPayload`](#paymentpayload) *** ### X402Choice #### Extended by * [`BatchEvmOpen`](https://lcp.integraledger.com/reference/api/x402-batch-settlement#batchevmopen) #### Properties | Property | Type | | ----------- | --------------------------------------------- | | `accepted` | [`PaymentRequirements`](#paymentrequirements) | | `from` | `` `0x${string}` `` | | `now` | `number` | | `required` | [`PaymentRequired`](#paymentrequired) | *** ### X402Offer #### Properties | Property | Type | | ----------- | --------------------------------------------------------- | | `options` | readonly [`PaymentRequirements`](#paymentrequirements)\[] | | `required` | [`PaymentRequired`](#paymentrequired) | *** ### 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`](#x402offer) | ## Type Aliases ### Eip3009Authorization > **Eip3009Authorization** = `object` #### Properties | Property | Type | | -------------- | -------- | | `from` | `string` | | `nonce` | `string` | | `to` | `string` | | `validAfter` | `string` | | `validBefore` | `string` | | `value` | `string` | *** ### Eip3009Payment > **Eip3009Payment** = [`PaymentPayload`](#paymentpayload) & `object` A payment of the `x402/exact/eip155/eip3009` pairing. #### Type Declaration | Name | Type | | ----------------------- | ----------------------------------------------- | | `payload` | `object` | | `payload.authorization` | [`Eip3009Authorization`](#eip3009authorization) | | `payload.signature` | [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex) | *** ### LcpPattern > **LcpPattern** = `object` #### Properties | Property | Type | Description | | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `buyerSigns` | `boolean` | - | | `canonical` | `boolean` | - | | `forwardIndexable` | `boolean` | - | | `instrument?` | `"landed"` | Where the buyer signs no hash, what identifies one payment. Absent: the pairing's `reference` for that payment. `"landed"`: the buyer presents standing authority, redeemed once per payment, so a payment is the transfer that lands, and the landed transaction is the instrument. | | `onChain` | `boolean` | - | | `pattern` | `"native-field"` \| `"overlay-contract"` \| `"sidecar-attestation"` \| `"opaque-challenge"` \| `"id-reuse"` \| `"protocol-extension"` \| `"http-advisory"` \| `"truncated-field"` | - | | `profile?` | `string` | - | | `proves` | `string` | - | | `publicProof` | `boolean` | - | | `zeroPartyRecoverable` | `boolean` | - | *** ### OptionFilter > **OptionFilter** = (`option`) => `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` A pairing's option filter: `true` for an option the pairing serves, a refusal naming why an option of this pairing cannot be served, and undefined for an option that is not this pairing's. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `option` | [`PaymentRequirements`](#paymentrequirements) | #### Returns `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `undefined` *** ### PaymentPayload > **PaymentPayload** = `object` #### Properties | Property | Type | | -------------- | ------------------------------------------------------ | | `accepted` | [`PaymentRequirements`](#paymentrequirements) | | `extensions?` | [`PaymentRequired`](#paymentrequired)\[`"extensions"`] | | `payload` | [`X402SchemePayload`](#x402schemepayload) | | `resource?` | [`PaymentRequired`](#paymentrequired)\[`"resource"`] | | `x402Version` | `2` | *** ### PaymentRequired > **PaymentRequired** = `object` #### Properties | Property | Type | | -------------- | ------------------------------------------------ | | `accepts` | [`PaymentRequirements`](#paymentrequirements)\[] | | `error?` | `string` | | `extensions?` | `object` | | `resource` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### PaymentRequirements > **PaymentRequirements** = `object` #### 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` #### Properties | Property | Type | | ------------- | ----------------------------------- | | `bodyDigest` | [`AtrHash`](https://lcp.integraledger.com/reference/api#atrhash) | | `method` | `string` | | `path` | `string` | | `query` | `string` | *** ### X402Advertise > **X402Advertise** = (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`PaymentRequired`](#paymentrequired) | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) A pairing's `advertise`: the document with the legal context placed, and the agreement URL when one is given. #### Parameters | Parameter | Type | | --------------- | --------------------------------------------- | | `doc` | [`PaymentRequired`](#paymentrequired) | | `h` | [`AtrHash`](https://lcp.integraledger.com/reference/api#atrhash) | | `link` | `string` | | `offer` | [`PaymentRequirements`](#paymentrequirements) | | `agreementUrl?` | `string` | #### Returns [`PaymentRequired`](#paymentrequired) | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### X402PairingId > **X402PairingId** = *typeof* `ID` | `"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"` *** ### X402Payment > **X402Payment**\<`P`> = `Omit`\<[`PaymentPayload`](#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` | *** ### X402SchemePayload > **X402SchemePayload** = \{ `authorization`: [`Eip3009Authorization`](#eip3009authorization); `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); } | \{ `permit2Authorization`: [`Permit2Authorization`](#permit2authorization); `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); } | \{ `delegationManager`: `string`; `delegator`: `string`; `permissionContext`: `string`; } | \{ `authorization`: [`Eip3009Authorization`](#eip3009authorization); `salt`: `string`; `saltNonce?`: `string`; `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); } | \{ `permit2Authorization`: [`Permit2Authorization`](#permit2authorization); `salt`: `string`; `saltNonce?`: `string`; `signature`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); } The payload of each x402 EVM scheme this package carries; every member is a string. *** ### X402Unsigned > **X402Unsigned** = \{ `request`: \{ `kind`: `"eip712"`; `typedData`: [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm#permit2typeddata) | [`Eip3009TypedData`](https://lcp.integraledger.com/reference/api/evm#eip3009typeddata) | [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/evm#receivetypeddata); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentPayload`](#paymentpayload); } | \{ `request`: \{ `amount`: `bigint`; `chainId`: `number`; `kind`: `"erc7710"`; `payTo`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); `salt`: [`AtrHash`](https://lcp.integraledger.com/reference/api#atrhash); `token`: [`Hex`](https://lcp.integraledger.com/reference/api/evm#hex); }; `complete`: [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentPayload`](#paymentpayload); } What a breadth pairing's `build` asks the buyer's signer for, and how the answer completes the payment. ## Variables ### authCaptureEip3009 > `const` **authCaptureEip3009**: `BreadthBinding`\<`"x402/auth-capture/eip155/eip3009"`> *** ### authCapturePermit2 > `const` **authCapturePermit2**: `BreadthBinding`\<`"x402/auth-capture/eip155/permit2"`> *** ### exactEip3009 > `const` **exactEip3009**: `Readonly`\<\{ `advertise`: [`X402Advertise`](#x402advertise); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`choice`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Unsigned`](#unsigned)>; `claims`: `boolean`; `id`: `"x402/exact/eip155/eip3009"`; `pattern`: [`LcpPattern`](#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`Eip3009Ref`](https://lcp.integraledger.com/reference/api/evm#eip3009ref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmStatus`](https://lcp.integraledger.com/reference/api/evm#evmstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)\[]; `request`: [`RequestCommitment`](#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](#paymentrequirements); }> *** ### exactErc7710 > `const` **exactErc7710**: `BreadthBinding`\<`"x402/exact/eip155/erc7710"`> = `erc7710` *** ### exactErc7710Salt > `const` **exactErc7710Salt**: `BreadthBinding`\<`"x402/exact/eip155/erc7710-salt"`> *** ### exactPermit2 > `const` **exactPermit2**: `BreadthBinding`\<`"x402/exact/eip155/permit2"`> *** ### LEGAL\_CONTEXT > `const` **LEGAL\_CONTEXT**: `"legalContext"` = `"legalContext"` *** ### LEGAL\_CONTEXT\_SCHEMA > `const` **LEGAL\_CONTEXT\_SCHEMA**: [`Json`](https://lcp.integraledger.com/reference/api#json) *** ### uptoPermit2 > `const` **uptoPermit2**: `BreadthBinding`\<`"x402/upto/eip155/permit2"`> ## Functions ### advertiseFor() > **advertiseFor**(`filter`): [`X402Advertise`](#x402advertise) The seller's placement over a pairing's filter: a copy of `doc` whose `extensions.legalContext` carries the hash, the link and, when given, the agreement URL after the link. The legal context is one per document, so each pairing placing the same values into it leaves it as it is. Other extensions are kept and `accepts` is untouched. It refuses an `offer` outside `doc.accepts` or refused by the filter, a link or an agreement URL as `read` refuses it, and a legal context already present with other values. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `filter` | [`OptionFilter`](#optionfilter) | #### Returns [`X402Advertise`](#x402advertise) *** ### chosen() > **chosen**(`required`, `accepted`, `filter`): `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The checks `build` makes on the buyer's choice before anything pairing-specific: the document is x402 v2 with at most 32 options, the chosen option is one it offers, and the filter serves it. #### Parameters | Parameter | Type | | ---------- | ------------------------------- | | `required` | `unknown` | | `accepted` | `unknown` | | `filter` | [`OptionFilter`](#optionfilter) | #### Returns `true` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### filterOf() > **filterOf**(`pairs`, `payable?`): [`OptionFilter`](#optionfilter) The filter for the options `pairs` accepts: those that `payable` also accepts (every one, without it) are served, and the rest are refused `x402/option-malformed`. #### Parameters | Parameter | Type | | ---------- | ----------------------- | | `pairs` | (`option`) => `boolean` | | `payable?` | (`option`) => `boolean` | #### Returns [`OptionFilter`](#optionfilter) *** ### issuedDigest() > **issuedDigest**(`v`): `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> SHA-256 over the RFC 8785 form of an issued option or request commitment. #### Parameters | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------ | | `v` | [`PaymentRequirements`](#paymentrequirements) \| [`RequestCommitment`](#requestcommitment) | #### Returns `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> *** ### legalContextOf() > **legalContextOf**(`extensions`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `link`: `string`; } The hash and link in a document's `extensions.legalContext`, or the refusal that names what is wrong. #### Parameters | Parameter | Type | | ------------ | --------- | | `extensions` | `unknown` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `h`: `` `0x${string}` ``; `link`: `string`; } *** ### offeredAt() > **offeredAt**(`accepts`, `offer`): `number` The index of the first of `accepts` that is `offer`, by identity or by equal RFC 8785 form, or -1. #### Parameters | Parameter | Type | | --------- | --------------------------------------------------------- | | `accepts` | readonly [`PaymentRequirements`](#paymentrequirements)\[] | | `offer` | [`PaymentRequirements`](#paymentrequirements) | #### Returns `number` *** ### optionPairingOf() > **optionPairingOf**(`pairing`): `string` The pairing whose option a payment through `pairing` pays: a payment at the ERC-7710 salt level pays the `erc7710` option (both levels share it); a payment through any other pairing pays an option of its own. #### Parameters | Parameter | Type | | --------- | -------- | | `pairing` | `string` | #### Returns `string` *** ### pairingOfPayment() > **pairingOfPayment**(`p`): [`X402PairingId`](#x402pairingid) | `undefined` The pairing that serves a presented payment: `pairingOf` of its `accepted`, except that an `erc7710` payment whose delegation manager is MetaMask's reference DelegationManager, on a chain where it is deployed, is the salt level. #### Parameters | Parameter | Type | | --------- | ----------------------------------- | | `p` | [`PaymentPayload`](#paymentpayload) | #### Returns [`X402PairingId`](#x402pairingid) | `undefined` *** ### paymentWith() > **paymentWith**\<`P`>(`required`, `accepted`, `payload`): [`X402Payment`](#x402payment)\<`P`> The payment for the chosen option: the challenge's `resource` and `extensions` unchanged, omitted when absent. #### Type Parameters | Type Parameter | | -------------- | | `P` | #### Parameters | Parameter | Type | | ---------- | --------------------------------------------- | | `required` | [`PaymentRequired`](#paymentrequired) | | `accepted` | [`PaymentRequirements`](#paymentrequirements) | | `payload` | `P` | #### Returns [`X402Payment`](#x402payment)\<`P`> *** ### presentedWith() > **presentedWith**(`presented`, `filter`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `accepted`: [`PaymentRequirements`](#paymentrequirements); `extensions`: `unknown`; `payload`: `Record`\<`string`, `unknown`>; } A presented payment's `accepted`, served by the filter, its `payload` object and its `extensions`. #### Parameters | Parameter | Type | | ----------- | ------------------------------- | | `presented` | `unknown` | | `filter` | [`OptionFilter`](#optionfilter) | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `accepted`: [`PaymentRequirements`](#paymentrequirements); `extensions`: `unknown`; `payload`: `Record`\<`string`, `unknown`>; } *** ### readFor() > **readFor**(`filter`): (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](#x402read) The buyer's reading over a pairing's filter: the hash, the link, the agreement URL when `extensions.legalContext` carries one, and the options the filter serves, in document order. A link or agreement URL of at most 2048 characters that parses as an absolute URL with a scheme other than `https` is `x402/link-not-https`; any other value that is not a link, or two spellings that disagree, is `x402/legal-context-malformed`. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `filter` | [`OptionFilter`](#optionfilter) | #### Returns (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](#x402read) *** ### requestCommitment() > **requestCommitment**(`r`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`RequestCommitment`](#requestcommitment)> The commitment to the request a challenge answers: the method as received, the target split at its first `?`, and SHA-256 over the body bytes exactly as received. #### Parameters | Parameter | Type | | --------- | ----------------------------- | | `r` | [`HttpRequest`](#httprequest) | #### Returns `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`RequestCommitment`](#requestcommitment)> *** ### tie() > **tie**(`accepts`, `request`): \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)\[]; `request`: [`RequestCommitment`](#requestcommitment); }] The binding slot: every option the challenge offers, exactly as issued, and the request they answer. #### Parameters | Parameter | Type | | --------- | --------------------------------------------------------- | | `accepts` | readonly [`PaymentRequirements`](#paymentrequirements)\[] | | `request` | [`RequestCommitment`](#requestcommitment) | #### Returns \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](#paymentrequirements)\[]; `request`: [`RequestCommitment`](#requestcommitment); }] *** ### withExtra() > **withExtra**(`option`, `key`, `value`): [`PaymentRequirements`](#paymentrequirements) A copy of an option with `extra[key] = value`. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `option` | [`PaymentRequirements`](#paymentrequirements) | | `key` | `string` | | `value` | [`Json`](https://lcp.integraledger.com/reference/api#json) | #### Returns [`PaymentRequirements`](#paymentrequirements) *** ### withOption() > **withOption**(`doc`, `at`, `option`): [`PaymentRequired`](#paymentrequired) The document with option `at` replaced. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `doc` | [`PaymentRequired`](#paymentrequired) | | `at` | `number` | | `option` | [`PaymentRequirements`](#paymentrequirements) | #### Returns [`PaymentRequired`](#paymentrequired) *** ### withoutExtra() > **withoutExtra**(`option`, `key`): [`PaymentRequirements`](#paymentrequirements) A copy of an option with `extra[key]` removed; `extra` itself is removed when that leaves it empty. #### Parameters | Parameter | Type | | --------- | --------------------------------------------- | | `option` | [`PaymentRequirements`](#paymentrequirements) | | `key` | `string` | #### Returns [`PaymentRequirements`](#paymentrequirements) ## References ### Eip3009TypedData Re-exports [Eip3009TypedData](https://lcp.integraledger.com/reference/api/evm#eip3009typeddata) --- # @integraledger/lcp/x402-batch-settlement > The exports of @integraledger/lcp/x402-batch-settlement. Source: https://lcp.integraledger.com/reference/api/x402-batch-settlement ## Interfaces ### BatchEvmOpen #### Extends * [`X402Choice`](https://lcp.integraledger.com/reference/api/x402#x402choice) #### Properties | Property | Type | Inherited from | | ------------------ | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402#x402choice).[`accepted`](https://lcp.integraledger.com/reference/api/x402#property-accepted) | | `authSalt` | `` `0x${string}` `` | - | | `deposit` | `bigint` | - | | `from` | `` `0x${string}` `` | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402#x402choice).[`from`](https://lcp.integraledger.com/reference/api/x402#property-from) | | `now` | `number` | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402#x402choice).[`now`](https://lcp.integraledger.com/reference/api/x402#property-now) | | `payerAuthorizer` | `` `0x${string}` `` | - | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | [`X402Choice`](https://lcp.integraledger.com/reference/api/x402#x402choice).[`required`](https://lcp.integraledger.com/reference/api/x402#property-required) | *** ### BatchPaymentPayload #### Properties | Property | Type | | -------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.type` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### BatchSvmOpen #### Properties | Property | Type | | -------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `computeUnitLimit?` | `number` | | `computeUnitPrice?` | `bigint` | | `deposit` | `bigint` | | `openSlot` | `bigint` | | `payer` | `string` | | `payerAuthorizer` | `string` | | `recentBlockhash` | `string` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#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 | | ----------- | ----------------------------------------------- | | `requests` | readonly [`SigningRequest`](#signingrequest)\[] | #### Methods ##### complete() > **complete**(`signatures`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`BatchPaymentPayload`](#batchpaymentpayload) ###### Parameters | Parameter | Type | | ------------ | -------------------- | | `signatures` | readonly `string`\[] | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`BatchPaymentPayload`](#batchpaymentpayload) *** ### BatchWithin #### Properties | Property | Type | Description | | --------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | - | | `channelConfig` | [`Json`](https://lcp.integraledger.com/reference/api#json) | Exactly as sent at the opening. | | `computeUnitLimit?` | `number` | SVM refund: the Compute Budget values, 200 000 units and 1 microlamport when absent. | | `computeUnitPrice?` | `bigint` | - | | `maxClaimableAmount` | `bigint` | - | | `recentBlockhash?` | `string` | SVM refund: the blockhash to use when the option carries no `extra.recentBlockhash`. | | `refund?` | `object` | A refund. EVM: its amount, absent for a full refund. SVM: `{}`, a full refund whose `request_close` is built here. | | `refund.amount?` | `bigint` | - | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#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`\<`` `0x${string}` `` \| [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)> | | `channel.kind` | `"open"` \| `"close"` \| [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) \| `"within"` | | `channel.ref` | `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) \| \{ `channel`: `string`; `network`: `string`; }> | | `channel.until` | `number` \| `undefined` | *** ### 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#paymentrequirements) | | `extensions` | `object` | | `payload` | `object` | | `payload.amount` | `string` | | `payload.asset` | `string` | | `x402Version` | `2` | *** ### 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 ### BatchPairingId > **BatchPairingId** = *typeof* `EVM_ID` | *typeof* `SVM_ID` | *typeof* `CF_ID` *** ### SigningRequest > **SigningRequest** = \{ `kind`: `"eip712"`; `typedData`: [`Eip712Request`](#eip712request) | [`ReceiveTypedData`](https://lcp.integraledger.com/reference/api/evm#receivetypeddata) | [`Permit2TypedData`](https://lcp.integraledger.com/reference/api/evm#permit2typeddata); } | \{ `kind`: `"solana-message"`; `message`: `Uint8Array`; } | \{ `kind`: `"ed25519-raw"`; `message`: `Uint8Array`; `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/x402#x402advertise); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`CloudflarePaymentPayload`](#cloudflarepaymentpayload)>; `claims`: `boolean`; `id`: `"x402/batch-settlement/cloudflare"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### batchEvm > `const` **batchEvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`BatchUnsigned`](#batchunsigned)>; `buildWithin`: (`w`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`BatchUnsigned`](#batchunsigned)>; `channel`: `Readonly`\<\{ `boundWithin`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`p`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_p`) => `number` | `undefined`; }>; `claims`: `boolean`; `id`: `"x402/batch-settlement/eip155"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`EvmRef`](https://lcp.integraledger.com/reference/api/evm#evmref)>; `status`: (`ref`, `reader`) => `Promise`\<[`EvmBreadthStatus`](https://lcp.integraledger.com/reference/api/evm#evmbreadthstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### batchSvm > `const` **batchSvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`BatchUnsigned`](#batchunsigned)>; `buildWithin`: (`w`, `_h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`BatchUnsigned`](#batchunsigned)>; `carrier`: `"extra.memo"`; `channel`: `Readonly`\<\{ `boundWithin`: (`_p`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `kind`: (`p`) => `"open"` | `"close"` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `"within"`; `ref`: (`p`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channel`: `string`; `network`: `string`; }>; `until`: (`_p`) => `number` | `undefined`; }>; `claims`: `boolean`; `id`: `"x402/batch-settlement/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`ChannelStatus`](https://lcp.integraledger.com/reference/api/svm#channelstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> *** ### 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#refusal) | \{ `channelId`: `` `0x${string}` ``; `config`: [`ChannelConfig`](#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#evmlog) | | `chainId` | `number` | #### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `channelId`: `` `0x${string}` ``; `config`: [`ChannelConfig`](#channelconfig); } *** ### batchChannelId() > **batchChannelId**(`chainId`, `c`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The channel id: the EIP-712 digest of the configuration under the `x402 Batch Settlement` domain. #### Parameters | Parameter | Type | | --------- | --------------------------------- | | `chainId` | `number` | | `c` | [`ChannelConfig`](#channelconfig) | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### erc3009DepositNonce() > **erc3009DepositNonce**(`channelId`, `authSalt`): `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The ERC-3009 deposit's nonce: keccak256(abi.encode(bytes32 channelId, uint256 authSalt)). #### Parameters | Parameter | Type | | ----------- | ------------------- | | `channelId` | `` `0x${string}` `` | | `authSalt` | `` `0x${string}` `` | #### Returns `` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### pairingOf() > **pairingOf**(`option`): [`BatchPairingId`](#batchpairingid) | `undefined` The batch-settlement pairing an option names, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns [`BatchPairingId`](#batchpairingid) | `undefined` --- # @integraledger/lcp/x402-exact-solana > The exports of @integraledger/lcp/x402-exact-solana. Source: https://lcp.integraledger.com/reference/api/x402-exact-solana ## Interfaces ### SvmChoice #### Properties | Property | Type | | -------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `computeUnitLimit?` | `number` | | `computeUnitPrice?` | `bigint` | | `decimals` | `number` | | `payer` | `string` | | `recentBlockhash` | `string` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | | `tokenProgram` | `string` | *** ### SvmPaymentPayload A payment on this pairing: the base64 partially signed versioned transaction. #### Properties | Property | Type | | --------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.transaction` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | *** ### SvmUnsigned What the payer signs, and how its signature completes the payment. #### Type Parameters | Type Parameter | Default type | | -------------- | ----------------------------------------- | | `P` | [`SvmPaymentPayload`](#svmpaymentpayload) | #### Properties | Property | Type | | ----------------- | ------------------ | | `request` | `object` | | `request.kind` | `"solana-message"` | | `request.message` | `Uint8Array` | #### Methods ##### complete() > **complete**(`signature`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `P` A 64-byte Ed25519 signature by the payer. ###### Parameters | Parameter | Type | | ----------- | ------------ | | `signature` | `Uint8Array` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `P` ## Variables ### exactSvm > `const` **exactSvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SvmUnsigned`](#svmunsigned)\<[`SvmPaymentPayload`](#svmpaymentpayload)>>; `carrier`: `"extra.memo"`; `claims`: `boolean`; `id`: `"x402/exact/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`SvmStatus`](https://lcp.integraledger.com/reference/api/svm#svmstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### pairingOf() > **pairingOf**(`option`): `"x402/exact/solana"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/solana"` | `undefined` --- # @integraledger/lcp/x402-exact-stellar > The exports of @integraledger/lcp/x402-exact-stellar. Source: https://lcp.integraledger.com/reference/api/x402-exact-stellar ## Interfaces ### StellarChoice #### Properties | Property | Type | | ---------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `currentLedger` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | | `simulatedXdr` | `string` | *** ### StellarPaymentPayload A payment on this pairing: the base64 XDR of the transaction with the payer's entry signed. #### Properties | Property | Type | | --------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.transaction` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | ## Variables ### exactStellar > `const` **exactStellar**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarUnsigned`](https://lcp.integraledger.com/reference/api/stellar#stellarunsigned)>; `carrier`: `"payTo"`; `claims`: `boolean`; `id`: `"x402/exact/stellar"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`StellarRef`](https://lcp.integraledger.com/reference/api/stellar#stellarref)>; `status`: (`ref`, `reader`) => `Promise`\<[`StellarStatus`](https://lcp.integraledger.com/reference/api/stellar#stellarstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### pairingOf() > **pairingOf**(`option`): `"x402/exact/stellar"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/stellar"` | `undefined` --- # @integraledger/lcp/x402-exact-xrpl > The exports of @integraledger/lcp/x402-exact-xrpl. Source: https://lcp.integraledger.com/reference/api/x402-exact-xrpl ## Interfaces ### XrplChoice #### Properties | Property | Type | | --------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `account` | `string` | | `fee` | `string` | | `lastLedgerSequence` | `number` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired) | | `sequence` | `number` | | `ticketSequence?` | `number` | *** ### XrplPaymentPayload A payment on this pairing: the wallet's signed blob, hex. #### Properties | Property | Type | | ---------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | `object` | | `payload.signedTxBlob` | `string` | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | ## Variables ### exactXrpl > `const` **exactXrpl**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`XrplUnsigned`](https://lcp.integraledger.com/reference/api/xrpl#xrplunsigned)\<[`XrplPaymentPayload`](#xrplpaymentpayload)>>; `carrier`: `"extra.invoiceId"`; `claims`: `boolean`; `id`: `"x402/exact/xrpl"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`XrplRef`](https://lcp.integraledger.com/reference/api/xrpl#xrplref), `"fromLedger"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`XrplStatus`](https://lcp.integraledger.com/reference/api/xrpl#xrplstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### pairingOf() > **pairingOf**(`option`): `"x402/exact/xrpl"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/exact/xrpl"` | `undefined` --- # @integraledger/lcp/x402-upto-solana > The exports of @integraledger/lcp/x402-upto-solana. Source: https://lcp.integraledger.com/reference/api/x402-upto-solana ## Interfaces ### UptoSvmChoice #### Properties | Property | Type | | -------------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `computeUnitLimit?` | `number` | | `computeUnitPrice?` | `bigint` | | `nonce` | `bigint` | | `now` | `number` | | `openSlot` | `bigint` | | `payer` | `string` | | `recentBlockhash` | `string` | | `required` | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#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` | - | *** ### UptoSvmPaymentPayload #### Properties | Property | Type | | -------------- | ---------------------------------------------------------------- | | `accepted` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | | `extensions?` | `object` | | `payload` | [`UptoSvmPayload`](#uptosvmpayload) | | `resource?` | `object` | | `resource.url` | `string` | | `x402Version` | `2` | ## Variables ### uptoSvm > `const` **uptoSvm**: `Readonly`\<\{ `advertise`: (`doc`, `h`, `link`, `offer`, `agreementUrl?`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`PaymentRequired`](https://lcp.integraledger.com/reference/api/x402#paymentrequired); `bound`: (`presented`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `build`: (`c`, `h`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`SvmUnsigned`](https://lcp.integraledger.com/reference/api/x402-exact-solana#svmunsigned)\<[`UptoSvmPaymentPayload`](#uptosvmpaymentpayload)>>; `carrier`: `"extra.memo"`; `claims`: `true`; `id`: `"x402/upto/solana"`; `pattern`: [`LcpPattern`](https://lcp.integraledger.com/reference/api/x402#lcppattern); `read`: (`doc`) => [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | [`X402Read`](https://lcp.integraledger.com/reference/api/x402#x402read); `recover`: (`ref`, `reader`) => `Promise`\<`` `0x${string}` `` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal)>; `reference`: (`presented`) => `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `Omit`\<[`SvmRef`](https://lcp.integraledger.com/reference/api/svm#svmref), `"fromSlot"`>>; `status`: (`ref`, `reader`) => `Promise`\<[`ChannelStatus`](https://lcp.integraledger.com/reference/api/svm#channelstatus)>; `tie`: (`accepts`, `request`) => \[`"x402"`, \{ `accepts`: readonly [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements)\[]; `request`: [`RequestCommitment`](https://lcp.integraledger.com/reference/api/x402#requestcommitment); }]; `unplaced`: (`option`) => [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements); }> ## Functions ### pairingOf() > **pairingOf**(`option`): `"x402/upto/solana"` | `undefined` This pairing's id for an option it can pay, or undefined. #### Parameters | Parameter | Type | | --------- | ---------------------------------------------------------------- | | `option` | [`PaymentRequirements`](https://lcp.integraledger.com/reference/api/x402#paymentrequirements) | #### Returns `"x402/upto/solana"` | `undefined` --- # @integraledger/lcp/xrpl > The exports of @integraledger/lcp/xrpl. Source: https://lcp.integraledger.com/reference/api/xrpl ## Interfaces ### XrplLanded #### Properties | Property | Type | Description | | ------------------- | -------------------- | ------------------------------------------------------------ | | `deletedChannels?` | readonly `string`\[] | The `PayChannel` `DeletedNode`s of the transaction's `meta`. | | `invoiceId?` | `string` | - | | `ledgerIndex?` | `number` | - | | `result` | `string` | `meta.TransactionResult`. | | `transactionType` | `string` | - | | `validated` | `boolean` | - | *** ### XrplReader Bounded, read-only calls against one network's endpoint. Every failure rejects with `ReaderError`. #### Properties | Property | Modifier | Type | | ---------- | ---------- | ---------------------- | | `network` | `readonly` | `` `xrpl:${number}` `` | #### Methods ##### tx() > **tx**(`hash`, `range`): `Promise`\<[`XrplLanded`](#xrpllanded) | \{ `notFound`: `true`; `searchedAll`: `boolean`; }> `tx` by hash, with `min_ledger` and `max_ledger` when a range is given. ###### Parameters | Parameter | Type | | --------- | ------------------------------------------------ | | `hash` | `string` | | `range` | \{ `max`: `number`; `min`: `number`; } \| `null` | ###### Returns `Promise`\<[`XrplLanded`](#xrpllanded) | \{ `notFound`: `true`; `searchedAll`: `boolean`; }> ##### txBlob() > **txBlob**(`hash`): `Promise`\<`string` | `null`> `tx` with `binary: true`: the signed blob, for credentials that name only a hash. ###### Parameters | Parameter | Type | | --------- | -------- | | `hash` | `string` | ###### Returns `Promise`\<`string` | `null`> ##### validatedLedger() > **validatedLedger**(): `Promise`\<`number`> `ledger` `validated` → `ledger_index`. ###### Returns `Promise`\<`number`> *** ### XrplRef The read keys recorded at claim. #### Properties | Property | Type | | --------------------- | ---------------------- | | `expect` | `string` | | `fromLedger` | `number` | | `lastLedgerSequence` | `number` \| `null` | | `network` | `` `xrpl:${number}` `` | | `transaction` | `string` | *** ### 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`](#xrpltxjson) | #### Methods ##### complete() > **complete**(`signedBlob`): [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `P` ###### Parameters | Parameter | Type | | ------------ | -------- | | `signedBlob` | `string` | ###### Returns [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | `P` ## Type Aliases ### XrplCloseRef > **XrplCloseRef** = `object` #### Properties | Property | Type | | -------------- | ----------------------------- | | `channel` | `string` | | `network` | [`XrplNetwork`](#xrplnetwork) | | `phase` | `"close"` | | `transaction` | `string` | *** ### XrplCloseStatus > **XrplCloseStatus** = \{ `ledgerIndex`: `number`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"not-validated"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"not-a-close"`; } *** ### XrplNetwork > **XrplNetwork** = `` `xrpl:${number}` `` CAIP-2: `xrpl:` and the chain's NetworkID, 0 to 4294967295. *** ### XrplStatus > **XrplStatus** = \{ `ledgerIndex`: `number`; `state`: `"settled"`; } | \{ `state`: `"pending"`; `why`: `"not-found"` | `"not-validated"` | `"unreadable"`; } | \{ `state`: `"failed"`; `why`: `"expired"` | `"claimed-fee"` | `"not-this-instrument"`; } ## Variables ### XRPL\_MAX\_DEPTH > `const` **XRPL\_MAX\_DEPTH**: `64` = `64` The deepest nesting of STObject and STArray fields inside a transaction: an object or array field one level below its container, and an array's member object one level below the array. *** ### XRPL\_MAX\_FIELDS > `const` **XRPL\_MAX\_FIELDS**: `number` The most fields, counting array members, that one blob may hold. Every field takes at least its one-byte header, so no blob within `MAX_BLOB_HEX` holds more. ## Functions ### cancelAfterOf() > **cancelAfterOf**(`blobHex`): `number` | `undefined` The `CancelAfter` (field 36 of type UInt32) of a signed blob, read from the canonical field order: every UInt16 field, then every UInt32 field in field-code order, precede all others. Undefined when the blob has none. #### Parameters | Parameter | Type | | --------- | -------- | | `blobHex` | `string` | #### Returns `number` | `undefined` *** ### decodeBlob() > **decodeBlob**(`hex`): `Promise`\<[`Refusal`](https://lcp.integraledger.com/reference/api#refusal) | \{ `hash`: `string`; `tx`: [`XrplTxJson`](#xrpltxjson); }> Decodes a signed blob of at most 4 KiB of hex, and computes its transaction hash as the ledger does: SHA-512Half over `54584E00` and the blob, in upper case. 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#refusal) | \{ `hash`: `string`; `tx`: [`XrplTxJson`](#xrpltxjson); }> *** ### mppInvoiceId() > **mppInvoiceId**(`h`): `string` The hash's 64 hex digits in upper case, without `0x`: MPP's `methodDetails.invoiceId`. #### 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`. #### Parameters | Parameter | Type | | --------- | ------------------- | | `h` | `` `0x${string}` `` | #### Returns `Promise`\<`string`> *** ### xrplChannelId() > **xrplChannelId**(`account`, `destination`, `sequence`): `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#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. A malformed address or sequence is `xrpl/not-channel-create`. #### Parameters | Parameter | Type | | ------------- | -------- | | `account` | `string` | | `destination` | `string` | | `sequence` | `number` | #### Returns `string` | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### xrplClaim() > **xrplClaim**(`channelId`, `drops`): `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) The bytes a channel claim signs: `CLM\0` ‖ channel id (32 bytes) ‖ drops as u64 big-endian. #### Parameters | Parameter | Type | | ----------- | -------- | | `channelId` | `string` | | `drops` | `bigint` | #### Returns `Uint8Array`\<`ArrayBufferLike`> | [`Refusal`](https://lcp.integraledger.com/reference/api#refusal) *** ### xrplCloseStatus() > **xrplCloseStatus**(`ref`, `reader`): `Promise`\<[`XrplCloseStatus`](#xrplclosestatus)> Reads a reported close: validated with the channel among the transaction's deleted `PayChannel` entries is settled; validated without it is failed `not-a-close`; otherwise pending. One call. #### Parameters | Parameter | Type | | --------- | ------------------------------- | | `ref` | [`XrplCloseRef`](#xrplcloseref) | | `reader` | [`XrplReader`](#xrplreader) | #### Returns `Promise`\<[`XrplCloseStatus`](#xrplclosestatus)> *** ### xrplOpenStatus() > **xrplOpenStatus**(`ref`, `reader`): `Promise`\<[`XrplStatus`](#xrplstatus)> Reads an opening by the hash computed from its signed blob: settled only when a validated ledger holds it with `tesSUCCESS` as a `PaymentChannelCreate`; `tec` codes are final failures that claimed the fee; past `LastLedgerSequence` with the whole range searched it expired. A failed read is pending. At most two calls. #### Parameters | Parameter | Type | | --------- | ------------------------------------------ | | `ref` | `Omit`\<[`XrplRef`](#xrplref), `"expect"`> | | `reader` | [`XrplReader`](#xrplreader) | #### Returns `Promise`\<[`XrplStatus`](#xrplstatus)> *** ### xrplStatus() > **xrplStatus**(`ref`, `reader`): `Promise`\<[`XrplStatus`](#xrplstatus)> Reads a transaction by the hash computed from its signed blob. Settled only when a validated ledger holds it with `tesSUCCESS` as a Payment whose `InvoiceID` is the one expected; `tec` codes are final failures that claimed the fee; past `LastLedgerSequence` with the whole range searched it expired. A failed read is pending. At most two calls. #### Parameters | Parameter | Type | | --------- | --------------------------- | | `ref` | [`XrplRef`](#xrplref) | | `reader` | [`XrplReader`](#xrplreader) | #### Returns `Promise`\<[`XrplStatus`](#xrplstatus)>