Skip to content
Integra Protocol
API

@integraledger/lcp/mpp

The `mpp` entry point: MPP's challenge pieces, its three fields (`encodeChallenge` writes a `WWW-Authenticate` value, `encodeCredential` and `decodeCredential` write and read an `Authorization` value, `encodeReceipt` and `decodeReceipt` write and read a `Payment-Receipt` value) and its pairings: the EVM charges, defined here, and every other MPP charge, session and subscription pairing but Lightning's, re-exported from its module.

For AI agents: this page as Markdown, and llms.txt, the index of every page.

The mpp entry point: MPP's challenge pieces, its three fields (encodeChallenge writes a WWW-Authenticate value, encodeCredential and decodeCredential write and read an Authorization value, encodeReceipt and decodeReceipt write and read a Payment-Receipt value) and its pairings: the EVM charges, defined here, and every other MPP charge, session and subscription pairing but Lightning's, re-exported from its module.

The EVM charges are authorization (the signed nonce is keccak256 of the JSON array [id, realm]), permit2 (the signed witness carries that value), and transaction and hash (nothing signed carries H). The re-exported charges are the card, Stripe, Solana, XRP Ledger, NEAR Intents, usdc, lcp and Tempo split-memo charges. FETCHED is the key under which a pairing's fetchPresented writes the seller's read onto a credential.

Interfaces

ChargeRefBase

The reference fields every logs-searching read takes.

Extended by

Properties

PropertyModifierTypeDescription
networkreadonly`eip155:${string}`-
payeereadonlystring-
payerreadonly`0x${string}`-
transaction?readonly`0x${string}`A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed.

EvmLogEntry

A log as eth_getLogs gives it: the log, the transaction that emitted it, its block and its index in that block.

Extends

Properties

PropertyTypeInherited from
address`0x${string}`EvmLog.address
blockNumberbigint-
data`0x${string}`EvmLog.data
logIndexnumber-
topicsreadonly `0x${string}`[]EvmLog.topics
transactionHash`0x${string}`-

EvmSearchReader

An EvmReader that also answers a log query, a block by mark or number, and a transaction's signed bytes. Every failure rejects, as EvmReader's do: a range the endpoint refuses rejects, and is never read as an empty answer.

Extends

Extended by

Properties

PropertyModifierTypeInherited from
networkreadonly`eip155:${string}` | HederaNetworkEvmReader.network

Methods

block()

block(at): Promise<{ number: bigint; timestamp: bigint; }>

eth_getBlockByNumber(at, false): the block's number and its timestamp, in seconds.

Parameters
ParameterType
atbigint | "safe" | "finalized" | "latest"
Returns

Promise<{ number: bigint; timestamp: bigint; }>

Overrides

EvmReader.block

blockNumber()

blockNumber(tag): Promise<bigint>

eth_getBlockByNumber(tag, false).number.

Parameters
ParameterType
tag"safe" | "finalized"
Returns

Promise<bigint>

Inherited from

EvmReader.blockNumber

call()

call(to, data, block): Promise<`0x${string}`>

eth_call of data to the contract to, in the state after block block: the return data.

Parameters
ParameterType
to`0x${string}`
data`0x${string}`
blockbigint
Returns

Promise<`0x${string}`>

Inherited from

EvmReader.call

logs()

logs(filter): Promise<readonly EvmLogEntry[]>

eth_getLogs over [fromBlock, toBlock]: address absent reads every contract, and each topic is matched by its position, null matching any.

Parameters
ParameterType
filter{ address?: `0x${string}`; fromBlock: bigint; toBlock: bigint; topics: readonly (`0x${string}` | null)[]; }
filter.address?`0x${string}`
filter.fromBlockbigint
filter.toBlockbigint
filter.topicsreadonly (`0x${string}` | null)[]
Returns

Promise<readonly EvmLogEntry[]>

Overrides

EvmReader.logs

raw()

raw(tx): Promise<`0x${string}` | null>

eth_getRawTransactionByHash: the signed transaction's bytes; null when the node holds none.

Parameters
ParameterType
tx`0x${string}`
Returns

Promise<`0x${string}` | null>

receipt()

receipt(tx): Promise<EvmReceipt | null>

eth_getTransactionReceipt; null when the node holds none.

Parameters
ParameterType
tx`0x${string}`
Returns

Promise<EvmReceipt | null>

Inherited from

EvmReader.receipt

transaction()

transaction(tx): Promise<EvmTransaction | null>

eth_getTransactionByHash: the sender, the recipient (null for a contract creation) and the calldata; null when none.

Parameters
ParameterType
tx`0x${string}`
Returns

Promise<EvmTransaction | null>

Inherited from

EvmReader.transaction


GatewayChargeChoice

The buyer's inputs to the Gateway build: the chosen challenge; sourceNetwork, the CAIP-2 network the burn intent spends from, for which the next two were read; the burnIntentExpirationHeight Circle Gateway's GET /v1/info serves for that network; and that network's Gateway Wallet's withdrawalDelay(), in blocks, each of the two a decimal string below 2^256.

Properties

PropertyType
burnIntentExpirationHeightstring
challengeMppChallenge & object
sourceNetworkstring
withdrawalDelaystring

GatewaySaltInput

The inputs of usdc's Gateway salt, every one a string.

Properties

PropertyType
amountstring
destinationNetworkstring
destinationRecipientstring
idstring
maxFeestring
realmstring
recipientstring
requestHash`0x${string}`
sourceDepositorstring
sourceNetworkstring
sourceSignerstring

HederaSessionUnsigned

A Hedera escrow channel opening for the payer's signer: two calls broadcast in order, and the zero voucher to sign. No pairing's build in this package answers this kind.

Properties

PropertyType
requestobject
request.callsobject[]
request.chainId295 | 296
request.kind"hedera-session-open"
request.voucherHederaVoucherTypedData

Methods

complete()

complete(signed): Refusal | MppCredential

The opening's credential for the broadcast transaction's hash and the zero voucher's signature. A credential over the credential size bound, 64 KiB, its echoed challenge included, is mpp/credential-malformed, as bound refuses it.

Parameters
ParameterType
signed{ openTx: `0x${string}`; signature: `0x${string}`; }
signed.openTx`0x${string}`
signed.signature`0x${string}`
Returns

Refusal | MppCredential


HederaStockReader

The reader of a stock session: the network's JSON-RPC relay, and three reads of its mirror. Every failure rejects.

Properties

PropertyModifierType
networkreadonlyHederaNetwork

Methods

account()

account(address): Promise<string | null>

GET /api/v1/accounts/{address} of the mirror: the account id its account member names, shard.realm.num; null on the mirror's 404.

Parameters
ParameterType
address`0x${string}`
Returns

Promise<string | null>

contractResult()

contractResult(tx): Promise<string | null>

GET /api/v1/contracts/results/{transactionIdOrHash} of the mirror for the transaction hash: the answer's result, the transaction's result as the network records it, CONTRACT_REVERT_EXECUTED for a revert executed in the EVM; null on the mirror's 404.

Parameters
ParameterType
tx`0x${string}`
Returns

Promise<string | null>

oldestBlock()

oldestBlock(): Promise<bigint | "archival">

The number of the oldest block the mirror holds, from which the relay answers, number of GET /api/v1/blocks?order=asc&limit=1, or archival where the endpoint is declared archival.

Returns

Promise<bigint | "archival">

receipt()

receipt(tx): Promise<EvmReceipt | null>

eth_getTransactionReceipt through the relay; null when it holds none.

Parameters
ParameterType
tx`0x${string}`
Returns

Promise<EvmReceipt | null>

transaction()

transaction(tx): Promise<{ input: `0x${string}`; to: `0x${string}` | null; } | null>

eth_getTransactionByHash through the relay: the recipient and the calldata the sender signed; null when none.

Parameters
ParameterType
tx`0x${string}`
Returns

Promise<{ input: `0x${string}`; to: `0x${string}` | null; } | null>


HederaStockRef

The read keys of a stock opening: the network, the opening's transaction hash its credential names, the escrow the challenge names, the channel the credential names, and the challenge's recipient, the payee. Addresses and hashes are lowercase. The position the opening must come after, the relay's block number read when the agreement settled, is the caller's.

Properties

PropertyType
channel`0x${string}`
escrow`0x${string}`
networkHederaNetwork
payee`0x${string}`
transaction`0x${string}`

LandedCredential

A push credential with a landed EVM transaction, its block and its receipt's logs under FETCHED. No pairing's fetchPresented in this package writes it.

Extends

Properties

PropertyTypeInherited from
[FETCHED]object-
[FETCHED].blockNumberbigint-
[FETCHED].logsreadonly EvmLog[]-
[FETCHED].transaction`0x${string}`-
challengeMppChallenge & objectMppCredential.challenge
payloadobjectMppCredential.payload
source?stringMppCredential.source

LcpHederaChoice

The buyer's inputs to build: the paying account, the node, the valid start, the maximum fee and, for a token, its decimals.

Properties

PropertyTypeDescription
challengeMppChallenge & object-
decimals?numberA token's decimals, written as the token list's expected_decimals.
maxFeebigintThe most the fee payer pays, in tinybars.
nodestringThe node the body is for, shard.realm.num.
payerstringThe buyer's account, shard.realm.num: the one account the body debits.
validStartobject-
validStart.nanosnumber-
validStart.secondsbigint-

LcpHederaLanded

What fetchPresented writes under FETCHED for a hash credential: the landed SUCCESS entry.

Properties

PropertyType
entryMirrorEntry

LcpHederaUnsigned

The body the buyer signs, and how its signature completes the credential.

Properties

PropertyType
requestobject
request.bodyBytesUint8Array<ArrayBuffer>
request.kind"hedera-body"

Methods

complete()

complete(s): Refusal | MppCredential

The credential {type: "transaction", transaction}, transaction the base64 of the wire Transaction the one signature completes, measured against the credential bound (mpp/credential-malformed); a signature pair of the wrong key or signature length is hedera/tx-malformed.

Parameters
ParameterType
s{ publicKey: Uint8Array; signature: Uint8Array; type: "ed25519" | "ecdsa-secp256k1"; }
s.publicKeyUint8Array
s.signatureUint8Array
s.type"ed25519" | "ecdsa-secp256k1"
Returns

Refusal | MppCredential


LcpValidation

What a rail's validate answers for a payment that passes every check it made: H, and each check it did not make for want of a reader, by name. A party submits only on an answer whose notMade is empty.

Properties

PropertyType
h`0x${string}`
notMadereadonly string[]

MppChallenge

A challenge's auth-params after quoted-string unescaping. request and opaque are base64url-nopad JSON.

Properties

PropertyType
description?string
digest?string
expires?string
header?string
id?string
intentstring
methodstring
opaque?string
realmstring
requeststring

MppChoice

The buyer's inputs to build. build holds the chosen challenge as bound holds an echoed one (chosenHeld), from a snapshot of its own members that the credential carries, checks the other inputs' form and that the challenge's id carries H; it compares no deal value.

Extended by

Properties

PropertyTypeDescription
challengeMppChallenge & object-
from`0x${string}`-
nownumber-
spender?`0x${string}`permit2 only: the seller server's submitting address.
tokenDomain?objectauthorization only: the token's EIP-712 name and version.
tokenDomain.namestring-
tokenDomain.versionstring-

MppCredential

An MPP credential, as the buyer presents it: the challenge it answers, echoed with its id; an optional source naming the payer, where the method writes one; and the method's payload.

Extended by

Properties

PropertyType
challengeMppChallenge & object
payloadobject
source?string

MppEip3009Ref

The reference an MPP EIP-3009 charge's read takes; the pairing's reference writes it.

Extends

Properties

PropertyModifierTypeDescriptionInherited from
authorizationreadonlyobjectThe challenge's currency, the token under whose domain the payer signed, which records the nonce's use.-
authorization.atreadonly`0x${string}`--
authorization.deadlinereadonlystring--
authorization.noncereadonly`0x${string}`--
networkreadonly`eip155:${string}`-ChargeRefBase.network
payeereadonlystring-ChargeRefBase.payee
payerreadonly`0x${string}`-ChargeRefBase.payer
presentedreadonlySignedThe members of the payment presented: the token, from, to, value and nonce, lowercase, value in decimal.-
transaction?readonly`0x${string}`A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed.ChargeRefBase.transaction

MppNamedRef

The reference the named-transaction read takes: the transaction the credential carries or names, its payer, the payee.

Properties

PropertyModifierTypeDescription
networkreadonly`eip155:${string}`-
payeereadonlystring-
payerreadonly`0x${string}`-
transactionreadonly`0x${string}`The transaction the credential names (hash) or carries (transaction, by the hash of its signed bytes).

MppPermit2Ref

The reference the MPP Permit2 charge's read takes; the pairing's reference writes it.

Extends

Properties

PropertyModifierTypeDescriptionInherited from
authorizationreadonlyobjectThe Permit2 deployment that records the owner's nonce, the nonce, and the permit's deadline.-
authorization.atreadonly`0x${string}`--
authorization.deadlinereadonlystring--
authorization.noncereadonly`0x${string}`--
networkreadonly`eip155:${string}`-ChargeRefBase.network
payeereadonlystring-ChargeRefBase.payee
payerreadonly`0x${string}`-ChargeRefBase.payer
presentedreadonlySignedThe members of the payment presented: the permit's permitted list (token:amount, comma-separated), nonce and deadline, the owner, the transfer details (to:requestedAmount, comma-separated) and the witness's hash.-
transaction?readonly`0x${string}`A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed.ChargeRefBase.transaction
witnesses?readonlyreadonly `0x${string}`[]The witness words the search counts: the chosen challenge's, and each of the other challenges of the sale's issue on this pairing and chain that reference was given. Absent, the presented witness alone.-

MppSessionOpeningRef

The reference the EVM session's opening read takes; the pairing's reference writes it.

Extends

Properties

PropertyModifierTypeDescriptionInherited from
fundingreadonlyobjectThe funding the payer signed: its type; the challenge's currency; the contract that keeps its single-use value, the token for an authorization and the Permit2 deployment for a permit2; that value, the authorization's nonce or the permit's nonce as a 32-byte word; and its signed bound, validBefore or deadline, in decimal.-
funding.atreadonly`0x${string}`--
funding.deadlinereadonlystring--
funding.noncereadonly`0x${string}`--
funding.tokenreadonly`0x${string}`--
funding.typereadonly"permit2" | "authorization"--
networkreadonly`eip155:${string}`-ChargeRefBase.network
opensreadonlyobjectThe escrow, the channel the opening opens, H and the chain.-
opens.chainIdreadonlynumber--
opens.channelreadonly`0x${string}`--
opens.escrowreadonly`0x${string}`--
opens.hreadonly`0x${string}`--
payeereadonlystring-ChargeRefBase.payee
payerreadonly`0x${string}`-ChargeRefBase.payer
presentedreadonlySignedThe members of the payment presented, lowercase, numbers in decimal: funding, the type; on an authorization the token, from, to and value and nonce, EIP-3009's members; on a permit2 the token, amount, nonce, deadline, spender and owner, and witness, the witness's payee:salt:authorizedSigner.-
transaction?readonly`0x${string}`A transaction a settler or the caller named, read beside the search, as the landed form gives it; never needed.ChargeRefBase.transaction

NearIntentsRef

The read keys of a NEAR Intents deposit: the origin network the challenge names, methodDetails.originNetwork, and the deposit's transaction hash as the credential presents it, in that network's spelling. The pairing has no status, so the reference names no payee.

Properties

PropertyType
networkstring
transactionstring

RailSessionChoice

The buyer's inputs to a session opening's build. The deposit and the XRPL channel terms are the funder's.

Properties

PropertyType
challengeMppChallenge & object
depositbigint
fromstring
nownumber
xrpl?object
xrpl.cancelAfter?number
xrpl.feestring
xrpl.lastLedgerSequencenumber
xrpl.publicKeystring
xrpl.sequencenumber
xrpl.settleDelaynumber

Seen

A transaction a read met, as the pairing's read classified it against the reference and the option.

Type Parameters

Type Parameter
Position
Mark

Properties

PropertyModifierTypeDescription
accountreadonly"none" | "other" | "payee"The account it names against the option's payee's: none where it names no account. For a transaction with a failed result, which moved nothing, the destination in what the payer signed, as the pairing identifies it.
authority?readonlystring-
carriesreadonlybooleanWhether it carries H, or for an agreement on a pairing that has one, the agreement's own value.
consumedreadonlybooleanWhether it consumed the act's single-use value.
given?readonlybooleanTrue where the pairing's read matched it to an other act the caller gave by its reference.
kindreadonly"other" | "same"Whether it is an act of the reference's pairing and of the act's kind.
markreadonlyMarkThe highest mark the read reached for it.
moved?readonlyreadonly Moved[]-
named?readonlystringThe account it names apart from what it moved, where the read records one, as Named.named states it.
partyreadonly"other" | "payer" | "payee"Its signer against the reference's payer and the option's payee.
position?readonlyPosition-
presentedreadonly"no" | "yes" | "unshown"Whether the message signed in it equals, member by member as the pairing's form names them, the payment presented: yes; no where a member differs; unshown where the read could not read every member. A settled answer states the act's.
resultreadonly"failed" | "succeeded"succeeded, or included with a failed result.
signer?readonlystring-
transactionreadonlystring-

SessionChoice

The buyer's inputs to build. build checks their form and that the chosen challenge's id carries H; it compares no deal value.

Extends

Properties

PropertyTypeDescriptionInherited from
authorizedSigner?`0x${string}`sessions: default the zero address, which means the payer.-
challengeMppChallenge & object-MppChoice.challenge
credentialType?"permit2" | "authorization"EVM: default the first listed type.-
deposit?bigintsessions: the buyer's deposit; suggestedDeposit is advice.-
from`0x${string}`-MppChoice.from
nownumber-MppChoice.now
spender?`0x${string}`permit2 only: the seller server's submitting address.MppChoice.spender
tokenDomain?objectauthorization only: the token's EIP-712 name and version.MppChoice.tokenDomain
tokenDomain.namestring--
tokenDomain.versionstring--

SessionRef

The settlement read keys of these pairings.

Extends

Properties

PropertyModifierTypeDescriptionInherited from
accessKey?publicobjectThe subscription's access key: its id, the token it spends, and transferDigest({to: recipient}); expiry, the key authorization's signed expiry in decimal Unix seconds, absent where it signs none. With account, the read keys of a transfer made under the key for that account.-
accessKey.account?public`0x${string}`--
accessKey.expiry?publicstring--
accessKey.keyIdpublic`0x${string}`--
accessKey.topublic`0x${string}`--
accessKey.tokenpublic`0x${string}`--
authorization?publicPullAuthorizationThe signed pull authorization and where the chain records its use, where the pairing's reference records one.EvmRef.authorization
bindingLog?public{ address: `0x${string}`; topic0: `0x${string}`; value: `0x${string}`; } & ({ index: 2 | 1 | 3; } | { dataWord: number; })The log carrying H or its commitment: in topic index, or in 32-byte data word dataWord.EvmRef.bindingLog
closes?publicobjectThe close of an EVM session: a call to escrow of one of EVM_CLOSE_SELECTORS naming channel.-
closes.channelpublic`0x${string}`--
closes.escrowpublic`0x${string}`--
funding?publicobjectThe EVM opening's funding, as MppSessionOpeningRef names it: its type, token, value's keeper, nonce and bound.-
funding.atreadonly`0x${string}`--
funding.deadlinereadonlystring--
funding.noncereadonly`0x${string}`--
funding.tokenreadonly`0x${string}`--
funding.typereadonly"permit2" | "authorization"--
networkpublic`eip155:${string}` | HederaNetwork-EvmRef.network
nonce?publicobjectOn a Tempo session, the opening transaction's single-use value: its nonce key and nonce, in decimal, and its signed validBefore in decimal Unix seconds, absent where it signs none. status reads the value by its key at the final mark and at the latest head, through a reader that reads a block's state (TempoSearchReader).-
nonce.keypublicstring--
nonce.valuepublicstring--
opened?publicobject--
opened.addresspublic`0x${string}`--
opened.chainIdpublicnumber--
opened.channelpublic`0x${string}`--
opened.hpublic`0x${string}`--
opened.versionpublic"v1" | "v2"--
opens?publicobjectThe opening of an EVM session: the escrow's open call whose salt is h, and whose payer, payee, token and authorized signer, with h, the escrow and chainId, give channel. With payer, funding and presented, status reads the opening by its funding (mppSessionOpeningStatus).-
opens.chainIdpublicnumber--
opens.channelpublic`0x${string}`--
opens.escrowpublic`0x${string}`--
opens.hpublic`0x${string}`--
payeepublicstringThe option's payee, which reference takes from the option the payment answers.EvmRef.payee
payer?public`0x${string}`The payer: on a Tempo session the sender of the opening's transaction, recovered from its 0x76 form, on an EVM session the account its authorization or permit is signed by, and on a subscription the account whose root key signed the key authorization (keyAuthorizationSigner). With opened, status reads the Tempo opening by the search for its ChannelOpened (tempoOpeningStatus); with a binding log under KeyAuthorizationWitness, the activation by the search for that log (activationStatus).-
presented?publicReadonly<Record<string, string>>The members of the EVM opening's payment presented, as MppSessionOpeningRef names them.-
revokes?publicobjectThe close of a subscription: the account keychain's KeyRevoked whose topic 1 is account and topic 2 keyId.-
revokes.accountpublic`0x${string}`--
revokes.keyIdpublic`0x${string}`--
search?publicobjectThe log filter that finds the transaction when none is named; absent, only a named transaction is read.EvmRef.search
search.addresspublic`0x${string}`--
search.topicspublicreadonly (`0x${string}` | null)[]--
settleBy?publicstringDecimal Unix seconds after which the payment can no longer execute.EvmRef.settleBy
signed?public`0x${string}`What the payer signed, as presented: on a Tempo session expiringNonceHash over the opening transaction's sender-signed fields, in the 0x76 form whatever envelope carried it, under its sender; on a subscription keccak-256 over the signed key authorization's bytes, the authorization and its root signature whole. A reference that status reads by the search, with payer, holds it, and one without it is unparseable.-
transaction?public`0x${string}`The transaction the credential presents, where the payer broadcast the opening before presenting it.-
transferLog?publicTransferLogThe token transfer this payment made, identified by the digest of the named fields.EvmRef.transferLog
validBefore?publicstring--

SessionWithin

The buyer's inputs to an in-channel payment: the within 402's challenge, which the in-channel credential echoes as buildWithin reads it, a snapshot of its own members (withinChecks); the held opening, exactly as signed; the cumulative amount to sign; and the action.

Properties

PropertyType
action"close" | "voucher"
challengeMppChallenge & object
cumulativeAmountbigint
openingMppCredential

SessionWithinUnsigned

One signing request; complete takes its one signature and returns the in-channel credential, measured as bound measures every credential: one over the credential size bound, 64 KiB, its challenge included, is mpp/credential-malformed, as each session pairing's channel.kind, channel.ref and channel.boundWithin refuse it.

Properties

PropertyType
requestsreadonly WithinSigningRequest[]

Methods

complete()

complete(signatures): Refusal | MppCredential

Parameters
ParameterType
signaturesreadonly string[]
Returns

Refusal | MppCredential


SolanaChargeChoice

The buyer's inputs to build. The request's decimals, tokenProgram and recentBlockhash win when present.

Properties

PropertyType
challengeMppChallenge & object
computeUnitLimit?number
computeUnitPrice?bigint
decimals?number
payerstring
recentBlockhash?string
tokenProgram?string

SolanaChargeUnsigned

Properties

PropertyType
requestobject
request.kind"solana-message"
request.messageUint8Array<ArrayBuffer>

Methods

complete()

complete(signature): Refusal | MppCredential

The payer's 64-byte Ed25519 signature over message. A credential over the credential size bound, 64 KiB, its echoed challenge included, is mpp/credential-malformed, as bound refuses it.

Parameters
ParameterType
signatureUint8Array
Returns

Refusal | MppCredential


SolanaSessionChoice

The buyer's inputs to the memo session's build.

Properties

PropertyTypeDescription
authorizedSignerstringThe session key that signs vouchers.
challengeMppChallenge & object-
deposit?bigintThe deposit; the request's cap where absent.
gracePeriod?numberThe close's grace period in seconds; 900 where absent, as the stock client opens.
mint?stringThe mint the request's currency names: the currency itself where it is a key, else the caller's resolution.
openSlot?bigintThe channel's openSlot; the request's recentSlot wins when present.
payerstringThe payer, whose token account funds the deposit.
recentBlockhash?stringThe request's recentBlockhash wins when present.
saltbigintThe PDA salt; lcp draws nothing.
tokenProgram?stringToken where absent.

SolanaSessionUnsigned

Properties

PropertyTypeDescription
requestobject-
request.channelstring-
request.kind"solana-session-open"-
request.messageUint8Array<ArrayBuffer>The message the payer signs: the stock open with one Memo instruction carrying H's LCP string.
request.sizenumberThe composed transaction's size in bytes, its two signatures included, at most 1,232.

Methods

complete()

complete(signature): Refusal | MppCredential

The open credential for the payer's 64-byte Ed25519 signature over message, the operator's slot left zero.

Parameters
ParameterType
signatureUint8Array
Returns

Refusal | MppCredential


SolanaTablesCredential

A Solana channel opening with its message's address lookup tables under FETCHED. No pairing in this package writes or reads it.

Extends

Properties

PropertyTypeDescriptionInherited from
[FETCHED]object--
[FETCHED].tablesreadonly object[]For each address table lookup of the opening's message, in order: the table's address, and the table's entries at the lookup's writable and read-only indexes, in order, each a base58 key. Empty for a message without lookups.-
challengeMppChallenge & object-MppCredential.challenge
payloadobject-MppCredential.payload
source?string-MppCredential.source

StacksChargeChoice

The buyer's inputs to the Stacks build: the chosen challenge and the payer's c32 standard principal.

Properties

PropertyType
challengeMppChallenge & object
fromstring

StripeSubscriptionReceipt

The Stripe subscription's activation receipt: the Payment-Receipt payload the seller's server answered the opening with, decoded from its base64url JSON (or the MCP transport's receipt object as given). channel.ref takes it with the opening.

Properties

PropertyTypeDescription
externalId?string-
method"stripe"-
referencestringThe Stripe invoice whose payment activated the subscription.
status"success"-
stripeSubscriptionstringThe Stripe subscription ID.
subscriptionIdstringThe seller's own identifier for the subscription.
timestampstring-

TempoLandedCredential

A push credential with the named transaction's receipt and signed bytes under FETCHED.

Extends

Properties

PropertyTypeInherited from
[FETCHED]object-
[FETCHED].blockNumberbigint-
[FETCHED].logsreadonly EvmLog[]-
[FETCHED].raw`0x${string}`-
[FETCHED].transaction`0x${string}`-
challengeMppChallenge & objectMppCredential.challenge
payloadobjectMppCredential.payload
source?stringMppCredential.source

TempoSplitLanded

What the caller adds to the reference: the act's own transaction where it knows it, on pull the one it broadcast.

Properties

PropertyType
transaction?`0x${string}`

TempoSplitRef

The read keys of a split-memo payment: the network, the payer (the transaction's sender), the option's payee (the request's recipient), the token the split names (currency), H, the signed validBefore in decimal Unix seconds (absent where the transaction signs none), the transaction's own nonce, its key and value in decimal, and the payment presented: signed, the hash over the fields the sender signed, in the 0x76 form whatever envelope carried them, as expiringNonceHash computes it; on push also named, the transaction the credential names.

Properties

PropertyType
currency`0x${string}`
h`0x${string}`
named?`0x${string}`
network`eip155:${number}`
nonceobject
nonce.keystring
nonce.valuestring
payee`0x${string}`
payer`0x${string}`
signed`0x${string}`
validBefore?string

TokenDomain

The token's EIP-712 domain name and version, which x402's verification reads from extra and no MPP challenge carries.

Properties

PropertyType
namestring
versionstring

VoucherTypedData

Properties

PropertyType
domainobject
domain.chainIdnumber
domain.name"EVM Payment Channel" | "Tempo Stream Channel" | "TIP20 Channel Reserve"
domain.verifyingContract`0x${string}`
domain.version"1"
messageobject
message.channelId`0x${string}`
message.cumulativeAmountbigint
primaryType"Voucher"
typesobject
types.Voucher[{ name: "channelId"; type: "bytes32"; }, { name: "cumulativeAmount"; type: "uint128" | "uint96"; }]

X402Mapped

x402's exact EIP-3009 payment and the requirements it answers, from one MPP credential.

Properties

PropertyType
paymentPayloadPaymentPayload
paymentRequirementsPaymentRequirements

XrplChargeChoice

The buyer's inputs to build: the paying account and the buyer's own reads of fee, sequence and ledger.

Properties

PropertyType
accountstring
challengeMppChallenge & object
feestring
lastLedgerSequencenumber
sequencenumber

XrplChargeUnsigned

Properties

PropertyType
requestobject
request.kind"xrpl-tx"
request.txJsonXrplTxJson

Methods

complete()

complete(signedBlob): Promise<Refusal | MppCredential>

The wallet's signed blob, hex, as a credential that names its payer by source, did:pkh:xrpl:{network}:{account}, the challenge's network name and the account build was given, as the stock client writes it and the stock server reads it first (xrpl-mpp-sdk 0.1.0-beta.4, dist/client/index.js:376-385, dist/chunk-ZKD7D3D6.js:149-170). It is read as bound reads the credential, in its order: a credential over the credential size bound, 64 KiB, its echoed challenge and source included, is mpp/credential-malformed; a blob that does not decode gets the refusal bound gives it (one over 8,192 hex digits, the stock server's bound, is xrpl/blob-too-large, and one that is not hex bytes xrpl/blob-malformed); and one whose NetworkID the challenge's network does not take is xrpl/network-mismatch.

Parameters
ParameterType
signedBlobstring
Returns

Promise<Refusal | MppCredential>


XrplSessionUnsigned

An XRPL PaymentChannelCreate for the wallet to sign, and the first claim's bytes.

Properties

PropertyType
requestobject
request.claimobject
request.claim.bytesUint8Array<ArrayBuffer>
request.claim.channelIdstring
request.claim.dropsbigint
request.kind"xrpl-session-open"
request.txJsonXrplTxJson

Methods

complete()

complete(signed): Promise<Refusal | MppCredential>

Parameters
ParameterType
signed{ claimSignature: string; signedBlob: string; }
signed.claimSignaturestring
signed.signedBlobstring
Returns

Promise<Refusal | MppCredential>

Type Aliases

EvmMoved

EvmMoved = Moved & object

One transfer an act made, named by its transaction and its Transfer log's position among the receipt's logs.

Type Declaration

NameType
placenumber
transactionHex

GatewayPreimage

GatewayPreimage = Pick<GatewaySaltInput, "id" | "realm" | "requestHash" | "recipient">

The salt's inputs a Gateway signing request carries from the chosen challenge.


HederaNetwork

HederaNetwork = "hedera:mainnet" | "hedera:testnet" | "hedera:previewnet" | "hedera:devnet"


HederaQuery

HederaQuery = StatusQuery<LcpHederaRef, string, "consensus", string>


HederaStockStatus

HederaStockStatus = StatusAnswer<bigint, "finalized", bigint>

What status answers: positions are the relay's block numbers, and its one mark finalized, which is final.


LcpHederaRef

LcpHederaRef = HederaRef & object

The read keys of a presented payment: HederaRef; for a transaction credential bodyDigest, the SHA-256 of the signed body's bytes, which with the network, the debited account and the transaction id names the instrument; and named where the credential is a hash one, which presents the transaction its payer broadcast and nothing beside it.

Type Declaration

NameType
bodyDigest?AtrHash
named?true

LcpRail

LcpRail = "hedera" | "stellar"

The rails the method names in methodDetails.rail.


MppEvmReader

MppEvmReader = EvmSearchReader & object

The reader of an MPP EVM charge's read: EvmSearchReader, and archival, set where the seller declares the endpoint archival, by which a lookup at coverage none shows that it holds the history its transaction would be in.

Type Declaration

NameType
archival?boolean

MppEvmStatus

MppEvmStatus = StatusAnswer<bigint, EvmMark>

What an MPP EVM charge's status answers: read-status's answer, with presented on settled.


MppIntent

MppIntent = "charge" | "session" | "subscription"


MppMethod

MppMethod = "evm" | "tempo" | "solana" | "lightning" | "card" | "stripe" | "usdc" | "nearintents" | "stellar" | "xrpl" | "hedera" | "lcp"

The MPP payment methods this package knows a challenge's method as: the methods of a checked challenge (Checked.method) and the keys of CARRIER.


MppPairingId

MppPairingId = "mpp/charge/evm/permit2" | "mpp/charge/evm/authorization" | "mpp/charge/evm/transaction" | "mpp/charge/evm/hash" | "mpp/session/evm" | "mpp/charge/tempo/split-memo" | "mpp/charge/tempo/split-memo/push" | "mpp/session/tempo" | "mpp/subscription/tempo" | "mpp/charge/lightning" | "mpp/session/lightning" | "mpp/charge/solana" | "mpp/charge/solana/unsponsored" | "mpp/subscription/solana" | "mpp/session/solana/memo" | "mpp/session/solana/stock" | "mpp/charge/xrpl" | "mpp/charge/nearintents" | "mpp/session/xrpl" | "mpp/session/xrpl/stock" | "mpp/session/hedera/stock" | "mpp/charge/lcp/hedera" | "mpp/charge/card" | "mpp/charge/stripe" | "mpp/subscription/stripe" | "mpp/charge/usdc/evm" | "mpp/charge/usdc/solana" | "mpp/charge/usdc/stacks" | "mpp/charge/usdc/gateway"

The id of each MPP pairing pairingsOf can name.


MppReceipt

MppReceipt = object

MPP's Payment-Receipt payload: status success, the payment method, the RFC 3339 timestamp of settlement and the method's reference, such as a transaction hash. A method's specification may define other members.

Indexable

[k: string]: Json | undefined

Properties

PropertyType
methodstring
referencestring
status"success"
timestampstring

MppUnsigned

MppUnsigned = { request: { kind: "eip712"; typedData: Eip3009TypedData | Permit2TypedData; }; complete: Refusal | MppCredential; } | { request: { broadcast: boolean; call: { data: Hex; to: Hex; }; chainId: number; kind: "evm-call"; }; complete: Refusal | MppCredential; }

What the buyer's signer is handed for each EVM charge, and how its answer completes the credential. Each complete measures the credential it would return as bound measures every credential, its echoed challenge included, and refuses one over the credential size bound, 64 KiB, with mpp/credential-malformed, the code bound gives it.

Union Members

Type Literal

{ request: { kind: "eip712"; typedData: Eip3009TypedData | Permit2TypedData; }; complete: Refusal | MppCredential; }


Type Literal

{ request: { broadcast: boolean; call: { data: Hex; to: Hex; }; chainId: number; kind: "evm-call"; }; complete: Refusal | MppCredential; }

NameTypeDescription
requestobjectAn EIP-1559 transaction of the call, or its hash once broadcast. Unbroadcast, complete takes the signed transaction: one that is not 1 to 65,536 bytes of hex, or whose credential is over the credential size bound, is mpp/credential-malformed, the code bound gives that credential before its verdict, mpp/no-signed-place; then one that is not an EIP-1559 transaction (0x02 and the RLP list of its twelve fields) is mpp/credential-malformed, and one signed for a chain other than chainId is evm/chain-mismatch.
request.broadcastboolean-
request.callobject-
request.call.dataHex-
request.call.toHex-
request.chainIdnumber-
request.kind"evm-call"-
complete()(signedTxOrHash) => Refusal | MppCredential-

Presentation

Presentation = Seen<bigint, EvmMark>["presented"]

Whether an act is the payment the reference was built from, Seen.presented.


RailSessionUnsigned

RailSessionUnsigned = HederaSessionUnsigned | SolanaSessionUnsigned | XrplSessionUnsigned


ReceiveTypedData

ReceiveTypedData = Omit<Eip3009TypedData, "primaryType" | "types"> & object

EIP-3009's ReceiveWithAuthorization: the same fields as TransferWithAuthorization, for a payee contract.

Type Declaration

NameType
primaryType"ReceiveWithAuthorization"
typesobject
types.EIP712DomainField[]
types.ReceiveWithAuthorizationField[]

SessionStatus

SessionStatus = EvmBreadthStatus

What these pairings' status answers, in the terms of EvmBreadthStatus.


SessionUnsigned

SessionUnsigned = object

Properties

PropertyType
funding{ kind: "eip712"; opening?: { authorizedSigner: Hex; payee: Hex; salt: Hex; }; typedData: ReceiveTypedData | Permit2TypedData; } | { approve?: { data: Hex; to: Hex; }; broadcast: false; call: { data: Hex; to: Hex; }; chainId: number; kind: "tempo-call"; validBefore: number; }

Methods

complete()

complete(funded, voucherSignature): Refusal | MppCredential

The opening's credential for funded and the voucher signature. On every funding it is measured as bound measures every credential, its echoed challenge included: one over the credential size bound, 64 KiB, is mpp/credential-malformed, the code bound gives it.

Parameters
ParameterType
funded`0x${string}`
voucherSignature`0x${string}`
Returns

Refusal | MppCredential

voucher()

voucher(funded): Refusal | VoucherTypedData

funded: the funding signature, transaction hash or signed 0x76 transaction. A tempo-call funding's complete returns no credential bound refuses: it gives the code bound gives the credential it would give for the signed transaction, and voucher refuses the same transactions, with the shortest voucher signature complete takes, one byte. So both refuse a transaction that does not decode, an empty one among them, is signed for a chain other than funding.chainId, whose signature gives no sender (a keychain signature of type 0x03 among them), or whose aa_authorization_list holds an entry that is not a list of four items ending in a signature or one signed with a keychain signature of type 0x03 (tempo/tx-malformed); one without the open call funding.call describes, to its escrow with H as its salt; one whose sender is not the build's from, or whose open call names another payee, operator, token or authorizedSigner, which the credential's descriptor or channel id names; and one whose credential is over the credential size bound (mpp/credential-malformed). On an eip712 funding, voucher likewise gives what complete gives funded with a one-byte voucher signature where that is a refusal: a funding signature or hash not in the form complete takes, or a credential over the credential size bound, each mpp/credential-malformed.

Parameters
ParameterType
funded`0x${string}`
Returns

Refusal | VoucherTypedData


Signed

Signed = Readonly<Record<string, string>>

The members of what the payer signed, as read from a landed act or as presented, each a lowercase string.


StockQuery

StockQuery = StatusQuery<HederaStockRef, bigint, "finalized", bigint>


TempoSplitQuery

TempoSplitQuery = EvmQuery<TempoSplitRef>

What status takes beside the reference and the reader: its search position is a block number.


TempoSplitStatus

TempoSplitStatus = StatusAnswer<bigint, EvmMark>

What status answers: block numbers, EVM marks, the search position a block number.


UsdcUnsigned

UsdcUnsigned = { request: { kind: "eip712"; typedData: Eip3009TypedData; }; complete: Refusal | MppCredential; } | { request: { anchorMode: "onChainOnly"; args: { amount: string; memo: AtrHash; recipient: string; sender: string; }; chainId: number; contract: string; functionName: "transfer"; kind: "stacks-contract-call"; postCondition: "SentEq"; postConditionMode: "deny"; }; complete: Refusal | MppCredential; } | { request: { challengeRequest: string; kind: "gateway-burn-intent"; maxBlockHeight: string; preimage: GatewayPreimage; }; complete: Refusal | MppCredential; }

What the signer is handed for each usdc profile, and how its answer completes the credential. Each complete measures the credential it would return as bound measures every credential, its echoed challenge included, and refuses one over the credential size bound, 64 KiB, with mpp/credential-malformed, the code bound gives it.

Union Members

Type Literal

{ request: { kind: "eip712"; typedData: Eip3009TypedData; }; complete: Refusal | MppCredential; }


Type Literal

{ request: { anchorMode: "onChainOnly"; args: { amount: string; memo: AtrHash; recipient: string; sender: string; }; chainId: number; contract: string; functionName: "transfer"; kind: "stacks-contract-call"; postCondition: "SentEq"; postConditionMode: "deny"; }; complete: Refusal | MppCredential; }

NameTypeDescription
requestobjectThe transfer to sign for the challenge's chain, chainId, at that network's version: 0x00 on chain 1, mainnet, and 0x80 on any other. complete takes the signed transaction's bytes, and refuses a value that is not a Uint8Array with mpp/credential-malformed. It then checks in bound's order: a credential over the credential size bound, its echoed challenge included, is mpp/credential-malformed, read first; then bytes that are empty, over 16,384 bytes or that a Stacks node does not decode are mpp/stacks-tx-malformed, and a transaction of another chain id or version is stacks/chain-mismatch, as bound refuses them.
request.anchorMode"onChainOnly"-
request.argsobject-
request.args.amountstring-
request.args.memoAtrHash-
request.args.recipientstring-
request.args.senderstring-
request.chainIdnumber-
request.contractstring-
request.functionName"transfer"-
request.kind"stacks-contract-call"-
request.postCondition"SentEq"-
request.postConditionMode"deny"-
complete()(serializedTx) => Refusal | MppCredential-

Type Literal

{ request: { challengeRequest: string; kind: "gateway-burn-intent"; maxBlockHeight: string; preimage: GatewayPreimage; }; complete: Refusal | MppCredential; }

NameTypeDescription
requestobjectThe salt's preimage from the chosen challenge, and the maxBlockHeight the burn intent signs, a decimal string. complete refuses a burn intent whose maxBlockHeight, read as a decimal, is not that value, with mpp/max-block-height-changed. challengeRequest is the chosen challenge's request parameter as issued (base64url): usdcRequestHash(challengeRequest) is preimage.requestHash, and it holds the amount, the currency, the destination network and the maxFee the burn intent grants, so a client can show them and hold the hash to them.
request.challengeRequeststring-
request.kind"gateway-burn-intent"-
request.maxBlockHeightstring-
request.preimageGatewayPreimage-
complete()(c) => Refusal | MppCredential-

WithinSigningRequest

WithinSigningRequest = { kind: "eip712"; typedData: VoucherTypedData | HederaVoucherTypedData; } | { kind: "ed25519-raw"; message: Uint8Array<ArrayBuffer>; signer: string; } | { bytes: Uint8Array<ArrayBuffer>; channelId: string; drops: bigint; kind: "xrpl-claim"; }

A request to the buyer's signer for an in-channel payment.


XrplQuery

XrplQuery<Ref> = StatusQuery<Ref, number, XrplMark>

What an XRPL status read takes with the reference and the reader.

Type Parameters

Type Parameter
Ref

Variables

CARRIER

const CARRIER: { readonly [i in MppIntent]: { readonly [m in MppMethod]?: readonly string[] | null } } = CARRIERS.byMethod

The request member a pairing writes H into, by intent and method; null where no request member carries it. It is derived from the MPP entries' carrier datum: each pairing's carrier.member, keyed by the intent and method its id names. usdc carries H in a request member only on its Solana profile, which USDC_CARRIER keys by profile.


chargeCard

const chargeCard: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (_choice, _h) => Promise<Refusal>; claims: boolean; data: PairingData; id: "mpp/charge/card"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/card. The payee broadcasts (broadcaster answers "payee"): the seller submits the card payment the payer's credential authorizes to its processor; nothing here reads it.


chargeLcpHedera

const chargeLcpHedera: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h, _act?) => Promise<Refusal | LcpHederaUnsigned>; claims: boolean; data: PairingData; fetchPresented: (input, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/lcp/hedera"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option, _given?) => Promise<Refusal | LcpHederaRef>; status: (ref, reader, query) => Promise<HederaStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; validate: (input, now, _reader?) => Promise<Refusal | LcpValidation>; }>

mpp/charge/lcp/hedera. broadcaster answers by the credential's type: transaction, "payee", the party that submits sends the buyer's bytes unchanged, and status reads them; hash, "payer", the payer broadcast the body, which fetchPresented reads. A credential of any other type gets mpp/credential-type, as bound refuses it. validate is the method's validation that moves nothing.


chargeNearIntents

const chargeNearIntents: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?, named?) => Refusal | MppChallenge[]; advertiseBeforeCarrier: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (credential) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; claims: boolean; data: PairingData; id: "mpp/charge/nearintents"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (credential, option) => Promise<Refusal | NearIntentsRef>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/nearintents. The payer broadcasts (broadcaster answers "payer" for a credential of type hash): it sends its deposit before presenting the deposit's hash. Settlement is the resource server's report: no fetchPresented, status or recover reads it, and reference names the deposit by its origin network and hash. A credential of any other type gets near/not-hash-credential, as bound refuses it.


chargeSolana

const chargeSolana: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaChargeUnsigned>; claims: boolean; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/solana"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/solana: a challenge whose methodDetails.feePayer is true, under which the stock client refuses to broadcast from @solana/mpp 0.6.0. A signature credential, which an older client pushes, is a payment that already moved.


chargeSolanaUnsponsored

const chargeSolanaUnsponsored: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaChargeUnsigned>; claims: boolean; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/solana/unsponsored"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/solana/unsponsored: a challenge of the solana method that does not set feePayer: true.


chargeStripe

const chargeStripe: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (_choice, _h) => Promise<Refusal>; claims: boolean; data: PairingData; id: "mpp/charge/stripe"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/stripe. The payee broadcasts (broadcaster answers "payee"): the seller's server creates the Stripe payment with the payer's shared payment token; nothing here reads it.


chargeUsdcEvm

const chargeUsdcEvm: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; authorizer: (input) => Promise<Refusal | `0x${string}`>; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | UsdcUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/evm"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option) => Promise<Refusal | EvmRef & MppEip3009Ref>; status: (ref, reader, query) => Promise<StatusAnswer<bigint, EvmMark>>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/usdc/evm. The payee broadcasts (broadcaster answers "payee" for a credential of type authorization): the payer signs an EIP-3009 authorization, and the seller's server submits it and pays the gas; status reads that transaction. A credential of any other type gets mpp/credential-type, as bound refuses it.


chargeUsdcGateway

const chargeUsdcGateway: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | { request: { challengeRequest: string; kind: "gateway-burn-intent"; maxBlockHeight: string; preimage: GatewayPreimage; }; complete: Refusal | MppCredential; }>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/gateway"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/usdc/gateway. The payee broadcasts (broadcaster answers "payee" for a credential of type transfer): the seller's server submits the burn intent the payer signed through Circle Gateway, which settles it; no status reads it. A credential of any other type gets mpp/credential-type, as bound refuses it.


chargeUsdcSolana

const chargeUsdcSolana: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaChargeUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/solana"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/usdc/solana, which takes only type="transaction" credentials. The payee broadcasts (broadcaster answers "payee" for them): the seller's server broadcasts the transaction the payer signed, and status reads it. A credential of any other type gets mpp/credential-type, as bound refuses it.


chargeUsdcStacks

const chargeUsdcStacks: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | { request: { anchorMode: "onChainOnly"; args: { amount: string; memo: `0x${string}`; recipient: string; sender: string; }; chainId: number; contract: string; functionName: "transfer"; kind: "stacks-contract-call"; postCondition: "SentEq"; postConditionMode: "deny"; }; complete: Refusal | MppCredential; }>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/stacks"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | Omit<StacksRef, "payee"> & object>; status: (ref, reader, query) => Promise<StacksStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/usdc/stacks. The payee broadcasts (broadcaster answers "payee" for a credential of type transaction): the seller's server sponsors and broadcasts the Stacks transaction the payer signed; status reads it. A credential of any other type gets mpp/credential-type, as bound refuses it.


chargeXrpl

const chargeXrpl: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | XrplChargeUnsigned>; claims: boolean; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/xrpl"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option, _given?) => Promise<Refusal | Omit<XrplRef, "fromLedger">>; status: (ref, reader, query) => Promise<XrplStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/xrpl. broadcaster answers by the credential's type. transaction, "payee": the seller's server submits the signed blob, and status reads it. hash, "payer": the payer broadcast the transaction, which fetchPresented reads, then status. A credential of any other type gets mpp/credential-type, as bound refuses it.


evmAuthorization

const evmAuthorization: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; authorizer: (input) => Promise<Refusal | `0x${string}`>; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/authorization"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option) => Promise<Refusal | EvmRef & MppEip3009Ref>; status: (ref, reader, query) => Promise<StatusAnswer<bigint, EvmMark>>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/charge/evm/authorization. The payee broadcasts (broadcaster answers "payee" for a credential of type authorization): the payer signs an EIP-3009 authorization, and the seller's server submits transferWithAuthorization with it; status reads that transaction. A credential of any other type gets mpp/credential-type, as bound refuses it.


evmHash

const evmHash: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/hash"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | EvmRef & MppNamedRef & object>; status: (ref, reader, query) => Promise<MppEvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/charge/evm/hash, whose build writes broadcast: true. broadcaster answers by the credential's type, as reference and status take either: hash, "payer", a transaction the payer broadcast, which status reads by that hash; transaction, "payee", a signed transaction the seller's server broadcasts, naming its hash to status. A credential of any other type gets mpp/credential-type, as bound refuses it; bound gives every credential of either type mpp/no-signed-place.


evmPermit2

const evmPermit2: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; authorizer: (input) => Promise<Refusal | `0x${string}`>; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/permit2"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option, _given?, issue?) => Promise<Refusal | EvmRef & MppPermit2Ref>; status: (ref, reader, query) => Promise<MppEvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/charge/evm/permit2. The payee broadcasts (broadcaster answers "payee" for a credential of type permit2): the payer signs a Permit2 transfer, and the seller's server, the spender it names, submits it to Permit2; status reads that transaction. A credential of any other type gets mpp/credential-type, as bound refuses it.


evmTransaction

const evmTransaction: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/transaction"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | EvmRef & MppNamedRef & object>; status: (ref, reader, query) => Promise<MppEvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/charge/evm/transaction, whose build writes broadcast: false. broadcaster answers by the credential's type, as reference and status take either: transaction, "payee", a signed transaction the seller's server broadcasts, naming its hash to status; hash, "payer", a transaction the payer broadcast, which status reads by that hash. A credential of any other type gets mpp/credential-type, as bound refuses it; bound gives every credential of either type mpp/no-signed-place.


const LEGAL_CONTEXT_METADATA_KEY: "legal_context" = "legal_context"

The Stripe metadata key the seller places H under: at most 40 characters, no square brackets.


MPP_BINDINGS

const MPP_BINDINGS: readonly [Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; authorizer: (input) => Promise<Refusal | `0x${string}`>; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/authorization"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option) => Promise<Refusal | EvmRef & MppEip3009Ref>; status: (ref, reader, query) => Promise<StatusAnswer<bigint, EvmMark>>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; authorizer: (input) => Promise<Refusal | `0x${string}`>; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/permit2"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option, _given?, issue?) => Promise<Refusal | EvmRef & MppPermit2Ref>; status: (ref, reader, query) => Promise<MppEvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/transaction"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | EvmRef & MppNamedRef & object>; status: (ref, reader, query) => Promise<MppEvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | MppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/evm/hash"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | EvmRef & MppNamedRef & object>; status: (ref, reader, query) => Promise<MppEvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; claims: boolean; data: PairingData; id: "mpp/charge/tempo/split-memo"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | TempoSplitRef>; status: (ref, reader, query) => Promise<TempoSplitStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; claims: boolean; data: PairingData; fetchPresented: (presented, reader) => Promise<Refusal | TempoLandedCredential>; id: "mpp/charge/tempo/split-memo/push"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | TempoSplitRef>; status: (ref, reader, query) => Promise<TempoSplitStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SessionUnsigned>; buildWithin: (w, h) => Promise<Refusal | SessionWithinUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: true; closeRef: (chosen, channel) => Refusal | SessionRef; data: PairingData; id: "mpp/session/evm"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SessionRef>; status: (ref, reader, query) => Promise<EvmBreadthStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SessionUnsigned>; buildWithin: (w, h) => Promise<Refusal | SessionWithinUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: true; closeRef: (chosen, channel) => Refusal | SessionRef; data: PairingData; id: "mpp/session/tempo"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SessionRef>; status: (ref, reader, query) => Promise<EvmBreadthStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | KeyAuthorizationUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (presented) => number | undefined; }>; claims: true; closeRef: (chosen, _channel, account?) => Refusal | SessionRef; data: PairingData; id: "mpp/subscription/tempo"; keyProves: string; keySearch: (ref, receipt, h) => Refusal | SessionRef; pattern: { forwardIndexable: true; onChain: true; pattern: "native-field"; profile: string; zeroPartyRecoverable: true; }; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SessionRef>; status: (ref, reader, query) => Promise<EvmBreadthStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; advertiseBeforeCarrier: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | LnMppUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/lightning"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented) => Promise<Refusal | LnRef>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (c) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; advertiseBeforeCarrier: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | LnMppUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: boolean; data: PairingData; id: "mpp/session/lightning"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented) => Promise<Refusal | LnRef>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (c) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaChargeUnsigned>; claims: boolean; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/solana"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaChargeUnsigned>; claims: boolean; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/solana/unsponsored"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (presented) => number | undefined; }>; claims: boolean; data: PairingData; id: "mpp/subscription/solana"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaSessionUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: true; data: PairingData; id: "mpp/session/solana/memo"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | Refusal; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: false; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/session/solana/stock"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | XrplChargeUnsigned>; claims: boolean; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/xrpl"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option, _given?) => Promise<Refusal | Omit<XrplRef, "fromLedger">>; status: (ref, reader, query) => Promise<XrplStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?, named?) => Refusal | MppChallenge[]; advertiseBeforeCarrier: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (credential) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; claims: boolean; data: PairingData; id: "mpp/charge/nearintents"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (credential, option) => Promise<Refusal | NearIntentsRef>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | XrplSessionUnsigned>; buildWithin: (w, h) => Promise<Refusal | SessionWithinUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => Refusal | ChannelKind; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (presented) => number | undefined; }>; claims: true; closeRef: (chosen, channel) => Refusal | Omit<XrplCloseRef, "transaction">; data: PairingData; id: "mpp/session/xrpl"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option, _given?) => Promise<Refusal | Omit<XrplRef, "fromLedger">>; status: (ref, reader, query) => Promise<XrplStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => Refusal | ChannelKind; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: () => number | undefined; }>; claims: false; data: PairingData; id: "mpp/session/xrpl/stock"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option, _given?) => Promise<Refusal | Omit<XrplChannelRef, "fromLedger">>; status: (ref, reader, query) => Promise<XrplStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => Refusal | ChannelKind; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: () => number | undefined; }>; claims: false; data: PairingData; id: "mpp/session/hedera/stock"; pattern: { forwardIndexable: false; onChain: false; pattern: "opaque-challenge"; profile: string; zeroPartyRecoverable: false; }; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option, _given?) => Promise<Refusal | HederaStockRef>; status: (ref, reader, query) => Promise<HederaStockStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h, _act?) => Promise<Refusal | LcpHederaUnsigned>; claims: boolean; data: PairingData; fetchPresented: (input, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/charge/lcp/hedera"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option, _given?) => Promise<Refusal | LcpHederaRef>; status: (ref, reader, query) => Promise<HederaStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; validate: (input, now, _reader?) => Promise<Refusal | LcpValidation>; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (_choice, _h) => Promise<Refusal>; claims: boolean; data: PairingData; id: "mpp/charge/card"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (_choice, _h) => Promise<Refusal>; claims: boolean; data: PairingData; id: "mpp/charge/stripe"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (_choice, _h) => Promise<Refusal>; channel: Readonly<{ boundWithin: (_presented) => Promise<Refusal | `0x${string}`>; kind: (_presented) => "open"; ref: (_presented, receipt?) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: boolean; data: PairingData; id: "mpp/subscription/stripe"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; authorizer: (input) => Promise<Refusal | `0x${string}`>; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | UsdcUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/evm"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option) => Promise<Refusal | EvmRef & MppEip3009Ref>; status: (ref, reader, query) => Promise<StatusAnswer<bigint, EvmMark>>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaChargeUnsigned>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/solana"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | { request: { anchorMode: "onChainOnly"; args: { amount: string; memo: `0x${string}`; recipient: string; sender: string; }; chainId: number; contract: string; functionName: "transfer"; kind: "stacks-contract-call"; postCondition: "SentEq"; postConditionMode: "deny"; }; complete: Refusal | MppCredential; }>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/stacks"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | Omit<StacksRef, "payee"> & object>; status: (ref, reader, query) => Promise<StacksStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>, Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | { request: { challengeRequest: string; kind: "gateway-burn-intent"; maxBlockHeight: string; preimage: GatewayPreimage; }; complete: Refusal | MppCredential; }>; claims: boolean; data: PairingData; id: "mpp/charge/usdc/gateway"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>]

Every MPP pairing this entry point implements.


sessionEvm

const sessionEvm: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SessionUnsigned>; buildWithin: (w, h) => Promise<Refusal | SessionWithinUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: true; closeRef: (chosen, channel) => Refusal | SessionRef; data: PairingData; id: "mpp/session/evm"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SessionRef>; status: (ref, reader, query) => Promise<EvmBreadthStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/session/evm. broadcaster answers by the payment's action and type (evmBroadcasts), for the actions channel.kind takes, and every answer is "payee": an opening or a top-up of type authorization or permit2, which the seller's server submits to the escrow; a voucher, which it redeems when it settles or closes; and the close, the escrow call it sends, which closeRef and status read. An opening funded by a hash, a transaction the buyer's client broadcasts, is no part of the pairing: it gets the refusal bound gives it, mpp/credential-type, as an opening of any other type does, and mpp/not-an-opening for a top-up of another type or any other action.


sessionHederaStock

const sessionHederaStock: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => Refusal | ChannelKind; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: () => number | undefined; }>; claims: false; data: PairingData; id: "mpp/session/hedera/stock"; pattern: { forwardIndexable: false; onChain: false; pattern: "opaque-challenge"; profile: string; zeroPartyRecoverable: false; }; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option, _given?) => Promise<Refusal | HederaStockRef>; status: (ref, reader, query) => Promise<HederaStockStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/session/hedera/stock, the stock client's session at coverage none, served after the agreement. broadcaster answers "payer" for the opening and a top-up, which the buyer's client sends, and "payee" for a voucher and the close; status reads the opening (hederaStockStatus).


sessionSolanaMemo

const sessionSolanaMemo: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SolanaSessionUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: true; data: PairingData; id: "mpp/session/solana/memo"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/session/solana/memo. The payee broadcasts every payment the session takes (broadcaster answers "payee" for the actions channel.kind takes: the opening, which the seller's server co-signs as the operator and submits, a voucher, a commit and the close). A top-up, which the payer's client broadcasts, and any other action get mpp/not-an-opening, as bound refuses them.


sessionSolanaStock

const sessionSolanaStock: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | Refusal; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: false; data: PairingData; fetchPresented: (credential, reader) => Promise<Refusal | MppCredential & object>; id: "mpp/session/solana/stock"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/session/solana/stock, at coverage none: the buyer's client broadcasts the stock opening, which carries no H, after the agreement is recorded. broadcaster answers "payer" for the opening; every later credential is mpp/not-an-opening. The opening's account is the open's payer (account 0), never its authorizedSigner.


sessionTempo

const sessionTempo: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | SessionUnsigned>; buildWithin: (w, h) => Promise<Refusal | SessionWithinUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: true; closeRef: (chosen, channel) => Refusal | SessionRef; data: PairingData; id: "mpp/session/tempo"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SessionRef>; status: (ref, reader, query) => Promise<EvmBreadthStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/session/tempo, whose build writes broadcast: false. The payee broadcasts every payment the session takes (broadcaster answers "payee" for the actions channel.kind takes, and an opening of type transaction), as draft-tempo-session-00 has it: the seller's server broadcasts the signed transaction of an opening or a top-up, which status reads, redeems vouchers when it settles or closes, and sends the close, which closeRef and status read. Any other credential gets mpp/not-an-opening, as bound refuses it.


sessionXrpl

const sessionXrpl: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | XrplSessionUnsigned>; buildWithin: (w, h) => Promise<Refusal | SessionWithinUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => Refusal | ChannelKind; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (presented) => number | undefined; }>; claims: true; closeRef: (chosen, channel) => Refusal | Omit<XrplCloseRef, "transaction">; data: PairingData; id: "mpp/session/xrpl"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option, _given?) => Promise<Refusal | Omit<XrplRef, "fromLedger">>; status: (ref, reader, query) => Promise<XrplStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/session/xrpl. The payee broadcasts every payment the session takes (broadcaster answers "payee" for the actions channel.kind takes: the opening, a voucher and the close): the seller's server submits the signed PaymentChannelCreate the opening carries, which status reads, redeems claims when it closes, and sends the close, which closeRef and status read. Any other action, a top-up among them, gets mpp/session-action, as bound refuses it.


sessionXrplStock

const sessionXrplStock: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input, _given?) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => Refusal | ChannelKind; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: () => number | undefined; }>; claims: false; data: PairingData; id: "mpp/session/xrpl/stock"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (input, option, _given?) => Promise<Refusal | Omit<XrplChannelRef, "fromLedger">>; status: (ref, reader, query) => Promise<XrplStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/session/xrpl/stock, a stock client's session at coverage none, served after the agreement. The buyer's client opens the channel itself, out of band, which is no credential of the pairing, and presents vouchers that name it. The payee broadcasts every payment the pairing takes: it redeems the vouchers and submits the close's PaymentChannelClaim from the recipient's wallet (xrpl-mpp-sdk 0.1.0-beta.4, dist/channel/server/index.js:686-697), so broadcaster answers "payee" for a voucher and for a close; an open is mpp/session-action. status reads the channel's create (xrplChannelStatus).


subscriptionSolana

const subscriptionSolana: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (presented) => number | undefined; }>; claims: boolean; data: PairingData; id: "mpp/subscription/solana"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SvmRef>; status: (ref, reader, query) => Promise<SvmStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/subscription/solana. The payee broadcasts (broadcaster answers "payee" for a type="transaction" credential): the activation's transfer_subscription needs the signature of the challenge's puller, the seller's key, which the payer's client does not hold (@solana/pay-kit 0.13.1 dist/chunk-SSATEZ72.js:2393-2394, :2431-2443), so the seller's server co-signs and submits it. A credential of any other type is mpp/credential-type, as bound refuses it.


subscriptionStripe

const subscriptionStripe: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (_choice, _h) => Promise<Refusal>; channel: Readonly<{ boundWithin: (_presented) => Promise<Refusal | `0x${string}`>; kind: (_presented) => "open"; ref: (_presented, receipt?) => Promise<Refusal | { channel: string; network: string; }>; until: (_presented) => number | undefined; }>; claims: boolean; data: PairingData; id: "mpp/subscription/stripe"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/subscription/stripe. The payee broadcasts (broadcaster answers "payee"): the seller's server creates the Stripe subscription with the payer's shared payment token and reports its activation; nothing here reads it.


subscriptionTempo

const subscriptionTempo: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (input) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; build: (choice, h) => Promise<Refusal | KeyAuthorizationUnsigned>; channel: Readonly<{ boundWithin: (presented) => Promise<Refusal | `0x${string}`>; kind: (presented) => "open" | "close" | Refusal | "within"; ref: (presented) => Promise<Refusal | { channel: string; network: string; }>; until: (presented) => number | undefined; }>; claims: true; closeRef: (chosen, _channel, account?) => Refusal | SessionRef; data: PairingData; id: "mpp/subscription/tempo"; keyProves: string; keySearch: (ref, receipt, h) => Refusal | SessionRef; pattern: { forwardIndexable: true; onChain: true; pattern: "native-field"; profile: string; zeroPartyRecoverable: true; }; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; recover: (input, reader) => Promise<Refusal | `0x${string}`>; reference: (input, option) => Promise<Refusal | SessionRef>; status: (ref, reader, query) => Promise<EvmBreadthStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | Json; }>

mpp/subscription/tempo. The payee broadcasts (broadcaster answers "payee" for a credential of type keyAuthorization, the one channel.kind takes): the payer's root key signs a key authorization, and the seller's server sends the activation transaction that registers its access key, and each later transfer under that key; status reads the activation, and keySearch the transfers. A credential of any other type gets mpp/not-an-opening, as bound refuses it.


tempoSplitMemo

const tempoSplitMemo: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; claims: boolean; data: PairingData; id: "mpp/charge/tempo/split-memo"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | TempoSplitRef>; status: (ref, reader, query) => Promise<TempoSplitStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/tempo/split-memo, the pull form. The payee broadcasts (broadcaster answers "payee" for a credential of type transaction): the resource server's settler broadcasts the signed transaction the credential carries. A credential of any other type gets mpp/credential-type, as bound refuses it.


tempoSplitMemoPush

const tempoSplitMemoPush: Readonly<{ advertise: (doc, h, link, offer, position, act?, agreementUrl?) => Refusal | MppChallenge[]; bound: (presented) => Promise<Refusal | `0x${string}`>; broadcaster: (presented) => Promise<Refusal | Broadcaster>; claims: boolean; data: PairingData; fetchPresented: (presented, reader) => Promise<Refusal | TempoLandedCredential>; id: "mpp/charge/tempo/split-memo/push"; landedTx: (presented) => string | undefined; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }; reference: (presented, option) => Promise<Refusal | TempoSplitRef>; status: (ref, reader, query) => Promise<TempoSplitStatus>; tie: (options) => ["mpp", { challenges: MppChallenge[]; }]; unplaced: (option) => Refusal | MppChallenge; }>

mpp/charge/tempo/split-memo/push. The payer broadcasts (broadcaster answers "payer" for a credential of type hash) and names the transaction by its hash: fetchPresented reads it, then bound reads H in its signed bytes. A credential of any other type gets mpp/credential-type, as bound refuses it.

Functions

attributionMemo()

attributionMemo(realm, challengeId, clientId?): `0x${string}`

MPP's 32-byte attribution memo: keccak256("mpp")[0..3], 0x01, keccak256(realm)[0..9], keccak256(clientId)[0..9] or ten zero bytes, then keccak256(challengeId)[0..6], each over the string's UTF-8. A string that is not well-formed is written as TextEncoder writes it, with U+FFFD for each lone surrogate. No pairing in this package calls it.

Parameters

ParameterType
realmstring
challengeIdstring
clientId?string

Returns

`0x${string}`


challengeBound()

challengeBound(c, recorded): Refusal | { h: `0x${string}`; request: {[k: string]: Json; }; }

H from an echoed challenge: its id derives from H in the form its intent and method take and equals, whole, recorded, the id the resource server recorded when it issued that challenge, else mpp/id-not-ours; its opaque names H; and its request decodes. A recorded that is not an id in a form challengeId writes, or the bare base64url of H, is mpp/input-malformed, before the credential is read.

Parameters

ParameterType
cunknown
recordedstring

Returns

Refusal | { h: `0x${string}`; request: {[k: string]: Json; }; }


checkAttribution()

checkAttribution(memo, realm, challengeId): true | Refusal

Checks a memo's tag, version, server id for realm and nonce for challengeId. The client id is not read. A realm or challengeId that is not well-formed is hashed as attributionMemo hashes it, with U+FFFD for each lone surrogate. No pairing in this package calls it.

Parameters

ParameterType
memostring
realmstring
challengeIdstring

Returns

true | Refusal


decodeCredential()

decodeCredential(fieldValue): Refusal | MppCredential

The credential a Payment credential field value carries: Payment, matched without regard to case, one or more spaces, then base64url without padding in its canonical form, of at most 65,536 bytes, that are well-formed UTF-8 of a JSON object, held to credentialShape's gate, which every MPP bound applies first. It reads a field's value, not its name: the caller holds a credential to the field its challenge selected, Authorization, or Payment-Authorization where the challenge carries header, and issuedDigest compares the header the credential echoes with the one issued. Any other value is mpp/credential-malformed, which problem answers 402 malformed-credential. Nothing else is read: H, the challenge's id and the payment are the reads of challengeBound, issuedDigest and the pairing's bound.

Parameters

ParameterType
fieldValuestring

Returns

Refusal | MppCredential


decodeReceipt()

decodeReceipt(fieldValue): Refusal | MppReceipt

The receipt a Payment-Receipt field value carries, the inverse of encodeReceipt: base64url without padding in its canonical form only, the form mppx 0.17.6's Receipt.serialize writes and the one decodeCredential reads (padded base64 is refused), of at most 65,536 bytes (MAX_HEADER_BYTES, the bound lcp applies to a header field value), measured before it decodes, of well-formed UTF-8 of one JSON object nested at most 64 levels deep, held to the receipt encodeReceipt writes: status success, a method of lowercase ASCII letters, an RFC 3339 timestamp and a string reference; every other member is kept as given. A value that does not decode so, a longer one among them, and a receipt encodeReceipt refuses, is mpp/receipt-malformed. A buyer's client reads it from a successful response; the receipt says what the seller reports, and nothing here reads the payment.

Parameters

ParameterType
fieldValuestring

Returns

Refusal | MppReceipt


encodeChallenge()

encodeChallenge(challenge): string | Refusal

One Payment challenge as a WWW-Authenticate field value: Payment, a space, then each member the challenge holds as an auth-param whose value is a quoted-string, " and \ written as quoted-pairs, joined by , , in the order id, realm, method, intent, request, description, digest, expires, header, opaque: the form mppx 0.17.6's Challenge.serialize writes. The challenge is read as its JSON form carries it, its own members only (as a pairing's build reads a chosen challenge), and each member is written as given: request and opaque stay the base64url that place and each pairing's advertise write. parseChallenges reads the value back as the same members. A challenge that is not an object, carries a refused member, lacks a string id, realm, method, intent or request or holds one empty, has another member that is not a string, has a header other than Payment-Authorization, the one value MPP allows it, holds a character no quoted-string carries (a control character other than tab, DEL, or one above U+00FF), or whose field value is over 8,192 characters, which parseChallenges refuses, is mpp/challenge-malformed. A response offering several challenges sends one WWW-Authenticate field line for each.

Parameters

ParameterType
challengeMppChallenge

Returns

string | Refusal


encodeCredential()

encodeCredential(credential): string | Refusal

A credential as a Payment credential field value, which decodeCredential reads back: Payment, a space, then base64url without padding of the UTF-8 of its JSON, in the form mppx 0.17.6's Credential.serialize writes: challenge, its own members in their order but meta, which is left out, with opaque and then request last, then payload, then source where the credential has one that is not empty, an empty source being left out. Each other member is written as given: request and opaque stay the base64url the challenge carries, and a member whose value is undefined is left out of the challenge. The client sends it in the field its challenge selects, Authorization, or Payment-Authorization where the challenge carries header. A credential credentialShape's gate refuses, one that is not then JSON (an undefined inside the payload, a function, a bigint, a non-finite number, a lone surrogate or an instance of a class), and one whose value decodeCredential refuses, over 65,536 bytes among them, is mpp/credential-malformed.

Parameters

ParameterType
credentialMppCredential

Returns

string | Refusal


encodeReceipt()

encodeReceipt(receipt): string | Refusal

A receipt as a Payment-Receipt field value: JSON.stringify of the receipt, in its own member order, as UTF-8, in base64url without padding, the form mppx 0.17.6's Receipt.serialize writes. A member whose value is undefined is left out, as JSON.stringify leaves it out, and every other member is written as given. A receipt is issued on success alone: one whose status is not success, whose method is not a method identifier (lowercase ASCII letters), whose timestamp is not an RFC 3339 date-time or whose reference is not a string, one that carries a refused member or an enumerable symbol-keyed member, and one that is not then a JSON object (no other undefined, function, bigint, non-finite number, lone surrogate or instance of a class, and at most 64 levels deep) is mpp/receipt-malformed.

Parameters

ParameterType
receiptMppReceipt

Returns

string | Refusal


evmChannelId()

evmChannelId(c): Refusal | `0x${string}`

keccak256(abi.encode(payer, payee, token, salt, authorizedSigner, escrow, chainId)); also Tempo v1's.

Parameters

ParameterType
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.chainIdnumber
c.escrow`0x${string}`
c.payee`0x${string}`
c.payer`0x${string}`
c.salt`0x${string}`
c.token`0x${string}`

Returns

Refusal | `0x${string}`


evmSessionAuthorizationNonce()

evmSessionAuthorizationNonce(c): Refusal | `0x${string}`

The nonce an mpp/session/evm opening funded by an EIP-3009 authorization signs: keccak256(abi.encode(address from, address payee, address token, bytes32 salt, address authorizedSigner)), which the escrow recomputes in openWithAuthorization before it receives the deposit. Any value that is not an address, or a salt that is not a 32-byte hash, is mpp/input-malformed.

Parameters

ParameterType
c{ authorizedSigner: `0x${string}`; from: `0x${string}`; payee: `0x${string}`; salt: `0x${string}`; token: `0x${string}`; }
c.authorizedSigner`0x${string}`
c.from`0x${string}`
c.payee`0x${string}`
c.salt`0x${string}`
c.token`0x${string}`

Returns

Refusal | `0x${string}`


hederaStockStatus()

hederaStockStatus(ref, reader, query): Promise<HederaStockStatus>

The read of a stock opening, as the profile read-status answers it at coverage none (the profile mpp/session/hedera-solana-xrpl): the transaction the credential names, by its receipt through the relay, at its one mark, finalized, every block the relay serves being final. A revert took the sender nonce it signed only where it was executed in the EVM, the mirror's contract result for the hash being CONTRACT_REVERT_EXECUTED, one that failed the node's validations before the EVM leaving the nonce as it was (HIP-844, Rationale). Such a revert is the act's own failed result, transaction-failed, where its sender signed the escrow's open to the challenge's recipient, as eth_getTransactionByHash gives the call; an open to another account consumed the opening's nonce, instrument-consumed, and so does a revert of any other call. Any other failed result, or none on the mirror, shows no nonce taken, INSUFFICIENT_GAS coming both before and in the EVM (HIP-844, Backward Compatibility), and the same signed bytes can still land under the same hash: with the value unread and the lookup not ended, it is pending, search-incomplete, never failed. A receipt that succeeded holding exactly one ChannelOpened from the escrow naming the channel, whose members give the channel id it names, is the opening: its signer is the account id the mirror resolves its payer to, or the payer's address where the mirror resolves none, an address of no account; it is the payee's own act where that account is the one the challenge's recipient resolves to; and it names the payee's account where its payee is the recipient or resolves to the same account. What moved is the deposit, its beneficiary the log's payee (no contract, the read resolving no id for the escrow), by the transaction and the log's place among the receipt's logs. Any other receipt that succeeded consumed the opening's transaction and is no opening of the channel. No receipt is not-found where the mirror holds the blocks after the position the caller gives, or is archival, and history-gap otherwise. The read reads no nonce state and makes no search, the named transaction's receipt, and for a revert its contract result, being all it reads of the opening's sender nonce; it reads the payer against no account: the caller compares the signer with the account that signed the agreement.

Parameters

Returns

Promise<HederaStockStatus>


issuedDigest()

issuedDigest(given): Promise<Refusal | `0x${string}`>

the core's digestJson over the bound members, with request decoded and its carrier removed (asIssued), and opaque decoded without the LCP members (omitted when that leaves it empty). A value that does not decode is its string. An opaque that is the object of its members, as a credential may echo it (opaqueMembers), is read by those members. A challenge of a pairing whose quote or invoice the seller writes after H is read as unplacedChallenge gives it, so that the digest covers the members fixed at issue alone.

Parameters

ParameterType
givenMppChallenge

Returns

Promise<Refusal | `0x${string}`>


keySearch()

keySearch(ref, receipt, h): Refusal | SessionRef

The read keys of a transfer made under the subscription's access key, from a receipt of the key's registration: the account whose key authorization carried h and registered the key, then accessKey with that account, the token's Transfer to the recipient's digest, and the keychain's AccessKeySpend filter for the account, the key and the token. Refused when ref carries no access key (tempo/no-access-key), when h is not a 32-byte hash (mpp/input-malformed), or when the receipt did not register the key under h.

Parameters

ParameterType
refSessionRef
receiptEvmReceipt
h`0x${string}`

Returns

Refusal | SessionRef


network()

network(challenge): string | 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

ParameterType
challengeMppChallenge

Returns

string | Refusal


pairingsOf()

pairingsOf(c): Refusal | readonly MppPairingId[]

Checks a challenge as issued (no LCP member in opaque) and names its pairings, in the order they are offered. An expires that is present must be an RFC 3339 date-time, else mpp/expires-required. Without expires, the pairings whose build writes it into what the payer signs, and the NEAR Intents and XRP Ledger charges, whose drafts require it, are left out, and a challenge left with no pairing is mpp/expires-required; a charge on the lcp method whose rail is hedera or stellar is mpp/expires-required without it, by the method's own filter. These checks are each pairing's one filter: they include every check its build, bound and reference make on the challenge alone, and those take only a challenge pairingsOfPlaced names for the pairing, refusing any other with the code these checks give it (mpp/not-this-pairing where they name only other pairings).

Parameters

ParameterType
cMppChallenge

Returns

Refusal | readonly MppPairingId[]


pairingsOfPlaced()

pairingsOfPlaced(c): readonly MppPairingId[]

The pairings a placed challenge offers: pairingsOf's checks over the challenge with the LCP members place writes allowed in its opaque, which must decode as a map of strings, so they are not read as an occupied carrier, and with the carrier the seller writes after place required where pairingsOf takes a challenge without it (the Lightning invoice). These are the pairings whose build takes the challenge and whose bound and reference take it echoed. None when the challenge does not read.

Parameters

ParameterType
cMppChallenge

Returns

readonly MppPairingId[]


parseChallenges()

parseChallenges(fieldValues): Refusal | 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

ParameterType
fieldValuesreadonly string[]

Returns

Refusal | MppChallenge[]


place()

place(doc, h, link, option, position, act?, agreementUrl?): Refusal | MppChallenge[]

A copy of doc in which the challenge whose bound members equal option carries the id derived from H at position and an opaque holding the seller's map plus legalContext, legalContextUrl and, when given, legalContextAgreementUrl. The caller gives each challenge of a sale its own position, 0 to 31, the charge and agreement challenges of the sale together; a Tempo subscription challenge takes null, its id being the bare base64url of H. A position out of that range, a number for a Tempo subscription challenge or null for any other is mpp/challenge-malformed, and a position whose id another challenge of doc already carries is mpp/position-taken. A doc holding a challenge that carries a refused member is mpp/challenge-malformed, as one holding a challenge without the required members is. act names what the challenge asks for: payment, the default, or agreement; any other value is mpp/input-malformed. An agreement challenge states expires, else mpp/expires-required: composed again for a re-challenge, it takes the position, and so the id, of the challenge it replaces.

Parameters

ParameterTypeDefault value
docreadonly MppChallenge[]undefined
h`0x${string}`undefined
linkstringundefined
optionMppChallengeundefined
positionnumber | nullundefined
actAct"payment"
agreementUrl?stringundefined

Returns

Refusal | MppChallenge[]


problem()

problem(code): object

The Payment scheme's problem type and HTTP status for a refusal code this package returns, from the scheme's Status Codes and Error Codes tables, under https://paymentauth.org/problems/:

  • 402 malformed-credential: mpp/credential-malformed, mpp/request-malformed and mpp/opaque-malformed;
  • 402 invalid-challenge: mpp/id-not-ours;
  • 500 internal-payment-error: a read to repeat, a code readToRepeat answers true for, so the seller asks again later: a reader that failed or answered out of its form (<rail>/unreadable), no landed transaction yet (<rail>/not-found), or a transaction not final yet, such as a revert above the reader's finalized mark (tempo/not-final) or one not in a validated ledger (xrpl/not-validated);
  • 500 internal-payment-error: a call that cannot read the payment, which gives the same code until the seller changes the call: a reader that is not for the network the challenge or reference names, or a ref recover cannot read (tempo/wrong-reader, svm/wrong-reader, xrpl/wrong-reader and hedera/wrong-reader), and bound or reference on a push credential before fetchPresented has read it (svm/read-first, xrpl/read-first, hedera/read-first and tempo/read-first);
  • 402 verification-failed: every other code this package returns;
  • 500 internal-payment-error: a code this package does not return. The caller answers its own codes itself.

The seller answers a 402 with a fresh challenge and a 500 with no challenge: a challenge goes out only with a 402. Neither carries Payment-Receipt.

Parameters

ParameterType
codestring

Returns

object

NameType
status402 | 500
typestring

read()

read(doc): Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: 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

ParameterType
docreadonly MppChallenge[]

Returns

Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { challenges: MppChallenge[]; }; }


sessionResume()

sessionResume(c): Refusal | { channel: string; network: string; } | null

The network and channel a session challenge names for the client to resume, spelled as the pairing's channel.ref spells it: EVM, Tempo and Hedera in methodDetails.channelId (a bytes32, lowercase), XRPL in the request's channelId (64 hex characters, upper case). Null when the challenge names no channel; refused for a challenge of no session pairing, or a channel or network that cannot be read.

Parameters

ParameterType
cMppChallenge

Returns

Refusal | { channel: string; network: string; } | null


sessionStatus()

sessionStatus(ref, reader, query): Promise<EvmBreadthStatus>

The status of an opening or a close of any of the three pairings, answered as the profile read-status does at the coverage of the pairing whose keys the ref names. The read is evmStatus's on the named logs, then, where ref.opened is present, one ChannelOpened log from opened.address naming the channel: on v2 its data word 3 (the salt) is h; on v1 the channel id recomputed from the event with salt h is the channel. A ref with opens is the EVM session's opening, read by its funding (mppSessionOpeningStatus), not by the named transaction. Where ref.closes is present, the succeeded transaction must be a call to that escrow whose calldata starts with one of EVM_CLOSE_SELECTORS and whose first argument is that channel. Where ref.accessKey.account is present, the succeeded receipt must also hold the account keychain's AccessKeySpend log naming that account, key and token. Where ref.revokes is present, the succeeded receipt must hold the account keychain's KeyRevoked log naming that account and key. A transaction that fails one of these checks (an open call for another channel, any other transaction, one sent through an ERC-4337 EntryPoint included, a call that is not the close, a missing log) is no act, and with no search for H yet answers pending search-incomplete, as evmStatus's reasons do. Settled carries the highest mark reached and the receipt's block. An opened that is not one whose address is an address, version v1 or v2, channel and h 32-byte hashes and chainId a positive integer, a closes that is not an object whose escrow is an address and channel a 32-byte hash, an accessKey that is not an object whose keyId and token are addresses, to a 32-byte hash and account, when present, an address, or a revokes that is not an object whose account and keyId are addresses, is unreadable unparseable, with no call made; so is a ref that names none of the keys the three pairings' reference, closeRef and keySearch write for the opening or the close (opens, opened, closes, revokes, an accessKey with account, or a binding log under ChannelClosed or KeyAuthorizationWitness), and a query that is not one status takes. A reader that is not an object is unreadable transport; what evmStatus reads as unreadable is unreadable for the same reason. At most four calls.

This function accepts a key of any of the three pairings. Each pairing's own status reads a ref only when it names one of the keys that pairing writes and none of the other two pairings' keys: on mpp/session/evm opens or closes; on mpp/session/tempo opened or a binding log under ChannelClosed; on mpp/subscription/tempo revokes, an accessKey with account or a binding log under KeyAuthorizationWitness. Any other ref is unreadable unparseable there, with no call made.

Parameters

ParameterType
refSessionRef & object
readerEvmReader
queryEvmQuery<SessionRef & object>

Returns

Promise<EvmBreadthStatus>


tie()

tie(options): ["mpp", { challenges: MppChallenge[]; }]

The binding slot: the distinct challenges among options, each with exactly MPP's bound members, as issued. A challenge of a pairing whose quote or invoice the seller writes after H is bound as unplacedChallenge gives it.

Parameters

ParameterType
optionsreadonly MppChallenge[]

Returns

["mpp", { challenges: MppChallenge[]; }]


toX402()

toX402(credential, token, issued): Refusal | X402Mapped

The x402 exact EIP-3009 payment and requirements of an MPP evm authorization credential or usdc EVM credential: scheme exact, network eip155:<chainId>, amount, asset and payTo the request's amount, currency and recipient, extra the token's EIP-712 name and version the caller gives, and maxTimeoutSeconds the echoed challenge's expires less issued, the Unix second at which the resource server issued the challenge, never the window the payer signed; the payload's authorization is the credential's from, to, value, validAfter, validBefore and nonce, with its signature. The echoed challenge is held to the pairing's filter as an issued one is, so it need not carry H. A credential of any other form, a Permit2 witness, a Gateway burn intent, a challenge with splits and every non-EVM form among them, is mpp/no-x402-twin; a challenge with no expires, which offers neither form, is mpp/expires-required; a payload member out of its form, or a validBefore not after validAfter, is mpp/credential-malformed; a token domain that is not two strings of 1 to 256 characters, or an issued that is not a non-negative safe integer before expires, is mpp/input-malformed. It compares nothing the payment pays with the challenge: the facilitator's verification does.

Parameters

ParameterType
credentialunknown
tokenTokenDomain
issuednumber

Returns

Refusal | X402Mapped


transferPresent()

transferPresent(ref, reader, query): Promise<MppEvmStatus>

The status of the EVM transaction and hash charges, whose data both give coverage none: the act is the transaction the reference names, which the credential carries (transaction, by the hash of its signed bytes) or names (hash). Found, it is read whole: its signer, the transaction's from, against the reference's payer and the option's payee, so that one the payee signed is no act of the payer's; what it moved, each Transfer from its signer by its log, with its token, amount and recipient, never the system emitter's log that Arc adds beside each USDC transfer; the account test, a transfer to the challenge's recipient, its token and amount compared with nothing, and for a reverted one, which moved nothing, the recipient of the transfer call that is the transaction's own; and its result, the payer's account nonce consumed by its inclusion. So a reverted one whose call pays the recipient is failed, transaction-failed, any other reverted one failed, instrument-consumed, and one that succeeded with no transfer to the recipient failed, instrument-consumed, other-account, each at the final mark, and pending, below-mark, under it. Not found, it is pending, not-found, where the reader shows it holds the history the transaction would be in: an endpoint the seller declares archival (archival), or one that answers a read at the position the caller gives; otherwise unreadable, history-gap. settled states presented: "yes", the act being the transaction the credential names.

Parameters

ParameterType
refMppNamedRef
readerMppEvmReader
queryEvmQuery<unknown>

Returns

Promise<MppEvmStatus>


usdcGatewaySalt()

usdcGatewaySalt(i): Refusal | `0x${string}`

usdc's Gateway salt: keccak256 of the JCS of the inputs with method "usdc", intent "charge", type "gateway".

Parameters

ParameterType
iGatewaySaltInput

Returns

Refusal | `0x${string}`


usdcNonce()

usdcNonce(id, realm, requestHash): Refusal | `0x${string}`

usdc's EIP-3009 nonce: keccak256 of the JCS of {id, method: "usdc", realm, intent: "charge", requestHash}, with requestHash written as 0x and 64 lowercase hex.

Parameters

ParameterType
idstring
realmstring
requestHash`0x${string}`

Returns

Refusal | `0x${string}`


usdcRequestHash()

usdcRequestHash(requestParam): Promise<Refusal | `0x${string}`>

keccak256 of the challenge's request parameter's decoded bytes, as 0x and lowercase hex. The bytes must be the RFC 8785 form of their own parse, else mpp/request-not-jcs; they are hashed as received.

Parameters

ParameterType
requestParamstring

Returns

Promise<Refusal | `0x${string}`>

References

Broadcaster

Re-exports Broadcaster


challengeH

Re-exports challengeH


challengeHash

Re-exports challengeHash


challengeId

Re-exports challengeId


ChannelKind

Re-exports ChannelKind


EvmMark

Re-exports EvmMark


EvmQuery

Re-exports EvmQuery


FETCHED

Re-exports FETCHED


HederaVoucherTypedData

Re-exports HederaVoucherTypedData

Last updated on

On this page

InterfacesChargeRefBaseExtended byPropertiesEvmLogEntryExtendsPropertiesEvmSearchReaderExtendsExtended byPropertiesMethodsblock()ParametersReturnsOverridesblockNumber()ParametersReturnsInherited fromcall()ParametersReturnsInherited fromlogs()ParametersReturnsOverridesraw()ParametersReturnsreceipt()ParametersReturnsInherited fromtransaction()ParametersReturnsInherited fromGatewayChargeChoicePropertiesGatewaySaltInputPropertiesHederaSessionUnsignedPropertiesMethodscomplete()ParametersReturnsHederaStockReaderPropertiesMethodsaccount()ParametersReturnscontractResult()ParametersReturnsoldestBlock()Returnsreceipt()ParametersReturnstransaction()ParametersReturnsHederaStockRefPropertiesLandedCredentialExtendsPropertiesLcpHederaChoicePropertiesLcpHederaLandedPropertiesLcpHederaUnsignedPropertiesMethodscomplete()ParametersReturnsLcpValidationPropertiesMppChallengePropertiesMppChoiceExtended byPropertiesMppCredentialExtended byPropertiesMppEip3009RefExtendsPropertiesMppNamedRefPropertiesMppPermit2RefExtendsPropertiesMppSessionOpeningRefExtendsPropertiesNearIntentsRefPropertiesRailSessionChoicePropertiesSeenType ParametersPropertiesSessionChoiceExtendsPropertiesSessionRefExtendsPropertiesSessionWithinPropertiesSessionWithinUnsignedPropertiesMethodscomplete()ParametersReturnsSolanaChargeChoicePropertiesSolanaChargeUnsignedPropertiesMethodscomplete()ParametersReturnsSolanaSessionChoicePropertiesSolanaSessionUnsignedPropertiesMethodscomplete()ParametersReturnsSolanaTablesCredentialExtendsPropertiesStacksChargeChoicePropertiesStripeSubscriptionReceiptPropertiesTempoLandedCredentialExtendsPropertiesTempoSplitLandedPropertiesTempoSplitRefPropertiesTokenDomainPropertiesVoucherTypedDataPropertiesX402MappedPropertiesXrplChargeChoicePropertiesXrplChargeUnsignedPropertiesMethodscomplete()ParametersReturnsXrplSessionUnsignedPropertiesMethodscomplete()ParametersReturnsType AliasesEvmMovedType DeclarationGatewayPreimageHederaNetworkHederaQueryHederaStockStatusLcpHederaRefType DeclarationLcpRailMppEvmReaderType DeclarationMppEvmStatusMppIntentMppMethodMppPairingIdMppReceiptIndexablePropertiesMppUnsignedUnion MembersType LiteralType LiteralPresentationRailSessionUnsignedReceiveTypedDataType DeclarationSessionStatusSessionUnsignedPropertiesMethodscomplete()ParametersReturnsvoucher()ParametersReturnsSignedStockQueryTempoSplitQueryTempoSplitStatusUsdcUnsignedUnion MembersType LiteralType LiteralType LiteralWithinSigningRequestXrplQueryType ParametersVariablesCARRIERchargeCardchargeLcpHederachargeNearIntentschargeSolanachargeSolanaUnsponsoredchargeStripechargeUsdcEvmchargeUsdcGatewaychargeUsdcSolanachargeUsdcStackschargeXrplevmAuthorizationevmHashevmPermit2evmTransactionLEGAL_CONTEXT_METADATA_KEYMPP_BINDINGSsessionEvmsessionHederaStocksessionSolanaMemosessionSolanaStocksessionTemposessionXrplsessionXrplStocksubscriptionSolanasubscriptionStripesubscriptionTempotempoSplitMemotempoSplitMemoPushFunctionsattributionMemo()ParametersReturnschallengeBound()ParametersReturnscheckAttribution()ParametersReturnsdecodeCredential()ParametersReturnsdecodeReceipt()ParametersReturnsencodeChallenge()ParametersReturnsencodeCredential()ParametersReturnsencodeReceipt()ParametersReturnsevmChannelId()ParametersReturnsevmSessionAuthorizationNonce()ParametersReturnshederaStockStatus()ParametersReturnsissuedDigest()ParametersReturnskeySearch()ParametersReturnsnetwork()ParametersReturnspairingsOf()ParametersReturnspairingsOfPlaced()ParametersReturnsparseChallenges()ParametersReturnsplace()ParametersReturnsproblem()ParametersReturnsread()ParametersReturnssessionResume()ParametersReturnssessionStatus()ParametersReturnstie()ParametersReturnstoX402()ParametersReturnstransferPresent()ParametersReturnsusdcGatewaySalt()ParametersReturnsusdcNonce()ParametersReturnsusdcRequestHash()ParametersReturnsReferencesBroadcasterchallengeHchallengeHashchallengeIdChannelKindEvmMarkEvmQueryFETCHEDHederaVoucherTypedData