Skip to content
Integra Protocol
API

@integraledger/lcp/ack

The exports of @integraledger/lcp/ack.

Interfaces

AckBody

The 402 body.

Properties

PropertyType
legalContextJson
paymentRequest?Json
paymentRequestTokenstring

AckPaymentOption

An ACK payment option as the seller wrote it.

Indexable

[k: string]: Json

Properties

PropertyType
idstring

AckValues

What the seller's stack places: the Payment Request's id, and the legal context beside the request, with the agreement URL after the link when one is given.

Properties

PropertyType
legalContextobject
legalContext.legalContextAgreementUrl?string
legalContext.legalContextUrlstring
legalContext.type"sha256"
legalContext.value`0x${string}`
paymentRequestIdstring

Variables

paymentRequest

const paymentRequest: Readonly<{ advertise: (_doc, h, link, offer, agreementUrl?) => Refusal | AckValues; bound: (_presented) => Promise<Refusal>; build: (_doc, _h) => Promise<Refusal>; claims: boolean; id: "ack/payment-request"; pattern: LcpPattern; read: (doc) => Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { options: readonly Json[]; }; }; tie: (options) => ["ack", { paymentOptions: readonly AckPaymentOption[]; }]; unplaced: (option) => AckPaymentOption; }>

Functions

fromReceipt()

fromReceipt(credentialSubject): `0x${string}` | Refusal

The hash in a receipt: the id of the Payment Request token embedded in its credentialSubject. Verifies nothing; a party calls it on a receipt it has verified.

Parameters

ParameterType
credentialSubjectunknown

Returns

`0x${string}` | Refusal


tie()

tie(options): ["ack", { paymentOptions: readonly AckPaymentOption[]; }]

The binding slot: the Payment Request's options exactly as issued.

Parameters

ParameterType
optionsreadonly AckPaymentOption[]

Returns

["ack", { paymentOptions: readonly AckPaymentOption[]; }]

Last updated on

On this page