@arkade-os/sdk 0.4.67 → 0.4.68

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 (78) hide show
  1. package/README.md +5 -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-LTpeXYaD.d.cts → asyncStorageTaskQueue-B2CcXIHU.d.cts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-Za-e_zMk.d.ts → asyncStorageTaskQueue-DaZlVTbM.d.ts} +2 -2
  10. package/dist/{chunk-X3VEMUVV.js → chunk-33Q2RFET.js} +3 -3
  11. package/dist/{chunk-X3VEMUVV.js.map → chunk-33Q2RFET.js.map} +1 -1
  12. package/dist/{chunk-6TAQF6EV.js → chunk-45FKMOJH.js} +72 -120
  13. package/dist/chunk-45FKMOJH.js.map +1 -0
  14. package/dist/{chunk-3WIWNE4P.js → chunk-4CMXV5SF.js} +16 -4
  15. package/dist/chunk-4CMXV5SF.js.map +1 -0
  16. package/dist/{chunk-YDRZDZPP.cjs → chunk-4KCVS4ZN.cjs} +10 -10
  17. package/dist/{chunk-YDRZDZPP.cjs.map → chunk-4KCVS4ZN.cjs.map} +1 -1
  18. package/dist/{chunk-OIZ2V2VD.cjs → chunk-6YUACVX4.cjs} +118 -166
  19. package/dist/chunk-6YUACVX4.cjs.map +1 -0
  20. package/dist/{chunk-2JV4VQ7C.cjs → chunk-EJOFL5WH.cjs} +17 -3
  21. package/dist/chunk-EJOFL5WH.cjs.map +1 -0
  22. package/dist/{chunk-MZFUZUTQ.js → chunk-G4I6PU5H.js} +4 -4
  23. package/dist/{chunk-MZFUZUTQ.js.map → chunk-G4I6PU5H.js.map} +1 -1
  24. package/dist/{chunk-EALWOVHK.js → chunk-GQ4NMQGR.js} +4 -4
  25. package/dist/{chunk-EALWOVHK.js.map → chunk-GQ4NMQGR.js.map} +1 -1
  26. package/dist/{chunk-R2YAMONM.cjs → chunk-JGMSZIE4.cjs} +17 -17
  27. package/dist/{chunk-R2YAMONM.cjs.map → chunk-JGMSZIE4.cjs.map} +1 -1
  28. package/dist/{chunk-CO3KKSWM.cjs → chunk-PJR63FTK.cjs} +17 -17
  29. package/dist/{chunk-CO3KKSWM.cjs.map → chunk-PJR63FTK.cjs.map} +1 -1
  30. package/dist/{chunk-AEWJU6NZ.js → chunk-VBHXBI7F.js} +59 -23
  31. package/dist/chunk-VBHXBI7F.js.map +1 -0
  32. package/dist/{chunk-MJUTO3PY.cjs → chunk-WCJVKFAP.cjs} +480 -444
  33. package/dist/chunk-WCJVKFAP.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-cdmzb2f9.d.ts → delegate-AomVWxO_.d.ts} +1 -1
  39. package/dist/{delegate-Bz2e2zXY.d.cts → delegate-Bffc5f54.d.cts} +1 -1
  40. package/dist/{hdWalletCapable-BSjuUYOO.d.cts → hdWalletCapable-B5nRs3RH.d.cts} +2 -2
  41. package/dist/{hdWalletCapable-Hi12xjCJ.d.ts → hdWalletCapable-DZdIVa23.d.ts} +2 -2
  42. package/dist/{index-DU5o_hz7.d.cts → index-C7RZCfoY.d.cts} +17 -1
  43. package/dist/{index-DU5o_hz7.d.ts → index-C7RZCfoY.d.ts} +17 -1
  44. package/dist/{index-BiACuWaf.d.ts → index-jouvy8FD.d.ts} +96 -119
  45. package/dist/{index-D2GjZxBr.d.cts → index-nfyQM33h.d.cts} +96 -119
  46. package/dist/index.cjs +293 -289
  47. package/dist/index.d.cts +12 -8
  48. package/dist/index.d.ts +12 -8
  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-BZJMLQ6g.d.cts → taskRunner-D2vnpPBT.d.cts} +2 -2
  59. package/dist/{taskRunner-DATaRQus.d.ts → taskRunner-DuwK9t8O.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-2JV4VQ7C.cjs.map +0 -1
  74. package/dist/chunk-3WIWNE4P.js.map +0 -1
  75. package/dist/chunk-6TAQF6EV.js.map +0 -1
  76. package/dist/chunk-AEWJU6NZ.js.map +0 -1
  77. package/dist/chunk-MJUTO3PY.cjs.map +0 -1
  78. package/dist/chunk-OIZ2V2VD.cjs.map +0 -1
@@ -1,9 +1,9 @@
1
- import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-EALWOVHK.js';
2
- import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-MZFUZUTQ.js';
3
- import { getRandomId } from '../../chunk-AEWJU6NZ.js';
4
- import '../../chunk-X3VEMUVV.js';
5
- import '../../chunk-6TAQF6EV.js';
6
- import '../../chunk-3WIWNE4P.js';
1
+ import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-GQ4NMQGR.js';
2
+ import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-G4I6PU5H.js';
3
+ import { getRandomId } from '../../chunk-VBHXBI7F.js';
4
+ import '../../chunk-33Q2RFET.js';
5
+ import '../../chunk-45FKMOJH.js';
6
+ import '../../chunk-4CMXV5SF.js';
7
7
  import '../../chunk-NSBPE2FW.js';
8
8
  import * as TaskManager from 'expo-task-manager';
9
9
  import * as BackgroundTask from 'expo-background-task';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkYDRZDZPP_cjs = require('../../chunk-YDRZDZPP.cjs');
4
- var chunkMJUTO3PY_cjs = require('../../chunk-MJUTO3PY.cjs');
5
- require('../../chunk-CO3KKSWM.cjs');
6
- require('../../chunk-OIZ2V2VD.cjs');
7
- require('../../chunk-2JV4VQ7C.cjs');
3
+ var chunk4KCVS4ZN_cjs = require('../../chunk-4KCVS4ZN.cjs');
4
+ var chunkWCJVKFAP_cjs = require('../../chunk-WCJVKFAP.cjs');
5
+ require('../../chunk-PJR63FTK.cjs');
6
+ require('../../chunk-6YUACVX4.cjs');
7
+ require('../../chunk-EJOFL5WH.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
9
9
  var base = require('@scure/base');
10
10
 
@@ -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 chunkMJUTO3PY_cjs.Wallet.create(config);
62
- const processors = config.background.processors ?? [chunkYDRZDZPP_cjs.contractPollProcessor];
61
+ const wallet = await chunkWCJVKFAP_cjs.Wallet.create(config);
62
+ const processors = config.background.processors ?? [chunk4KCVS4ZN_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) => chunkMJUTO3PY_cjs.extendVirtualCoinForContract(vtxo, contract)
68
+ extendVtxo: (vtxo, contract) => chunkWCJVKFAP_cjs.extendVirtualCoinForContract(vtxo, contract)
69
69
  };
70
70
  const { taskQueue } = config.background;
71
71
  if ("persistConfig" in taskQueue) {
72
- const arkServerUrl = config.arkServerUrl || chunkMJUTO3PY_cjs.extractArkProviderUrl(wallet.arkProvider);
72
+ const arkServerUrl = config.arkServerUrl || chunkWCJVKFAP_cjs.extractArkProviderUrl(wallet.arkProvider);
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 chunkYDRZDZPP_cjs.runTasks(this.taskQueue, this.processors, this.deps);
103
+ await chunk4KCVS4ZN_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(chunkYDRZDZPP_cjs.CONTRACT_POLL_TASK_TYPE);
112
+ const existing = await this.taskQueue.getTasks(chunk4KCVS4ZN_cjs.CONTRACT_POLL_TASK_TYPE);
113
113
  if (existing.length > 0) return;
114
114
  const task = {
115
- id: chunkMJUTO3PY_cjs.getRandomId(),
116
- type: chunkYDRZDZPP_cjs.CONTRACT_POLL_TASK_TYPE,
115
+ id: chunkWCJVKFAP_cjs.getRandomId(),
116
+ type: chunk4KCVS4ZN_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(chunkYDRZDZPP_cjs.CONTRACT_POLL_TASK_TYPE);
123
+ const tasks = await this.taskQueue.getTasks(chunk4KCVS4ZN_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 { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-BSjuUYOO.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 GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-DU5o_hz7.cjs';
3
- import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-BZJMLQ6g.cjs';
1
+ import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-B5nRs3RH.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 GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-C7RZCfoY.cjs';
3
+ import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-D2vnpPBT.cjs';
4
4
  import '@scure/btc-signer';
5
5
  import '@scure/btc-signer/psbt.js';
6
6
  import '@scure/btc-signer/utils.js';
7
- import '../../delegate-Bz2e2zXY.cjs';
7
+ import '../../delegate-Bffc5f54.cjs';
8
8
  import '@scure/btc-signer/transaction.js';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
- import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-Hi12xjCJ.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 GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-DU5o_hz7.js';
3
- import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-DATaRQus.js';
1
+ import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-DZdIVa23.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 GetNewAddressesOptions, h as NewAddress, i as IDelegateManager, S as SendBitcoinParams, j as SettleParams, k as SettlementEvent, l as SendParams, R as Recipient, m as IAssetManager } from '../../index-C7RZCfoY.js';
3
+ import { a as TaskQueue, T as TaskProcessor } from '../../taskRunner-DuwK9t8O.js';
4
4
  import '@scure/btc-signer';
5
5
  import '@scure/btc-signer/psbt.js';
6
6
  import '@scure/btc-signer/utils.js';
7
- import '../../delegate-cdmzb2f9.js';
7
+ import '../../delegate-AomVWxO_.js';
8
8
  import '@scure/btc-signer/transaction.js';
9
9
 
10
10
  /**
@@ -1,8 +1,8 @@
1
- import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-EALWOVHK.js';
2
- import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-AEWJU6NZ.js';
3
- import '../../chunk-X3VEMUVV.js';
4
- import '../../chunk-6TAQF6EV.js';
5
- import '../../chunk-3WIWNE4P.js';
1
+ import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-GQ4NMQGR.js';
2
+ import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-VBHXBI7F.js';
3
+ import '../../chunk-33Q2RFET.js';
4
+ import '../../chunk-45FKMOJH.js';
5
+ import '../../chunk-4CMXV5SF.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
  import { hex } from '@scure/base';
8
8
 
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkYDRZDZPP_cjs = require('../../chunk-YDRZDZPP.cjs');
4
- require('../../chunk-MJUTO3PY.cjs');
5
- require('../../chunk-CO3KKSWM.cjs');
6
- require('../../chunk-OIZ2V2VD.cjs');
7
- require('../../chunk-2JV4VQ7C.cjs');
3
+ var chunk4KCVS4ZN_cjs = require('../../chunk-4KCVS4ZN.cjs');
4
+ require('../../chunk-WCJVKFAP.cjs');
5
+ require('../../chunk-PJR63FTK.cjs');
6
+ require('../../chunk-6YUACVX4.cjs');
7
+ require('../../chunk-EJOFL5WH.cjs');
8
8
  require('../../chunk-5BLDMQED.cjs');
9
9
 
10
10
  // src/worker/expo/taskQueue.ts
@@ -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 chunkYDRZDZPP_cjs.CONTRACT_POLL_TASK_TYPE; }
124
+ get: function () { return chunk4KCVS4ZN_cjs.CONTRACT_POLL_TASK_TYPE; }
125
125
  });
126
126
  Object.defineProperty(exports, "contractPollProcessor", {
127
127
  enumerable: true,
128
- get: function () { return chunkYDRZDZPP_cjs.contractPollProcessor; }
128
+ get: function () { return chunk4KCVS4ZN_cjs.contractPollProcessor; }
129
129
  });
130
130
  Object.defineProperty(exports, "createTaskDependencies", {
131
131
  enumerable: true,
132
- get: function () { return chunkYDRZDZPP_cjs.createTaskDependencies; }
132
+ get: function () { return chunk4KCVS4ZN_cjs.createTaskDependencies; }
133
133
  });
134
134
  Object.defineProperty(exports, "runTasks", {
135
135
  enumerable: true,
136
- get: function () { return chunkYDRZDZPP_cjs.runTasks; }
136
+ get: function () { return chunk4KCVS4ZN_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-BZJMLQ6g.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-BZJMLQ6g.cjs';
3
- export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-LTpeXYaD.cjs';
4
- import '../../index-DU5o_hz7.cjs';
1
+ import { T as TaskProcessor } from '../../taskRunner-D2vnpPBT.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-D2vnpPBT.cjs';
3
+ export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-B2CcXIHU.cjs';
4
+ import '../../index-C7RZCfoY.cjs';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/transaction.js';
7
7
  import '@scure/btc-signer';
@@ -1,7 +1,7 @@
1
- import { T as TaskProcessor } from '../../taskRunner-DATaRQus.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-DATaRQus.js';
3
- export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-Za-e_zMk.js';
4
- import '../../index-DU5o_hz7.js';
1
+ import { T as TaskProcessor } from '../../taskRunner-DuwK9t8O.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-DuwK9t8O.js';
3
+ export { a as AsyncStorageLike, A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DaZlVTbM.js';
4
+ import '../../index-C7RZCfoY.js';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/transaction.js';
7
7
  import '@scure/btc-signer';
@@ -1,8 +1,8 @@
1
- export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-EALWOVHK.js';
2
- import '../../chunk-AEWJU6NZ.js';
3
- import '../../chunk-X3VEMUVV.js';
4
- import '../../chunk-6TAQF6EV.js';
5
- import '../../chunk-3WIWNE4P.js';
1
+ export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-GQ4NMQGR.js';
2
+ import '../../chunk-VBHXBI7F.js';
3
+ import '../../chunk-33Q2RFET.js';
4
+ import '../../chunk-45FKMOJH.js';
5
+ import '../../chunk-4CMXV5SF.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
8
8
  // src/worker/expo/taskQueue.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/sdk",
3
- "version": "0.4.67",
3
+ "version": "0.4.68",
4
4
  "description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
5
5
  "repository": {
6
6
  "type": "git",