@arkade-os/sdk 0.4.50 → 0.4.51

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 (64) hide show
  1. package/README.md +33 -8
  2. package/dist/adapters/expo.cjs +4 -4
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +2 -2
  6. package/dist/adapters/indexedDB.cjs +3 -3
  7. package/dist/adapters/indexedDB.js +2 -2
  8. package/dist/{ark-ApoclKQZ.d.cts → ark-9V45Anrs.d.cts} +105 -1
  9. package/dist/{ark-ApoclKQZ.d.ts → ark-9V45Anrs.d.ts} +105 -1
  10. package/dist/{asyncStorageTaskQueue-CIjgv1co.d.cts → asyncStorageTaskQueue-B6nXJv7m.d.cts} +1 -1
  11. package/dist/{asyncStorageTaskQueue-BCWmdVg8.d.ts → asyncStorageTaskQueue-BZjR843B.d.ts} +1 -1
  12. package/dist/{chunk-AA4Q2J57.js → chunk-3AOTJZQ4.js} +3 -3
  13. package/dist/{chunk-AA4Q2J57.js.map → chunk-3AOTJZQ4.js.map} +1 -1
  14. package/dist/{chunk-Q4K2RSMY.cjs → chunk-3E4GDBYU.cjs} +7 -7
  15. package/dist/{chunk-Q4K2RSMY.cjs.map → chunk-3E4GDBYU.cjs.map} +1 -1
  16. package/dist/{chunk-7WSVP7DK.js → chunk-4KGT3IP2.js} +3 -3
  17. package/dist/{chunk-7WSVP7DK.js.map → chunk-4KGT3IP2.js.map} +1 -1
  18. package/dist/{chunk-TO3SR7TY.cjs → chunk-5AT2NV5G.cjs} +11 -11
  19. package/dist/{chunk-TO3SR7TY.cjs.map → chunk-5AT2NV5G.cjs.map} +1 -1
  20. package/dist/{chunk-ZXRSSBCF.js → chunk-6T5BBPKO.js} +3 -3
  21. package/dist/{chunk-ZXRSSBCF.js.map → chunk-6T5BBPKO.js.map} +1 -1
  22. package/dist/{chunk-6BQTROB4.cjs → chunk-6XF6ZATZ.cjs} +427 -163
  23. package/dist/chunk-6XF6ZATZ.cjs.map +1 -0
  24. package/dist/{chunk-SIAVTHMZ.cjs → chunk-FHDUEBBC.cjs} +3 -3
  25. package/dist/{chunk-SIAVTHMZ.cjs.map → chunk-FHDUEBBC.cjs.map} +1 -1
  26. package/dist/{chunk-SNTSB6M2.js → chunk-TS2MTRP4.js} +323 -59
  27. package/dist/chunk-TS2MTRP4.js.map +1 -0
  28. package/dist/contracts/handlers/index.d.cts +3 -3
  29. package/dist/contracts/handlers/index.d.ts +3 -3
  30. package/dist/{delegate-hJYMZN1D.d.ts → delegate-CJkolr2s.d.ts} +1 -1
  31. package/dist/{delegate-CCHPwQft.d.cts → delegate-tVTPM4fm.d.cts} +1 -1
  32. package/dist/{index-5Y9h9OnO.d.ts → index-B5Fdwzs_.d.ts} +2 -2
  33. package/dist/{index-8jE1XJpT.d.cts → index-BBAffp_8.d.cts} +2 -2
  34. package/dist/index.cjs +145 -145
  35. package/dist/index.d.cts +24 -8
  36. package/dist/index.d.ts +24 -8
  37. package/dist/index.js +2 -2
  38. package/dist/repositories/realm/index.cjs +17 -17
  39. package/dist/repositories/realm/index.d.cts +2 -2
  40. package/dist/repositories/realm/index.d.ts +2 -2
  41. package/dist/repositories/realm/index.js +3 -3
  42. package/dist/repositories/sqlite/index.cjs +16 -16
  43. package/dist/repositories/sqlite/index.d.cts +2 -2
  44. package/dist/repositories/sqlite/index.d.ts +2 -2
  45. package/dist/repositories/sqlite/index.js +3 -3
  46. package/dist/{taskRunner-C3YLaM2x.d.cts → taskRunner-4CrJaWHv.d.cts} +1 -1
  47. package/dist/{taskRunner-ChvV6Xrh.d.ts → taskRunner-TgdjRf_b.d.ts} +1 -1
  48. package/dist/wallet/expo/background.cjs +12 -12
  49. package/dist/wallet/expo/background.d.cts +3 -3
  50. package/dist/wallet/expo/background.d.ts +3 -3
  51. package/dist/wallet/expo/background.js +4 -4
  52. package/dist/wallet/expo/index.cjs +12 -12
  53. package/dist/wallet/expo/index.d.cts +4 -4
  54. package/dist/wallet/expo/index.d.ts +4 -4
  55. package/dist/wallet/expo/index.js +3 -3
  56. package/dist/{wallet-DIH0gVfW.d.ts → wallet-BBfhZx_Z.d.cts} +22 -3
  57. package/dist/{wallet-B260BTJs.d.cts → wallet-CSSTN8Yc.d.ts} +22 -3
  58. package/dist/worker/expo/index.cjs +7 -7
  59. package/dist/worker/expo/index.d.cts +4 -4
  60. package/dist/worker/expo/index.d.ts +4 -4
  61. package/dist/worker/expo/index.js +3 -3
  62. package/package.json +1 -1
  63. package/dist/chunk-6BQTROB4.cjs.map +0 -1
  64. package/dist/chunk-SNTSB6M2.js.map +0 -1
package/README.md CHANGED
@@ -1247,9 +1247,33 @@ This is required for MuSig2 settlements and cryptographic operations.
1247
1247
 
1248
1248
  ### Contract Management
1249
1249
 
1250
- Both `Wallet` and `ServiceWorkerWallet` use a `ContractManager` internally to watch for virtual outputs. This provides resilient connection handling with automatic reconnection and failsafe polling - for your wallet's default address and any external contracts you register (Boltz swaps, HTLCs, etc.).
1250
+ Both `Wallet` and `ServiceWorkerWallet` use a `ContractManager` internally to watch for virtual outputs and persist them into repositories. This provides resilient connection handling with automatic reconnection and failsafe polling - for your wallet's default address and any external contracts you register (Boltz swaps, HTLCs, etc.).
1251
1251
 
1252
- When you call `wallet.notifyIncomingFunds()` or use `waitForIncomingFunds()`, it uses the ContractManager under the hood, giving you automatic reconnection and failsafe polling for free - no code changes needed.
1252
+ When you call `wallet.notifyIncomingFunds()` or use `waitForIncomingFunds()`, it uses the ContractManager under the hood, giving you automatic reconnection and repository-backed event replay for free - no code changes needed.
1253
+
1254
+ `watcherConfig.failsafePollIntervalMs` (default `20_000`) controls how often the watcher replays repository changes into contract events; it does not fetch fresh VTXOs from the indexer.
1255
+
1256
+ #### HD look-ahead window
1257
+
1258
+ HD wallets (`walletMode: 'hd'`, or an explicit HD `DescriptorProvider`) also watch a band of *unused* offchain receive scripts around their allocation watermark, so a payment to an address that some other party issued from the same seed — a merchant backend such as BTCPay Server — arrives without the user calling `restore()`. `lookAheadWindow` (default `20`) is the per-side width of that band: the wallet watches `[watermark - N, watermark + N]`. Speculative entries are subscription-only; they become contract rows, and enter balances, only once funded.
1259
+
1260
+ ```typescript
1261
+ const wallet = await Wallet.create({
1262
+ identity,
1263
+ walletMode: 'hd',
1264
+ lookAheadWindow: 50, // issuer hands out long runs of unpaid invoices
1265
+ })
1266
+
1267
+ // Same option on the service-worker wallet; it is forwarded to the worker's inner wallet.
1268
+ const swWallet = await ServiceWorkerWallet.setup({
1269
+ serviceWorkerPath: '/service-worker.js',
1270
+ identity,
1271
+ walletMode: 'hd',
1272
+ lookAheadWindow: 50,
1273
+ })
1274
+ ```
1275
+
1276
+ Raise it when the external issuer is expected to burn more than `N` consecutive addresses without any of them being paid — every index in such a run is a miss, and the funded one sits past the band. When that happens the funds are invisible until a `restore()` whose `gapLimit` is large enough to cross the run (`wallet.restore({ gapLimit: 200 })`); a default restore closes its gap window before reaching the funded index. Keep the value modest: the band adds up to `2N + 1` script filters to the wallet's subscription.
1253
1277
 
1254
1278
  For advanced use cases, you can access the ContractManager directly to register external contracts:
1255
1279
 
@@ -1312,21 +1336,22 @@ const allPaths = await manager.getAllSpendingPaths({
1312
1336
  // Fetch contracts together with their current virtual outputs
1313
1337
  const contractsWithVtxos = await manager.getContractsWithVtxos()
1314
1338
 
1315
- // Force a full refresh from the indexer when needed
1339
+ // Force an indexer refresh of the watched contracts when needed
1316
1340
  await manager.refreshVtxos()
1317
1341
 
1318
1342
  // Stop watching
1319
1343
  unsubscribe()
1320
1344
  ```
1321
1345
 
1322
- The watcher features:
1323
- - **Automatic reconnection** with exponential backoff (1s → 30s max)
1324
- - **Failsafe polling** every 60 seconds to catch missed events
1325
- - **Immediate sync** on connection and after failures
1346
+ Contract freshness behavior:
1347
+ - **Automatic reconnection** with exponential backoff (1s → 5s max)
1348
+ - **Immediate sync** on manager initialization, subscription reconnect, and contract events
1349
+ - **Failsafe polling** every 20 seconds by default to catch missed events, configurable via `watcherConfig.failsafePollIntervalMs`
1350
+ - **Manual refresh** through `manager.refreshVtxos()`; pass `{ includeInactive: true }` to sweep every repository contract
1326
1351
 
1327
1352
  ### Repository Pattern
1328
1353
 
1329
- Most users don't need to touch repositories directly — `Wallet` and `ContractManager` already read and write through them. They are documented here for advanced integrations (custom storage backends, offline-first apps, repository inspection).
1354
+ Most users don't need to touch repositories directly — `Wallet` reads through them and `ContractManager` owns VTXO/contract synchronization into them. They are documented here for advanced integrations (custom storage backends, offline-first apps, repository inspection).
1330
1355
 
1331
1356
  ```typescript
1332
1357
  // Wallet repository — VTXOs, UTXOs, transaction history, settings
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkTO3SR7TY_cjs = require('../chunk-TO3SR7TY.cjs');
4
- require('../chunk-SIAVTHMZ.cjs');
3
+ var chunk5AT2NV5G_cjs = require('../chunk-5AT2NV5G.cjs');
4
+ require('../chunk-FHDUEBBC.cjs');
5
5
  require('../chunk-E7HB3GKK.cjs');
6
6
  require('../chunk-5BLDMQED.cjs');
7
7
 
@@ -9,11 +9,11 @@ require('../chunk-5BLDMQED.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "ExpoArkProvider", {
11
11
  enumerable: true,
12
- get: function () { return chunkTO3SR7TY_cjs.ExpoArkProvider; }
12
+ get: function () { return chunk5AT2NV5G_cjs.ExpoArkProvider; }
13
13
  });
14
14
  Object.defineProperty(exports, "ExpoIndexerProvider", {
15
15
  enumerable: true,
16
- get: function () { return chunkTO3SR7TY_cjs.ExpoIndexerProvider; }
16
+ get: function () { return chunk5AT2NV5G_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-ApoclKQZ.cjs';
2
- export { n as ArkProvider, o as IndexerProvider } from '../ark-ApoclKQZ.cjs';
1
+ import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-9V45Anrs.cjs';
2
+ export { n as ArkProvider, o as IndexerProvider } from '../ark-9V45Anrs.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-ApoclKQZ.js';
2
- export { n as ArkProvider, o as IndexerProvider } from '../ark-ApoclKQZ.js';
1
+ import { k as RestArkProvider, i as SettlementEvent, T as TxNotification, l as RestIndexerProvider, m as SubscriptionResponse } from '../ark-9V45Anrs.js';
2
+ export { n as ArkProvider, o as IndexerProvider } from '../ark-9V45Anrs.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,5 +1,5 @@
1
- export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-ZXRSSBCF.js';
2
- import '../chunk-AA4Q2J57.js';
1
+ export { ExpoArkProvider, ExpoIndexerProvider } from '../chunk-6T5BBPKO.js';
2
+ import '../chunk-3AOTJZQ4.js';
3
3
  import '../chunk-EFNLTS6Q.js';
4
4
  import '../chunk-NSBPE2FW.js';
5
5
  //# sourceMappingURL=expo.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk6BQTROB4_cjs = require('../chunk-6BQTROB4.cjs');
4
- require('../chunk-SIAVTHMZ.cjs');
3
+ var chunk6XF6ZATZ_cjs = require('../chunk-6XF6ZATZ.cjs');
4
+ require('../chunk-FHDUEBBC.cjs');
5
5
  require('../chunk-LJQ2VQBE.cjs');
6
6
  require('../chunk-E7HB3GKK.cjs');
7
7
  require('../chunk-5BLDMQED.cjs');
@@ -11,7 +11,7 @@ var IndexedDBStorageAdapter = class {
11
11
  dbName;
12
12
  version;
13
13
  db = null;
14
- constructor(dbName, version = chunk6BQTROB4_cjs.DB_VERSION) {
14
+ constructor(dbName, version = chunk6XF6ZATZ_cjs.DB_VERSION) {
15
15
  this.dbName = dbName;
16
16
  this.version = version;
17
17
  }
@@ -1,5 +1,5 @@
1
- import { DB_VERSION } from '../chunk-SNTSB6M2.js';
2
- import '../chunk-AA4Q2J57.js';
1
+ import { DB_VERSION } from '../chunk-TS2MTRP4.js';
2
+ import '../chunk-3AOTJZQ4.js';
3
3
  import '../chunk-MBSYQ3WX.js';
4
4
  import '../chunk-EFNLTS6Q.js';
5
5
  import '../chunk-NSBPE2FW.js';
@@ -2102,6 +2102,15 @@ interface IContractManager extends Disposable {
2102
2102
  * Outpoints not owned by any tracked contract are silently dropped.
2103
2103
  */
2104
2104
  refreshOutpoints(outpoints: Outpoint[]): Promise<void>;
2105
+ /**
2106
+ * Rebuild the HD look-ahead watch window around the current allocation
2107
+ * watermark. No-op when the manager was configured without `lookAhead`.
2108
+ *
2109
+ * Call after anything that moves the watermark (restore, boarding
2110
+ * allocation, receive rotation, server-signer rotation). Concurrent calls
2111
+ * coalesce into a single drain.
2112
+ */
2113
+ refillLookAhead(): Promise<void>;
2105
2114
  /**
2106
2115
  * Explicit, gap-limit contract discovery used by `wallet.restore()`.
2107
2116
  *
@@ -2192,6 +2201,27 @@ interface ContractManagerConfig {
2192
2201
  onVtxosSpent?: (vtxos: Outpoint[]) => Promise<void>;
2193
2202
  /** Watcher configuration */
2194
2203
  watcherConfig?: Partial<ContractWatcherConfig>;
2204
+ /**
2205
+ * Enables the HD look-ahead watch window. Absent ⇒ feature off (static /
2206
+ * non-HD wallets, third-party embedders). See
2207
+ * {@link ContractManager.refillLookAhead}.
2208
+ */
2209
+ lookAhead?: LookAheadConfig;
2210
+ }
2211
+ /**
2212
+ * Wallet-injected surface backing the HD look-ahead window. Kept as a
2213
+ * callback bundle so the contracts layer never learns what an HD descriptor
2214
+ * is (mirrors {@link ScanContractsOptions.materialize}).
2215
+ */
2216
+ interface LookAheadConfig {
2217
+ /** Per-side band bound: the window spans `[max(0, w - size), w + size]`. */
2218
+ size: number;
2219
+ /** Current allocation watermark (`lastIndexUsed ?? -1`). */
2220
+ currentWatermark(): Promise<number>;
2221
+ /** Offchain receive contract params at an HD index. Pure derivation. */
2222
+ materialize(index: number): CreateContractParams;
2223
+ /** Fired after a speculative entry at `index` is promoted to a real row. */
2224
+ onPromoted?(index: number): Promise<void>;
2195
2225
  }
2196
2226
  /**
2197
2227
  * Parameters for creating a new contract.
@@ -2257,6 +2287,12 @@ declare class ContractManager implements IContractManager {
2257
2287
  private syncDegradedReason?;
2258
2288
  /** Epoch-ms of the last successful provider sync, if any. */
2259
2289
  private lastSyncedAt?;
2290
+ /** Speculative look-ahead scripts, keyed by script. @see LookAheadEntry */
2291
+ private lookAheadEntries;
2292
+ /** In-flight look-ahead drain, if any. @see scheduleLookAheadDrain */
2293
+ private lookAheadDrain?;
2294
+ /** A refill was requested while a drain was running. */
2295
+ private lookAheadDirty;
2260
2296
  private constructor();
2261
2297
  /**
2262
2298
  * Static factory method for creating a new ContractManager.
@@ -2298,6 +2334,59 @@ declare class ContractManager implements IContractManager {
2298
2334
  * a failure is logged and sync continues. No-op without an intent store.
2299
2335
  */
2300
2336
  private reconcileStaleIntents;
2337
+ /** @see IContractManager.refillLookAhead */
2338
+ refillLookAhead(): Promise<void>;
2339
+ /**
2340
+ * Serialized drain of the look-ahead band: concurrent callers join the
2341
+ * active drain and mark it dirty, an idle call starts a new one. Promotion
2342
+ * can uncover more funded indices, and boot / SSE / rotate / reconnect can
2343
+ * all request a refill at once, so the loop coalesces them instead of
2344
+ * recursing.
2345
+ */
2346
+ private scheduleLookAheadDrain;
2347
+ /**
2348
+ * Request a drain without awaiting it. Used from inside a sync (promotion),
2349
+ * where awaiting the drain that the sync itself is part of would deadlock.
2350
+ */
2351
+ private requestLookAheadDrain;
2352
+ /**
2353
+ * Rebuild the speculative watch band around the allocation watermark.
2354
+ *
2355
+ * NArk needs no analogue because it *is* the address issuer: it persists a
2356
+ * contract row at derivation time, so its watched set is a superset of
2357
+ * every address it ever advertised. This SDK, when a third party issues
2358
+ * addresses from the shared seed, cannot observe those allocations at all —
2359
+ * the window is how a non-issuer compensates.
2360
+ *
2361
+ * Entries are registered with the watcher but NOT persisted: they become
2362
+ * repository rows only once funded (see {@link promoteLookAheadHits}).
2363
+ */
2364
+ private ensureLookAhead;
2365
+ /**
2366
+ * One-time full-history sync for speculative entries the manager has not
2367
+ * successfully caught up on yet.
2368
+ *
2369
+ * Every normal sync uses the cursor-derived delta window and SSE only
2370
+ * delivers events after a script is subscribed, so a script first
2371
+ * registered after its funding time would otherwise be skipped forever
2372
+ * (upgrade migration, or a band that slid over an already-funded index).
2373
+ * The entries are passed as in-memory contracts because `refreshVtxos`
2374
+ * resolves scripts through the repository, where they deliberately do not
2375
+ * exist. Targeted + explicitly windowed, so the global cursor stays put.
2376
+ */
2377
+ private runLookAheadCatchUp;
2378
+ /**
2379
+ * Promote every look-ahead entry funded by `vtxos` into a real repository
2380
+ * row, returning the persisted rows keyed by script.
2381
+ *
2382
+ * MUST run on each raw indexer fetch before `annotateVtxos`:
2383
+ * `extendVirtualCoinForContract` throws when a VTXO's script has no
2384
+ * contract row, so a funded window entry has to be persisted before its
2385
+ * VTXOs are annotated and saved. Callers also swap the returned rows into
2386
+ * the local contract maps they built pre-promotion, so `saveVtxosForContract`
2387
+ * and `onVtxosPersisted` never see the synthetic watcher object.
2388
+ */
2389
+ private promoteLookAheadHits;
2301
2390
  /**
2302
2391
  * Create and register a new contract.
2303
2392
  *
@@ -2324,6 +2413,7 @@ declare class ContractManager implements IContractManager {
2324
2413
  * `persisted` is `true`.
2325
2414
  */
2326
2415
  private upsertContract;
2416
+ private upsertContractRow;
2327
2417
  /**
2328
2418
  * Explicit, gap-limit contract discovery (see {@link IContractManager.scanContracts}).
2329
2419
  *
@@ -3624,6 +3714,20 @@ interface WalletConfig extends ReadonlyWalletConfig {
3624
3714
  * @defaultValue `'auto'`
3625
3715
  */
3626
3716
  walletMode?: WalletMode;
3717
+ /**
3718
+ * Per-side width of the HD look-ahead watch window: the wallet watches
3719
+ * missing offchain receive scripts across `[watermark - N, watermark + N]`
3720
+ * so funds paid to an address issued by an external party (a merchant
3721
+ * backend sharing the seed) arrive without an explicit `restore()`.
3722
+ *
3723
+ * Only meaningful for HD wallets (`walletMode: 'hd'` or an HD
3724
+ * {@link DescriptorProvider}); ignored otherwise. Raise it when the issuer
3725
+ * is expected to hand out more than `N` consecutive addresses without any
3726
+ * of them being paid. Must be a positive integer.
3727
+ *
3728
+ * @defaultValue `20`
3729
+ */
3730
+ lookAheadWindow?: number;
3627
3731
  }
3628
3732
  /**
3629
3733
  * Repository implementations used to store wallet and contract state.
@@ -5034,4 +5138,4 @@ declare namespace ProtoTypes {
5034
5138
  export { };
5035
5139
  }
5036
5140
 
5037
- 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 };
5141
+ 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, CLTVMultisigTapscript 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 ReissuanceParams as aA, type BurnParams as aB, type RenewVtxosOptions as aC, type ContractWithVtxos as aD, type PathSelection as aE, type ContractEvent as aF, type AssetDetails as aG, type IssuanceResult as aH, type DelegateInfo as aI, type MigrationGlobalSkipReason as aJ, type MigrationLegSkipReason as aK, type SignerStatus as aL, type StorageConfig as aM, type IVtxoManager as aN, type ExplorerTransaction as aO, type EncodedVtxoScript as aP, type Status as aQ, type ChainTx as aR, type PathContext as aS, type ActivityIntent as aT, type ActivityResolver as aU, type ArkIntentState as aV, type ArkTapscript as aW, type AssetMetadata as aX, type BaseWalletConfig as aY, type BatchInfo as aZ, type BatchSignableIdentity as a_, ArkAddress as aa, type Coin as ab, ContractManager as ac, type ContractManagerConfig as ad, CSVMultisigTapscript as ae, type SettlementConfig as af, VtxoManager as ag, type SignerSession as ah, type SignedIntent as ai, Intent as aj, type TimeHeight as ak, type DescriptorSigningRequest as al, Transaction as am, type IntentFeeConfig as an, type OffchainInput as ao, FeeAmount as ap, type OnchainInput as aq, type FeeOutput as ar, type ContractWatcherConfig as as, type Asset as at, type FeeInfo as au, type CreateContractParams as av, type GetContractsFilter as aw, type GetSpendablePathsOptions as ax, type GetAllSpendingPathsOptions as ay, type IssuanceParams as az, type WalletConfig as b, type VtxoChain as b$, ChainTxType as b0, type CommitmentTx as b1, ConditionCSVMultisigTapscript as b2, ConditionMultisigTapscript as b3, type ContractBalance as b4, type ContractEventCallback as b5, type ContractHandler 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 };
@@ -2102,6 +2102,15 @@ interface IContractManager extends Disposable {
2102
2102
  * Outpoints not owned by any tracked contract are silently dropped.
2103
2103
  */
2104
2104
  refreshOutpoints(outpoints: Outpoint[]): Promise<void>;
2105
+ /**
2106
+ * Rebuild the HD look-ahead watch window around the current allocation
2107
+ * watermark. No-op when the manager was configured without `lookAhead`.
2108
+ *
2109
+ * Call after anything that moves the watermark (restore, boarding
2110
+ * allocation, receive rotation, server-signer rotation). Concurrent calls
2111
+ * coalesce into a single drain.
2112
+ */
2113
+ refillLookAhead(): Promise<void>;
2105
2114
  /**
2106
2115
  * Explicit, gap-limit contract discovery used by `wallet.restore()`.
2107
2116
  *
@@ -2192,6 +2201,27 @@ interface ContractManagerConfig {
2192
2201
  onVtxosSpent?: (vtxos: Outpoint[]) => Promise<void>;
2193
2202
  /** Watcher configuration */
2194
2203
  watcherConfig?: Partial<ContractWatcherConfig>;
2204
+ /**
2205
+ * Enables the HD look-ahead watch window. Absent ⇒ feature off (static /
2206
+ * non-HD wallets, third-party embedders). See
2207
+ * {@link ContractManager.refillLookAhead}.
2208
+ */
2209
+ lookAhead?: LookAheadConfig;
2210
+ }
2211
+ /**
2212
+ * Wallet-injected surface backing the HD look-ahead window. Kept as a
2213
+ * callback bundle so the contracts layer never learns what an HD descriptor
2214
+ * is (mirrors {@link ScanContractsOptions.materialize}).
2215
+ */
2216
+ interface LookAheadConfig {
2217
+ /** Per-side band bound: the window spans `[max(0, w - size), w + size]`. */
2218
+ size: number;
2219
+ /** Current allocation watermark (`lastIndexUsed ?? -1`). */
2220
+ currentWatermark(): Promise<number>;
2221
+ /** Offchain receive contract params at an HD index. Pure derivation. */
2222
+ materialize(index: number): CreateContractParams;
2223
+ /** Fired after a speculative entry at `index` is promoted to a real row. */
2224
+ onPromoted?(index: number): Promise<void>;
2195
2225
  }
2196
2226
  /**
2197
2227
  * Parameters for creating a new contract.
@@ -2257,6 +2287,12 @@ declare class ContractManager implements IContractManager {
2257
2287
  private syncDegradedReason?;
2258
2288
  /** Epoch-ms of the last successful provider sync, if any. */
2259
2289
  private lastSyncedAt?;
2290
+ /** Speculative look-ahead scripts, keyed by script. @see LookAheadEntry */
2291
+ private lookAheadEntries;
2292
+ /** In-flight look-ahead drain, if any. @see scheduleLookAheadDrain */
2293
+ private lookAheadDrain?;
2294
+ /** A refill was requested while a drain was running. */
2295
+ private lookAheadDirty;
2260
2296
  private constructor();
2261
2297
  /**
2262
2298
  * Static factory method for creating a new ContractManager.
@@ -2298,6 +2334,59 @@ declare class ContractManager implements IContractManager {
2298
2334
  * a failure is logged and sync continues. No-op without an intent store.
2299
2335
  */
2300
2336
  private reconcileStaleIntents;
2337
+ /** @see IContractManager.refillLookAhead */
2338
+ refillLookAhead(): Promise<void>;
2339
+ /**
2340
+ * Serialized drain of the look-ahead band: concurrent callers join the
2341
+ * active drain and mark it dirty, an idle call starts a new one. Promotion
2342
+ * can uncover more funded indices, and boot / SSE / rotate / reconnect can
2343
+ * all request a refill at once, so the loop coalesces them instead of
2344
+ * recursing.
2345
+ */
2346
+ private scheduleLookAheadDrain;
2347
+ /**
2348
+ * Request a drain without awaiting it. Used from inside a sync (promotion),
2349
+ * where awaiting the drain that the sync itself is part of would deadlock.
2350
+ */
2351
+ private requestLookAheadDrain;
2352
+ /**
2353
+ * Rebuild the speculative watch band around the allocation watermark.
2354
+ *
2355
+ * NArk needs no analogue because it *is* the address issuer: it persists a
2356
+ * contract row at derivation time, so its watched set is a superset of
2357
+ * every address it ever advertised. This SDK, when a third party issues
2358
+ * addresses from the shared seed, cannot observe those allocations at all —
2359
+ * the window is how a non-issuer compensates.
2360
+ *
2361
+ * Entries are registered with the watcher but NOT persisted: they become
2362
+ * repository rows only once funded (see {@link promoteLookAheadHits}).
2363
+ */
2364
+ private ensureLookAhead;
2365
+ /**
2366
+ * One-time full-history sync for speculative entries the manager has not
2367
+ * successfully caught up on yet.
2368
+ *
2369
+ * Every normal sync uses the cursor-derived delta window and SSE only
2370
+ * delivers events after a script is subscribed, so a script first
2371
+ * registered after its funding time would otherwise be skipped forever
2372
+ * (upgrade migration, or a band that slid over an already-funded index).
2373
+ * The entries are passed as in-memory contracts because `refreshVtxos`
2374
+ * resolves scripts through the repository, where they deliberately do not
2375
+ * exist. Targeted + explicitly windowed, so the global cursor stays put.
2376
+ */
2377
+ private runLookAheadCatchUp;
2378
+ /**
2379
+ * Promote every look-ahead entry funded by `vtxos` into a real repository
2380
+ * row, returning the persisted rows keyed by script.
2381
+ *
2382
+ * MUST run on each raw indexer fetch before `annotateVtxos`:
2383
+ * `extendVirtualCoinForContract` throws when a VTXO's script has no
2384
+ * contract row, so a funded window entry has to be persisted before its
2385
+ * VTXOs are annotated and saved. Callers also swap the returned rows into
2386
+ * the local contract maps they built pre-promotion, so `saveVtxosForContract`
2387
+ * and `onVtxosPersisted` never see the synthetic watcher object.
2388
+ */
2389
+ private promoteLookAheadHits;
2301
2390
  /**
2302
2391
  * Create and register a new contract.
2303
2392
  *
@@ -2324,6 +2413,7 @@ declare class ContractManager implements IContractManager {
2324
2413
  * `persisted` is `true`.
2325
2414
  */
2326
2415
  private upsertContract;
2416
+ private upsertContractRow;
2327
2417
  /**
2328
2418
  * Explicit, gap-limit contract discovery (see {@link IContractManager.scanContracts}).
2329
2419
  *
@@ -3624,6 +3714,20 @@ interface WalletConfig extends ReadonlyWalletConfig {
3624
3714
  * @defaultValue `'auto'`
3625
3715
  */
3626
3716
  walletMode?: WalletMode;
3717
+ /**
3718
+ * Per-side width of the HD look-ahead watch window: the wallet watches
3719
+ * missing offchain receive scripts across `[watermark - N, watermark + N]`
3720
+ * so funds paid to an address issued by an external party (a merchant
3721
+ * backend sharing the seed) arrive without an explicit `restore()`.
3722
+ *
3723
+ * Only meaningful for HD wallets (`walletMode: 'hd'` or an HD
3724
+ * {@link DescriptorProvider}); ignored otherwise. Raise it when the issuer
3725
+ * is expected to hand out more than `N` consecutive addresses without any
3726
+ * of them being paid. Must be a positive integer.
3727
+ *
3728
+ * @defaultValue `20`
3729
+ */
3730
+ lookAheadWindow?: number;
3627
3731
  }
3628
3732
  /**
3629
3733
  * Repository implementations used to store wallet and contract state.
@@ -5034,4 +5138,4 @@ declare namespace ProtoTypes {
5034
5138
  export { };
5035
5139
  }
5036
5140
 
5037
- 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 };
5141
+ 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, CLTVMultisigTapscript 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 ReissuanceParams as aA, type BurnParams as aB, type RenewVtxosOptions as aC, type ContractWithVtxos as aD, type PathSelection as aE, type ContractEvent as aF, type AssetDetails as aG, type IssuanceResult as aH, type DelegateInfo as aI, type MigrationGlobalSkipReason as aJ, type MigrationLegSkipReason as aK, type SignerStatus as aL, type StorageConfig as aM, type IVtxoManager as aN, type ExplorerTransaction as aO, type EncodedVtxoScript as aP, type Status as aQ, type ChainTx as aR, type PathContext as aS, type ActivityIntent as aT, type ActivityResolver as aU, type ArkIntentState as aV, type ArkTapscript as aW, type AssetMetadata as aX, type BaseWalletConfig as aY, type BatchInfo as aZ, type BatchSignableIdentity as a_, ArkAddress as aa, type Coin as ab, ContractManager as ac, type ContractManagerConfig as ad, CSVMultisigTapscript as ae, type SettlementConfig as af, VtxoManager as ag, type SignerSession as ah, type SignedIntent as ai, Intent as aj, type TimeHeight as ak, type DescriptorSigningRequest as al, Transaction as am, type IntentFeeConfig as an, type OffchainInput as ao, FeeAmount as ap, type OnchainInput as aq, type FeeOutput as ar, type ContractWatcherConfig as as, type Asset as at, type FeeInfo as au, type CreateContractParams as av, type GetContractsFilter as aw, type GetSpendablePathsOptions as ax, type GetAllSpendingPathsOptions as ay, type IssuanceParams as az, type WalletConfig as b, type VtxoChain as b$, ChainTxType as b0, type CommitmentTx as b1, ConditionCSVMultisigTapscript as b2, ConditionMultisigTapscript as b3, type ContractBalance as b4, type ContractEventCallback as b5, type ContractHandler 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 };
@@ -1,4 +1,4 @@
1
- import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-C3YLaM2x.cjs';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-4CrJaWHv.cjs';
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-ChvV6Xrh.js';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-TgdjRf_b.js';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -159,7 +159,7 @@ function checkKeyMatch(key, arkPsbtFieldKey, prefixOnly = false) {
159
159
  }
160
160
 
161
161
  // package.json
162
- var version = "0.4.50";
162
+ var version = "0.4.51";
163
163
 
164
164
  // src/utils/fetch.ts
165
165
  var buildVersion = "0.9.9";
@@ -3102,5 +3102,5 @@ var Response;
3102
3102
  })(Response || (Response = {}));
3103
3103
 
3104
3104
  export { ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, AssetGroup, AssetId, AssetInput, AssetOutput, AssetRef, BufferReader, BufferWriter, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, IndexerTxType, Intent, Metadata, OP_RETURN_EMPTY_PKSCRIPT, Packet, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports, baseFetch, buildVersion, craftToSpendTx, fetch, getArkPsbtFields, isArkError, isEventSourceError, isFetchTimeoutError, maybeArkError, rateGate, sdkVersion, setArkPsbtField };
3105
- //# sourceMappingURL=chunk-AA4Q2J57.js.map
3106
- //# sourceMappingURL=chunk-AA4Q2J57.js.map
3105
+ //# sourceMappingURL=chunk-3AOTJZQ4.js.map
3106
+ //# sourceMappingURL=chunk-3AOTJZQ4.js.map