@arkade-os/sdk 0.4.50 → 0.4.52

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 (72) hide show
  1. package/README.md +35 -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 +4 -4
  7. package/dist/adapters/indexedDB.js +3 -3
  8. package/dist/{ark-ApoclKQZ.d.cts → ark-B69ugeJw.d.cts} +133 -1
  9. package/dist/{ark-ApoclKQZ.d.ts → ark-B69ugeJw.d.ts} +133 -1
  10. package/dist/{asyncStorageTaskQueue-BCWmdVg8.d.ts → asyncStorageTaskQueue-BImF14sj.d.ts} +2 -2
  11. package/dist/{asyncStorageTaskQueue-CIjgv1co.d.cts → asyncStorageTaskQueue-DScPdQAy.d.cts} +2 -2
  12. package/dist/{chunk-Q4K2RSMY.cjs → chunk-3Z5HK35D.cjs} +7 -7
  13. package/dist/{chunk-Q4K2RSMY.cjs.map → chunk-3Z5HK35D.cjs.map} +1 -1
  14. package/dist/{chunk-7WSVP7DK.js → chunk-3ZGANANS.js} +3 -3
  15. package/dist/{chunk-7WSVP7DK.js.map → chunk-3ZGANANS.js.map} +1 -1
  16. package/dist/{chunk-SNTSB6M2.js → chunk-AXCKRS2D.js} +354 -60
  17. package/dist/chunk-AXCKRS2D.js.map +1 -0
  18. package/dist/{chunk-TO3SR7TY.cjs → chunk-E6RT5XYB.cjs} +11 -11
  19. package/dist/{chunk-TO3SR7TY.cjs.map → chunk-E6RT5XYB.cjs.map} +1 -1
  20. package/dist/{chunk-SIAVTHMZ.cjs → chunk-FZPYPEWN.cjs} +3 -3
  21. package/dist/{chunk-SIAVTHMZ.cjs.map → chunk-FZPYPEWN.cjs.map} +1 -1
  22. package/dist/{chunk-LJQ2VQBE.cjs → chunk-IEMPH7J6.cjs} +52 -44
  23. package/dist/chunk-IEMPH7J6.cjs.map +1 -0
  24. package/dist/{chunk-6BQTROB4.cjs → chunk-ML33GFCH.cjs} +538 -243
  25. package/dist/chunk-ML33GFCH.cjs.map +1 -0
  26. package/dist/{chunk-MBSYQ3WX.js → chunk-UZLQUWYP.js} +52 -45
  27. package/dist/chunk-UZLQUWYP.js.map +1 -0
  28. package/dist/{chunk-ZXRSSBCF.js → chunk-WIVQWYPZ.js} +3 -3
  29. package/dist/{chunk-ZXRSSBCF.js.map → chunk-WIVQWYPZ.js.map} +1 -1
  30. package/dist/{chunk-AA4Q2J57.js → chunk-ZK3JITHP.js} +3 -3
  31. package/dist/{chunk-AA4Q2J57.js.map → chunk-ZK3JITHP.js.map} +1 -1
  32. package/dist/contracts/handlers/index.cjs +7 -7
  33. package/dist/contracts/handlers/index.d.cts +3 -3
  34. package/dist/contracts/handlers/index.d.ts +3 -3
  35. package/dist/contracts/handlers/index.js +1 -1
  36. package/dist/{delegate-hJYMZN1D.d.ts → delegate-BU-Cpyjw.d.ts} +1 -1
  37. package/dist/{delegate-CCHPwQft.d.cts → delegate-C_Y2YrXC.d.cts} +1 -1
  38. package/dist/{index-5Y9h9OnO.d.ts → index-BWF-C9eh.d.ts} +2 -2
  39. package/dist/{index-8jE1XJpT.d.cts → index-tzAInyiX.d.cts} +2 -2
  40. package/dist/index.cjs +161 -157
  41. package/dist/index.d.cts +24 -8
  42. package/dist/index.d.ts +24 -8
  43. package/dist/index.js +3 -3
  44. package/dist/repositories/realm/index.cjs +18 -18
  45. package/dist/repositories/realm/index.d.cts +2 -2
  46. package/dist/repositories/realm/index.d.ts +2 -2
  47. package/dist/repositories/realm/index.js +4 -4
  48. package/dist/repositories/sqlite/index.cjs +17 -17
  49. package/dist/repositories/sqlite/index.d.cts +2 -2
  50. package/dist/repositories/sqlite/index.d.ts +2 -2
  51. package/dist/repositories/sqlite/index.js +4 -4
  52. package/dist/{taskRunner-ChvV6Xrh.d.ts → taskRunner-Cf80BqSy.d.ts} +2 -2
  53. package/dist/{taskRunner-C3YLaM2x.d.cts → taskRunner-ClwI8jU8.d.cts} +2 -2
  54. package/dist/wallet/expo/background.cjs +13 -13
  55. package/dist/wallet/expo/background.d.cts +3 -3
  56. package/dist/wallet/expo/background.d.ts +3 -3
  57. package/dist/wallet/expo/background.js +5 -5
  58. package/dist/wallet/expo/index.cjs +13 -13
  59. package/dist/wallet/expo/index.d.cts +4 -4
  60. package/dist/wallet/expo/index.d.ts +4 -4
  61. package/dist/wallet/expo/index.js +4 -4
  62. package/dist/{wallet-DIH0gVfW.d.ts → wallet-B6Xiferv.d.cts} +33 -3
  63. package/dist/{wallet-B260BTJs.d.cts → wallet-CuHAI-eW.d.ts} +33 -3
  64. package/dist/worker/expo/index.cjs +8 -8
  65. package/dist/worker/expo/index.d.cts +4 -4
  66. package/dist/worker/expo/index.d.ts +4 -4
  67. package/dist/worker/expo/index.js +4 -4
  68. package/package.json +1 -1
  69. package/dist/chunk-6BQTROB4.cjs.map +0 -1
  70. package/dist/chunk-LJQ2VQBE.cjs.map +0 -1
  71. package/dist/chunk-MBSYQ3WX.js.map +0 -1
  72. package/dist/chunk-SNTSB6M2.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { W as WalletRepository, C as ContractRepository } from '../../ark-ApoclKQZ.js';
2
- import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BCWmdVg8.js';
3
- import { T as TaskProcessor } from '../../taskRunner-ChvV6Xrh.js';
1
+ import { W as WalletRepository, C as ContractRepository } from '../../ark-B69ugeJw.js';
2
+ import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BImF14sj.js';
3
+ import { T as TaskProcessor } from '../../taskRunner-Cf80BqSy.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/psbt.js';
@@ -1,8 +1,8 @@
1
- import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-7WSVP7DK.js';
2
- import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-ZXRSSBCF.js';
3
- import { getRandomId } from '../../chunk-SNTSB6M2.js';
4
- import '../../chunk-AA4Q2J57.js';
5
- import '../../chunk-MBSYQ3WX.js';
1
+ import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-WIVQWYPZ.js';
2
+ import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-3ZGANANS.js';
3
+ import { getRandomId } from '../../chunk-AXCKRS2D.js';
4
+ import '../../chunk-ZK3JITHP.js';
5
+ import '../../chunk-UZLQUWYP.js';
6
6
  import '../../chunk-EFNLTS6Q.js';
7
7
  import '../../chunk-NSBPE2FW.js';
8
8
  import * as TaskManager from 'expo-task-manager';
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ4K2RSMY_cjs = require('../../chunk-Q4K2RSMY.cjs');
4
- var chunk6BQTROB4_cjs = require('../../chunk-6BQTROB4.cjs');
5
- var chunkSIAVTHMZ_cjs = require('../../chunk-SIAVTHMZ.cjs');
6
- require('../../chunk-LJQ2VQBE.cjs');
3
+ var chunk3Z5HK35D_cjs = require('../../chunk-3Z5HK35D.cjs');
4
+ var chunkML33GFCH_cjs = require('../../chunk-ML33GFCH.cjs');
5
+ var chunkFZPYPEWN_cjs = require('../../chunk-FZPYPEWN.cjs');
6
+ require('../../chunk-IEMPH7J6.cjs');
7
7
  require('../../chunk-E7HB3GKK.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
9
9
  var base = require('@scure/base');
@@ -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 chunk6BQTROB4_cjs.Wallet.create(config);
62
- const processors = config.background.processors ?? [chunkQ4K2RSMY_cjs.contractPollProcessor];
61
+ const wallet = await chunkML33GFCH_cjs.Wallet.create(config);
62
+ const processors = config.background.processors ?? [chunk3Z5HK35D_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) => chunk6BQTROB4_cjs.extendVirtualCoinForContract(vtxo, contract)
68
+ extendVtxo: (vtxo, contract) => chunkML33GFCH_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 chunkSIAVTHMZ_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
72
+ const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkFZPYPEWN_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 chunkQ4K2RSMY_cjs.runTasks(this.taskQueue, this.processors, this.deps);
103
+ await chunk3Z5HK35D_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(chunkQ4K2RSMY_cjs.CONTRACT_POLL_TASK_TYPE);
112
+ const existing = await this.taskQueue.getTasks(chunk3Z5HK35D_cjs.CONTRACT_POLL_TASK_TYPE);
113
113
  if (existing.length > 0) return;
114
114
  const task = {
115
- id: chunk6BQTROB4_cjs.getRandomId(),
116
- type: chunkQ4K2RSMY_cjs.CONTRACT_POLL_TASK_TYPE,
115
+ id: chunkML33GFCH_cjs.getRandomId(),
116
+ type: chunk3Z5HK35D_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(chunkQ4K2RSMY_cjs.CONTRACT_POLL_TASK_TYPE);
123
+ const tasks = await this.taskQueue.getTasks(chunk3Z5HK35D_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-B260BTJs.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-ApoclKQZ.cjs';
3
- import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-C3YLaM2x.cjs';
1
+ import { W as Wallet, P as ProviderConnectionState } from '../../wallet-B6Xiferv.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-B69ugeJw.cjs';
3
+ import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-ClwI8jU8.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-CCHPwQft.cjs';
7
+ import '../../delegate-C_Y2YrXC.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-DIH0gVfW.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-ApoclKQZ.js';
3
- import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-ChvV6Xrh.js';
1
+ import { W as Wallet, P as ProviderConnectionState } from '../../wallet-CuHAI-eW.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-B69ugeJw.js';
3
+ import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-Cf80BqSy.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-hJYMZN1D.js';
7
+ import '../../delegate-BU-Cpyjw.js';
8
8
  import '@scure/btc-signer/transaction.js';
9
9
 
10
10
  /**
@@ -1,7 +1,7 @@
1
- import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-7WSVP7DK.js';
2
- import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-SNTSB6M2.js';
3
- import { RestArkProvider } from '../../chunk-AA4Q2J57.js';
4
- import '../../chunk-MBSYQ3WX.js';
1
+ import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-3ZGANANS.js';
2
+ import { Wallet, getRandomId, extendVirtualCoinForContract } from '../../chunk-AXCKRS2D.js';
3
+ import { RestArkProvider } from '../../chunk-ZK3JITHP.js';
4
+ import '../../chunk-UZLQUWYP.js';
5
5
  import '../../chunk-EFNLTS6Q.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
  import { hex } from '@scure/base';
@@ -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-ApoclKQZ.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, a4 as ContractManagerConfig, I as IWallet, a as Identity, a5 as CSVMultisigTapscript, a6 as SettlementConfig, j as IAssetManager, a7 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a8 as SignerSession, a9 as SignedIntent, aa as Intent, ab as TimeHeight } from './ark-B69ugeJw.cjs';
4
4
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-hJYMZN1D.js';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-C_Y2YrXC.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,30 @@ 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
+ * `candidateDeps` is read at refill time, so a band rebuilt after
1052
+ * {@link rotateServerSigner} fans the active signer set (persisted
1053
+ * old-signer rows stay watched through the repository).
1054
+ */
1055
+ protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
1056
+ /**
1057
+ * Every axis an externally issued receive script could be anchored to, not
1058
+ * just the wallet's own current shape: an issuer sharing the seed (NArk, a
1059
+ * merchant backend) picks its own contract type, and a band derived from one
1060
+ * variant silently misses the rest until a `restore()`.
1061
+ *
1062
+ * Read from cached state, not a fresh `getInfo`, to stay synchronous and
1063
+ * offline-safe; {@link refreshDeprecatedSigners} and
1064
+ * {@link rotateServerSigner} keep it current and re-trigger a refill.
1065
+ */
1066
+ private receiveCandidateDeps;
1037
1067
  private readonly _signerRouter;
1038
1068
  /**
1039
1069
  * @internal Sole write path for `offchainTapscript` after construction.
@@ -1189,7 +1219,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1189
1219
  readonly settlementConfig: SettlementConfig | false;
1190
1220
  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
1221
  /** @deprecated Use settlementConfig */
1192
- renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider);
1222
+ renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider, lookAheadWindow?: number);
1193
1223
  get assetManager(): IAssetManager;
1194
1224
  getVtxoManager(): Promise<VtxoManager>;
1195
1225
  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-ApoclKQZ.cjs';
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, a4 as ContractManagerConfig, I as IWallet, a as Identity, a5 as CSVMultisigTapscript, a6 as SettlementConfig, j as IAssetManager, a7 as VtxoManager, g as IDelegateManager, S as SendBitcoinParams, h as SettleParams, R as Recipient, a8 as SignerSession, a9 as SignedIntent, aa as Intent, ab as TimeHeight } from './ark-B69ugeJw.js';
4
4
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CCHPwQft.cjs';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BU-Cpyjw.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,30 @@ 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
+ * `candidateDeps` is read at refill time, so a band rebuilt after
1052
+ * {@link rotateServerSigner} fans the active signer set (persisted
1053
+ * old-signer rows stay watched through the repository).
1054
+ */
1055
+ protected lookAheadConfig(): ContractManagerConfig["lookAhead"];
1056
+ /**
1057
+ * Every axis an externally issued receive script could be anchored to, not
1058
+ * just the wallet's own current shape: an issuer sharing the seed (NArk, a
1059
+ * merchant backend) picks its own contract type, and a band derived from one
1060
+ * variant silently misses the rest until a `restore()`.
1061
+ *
1062
+ * Read from cached state, not a fresh `getInfo`, to stay synchronous and
1063
+ * offline-safe; {@link refreshDeprecatedSigners} and
1064
+ * {@link rotateServerSigner} keep it current and re-trigger a refill.
1065
+ */
1066
+ private receiveCandidateDeps;
1037
1067
  private readonly _signerRouter;
1038
1068
  /**
1039
1069
  * @internal Sole write path for `offchainTapscript` after construction.
@@ -1189,7 +1219,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1189
1219
  readonly settlementConfig: SettlementConfig | false;
1190
1220
  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
1221
  /** @deprecated Use settlementConfig */
1192
- renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider);
1222
+ renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider, lookAheadWindow?: number);
1193
1223
  get assetManager(): IAssetManager;
1194
1224
  getVtxoManager(): Promise<VtxoManager>;
1195
1225
  dispose(): Promise<void>;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ4K2RSMY_cjs = require('../../chunk-Q4K2RSMY.cjs');
4
- require('../../chunk-6BQTROB4.cjs');
5
- require('../../chunk-SIAVTHMZ.cjs');
6
- require('../../chunk-LJQ2VQBE.cjs');
3
+ var chunk3Z5HK35D_cjs = require('../../chunk-3Z5HK35D.cjs');
4
+ require('../../chunk-ML33GFCH.cjs');
5
+ require('../../chunk-FZPYPEWN.cjs');
6
+ require('../../chunk-IEMPH7J6.cjs');
7
7
  require('../../chunk-E7HB3GKK.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
9
9
 
@@ -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 chunkQ4K2RSMY_cjs.CONTRACT_POLL_TASK_TYPE; }
124
+ get: function () { return chunk3Z5HK35D_cjs.CONTRACT_POLL_TASK_TYPE; }
125
125
  });
126
126
  Object.defineProperty(exports, "contractPollProcessor", {
127
127
  enumerable: true,
128
- get: function () { return chunkQ4K2RSMY_cjs.contractPollProcessor; }
128
+ get: function () { return chunk3Z5HK35D_cjs.contractPollProcessor; }
129
129
  });
130
130
  Object.defineProperty(exports, "createTaskDependencies", {
131
131
  enumerable: true,
132
- get: function () { return chunkQ4K2RSMY_cjs.createTaskDependencies; }
132
+ get: function () { return chunk3Z5HK35D_cjs.createTaskDependencies; }
133
133
  });
134
134
  Object.defineProperty(exports, "runTasks", {
135
135
  enumerable: true,
136
- get: function () { return chunkQ4K2RSMY_cjs.runTasks; }
136
+ get: function () { return chunk3Z5HK35D_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-C3YLaM2x.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-C3YLaM2x.cjs';
3
- export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CIjgv1co.cjs';
4
- import '../../ark-ApoclKQZ.cjs';
1
+ import { T as TaskProcessor } from '../../taskRunner-ClwI8jU8.cjs';
2
+ export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-ClwI8jU8.cjs';
3
+ export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DScPdQAy.cjs';
4
+ import '../../ark-B69ugeJw.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-ChvV6Xrh.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-ChvV6Xrh.js';
3
- export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BCWmdVg8.js';
4
- import '../../ark-ApoclKQZ.js';
1
+ import { T as TaskProcessor } from '../../taskRunner-Cf80BqSy.js';
2
+ export { C as CreateTaskDependenciesOptions, I as InMemoryTaskQueue, a as TaskDependencies, b as TaskItem, c as TaskQueue, d as TaskResult, e as createTaskDependencies, r as runTasks } from '../../taskRunner-Cf80BqSy.js';
3
+ export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BImF14sj.js';
4
+ import '../../ark-B69ugeJw.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,7 +1,7 @@
1
- export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-7WSVP7DK.js';
2
- import '../../chunk-SNTSB6M2.js';
3
- import '../../chunk-AA4Q2J57.js';
4
- import '../../chunk-MBSYQ3WX.js';
1
+ export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-3ZGANANS.js';
2
+ import '../../chunk-AXCKRS2D.js';
3
+ import '../../chunk-ZK3JITHP.js';
4
+ import '../../chunk-UZLQUWYP.js';
5
5
  import '../../chunk-EFNLTS6Q.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/sdk",
3
- "version": "0.4.50",
3
+ "version": "0.4.52",
4
4
  "description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",