@arkade-os/sdk 0.4.48 → 0.4.49

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 (77) hide show
  1. package/dist/adapters/expo.cjs +5 -5
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +3 -3
  5. package/dist/adapters/indexedDB.cjs +5 -5
  6. package/dist/adapters/indexedDB.js +4 -4
  7. package/dist/{ark-CjE0KkGp.d.cts → ark-nkSiPYNf.d.cts} +86 -24
  8. package/dist/{ark-CjE0KkGp.d.ts → ark-nkSiPYNf.d.ts} +86 -24
  9. package/dist/{asyncStorageTaskQueue-D9SOPMPC.d.ts → asyncStorageTaskQueue-DCaEE83p.d.ts} +1 -1
  10. package/dist/{asyncStorageTaskQueue-CeLZhZFU.d.cts → asyncStorageTaskQueue-DdxhsEz6.d.cts} +1 -1
  11. package/dist/{chunk-ENZ4YPR2.cjs → chunk-2LAJ3RTH.cjs} +491 -418
  12. package/dist/chunk-2LAJ3RTH.cjs.map +1 -0
  13. package/dist/{chunk-NYR5H6GR.js → chunk-5QVBJUOG.js} +154 -81
  14. package/dist/chunk-5QVBJUOG.js.map +1 -0
  15. package/dist/{chunk-SYDANBJI.cjs → chunk-6UI5BFE7.cjs} +9 -9
  16. package/dist/{chunk-SYDANBJI.cjs.map → chunk-6UI5BFE7.cjs.map} +1 -1
  17. package/dist/{chunk-G6J6AEMH.js → chunk-BLJQV3N4.js} +4 -4
  18. package/dist/{chunk-G6J6AEMH.js.map → chunk-BLJQV3N4.js.map} +1 -1
  19. package/dist/{chunk-BHHLRZCS.js → chunk-CPO2UB7L.js} +4 -4
  20. package/dist/{chunk-BHHLRZCS.js.map → chunk-CPO2UB7L.js.map} +1 -1
  21. package/dist/{chunk-7TXSPRN5.cjs → chunk-E7HB3GKK.cjs} +31 -2
  22. package/dist/chunk-E7HB3GKK.cjs.map +1 -0
  23. package/dist/{chunk-ZDDBTFVO.js → chunk-EFNLTS6Q.js} +29 -3
  24. package/dist/chunk-EFNLTS6Q.js.map +1 -0
  25. package/dist/{chunk-XFMGIFBL.js → chunk-HN25T276.js} +4 -4
  26. package/dist/{chunk-XFMGIFBL.js.map → chunk-HN25T276.js.map} +1 -1
  27. package/dist/{chunk-5XMVTK5S.cjs → chunk-LJQ2VQBE.cjs} +211 -230
  28. package/dist/chunk-LJQ2VQBE.cjs.map +1 -0
  29. package/dist/{chunk-4VVTRPH3.js → chunk-MBSYQ3WX.js} +183 -201
  30. package/dist/chunk-MBSYQ3WX.js.map +1 -0
  31. package/dist/{chunk-EB3ALGTM.cjs → chunk-QDXQULVM.cjs} +13 -13
  32. package/dist/{chunk-EB3ALGTM.cjs.map → chunk-QDXQULVM.cjs.map} +1 -1
  33. package/dist/{chunk-ENDNQPZA.cjs → chunk-XOLH3LFO.cjs} +17 -17
  34. package/dist/{chunk-ENDNQPZA.cjs.map → chunk-XOLH3LFO.cjs.map} +1 -1
  35. package/dist/contracts/handlers/index.cjs +8 -8
  36. package/dist/contracts/handlers/index.d.cts +3 -3
  37. package/dist/contracts/handlers/index.d.ts +3 -3
  38. package/dist/contracts/handlers/index.js +2 -2
  39. package/dist/{delegate-D3dY-2vS.d.cts → delegate-Cqqw1T1J.d.cts} +1 -1
  40. package/dist/{delegate-DhGZk1r2.d.ts → delegate-D6Orvyq7.d.ts} +1 -1
  41. package/dist/{index-DK4_iWYy.d.ts → index-CWoogah0.d.ts} +2 -2
  42. package/dist/{index-D6RQROds.d.cts → index-Yd4hecbM.d.cts} +2 -2
  43. package/dist/index.cjs +181 -181
  44. package/dist/index.d.cts +8 -8
  45. package/dist/index.d.ts +8 -8
  46. package/dist/index.js +4 -4
  47. package/dist/repositories/realm/index.cjs +19 -19
  48. package/dist/repositories/realm/index.d.cts +2 -2
  49. package/dist/repositories/realm/index.d.ts +2 -2
  50. package/dist/repositories/realm/index.js +5 -5
  51. package/dist/repositories/sqlite/index.cjs +18 -18
  52. package/dist/repositories/sqlite/index.d.cts +2 -2
  53. package/dist/repositories/sqlite/index.d.ts +2 -2
  54. package/dist/repositories/sqlite/index.js +5 -5
  55. package/dist/{taskRunner-Brnak0Rc.d.cts → taskRunner-BjB5QINR.d.cts} +1 -1
  56. package/dist/{taskRunner-B-2MHCYG.d.ts → taskRunner-Dw7xs60Q.d.ts} +1 -1
  57. package/dist/wallet/expo/background.cjs +14 -14
  58. package/dist/wallet/expo/background.d.cts +3 -3
  59. package/dist/wallet/expo/background.d.ts +3 -3
  60. package/dist/wallet/expo/background.js +6 -6
  61. package/dist/wallet/expo/index.cjs +14 -14
  62. package/dist/wallet/expo/index.d.cts +4 -4
  63. package/dist/wallet/expo/index.d.ts +4 -4
  64. package/dist/wallet/expo/index.js +5 -5
  65. package/dist/{wallet-B5bwixQa.d.ts → wallet-CGkWu3xV.d.cts} +2 -2
  66. package/dist/{wallet-DiOrtYic.d.cts → wallet-DyUHrPyN.d.ts} +2 -2
  67. package/dist/worker/expo/index.cjs +9 -9
  68. package/dist/worker/expo/index.d.cts +4 -4
  69. package/dist/worker/expo/index.d.ts +4 -4
  70. package/dist/worker/expo/index.js +5 -5
  71. package/package.json +1 -1
  72. package/dist/chunk-4VVTRPH3.js.map +0 -1
  73. package/dist/chunk-5XMVTK5S.cjs.map +0 -1
  74. package/dist/chunk-7TXSPRN5.cjs.map +0 -1
  75. package/dist/chunk-ENZ4YPR2.cjs.map +0 -1
  76. package/dist/chunk-NYR5H6GR.js.map +0 -1
  77. package/dist/chunk-ZDDBTFVO.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkENDNQPZA_cjs = require('../chunk-ENDNQPZA.cjs');
4
- require('../chunk-EB3ALGTM.cjs');
5
- require('../chunk-7TXSPRN5.cjs');
3
+ var chunkXOLH3LFO_cjs = require('../chunk-XOLH3LFO.cjs');
4
+ require('../chunk-QDXQULVM.cjs');
5
+ require('../chunk-E7HB3GKK.cjs');
6
6
  require('../chunk-5BLDMQED.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "ExpoArkProvider", {
11
11
  enumerable: true,
12
- get: function () { return chunkENDNQPZA_cjs.ExpoArkProvider; }
12
+ get: function () { return chunkXOLH3LFO_cjs.ExpoArkProvider; }
13
13
  });
14
14
  Object.defineProperty(exports, "ExpoIndexerProvider", {
15
15
  enumerable: true,
16
- get: function () { return chunkENDNQPZA_cjs.ExpoIndexerProvider; }
16
+ get: function () { return chunkXOLH3LFO_cjs.ExpoIndexerProvider; }
17
17
  });
18
18
  //# sourceMappingURL=expo.cjs.map
19
19
  //# sourceMappingURL=expo.cjs.map
@@ -1,5 +1,5 @@
1
- import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-CjE0KkGp.cjs';
2
- export { n as ArkProvider, o as IndexerProvider } from '../ark-CjE0KkGp.cjs';
1
+ import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-nkSiPYNf.cjs';
2
+ export { n as ArkProvider, o as IndexerProvider } from '../ark-nkSiPYNf.cjs';
3
3
  import '@scure/btc-signer/transaction.js';
4
4
  import '@scure/btc-signer/utils.js';
5
5
  import '@scure/btc-signer/psbt.js';
@@ -1,5 +1,5 @@
1
- import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-CjE0KkGp.js';
2
- export { n as ArkProvider, o as IndexerProvider } from '../ark-CjE0KkGp.js';
1
+ import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-nkSiPYNf.js';
2
+ export { n as ArkProvider, o as IndexerProvider } from '../ark-nkSiPYNf.js';
3
3
  import '@scure/btc-signer/transaction.js';
4
4
  import '@scure/btc-signer/utils.js';
5
5
  import '@scure/btc-signer/psbt.js';
@@ -1,6 +1,6 @@
1
- export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-XFMGIFBL.js';
2
- import '../chunk-BHHLRZCS.js';
3
- import '../chunk-ZDDBTFVO.js';
1
+ export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-HN25T276.js';
2
+ import '../chunk-CPO2UB7L.js';
3
+ import '../chunk-EFNLTS6Q.js';
4
4
  import '../chunk-NSBPE2FW.js';
5
5
  //# sourceMappingURL=expo.js.map
6
6
  //# sourceMappingURL=expo.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkENZ4YPR2_cjs = require('../chunk-ENZ4YPR2.cjs');
4
- require('../chunk-EB3ALGTM.cjs');
5
- require('../chunk-5XMVTK5S.cjs');
6
- require('../chunk-7TXSPRN5.cjs');
3
+ var chunk2LAJ3RTH_cjs = require('../chunk-2LAJ3RTH.cjs');
4
+ require('../chunk-QDXQULVM.cjs');
5
+ require('../chunk-LJQ2VQBE.cjs');
6
+ require('../chunk-E7HB3GKK.cjs');
7
7
  require('../chunk-5BLDMQED.cjs');
8
8
 
9
9
  // src/storage/indexedDB.ts
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
11
11
  dbName;
12
12
  version;
13
13
  db = null;
14
- constructor(dbName, version = chunkENZ4YPR2_cjs.DB_VERSION) {
14
+ constructor(dbName, version = chunk2LAJ3RTH_cjs.DB_VERSION) {
15
15
  this.dbName = dbName;
16
16
  this.version = version;
17
17
  }
@@ -1,7 +1,7 @@
1
- import { DB_VERSION } from '../chunk-NYR5H6GR.js';
2
- import '../chunk-BHHLRZCS.js';
3
- import '../chunk-4VVTRPH3.js';
4
- import '../chunk-ZDDBTFVO.js';
1
+ import { DB_VERSION } from '../chunk-5QVBJUOG.js';
2
+ import '../chunk-CPO2UB7L.js';
3
+ import '../chunk-MBSYQ3WX.js';
4
+ import '../chunk-EFNLTS6Q.js';
5
5
  import '../chunk-NSBPE2FW.js';
6
6
 
7
7
  // src/storage/indexedDB.ts
@@ -1912,12 +1912,19 @@ type RefreshVtxosOptions = {
1912
1912
  includeInactive?: boolean;
1913
1913
  };
1914
1914
  /**
1915
- * A single `Discoverable` handler's `discoverAt` rejection, captured during
1916
- * a {@link IContractManager.scanContracts} run instead of aborting the loop.
1915
+ * A single `Discoverable` handler's discovery failure, captured during a
1916
+ * {@link IContractManager.scanContracts} run instead of aborting the loop.
1917
+ *
1918
+ * TODO(next major): rename `index` → `fromIndex` so the pair reads
1919
+ * `fromIndex`/`toIndex`. It stays `index` here only to keep this exported
1920
+ * shape backward-compatible.
1917
1921
  */
1918
1922
  interface HandlerError {
1919
1923
  handler: string;
1924
+ /** The failed index, or the first index of a failed `discoverRange` window. */
1920
1925
  index: number;
1926
+ /** Inclusive end of a failed `discoverRange` window; absent for a single index. */
1927
+ toIndex?: number;
1921
1928
  error: unknown;
1922
1929
  }
1923
1930
  /**
@@ -1941,7 +1948,7 @@ interface ScanResult {
1941
1948
  * when the scan closed a genuine gap.
1942
1949
  */
1943
1950
  truncatedAt?: number;
1944
- /** Per-handler `discoverAt` failures. Non-empty implies `truncatedAt` is set. */
1951
+ /** Per-handler discovery failures. Non-empty implies `truncatedAt` is set. */
1945
1952
  handlerErrors: HandlerError[];
1946
1953
  }
1947
1954
  /**
@@ -1951,11 +1958,13 @@ interface ScanContractsOptions {
1951
1958
  /** Default 20. A non-positive / non-integer value throws. */
1952
1959
  gapLimit?: number;
1953
1960
  /**
1954
- * Number of HD indices probed concurrently per window (default
1955
- * {@link DEFAULT_SCAN_BATCH}). Pure latency knob: the gap loop stays
1956
- * gap-limit bounded and the discovered set is identical regardless of
1957
- * batch size. A non-positive / non-integer value throws. Ignored when
1958
- * `hd` is false (the static pass probes only index 0).
1961
+ * Number of HD indices probed per window (default
1962
+ * {@link DEFAULT_SCAN_BATCH}). The gap loop stays gap-limit bounded and
1963
+ * the discovered set is identical regardless of batch size; the window is
1964
+ * also the unit a batching handler ({@link Discoverable.discoverRange})
1965
+ * collapses into one request, so it doubles as the batch width. A
1966
+ * non-positive / non-integer value throws. Ignored when `hd` is false (the
1967
+ * static pass probes only index 0).
1959
1968
  */
1960
1969
  batchSize?: number;
1961
1970
  /** HD mode → unbounded gap loop guided by the gap counter; false → probe only index 0 (single static pass). */
@@ -2092,11 +2101,12 @@ interface IContractManager extends Disposable {
2092
2101
  * resets the gap counter, so swap discovery keeps the HD window open.
2093
2102
  *
2094
2103
  * Error contract (safety-critical — see spec §4):
2095
- * - A handler's `discoverAt` rejecting is **collected** into
2096
- * `handlerErrors` and makes its index *indeterminate*: it never
2097
- * advances the gap counter, and the scan **stops verifying** there
2098
- * rather than closing a window it never observed close. It still
2099
- * never throws.
2104
+ * - A handler's discovery rejecting is **collected** into `handlerErrors`
2105
+ * and makes its index *indeterminate*: it never advances the gap
2106
+ * counter, and the scan **stops verifying** there rather than closing a
2107
+ * window it never observed close. A batched
2108
+ * {@link Discoverable.discoverRange} failure makes its whole requested
2109
+ * range indeterminate. It still never throws.
2100
2110
  * - A fatal operational error — `materialize()` throwing, or
2101
2111
  * `createContract` rejecting — **propagates** out of `scanContracts`
2102
2112
  * (it invalidates the gap-window signal, so a silent truncation
@@ -2316,21 +2326,27 @@ declare class ContractManager implements IContractManager {
2316
2326
  * Safety-critical invariants (spec §2.C / §4):
2317
2327
  * - `opts.materialize(i)` throwing is structural/fatal: it is NOT
2318
2328
  * wrapped — it propagates and aborts the scan.
2319
- * - A `discoverAt` rejection is collected into `handlerErrors` and makes
2320
- * its index *indeterminate*: it does NOT advance the gap counter, and
2321
- * the scan stops verifying there, reporting `truncatedAt`. Only an index
2329
+ * - A discovery rejection is collected into `handlerErrors` and makes its
2330
+ * index *indeterminate*: it does NOT advance the gap counter, and the
2331
+ * scan stops verifying there, reporting `truncatedAt`. Only an index
2322
2332
  * every handler answered for can be a confirmed miss.
2323
2333
  * - `persistAndWatchContract` rejecting is operational/fatal and
2324
- * propagates (only `discoverAt` is guarded).
2325
- * - Within an index the handler probes run concurrently (independent
2326
- * network reads); their hits are persisted sequentially in
2327
- * `discoverables` order to preserve the first-wins collision tie-break.
2328
- * - Indices are probed `batchSize` at a time (a second concurrency layer
2329
- * over the per-index probes), but each window is CAPPED to
2334
+ * propagates (only the handler calls are guarded).
2335
+ * - A handler exposing {@link Discoverable.discoverRange} is asked for the
2336
+ * whole window in ONE call instead of one per index — the batching that
2337
+ * keeps a large restore from bursting into an operator's rate limiter.
2338
+ * Its failures are therefore range-wide: every index in the window goes
2339
+ * indeterminate and truncation lands on the window's first index. Its
2340
+ * answer must cover every requested index; an incomplete map is treated
2341
+ * as a rejection (see `Discoverable.discoverRange`).
2342
+ * - Handlers are probed concurrently (independent network reads); their
2343
+ * hits are persisted sequentially in `discoverables` order to preserve
2344
+ * the first-wins collision tie-break.
2345
+ * - Indices are probed `batchSize` at a time, but each window is CAPPED to
2330
2346
  * `gapLimit - unused` indices — the most a serial scan could still reach
2331
2347
  * before the gap window is guaranteed to close. So every index probed in
2332
2348
  * a window is one a one-index-at-a-time scan would also reach: nothing is
2333
- * over-scanned, nothing is discarded, and `materialize`/`discoverAt` are
2349
+ * over-scanned, nothing is discarded, and `materialize`/discovery are
2334
2350
  * invoked on exactly the same index set. The window's hits are still
2335
2351
  * processed strictly in ascending index order, so the discovered set,
2336
2352
  * persisted rows, `highestConfirmedUsedIndex`, and `handlerErrors` are
@@ -2339,8 +2355,12 @@ declare class ContractManager implements IContractManager {
2339
2355
  * can surface hits above the failed index that a serial scan would never
2340
2356
  * have reached, so a truncated batched scan discovers a superset — never
2341
2357
  * a subset — of the serial one.
2358
+ * - The whole scan runs inside one coalesced subscription scope, so N
2359
+ * discovered contracts cost ONE `subscribeForScripts` instead of N
2360
+ * growing ones (see {@link ContractWatcher.withCoalescedSubscription}).
2342
2361
  */
2343
2362
  scanContracts(opts: ScanContractsOptions): Promise<ScanResult>;
2363
+ private runScan;
2344
2364
  /**
2345
2365
  * Get contracts with optional filters.
2346
2366
  *
@@ -2770,6 +2790,27 @@ interface DiscoveryDeps {
2770
2790
  */
2771
2791
  interface Discoverable {
2772
2792
  discoverAt(index: number, descriptor: string, deps: DiscoveryDeps): Promise<DiscoveredContract[]>;
2793
+ /**
2794
+ * Optional: answer for a whole scan window in one batched round-trip.
2795
+ * The scanner prefers it over per-index `discoverAt` calls when present,
2796
+ * which is what keeps a 10-index window to 1-2 indexer requests instead
2797
+ * of one per index. Handlers whose source is inherently per-address (e.g.
2798
+ * boarding, on Esplora) implement only `discoverAt`.
2799
+ *
2800
+ * **All-or-nothing per call.** Either resolve with a map covering *every*
2801
+ * requested index (empty array = confirmed miss), or reject — a handler
2802
+ * whose inner chunk fails partway must discard the partial results and
2803
+ * reject, because a missing index would otherwise read as "no funds here"
2804
+ * and let restore close its gap window on a failed request. The scanner
2805
+ * enforces this rather than trusting it: an incomplete map is treated as a
2806
+ * rejection, making the whole requested range indeterminate (hits present
2807
+ * in it are still persisted) and truncating the scan at the range's first
2808
+ * index. Indices that were not requested are ignored.
2809
+ */
2810
+ discoverRange?(entries: readonly {
2811
+ index: number;
2812
+ descriptor: string;
2813
+ }[], deps: DiscoveryDeps): Promise<Map<number, DiscoveredContract[]>>;
2773
2814
  }
2774
2815
  /** Duck-typed guard (mirrors `hasReceiveRotatorFactory`). */
2775
2816
  declare function isDiscoverable(handler: ContractHandler<unknown> | undefined): handler is ContractHandler<unknown> & Discoverable;
@@ -2931,6 +2972,9 @@ declare class ContractWatcher {
2931
2972
  private reconnectAttempts;
2932
2973
  private reconnectTimeoutId?;
2933
2974
  private failsafePollIntervalId?;
2975
+ /** See {@link withCoalescedSubscription}. */
2976
+ private subscriptionBatchDepth;
2977
+ private subscriptionUpdateDeferred;
2934
2978
  /**
2935
2979
  * Create a contract watcher with the given providers and polling settings.
2936
2980
  *
@@ -3025,6 +3069,24 @@ declare class ContractWatcher {
3025
3069
  * Poll specific contracts and emit events for changes.
3026
3070
  */
3027
3071
  private pollContracts;
3072
+ /**
3073
+ * Run `fn` with subscription updates coalesced into a single
3074
+ * `subscribeForScripts` on the way out.
3075
+ *
3076
+ * {@link addContract} re-subscribes eagerly (the watcher may already be
3077
+ * running), and every subscribe posts the *whole* accumulated script list —
3078
+ * so a restore scan that discovers N contracts sends N growing POSTs,
3079
+ * quadratic in script-slots. Inside this scope those updates are only
3080
+ * marked dirty, flushed once on the way out (success and error path alike).
3081
+ *
3082
+ * A contract added inside the scope is therefore not streaming until the
3083
+ * flush. Nothing in the watcher closes that window — the failsafe poll
3084
+ * replays repository state and cannot see VTXOs no one has fetched yet. The
3085
+ * one caller, `scanContracts`, is covered because `Wallet.restore` follows
3086
+ * it with a bulk `refreshVtxos`. A new caller must provide its own
3087
+ * equivalent catch-up, or keep the scope short enough not to need one.
3088
+ */
3089
+ withCoalescedSubscription<T>(fn: () => Promise<T>): Promise<T>;
3028
3090
  private tryUpdateSubscription;
3029
3091
  /**
3030
3092
  * Update the subscription with scripts that should be watched.
@@ -4965,4 +5027,4 @@ declare namespace ProtoTypes {
4965
5027
  export { };
4966
5028
  }
4967
5029
 
4968
- export { type ReadonlyIdentity as $, type ArkTransaction as A, type VirtualTxRepository as B, type ContractRepository as C, type VirtualTx as D, type ExtendedCoin as E, type VtxoBranch as F, type GetVtxosFilter as G, ChainedTxType as H, type IWallet as I, type BatchStartedEvent as J, type TreeSigningStartedEvent as K, TxTree as L, type TreeNoncesEvent as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchFinalizationEvent as P, type BatchFinalizedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type BatchFailedEvent as U, VtxoScript as V, type WalletRepository as W, type TreeTxEvent as X, type TreeSignatureEvent as Y, type DescriptorProvider as Z, type IReadonlyWallet as _, type Identity as a, ChainTxType as a$, type Network as a0, type OnchainProvider as a1, type DelegateProvider as a2, type ReadonlyWalletConfig as a3, type ExitCaptureMode as a4, type ExitDataSource as a5, type IReadonlyAssetManager as a6, type ContractSyncState as a7, type NetworkName as a8, type ArkInfo as a9, type BurnParams as aA, type RenewVtxosOptions as aB, type ContractWithVtxos as aC, type PathSelection as aD, type ContractEvent as aE, type AssetDetails as aF, type IssuanceResult as aG, type DelegateInfo as aH, type MigrationGlobalSkipReason as aI, type MigrationLegSkipReason as aJ, type SignerStatus as aK, type StorageConfig as aL, type IVtxoManager as aM, type ExplorerTransaction as aN, type EncodedVtxoScript as aO, type Status as aP, type ChainTx as aQ, type PathContext as aR, type ActivityIntent as aS, type ActivityResolver as aT, type ArkIntentState as aU, type ArkTapscript as aV, type AssetMetadata as aW, type BaseWalletConfig as aX, type BatchInfo as aY, type BatchSignableIdentity as aZ, CLTVMultisigTapscript as a_, ArkAddress as aa, type Coin as ab, ContractManager as ac, CSVMultisigTapscript as ad, type SettlementConfig as ae, VtxoManager as af, type SignerSession as ag, type SignedIntent as ah, Intent as ai, type TimeHeight as aj, type DescriptorSigningRequest as ak, Transaction as al, type IntentFeeConfig as am, type OffchainInput as an, FeeAmount as ao, type OnchainInput as ap, type FeeOutput as aq, type ContractWatcherConfig as ar, type Asset as as, type FeeInfo as at, type CreateContractParams as au, type GetContractsFilter as av, type GetSpendablePathsOptions as aw, type GetAllSpendingPathsOptions as ax, type IssuanceParams as ay, type ReissuanceParams as az, type WalletConfig as b, type VtxoChain as b$, type CommitmentTx as b0, ConditionCSVMultisigTapscript as b1, ConditionMultisigTapscript as b2, type ContractBalance as b3, type ContractEventCallback as b4, type ContractHandler as b5, type ContractManagerConfig as b6, type ContractState as b7, type ContractVtxo as b8, ContractWatcher as b9, type PageResponse as bA, type PaginationOptions as bB, PartialSig as bC, type ProviderClass as bD, RestDelegateProvider as bE, RestDelegatorProvider as bF, type ScanContractsOptions as bG, type ScanResult as bH, type ScheduledSession as bI, SettlementEventType as bJ, type SignRequest as bK, type SignerClassification as bL, type SignerSet as bM, type SubscriptionEvent as bN, type SubscriptionHeartbeat as bO, type TapLeaves as bP, TapTreeCoder as bQ, TapscriptType as bR, type TreeNonces as bS, type TreePartialSigs as bT, type Tx as bU, type TxHistoryRecord as bV, type TxKey as bW, type TxTreeNode as bX, TxType as bY, type VirtualStatus as bZ, type Vtxo as b_, DelegateManagerImpl as ba, type DelegateOptions as bb, DelegatorManagerImpl as bc, type DelegatorProvider as bd, type DeprecatedSignerMigrationReport as be, type DeprecatedSignerReport as bf, DigestMismatchError as bg, type Discoverable as bh, type DiscoveredContract as bi, type DiscoveryDeps as bj, ESPLORA_URL as bk, EsploraProvider as bl, type ExitChainResolver as bm, type ExtendedContractVtxo as bn, type GroupMembership as bo, type HandlerError as bp, type IDelegatorManager as bq, INTENT_TERMINAL_STATES as br, IndexerTxType as bs, type KnownMetadata as bt, type MigrateDeprecatedSignerOptions as bu, type MigrationLegReport as bv, type MigrationVtxoRef as bw, MultisigTapscript as bx, type Nonces as by, type Output as bz, type WalletBalance as c, type VtxoType as c0, type WalletMode as c1, boardingResolver as c2, canRecoverOnchain as c3, canSpendOffchain as c4, classifyAgainstSignerSet as c5, classifyContractSigner as c6, createDefaultActivityRegistry as c7, createExitChainResolver as c8, decodeTapscript as c9, getNetwork as ca, getSequence as cb, hasTerminalSpend as cc, isBatchSignable as cd, isCooperativelyMigratable as ce, isDiscoverable as cf, isExpired as cg, isPastExpiry as ch, isRecoverable as ci, isSpendable as cj, isSubdust as ck, isTerminalIntentState as cl, isVirtualCoin as cm, isVtxoExpiringSoon as cn, networks as co, signerSetFromInfo as cp, toXOnlySignerHex as cq, type TapscriptDeriving as cr, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type VtxoRepositoryKey as u, type WalletState as v, type ContractFilter as w, type IntentRepository as x, type ArkIntent as y, type IntentFilter as z };
5030
+ export { type NetworkName as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type TreeTxEvent as D, type ExtendedCoin as E, type TreeSignatureEvent as F, type GetVtxosFilter as G, type DescriptorProvider as H, type IWallet as I, type IReadonlyWallet as J, type ReadonlyIdentity as K, type Network as L, type DelegateProvider as M, type NormalizedExtendedVirtualCoin as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IntentRepository as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type VirtualTxRepository as U, VtxoScript as V, type WalletRepository as W, type ExitCaptureMode as X, type ExitDataSource as Y, type IReadonlyAssetManager as Z, type ContractSyncState as _, type Identity as a, ChainTxType as a$, type ArkInfo as a0, ArkAddress as a1, type Coin as a2, ContractManager as a3, CSVMultisigTapscript as a4, type SettlementConfig as a5, VtxoManager as a6, type SignerSession as a7, type SignedIntent as a8, Intent as a9, type BurnParams as aA, type RenewVtxosOptions as aB, type ContractWithVtxos as aC, type PathSelection as aD, type ContractEvent as aE, type AssetDetails as aF, type IssuanceResult as aG, type DelegateInfo as aH, type MigrationGlobalSkipReason as aI, type MigrationLegSkipReason as aJ, type SignerStatus as aK, type StorageConfig as aL, type IVtxoManager as aM, type ExplorerTransaction as aN, type EncodedVtxoScript as aO, type Status as aP, type ChainTx as aQ, type PathContext as aR, type ActivityIntent as aS, type ActivityResolver as aT, type ArkIntentState as aU, type ArkTapscript as aV, type AssetMetadata as aW, type BaseWalletConfig as aX, type BatchInfo as aY, type BatchSignableIdentity as aZ, CLTVMultisigTapscript as a_, type TimeHeight as aa, type VtxoRepositoryKey as ab, type WalletState as ac, type ContractFilter as ad, type ArkIntent as ae, type IntentFilter as af, type Outpoint as ag, type VirtualTx as ah, type VtxoBranch as ai, ChainedTxType as aj, type DescriptorSigningRequest as ak, Transaction as al, type IntentFeeConfig as am, type OffchainInput as an, FeeAmount as ao, type OnchainInput as ap, type FeeOutput as aq, type ContractWatcherConfig as ar, type Asset as as, type FeeInfo as at, type CreateContractParams as au, type GetContractsFilter as av, type GetSpendablePathsOptions as aw, type GetAllSpendingPathsOptions as ax, type IssuanceParams as ay, type ReissuanceParams as az, type WalletConfig as b, type VtxoChain as b$, type CommitmentTx as b0, ConditionCSVMultisigTapscript as b1, ConditionMultisigTapscript as b2, type ContractBalance as b3, type ContractEventCallback as b4, type ContractHandler as b5, type ContractManagerConfig as b6, type ContractState as b7, type ContractVtxo as b8, ContractWatcher as b9, type PageResponse as bA, type PaginationOptions as bB, PartialSig as bC, type ProviderClass as bD, RestDelegateProvider as bE, RestDelegatorProvider as bF, type ScanContractsOptions as bG, type ScanResult as bH, type ScheduledSession as bI, SettlementEventType as bJ, type SignRequest as bK, type SignerClassification as bL, type SignerSet as bM, type SubscriptionEvent as bN, type SubscriptionHeartbeat as bO, type TapLeaves as bP, TapTreeCoder as bQ, TapscriptType as bR, type TreeNonces as bS, type TreePartialSigs as bT, type Tx as bU, type TxHistoryRecord as bV, type TxKey as bW, type TxTreeNode as bX, TxType as bY, type VirtualStatus as bZ, type Vtxo as b_, DelegateManagerImpl as ba, type DelegateOptions as bb, DelegatorManagerImpl as bc, type DelegatorProvider as bd, type DeprecatedSignerMigrationReport as be, type DeprecatedSignerReport as bf, DigestMismatchError as bg, type Discoverable as bh, type DiscoveredContract as bi, type DiscoveryDeps as bj, ESPLORA_URL as bk, EsploraProvider as bl, type ExitChainResolver as bm, type ExtendedContractVtxo as bn, type GroupMembership as bo, type HandlerError as bp, type IDelegatorManager as bq, INTENT_TERMINAL_STATES as br, IndexerTxType as bs, type KnownMetadata as bt, type MigrateDeprecatedSignerOptions as bu, type MigrationLegReport as bv, type MigrationVtxoRef as bw, MultisigTapscript as bx, type Nonces as by, type Output as bz, type WalletBalance as c, type VtxoType as c0, type WalletMode as c1, boardingResolver as c2, canRecoverOnchain as c3, canSpendOffchain as c4, classifyAgainstSignerSet as c5, classifyContractSigner as c6, createDefaultActivityRegistry as c7, createExitChainResolver as c8, decodeTapscript as c9, getNetwork as ca, getSequence as cb, hasTerminalSpend as cc, isBatchSignable as cd, isCooperativelyMigratable as ce, isDiscoverable as cf, isExpired as cg, isPastExpiry as ch, isRecoverable as ci, isSpendable as cj, isSubdust as ck, isTerminalIntentState as cl, isVirtualCoin as cm, isVtxoExpiringSoon as cn, networks as co, signerSetFromInfo as cp, toXOnlySignerHex as cq, type TapscriptDeriving as cr, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type TreeSigningStartedEvent as u, TxTree as v, type TreeNoncesEvent as w, type BatchFinalizationEvent as x, type BatchFinalizedEvent as y, type BatchFailedEvent as z };
@@ -1912,12 +1912,19 @@ type RefreshVtxosOptions = {
1912
1912
  includeInactive?: boolean;
1913
1913
  };
1914
1914
  /**
1915
- * A single `Discoverable` handler's `discoverAt` rejection, captured during
1916
- * a {@link IContractManager.scanContracts} run instead of aborting the loop.
1915
+ * A single `Discoverable` handler's discovery failure, captured during a
1916
+ * {@link IContractManager.scanContracts} run instead of aborting the loop.
1917
+ *
1918
+ * TODO(next major): rename `index` → `fromIndex` so the pair reads
1919
+ * `fromIndex`/`toIndex`. It stays `index` here only to keep this exported
1920
+ * shape backward-compatible.
1917
1921
  */
1918
1922
  interface HandlerError {
1919
1923
  handler: string;
1924
+ /** The failed index, or the first index of a failed `discoverRange` window. */
1920
1925
  index: number;
1926
+ /** Inclusive end of a failed `discoverRange` window; absent for a single index. */
1927
+ toIndex?: number;
1921
1928
  error: unknown;
1922
1929
  }
1923
1930
  /**
@@ -1941,7 +1948,7 @@ interface ScanResult {
1941
1948
  * when the scan closed a genuine gap.
1942
1949
  */
1943
1950
  truncatedAt?: number;
1944
- /** Per-handler `discoverAt` failures. Non-empty implies `truncatedAt` is set. */
1951
+ /** Per-handler discovery failures. Non-empty implies `truncatedAt` is set. */
1945
1952
  handlerErrors: HandlerError[];
1946
1953
  }
1947
1954
  /**
@@ -1951,11 +1958,13 @@ interface ScanContractsOptions {
1951
1958
  /** Default 20. A non-positive / non-integer value throws. */
1952
1959
  gapLimit?: number;
1953
1960
  /**
1954
- * Number of HD indices probed concurrently per window (default
1955
- * {@link DEFAULT_SCAN_BATCH}). Pure latency knob: the gap loop stays
1956
- * gap-limit bounded and the discovered set is identical regardless of
1957
- * batch size. A non-positive / non-integer value throws. Ignored when
1958
- * `hd` is false (the static pass probes only index 0).
1961
+ * Number of HD indices probed per window (default
1962
+ * {@link DEFAULT_SCAN_BATCH}). The gap loop stays gap-limit bounded and
1963
+ * the discovered set is identical regardless of batch size; the window is
1964
+ * also the unit a batching handler ({@link Discoverable.discoverRange})
1965
+ * collapses into one request, so it doubles as the batch width. A
1966
+ * non-positive / non-integer value throws. Ignored when `hd` is false (the
1967
+ * static pass probes only index 0).
1959
1968
  */
1960
1969
  batchSize?: number;
1961
1970
  /** HD mode → unbounded gap loop guided by the gap counter; false → probe only index 0 (single static pass). */
@@ -2092,11 +2101,12 @@ interface IContractManager extends Disposable {
2092
2101
  * resets the gap counter, so swap discovery keeps the HD window open.
2093
2102
  *
2094
2103
  * Error contract (safety-critical — see spec §4):
2095
- * - A handler's `discoverAt` rejecting is **collected** into
2096
- * `handlerErrors` and makes its index *indeterminate*: it never
2097
- * advances the gap counter, and the scan **stops verifying** there
2098
- * rather than closing a window it never observed close. It still
2099
- * never throws.
2104
+ * - A handler's discovery rejecting is **collected** into `handlerErrors`
2105
+ * and makes its index *indeterminate*: it never advances the gap
2106
+ * counter, and the scan **stops verifying** there rather than closing a
2107
+ * window it never observed close. A batched
2108
+ * {@link Discoverable.discoverRange} failure makes its whole requested
2109
+ * range indeterminate. It still never throws.
2100
2110
  * - A fatal operational error — `materialize()` throwing, or
2101
2111
  * `createContract` rejecting — **propagates** out of `scanContracts`
2102
2112
  * (it invalidates the gap-window signal, so a silent truncation
@@ -2316,21 +2326,27 @@ declare class ContractManager implements IContractManager {
2316
2326
  * Safety-critical invariants (spec §2.C / §4):
2317
2327
  * - `opts.materialize(i)` throwing is structural/fatal: it is NOT
2318
2328
  * wrapped — it propagates and aborts the scan.
2319
- * - A `discoverAt` rejection is collected into `handlerErrors` and makes
2320
- * its index *indeterminate*: it does NOT advance the gap counter, and
2321
- * the scan stops verifying there, reporting `truncatedAt`. Only an index
2329
+ * - A discovery rejection is collected into `handlerErrors` and makes its
2330
+ * index *indeterminate*: it does NOT advance the gap counter, and the
2331
+ * scan stops verifying there, reporting `truncatedAt`. Only an index
2322
2332
  * every handler answered for can be a confirmed miss.
2323
2333
  * - `persistAndWatchContract` rejecting is operational/fatal and
2324
- * propagates (only `discoverAt` is guarded).
2325
- * - Within an index the handler probes run concurrently (independent
2326
- * network reads); their hits are persisted sequentially in
2327
- * `discoverables` order to preserve the first-wins collision tie-break.
2328
- * - Indices are probed `batchSize` at a time (a second concurrency layer
2329
- * over the per-index probes), but each window is CAPPED to
2334
+ * propagates (only the handler calls are guarded).
2335
+ * - A handler exposing {@link Discoverable.discoverRange} is asked for the
2336
+ * whole window in ONE call instead of one per index — the batching that
2337
+ * keeps a large restore from bursting into an operator's rate limiter.
2338
+ * Its failures are therefore range-wide: every index in the window goes
2339
+ * indeterminate and truncation lands on the window's first index. Its
2340
+ * answer must cover every requested index; an incomplete map is treated
2341
+ * as a rejection (see `Discoverable.discoverRange`).
2342
+ * - Handlers are probed concurrently (independent network reads); their
2343
+ * hits are persisted sequentially in `discoverables` order to preserve
2344
+ * the first-wins collision tie-break.
2345
+ * - Indices are probed `batchSize` at a time, but each window is CAPPED to
2330
2346
  * `gapLimit - unused` indices — the most a serial scan could still reach
2331
2347
  * before the gap window is guaranteed to close. So every index probed in
2332
2348
  * a window is one a one-index-at-a-time scan would also reach: nothing is
2333
- * over-scanned, nothing is discarded, and `materialize`/`discoverAt` are
2349
+ * over-scanned, nothing is discarded, and `materialize`/discovery are
2334
2350
  * invoked on exactly the same index set. The window's hits are still
2335
2351
  * processed strictly in ascending index order, so the discovered set,
2336
2352
  * persisted rows, `highestConfirmedUsedIndex`, and `handlerErrors` are
@@ -2339,8 +2355,12 @@ declare class ContractManager implements IContractManager {
2339
2355
  * can surface hits above the failed index that a serial scan would never
2340
2356
  * have reached, so a truncated batched scan discovers a superset — never
2341
2357
  * a subset — of the serial one.
2358
+ * - The whole scan runs inside one coalesced subscription scope, so N
2359
+ * discovered contracts cost ONE `subscribeForScripts` instead of N
2360
+ * growing ones (see {@link ContractWatcher.withCoalescedSubscription}).
2342
2361
  */
2343
2362
  scanContracts(opts: ScanContractsOptions): Promise<ScanResult>;
2363
+ private runScan;
2344
2364
  /**
2345
2365
  * Get contracts with optional filters.
2346
2366
  *
@@ -2770,6 +2790,27 @@ interface DiscoveryDeps {
2770
2790
  */
2771
2791
  interface Discoverable {
2772
2792
  discoverAt(index: number, descriptor: string, deps: DiscoveryDeps): Promise<DiscoveredContract[]>;
2793
+ /**
2794
+ * Optional: answer for a whole scan window in one batched round-trip.
2795
+ * The scanner prefers it over per-index `discoverAt` calls when present,
2796
+ * which is what keeps a 10-index window to 1-2 indexer requests instead
2797
+ * of one per index. Handlers whose source is inherently per-address (e.g.
2798
+ * boarding, on Esplora) implement only `discoverAt`.
2799
+ *
2800
+ * **All-or-nothing per call.** Either resolve with a map covering *every*
2801
+ * requested index (empty array = confirmed miss), or reject — a handler
2802
+ * whose inner chunk fails partway must discard the partial results and
2803
+ * reject, because a missing index would otherwise read as "no funds here"
2804
+ * and let restore close its gap window on a failed request. The scanner
2805
+ * enforces this rather than trusting it: an incomplete map is treated as a
2806
+ * rejection, making the whole requested range indeterminate (hits present
2807
+ * in it are still persisted) and truncating the scan at the range's first
2808
+ * index. Indices that were not requested are ignored.
2809
+ */
2810
+ discoverRange?(entries: readonly {
2811
+ index: number;
2812
+ descriptor: string;
2813
+ }[], deps: DiscoveryDeps): Promise<Map<number, DiscoveredContract[]>>;
2773
2814
  }
2774
2815
  /** Duck-typed guard (mirrors `hasReceiveRotatorFactory`). */
2775
2816
  declare function isDiscoverable(handler: ContractHandler<unknown> | undefined): handler is ContractHandler<unknown> & Discoverable;
@@ -2931,6 +2972,9 @@ declare class ContractWatcher {
2931
2972
  private reconnectAttempts;
2932
2973
  private reconnectTimeoutId?;
2933
2974
  private failsafePollIntervalId?;
2975
+ /** See {@link withCoalescedSubscription}. */
2976
+ private subscriptionBatchDepth;
2977
+ private subscriptionUpdateDeferred;
2934
2978
  /**
2935
2979
  * Create a contract watcher with the given providers and polling settings.
2936
2980
  *
@@ -3025,6 +3069,24 @@ declare class ContractWatcher {
3025
3069
  * Poll specific contracts and emit events for changes.
3026
3070
  */
3027
3071
  private pollContracts;
3072
+ /**
3073
+ * Run `fn` with subscription updates coalesced into a single
3074
+ * `subscribeForScripts` on the way out.
3075
+ *
3076
+ * {@link addContract} re-subscribes eagerly (the watcher may already be
3077
+ * running), and every subscribe posts the *whole* accumulated script list —
3078
+ * so a restore scan that discovers N contracts sends N growing POSTs,
3079
+ * quadratic in script-slots. Inside this scope those updates are only
3080
+ * marked dirty, flushed once on the way out (success and error path alike).
3081
+ *
3082
+ * A contract added inside the scope is therefore not streaming until the
3083
+ * flush. Nothing in the watcher closes that window — the failsafe poll
3084
+ * replays repository state and cannot see VTXOs no one has fetched yet. The
3085
+ * one caller, `scanContracts`, is covered because `Wallet.restore` follows
3086
+ * it with a bulk `refreshVtxos`. A new caller must provide its own
3087
+ * equivalent catch-up, or keep the scope short enough not to need one.
3088
+ */
3089
+ withCoalescedSubscription<T>(fn: () => Promise<T>): Promise<T>;
3028
3090
  private tryUpdateSubscription;
3029
3091
  /**
3030
3092
  * Update the subscription with scripts that should be watched.
@@ -4965,4 +5027,4 @@ declare namespace ProtoTypes {
4965
5027
  export { };
4966
5028
  }
4967
5029
 
4968
- export { type ReadonlyIdentity as $, type ArkTransaction as A, type VirtualTxRepository as B, type ContractRepository as C, type VirtualTx as D, type ExtendedCoin as E, type VtxoBranch as F, type GetVtxosFilter as G, ChainedTxType as H, type IWallet as I, type BatchStartedEvent as J, type TreeSigningStartedEvent as K, TxTree as L, type TreeNoncesEvent as M, type NormalizedExtendedVirtualCoin as N, type Outpoint as O, type BatchFinalizationEvent as P, type BatchFinalizedEvent as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type BatchFailedEvent as U, VtxoScript as V, type WalletRepository as W, type TreeTxEvent as X, type TreeSignatureEvent as Y, type DescriptorProvider as Z, type IReadonlyWallet as _, type Identity as a, ChainTxType as a$, type Network as a0, type OnchainProvider as a1, type DelegateProvider as a2, type ReadonlyWalletConfig as a3, type ExitCaptureMode as a4, type ExitDataSource as a5, type IReadonlyAssetManager as a6, type ContractSyncState as a7, type NetworkName as a8, type ArkInfo as a9, type BurnParams as aA, type RenewVtxosOptions as aB, type ContractWithVtxos as aC, type PathSelection as aD, type ContractEvent as aE, type AssetDetails as aF, type IssuanceResult as aG, type DelegateInfo as aH, type MigrationGlobalSkipReason as aI, type MigrationLegSkipReason as aJ, type SignerStatus as aK, type StorageConfig as aL, type IVtxoManager as aM, type ExplorerTransaction as aN, type EncodedVtxoScript as aO, type Status as aP, type ChainTx as aQ, type PathContext as aR, type ActivityIntent as aS, type ActivityResolver as aT, type ArkIntentState as aU, type ArkTapscript as aV, type AssetMetadata as aW, type BaseWalletConfig as aX, type BatchInfo as aY, type BatchSignableIdentity as aZ, CLTVMultisigTapscript as a_, ArkAddress as aa, type Coin as ab, ContractManager as ac, CSVMultisigTapscript as ad, type SettlementConfig as ae, VtxoManager as af, type SignerSession as ag, type SignedIntent as ah, Intent as ai, type TimeHeight as aj, type DescriptorSigningRequest as ak, Transaction as al, type IntentFeeConfig as am, type OffchainInput as an, FeeAmount as ao, type OnchainInput as ap, type FeeOutput as aq, type ContractWatcherConfig as ar, type Asset as as, type FeeInfo as at, type CreateContractParams as au, type GetContractsFilter as av, type GetSpendablePathsOptions as aw, type GetAllSpendingPathsOptions as ax, type IssuanceParams as ay, type ReissuanceParams as az, type WalletConfig as b, type VtxoChain as b$, type CommitmentTx as b0, ConditionCSVMultisigTapscript as b1, ConditionMultisigTapscript as b2, type ContractBalance as b3, type ContractEventCallback as b4, type ContractHandler as b5, type ContractManagerConfig as b6, type ContractState as b7, type ContractVtxo as b8, ContractWatcher as b9, type PageResponse as bA, type PaginationOptions as bB, PartialSig as bC, type ProviderClass as bD, RestDelegateProvider as bE, RestDelegatorProvider as bF, type ScanContractsOptions as bG, type ScanResult as bH, type ScheduledSession as bI, SettlementEventType as bJ, type SignRequest as bK, type SignerClassification as bL, type SignerSet as bM, type SubscriptionEvent as bN, type SubscriptionHeartbeat as bO, type TapLeaves as bP, TapTreeCoder as bQ, TapscriptType as bR, type TreeNonces as bS, type TreePartialSigs as bT, type Tx as bU, type TxHistoryRecord as bV, type TxKey as bW, type TxTreeNode as bX, TxType as bY, type VirtualStatus as bZ, type Vtxo as b_, DelegateManagerImpl as ba, type DelegateOptions as bb, DelegatorManagerImpl as bc, type DelegatorProvider as bd, type DeprecatedSignerMigrationReport as be, type DeprecatedSignerReport as bf, DigestMismatchError as bg, type Discoverable as bh, type DiscoveredContract as bi, type DiscoveryDeps as bj, ESPLORA_URL as bk, EsploraProvider as bl, type ExitChainResolver as bm, type ExtendedContractVtxo as bn, type GroupMembership as bo, type HandlerError as bp, type IDelegatorManager as bq, INTENT_TERMINAL_STATES as br, IndexerTxType as bs, type KnownMetadata as bt, type MigrateDeprecatedSignerOptions as bu, type MigrationLegReport as bv, type MigrationVtxoRef as bw, MultisigTapscript as bx, type Nonces as by, type Output as bz, type WalletBalance as c, type VtxoType as c0, type WalletMode as c1, boardingResolver as c2, canRecoverOnchain as c3, canSpendOffchain as c4, classifyAgainstSignerSet as c5, classifyContractSigner as c6, createDefaultActivityRegistry as c7, createExitChainResolver as c8, decodeTapscript as c9, getNetwork as ca, getSequence as cb, hasTerminalSpend as cc, isBatchSignable as cd, isCooperativelyMigratable as ce, isDiscoverable as cf, isExpired as cg, isPastExpiry as ch, isRecoverable as ci, isSpendable as cj, isSubdust as ck, isTerminalIntentState as cl, isVirtualCoin as cm, isVtxoExpiringSoon as cn, networks as co, signerSetFromInfo as cp, toXOnlySignerHex as cq, type TapscriptDeriving as cr, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type VtxoRepositoryKey as u, type WalletState as v, type ContractFilter as w, type IntentRepository as x, type ArkIntent as y, type IntentFilter as z };
5030
+ export { type NetworkName as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type TreeTxEvent as D, type ExtendedCoin as E, type TreeSignatureEvent as F, type GetVtxosFilter as G, type DescriptorProvider as H, type IWallet as I, type IReadonlyWallet as J, type ReadonlyIdentity as K, type Network as L, type DelegateProvider as M, type NormalizedExtendedVirtualCoin as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IntentRepository as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type VirtualTxRepository as U, VtxoScript as V, type WalletRepository as W, type ExitCaptureMode as X, type ExitDataSource as Y, type IReadonlyAssetManager as Z, type ContractSyncState as _, type Identity as a, ChainTxType as a$, type ArkInfo as a0, ArkAddress as a1, type Coin as a2, ContractManager as a3, CSVMultisigTapscript as a4, type SettlementConfig as a5, VtxoManager as a6, type SignerSession as a7, type SignedIntent as a8, Intent as a9, type BurnParams as aA, type RenewVtxosOptions as aB, type ContractWithVtxos as aC, type PathSelection as aD, type ContractEvent as aE, type AssetDetails as aF, type IssuanceResult as aG, type DelegateInfo as aH, type MigrationGlobalSkipReason as aI, type MigrationLegSkipReason as aJ, type SignerStatus as aK, type StorageConfig as aL, type IVtxoManager as aM, type ExplorerTransaction as aN, type EncodedVtxoScript as aO, type Status as aP, type ChainTx as aQ, type PathContext as aR, type ActivityIntent as aS, type ActivityResolver as aT, type ArkIntentState as aU, type ArkTapscript as aV, type AssetMetadata as aW, type BaseWalletConfig as aX, type BatchInfo as aY, type BatchSignableIdentity as aZ, CLTVMultisigTapscript as a_, type TimeHeight as aa, type VtxoRepositoryKey as ab, type WalletState as ac, type ContractFilter as ad, type ArkIntent as ae, type IntentFilter as af, type Outpoint as ag, type VirtualTx as ah, type VtxoBranch as ai, ChainedTxType as aj, type DescriptorSigningRequest as ak, Transaction as al, type IntentFeeConfig as am, type OffchainInput as an, FeeAmount as ao, type OnchainInput as ap, type FeeOutput as aq, type ContractWatcherConfig as ar, type Asset as as, type FeeInfo as at, type CreateContractParams as au, type GetContractsFilter as av, type GetSpendablePathsOptions as aw, type GetAllSpendingPathsOptions as ax, type IssuanceParams as ay, type ReissuanceParams as az, type WalletConfig as b, type VtxoChain as b$, type CommitmentTx as b0, ConditionCSVMultisigTapscript as b1, ConditionMultisigTapscript as b2, type ContractBalance as b3, type ContractEventCallback as b4, type ContractHandler as b5, type ContractManagerConfig as b6, type ContractState as b7, type ContractVtxo as b8, ContractWatcher as b9, type PageResponse as bA, type PaginationOptions as bB, PartialSig as bC, type ProviderClass as bD, RestDelegateProvider as bE, RestDelegatorProvider as bF, type ScanContractsOptions as bG, type ScanResult as bH, type ScheduledSession as bI, SettlementEventType as bJ, type SignRequest as bK, type SignerClassification as bL, type SignerSet as bM, type SubscriptionEvent as bN, type SubscriptionHeartbeat as bO, type TapLeaves as bP, TapTreeCoder as bQ, TapscriptType as bR, type TreeNonces as bS, type TreePartialSigs as bT, type Tx as bU, type TxHistoryRecord as bV, type TxKey as bW, type TxTreeNode as bX, TxType as bY, type VirtualStatus as bZ, type Vtxo as b_, DelegateManagerImpl as ba, type DelegateOptions as bb, DelegatorManagerImpl as bc, type DelegatorProvider as bd, type DeprecatedSignerMigrationReport as be, type DeprecatedSignerReport as bf, DigestMismatchError as bg, type Discoverable as bh, type DiscoveredContract as bi, type DiscoveryDeps as bj, ESPLORA_URL as bk, EsploraProvider as bl, type ExitChainResolver as bm, type ExtendedContractVtxo as bn, type GroupMembership as bo, type HandlerError as bp, type IDelegatorManager as bq, INTENT_TERMINAL_STATES as br, IndexerTxType as bs, type KnownMetadata as bt, type MigrateDeprecatedSignerOptions as bu, type MigrationLegReport as bv, type MigrationVtxoRef as bw, MultisigTapscript as bx, type Nonces as by, type Output as bz, type WalletBalance as c, type VtxoType as c0, type WalletMode as c1, boardingResolver as c2, canRecoverOnchain as c3, canSpendOffchain as c4, classifyAgainstSignerSet as c5, classifyContractSigner as c6, createDefaultActivityRegistry as c7, createExitChainResolver as c8, decodeTapscript as c9, getNetwork as ca, getSequence as cb, hasTerminalSpend as cc, isBatchSignable as cd, isCooperativelyMigratable as ce, isDiscoverable as cf, isExpired as cg, isPastExpiry as ch, isRecoverable as ci, isSpendable as cj, isSubdust as ck, isTerminalIntentState as cl, isVirtualCoin as cm, isVtxoExpiringSoon as cn, networks as co, signerSetFromInfo as cp, toXOnlySignerHex as cq, type TapscriptDeriving as cr, ActivityRegistry as d, type Activity as e, type IContractManager as f, type IDelegateManager as g, type SettleParams as h, type SettlementEvent as i, type IAssetManager as j, RestArkProvider as k, RestIndexerProvider as l, type SubscriptionResponse as m, type ArkProvider as n, type IndexerProvider as o, type RelativeTimelock as p, type TapLeafScript as q, type VirtualCoin as r, type Contract as s, type ExtendedVirtualCoin as t, type TreeSigningStartedEvent as u, TxTree as v, type TreeNoncesEvent as w, type BatchFinalizationEvent as x, type BatchFinalizedEvent as y, type BatchFailedEvent as z };
@@ -1,4 +1,4 @@
1
- import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-B-2MHCYG.js';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-Dw7xs60Q.js';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -1,4 +1,4 @@
1
- import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-Brnak0Rc.cjs';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-BjB5QINR.cjs';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.