@arkade-os/swap 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/advanced.cjs +33 -36
  2. package/dist/advanced.d.cts +6 -6
  3. package/dist/advanced.d.ts +6 -6
  4. package/dist/advanced.js +3 -3
  5. package/dist/{chunk-FMRAV77W.js → chunk-2AQYBSF5.js} +16 -13
  6. package/dist/{chunk-YHESEL4I.js → chunk-6HKTAZLJ.js} +20 -12
  7. package/dist/{chunk-T4FHBWZI.js → chunk-G5QURHVP.js} +17 -31
  8. package/dist/index.cjs +33 -36
  9. package/dist/index.d.cts +5 -5
  10. package/dist/index.d.ts +5 -5
  11. package/dist/index.js +3 -3
  12. package/dist/{lockupContract-CkhWMKCo.d.cts → lockupContract-AwSwif9u.d.cts} +1 -1
  13. package/dist/{lockupContract-CIXkJPxV.d.ts → lockupContract-D-OpxRSX.d.ts} +1 -1
  14. package/dist/nostr.js +1 -1
  15. package/dist/{offer-BPD2ortO.d.ts → offer-4Ir1bRQV.d.ts} +1 -1
  16. package/dist/{offer-Diff5Flc.d.cts → offer-BEcW5o7V.d.cts} +1 -1
  17. package/dist/{offerFillPlan-B-5ae_gQ.d.cts → offerFillPlan-DvrHfYoH.d.cts} +2 -2
  18. package/dist/{offerFillPlan-CJzneX6F.d.ts → offerFillPlan-bsyVMum3.d.ts} +2 -2
  19. package/dist/protocol.cjs +31 -40
  20. package/dist/protocol.d.cts +7 -6
  21. package/dist/protocol.d.ts +7 -6
  22. package/dist/protocol.js +4 -4
  23. package/dist/repositories/realm/index.d.cts +1 -1
  24. package/dist/repositories/realm/index.d.ts +1 -1
  25. package/dist/repositories/sqlite/index.d.cts +1 -1
  26. package/dist/repositories/sqlite/index.d.ts +1 -1
  27. package/dist/{repository-C4pvymhs.d.cts → repository-BW42Dtct.d.cts} +1 -0
  28. package/dist/{repository-BBVRh9ez.d.ts → repository-ChRNknNn.d.ts} +1 -0
  29. package/dist/{watch-7BiRa4oB.d.ts → watch-B_Q0ddHg.d.ts} +1 -1
  30. package/dist/{watch-Bxq-lx_6.d.cts → watch-CpnfqYCE.d.cts} +1 -1
  31. package/package.json +2 -2
package/dist/advanced.cjs CHANGED
@@ -840,8 +840,9 @@ async function prepareOfferCancel(wallet, offerHex, opts) {
840
840
  identity: wallet.identity,
841
841
  // registered offers resolve VTXOs from the contract repository; the indexer is the fallback
842
842
  // for offers created before registration existed
843
- contractManager
843
+ contractManager,
844
844
  // no `network`: the row lookup is by script and the payout comes from wallet.getAddress()
845
+ oneShotSubmit: wallet.oneShotSubmit
845
846
  });
846
847
  const operatorPubkey = swapAddress ? import_sdk3.ArkAddress.decode(swapAddress).serverPubKey : client.serverKey;
847
848
  const { program, args, keys } = swapProgramBinding(offer, operatorPubkey);
@@ -4966,30 +4967,16 @@ async function pushRefundWithoutReceiver(operator, input) {
4966
4967
  const leaf = input.contract.refundWithoutReceiver();
4967
4968
  const vtxos = boundedLockupSpend(input.vtxos);
4968
4969
  const amount = vtxos.reduce((sum, vtxo) => sum + vtxo.value, 0);
4969
- const { arkTx: tx, checkpoints } = (0, import_sdk14.buildOffchainTx)(
4970
- lockupInputs(vtxos, input.contract, leaf),
4971
- [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
4972
- serverUnrollScript
4973
- );
4974
- const signedTx = await input.sender.sign(tx);
4975
- const submitted = await operator.submitTx(
4976
- import_base10.base64.encode(signedTx.toPSBT()),
4977
- checkpoints.map((c) => import_base10.base64.encode(c.toPSBT()))
4978
- );
4979
- (0, import_sdk14.assertSubmittedArkTxid)(submitted, signedTx, "refundWithoutReceiver");
4980
- const matched = (0, import_sdk14.matchServerCheckpoints)(
4981
- submitted.signedCheckpointTxs,
4982
- checkpoints,
4983
- "refundWithoutReceiver"
4984
- );
4985
- const finalCheckpoints = await Promise.all(
4986
- matched.map(
4987
- async ({ server }) => import_base10.base64.encode((await input.sender.sign(server, [0])).toPSBT())
4988
- )
4989
- );
4990
- await operator.finalizeTx(submitted.arkTxid, finalCheckpoints);
4970
+ const txid = await (0, import_sdk14.signAndSubmitOffchainTx)({
4971
+ identity: input.sender,
4972
+ provider: operator,
4973
+ inputs: lockupInputs(vtxos, input.contract, leaf),
4974
+ outputs: [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
4975
+ serverUnrollScript,
4976
+ oneShot: input.oneShot
4977
+ });
4991
4978
  return {
4992
- txid: submitted.arkTxid,
4979
+ txid,
4993
4980
  amount,
4994
4981
  left: input.vtxos.length - vtxos.length,
4995
4982
  spent: vtxos
@@ -6406,7 +6393,8 @@ async function pushClaim(operator, input) {
6406
6393
  ...lockupAssetOutputs(vtxos)
6407
6394
  ],
6408
6395
  serverUnrollScript,
6409
- verifyServerSignatures: { serverPubkey: input.contract.options.server }
6396
+ verifyServerSignatures: { serverPubkey: input.contract.options.server },
6397
+ oneShot: input.oneShot
6410
6398
  });
6411
6399
  return { txid, amount: locked, left: live.length - vtxos.length, spent: vtxos };
6412
6400
  }
@@ -6620,7 +6608,8 @@ function arkadeRefunder(deps) {
6620
6608
  contract,
6621
6609
  sender,
6622
6610
  vtxos,
6623
- network: await deps.network?.()
6611
+ network: await deps.network?.(),
6612
+ oneShot: deps.wallet.oneShotSubmit
6624
6613
  });
6625
6614
  if (result.left > 0 || done) {
6626
6615
  spentBy.set(swap.rfqId, /* @__PURE__ */ new Set([...done ?? [], ...result.spent.map(keyOf)]));
@@ -8347,7 +8336,8 @@ var createSwapDrive = (config) => {
8347
8336
  // Passed through: `pushClaim`'s own value check decides whether `P` is published.
8348
8337
  expectedAmount: swap.expectedAmount,
8349
8338
  partiallyClaimed,
8350
- network: await pinnedNetwork()
8339
+ network: await pinnedNetwork(),
8340
+ oneShot: wallet.oneShotSubmit
8351
8341
  })
8352
8342
  );
8353
8343
  };
@@ -9707,7 +9697,7 @@ var assetSidesOf = (legs) => {
9707
9697
  const giveIsBtc = legs.give.assetId === BTC_ASSET_ID;
9708
9698
  const takeIsBtc = legs.take.assetId === BTC_ASSET_ID;
9709
9699
  if (giveIsBtc && takeIsBtc) {
9710
- throw new UnsupportedRoute("arkade:BTC -> arkade:BTC moves one asset, it swaps nothing", {
9700
+ throw new UnsupportedRoute("give and take are both BTC, so the route swaps nothing", {
9711
9701
  give: "arkade",
9712
9702
  take: "arkade"
9713
9703
  });
@@ -9809,9 +9799,11 @@ var quoteLightningReceive = async (input) => {
9809
9799
  const pinned = pinnedFor(input);
9810
9800
  const pair = rfqPairFor(input.legs.give, input.legs.take);
9811
9801
  const rfqId = newRfqId();
9812
- const secrets = await (0, import_sdk35.provisionClaimSecret)(input.wallet);
9802
+ const [secrets, payoutAddress] = await Promise.all([
9803
+ (0, import_sdk35.provisionClaimSecret)(input.wallet),
9804
+ input.wallet.getAddress()
9805
+ ]);
9813
9806
  const paymentHash = import_base21.hex.encode(secrets.paymentHash);
9814
- const payoutAddress = await input.wallet.getAddress();
9815
9807
  const lightning = input.corridors.get("lightning").deps;
9816
9808
  const sealTo = sealingKey(lightning);
9817
9809
  const sealsAmount = pinned.on === "take" && input.legs.take.assetId === BTC_ASSET_ID;
@@ -9927,8 +9919,10 @@ var quoteOnchainSend = async (input) => {
9927
9919
  claimVsize: onchain.claimVsize
9928
9920
  }) : void 0;
9929
9921
  const quoted = claimFee === void 0 ? pinned : { on: pinned.on, value: pinned.value + claimFee, source: pinned.source };
9930
- const secrets = await (0, import_sdk35.provisionClaimSecret)(input.wallet);
9931
- const payoutKey = await (0, import_sdk35.provisionRefundKey)(input.wallet);
9922
+ const [secrets, payoutKey] = await Promise.all([
9923
+ (0, import_sdk35.provisionClaimSecret)(input.wallet),
9924
+ (0, import_sdk35.provisionRefundKey)(input.wallet)
9925
+ ]);
9932
9926
  const paymentHash = import_base21.hex.encode(secrets.paymentHash);
9933
9927
  const wire = await input.transport.requestQuote(
9934
9928
  withCanonicalAmount(
@@ -10034,11 +10028,14 @@ var quoteOnchainReceive = async (input) => {
10034
10028
  const pair = rfqPairFor(input.legs.give, input.legs.take);
10035
10029
  const rfqId = newRfqId();
10036
10030
  const l1Network = l1NetworkFromArk(input.info.network);
10037
- const secrets = await (0, import_sdk35.provisionClaimSecret)(input.wallet);
10038
- const refundKey = await (0, import_sdk35.provisionRefundKey)(input.wallet);
10031
+ const [secrets, refundKey, payoutAddress, boardingAddress] = await Promise.all([
10032
+ (0, import_sdk35.provisionClaimSecret)(input.wallet),
10033
+ (0, import_sdk35.provisionRefundKey)(input.wallet),
10034
+ input.wallet.getAddress(),
10035
+ input.wallet.getBoardingAddress()
10036
+ ]);
10039
10037
  const paymentHash = import_base21.hex.encode(secrets.paymentHash);
10040
- const payoutAddress = await input.wallet.getAddress();
10041
- const refundPkScript = l1ScriptForAddress(await input.wallet.getBoardingAddress(), l1Network);
10038
+ const refundPkScript = l1ScriptForAddress(boardingAddress, l1Network);
10042
10039
  const wire = await input.transport.requestQuote(
10043
10040
  withCanonicalAmount(
10044
10041
  onchainReceiveRequest({
@@ -1,14 +1,14 @@
1
- import { A as AssetAliasTable, C as CorridorFactory, a as ArkadeCorridorDeps, L as LightningCorridorDeps, O as OnchainCorridorDeps, b as CorridorSet, D as DiscoveryIndex, S as SwapPolicy, c as DiscoveryLeg, M as MarketCandidate, d as DiscoverySnapshot } from './offerFillPlan-B-5ae_gQ.cjs';
2
- export { e as AcceptConflict, f as AcceptInput, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, k as AssetRfqPreparation, l as AttestingRfqTransport, B as BuildOfferFillPlanOpts, m as CORRIDOR_FACTORIES, n as CancelInput, o as CancelOutcome, p as ClaimedDestination, q as ClientDisposed, r as CorridorBase, s as CorridorClaim, t as CorridorCovenant, u as CorridorDeadline, v as CorridorDeps, w as CorridorDepsByCorridor, x as CorridorDrive, y as CorridorLockup, z as CorridorModule, E as CorridorOverrides, F as CorridorPass, G as CorridorRfqPreparation, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, J as DiscoveryIndexInput, K as DiscoverySnapshotUnavailable, N as DriveMode, P as DriveRefusal, Q as ExchangeOptions, R as FEED_TTL_MS, T as FeeCeiling, U as FeedFetch, V as FeedQuoteInput, W as FillSponsor, X as FillSponsorFare, Y as INDEXED_NETWORKS, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a0 as LockupOwner, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, a8 as ONCHAIN_CLAIM_FEE_RATE_SATVB, a9 as ObservationSeam, aa as OfferPreparation, ab as OnchainClaim, ac as OnchainRefund, ad as OperatorUnreachable, ae as ParsedRfqQuote, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, aj as QuotePreparation, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, as as RfqPreparation, at as RfqQuoteInput, au as RfqRendezvous, av as RfqTransportFactory, aw as RouteSide, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aA as SwapDrive, aB as SwapDriveConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, aG as UnsupportedRoute, aH as VerbDeps, aI as acceptQuote, aJ as attesting, aK as buildOfferFillPlan, aL as cancelSwap, aM as canonicalAssetId, aN as cardMarketOf, aO as chooseMarket, aP as conflictingFields, aQ as corridorSet, aR as createNostrTransportFactory, aS as createSwapClient, aT as createSwapDrive, aU as deepFreeze, aV as digestJointGraph, aW as discoveryIndex, aX as eligibleMarkets, aY as enforceFeeCeiling, aZ as exchange, a_ as feedFetch, a$ as feedSpread, b0 as isAddressable, b1 as isCardMarket, b2 as isIndexedNetwork, b3 as isSwapError, b4 as isUsableCard, b5 as liveArkadeInfo, b6 as marketBackendOf, b7 as marketKeyOf, b8 as marketOf, b9 as marketRefOf, ba as nostrTransportFactory, bb as parseRfqQuote, bc as pay, bd as quoteFromFeed, be as quoteViaRfq, bf as readableRecord, bg as receive, bh as resolveCorridorBase, bi as resolveCorridorDeps, bj as rfqLeg, bk as rfqPairFor, bl as swapRecordOf, bm as toDiscoveryLeg, bn as unsignedPsbtBytes, bo as usableMarkets, bp as verifyJointGraph, bq as verifyOfferFillPlan, br as verifyPlanLegs, bs as withCanonicalAmount } from './offerFillPlan-B-5ae_gQ.cjs';
1
+ import { A as AssetAliasTable, C as CorridorFactory, a as ArkadeCorridorDeps, L as LightningCorridorDeps, O as OnchainCorridorDeps, b as CorridorSet, D as DiscoveryIndex, S as SwapPolicy, c as DiscoveryLeg, M as MarketCandidate, d as DiscoverySnapshot } from './offerFillPlan-DvrHfYoH.cjs';
2
+ export { e as AcceptConflict, f as AcceptInput, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, k as AssetRfqPreparation, l as AttestingRfqTransport, B as BuildOfferFillPlanOpts, m as CORRIDOR_FACTORIES, n as CancelInput, o as CancelOutcome, p as ClaimedDestination, q as ClientDisposed, r as CorridorBase, s as CorridorClaim, t as CorridorCovenant, u as CorridorDeadline, v as CorridorDeps, w as CorridorDepsByCorridor, x as CorridorDrive, y as CorridorLockup, z as CorridorModule, E as CorridorOverrides, F as CorridorPass, G as CorridorRfqPreparation, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, J as DiscoveryIndexInput, K as DiscoverySnapshotUnavailable, N as DriveMode, P as DriveRefusal, Q as ExchangeOptions, R as FEED_TTL_MS, T as FeeCeiling, U as FeedFetch, V as FeedQuoteInput, W as FillSponsor, X as FillSponsorFare, Y as INDEXED_NETWORKS, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a0 as LockupOwner, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, a8 as ONCHAIN_CLAIM_FEE_RATE_SATVB, a9 as ObservationSeam, aa as OfferPreparation, ab as OnchainClaim, ac as OnchainRefund, ad as OperatorUnreachable, ae as ParsedRfqQuote, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, aj as QuotePreparation, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, as as RfqPreparation, at as RfqQuoteInput, au as RfqRendezvous, av as RfqTransportFactory, aw as RouteSide, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aA as SwapDrive, aB as SwapDriveConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, aG as UnsupportedRoute, aH as VerbDeps, aI as acceptQuote, aJ as attesting, aK as buildOfferFillPlan, aL as cancelSwap, aM as canonicalAssetId, aN as cardMarketOf, aO as chooseMarket, aP as conflictingFields, aQ as corridorSet, aR as createNostrTransportFactory, aS as createSwapClient, aT as createSwapDrive, aU as deepFreeze, aV as digestJointGraph, aW as discoveryIndex, aX as eligibleMarkets, aY as enforceFeeCeiling, aZ as exchange, a_ as feedFetch, a$ as feedSpread, b0 as isAddressable, b1 as isCardMarket, b2 as isIndexedNetwork, b3 as isSwapError, b4 as isUsableCard, b5 as liveArkadeInfo, b6 as marketBackendOf, b7 as marketKeyOf, b8 as marketOf, b9 as marketRefOf, ba as nostrTransportFactory, bb as parseRfqQuote, bc as pay, bd as quoteFromFeed, be as quoteViaRfq, bf as readableRecord, bg as receive, bh as resolveCorridorBase, bi as resolveCorridorDeps, bj as rfqLeg, bk as rfqPairFor, bl as swapRecordOf, bm as toDiscoveryLeg, bn as unsignedPsbtBytes, bo as usableMarkets, bp as verifyJointGraph, bq as verifyOfferFillPlan, br as verifyPlanLegs, bs as withCanonicalAmount } from './offerFillPlan-DvrHfYoH.cjs';
3
3
  import { DiscoveredMarket, Side } from '@arkade-os/solver-discovery';
4
- import { N as NetworkRef, A as AssetId, C as Corridor, R as Rail, a as RfqSwapRecordStore, b as CorridorSwapRecord, Q as QuoteId, c as AssetSwapStatus, S as SwapRecord, O as OfferSwapRecord, d as AssetSwapRepository, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, h as AssetSwap, L as LockupSpendIndexer, i as RouteResolution, j as ResolvedEndpoint, P as PinnedAmount, I as Instrument, k as Route, l as QuoteInput, m as Pubkey } from './repository-C4pvymhs.cjs';
5
- export { n as ACTIVITY_TOKEN, o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, r as AmountOn, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, V as CORRIDORS, W as CORRIDOR_PASS, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, a2 as Hex, a3 as LOCKUP_OWNER, a4 as MarketBackend, a5 as MarketRef, a6 as OFFER_SWAP_ID_PREFIX, a7 as Outcome, a8 as ParsedAssetId, a9 as Quote, aa as QuoteLeg, ab as RAILS, ac as RFQ_SWAP_ID_PREFIX, ad as RailOf, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, am as RestoredMarketRef, an as RfqAmountSide, ao as SnapshotRef, ap as Swap, aq as SwapFamily, ar as SwapRecordCommon, as as SwapUpdate, at as TaxiIdentity, au as Unsubscribe, av as VerifiedCarrierTerms, aw as arkadeAsset, ax as artifactOf, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aD as corridorOfRail, aE as corridorOutcome, aF as decodeRfqAmount, aG as encodeRfqAmount, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aK as fromRfqAmountSide, aL as fundingWasNotSubmitted, aM as fundsFromWallet, aN as instrumentOf, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, aT as issuanceOf, aU as legOf, aV as offerOutcome, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, aZ as railOfCorridor, a_ as readsChain, a$ as recordArtifact, b0 as recordEndpoint, b1 as recordInstrument, b2 as recordLeg, b3 as recordOutcome, b4 as sameAsset, b5 as swapOf, b6 as toAtomicDecimal, b7 as toRfqAmountSide, b8 as toSafeNumber } from './repository-C4pvymhs.cjs';
4
+ import { N as NetworkRef, A as AssetId, C as Corridor, R as Rail, a as RfqSwapRecordStore, b as CorridorSwapRecord, Q as QuoteId, c as AssetSwapStatus, S as SwapRecord, O as OfferSwapRecord, d as AssetSwapRepository, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, h as AssetSwap, L as LockupSpendIndexer, i as RouteResolution, j as ResolvedEndpoint, P as PinnedAmount, I as Instrument, k as Route, l as QuoteInput, m as Pubkey } from './repository-BW42Dtct.cjs';
5
+ export { n as ACTIVITY_TOKEN, o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, r as AmountOn, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, V as CORRIDORS, W as CORRIDOR_PASS, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, a2 as Hex, a3 as LOCKUP_OWNER, a4 as MarketBackend, a5 as MarketRef, a6 as OFFER_SWAP_ID_PREFIX, a7 as Outcome, a8 as ParsedAssetId, a9 as Quote, aa as QuoteLeg, ab as RAILS, ac as RFQ_SWAP_ID_PREFIX, ad as RailOf, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, am as RestoredMarketRef, an as RfqAmountSide, ao as SnapshotRef, ap as Swap, aq as SwapFamily, ar as SwapRecordCommon, as as SwapUpdate, at as TaxiIdentity, au as Unsubscribe, av as VerifiedCarrierTerms, aw as arkadeAsset, ax as artifactOf, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aD as corridorOfRail, aE as corridorOutcome, aF as decodeRfqAmount, aG as encodeRfqAmount, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aK as fromRfqAmountSide, aL as fundingWasNotSubmitted, aM as fundsFromWallet, aN as instrumentOf, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, aT as issuanceOf, aU as legOf, aV as offerOutcome, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, aZ as railOfCorridor, a_ as readsChain, a$ as recordArtifact, b0 as recordEndpoint, b1 as recordInstrument, b2 as recordLeg, b3 as recordOutcome, b4 as sameAsset, b5 as swapOf, b6 as toAtomicDecimal, b7 as toRfqAmountSide, b8 as toSafeNumber } from './repository-BW42Dtct.cjs';
6
6
  import { I as InvoiceFacts, C as ChainSource, R as RfqQuote } from './rfq-C0tHOvn6.cjs';
7
7
  export { S as SwapRefusal } from './rfq-C0tHOvn6.cjs';
8
8
  import * as btc from '@scure/btc-signer';
9
9
  import { OnchainProvider, NetworkName, PageRequest, PageResult, IWallet, VHTLC } from '@arkade-os/sdk';
10
- import { O as OfferSpendChanges, a as OfferSwapFacts, b as OfferSwapSource } from './watch-Bxq-lx_6.cjs';
11
- import './offer-Diff5Flc.cjs';
10
+ import { O as OfferSpendChanges, a as OfferSwapFacts, b as OfferSwapSource } from './watch-CpnfqYCE.cjs';
11
+ import './offer-BEcW5o7V.cjs';
12
12
  import 'nostr-tools';
13
13
 
14
14
  /** The EVM leg's namespace. Which chain is the quote's `evm_chain_id`, not the pair. */
@@ -1,14 +1,14 @@
1
- import { A as AssetAliasTable, C as CorridorFactory, a as ArkadeCorridorDeps, L as LightningCorridorDeps, O as OnchainCorridorDeps, b as CorridorSet, D as DiscoveryIndex, S as SwapPolicy, c as DiscoveryLeg, M as MarketCandidate, d as DiscoverySnapshot } from './offerFillPlan-CJzneX6F.js';
2
- export { e as AcceptConflict, f as AcceptInput, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, k as AssetRfqPreparation, l as AttestingRfqTransport, B as BuildOfferFillPlanOpts, m as CORRIDOR_FACTORIES, n as CancelInput, o as CancelOutcome, p as ClaimedDestination, q as ClientDisposed, r as CorridorBase, s as CorridorClaim, t as CorridorCovenant, u as CorridorDeadline, v as CorridorDeps, w as CorridorDepsByCorridor, x as CorridorDrive, y as CorridorLockup, z as CorridorModule, E as CorridorOverrides, F as CorridorPass, G as CorridorRfqPreparation, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, J as DiscoveryIndexInput, K as DiscoverySnapshotUnavailable, N as DriveMode, P as DriveRefusal, Q as ExchangeOptions, R as FEED_TTL_MS, T as FeeCeiling, U as FeedFetch, V as FeedQuoteInput, W as FillSponsor, X as FillSponsorFare, Y as INDEXED_NETWORKS, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a0 as LockupOwner, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, a8 as ONCHAIN_CLAIM_FEE_RATE_SATVB, a9 as ObservationSeam, aa as OfferPreparation, ab as OnchainClaim, ac as OnchainRefund, ad as OperatorUnreachable, ae as ParsedRfqQuote, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, aj as QuotePreparation, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, as as RfqPreparation, at as RfqQuoteInput, au as RfqRendezvous, av as RfqTransportFactory, aw as RouteSide, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aA as SwapDrive, aB as SwapDriveConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, aG as UnsupportedRoute, aH as VerbDeps, aI as acceptQuote, aJ as attesting, aK as buildOfferFillPlan, aL as cancelSwap, aM as canonicalAssetId, aN as cardMarketOf, aO as chooseMarket, aP as conflictingFields, aQ as corridorSet, aR as createNostrTransportFactory, aS as createSwapClient, aT as createSwapDrive, aU as deepFreeze, aV as digestJointGraph, aW as discoveryIndex, aX as eligibleMarkets, aY as enforceFeeCeiling, aZ as exchange, a_ as feedFetch, a$ as feedSpread, b0 as isAddressable, b1 as isCardMarket, b2 as isIndexedNetwork, b3 as isSwapError, b4 as isUsableCard, b5 as liveArkadeInfo, b6 as marketBackendOf, b7 as marketKeyOf, b8 as marketOf, b9 as marketRefOf, ba as nostrTransportFactory, bb as parseRfqQuote, bc as pay, bd as quoteFromFeed, be as quoteViaRfq, bf as readableRecord, bg as receive, bh as resolveCorridorBase, bi as resolveCorridorDeps, bj as rfqLeg, bk as rfqPairFor, bl as swapRecordOf, bm as toDiscoveryLeg, bn as unsignedPsbtBytes, bo as usableMarkets, bp as verifyJointGraph, bq as verifyOfferFillPlan, br as verifyPlanLegs, bs as withCanonicalAmount } from './offerFillPlan-CJzneX6F.js';
1
+ import { A as AssetAliasTable, C as CorridorFactory, a as ArkadeCorridorDeps, L as LightningCorridorDeps, O as OnchainCorridorDeps, b as CorridorSet, D as DiscoveryIndex, S as SwapPolicy, c as DiscoveryLeg, M as MarketCandidate, d as DiscoverySnapshot } from './offerFillPlan-bsyVMum3.js';
2
+ export { e as AcceptConflict, f as AcceptInput, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, k as AssetRfqPreparation, l as AttestingRfqTransport, B as BuildOfferFillPlanOpts, m as CORRIDOR_FACTORIES, n as CancelInput, o as CancelOutcome, p as ClaimedDestination, q as ClientDisposed, r as CorridorBase, s as CorridorClaim, t as CorridorCovenant, u as CorridorDeadline, v as CorridorDeps, w as CorridorDepsByCorridor, x as CorridorDrive, y as CorridorLockup, z as CorridorModule, E as CorridorOverrides, F as CorridorPass, G as CorridorRfqPreparation, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, J as DiscoveryIndexInput, K as DiscoverySnapshotUnavailable, N as DriveMode, P as DriveRefusal, Q as ExchangeOptions, R as FEED_TTL_MS, T as FeeCeiling, U as FeedFetch, V as FeedQuoteInput, W as FillSponsor, X as FillSponsorFare, Y as INDEXED_NETWORKS, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a0 as LockupOwner, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, a8 as ONCHAIN_CLAIM_FEE_RATE_SATVB, a9 as ObservationSeam, aa as OfferPreparation, ab as OnchainClaim, ac as OnchainRefund, ad as OperatorUnreachable, ae as ParsedRfqQuote, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, aj as QuotePreparation, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, as as RfqPreparation, at as RfqQuoteInput, au as RfqRendezvous, av as RfqTransportFactory, aw as RouteSide, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aA as SwapDrive, aB as SwapDriveConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, aG as UnsupportedRoute, aH as VerbDeps, aI as acceptQuote, aJ as attesting, aK as buildOfferFillPlan, aL as cancelSwap, aM as canonicalAssetId, aN as cardMarketOf, aO as chooseMarket, aP as conflictingFields, aQ as corridorSet, aR as createNostrTransportFactory, aS as createSwapClient, aT as createSwapDrive, aU as deepFreeze, aV as digestJointGraph, aW as discoveryIndex, aX as eligibleMarkets, aY as enforceFeeCeiling, aZ as exchange, a_ as feedFetch, a$ as feedSpread, b0 as isAddressable, b1 as isCardMarket, b2 as isIndexedNetwork, b3 as isSwapError, b4 as isUsableCard, b5 as liveArkadeInfo, b6 as marketBackendOf, b7 as marketKeyOf, b8 as marketOf, b9 as marketRefOf, ba as nostrTransportFactory, bb as parseRfqQuote, bc as pay, bd as quoteFromFeed, be as quoteViaRfq, bf as readableRecord, bg as receive, bh as resolveCorridorBase, bi as resolveCorridorDeps, bj as rfqLeg, bk as rfqPairFor, bl as swapRecordOf, bm as toDiscoveryLeg, bn as unsignedPsbtBytes, bo as usableMarkets, bp as verifyJointGraph, bq as verifyOfferFillPlan, br as verifyPlanLegs, bs as withCanonicalAmount } from './offerFillPlan-bsyVMum3.js';
3
3
  import { DiscoveredMarket, Side } from '@arkade-os/solver-discovery';
4
- import { N as NetworkRef, A as AssetId, C as Corridor, R as Rail, a as RfqSwapRecordStore, b as CorridorSwapRecord, Q as QuoteId, c as AssetSwapStatus, S as SwapRecord, O as OfferSwapRecord, d as AssetSwapRepository, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, h as AssetSwap, L as LockupSpendIndexer, i as RouteResolution, j as ResolvedEndpoint, P as PinnedAmount, I as Instrument, k as Route, l as QuoteInput, m as Pubkey } from './repository-BBVRh9ez.js';
5
- export { n as ACTIVITY_TOKEN, o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, r as AmountOn, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, V as CORRIDORS, W as CORRIDOR_PASS, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, a2 as Hex, a3 as LOCKUP_OWNER, a4 as MarketBackend, a5 as MarketRef, a6 as OFFER_SWAP_ID_PREFIX, a7 as Outcome, a8 as ParsedAssetId, a9 as Quote, aa as QuoteLeg, ab as RAILS, ac as RFQ_SWAP_ID_PREFIX, ad as RailOf, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, am as RestoredMarketRef, an as RfqAmountSide, ao as SnapshotRef, ap as Swap, aq as SwapFamily, ar as SwapRecordCommon, as as SwapUpdate, at as TaxiIdentity, au as Unsubscribe, av as VerifiedCarrierTerms, aw as arkadeAsset, ax as artifactOf, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aD as corridorOfRail, aE as corridorOutcome, aF as decodeRfqAmount, aG as encodeRfqAmount, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aK as fromRfqAmountSide, aL as fundingWasNotSubmitted, aM as fundsFromWallet, aN as instrumentOf, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, aT as issuanceOf, aU as legOf, aV as offerOutcome, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, aZ as railOfCorridor, a_ as readsChain, a$ as recordArtifact, b0 as recordEndpoint, b1 as recordInstrument, b2 as recordLeg, b3 as recordOutcome, b4 as sameAsset, b5 as swapOf, b6 as toAtomicDecimal, b7 as toRfqAmountSide, b8 as toSafeNumber } from './repository-BBVRh9ez.js';
4
+ import { N as NetworkRef, A as AssetId, C as Corridor, R as Rail, a as RfqSwapRecordStore, b as CorridorSwapRecord, Q as QuoteId, c as AssetSwapStatus, S as SwapRecord, O as OfferSwapRecord, d as AssetSwapRepository, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, h as AssetSwap, L as LockupSpendIndexer, i as RouteResolution, j as ResolvedEndpoint, P as PinnedAmount, I as Instrument, k as Route, l as QuoteInput, m as Pubkey } from './repository-ChRNknNn.js';
5
+ export { n as ACTIVITY_TOKEN, o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, r as AmountOn, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, V as CORRIDORS, W as CORRIDOR_PASS, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, a2 as Hex, a3 as LOCKUP_OWNER, a4 as MarketBackend, a5 as MarketRef, a6 as OFFER_SWAP_ID_PREFIX, a7 as Outcome, a8 as ParsedAssetId, a9 as Quote, aa as QuoteLeg, ab as RAILS, ac as RFQ_SWAP_ID_PREFIX, ad as RailOf, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, am as RestoredMarketRef, an as RfqAmountSide, ao as SnapshotRef, ap as Swap, aq as SwapFamily, ar as SwapRecordCommon, as as SwapUpdate, at as TaxiIdentity, au as Unsubscribe, av as VerifiedCarrierTerms, aw as arkadeAsset, ax as artifactOf, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aD as corridorOfRail, aE as corridorOutcome, aF as decodeRfqAmount, aG as encodeRfqAmount, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aK as fromRfqAmountSide, aL as fundingWasNotSubmitted, aM as fundsFromWallet, aN as instrumentOf, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, aT as issuanceOf, aU as legOf, aV as offerOutcome, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, aZ as railOfCorridor, a_ as readsChain, a$ as recordArtifact, b0 as recordEndpoint, b1 as recordInstrument, b2 as recordLeg, b3 as recordOutcome, b4 as sameAsset, b5 as swapOf, b6 as toAtomicDecimal, b7 as toRfqAmountSide, b8 as toSafeNumber } from './repository-ChRNknNn.js';
6
6
  import { I as InvoiceFacts, C as ChainSource, R as RfqQuote } from './rfq-C0tHOvn6.js';
7
7
  export { S as SwapRefusal } from './rfq-C0tHOvn6.js';
8
8
  import * as btc from '@scure/btc-signer';
9
9
  import { OnchainProvider, NetworkName, PageRequest, PageResult, IWallet, VHTLC } from '@arkade-os/sdk';
10
- import { O as OfferSpendChanges, a as OfferSwapFacts, b as OfferSwapSource } from './watch-7BiRa4oB.js';
11
- import './offer-BPD2ortO.js';
10
+ import { O as OfferSpendChanges, a as OfferSwapFacts, b as OfferSwapSource } from './watch-B_Q0ddHg.js';
11
+ import './offer-4Ir1bRQV.js';
12
12
  import 'nostr-tools';
13
13
 
14
14
  /** The EVM leg's namespace. Which chain is the quote's `evm_chain_id`, not the pair. */
package/dist/advanced.js CHANGED
@@ -138,7 +138,7 @@ import {
138
138
  withCanonicalAmount,
139
139
  withDepositFate,
140
140
  withRfqState
141
- } from "./chunk-YHESEL4I.js";
141
+ } from "./chunk-6HKTAZLJ.js";
142
142
  import {
143
143
  ACTIVITY_TOKEN,
144
144
  Amount,
@@ -173,7 +173,7 @@ import {
173
173
  recordOutcome,
174
174
  swapOf,
175
175
  toAtomicDecimal
176
- } from "./chunk-T4FHBWZI.js";
176
+ } from "./chunk-G5QURHVP.js";
177
177
  import {
178
178
  ARKADE_BTC,
179
179
  SwapRefusal,
@@ -182,7 +182,7 @@ import {
182
182
  bindsClaimAmount,
183
183
  rfqPair,
184
184
  sealClaimPacket
185
- } from "./chunk-FMRAV77W.js";
185
+ } from "./chunk-2AQYBSF5.js";
186
186
  import "./chunk-A3SHHRX4.js";
187
187
 
188
188
  // src/reveal.ts
@@ -854,8 +854,9 @@ async function prepareOfferCancel(wallet, offerHex, opts) {
854
854
  identity: wallet.identity,
855
855
  // registered offers resolve VTXOs from the contract repository; the indexer is the fallback
856
856
  // for offers created before registration existed
857
- contractManager
857
+ contractManager,
858
858
  // no `network`: the row lookup is by script and the payout comes from wallet.getAddress()
859
+ oneShotSubmit: wallet.oneShotSubmit
859
860
  });
860
861
  const operatorPubkey = swapAddress ? ArkAddress.decode(swapAddress).serverPubKey : client.serverKey;
861
862
  const { program, args, keys } = swapProgramBinding(offer, operatorPubkey);
@@ -2260,10 +2261,12 @@ function deriveLightningSend(input) {
2260
2261
  }
2261
2262
  async function requestLightningSend(wallet, transport, params) {
2262
2263
  const rfqId = params.rfqId ?? newRfqId();
2263
- const secrets = await provisionRefundKey(wallet);
2264
+ const [secrets, info] = await Promise.all([
2265
+ provisionRefundKey(wallet),
2266
+ wallet.getArkadeInfo({ requireLive: true })
2267
+ ]);
2264
2268
  const senderPubkey = secrets.pubkey;
2265
2269
  const refundAddress = secrets.address;
2266
- const info = await wallet.getArkadeInfo({ requireLive: true });
2267
2270
  const quote = await transport.requestQuote(
2268
2271
  lightningSendRequest({ rfqId, invoice: params.invoice.raw, refundAddress, senderPubkey })
2269
2272
  );
@@ -2563,7 +2566,11 @@ function deriveOnchainSend(input) {
2563
2566
  }
2564
2567
  async function requestOnchainSend(wallet, transport, params) {
2565
2568
  const rfqId = params.rfqId ?? newRfqId();
2566
- const secrets = await provisionClaimSecret(wallet, { preimage: params.preimage });
2569
+ const [secrets, info, refundAddress] = await Promise.all([
2570
+ provisionClaimSecret(wallet, { preimage: params.preimage }),
2571
+ wallet.getArkadeInfo({ requireLive: true }),
2572
+ wallet.getAddress()
2573
+ ]);
2567
2574
  if (secrets.mustPersistPreimage) {
2568
2575
  console.warn(
2569
2576
  "[swap] this swap's preimage cannot be re-derived from the seed and MUST be persisted with the record before funding"
@@ -2571,10 +2578,6 @@ async function requestOnchainSend(wallet, transport, params) {
2571
2578
  }
2572
2579
  const paymentHash = hex5.encode(secrets.paymentHash);
2573
2580
  const senderPubkey = secrets.pubkey;
2574
- const [info, refundAddress] = await Promise.all([
2575
- wallet.getArkadeInfo({ requireLive: true }),
2576
- wallet.getAddress()
2577
- ]);
2578
2581
  const quote = await transport.requestQuote(
2579
2582
  onchainSendRequest({
2580
2583
  rfqId,
@@ -2751,7 +2754,11 @@ function deriveLightningReceive(input) {
2751
2754
  };
2752
2755
  }
2753
2756
  var provisionReceive = async (wallet, params, persistBefore) => {
2754
- const secrets = await provisionClaimSecret(wallet);
2757
+ const [secrets, info, payoutAddress] = await Promise.all([
2758
+ provisionClaimSecret(wallet),
2759
+ wallet.getArkadeInfo({ requireLive: true }),
2760
+ wallet.getAddress()
2761
+ ]);
2755
2762
  if (secrets.mustPersistPreimage) {
2756
2763
  console.warn(
2757
2764
  `[swap] this swap's preimage cannot be re-derived from the seed and MUST be persisted with the record before ${persistBefore}`
@@ -2760,10 +2767,6 @@ var provisionReceive = async (wallet, params, persistBefore) => {
2760
2767
  const preimage = secrets.preimage;
2761
2768
  const paymentHash = hex5.encode(secrets.paymentHash);
2762
2769
  const payoutPubkey = secrets.pubkey;
2763
- const [info, payoutAddress] = await Promise.all([
2764
- wallet.getArkadeInfo({ requireLive: true }),
2765
- wallet.getAddress()
2766
- ]);
2767
2770
  const binds = bindsClaimAmount();
2768
2771
  const claimPacket = params.covclaimdPubkey && (!binds || params.amountSide === "to") ? await sealClaimPacket({
2769
2772
  preimage,
@@ -60,7 +60,7 @@ import {
60
60
  undeliveredCarry,
61
61
  walletOperator,
62
62
  watchOfferSwaps
63
- } from "./chunk-T4FHBWZI.js";
63
+ } from "./chunk-G5QURHVP.js";
64
64
  import {
65
65
  ARKADE_BTC,
66
66
  ASSET_CARRIER_SATS,
@@ -125,7 +125,7 @@ import {
125
125
  unilateralClaimDelay,
126
126
  verifyOfferAddress,
127
127
  withExitClosure
128
- } from "./chunk-FMRAV77W.js";
128
+ } from "./chunk-2AQYBSF5.js";
129
129
  import {
130
130
  assertRfqSwapPageFilter,
131
131
  collectAssetSwaps,
@@ -2393,7 +2393,8 @@ var createSwapDrive = (config) => {
2393
2393
  // Passed through: `pushClaim`'s own value check decides whether `P` is published.
2394
2394
  expectedAmount: swap.expectedAmount,
2395
2395
  partiallyClaimed,
2396
- network: await pinnedNetwork()
2396
+ network: await pinnedNetwork(),
2397
+ oneShot: wallet.oneShotSubmit
2397
2398
  })
2398
2399
  );
2399
2400
  };
@@ -3919,7 +3920,7 @@ var assetSidesOf = (legs) => {
3919
3920
  const giveIsBtc = legs.give.assetId === BTC_ASSET_ID;
3920
3921
  const takeIsBtc = legs.take.assetId === BTC_ASSET_ID;
3921
3922
  if (giveIsBtc && takeIsBtc) {
3922
- throw new UnsupportedRoute("arkade:BTC -> arkade:BTC moves one asset, it swaps nothing", {
3923
+ throw new UnsupportedRoute("give and take are both BTC, so the route swaps nothing", {
3923
3924
  give: "arkade",
3924
3925
  take: "arkade"
3925
3926
  });
@@ -4021,9 +4022,11 @@ var quoteLightningReceive = async (input) => {
4021
4022
  const pinned = pinnedFor(input);
4022
4023
  const pair = rfqPairFor(input.legs.give, input.legs.take);
4023
4024
  const rfqId = newRfqId();
4024
- const secrets = await provisionClaimSecret(input.wallet);
4025
+ const [secrets, payoutAddress] = await Promise.all([
4026
+ provisionClaimSecret(input.wallet),
4027
+ input.wallet.getAddress()
4028
+ ]);
4025
4029
  const paymentHash = hex8.encode(secrets.paymentHash);
4026
- const payoutAddress = await input.wallet.getAddress();
4027
4030
  const lightning = input.corridors.get("lightning").deps;
4028
4031
  const sealTo = sealingKey(lightning);
4029
4032
  const sealsAmount = pinned.on === "take" && input.legs.take.assetId === BTC_ASSET_ID;
@@ -4139,8 +4142,10 @@ var quoteOnchainSend = async (input) => {
4139
4142
  claimVsize: onchain.claimVsize
4140
4143
  }) : void 0;
4141
4144
  const quoted = claimFee === void 0 ? pinned : { on: pinned.on, value: pinned.value + claimFee, source: pinned.source };
4142
- const secrets = await provisionClaimSecret(input.wallet);
4143
- const payoutKey = await provisionRefundKey(input.wallet);
4145
+ const [secrets, payoutKey] = await Promise.all([
4146
+ provisionClaimSecret(input.wallet),
4147
+ provisionRefundKey(input.wallet)
4148
+ ]);
4144
4149
  const paymentHash = hex8.encode(secrets.paymentHash);
4145
4150
  const wire = await input.transport.requestQuote(
4146
4151
  withCanonicalAmount(
@@ -4246,11 +4251,14 @@ var quoteOnchainReceive = async (input) => {
4246
4251
  const pair = rfqPairFor(input.legs.give, input.legs.take);
4247
4252
  const rfqId = newRfqId();
4248
4253
  const l1Network = l1NetworkFromArk(input.info.network);
4249
- const secrets = await provisionClaimSecret(input.wallet);
4250
- const refundKey = await provisionRefundKey(input.wallet);
4254
+ const [secrets, refundKey, payoutAddress, boardingAddress] = await Promise.all([
4255
+ provisionClaimSecret(input.wallet),
4256
+ provisionRefundKey(input.wallet),
4257
+ input.wallet.getAddress(),
4258
+ input.wallet.getBoardingAddress()
4259
+ ]);
4251
4260
  const paymentHash = hex8.encode(secrets.paymentHash);
4252
- const payoutAddress = await input.wallet.getAddress();
4253
- const refundPkScript = l1ScriptForAddress(await input.wallet.getBoardingAddress(), l1Network);
4261
+ const refundPkScript = l1ScriptForAddress(boardingAddress, l1Network);
4254
4262
  const wire = await input.transport.requestQuote(
4255
4263
  withCanonicalAmount(
4256
4264
  onchainReceiveRequest({
@@ -24,7 +24,7 @@ import {
24
24
  rfqCorridorHandlers,
25
25
  rfqSignerOf,
26
26
  updateAssetSwapBestEffort
27
- } from "./chunk-FMRAV77W.js";
27
+ } from "./chunk-2AQYBSF5.js";
28
28
  import {
29
29
  collectRfqSwaps
30
30
  } from "./chunk-A3SHHRX4.js";
@@ -925,16 +925,14 @@ import { sha256 } from "@noble/hashes/sha2.js";
925
925
  import {
926
926
  ConditionWitness,
927
927
  Transaction,
928
- assertSubmittedArkTxid,
929
928
  assertValidServerUnrollScript,
930
- buildOffchainTx,
931
929
  createAssetPacket,
932
930
  decodeTapscript,
933
931
  Extension,
934
932
  getArkPsbtFields,
935
933
  isVtxoSpent,
936
- matchServerCheckpoints,
937
934
  networkFromArkadeInfo,
935
+ signAndSubmitOffchainTx,
938
936
  scriptFromTapLeafScript,
939
937
  toXOnly
940
938
  } from "@arkade-os/sdk";
@@ -1138,30 +1136,16 @@ async function pushRefundWithoutReceiver(operator, input) {
1138
1136
  const leaf = input.contract.refundWithoutReceiver();
1139
1137
  const vtxos = boundedLockupSpend(input.vtxos);
1140
1138
  const amount = vtxos.reduce((sum, vtxo) => sum + vtxo.value, 0);
1141
- const { arkTx: tx, checkpoints } = buildOffchainTx(
1142
- lockupInputs(vtxos, input.contract, leaf),
1143
- [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
1144
- serverUnrollScript
1145
- );
1146
- const signedTx = await input.sender.sign(tx);
1147
- const submitted = await operator.submitTx(
1148
- base64.encode(signedTx.toPSBT()),
1149
- checkpoints.map((c) => base64.encode(c.toPSBT()))
1150
- );
1151
- assertSubmittedArkTxid(submitted, signedTx, "refundWithoutReceiver");
1152
- const matched = matchServerCheckpoints(
1153
- submitted.signedCheckpointTxs,
1154
- checkpoints,
1155
- "refundWithoutReceiver"
1156
- );
1157
- const finalCheckpoints = await Promise.all(
1158
- matched.map(
1159
- async ({ server }) => base64.encode((await input.sender.sign(server, [0])).toPSBT())
1160
- )
1161
- );
1162
- await operator.finalizeTx(submitted.arkTxid, finalCheckpoints);
1139
+ const txid = await signAndSubmitOffchainTx({
1140
+ identity: input.sender,
1141
+ provider: operator,
1142
+ inputs: lockupInputs(vtxos, input.contract, leaf),
1143
+ outputs: [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
1144
+ serverUnrollScript,
1145
+ oneShot: input.oneShot
1146
+ });
1163
1147
  return {
1164
- txid: submitted.arkTxid,
1148
+ txid,
1165
1149
  amount,
1166
1150
  left: input.vtxos.length - vtxos.length,
1167
1151
  spent: vtxos
@@ -1895,7 +1879,7 @@ function shouldRetainRfqSwap(record, now) {
1895
1879
  // src/claim.ts
1896
1880
  import {
1897
1881
  claimWithPreimageIdentity,
1898
- signAndSubmitOffchainTx
1882
+ signAndSubmitOffchainTx as signAndSubmitOffchainTx2
1899
1883
  } from "@arkade-os/sdk";
1900
1884
  var LockupAmountMismatchError = class extends Error {
1901
1885
  name = "LockupAmountMismatchError";
@@ -1931,7 +1915,7 @@ async function pushClaim(operator, input) {
1931
1915
  assertPreimageMatches(input.preimage, input.contract.options.preimageHash);
1932
1916
  const serverUnrollScript = await operatorUnrollScript(operator, input.network);
1933
1917
  const leaf = input.contract.claim();
1934
- const txid = await signAndSubmitOffchainTx({
1918
+ const txid = await signAndSubmitOffchainTx2({
1935
1919
  identity: claimWithPreimageIdentity(input.receiver, input.preimage),
1936
1920
  provider: operator,
1937
1921
  inputs: lockupInputs(vtxos, input.contract, leaf),
@@ -1941,7 +1925,8 @@ async function pushClaim(operator, input) {
1941
1925
  ...lockupAssetOutputs(vtxos)
1942
1926
  ],
1943
1927
  serverUnrollScript,
1944
- verifyServerSignatures: { serverPubkey: input.contract.options.server }
1928
+ verifyServerSignatures: { serverPubkey: input.contract.options.server },
1929
+ oneShot: input.oneShot
1945
1930
  });
1946
1931
  return { txid, amount: locked, left: live.length - vtxos.length, spent: vtxos };
1947
1932
  }
@@ -2016,7 +2001,8 @@ function arkadeRefunder(deps) {
2016
2001
  contract,
2017
2002
  sender,
2018
2003
  vtxos,
2019
- network: await deps.network?.()
2004
+ network: await deps.network?.(),
2005
+ oneShot: deps.wallet.oneShotSubmit
2020
2006
  });
2021
2007
  if (result.left > 0 || done) {
2022
2008
  spentBy.set(swap.rfqId, /* @__PURE__ */ new Set([...done ?? [], ...result.spent.map(keyOf)]));
package/dist/index.cjs CHANGED
@@ -1331,8 +1331,9 @@ async function prepareOfferCancel(wallet, offerHex, opts) {
1331
1331
  identity: wallet.identity,
1332
1332
  // registered offers resolve VTXOs from the contract repository; the indexer is the fallback
1333
1333
  // for offers created before registration existed
1334
- contractManager
1334
+ contractManager,
1335
1335
  // no `network`: the row lookup is by script and the payout comes from wallet.getAddress()
1336
+ oneShotSubmit: wallet.oneShotSubmit
1336
1337
  });
1337
1338
  const operatorPubkey = swapAddress ? import_sdk5.ArkAddress.decode(swapAddress).serverPubKey : client.serverKey;
1338
1339
  const { program, args, keys } = swapProgramBinding(offer, operatorPubkey);
@@ -3143,30 +3144,16 @@ async function pushRefundWithoutReceiver(operator, input) {
3143
3144
  const leaf = input.contract.refundWithoutReceiver();
3144
3145
  const vtxos = boundedLockupSpend(input.vtxos);
3145
3146
  const amount = vtxos.reduce((sum, vtxo) => sum + vtxo.value, 0);
3146
- const { arkTx: tx, checkpoints } = (0, import_sdk8.buildOffchainTx)(
3147
- lockupInputs(vtxos, input.contract, leaf),
3148
- [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
3149
- serverUnrollScript
3150
- );
3151
- const signedTx = await input.sender.sign(tx);
3152
- const submitted = await operator.submitTx(
3153
- import_base7.base64.encode(signedTx.toPSBT()),
3154
- checkpoints.map((c) => import_base7.base64.encode(c.toPSBT()))
3155
- );
3156
- (0, import_sdk8.assertSubmittedArkTxid)(submitted, signedTx, "refundWithoutReceiver");
3157
- const matched = (0, import_sdk8.matchServerCheckpoints)(
3158
- submitted.signedCheckpointTxs,
3159
- checkpoints,
3160
- "refundWithoutReceiver"
3161
- );
3162
- const finalCheckpoints = await Promise.all(
3163
- matched.map(
3164
- async ({ server }) => import_base7.base64.encode((await input.sender.sign(server, [0])).toPSBT())
3165
- )
3166
- );
3167
- await operator.finalizeTx(submitted.arkTxid, finalCheckpoints);
3147
+ const txid = await (0, import_sdk8.signAndSubmitOffchainTx)({
3148
+ identity: input.sender,
3149
+ provider: operator,
3150
+ inputs: lockupInputs(vtxos, input.contract, leaf),
3151
+ outputs: [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
3152
+ serverUnrollScript,
3153
+ oneShot: input.oneShot
3154
+ });
3168
3155
  return {
3169
- txid: submitted.arkTxid,
3156
+ txid,
3170
3157
  amount,
3171
3158
  left: input.vtxos.length - vtxos.length,
3172
3159
  spent: vtxos
@@ -6371,7 +6358,8 @@ async function pushClaim(operator, input) {
6371
6358
  ...lockupAssetOutputs(vtxos)
6372
6359
  ],
6373
6360
  serverUnrollScript,
6374
- verifyServerSignatures: { serverPubkey: input.contract.options.server }
6361
+ verifyServerSignatures: { serverPubkey: input.contract.options.server },
6362
+ oneShot: input.oneShot
6375
6363
  });
6376
6364
  return { txid, amount: locked, left: live.length - vtxos.length, spent: vtxos };
6377
6365
  }
@@ -6585,7 +6573,8 @@ function arkadeRefunder(deps) {
6585
6573
  contract,
6586
6574
  sender,
6587
6575
  vtxos,
6588
- network: await deps.network?.()
6576
+ network: await deps.network?.(),
6577
+ oneShot: deps.wallet.oneShotSubmit
6589
6578
  });
6590
6579
  if (result.left > 0 || done) {
6591
6580
  spentBy.set(swap.rfqId, /* @__PURE__ */ new Set([...done ?? [], ...result.spent.map(keyOf)]));
@@ -8312,7 +8301,8 @@ var createSwapDrive = (config) => {
8312
8301
  // Passed through: `pushClaim`'s own value check decides whether `P` is published.
8313
8302
  expectedAmount: swap.expectedAmount,
8314
8303
  partiallyClaimed,
8315
- network: await pinnedNetwork()
8304
+ network: await pinnedNetwork(),
8305
+ oneShot: wallet.oneShotSubmit
8316
8306
  })
8317
8307
  );
8318
8308
  };
@@ -9880,7 +9870,7 @@ var assetSidesOf = (legs) => {
9880
9870
  const giveIsBtc = legs.give.assetId === BTC_ASSET_ID;
9881
9871
  const takeIsBtc = legs.take.assetId === BTC_ASSET_ID;
9882
9872
  if (giveIsBtc && takeIsBtc) {
9883
- throw new UnsupportedRoute("arkade:BTC -> arkade:BTC moves one asset, it swaps nothing", {
9873
+ throw new UnsupportedRoute("give and take are both BTC, so the route swaps nothing", {
9884
9874
  give: "arkade",
9885
9875
  take: "arkade"
9886
9876
  });
@@ -9982,9 +9972,11 @@ var quoteLightningReceive = async (input) => {
9982
9972
  const pinned = pinnedFor(input);
9983
9973
  const pair = rfqPairFor(input.legs.give, input.legs.take);
9984
9974
  const rfqId = newRfqId();
9985
- const secrets = await (0, import_sdk35.provisionClaimSecret)(input.wallet);
9975
+ const [secrets, payoutAddress] = await Promise.all([
9976
+ (0, import_sdk35.provisionClaimSecret)(input.wallet),
9977
+ input.wallet.getAddress()
9978
+ ]);
9986
9979
  const paymentHash = import_base21.hex.encode(secrets.paymentHash);
9987
- const payoutAddress = await input.wallet.getAddress();
9988
9980
  const lightning = input.corridors.get("lightning").deps;
9989
9981
  const sealTo = sealingKey(lightning);
9990
9982
  const sealsAmount = pinned.on === "take" && input.legs.take.assetId === BTC_ASSET_ID;
@@ -10100,8 +10092,10 @@ var quoteOnchainSend = async (input) => {
10100
10092
  claimVsize: onchain.claimVsize
10101
10093
  }) : void 0;
10102
10094
  const quoted = claimFee === void 0 ? pinned : { on: pinned.on, value: pinned.value + claimFee, source: pinned.source };
10103
- const secrets = await (0, import_sdk35.provisionClaimSecret)(input.wallet);
10104
- const payoutKey = await (0, import_sdk35.provisionRefundKey)(input.wallet);
10095
+ const [secrets, payoutKey] = await Promise.all([
10096
+ (0, import_sdk35.provisionClaimSecret)(input.wallet),
10097
+ (0, import_sdk35.provisionRefundKey)(input.wallet)
10098
+ ]);
10105
10099
  const paymentHash = import_base21.hex.encode(secrets.paymentHash);
10106
10100
  const wire = await input.transport.requestQuote(
10107
10101
  withCanonicalAmount(
@@ -10207,11 +10201,14 @@ var quoteOnchainReceive = async (input) => {
10207
10201
  const pair = rfqPairFor(input.legs.give, input.legs.take);
10208
10202
  const rfqId = newRfqId();
10209
10203
  const l1Network = l1NetworkFromArk(input.info.network);
10210
- const secrets = await (0, import_sdk35.provisionClaimSecret)(input.wallet);
10211
- const refundKey = await (0, import_sdk35.provisionRefundKey)(input.wallet);
10204
+ const [secrets, refundKey, payoutAddress, boardingAddress] = await Promise.all([
10205
+ (0, import_sdk35.provisionClaimSecret)(input.wallet),
10206
+ (0, import_sdk35.provisionRefundKey)(input.wallet),
10207
+ input.wallet.getAddress(),
10208
+ input.wallet.getBoardingAddress()
10209
+ ]);
10212
10210
  const paymentHash = import_base21.hex.encode(secrets.paymentHash);
10213
- const payoutAddress = await input.wallet.getAddress();
10214
- const refundPkScript = l1ScriptForAddress(await input.wallet.getBoardingAddress(), l1Network);
10211
+ const refundPkScript = l1ScriptForAddress(boardingAddress, l1Network);
10215
10212
  const wire = await input.transport.requestQuote(
10216
10213
  withCanonicalAmount(
10217
10214
  onchainReceiveRequest({
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- export { e as AcceptConflict, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, o as CancelOutcome, q as ClientDisposed, E as CorridorOverrides, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, d as DiscoverySnapshot, K as DiscoverySnapshotUnavailable, N as DriveMode, Q as ExchangeOptions, T as FeeCeiling, W as FillSponsor, X as FillSponsorFare, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, ad as OperatorUnreachable, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, av as RfqTransportFactory, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, S as SwapPolicy, aG as UnsupportedRoute, aH as VerbDeps, aK as buildOfferFillPlan, aM as canonicalAssetId, aS as createSwapClient, aU as deepFreeze, aV as digestJointGraph, aZ as exchange, b3 as isSwapError, bc as pay, bg as receive, bn as unsignedPsbtBytes, bp as verifyJointGraph, bq as verifyOfferFillPlan } from './offerFillPlan-B-5ae_gQ.cjs';
2
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry, a7 as Outcome, ap as Swap, l as QuoteInput, i as RouteResolution, a9 as Quote, as as SwapUpdate, au as Unsubscribe } from './repository-C4pvymhs.cjs';
3
- export { o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, A as AssetId, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, b as CorridorSwapRecord, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, ba as InMemoryAssetSwapRepository, I as Instrument, L as LockupSpendIndexer, a4 as MarketBackend, a5 as MarketRef, N as NetworkRef, O as OfferSwapRecord, a8 as ParsedAssetId, P as PinnedAmount, Q as QuoteId, aa as QuoteLeg, ab as RAILS, R as Rail, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, j as ResolvedEndpoint, am as RestoredMarketRef, bb as RfqSwapState, k as Route, ao as SnapshotRef, bc as SwapContractRegistry, aq as SwapFamily, bd as SwapOperator, ar as SwapRecordCommon, at as TaxiIdentity, av as VerifiedCarrierTerms, aw as arkadeAsset, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, be as isRfqSwapTerminal, aT as issuanceOf, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, b4 as sameAsset, b6 as toAtomicDecimal } from './repository-C4pvymhs.cjs';
1
+ export { e as AcceptConflict, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, o as CancelOutcome, q as ClientDisposed, E as CorridorOverrides, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, d as DiscoverySnapshot, K as DiscoverySnapshotUnavailable, N as DriveMode, Q as ExchangeOptions, T as FeeCeiling, W as FillSponsor, X as FillSponsorFare, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, ad as OperatorUnreachable, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, av as RfqTransportFactory, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, S as SwapPolicy, aG as UnsupportedRoute, aH as VerbDeps, aK as buildOfferFillPlan, aM as canonicalAssetId, aS as createSwapClient, aU as deepFreeze, aV as digestJointGraph, aZ as exchange, b3 as isSwapError, bc as pay, bg as receive, bn as unsignedPsbtBytes, bp as verifyJointGraph, bq as verifyOfferFillPlan } from './offerFillPlan-DvrHfYoH.cjs';
2
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry, a7 as Outcome, ap as Swap, l as QuoteInput, i as RouteResolution, a9 as Quote, as as SwapUpdate, au as Unsubscribe } from './repository-BW42Dtct.cjs';
3
+ export { o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, A as AssetId, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, b as CorridorSwapRecord, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, ba as InMemoryAssetSwapRepository, I as Instrument, L as LockupSpendIndexer, a4 as MarketBackend, a5 as MarketRef, N as NetworkRef, O as OfferSwapRecord, a8 as ParsedAssetId, P as PinnedAmount, Q as QuoteId, aa as QuoteLeg, ab as RAILS, R as Rail, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, j as ResolvedEndpoint, am as RestoredMarketRef, bb as RfqSwapState, k as Route, ao as SnapshotRef, bc as SwapContractRegistry, aq as SwapFamily, bd as SwapOperator, ar as SwapRecordCommon, at as TaxiIdentity, av as VerifiedCarrierTerms, aw as arkadeAsset, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, be as isRfqSwapTerminal, aT as issuanceOf, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, b4 as sameAsset, b6 as toAtomicDecimal } from './repository-BW42Dtct.cjs';
4
4
  export { C as ChainSource, I as InvoiceFacts, a as RFQ_REFUSAL_ERROR_CODES, b as RfqRefusalDetail, c as RfqRefusalErrorCode, d as RfqRefusalUnit, S as SwapRefusal, T as TxStatus, i as isRfqRefusalErrorCode } from './rfq-C0tHOvn6.cjs';
5
5
  import { PageRequest, PageResult, PaymentHandle, PaymentRail, RouterPreferences, Wallet, PaymentRouter, PaymentStatus } from '@arkade-os/sdk';
6
- export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-CkhWMKCo.cjs';
6
+ export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-AwSwif9u.cjs';
7
7
  import '@arkade-os/solver-discovery';
8
- import './offer-Diff5Flc.cjs';
8
+ import './offer-BEcW5o7V.cjs';
9
9
  import 'nostr-tools';
10
10
 
11
11
  /** Browser backend over the SDK's shared IndexedDB manager. */
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { e as AcceptConflict, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, o as CancelOutcome, q as ClientDisposed, E as CorridorOverrides, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, d as DiscoverySnapshot, K as DiscoverySnapshotUnavailable, N as DriveMode, Q as ExchangeOptions, T as FeeCeiling, W as FillSponsor, X as FillSponsorFare, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, ad as OperatorUnreachable, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, av as RfqTransportFactory, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, S as SwapPolicy, aG as UnsupportedRoute, aH as VerbDeps, aK as buildOfferFillPlan, aM as canonicalAssetId, aS as createSwapClient, aU as deepFreeze, aV as digestJointGraph, aZ as exchange, b3 as isSwapError, bc as pay, bg as receive, bn as unsignedPsbtBytes, bp as verifyJointGraph, bq as verifyOfferFillPlan } from './offerFillPlan-CJzneX6F.js';
2
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry, a7 as Outcome, ap as Swap, l as QuoteInput, i as RouteResolution, a9 as Quote, as as SwapUpdate, au as Unsubscribe } from './repository-BBVRh9ez.js';
3
- export { o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, A as AssetId, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, b as CorridorSwapRecord, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, ba as InMemoryAssetSwapRepository, I as Instrument, L as LockupSpendIndexer, a4 as MarketBackend, a5 as MarketRef, N as NetworkRef, O as OfferSwapRecord, a8 as ParsedAssetId, P as PinnedAmount, Q as QuoteId, aa as QuoteLeg, ab as RAILS, R as Rail, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, j as ResolvedEndpoint, am as RestoredMarketRef, bb as RfqSwapState, k as Route, ao as SnapshotRef, bc as SwapContractRegistry, aq as SwapFamily, bd as SwapOperator, ar as SwapRecordCommon, at as TaxiIdentity, av as VerifiedCarrierTerms, aw as arkadeAsset, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, be as isRfqSwapTerminal, aT as issuanceOf, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, b4 as sameAsset, b6 as toAtomicDecimal } from './repository-BBVRh9ez.js';
1
+ export { e as AcceptConflict, g as AcceptOptions, h as AmbiguousDestination, i as AmountEncodingUnsupported, j as AmountMismatch, A as AssetAliasTable, B as BuildOfferFillPlanOpts, o as CancelOutcome, q as ClientDisposed, E as CorridorOverrides, H as DEFAULT_MAX_REFUND_WINDOW_SECONDS, I as DiscoveryConfig, d as DiscoverySnapshot, K as DiscoverySnapshotUnavailable, N as DriveMode, Q as ExchangeOptions, T as FeeCeiling, W as FillSponsor, X as FillSponsorFare, Z as InconsistentRoute, _ as InsufficientFunds, $ as JointGraph, a1 as Market, a2 as MarketLeg, a3 as MaxFeeExceeded, a4 as MissingCorridorDep, a5 as NotCancellable, a6 as OFFER_FILL_OWNERS, a7 as OFFER_FILL_TEMPLATE, ad as OperatorUnreachable, af as PayOptions, ag as PayResult, ah as QuoteCheck, ai as QuoteExpired, ak as QuoteVerificationFailed, al as REGISTRY_URL, am as ReceiveArtifact, an as ReceiveOptions, ao as ReceiveRequest, ap as RecoveryResult, aq as RegisteredAsset, ar as RfqAuctionPolicy, av as RfqTransportFactory, ax as SWAP_ERROR_NAMES, ay as SwapClient, az as SwapClientConfig, aC as SwapDriveRefusedError, aD as SwapError, aE as SwapErrorName, aF as SwapFilter, S as SwapPolicy, aG as UnsupportedRoute, aH as VerbDeps, aK as buildOfferFillPlan, aM as canonicalAssetId, aS as createSwapClient, aU as deepFreeze, aV as digestJointGraph, aZ as exchange, b3 as isSwapError, bc as pay, bg as receive, bn as unsignedPsbtBytes, bp as verifyJointGraph, bq as verifyOfferFillPlan } from './offerFillPlan-bsyVMum3.js';
2
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry, a7 as Outcome, ap as Swap, l as QuoteInput, i as RouteResolution, a9 as Quote, as as SwapUpdate, au as Unsubscribe } from './repository-ChRNknNn.js';
3
+ export { o as ARKADE_ASSET_NAMESPACE, p as Amount, q as AmountFormatError, s as AmountRefusal, t as ArkadeCarrierChoice, u as Artifact, A as AssetId, v as AssetIdError, w as AssetIdRefusal, x as AssetNamespace, y as AssetOn, z as AssetPart, B as AssetPaymentInput, D as AssetPaymentTerms, E as AssetRef, F as AssetScale, G as AssetSwapId, H as AtomicDecimal, J as AuctionMarketRef, K as AuctionProvenance, M as BITCOIN_RAILS, T as BTC_ASSET_PART, U as BitcoinRail, X as CardMarketRef, Y as CorridorId, Z as CorridorKind, b as CorridorSwapRecord, _ as DepositArtifact, $ as DisplayDecimal, a0 as Endpoint, a1 as Ep, ba as InMemoryAssetSwapRepository, I as Instrument, L as LockupSpendIndexer, a4 as MarketBackend, a5 as MarketRef, N as NetworkRef, O as OfferSwapRecord, a8 as ParsedAssetId, P as PinnedAmount, Q as QuoteId, aa as QuoteLeg, ab as RAILS, R as Rail, ae as RankedBid, af as RawState, ag as ReceiverPaidCarrierQuote, ah as RecordedArtifact, ai as RecordedAssetPayment, aj as RecordedEndpoint, ak as RecordedInstrument, al as RecordedLeg, j as ResolvedEndpoint, am as RestoredMarketRef, bb as RfqSwapState, k as Route, ao as SnapshotRef, bc as SwapContractRegistry, aq as SwapFamily, bd as SwapOperator, ar as SwapRecordCommon, at as TaxiIdentity, av as VerifiedCarrierTerms, aw as arkadeAsset, ay as assetPartOf, az as assetSwapIdOf, aA as bitcoinNetworkOf, aB as btcAssetPart, aC as btcOn, aH as familyOfSwapId, aI as formatAssetId, aJ as fromAtomicDecimal, aO as isAssetId, aP as isAtomicDecimal, aQ as isBtcAsset, aR as isBtcAssetLenient, aS as isNetworkRef, be as isRfqSwapTerminal, aT as issuanceOf, aW as parseAssetId, aX as quoteIdOfSwapId, aY as railOf, b4 as sameAsset, b6 as toAtomicDecimal } from './repository-ChRNknNn.js';
4
4
  export { C as ChainSource, I as InvoiceFacts, a as RFQ_REFUSAL_ERROR_CODES, b as RfqRefusalDetail, c as RfqRefusalErrorCode, d as RfqRefusalUnit, S as SwapRefusal, T as TxStatus, i as isRfqRefusalErrorCode } from './rfq-C0tHOvn6.js';
5
5
  import { PageRequest, PageResult, PaymentHandle, PaymentRail, RouterPreferences, Wallet, PaymentRouter, PaymentStatus } from '@arkade-os/sdk';
6
- export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-CIXkJPxV.js';
6
+ export { C as CLAIM_PACKET_TYPE, a as ClaimPacketShape, L as LockupRegistrationFailed, S as SEALED_CIPHERTEXT_LENGTH, b as appendArkadeScript, c as claimPacketShape } from './lockupContract-D-OpxRSX.js';
7
7
  import '@arkade-os/solver-discovery';
8
- import './offer-BPD2ortO.js';
8
+ import './offer-4Ir1bRQV.js';
9
9
  import 'nostr-tools';
10
10
 
11
11
  /** Browser backend over the SDK's shared IndexedDB manager. */
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  unsignedPsbtBytes,
63
63
  verifyJointGraph,
64
64
  verifyOfferFillPlan
65
- } from "./chunk-YHESEL4I.js";
65
+ } from "./chunk-6HKTAZLJ.js";
66
66
  import {
67
67
  Amount,
68
68
  AmountFormatError,
@@ -73,7 +73,7 @@ import {
73
73
  isRfqSwapTerminal,
74
74
  quoteIdOfSwapId,
75
75
  toAtomicDecimal
76
- } from "./chunk-T4FHBWZI.js";
76
+ } from "./chunk-G5QURHVP.js";
77
77
  import {
78
78
  CLAIM_PACKET_TYPE,
79
79
  LockupRegistrationFailed,
@@ -83,7 +83,7 @@ import {
83
83
  appendArkadeScript,
84
84
  claimPacketShape,
85
85
  isRfqRefusalErrorCode
86
- } from "./chunk-FMRAV77W.js";
86
+ } from "./chunk-2AQYBSF5.js";
87
87
  import {
88
88
  InMemoryAssetSwapRepository,
89
89
  assertRfqSwapPageFilter,
@@ -1,4 +1,4 @@
1
- import { C as CoverageRegistrationOptions } from './offer-Diff5Flc.cjs';
1
+ import { C as CoverageRegistrationOptions } from './offer-BEcW5o7V.cjs';
2
2
  import { VHTLC, IContractManager } from '@arkade-os/sdk';
3
3
 
4
4
  interface SealedClaimPacket {
@@ -1,4 +1,4 @@
1
- import { C as CoverageRegistrationOptions } from './offer-BPD2ortO.js';
1
+ import { C as CoverageRegistrationOptions } from './offer-4Ir1bRQV.js';
2
2
  import { VHTLC, IContractManager } from '@arkade-os/sdk';
3
3
 
4
4
  interface SealedClaimPacket {
package/dist/nostr.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  expectQuote,
3
3
  pairOf
4
- } from "./chunk-FMRAV77W.js";
4
+ } from "./chunk-2AQYBSF5.js";
5
5
  import "./chunk-A3SHHRX4.js";
6
6
 
7
7
  // src/nostr.ts
@@ -1,5 +1,5 @@
1
1
  import { asset, RelativeTimelock, ArkadeInfo, ArkTxInput, Outpoint, IWallet, EmulatorProvider, arkade } from '@arkade-os/sdk';
2
- import { d as AssetSwapRepository } from './repository-BBVRh9ez.js';
2
+ import { d as AssetSwapRepository } from './repository-ChRNknNn.js';
3
3
 
4
4
  /**
5
5
  * Coverage: whether an offer's script is in the wallet's watched set. `createOffer` promotes; the
@@ -1,5 +1,5 @@
1
1
  import { asset, RelativeTimelock, ArkadeInfo, ArkTxInput, Outpoint, IWallet, EmulatorProvider, arkade } from '@arkade-os/sdk';
2
- import { d as AssetSwapRepository } from './repository-C4pvymhs.cjs';
2
+ import { d as AssetSwapRepository } from './repository-BW42Dtct.cjs';
3
3
 
4
4
  /**
5
5
  * Coverage: whether an offer's script is in the wallet's watched set. `createOffer` promotes; the
@@ -1,8 +1,8 @@
1
1
  import { IWallet, NetworkName, Network, SignerSet, OnchainProvider, ArkadeInfo, VHTLC, ProvisionedKey, ProvisionedClaimSecret, Transaction } from '@arkade-os/sdk';
2
- import { bd as SwapOperator, d as AssetSwapRepository, m as Pubkey, bf as RfqSwapManagerCallbacks, C as Corridor, I as Instrument, bg as RfqSwapActionName, N as NetworkRef, A as AssetId, ao as SnapshotRef, a4 as MarketBackend, X as CardMarketRef, a5 as MarketRef, E as AssetRef, r as AmountOn, ap as Swap, Y as CorridorId, _ as DepositArtifact, l as QuoteInput, a9 as Quote, ae as RankedBid, as as SwapUpdate, au as Unsubscribe, S as SwapRecord, Q as QuoteId, a7 as Outcome, L as LockupSpendIndexer, bc as SwapContractRegistry, j as ResolvedEndpoint, P as PinnedAmount, D as AssetPaymentTerms, B as AssetPaymentInput, O as OfferSwapRecord, G as AssetSwapId, aq as SwapFamily, i as RouteResolution } from './repository-C4pvymhs.cjs';
2
+ import { bd as SwapOperator, d as AssetSwapRepository, m as Pubkey, bf as RfqSwapManagerCallbacks, C as Corridor, I as Instrument, bg as RfqSwapActionName, N as NetworkRef, A as AssetId, ao as SnapshotRef, a4 as MarketBackend, X as CardMarketRef, a5 as MarketRef, E as AssetRef, r as AmountOn, ap as Swap, Y as CorridorId, _ as DepositArtifact, l as QuoteInput, a9 as Quote, ae as RankedBid, as as SwapUpdate, au as Unsubscribe, S as SwapRecord, Q as QuoteId, a7 as Outcome, L as LockupSpendIndexer, bc as SwapContractRegistry, j as ResolvedEndpoint, P as PinnedAmount, D as AssetPaymentTerms, B as AssetPaymentInput, O as OfferSwapRecord, G as AssetSwapId, aq as SwapFamily, i as RouteResolution } from './repository-BW42Dtct.cjs';
3
3
  import { I as InvoiceFacts, C as ChainSource, R as RfqQuote, e as RfqTransport, L as LightningSendContractParams, f as LightningReceiveContractParams, O as OnchainHtlc, g as OnchainHtlcParams, h as OnchainNetwork, S as SwapRefusal } from './rfq-C0tHOvn6.cjs';
4
4
  import { Network as Network$1, LocalCardInput, TransportCardFetcher, DiscoveredMarket, Side, OfferPlan } from '@arkade-os/solver-discovery';
5
- import { D as DerivedOffer, F as FillFunding, a as FillOutpoint, b as FillInputOwner } from './offer-Diff5Flc.cjs';
5
+ import { D as DerivedOffer, F as FillFunding, a as FillOutpoint, b as FillInputOwner } from './offer-BEcW5o7V.cjs';
6
6
  import * as nostr_tools from 'nostr-tools';
7
7
 
8
8
  /**
@@ -1,8 +1,8 @@
1
1
  import { IWallet, NetworkName, Network, SignerSet, OnchainProvider, ArkadeInfo, VHTLC, ProvisionedKey, ProvisionedClaimSecret, Transaction } from '@arkade-os/sdk';
2
- import { bd as SwapOperator, d as AssetSwapRepository, m as Pubkey, bf as RfqSwapManagerCallbacks, C as Corridor, I as Instrument, bg as RfqSwapActionName, N as NetworkRef, A as AssetId, ao as SnapshotRef, a4 as MarketBackend, X as CardMarketRef, a5 as MarketRef, E as AssetRef, r as AmountOn, ap as Swap, Y as CorridorId, _ as DepositArtifact, l as QuoteInput, a9 as Quote, ae as RankedBid, as as SwapUpdate, au as Unsubscribe, S as SwapRecord, Q as QuoteId, a7 as Outcome, L as LockupSpendIndexer, bc as SwapContractRegistry, j as ResolvedEndpoint, P as PinnedAmount, D as AssetPaymentTerms, B as AssetPaymentInput, O as OfferSwapRecord, G as AssetSwapId, aq as SwapFamily, i as RouteResolution } from './repository-BBVRh9ez.js';
2
+ import { bd as SwapOperator, d as AssetSwapRepository, m as Pubkey, bf as RfqSwapManagerCallbacks, C as Corridor, I as Instrument, bg as RfqSwapActionName, N as NetworkRef, A as AssetId, ao as SnapshotRef, a4 as MarketBackend, X as CardMarketRef, a5 as MarketRef, E as AssetRef, r as AmountOn, ap as Swap, Y as CorridorId, _ as DepositArtifact, l as QuoteInput, a9 as Quote, ae as RankedBid, as as SwapUpdate, au as Unsubscribe, S as SwapRecord, Q as QuoteId, a7 as Outcome, L as LockupSpendIndexer, bc as SwapContractRegistry, j as ResolvedEndpoint, P as PinnedAmount, D as AssetPaymentTerms, B as AssetPaymentInput, O as OfferSwapRecord, G as AssetSwapId, aq as SwapFamily, i as RouteResolution } from './repository-ChRNknNn.js';
3
3
  import { I as InvoiceFacts, C as ChainSource, R as RfqQuote, e as RfqTransport, L as LightningSendContractParams, f as LightningReceiveContractParams, O as OnchainHtlc, g as OnchainHtlcParams, h as OnchainNetwork, S as SwapRefusal } from './rfq-C0tHOvn6.js';
4
4
  import { Network as Network$1, LocalCardInput, TransportCardFetcher, DiscoveredMarket, Side, OfferPlan } from '@arkade-os/solver-discovery';
5
- import { D as DerivedOffer, F as FillFunding, a as FillOutpoint, b as FillInputOwner } from './offer-BPD2ortO.js';
5
+ import { D as DerivedOffer, F as FillFunding, a as FillOutpoint, b as FillInputOwner } from './offer-4Ir1bRQV.js';
6
6
  import * as nostr_tools from 'nostr-tools';
7
7
 
8
8
  /**
package/dist/protocol.cjs CHANGED
@@ -1178,8 +1178,9 @@ async function prepareOfferCancel(wallet, offerHex, opts) {
1178
1178
  identity: wallet.identity,
1179
1179
  // registered offers resolve VTXOs from the contract repository; the indexer is the fallback
1180
1180
  // for offers created before registration existed
1181
- contractManager
1181
+ contractManager,
1182
1182
  // no `network`: the row lookup is by script and the payout comes from wallet.getAddress()
1183
+ oneShotSubmit: wallet.oneShotSubmit
1183
1184
  });
1184
1185
  const operatorPubkey = swapAddress ? import_sdk5.ArkAddress.decode(swapAddress).serverPubKey : client.serverKey;
1185
1186
  const { program, args, keys } = swapProgramBinding(offer, operatorPubkey);
@@ -1709,10 +1710,12 @@ function deriveLightningSend(input) {
1709
1710
  }
1710
1711
  async function requestLightningSend(wallet, transport, params) {
1711
1712
  const rfqId = params.rfqId ?? newRfqId();
1712
- const secrets = await (0, import_sdk7.provisionRefundKey)(wallet);
1713
+ const [secrets, info] = await Promise.all([
1714
+ (0, import_sdk7.provisionRefundKey)(wallet),
1715
+ wallet.getArkadeInfo({ requireLive: true })
1716
+ ]);
1713
1717
  const senderPubkey = secrets.pubkey;
1714
1718
  const refundAddress = secrets.address;
1715
- const info = await wallet.getArkadeInfo({ requireLive: true });
1716
1719
  const quote = await transport.requestQuote(
1717
1720
  lightningSendRequest({ rfqId, invoice: params.invoice.raw, refundAddress, senderPubkey })
1718
1721
  );
@@ -1914,7 +1917,11 @@ function deriveOnchainSend(input) {
1914
1917
  }
1915
1918
  async function requestOnchainSend(wallet, transport, params) {
1916
1919
  const rfqId = params.rfqId ?? newRfqId();
1917
- const secrets = await (0, import_sdk7.provisionClaimSecret)(wallet, { preimage: params.preimage });
1920
+ const [secrets, info, refundAddress] = await Promise.all([
1921
+ (0, import_sdk7.provisionClaimSecret)(wallet, { preimage: params.preimage }),
1922
+ wallet.getArkadeInfo({ requireLive: true }),
1923
+ wallet.getAddress()
1924
+ ]);
1918
1925
  if (secrets.mustPersistPreimage) {
1919
1926
  console.warn(
1920
1927
  "[swap] this swap's preimage cannot be re-derived from the seed and MUST be persisted with the record before funding"
@@ -1922,10 +1929,6 @@ async function requestOnchainSend(wallet, transport, params) {
1922
1929
  }
1923
1930
  const paymentHash = import_base6.hex.encode(secrets.paymentHash);
1924
1931
  const senderPubkey = secrets.pubkey;
1925
- const [info, refundAddress] = await Promise.all([
1926
- wallet.getArkadeInfo({ requireLive: true }),
1927
- wallet.getAddress()
1928
- ]);
1929
1932
  const quote = await transport.requestQuote(
1930
1933
  onchainSendRequest({
1931
1934
  rfqId,
@@ -2870,7 +2873,11 @@ var init_rfq = __esm({
2870
2873
  return { contractParams, matched };
2871
2874
  };
2872
2875
  provisionReceive = async (wallet, params, persistBefore) => {
2873
- const secrets = await (0, import_sdk7.provisionClaimSecret)(wallet);
2876
+ const [secrets, info, payoutAddress] = await Promise.all([
2877
+ (0, import_sdk7.provisionClaimSecret)(wallet),
2878
+ wallet.getArkadeInfo({ requireLive: true }),
2879
+ wallet.getAddress()
2880
+ ]);
2874
2881
  if (secrets.mustPersistPreimage) {
2875
2882
  console.warn(
2876
2883
  `[swap] this swap's preimage cannot be re-derived from the seed and MUST be persisted with the record before ${persistBefore}`
@@ -2879,10 +2886,6 @@ var init_rfq = __esm({
2879
2886
  const preimage = secrets.preimage;
2880
2887
  const paymentHash = import_base6.hex.encode(secrets.paymentHash);
2881
2888
  const payoutPubkey = secrets.pubkey;
2882
- const [info, payoutAddress] = await Promise.all([
2883
- wallet.getArkadeInfo({ requireLive: true }),
2884
- wallet.getAddress()
2885
- ]);
2886
2889
  const binds = bindsClaimAmount();
2887
2890
  const claimPacket = params.covclaimdPubkey && (!binds || params.amountSide === "to") ? await sealClaimPacket({
2888
2891
  preimage,
@@ -3620,30 +3623,16 @@ async function pushRefundWithoutReceiver(operator, input) {
3620
3623
  const leaf = input.contract.refundWithoutReceiver();
3621
3624
  const vtxos = boundedLockupSpend(input.vtxos);
3622
3625
  const amount = vtxos.reduce((sum, vtxo) => sum + vtxo.value, 0);
3623
- const { arkTx: tx, checkpoints } = (0, import_sdk8.buildOffchainTx)(
3624
- lockupInputs(vtxos, input.contract, leaf),
3625
- [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
3626
- serverUnrollScript
3627
- );
3628
- const signedTx = await input.sender.sign(tx);
3629
- const submitted = await operator.submitTx(
3630
- import_base7.base64.encode(signedTx.toPSBT()),
3631
- checkpoints.map((c) => import_base7.base64.encode(c.toPSBT()))
3632
- );
3633
- (0, import_sdk8.assertSubmittedArkTxid)(submitted, signedTx, "refundWithoutReceiver");
3634
- const matched = (0, import_sdk8.matchServerCheckpoints)(
3635
- submitted.signedCheckpointTxs,
3636
- checkpoints,
3637
- "refundWithoutReceiver"
3638
- );
3639
- const finalCheckpoints = await Promise.all(
3640
- matched.map(
3641
- async ({ server }) => import_base7.base64.encode((await input.sender.sign(server, [0])).toPSBT())
3642
- )
3643
- );
3644
- await operator.finalizeTx(submitted.arkTxid, finalCheckpoints);
3626
+ const txid = await (0, import_sdk8.signAndSubmitOffchainTx)({
3627
+ identity: input.sender,
3628
+ provider: operator,
3629
+ inputs: lockupInputs(vtxos, input.contract, leaf),
3630
+ outputs: [{ script: refundPkScript, amount: BigInt(amount) }, ...lockupAssetOutputs(vtxos)],
3631
+ serverUnrollScript,
3632
+ oneShot: input.oneShot
3633
+ });
3645
3634
  return {
3646
- txid: submitted.arkTxid,
3635
+ txid,
3647
3636
  amount,
3648
3637
  left: input.vtxos.length - vtxos.length,
3649
3638
  spent: vtxos
@@ -5580,7 +5569,8 @@ function arkadeRefunder(deps) {
5580
5569
  contract,
5581
5570
  sender,
5582
5571
  vtxos,
5583
- network: await deps.network?.()
5572
+ network: await deps.network?.(),
5573
+ oneShot: deps.wallet.oneShotSubmit
5584
5574
  });
5585
5575
  if (result.left > 0 || done) {
5586
5576
  spentBy.set(swap.rfqId, /* @__PURE__ */ new Set([...done ?? [], ...result.spent.map(keyOf)]));
@@ -5685,7 +5675,8 @@ async function pushClaim(operator, input) {
5685
5675
  ...lockupAssetOutputs(vtxos)
5686
5676
  ],
5687
5677
  serverUnrollScript,
5688
- verifyServerSignatures: { serverPubkey: input.contract.options.server }
5678
+ verifyServerSignatures: { serverPubkey: input.contract.options.server },
5679
+ oneShot: input.oneShot
5689
5680
  });
5690
5681
  return { txid, amount: locked, left: live.length - vtxos.length, spent: vtxos };
5691
5682
  }
@@ -6214,7 +6205,7 @@ function solverOnchainRail(deps) {
6214
6205
  const rendezvous = await rendezvousFor(amount);
6215
6206
  if (!rendezvous) {
6216
6207
  throw new Error(
6217
- `${SOLVER_ONCHAIN_RAIL}: no solver serves arkade:BTC -> onchain:BTC at ${amount} sats`
6208
+ `${SOLVER_ONCHAIN_RAIL}: no solver serves onchain payments at ${amount} sats`
6218
6209
  );
6219
6210
  }
6220
6211
  const negotiated = await deps.connect(
@@ -6317,7 +6308,7 @@ function solverLightningRail(deps) {
6317
6308
  const rendezvous = await rendezvousFor(facts.amountSats);
6318
6309
  if (!rendezvous) {
6319
6310
  throw new Error(
6320
- `${SOLVER_LIGHTNING_RAIL}: no solver serves arkade:BTC -> lightning:BTC at ${facts.amountSats} sats`
6311
+ `${SOLVER_LIGHTNING_RAIL}: no solver serves Lightning payments at ${facts.amountSats} sats`
6321
6312
  );
6322
6313
  }
6323
6314
  const negotiated = await deps.connect(
@@ -1,13 +1,13 @@
1
1
  import { ProvisionedKey, ProvisionedClaimSecret, RestIndexerProvider, Transaction, ActivityResolver, IWallet, Network, OnchainProvider, VHTLC, Identity, Asset, PaymentRail } from '@arkade-os/sdk';
2
- import { bh as SwapSecretsProjection, e as RfqSwapRecord, h as AssetSwap, d as AssetSwapRepository, L as LockupSpendIndexer, bb as RfqSwapState, bd as SwapOperator, bi as LockupContractSource, bj as RfqSwap, bk as ArkadeRefundResult, bl as LockupVtxo } from './repository-C4pvymhs.cjs';
3
- export { c as AssetSwapStatus, bm as AvailableRfqSwapManagerCallbacks, bn as BTC_ASSET_ID, bo as LightningReceiveSwap, bp as LightningSendSwap, bq as LockupFate, br as LockupNeedsRecoveryError, bs as LockupParams, bt as LockupSpend, bu as OnchainReceiveAction, bv as OnchainReceiveNeedsChainSource, bw as OnchainReceiveSwap, bx as OnchainSendAction, by as OnchainSendSwap, bz as PersistableRfqSwap, bA as PreimageBlockedReason, bB as PreimageNotRecoverableError, bC as REFUND_MTP_LAG_SECONDS, bD as RFQ_SWAP_RETENTION_SECONDS, bE as ReceiveLockupSwap, bF as RfqRestoreFailure, bG as RfqRestoreOptions, bH as RfqRestoreResult, bg as RfqSwapActionName, bI as RfqSwapLockup, bJ as RfqSwapManager, bf as RfqSwapManagerCallbacks, bK as RfqSwapManagerConfig, bL as RfqSwapManagerDeps, bM as RfqSwapManagerEvents, bN as RfqSwapOrigin, bO as RfqSwapOriginRequired, bP as RfqSwapOutcome, a as RfqSwapRecordStore, bQ as addAssetSwap, bR as awaitRfqResolution, bS as createRfqSwapRecord, bT as findLockupVtxos, bU as getAssetSwaps, bV as isRfqTerminal, bW as nextOnchainAction, bX as nextOnchainReceiveAction, bY as normalizeRfqSwapRecord, bZ as preimageForSwapRecord, b_ as pushRefundWithoutReceiver, b$ as readLockupFate, c0 as rebuildRfqSwap, c1 as rfqSwapOriginOf, c2 as shouldRetainRfqSwap, c3 as swapSecretsToRecord, c4 as updateAssetSwap, c5 as updateRfqSwapRecord } from './repository-C4pvymhs.cjs';
2
+ import { bh as SwapSecretsProjection, e as RfqSwapRecord, h as AssetSwap, d as AssetSwapRepository, L as LockupSpendIndexer, bb as RfqSwapState, bd as SwapOperator, bi as LockupContractSource, bj as RfqSwap, bk as ArkadeRefundResult, bl as LockupVtxo } from './repository-BW42Dtct.cjs';
3
+ export { c as AssetSwapStatus, bm as AvailableRfqSwapManagerCallbacks, bn as BTC_ASSET_ID, bo as LightningReceiveSwap, bp as LightningSendSwap, bq as LockupFate, br as LockupNeedsRecoveryError, bs as LockupParams, bt as LockupSpend, bu as OnchainReceiveAction, bv as OnchainReceiveNeedsChainSource, bw as OnchainReceiveSwap, bx as OnchainSendAction, by as OnchainSendSwap, bz as PersistableRfqSwap, bA as PreimageBlockedReason, bB as PreimageNotRecoverableError, bC as REFUND_MTP_LAG_SECONDS, bD as RFQ_SWAP_RETENTION_SECONDS, bE as ReceiveLockupSwap, bF as RfqRestoreFailure, bG as RfqRestoreOptions, bH as RfqRestoreResult, bg as RfqSwapActionName, bI as RfqSwapLockup, bJ as RfqSwapManager, bf as RfqSwapManagerCallbacks, bK as RfqSwapManagerConfig, bL as RfqSwapManagerDeps, bM as RfqSwapManagerEvents, bN as RfqSwapOrigin, bO as RfqSwapOriginRequired, bP as RfqSwapOutcome, a as RfqSwapRecordStore, bQ as addAssetSwap, bR as awaitRfqResolution, bS as createRfqSwapRecord, bT as findLockupVtxos, bU as getAssetSwaps, bV as isRfqTerminal, bW as nextOnchainAction, bX as nextOnchainReceiveAction, bY as normalizeRfqSwapRecord, bZ as preimageForSwapRecord, b_ as pushRefundWithoutReceiver, b$ as readLockupFate, c0 as rebuildRfqSwap, c1 as rfqSwapOriginOf, c2 as shouldRetainRfqSwap, c3 as swapSecretsToRecord, c4 as updateAssetSwap, c5 as updateRfqSwapRecord } from './repository-BW42Dtct.cjs';
4
4
  import { h as OnchainNetwork, O as OnchainHtlc, g as OnchainHtlcParams, C as ChainSource, I as InvoiceFacts, e as RfqTransport, r as requestLightningSend, j as requestOnchainSend } from './rfq-C0tHOvn6.cjs';
5
5
  export { A as ARKADE_BTC, k as AddressMismatch, l as ChainUtxo, H as HtlcUtxo, m as LIGHTNING_BTC, n as LIGHTNING_RECEIVE_PAIR, o as LIGHTNING_SEND_PAIR, p as LOCKTIME_THRESHOLD, f as LightningReceiveContractParams, L as LightningSendContractParams, M as MAX_MIN_CONFIRMATIONS, q as MIN_CLAIM_WINDOW_SECONDS, s as ONCHAIN_BTC, t as ONCHAIN_CLAIM_MARGIN_SECONDS, u as ONCHAIN_DUST_SATS, v as ONCHAIN_ORDER_MARGIN_SECONDS, w as ONCHAIN_RECEIVE_PAIR, x as ONCHAIN_SECONDS_PER_BLOCK, y as ONCHAIN_SEND_PAIR, z as OnchainHtlcPhase, B as RelaySocket, R as RfqQuote, D as RfqRefusalReason, E as RfqStatus, F as arkadeAssetLeg, G as arkadeSwapRequest, J as assertArkadeFundable, K as awaitOnchainFill, N as buildHtlcClaim, P as buildHtlcRefund, Q as canonicalAssetAmount, U as claimOnchainFill, V as classifyOnchainHtlc, W as deriveLightningReceive, X as deriveOnchainReceive, Y as deriveOnchainSend, Z as extractPreimage, _ as httpTransport, $ as l1ScriptForAddress, a0 as lightningReceiveContract, a1 as lightningReceiveRequest, a2 as lightningSendContract, a3 as lightningSendRequest, a4 as newPreimage, a5 as normalizeMakerPkScript, a6 as normalizeMakerPublicKey, a7 as onchainHtlcScript, a8 as onchainReceiveRequest, a9 as onchainSendRequest, aa as paymentHashOf, ab as relayTransport, ac as requestArkadeSwap, ad as requestLightningReceive, ae as requestOnchainReceive, af as unilateralClaimDelay, ag as unilateralRefundDelay, ah as unilateralRefundWithoutReceiverDelay, ai as verifyLockupAddress, aj as verifyOfferAddress, ak as verifyReceiveInvoice } from './rfq-C0tHOvn6.cjs';
6
- export { d as ClaimPacketInput, e as LockupContractMissing, f as LockupContractReader, g as LockupContractWriter, h as SWAP_LOCKUP_CONTRACT_KIND, i as SWAP_LOCKUP_CONTRACT_LABEL, j as SWAP_LOCKUP_CONTRACT_TYPE, k as SealedClaimPacket, l as lockupContractParams, r as registerLockupContract, s as sealClaimPacket } from './lockupContract-CkhWMKCo.cjs';
6
+ export { d as ClaimPacketInput, e as LockupContractMissing, f as LockupContractReader, g as LockupContractWriter, h as SWAP_LOCKUP_CONTRACT_KIND, i as SWAP_LOCKUP_CONTRACT_LABEL, j as SWAP_LOCKUP_CONTRACT_TYPE, k as SealedClaimPacket, l as lockupContractParams, r as registerLockupContract, s as sealClaimPacket } from './lockupContract-AwSwif9u.cjs';
7
7
  import { Network as Network$1, LocalCardInput, TransportCardFetcher, DiscoveredMarket, Side, OfferPlan } from '@arkade-os/solver-discovery';
8
- import { O as Offer } from './offer-Diff5Flc.cjs';
9
- export { A as ASSET_CARRIER_SATS, F as FillFunding, a as FillOutpoint, N as NoSpendableDepositError, c as OFFER_PACKET_TYPE, d as OfferCovenantMismatchError, e as cancelOffer, f as createOffer, g as decodeOffer, h as encodeOffer, i as fillOffer, o as offerContract, j as offerVtxoScript, s as swapPrograms } from './offer-Diff5Flc.cjs';
10
- export { c as OfferSwapWatcher, W as WatchOfferSwapsParams, w as watchOfferSwaps } from './watch-Bxq-lx_6.cjs';
8
+ import { O as Offer } from './offer-BEcW5o7V.cjs';
9
+ export { A as ASSET_CARRIER_SATS, F as FillFunding, a as FillOutpoint, N as NoSpendableDepositError, c as OFFER_PACKET_TYPE, d as OfferCovenantMismatchError, e as cancelOffer, f as createOffer, g as decodeOffer, h as encodeOffer, i as fillOffer, o as offerContract, j as offerVtxoScript, s as swapPrograms } from './offer-BEcW5o7V.cjs';
10
+ export { c as OfferSwapWatcher, W as WatchOfferSwapsParams, w as watchOfferSwaps } from './watch-CpnfqYCE.cjs';
11
11
 
12
12
  /** Which wallet key signs this leg, at `profile.signer`. Omitted entirely (not blank) by a corridor
13
13
  * whose leg this wallet never signs. */
@@ -403,6 +403,7 @@ declare function pushClaim(operator: SwapOperator, input: {
403
403
  partiallyClaimed?: boolean;
404
404
  /** @see operatorUnrollScript */
405
405
  network?: Network;
406
+ oneShot?: boolean;
406
407
  }): Promise<{
407
408
  txid: string;
408
409
  amount: number;
@@ -1,13 +1,13 @@
1
1
  import { ProvisionedKey, ProvisionedClaimSecret, RestIndexerProvider, Transaction, ActivityResolver, IWallet, Network, OnchainProvider, VHTLC, Identity, Asset, PaymentRail } from '@arkade-os/sdk';
2
- import { bh as SwapSecretsProjection, e as RfqSwapRecord, h as AssetSwap, d as AssetSwapRepository, L as LockupSpendIndexer, bb as RfqSwapState, bd as SwapOperator, bi as LockupContractSource, bj as RfqSwap, bk as ArkadeRefundResult, bl as LockupVtxo } from './repository-BBVRh9ez.js';
3
- export { c as AssetSwapStatus, bm as AvailableRfqSwapManagerCallbacks, bn as BTC_ASSET_ID, bo as LightningReceiveSwap, bp as LightningSendSwap, bq as LockupFate, br as LockupNeedsRecoveryError, bs as LockupParams, bt as LockupSpend, bu as OnchainReceiveAction, bv as OnchainReceiveNeedsChainSource, bw as OnchainReceiveSwap, bx as OnchainSendAction, by as OnchainSendSwap, bz as PersistableRfqSwap, bA as PreimageBlockedReason, bB as PreimageNotRecoverableError, bC as REFUND_MTP_LAG_SECONDS, bD as RFQ_SWAP_RETENTION_SECONDS, bE as ReceiveLockupSwap, bF as RfqRestoreFailure, bG as RfqRestoreOptions, bH as RfqRestoreResult, bg as RfqSwapActionName, bI as RfqSwapLockup, bJ as RfqSwapManager, bf as RfqSwapManagerCallbacks, bK as RfqSwapManagerConfig, bL as RfqSwapManagerDeps, bM as RfqSwapManagerEvents, bN as RfqSwapOrigin, bO as RfqSwapOriginRequired, bP as RfqSwapOutcome, a as RfqSwapRecordStore, bQ as addAssetSwap, bR as awaitRfqResolution, bS as createRfqSwapRecord, bT as findLockupVtxos, bU as getAssetSwaps, bV as isRfqTerminal, bW as nextOnchainAction, bX as nextOnchainReceiveAction, bY as normalizeRfqSwapRecord, bZ as preimageForSwapRecord, b_ as pushRefundWithoutReceiver, b$ as readLockupFate, c0 as rebuildRfqSwap, c1 as rfqSwapOriginOf, c2 as shouldRetainRfqSwap, c3 as swapSecretsToRecord, c4 as updateAssetSwap, c5 as updateRfqSwapRecord } from './repository-BBVRh9ez.js';
2
+ import { bh as SwapSecretsProjection, e as RfqSwapRecord, h as AssetSwap, d as AssetSwapRepository, L as LockupSpendIndexer, bb as RfqSwapState, bd as SwapOperator, bi as LockupContractSource, bj as RfqSwap, bk as ArkadeRefundResult, bl as LockupVtxo } from './repository-ChRNknNn.js';
3
+ export { c as AssetSwapStatus, bm as AvailableRfqSwapManagerCallbacks, bn as BTC_ASSET_ID, bo as LightningReceiveSwap, bp as LightningSendSwap, bq as LockupFate, br as LockupNeedsRecoveryError, bs as LockupParams, bt as LockupSpend, bu as OnchainReceiveAction, bv as OnchainReceiveNeedsChainSource, bw as OnchainReceiveSwap, bx as OnchainSendAction, by as OnchainSendSwap, bz as PersistableRfqSwap, bA as PreimageBlockedReason, bB as PreimageNotRecoverableError, bC as REFUND_MTP_LAG_SECONDS, bD as RFQ_SWAP_RETENTION_SECONDS, bE as ReceiveLockupSwap, bF as RfqRestoreFailure, bG as RfqRestoreOptions, bH as RfqRestoreResult, bg as RfqSwapActionName, bI as RfqSwapLockup, bJ as RfqSwapManager, bf as RfqSwapManagerCallbacks, bK as RfqSwapManagerConfig, bL as RfqSwapManagerDeps, bM as RfqSwapManagerEvents, bN as RfqSwapOrigin, bO as RfqSwapOriginRequired, bP as RfqSwapOutcome, a as RfqSwapRecordStore, bQ as addAssetSwap, bR as awaitRfqResolution, bS as createRfqSwapRecord, bT as findLockupVtxos, bU as getAssetSwaps, bV as isRfqTerminal, bW as nextOnchainAction, bX as nextOnchainReceiveAction, bY as normalizeRfqSwapRecord, bZ as preimageForSwapRecord, b_ as pushRefundWithoutReceiver, b$ as readLockupFate, c0 as rebuildRfqSwap, c1 as rfqSwapOriginOf, c2 as shouldRetainRfqSwap, c3 as swapSecretsToRecord, c4 as updateAssetSwap, c5 as updateRfqSwapRecord } from './repository-ChRNknNn.js';
4
4
  import { h as OnchainNetwork, O as OnchainHtlc, g as OnchainHtlcParams, C as ChainSource, I as InvoiceFacts, e as RfqTransport, r as requestLightningSend, j as requestOnchainSend } from './rfq-C0tHOvn6.js';
5
5
  export { A as ARKADE_BTC, k as AddressMismatch, l as ChainUtxo, H as HtlcUtxo, m as LIGHTNING_BTC, n as LIGHTNING_RECEIVE_PAIR, o as LIGHTNING_SEND_PAIR, p as LOCKTIME_THRESHOLD, f as LightningReceiveContractParams, L as LightningSendContractParams, M as MAX_MIN_CONFIRMATIONS, q as MIN_CLAIM_WINDOW_SECONDS, s as ONCHAIN_BTC, t as ONCHAIN_CLAIM_MARGIN_SECONDS, u as ONCHAIN_DUST_SATS, v as ONCHAIN_ORDER_MARGIN_SECONDS, w as ONCHAIN_RECEIVE_PAIR, x as ONCHAIN_SECONDS_PER_BLOCK, y as ONCHAIN_SEND_PAIR, z as OnchainHtlcPhase, B as RelaySocket, R as RfqQuote, D as RfqRefusalReason, E as RfqStatus, F as arkadeAssetLeg, G as arkadeSwapRequest, J as assertArkadeFundable, K as awaitOnchainFill, N as buildHtlcClaim, P as buildHtlcRefund, Q as canonicalAssetAmount, U as claimOnchainFill, V as classifyOnchainHtlc, W as deriveLightningReceive, X as deriveOnchainReceive, Y as deriveOnchainSend, Z as extractPreimage, _ as httpTransport, $ as l1ScriptForAddress, a0 as lightningReceiveContract, a1 as lightningReceiveRequest, a2 as lightningSendContract, a3 as lightningSendRequest, a4 as newPreimage, a5 as normalizeMakerPkScript, a6 as normalizeMakerPublicKey, a7 as onchainHtlcScript, a8 as onchainReceiveRequest, a9 as onchainSendRequest, aa as paymentHashOf, ab as relayTransport, ac as requestArkadeSwap, ad as requestLightningReceive, ae as requestOnchainReceive, af as unilateralClaimDelay, ag as unilateralRefundDelay, ah as unilateralRefundWithoutReceiverDelay, ai as verifyLockupAddress, aj as verifyOfferAddress, ak as verifyReceiveInvoice } from './rfq-C0tHOvn6.js';
6
- export { d as ClaimPacketInput, e as LockupContractMissing, f as LockupContractReader, g as LockupContractWriter, h as SWAP_LOCKUP_CONTRACT_KIND, i as SWAP_LOCKUP_CONTRACT_LABEL, j as SWAP_LOCKUP_CONTRACT_TYPE, k as SealedClaimPacket, l as lockupContractParams, r as registerLockupContract, s as sealClaimPacket } from './lockupContract-CIXkJPxV.js';
6
+ export { d as ClaimPacketInput, e as LockupContractMissing, f as LockupContractReader, g as LockupContractWriter, h as SWAP_LOCKUP_CONTRACT_KIND, i as SWAP_LOCKUP_CONTRACT_LABEL, j as SWAP_LOCKUP_CONTRACT_TYPE, k as SealedClaimPacket, l as lockupContractParams, r as registerLockupContract, s as sealClaimPacket } from './lockupContract-D-OpxRSX.js';
7
7
  import { Network as Network$1, LocalCardInput, TransportCardFetcher, DiscoveredMarket, Side, OfferPlan } from '@arkade-os/solver-discovery';
8
- import { O as Offer } from './offer-BPD2ortO.js';
9
- export { A as ASSET_CARRIER_SATS, F as FillFunding, a as FillOutpoint, N as NoSpendableDepositError, c as OFFER_PACKET_TYPE, d as OfferCovenantMismatchError, e as cancelOffer, f as createOffer, g as decodeOffer, h as encodeOffer, i as fillOffer, o as offerContract, j as offerVtxoScript, s as swapPrograms } from './offer-BPD2ortO.js';
10
- export { c as OfferSwapWatcher, W as WatchOfferSwapsParams, w as watchOfferSwaps } from './watch-7BiRa4oB.js';
8
+ import { O as Offer } from './offer-4Ir1bRQV.js';
9
+ export { A as ASSET_CARRIER_SATS, F as FillFunding, a as FillOutpoint, N as NoSpendableDepositError, c as OFFER_PACKET_TYPE, d as OfferCovenantMismatchError, e as cancelOffer, f as createOffer, g as decodeOffer, h as encodeOffer, i as fillOffer, o as offerContract, j as offerVtxoScript, s as swapPrograms } from './offer-4Ir1bRQV.js';
10
+ export { c as OfferSwapWatcher, W as WatchOfferSwapsParams, w as watchOfferSwaps } from './watch-B_Q0ddHg.js';
11
11
 
12
12
  /** Which wallet key signs this leg, at `profile.signer`. Omitted entirely (not blank) by a corridor
13
13
  * whose leg this wallet never signs. */
@@ -403,6 +403,7 @@ declare function pushClaim(operator: SwapOperator, input: {
403
403
  partiallyClaimed?: boolean;
404
404
  /** @see operatorUnrollScript */
405
405
  network?: Network;
406
+ oneShot?: boolean;
406
407
  }): Promise<{
407
408
  txid: string;
408
409
  amount: number;
package/dist/protocol.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  validatePlan,
43
43
  watchMarkets,
44
44
  watchOfferSwaps
45
- } from "./chunk-T4FHBWZI.js";
45
+ } from "./chunk-G5QURHVP.js";
46
46
  import {
47
47
  ARKADE_BTC,
48
48
  ASSET_CARRIER_SATS,
@@ -128,7 +128,7 @@ import {
128
128
  verifyLockupAddress,
129
129
  verifyOfferAddress,
130
130
  verifyReceiveInvoice
131
- } from "./chunk-FMRAV77W.js";
131
+ } from "./chunk-2AQYBSF5.js";
132
132
  import {
133
133
  collectRfqSwaps
134
134
  } from "./chunk-A3SHHRX4.js";
@@ -450,7 +450,7 @@ function solverOnchainRail(deps) {
450
450
  const rendezvous = await rendezvousFor(amount);
451
451
  if (!rendezvous) {
452
452
  throw new Error(
453
- `${SOLVER_ONCHAIN_RAIL}: no solver serves arkade:BTC -> onchain:BTC at ${amount} sats`
453
+ `${SOLVER_ONCHAIN_RAIL}: no solver serves onchain payments at ${amount} sats`
454
454
  );
455
455
  }
456
456
  const negotiated = await deps.connect(
@@ -553,7 +553,7 @@ function solverLightningRail(deps) {
553
553
  const rendezvous = await rendezvousFor(facts.amountSats);
554
554
  if (!rendezvous) {
555
555
  throw new Error(
556
- `${SOLVER_LIGHTNING_RAIL}: no solver serves arkade:BTC -> lightning:BTC at ${facts.amountSats} sats`
556
+ `${SOLVER_LIGHTNING_RAIL}: no solver serves Lightning payments at ${facts.amountSats} sats`
557
557
  );
558
558
  }
559
559
  const negotiated = await deps.connect(
@@ -1,6 +1,6 @@
1
1
  import { RealmLike } from '@arkade-os/sdk/repositories/realm';
2
2
  import { PageRequest, PageResult } from '@arkade-os/sdk';
3
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-C4pvymhs.cjs';
3
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-BW42Dtct.cjs';
4
4
  import '@arkade-os/solver-discovery';
5
5
  import '../../rfq-C0tHOvn6.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { RealmLike } from '@arkade-os/sdk/repositories/realm';
2
2
  import { PageRequest, PageResult } from '@arkade-os/sdk';
3
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-BBVRh9ez.js';
3
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-ChRNknNn.js';
4
4
  import '@arkade-os/solver-discovery';
5
5
  import '../../rfq-C0tHOvn6.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { SQLExecutor } from '@arkade-os/sdk/repositories/sqlite';
2
2
  import { PageRequest, PageResult } from '@arkade-os/sdk';
3
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-C4pvymhs.cjs';
3
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-BW42Dtct.cjs';
4
4
  import '@arkade-os/solver-discovery';
5
5
  import '../../rfq-C0tHOvn6.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { SQLExecutor } from '@arkade-os/sdk/repositories/sqlite';
2
2
  import { PageRequest, PageResult } from '@arkade-os/sdk';
3
- import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-BBVRh9ez.js';
3
+ import { d as AssetSwapRepository, h as AssetSwap, e as RfqSwapRecord, f as RfqSwapPageFilter, g as RfqSwapPageCursor, S as SwapRecord, b9 as MarketsCacheEntry } from '../../repository-ChRNknNn.js';
4
4
  import '@arkade-os/solver-discovery';
5
5
  import '../../rfq-C0tHOvn6.js';
6
6
 
@@ -308,6 +308,7 @@ declare function pushRefundWithoutReceiver(operator: SwapOperator, input: {
308
308
  refundPkScript?: Uint8Array;
309
309
  /** @see operatorUnrollScript */
310
310
  network?: Network;
311
+ oneShot?: boolean;
311
312
  }): Promise<{
312
313
  txid: string;
313
314
  amount: number;
@@ -308,6 +308,7 @@ declare function pushRefundWithoutReceiver(operator: SwapOperator, input: {
308
308
  refundPkScript?: Uint8Array;
309
309
  /** @see operatorUnrollScript */
310
310
  network?: Network;
311
+ oneShot?: boolean;
311
312
  }): Promise<{
312
313
  txid: string;
313
314
  amount: number;
@@ -1,5 +1,5 @@
1
1
  import { IWallet } from '@arkade-os/sdk';
2
- import { c as AssetSwapStatus, d as AssetSwapRepository, h as AssetSwap } from './repository-BBVRh9ez.js';
2
+ import { c as AssetSwapStatus, d as AssetSwapRepository, h as AssetSwap } from './repository-ChRNknNn.js';
3
3
 
4
4
  /**
5
5
  * What this watcher needs to know about an offer swap, narrower than {@link AssetSwap}
@@ -1,5 +1,5 @@
1
1
  import { IWallet } from '@arkade-os/sdk';
2
- import { c as AssetSwapStatus, d as AssetSwapRepository, h as AssetSwap } from './repository-C4pvymhs.cjs';
2
+ import { c as AssetSwapStatus, d as AssetSwapRepository, h as AssetSwap } from './repository-BW42Dtct.cjs';
3
3
 
4
4
  /**
5
5
  * What this watcher needs to know about an offer swap, narrower than {@link AssetSwap}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/swap",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Client-side Arkade Intents asset swaps: state a route, get an outcome. Pay a bolt11 invoice, receive over Lightning, exchange assets, or withdraw onchain.",
6
6
  "repository": {
@@ -104,7 +104,7 @@
104
104
  "@scure/base": "2.4.0",
105
105
  "@scure/btc-signer": "2.4.1",
106
106
  "light-bolt11-decoder": "3.2.0",
107
- "@arkade-os/sdk": "0.5.1"
107
+ "@arkade-os/sdk": "0.5.3"
108
108
  },
109
109
  "peerDependencies": {
110
110
  "nostr-tools": "2.24.1"