@integraledger/lcp/ucp
The exports of @integraledger/lcp/ucp.
Interfaces
UcpBinding
Type Parameters
| Type Parameter |
|---|
Id extends string |
O extends Option |
Properties
| Property | Type |
|---|---|
claims | boolean |
id | Id |
pattern | LcpPattern |
Methods
advertise()
advertise(
doc,h,link,offer,agreementUrl?):Refusal|Checkout
Parameters
| Parameter | Type |
|---|---|
doc | Checkout |
h | `0x${string}` |
link | string |
offer | O |
agreementUrl? | string |
Returns
bound()
bound(
presented):Promise<`0x${string}`|Refusal>
Parameters
| Parameter | Type |
|---|---|
presented | unknown |
Returns
Promise<`0x${string}` | Refusal>
build()
Parameters
| Parameter | Type |
|---|---|
offer | UcpOffer |
h | `0x${string}` |
Returns
read()
read(
doc):Refusal| {agreement?:string;h:`0x${string}`;link:string;offer:UcpOffer; }
Parameters
| Parameter | Type |
|---|---|
doc | Checkout |
Returns
Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: UcpOffer; }
tie()
tie(
options): ["ucp", {options: readonlyO[]; }]
Parameters
| Parameter | Type |
|---|---|
options | readonly O[] |
Returns
["ucp", { options: readonly O[]; }]
unplaced()
unplaced(
option):O
Parameters
| Parameter | Type |
|---|---|
option | O |
Returns
O
UcpOffer
Properties
| Property | Type |
|---|---|
checkout | Checkout |
Unsigned
Properties
| Property | Type |
|---|---|
checkout | Checkout |
Methods
complete()
Parameters
| Parameter | Type |
|---|---|
checkout_mandate | string |
Returns
Type Aliases
BookingOption
BookingOption =
object
A booking session's own id, 1–256 characters.
Properties
Checkout
Checkout =
object&object
Type Declaration
| Name | Type |
|---|---|
ap2? | object & object |
id | string |
links? | Link[] |
CheckoutOption
CheckoutOption =
object
A checkout's own id, 1–256 characters.
Properties
Link
Link =
object
Properties
Variables
AGREEMENT_LINK_TYPE
constAGREEMENT_LINK_TYPE:"legal_context_agreement"="legal_context_agreement"
ap2Mandate
constap2Mandate:UcpBinding<"ucp/checkout/ap2-mandate",CheckoutOption>
bookingAp2Mandate
constbookingAp2Mandate:UcpBinding<"ucp/booking/ap2-mandate",BookingOption>
bookingUnsigned
constbookingUnsigned:UcpBinding<"ucp/booking/unsigned",BookingOption>
issuedDigest
constissuedDigest: typeofdigestJson=digestJson
The option digest the issuer keeps: SHA-256 over the RFC 8785 form.
LINK_TYPE
constLINK_TYPE:"legal_context"="legal_context"
unsigned
constunsigned:UcpBinding<"ucp/checkout/unsigned",CheckoutOption>
Functions
legalContextLink()
legalContextLink(
c):Refusal| {h:`0x${string}`;link:string; }
The hash and link of the checkout's one legal_context link. Nothing else of the checkout is read.
Parameters
| Parameter | Type |
|---|---|
c | Checkout |
Returns
Refusal | { h: `0x${string}`; link: string; }
tie()
tie<
O>(options): ["ucp", {options: readonlyO[]; }]
The binding slot: the checkouts or bookings this ATR was minted for, each by its own id.
Type Parameters
| Type Parameter |
|---|
O extends Option |
Parameters
| Parameter | Type |
|---|---|
options | readonly O[] |
Returns
["ucp", { options: readonly O[]; }]
Last updated on