@arkade-os/sdk 0.4.71 → 0.4.72

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 (80) hide show
  1. package/README.md +29 -0
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{asyncStorageTaskQueue-CjKAUiuj.d.ts → asyncStorageTaskQueue-DhhNZc4v.d.ts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-DgXf4iuU.d.cts → asyncStorageTaskQueue-s5lUGWxu.d.cts} +2 -2
  10. package/dist/{chunk-I7ZNWBBU.cjs → chunk-4BWZ437E.cjs} +21 -17
  11. package/dist/chunk-4BWZ437E.cjs.map +1 -0
  12. package/dist/{chunk-FM263GKH.cjs → chunk-4C5PMGBB.cjs} +51 -25
  13. package/dist/chunk-4C5PMGBB.cjs.map +1 -0
  14. package/dist/{chunk-2ZX4Z2IP.js → chunk-5GQFYVWP.js} +30 -5
  15. package/dist/chunk-5GQFYVWP.js.map +1 -0
  16. package/dist/{chunk-5J5PDZRR.cjs → chunk-6FTHFJAN.cjs} +30 -4
  17. package/dist/chunk-6FTHFJAN.cjs.map +1 -0
  18. package/dist/{chunk-E5JNYFOF.js → chunk-BHLYB44A.js} +210 -53
  19. package/dist/chunk-BHLYB44A.js.map +1 -0
  20. package/dist/{chunk-ALZ2CZ3T.js → chunk-CB6QPAO5.js} +3 -3
  21. package/dist/{chunk-ALZ2CZ3T.js.map → chunk-CB6QPAO5.js.map} +1 -1
  22. package/dist/{chunk-NOWVA5CM.js → chunk-CZPBPMO2.js} +4 -4
  23. package/dist/{chunk-NOWVA5CM.js.map → chunk-CZPBPMO2.js.map} +1 -1
  24. package/dist/{chunk-ZT3EM4CE.js → chunk-IGER5FPC.js} +37 -11
  25. package/dist/chunk-IGER5FPC.js.map +1 -0
  26. package/dist/{chunk-7PHMT3T4.cjs → chunk-KDMHEWTD.cjs} +10 -10
  27. package/dist/{chunk-7PHMT3T4.cjs.map → chunk-KDMHEWTD.cjs.map} +1 -1
  28. package/dist/{chunk-P6EXRY5L.cjs → chunk-NPM5YZBC.cjs} +49 -49
  29. package/dist/{chunk-P6EXRY5L.cjs.map → chunk-NPM5YZBC.cjs.map} +1 -1
  30. package/dist/{chunk-SCSLCU66.js → chunk-S5PUFSXC.js} +8 -4
  31. package/dist/chunk-S5PUFSXC.js.map +1 -0
  32. package/dist/{chunk-MK5EPTTB.cjs → chunk-U5I3ITV7.cjs} +643 -485
  33. package/dist/chunk-U5I3ITV7.cjs.map +1 -0
  34. package/dist/contracts/handlers/index.cjs +9 -9
  35. package/dist/contracts/handlers/index.d.cts +3 -3
  36. package/dist/contracts/handlers/index.d.ts +3 -3
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-D-gEEqrP.d.cts → delegate-BJp8f6LT.d.cts} +1 -1
  39. package/dist/{delegate-CKJdsC99.d.ts → delegate-Ckz_TWzM.d.ts} +1 -1
  40. package/dist/{hdWalletCapable-CwLPmWct.d.cts → hdWalletCapable-DA9bJ5eB.d.cts} +2 -2
  41. package/dist/{hdWalletCapable-BJ4pvkai.d.ts → hdWalletCapable-DABgAD-T.d.ts} +2 -2
  42. package/dist/{index-Boppyqav.d.ts → index-B8xrELXY.d.ts} +2 -2
  43. package/dist/{index-BE1uFXrV.d.cts → index-DSbDm0Io.d.cts} +2 -2
  44. package/dist/{index-CyGnhCSS.d.ts → index-Dg0-TvBQ.d.cts} +51 -3
  45. package/dist/{index-CyGnhCSS.d.cts → index-Dg0-TvBQ.d.ts} +51 -3
  46. package/dist/index.cjs +306 -298
  47. package/dist/index.d.cts +54 -10
  48. package/dist/index.d.ts +54 -10
  49. package/dist/index.js +4 -4
  50. package/dist/repositories/realm/index.cjs +19 -19
  51. package/dist/repositories/realm/index.d.cts +2 -2
  52. package/dist/repositories/realm/index.d.ts +2 -2
  53. package/dist/repositories/realm/index.js +5 -5
  54. package/dist/repositories/sqlite/index.cjs +18 -18
  55. package/dist/repositories/sqlite/index.d.cts +2 -2
  56. package/dist/repositories/sqlite/index.d.ts +2 -2
  57. package/dist/repositories/sqlite/index.js +5 -5
  58. package/dist/{taskRunner-CjmMH_rW.d.cts → taskRunner-BH_FxaNI.d.cts} +2 -2
  59. package/dist/{taskRunner-l3zyfW_Q.d.ts → taskRunner-DrVz2QZs.d.ts} +2 -2
  60. package/dist/wallet/expo/background.cjs +14 -14
  61. package/dist/wallet/expo/background.d.cts +3 -3
  62. package/dist/wallet/expo/background.d.ts +3 -3
  63. package/dist/wallet/expo/background.js +6 -6
  64. package/dist/wallet/expo/index.cjs +14 -14
  65. package/dist/wallet/expo/index.d.cts +4 -4
  66. package/dist/wallet/expo/index.d.ts +4 -4
  67. package/dist/wallet/expo/index.js +5 -5
  68. package/dist/worker/expo/index.cjs +9 -9
  69. package/dist/worker/expo/index.d.cts +4 -4
  70. package/dist/worker/expo/index.d.ts +4 -4
  71. package/dist/worker/expo/index.js +5 -5
  72. package/package.json +1 -1
  73. package/dist/chunk-2ZX4Z2IP.js.map +0 -1
  74. package/dist/chunk-5J5PDZRR.cjs.map +0 -1
  75. package/dist/chunk-E5JNYFOF.js.map +0 -1
  76. package/dist/chunk-FM263GKH.cjs.map +0 -1
  77. package/dist/chunk-I7ZNWBBU.cjs.map +0 -1
  78. package/dist/chunk-MK5EPTTB.cjs.map +0 -1
  79. package/dist/chunk-SCSLCU66.js.map +0 -1
  80. package/dist/chunk-ZT3EM4CE.js.map +0 -1
@@ -1,38 +1,38 @@
1
1
  'use strict';
2
2
 
3
- var chunkP6EXRY5L_cjs = require('../../chunk-P6EXRY5L.cjs');
4
- require('../../chunk-5J5PDZRR.cjs');
3
+ var chunkNPM5YZBC_cjs = require('../../chunk-NPM5YZBC.cjs');
4
+ require('../../chunk-6FTHFJAN.cjs');
5
5
  require('../../chunk-5BLDMQED.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "ArkadeContractHandler", {
10
10
  enumerable: true,
11
- get: function () { return chunkP6EXRY5L_cjs.ArkadeContractHandler; }
11
+ get: function () { return chunkNPM5YZBC_cjs.ArkadeContractHandler; }
12
12
  });
13
13
  Object.defineProperty(exports, "BoardingContractHandler", {
14
14
  enumerable: true,
15
- get: function () { return chunkP6EXRY5L_cjs.BoardingContractHandler; }
15
+ get: function () { return chunkNPM5YZBC_cjs.BoardingContractHandler; }
16
16
  });
17
17
  Object.defineProperty(exports, "DefaultContractHandler", {
18
18
  enumerable: true,
19
- get: function () { return chunkP6EXRY5L_cjs.DefaultContractHandler; }
19
+ get: function () { return chunkNPM5YZBC_cjs.DefaultContractHandler; }
20
20
  });
21
21
  Object.defineProperty(exports, "DelegateContractHandler", {
22
22
  enumerable: true,
23
- get: function () { return chunkP6EXRY5L_cjs.DelegateContractHandler; }
23
+ get: function () { return chunkNPM5YZBC_cjs.DelegateContractHandler; }
24
24
  });
25
25
  Object.defineProperty(exports, "VHTLCContractHandler", {
26
26
  enumerable: true,
27
- get: function () { return chunkP6EXRY5L_cjs.VHTLCContractHandler; }
27
+ get: function () { return chunkNPM5YZBC_cjs.VHTLCContractHandler; }
28
28
  });
29
29
  Object.defineProperty(exports, "VHTLCV2ContractHandler", {
30
30
  enumerable: true,
31
- get: function () { return chunkP6EXRY5L_cjs.VHTLCV2ContractHandler; }
31
+ get: function () { return chunkNPM5YZBC_cjs.VHTLCV2ContractHandler; }
32
32
  });
33
33
  Object.defineProperty(exports, "contractHandlers", {
34
34
  enumerable: true,
35
- get: function () { return chunkP6EXRY5L_cjs.contractHandlers; }
35
+ get: function () { return chunkNPM5YZBC_cjs.contractHandlers; }
36
36
  });
37
37
  //# sourceMappingURL=index.cjs.map
38
38
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-BE1uFXrV.cjs';
2
- import '../../index-CyGnhCSS.cjs';
1
+ export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-DSbDm0Io.cjs';
2
+ import '../../index-Dg0-TvBQ.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-D-gEEqrP.cjs';
7
+ import '../../delegate-BJp8f6LT.cjs';
@@ -1,7 +1,7 @@
1
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-Boppyqav.js';
2
- import '../../index-CyGnhCSS.js';
1
+ export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from '../../index-B8xrELXY.js';
2
+ import '../../index-Dg0-TvBQ.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-CKJdsC99.js';
7
+ import '../../delegate-Ckz_TWzM.js';
@@ -1,5 +1,5 @@
1
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-ALZ2CZ3T.js';
2
- import '../../chunk-2ZX4Z2IP.js';
1
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers } from '../../chunk-CB6QPAO5.js';
2
+ import '../../chunk-5GQFYVWP.js';
3
3
  import '../../chunk-NSBPE2FW.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-CyGnhCSS.cjs';
2
+ import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-Dg0-TvBQ.cjs';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,5 +1,5 @@
1
1
  import { Bytes } from '@scure/btc-signer/utils.js';
2
- import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-CyGnhCSS.js';
2
+ import { s as RelativeTimelock, V as VtxoScript, t as TapLeafScript } from './index-Dg0-TvBQ.js';
3
3
 
4
4
  /**
5
5
  * DefaultVtxo is the default implementation of a VtxoScript.
@@ -1,8 +1,8 @@
1
- import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-CyGnhCSS.cjs';
1
+ import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-Dg0-TvBQ.cjs';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
  import { Bytes } from '@scure/btc-signer/utils.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-D-gEEqrP.cjs';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BJp8f6LT.cjs';
6
6
 
7
7
  /** Wall-clock floor for `batchExpiry` outside regtest. */
8
8
  declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
@@ -1,8 +1,8 @@
1
- import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-CyGnhCSS.js';
1
+ import { s as RelativeTimelock, M as Network, P as CSVMultisigTapscript, Q as BatchStartedEvent, U as TreeSigningStartedEvent, X as TxTree, Y as TreeNoncesEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, $ as BatchFailedEvent, a0 as TreeTxEvent, a1 as TreeSignatureEvent, k as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a2 as DescriptorProvider, f as IContractManager, a3 as IReadonlyWallet, a4 as ReadonlyIdentity, a5 as OnchainProvider, r as IndexerProvider, a6 as DelegateProvider, a7 as ReadonlyWalletConfig, B as IntentRepository, H as VirtualTxRepository, a8 as ExitCaptureMode, a9 as ExitDataSource, d as ActivityRegistry, aa as IReadonlyAssetManager, ab as ContractSyncState, ac as RecipientAddressContext, q as ArkProvider, ad as NetworkName, ae as ArkInfo, af as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, ag as ContractWithVtxos, ah as selectPendingRecoveryOutpoints, A as ArkTransaction, e as Activity, E as ExtendedCoin, ai as Coin, w as ExtendedVirtualCoin, aj as ContractManager, ak as ContractManagerConfig, I as IWallet, a as Identity, g as GetNewAddressesOptions, h as NewAddress, al as SettlementConfig, m as IAssetManager, am as VtxoManager, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, R as Recipient, an as SignerSession, ao as SignedIntent, ap as Intent, l as SendParams, aq as TimeHeight } from './index-Dg0-TvBQ.js';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
4
4
  import { Bytes } from '@scure/btc-signer/utils.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CKJdsC99.js';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Ckz_TWzM.js';
6
6
 
7
7
  /** Wall-clock floor for `batchExpiry` outside regtest. */
8
8
  declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
@@ -1,5 +1,5 @@
1
- import { bh as ContractHandler, s as RelativeTimelock, bu as Discoverable, V as VtxoScript, t as TapLeafScript, d8 as TapscriptDeriving } from './index-CyGnhCSS.js';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CKJdsC99.js';
1
+ import { bh as ContractHandler, s as RelativeTimelock, bu as Discoverable, V as VtxoScript, t as TapLeafScript, d8 as TapscriptDeriving } from './index-Dg0-TvBQ.js';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Ckz_TWzM.js';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { bh as ContractHandler, s as RelativeTimelock, bu as Discoverable, V as VtxoScript, t as TapLeafScript, d8 as TapscriptDeriving } from './index-CyGnhCSS.cjs';
2
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-D-gEEqrP.cjs';
1
+ import { bh as ContractHandler, s as RelativeTimelock, bu as Discoverable, V as VtxoScript, t as TapLeafScript, d8 as TapscriptDeriving } from './index-Dg0-TvBQ.cjs';
2
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BJp8f6LT.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
 
5
5
  /**
@@ -566,6 +566,8 @@ declare class RestIndexerProvider implements IndexerProvider {
566
566
  serverUrl: string;
567
567
  /** Overrides {@link configureEventSource} for this provider's subscription. */
568
568
  protected readonly eventSource?: EventSourceFactory;
569
+ /** @see fetchVtxosJson */
570
+ private readonly inFlightVtxoReads;
569
571
  constructor(serverUrl?: string, options?: EventSourceCapable);
570
572
  getVtxoTree(batchOutpoint: Outpoint, opts?: PaginationOptions): Promise<{
571
573
  vtxoTree: Tx[];
@@ -603,6 +605,17 @@ declare class RestIndexerProvider implements IndexerProvider {
603
605
  * politeness through the rate gate, so don't add a redundant sleep.
604
606
  */
605
607
  private fetchVtxosPage;
608
+ /**
609
+ * The wire read behind {@link fetchVtxosPage}, with an identical read
610
+ * already in flight served from that one request instead of repeated.
611
+ *
612
+ * Two callers can want the same page at the same instant without either
613
+ * being redundant, so there is no single call site to remove: a send that
614
+ * leaves change makes the indexer emit `vtxo_spent` and `vtxo_received` for
615
+ * the wallet's own contract milliseconds apart, and `handleContractEvent`
616
+ * delta-syncs that contract on both arms.
617
+ */
618
+ private fetchVtxosJson;
606
619
  getAssetDetails(assetId: string): Promise<AssetDetails>;
607
620
  subscribeForScripts(scripts: string[], subscriptionId?: string): Promise<string>;
608
621
  unsubscribeForScripts(subscriptionId: string, scripts?: string[]): Promise<void>;
@@ -3611,6 +3624,12 @@ interface IContractManager extends Disposable {
3611
3624
  * The contract script is used as the unique identifier.
3612
3625
  */
3613
3626
  createContract(params: CreateContractParams): Promise<Contract>;
3627
+ /**
3628
+ * {@link createContract} for a set, one indexer round trip instead of N.
3629
+ * Optional so adding it breaks no implementer of this public interface
3630
+ * (`serviceWorker/wallet.ts` proxies each method over wire): fall back.
3631
+ */
3632
+ createContracts?(paramsList: CreateContractParams[]): Promise<Contract[]>;
3614
3633
  /**
3615
3634
  * List contracts with optional filters.
3616
3635
  *
@@ -3941,6 +3960,14 @@ interface ContractManagerConfig {
3941
3960
  height: number;
3942
3961
  time: number;
3943
3962
  } | undefined>;
3963
+ /**
3964
+ * How stale {@link ContractManager.getContractsWithVtxos} may let its
3965
+ * opportunistic sync be before repeating it. `0` (default) repeats it every
3966
+ * call. A send syncs, selects, then submits, so its coins are already one
3967
+ * submit latency stale; this widens that bound by this value, and is
3968
+ * therefore a budget rather than a free saving.
3969
+ */
3970
+ vtxoSyncMaxAgeMs?: number;
3944
3971
  }
3945
3972
  /**
3946
3973
  * Wallet-injected surface backing the HD look-ahead window. Kept as a
@@ -4034,6 +4061,7 @@ declare class ContractManager implements IContractManager {
4034
4061
  private syncDegradedReason?;
4035
4062
  /** Epoch-ms of the last successful provider sync, if any. */
4036
4063
  private lastSyncedAt?;
4064
+ private syncedAtByScript;
4037
4065
  /** Last chain tip read, with the epoch-ms it was read at. @see currentChainTip */
4038
4066
  private chainTipCache?;
4039
4067
  /** In-flight chain tip read, so concurrent cache misses share one. */
@@ -4070,6 +4098,8 @@ declare class ContractManager implements IContractManager {
4070
4098
  * sync. Purely a freshness signal — not a source of truth for wallet data.
4071
4099
  */
4072
4100
  getSyncState(): ContractSyncState;
4101
+ /** @see ContractManagerConfig.vtxoSyncMaxAgeMs — for factory-built managers. */
4102
+ setVtxoSyncMaxAge(maxAgeMs: number): void;
4073
4103
  private markSyncOnline;
4074
4104
  /** Contracts a sync could not annotate, as `script → reason`. */
4075
4105
  private annotationFailures;
@@ -4179,6 +4209,13 @@ declare class ContractManager implements IContractManager {
4179
4209
  * @returns The created contract
4180
4210
  */
4181
4211
  createContract(params: CreateContractParams): Promise<Contract>;
4212
+ /**
4213
+ * `createContract`'s step order, fetch batched: persist all, hydrate once,
4214
+ * then watch. Hydrating first keeps it equivalent — the watcher seeds from
4215
+ * the repository, so an unhydrated row reads as all-new. A part-way failure
4216
+ * still watches what it wrote; a retry reports those rows as existing.
4217
+ */
4218
+ createContracts(paramsList: CreateContractParams[]): Promise<Contract[]>;
4182
4219
  /**
4183
4220
  * Lightweight variant of {@link createContract} for batch discovery
4184
4221
  * paths (currently: {@link scanContracts}). Validates, dedupes, persists,
@@ -4406,6 +4443,7 @@ declare class ContractManager implements IContractManager {
4406
4443
  * other contracts still need to pick up.
4407
4444
  */
4408
4445
  private syncContracts;
4446
+ private syncedWithin;
4409
4447
  /**
4410
4448
  * Demote every `awaiting-funds` contract in `contracts` that has been
4411
4449
  * funded — the automatic half of {@link ContractWatchState}.
@@ -6047,13 +6085,23 @@ interface TxKey {
6047
6085
  /** Arkade transaction id, when applicable. */
6048
6086
  arkTxid: string;
6049
6087
  }
6050
- /** The categories the history builder itself assigns. */
6051
- type BuiltinTxTag = "offchain" | "boarding" | "exit" | "batch";
6088
+ /**
6089
+ * The categories the history builder itself assigns.
6090
+ *
6091
+ * Four of them name the mechanism that moved the coin. `"gated"` names the
6092
+ * counterparty instead: an offchain row facing a contract row of this wallet's
6093
+ * that generic spending is closed on — a swap covenant, a lockup — which is the
6094
+ * same money {@link WalletBalance.gated} reports. History reads such a contract
6095
+ * as an external party, so the movement is a real send or receive rather than
6096
+ * change, and the tag is what lets a consumer tell "into my own escrow" from
6097
+ * "to a stranger" instead of the movement arriving unattributed.
6098
+ */
6099
+ type BuiltinTxTag = "offchain" | "boarding" | "exit" | "batch" | "gated";
6052
6100
  /**
6053
6101
  * The category the history builder assigns to a transaction. The `(string & {})`
6054
6102
  * arm keeps the union open — apps and resolvers can introduce their own
6055
6103
  * categories without a breaking change — while preserving editor autocomplete
6056
- * for the built-in four.
6104
+ * for the built-in ones.
6057
6105
  */
6058
6106
  type TxTag = BuiltinTxTag | (string & {});
6059
6107
  /**
@@ -566,6 +566,8 @@ declare class RestIndexerProvider implements IndexerProvider {
566
566
  serverUrl: string;
567
567
  /** Overrides {@link configureEventSource} for this provider's subscription. */
568
568
  protected readonly eventSource?: EventSourceFactory;
569
+ /** @see fetchVtxosJson */
570
+ private readonly inFlightVtxoReads;
569
571
  constructor(serverUrl?: string, options?: EventSourceCapable);
570
572
  getVtxoTree(batchOutpoint: Outpoint, opts?: PaginationOptions): Promise<{
571
573
  vtxoTree: Tx[];
@@ -603,6 +605,17 @@ declare class RestIndexerProvider implements IndexerProvider {
603
605
  * politeness through the rate gate, so don't add a redundant sleep.
604
606
  */
605
607
  private fetchVtxosPage;
608
+ /**
609
+ * The wire read behind {@link fetchVtxosPage}, with an identical read
610
+ * already in flight served from that one request instead of repeated.
611
+ *
612
+ * Two callers can want the same page at the same instant without either
613
+ * being redundant, so there is no single call site to remove: a send that
614
+ * leaves change makes the indexer emit `vtxo_spent` and `vtxo_received` for
615
+ * the wallet's own contract milliseconds apart, and `handleContractEvent`
616
+ * delta-syncs that contract on both arms.
617
+ */
618
+ private fetchVtxosJson;
606
619
  getAssetDetails(assetId: string): Promise<AssetDetails>;
607
620
  subscribeForScripts(scripts: string[], subscriptionId?: string): Promise<string>;
608
621
  unsubscribeForScripts(subscriptionId: string, scripts?: string[]): Promise<void>;
@@ -3611,6 +3624,12 @@ interface IContractManager extends Disposable {
3611
3624
  * The contract script is used as the unique identifier.
3612
3625
  */
3613
3626
  createContract(params: CreateContractParams): Promise<Contract>;
3627
+ /**
3628
+ * {@link createContract} for a set, one indexer round trip instead of N.
3629
+ * Optional so adding it breaks no implementer of this public interface
3630
+ * (`serviceWorker/wallet.ts` proxies each method over wire): fall back.
3631
+ */
3632
+ createContracts?(paramsList: CreateContractParams[]): Promise<Contract[]>;
3614
3633
  /**
3615
3634
  * List contracts with optional filters.
3616
3635
  *
@@ -3941,6 +3960,14 @@ interface ContractManagerConfig {
3941
3960
  height: number;
3942
3961
  time: number;
3943
3962
  } | undefined>;
3963
+ /**
3964
+ * How stale {@link ContractManager.getContractsWithVtxos} may let its
3965
+ * opportunistic sync be before repeating it. `0` (default) repeats it every
3966
+ * call. A send syncs, selects, then submits, so its coins are already one
3967
+ * submit latency stale; this widens that bound by this value, and is
3968
+ * therefore a budget rather than a free saving.
3969
+ */
3970
+ vtxoSyncMaxAgeMs?: number;
3944
3971
  }
3945
3972
  /**
3946
3973
  * Wallet-injected surface backing the HD look-ahead window. Kept as a
@@ -4034,6 +4061,7 @@ declare class ContractManager implements IContractManager {
4034
4061
  private syncDegradedReason?;
4035
4062
  /** Epoch-ms of the last successful provider sync, if any. */
4036
4063
  private lastSyncedAt?;
4064
+ private syncedAtByScript;
4037
4065
  /** Last chain tip read, with the epoch-ms it was read at. @see currentChainTip */
4038
4066
  private chainTipCache?;
4039
4067
  /** In-flight chain tip read, so concurrent cache misses share one. */
@@ -4070,6 +4098,8 @@ declare class ContractManager implements IContractManager {
4070
4098
  * sync. Purely a freshness signal — not a source of truth for wallet data.
4071
4099
  */
4072
4100
  getSyncState(): ContractSyncState;
4101
+ /** @see ContractManagerConfig.vtxoSyncMaxAgeMs — for factory-built managers. */
4102
+ setVtxoSyncMaxAge(maxAgeMs: number): void;
4073
4103
  private markSyncOnline;
4074
4104
  /** Contracts a sync could not annotate, as `script → reason`. */
4075
4105
  private annotationFailures;
@@ -4179,6 +4209,13 @@ declare class ContractManager implements IContractManager {
4179
4209
  * @returns The created contract
4180
4210
  */
4181
4211
  createContract(params: CreateContractParams): Promise<Contract>;
4212
+ /**
4213
+ * `createContract`'s step order, fetch batched: persist all, hydrate once,
4214
+ * then watch. Hydrating first keeps it equivalent — the watcher seeds from
4215
+ * the repository, so an unhydrated row reads as all-new. A part-way failure
4216
+ * still watches what it wrote; a retry reports those rows as existing.
4217
+ */
4218
+ createContracts(paramsList: CreateContractParams[]): Promise<Contract[]>;
4182
4219
  /**
4183
4220
  * Lightweight variant of {@link createContract} for batch discovery
4184
4221
  * paths (currently: {@link scanContracts}). Validates, dedupes, persists,
@@ -4406,6 +4443,7 @@ declare class ContractManager implements IContractManager {
4406
4443
  * other contracts still need to pick up.
4407
4444
  */
4408
4445
  private syncContracts;
4446
+ private syncedWithin;
4409
4447
  /**
4410
4448
  * Demote every `awaiting-funds` contract in `contracts` that has been
4411
4449
  * funded — the automatic half of {@link ContractWatchState}.
@@ -6047,13 +6085,23 @@ interface TxKey {
6047
6085
  /** Arkade transaction id, when applicable. */
6048
6086
  arkTxid: string;
6049
6087
  }
6050
- /** The categories the history builder itself assigns. */
6051
- type BuiltinTxTag = "offchain" | "boarding" | "exit" | "batch";
6088
+ /**
6089
+ * The categories the history builder itself assigns.
6090
+ *
6091
+ * Four of them name the mechanism that moved the coin. `"gated"` names the
6092
+ * counterparty instead: an offchain row facing a contract row of this wallet's
6093
+ * that generic spending is closed on — a swap covenant, a lockup — which is the
6094
+ * same money {@link WalletBalance.gated} reports. History reads such a contract
6095
+ * as an external party, so the movement is a real send or receive rather than
6096
+ * change, and the tag is what lets a consumer tell "into my own escrow" from
6097
+ * "to a stranger" instead of the movement arriving unattributed.
6098
+ */
6099
+ type BuiltinTxTag = "offchain" | "boarding" | "exit" | "batch" | "gated";
6052
6100
  /**
6053
6101
  * The category the history builder assigns to a transaction. The `(string & {})`
6054
6102
  * arm keeps the union open — apps and resolvers can introduce their own
6055
6103
  * categories without a breaking change — while preserving editor autocomplete
6056
- * for the built-in four.
6104
+ * for the built-in ones.
6057
6105
  */
6058
6106
  type TxTag = BuiltinTxTag | (string & {});
6059
6107
  /**