@integraledger/lcp/card
The exports of @integraledger/lcp/card.
Interfaces
CardOption
One card option offered at a checkout. checkout is the seller's own id: 1โ128 visible ASCII characters.
Properties
| Property | Type |
|---|---|
checkout | string |
scheme | CardScheme |
CardPairing
Type Parameters
| Type Parameter |
|---|
Id extends CardPairingId |
U |
Properties
| Property | Type |
|---|---|
claims | boolean |
id | Id |
pattern | LcpPattern |
tie | (options) => ["card", { options: readonly CardOption[]; }] |
Methods
advertise()
advertise(
doc,h,link,offer,agreementUrl?):Refusal|CardValues
Parameters
| Parameter | Type |
|---|---|
doc | Record<string, never> |
h | `0x${string}` |
link | string |
offer | CardOption |
agreementUrl? | string |
Returns
bound()
bound(
presented):Promise<`0x${string}`|Refusal>
Parameters
| Parameter | Type |
|---|---|
presented | unknown |
Returns
Promise<`0x${string}` | Refusal>
build()
build(
doc,h):Promise<Refusal|U>
Parameters
| Parameter | Type |
|---|---|
doc | unknown |
h | `0x${string}` |
Returns
Promise<Refusal | U>
read()
read(
doc):Refusal| {agreement?:string;h:`0x${string}`;link:string; }
Parameters
| Parameter | Type |
|---|---|
doc | unknown |
Returns
Refusal | { agreement?: string; h: `0x${string}`; link: string; }
unplaced()
unplaced(
option):CardOption
Parameters
| Parameter | Type |
|---|---|
option | CardOption |
Returns
CardValues
The values the seller's own stack places: the legal context shown before payment, with the agreement URL after the link when one is given, and the processor reference.
Properties
| Property | Type |
|---|---|
legalContext | object |
legalContext.legalContextAgreementUrl? | string |
legalContext.legalContextUrl | string |
legalContext.type | "sha256" |
legalContext.value | `0x${string}` |
reference | string |
TapPresented
A TAP payment request as received: the two signature fields and every lcp-hash field line.
Properties
TapUnsigned
What the agent's own RFC 9421 signer adds: the field, its value, and the component it lists.
Properties
ViAutonomous
The Autonomous chain. l2 is exactly the presentation that L3b's sd_hash covers.
Properties
ViImmediate
L2 as presented: its JWS, then its disclosures, ~-separated, ending in ~.
Properties
ViUnsigned
The checkout mandate for the wallet (L2) or the agent (L3b) to sign, and the payment mandate's transaction_id.
Properties
| Property | Type |
|---|---|
checkoutMandate | object |
checkoutMandate.checkout_hash | string |
checkoutMandate.checkout_jwt | string |
checkoutMandate.vct | "mandate.checkout.1" |
transactionId | string |
Type Aliases
CardPairingId
CardPairingId =
"card/visa-tap"|"card/mastercard-vi/immediate"|"card/mastercard-vi/autonomous"|"card/seller-reference"
CardScheme
CardScheme =
"visa-tap"|"mastercard-vi"|"seller-reference"
Variables
sellerReference
constsellerReference:CardPairing<"card/seller-reference",never>
TAP_FIELD
constTAP_FIELD:"lcp-hash"="lcp-hash"
viAutonomous
constviAutonomous:CardPairing<"card/mastercard-vi/autonomous",ViUnsigned>
viImmediate
constviImmediate:CardPairing<"card/mastercard-vi/immediate",ViUnsigned>
visaTap
constvisaTap:CardPairing<"card/visa-tap",TapUnsigned>
Functions
disclosureDigest()
disclosureDigest(
s):Promise<string>
base64url, unpadded, of SHA-256 over the US-ASCII characters of s (RFC 9901 ยง4.2.3).
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
Promise<string>
pairingsOf()
pairingsOf(
o): readonlyCardPairingId[]
The pairings a well-formed option can be paid through: Verifiable Intent has two. Anything else has none.
Parameters
| Parameter | Type |
|---|---|
o | CardOption |
Returns
readonly CardPairingId[]
tie()
tie(
options): ["card", {options: readonlyCardOption[]; }]
The binding slot: every card option offered at this checkout, exactly as issued.
Parameters
| Parameter | Type |
|---|---|
options | readonly CardOption[] |
Returns
["card", { options: readonly CardOption[]; }]
Last updated on