Skip to content
Integra Protocol
API

@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

PropertyType
checkoutstring
schemeCardScheme

CardPairing

Type Parameters

Type Parameter
Id extends CardPairingId
U

Properties

PropertyType
claimsboolean
idId
patternLcpPattern
tie(options) => ["card", { options: readonly CardOption[]; }]

Methods

advertise(doc, h, link, offer, agreementUrl?): Refusal | CardValues

Parameters
ParameterType
docRecord<string, never>
h`0x${string}`
linkstring
offerCardOption
agreementUrl?string
Returns

Refusal | CardValues

bound()

bound(presented): Promise<`0x${string}` | Refusal>

Parameters
ParameterType
presentedunknown
Returns

Promise<`0x${string}` | Refusal>

build()

build(doc, h): Promise<Refusal | U>

Parameters
ParameterType
docunknown
h`0x${string}`
Returns

Promise<Refusal | U>

read()

read(doc): Refusal | { agreement?: string; h: `0x${string}`; link: string; }

Parameters
ParameterType
docunknown
Returns

Refusal | { agreement?: string; h: `0x${string}`; link: string; }

unplaced()

unplaced(option): CardOption

Parameters
ParameterType
optionCardOption
Returns

CardOption


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

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

TapPresented

A TAP payment request as received: the two signature fields and every lcp-hash field line.

Properties

PropertyType
lcpHashreadonly string[]
signaturestring
signatureInputstring

TapUnsigned

What the agent's own RFC 9421 signer adds: the field, its value, and the component it lists.

Properties

PropertyType
component"lcp-hash"
field"lcp-hash"
value`0x${string}`

ViAutonomous

The Autonomous chain. l2 is exactly the presentation that L3b's sd_hash covers.

Properties

PropertyType
l1string
l2string
l3bstring

ViImmediate

L2 as presented: its JWS, then its disclosures, ~-separated, ending in ~.

Properties

PropertyType
l2string

ViUnsigned

The checkout mandate for the wallet (L2) or the agent (L3b) to sign, and the payment mandate's transaction_id.

Properties

PropertyType
checkoutMandateobject
checkoutMandate.checkout_hashstring
checkoutMandate.checkout_jwtstring
checkoutMandate.vct"mandate.checkout.1"
transactionIdstring

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

const sellerReference: CardPairing<"card/seller-reference", never>


TAP_FIELD

const TAP_FIELD: "lcp-hash" = "lcp-hash"


viAutonomous

const viAutonomous: CardPairing<"card/mastercard-vi/autonomous", ViUnsigned>


viImmediate

const viImmediate: CardPairing<"card/mastercard-vi/immediate", ViUnsigned>


visaTap

const visaTap: 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

ParameterType
sstring

Returns

Promise<string>


pairingsOf()

pairingsOf(o): readonly CardPairingId[]

The pairings a well-formed option can be paid through: Verifiable Intent has two. Anything else has none.

Parameters

ParameterType
oCardOption

Returns

readonly CardPairingId[]


tie()

tie(options): ["card", { options: readonly CardOption[]; }]

The binding slot: every card option offered at this checkout, exactly as issued.

Parameters

ParameterType
optionsreadonly CardOption[]

Returns

["card", { options: readonly CardOption[]; }]

Last updated on

On this page