@arkade-os/swap 0.1.9 → 0.1.10
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.
- package/dist/advanced.cjs +1097 -541
- package/dist/advanced.d.cts +19 -21
- package/dist/advanced.d.ts +19 -21
- package/dist/advanced.js +40 -34
- package/dist/{chunk-FQNG4XMF.js → chunk-2HQZLIVX.js} +98 -37
- package/dist/{chunk-5QPJWOCN.js → chunk-6RJVT65W.js} +2 -0
- package/dist/chunk-AUJDREZN.js +445 -0
- package/dist/{chunk-I7WEXXZX.js → chunk-FWRDAL73.js} +157 -477
- package/dist/{chunk-552GDPBU.js → chunk-LCO6AJOS.js} +433 -59
- package/dist/index.cjs +1083 -530
- package/dist/index.d.cts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +24 -22
- package/dist/{lockupContract-DguuT7NK.d.cts → lockupContract-BTTRVwOt.d.cts} +1 -1
- package/dist/{lockupContract-BUOsghl1.d.ts → lockupContract-aFarhlxj.d.ts} +1 -1
- package/dist/node/index.d.cts +97 -67
- package/dist/node/index.d.ts +97 -67
- package/dist/nostr.cjs +925 -516
- package/dist/nostr.d.cts +1 -1
- package/dist/nostr.d.ts +1 -1
- package/dist/nostr.js +3 -2
- package/dist/{offerFillPlan-_AOLo6kh.d.ts → offerFillPlan-CJC5tnEd.d.ts} +10 -42
- package/dist/{offerFillPlan-Bp6-z6dS.d.cts → offerFillPlan-FmyaQoYT.d.cts} +10 -42
- package/dist/protocol.cjs +1054 -175
- package/dist/protocol.d.cts +42 -23
- package/dist/protocol.d.ts +42 -23
- package/dist/protocol.js +20 -7
- package/dist/repositories/realm/index.d.cts +3 -2
- package/dist/repositories/realm/index.d.ts +3 -2
- package/dist/repositories/sqlite/index.d.cts +3 -2
- package/dist/repositories/sqlite/index.d.ts +3 -2
- package/dist/{repository-CkKK0dGO.d.ts → repository-CwwhIAEd.d.cts} +406 -74
- package/dist/{repository--pfikw2R.d.cts → repository-DO6QKxBx.d.ts} +406 -74
- package/dist/{rfq-IzhOCG02.d.ts → rfq-CYxOyniL.d.ts} +52 -11
- package/dist/rfq-contract.cjs +3 -0
- package/dist/rfq-contract.d.cts +3 -1
- package/dist/rfq-contract.d.ts +3 -1
- package/dist/rfq-contract.js +3 -1
- package/dist/{rfq-BRpo5uWU.d.cts → rfq-nMGywkqI.d.cts} +52 -11
- package/dist/verify-ENO36VPK.js +33 -0
- package/dist/{watch-pvTVFp6-.d.cts → watch-DpDSP2tu.d.cts} +4 -3
- package/dist/{watch-DDNycuUa.d.ts → watch-_fZSgx_l.d.ts} +4 -3
- package/package.json +2 -2
- package/dist/offer-BhonWuKR.d.ts +0 -274
- package/dist/offer-D_qHpWo2.d.cts +0 -274
package/dist/nostr.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransportCardFetcher } from '@arkade-os/solver-discovery';
|
|
2
|
-
import {
|
|
2
|
+
import { m as RfqTransport } from './rfq-nMGywkqI.cjs';
|
|
3
3
|
import { SimplePool } from 'nostr-tools';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
5
|
import './rfq-contract.cjs';
|
package/dist/nostr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransportCardFetcher } from '@arkade-os/solver-discovery';
|
|
2
|
-
import {
|
|
2
|
+
import { m as RfqTransport } from './rfq-CYxOyniL.js';
|
|
3
3
|
import { SimplePool } from 'nostr-tools';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
5
|
import './rfq-contract.js';
|
package/dist/nostr.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
expectQuote,
|
|
3
3
|
pairOf
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-LCO6AJOS.js";
|
|
5
|
+
import "./chunk-6RJVT65W.js";
|
|
6
6
|
import "./chunk-A3SHHRX4.js";
|
|
7
7
|
|
|
8
8
|
// src/nostr.ts
|
|
@@ -186,6 +186,7 @@ var nostrRfqTransport = (options) => {
|
|
|
186
186
|
{ kinds: [RFQ_DIRECTED_KIND], "#p": [pubkey], authors: [solverPubkey] },
|
|
187
187
|
{
|
|
188
188
|
onevent(event) {
|
|
189
|
+
if (event.pubkey !== solverPubkey || !verifyEvent(event)) return;
|
|
189
190
|
let payload;
|
|
190
191
|
try {
|
|
191
192
|
payload = JSON.parse(nip44.v2.decrypt(event.content, conversationKey));
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IWallet, NetworkName, Network, SignerSet, OnchainProvider, OperatorInfo, VHTLC, ProvisionedKey, ProvisionedClaimSecret, Transaction } from '@arkade-os/sdk';
|
|
2
|
-
import {
|
|
3
|
-
import { I as InvoiceFacts,
|
|
2
|
+
import { bb as SwapOperator, d as AssetSwapRepository, bd as RfqSwapManagerCallbacks, C as Corridor, I as Instrument, be as RfqSwapActionName, N as NetworkRef, A as AssetId, am as SnapshotRef, a2 as MarketBackend, W as CardMarketRef, a3 as MarketRef, D as AssetRef, q as AmountOn, an as Swap, X as CorridorId, Z as DepositArtifact, l as QuoteInput, a7 as Quote, ac as RankedBid, aq as SwapUpdate, as as Unsubscribe, S as SwapRecord, Q as QuoteId, a5 as Outcome, L as LockupSpendIndexer, ba as SwapContractRegistry, j as ResolvedEndpoint, P as PinnedAmount, B as AssetPaymentTerms, bf as DerivedOffer, z as AssetPaymentInput, O as OfferSwapRecord, F as AssetSwapId, ao as SwapFamily, i as RouteResolution, bg as FillFunding, bh as FillOutpoint, bi as FillInputOwner, bj as OfferBinding } from './repository-DO6QKxBx.js';
|
|
3
|
+
import { I as InvoiceFacts, P as Pubkey, C as ChainSource, R as RfqQuote, L as LightningSendContractParams, j as LightningReceiveContractParams, O as OnchainHtlc, k as OnchainHtlcParams, l as OnchainNetwork, A as AttestingRfqTransport, b as RfqTransportFactory, S as SwapRefusal } from './rfq-CYxOyniL.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-BhonWuKR.js';
|
|
6
|
-
import * as nostr_tools from 'nostr-tools';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* What a corridor is given, what a caller may replace, and where "overridden to nothing" is refused.
|
|
@@ -1013,41 +1011,6 @@ interface ParsedRfqQuote {
|
|
|
1013
1011
|
/** Read a solver's quote, decoding both amounts. */
|
|
1014
1012
|
declare const parseRfqQuote: (quote: RfqQuote) => ParsedRfqQuote;
|
|
1015
1013
|
|
|
1016
|
-
/** An {@link RfqTransport} that can prove who answered. Absent means "attests nobody". */
|
|
1017
|
-
interface AttestingRfqTransport extends RfqTransport {
|
|
1018
|
-
/**
|
|
1019
|
-
* The x-only key every reply on this transport is proven to come from. Must be a claim the
|
|
1020
|
-
* transport ENFORCES (an author filter plus a conversation key only that author can decrypt
|
|
1021
|
-
* to); setting it otherwise turns a check into a decoration.
|
|
1022
|
-
*/
|
|
1023
|
-
readonly attestedResponder?: Pubkey;
|
|
1024
|
-
}
|
|
1025
|
-
/** What a factory is told about the card it is opening a rendezvous to. */
|
|
1026
|
-
interface RfqRendezvous {
|
|
1027
|
-
readonly card: DiscoveredMarket;
|
|
1028
|
-
/** The card's `discovery_pubkey` — who the request is addressed to. */
|
|
1029
|
-
readonly solverPubkey: Pubkey;
|
|
1030
|
-
/** The card's relays. */
|
|
1031
|
-
readonly relays: readonly string[];
|
|
1032
|
-
}
|
|
1033
|
-
type RfqTransportFactory = (rendezvous: RfqRendezvous) => AttestingRfqTransport | Promise<AttestingRfqTransport>;
|
|
1034
|
-
/** Declare that `transport` proves every reply came from `responder`. */
|
|
1035
|
-
declare const attesting: <T extends RfqTransport>(transport: T, responder: Pubkey) => AttestingRfqTransport;
|
|
1036
|
-
/**
|
|
1037
|
-
* Build the card's Nostr rendezvous bound to one pool, so discovery, quotes, and an
|
|
1038
|
-
* app's own readers share one socket per relay. Pass the process-wide
|
|
1039
|
-
* `sharedNostrPool()` from `@arkade-os/swap/nostr`, or one the caller owns from
|
|
1040
|
-
* `createNostrPool()` (a bare `SimplePool` lets one double close drop the shared socket);
|
|
1041
|
-
* omitting it keeps the shared default.
|
|
1042
|
-
*/
|
|
1043
|
-
declare const createNostrTransportFactory: (pool?: nostr_tools.SimplePool) => RfqTransportFactory;
|
|
1044
|
-
/**
|
|
1045
|
-
* The default: the card's own Nostr rendezvous. It attests the discovery key because
|
|
1046
|
-
* `nostrRfqTransport` subscribes with `authors: [solverPubkey]` and decrypts against that key — any
|
|
1047
|
-
* other reply is filtered by the relay or fails to decrypt.
|
|
1048
|
-
*/
|
|
1049
|
-
declare const nostrTransportFactory: RfqTransportFactory;
|
|
1050
|
-
|
|
1051
1014
|
/** What every negotiated quote carries, whatever it settles through. */
|
|
1052
1015
|
interface NegotiatedPreparation {
|
|
1053
1016
|
readonly backend: "rfq";
|
|
@@ -1199,6 +1162,8 @@ interface AcceptInput {
|
|
|
1199
1162
|
/** Unix seconds. */
|
|
1200
1163
|
readonly now: number;
|
|
1201
1164
|
readonly validUntil?: number;
|
|
1165
|
+
/** `false` funds an offer without its packet. Written on the record before any funding. */
|
|
1166
|
+
readonly attachOfferPacket?: boolean;
|
|
1202
1167
|
}
|
|
1203
1168
|
declare const conflictingFields: (record: SwapRecord, quote: Quote) => string[];
|
|
1204
1169
|
/**
|
|
@@ -1223,7 +1188,7 @@ interface CancelInput {
|
|
|
1223
1188
|
* read the call makes, and what the gate is written from. */
|
|
1224
1189
|
readonly record: OfferSwapRecord;
|
|
1225
1190
|
/** The delivery channel both edges emit through, armed or not. */
|
|
1226
|
-
readonly drive: SwapDrive
|
|
1191
|
+
readonly drive: Pick<SwapDrive, "ingest">;
|
|
1227
1192
|
readonly indexer: LockupSpendIndexer;
|
|
1228
1193
|
/** Unix seconds. Injected for tests. */
|
|
1229
1194
|
readonly now?: () => number;
|
|
@@ -1267,6 +1232,9 @@ interface SwapClientConfig {
|
|
|
1267
1232
|
interface AcceptOptions {
|
|
1268
1233
|
/** Final funding submission deadline, Unix seconds, capped by the quote expiry. */
|
|
1269
1234
|
readonly validUntil?: number;
|
|
1235
|
+
/** `false` funds an offer with no packet. Default on: a seed-only restore finds an unfilled
|
|
1236
|
+
* deposit by it. Kept on the record, so a resumed funding chooses the same. */
|
|
1237
|
+
readonly attachOfferPacket?: boolean;
|
|
1270
1238
|
}
|
|
1271
1239
|
interface SwapClient {
|
|
1272
1240
|
/**
|
|
@@ -1670,7 +1638,7 @@ interface BuildOfferFillPlanOpts {
|
|
|
1670
1638
|
sponsor?: FillSponsor;
|
|
1671
1639
|
}
|
|
1672
1640
|
/** Builds an unsigned offer fill without signing or submitting the spend. */
|
|
1673
|
-
declare function buildOfferFillPlan(wallet: IWallet, arkServerUrl: string, offerHex: string, opts: BuildOfferFillPlanOpts): Promise<JointGraph>;
|
|
1641
|
+
declare function buildOfferFillPlan(wallet: IWallet, arkServerUrl: string, offerHex: string | OfferBinding, opts: BuildOfferFillPlanOpts): Promise<JointGraph>;
|
|
1674
1642
|
declare function verifyOfferFillPlan(plan: JointGraph): boolean;
|
|
1675
1643
|
|
|
1676
|
-
export { type
|
|
1644
|
+
export { type LockupOwner as $, type AssetAliasTable as A, type BuildOfferFillPlanOpts as B, type CorridorFactory as C, type DiscoveryIndex as D, type CorridorPass as E, type CorridorRfqPreparation as F, DEFAULT_MAX_REFUND_WINDOW_SECONDS as G, type DiscoveryConfig as H, type DiscoveryIndexInput as I, DiscoverySnapshotUnavailable as J, type DriveMode as K, type LightningCorridorDeps as L, type MarketCandidate as M, type DriveRefusal as N, type OnchainCorridorDeps as O, type ExchangeOptions as P, FEED_TTL_MS as Q, type FeeCeiling as R, type SwapPolicy as S, type FeedFetch as T, type FeedQuoteInput as U, type FillSponsor as V, type FillSponsorFare as W, INDEXED_NETWORKS as X, InconsistentRoute as Y, InsufficientFunds as Z, type JointGraph as _, type ArkadeCorridorDeps as a, isUsableCard as a$, type Market as a0, type MarketLeg as a1, MaxFeeExceeded as a2, MissingCorridorDep as a3, NotCancellable as a4, OFFER_FILL_OWNERS as a5, OFFER_FILL_TEMPLATE as a6, ONCHAIN_CLAIM_FEE_RATE_SATVB as a7, type ObservationSeam as a8, type OfferPreparation as a9, type SwapError as aA, type SwapErrorName as aB, type SwapFilter as aC, UnsupportedRoute as aD, type VerbDeps as aE, acceptQuote as aF, buildOfferFillPlan as aG, cancelSwap as aH, canonicalAssetId as aI, cardMarketOf as aJ, chooseMarket as aK, conflictingFields as aL, corridorSet as aM, createSwapClient as aN, createSwapDrive as aO, deepFreeze as aP, digestJointGraph as aQ, discoveryIndex as aR, eligibleMarkets as aS, enforceFeeCeiling as aT, exchange as aU, feedFetch as aV, feedSpread as aW, isAddressable as aX, isCardMarket as aY, isIndexedNetwork as aZ, isSwapError as a_, type OnchainClaim as aa, type OnchainRefund as ab, OperatorUnreachable as ac, type ParsedRfqQuote as ad, type PayOptions as ae, type PayResult as af, type QuoteCheck as ag, QuoteExpired as ah, type QuotePreparation as ai, QuoteVerificationFailed as aj, REGISTRY_URL as ak, type ReceiveArtifact as al, type ReceiveOptions as am, type ReceiveRequest as an, type RecoveryResult as ao, type RegisteredAsset as ap, type RfqAuctionPolicy as aq, type RfqPreparation as ar, type RfqQuoteInput as as, type RouteSide as at, SWAP_ERROR_NAMES as au, type SwapClient as av, type SwapClientConfig as aw, type SwapDrive as ax, type SwapDriveConfig as ay, SwapDriveRefusedError as az, type CorridorSet as b, liveArkadeInfo as b0, liveOperatorInfo as b1, marketBackendOf as b2, marketKeyOf as b3, marketOf as b4, marketRefOf as b5, parseRfqQuote as b6, pay as b7, quoteFromFeed as b8, quoteViaRfq as b9, readableRecord as ba, receive as bb, resolveCorridorBase as bc, resolveCorridorDeps as bd, rfqLeg as be, rfqPairFor as bf, swapRecordOf as bg, toDiscoveryLeg as bh, unsignedPsbtBytes as bi, usableMarkets as bj, verifyJointGraph as bk, verifyOfferFillPlan as bl, verifyPlanLegs as bm, withCanonicalAmount as bn, type DiscoveryLeg as c, type DiscoverySnapshot as d, AcceptConflict as e, type AcceptInput as f, type AcceptOptions as g, AmbiguousDestination as h, AmountEncodingUnsupported as i, AmountMismatch as j, type AssetRfqPreparation as k, CORRIDOR_FACTORIES as l, type CancelInput as m, type CancelOutcome as n, type ClaimedDestination as o, ClientDisposed as p, type CorridorBase as q, type CorridorClaim as r, type CorridorCovenant as s, type CorridorDeadline as t, type CorridorDeps as u, type CorridorDepsByCorridor as v, type CorridorDrive as w, type CorridorLockup as x, type CorridorModule as y, type CorridorOverrides as z };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IWallet, NetworkName, Network, SignerSet, OnchainProvider, OperatorInfo, VHTLC, ProvisionedKey, ProvisionedClaimSecret, Transaction } from '@arkade-os/sdk';
|
|
2
|
-
import {
|
|
3
|
-
import { I as InvoiceFacts,
|
|
2
|
+
import { bb as SwapOperator, d as AssetSwapRepository, bd as RfqSwapManagerCallbacks, C as Corridor, I as Instrument, be as RfqSwapActionName, N as NetworkRef, A as AssetId, am as SnapshotRef, a2 as MarketBackend, W as CardMarketRef, a3 as MarketRef, D as AssetRef, q as AmountOn, an as Swap, X as CorridorId, Z as DepositArtifact, l as QuoteInput, a7 as Quote, ac as RankedBid, aq as SwapUpdate, as as Unsubscribe, S as SwapRecord, Q as QuoteId, a5 as Outcome, L as LockupSpendIndexer, ba as SwapContractRegistry, j as ResolvedEndpoint, P as PinnedAmount, B as AssetPaymentTerms, bf as DerivedOffer, z as AssetPaymentInput, O as OfferSwapRecord, F as AssetSwapId, ao as SwapFamily, i as RouteResolution, bg as FillFunding, bh as FillOutpoint, bi as FillInputOwner, bj as OfferBinding } from './repository-CwwhIAEd.cjs';
|
|
3
|
+
import { I as InvoiceFacts, P as Pubkey, C as ChainSource, R as RfqQuote, L as LightningSendContractParams, j as LightningReceiveContractParams, O as OnchainHtlc, k as OnchainHtlcParams, l as OnchainNetwork, A as AttestingRfqTransport, b as RfqTransportFactory, S as SwapRefusal } from './rfq-nMGywkqI.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-D_qHpWo2.cjs';
|
|
6
|
-
import * as nostr_tools from 'nostr-tools';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* What a corridor is given, what a caller may replace, and where "overridden to nothing" is refused.
|
|
@@ -1013,41 +1011,6 @@ interface ParsedRfqQuote {
|
|
|
1013
1011
|
/** Read a solver's quote, decoding both amounts. */
|
|
1014
1012
|
declare const parseRfqQuote: (quote: RfqQuote) => ParsedRfqQuote;
|
|
1015
1013
|
|
|
1016
|
-
/** An {@link RfqTransport} that can prove who answered. Absent means "attests nobody". */
|
|
1017
|
-
interface AttestingRfqTransport extends RfqTransport {
|
|
1018
|
-
/**
|
|
1019
|
-
* The x-only key every reply on this transport is proven to come from. Must be a claim the
|
|
1020
|
-
* transport ENFORCES (an author filter plus a conversation key only that author can decrypt
|
|
1021
|
-
* to); setting it otherwise turns a check into a decoration.
|
|
1022
|
-
*/
|
|
1023
|
-
readonly attestedResponder?: Pubkey;
|
|
1024
|
-
}
|
|
1025
|
-
/** What a factory is told about the card it is opening a rendezvous to. */
|
|
1026
|
-
interface RfqRendezvous {
|
|
1027
|
-
readonly card: DiscoveredMarket;
|
|
1028
|
-
/** The card's `discovery_pubkey` — who the request is addressed to. */
|
|
1029
|
-
readonly solverPubkey: Pubkey;
|
|
1030
|
-
/** The card's relays. */
|
|
1031
|
-
readonly relays: readonly string[];
|
|
1032
|
-
}
|
|
1033
|
-
type RfqTransportFactory = (rendezvous: RfqRendezvous) => AttestingRfqTransport | Promise<AttestingRfqTransport>;
|
|
1034
|
-
/** Declare that `transport` proves every reply came from `responder`. */
|
|
1035
|
-
declare const attesting: <T extends RfqTransport>(transport: T, responder: Pubkey) => AttestingRfqTransport;
|
|
1036
|
-
/**
|
|
1037
|
-
* Build the card's Nostr rendezvous bound to one pool, so discovery, quotes, and an
|
|
1038
|
-
* app's own readers share one socket per relay. Pass the process-wide
|
|
1039
|
-
* `sharedNostrPool()` from `@arkade-os/swap/nostr`, or one the caller owns from
|
|
1040
|
-
* `createNostrPool()` (a bare `SimplePool` lets one double close drop the shared socket);
|
|
1041
|
-
* omitting it keeps the shared default.
|
|
1042
|
-
*/
|
|
1043
|
-
declare const createNostrTransportFactory: (pool?: nostr_tools.SimplePool) => RfqTransportFactory;
|
|
1044
|
-
/**
|
|
1045
|
-
* The default: the card's own Nostr rendezvous. It attests the discovery key because
|
|
1046
|
-
* `nostrRfqTransport` subscribes with `authors: [solverPubkey]` and decrypts against that key — any
|
|
1047
|
-
* other reply is filtered by the relay or fails to decrypt.
|
|
1048
|
-
*/
|
|
1049
|
-
declare const nostrTransportFactory: RfqTransportFactory;
|
|
1050
|
-
|
|
1051
1014
|
/** What every negotiated quote carries, whatever it settles through. */
|
|
1052
1015
|
interface NegotiatedPreparation {
|
|
1053
1016
|
readonly backend: "rfq";
|
|
@@ -1199,6 +1162,8 @@ interface AcceptInput {
|
|
|
1199
1162
|
/** Unix seconds. */
|
|
1200
1163
|
readonly now: number;
|
|
1201
1164
|
readonly validUntil?: number;
|
|
1165
|
+
/** `false` funds an offer without its packet. Written on the record before any funding. */
|
|
1166
|
+
readonly attachOfferPacket?: boolean;
|
|
1202
1167
|
}
|
|
1203
1168
|
declare const conflictingFields: (record: SwapRecord, quote: Quote) => string[];
|
|
1204
1169
|
/**
|
|
@@ -1223,7 +1188,7 @@ interface CancelInput {
|
|
|
1223
1188
|
* read the call makes, and what the gate is written from. */
|
|
1224
1189
|
readonly record: OfferSwapRecord;
|
|
1225
1190
|
/** The delivery channel both edges emit through, armed or not. */
|
|
1226
|
-
readonly drive: SwapDrive
|
|
1191
|
+
readonly drive: Pick<SwapDrive, "ingest">;
|
|
1227
1192
|
readonly indexer: LockupSpendIndexer;
|
|
1228
1193
|
/** Unix seconds. Injected for tests. */
|
|
1229
1194
|
readonly now?: () => number;
|
|
@@ -1267,6 +1232,9 @@ interface SwapClientConfig {
|
|
|
1267
1232
|
interface AcceptOptions {
|
|
1268
1233
|
/** Final funding submission deadline, Unix seconds, capped by the quote expiry. */
|
|
1269
1234
|
readonly validUntil?: number;
|
|
1235
|
+
/** `false` funds an offer with no packet. Default on: a seed-only restore finds an unfilled
|
|
1236
|
+
* deposit by it. Kept on the record, so a resumed funding chooses the same. */
|
|
1237
|
+
readonly attachOfferPacket?: boolean;
|
|
1270
1238
|
}
|
|
1271
1239
|
interface SwapClient {
|
|
1272
1240
|
/**
|
|
@@ -1670,7 +1638,7 @@ interface BuildOfferFillPlanOpts {
|
|
|
1670
1638
|
sponsor?: FillSponsor;
|
|
1671
1639
|
}
|
|
1672
1640
|
/** Builds an unsigned offer fill without signing or submitting the spend. */
|
|
1673
|
-
declare function buildOfferFillPlan(wallet: IWallet, arkServerUrl: string, offerHex: string, opts: BuildOfferFillPlanOpts): Promise<JointGraph>;
|
|
1641
|
+
declare function buildOfferFillPlan(wallet: IWallet, arkServerUrl: string, offerHex: string | OfferBinding, opts: BuildOfferFillPlanOpts): Promise<JointGraph>;
|
|
1674
1642
|
declare function verifyOfferFillPlan(plan: JointGraph): boolean;
|
|
1675
1643
|
|
|
1676
|
-
export { type
|
|
1644
|
+
export { type LockupOwner as $, type AssetAliasTable as A, type BuildOfferFillPlanOpts as B, type CorridorFactory as C, type DiscoveryIndex as D, type CorridorPass as E, type CorridorRfqPreparation as F, DEFAULT_MAX_REFUND_WINDOW_SECONDS as G, type DiscoveryConfig as H, type DiscoveryIndexInput as I, DiscoverySnapshotUnavailable as J, type DriveMode as K, type LightningCorridorDeps as L, type MarketCandidate as M, type DriveRefusal as N, type OnchainCorridorDeps as O, type ExchangeOptions as P, FEED_TTL_MS as Q, type FeeCeiling as R, type SwapPolicy as S, type FeedFetch as T, type FeedQuoteInput as U, type FillSponsor as V, type FillSponsorFare as W, INDEXED_NETWORKS as X, InconsistentRoute as Y, InsufficientFunds as Z, type JointGraph as _, type ArkadeCorridorDeps as a, isUsableCard as a$, type Market as a0, type MarketLeg as a1, MaxFeeExceeded as a2, MissingCorridorDep as a3, NotCancellable as a4, OFFER_FILL_OWNERS as a5, OFFER_FILL_TEMPLATE as a6, ONCHAIN_CLAIM_FEE_RATE_SATVB as a7, type ObservationSeam as a8, type OfferPreparation as a9, type SwapError as aA, type SwapErrorName as aB, type SwapFilter as aC, UnsupportedRoute as aD, type VerbDeps as aE, acceptQuote as aF, buildOfferFillPlan as aG, cancelSwap as aH, canonicalAssetId as aI, cardMarketOf as aJ, chooseMarket as aK, conflictingFields as aL, corridorSet as aM, createSwapClient as aN, createSwapDrive as aO, deepFreeze as aP, digestJointGraph as aQ, discoveryIndex as aR, eligibleMarkets as aS, enforceFeeCeiling as aT, exchange as aU, feedFetch as aV, feedSpread as aW, isAddressable as aX, isCardMarket as aY, isIndexedNetwork as aZ, isSwapError as a_, type OnchainClaim as aa, type OnchainRefund as ab, OperatorUnreachable as ac, type ParsedRfqQuote as ad, type PayOptions as ae, type PayResult as af, type QuoteCheck as ag, QuoteExpired as ah, type QuotePreparation as ai, QuoteVerificationFailed as aj, REGISTRY_URL as ak, type ReceiveArtifact as al, type ReceiveOptions as am, type ReceiveRequest as an, type RecoveryResult as ao, type RegisteredAsset as ap, type RfqAuctionPolicy as aq, type RfqPreparation as ar, type RfqQuoteInput as as, type RouteSide as at, SWAP_ERROR_NAMES as au, type SwapClient as av, type SwapClientConfig as aw, type SwapDrive as ax, type SwapDriveConfig as ay, SwapDriveRefusedError as az, type CorridorSet as b, liveArkadeInfo as b0, liveOperatorInfo as b1, marketBackendOf as b2, marketKeyOf as b3, marketOf as b4, marketRefOf as b5, parseRfqQuote as b6, pay as b7, quoteFromFeed as b8, quoteViaRfq as b9, readableRecord as ba, receive as bb, resolveCorridorBase as bc, resolveCorridorDeps as bd, rfqLeg as be, rfqPairFor as bf, swapRecordOf as bg, toDiscoveryLeg as bh, unsignedPsbtBytes as bi, usableMarkets as bj, verifyJointGraph as bk, verifyOfferFillPlan as bl, verifyPlanLegs as bm, withCanonicalAmount as bn, type DiscoveryLeg as c, type DiscoverySnapshot as d, AcceptConflict as e, type AcceptInput as f, type AcceptOptions as g, AmbiguousDestination as h, AmountEncodingUnsupported as i, AmountMismatch as j, type AssetRfqPreparation as k, CORRIDOR_FACTORIES as l, type CancelInput as m, type CancelOutcome as n, type ClaimedDestination as o, ClientDisposed as p, type CorridorBase as q, type CorridorClaim as r, type CorridorCovenant as s, type CorridorDeadline as t, type CorridorDeps as u, type CorridorDepsByCorridor as v, type CorridorDrive as w, type CorridorLockup as x, type CorridorModule as y, type CorridorOverrides as z };
|