@integraledger/lcp/mpp
The exports of @integraledger/lcp/mpp.
Interfaces
GatewaySaltInput
The inputs of usdc's Gateway salt, every one a string.
Properties
HederaSessionUnsigned
A Hedera session opening for the payer's signer: two calls broadcast in order, and the zero voucher to sign.
Properties
| Property | Type |
|---|---|
request | object |
request.calls | object[] |
request.chainId | 295 | 296 |
request.kind | "hedera-session-open" |
request.voucher | HederaVoucherTypedData |
Methods
complete()
complete(
signed):Refusal|MppCredential
Parameters
| Parameter | Type |
|---|---|
signed | { openTx: `0x${string}`; signature: `0x${string}`; } |
signed.openTx | `0x${string}` |
signed.signature | `0x${string}` |
Returns
LandedCredential
A push credential with the landed receipt's logs from the currency.
Extends
Properties
| Property | Type | Inherited from |
|---|---|---|
challenge | MppChallenge & object | MppCredential.challenge |
landed | object | - |
landed.blockNumber | bigint | - |
landed.logs | readonly EvmLog[] | - |
landed.transaction | `0x${string}` | - |
payload | object | MppCredential.payload |
source? | string | MppCredential.source |
MppChallenge
A challenge's auth-params after quoted-string unescaping. request and opaque are base64url-nopad JSON.
Properties
| Property | Type |
|---|---|
description? | string |
digest? | string |
expires? | string |
header? | string |
id? | string |
intent | string |
method | string |
opaque? | string |
realm | string |
request | string |
MppChoice
The buyer's inputs to build. No check reads them.
Extended by
Properties
| Property | Type | Description |
|---|---|---|
challenge | MppChallenge & object | - |
clientId? | string | tempo only: the payer's label in the attribution memo. |
from | `0x${string}` | - |
now | number | - |
spender? | `0x${string}` | permit2 only: the seller server's submitting address. |
tokenDomain? | object | authorization only: the token's EIP-712 name and version. |
tokenDomain.name | string | - |
tokenDomain.version | string | - |
MppCredential
Extended by
Properties
| Property | Type |
|---|---|
challenge | MppChallenge & object |
payload | object |
source? | string |
RailSessionChoice
The buyer's inputs to a session opening's build. The deposit and the XRPL channel terms are the funder's.
Properties
| Property | Type |
|---|---|
challenge | MppChallenge & object |
deposit | bigint |
from | string |
now | number |
xrpl? | object |
xrpl.cancelAfter? | number |
xrpl.fee | string |
xrpl.lastLedgerSequence | number |
xrpl.publicKey | string |
xrpl.sequence | number |
xrpl.settleDelay | number |
SessionChoice
The buyer's inputs to build. No check reads them.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
authorizedSigner? | `0x${string}` | sessions: default the zero address, which means the payer. | - |
challenge | MppChallenge & object | - | MppChoice.challenge |
clientId? | string | tempo only: the payer's label in the attribution memo. | MppChoice.clientId |
credentialType? | "authorization" | "permit2" | "hash" | EVM: default the first listed type. | - |
deposit? | bigint | sessions: the buyer's deposit; suggestedDeposit is advice. | - |
from | `0x${string}` | - | MppChoice.from |
now | number | - | MppChoice.now |
spender? | `0x${string}` | permit2 only: the seller server's submitting address. | MppChoice.spender |
tokenDomain? | object | authorization only: the token's EIP-712 name and version. | MppChoice.tokenDomain |
tokenDomain.name | string | - | - |
tokenDomain.version | string | - | - |
SessionRef
The settlement read keys of these pairings.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
accessKey? | object | The subscription's access key: its id, the token it spends, and transferDigest({to: recipient}). With account, the read keys of a transfer made under the key for that account. | - |
accessKey.account? | `0x${string}` | - | - |
accessKey.keyId | `0x${string}` | - | - |
accessKey.to | `0x${string}` | - | - |
accessKey.token | `0x${string}` | - | - |
bindingLog? | { address: `0x${string}`; topic0: `0x${string}`; value: `0x${string}`; } & ({ index: 2 | 1 | 3; } | { dataWord: number; }) | The log carrying H or its commitment: in topic index, or in 32-byte data word dataWord. | EvmRef.bindingLog |
closes? | object | The close of an EVM session: a call to escrow of one of EVM_CLOSE_SELECTORS naming channel. | - |
closes.channel | `0x${string}` | - | - |
closes.escrow | `0x${string}` | - | - |
network | `eip155:${string}` | HederaNetwork | - | EvmRef.network |
opened? | object | - | - |
opened.address | `0x${string}` | - | - |
opened.chainId | number | - | - |
opened.channel | `0x${string}` | - | - |
opened.h | `0x${string}` | - | - |
opened.version | "v1" | "v2" | - | - |
search? | object | The log filter that finds the transaction when none is named; absent, only a named transaction is read. | EvmRef.search |
search.address | `0x${string}` | - | - |
search.topics | readonly (`0x${string}` | null)[] | - | - |
settleBy? | string | Decimal Unix seconds after which the payment can no longer execute. | EvmRef.settleBy |
transaction? | `0x${string}` | The transaction the credential presents, where the payer broadcast the opening before the claim. | - |
transferLog? | object | The token transfer this payment made, identified by the digest of the named fields. | EvmRef.transferLog |
transferLog.address | `0x${string}` | - | - |
transferLog.digest | `0x${string}` | - | - |
transferLog.identity | TransferIdentity | - | - |
transferLog.topic0 | `0x${string}` | - | - |
SessionWithin
The buyer's inputs to an in-channel payment: the within 402's challenge, echoed as given; the held opening, exactly as signed; the cumulative amount to sign; and the action.
Properties
| Property | Type |
|---|---|
action | "close" | "voucher" |
challenge | MppChallenge & object |
cumulativeAmount | bigint |
opening | MppCredential |
SessionWithinUnsigned
One signing request; complete takes its one signature and returns the in-channel credential.
Properties
| Property | Type |
|---|---|
requests | readonly WithinSigningRequest[] |
Methods
complete()
complete(
signatures):Refusal|MppCredential
Parameters
| Parameter | Type |
|---|---|
signatures | readonly string[] |
Returns
SolanaChargeChoice
The buyer's inputs to build. The request's decimals, tokenProgram and recentBlockhash win when present.
Properties
| Property | Type |
|---|---|
challenge | MppChallenge & object |
computeUnitLimit? | number |
computeUnitPrice? | bigint |
decimals? | number |
payer | string |
recentBlockhash? | string |
tokenProgram? | string |
SolanaChargeUnsigned
Properties
Methods
complete()
complete(
signature):Refusal|MppCredential
The payer's 64-byte Ed25519 signature over message.
Parameters
| Parameter | Type |
|---|---|
signature | Uint8Array |
Returns
SolanaSessionUnsigned
The values a Solana channel client composes the open from; complete takes the composed open payload.
Properties
| Property | Type |
|---|---|
request | object |
request.channelProgram | string |
request.kind | "solana-session-open" |
request.network | `solana:${string}` |
request.recentBlockhash | string |
request.recentSlot | bigint |
request.salt | bigint |
Methods
complete()
complete(
open):Refusal|MppCredential
Parameters
| Parameter | Type |
|---|---|
open | {[k: string]: Json; } |
Returns
StacksChargeChoice
The buyer's inputs to the Stacks build: the chosen challenge and the payer's c32 standard principal.
Properties
| Property | Type |
|---|---|
challenge | MppChallenge & object |
from | string |
StellarChargeChoice
The buyer's inputs to build: the buyer's simulated transaction and its ledger and clock readings.
Properties
| Property | Type |
|---|---|
challenge | MppChallenge & object |
currentLedger | number |
now | number |
simulatedXdr | string |
StellarChargeUnsigned
Properties
Methods
complete()
complete(
signature):Refusal|MppCredential
The payer's Ed25519 signature over SHA-256 of preimage.
Parameters
| Parameter | Type |
|---|---|
signature | Uint8Array |
Returns
StripeSubscriptionReceipt
The Stripe subscription's activation receipt, the Payment-Receipt payload decoded from its base64url JSON (or the
MCP transport's receipt object as given). The seller passes it when it reports the opening paid.
Properties
VoucherTypedData
Properties
XrplChargeChoice
The buyer's inputs to build: the paying account and the buyer's own reads of fee, sequence and ledger.
Properties
| Property | Type |
|---|---|
account | string |
challenge | MppChallenge & object |
fee | string |
lastLedgerSequence | number |
sequence | number |
XrplChargeUnsigned
Properties
| Property | Type |
|---|---|
request | object |
request.kind | "xrpl-tx" |
request.txJson | XrplTxJson |
Methods
complete()
complete(
signedBlob):Refusal|MppCredential
The wallet's signed blob, hex.
Parameters
| Parameter | Type |
|---|---|
signedBlob | string |
Returns
XrplSessionUnsigned
An XRPL PaymentChannelCreate for the wallet to sign, and the first claim's bytes.
Properties
| Property | Type |
|---|---|
request | object |
request.claim | object |
request.claim.bytes | Uint8Array |
request.claim.channelId | string |
request.claim.drops | bigint |
request.kind | "xrpl-session-open" |
request.txJson | XrplTxJson |
Methods
complete()
complete(
signed):Promise<Refusal|MppCredential>
Parameters
| Parameter | Type |
|---|---|
signed | { claimSignature: string; signedBlob: string; } |
signed.claimSignature | string |
signed.signedBlob | string |
Returns
Promise<Refusal | MppCredential>
Type Aliases
GatewayPreimage
GatewayPreimage =
Pick<GatewaySaltInput,"id"|"realm"|"requestHash"|"recipient">
The salt's inputs a Gateway signing request carries from the chosen challenge.
HederaLandedCredential
HederaLandedCredential =
LandedCredential
A Hedera session opening with the landed receipt's logs from the escrow.
MppIntent
MppIntent =
"charge"|"session"|"subscription"
MppMethod
MppMethod =
"evm"|"tempo"|"solana"|"lightning"|"card"|"stripe"|"usdc"|"nearintents"|"stellar"|"xrpl"|"hedera"
MppPairing
MppPairing =
"mpp/charge/evm/permit2"|"mpp/charge/evm/authorization"|"mpp/charge/evm/transaction"|"mpp/charge/evm/hash"|"mpp/charge/tempo/memo"|"mpp/charge/tempo/push"|"mpp/session/evm"|"mpp/session/tempo"|"mpp/subscription/tempo"|"mpp/charge/lightning"|"mpp/session/lightning"|"mpp/charge/hedera"|"mpp/charge/solana"|"mpp/charge/stellar"|"mpp/charge/xrpl"|"mpp/charge/nearintents"|"mpp/session/hedera"|"mpp/session/solana"|"mpp/session/xrpl"|"mpp/charge/card"|"mpp/charge/stripe"|"mpp/subscription/stripe"|"mpp/charge/usdc/evm"|"mpp/charge/usdc/solana"|"mpp/charge/usdc/stacks"|"mpp/charge/usdc/gateway"
Every MPP pairing pairingsOf can name.
MppUnsigned
MppUnsigned = {
request: {kind:"eip712";typedData:Eip3009TypedData|Permit2TypedData; };complete:Refusal|MppCredential; } | {request: {broadcast:boolean;call: {data:Hex;to:Hex; };chainId:number;kind:"tempo-call";validBefore:number; };complete:Refusal|MppCredential; } | {request: {broadcast:boolean;call: {data:Hex;to:Hex; };chainId:number;kind:"evm-call"; };complete:Refusal|MppCredential; }
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: "tempo-call"; validBefore: number; }; complete: Refusal | MppCredential; }
| Name | Type | Description |
|---|---|---|
request | object | push: the buyer's signer broadcasts, and complete takes the transaction hash. |
request.broadcast | boolean | - |
request.call | object | - |
request.call.data | Hex | - |
request.call.to | Hex | - |
request.chainId | number | - |
request.kind | "tempo-call" | - |
request.validBefore | number | - |
complete() | (signedTxOrHash) => Refusal | MppCredential | - |
Type Literal
{ request: { broadcast: boolean; call: { data: Hex; to: Hex; }; chainId: number; kind: "evm-call"; }; complete: Refusal | MppCredential; }
| Name | Type | Description |
|---|---|---|
request | object | An EIP-1559 transaction of the call, or its hash once broadcast. |
request.broadcast | boolean | - |
request.call | object | - |
request.call.data | Hex | - |
request.call.to | Hex | - |
request.chainId | number | - |
request.kind | "evm-call" | - |
complete() | (signedTxOrHash) => Refusal | MppCredential | - |
RailSessionUnsigned
RailSessionUnsigned =
HederaSessionUnsigned|SolanaSessionUnsigned|XrplSessionUnsigned
SessionStatus
SessionStatus =
EvmBreadthStatus| {state:"pending";why:"not-a-close"; }
SessionUnsigned
SessionUnsigned =
object
Properties
| Property | Type |
|---|---|
funding | { kind: "eip712"; typedData: ReceiveTypedData | Permit2TypedData; } | { broadcast: true; calls: object[]; chainId: number; kind: "evm-calls"; } | { broadcast: false; call: { data: Hex; to: Hex; }; chainId: number; kind: "tempo-call"; validBefore: number; } |
Methods
complete()
complete(
funded,voucherSignature):Refusal|MppCredential
Parameters
| Parameter | Type |
|---|---|
funded | `0x${string}` |
voucherSignature | `0x${string}` |
Returns
voucher()
voucher(
funded):Refusal|VoucherTypedData
funded: the funding signature, transaction hash or signed 0x76 transaction.
Parameters
| Parameter | Type |
|---|---|
funded | `0x${string}` |
Returns
UsdcUnsigned
UsdcUnsigned = {
request: {kind:"eip712";typedData:Eip3009TypedData; };complete:Refusal|MppCredential; } | {request: {anchorMode:"onChainOnly";args: {amount:string;memo:AtrHash;recipient:string;sender:string; };contract:string;functionName:"transfer";kind:"stacks-contract-call";postCondition:"SentEq";postConditionMode:"deny"; };complete:Refusal|MppCredential; } | {request: {kind:"gateway-burn-intent";preimage:GatewayPreimage; };complete:Refusal|MppCredential; }
What the signer is handed for each usdc profile, and how its answer completes the credential.
WithinSigningRequest
WithinSigningRequest = {
kind:"eip712";typedData:VoucherTypedData|HederaVoucherTypedData; } | {kind:"ed25519-raw";message:Uint8Array;signer:string; } | {bytes:Uint8Array;channelId:string;drops:bigint;kind:"xrpl-claim"; }
A request to the buyer's signer for an in-channel payment.
Variables
CARRIER
constCARRIER: { readonly [i in MppIntent]: { readonly [m in MppMethod]?: readonly string[] | null } }
The request member a pairing writes H into, by intent and method; null where no request member carries it. usdc
carries H in a request member only on its Solana profile (USDC_CARRIER).
chargeCard
constchargeCard:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (_choice,_h) =>Promise<Refusal>;carrier:string;claims:boolean;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: (c) =>MppChallenge; }>
chargeNearIntents
constchargeNearIntents:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (credential) =>Promise<`0x${string}`|Refusal>;carrier:"request.externalId";claims:boolean;id:"mpp/charge/nearintents";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
chargeSolana
constchargeSolana:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SolanaChargeUnsigned>;carrier:"request.externalId";claims:boolean;fetchPresented: (credential,reader) =>Promise<Refusal|MppCredential>;id:"mpp/charge/solana";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<SvmRef,"fromSlot">>;status: (ref,reader) =>Promise<SvmStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
chargeStellar
constchargeStellar:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|StellarChargeUnsigned>;carrier:"request.recipient";claims:boolean;fetchPresented: (credential,reader) =>Promise<Refusal|MppCredential>;id:"mpp/charge/stellar";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|StellarRef>;status: (ref,reader) =>Promise<StellarStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
chargeStripe
constchargeStripe:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (_choice,_h) =>Promise<Refusal>;carrier:string;claims:boolean;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: (c) =>MppChallenge; }>
chargeUsdcEvm
constchargeUsdcEvm:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|UsdcUnsigned>;carrier:null;claims:boolean;id:"mpp/charge/usdc/evm";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
chargeUsdcGateway
constchargeUsdcGateway:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal| {request: {kind:"gateway-burn-intent";preimage:GatewayPreimage; };complete:Refusal|MppCredential; }>;carrier:null;claims:boolean;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) =>MppChallenge; }>
chargeUsdcSolana
constchargeUsdcSolana:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SolanaChargeUnsigned>;carrier:"request.externalId";claims:boolean;id:"mpp/charge/usdc/solana";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<SvmRef,"fromSlot">>;status: (ref,reader) =>Promise<SvmStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
chargeUsdcStacks
constchargeUsdcStacks:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal| {request: {anchorMode:"onChainOnly";args: {amount:string;memo:`0x${string}`;recipient:string;sender:string; };contract:string;functionName:"transfer";kind:"stacks-contract-call";postCondition:"SentEq";postConditionMode:"deny"; };complete:Refusal|MppCredential; }>;carrier:null;claims:boolean;id:"mpp/charge/usdc/stacks";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|StacksRef>;status: (ref,reader) =>Promise<StacksStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
chargeXrpl
constchargeXrpl:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|XrplChargeUnsigned>;carrier:"request.methodDetails.invoiceId";claims:boolean;fetchPresented: (credential,reader) =>Promise<Refusal|MppCredential>;id:"mpp/charge/xrpl";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<XrplRef,"fromLedger">>;status: (ref,reader) =>Promise<XrplStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
EVM_CLOSE_SELECTORS
constEVM_CLOSE_SELECTORS: readonly ["0x0d65c51d","0x79d35ded","0x8e19899e"]
The EVM session escrow's functions that finalize a channel, each taking the channel id as its first argument:
close(bytes32,uint128,bytes), closeWithAuthorization(bytes32,uint128,uint256,uint256,bytes,bytes) and
withdraw(bytes32).
evmAuthorization
constevmAuthorization:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/authorization";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
evmHash
constevmHash:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (presented) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/hash";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (presented) =>Promise<Refusal|EvmRef&object>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
evmPermit2
constevmPermit2:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/permit2";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
evmTransaction
constevmTransaction:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (presented) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/transaction";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (presented) =>Promise<Refusal|EvmRef&object>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
LEGAL_CONTEXT_METADATA_KEY
constLEGAL_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
constMPP_BINDINGS: readonly [Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/authorization";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/permit2";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (presented) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/transaction";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (presented) =>Promise<Refusal|EvmRef&object>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (presented) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/evm/hash";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (presented) =>Promise<Refusal|EvmRef&object>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/tempo/memo";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;fetchPresented: (presented,reader) =>Promise<Refusal|LandedCredential>;id:"mpp/charge/tempo/push";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;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;id:"mpp/session/evm";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|SessionRef>;status: (ref,reader) =>Promise<SessionStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (input) =>Promise<`0x${string}`|Refusal>;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;id:"mpp/session/tempo";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|SessionRef>;status: (ref,reader) =>Promise<SessionStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|KeyAuthorizationUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;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;id:"mpp/subscription/tempo";keyProves:string;keySearch: (ref,receipt,h) =>Refusal|SessionRef;pattern: {buyerSigns:true;canonical:true;forwardIndexable:true;onChain:true;pattern:"native-field";proves:string;publicProof:true;zeroPartyRecoverable:true; };read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|SessionRef>;status: (ref,reader) =>Promise<SessionStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];advertiseBeforeCarrier: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (presented) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|LnMppUnsigned>;carrier:string;claims:boolean;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) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];advertiseBeforeCarrier: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (presented) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|LnMppUnsigned>;carrier:string;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (presented) =>"open"|"close"|Refusal|"within";ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (_presented) =>number|undefined; }>;claims:boolean;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) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (credentialChallenge,request,c) =>Promise<Refusal|HederaUnsigned>;carrier:"challenge";claims:boolean;fetchPresented: (input,reader,defaultNetwork?) =>Promise<Refusal|HederaLandedCharge>;id:"mpp/charge/hedera";landedTx: (presented) =>string|undefined;network: (request,defaultNetwork?) =>Refusal|HederaNetwork;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|HederaRef>;status: (ref,reader) =>Promise<HederaStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SolanaChargeUnsigned>;carrier:"request.externalId";claims:boolean;fetchPresented: (credential,reader) =>Promise<Refusal|MppCredential>;id:"mpp/charge/solana";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<SvmRef,"fromSlot">>;status: (ref,reader) =>Promise<SvmStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|StellarChargeUnsigned>;carrier:"request.recipient";claims:boolean;fetchPresented: (credential,reader) =>Promise<Refusal|MppCredential>;id:"mpp/charge/stellar";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|StellarRef>;status: (ref,reader) =>Promise<StellarStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|XrplChargeUnsigned>;carrier:"request.methodDetails.invoiceId";claims:boolean;fetchPresented: (credential,reader) =>Promise<Refusal|MppCredential>;id:"mpp/charge/xrpl";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<XrplRef,"fromLedger">>;status: (ref,reader) =>Promise<XrplStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (credential) =>Promise<`0x${string}`|Refusal>;carrier:"request.externalId";claims:boolean;id:"mpp/charge/nearintents";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|HederaSessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (p) =>Refusal|Kind;ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (_p) =>number|undefined; }>;claims:true;closeRef: (chosen,channel) =>Refusal|Omit<HederaCloseRef,"transaction">;fetchPresented: (presented,reader) =>Promise<Refusal|LandedCredential>;id:"mpp/session/hedera";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|HederaSessionRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SolanaSessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (input) =>Promise<`0x${string}`|Refusal>;kind: (p) =>Refusal|Kind;ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (_p) =>number|undefined; }>;claims:true;closeRef: (chosen,channel) =>Refusal|Omit<SvmCloseRef,"transaction">;id:"mpp/session/solana";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|Omit<SvmRef,"fromSlot">>;status: (ref,reader) =>Promise<SvmStatus|SvmCloseStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|XrplSessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (p) =>Refusal|Kind;ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (presented) =>number|undefined; }>;claims:true;closeRef: (chosen,channel) =>Refusal|Omit<XrplCloseRef,"transaction">;id:"mpp/session/xrpl";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<XrplRef,"expect"|"fromLedger">>;status: (ref,reader) =>Promise<XrplStatus|XrplCloseStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (_choice,_h) =>Promise<Refusal>;carrier:string;claims:boolean;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: (c) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (_choice,_h) =>Promise<Refusal>;carrier:string;claims:boolean;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: (c) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (_choice,_h) =>Promise<Refusal>;carrier:string;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (_presented) =>"open";ref: (_presented,receipt?) =>Promise<Refusal| {channel:string;network:string; }>;until: (_presented) =>number|undefined; }>;claims:boolean;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: (c) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|UsdcUnsigned>;carrier:null;claims:boolean;id:"mpp/charge/usdc/evm";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SolanaChargeUnsigned>;carrier:"request.externalId";claims:boolean;id:"mpp/charge/usdc/solana";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<SvmRef,"fromSlot">>;status: (ref,reader) =>Promise<SvmStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal| {request: {anchorMode:"onChainOnly";args: {amount:string;memo:`0x${string}`;recipient:string;sender:string; };contract:string;functionName:"transfer";kind:"stacks-contract-call";postCondition:"SentEq";postConditionMode:"deny"; };complete:Refusal|MppCredential; }>;carrier:null;claims:boolean;id:"mpp/charge/usdc/stacks";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|StacksRef>;status: (ref,reader) =>Promise<StacksStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>,Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal| {request: {kind:"gateway-burn-intent";preimage:GatewayPreimage; };complete:Refusal|MppCredential; }>;carrier:null;claims:boolean;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) =>MppChallenge; }>]
Every MPP pairing this entry point implements.
sessionEvm
constsessionEvm:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;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;id:"mpp/session/evm";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|SessionRef>;status: (ref,reader) =>Promise<SessionStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
sessionHedera
constsessionHedera:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|HederaSessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (p) =>Refusal|Kind;ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (_p) =>number|undefined; }>;claims:true;closeRef: (chosen,channel) =>Refusal|Omit<HederaCloseRef,"transaction">;fetchPresented: (presented,reader) =>Promise<Refusal|LandedCredential>;id:"mpp/session/hedera";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|HederaSessionRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
sessionSolana
constsessionSolana:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SolanaSessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (input) =>Promise<`0x${string}`|Refusal>;kind: (p) =>Refusal|Kind;ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (_p) =>number|undefined; }>;claims:true;closeRef: (chosen,channel) =>Refusal|Omit<SvmCloseRef,"transaction">;id:"mpp/session/solana";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|Omit<SvmRef,"fromSlot">>;status: (ref,reader) =>Promise<SvmStatus|SvmCloseStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
sessionTempo
constsessionTempo:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|SessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (input) =>Promise<`0x${string}`|Refusal>;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;id:"mpp/session/tempo";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|SessionRef>;status: (ref,reader) =>Promise<SessionStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
sessionXrpl
constsessionXrpl:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|XrplSessionUnsigned>;buildWithin: (w,h) =>Promise<Refusal|SessionWithinUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (p) =>Refusal|Kind;ref: (presented) =>Promise<Refusal| {channel:string;network:string; }>;until: (presented) =>number|undefined; }>;claims:true;closeRef: (chosen,channel) =>Refusal|Omit<XrplCloseRef,"transaction">;id:"mpp/session/xrpl";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|Omit<XrplRef,"expect"|"fromLedger">>;status: (ref,reader) =>Promise<XrplStatus|XrplCloseStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>MppChallenge; }>
subscriptionStripe
constsubscriptionStripe:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (_choice,_h) =>Promise<Refusal>;carrier:string;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;kind: (_presented) =>"open";ref: (_presented,receipt?) =>Promise<Refusal| {channel:string;network:string; }>;until: (_presented) =>number|undefined; }>;claims:boolean;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: (c) =>MppChallenge; }>
subscriptionTempo
constsubscriptionTempo:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|KeyAuthorizationUnsigned>;channel:Readonly<{boundWithin: (_presented) =>Promise<`0x${string}`|Refusal>;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;id:"mpp/subscription/tempo";keyProves:string;keySearch: (ref,receipt,h) =>Refusal|SessionRef;pattern: {buyerSigns:true;canonical:true;forwardIndexable:true;onChain:true;pattern:"native-field";proves:string;publicProof:true;zeroPartyRecoverable:true; };read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };recover: (ref,reader) =>Promise<`0x${string}`|Refusal>;reference: (input) =>Promise<Refusal|SessionRef>;status: (ref,reader) =>Promise<SessionStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
tempoMemo
consttempoMemo:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;id:"mpp/charge/tempo/memo";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
tempoPush
consttempoPush:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|MppChallenge[];bound: (input) =>Promise<`0x${string}`|Refusal>;build: (choice,h) =>Promise<Refusal|MppUnsigned>;claims:boolean;fetchPresented: (presented,reader) =>Promise<Refusal|LandedCredential>;id:"mpp/charge/tempo/push";landedTx: (presented) =>string|undefined;pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {challenges:MppChallenge[]; }; };reference: (input) =>Promise<Refusal|EvmRef>;status: (ref,reader) =>Promise<EvmBreadthStatus>;tie: (options) => ["mpp", {challenges:MppChallenge[]; }];unplaced: (option) =>Json; }>
USDC_CARRIER
constUSDC_CARRIER:object
The request member usdc writes H into, by methodDetails.type; null where no request member carries it.
Index Signature
[profile: string]: readonly string[] | null
Functions
attributionMemo()
attributionMemo(
realm,challengeId,clientId?):`0x${string}`
MPP's 32-byte attribution memo: keccak256("mpp")[0..3], 0x01, keccak256(realm)[0..9], keccak256(clientId)[0..9]
or ten zero bytes, then keccak256(challengeId)[0..6], each over the string's UTF-8.
Parameters
| Parameter | Type |
|---|---|
realm | string |
challengeId | string |
clientId? | string |
Returns
`0x${string}`
challengeBound()
challengeBound(
c):Refusal| {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, its opaque names H, and
its request decodes.
Parameters
| Parameter | Type |
|---|---|
c | unknown |
Returns
Refusal | { h: `0x${string}`; request: {[k: string]: Json; }; }
challengeH()
challengeH(
id):`0x${string}`|Refusal
H from an id challengeId wrote, or from the bare base64url of H; anything else is mpp/id-not-ours.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
`0x${string}` | Refusal
challengeHash()
challengeHash(
id,realm):`0x${string}`
keccak256(UTF-8(id) ‖ UTF-8(realm)), lowercase: Solidity's abi.encodePacked(string, string).
Parameters
| Parameter | Type |
|---|---|
id | string |
realm | string |
Returns
`0x${string}`
challengeId()
challengeId(
h,index):string|Refusal
base64url, without padding, of H's 32 bytes, then . and the challenge's position (0 to 31).
Parameters
| Parameter | Type |
|---|---|
h | `0x${string}` |
index | number |
Returns
string | Refusal
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.
Parameters
| Parameter | Type |
|---|---|
memo | string |
realm | string |
challengeId | string |
Returns
true | Refusal
evmChannelId()
evmChannelId(
c):`0x${string}`|Refusal
keccak256(abi.encode(payer, payee, token, salt, authorizedSigner, escrow, chainId)); also Tempo v1's.
Parameters
| Parameter | Type |
|---|---|
c | { authorizedSigner: `0x${string}`; chainId: number; escrow: `0x${string}`; payee: `0x${string}`; payer: `0x${string}`; salt: `0x${string}`; token: `0x${string}`; } |
c.authorizedSigner | `0x${string}` |
c.chainId | number |
c.escrow | `0x${string}` |
c.payee | `0x${string}` |
c.payer | `0x${string}` |
c.salt | `0x${string}` |
c.token | `0x${string}` |
Returns
`0x${string}` | Refusal
gatewayAccount()
gatewayAccount(
network,word):string|undefined
CAIP-10 of a TransferSpec bytes32 account on network: on eip155:* the last 20 bytes as 0x lowercase hex, the
first 12 being zero; on solana:* base58 of the 32 bytes. Anything else is undefined.
Parameters
| Parameter | Type |
|---|---|
network | string |
word | unknown |
Returns
string | undefined
issuedDigest()
issuedDigest(
c):Promise<`0x${string}`|Refusal>
the core's digestJson over the bound members, with request decoded and its carrier member removed, and opaque
decoded without the LCP members (omitted when that leaves it empty). A value that does not decode is its string.
Parameters
| Parameter | Type |
|---|---|
c | MppChallenge |
Returns
Promise<`0x${string}` | Refusal>
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 (keyAccount), then accessKey with that
account, the token's Transfer to the recipient's digest, and the keychain's AccessKeySpend filter for the account,
the key and the token. Refused when ref carries no access key, or the receipt did not register it under h.
Parameters
| Parameter | Type |
|---|---|
ref | SessionRef |
receipt | EvmReceipt |
h | `0x${string}` |
Returns
mppSvmCarrier()
mppSvmCarrier(
tx):Refusal| {h:`0x${string}`;memo:string; }
The one top-level Memo instruction (v3 or v4) whose UTF-8 data parses as an LCP string, and its hash. Memo
instructions whose data is not an LCP string are not read. None is svm/no-carrier; more than one svm/memo-count.
Parameters
| Parameter | Type |
|---|---|
tx | SvmTx |
Returns
Refusal | { h: `0x${string}`; memo: string; }
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
| Parameter | Type |
|---|---|
challenge | MppChallenge |
Returns
string | Refusal
pairingsOf()
pairingsOf(
c):Refusal| readonlyMppPairing[]
Checks a challenge as issued (no LCP member in opaque) and names its pairings, in the order they are offered.
Parameters
| Parameter | Type |
|---|---|
c | MppChallenge |
Returns
Refusal | readonly MppPairing[]
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
| Parameter | Type |
|---|---|
fieldValues | readonly string[] |
Returns
Refusal | MppChallenge[]
place()
place(
doc,h,link,option,agreementUrl?):Refusal|MppChallenge[]
A copy of doc in which the challenge whose bound members equal option carries the id derived from H and an
opaque holding the seller's map plus legalContext, legalContextUrl and, when given, legalContextAgreementUrl.
A Tempo subscription challenge's id is the bare base64url of H.
Parameters
| Parameter | Type |
|---|---|
doc | readonly MppChallenge[] |
h | `0x${string}` |
link | string |
option | MppChallenge |
agreementUrl? | string |
Returns
Refusal | MppChallenge[]
problem()
problem(
code):object
The MPP problem type and status for a refusal code.
Parameters
| Parameter | Type |
|---|---|
code | string |
Returns
object
| Name | Type |
|---|---|
status | 402 | 500 |
type | string |
read()
read(
doc):Refusal| {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
| Parameter | Type |
|---|---|
doc | readonly 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), Solana in
methodDetails.channelId (a base58 address), XRPL in the request's channelId (64 hex characters, upper case). Null
when the challenge names no channel; refused for a challenge of no session pairing, or a channel or network that
cannot be read.
Parameters
| Parameter | Type |
|---|---|
c | MppChallenge |
Returns
Refusal | { channel: string; network: string; } | null
sessionStatus()
sessionStatus(
ref,reader):Promise<SessionStatus>
evmStatus on the named logs, then, where ref.opened is present, one ChannelOpened log from opened.address
naming the channel: on v2 its data word 3 (the salt) is h; on v1 the channel id recomputed from the event with
salt h is the channel. Where ref.closes is present, the succeeded transaction must be a call to that escrow whose
calldata starts with one of EVM_CLOSE_SELECTORS and whose first argument is that channel, else pending
not-a-close. Where ref.accessKey.account is present, the succeeded receipt must also hold the account keychain's
AccessKeySpend log naming that account, key and token, else failed binding-log-not-found. At most four calls.
Parameters
| Parameter | Type |
|---|---|
ref | SessionRef & object |
reader | EvmReader |
Returns
Promise<SessionStatus>
tie()
tie(
options): ["mpp", {challenges:MppChallenge[]; }]
The binding slot: the distinct challenges among options, each with exactly MPP's bound members, as issued.
Parameters
| Parameter | Type |
|---|---|
options | readonly MppChallenge[] |
Returns
["mpp", { challenges: MppChallenge[]; }]
transferPresent()
transferPresent(
ref,reader):Promise<EvmBreadthStatus>
evmStatus on the reported transaction with no named log; settled also requires one log from ref.asset with three
topics and topics[0] = Transfer, else failed transfer-not-found. At most three calls.
Parameters
Returns
Promise<EvmBreadthStatus>
usdcGatewaySalt()
usdcGatewaySalt(
i):`0x${string}`|Refusal
usdc's Gateway salt: keccak256 of the JCS of the inputs with method "usdc", intent "charge", type "gateway".
Parameters
| Parameter | Type |
|---|---|
i | GatewaySaltInput |
Returns
`0x${string}` | Refusal
usdcNonce()
usdcNonce(
id,realm,requestHash):`0x${string}`|Refusal
usdc's EIP-3009 nonce: keccak256 of the JCS of {id, method: "usdc", realm, intent: "charge", requestHash}, with
requestHash written as 0x and 64 lowercase hex.
Parameters
| Parameter | Type |
|---|---|
id | string |
realm | string |
requestHash | `0x${string}` |
Returns
`0x${string}` | Refusal
usdcRequestHash()
usdcRequestHash(
requestParam):Promise<`0x${string}`|Refusal>
keccak256 of the challenge's request parameter's decoded bytes, as 0x and lowercase hex. The bytes must be the
RFC 8785 form of their own parse, else mpp/request-not-jcs; they are hashed as received.
Parameters
| Parameter | Type |
|---|---|
requestParam | string |
Returns
Promise<`0x${string}` | Refusal>
References
chargeHedera
Re-exports chargeHedera
pairingsOfPlaced
Re-exports pairingsOfPlaced
ReceiveTypedData
Re-exports ReceiveTypedData
Last updated on