@arkade-os/sdk 0.4.42 → 0.4.44

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 (70) hide show
  1. package/README.md +65 -0
  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-CKDWpuGL.d.cts → ark-I8jfe5VE.d.cts} +157 -2
  9. package/dist/{ark-CKDWpuGL.d.ts → ark-I8jfe5VE.d.ts} +157 -2
  10. package/dist/{asyncStorageTaskQueue-BB2MffwG.d.ts → asyncStorageTaskQueue-BtSOVZFn.d.ts} +2 -2
  11. package/dist/{asyncStorageTaskQueue-BpN8RRHR.d.cts → asyncStorageTaskQueue-Dap7qUlF.d.cts} +2 -2
  12. package/dist/{chunk-V3FCNVJE.js → chunk-FMI2GKYO.js} +2158 -502
  13. package/dist/chunk-FMI2GKYO.js.map +1 -0
  14. package/dist/{chunk-FLPPSRYH.js → chunk-LCQQPOIT.js} +3 -3
  15. package/dist/{chunk-FLPPSRYH.js.map → chunk-LCQQPOIT.js.map} +1 -1
  16. package/dist/{chunk-5X5YMZHB.js → chunk-LJ35HPJW.js} +39 -5
  17. package/dist/chunk-LJ35HPJW.js.map +1 -0
  18. package/dist/{chunk-HHPUCCB3.cjs → chunk-RJ6XVCX4.cjs} +7 -7
  19. package/dist/{chunk-HHPUCCB3.cjs.map → chunk-RJ6XVCX4.cjs.map} +1 -1
  20. package/dist/{chunk-YEF5FL6E.cjs → chunk-UBYY2TPK.cjs} +39 -4
  21. package/dist/chunk-UBYY2TPK.cjs.map +1 -0
  22. package/dist/{chunk-2V3BU2X6.js → chunk-V7WIZR2B.js} +3 -3
  23. package/dist/{chunk-2V3BU2X6.js.map → chunk-V7WIZR2B.js.map} +1 -1
  24. package/dist/{chunk-T2ACJD22.cjs → chunk-X37EKDIH.cjs} +11 -11
  25. package/dist/{chunk-T2ACJD22.cjs.map → chunk-X37EKDIH.cjs.map} +1 -1
  26. package/dist/{chunk-ED7JDFX4.cjs → chunk-XIVCG6EP.cjs} +2248 -578
  27. package/dist/chunk-XIVCG6EP.cjs.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-yjhcR9n4.d.cts → delegate-BRqbh2fW.d.cts} +1 -1
  31. package/dist/{delegate-DllAQ3Eu.d.ts → delegate-CgjVjYOP.d.ts} +1 -1
  32. package/dist/{index-D1te-ZR6.d.cts → index-DHuXlDEg.d.cts} +2 -2
  33. package/dist/{index-DVdCGyyH.d.ts → index-DvWNB_rl.d.ts} +2 -2
  34. package/dist/index.cjs +162 -118
  35. package/dist/index.d.cts +344 -9
  36. package/dist/index.d.ts +344 -9
  37. package/dist/index.js +2 -2
  38. package/dist/repositories/realm/index.cjs +268 -12
  39. package/dist/repositories/realm/index.cjs.map +1 -1
  40. package/dist/repositories/realm/index.d.cts +101 -3
  41. package/dist/repositories/realm/index.d.ts +101 -3
  42. package/dist/repositories/realm/index.js +254 -4
  43. package/dist/repositories/realm/index.js.map +1 -1
  44. package/dist/repositories/sqlite/index.cjs +366 -40
  45. package/dist/repositories/sqlite/index.cjs.map +1 -1
  46. package/dist/repositories/sqlite/index.d.cts +52 -6
  47. package/dist/repositories/sqlite/index.d.ts +52 -6
  48. package/dist/repositories/sqlite/index.js +353 -32
  49. package/dist/repositories/sqlite/index.js.map +1 -1
  50. package/dist/{taskRunner-BdiRy4iI.d.ts → taskRunner-Bptw9UMa.d.ts} +2 -2
  51. package/dist/{taskRunner-CuTk8RYg.d.cts → taskRunner-CeFxKhSH.d.cts} +2 -2
  52. package/dist/wallet/expo/background.cjs +12 -12
  53. package/dist/wallet/expo/background.d.cts +3 -3
  54. package/dist/wallet/expo/background.d.ts +3 -3
  55. package/dist/wallet/expo/background.js +4 -4
  56. package/dist/wallet/expo/index.cjs +12 -12
  57. package/dist/wallet/expo/index.d.cts +4 -4
  58. package/dist/wallet/expo/index.d.ts +4 -4
  59. package/dist/wallet/expo/index.js +3 -3
  60. package/dist/{wallet-CyPOQ0oM.d.cts → wallet-BsqRU8KM.d.cts} +29 -5
  61. package/dist/{wallet-CrIVUQMb.d.ts → wallet-D9z7wssl.d.ts} +29 -5
  62. package/dist/worker/expo/index.cjs +7 -7
  63. package/dist/worker/expo/index.d.cts +4 -4
  64. package/dist/worker/expo/index.d.ts +4 -4
  65. package/dist/worker/expo/index.js +3 -3
  66. package/package.json +2 -2
  67. package/dist/chunk-5X5YMZHB.js.map +0 -1
  68. package/dist/chunk-ED7JDFX4.cjs.map +0 -1
  69. package/dist/chunk-V3FCNVJE.js.map +0 -1
  70. package/dist/chunk-YEF5FL6E.cjs.map +0 -1
@@ -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, j as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, g as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, N as Network, O as OnchainProvider, p as IndexerProvider, L as DelegateProvider, M as ReadonlyWalletConfig, q as RelativeTimelock, e as ActivityRegistry, P as IReadonlyAssetManager, o as ArkProvider, Q as NetworkName, U as ArkInfo, X as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, f as Activity, d as ExtendedCoin, Y as Coin, Z as ContractManager, I as IWallet, a as Identity, _ as CSVMultisigTapscript, $ as SettlementConfig, k as IAssetManager, a0 as VtxoManager, h as IDelegateManager, S as SendBitcoinParams, i as SettleParams, R as Recipient, a1 as SignerSession, a2 as SignedIntent, a3 as Intent } from './ark-CKDWpuGL.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, j as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, H as DescriptorProvider, g as IContractManager, J as IReadonlyWallet, K as ReadonlyIdentity, N as Network, O as OnchainProvider, p as IndexerProvider, L as DelegateProvider, M as ReadonlyWalletConfig, P as IntentRepository, Q as VirtualTxRepository, q as RelativeTimelock, e as ActivityRegistry, U as IReadonlyAssetManager, o as ArkProvider, X as NetworkName, Y as ArkInfo, Z as ArkAddress, c as WalletBalance, G as GetVtxosFilter, E as ExtendedVirtualCoin, A as ArkTransaction, f as Activity, d as ExtendedCoin, _ as Coin, $ as ContractManager, I as IWallet, a as Identity, a0 as CSVMultisigTapscript, a1 as SettlementConfig, k as IAssetManager, a2 as VtxoManager, h as IDelegateManager, S as SendBitcoinParams, i as SettleParams, R as Recipient, a3 as SignerSession, a4 as SignedIntent, a5 as Intent } from './ark-I8jfe5VE.js';
4
4
  import { TransactionOutput } from '@scure/btc-signer/psbt.js';
5
- import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DllAQ3Eu.js';
5
+ import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CgjVjYOP.js';
6
6
 
7
7
  /**
8
8
  * Batch namespace provides utilities for joining and processing batch session.
@@ -424,6 +424,20 @@ declare class ReadonlyWallet implements IReadonlyWallet {
424
424
  private _contractManager?;
425
425
  private _contractManagerInitializing?;
426
426
  protected readonly watcherConfig?: ReadonlyWalletConfig["watcherConfig"];
427
+ /**
428
+ * Opt-in intent-lifecycle repository. Assigned by the `create()`
429
+ * factories from `config.storage.intentRepository`; `undefined` ⇒ all
430
+ * intent-persistence code paths are no-ops (default behaviour unchanged).
431
+ */
432
+ intentRepository?: IntentRepository;
433
+ /**
434
+ * **Experimental / inert.** Opt-in virtual-tx / exit-branch repository,
435
+ * exposed so callers can pass it to {@link Unroll.Session.create} as a
436
+ * best-effort raw-tx cache. Assigned by `create()` from
437
+ * `config.storage.virtualTxRepository`. Normal sync never writes it
438
+ * (ContractManager isn't given it); `undefined` ⇒ no-op.
439
+ */
440
+ virtualTxRepository?: VirtualTxRepository;
427
441
  private readonly _assetManager;
428
442
  readonly walletContractTimelocks: RelativeTimelock[];
429
443
  protected _pendingSpendOutpoints: Set<string>;
@@ -475,9 +489,12 @@ declare class ReadonlyWallet implements IReadonlyWallet {
475
489
  protected _deprecatedSigners: Map<string, bigint>;
476
490
  /**
477
491
  * Refresh the cached deprecated-signer set from a fresh server-info
478
- * snapshot. Called by the create() factories at construction and by the
479
- * server-info-change handler mid-session. Lenient: a malformed deprecated
480
- * entry is skipped, never fatal to wallet creation.
492
+ * snapshot. Called by the create() factories at construction, by the
493
+ * server-info-change handler mid-session, and by the deprecated-signer
494
+ * migration pass (`VtxoManager.migrateDeprecatedSignerVtxos`). This set feeds
495
+ * {@link pendingRecoveryOutpoints}, which drops EXPIRED (past-cutoff)
496
+ * deprecated-signer VTXOs from the wallet's own coin selection. Lenient: a
497
+ * malformed deprecated entry is skipped, never fatal to wallet creation.
481
498
  */
482
499
  refreshDeprecatedSigners(info: {
483
500
  deprecatedSigners?: readonly {
@@ -1078,6 +1095,13 @@ declare class Wallet extends ReadonlyWallet implements IWallet {
1078
1095
  * historical silent-skip behaviour for cosigner/connector inputs.
1079
1096
  */
1080
1097
  private inputSigningJobsFromWitnessUtxos;
1098
+ /**
1099
+ * Best-effort upsert of the current settlement intent into the optional
1100
+ * {@link intentRepository}. Never throws into the settle path — intent
1101
+ * persistence is observational and must not break money flow. Preserves
1102
+ * fields already written by the event reducer (state-event ordering).
1103
+ */
1104
+ private persistIntentSnapshot;
1081
1105
  /**
1082
1106
  * @internal Sign an on-chain boarding exit / sweep transaction, routing
1083
1107
  * each input to the correct key by its `witnessUtxo.script`: the identity
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkHHPUCCB3_cjs = require('../../chunk-HHPUCCB3.cjs');
4
- require('../../chunk-ED7JDFX4.cjs');
5
- require('../../chunk-YEF5FL6E.cjs');
3
+ var chunkRJ6XVCX4_cjs = require('../../chunk-RJ6XVCX4.cjs');
4
+ require('../../chunk-XIVCG6EP.cjs');
5
+ require('../../chunk-UBYY2TPK.cjs');
6
6
  require('../../chunk-32YKLQPS.cjs');
7
7
  require('../../chunk-HXDZ2QTW.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
@@ -120,19 +120,19 @@ var AsyncStorageTaskQueue = class {
120
120
 
121
121
  Object.defineProperty(exports, "CONTRACT_POLL_TASK_TYPE", {
122
122
  enumerable: true,
123
- get: function () { return chunkHHPUCCB3_cjs.CONTRACT_POLL_TASK_TYPE; }
123
+ get: function () { return chunkRJ6XVCX4_cjs.CONTRACT_POLL_TASK_TYPE; }
124
124
  });
125
125
  Object.defineProperty(exports, "contractPollProcessor", {
126
126
  enumerable: true,
127
- get: function () { return chunkHHPUCCB3_cjs.contractPollProcessor; }
127
+ get: function () { return chunkRJ6XVCX4_cjs.contractPollProcessor; }
128
128
  });
129
129
  Object.defineProperty(exports, "createTaskDependencies", {
130
130
  enumerable: true,
131
- get: function () { return chunkHHPUCCB3_cjs.createTaskDependencies; }
131
+ get: function () { return chunkRJ6XVCX4_cjs.createTaskDependencies; }
132
132
  });
133
133
  Object.defineProperty(exports, "runTasks", {
134
134
  enumerable: true,
135
- get: function () { return chunkHHPUCCB3_cjs.runTasks; }
135
+ get: function () { return chunkRJ6XVCX4_cjs.runTasks; }
136
136
  });
137
137
  exports.AsyncStorageTaskQueue = AsyncStorageTaskQueue;
138
138
  exports.InMemoryTaskQueue = InMemoryTaskQueue;
@@ -1,7 +1,7 @@
1
- import { T as TaskProcessor } from '../../taskRunner-CuTk8RYg.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-CuTk8RYg.cjs';
3
- export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BpN8RRHR.cjs';
4
- import '../../ark-CKDWpuGL.cjs';
1
+ import { T as TaskProcessor } from '../../taskRunner-CeFxKhSH.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-CeFxKhSH.cjs';
3
+ export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Dap7qUlF.cjs';
4
+ import '../../ark-I8jfe5VE.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-BdiRy4iI.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-BdiRy4iI.js';
3
- export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BB2MffwG.js';
4
- import '../../ark-CKDWpuGL.js';
1
+ import { T as TaskProcessor } from '../../taskRunner-Bptw9UMa.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-Bptw9UMa.js';
3
+ export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-BtSOVZFn.js';
4
+ import '../../ark-I8jfe5VE.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-FLPPSRYH.js';
2
- import '../../chunk-V3FCNVJE.js';
3
- import '../../chunk-5X5YMZHB.js';
1
+ export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-LCQQPOIT.js';
2
+ import '../../chunk-FMI2GKYO.js';
3
+ import '../../chunk-LJ35HPJW.js';
4
4
  import '../../chunk-YNEDJTX2.js';
5
5
  import '../../chunk-BE5MUB7T.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.42",
3
+ "version": "0.4.44",
4
4
  "description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -138,7 +138,7 @@
138
138
  },
139
139
  "dependencies": {
140
140
  "@bitcoinerlab/descriptors-scure": "3.1.7",
141
- "@marcbachmann/cel-js": "7.3.1",
141
+ "@marcbachmann/cel-js": "8.0.0",
142
142
  "@noble/curves": "2.0.1",
143
143
  "@noble/secp256k1": "3.0.0",
144
144
  "@scure/base": "2.0.0",