@arkade-os/swap 0.1.2 → 0.1.4

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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.cjs +31 -38
  3. package/dist/advanced.d.cts +8 -8
  4. package/dist/advanced.d.ts +8 -8
  5. package/dist/advanced.js +5 -3
  6. package/dist/{chunk-ICSREL7N.js → chunk-7BBQ74BG.js} +15 -14
  7. package/dist/{chunk-BLECLU5Q.js → chunk-GJKGPE3S.js} +19 -33
  8. package/dist/{chunk-J2PMAQP2.js → chunk-HDCC3JZR.js} +14 -11
  9. package/dist/index.cjs +28 -38
  10. package/dist/index.d.cts +6 -6
  11. package/dist/index.d.ts +6 -6
  12. package/dist/index.js +3 -3
  13. package/dist/{lockupContract-CIXkJPxV.d.ts → lockupContract-CdXh9yIr.d.ts} +1 -1
  14. package/dist/{lockupContract-CkhWMKCo.d.cts → lockupContract-QfbsjyXG.d.cts} +1 -1
  15. package/dist/node/index.cjs +37 -37
  16. package/dist/node/index.js +37 -37
  17. package/dist/nostr.d.cts +1 -1
  18. package/dist/nostr.d.ts +1 -1
  19. package/dist/nostr.js +1 -1
  20. package/dist/{offer-Diff5Flc.d.cts → offer-BxzPQ6zh.d.cts} +11 -11
  21. package/dist/{offer-BPD2ortO.d.ts → offer-Q1lVhrVX.d.ts} +11 -11
  22. package/dist/{offerFillPlan-B-5ae_gQ.d.cts → offerFillPlan-CvKlB246.d.cts} +16 -11
  23. package/dist/{offerFillPlan-CJzneX6F.d.ts → offerFillPlan-_PhFt4B1.d.ts} +16 -11
  24. package/dist/protocol.cjs +27 -38
  25. package/dist/protocol.d.cts +9 -8
  26. package/dist/protocol.d.ts +9 -8
  27. package/dist/protocol.js +2 -2
  28. package/dist/repositories/realm/index.d.cts +2 -2
  29. package/dist/repositories/realm/index.d.ts +2 -2
  30. package/dist/repositories/sqlite/index.cjs +37 -37
  31. package/dist/repositories/sqlite/index.d.cts +3 -3
  32. package/dist/repositories/sqlite/index.d.ts +3 -3
  33. package/dist/repositories/sqlite/index.js +37 -37
  34. package/dist/{repository-BBVRh9ez.d.ts → repository-BOQ1qYoj.d.ts} +8 -7
  35. package/dist/{repository-C4pvymhs.d.cts → repository-Cut4eEkm.d.cts} +8 -7
  36. package/dist/{rfq-C0tHOvn6.d.cts → rfq-CP-P0PSL.d.cts} +7 -7
  37. package/dist/{rfq-C0tHOvn6.d.ts → rfq-CP-P0PSL.d.ts} +7 -7
  38. package/dist/{watch-7BiRa4oB.d.ts → watch-D15U0QpD.d.ts} +1 -1
  39. package/dist/{watch-Bxq-lx_6.d.cts → watch-D4PeBZ3H.d.cts} +1 -1
  40. package/package.json +2 -2
@@ -46,46 +46,46 @@ var SQLiteAssetSwapRepository = class {
46
46
  * while `initPromise` stayed resolved and every later statement failed with
47
47
  * `no such table`. */
48
48
  async init() {
49
- await this.withTx(async () => {
50
- await this.db.run(`CREATE TABLE IF NOT EXISTS ${this.swaps} (
49
+ await this.withTx(async (tx) => {
50
+ await tx.run(`CREATE TABLE IF NOT EXISTS ${this.swaps} (
51
51
  id TEXT PRIMARY KEY,
52
52
  status TEXT NOT NULL,
53
53
  created_at INTEGER NOT NULL,
54
54
  data TEXT NOT NULL
55
55
  )`);
56
- await this.db.run(
56
+ await tx.run(
57
57
  `CREATE INDEX IF NOT EXISTS idx_${this.prefix}asset_swaps_status ON ${this.swaps} (status)`
58
58
  );
59
- await this.db.run(
59
+ await tx.run(
60
60
  `CREATE INDEX IF NOT EXISTS idx_${this.prefix}asset_swaps_created_at ON ${this.swaps} (created_at)`
61
61
  );
62
- await this.db.run(`CREATE TABLE IF NOT EXISTS ${this.rfqSwaps} (
62
+ await tx.run(`CREATE TABLE IF NOT EXISTS ${this.rfqSwaps} (
63
63
  rfq_id TEXT PRIMARY KEY,
64
64
  state TEXT NOT NULL,
65
65
  updated_at INTEGER NOT NULL,
66
66
  data TEXT NOT NULL
67
67
  )`);
68
- await this.db.run(
68
+ await tx.run(
69
69
  `CREATE INDEX IF NOT EXISTS idx_${this.prefix}rfq_updated ON ${this.rfqSwaps} (updated_at, rfq_id)`
70
70
  );
71
- await this.db.run(
71
+ await tx.run(
72
72
  `CREATE INDEX IF NOT EXISTS idx_${this.prefix}rfq_swaps_history ON ${this.rfqSwaps} (state, updated_at, rfq_id)`
73
73
  );
74
- await this.db.run(`DROP INDEX IF EXISTS idx_${this.prefix}rfq_swaps_page`);
75
- await this.db.run(
74
+ await tx.run(`DROP INDEX IF EXISTS idx_${this.prefix}rfq_swaps_page`);
75
+ await tx.run(
76
76
  `CREATE INDEX IF NOT EXISTS idx_${this.prefix}rfq_swaps_state ON ${this.rfqSwaps} (state)`
77
77
  );
78
- await this.db.run(`CREATE TABLE IF NOT EXISTS ${this.swapRecords} (
78
+ await tx.run(`CREATE TABLE IF NOT EXISTS ${this.swapRecords} (
79
79
  id TEXT PRIMARY KEY,
80
80
  family TEXT NOT NULL,
81
81
  updated_at INTEGER NOT NULL,
82
82
  data TEXT NOT NULL
83
83
  )`);
84
- await this.db.run(
84
+ await tx.run(
85
85
  `CREATE INDEX IF NOT EXISTS idx_${this.prefix}swap_records_family ON ${this.swapRecords} (family)`
86
86
  );
87
- await this.db.run(`CREATE TABLE IF NOT EXISTS ${this.scanned} (txid TEXT PRIMARY KEY)`);
88
- await this.db.run(
87
+ await tx.run(`CREATE TABLE IF NOT EXISTS ${this.scanned} (txid TEXT PRIMARY KEY)`);
88
+ await tx.run(
89
89
  `CREATE TABLE IF NOT EXISTS ${this.markets} (cache_key TEXT PRIMARY KEY, data TEXT NOT NULL)`
90
90
  );
91
91
  });
@@ -93,7 +93,7 @@ var SQLiteAssetSwapRepository = class {
93
93
  /** Every write, including the single-statement ones. The chain serializes
94
94
  * transaction *blocks*, not bare statements: one issued between a
95
95
  * neighbour's BEGIN IMMEDIATE and its COMMIT becomes part of that
96
- * transaction and dies with it. `fn` must issue only raw db calls — no
96
+ * transaction and dies with it. `fn` must use its supplied raw executor — no
97
97
  * repository method, no `ensureInit` — since `runInTransaction` cannot
98
98
  * nest. */
99
99
  withTx(fn) {
@@ -101,8 +101,8 @@ var SQLiteAssetSwapRepository = class {
101
101
  }
102
102
  async saveSwap(swap) {
103
103
  await this.ensureInit();
104
- await this.withTx(async () => {
105
- await this.db.run(
104
+ await this.withTx(async (tx) => {
105
+ await tx.run(
106
106
  `INSERT OR REPLACE INTO ${this.swaps} (id, status, created_at, data)
107
107
  VALUES (?, ?, ?, ?)`,
108
108
  [swap.id, swap.status, swap.createdAt, JSON.stringify(swap)]
@@ -114,8 +114,8 @@ var SQLiteAssetSwapRepository = class {
114
114
  }
115
115
  async saveRfqSwap(record) {
116
116
  await this.ensureInit();
117
- await this.withTx(async () => {
118
- await this.db.run(
117
+ await this.withTx(async (tx) => {
118
+ await tx.run(
119
119
  `INSERT OR REPLACE INTO ${this.rfqSwaps} (rfq_id, state, updated_at, data)
120
120
  VALUES (?, ?, ?, ?)`,
121
121
  [record.rfqId, record.state, record.updatedAt, JSON.stringify(record)]
@@ -165,14 +165,14 @@ var SQLiteAssetSwapRepository = class {
165
165
  }
166
166
  async removeRfqSwap(rfqId) {
167
167
  await this.ensureInit();
168
- await this.withTx(async () => {
169
- await this.db.run(`DELETE FROM ${this.rfqSwaps} WHERE rfq_id = ?`, [rfqId]);
168
+ await this.withTx(async (tx) => {
169
+ await tx.run(`DELETE FROM ${this.rfqSwaps} WHERE rfq_id = ?`, [rfqId]);
170
170
  });
171
171
  }
172
172
  async saveSwapRecord(record) {
173
173
  await this.ensureInit();
174
- await this.withTx(async () => {
175
- await this.db.run(
174
+ await this.withTx(async (tx) => {
175
+ await tx.run(
176
176
  `INSERT OR REPLACE INTO ${this.swapRecords} (id, family, updated_at, data)
177
177
  VALUES (?, ?, ?, ?)`,
178
178
  [record.id, record.family, record.updatedAt, JSON.stringify(record)]
@@ -205,8 +205,8 @@ var SQLiteAssetSwapRepository = class {
205
205
  }
206
206
  async removeSwapRecord(id) {
207
207
  await this.ensureInit();
208
- await this.withTx(async () => {
209
- await this.db.run(`DELETE FROM ${this.swapRecords} WHERE id = ?`, [id]);
208
+ await this.withTx(async (tx) => {
209
+ await tx.run(`DELETE FROM ${this.swapRecords} WHERE id = ?`, [id]);
210
210
  });
211
211
  }
212
212
  async getScannedTxids() {
@@ -218,10 +218,10 @@ var SQLiteAssetSwapRepository = class {
218
218
  await this.ensureInit();
219
219
  const all = [...txids];
220
220
  if (all.length === 0) return;
221
- await this.withTx(async () => {
221
+ await this.withTx(async (tx) => {
222
222
  for (let i = 0; i < all.length; i += INSERT_CHUNK) {
223
223
  const chunk = all.slice(i, i + INSERT_CHUNK);
224
- await this.db.run(
224
+ await tx.run(
225
225
  `INSERT OR IGNORE INTO ${this.scanned} (txid) VALUES ${chunk.map(() => "(?)").join(", ")}`,
226
226
  chunk
227
227
  );
@@ -238,11 +238,11 @@ var SQLiteAssetSwapRepository = class {
238
238
  }
239
239
  async saveCachedMarkets(network, registry, entry) {
240
240
  await this.ensureInit();
241
- await this.withTx(async () => {
242
- await this.db.run(
243
- `INSERT OR REPLACE INTO ${this.markets} (cache_key, data) VALUES (?, ?)`,
244
- [marketsCacheKey(network, registry), JSON.stringify(entry)]
245
- );
241
+ await this.withTx(async (tx) => {
242
+ await tx.run(`INSERT OR REPLACE INTO ${this.markets} (cache_key, data) VALUES (?, ?)`, [
243
+ marketsCacheKey(network, registry),
244
+ JSON.stringify(entry)
245
+ ]);
246
246
  });
247
247
  }
248
248
  /** Every table in one transaction: clearing swaps but keeping scanned txids
@@ -250,12 +250,12 @@ var SQLiteAssetSwapRepository = class {
250
250
  * partial clear must not be observable. */
251
251
  async clear() {
252
252
  await this.ensureInit();
253
- await this.withTx(async () => {
254
- await this.db.run(`DELETE FROM ${this.swaps}`);
255
- await this.db.run(`DELETE FROM ${this.rfqSwaps}`);
256
- await this.db.run(`DELETE FROM ${this.swapRecords}`);
257
- await this.db.run(`DELETE FROM ${this.scanned}`);
258
- await this.db.run(`DELETE FROM ${this.markets}`);
253
+ await this.withTx(async (tx) => {
254
+ await tx.run(`DELETE FROM ${this.swaps}`);
255
+ await tx.run(`DELETE FROM ${this.rfqSwaps}`);
256
+ await tx.run(`DELETE FROM ${this.swapRecords}`);
257
+ await tx.run(`DELETE FROM ${this.scanned}`);
258
+ await tx.run(`DELETE FROM ${this.markets}`);
259
259
  });
260
260
  }
261
261
  async [Symbol.asyncDispose]() {
@@ -1,6 +1,6 @@
1
1
  import { DiscoveredMarket } from '@arkade-os/solver-discovery';
2
- import { IWallet, ProvisionedKey, ProvisionedClaimSecret, ArkProvider, Asset, RestIndexerProvider, IContractManager, VHTLC, Identity, Network, InputExpiryFloor, NetworkName, asset, PageRequest, PageResult } from '@arkade-os/sdk';
3
- import { e as RfqTransport, E as RfqStatus, O as OnchainHtlc, l as ChainUtxo, C as ChainSource, z as OnchainHtlcPhase } from './rfq-C0tHOvn6.js';
2
+ import { IWallet, ProvisionedKey, ProvisionedClaimSecret, OperatorProvider, Asset, RestIndexerProvider, IContractManager, VHTLC, Identity, Network, InputExpiryFloor, NetworkName, asset, PageRequest, PageResult } from '@arkade-os/sdk';
3
+ import { e as RfqTransport, E as RfqStatus, O as OnchainHtlc, l as ChainUtxo, C as ChainSource, z as OnchainHtlcPhase } from './rfq-CP-P0PSL.js';
4
4
 
5
5
  /** @deprecated Use `Outcome`. Moved off the package root to `@arkade-os/swap/protocol`. */
6
6
  type AssetSwapStatus = "pending" | "cancelling" | "fulfilled" | "cancelled" | "recoverable" | "awaiting_fill" | "claimable" | "claimed" | "refunded_l1";
@@ -133,9 +133,9 @@ declare function awaitRfqResolution(transport: RfqTransport, rfqId: string, opti
133
133
  /**
134
134
  * What a push needs from the operator: the broadcast pair, plus the info read that supplies
135
135
  * `checkpointTapscript`. Narrow so a wallet's own connection satisfies it (see
136
- * {@link walletOperator}) and no second connection is opened; a full `ArkProvider` also fits.
136
+ * {@link walletOperator}) and no second connection is opened; a full `OperatorProvider` also fits.
137
137
  */
138
- type SwapOperator = Pick<ArkProvider, "getInfo" | "submitTx" | "finalizeTx">;
138
+ type SwapOperator = Pick<OperatorProvider, "getInfo" | "submitTx" | "finalizeTx">;
139
139
  /**
140
140
  * The contract-manager surface the lockup lookup needs: the registered contract and its VTXOs,
141
141
  * in one read. A real `ContractManager` syncs on every read and reports degraded fallback via
@@ -285,8 +285,8 @@ declare function readLockupFate(indexer: LockupSpendIndexer, input: {
285
285
  * Build, sign, and push the `refundWithoutReceiver` spend: return the largest funded
286
286
  * outputs at the lockup to the trader's refund address.
287
287
  *
288
- * The leaf is `CLTV(refundLocktime) + <sender> + <server>`: no emulator (it co-signs only the
289
- * covenant leaves), so the tx is submitted SIGNED. One aggregate output, since this leaf has no
288
+ * The leaf is `CLTV(refundLocktime) + <sender> + <operator>`: not a covenant leaf, so the tx
289
+ * is submitted SIGNED. One aggregate output, since this leaf has no
290
290
  * covenant requiring index-aligned outputs.
291
291
  *
292
292
  * `refundPkScript` defaults to the contract's committed `senderPkScript` (the trader's quote-time
@@ -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;
@@ -315,7 +316,7 @@ declare function pushRefundWithoutReceiver(operator: SwapOperator, input: {
315
316
  spent: readonly LockupVtxo[];
316
317
  }>;
317
318
  /**
318
- * How long past `refundLocktime` to keep retrying the push before surfacing the server's refusal.
319
+ * How long past `refundLocktime` to keep retrying the push before surfacing the operator's refusal.
319
320
  * Two hours: MTP (BIP-113) lags wall clock by about an hour, plus room for a slow block. Mirror
320
321
  * of `MIN_HEADROOM_SECONDS`, which refuses to FUND without 90 minutes of the same margin.
321
322
  */
@@ -1,6 +1,6 @@
1
1
  import { DiscoveredMarket } from '@arkade-os/solver-discovery';
2
- import { IWallet, ProvisionedKey, ProvisionedClaimSecret, ArkProvider, Asset, RestIndexerProvider, IContractManager, VHTLC, Identity, Network, InputExpiryFloor, NetworkName, asset, PageRequest, PageResult } from '@arkade-os/sdk';
3
- import { e as RfqTransport, E as RfqStatus, O as OnchainHtlc, l as ChainUtxo, C as ChainSource, z as OnchainHtlcPhase } from './rfq-C0tHOvn6.cjs';
2
+ import { IWallet, ProvisionedKey, ProvisionedClaimSecret, OperatorProvider, Asset, RestIndexerProvider, IContractManager, VHTLC, Identity, Network, InputExpiryFloor, NetworkName, asset, PageRequest, PageResult } from '@arkade-os/sdk';
3
+ import { e as RfqTransport, E as RfqStatus, O as OnchainHtlc, l as ChainUtxo, C as ChainSource, z as OnchainHtlcPhase } from './rfq-CP-P0PSL.cjs';
4
4
 
5
5
  /** @deprecated Use `Outcome`. Moved off the package root to `@arkade-os/swap/protocol`. */
6
6
  type AssetSwapStatus = "pending" | "cancelling" | "fulfilled" | "cancelled" | "recoverable" | "awaiting_fill" | "claimable" | "claimed" | "refunded_l1";
@@ -133,9 +133,9 @@ declare function awaitRfqResolution(transport: RfqTransport, rfqId: string, opti
133
133
  /**
134
134
  * What a push needs from the operator: the broadcast pair, plus the info read that supplies
135
135
  * `checkpointTapscript`. Narrow so a wallet's own connection satisfies it (see
136
- * {@link walletOperator}) and no second connection is opened; a full `ArkProvider` also fits.
136
+ * {@link walletOperator}) and no second connection is opened; a full `OperatorProvider` also fits.
137
137
  */
138
- type SwapOperator = Pick<ArkProvider, "getInfo" | "submitTx" | "finalizeTx">;
138
+ type SwapOperator = Pick<OperatorProvider, "getInfo" | "submitTx" | "finalizeTx">;
139
139
  /**
140
140
  * The contract-manager surface the lockup lookup needs: the registered contract and its VTXOs,
141
141
  * in one read. A real `ContractManager` syncs on every read and reports degraded fallback via
@@ -285,8 +285,8 @@ declare function readLockupFate(indexer: LockupSpendIndexer, input: {
285
285
  * Build, sign, and push the `refundWithoutReceiver` spend: return the largest funded
286
286
  * outputs at the lockup to the trader's refund address.
287
287
  *
288
- * The leaf is `CLTV(refundLocktime) + <sender> + <server>`: no emulator (it co-signs only the
289
- * covenant leaves), so the tx is submitted SIGNED. One aggregate output, since this leaf has no
288
+ * The leaf is `CLTV(refundLocktime) + <sender> + <operator>`: not a covenant leaf, so the tx
289
+ * is submitted SIGNED. One aggregate output, since this leaf has no
290
290
  * covenant requiring index-aligned outputs.
291
291
  *
292
292
  * `refundPkScript` defaults to the contract's committed `senderPkScript` (the trader's quote-time
@@ -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;
@@ -315,7 +316,7 @@ declare function pushRefundWithoutReceiver(operator: SwapOperator, input: {
315
316
  spent: readonly LockupVtxo[];
316
317
  }>;
317
318
  /**
318
- * How long past `refundLocktime` to keep retrying the push before surfacing the server's refusal.
319
+ * How long past `refundLocktime` to keep retrying the push before surfacing the operator's refusal.
319
320
  * Two hours: MTP (BIP-113) lags wall clock by about an hour, plus room for a slow block. Mirror
320
321
  * of `MIN_HEADROOM_SECONDS`, which refuses to FUND without 90 minutes of the same margin.
321
322
  */
@@ -398,10 +398,10 @@ declare const relayTransport: (relayUrl: string, options: {
398
398
  }) => RfqTransport;
399
399
  /** The solver's unilateral-claim delay, derived from the Arkade operator's reported
400
400
  * exit delay exactly as the reference solver derives it — both sides read the
401
- * SAME server, so the derivation (not a quote field) is what keeps the two
401
+ * SAME operator, so the derivation (not a quote field) is what keeps the two
402
402
  * scripts identical. */
403
403
  declare const unilateralClaimDelay: (operatorExitDelaySeconds: number) => number;
404
- /** VHTLC's `unilateralRefund` tier: sender + receiver, no server — LEVEL with
404
+ /** VHTLC's `unilateralRefund` tier: sender + receiver, no operator — LEVEL with
405
405
  * `claimDelay`, not above it. Neither party can spend a two-signature leaf
406
406
  * alone, so separating it buys no safety and would only eat into the headroom that matters. */
407
407
  declare const unilateralRefundDelay: (claimDelay: number) => number;
@@ -416,10 +416,10 @@ declare const unilateralRefundWithoutReceiverDelay: (claimDelay: number) => numb
416
416
  * the trader never needs to see `P`.
417
417
  *
418
418
  * Nine leaves unless `legacy`: VHTLC's six plus the emulator-covenant suite —
419
- * `nonInteractiveClaim` (server + emulator, pays the solver's `receiverPkScript`),
420
- * `nonInteractiveRefund` (server + solver + emulator, pays the trader's `refundPkScript`, no
419
+ * `nonInteractiveClaim` (operator, pays the solver's `receiverPkScript`),
420
+ * `nonInteractiveRefund` (operator + solver, pays the trader's `refundPkScript`, no
421
421
  * timelock or trader signature; see {@link VHTLC.Options.nonInteractiveParameters}), and
422
- * `nonInteractiveRefundWithoutReceiver` (server + emulator after `refundLocktime`).
422
+ * `nonInteractiveRefundWithoutReceiver` (operator after `refundLocktime`).
423
423
  */
424
424
  declare function lightningSendContract(params: {
425
425
  /** Binding field #1: the solver's x-only key, from the quote. */
@@ -430,7 +430,7 @@ declare function lightningSendContract(params: {
430
430
  operatorPubkey: Uint8Array;
431
431
  /** BOLT11 payment hash, hex — from the trader's OWN invoice decode. */
432
432
  paymentHash: string;
433
- /** From {@link unilateralClaimDelay} over the trader's OWN server info; all three unilateral
433
+ /** From {@link unilateralClaimDelay} over the trader's OWN operator info; all three unilateral
434
434
  * tiers derive from it. */
435
435
  claimDelay: number;
436
436
  /** Binding quote field. Optional only for rebuilding pre-upgrade scripts. */
@@ -797,7 +797,7 @@ declare function lightningReceiveContract(params: {
797
797
  operatorPubkey: Uint8Array;
798
798
  /** `sha256(P)`, hex — the trader's OWN preimage hash. */
799
799
  paymentHash: string;
800
- /** From {@link unilateralClaimDelay} over the trader's OWN server info. */
800
+ /** From {@link unilateralClaimDelay} over the trader's OWN operator info. */
801
801
  claimDelay: number;
802
802
  /** Emulator x-only key — see {@link requestLightningSend}'s parameter. */
803
803
  emulatorPubkey: Uint8Array;
@@ -398,10 +398,10 @@ declare const relayTransport: (relayUrl: string, options: {
398
398
  }) => RfqTransport;
399
399
  /** The solver's unilateral-claim delay, derived from the Arkade operator's reported
400
400
  * exit delay exactly as the reference solver derives it — both sides read the
401
- * SAME server, so the derivation (not a quote field) is what keeps the two
401
+ * SAME operator, so the derivation (not a quote field) is what keeps the two
402
402
  * scripts identical. */
403
403
  declare const unilateralClaimDelay: (operatorExitDelaySeconds: number) => number;
404
- /** VHTLC's `unilateralRefund` tier: sender + receiver, no server — LEVEL with
404
+ /** VHTLC's `unilateralRefund` tier: sender + receiver, no operator — LEVEL with
405
405
  * `claimDelay`, not above it. Neither party can spend a two-signature leaf
406
406
  * alone, so separating it buys no safety and would only eat into the headroom that matters. */
407
407
  declare const unilateralRefundDelay: (claimDelay: number) => number;
@@ -416,10 +416,10 @@ declare const unilateralRefundWithoutReceiverDelay: (claimDelay: number) => numb
416
416
  * the trader never needs to see `P`.
417
417
  *
418
418
  * Nine leaves unless `legacy`: VHTLC's six plus the emulator-covenant suite —
419
- * `nonInteractiveClaim` (server + emulator, pays the solver's `receiverPkScript`),
420
- * `nonInteractiveRefund` (server + solver + emulator, pays the trader's `refundPkScript`, no
419
+ * `nonInteractiveClaim` (operator, pays the solver's `receiverPkScript`),
420
+ * `nonInteractiveRefund` (operator + solver, pays the trader's `refundPkScript`, no
421
421
  * timelock or trader signature; see {@link VHTLC.Options.nonInteractiveParameters}), and
422
- * `nonInteractiveRefundWithoutReceiver` (server + emulator after `refundLocktime`).
422
+ * `nonInteractiveRefundWithoutReceiver` (operator after `refundLocktime`).
423
423
  */
424
424
  declare function lightningSendContract(params: {
425
425
  /** Binding field #1: the solver's x-only key, from the quote. */
@@ -430,7 +430,7 @@ declare function lightningSendContract(params: {
430
430
  operatorPubkey: Uint8Array;
431
431
  /** BOLT11 payment hash, hex — from the trader's OWN invoice decode. */
432
432
  paymentHash: string;
433
- /** From {@link unilateralClaimDelay} over the trader's OWN server info; all three unilateral
433
+ /** From {@link unilateralClaimDelay} over the trader's OWN operator info; all three unilateral
434
434
  * tiers derive from it. */
435
435
  claimDelay: number;
436
436
  /** Binding quote field. Optional only for rebuilding pre-upgrade scripts. */
@@ -797,7 +797,7 @@ declare function lightningReceiveContract(params: {
797
797
  operatorPubkey: Uint8Array;
798
798
  /** `sha256(P)`, hex — the trader's OWN preimage hash. */
799
799
  paymentHash: string;
800
- /** From {@link unilateralClaimDelay} over the trader's OWN server info. */
800
+ /** From {@link unilateralClaimDelay} over the trader's OWN operator info. */
801
801
  claimDelay: number;
802
802
  /** Emulator x-only key — see {@link requestLightningSend}'s parameter. */
803
803
  emulatorPubkey: Uint8Array;
@@ -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-BOQ1qYoj.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-Cut4eEkm.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.2",
3
+ "version": "0.1.4",
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.2"
107
+ "@arkade-os/sdk": "0.5.4"
108
108
  },
109
109
  "peerDependencies": {
110
110
  "nostr-tools": "2.24.1"