@arkade-os/sdk 0.4.73 → 0.4.74

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 (77) hide show
  1. package/dist/adapters/expo.cjs +5 -5
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +3 -3
  5. package/dist/adapters/indexedDB.cjs +5 -5
  6. package/dist/adapters/indexedDB.js +4 -4
  7. package/dist/{asyncStorageTaskQueue-DA2OdpJ0.d.cts → asyncStorageTaskQueue-D1AwLuqn.d.cts} +1 -1
  8. package/dist/{asyncStorageTaskQueue-C5IwA_Hs.d.ts → asyncStorageTaskQueue-aCaOBGTS.d.ts} +1 -1
  9. package/dist/{chunk-D5DLGVN4.cjs → chunk-AS3W34MG.cjs} +17 -17
  10. package/dist/{chunk-D5DLGVN4.cjs.map → chunk-AS3W34MG.cjs.map} +1 -1
  11. package/dist/{chunk-2D7F5IU3.cjs → chunk-DXLVCFVK.cjs} +49 -49
  12. package/dist/{chunk-2D7F5IU3.cjs.map → chunk-DXLVCFVK.cjs.map} +1 -1
  13. package/dist/{chunk-QX2M67YI.js → chunk-J3XVGWMP.js} +21 -22
  14. package/dist/chunk-J3XVGWMP.js.map +1 -0
  15. package/dist/{chunk-ZLDO4QDR.cjs → chunk-J4ZR4VEM.cjs} +31 -32
  16. package/dist/chunk-J4ZR4VEM.cjs.map +1 -0
  17. package/dist/{chunk-KJ5E646Y.cjs → chunk-KMPNH7NS.cjs} +8 -4
  18. package/dist/chunk-KMPNH7NS.cjs.map +1 -0
  19. package/dist/{chunk-5YCAC6XE.js → chunk-KPLQN4M4.js} +4 -4
  20. package/dist/{chunk-5YCAC6XE.js.map → chunk-KPLQN4M4.js.map} +1 -1
  21. package/dist/{chunk-G5RPUZJE.js → chunk-LGB65ZCO.js} +3 -3
  22. package/dist/{chunk-G5RPUZJE.js.map → chunk-LGB65ZCO.js.map} +1 -1
  23. package/dist/{chunk-L7IEXVXI.cjs → chunk-QS6AZE4F.cjs} +10 -10
  24. package/dist/{chunk-L7IEXVXI.cjs.map → chunk-QS6AZE4F.cjs.map} +1 -1
  25. package/dist/{chunk-C4RKZY7D.cjs → chunk-WIHSU3YS.cjs} +560 -476
  26. package/dist/chunk-WIHSU3YS.cjs.map +1 -0
  27. package/dist/{chunk-OV4GLPZI.js → chunk-WJVOFYTQ.js} +8 -4
  28. package/dist/chunk-WJVOFYTQ.js.map +1 -0
  29. package/dist/{chunk-M6HIWM5N.js → chunk-X5BPARRD.js} +3 -3
  30. package/dist/{chunk-M6HIWM5N.js.map → chunk-X5BPARRD.js.map} +1 -1
  31. package/dist/{chunk-YHJJSLE5.js → chunk-ZTGTQP2W.js} +115 -33
  32. package/dist/chunk-ZTGTQP2W.js.map +1 -0
  33. package/dist/contracts/handlers/index.cjs +9 -9
  34. package/dist/contracts/handlers/index.d.cts +3 -3
  35. package/dist/contracts/handlers/index.d.ts +3 -3
  36. package/dist/contracts/handlers/index.js +2 -2
  37. package/dist/{delegate-BJp8f6LT.d.cts → delegate-6N0DKdnG.d.cts} +1 -1
  38. package/dist/{delegate-Ckz_TWzM.d.ts → delegate-z6veQfLI.d.ts} +1 -1
  39. package/dist/{hdWalletCapable-DABgAD-T.d.ts → hdWalletCapable-Bncp-eF0.d.ts} +2 -2
  40. package/dist/{hdWalletCapable-DA9bJ5eB.d.cts → hdWalletCapable-DJT8E8sN.d.cts} +2 -2
  41. package/dist/{index-DSbDm0Io.d.cts → index-BVqlZJwW.d.cts} +2 -2
  42. package/dist/{index-Dg0-TvBQ.d.cts → index-Bxz3cKPA.d.cts} +13 -7
  43. package/dist/{index-Dg0-TvBQ.d.ts → index-Bxz3cKPA.d.ts} +13 -7
  44. package/dist/{index-B8xrELXY.d.ts → index-CKQQ1oOg.d.ts} +2 -2
  45. package/dist/index.cjs +308 -300
  46. package/dist/index.d.cts +47 -24
  47. package/dist/index.d.ts +47 -24
  48. package/dist/index.js +4 -4
  49. package/dist/repositories/realm/index.cjs +19 -19
  50. package/dist/repositories/realm/index.d.cts +2 -2
  51. package/dist/repositories/realm/index.d.ts +2 -2
  52. package/dist/repositories/realm/index.js +5 -5
  53. package/dist/repositories/sqlite/index.cjs +18 -18
  54. package/dist/repositories/sqlite/index.d.cts +2 -2
  55. package/dist/repositories/sqlite/index.d.ts +2 -2
  56. package/dist/repositories/sqlite/index.js +5 -5
  57. package/dist/{taskRunner-C_uAJDsn.d.cts → taskRunner-C26IIg1F.d.cts} +1 -1
  58. package/dist/{taskRunner-DARTFnZN.d.ts → taskRunner-KxtIKYLv.d.ts} +1 -1
  59. package/dist/wallet/expo/background.cjs +14 -14
  60. package/dist/wallet/expo/background.d.cts +3 -3
  61. package/dist/wallet/expo/background.d.ts +3 -3
  62. package/dist/wallet/expo/background.js +6 -6
  63. package/dist/wallet/expo/index.cjs +14 -14
  64. package/dist/wallet/expo/index.d.cts +4 -4
  65. package/dist/wallet/expo/index.d.ts +4 -4
  66. package/dist/wallet/expo/index.js +5 -5
  67. package/dist/worker/expo/index.cjs +9 -9
  68. package/dist/worker/expo/index.d.cts +4 -4
  69. package/dist/worker/expo/index.d.ts +4 -4
  70. package/dist/worker/expo/index.js +5 -5
  71. package/package.json +1 -1
  72. package/dist/chunk-C4RKZY7D.cjs.map +0 -1
  73. package/dist/chunk-KJ5E646Y.cjs.map +0 -1
  74. package/dist/chunk-OV4GLPZI.js.map +0 -1
  75. package/dist/chunk-QX2M67YI.js.map +0 -1
  76. package/dist/chunk-YHJJSLE5.js.map +0 -1
  77. package/dist/chunk-ZLDO4QDR.cjs.map +0 -1
@@ -1,8 +1,8 @@
1
- import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-YHJJSLE5.js';
2
- export { ChainedTxType } from '../../chunk-YHJJSLE5.js';
3
- import '../../chunk-M6HIWM5N.js';
4
- import '../../chunk-G5RPUZJE.js';
5
- import '../../chunk-OV4GLPZI.js';
1
+ import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-ZTGTQP2W.js';
2
+ export { ChainedTxType } from '../../chunk-ZTGTQP2W.js';
3
+ import '../../chunk-X5BPARRD.js';
4
+ import '../../chunk-LGB65ZCO.js';
5
+ import '../../chunk-WJVOFYTQ.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
8
8
  // src/repositories/realm/walletRepository.ts
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkC4RKZY7D_cjs = require('../../chunk-C4RKZY7D.cjs');
4
- require('../../chunk-D5DLGVN4.cjs');
5
- require('../../chunk-2D7F5IU3.cjs');
6
- require('../../chunk-KJ5E646Y.cjs');
3
+ var chunkWIHSU3YS_cjs = require('../../chunk-WIHSU3YS.cjs');
4
+ require('../../chunk-AS3W34MG.cjs');
5
+ require('../../chunk-DXLVCFVK.cjs');
6
+ require('../../chunk-KMPNH7NS.cjs');
7
7
  require('../../chunk-5BLDMQED.cjs');
8
8
 
9
9
  // src/repositories/sqlite/transaction.ts
@@ -154,7 +154,7 @@ var SQLiteWalletRepository = class {
154
154
  for (const row of nullRows) {
155
155
  await this.db.run(
156
156
  `UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
157
- [chunkC4RKZY7D_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
157
+ [chunkWIHSU3YS_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
158
158
  );
159
159
  }
160
160
  const tempName = `${this.tables.vtxos}__migrate_tmp`;
@@ -225,7 +225,7 @@ var SQLiteWalletRepository = class {
225
225
  async saveVtxos(address, vtxos) {
226
226
  await this.ensureInit();
227
227
  for (const vtxo of vtxos) {
228
- const s = chunkC4RKZY7D_cjs.serializeVtxo(vtxo);
228
+ const s = chunkWIHSU3YS_cjs.serializeVtxo(vtxo);
229
229
  await this.db.run(
230
230
  `INSERT OR REPLACE INTO ${this.tables.vtxos}
231
231
  (txid, vout, value, address,
@@ -280,7 +280,7 @@ var SQLiteWalletRepository = class {
280
280
  throw new Error("SQLiteWalletRepository requires an address");
281
281
  }
282
282
  for (const vtxo of vtxos) {
283
- if (!chunkC4RKZY7D_cjs.isVtxoForScript(vtxo, key.script)) {
283
+ if (!chunkWIHSU3YS_cjs.isVtxoForScript(vtxo, key.script)) {
284
284
  throw new Error(
285
285
  `VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
286
286
  );
@@ -304,7 +304,7 @@ var SQLiteWalletRepository = class {
304
304
  async saveUtxos(address, utxos) {
305
305
  await this.ensureInit();
306
306
  for (const utxo of utxos) {
307
- const s = chunkC4RKZY7D_cjs.serializeUtxo(utxo);
307
+ const s = chunkWIHSU3YS_cjs.serializeUtxo(utxo);
308
308
  await this.db.run(
309
309
  `INSERT OR REPLACE INTO ${this.tables.utxos}
310
310
  (txid, vout, value, address,
@@ -360,7 +360,7 @@ var SQLiteWalletRepository = class {
360
360
  tx.amount,
361
361
  tx.settled ? 1 : 0,
362
362
  tx.createdAt,
363
- tx.assets ? JSON.stringify(chunkC4RKZY7D_cjs.serializeAssets(tx.assets)) : null
363
+ tx.assets ? JSON.stringify(chunkWIHSU3YS_cjs.serializeAssets(tx.assets)) : null
364
364
  ]
365
365
  );
366
366
  }
@@ -434,9 +434,9 @@ function vtxoRowToDomain(row) {
434
434
  // Post-migration every row has `script`, but the backfill is
435
435
  // idempotent: derive from `address` if the legacy column is still
436
436
  // null (e.g. the migration hasn't run yet on this handle).
437
- script: row.script ?? chunkC4RKZY7D_cjs.scriptFromArkAddress(row.address)
437
+ script: row.script ?? chunkWIHSU3YS_cjs.scriptFromArkAddress(row.address)
438
438
  };
439
- return chunkC4RKZY7D_cjs.deserializeVtxo(serialized);
439
+ return chunkWIHSU3YS_cjs.deserializeVtxo(serialized);
440
440
  }
441
441
  function utxoRowToDomain(row) {
442
442
  const serialized = {
@@ -455,7 +455,7 @@ function utxoRowToDomain(row) {
455
455
  status: JSON.parse(row.status_json),
456
456
  extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
457
457
  };
458
- return chunkC4RKZY7D_cjs.deserializeUtxo(serialized);
458
+ return chunkWIHSU3YS_cjs.deserializeUtxo(serialized);
459
459
  }
460
460
  function txRowToDomain(row) {
461
461
  const tx = {
@@ -470,7 +470,7 @@ function txRowToDomain(row) {
470
470
  createdAt: row.created_at
471
471
  };
472
472
  if (row.assets_json) {
473
- tx.assets = chunkC4RKZY7D_cjs.deserializeAssets(JSON.parse(row.assets_json));
473
+ tx.assets = chunkWIHSU3YS_cjs.deserializeAssets(JSON.parse(row.assets_json));
474
474
  }
475
475
  return tx;
476
476
  }
@@ -743,8 +743,8 @@ var SQLiteIntentRepository = class {
743
743
  `SELECT * FROM ${this.t} ORDER BY created_at ASC, intent_tx_id ASC`
744
744
  );
745
745
  let out = rows.map(rowToIntent);
746
- if (filter) out = out.filter((i) => chunkC4RKZY7D_cjs.intentMatchesFilter(i, filter));
747
- const { skip, end } = chunkC4RKZY7D_cjs.intentPageBounds(filter, out.length);
746
+ if (filter) out = out.filter((i) => chunkWIHSU3YS_cjs.intentMatchesFilter(i, filter));
747
+ const { skip, end } = chunkWIHSU3YS_cjs.intentPageBounds(filter, out.length);
748
748
  return out.slice(skip, end);
749
749
  }
750
750
  async getLockedVtxoOutpoints() {
@@ -752,7 +752,7 @@ var SQLiteIntentRepository = class {
752
752
  const rows = await this.db.all(`SELECT * FROM ${this.t}`);
753
753
  const out = [];
754
754
  for (const r of rows) {
755
- if (chunkC4RKZY7D_cjs.isTerminalIntentState(r.state)) continue;
755
+ if (chunkWIHSU3YS_cjs.isTerminalIntentState(r.state)) continue;
756
756
  for (const o of JSON.parse(r.intent_vtxos_json)) out.push(o);
757
757
  }
758
758
  return out;
@@ -847,7 +847,7 @@ var SQLiteVirtualTxRepository = class {
847
847
  const prev = prevByTxid.get(t.txid);
848
848
  const psbt = t.psbt ?? prev?.psbt ?? null;
849
849
  const expires = t.expiresAt ?? prev?.expires_at ?? null;
850
- const type = chunkC4RKZY7D_cjs.mergeChainedTxType(t.type, prev?.type);
850
+ const type = chunkWIHSU3YS_cjs.mergeChainedTxType(t.type, prev?.type);
851
851
  await this.db.run(
852
852
  `INSERT OR REPLACE INTO ${this.tTx} (txid, psbt, expires_at, type) VALUES (?, ?, ?, ?)`,
853
853
  [t.txid, psbt, expires, type]
@@ -940,7 +940,7 @@ function sanitizeTablePrefix(p) {
940
940
 
941
941
  Object.defineProperty(exports, "ChainedTxType", {
942
942
  enumerable: true,
943
- get: function () { return chunkC4RKZY7D_cjs.ChainedTxType; }
943
+ get: function () { return chunkWIHSU3YS_cjs.ChainedTxType; }
944
944
  });
945
945
  exports.SQLiteContractRepository = SQLiteContractRepository;
946
946
  exports.SQLiteIntentRepository = SQLiteIntentRepository;
@@ -1,5 +1,5 @@
1
- import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-Dg0-TvBQ.cjs';
2
- export { L as ChainedTxType } from '../../index-Dg0-TvBQ.cjs';
1
+ import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-Bxz3cKPA.cjs';
2
+ export { L as ChainedTxType } from '../../index-Bxz3cKPA.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
@@ -1,5 +1,5 @@
1
- import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-Dg0-TvBQ.js';
2
- export { L as ChainedTxType } from '../../index-Dg0-TvBQ.js';
1
+ import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-Bxz3cKPA.js';
2
+ export { L as ChainedTxType } from '../../index-Bxz3cKPA.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
@@ -1,8 +1,8 @@
1
- import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-YHJJSLE5.js';
2
- export { ChainedTxType } from '../../chunk-YHJJSLE5.js';
3
- import '../../chunk-M6HIWM5N.js';
4
- import '../../chunk-G5RPUZJE.js';
5
- import '../../chunk-OV4GLPZI.js';
1
+ import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-ZTGTQP2W.js';
2
+ export { ChainedTxType } from '../../chunk-ZTGTQP2W.js';
3
+ import '../../chunk-X5BPARRD.js';
4
+ import '../../chunk-LGB65ZCO.js';
5
+ import '../../chunk-WJVOFYTQ.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
8
8
  // src/repositories/sqlite/transaction.ts
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-Dg0-TvBQ.cjs';
1
+ import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-Bxz3cKPA.cjs';
2
2
 
3
3
  /**
4
4
  * A task item represents a unit of work in the inbox.
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-Dg0-TvBQ.js';
1
+ import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-Bxz3cKPA.js';
2
2
 
3
3
  /**
4
4
  * A task item represents a unit of work in the inbox.
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkL7IEXVXI_cjs = require('../../chunk-L7IEXVXI.cjs');
4
- var chunkZLDO4QDR_cjs = require('../../chunk-ZLDO4QDR.cjs');
5
- var chunkC4RKZY7D_cjs = require('../../chunk-C4RKZY7D.cjs');
6
- require('../../chunk-D5DLGVN4.cjs');
7
- require('../../chunk-2D7F5IU3.cjs');
8
- require('../../chunk-KJ5E646Y.cjs');
3
+ var chunkQS6AZE4F_cjs = require('../../chunk-QS6AZE4F.cjs');
4
+ var chunkJ4ZR4VEM_cjs = require('../../chunk-J4ZR4VEM.cjs');
5
+ var chunkWIHSU3YS_cjs = require('../../chunk-WIHSU3YS.cjs');
6
+ require('../../chunk-AS3W34MG.cjs');
7
+ require('../../chunk-DXLVCFVK.cjs');
8
+ require('../../chunk-KMPNH7NS.cjs');
9
9
  require('../../chunk-5BLDMQED.cjs');
10
10
  var TaskManager = require('expo-task-manager');
11
11
  var BackgroundTask = require('expo-background-task');
@@ -36,7 +36,7 @@ function defineExpoBackgroundTask(taskName, options) {
36
36
  taskQueue,
37
37
  walletRepository,
38
38
  contractRepository,
39
- processors = [chunkL7IEXVXI_cjs.contractPollProcessor]
39
+ processors = [chunkQS6AZE4F_cjs.contractPollProcessor]
40
40
  } = options;
41
41
  TaskManager__namespace.defineTask(taskName, async () => {
42
42
  try {
@@ -44,24 +44,24 @@ function defineExpoBackgroundTask(taskName, options) {
44
44
  if (!config) {
45
45
  return BackgroundTask__namespace.BackgroundTaskResult.Success;
46
46
  }
47
- const indexerProvider = new chunkZLDO4QDR_cjs.ExpoIndexerProvider(config.arkServerUrl);
48
- const arkProvider = new chunkZLDO4QDR_cjs.ExpoArkProvider(config.arkServerUrl);
49
- const deps = chunkL7IEXVXI_cjs.createTaskDependencies({
47
+ const indexerProvider = new chunkJ4ZR4VEM_cjs.ExpoIndexerProvider(config.arkServerUrl);
48
+ const arkProvider = new chunkJ4ZR4VEM_cjs.ExpoArkProvider(config.arkServerUrl);
49
+ const deps = chunkQS6AZE4F_cjs.createTaskDependencies({
50
50
  walletRepository,
51
51
  contractRepository,
52
52
  indexerProvider,
53
53
  arkProvider
54
54
  });
55
- await chunkL7IEXVXI_cjs.runTasks(taskQueue, processors, deps);
55
+ await chunkQS6AZE4F_cjs.runTasks(taskQueue, processors, deps);
56
56
  const results = await taskQueue.getResults();
57
57
  if (results.length > 0) {
58
58
  await taskQueue.acknowledgeResults(results.map((r) => r.id));
59
59
  }
60
- const existing = await taskQueue.getTasks(chunkL7IEXVXI_cjs.CONTRACT_POLL_TASK_TYPE);
60
+ const existing = await taskQueue.getTasks(chunkQS6AZE4F_cjs.CONTRACT_POLL_TASK_TYPE);
61
61
  if (existing.length === 0) {
62
62
  const task = {
63
- id: chunkC4RKZY7D_cjs.getRandomId(),
64
- type: chunkL7IEXVXI_cjs.CONTRACT_POLL_TASK_TYPE,
63
+ id: chunkWIHSU3YS_cjs.getRandomId(),
64
+ type: chunkQS6AZE4F_cjs.CONTRACT_POLL_TASK_TYPE,
65
65
  data: {},
66
66
  createdAt: Date.now()
67
67
  };
@@ -1,6 +1,6 @@
1
- import { W as WalletRepository, C as ContractRepository } from '../../index-Dg0-TvBQ.cjs';
2
- import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DA2OdpJ0.cjs';
3
- import { T as TaskProcessor } from '../../taskRunner-C_uAJDsn.cjs';
1
+ import { W as WalletRepository, C as ContractRepository } from '../../index-Bxz3cKPA.cjs';
2
+ import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-D1AwLuqn.cjs';
3
+ import { T as TaskProcessor } from '../../taskRunner-C26IIg1F.cjs';
4
4
  import '@scure/btc-signer/utils.js';
5
5
  import '@scure/btc-signer/transaction.js';
6
6
  import '@scure/btc-signer';
@@ -1,6 +1,6 @@
1
- import { W as WalletRepository, C as ContractRepository } from '../../index-Dg0-TvBQ.js';
2
- import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C5IwA_Hs.js';
3
- import { T as TaskProcessor } from '../../taskRunner-DARTFnZN.js';
1
+ import { W as WalletRepository, C as ContractRepository } from '../../index-Bxz3cKPA.js';
2
+ import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-aCaOBGTS.js';
3
+ import { T as TaskProcessor } from '../../taskRunner-KxtIKYLv.js';
4
4
  import '@scure/btc-signer/utils.js';
5
5
  import '@scure/btc-signer/transaction.js';
6
6
  import '@scure/btc-signer';
@@ -1,9 +1,9 @@
1
- import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-5YCAC6XE.js';
2
- import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-QX2M67YI.js';
3
- import { getRandomId } from '../../chunk-YHJJSLE5.js';
4
- import '../../chunk-M6HIWM5N.js';
5
- import '../../chunk-G5RPUZJE.js';
6
- import '../../chunk-OV4GLPZI.js';
1
+ import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-KPLQN4M4.js';
2
+ import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-J3XVGWMP.js';
3
+ import { getRandomId } from '../../chunk-ZTGTQP2W.js';
4
+ import '../../chunk-X5BPARRD.js';
5
+ import '../../chunk-LGB65ZCO.js';
6
+ import '../../chunk-WJVOFYTQ.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 chunkL7IEXVXI_cjs = require('../../chunk-L7IEXVXI.cjs');
4
- var chunkC4RKZY7D_cjs = require('../../chunk-C4RKZY7D.cjs');
5
- require('../../chunk-D5DLGVN4.cjs');
6
- require('../../chunk-2D7F5IU3.cjs');
7
- require('../../chunk-KJ5E646Y.cjs');
3
+ var chunkQS6AZE4F_cjs = require('../../chunk-QS6AZE4F.cjs');
4
+ var chunkWIHSU3YS_cjs = require('../../chunk-WIHSU3YS.cjs');
5
+ require('../../chunk-AS3W34MG.cjs');
6
+ require('../../chunk-DXLVCFVK.cjs');
7
+ require('../../chunk-KMPNH7NS.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 chunkC4RKZY7D_cjs.Wallet.create(config);
62
- const processors = config.background.processors ?? [chunkL7IEXVXI_cjs.contractPollProcessor];
61
+ const wallet = await chunkWIHSU3YS_cjs.Wallet.create(config);
62
+ const processors = config.background.processors ?? [chunkQS6AZE4F_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) => chunkC4RKZY7D_cjs.extendVirtualCoinForContract(vtxo, contract)
68
+ extendVtxo: (vtxo, contract) => chunkWIHSU3YS_cjs.extendVirtualCoinForContract(vtxo, contract)
69
69
  };
70
70
  const { taskQueue } = config.background;
71
71
  if ("persistConfig" in taskQueue) {
72
- const arkServerUrl = config.arkServerUrl || chunkC4RKZY7D_cjs.extractArkProviderUrl(wallet.arkProvider);
72
+ const arkServerUrl = config.arkServerUrl || chunkWIHSU3YS_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 chunkL7IEXVXI_cjs.runTasks(this.taskQueue, this.processors, this.deps);
103
+ await chunkQS6AZE4F_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(chunkL7IEXVXI_cjs.CONTRACT_POLL_TASK_TYPE);
112
+ const existing = await this.taskQueue.getTasks(chunkQS6AZE4F_cjs.CONTRACT_POLL_TASK_TYPE);
113
113
  if (existing.length > 0) return;
114
114
  const task = {
115
- id: chunkC4RKZY7D_cjs.getRandomId(),
116
- type: chunkL7IEXVXI_cjs.CONTRACT_POLL_TASK_TYPE,
115
+ id: chunkWIHSU3YS_cjs.getRandomId(),
116
+ type: chunkQS6AZE4F_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(chunkL7IEXVXI_cjs.CONTRACT_POLL_TASK_TYPE);
123
+ const tasks = await this.taskQueue.getTasks(chunkQS6AZE4F_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-DA9bJ5eB.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-Dg0-TvBQ.cjs';
3
- import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-C_uAJDsn.cjs';
1
+ import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-DJT8E8sN.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-Bxz3cKPA.cjs';
3
+ import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-C26IIg1F.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-BJp8f6LT.cjs';
7
+ import '../../delegate-6N0DKdnG.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-DABgAD-T.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-Dg0-TvBQ.js';
3
- import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-DARTFnZN.js';
1
+ import { H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, W as Wallet, P as ProviderConnectionState } from '../../hdWalletCapable-Bncp-eF0.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-Bxz3cKPA.js';
3
+ import { c as TaskQueue, T as TaskProcessor } from '../../taskRunner-KxtIKYLv.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-Ckz_TWzM.js';
7
+ import '../../delegate-z6veQfLI.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-5YCAC6XE.js';
2
- import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-YHJJSLE5.js';
3
- import '../../chunk-M6HIWM5N.js';
4
- import '../../chunk-G5RPUZJE.js';
5
- import '../../chunk-OV4GLPZI.js';
1
+ import { contractPollProcessor, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-KPLQN4M4.js';
2
+ import { Wallet, extractArkProviderUrl, getRandomId, extendVirtualCoinForContract } from '../../chunk-ZTGTQP2W.js';
3
+ import '../../chunk-X5BPARRD.js';
4
+ import '../../chunk-LGB65ZCO.js';
5
+ import '../../chunk-WJVOFYTQ.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 chunkL7IEXVXI_cjs = require('../../chunk-L7IEXVXI.cjs');
4
- require('../../chunk-C4RKZY7D.cjs');
5
- require('../../chunk-D5DLGVN4.cjs');
6
- require('../../chunk-2D7F5IU3.cjs');
7
- require('../../chunk-KJ5E646Y.cjs');
3
+ var chunkQS6AZE4F_cjs = require('../../chunk-QS6AZE4F.cjs');
4
+ require('../../chunk-WIHSU3YS.cjs');
5
+ require('../../chunk-AS3W34MG.cjs');
6
+ require('../../chunk-DXLVCFVK.cjs');
7
+ require('../../chunk-KMPNH7NS.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 chunkL7IEXVXI_cjs.CONTRACT_POLL_TASK_TYPE; }
124
+ get: function () { return chunkQS6AZE4F_cjs.CONTRACT_POLL_TASK_TYPE; }
125
125
  });
126
126
  Object.defineProperty(exports, "contractPollProcessor", {
127
127
  enumerable: true,
128
- get: function () { return chunkL7IEXVXI_cjs.contractPollProcessor; }
128
+ get: function () { return chunkQS6AZE4F_cjs.contractPollProcessor; }
129
129
  });
130
130
  Object.defineProperty(exports, "createTaskDependencies", {
131
131
  enumerable: true,
132
- get: function () { return chunkL7IEXVXI_cjs.createTaskDependencies; }
132
+ get: function () { return chunkQS6AZE4F_cjs.createTaskDependencies; }
133
133
  });
134
134
  Object.defineProperty(exports, "runTasks", {
135
135
  enumerable: true,
136
- get: function () { return chunkL7IEXVXI_cjs.runTasks; }
136
+ get: function () { return chunkQS6AZE4F_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-C_uAJDsn.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-C_uAJDsn.cjs';
3
- export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-DA2OdpJ0.cjs';
4
- import '../../index-Dg0-TvBQ.cjs';
1
+ import { T as TaskProcessor } from '../../taskRunner-C26IIg1F.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-C26IIg1F.cjs';
3
+ export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-D1AwLuqn.cjs';
4
+ import '../../index-Bxz3cKPA.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-DARTFnZN.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-DARTFnZN.js';
3
- export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C5IwA_Hs.js';
4
- import '../../index-Dg0-TvBQ.js';
1
+ import { T as TaskProcessor } from '../../taskRunner-KxtIKYLv.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-KxtIKYLv.js';
3
+ export { A as AsyncStorageLike, a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-aCaOBGTS.js';
4
+ import '../../index-Bxz3cKPA.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-5YCAC6XE.js';
2
- import '../../chunk-YHJJSLE5.js';
3
- import '../../chunk-M6HIWM5N.js';
4
- import '../../chunk-G5RPUZJE.js';
5
- import '../../chunk-OV4GLPZI.js';
1
+ export { CONTRACT_POLL_TASK_TYPE, contractPollProcessor, createTaskDependencies, runTasks } from '../../chunk-KPLQN4M4.js';
2
+ import '../../chunk-ZTGTQP2W.js';
3
+ import '../../chunk-X5BPARRD.js';
4
+ import '../../chunk-LGB65ZCO.js';
5
+ import '../../chunk-WJVOFYTQ.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.73",
3
+ "version": "0.4.74",
4
4
  "description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
5
5
  "repository": {
6
6
  "type": "git",