@integraledger/lcp/acp
The exports of @integraledger/lcp/acp.
Interfaces
AcpBinding
Type Parameters
| Type Parameter |
|---|
Id extends string |
Properties
| Property | Type |
|---|---|
claims | boolean |
id | Id |
pattern | LcpPattern |
tie | (options) => ["acp", { options: readonly HandlerOption[]; }] |
Methods
advertise()
advertise(
doc,h,link,offer,agreementUrl?):Refusal|Session
Parameters
| Parameter | Type |
|---|---|
doc | Session |
h | `0x${string}` |
link | string |
offer | HandlerOption |
agreementUrl? | string |
Returns
bound()
bound(
presented):Promise<`0x${string}`|Refusal>
Parameters
| Parameter | Type |
|---|---|
presented | unknown |
Returns
Promise<`0x${string}` | Refusal>
build()
Parameters
| Parameter | Type |
|---|---|
choice | AcpChoice |
h | `0x${string}` |
Returns
read()
read(
doc):Refusal| {agreement?:string;h:`0x${string}`;link:string;offer: {session:Session; }; }
Parameters
| Parameter | Type |
|---|---|
doc | Session |
Returns
Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { session: Session; }; }
unplaced()
unplaced(
option):HandlerOption
Parameters
| Parameter | Type |
|---|---|
option | HandlerOption |
Returns
AcpChoice
The buyer's own values for the allowance, and the session it pays.
Properties
| Property | Type |
|---|---|
currency | string |
expires_at | string |
max_amount | number |
merchant_id | string |
session | Session |
Unsigned
Properties
| Property | Type |
|---|---|
allowance | Allowance |
Methods
complete()
Parameters
| Parameter | Type |
|---|---|
request | Presented |
Returns
Type Aliases
Allowance
Allowance =
object
ACP's Allowance: six members, closed.
Properties
| Property | Type |
|---|---|
checkout_session_id | string |
currency | string |
expires_at | string |
max_amount | number |
merchant_id | string |
reason | "one_time" |
HandlerOption
HandlerOption =
object
The kind of payment handler a session offers: ACP's own requires_delegate_payment flag.
Properties
Presented
Presented =
object&object
The delegate_payment request as the agent signs it.
Type Declaration
| Name | Type |
|---|---|
allowance | Allowance |
Session
Session =
object&object
A CheckoutSession. Every member other than id and metadata.legal_context is carried untouched.
Type Declaration
| Name | Type |
|---|---|
id? | string |
metadata? | object |
Variables
delegated
constdelegated:AcpBinding<"acp/checkout/delegated">
issuedDigest
constissuedDigest: typeofdigestJson=digestJson
SHA-256 over the RFC 8785 form of an issued handler option.
METADATA_KEY
constMETADATA_KEY:"legal_context"="legal_context"
undelegated
constundelegated:AcpBinding<"acp/checkout/undelegated">
Functions
tie()
tie(
options): ["acp", {options: readonlyHandlerOption[]; }]
The binding slot: one option per kind of payment handler the session offers, and nothing from the checkout.
Parameters
| Parameter | Type |
|---|---|
options | readonly HandlerOption[] |
Returns
["acp", { options: readonly HandlerOption[]; }]
Last updated on