@arkade-os/sdk 0.5.5 → 0.5.6

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 (75) hide show
  1. package/dist/adapters/expo.cjs +6 -6
  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/{asyncStorageTaskQueue-BbH-THYJ.d.cts → asyncStorageTaskQueue-Bh2n0msM.d.cts} +2 -2
  6. package/dist/{asyncStorageTaskQueue-BlvkJyTa.d.ts → asyncStorageTaskQueue-CpkstKZ5.d.ts} +2 -2
  7. package/dist/{chunk-BCA6D255.js → chunk-47Z4LEIW.js} +3 -3
  8. package/dist/{chunk-BCA6D255.js.map → chunk-47Z4LEIW.js.map} +1 -1
  9. package/dist/{chunk-HQQ4NRXI.cjs → chunk-4X67IB2V.cjs} +15 -15
  10. package/dist/{chunk-HQQ4NRXI.cjs.map → chunk-4X67IB2V.cjs.map} +1 -1
  11. package/dist/{chunk-7GIKLFHC.js → chunk-C7NY6WSA.js} +3 -3
  12. package/dist/{chunk-7GIKLFHC.js.map → chunk-C7NY6WSA.js.map} +1 -1
  13. package/dist/{chunk-CE46RS6L.js → chunk-DJYX73W2.js} +4 -4
  14. package/dist/{chunk-CE46RS6L.js.map → chunk-DJYX73W2.js.map} +1 -1
  15. package/dist/{chunk-XWUCNMPN.cjs → chunk-HKEPJBTY.cjs} +16 -16
  16. package/dist/{chunk-XWUCNMPN.cjs.map → chunk-HKEPJBTY.cjs.map} +1 -1
  17. package/dist/{chunk-KCL5AVML.cjs → chunk-LZAINCGU.cjs} +3 -3
  18. package/dist/{chunk-KCL5AVML.cjs.map → chunk-LZAINCGU.cjs.map} +1 -1
  19. package/dist/{chunk-AMH7Q3DF.cjs → chunk-NDQ4LB4X.cjs} +8 -8
  20. package/dist/{chunk-AMH7Q3DF.cjs.map → chunk-NDQ4LB4X.cjs.map} +1 -1
  21. package/dist/{chunk-4I53THL6.js → chunk-QTMK34TP.js} +3 -3
  22. package/dist/{chunk-4I53THL6.js.map → chunk-QTMK34TP.js.map} +1 -1
  23. package/dist/{chunk-FVVXCDNE.js → chunk-VWW2ZBPI.js} +4 -4
  24. package/dist/{chunk-FVVXCDNE.js.map → chunk-VWW2ZBPI.js.map} +1 -1
  25. package/dist/{chunk-T254PXSN.cjs → chunk-Y3CDDPWI.cjs} +454 -443
  26. package/dist/chunk-Y3CDDPWI.cjs.map +1 -0
  27. package/dist/{chunk-OO2KEK64.js → chunk-YKT4NAQG.js} +45 -34
  28. package/dist/chunk-YKT4NAQG.js.map +1 -0
  29. package/dist/{chunk-5SYUEVJH.cjs → chunk-YS76JSGP.cjs} +10 -10
  30. package/dist/{chunk-5SYUEVJH.cjs.map → chunk-YS76JSGP.cjs.map} +1 -1
  31. package/dist/contracts/handlers/index.cjs +9 -9
  32. package/dist/contracts/handlers/index.d.cts +2 -2
  33. package/dist/contracts/handlers/index.d.ts +2 -2
  34. package/dist/contracts/handlers/index.js +2 -2
  35. package/dist/{index-Bx-iArDs.d.ts → index-2wKMrT0a.d.ts} +1 -1
  36. package/dist/{index-BWwVnJhU.d.cts → index-46g577Ka.d.cts} +1 -1
  37. package/dist/{index-DCml4QJn.d.ts → index-C66rjxz2.d.ts} +25 -25
  38. package/dist/{index-DkyzIzKL.d.cts → index-Dqk07NwJ.d.cts} +25 -25
  39. package/dist/index.cjs +311 -311
  40. package/dist/index.d.cts +23 -23
  41. package/dist/index.d.ts +23 -23
  42. package/dist/index.js +4 -4
  43. package/dist/{keyringDescriptorProvider-CS4w4PWd.d.ts → keyringDescriptorProvider-DiBM4GmB.d.ts} +9 -9
  44. package/dist/{keyringDescriptorProvider-CmHXrIXd.d.cts → keyringDescriptorProvider-DnaLUC7v.d.cts} +9 -9
  45. package/dist/repositories/realm/index.cjs +37 -37
  46. package/dist/repositories/realm/index.cjs.map +1 -1
  47. package/dist/repositories/realm/index.d.cts +6 -6
  48. package/dist/repositories/realm/index.d.ts +6 -6
  49. package/dist/repositories/realm/index.js +6 -6
  50. package/dist/repositories/realm/index.js.map +1 -1
  51. package/dist/repositories/sqlite/index.cjs +35 -35
  52. package/dist/repositories/sqlite/index.cjs.map +1 -1
  53. package/dist/repositories/sqlite/index.d.cts +6 -6
  54. package/dist/repositories/sqlite/index.d.ts +6 -6
  55. package/dist/repositories/sqlite/index.js +5 -5
  56. package/dist/repositories/sqlite/index.js.map +1 -1
  57. package/dist/{taskRunner-DgMLSk_O.d.ts → taskRunner-BM6IAKlS.d.ts} +2 -2
  58. package/dist/{taskRunner-buh6aFpG.d.cts → taskRunner-BmDIZiSl.d.cts} +2 -2
  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 +15 -15
  64. package/dist/wallet/expo/index.cjs.map +1 -1
  65. package/dist/wallet/expo/index.d.cts +6 -6
  66. package/dist/wallet/expo/index.d.ts +6 -6
  67. package/dist/wallet/expo/index.js +5 -5
  68. package/dist/wallet/expo/index.js.map +1 -1
  69. package/dist/worker/expo/index.cjs +9 -9
  70. package/dist/worker/expo/index.d.cts +4 -4
  71. package/dist/worker/expo/index.d.ts +4 -4
  72. package/dist/worker/expo/index.js +5 -5
  73. package/package.json +1 -1
  74. package/dist/chunk-OO2KEK64.js.map +0 -1
  75. package/dist/chunk-T254PXSN.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkT254PXSN_cjs = require('../../chunk-T254PXSN.cjs');
3
+ var chunkY3CDDPWI_cjs = require('../../chunk-Y3CDDPWI.cjs');
4
4
  require('../../chunk-X6ZI53DZ.cjs');
5
- require('../../chunk-XWUCNMPN.cjs');
6
- require('../../chunk-AMH7Q3DF.cjs');
5
+ require('../../chunk-HKEPJBTY.cjs');
6
+ require('../../chunk-NDQ4LB4X.cjs');
7
7
  require('../../chunk-JFJNB7ZH.cjs');
8
- var chunkKCL5AVML_cjs = require('../../chunk-KCL5AVML.cjs');
8
+ var chunkLZAINCGU_cjs = require('../../chunk-LZAINCGU.cjs');
9
9
  require('../../chunk-FLPWNMX3.cjs');
10
10
 
11
11
  // src/repositories/sqlite/transaction.ts
@@ -242,7 +242,7 @@ var SQLiteWalletRepository = class {
242
242
  for (const row of nullRows) {
243
243
  await tx.run(
244
244
  `UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
245
- [chunkT254PXSN_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
245
+ [chunkY3CDDPWI_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
246
246
  );
247
247
  }
248
248
  const tempName = `${this.tables.vtxos}__migrate_tmp`;
@@ -283,7 +283,7 @@ var SQLiteWalletRepository = class {
283
283
  WHERE virtual_status_json IS NOT NULL AND is_swept IS NULL`
284
284
  );
285
285
  for (const row of rows) {
286
- const facts = chunkT254PXSN_cjs.legacyVtxoFacts(row.virtual_status_json);
286
+ const facts = chunkY3CDDPWI_cjs.legacyVtxoFacts(row.virtual_status_json);
287
287
  if (!facts) continue;
288
288
  await tx.run(
289
289
  `UPDATE ${this.tables.vtxos}
@@ -375,7 +375,7 @@ var SQLiteWalletRepository = class {
375
375
  expires_at, expires_at_height,
376
376
  spent_by, settled_by, ark_tx_id, extra_witness_json, assets_json, script`,
377
377
  vtxos.map((vtxo) => {
378
- const s = chunkT254PXSN_cjs.serializeVtxo(vtxo);
378
+ const s = chunkY3CDDPWI_cjs.serializeVtxo(vtxo);
379
379
  return [
380
380
  s.txid,
381
381
  s.vout,
@@ -387,7 +387,7 @@ var SQLiteWalletRepository = class {
387
387
  s.intentTapLeafScript.cb,
388
388
  s.intentTapLeafScript.s,
389
389
  JSON.stringify(s.status),
390
- chunkT254PXSN_cjs.createdAtToIso(s.createdAt),
390
+ chunkY3CDDPWI_cjs.createdAtToIso(s.createdAt),
391
391
  s.isUnrolled ? 1 : 0,
392
392
  s.isSpent === void 0 ? null : s.isSpent ? 1 : 0,
393
393
  s.isSwept === void 0 ? null : s.isSwept ? 1 : 0,
@@ -410,7 +410,7 @@ var SQLiteWalletRepository = class {
410
410
  await this.db.run(`DELETE FROM ${this.tables.vtxos} WHERE address = ?`, [address]);
411
411
  }
412
412
  async getVtxosForScriptPage(script, page, options) {
413
- chunkT254PXSN_cjs.assertPageRequest(page);
413
+ chunkY3CDDPWI_cjs.assertPageRequest(page);
414
414
  await this.ensureInit();
415
415
  const after = page.after;
416
416
  const rows = await this.db.all(
@@ -428,15 +428,15 @@ var SQLiteWalletRepository = class {
428
428
  page.limit + 1
429
429
  ] : [script, page.limit + 1]
430
430
  );
431
- const result = chunkT254PXSN_cjs.pageResult(
431
+ const result = chunkY3CDDPWI_cjs.pageResult(
432
432
  rows.map((row) => ({ address: row.address, vtxo: vtxoRowToDomain(row) })),
433
433
  page.limit,
434
434
  (row) => ({ address: row.address, txid: row.vtxo.txid, vout: row.vtxo.vout })
435
435
  );
436
- return options?.unspentOnly ? { ...result, items: result.items.filter((row) => !chunkKCL5AVML_cjs.isVtxoSpent(row.vtxo)) } : result;
436
+ return options?.unspentOnly ? { ...result, items: result.items.filter((row) => !chunkLZAINCGU_cjs.isVtxoSpent(row.vtxo)) } : result;
437
437
  }
438
438
  async saveVtxosForScript(key, vtxos) {
439
- return this.saveVtxos(chunkT254PXSN_cjs.checkSaveVtxosForScript("SQLiteWalletRepository", key, vtxos), vtxos);
439
+ return this.saveVtxos(chunkY3CDDPWI_cjs.checkSaveVtxosForScript("SQLiteWalletRepository", key, vtxos), vtxos);
440
440
  }
441
441
  async deleteVtxosForScript(script) {
442
442
  await this.ensureInit();
@@ -447,21 +447,21 @@ var SQLiteWalletRepository = class {
447
447
  return this.pageByAddress(this.tables.utxos, address, page, utxoRowToDomain);
448
448
  }
449
449
  async pageByAddress(table, address, page, deserialize) {
450
- chunkT254PXSN_cjs.assertPageRequest(page);
450
+ chunkY3CDDPWI_cjs.assertPageRequest(page);
451
451
  await this.ensureInit();
452
452
  const rows = await this.db.all(
453
453
  `SELECT * FROM ${table} WHERE address = ? AND (txid, vout) > (?, ?)
454
454
  ORDER BY txid, vout LIMIT ?`,
455
455
  [address, page.after?.txid ?? "", page.after?.vout ?? -1, page.limit + 1]
456
456
  );
457
- const result = chunkT254PXSN_cjs.pageResult(rows, page.limit, ({ txid, vout }) => ({ txid, vout }));
457
+ const result = chunkY3CDDPWI_cjs.pageResult(rows, page.limit, ({ txid, vout }) => ({ txid, vout }));
458
458
  return { items: result.items.map(deserialize), nextCursor: result.nextCursor };
459
459
  }
460
460
  async saveUtxos(addressOrBatch, utxos) {
461
461
  await this.ensureInit();
462
- const rows = chunkT254PXSN_cjs.utxoEntries(addressOrBatch, utxos).flatMap(
462
+ const rows = chunkY3CDDPWI_cjs.utxoEntries(addressOrBatch, utxos).flatMap(
463
463
  ([address, list]) => list.map((utxo) => {
464
- const s = chunkT254PXSN_cjs.serializeUtxo(utxo);
464
+ const s = chunkY3CDDPWI_cjs.serializeUtxo(utxo);
465
465
  return [
466
466
  s.txid,
467
467
  s.vout,
@@ -491,8 +491,8 @@ var SQLiteWalletRepository = class {
491
491
  }
492
492
  // ── Transaction history ────────────────────────────────────────────
493
493
  async getTransactionHistoryPage(filter, page) {
494
- chunkT254PXSN_cjs.assertPageRequest(page);
495
- chunkT254PXSN_cjs.assertHistoryPageFilter(filter);
494
+ chunkY3CDDPWI_cjs.assertPageRequest(page);
495
+ chunkY3CDDPWI_cjs.assertHistoryPageFilter(filter);
496
496
  await this.ensureInit();
497
497
  const conditions = ["address = ?"];
498
498
  const params = [filter.address];
@@ -516,7 +516,7 @@ var SQLiteWalletRepository = class {
516
516
  ORDER BY created_at, boarding_txid, commitment_txid, ark_txid LIMIT ?`,
517
517
  [...params, page.limit + 1]
518
518
  );
519
- return chunkT254PXSN_cjs.pageResult(rows.map(txRowToDomain), page.limit, (tx) => ({
519
+ return chunkY3CDDPWI_cjs.pageResult(rows.map(txRowToDomain), page.limit, (tx) => ({
520
520
  createdAt: tx.createdAt,
521
521
  key: tx.key
522
522
  }));
@@ -536,7 +536,7 @@ var SQLiteWalletRepository = class {
536
536
  tx.amount,
537
537
  tx.settled ? 1 : 0,
538
538
  tx.createdAt,
539
- tx.assets ? JSON.stringify(chunkT254PXSN_cjs.serializeAssets(tx.assets)) : null
539
+ tx.assets ? JSON.stringify(chunkY3CDDPWI_cjs.serializeAssets(tx.assets)) : null
540
540
  ])
541
541
  );
542
542
  }
@@ -558,7 +558,7 @@ var SQLiteWalletRepository = class {
558
558
  settings: row.settings_json ? JSON.parse(row.settings_json) : void 0,
559
559
  lastSyncTime: row.last_sync_time ?? void 0
560
560
  } : {};
561
- const state = chunkT254PXSN_cjs.applyWalletStateUpdate(current, updater);
561
+ const state = chunkY3CDDPWI_cjs.applyWalletStateUpdate(current, updater);
562
562
  await tx.run(
563
563
  `INSERT OR REPLACE INTO ${this.tables.walletState}
564
564
  (key, settings_json, last_sync_time) VALUES (?, ?, ?)`,
@@ -631,9 +631,9 @@ function vtxoRowToDomain(row) {
631
631
  // Post-migration every row has `script`, but the backfill is
632
632
  // idempotent: derive from `address` if the legacy column is still
633
633
  // null (e.g. the migration hasn't run yet on this handle).
634
- script: row.script ?? chunkT254PXSN_cjs.scriptFromArkAddress(row.address)
634
+ script: row.script ?? chunkY3CDDPWI_cjs.scriptFromArkAddress(row.address)
635
635
  };
636
- return chunkT254PXSN_cjs.deserializeVtxo(serialized);
636
+ return chunkY3CDDPWI_cjs.deserializeVtxo(serialized);
637
637
  }
638
638
  function utxoRowToDomain(row) {
639
639
  const serialized = {
@@ -652,7 +652,7 @@ function utxoRowToDomain(row) {
652
652
  status: JSON.parse(row.status_json),
653
653
  extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
654
654
  };
655
- return chunkT254PXSN_cjs.deserializeUtxo(serialized);
655
+ return chunkY3CDDPWI_cjs.deserializeUtxo(serialized);
656
656
  }
657
657
  function txRowToDomain(row) {
658
658
  const tx = {
@@ -667,7 +667,7 @@ function txRowToDomain(row) {
667
667
  createdAt: row.created_at
668
668
  };
669
669
  if (row.assets_json) {
670
- tx.assets = chunkT254PXSN_cjs.deserializeAssets(JSON.parse(row.assets_json));
670
+ tx.assets = chunkY3CDDPWI_cjs.deserializeAssets(JSON.parse(row.assets_json));
671
671
  }
672
672
  return tx;
673
673
  }
@@ -737,9 +737,9 @@ var SQLiteContractRepository = class {
737
737
  }
738
738
  // ── Contract management ────────────────────────────────────────────
739
739
  async getContractsPage(filter, page) {
740
- chunkT254PXSN_cjs.assertPageRequest(page);
740
+ chunkY3CDDPWI_cjs.assertPageRequest(page);
741
741
  await this.ensureInit();
742
- if (chunkT254PXSN_cjs.contractFilterMatchesNothing(filter)) return { items: [] };
742
+ if (chunkY3CDDPWI_cjs.contractFilterMatchesNothing(filter)) return { items: [] };
743
743
  const conditions = [];
744
744
  const params = [];
745
745
  if (filter) {
@@ -758,12 +758,12 @@ var SQLiteContractRepository = class {
758
758
  [...params, ...after === void 0 ? [] : [after], page.limit + 1]
759
759
  );
760
760
  for (const contract of rows.map(contractRowToDomain)) {
761
- if (!wanted || wanted.includes(chunkT254PXSN_cjs.scopeOf(contract))) matches.push(contract);
761
+ if (!wanted || wanted.includes(chunkY3CDDPWI_cjs.scopeOf(contract))) matches.push(contract);
762
762
  }
763
763
  if (!wanted || rows.length <= page.limit || matches.length > page.limit) break;
764
764
  after = rows[rows.length - 1].script;
765
765
  }
766
- return chunkT254PXSN_cjs.pageResult(matches, page.limit, (contract) => contract.script);
766
+ return chunkY3CDDPWI_cjs.pageResult(matches, page.limit, (contract) => contract.script);
767
767
  }
768
768
  async saveContract(contract) {
769
769
  await this.ensureInit();
@@ -930,7 +930,7 @@ var SQLiteBatchRegistrationRepository = class {
930
930
  });
931
931
  }
932
932
  async getBatchRegistrationsPage(filter, page) {
933
- chunkT254PXSN_cjs.assertPageRequest(page);
933
+ chunkY3CDDPWI_cjs.assertPageRequest(page);
934
934
  await this.ensureInit();
935
935
  if (filter?.states?.length === 0) return { items: [] };
936
936
  const stateSql = filter?.states ? ` AND state IN (${filter.states.map(() => "?").join(", ")})` : "";
@@ -947,19 +947,19 @@ var SQLiteBatchRegistrationRepository = class {
947
947
  for (const row of batch) {
948
948
  after = row.intent_tx_id;
949
949
  const intent = rowToIntent(row);
950
- if (!filter || chunkT254PXSN_cjs.intentMatchesFilter(intent, filter)) rows.push(intent);
950
+ if (!filter || chunkY3CDDPWI_cjs.intentMatchesFilter(intent, filter)) rows.push(intent);
951
951
  if (rows.length > page.limit) break;
952
952
  }
953
953
  if (batch.length < batchSize) break;
954
954
  }
955
- return chunkT254PXSN_cjs.pageResult(rows, page.limit, (intent) => intent.proofTxId);
955
+ return chunkY3CDDPWI_cjs.pageResult(rows, page.limit, (intent) => intent.proofTxId);
956
956
  }
957
957
  async getLockedVtxoOutpoints() {
958
958
  await this.ensureInit();
959
959
  const rows = await this.db.all(`SELECT * FROM ${this.t}`);
960
960
  const out = [];
961
961
  for (const r of rows) {
962
- if (chunkT254PXSN_cjs.isTerminalBatchRegistrationState(r.state)) continue;
962
+ if (chunkY3CDDPWI_cjs.isTerminalBatchRegistrationState(r.state)) continue;
963
963
  for (const o of JSON.parse(r.intent_vtxos_json)) out.push(o);
964
964
  }
965
965
  return out;
@@ -1055,7 +1055,7 @@ var SQLiteVirtualTxRepository = class {
1055
1055
  const prev = prevByTxid.get(t.txid);
1056
1056
  const psbt = t.psbt ?? prev?.psbt ?? null;
1057
1057
  const expires = t.expiresAt ?? prev?.expires_at ?? null;
1058
- const type = chunkT254PXSN_cjs.mergeChainedTxType(t.type, prev?.type);
1058
+ const type = chunkY3CDDPWI_cjs.mergeChainedTxType(t.type, prev?.type);
1059
1059
  await tx.run(
1060
1060
  `INSERT OR REPLACE INTO ${this.tTx} (txid, psbt, expires_at, type) VALUES (?, ?, ?, ?)`,
1061
1061
  [t.txid, psbt, expires, type]
@@ -1141,7 +1141,7 @@ function rowToTx(r) {
1141
1141
 
1142
1142
  Object.defineProperty(exports, "ChainedTxType", {
1143
1143
  enumerable: true,
1144
- get: function () { return chunkT254PXSN_cjs.ChainedTxType; }
1144
+ get: function () { return chunkY3CDDPWI_cjs.ChainedTxType; }
1145
1145
  });
1146
1146
  exports.SQLiteBatchRegistrationRepository = SQLiteBatchRegistrationRepository;
1147
1147
  exports.SQLiteContractRepository = SQLiteContractRepository;