@arkade-os/sdk 0.4.41 → 0.4.42

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 (61) hide show
  1. package/dist/adapters/expo.cjs +4 -4
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +2 -2
  5. package/dist/adapters/indexedDB.cjs +3 -3
  6. package/dist/adapters/indexedDB.js +2 -2
  7. package/dist/{ark-CSqMJczW.d.cts → ark-CKDWpuGL.d.cts} +1 -1
  8. package/dist/{ark-CSqMJczW.d.ts → ark-CKDWpuGL.d.ts} +1 -1
  9. package/dist/{asyncStorageTaskQueue-SZPrhw23.d.ts → asyncStorageTaskQueue-BB2MffwG.d.ts} +1 -1
  10. package/dist/{asyncStorageTaskQueue-79XdGsdW.d.cts → asyncStorageTaskQueue-BpN8RRHR.d.cts} +1 -1
  11. package/dist/{chunk-DDG4RE5F.js → chunk-2V3BU2X6.js} +3 -3
  12. package/dist/{chunk-DDG4RE5F.js.map → chunk-2V3BU2X6.js.map} +1 -1
  13. package/dist/{chunk-5XAYUPK4.js → chunk-5X5YMZHB.js} +3 -3
  14. package/dist/{chunk-5XAYUPK4.js.map → chunk-5X5YMZHB.js.map} +1 -1
  15. package/dist/{chunk-3MPXMLP4.cjs → chunk-ED7JDFX4.cjs} +79 -79
  16. package/dist/{chunk-3MPXMLP4.cjs.map → chunk-ED7JDFX4.cjs.map} +1 -1
  17. package/dist/{chunk-MYI333YH.js → chunk-FLPPSRYH.js} +3 -3
  18. package/dist/{chunk-MYI333YH.js.map → chunk-FLPPSRYH.js.map} +1 -1
  19. package/dist/{chunk-KNASU3QI.cjs → chunk-HHPUCCB3.cjs} +7 -7
  20. package/dist/{chunk-KNASU3QI.cjs.map → chunk-HHPUCCB3.cjs.map} +1 -1
  21. package/dist/{chunk-WBF3FNS3.cjs → chunk-T2ACJD22.cjs} +11 -11
  22. package/dist/{chunk-WBF3FNS3.cjs.map → chunk-T2ACJD22.cjs.map} +1 -1
  23. package/dist/{chunk-D5MQYYYF.js → chunk-V3FCNVJE.js} +4 -4
  24. package/dist/{chunk-D5MQYYYF.js.map → chunk-V3FCNVJE.js.map} +1 -1
  25. package/dist/{chunk-ALISWEQ5.cjs → chunk-YEF5FL6E.cjs} +3 -3
  26. package/dist/{chunk-ALISWEQ5.cjs.map → chunk-YEF5FL6E.cjs.map} +1 -1
  27. package/dist/contracts/handlers/index.d.cts +3 -3
  28. package/dist/contracts/handlers/index.d.ts +3 -3
  29. package/dist/{delegate-BTn9BK8E.d.ts → delegate-DllAQ3Eu.d.ts} +1 -1
  30. package/dist/{delegate-Bqwe-kbj.d.cts → delegate-yjhcR9n4.d.cts} +1 -1
  31. package/dist/{index-aYiHTMkX.d.cts → index-D1te-ZR6.d.cts} +2 -2
  32. package/dist/{index-kITujXlS.d.ts → index-DVdCGyyH.d.ts} +2 -2
  33. package/dist/index.cjs +118 -118
  34. package/dist/index.d.cts +6 -6
  35. package/dist/index.d.ts +6 -6
  36. package/dist/index.js +2 -2
  37. package/dist/repositories/realm/index.cjs +11 -11
  38. package/dist/repositories/realm/index.d.cts +1 -1
  39. package/dist/repositories/realm/index.d.ts +1 -1
  40. package/dist/repositories/realm/index.js +2 -2
  41. package/dist/repositories/sqlite/index.cjs +11 -11
  42. package/dist/repositories/sqlite/index.d.cts +1 -1
  43. package/dist/repositories/sqlite/index.d.ts +1 -1
  44. package/dist/repositories/sqlite/index.js +2 -2
  45. package/dist/{taskRunner-BuBAZQwB.d.ts → taskRunner-BdiRy4iI.d.ts} +1 -1
  46. package/dist/{taskRunner-DRHElPMG.d.cts → taskRunner-CuTk8RYg.d.cts} +1 -1
  47. package/dist/wallet/expo/background.cjs +12 -12
  48. package/dist/wallet/expo/background.d.cts +3 -3
  49. package/dist/wallet/expo/background.d.ts +3 -3
  50. package/dist/wallet/expo/background.js +4 -4
  51. package/dist/wallet/expo/index.cjs +12 -12
  52. package/dist/wallet/expo/index.d.cts +4 -4
  53. package/dist/wallet/expo/index.d.ts +4 -4
  54. package/dist/wallet/expo/index.js +3 -3
  55. package/dist/{wallet-CTEQpKG9.d.ts → wallet-CrIVUQMb.d.ts} +2 -2
  56. package/dist/{wallet-BZgRfnAE.d.cts → wallet-CyPOQ0oM.d.cts} +2 -2
  57. package/dist/worker/expo/index.cjs +7 -7
  58. package/dist/worker/expo/index.d.cts +4 -4
  59. package/dist/worker/expo/index.d.ts +4 -4
  60. package/dist/worker/expo/index.js +3 -3
  61. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkALISWEQ5_cjs = require('./chunk-ALISWEQ5.cjs');
3
+ var chunkYEF5FL6E_cjs = require('./chunk-YEF5FL6E.cjs');
4
4
  var chunk32YKLQPS_cjs = require('./chunk-32YKLQPS.cjs');
5
5
  var chunkHXDZ2QTW_cjs = require('./chunk-HXDZ2QTW.cjs');
6
6
  var utils_js = require('@scure/btc-signer/utils.js');
@@ -181,7 +181,7 @@ var TreeSignerSession = class _TreeSignerSession {
181
181
  noncesByPubkey.set(base.hex.encode(myPublicKey.subarray(1)), myNonce);
182
182
  const tx = this.graph.find(txid);
183
183
  if (!tx) throw new Error(`missing tx for txid ${txid}`);
184
- const cosigners = chunkALISWEQ5_cjs.getArkPsbtFields(tx.root, 0, chunkALISWEQ5_cjs.CosignerPublicKey).map(
184
+ const cosigners = chunkYEF5FL6E_cjs.getArkPsbtFields(tx.root, 0, chunkYEF5FL6E_cjs.CosignerPublicKey).map(
185
185
  (c) => base.hex.encode(c.key.subarray(1))
186
186
  // xonly pubkey
187
187
  );
@@ -233,7 +233,7 @@ var TreeSignerSession = class _TreeSignerSession {
233
233
  if (!aggNonce) throw new Error("missing aggregate nonce");
234
234
  const prevoutAmounts = [];
235
235
  const prevoutScripts = [];
236
- const cosigners = chunkALISWEQ5_cjs.getArkPsbtFields(g.root, 0, chunkALISWEQ5_cjs.CosignerPublicKey).map((c) => c.key);
236
+ const cosigners = chunkYEF5FL6E_cjs.getArkPsbtFields(g.root, 0, chunkYEF5FL6E_cjs.CosignerPublicKey).map((c) => c.key);
237
237
  const { finalKey } = aggregateKeys(cosigners, true, {
238
238
  taprootTweak: this.scriptRoot
239
239
  });
@@ -980,14 +980,14 @@ var RestDelegateProvider = class {
980
980
  */
981
981
  async delegate(intent, forfeitTxs, options) {
982
982
  const url = `${this.url}/v1/delegate`;
983
- const response = await chunkALISWEQ5_cjs.baseFetch(url, {
983
+ const response = await chunkYEF5FL6E_cjs.baseFetch(url, {
984
984
  method: "POST",
985
985
  headers: {
986
986
  "Content-Type": "application/json"
987
987
  },
988
988
  body: JSON.stringify({
989
989
  intent: {
990
- message: chunkALISWEQ5_cjs.Intent.encodeMessage(intent.message),
990
+ message: chunkYEF5FL6E_cjs.Intent.encodeMessage(intent.message),
991
991
  proof: intent.proof
992
992
  },
993
993
  forfeit_txs: forfeitTxs,
@@ -1007,7 +1007,7 @@ var RestDelegateProvider = class {
1007
1007
  */
1008
1008
  async getDelegateInfo() {
1009
1009
  const url = `${this.url}/v1/delegator/info`;
1010
- const response = await chunkALISWEQ5_cjs.baseFetch(url);
1010
+ const response = await chunkYEF5FL6E_cjs.baseFetch(url);
1011
1011
  if (!response.ok) {
1012
1012
  const errorText2 = await response.text();
1013
1013
  throw new Error(`Failed to get delegate info: ${errorText2}`);
@@ -1042,14 +1042,14 @@ var EsploraProvider = class {
1042
1042
  pollingInterval;
1043
1043
  forcePolling;
1044
1044
  async getCoins(address) {
1045
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/address/${address}/utxo`);
1045
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/address/${address}/utxo`);
1046
1046
  if (!response.ok) {
1047
1047
  throw new Error(`Failed to fetch UTXOs: ${response.statusText}`);
1048
1048
  }
1049
1049
  return response.json();
1050
1050
  }
1051
1051
  async getFeeRate() {
1052
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/fee-estimates`);
1052
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/fee-estimates`);
1053
1053
  if (response.status === 404) {
1054
1054
  return void 0;
1055
1055
  }
@@ -1070,7 +1070,7 @@ var EsploraProvider = class {
1070
1070
  }
1071
1071
  }
1072
1072
  async getTxOutspends(txid) {
1073
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/outspends`);
1073
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/outspends`);
1074
1074
  if (!response.ok) {
1075
1075
  const error = await response.text();
1076
1076
  throw new Error(`Failed to get transaction outspends: ${error}`);
@@ -1078,7 +1078,7 @@ var EsploraProvider = class {
1078
1078
  return response.json();
1079
1079
  }
1080
1080
  async getTransactions(address) {
1081
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/address/${address}/txs`);
1081
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/address/${address}/txs`);
1082
1082
  if (!response.ok) {
1083
1083
  const error = await response.text();
1084
1084
  throw new Error(`Failed to get transactions: ${error}`);
@@ -1086,7 +1086,7 @@ var EsploraProvider = class {
1086
1086
  return response.json();
1087
1087
  }
1088
1088
  async getTxStatus(txid) {
1089
- const txresponse = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/tx/${txid}`);
1089
+ const txresponse = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/tx/${txid}`);
1090
1090
  if (!txresponse.ok) {
1091
1091
  throw new Error(txresponse.statusText);
1092
1092
  }
@@ -1094,7 +1094,7 @@ var EsploraProvider = class {
1094
1094
  if (!tx.status.confirmed) {
1095
1095
  return { confirmed: false };
1096
1096
  }
1097
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/status`);
1097
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/status`);
1098
1098
  if (!response.ok) {
1099
1099
  throw new Error(`Failed to get transaction status: ${response.statusText}`);
1100
1100
  }
@@ -1178,7 +1178,7 @@ var EsploraProvider = class {
1178
1178
  return stopFunc;
1179
1179
  }
1180
1180
  async getChainTip() {
1181
- const tipBlocks = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/blocks`);
1181
+ const tipBlocks = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/blocks`);
1182
1182
  if (!tipBlocks.ok) {
1183
1183
  throw new Error(`Failed to get chain tip: ${tipBlocks.statusText}`);
1184
1184
  }
@@ -1197,7 +1197,7 @@ var EsploraProvider = class {
1197
1197
  };
1198
1198
  }
1199
1199
  async broadcastPackage(parent, child) {
1200
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/txs/package`, {
1200
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/txs/package`, {
1201
1201
  method: "POST",
1202
1202
  headers: {
1203
1203
  "Content-Type": "application/json"
@@ -1211,7 +1211,7 @@ var EsploraProvider = class {
1211
1211
  return response.json();
1212
1212
  }
1213
1213
  async broadcastTx(tx) {
1214
- const response = await chunkALISWEQ5_cjs.baseFetch(`${this.baseUrl}/tx`, {
1214
+ const response = await chunkYEF5FL6E_cjs.baseFetch(`${this.baseUrl}/tx`, {
1215
1215
  method: "POST",
1216
1216
  headers: {
1217
1217
  "Content-Type": "text/plain"
@@ -1282,7 +1282,7 @@ function buildForfeitTx(inputs, forfeitPkScript, txLocktime) {
1282
1282
  );
1283
1283
  }
1284
1284
  function buildForfeitTxWithOutput(inputs, output, txLocktime) {
1285
- const tx = new chunkALISWEQ5_cjs.Transaction({
1285
+ const tx = new chunkYEF5FL6E_cjs.Transaction({
1286
1286
  version: 3,
1287
1287
  lockTime: txLocktime
1288
1288
  });
@@ -1358,7 +1358,7 @@ function validateVtxoTxGraph(graph, roundTransaction, sweepTapTreeRoot) {
1358
1358
  if (previousScriptKey.length !== 32) {
1359
1359
  throw new Error(`parent output ${childIndex} has invalid script`);
1360
1360
  }
1361
- const cosigners = chunkALISWEQ5_cjs.getArkPsbtFields(child.root, 0, chunkALISWEQ5_cjs.CosignerPublicKey);
1361
+ const cosigners = chunkYEF5FL6E_cjs.getArkPsbtFields(child.root, 0, chunkYEF5FL6E_cjs.CosignerPublicKey);
1362
1362
  if (cosigners.length === 0) {
1363
1363
  throw ErrMissingCosignersPublicKeys;
1364
1364
  }
@@ -1458,7 +1458,7 @@ var Extension = class _Extension {
1458
1458
  `expected magic prefix ${base.hex.encode(ARKADE_MAGIC)}, got ${base.hex.encode(payload.slice(0, Math.min(payload.length, ARKADE_MAGIC.length)))}`
1459
1459
  );
1460
1460
  }
1461
- const reader = new chunkALISWEQ5_cjs.BufferReader(payload.slice(ARKADE_MAGIC.length));
1461
+ const reader = new chunkYEF5FL6E_cjs.BufferReader(payload.slice(ARKADE_MAGIC.length));
1462
1462
  const packets = [];
1463
1463
  while (reader.remaining() > 0) {
1464
1464
  const packetType = reader.readByte();
@@ -1532,7 +1532,7 @@ var Extension = class _Extension {
1532
1532
  */
1533
1533
  getAssetPacket() {
1534
1534
  for (const p of this.packets) {
1535
- if (p instanceof chunkALISWEQ5_cjs.Packet) {
1535
+ if (p instanceof chunkYEF5FL6E_cjs.Packet) {
1536
1536
  return p;
1537
1537
  }
1538
1538
  }
@@ -1540,8 +1540,8 @@ var Extension = class _Extension {
1540
1540
  }
1541
1541
  };
1542
1542
  function parsePacket(packetType, data) {
1543
- if (packetType === chunkALISWEQ5_cjs.Packet.PACKET_TYPE) {
1544
- return chunkALISWEQ5_cjs.Packet.fromBytes(data);
1543
+ if (packetType === chunkYEF5FL6E_cjs.Packet.PACKET_TYPE) {
1544
+ return chunkYEF5FL6E_cjs.Packet.fromBytes(data);
1545
1545
  }
1546
1546
  return new UnknownPacket(packetType, data);
1547
1547
  }
@@ -1848,7 +1848,7 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
1848
1848
  const existing = inputsByAssetId.get(asset.assetId);
1849
1849
  inputsByAssetId.set(asset.assetId, [
1850
1850
  ...existing ?? [],
1851
- chunkALISWEQ5_cjs.AssetInput.create(inputIndex, asset.amount)
1851
+ chunkYEF5FL6E_cjs.AssetInput.create(inputIndex, asset.amount)
1852
1852
  ]);
1853
1853
  }
1854
1854
  }
@@ -1860,7 +1860,7 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
1860
1860
  const existing = outputsByAssetId.get(asset.assetId);
1861
1861
  outputsByAssetId.set(asset.assetId, [
1862
1862
  ...existing ?? [],
1863
- chunkALISWEQ5_cjs.AssetOutput.create(outputIndex, asset.amount)
1863
+ chunkYEF5FL6E_cjs.AssetOutput.create(outputIndex, asset.amount)
1864
1864
  ]);
1865
1865
  }
1866
1866
  }
@@ -1871,7 +1871,7 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
1871
1871
  const existing = outputsByAssetId.get(asset.assetId);
1872
1872
  outputsByAssetId.set(asset.assetId, [
1873
1873
  ...existing ?? [],
1874
- chunkALISWEQ5_cjs.AssetOutput.create(outputIndex, asset.amount)
1874
+ chunkYEF5FL6E_cjs.AssetOutput.create(outputIndex, asset.amount)
1875
1875
  ]);
1876
1876
  }
1877
1877
  }
@@ -1880,11 +1880,11 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
1880
1880
  for (const assetIdStr of allAssetIds) {
1881
1881
  const inputs = inputsByAssetId.get(assetIdStr);
1882
1882
  const outputs = outputsByAssetId.get(assetIdStr);
1883
- const assetId = chunkALISWEQ5_cjs.AssetId.fromString(assetIdStr);
1884
- const group = chunkALISWEQ5_cjs.AssetGroup.create(assetId, null, inputs ?? [], outputs ?? [], []);
1883
+ const assetId = chunkYEF5FL6E_cjs.AssetId.fromString(assetIdStr);
1884
+ const group = chunkYEF5FL6E_cjs.AssetGroup.create(assetId, null, inputs ?? [], outputs ?? [], []);
1885
1885
  groups.push(group);
1886
1886
  }
1887
- return chunkALISWEQ5_cjs.Packet.create(groups);
1887
+ return chunkYEF5FL6E_cjs.Packet.create(groups);
1888
1888
  }
1889
1889
  function selectCoinsWithAsset(coins, assetId, requiredAmount) {
1890
1890
  const coinsWithAsset = coins.filter((coin) => coin.assets?.some((a) => a.assetId === assetId));
@@ -2001,7 +2001,7 @@ function buildVirtualTx(inputs, outputs) {
2001
2001
  }
2002
2002
  }
2003
2003
  }
2004
- const tx = new chunkALISWEQ5_cjs.Transaction({
2004
+ const tx = new chunkYEF5FL6E_cjs.Transaction({
2005
2005
  version: 3,
2006
2006
  lockTime: Number(lockTime)
2007
2007
  });
@@ -2016,7 +2016,7 @@ function buildVirtualTx(inputs, outputs) {
2016
2016
  },
2017
2017
  tapLeafScript: [input.tapLeafScript]
2018
2018
  });
2019
- chunkALISWEQ5_cjs.setArkPsbtField(tx, i, chunkALISWEQ5_cjs.VtxoTaprootTree, input.tapTree);
2019
+ chunkYEF5FL6E_cjs.setArkPsbtField(tx, i, chunkYEF5FL6E_cjs.VtxoTaprootTree, input.tapTree);
2020
2020
  }
2021
2021
  for (const output of outputs) {
2022
2022
  tx.addOutput(output);
@@ -3124,7 +3124,7 @@ var VtxoManager = class _VtxoManager {
3124
3124
  `Sweep not economical: output ${outputAmount} sats after ${fee} sats fee is below dust (${dustAmount} sats)`
3125
3125
  );
3126
3126
  }
3127
- const tx = new chunkALISWEQ5_cjs.Transaction();
3127
+ const tx = new chunkYEF5FL6E_cjs.Transaction();
3128
3128
  for (const utxo of expiredUtxos) {
3129
3129
  const utxoScript = chunkHXDZ2QTW_cjs.VtxoScript.decode(utxo.tapTree);
3130
3130
  const utxoExitLeaf = utxoScript.leaves.find(
@@ -3762,7 +3762,7 @@ var VtxoManager = class _VtxoManager {
3762
3762
  * or doesn't carry the metadata.
3763
3763
  */
3764
3764
  extractSpentOutpoint(error) {
3765
- const ark = chunkALISWEQ5_cjs.maybeArkError(error);
3765
+ const ark = chunkYEF5FL6E_cjs.maybeArkError(error);
3766
3766
  if (!ark || ark.name !== "VTXO_ALREADY_SPENT") return void 0;
3767
3767
  const raw = ark.metadata?.vtxo_outpoint;
3768
3768
  if (typeof raw !== "string") return void 0;
@@ -4673,7 +4673,7 @@ var AssetManager = class extends ReadonlyAssetManager {
4673
4673
  const virtualCoins = await this.wallet.getVtxos({
4674
4674
  withRecoverable: false
4675
4675
  });
4676
- const controlAssetRef = params.controlAssetId ? chunkALISWEQ5_cjs.AssetRef.fromId(chunkALISWEQ5_cjs.AssetId.fromString(params.controlAssetId)) : null;
4676
+ const controlAssetRef = params.controlAssetId ? chunkYEF5FL6E_cjs.AssetRef.fromId(chunkYEF5FL6E_cjs.AssetId.fromString(params.controlAssetId)) : null;
4677
4677
  const coinSelection = selectVirtualCoins(virtualCoins, Number(this.wallet.dustAmount));
4678
4678
  let totalBtcSelected = 0n;
4679
4679
  const assetChanges = /* @__PURE__ */ new Map();
@@ -4686,8 +4686,8 @@ var AssetManager = class extends ReadonlyAssetManager {
4686
4686
  }
4687
4687
  }
4688
4688
  const groups = [];
4689
- const issuedAssetOutput = chunkALISWEQ5_cjs.AssetOutput.create(0, params.amount);
4690
- const issuedAssetGroup = chunkALISWEQ5_cjs.AssetGroup.create(
4689
+ const issuedAssetOutput = chunkYEF5FL6E_cjs.AssetOutput.create(0, params.amount);
4690
+ const issuedAssetGroup = chunkYEF5FL6E_cjs.AssetGroup.create(
4691
4691
  null,
4692
4692
  controlAssetRef,
4693
4693
  [],
@@ -4702,15 +4702,15 @@ var AssetManager = class extends ReadonlyAssetManager {
4702
4702
  for (const [inputIndex, assets] of assetInputs) {
4703
4703
  for (const asset of assets) {
4704
4704
  if (asset.assetId !== assetId) continue;
4705
- changeInputs.push(chunkALISWEQ5_cjs.AssetInput.create(inputIndex, asset.amount));
4705
+ changeInputs.push(chunkYEF5FL6E_cjs.AssetInput.create(inputIndex, asset.amount));
4706
4706
  }
4707
4707
  }
4708
4708
  groups.push(
4709
- chunkALISWEQ5_cjs.AssetGroup.create(
4710
- chunkALISWEQ5_cjs.AssetId.fromString(assetId),
4709
+ chunkYEF5FL6E_cjs.AssetGroup.create(
4710
+ chunkYEF5FL6E_cjs.AssetId.fromString(assetId),
4711
4711
  null,
4712
4712
  changeInputs,
4713
- [chunkALISWEQ5_cjs.AssetOutput.create(0, amount)],
4713
+ [chunkYEF5FL6E_cjs.AssetOutput.create(0, amount)],
4714
4714
  []
4715
4715
  )
4716
4716
  );
@@ -4723,7 +4723,7 @@ var AssetManager = class extends ReadonlyAssetManager {
4723
4723
  script: outputAddress.pkScript,
4724
4724
  amount: BigInt(totalBtcSelected)
4725
4725
  },
4726
- Extension.create([chunkALISWEQ5_cjs.Packet.create(groups)]).txOut()
4726
+ Extension.create([chunkYEF5FL6E_cjs.Packet.create(groups)]).txOut()
4727
4727
  ];
4728
4728
  const { arkTxid } = await this.wallet.buildAndSubmitOffchainTx(
4729
4729
  coinSelection.inputs,
@@ -4731,7 +4731,7 @@ var AssetManager = class extends ReadonlyAssetManager {
4731
4731
  );
4732
4732
  return {
4733
4733
  arkTxId: arkTxid,
4734
- assetId: chunkALISWEQ5_cjs.AssetId.create(arkTxid, 0).toString()
4734
+ assetId: chunkYEF5FL6E_cjs.AssetId.create(arkTxid, 0).toString()
4735
4735
  };
4736
4736
  }
4737
4737
  /**
@@ -4803,16 +4803,16 @@ var AssetManager = class extends ReadonlyAssetManager {
4803
4803
  for (const [inputIndex, assets] of assetInputs) {
4804
4804
  for (const asset of assets) {
4805
4805
  if (asset.assetId !== params.assetId) continue;
4806
- reissueInputs.push(chunkALISWEQ5_cjs.AssetInput.create(inputIndex, asset.amount));
4806
+ reissueInputs.push(chunkYEF5FL6E_cjs.AssetInput.create(inputIndex, asset.amount));
4807
4807
  }
4808
4808
  }
4809
4809
  const totalAssetAmount = assetToReissueAmount + params.amount;
4810
- const reissueAssetIdObj = chunkALISWEQ5_cjs.AssetId.fromString(params.assetId);
4811
- const reissueAssetGroup = chunkALISWEQ5_cjs.AssetGroup.create(
4810
+ const reissueAssetIdObj = chunkYEF5FL6E_cjs.AssetId.fromString(params.assetId);
4811
+ const reissueAssetGroup = chunkYEF5FL6E_cjs.AssetGroup.create(
4812
4812
  reissueAssetIdObj,
4813
4813
  null,
4814
4814
  reissueInputs,
4815
- [chunkALISWEQ5_cjs.AssetOutput.create(0, totalAssetAmount)],
4815
+ [chunkYEF5FL6E_cjs.AssetOutput.create(0, totalAssetAmount)],
4816
4816
  []
4817
4817
  );
4818
4818
  const groups = [reissueAssetGroup];
@@ -4821,15 +4821,15 @@ var AssetManager = class extends ReadonlyAssetManager {
4821
4821
  for (const [inputIndex, assets] of assetInputs) {
4822
4822
  for (const asset of assets) {
4823
4823
  if (asset.assetId !== assetId) continue;
4824
- changeInputs.push(chunkALISWEQ5_cjs.AssetInput.create(inputIndex, asset.amount));
4824
+ changeInputs.push(chunkYEF5FL6E_cjs.AssetInput.create(inputIndex, asset.amount));
4825
4825
  }
4826
4826
  }
4827
4827
  groups.push(
4828
- chunkALISWEQ5_cjs.AssetGroup.create(
4829
- chunkALISWEQ5_cjs.AssetId.fromString(assetId),
4828
+ chunkYEF5FL6E_cjs.AssetGroup.create(
4829
+ chunkYEF5FL6E_cjs.AssetId.fromString(assetId),
4830
4830
  null,
4831
4831
  changeInputs,
4832
- [chunkALISWEQ5_cjs.AssetOutput.create(0, amount)],
4832
+ [chunkYEF5FL6E_cjs.AssetOutput.create(0, amount)],
4833
4833
  []
4834
4834
  )
4835
4835
  );
@@ -4841,7 +4841,7 @@ var AssetManager = class extends ReadonlyAssetManager {
4841
4841
  script: outputAddress.pkScript,
4842
4842
  amount: BigInt(totalBtcSelected)
4843
4843
  },
4844
- Extension.create([chunkALISWEQ5_cjs.Packet.create(groups)]).txOut()
4844
+ Extension.create([chunkYEF5FL6E_cjs.Packet.create(groups)]).txOut()
4845
4845
  ];
4846
4846
  const { arkTxid } = await this.wallet.buildAndSubmitOffchainTx(selectedCoins, outputs);
4847
4847
  return arkTxid;
@@ -4908,15 +4908,15 @@ var AssetManager = class extends ReadonlyAssetManager {
4908
4908
  for (const [inputIndex, assets] of assetInputs) {
4909
4909
  for (const asset of assets) {
4910
4910
  if (asset.assetId !== assetId) continue;
4911
- changeInputs.push(chunkALISWEQ5_cjs.AssetInput.create(inputIndex, asset.amount));
4911
+ changeInputs.push(chunkYEF5FL6E_cjs.AssetInput.create(inputIndex, asset.amount));
4912
4912
  }
4913
4913
  }
4914
4914
  groups.push(
4915
- chunkALISWEQ5_cjs.AssetGroup.create(
4916
- chunkALISWEQ5_cjs.AssetId.fromString(assetId),
4915
+ chunkYEF5FL6E_cjs.AssetGroup.create(
4916
+ chunkYEF5FL6E_cjs.AssetId.fromString(assetId),
4917
4917
  null,
4918
4918
  changeInputs,
4919
- amount > 0n ? [chunkALISWEQ5_cjs.AssetOutput.create(0, amount)] : [],
4919
+ amount > 0n ? [chunkYEF5FL6E_cjs.AssetOutput.create(0, amount)] : [],
4920
4920
  []
4921
4921
  )
4922
4922
  );
@@ -4928,7 +4928,7 @@ var AssetManager = class extends ReadonlyAssetManager {
4928
4928
  script: outputAddress.pkScript,
4929
4929
  amount: BigInt(totalBtcSelected)
4930
4930
  },
4931
- Extension.create([chunkALISWEQ5_cjs.Packet.create(groups)]).txOut()
4931
+ Extension.create([chunkYEF5FL6E_cjs.Packet.create(groups)]).txOut()
4932
4932
  ];
4933
4933
  const { arkTxid } = await this.wallet.buildAndSubmitOffchainTx(selectedCoins, outputs);
4934
4934
  return arkTxid;
@@ -4953,7 +4953,7 @@ function castMetadata(metadata) {
4953
4953
  } else {
4954
4954
  throw new Error("Invalid metadata value type");
4955
4955
  }
4956
- md.push(chunkALISWEQ5_cjs.Metadata.create(textEncoder.encode(key), valueBytes));
4956
+ md.push(chunkYEF5FL6E_cjs.Metadata.create(textEncoder.encode(key), valueBytes));
4957
4957
  }
4958
4958
  return md;
4959
4959
  }
@@ -5238,7 +5238,7 @@ async function makeSignedDelegateIntent(identity, coins, outputs, onchainOutputs
5238
5238
  expire_at: 0,
5239
5239
  cosigners_public_keys: cosignerPubKeys
5240
5240
  };
5241
- const proof = chunkALISWEQ5_cjs.Intent.create(message, coins, outputs);
5241
+ const proof = chunkYEF5FL6E_cjs.Intent.create(message, coins, outputs);
5242
5242
  const signedProof = await identity.sign(proof);
5243
5243
  return {
5244
5244
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -6987,7 +6987,7 @@ var ContractWatcher = class {
6987
6987
  this.connectionState = "connected";
6988
6988
  this.reconnectAttempts = 0;
6989
6989
  this.listenLoop().catch((e) => {
6990
- if (chunkALISWEQ5_cjs.isEventSourceError(e)) {
6990
+ if (chunkYEF5FL6E_cjs.isEventSourceError(e)) {
6991
6991
  console.debug("ContractWatcher subscription disconnected; reconnecting");
6992
6992
  } else {
6993
6993
  console.error(e);
@@ -7138,7 +7138,7 @@ var ContractWatcher = class {
7138
7138
  this.subscriptionId
7139
7139
  );
7140
7140
  } catch (error) {
7141
- const isStale = error instanceof Error && /subscription\s+\S+\s+not\s+found/i.test(error.message);
7141
+ const isStale = error instanceof Error && /subscription\b.*\bnot\s+found/i.test(error.message);
7142
7142
  if (this.subscriptionId && isStale) {
7143
7143
  this.subscriptionId = void 0;
7144
7144
  this.subscriptionId = await this.config.indexerProvider.subscribeForScripts(scriptsToWatch);
@@ -8945,7 +8945,7 @@ var ReadonlyWallet = class _ReadonlyWallet {
8945
8945
  */
8946
8946
  static async setupWalletConfig(config, pubKey) {
8947
8947
  const arkadeServerUrl = getArkadeServerUrl(config);
8948
- const arkProvider = config.arkProvider || new chunkALISWEQ5_cjs.RestArkProvider(arkadeServerUrl);
8948
+ const arkProvider = config.arkProvider || new chunkYEF5FL6E_cjs.RestArkProvider(arkadeServerUrl);
8949
8949
  let indexerProvider = config.indexerProvider;
8950
8950
  if (!indexerProvider) {
8951
8951
  let indexerUrl = config.indexerUrl;
@@ -8962,7 +8962,7 @@ var ReadonlyWallet = class _ReadonlyWallet {
8962
8962
  indexerUrl = arkadeServerUrl;
8963
8963
  }
8964
8964
  }
8965
- indexerProvider = new chunkALISWEQ5_cjs.RestIndexerProvider(indexerUrl);
8965
+ indexerProvider = new chunkYEF5FL6E_cjs.RestIndexerProvider(indexerUrl);
8966
8966
  }
8967
8967
  const info = await arkProvider.getInfo();
8968
8968
  const network = chunkHXDZ2QTW_cjs.getNetwork(info.network);
@@ -10917,7 +10917,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
10917
10917
  try {
10918
10918
  return await this.arkProvider.registerIntent(intent);
10919
10919
  } catch (error) {
10920
- if (error instanceof chunkALISWEQ5_cjs.ArkError && error.code === 0 && error.message.includes("duplicated input")) {
10920
+ if (error instanceof chunkYEF5FL6E_cjs.ArkError && error.code === 0 && error.message.includes("duplicated input")) {
10921
10921
  const deleteIntent = await this.makeDeleteIntentSignature(inputs);
10922
10922
  await this.arkProvider.deleteIntent(deleteIntent);
10923
10923
  return this.arkProvider.registerIntent(intent);
@@ -10933,7 +10933,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
10933
10933
  expire_at: 0,
10934
10934
  cosigners_public_keys: cosignerPubKeys
10935
10935
  };
10936
- const proof = chunkALISWEQ5_cjs.Intent.create(message, coins, outputs);
10936
+ const proof = chunkYEF5FL6E_cjs.Intent.create(message, coins, outputs);
10937
10937
  const signedProof = await this._signerRouter.sign(proof, intentProofJobs(coins));
10938
10938
  return {
10939
10939
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -10945,7 +10945,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
10945
10945
  type: "delete",
10946
10946
  expire_at: 0
10947
10947
  };
10948
- const proof = chunkALISWEQ5_cjs.Intent.create(message, coins, []);
10948
+ const proof = chunkYEF5FL6E_cjs.Intent.create(message, coins, []);
10949
10949
  const signedProof = await this._signerRouter.sign(proof, intentProofJobs(coins));
10950
10950
  return {
10951
10951
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -10957,7 +10957,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
10957
10957
  type: "get-pending-tx",
10958
10958
  expire_at: 0
10959
10959
  };
10960
- const proof = chunkALISWEQ5_cjs.Intent.create(message, coins, []);
10960
+ const proof = chunkYEF5FL6E_cjs.Intent.create(message, coins, []);
10961
10961
  const signedProof = await this._signerRouter.sign(proof, intentProofJobs(coins));
10962
10962
  return {
10963
10963
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -11915,7 +11915,7 @@ var MessageBus = class {
11915
11915
  this.initialized = true;
11916
11916
  }
11917
11917
  async buildServices(config) {
11918
- const arkProvider = new chunkALISWEQ5_cjs.RestArkProvider(config.arkServer.url);
11918
+ const arkProvider = new chunkYEF5FL6E_cjs.RestArkProvider(config.arkServer.url);
11919
11919
  const storage = {
11920
11920
  walletRepository: this.walletRepository,
11921
11921
  contractRepository: this.contractRepository
@@ -13072,7 +13072,7 @@ var WalletMessageHandler = class {
13072
13072
  // Wallet methods
13073
13073
  async handleInitWallet({ payload }) {
13074
13074
  const { arkServerUrl } = payload;
13075
- this.indexerProvider = new chunkALISWEQ5_cjs.RestIndexerProvider(arkServerUrl);
13075
+ this.indexerProvider = new chunkYEF5FL6E_cjs.RestIndexerProvider(arkServerUrl);
13076
13076
  await this.onWalletInitialized();
13077
13077
  }
13078
13078
  async handleGetBalance() {
@@ -14879,7 +14879,7 @@ var OnchainWallet = class _OnchainWallet {
14879
14879
  if (!inputs) {
14880
14880
  throw new Error("Fee estimation failed");
14881
14881
  }
14882
- let tx = new chunkALISWEQ5_cjs.Transaction();
14882
+ let tx = new chunkYEF5FL6E_cjs.Transaction();
14883
14883
  for (const input of inputs) {
14884
14884
  tx.addInput({
14885
14885
  txid: input.txid,
@@ -14910,7 +14910,7 @@ var OnchainWallet = class _OnchainWallet {
14910
14910
  */
14911
14911
  async bumpP2A(parent) {
14912
14912
  const parentVsize = parent.vsize;
14913
- let child = new chunkALISWEQ5_cjs.Transaction({
14913
+ let child = new chunkYEF5FL6E_cjs.Transaction({
14914
14914
  version: 3,
14915
14915
  allowLegacyWitnessUtxo: true
14916
14916
  });
@@ -15676,7 +15676,7 @@ exports.BIP322 = void 0;
15676
15676
  async function sign2(message, identity, network) {
15677
15677
  const xOnlyPubKey = await identity.xOnlyPublicKey();
15678
15678
  const payment = btcSigner.p2tr(xOnlyPubKey, void 0, network);
15679
- const toSpend = chunkALISWEQ5_cjs.craftToSpendTx(message, payment.script, TAG_BIP322);
15679
+ const toSpend = chunkYEF5FL6E_cjs.craftToSpendTx(message, payment.script, TAG_BIP322);
15680
15680
  const toSign = craftBIP322ToSignP2TR(toSpend, payment.script, xOnlyPubKey);
15681
15681
  const signed = await identity.sign(toSign, [0]);
15682
15682
  signed.finalizeIdx(0);
@@ -15734,7 +15734,7 @@ function verifyP2TR(message, witnessItems, pkScript, pubkey) {
15734
15734
  if (sighashType !== btcSigner.SigHash.DEFAULT && sighashType !== btcSigner.SigHash.ALL) {
15735
15735
  return false;
15736
15736
  }
15737
- const toSpend = chunkALISWEQ5_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
15737
+ const toSpend = chunkYEF5FL6E_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
15738
15738
  const toSign = craftBIP322ToSignP2TR(toSpend, pkScript, pubkey);
15739
15739
  const sighash = toSign.preimageWitnessV1(0, [pkScript], sighashType, [0n]);
15740
15740
  const rawSig = sig.length === 65 ? sig.subarray(0, 64) : sig;
@@ -15755,7 +15755,7 @@ function verifyP2WPKH(message, witnessItems, pkScript, addressHash) {
15755
15755
  }
15756
15756
  const sighashType = sigWithHash[sigWithHash.length - 1];
15757
15757
  const derSig = sigWithHash.subarray(0, sigWithHash.length - 1);
15758
- const toSpend = chunkALISWEQ5_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
15758
+ const toSpend = chunkYEF5FL6E_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
15759
15759
  const toSign = craftBIP322ToSignSimple(toSpend, pkScript);
15760
15760
  const scriptCode = btcSigner.OutScript.encode({ type: "pkh", hash: addressHash });
15761
15761
  const sighash = toSign.preimageWitnessV0(0, scriptCode, sighashType, 0n);
@@ -15808,7 +15808,7 @@ function encodeCompactSize(n) {
15808
15808
  return buf;
15809
15809
  }
15810
15810
  function craftBIP322ToSignP2TR(toSpend, pkScript, tapInternalKey) {
15811
- const tx = new chunkALISWEQ5_cjs.Transaction({ version: 0 });
15811
+ const tx = new chunkYEF5FL6E_cjs.Transaction({ version: 0 });
15812
15812
  tx.addInput({
15813
15813
  txid: toSpend.id,
15814
15814
  index: 0,
@@ -15822,12 +15822,12 @@ function craftBIP322ToSignP2TR(toSpend, pkScript, tapInternalKey) {
15822
15822
  });
15823
15823
  tx.addOutput({
15824
15824
  amount: 0n,
15825
- script: chunkALISWEQ5_cjs.OP_RETURN_EMPTY_PKSCRIPT
15825
+ script: chunkYEF5FL6E_cjs.OP_RETURN_EMPTY_PKSCRIPT
15826
15826
  });
15827
15827
  return tx;
15828
15828
  }
15829
15829
  function craftBIP322ToSignSimple(toSpend, pkScript) {
15830
- const tx = new chunkALISWEQ5_cjs.Transaction({ version: 0 });
15830
+ const tx = new chunkYEF5FL6E_cjs.Transaction({ version: 0 });
15831
15831
  tx.addInput({
15832
15832
  txid: toSpend.id,
15833
15833
  index: 0,
@@ -15839,7 +15839,7 @@ function craftBIP322ToSignSimple(toSpend, pkScript) {
15839
15839
  });
15840
15840
  tx.addOutput({
15841
15841
  amount: 0n,
15842
- script: chunkALISWEQ5_cjs.OP_RETURN_EMPTY_PKSCRIPT
15842
+ script: chunkYEF5FL6E_cjs.OP_RETURN_EMPTY_PKSCRIPT
15843
15843
  });
15844
15844
  return tx;
15845
15845
  }
@@ -15900,7 +15900,7 @@ exports.Unroll = void 0;
15900
15900
  if (virtualTxs.txs.length === 0) {
15901
15901
  throw new Error(`Tx ${nextTxToBroadcast.txid} not found`);
15902
15902
  }
15903
- const tx = chunkALISWEQ5_cjs.Transaction.fromPSBT(base.base64.decode(virtualTxs.txs[0]));
15903
+ const tx = chunkYEF5FL6E_cjs.Transaction.fromPSBT(base.base64.decode(virtualTxs.txs[0]));
15904
15904
  if (nextTxToBroadcast.type === "INDEXER_CHAINED_TX_TYPE_TREE" /* TREE */) {
15905
15905
  const input = tx.getInput(0);
15906
15906
  if (!input) {
@@ -16000,7 +16000,7 @@ async function prepareUnrollTransaction(wallet, vtxoTxIds, outputAddress) {
16000
16000
  btcSigner.TaprootControlBlock.encode(spendingLeaf[0]).length
16001
16001
  );
16002
16002
  }
16003
- const tx = new chunkALISWEQ5_cjs.Transaction({ version: 2 });
16003
+ const tx = new chunkYEF5FL6E_cjs.Transaction({ version: 2 });
16004
16004
  for (const input of inputs) {
16005
16005
  tx.addInput(input);
16006
16006
  }
@@ -16224,5 +16224,5 @@ exports.validateVtxoTxGraph = validateVtxoTxGraph;
16224
16224
  exports.verifyTapscriptSignatures = verifyTapscriptSignatures;
16225
16225
  exports.waitForIncomingFunds = waitForIncomingFunds;
16226
16226
  exports.warnAndFilterVtxosForScript = warnAndFilterVtxosForScript;
16227
- //# sourceMappingURL=chunk-3MPXMLP4.cjs.map
16228
- //# sourceMappingURL=chunk-3MPXMLP4.cjs.map
16227
+ //# sourceMappingURL=chunk-ED7JDFX4.cjs.map
16228
+ //# sourceMappingURL=chunk-ED7JDFX4.cjs.map