@arkade-os/sdk 0.4.67 → 0.4.69

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 (78) hide show
  1. package/README.md +38 -0
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{asyncStorageTaskQueue-Za-e_zMk.d.ts → asyncStorageTaskQueue-BgUJN-3X.d.ts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-LTpeXYaD.d.cts → asyncStorageTaskQueue-Cstx6hS7.d.cts} +2 -2
  10. package/dist/{chunk-6TAQF6EV.js → chunk-2PPL3O7Z.js} +72 -120
  11. package/dist/chunk-2PPL3O7Z.js.map +1 -0
  12. package/dist/{chunk-2JV4VQ7C.cjs → chunk-5MLC2HU3.cjs} +17 -3
  13. package/dist/chunk-5MLC2HU3.cjs.map +1 -0
  14. package/dist/{chunk-MJUTO3PY.cjs → chunk-EBYCTLET.cjs} +832 -488
  15. package/dist/chunk-EBYCTLET.cjs.map +1 -0
  16. package/dist/{chunk-CO3KKSWM.cjs → chunk-GVHUHTRH.cjs} +17 -17
  17. package/dist/{chunk-CO3KKSWM.cjs.map → chunk-GVHUHTRH.cjs.map} +1 -1
  18. package/dist/{chunk-YDRZDZPP.cjs → chunk-HQ4DMGA4.cjs} +10 -10
  19. package/dist/{chunk-YDRZDZPP.cjs.map → chunk-HQ4DMGA4.cjs.map} +1 -1
  20. package/dist/{chunk-3WIWNE4P.js → chunk-L5SCQYHF.js} +16 -4
  21. package/dist/chunk-L5SCQYHF.js.map +1 -0
  22. package/dist/{chunk-MZFUZUTQ.js → chunk-MNMPGEK2.js} +4 -4
  23. package/dist/{chunk-MZFUZUTQ.js.map → chunk-MNMPGEK2.js.map} +1 -1
  24. package/dist/{chunk-AEWJU6NZ.js → chunk-TA7XLEP2.js} +411 -68
  25. package/dist/chunk-TA7XLEP2.js.map +1 -0
  26. package/dist/{chunk-OIZ2V2VD.cjs → chunk-WIFL5QYZ.cjs} +118 -166
  27. package/dist/chunk-WIFL5QYZ.cjs.map +1 -0
  28. package/dist/{chunk-EALWOVHK.js → chunk-XLWDX7QZ.js} +4 -4
  29. package/dist/{chunk-EALWOVHK.js.map → chunk-XLWDX7QZ.js.map} +1 -1
  30. package/dist/{chunk-R2YAMONM.cjs → chunk-XQPN5YP2.cjs} +17 -17
  31. package/dist/{chunk-R2YAMONM.cjs.map → chunk-XQPN5YP2.cjs.map} +1 -1
  32. package/dist/{chunk-X3VEMUVV.js → chunk-YG7T6LI3.js} +3 -3
  33. package/dist/{chunk-X3VEMUVV.js.map → chunk-YG7T6LI3.js.map} +1 -1
  34. package/dist/contracts/handlers/index.cjs +9 -9
  35. package/dist/contracts/handlers/index.d.cts +3 -3
  36. package/dist/contracts/handlers/index.d.ts +3 -3
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-cdmzb2f9.d.ts → delegate-BPdzTbwN.d.ts} +1 -1
  39. package/dist/{delegate-Bz2e2zXY.d.cts → delegate-DrwIar11.d.cts} +1 -1
  40. package/dist/{hdWalletCapable-Hi12xjCJ.d.ts → hdWalletCapable-D4WH35z0.d.cts} +49 -5
  41. package/dist/{hdWalletCapable-BSjuUYOO.d.cts → hdWalletCapable-DyxCiNVE.d.ts} +49 -5
  42. package/dist/{index-BiACuWaf.d.ts → index-BqhpAqqj.d.cts} +96 -119
  43. package/dist/{index-D2GjZxBr.d.cts → index-TZJvbIaA.d.ts} +96 -119
  44. package/dist/{index-DU5o_hz7.d.cts → index-dWRqYSdS.d.cts} +70 -2
  45. package/dist/{index-DU5o_hz7.d.ts → index-dWRqYSdS.d.ts} +70 -2
  46. package/dist/index.cjs +297 -289
  47. package/dist/index.d.cts +29 -8
  48. package/dist/index.d.ts +29 -8
  49. package/dist/index.js +4 -4
  50. package/dist/repositories/realm/index.cjs +19 -19
  51. package/dist/repositories/realm/index.d.cts +2 -2
  52. package/dist/repositories/realm/index.d.ts +2 -2
  53. package/dist/repositories/realm/index.js +5 -5
  54. package/dist/repositories/sqlite/index.cjs +18 -18
  55. package/dist/repositories/sqlite/index.d.cts +2 -2
  56. package/dist/repositories/sqlite/index.d.ts +2 -2
  57. package/dist/repositories/sqlite/index.js +5 -5
  58. package/dist/{taskRunner-BZJMLQ6g.d.cts → taskRunner-CzYKyJ9c.d.cts} +2 -2
  59. package/dist/{taskRunner-DATaRQus.d.ts → taskRunner-D2fnbqYw.d.ts} +2 -2
  60. package/dist/wallet/expo/background.cjs +14 -14
  61. package/dist/wallet/expo/background.d.cts +3 -3
  62. package/dist/wallet/expo/background.d.ts +3 -3
  63. package/dist/wallet/expo/background.js +6 -6
  64. package/dist/wallet/expo/index.cjs +14 -14
  65. package/dist/wallet/expo/index.d.cts +4 -4
  66. package/dist/wallet/expo/index.d.ts +4 -4
  67. package/dist/wallet/expo/index.js +5 -5
  68. package/dist/worker/expo/index.cjs +9 -9
  69. package/dist/worker/expo/index.d.cts +4 -4
  70. package/dist/worker/expo/index.d.ts +4 -4
  71. package/dist/worker/expo/index.js +5 -5
  72. package/package.json +1 -1
  73. package/dist/chunk-2JV4VQ7C.cjs.map +0 -1
  74. package/dist/chunk-3WIWNE4P.js.map +0 -1
  75. package/dist/chunk-6TAQF6EV.js.map +0 -1
  76. package/dist/chunk-AEWJU6NZ.js.map +0 -1
  77. package/dist/chunk-MJUTO3PY.cjs.map +0 -1
  78. package/dist/chunk-OIZ2V2VD.cjs.map +0 -1
@@ -1,38 +1,38 @@
1
1
  'use strict';
2
2
 
3
- var chunkOIZ2V2VD_cjs = require('../../chunk-OIZ2V2VD.cjs');
4
- require('../../chunk-2JV4VQ7C.cjs');
3
+ var chunkWIFL5QYZ_cjs = require('../../chunk-WIFL5QYZ.cjs');
4
+ require('../../chunk-5MLC2HU3.cjs');
5
5
  require('../../chunk-5BLDMQED.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "ArkadeContractHandler", {
10
10
  enumerable: true,
11
- get: function () { return chunkOIZ2V2VD_cjs.ArkadeContractHandler; }
11
+ get: function () { return chunkWIFL5QYZ_cjs.ArkadeContractHandler; }
12
12
  });
13
13
  Object.defineProperty(exports, "BoardingContractHandler", {
14
14
  enumerable: true,
15
- get: function () { return chunkOIZ2V2VD_cjs.BoardingContractHandler; }
15
+ get: function () { return chunkWIFL5QYZ_cjs.BoardingContractHandler; }
16
16
  });
17
17
  Object.defineProperty(exports, "DefaultContractHandler", {
18
18
  enumerable: true,
19
- get: function () { return chunkOIZ2V2VD_cjs.DefaultContractHandler; }
19
+ get: function () { return chunkWIFL5QYZ_cjs.DefaultContractHandler; }
20
20
  });
21
21
  Object.defineProperty(exports, "DelegateContractHandler", {
22
22
  enumerable: true,
23
- get: function () { return chunkOIZ2V2VD_cjs.DelegateContractHandler; }
23
+ get: function () { return chunkWIFL5QYZ_cjs.DelegateContractHandler; }
24
24
  });
25
25
  Object.defineProperty(exports, "VHTLCContractHandler", {
26
26
  enumerable: true,
27
- get: function () { return chunkOIZ2V2VD_cjs.VHTLCContractHandler; }
27
+ get: function () { return chunkWIFL5QYZ_cjs.VHTLCContractHandler; }
28
28
  });
29
29
  Object.defineProperty(exports, "VHTLCV2ContractHandler", {
30
30
  enumerable: true,
31
- get: function () { return chunkOIZ2V2VD_cjs.VHTLCV2ContractHandler; }
31
+ get: function () { return chunkWIFL5QYZ_cjs.VHTLCV2ContractHandler; }
32
32
  });
33
33
  Object.defineProperty(exports, "contractHandlers", {
34
34
  enumerable: true,
35
- get: function () { return chunkOIZ2V2VD_cjs.contractHandlers; }
35
+ get: function () { return chunkWIFL5QYZ_cjs.contractHandlers; }
36
36
  });
37
37
  //# sourceMappingURL=index.cjs.map
38
38
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-D2GjZxBr.cjs';
2
- import '../../index-DU5o_hz7.cjs';
1
+ export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-BqhpAqqj.cjs';
2
+ import '../../index-dWRqYSdS.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-Bz2e2zXY.cjs';
7
+ import '../../delegate-DrwIar11.cjs';
@@ -1,7 +1,7 @@
1
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-BiACuWaf.js';
2
- import '../../index-DU5o_hz7.js';
1
+ export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-TZJvbIaA.js';
2
+ import '../../index-dWRqYSdS.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-cdmzb2f9.js';
7
+ import '../../delegate-BPdzTbwN.js';
@@ -1,5 +1,5 @@
1
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-6TAQF6EV.js';
2
- import '../../chunk-3WIWNE4P.js';
1
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-2PPL3O7Z.js';
2
+ import '../../chunk-L5SCQYHF.js';
3
3
  import '../../chunk-NSBPE2FW.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-DU5o_hz7.js';
2
+ import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-dWRqYSdS.js';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-DU5o_hz7.cjs';
2
+ import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-dWRqYSdS.cjs';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,8 +1,8 @@
1
- import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-DU5o_hz7.js';
1
+ import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-dWRqYSdS.cjs';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
  import { Bytes } from '@scure/btc-signer/utils.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-cdmzb2f9.js';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DrwIar11.cjs';
6
6
 
7
7
  /** Wall-clock floor for `batchExpiry` outside regtest. */
8
8
  declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
@@ -1938,11 +1938,55 @@ declare function selectVirtualCoins(coins: ExtendedVirtualCoin[], targetAmount:
1938
1938
  changeAmount: bigint;
1939
1939
  };
1940
1940
  /**
1941
- * Wait for incoming funds to the wallet
1941
+ * Raised when a wait is cancelled through its `AbortSignal` or `timeoutMs`.
1942
+ *
1943
+ * `name` is `"AbortError"`, matching both the platform convention and the
1944
+ * `error.name === "AbortError"` checks the provider layer already makes, so a
1945
+ * caller can treat DOM and SDK aborts identically.
1946
+ */
1947
+ declare class AbortError extends Error {
1948
+ constructor(message?: string);
1949
+ }
1950
+ /** Options for {@link waitForIncomingFunds}. */
1951
+ interface WaitForIncomingFundsOptions {
1952
+ /**
1953
+ * Cancels the wait. On abort the underlying subscription is stopped and
1954
+ * the returned promise rejects — with the signal's `reason` when the
1955
+ * caller supplied an `Error`, otherwise an {@link AbortError}.
1956
+ */
1957
+ signal?: AbortSignal;
1958
+ /**
1959
+ * Cancels the wait after this many milliseconds, rejecting with an
1960
+ * {@link AbortError}. Equivalent to passing an `AbortSignal.timeout`
1961
+ * signal, without requiring that API on the target platform.
1962
+ */
1963
+ timeoutMs?: number;
1964
+ }
1965
+ /**
1966
+ * Wait for incoming funds to the wallet.
1967
+ *
1968
+ * This opens live network watchers (an onchain address subscription plus the
1969
+ * wallet's indexer stream) and keeps them open until it settles. **Cancel it
1970
+ * if you are not going to await it to completion** — pass a `signal` or a
1971
+ * `timeoutMs`. Racing an uncancelled call against a timer (`Promise.race`)
1972
+ * abandons the loser without stopping its watchers, and repeating that in a
1973
+ * loop stacks subscriptions until the process exits.
1974
+ *
1942
1975
  * @param wallet - The wallet to wait for incoming funds
1976
+ * @param options - Cancellation options; see {@link WaitForIncomingFundsOptions}
1943
1977
  * @returns A promise that resolves the next new coins received by the wallet's address
1978
+ * @throws {AbortError} If cancelled via `signal` or `timeoutMs`
1979
+ * @example
1980
+ * ```typescript
1981
+ * // Wake early on a deposit, but give up after 30s and release the watchers.
1982
+ * try {
1983
+ * const funds = await waitForIncomingFunds(wallet, { timeoutMs: 30_000 })
1984
+ * } catch (e) {
1985
+ * if ((e as Error).name !== "AbortError") throw e
1986
+ * }
1987
+ * ```
1944
1988
  */
1945
- declare function waitForIncomingFunds(wallet: Wallet): Promise<IncomingFunds>;
1989
+ declare function waitForIncomingFunds(wallet: Wallet, options?: WaitForIncomingFundsOptions): Promise<IncomingFunds>;
1946
1990
 
1947
1991
  /**
1948
1992
  * Capability a wallet exposes so descriptor-blind consumers — Boltz swaps and
@@ -2110,4 +2154,4 @@ interface AddressAllocationCapable {
2110
2154
  /** Structural type guard for {@link AddressAllocationCapable}. */
2111
2155
  declare function isAddressAllocationCapable(value: unknown): value is AddressAllocationCapable;
2112
2156
 
2113
- export { type AddressAllocationCapable as A, type BatchExpiryPolicy as B, type CheckpointExitDelayPolicy as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D, isArkError as E, ForeignDescriptorError as F, isHDAllocationCapable as G, type HDWalletCapable as H, type IncomingFunds as I, isHDWalletCapable as J, maybeArkError as K, resolveBatchExpiryPolicy as L, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as M, resolveCheckpointExitDelayPolicy as N, resolveDescriptorSigner as O, type ProviderConnectionState as P, selectVirtualCoins as Q, ReadonlyWallet as R, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as S, signingDescriptorIndex as T, strictSigningDescriptorIndex as U, waitForIncomingFunds as V, Wallet as W, type HDAllocationCapable as a, type ReceiveRotatorFactory as b, type ReceiveRotatorBootOpts as c, type ReceiveRotatorBoot as d, Batch as e, ArkError as f, ArkErrorName as g, type ArkadeCashClaimResult as h, ArkadeCashCreateError as i, type ArkadeCashUnclaimedReason as j, type ArkadeCashUnclaimedVtxo as k, type BoardingUtxoGroup as l, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as m, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as n, type ProviderKind as o, ProviderUnavailableError as p, REGTEST_MIN_BATCH_EXPIRY_SECONDS as q, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as r, type ServerInfoSource as s, ServerResponseMismatchError as t, WalletCannotAllocateAddressError as u, assertValidBatchExpiry as v, assertValidServerUnrollScript as w, defaultBatchExpiryPolicy as x, defaultCheckpointExitDelayPolicy as y, isAddressAllocationCapable as z };
2157
+ export { type AddressAllocationCapable as A, type BatchExpiryPolicy as B, type CheckpointExitDelayPolicy as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D, defaultCheckpointExitDelayPolicy as E, ForeignDescriptorError as F, isAddressAllocationCapable as G, type HDWalletCapable as H, type IncomingFunds as I, isArkError as J, isHDAllocationCapable as K, isHDWalletCapable as L, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as M, maybeArkError as N, resolveBatchExpiryPolicy as O, type ProviderConnectionState as P, resolveCheckpointExitDelayPolicy as Q, ReadonlyWallet as R, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as S, resolveDescriptorSigner as T, selectVirtualCoins as U, signingDescriptorIndex as V, Wallet as W, strictSigningDescriptorIndex as X, waitForIncomingFunds as Y, type HDAllocationCapable as a, type ReceiveRotatorFactory as b, type ReceiveRotatorBootOpts as c, type ReceiveRotatorBoot as d, Batch as e, AbortError as f, ArkError as g, ArkErrorName as h, type ArkadeCashClaimResult as i, ArkadeCashCreateError as j, type ArkadeCashUnclaimedReason as k, type ArkadeCashUnclaimedVtxo as l, type BoardingUtxoGroup as m, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as n, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as o, type ProviderKind as p, ProviderUnavailableError as q, REGTEST_MIN_BATCH_EXPIRY_SECONDS as r, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as s, type ServerInfoSource as t, ServerResponseMismatchError as u, type WaitForIncomingFundsOptions as v, WalletCannotAllocateAddressError as w, assertValidBatchExpiry as x, assertValidServerUnrollScript as y, defaultBatchExpiryPolicy as z };
@@ -1,8 +1,8 @@
1
- import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-DU5o_hz7.cjs';
1
+ import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-dWRqYSdS.js';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
  import { Bytes } from '@scure/btc-signer/utils.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Bz2e2zXY.cjs';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BPdzTbwN.js';
6
6
 
7
7
  /** Wall-clock floor for `batchExpiry` outside regtest. */
8
8
  declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
@@ -1938,11 +1938,55 @@ declare function selectVirtualCoins(coins: ExtendedVirtualCoin[], targetAmount:
1938
1938
  changeAmount: bigint;
1939
1939
  };
1940
1940
  /**
1941
- * Wait for incoming funds to the wallet
1941
+ * Raised when a wait is cancelled through its `AbortSignal` or `timeoutMs`.
1942
+ *
1943
+ * `name` is `"AbortError"`, matching both the platform convention and the
1944
+ * `error.name === "AbortError"` checks the provider layer already makes, so a
1945
+ * caller can treat DOM and SDK aborts identically.
1946
+ */
1947
+ declare class AbortError extends Error {
1948
+ constructor(message?: string);
1949
+ }
1950
+ /** Options for {@link waitForIncomingFunds}. */
1951
+ interface WaitForIncomingFundsOptions {
1952
+ /**
1953
+ * Cancels the wait. On abort the underlying subscription is stopped and
1954
+ * the returned promise rejects — with the signal's `reason` when the
1955
+ * caller supplied an `Error`, otherwise an {@link AbortError}.
1956
+ */
1957
+ signal?: AbortSignal;
1958
+ /**
1959
+ * Cancels the wait after this many milliseconds, rejecting with an
1960
+ * {@link AbortError}. Equivalent to passing an `AbortSignal.timeout`
1961
+ * signal, without requiring that API on the target platform.
1962
+ */
1963
+ timeoutMs?: number;
1964
+ }
1965
+ /**
1966
+ * Wait for incoming funds to the wallet.
1967
+ *
1968
+ * This opens live network watchers (an onchain address subscription plus the
1969
+ * wallet's indexer stream) and keeps them open until it settles. **Cancel it
1970
+ * if you are not going to await it to completion** — pass a `signal` or a
1971
+ * `timeoutMs`. Racing an uncancelled call against a timer (`Promise.race`)
1972
+ * abandons the loser without stopping its watchers, and repeating that in a
1973
+ * loop stacks subscriptions until the process exits.
1974
+ *
1942
1975
  * @param wallet - The wallet to wait for incoming funds
1976
+ * @param options - Cancellation options; see {@link WaitForIncomingFundsOptions}
1943
1977
  * @returns A promise that resolves the next new coins received by the wallet's address
1978
+ * @throws {AbortError} If cancelled via `signal` or `timeoutMs`
1979
+ * @example
1980
+ * ```typescript
1981
+ * // Wake early on a deposit, but give up after 30s and release the watchers.
1982
+ * try {
1983
+ * const funds = await waitForIncomingFunds(wallet, { timeoutMs: 30_000 })
1984
+ * } catch (e) {
1985
+ * if ((e as Error).name !== "AbortError") throw e
1986
+ * }
1987
+ * ```
1944
1988
  */
1945
- declare function waitForIncomingFunds(wallet: Wallet): Promise<IncomingFunds>;
1989
+ declare function waitForIncomingFunds(wallet: Wallet, options?: WaitForIncomingFundsOptions): Promise<IncomingFunds>;
1946
1990
 
1947
1991
  /**
1948
1992
  * Capability a wallet exposes so descriptor-blind consumers — Boltz swaps and
@@ -2110,4 +2154,4 @@ interface AddressAllocationCapable {
2110
2154
  /** Structural type guard for {@link AddressAllocationCapable}. */
2111
2155
  declare function isAddressAllocationCapable(value: unknown): value is AddressAllocationCapable;
2112
2156
 
2113
- export { type AddressAllocationCapable as A, type BatchExpiryPolicy as B, type CheckpointExitDelayPolicy as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D, isArkError as E, ForeignDescriptorError as F, isHDAllocationCapable as G, type HDWalletCapable as H, type IncomingFunds as I, isHDWalletCapable as J, maybeArkError as K, resolveBatchExpiryPolicy as L, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as M, resolveCheckpointExitDelayPolicy as N, resolveDescriptorSigner as O, type ProviderConnectionState as P, selectVirtualCoins as Q, ReadonlyWallet as R, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as S, signingDescriptorIndex as T, strictSigningDescriptorIndex as U, waitForIncomingFunds as V, Wallet as W, type HDAllocationCapable as a, type ReceiveRotatorFactory as b, type ReceiveRotatorBootOpts as c, type ReceiveRotatorBoot as d, Batch as e, ArkError as f, ArkErrorName as g, type ArkadeCashClaimResult as h, ArkadeCashCreateError as i, type ArkadeCashUnclaimedReason as j, type ArkadeCashUnclaimedVtxo as k, type BoardingUtxoGroup as l, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as m, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as n, type ProviderKind as o, ProviderUnavailableError as p, REGTEST_MIN_BATCH_EXPIRY_SECONDS as q, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as r, type ServerInfoSource as s, ServerResponseMismatchError as t, WalletCannotAllocateAddressError as u, assertValidBatchExpiry as v, assertValidServerUnrollScript as w, defaultBatchExpiryPolicy as x, defaultCheckpointExitDelayPolicy as y, isAddressAllocationCapable as z };
2157
+ export { type AddressAllocationCapable as A, type BatchExpiryPolicy as B, type CheckpointExitDelayPolicy as C, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as D, defaultCheckpointExitDelayPolicy as E, ForeignDescriptorError as F, isAddressAllocationCapable as G, type HDWalletCapable as H, type IncomingFunds as I, isArkError as J, isHDAllocationCapable as K, isHDWalletCapable as L, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as M, maybeArkError as N, resolveBatchExpiryPolicy as O, type ProviderConnectionState as P, resolveCheckpointExitDelayPolicy as Q, ReadonlyWallet as R, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as S, resolveDescriptorSigner as T, selectVirtualCoins as U, signingDescriptorIndex as V, Wallet as W, strictSigningDescriptorIndex as X, waitForIncomingFunds as Y, type HDAllocationCapable as a, type ReceiveRotatorFactory as b, type ReceiveRotatorBootOpts as c, type ReceiveRotatorBoot as d, Batch as e, AbortError as f, ArkError as g, ArkErrorName as h, type ArkadeCashClaimResult as i, ArkadeCashCreateError as j, type ArkadeCashUnclaimedReason as k, type ArkadeCashUnclaimedVtxo as l, type BoardingUtxoGroup as m, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as n, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as o, type ProviderKind as p, ProviderUnavailableError as q, REGTEST_MIN_BATCH_EXPIRY_SECONDS as r, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS as s, type ServerInfoSource as t, ServerResponseMismatchError as u, type WaitForIncomingFundsOptions as v, WalletCannotAllocateAddressError as w, assertValidBatchExpiry as x, assertValidServerUnrollScript as y, defaultBatchExpiryPolicy as z };
@@ -1,5 +1,5 @@
1
- import { bg as ContractHandler, s as RelativeTimelock, bs as Discoverable, V as VtxoScript, t as TapLeafScript, d4 as TapscriptDeriving } from './index-DU5o_hz7.js';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-cdmzb2f9.js';
1
+ import { bg as ContractHandler, s as RelativeTimelock, bs as Discoverable, V as VtxoScript, t as TapLeafScript, d5 as TapscriptDeriving } from './index-dWRqYSdS.cjs';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DrwIar11.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /**
@@ -114,96 +114,79 @@ declare namespace VHTLC {
114
114
  unilateralRefundDelay: RelativeTimelock;
115
115
  unilateralRefundWithoutReceiverDelay: RelativeTimelock;
116
116
  /**
117
- * Optional non-interactive claim leaf: `server` plus a covenant-tweaked
118
- * emulator co-signer, pinned to `receiverPkScript`. Lets the receiver's
119
- * claim be pushed by the emulator without the receiver being online.
117
+ * The emulator covenant leaves, ALL OR NOTHING. Present, this adds the
118
+ * three non-interactive leaves the emulator co-signs under a covenant
119
+ * pinning the payout to a pre-committed destination:
120
+ *
121
+ * - `nonInteractiveClaim`: `server` + a covenant-tweaked emulator
122
+ * co-signer, paying `receiverPkScript` — the receiver's claim can
123
+ * be pushed without the receiver being online.
124
+ * - `nonInteractiveRefund`: `server` + `receiver` + a covenant-tweaked
125
+ * emulator co-signer, paying `senderPkScript`, no timelock — lets
126
+ * server and receiver release the refund the moment they agree the
127
+ * swap has failed, and recoverable even if the sender's own key is
128
+ * lost, since no OTHER refund-side leaf survives that.
129
+ * - `nonInteractiveRefundWithoutReceiver`: `server` + the SAME
130
+ * covenant-tweaked co-signer as `nonInteractiveRefund`, paying
131
+ * `senderPkScript` after `refundLocktime` — the only refund tier
132
+ * needing no participant signature at all, so a sender who funded
133
+ * a lockup and vanished is refundable through it alone.
134
+ *
135
+ * WHY ONE FLAG AND NOT A SWITCH PER LEAF. The three are one mechanism
136
+ * — the same emulator key, the same `enforcePayTo` covenant pointed
137
+ * at a per-role destination — and they protect opposite directions of
138
+ * the same swap, so no real configuration wants a subset. A subset
139
+ * would cost, not buy: every optional leaf multiplies the tree shapes
140
+ * a counterparty must derive to verify an address (nothing on the
141
+ * wire says which leaves a quote carries), so per-leaf toggling turns
142
+ * one address comparison into a combinatorial guess. All-or-nothing
143
+ * keeps the shape count at two: suite, or no suite.
144
+ *
145
+ * Leaf order fixes the taproot merkle root, so the suite is appended
146
+ * after the six signature leaves in a fixed order (claim, refund,
147
+ * timelocked refund) and a script built with this option NEVER
148
+ * collides with one built without it — which is what makes "did this
149
+ * quote opt in" a question an address comparison answers.
150
+ *
151
+ * STABLE PER RELEASE: what this option builds does not change within
152
+ * a published SDK version. A future covenant leaf joins the suite
153
+ * only behind a NEW option, so re-deriving a lockup with the SDK
154
+ * that quoted it reproduces its address byte-for-byte.
120
155
  */
121
- nonInteractiveClaim?: {
122
- receiverPkScript: Bytes;
156
+ nonInteractiveParameters?: {
157
+ /**
158
+ * The emulator service's public key, 32-byte x-only or 33-byte
159
+ * compressed. ONE key, tweaked per covenant destination, becomes
160
+ * the co-signer of every leaf in the suite — the leaves share it
161
+ * structurally, and BIP-341 tapscript sighashes committing to the
162
+ * tapleaf hash are what keep a signature for one leaf from
163
+ * replaying against another.
164
+ */
123
165
  emulatorPubkey: Bytes;
124
166
  /**
125
- * OPT-IN: also require the claim to pay at least these amounts.
126
- *
127
- * The covenant's default bound is conservation (`out >= in`) — see
128
- * {@link enforcePayTo} for why a quote is normally not the
129
- * covenant's business. This is the escape hatch for a consumer that
130
- * wants the quote enforced in script rather than at its own
131
- * admission layer.
132
- *
133
- * ADDITIVE, NEVER A REPLACEMENT. The conservation bound stays. On
134
- * its own, `out >= quoted` leaves everything ABOVE the quote
135
- * unconstrained, so an overfunded lockup's surplus could be routed
136
- * anywhere by whoever assembles the spend — trading an underfunding
137
- * hole for a skimming one. Both bounds together admit neither.
138
- *
139
- * WHAT IT COSTS, and it is not only opcodes:
140
- *
141
- * - THE ADDRESS BECOMES A FUNCTION OF THE QUOTE. These amounts
142
- * compile into the leaf, hence the emulator key, hence the
143
- * pkScript. A re-quote is a different address, and cannot be
144
- * applied to a lockup already funded.
145
- * - AN UNDERFUNDED LOCKUP BECOMES UNCLAIMABLE. Its only exit is the
146
- * refund path, which waits out the CLTV. That is the intended
147
- * incentive and it lands on whoever misfunded — but it converts
148
- * "claim the short amount now and settle up" into "wait for the
149
- * timelock".
150
- *
151
- * Omit for the default. Omitting leaves every script byte unchanged,
152
- * so contracts already funded keep their addresses.
167
+ * Where the claim covenant pays: the receiver's own P2TR
168
+ * pkScript, 34 bytes.
169
+ */
170
+ receiverPkScript: Bytes;
171
+ /**
172
+ * Where BOTH refund covenants pay: the sender's own P2TR
173
+ * pkScript, 34 bytes. One destination shared by both refund
174
+ * leaves, so they cannot diverge on where a refund goes.
153
175
  */
154
- strict?: {
155
- /** Sats the claim must pay. Positive. */
156
- amount: bigint;
157
- /**
158
- * Asset base units the claim must pay.
159
- *
160
- * Required iff {@link VHTLC.Options.asset} is set, and refused
161
- * otherwise. Strict-on-sats-only against an asset-denominated
162
- * contract would pin the sat CARRIER and say nothing about the
163
- * asset that is the actual amount — half-enforcement that reads
164
- * like enforcement, which is the failure this option exists to
165
- * avoid rather than introduce.
166
- */
167
- assetAmount?: bigint;
168
- };
169
- };
170
- /**
171
- * Optional non-interactive refund leaf: `server` + `receiver` + a
172
- * covenant-tweaked emulator co-signer, pinned to `senderPkScript`, no
173
- * timelock. Every OTHER refund-side leaf in this contract requires
174
- * the sender's own signature — if the sender permanently loses that
175
- * key, none of them are reachable. This leaf is the one exception:
176
- * it needs neither the sender's presence nor their key, so funds
177
- * remain recoverable to the sender's pre-committed address even
178
- * then. It still needs the receiver (unlike `nonInteractiveClaim`,
179
- * which needs only server + emulator) — deliberately: this is what
180
- * lets server + receiver release the refund immediately, the moment
181
- * they agree the swap has failed, rather than making the sender wait
182
- * out `refundLocktime` the way {@link Script.refundWithoutReceiver}
183
- * does.
184
- */
185
- nonInteractiveRefund?: {
186
176
  senderPkScript: Bytes;
187
- emulatorPubkey: Bytes;
188
177
  /**
189
- * Also emit the timelocked twin: `server` plus the SAME
190
- * covenant-tweaked co-signer, spendable after `refundLocktime`
191
- * with no receiver signature and no sender signature.
178
+ * LEGACY REBUILD ONLY never for a new lockup.
192
179
  *
193
- * This is the only refund tier that needs nobody: `refund` and
194
- * `refundWithoutReceiver` need the sender's key,
195
- * `nonInteractiveRefund` needs the receiver's. A sender who
196
- * funded a lockup and vanished is refundable through this leaf
197
- * alone, by anyone, to their pre-committed address.
198
- *
199
- * Off by default: it is an additional leaf, appended last, so
200
- * enabling it changes the taproot merkle root and therefore the
201
- * address. `nonInteractiveClaim` and `nonInteractiveRefund` are
202
- * independently optional, so this is the NINTH leaf only in the
203
- * full swap-corridor configuration where both are set — on its
204
- * own, it is the eighth.
180
+ * `"preTimelockedRefund"` builds the suite WITHOUT its timelocked
181
+ * refund leaf: the shape every emulator-covenant lockup funded
182
+ * before that leaf shipped carries. Lockups already funded in that
183
+ * shape keep it permanently a leaf cannot be retrofitted onto an
184
+ * address already committed so re-deriving such a lockup (to
185
+ * spend it, or to verify an old quote's address) needs this. A new
186
+ * lockup that omits the leaf gives up the one refund tier needing
187
+ * nobody, for nothing.
205
188
  */
206
- withoutReceiver?: boolean;
189
+ legacy?: "preTimelockedRefund";
207
190
  };
208
191
  /**
209
192
  * Optional: denominate this contract in an Arkade ASSET rather than in
@@ -360,35 +343,33 @@ declare namespace VHTLC {
360
343
  * - **unilateralClaim**: Receiver can claim unilaterally after delay
361
344
  * - **unilateralRefund**: Sender and receiver can refund unilaterally after delay
362
345
  * - **unilateralRefundWithoutReceiver**: Sender can refund unilaterally after delay
363
- * - **nonInteractiveClaim** (optional): server + emulator can push the
364
- * receiver's claim, pinned to a pre-committed destination
365
- * - **nonInteractiveRefund** (optional): server + receiver + emulator
366
- * can push the sender's refund immediately, no timelock, pinned to a
367
- * pre-committed destination — recoverable even if the sender's own key
368
- * is lost
369
- * - **nonInteractiveRefundWithoutReceiver** (optional): server + emulator
370
- * can push the sender's refund after `refundLocktime`, pinned to a
371
- * pre-committed destination — the only refund tier needing no
372
- * participant signature at all
346
+ * - **nonInteractiveClaim** (with `nonInteractiveParameters`): server + emulator
347
+ * can push the receiver's claim, pinned to a pre-committed destination
348
+ * - **nonInteractiveRefund** (with `nonInteractiveParameters`): server + receiver
349
+ * + emulator can push the sender's refund immediately, no timelock,
350
+ * pinned to a pre-committed destination — recoverable even if the
351
+ * sender's own key is lost
352
+ * - **nonInteractiveRefundWithoutReceiver** (with `nonInteractiveParameters`):
353
+ * server + emulator can push the sender's refund after `refundLocktime`,
354
+ * pinned to a pre-committed destination — the only refund tier needing
355
+ * no participant signature at all
373
356
  *
374
357
  * See {@link ScriptV2} for the current recommended construction — same
375
358
  * leaf ladder, same options shape, an added length check on the claim
376
359
  * preimage. This class is unchanged and stays available as-is.
377
360
  *
378
- * **Pre-existing limitation, widened rather than introduced by
379
- * `nonInteractiveRefundWithoutReceiver`.** `nonInteractiveClaim` and
380
- * `nonInteractiveRefund` (and now its `withoutReceiver` leaf) build on
381
- * this class exactly as they do on {@link ScriptV2} — both extend the
382
- * same `BaseScript` where these leaves are constructed. But the `vhtlc`
361
+ * **Pre-existing limitation: the `vhtlc` contract handler registers none
362
+ * of the covenant leaves.** `nonInteractiveParameters` builds on this class
363
+ * exactly as it does on {@link ScriptV2} — both extend the same
364
+ * `BaseScript` where those leaves are constructed. But the `vhtlc`
383
365
  * contract handler (`src/contracts/handlers/vhtlc.ts`) round-trips none
384
366
  * of them: its params type carries no covenant fields, and
385
367
  * `createScript` only ever builds the six signature-only leaves. A V1
386
- * script built with either covenant option therefore compiles and can
368
+ * script built with the covenant suite therefore compiles and can
387
369
  * be funded, but cannot be registered as a `vhtlc` contract — the
388
370
  * handler would derive a different (six-leaf) script for the same
389
- * params and `ContractManager` refuses the mismatch. This was already
390
- * true before `withoutReceiver` existed; it now applies to one more
391
- * option than before, not to a newly-exposed one.
371
+ * params and `ContractManager` refuses the mismatch. Register through
372
+ * the `vhtlc-v2` handler instead, which round-trips the suite.
392
373
  *
393
374
  * @example
394
375
  * ```typescript
@@ -460,9 +441,9 @@ declare const VHTLCContractHandler: ContractHandler<VHTLCContractParams, VHTLC.S
460
441
  * The eight mandatory fields are `VHTLCContractParams` verbatim — the two
461
442
  * script versions take the same {@link VHTLC.Options}, so a divergent shape
462
443
  * here would be a difference with no cause. What V1's handler has no field for
463
- * is the two optional covenant leaves, and those are exactly what the swap
464
- * corridor's lockup carries, so leaving them out would make this handler unable
465
- * to round-trip the contract it exists to serve.
444
+ * is the emulator covenant suite, and that is exactly what the swap corridor's
445
+ * lockup carries, so leaving it out would make this handler unable to
446
+ * round-trip the contract it exists to serve.
466
447
  */
467
448
  interface VHTLCV2ContractParams {
468
449
  sender: Uint8Array;
@@ -484,22 +465,18 @@ interface VHTLCV2ContractParams {
484
465
  /** The asset group index within that genesis transaction. */
485
466
  groupIndex: number;
486
467
  };
487
- /** @see VHTLC.Options.nonInteractiveClaim */
488
- nonInteractiveClaim?: {
468
+ /**
469
+ * The emulator covenant suite, all or nothing — mirrors {@link
470
+ * VHTLC.Options.nonInteractiveParameters} exactly, including the legacy selector:
471
+ * a row funded before the timelocked refund leaf shipped round-trips with
472
+ * `legacy: "preTimelockedRefund"` and re-derives its eight-leaf shape.
473
+ */
474
+ nonInteractiveParameters?: {
489
475
  receiverPkScript: Uint8Array;
490
476
  emulatorPubkey: Uint8Array;
491
- /** @see VHTLC.Options.nonInteractiveClaim.strict */
492
- strict?: {
493
- amount: bigint;
494
- assetAmount?: bigint;
495
- };
496
- };
497
- /** @see VHTLC.Options.nonInteractiveRefund */
498
- nonInteractiveRefund?: {
499
477
  senderPkScript: Uint8Array;
500
- emulatorPubkey: Uint8Array;
501
- /** @see VHTLC.Options.nonInteractiveRefund.withoutReceiver */
502
- withoutReceiver?: boolean;
478
+ /** @see VHTLC.Options.nonInteractiveParameters.legacy */
479
+ legacy?: "preTimelockedRefund";
503
480
  };
504
481
  }
505
482
  /**