@arkade-os/sdk 0.4.49 → 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-nkSiPYNf.d.cts → ark-9V45Anrs.d.cts} +164 -53
  9. package/dist/{ark-nkSiPYNf.d.ts → ark-9V45Anrs.d.ts} +164 -53
  10. package/dist/{asyncStorageTaskQueue-DdxhsEz6.d.cts → asyncStorageTaskQueue-B6nXJv7m.d.cts} +1 -1
  11. package/dist/{asyncStorageTaskQueue-DCaEE83p.d.ts → asyncStorageTaskQueue-BZjR843B.d.ts} +1 -1
  12. package/dist/{chunk-CPO2UB7L.js → chunk-3AOTJZQ4.js} +3 -3
  13. package/dist/{chunk-CPO2UB7L.js.map → chunk-3AOTJZQ4.js.map} +1 -1
  14. package/dist/{chunk-6UI5BFE7.cjs → chunk-3E4GDBYU.cjs} +7 -7
  15. package/dist/{chunk-6UI5BFE7.cjs.map → chunk-3E4GDBYU.cjs.map} +1 -1
  16. package/dist/{chunk-BLJQV3N4.js → chunk-4KGT3IP2.js} +3 -3
  17. package/dist/{chunk-BLJQV3N4.js.map → chunk-4KGT3IP2.js.map} +1 -1
  18. package/dist/{chunk-XOLH3LFO.cjs → chunk-5AT2NV5G.cjs} +11 -11
  19. package/dist/{chunk-XOLH3LFO.cjs.map → chunk-5AT2NV5G.cjs.map} +1 -1
  20. package/dist/{chunk-HN25T276.js → chunk-6T5BBPKO.js} +3 -3
  21. package/dist/{chunk-HN25T276.js.map → chunk-6T5BBPKO.js.map} +1 -1
  22. package/dist/{chunk-2LAJ3RTH.cjs → chunk-6XF6ZATZ.cjs} +458 -203
  23. package/dist/chunk-6XF6ZATZ.cjs.map +1 -0
  24. package/dist/{chunk-QDXQULVM.cjs → chunk-FHDUEBBC.cjs} +3 -3
  25. package/dist/{chunk-QDXQULVM.cjs.map → chunk-FHDUEBBC.cjs.map} +1 -1
  26. package/dist/{chunk-5QVBJUOG.js → chunk-TS2MTRP4.js} +354 -99
  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-D6Orvyq7.d.ts → delegate-CJkolr2s.d.ts} +1 -1
  31. package/dist/{delegate-Cqqw1T1J.d.cts → delegate-tVTPM4fm.d.cts} +1 -1
  32. package/dist/{index-CWoogah0.d.ts → index-B5Fdwzs_.d.ts} +2 -2
  33. package/dist/{index-Yd4hecbM.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-BjB5QINR.d.cts → taskRunner-4CrJaWHv.d.cts} +1 -1
  47. package/dist/{taskRunner-Dw7xs60Q.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-DyUHrPyN.d.ts → wallet-BBfhZx_Z.d.cts} +22 -3
  57. package/dist/{wallet-CGkWu3xV.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-2LAJ3RTH.cjs.map +0 -1
  64. package/dist/chunk-5QVBJUOG.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk6UI5BFE7_cjs = require('../../chunk-6UI5BFE7.cjs');
4
- var chunk2LAJ3RTH_cjs = require('../../chunk-2LAJ3RTH.cjs');
5
- var chunkQDXQULVM_cjs = require('../../chunk-QDXQULVM.cjs');
3
+ var chunk3E4GDBYU_cjs = require('../../chunk-3E4GDBYU.cjs');
4
+ var chunk6XF6ZATZ_cjs = require('../../chunk-6XF6ZATZ.cjs');
5
+ var chunkFHDUEBBC_cjs = require('../../chunk-FHDUEBBC.cjs');
6
6
  require('../../chunk-LJQ2VQBE.cjs');
7
7
  require('../../chunk-E7HB3GKK.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
@@ -58,18 +58,18 @@ var ExpoWallet = class _ExpoWallet {
58
58
  */
59
59
  static async setup(config) {
60
60
  warnOnRemovedBackgroundFields(config.background);
61
- const wallet = await chunk2LAJ3RTH_cjs.Wallet.create(config);
62
- const processors = config.background.processors ?? [chunk6UI5BFE7_cjs.contractPollProcessor];
61
+ const wallet = await chunk6XF6ZATZ_cjs.Wallet.create(config);
62
+ const processors = config.background.processors ?? [chunk3E4GDBYU_cjs.contractPollProcessor];
63
63
  const deps = {
64
64
  walletRepository: wallet.walletRepository,
65
65
  contractRepository: wallet.contractRepository,
66
66
  indexerProvider: wallet.indexerProvider,
67
67
  arkProvider: wallet.arkProvider,
68
- extendVtxo: (vtxo, contract) => chunk2LAJ3RTH_cjs.extendVirtualCoinForContract(vtxo, contract)
68
+ extendVtxo: (vtxo, contract) => chunk6XF6ZATZ_cjs.extendVirtualCoinForContract(vtxo, contract)
69
69
  };
70
70
  const { taskQueue } = config.background;
71
71
  if ("persistConfig" in taskQueue) {
72
- const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkQDXQULVM_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
72
+ const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkFHDUEBBC_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
73
73
  if (arkServerUrl) {
74
74
  const timelock = wallet.offchainTapscript.options.csvTimelock;
75
75
  const bgConfig = {
@@ -100,7 +100,7 @@ var ExpoWallet = class _ExpoWallet {
100
100
  }
101
101
  async runForegroundPoll() {
102
102
  if (this.cleared) return;
103
- await chunk6UI5BFE7_cjs.runTasks(this.taskQueue, this.processors, this.deps);
103
+ await chunk3E4GDBYU_cjs.runTasks(this.taskQueue, this.processors, this.deps);
104
104
  const results = await this.taskQueue.getResults();
105
105
  if (results.length > 0) {
106
106
  await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
@@ -109,18 +109,18 @@ var ExpoWallet = class _ExpoWallet {
109
109
  await this.seedContractPollTask();
110
110
  }
111
111
  async seedContractPollTask() {
112
- const existing = await this.taskQueue.getTasks(chunk6UI5BFE7_cjs.CONTRACT_POLL_TASK_TYPE);
112
+ const existing = await this.taskQueue.getTasks(chunk3E4GDBYU_cjs.CONTRACT_POLL_TASK_TYPE);
113
113
  if (existing.length > 0) return;
114
114
  const task = {
115
- id: chunk2LAJ3RTH_cjs.getRandomId(),
116
- type: chunk6UI5BFE7_cjs.CONTRACT_POLL_TASK_TYPE,
115
+ id: chunk6XF6ZATZ_cjs.getRandomId(),
116
+ type: chunk3E4GDBYU_cjs.CONTRACT_POLL_TASK_TYPE,
117
117
  data: {},
118
118
  createdAt: Date.now()
119
119
  };
120
120
  await this.taskQueue.addTask(task);
121
121
  }
122
122
  async removeContractPollTasks() {
123
- const tasks = await this.taskQueue.getTasks(chunk6UI5BFE7_cjs.CONTRACT_POLL_TASK_TYPE);
123
+ const tasks = await this.taskQueue.getTasks(chunk3E4GDBYU_cjs.CONTRACT_POLL_TASK_TYPE);
124
124
  for (const task of tasks) {
125
125
  await this.taskQueue.removeTask(task.id);
126
126
  }
@@ -1,10 +1,10 @@
1
- import { W as Wallet, P as ProviderConnectionState } from '../../wallet-CGkWu3xV.cjs';
2
- import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-nkSiPYNf.cjs';
3
- import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-BjB5QINR.cjs';
1
+ import { W as Wallet, P as ProviderConnectionState } from '../../wallet-BBfhZx_Z.cjs';
2
+ import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-9V45Anrs.cjs';
3
+ import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-4CrJaWHv.cjs';
4
4
  import '@scure/btc-signer';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-Cqqw1T1J.cjs';
7
+ import '../../delegate-tVTPM4fm.cjs';
8
8
  import '@scure/btc-signer/transaction.js';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
- import { W as Wallet, P as ProviderConnectionState } from '../../wallet-DyUHrPyN.js';
2
- import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-nkSiPYNf.js';
3
- import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-Dw7xs60Q.js';
1
+ import { W as Wallet, P as ProviderConnectionState } from '../../wallet-CSSTN8Yc.js';
2
+ import { I as IWallet, a as Identity, b as WalletConfig, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, E as ExtendedCoin, A as ArkTransaction, d as ActivityRegistry, e as Activity, f as IContractManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, i as SettlementEvent, R as Recipient, j as IAssetManager } from '../../ark-9V45Anrs.js';
3
+ import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-TgdjRf_b.js';
4
4
  import '@scure/btc-signer';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/psbt.js';
7
- import '../../delegate-D6Orvyq7.js';
7
+ import '../../delegate-CJkolr2s.js';
8
8
  import '@scure/btc-signer/transaction.js';
9
9
 
10
10
  /**
@@ -1,6 +1,6 @@
1
- import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-BLJQV3N4.js';
2
- import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-5QVBJUOG.js';
3
- import { RestArkProvider } from '../../chunk-CPO2UB7L.js';
1
+ import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-4KGT3IP2.js';
2
+ import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-TS2MTRP4.js';
3
+ import { RestArkProvider } from '../../chunk-3AOTJZQ4.js';
4
4
  import '../../chunk-MBSYQ3WX.js';
5
5
  import '../../chunk-EFNLTS6Q.js';
6
6
  import '../../chunk-NSBPE2FW.js';
@@ -1,8 +1,8 @@
1
1
  import { Transaction } from '@scure/btc-signer';
2
2
  import { Bytes } from '@scure/btc-signer/utils.js';
3
- import { B as BatchStartedEvent, u as TreeSigningStartedEvent, v as TxTree, w as TreeNoncesEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, z as BatchFailedEvent, D as TreeTxEvent, F as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, f as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, L as Network, O as OnchainProvider, o as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, Q as IntentRepository, U as VirtualTxRepository, X as ExitCaptureMode, Y as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, Z as IReadonlyAssetManager, _ as ContractSyncState, n as ArkProvider, $ as NetworkName, a0 as ArkInfo, a1 as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, a2 as Coin, t as ExtendedVirtualCoin, a3 as ContractManager, I as IWallet, a as Identity, a4 as CSVMultisigTapscript, a5 as SettlementConfig, j as IAssetManager, a6 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a7 as SignerSession, a8 as SignedIntent, a9 as Intent, aa as TimeHeight } from './ark-nkSiPYNf.js';
3
+ import { J as BatchStartedEvent, K as TreeSigningStartedEvent, L as TxTree, M as TreeNoncesEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, U as BatchFailedEvent, X as TreeTxEvent, Y as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, Z as DescriptorProvider, f as IContractManager, _ as IReadonlyWallet, $ as ReadonlyIdentity, a0 as Network, a1 as OnchainProvider, o as IndexerProvider, a2 as DelegateProvider, a3 as ReadonlyWalletConfig, x as IntentRepository, B as VirtualTxRepository, a4 as ExitCaptureMode, a5 as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, a6 as IReadonlyAssetManager, a7 as ContractSyncState, n as ArkProvider, a8 as NetworkName, a9 as ArkInfo, aa as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, ab as Coin, t as ExtendedVirtualCoin, ac as ContractManager, ad as ContractManagerConfig, I as IWallet, a as Identity, ae as CSVMultisigTapscript, af as SettlementConfig, j as IAssetManager, ag as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, ah as SignerSession, ai as SignedIntent, aj as Intent, ak as TimeHeight } from './ark-9V45Anrs.cjs';
4
4
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-D6Orvyq7.js';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-tVTPM4fm.cjs';
6
6
 
7
7
  declare class ArkError extends Error {
8
8
  readonly code: number;
@@ -944,6 +944,12 @@ declare class ReadonlyWallet implements IReadonlyWallet {
944
944
  * ```
945
945
  */
946
946
  getContractManager(): Promise<ContractManager>;
947
+ /**
948
+ * HD look-ahead configuration for the contract manager. Readonly wallets
949
+ * have no descriptor provider, hence no watermark to look ahead of.
950
+ * @see Wallet.lookAheadConfig
951
+ */
952
+ protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
947
953
  private initializeContractManager;
948
954
  /** Dispose wallet-owned managers and release background resources. */
949
955
  dispose(): Promise<void>;
@@ -1034,6 +1040,19 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1034
1040
  * paths only ever take the identity-sign branch.
1035
1041
  */
1036
1042
  private readonly _descriptorProvider?;
1043
+ /** Per-side width of the HD look-ahead band. @see WalletConfig.lookAheadWindow */
1044
+ private readonly _lookAheadWindow;
1045
+ /**
1046
+ * Watch a band of missing offchain receive scripts around the HD watermark
1047
+ * so payments to an externally-issued address land without a `restore()`.
1048
+ * Only HD wallets have a watermark to look ahead of; static / `auto`
1049
+ * wallets keep a single index-0 receive address, so the feature stays off.
1050
+ *
1051
+ * `materialize` reads `this.offchainTapscript` at call time, so a refill
1052
+ * after {@link rotateServerSigner} rebuilds the band under the active
1053
+ * signer (persisted old-signer rows stay watched through the repository).
1054
+ */
1055
+ protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
1037
1056
  private readonly _signerRouter;
1038
1057
  /**
1039
1058
  * @internal Sole write path for `offchainTapscript` after construction.
@@ -1189,7 +1208,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1189
1208
  readonly settlementConfig: SettlementConfig | false;
1190
1209
  protected constructor(identity: Identity, network: Network, onchainProvider: OnchainProvider, arkProvider: ArkProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
1191
1210
  /** @deprecated Use settlementConfig */
1192
- renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider);
1211
+ renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider, lookAheadWindow?: number);
1193
1212
  get assetManager(): IAssetManager;
1194
1213
  getVtxoManager(): Promise<VtxoManager>;
1195
1214
  dispose(): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  import { Transaction } from '@scure/btc-signer';
2
2
  import { Bytes } from '@scure/btc-signer/utils.js';
3
- import { B as BatchStartedEvent, u as TreeSigningStartedEvent, v as TxTree, w as TreeNoncesEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, z as BatchFailedEvent, D as TreeTxEvent, F as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, f as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, L as Network, O as OnchainProvider, o as IndexerProvider, M as DelegateProvider, P as ReadonlyWalletConfig, Q as IntentRepository, U as VirtualTxRepository, X as ExitCaptureMode, Y as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, Z as IReadonlyAssetManager, _ as ContractSyncState, n as ArkProvider, $ as NetworkName, a0 as ArkInfo, a1 as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, a2 as Coin, t as ExtendedVirtualCoin, a3 as ContractManager, I as IWallet, a as Identity, a4 as CSVMultisigTapscript, a5 as SettlementConfig, j as IAssetManager, a6 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a7 as SignerSession, a8 as SignedIntent, a9 as Intent, aa as TimeHeight } from './ark-nkSiPYNf.cjs';
3
+ import { J as BatchStartedEvent, K as TreeSigningStartedEvent, L as TxTree, M as TreeNoncesEvent, P as BatchFinalizationEvent, Q as BatchFinalizedEvent, U as BatchFailedEvent, X as TreeTxEvent, Y as TreeSignatureEvent, i as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, Z as DescriptorProvider, f as IContractManager, _ as IReadonlyWallet, $ as ReadonlyIdentity, a0 as Network, a1 as OnchainProvider, o as IndexerProvider, a2 as DelegateProvider, a3 as ReadonlyWalletConfig, x as IntentRepository, B as VirtualTxRepository, a4 as ExitCaptureMode, a5 as ExitDataSource, p as RelativeTimelock, d as ActivityRegistry, a6 as IReadonlyAssetManager, a7 as ContractSyncState, n as ArkProvider, a8 as NetworkName, a9 as ArkInfo, aa as ArkAddress, c as WalletBalance, G as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, A as ArkTransaction, e as Activity, E as ExtendedCoin, ab as Coin, t as ExtendedVirtualCoin, ac as ContractManager, ad as ContractManagerConfig, I as IWallet, a as Identity, ae as CSVMultisigTapscript, af as SettlementConfig, j as IAssetManager, ag as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, ah as SignerSession, ai as SignedIntent, aj as Intent, ak as TimeHeight } from './ark-9V45Anrs.js';
4
4
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Cqqw1T1J.cjs';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CJkolr2s.js';
6
6
 
7
7
  declare class ArkError extends Error {
8
8
  readonly code: number;
@@ -944,6 +944,12 @@ declare class ReadonlyWallet implements IReadonlyWallet {
944
944
  * ```
945
945
  */
946
946
  getContractManager(): Promise<ContractManager>;
947
+ /**
948
+ * HD look-ahead configuration for the contract manager. Readonly wallets
949
+ * have no descriptor provider, hence no watermark to look ahead of.
950
+ * @see Wallet.lookAheadConfig
951
+ */
952
+ protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
947
953
  private initializeContractManager;
948
954
  /** Dispose wallet-owned managers and release background resources. */
949
955
  dispose(): Promise<void>;
@@ -1034,6 +1040,19 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1034
1040
  * paths only ever take the identity-sign branch.
1035
1041
  */
1036
1042
  private readonly _descriptorProvider?;
1043
+ /** Per-side width of the HD look-ahead band. @see WalletConfig.lookAheadWindow */
1044
+ private readonly _lookAheadWindow;
1045
+ /**
1046
+ * Watch a band of missing offchain receive scripts around the HD watermark
1047
+ * so payments to an externally-issued address land without a `restore()`.
1048
+ * Only HD wallets have a watermark to look ahead of; static / `auto`
1049
+ * wallets keep a single index-0 receive address, so the feature stays off.
1050
+ *
1051
+ * `materialize` reads `this.offchainTapscript` at call time, so a refill
1052
+ * after {@link rotateServerSigner} rebuilds the band under the active
1053
+ * signer (persisted old-signer rows stay watched through the repository).
1054
+ */
1055
+ protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
1037
1056
  private readonly _signerRouter;
1038
1057
  /**
1039
1058
  * @internal Sole write path for `offchainTapscript` after construction.
@@ -1189,7 +1208,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1189
1208
  readonly settlementConfig: SettlementConfig | false;
1190
1209
  protected constructor(identity: Identity, network: Network, onchainProvider: OnchainProvider, arkProvider: ArkProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
1191
1210
  /** @deprecated Use settlementConfig */
1192
- renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider);
1211
+ renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider, lookAheadWindow?: number);
1193
1212
  get assetManager(): IAssetManager;
1194
1213
  getVtxoManager(): Promise<VtxoManager>;
1195
1214
  dispose(): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk6UI5BFE7_cjs = require('../../chunk-6UI5BFE7.cjs');
4
- require('../../chunk-2LAJ3RTH.cjs');
5
- require('../../chunk-QDXQULVM.cjs');
3
+ var chunk3E4GDBYU_cjs = require('../../chunk-3E4GDBYU.cjs');
4
+ require('../../chunk-6XF6ZATZ.cjs');
5
+ require('../../chunk-FHDUEBBC.cjs');
6
6
  require('../../chunk-LJQ2VQBE.cjs');
7
7
  require('../../chunk-E7HB3GKK.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
@@ -121,19 +121,19 @@ var AsyncStorageTaskQueue = class {
121
121
 
122
122
  Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
123
123
  enumerable: true,
124
- get: function () { return chunk6UI5BFE7_cjs.CONTRACT_POLL_TASK_TYPE; }
124
+ get: function () { return chunk3E4GDBYU_cjs.CONTRACT_POLL_TASK_TYPE; }
125
125
  });
126
126
  Object.defineProperty(exports, "contractPollProcessor", {
127
127
  enumerable: true,
128
- get: function () { return chunk6UI5BFE7_cjs.contractPollProcessor; }
128
+ get: function () { return chunk3E4GDBYU_cjs.contractPollProcessor; }
129
129
  });
130
130
  Object.defineProperty(exports, "createTaskDependencies", {
131
131
  enumerable: true,
132
- get: function () { return chunk6UI5BFE7_cjs.createTaskDependencies; }
132
+ get: function () { return chunk3E4GDBYU_cjs.createTaskDependencies; }
133
133
  });
134
134
  Object.defineProperty(exports, "runTasks", {
135
135
  enumerable: true,
136
- get: function () { return chunk6UI5BFE7_cjs.runTasks; }
136
+ get: function () { return chunk3E4GDBYU_cjs.runTasks; }
137
137
  });
138
138
  exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
139
139
  exports.InMemoryTaskQueue = InMemoryTaskQueue;
@@ -1,7 +1,7 @@
1
- import { T as TaskProcessor } from '../../taskRunner-BjB5QINR.cjs';
2
- export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-BjB5QINR.cjs';
3
- export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DdxhsEz6.cjs';
4
- import '../../ark-nkSiPYNf.cjs';
1
+ import { T as TaskProcessor } from '../../taskRunner-4CrJaWHv.cjs';
2
+ export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-4CrJaWHv.cjs';
3
+ export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B6nXJv7m.cjs';
4
+ import '../../ark-9V45Anrs.cjs';
5
5
  import '@scure/btc-signer/transaction.js';
6
6
  import '@scure/btc-signer/utils.js';
7
7
  import '@scure/btc-signer/psbt.js';
@@ -1,7 +1,7 @@
1
- import { T as TaskProcessor } from '../../taskRunner-Dw7xs60Q.js';
2
- export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-Dw7xs60Q.js';
3
- export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DCaEE83p.js';
4
- import '../../ark-nkSiPYNf.js';
1
+ import { T as TaskProcessor } from '../../taskRunner-TgdjRf_b.js';
2
+ export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, b as TaskDependencies, c as TaskItem, a as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-TgdjRf_b.js';
3
+ export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BZjR843B.js';
4
+ import '../../ark-9V45Anrs.js';
5
5
  import '@scure/btc-signer/transaction.js';
6
6
  import '@scure/btc-signer/utils.js';
7
7
  import '@scure/btc-signer/psbt.js';
@@ -1,6 +1,6 @@
1
- export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-BLJQV3N4.js';
2
- import '../../chunk-5QVBJUOG.js';
3
- import '../../chunk-CPO2UB7L.js';
1
+ export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-4KGT3IP2.js';
2
+ import '../../chunk-TS2MTRP4.js';
3
+ import '../../chunk-3AOTJZQ4.js';
4
4
  import '../../chunk-MBSYQ3WX.js';
5
5
  import '../../chunk-EFNLTS6Q.js';
6
6
  import '../../chunk-NSBPE2FW.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/sdk",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
4
4
  "description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",