@arkade-os/swap 0.0.10 → 0.0.12
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/README.md +17 -0
- package/dist/{chunk-5NPYNQ5V.js → chunk-XXWOODUE.js} +114 -29
- package/dist/index.cjs +587 -83
- package/dist/index.d.cts +171 -16
- package/dist/index.d.ts +171 -16
- package/dist/index.js +450 -36
- package/dist/nostr.d.cts +1 -1
- package/dist/nostr.d.ts +1 -1
- package/dist/nostr.js +1 -1
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/{repository-C8FXlmHY.d.cts → repository-DaK1RzRq.d.cts} +45 -5
- package/dist/{repository-Cw2EvvZG.d.ts → repository-DlLvj_y6.d.ts} +45 -5
- package/dist/{rfq-DglvHMNC.d.ts → rfq-DzsmhXX3.d.cts} +75 -20
- package/dist/{rfq-DglvHMNC.d.cts → rfq-DzsmhXX3.d.ts} +75 -20
- package/package.json +2 -2
package/dist/nostr.d.cts
CHANGED
package/dist/nostr.d.ts
CHANGED
package/dist/nostr.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RealmLike } from '@arkade-os/sdk/repositories/realm';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-DaK1RzRq.cjs';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-DzsmhXX3.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Realm backend for React Native.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RealmLike } from '@arkade-os/sdk/repositories/realm';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-DlLvj_y6.js';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-DzsmhXX3.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Realm backend for React Native.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SQLExecutor } from '@arkade-os/sdk/repositories/sqlite';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-DaK1RzRq.cjs';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-DzsmhXX3.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* SQLite backend over the SDK's `SQLExecutor`, so any driver plugs in
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SQLExecutor } from '@arkade-os/sdk/repositories/sqlite';
|
|
2
|
-
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-
|
|
2
|
+
import { A as AssetSwapRepository, a as AssetSwap, R as RfqSwapRecord, M as MarketsCacheEntry } from '../../repository-DlLvj_y6.js';
|
|
3
3
|
import '@arkade-os/solver-discovery';
|
|
4
4
|
import '@arkade-os/sdk';
|
|
5
|
-
import '../../rfq-
|
|
5
|
+
import '../../rfq-DzsmhXX3.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* SQLite backend over the SDK's `SQLExecutor`, so any driver plugs in
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscoveredMarket } from '@arkade-os/solver-discovery';
|
|
2
2
|
import { IWallet, ProvisionedKey, ProvisionedClaimSecret, RestArkProvider, RestIndexerProvider, VHTLC, Identity, IContractManager } from '@arkade-os/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { B as RfqStatus, R as RfqTransport, a as OnchainHtlc, f as ChainUtxo, C as ChainSource, v as OnchainHtlcPhase } from './rfq-DzsmhXX3.cjs';
|
|
4
4
|
|
|
5
5
|
type AssetSwapStatus = "pending" | "cancelling" | "fulfilled" | "cancelled" | "recoverable" | "awaiting_fill" | "claimable" | "claimed" | "refunded_l1";
|
|
6
6
|
/** The sentinel asset id for BTC itself, as opposed to a 68-hex asset id.
|
|
@@ -332,9 +332,11 @@ declare class LockupNeedsRecoveryError extends Error {
|
|
|
332
332
|
* defensively rather than assumed. It costs the two waiting callers nothing
|
|
333
333
|
* they wanted: `awaitLockupFunding` keeps waiting for a claimable lockup
|
|
334
334
|
* instead of publishing `P` into a spend that cannot land, and
|
|
335
|
-
* `refundIfUnresolved` reports
|
|
336
|
-
*
|
|
337
|
-
* {@link readLockupFate}, which queries unfiltered and reports it as `exited
|
|
335
|
+
* `refundIfUnresolved` reports rather than grinding a doomed push to its
|
|
336
|
+
* deadline. Both that function and `RfqSwapManager` name the exit through
|
|
337
|
+
* {@link readLockupFate}, which queries unfiltered and reports it as `exited`;
|
|
338
|
+
* this drop is the second line, and what still refuses the push on a pass where
|
|
339
|
+
* the fate read learned nothing.
|
|
338
340
|
*
|
|
339
341
|
* This read — not the RFQ's reported state — is the authority on whether
|
|
340
342
|
* there is anything left at the lockup.
|
|
@@ -555,6 +557,21 @@ type RefundOutcome =
|
|
|
555
557
|
outpoints: string[];
|
|
556
558
|
vtxos: LockupVtxo[];
|
|
557
559
|
status: RfqStatus | null;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* The lockup was unilaterally exited: its outputs sit onchain under the VHTLC
|
|
563
|
+
* script, where no offchain refund can reach them. Returned rather than
|
|
564
|
+
* retried: no amount of waiting changes where the money lives. Complete the
|
|
565
|
+
* unroll and spend the outputs onchain — then there is nothing left to refund.
|
|
566
|
+
*
|
|
567
|
+
* Distinct from {@link RefundOutcome} `needs_recovery` on purpose: that
|
|
568
|
+
* variant's remedy is recovery into a fresh batch, which is a spend no batch
|
|
569
|
+
* can make for an output that is already onchain.
|
|
570
|
+
*/
|
|
571
|
+
| {
|
|
572
|
+
outcome: "exited";
|
|
573
|
+
outpoints: string[];
|
|
574
|
+
status: RfqStatus | null;
|
|
558
575
|
};
|
|
559
576
|
/**
|
|
560
577
|
* Ask first, then fall back: watch the swap for the solver to resolve it, and
|
|
@@ -583,16 +600,36 @@ type RefundOutcome =
|
|
|
583
600
|
* is gone the CLTV refund is not "not yet" but "not this way", so it returns
|
|
584
601
|
* `needs_recovery` naming the outpoints rather than retrying until the
|
|
585
602
|
* deadline. Recover them and call again.
|
|
603
|
+
* - **An exited lockup ends it the same way, and is checked first.** Each pass
|
|
604
|
+
* past the deadline asks {@link readLockupFate} before reading what is
|
|
605
|
+
* refundable, so an output that has been unilaterally exited returns `exited`
|
|
606
|
+
* instead of feeding a push that cannot land. It costs one extra `getVtxos`
|
|
607
|
+
* per such pass (three where there were two), plus a `getVirtualTxs` on a
|
|
608
|
+
* fully-spent lockup; only the pass that returns `exited` saves the other two.
|
|
609
|
+
* Paid to prevent a push that would otherwise be retried to the deadline and
|
|
610
|
+
* then rethrown. A failing fate read is swallowed, not raised: it is a
|
|
611
|
+
* shortcut, and losing it must not end a wait the ordinary path could answer.
|
|
612
|
+
*
|
|
613
|
+
* A lockup funded in two sends of which only one exited reports `exited` for
|
|
614
|
+
* the whole thing and leaves the live half unrefunded. That is deliberate:
|
|
615
|
+
* `RfqSwapManager` reports the same lockup `exited` on the same any-output
|
|
616
|
+
* rule, and the two must not disagree.
|
|
586
617
|
*
|
|
587
618
|
* Safe to call late, and safe to call again: a caller recovering from a crash
|
|
588
619
|
* well past the deadline skips straight to the push, and a lockup that is
|
|
589
620
|
* already empty comes back as `nothing_to_refund` instead of an error.
|
|
590
621
|
*/
|
|
591
|
-
declare function refundIfUnresolved(transport: RfqTransport, ark: RefundArkProvider, indexer:
|
|
622
|
+
declare function refundIfUnresolved(transport: RfqTransport, ark: RefundArkProvider, indexer: LockupSpendIndexer, input: {
|
|
592
623
|
rfqId: string;
|
|
593
624
|
script: InstanceType<typeof VHTLC.ScriptV2>;
|
|
594
625
|
/** @see pushRefundWithoutReceiver */
|
|
595
626
|
sender: Identity;
|
|
627
|
+
/**
|
|
628
|
+
* `sha256(P)`, hex — the quote's `payment_hash`, as {@link readLockupFate}
|
|
629
|
+
* takes it. Not derivable from `script`, whose `preimageHash` is a
|
|
630
|
+
* `hash160` of the same secret.
|
|
631
|
+
*/
|
|
632
|
+
paymentHash: string;
|
|
596
633
|
/** `refund_locktime` from the quote, unix seconds. */
|
|
597
634
|
refundLocktime: number;
|
|
598
635
|
/** Defaults to the contract's own committed refund destination. */
|
|
@@ -792,6 +829,9 @@ interface OnchainSendSwap extends RfqSwapCommon {
|
|
|
792
829
|
htlc: OnchainHtlc;
|
|
793
830
|
/** `profile.min_confirmations` from the quote. */
|
|
794
831
|
minConfirmations: number;
|
|
832
|
+
/** Where {@link RfqSwapManagerCallbacks.claimOnchain} pays; optional only
|
|
833
|
+
* so records predating its profile slot still restore. */
|
|
834
|
+
payoutPkScript?: Uint8Array;
|
|
795
835
|
/** The fill's outpoint, learned on first sighting. Without it a SPENT
|
|
796
836
|
* HTLC reads as never funded — see {@link classifyOnchainHtlc}. */
|
|
797
837
|
funding?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscoveredMarket } from '@arkade-os/solver-discovery';
|
|
2
2
|
import { IWallet, ProvisionedKey, ProvisionedClaimSecret, RestArkProvider, RestIndexerProvider, VHTLC, Identity, IContractManager } from '@arkade-os/sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { B as RfqStatus, R as RfqTransport, a as OnchainHtlc, f as ChainUtxo, C as ChainSource, v as OnchainHtlcPhase } from './rfq-DzsmhXX3.js';
|
|
4
4
|
|
|
5
5
|
type AssetSwapStatus = "pending" | "cancelling" | "fulfilled" | "cancelled" | "recoverable" | "awaiting_fill" | "claimable" | "claimed" | "refunded_l1";
|
|
6
6
|
/** The sentinel asset id for BTC itself, as opposed to a 68-hex asset id.
|
|
@@ -332,9 +332,11 @@ declare class LockupNeedsRecoveryError extends Error {
|
|
|
332
332
|
* defensively rather than assumed. It costs the two waiting callers nothing
|
|
333
333
|
* they wanted: `awaitLockupFunding` keeps waiting for a claimable lockup
|
|
334
334
|
* instead of publishing `P` into a spend that cannot land, and
|
|
335
|
-
* `refundIfUnresolved` reports
|
|
336
|
-
*
|
|
337
|
-
* {@link readLockupFate}, which queries unfiltered and reports it as `exited
|
|
335
|
+
* `refundIfUnresolved` reports rather than grinding a doomed push to its
|
|
336
|
+
* deadline. Both that function and `RfqSwapManager` name the exit through
|
|
337
|
+
* {@link readLockupFate}, which queries unfiltered and reports it as `exited`;
|
|
338
|
+
* this drop is the second line, and what still refuses the push on a pass where
|
|
339
|
+
* the fate read learned nothing.
|
|
338
340
|
*
|
|
339
341
|
* This read — not the RFQ's reported state — is the authority on whether
|
|
340
342
|
* there is anything left at the lockup.
|
|
@@ -555,6 +557,21 @@ type RefundOutcome =
|
|
|
555
557
|
outpoints: string[];
|
|
556
558
|
vtxos: LockupVtxo[];
|
|
557
559
|
status: RfqStatus | null;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* The lockup was unilaterally exited: its outputs sit onchain under the VHTLC
|
|
563
|
+
* script, where no offchain refund can reach them. Returned rather than
|
|
564
|
+
* retried: no amount of waiting changes where the money lives. Complete the
|
|
565
|
+
* unroll and spend the outputs onchain — then there is nothing left to refund.
|
|
566
|
+
*
|
|
567
|
+
* Distinct from {@link RefundOutcome} `needs_recovery` on purpose: that
|
|
568
|
+
* variant's remedy is recovery into a fresh batch, which is a spend no batch
|
|
569
|
+
* can make for an output that is already onchain.
|
|
570
|
+
*/
|
|
571
|
+
| {
|
|
572
|
+
outcome: "exited";
|
|
573
|
+
outpoints: string[];
|
|
574
|
+
status: RfqStatus | null;
|
|
558
575
|
};
|
|
559
576
|
/**
|
|
560
577
|
* Ask first, then fall back: watch the swap for the solver to resolve it, and
|
|
@@ -583,16 +600,36 @@ type RefundOutcome =
|
|
|
583
600
|
* is gone the CLTV refund is not "not yet" but "not this way", so it returns
|
|
584
601
|
* `needs_recovery` naming the outpoints rather than retrying until the
|
|
585
602
|
* deadline. Recover them and call again.
|
|
603
|
+
* - **An exited lockup ends it the same way, and is checked first.** Each pass
|
|
604
|
+
* past the deadline asks {@link readLockupFate} before reading what is
|
|
605
|
+
* refundable, so an output that has been unilaterally exited returns `exited`
|
|
606
|
+
* instead of feeding a push that cannot land. It costs one extra `getVtxos`
|
|
607
|
+
* per such pass (three where there were two), plus a `getVirtualTxs` on a
|
|
608
|
+
* fully-spent lockup; only the pass that returns `exited` saves the other two.
|
|
609
|
+
* Paid to prevent a push that would otherwise be retried to the deadline and
|
|
610
|
+
* then rethrown. A failing fate read is swallowed, not raised: it is a
|
|
611
|
+
* shortcut, and losing it must not end a wait the ordinary path could answer.
|
|
612
|
+
*
|
|
613
|
+
* A lockup funded in two sends of which only one exited reports `exited` for
|
|
614
|
+
* the whole thing and leaves the live half unrefunded. That is deliberate:
|
|
615
|
+
* `RfqSwapManager` reports the same lockup `exited` on the same any-output
|
|
616
|
+
* rule, and the two must not disagree.
|
|
586
617
|
*
|
|
587
618
|
* Safe to call late, and safe to call again: a caller recovering from a crash
|
|
588
619
|
* well past the deadline skips straight to the push, and a lockup that is
|
|
589
620
|
* already empty comes back as `nothing_to_refund` instead of an error.
|
|
590
621
|
*/
|
|
591
|
-
declare function refundIfUnresolved(transport: RfqTransport, ark: RefundArkProvider, indexer:
|
|
622
|
+
declare function refundIfUnresolved(transport: RfqTransport, ark: RefundArkProvider, indexer: LockupSpendIndexer, input: {
|
|
592
623
|
rfqId: string;
|
|
593
624
|
script: InstanceType<typeof VHTLC.ScriptV2>;
|
|
594
625
|
/** @see pushRefundWithoutReceiver */
|
|
595
626
|
sender: Identity;
|
|
627
|
+
/**
|
|
628
|
+
* `sha256(P)`, hex — the quote's `payment_hash`, as {@link readLockupFate}
|
|
629
|
+
* takes it. Not derivable from `script`, whose `preimageHash` is a
|
|
630
|
+
* `hash160` of the same secret.
|
|
631
|
+
*/
|
|
632
|
+
paymentHash: string;
|
|
596
633
|
/** `refund_locktime` from the quote, unix seconds. */
|
|
597
634
|
refundLocktime: number;
|
|
598
635
|
/** Defaults to the contract's own committed refund destination. */
|
|
@@ -792,6 +829,9 @@ interface OnchainSendSwap extends RfqSwapCommon {
|
|
|
792
829
|
htlc: OnchainHtlc;
|
|
793
830
|
/** `profile.min_confirmations` from the quote. */
|
|
794
831
|
minConfirmations: number;
|
|
832
|
+
/** Where {@link RfqSwapManagerCallbacks.claimOnchain} pays; optional only
|
|
833
|
+
* so records predating its profile slot still restore. */
|
|
834
|
+
payoutPkScript?: Uint8Array;
|
|
795
835
|
/** The fill's outpoint, learned on first sighting. Without it a SPENT
|
|
796
836
|
* HTLC reads as never funded — see {@link classifyOnchainHtlc}. */
|
|
797
837
|
funding?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VHTLC,
|
|
1
|
+
import { VHTLC, IWallet, ProvisionedKey, ProvisionedClaimSecret, asset } from '@arkade-os/sdk';
|
|
2
2
|
|
|
3
3
|
/** L1 confirmation-depth and reorg margin between dependent timelocks. */
|
|
4
4
|
declare const ONCHAIN_ORDER_MARGIN_SECONDS: number;
|
|
@@ -46,6 +46,13 @@ declare const newPreimage: () => Uint8Array;
|
|
|
46
46
|
/** `sha256(P)`, hex — the wire `payment_hash`, same convention as BOLT11. */
|
|
47
47
|
declare const paymentHashOf: (preimage: Uint8Array) => string;
|
|
48
48
|
type OnchainNetwork = "bitcoin" | "testnet" | "regtest";
|
|
49
|
+
/**
|
|
50
|
+
* The `payoutPkScript` {@link buildHtlcClaim} pays the fill to. Resolved EARLY:
|
|
51
|
+
* the claim's output is the spender's own choice, so nothing that survives a
|
|
52
|
+
* send screen names it, and a destination that cannot be encoded must be
|
|
53
|
+
* refused before the swap is negotiated rather than at claim time.
|
|
54
|
+
*/
|
|
55
|
+
declare const l1ScriptForAddress: (address: string, network: OnchainNetwork) => Uint8Array;
|
|
49
56
|
interface OnchainHtlcParams {
|
|
50
57
|
/** `sha256(P)`, hex; the HASH160 commitment is derived internally. */
|
|
51
58
|
paymentHash: string;
|
|
@@ -129,8 +136,9 @@ interface ChainUtxo extends HtlcUtxo {
|
|
|
129
136
|
interface ChainSource {
|
|
130
137
|
/** Confirmed+mempool outputs paying a script; used to detect the fill. */
|
|
131
138
|
getScriptUtxos(pkScript: Uint8Array): Promise<ChainUtxo[]>;
|
|
132
|
-
/** The spend of an outpoint, if any — where P is extracted from.
|
|
133
|
-
|
|
139
|
+
/** The spend of an outpoint, if any — where P is extracted from. A
|
|
140
|
+
* provider omitting the spender txid still lists it in `pkScript`'s history. */
|
|
141
|
+
getSpendingTx(txid: string, vout: number, pkScript: Uint8Array): Promise<{
|
|
134
142
|
txHex: string;
|
|
135
143
|
} | null>;
|
|
136
144
|
broadcast(txHex: string): Promise<string>;
|
|
@@ -255,11 +263,15 @@ declare class SwapRefusal extends Error {
|
|
|
255
263
|
readonly rfqId: string | undefined;
|
|
256
264
|
constructor(reason: string, rfqId?: string);
|
|
257
265
|
}
|
|
258
|
-
/**
|
|
266
|
+
/**
|
|
267
|
+
* The solver's address does not match the local derivation. NEVER fund past
|
|
268
|
+
* this. `derived` is every candidate address tried — more than one when the
|
|
269
|
+
* derivation itself is ambiguous, see {@link verifyLockupAddress}.
|
|
270
|
+
*/
|
|
259
271
|
declare class AddressMismatch extends Error {
|
|
260
|
-
readonly derived: string;
|
|
272
|
+
readonly derived: string | string[];
|
|
261
273
|
readonly quoted: string | undefined;
|
|
262
|
-
constructor(derived: string, quoted?: string);
|
|
274
|
+
constructor(derived: string | string[], quoted?: string);
|
|
263
275
|
}
|
|
264
276
|
/** A fresh client-chosen negotiation id: 32 random bytes, lowercase hex. */
|
|
265
277
|
declare const newRfqId: () => string;
|
|
@@ -323,9 +335,24 @@ declare const arkadeSwapRequest: (input: {
|
|
|
323
335
|
* 90 because the refund CLTV matures against median-time-past (BIP-113),
|
|
324
336
|
* which lags wall clock by ~1h — a smaller wall-clock margin is no margin. */
|
|
325
337
|
declare const MIN_HEADROOM_SECONDS: number;
|
|
326
|
-
/**
|
|
327
|
-
*
|
|
328
|
-
|
|
338
|
+
/**
|
|
339
|
+
* Compare-only check of the solver's address against YOUR OWN derivation(s)
|
|
340
|
+
* — never extends trust, only narrows it.
|
|
341
|
+
*
|
|
342
|
+
* `derivedAddress` may be a single address or an array of candidates. Pass an
|
|
343
|
+
* array when your own derivation is ambiguous — as it is for the covenant
|
|
344
|
+
* lockups while solvers roll out the timelocked non-interactive refund leaf:
|
|
345
|
+
* nothing on the wire says whether a given quote's covenant carries it (the
|
|
346
|
+
* shape is fixed by the solver's own build, not negotiated per quote), so the
|
|
347
|
+
* only safe move is to derive BOTH shapes and accept whichever one the quote's
|
|
348
|
+
* own `lockup_address` matches. This loses no security: every candidate shape
|
|
349
|
+
* pins the refund to the trader's own refund destination, so a solver gains
|
|
350
|
+
* nothing by choosing which one to quote.
|
|
351
|
+
*
|
|
352
|
+
* Throws {@link AddressMismatch} only when NONE of the candidates match.
|
|
353
|
+
* Returns the address that matched, so calls chain exactly as before.
|
|
354
|
+
*/
|
|
355
|
+
declare const verifyLockupAddress: (quote: RfqQuote, derivedAddress: string | string[]) => string;
|
|
329
356
|
/** The user's gates, checked immediately before funding — never at quote
|
|
330
357
|
* time. Throws with a stable `reason` property. `invoiceExpiresAt` applies to
|
|
331
358
|
* BOLT11 profiles only; `onchain` adds the L1-HTLC gates (§ guardrails of the
|
|
@@ -348,6 +375,25 @@ declare const assertFundable: (input: {
|
|
|
348
375
|
/** "send" = arkade->onchain (the L1 timelock-order gate applies). */
|
|
349
376
|
direction: "send" | "receive";
|
|
350
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* The most this client will pay: the GREATER of the two bounds, because a
|
|
380
|
+
* flat fee is a large proportion of a small swap (420 sats is 8.4% of
|
|
381
|
+
* 5_000, 0.084% of 500_000). Absent means no ceiling. OMIT a bound rather
|
|
382
|
+
* than zeroing it: `{ bps: 0 }` alone is a ceiling of zero, indistinguishable
|
|
383
|
+
* from "free or nothing". `{}` IS refused.
|
|
384
|
+
*/
|
|
385
|
+
maxFee?: {
|
|
386
|
+
/** Integer, 0..10_000 (10_000 = 100%). Out of range throws `max_fee_out_of_range`. */
|
|
387
|
+
bps?: number;
|
|
388
|
+
/** Non-negative integer. Out of range throws `max_fee_out_of_range`. */
|
|
389
|
+
sats?: number;
|
|
390
|
+
/**
|
|
391
|
+
* To-units per from-unit, required for a CROSS-ASSET pair. Must come
|
|
392
|
+
* from a source of YOUR OWN — the solver's own feed would check it
|
|
393
|
+
* against its own number. Needs a looser tolerance than same-asset.
|
|
394
|
+
*/
|
|
395
|
+
referenceRate?: number;
|
|
396
|
+
};
|
|
351
397
|
}) => void;
|
|
352
398
|
interface RfqTransport {
|
|
353
399
|
requestQuote(payload: Record<string, unknown>): Promise<RfqQuote>;
|
|
@@ -413,15 +459,17 @@ declare const unilateralRefundWithoutReceiverDelay: (claimDelay: number) => numb
|
|
|
413
459
|
* hex); the script's HASH160 commitment is derived from it here, which is why
|
|
414
460
|
* the trader never needs to see `P`.
|
|
415
461
|
*
|
|
416
|
-
* Every quote gets the full
|
|
462
|
+
* Every quote gets the full emulator-covenant suite on top of VHTLC's own six
|
|
417
463
|
* (`claim`/`refund`/`refundWithoutReceiver`/`unilateralClaim`/
|
|
418
|
-
* `unilateralRefund`/`unilateralRefundWithoutReceiver`)
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
* own `
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
464
|
+
* `unilateralRefund`/`unilateralRefundWithoutReceiver`): `nonInteractiveClaim`
|
|
465
|
+
* (server + emulator, pays the solver's own `receiverPkScript`, no solver
|
|
466
|
+
* signature needed), `nonInteractiveRefund` (server + solver + emulator, pays
|
|
467
|
+
* the trader's own `refundPkScript`, no timelock and no trader signature
|
|
468
|
+
* needed — see {@link VHTLC.Options.nonInteractiveParameters}'s doc comment for why
|
|
469
|
+
* that matters), and its timelocked twin `nonInteractiveRefundWithoutReceiver`
|
|
470
|
+
* (server + emulator alone, after `refundLocktime` — the only refund tier
|
|
471
|
+
* needing no participant at all). Nine leaves in all, unless `legacy` says
|
|
472
|
+
* otherwise.
|
|
425
473
|
*/
|
|
426
474
|
declare function lightningSendVtxoScript(params: {
|
|
427
475
|
/** Binding field #1: the solver's x-only key, from the quote. */
|
|
@@ -439,7 +487,7 @@ declare function lightningSendVtxoScript(params: {
|
|
|
439
487
|
/** Emulator x-only key (32 bytes). */
|
|
440
488
|
emulatorPubkey: Uint8Array;
|
|
441
489
|
/** Where a refund must pay: the trader's P2TR pkScript (34 bytes). Also
|
|
442
|
-
*
|
|
490
|
+
* the refund covenants' destination. */
|
|
443
491
|
refundPkScript: Uint8Array;
|
|
444
492
|
/** The trader's own key — VHTLC's `sender` role. Required on every
|
|
445
493
|
* interactive refund-side leaf; the trader generates and persists it
|
|
@@ -450,6 +498,11 @@ declare function lightningSendVtxoScript(params: {
|
|
|
450
498
|
* covenant key can be derived; the trader does not otherwise use or trust
|
|
451
499
|
* this value. P2TR pkScript, 34 bytes. */
|
|
452
500
|
receiverPkScript: Uint8Array;
|
|
501
|
+
/** LEGACY REBUILD ONLY — see {@link VHTLC.Options.nonInteractiveParameters}'s
|
|
502
|
+
* `legacy` field. Set only to re-derive a lockup funded before the
|
|
503
|
+
* timelocked refund leaf shipped; {@link matchQuotedLockup} passes it when
|
|
504
|
+
* the quote's own address says the solver quoted that shape. */
|
|
505
|
+
legacy?: "preTimelockedRefund";
|
|
453
506
|
}): InstanceType<typeof VHTLC.ScriptV2>;
|
|
454
507
|
/** Every input {@link lightningSendVtxoScript} builds from. Derived from the
|
|
455
508
|
* builder rather than restated, so the two cannot drift. */
|
|
@@ -786,7 +839,7 @@ declare const assertReceivable: (input: {
|
|
|
786
839
|
/** Absolute sats ceiling on `from_amount`. */
|
|
787
840
|
maxPayAmount?: number;
|
|
788
841
|
}) => void;
|
|
789
|
-
/** Compile the RECEIVE-direction VHTLC: the same
|
|
842
|
+
/** Compile the RECEIVE-direction VHTLC: the same suite-carrying tree as {@link
|
|
790
843
|
* lightningSendVtxoScript} with the roles inverted — the trader is the
|
|
791
844
|
* `receiver` (it generated `P` and claims the lockup with it), the solver is
|
|
792
845
|
* the `sender` (it funds the lockup and holds the refund recourse). One
|
|
@@ -817,6 +870,8 @@ declare function receiveVtxoScript(params: {
|
|
|
817
870
|
/** The trader's own Arkade payout pkScript (decoded from its payout
|
|
818
871
|
* address) — `nonInteractiveClaim`'s pinned destination. */
|
|
819
872
|
payoutPkScript: Uint8Array;
|
|
873
|
+
/** LEGACY REBUILD ONLY — see {@link lightningSendVtxoScript}'s `legacy`. */
|
|
874
|
+
legacy?: "preTimelockedRefund";
|
|
820
875
|
}): InstanceType<typeof VHTLC.ScriptV2>;
|
|
821
876
|
/** Every input {@link receiveVtxoScript} builds from; see
|
|
822
877
|
* {@link LightningSendTreeParams}. */
|
|
@@ -1002,4 +1057,4 @@ declare function requestOnchainReceive(wallet: IWallet, arkServerUrl: string, tr
|
|
|
1002
1057
|
secrets: ProvisionedClaimSecret;
|
|
1003
1058
|
}>;
|
|
1004
1059
|
|
|
1005
|
-
export {
|
|
1060
|
+
export { lightningSendRequest as $, ARKADE_ASSET as A, type RfqStatus as B, type ChainSource as C, SwapRefusal as D, arkadeAssetLeg as E, arkadeSwapRequest as F, assertFundable as G, type HtlcUtxo as H, type InvoiceFacts as I, assertReceivable as J, awaitOnchainFill as K, LIGHTNING_BTC as L, MAX_MIN_CONFIRMATIONS as M, buildHtlcClaim as N, type OnchainNetwork as O, buildHtlcRefund as P, claimOnchainFill as Q, type RfqTransport as R, SOLO_REFUND_HEADROOM_SECONDS as S, classifyOnchainHtlc as T, deriveLightningReceive as U, deriveOnchainReceive as V, deriveOnchainSend as W, extractPreimage as X, httpTransport as Y, l1ScriptForAddress as Z, lightningReceiveRequest as _, type OnchainHtlc as a, lightningSendVtxoScript as a0, newPreimage as a1, newRfqId as a2, offerTermsFromQuote as a3, onchainHtlcScript as a4, onchainReceiveRequest as a5, onchainSendRequest as a6, paymentHashOf as a7, receiveVtxoScript as a8, relayTransport as a9, requestLightningReceive as aa, requestOnchainReceive as ab, rfqPair as ac, unilateralClaimDelay as ad, unilateralRefundDelay as ae, unilateralRefundWithoutReceiverDelay as af, verifyLockupAddress as ag, verifyReceiveInvoice as ah, type OnchainHtlcParams as b, requestLightningSend as c, ARKADE_BTC as d, AddressMismatch as e, type ChainUtxo as f, LIGHTNING_RECEIVE_PAIR as g, LIGHTNING_SEND_PAIR as h, LOCKTIME_THRESHOLD as i, type LightningReceiveTreeParams as j, type LightningSendTreeParams as k, MIN_CLAIM_WINDOW_SECONDS as l, MIN_HEADROOM_SECONDS as m, ONCHAIN_BTC as n, ONCHAIN_CLAIM_MARGIN_SECONDS as o, ONCHAIN_DUST_SATS as p, ONCHAIN_ORDER_MARGIN_SECONDS as q, requestOnchainSend as r, ONCHAIN_RECEIVE_PAIR as s, ONCHAIN_SECONDS_PER_BLOCK as t, ONCHAIN_SEND_PAIR as u, type OnchainHtlcPhase as v, RFQ_TERMINAL_STATES as w, type RelaySocket as x, type RfqQuote as y, type RfqRefusalReason as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VHTLC,
|
|
1
|
+
import { VHTLC, IWallet, ProvisionedKey, ProvisionedClaimSecret, asset } from '@arkade-os/sdk';
|
|
2
2
|
|
|
3
3
|
/** L1 confirmation-depth and reorg margin between dependent timelocks. */
|
|
4
4
|
declare const ONCHAIN_ORDER_MARGIN_SECONDS: number;
|
|
@@ -46,6 +46,13 @@ declare const newPreimage: () => Uint8Array;
|
|
|
46
46
|
/** `sha256(P)`, hex — the wire `payment_hash`, same convention as BOLT11. */
|
|
47
47
|
declare const paymentHashOf: (preimage: Uint8Array) => string;
|
|
48
48
|
type OnchainNetwork = "bitcoin" | "testnet" | "regtest";
|
|
49
|
+
/**
|
|
50
|
+
* The `payoutPkScript` {@link buildHtlcClaim} pays the fill to. Resolved EARLY:
|
|
51
|
+
* the claim's output is the spender's own choice, so nothing that survives a
|
|
52
|
+
* send screen names it, and a destination that cannot be encoded must be
|
|
53
|
+
* refused before the swap is negotiated rather than at claim time.
|
|
54
|
+
*/
|
|
55
|
+
declare const l1ScriptForAddress: (address: string, network: OnchainNetwork) => Uint8Array;
|
|
49
56
|
interface OnchainHtlcParams {
|
|
50
57
|
/** `sha256(P)`, hex; the HASH160 commitment is derived internally. */
|
|
51
58
|
paymentHash: string;
|
|
@@ -129,8 +136,9 @@ interface ChainUtxo extends HtlcUtxo {
|
|
|
129
136
|
interface ChainSource {
|
|
130
137
|
/** Confirmed+mempool outputs paying a script; used to detect the fill. */
|
|
131
138
|
getScriptUtxos(pkScript: Uint8Array): Promise<ChainUtxo[]>;
|
|
132
|
-
/** The spend of an outpoint, if any — where P is extracted from.
|
|
133
|
-
|
|
139
|
+
/** The spend of an outpoint, if any — where P is extracted from. A
|
|
140
|
+
* provider omitting the spender txid still lists it in `pkScript`'s history. */
|
|
141
|
+
getSpendingTx(txid: string, vout: number, pkScript: Uint8Array): Promise<{
|
|
134
142
|
txHex: string;
|
|
135
143
|
} | null>;
|
|
136
144
|
broadcast(txHex: string): Promise<string>;
|
|
@@ -255,11 +263,15 @@ declare class SwapRefusal extends Error {
|
|
|
255
263
|
readonly rfqId: string | undefined;
|
|
256
264
|
constructor(reason: string, rfqId?: string);
|
|
257
265
|
}
|
|
258
|
-
/**
|
|
266
|
+
/**
|
|
267
|
+
* The solver's address does not match the local derivation. NEVER fund past
|
|
268
|
+
* this. `derived` is every candidate address tried — more than one when the
|
|
269
|
+
* derivation itself is ambiguous, see {@link verifyLockupAddress}.
|
|
270
|
+
*/
|
|
259
271
|
declare class AddressMismatch extends Error {
|
|
260
|
-
readonly derived: string;
|
|
272
|
+
readonly derived: string | string[];
|
|
261
273
|
readonly quoted: string | undefined;
|
|
262
|
-
constructor(derived: string, quoted?: string);
|
|
274
|
+
constructor(derived: string | string[], quoted?: string);
|
|
263
275
|
}
|
|
264
276
|
/** A fresh client-chosen negotiation id: 32 random bytes, lowercase hex. */
|
|
265
277
|
declare const newRfqId: () => string;
|
|
@@ -323,9 +335,24 @@ declare const arkadeSwapRequest: (input: {
|
|
|
323
335
|
* 90 because the refund CLTV matures against median-time-past (BIP-113),
|
|
324
336
|
* which lags wall clock by ~1h — a smaller wall-clock margin is no margin. */
|
|
325
337
|
declare const MIN_HEADROOM_SECONDS: number;
|
|
326
|
-
/**
|
|
327
|
-
*
|
|
328
|
-
|
|
338
|
+
/**
|
|
339
|
+
* Compare-only check of the solver's address against YOUR OWN derivation(s)
|
|
340
|
+
* — never extends trust, only narrows it.
|
|
341
|
+
*
|
|
342
|
+
* `derivedAddress` may be a single address or an array of candidates. Pass an
|
|
343
|
+
* array when your own derivation is ambiguous — as it is for the covenant
|
|
344
|
+
* lockups while solvers roll out the timelocked non-interactive refund leaf:
|
|
345
|
+
* nothing on the wire says whether a given quote's covenant carries it (the
|
|
346
|
+
* shape is fixed by the solver's own build, not negotiated per quote), so the
|
|
347
|
+
* only safe move is to derive BOTH shapes and accept whichever one the quote's
|
|
348
|
+
* own `lockup_address` matches. This loses no security: every candidate shape
|
|
349
|
+
* pins the refund to the trader's own refund destination, so a solver gains
|
|
350
|
+
* nothing by choosing which one to quote.
|
|
351
|
+
*
|
|
352
|
+
* Throws {@link AddressMismatch} only when NONE of the candidates match.
|
|
353
|
+
* Returns the address that matched, so calls chain exactly as before.
|
|
354
|
+
*/
|
|
355
|
+
declare const verifyLockupAddress: (quote: RfqQuote, derivedAddress: string | string[]) => string;
|
|
329
356
|
/** The user's gates, checked immediately before funding — never at quote
|
|
330
357
|
* time. Throws with a stable `reason` property. `invoiceExpiresAt` applies to
|
|
331
358
|
* BOLT11 profiles only; `onchain` adds the L1-HTLC gates (§ guardrails of the
|
|
@@ -348,6 +375,25 @@ declare const assertFundable: (input: {
|
|
|
348
375
|
/** "send" = arkade->onchain (the L1 timelock-order gate applies). */
|
|
349
376
|
direction: "send" | "receive";
|
|
350
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* The most this client will pay: the GREATER of the two bounds, because a
|
|
380
|
+
* flat fee is a large proportion of a small swap (420 sats is 8.4% of
|
|
381
|
+
* 5_000, 0.084% of 500_000). Absent means no ceiling. OMIT a bound rather
|
|
382
|
+
* than zeroing it: `{ bps: 0 }` alone is a ceiling of zero, indistinguishable
|
|
383
|
+
* from "free or nothing". `{}` IS refused.
|
|
384
|
+
*/
|
|
385
|
+
maxFee?: {
|
|
386
|
+
/** Integer, 0..10_000 (10_000 = 100%). Out of range throws `max_fee_out_of_range`. */
|
|
387
|
+
bps?: number;
|
|
388
|
+
/** Non-negative integer. Out of range throws `max_fee_out_of_range`. */
|
|
389
|
+
sats?: number;
|
|
390
|
+
/**
|
|
391
|
+
* To-units per from-unit, required for a CROSS-ASSET pair. Must come
|
|
392
|
+
* from a source of YOUR OWN — the solver's own feed would check it
|
|
393
|
+
* against its own number. Needs a looser tolerance than same-asset.
|
|
394
|
+
*/
|
|
395
|
+
referenceRate?: number;
|
|
396
|
+
};
|
|
351
397
|
}) => void;
|
|
352
398
|
interface RfqTransport {
|
|
353
399
|
requestQuote(payload: Record<string, unknown>): Promise<RfqQuote>;
|
|
@@ -413,15 +459,17 @@ declare const unilateralRefundWithoutReceiverDelay: (claimDelay: number) => numb
|
|
|
413
459
|
* hex); the script's HASH160 commitment is derived from it here, which is why
|
|
414
460
|
* the trader never needs to see `P`.
|
|
415
461
|
*
|
|
416
|
-
* Every quote gets the full
|
|
462
|
+
* Every quote gets the full emulator-covenant suite on top of VHTLC's own six
|
|
417
463
|
* (`claim`/`refund`/`refundWithoutReceiver`/`unilateralClaim`/
|
|
418
|
-
* `unilateralRefund`/`unilateralRefundWithoutReceiver`)
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
* own `
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
464
|
+
* `unilateralRefund`/`unilateralRefundWithoutReceiver`): `nonInteractiveClaim`
|
|
465
|
+
* (server + emulator, pays the solver's own `receiverPkScript`, no solver
|
|
466
|
+
* signature needed), `nonInteractiveRefund` (server + solver + emulator, pays
|
|
467
|
+
* the trader's own `refundPkScript`, no timelock and no trader signature
|
|
468
|
+
* needed — see {@link VHTLC.Options.nonInteractiveParameters}'s doc comment for why
|
|
469
|
+
* that matters), and its timelocked twin `nonInteractiveRefundWithoutReceiver`
|
|
470
|
+
* (server + emulator alone, after `refundLocktime` — the only refund tier
|
|
471
|
+
* needing no participant at all). Nine leaves in all, unless `legacy` says
|
|
472
|
+
* otherwise.
|
|
425
473
|
*/
|
|
426
474
|
declare function lightningSendVtxoScript(params: {
|
|
427
475
|
/** Binding field #1: the solver's x-only key, from the quote. */
|
|
@@ -439,7 +487,7 @@ declare function lightningSendVtxoScript(params: {
|
|
|
439
487
|
/** Emulator x-only key (32 bytes). */
|
|
440
488
|
emulatorPubkey: Uint8Array;
|
|
441
489
|
/** Where a refund must pay: the trader's P2TR pkScript (34 bytes). Also
|
|
442
|
-
*
|
|
490
|
+
* the refund covenants' destination. */
|
|
443
491
|
refundPkScript: Uint8Array;
|
|
444
492
|
/** The trader's own key — VHTLC's `sender` role. Required on every
|
|
445
493
|
* interactive refund-side leaf; the trader generates and persists it
|
|
@@ -450,6 +498,11 @@ declare function lightningSendVtxoScript(params: {
|
|
|
450
498
|
* covenant key can be derived; the trader does not otherwise use or trust
|
|
451
499
|
* this value. P2TR pkScript, 34 bytes. */
|
|
452
500
|
receiverPkScript: Uint8Array;
|
|
501
|
+
/** LEGACY REBUILD ONLY — see {@link VHTLC.Options.nonInteractiveParameters}'s
|
|
502
|
+
* `legacy` field. Set only to re-derive a lockup funded before the
|
|
503
|
+
* timelocked refund leaf shipped; {@link matchQuotedLockup} passes it when
|
|
504
|
+
* the quote's own address says the solver quoted that shape. */
|
|
505
|
+
legacy?: "preTimelockedRefund";
|
|
453
506
|
}): InstanceType<typeof VHTLC.ScriptV2>;
|
|
454
507
|
/** Every input {@link lightningSendVtxoScript} builds from. Derived from the
|
|
455
508
|
* builder rather than restated, so the two cannot drift. */
|
|
@@ -786,7 +839,7 @@ declare const assertReceivable: (input: {
|
|
|
786
839
|
/** Absolute sats ceiling on `from_amount`. */
|
|
787
840
|
maxPayAmount?: number;
|
|
788
841
|
}) => void;
|
|
789
|
-
/** Compile the RECEIVE-direction VHTLC: the same
|
|
842
|
+
/** Compile the RECEIVE-direction VHTLC: the same suite-carrying tree as {@link
|
|
790
843
|
* lightningSendVtxoScript} with the roles inverted — the trader is the
|
|
791
844
|
* `receiver` (it generated `P` and claims the lockup with it), the solver is
|
|
792
845
|
* the `sender` (it funds the lockup and holds the refund recourse). One
|
|
@@ -817,6 +870,8 @@ declare function receiveVtxoScript(params: {
|
|
|
817
870
|
/** The trader's own Arkade payout pkScript (decoded from its payout
|
|
818
871
|
* address) — `nonInteractiveClaim`'s pinned destination. */
|
|
819
872
|
payoutPkScript: Uint8Array;
|
|
873
|
+
/** LEGACY REBUILD ONLY — see {@link lightningSendVtxoScript}'s `legacy`. */
|
|
874
|
+
legacy?: "preTimelockedRefund";
|
|
820
875
|
}): InstanceType<typeof VHTLC.ScriptV2>;
|
|
821
876
|
/** Every input {@link receiveVtxoScript} builds from; see
|
|
822
877
|
* {@link LightningSendTreeParams}. */
|
|
@@ -1002,4 +1057,4 @@ declare function requestOnchainReceive(wallet: IWallet, arkServerUrl: string, tr
|
|
|
1002
1057
|
secrets: ProvisionedClaimSecret;
|
|
1003
1058
|
}>;
|
|
1004
1059
|
|
|
1005
|
-
export {
|
|
1060
|
+
export { lightningSendRequest as $, ARKADE_ASSET as A, type RfqStatus as B, type ChainSource as C, SwapRefusal as D, arkadeAssetLeg as E, arkadeSwapRequest as F, assertFundable as G, type HtlcUtxo as H, type InvoiceFacts as I, assertReceivable as J, awaitOnchainFill as K, LIGHTNING_BTC as L, MAX_MIN_CONFIRMATIONS as M, buildHtlcClaim as N, type OnchainNetwork as O, buildHtlcRefund as P, claimOnchainFill as Q, type RfqTransport as R, SOLO_REFUND_HEADROOM_SECONDS as S, classifyOnchainHtlc as T, deriveLightningReceive as U, deriveOnchainReceive as V, deriveOnchainSend as W, extractPreimage as X, httpTransport as Y, l1ScriptForAddress as Z, lightningReceiveRequest as _, type OnchainHtlc as a, lightningSendVtxoScript as a0, newPreimage as a1, newRfqId as a2, offerTermsFromQuote as a3, onchainHtlcScript as a4, onchainReceiveRequest as a5, onchainSendRequest as a6, paymentHashOf as a7, receiveVtxoScript as a8, relayTransport as a9, requestLightningReceive as aa, requestOnchainReceive as ab, rfqPair as ac, unilateralClaimDelay as ad, unilateralRefundDelay as ae, unilateralRefundWithoutReceiverDelay as af, verifyLockupAddress as ag, verifyReceiveInvoice as ah, type OnchainHtlcParams as b, requestLightningSend as c, ARKADE_BTC as d, AddressMismatch as e, type ChainUtxo as f, LIGHTNING_RECEIVE_PAIR as g, LIGHTNING_SEND_PAIR as h, LOCKTIME_THRESHOLD as i, type LightningReceiveTreeParams as j, type LightningSendTreeParams as k, MIN_CLAIM_WINDOW_SECONDS as l, MIN_HEADROOM_SECONDS as m, ONCHAIN_BTC as n, ONCHAIN_CLAIM_MARGIN_SECONDS as o, ONCHAIN_DUST_SATS as p, ONCHAIN_ORDER_MARGIN_SECONDS as q, requestOnchainSend as r, ONCHAIN_RECEIVE_PAIR as s, ONCHAIN_SECONDS_PER_BLOCK as t, ONCHAIN_SEND_PAIR as u, type OnchainHtlcPhase as v, RFQ_TERMINAL_STATES as w, type RelaySocket as x, type RfqQuote as y, type RfqRefusalReason as z };
|