Skip to content
Integra Protocol

Upgrading

What a 0.x release of @integraledger/lcp may change, the ranges to pin, what 0.6's patch releases add, and each change a caller of 0.5.x makes for 0.6.0.

For AI agents: this page as Markdown, and llms.txt, the index of every page.

This page is for a developer whose code already uses @integraledger/lcp and who is moving it to a newer release. At the end you know what a release may change, how to pin the package and its peers, and each change your code makes to move from 0.5.x to 0.6.0. The changelog records every release.

What 0.x means for this package

While the version is 0.x, a minor release, such as 0.5 to 0.6, may remove or rename exports and pairing ids and change a function's arguments or answers. A patch release does not. Pin the package with a tilde range, which takes patch releases only, and read the changelog before you move to the next minor:

npm install @integraledger/lcp@~0.6.0

The ranges

WhatRange
Node.js>=24.22.1, the package's engines.node. CI runs the package's tests on Node.js 24.22.1 and on 26.
The settler, @integraledger/profile-facilitator 0.5.1Its peer dependency on this package is ~0.6.3, so install the two together with npm install @integraledger/profile-facilitator @integraledger/lcp@~0.6.3. Without the range, npm takes the newest lcp, which a later minor puts outside the settler's peer range.
The buyer packages, @integraledger/terms 0.5.xThe same peer dependency, ~0.6.0.
The optional rail peers@solana/kit ^8.3.0, @stellar/stellar-sdk ^17.1.0, ripple-binary-codec ~2.11.0, @mysten/sui ^2.31.3, borsh ^2.0.0, @ton/core ^0.63.1 and algosdk ^3.8.0. ~2.11.0 admits 2.11.x only and ^0.63.1 admits 0.63.x only, so install those two with their range (the package README).

Within 0.6

0.6.1, 0.6.2 and 0.6.3 add exports and registry members and correct reads; no call your code makes changes, and the changelog lists each addition. One addition in 0.6.2 is visible on the wire. An agreement option's served member may name the charge options of any ATR binding slot as <slot>/<i>, such as card/0 or acp/1, where 0.6.0 and 0.6.1 read only x402/<i> and mpp/<i>. Their servesOf refuses an agreement option that names another slot's options (return/serves-malformed), so a buyer that reads a card or checkout sale's agreement option needs 0.6.2.

0.6.3 corrects three of lcp's MPP forms to what the stock library on the other side takes, each visible on the wire. mpp/session/tempo's v1 funding carries approve, the currency's approve(escrow, deposit), which the opening sends before call, the escrow's open. mpp/session/xrpl's voucher and close carry source, naming the channel's payer. mpp/subscription/solana reads @solana/pay-kit 0.13.1's request, with planAddress and subscriptionProgram, and refuses one in the earlier form (mpp/request-malformed), so the seller and the buyer of a Solana subscription both need 0.6.3.

From 0.5.x to 0.6.0

The core is unchanged in use: assemble, hash, hashEquals, the forms of H, and the x402 flow of Getting started run as they did, except that assemble refuses more party JSON (Stricter checks). The changes are in the pairings, in the read of a settlement, and in MPP's placement.

Removed pairings

0.5.xUse instead
x402/exact/stellar (exactStellar)x402/exact/stellar/precondition (exactStellarPrecondition), from the same entry point, @integraledger/lcp/x402-exact-stellar: H rides in the transaction's signed-payload precondition, all of H.
x402/exact/lnbtc (exactLnbtc), x402/exact/lnbtc/invoice-named (exactLnbtcNamed)x402/exact/lnbtc/payment-hash (exactLnbtcPaymentHash, from @integraledger/lcp/lightning), at coverage none.
mpp/charge/tempo/memo (tempoMemo), mpp/charge/tempo/push (tempoPush)mpp/charge/tempo/split-memo (tempoSplitMemo) and mpp/charge/tempo/split-memo/push (tempoSplitMemoPush): H is the memo of a split {recipient, amount: 1, memo: H} the challenge carries. Neither has build: the payer's own client builds the payment.
mpp/session/solana (sessionSolana)mpp/session/solana/memo (sessionSolanaMemo), whose opening carries H's LCP string in a Memo instruction the payer signs, or mpp/session/solana/stock (sessionSolanaStock), the stock client's session, at coverage none.
mpp/session/hedera (sessionHedera)mpp/session/hedera/stock (sessionHederaStock, with HederaStockRef, HederaStockReader and hederaStockStatus from @integraledger/lcp/mpp), at coverage none.
mpp/charge/hedera (chargeHedera, from @integraledger/lcp/hedera and @integraledger/lcp/mpp)mpp/charge/lcp/hedera (chargeLcpHedera, choice LcpHederaChoice, from @integraledger/lcp/mpp): MPP's lcp method on Hedera, whose signed memo is H's LCP string.
mpp/charge/stellar (chargeStellar)No MPP pairing on Stellar. Stellar is served on x402, by x402/exact/stellar/precondition.

At coverage none, no public act the payer signs carries H, so the sale is served only after an agreement payment (the agreement URL).

Removed exports

0.5.xInstead
card: TAP_FIELDNone. Visa TAP carries H in the nonce of the agent's agent-payer-auth message signature, or in the checkout path that signature covers, and no longer in an lcp-hash field.
ccd: ccdIdDigest; near: nearLapsed; polkadot: polkadotLocate; svm: svmLocate, svmNonceMovedNone. The pairing's status runs its own search for the payer's acts and reads the lapse, and answers in the read-status shape.
hedera: chargeHedera, ESCROW_OPEN_SELECTOR, and the types HederaChargeChoice, HederaEvmReader, HederaSessionRefThe Hedera MPP pairings above, from @integraledger/lcp/mpp.
lightning: atrNamesInvoice, exactLnbtc, exactLnbtcNamedexactLnbtcPaymentHash, checkPreimage and validateExactLnbtc.
mpp: chargeHedera, chargeStellar, sessionHedera, sessionSolana, tempoMemo, tempoPushThe pairings above.
stellar: muxedIdNone: no pairing carries H's first 8 bytes as a muxed id. muxedFor(payee, position) now writes the muxed address of a transaction's position.
svm: sessionSaltNone: it was the salt of the removed mpp/session/solana.
x402-exact-stellar: exactStellarexactStellarPrecondition.

The pattern record and the pairing's data

Every pairing now has data, typed PairingData, and pattern keeps only where the binding is seen (what each binding proves).

0.5.x0.6.0
pattern.provesdata.proves
pattern.buyerSignsdata.carrier.signed !== null: the field of what the payer signs that carries H, or null.
pattern.publicProofdata.coverage === "full"
pattern.canonicalRemoved. Nothing read it.
pattern.pattern "truncated-field"Removed with the pairings that used it. pattern.pattern is absent on x402/exact/starknet.
A pairing's carrier memberdata.carrier.member: the path of the option or request member the seller writes H into.
mpp/charge/hedera's network memberRemoved with the pairing.

Reading a settlement

0.5.x0.6.0
reference(presented)reference(presented, option): option is the x402 option or MPP challenge the payment answers, from which the reference takes the payee.
status(ref, reader); on Sui status(ref, reader, position); on Cardano status(ref, reader, depth)status(ref, reader, query), where query is { act, finality, after?, search?, others? }: the act ("payment" or "agreement"), the finality asked for, a final position the transaction must come after, the search position an earlier answer returned, and other acts under the same H. Sui's position is after; Cardano's depth is finality, a count of confirmations.
An answer { state, why }, settled, pending or failedAn answer { state, reason, ... }: settled, with transaction, finality and presented; pending, with below-mark, instrument-live, search-incomplete or not-found; failed, with instrument-unused, instrument-consumed, transaction-failed or before-position; or unreadable, with history-gap, transport, unparseable, too-large or chain-mismatch. Every answer lists the foreign items it met. The why values are gone.
A read that did not complete answered pendingIt answers unreadable, transport; a reader for another network, unreadable, chain-mismatch. Neither is ever failed.
recover(tx, reader)recover({ network, tx, option }, reader), option being the option or challenge the ATR's binding slot holds.
A rail's …Status(ref, reader) and …Recover(ref, reader), such as evmStatus and eip3009Recover…Status(ref, reader, query) and …Recover(input, reader), as above.

The read-status profile states each answer and the rules that choose it, and Refusals what a failed reader gives.

MPP placement

0.5.x0.6.0
place(doc, h, link, option, agreementUrl?), and each MPP pairing's advertise(doc, h, link, offer, agreementUrl?)place(doc, h, link, option, position, act?, agreementUrl?) and advertise(doc, h, link, offer, position, act?, agreementUrl?). position is the challenge's place in the sale, 0 to 31, each challenge of the sale its own, the charge and the agreement challenges together, and null for a Tempo subscription. 0.5.x took the challenge's index in doc: pass that index to keep the same ids. An agreement URL passed where position now stands is refused, mpp/challenge-malformed.
An agreement challenge without expiresRefused, mpp/expires-required.
challengeBound(c)challengeBound(c, recorded): the echoed id must equal, whole, the one the seller recorded.

Each MPP pairing's advertise also refuses an offer of another pairing.

Other calls

0.5.x0.6.0
x402/exact/cardano's advertise(doc, h, link, offer, agreementUrl?)advertise(doc, h, link, offer, coinsPerUtxoByte, agreementUrl?): the protocol parameter, read when the offer is issued, from which the output's floor is computed; a lovelace offer below it is cardano/amount-below-floor.
mpp/charge/usdc/gateway's build({ challenge, from, now }, h)build({ challenge, sourceNetwork, burnIntentExpirationHeight, withdrawalDelay }, h): the network the burn intent spends from, the height Circle Gateway's GET /v1/info serves for it and that network's Gateway Wallet's withdrawalDelay(), each a decimal string. complete refuses a signed burn intent whose maxBlockHeight differs, mpp/max-block-height-changed.
stellar: muxedFor(base, h), stellarLocate(ref, reader), transferEventTopics(toBase)muxedFor(payee, position), stellarLocate(q, reader), transferEventTopics(buyer).

Stricter checks

  • assemble refuses, as core/content-not-json, a party slot whose JSON two JSON readers read differently: an object that repeats a member name, a number that overflows a double, or an integer beyond 2^53 - 1 either way. Write such a number as a string (the rules assemble enforces).
  • requestCommitment refuses a method that is not an RFC 9110 token, x402/request-target-invalid.
  • Node.js >=24.22.1, where 0.5.x took >=24.

25 refusal codes are gone with the forms that returned them; the changelog lists them. A caller that matches one can drop that branch.

Edit on GitHub

Last updated on

On this page