@arkade-os/sdk 0.4.49-rc.0 → 0.4.49

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 (63) 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-Bz4VxTY7.d.cts → ark-nkSiPYNf.d.cts} +1 -1
  8. package/dist/{ark-Bz4VxTY7.d.ts → ark-nkSiPYNf.d.ts} +1 -1
  9. package/dist/{asyncStorageTaskQueue-UIyDWZ_d.d.ts → asyncStorageTaskQueue-DCaEE83p.d.ts} +2 -2
  10. package/dist/{asyncStorageTaskQueue-BgQaK3El.d.cts → asyncStorageTaskQueue-DdxhsEz6.d.cts} +2 -2
  11. package/dist/{chunk-R3LGVLKP.cjs → chunk-2LAJ3RTH.cjs} +108 -108
  12. package/dist/{chunk-R3LGVLKP.cjs.map → chunk-2LAJ3RTH.cjs.map} +1 -1
  13. package/dist/{chunk-T2IVKSZP.js → chunk-5QVBJUOG.js} +3 -3
  14. package/dist/{chunk-T2IVKSZP.js.map → chunk-5QVBJUOG.js.map} +1 -1
  15. package/dist/{chunk-XWZY6NHJ.cjs → chunk-6UI5BFE7.cjs} +7 -7
  16. package/dist/{chunk-XWZY6NHJ.cjs.map → chunk-6UI5BFE7.cjs.map} +1 -1
  17. package/dist/{chunk-27DACHF6.js → chunk-BLJQV3N4.js} +3 -3
  18. package/dist/{chunk-27DACHF6.js.map → chunk-BLJQV3N4.js.map} +1 -1
  19. package/dist/{chunk-ITT2S4O3.js → chunk-CPO2UB7L.js} +3 -3
  20. package/dist/chunk-CPO2UB7L.js.map +1 -0
  21. package/dist/{chunk-COB6VP4M.js → chunk-HN25T276.js} +3 -3
  22. package/dist/{chunk-COB6VP4M.js.map → chunk-HN25T276.js.map} +1 -1
  23. package/dist/{chunk-RNNCQHAI.cjs → chunk-QDXQULVM.cjs} +3 -3
  24. package/dist/chunk-QDXQULVM.cjs.map +1 -0
  25. package/dist/{chunk-EEYMJVF6.cjs → chunk-XOLH3LFO.cjs} +11 -11
  26. package/dist/{chunk-EEYMJVF6.cjs.map → chunk-XOLH3LFO.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-D_7Gh5H4.d.cts → delegate-Cqqw1T1J.d.cts} +1 -1
  30. package/dist/{delegate-BoIZ4Sjj.d.ts → delegate-D6Orvyq7.d.ts} +1 -1
  31. package/dist/{index-Cu6QYjYT.d.ts → index-CWoogah0.d.ts} +2 -2
  32. package/dist/{index-jAMA6NXc.d.cts → index-Yd4hecbM.d.cts} +2 -2
  33. package/dist/index.cjs +145 -145
  34. package/dist/index.d.cts +8 -8
  35. package/dist/index.d.ts +8 -8
  36. package/dist/index.js +2 -2
  37. package/dist/repositories/realm/index.cjs +17 -17
  38. package/dist/repositories/realm/index.d.cts +2 -2
  39. package/dist/repositories/realm/index.d.ts +2 -2
  40. package/dist/repositories/realm/index.js +3 -3
  41. package/dist/repositories/sqlite/index.cjs +16 -16
  42. package/dist/repositories/sqlite/index.d.cts +2 -2
  43. package/dist/repositories/sqlite/index.d.ts +2 -2
  44. package/dist/repositories/sqlite/index.js +3 -3
  45. package/dist/{taskRunner-Ck0AouQU.d.cts → taskRunner-BjB5QINR.d.cts} +2 -2
  46. package/dist/{taskRunner-bs1AE_BL.d.ts → taskRunner-Dw7xs60Q.d.ts} +2 -2
  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-CJ_8yiIz.d.ts → wallet-CGkWu3xV.d.cts} +2 -2
  56. package/dist/{wallet-CkTb2epm.d.cts → wallet-DyUHrPyN.d.ts} +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
  62. package/dist/chunk-ITT2S4O3.js.map +0 -1
  63. package/dist/chunk-RNNCQHAI.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNNCQHAI_cjs = require('./chunk-RNNCQHAI.cjs');
3
+ var chunkQDXQULVM_cjs = require('./chunk-QDXQULVM.cjs');
4
4
  var chunkLJQ2VQBE_cjs = require('./chunk-LJQ2VQBE.cjs');
5
5
  var chunkE7HB3GKK_cjs = require('./chunk-E7HB3GKK.cjs');
6
6
  var chunk5BLDMQED_cjs = require('./chunk-5BLDMQED.cjs');
@@ -185,7 +185,7 @@ var TreeSignerSession = class _TreeSignerSession {
185
185
  noncesByPubkey.set(base.hex.encode(myPublicKey.subarray(1)), myNonce);
186
186
  const tx = this.graph.find(txid);
187
187
  if (!tx) throw new Error(`missing tx for txid ${txid}`);
188
- const cosigners = chunkRNNCQHAI_cjs.getArkPsbtFields(tx.root, 0, chunkRNNCQHAI_cjs.CosignerPublicKey).map(
188
+ const cosigners = chunkQDXQULVM_cjs.getArkPsbtFields(tx.root, 0, chunkQDXQULVM_cjs.CosignerPublicKey).map(
189
189
  (c) => base.hex.encode(c.key.subarray(1))
190
190
  // xonly pubkey
191
191
  );
@@ -237,7 +237,7 @@ var TreeSignerSession = class _TreeSignerSession {
237
237
  if (!aggNonce) throw new Error("missing aggregate nonce");
238
238
  const prevoutAmounts = [];
239
239
  const prevoutScripts = [];
240
- const cosigners = chunkRNNCQHAI_cjs.getArkPsbtFields(g.root, 0, chunkRNNCQHAI_cjs.CosignerPublicKey).map((c) => c.key);
240
+ const cosigners = chunkQDXQULVM_cjs.getArkPsbtFields(g.root, 0, chunkQDXQULVM_cjs.CosignerPublicKey).map((c) => c.key);
241
241
  const { finalKey } = aggregateKeys(cosigners, true, {
242
242
  taprootTweak: this.scriptRoot
243
243
  });
@@ -986,14 +986,14 @@ var RestDelegateProvider = class {
986
986
  */
987
987
  async delegate(intent, forfeitTxs, options) {
988
988
  const url = `${this.url}/v1/delegate`;
989
- const response = await chunkRNNCQHAI_cjs.baseFetch(url, {
989
+ const response = await chunkQDXQULVM_cjs.baseFetch(url, {
990
990
  method: "POST",
991
991
  headers: {
992
992
  "Content-Type": "application/json"
993
993
  },
994
994
  body: JSON.stringify({
995
995
  intent: {
996
- message: chunkRNNCQHAI_cjs.Intent.encodeMessage(intent.message),
996
+ message: chunkQDXQULVM_cjs.Intent.encodeMessage(intent.message),
997
997
  proof: intent.proof
998
998
  },
999
999
  forfeit_txs: forfeitTxs,
@@ -1013,7 +1013,7 @@ var RestDelegateProvider = class {
1013
1013
  */
1014
1014
  async getDelegateInfo() {
1015
1015
  const url = `${this.url}/v1/delegator/info`;
1016
- const response = await chunkRNNCQHAI_cjs.rateGate.runHttp(url, () => chunkRNNCQHAI_cjs.baseFetch(url));
1016
+ const response = await chunkQDXQULVM_cjs.rateGate.runHttp(url, () => chunkQDXQULVM_cjs.baseFetch(url));
1017
1017
  if (!response.ok) {
1018
1018
  const errorText2 = await response.text();
1019
1019
  throw new Error(`Failed to get delegate info: ${errorText2}`);
@@ -1049,14 +1049,14 @@ var EsploraProvider = class {
1049
1049
  pollingInterval;
1050
1050
  forcePolling;
1051
1051
  async getCoins(address) {
1052
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/address/${address}/utxo`);
1052
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/address/${address}/utxo`);
1053
1053
  if (!response.ok) {
1054
1054
  throw new Error(`Failed to fetch UTXOs: ${response.statusText}`);
1055
1055
  }
1056
1056
  return response.json();
1057
1057
  }
1058
1058
  async getFeeRate() {
1059
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/fee-estimates`);
1059
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/fee-estimates`);
1060
1060
  if (response.status === 404) {
1061
1061
  return void 0;
1062
1062
  }
@@ -1077,7 +1077,7 @@ var EsploraProvider = class {
1077
1077
  }
1078
1078
  }
1079
1079
  async getTxOutspends(txid) {
1080
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/outspends`);
1080
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/outspends`);
1081
1081
  if (!response.ok) {
1082
1082
  const error = await response.text();
1083
1083
  throw new Error(`Failed to get transaction outspends: ${error}`);
@@ -1085,7 +1085,7 @@ var EsploraProvider = class {
1085
1085
  return response.json();
1086
1086
  }
1087
1087
  async getTransactions(address) {
1088
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/address/${address}/txs`);
1088
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/address/${address}/txs`);
1089
1089
  if (!response.ok) {
1090
1090
  const error = await response.text();
1091
1091
  throw new Error(`Failed to get transactions: ${error}`);
@@ -1093,7 +1093,7 @@ var EsploraProvider = class {
1093
1093
  return response.json();
1094
1094
  }
1095
1095
  async getTxStatus(txid) {
1096
- const txresponse = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/tx/${txid}`);
1096
+ const txresponse = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/tx/${txid}`);
1097
1097
  if (!txresponse.ok) {
1098
1098
  throw new Error(txresponse.statusText);
1099
1099
  }
@@ -1101,7 +1101,7 @@ var EsploraProvider = class {
1101
1101
  if (!tx.status.confirmed) {
1102
1102
  return { confirmed: false };
1103
1103
  }
1104
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/status`);
1104
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/tx/${txid}/status`);
1105
1105
  if (!response.ok) {
1106
1106
  throw new Error(`Failed to get transaction status: ${response.statusText}`);
1107
1107
  }
@@ -1185,7 +1185,7 @@ var EsploraProvider = class {
1185
1185
  return stopFunc;
1186
1186
  }
1187
1187
  async getChainTip() {
1188
- const tipBlocks = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/blocks`);
1188
+ const tipBlocks = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/blocks`);
1189
1189
  if (!tipBlocks.ok) {
1190
1190
  throw new Error(`Failed to get chain tip: ${tipBlocks.statusText}`);
1191
1191
  }
@@ -1204,7 +1204,7 @@ var EsploraProvider = class {
1204
1204
  };
1205
1205
  }
1206
1206
  async broadcastPackage(parent, child) {
1207
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/txs/package`, {
1207
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/txs/package`, {
1208
1208
  method: "POST",
1209
1209
  headers: {
1210
1210
  "Content-Type": "application/json"
@@ -1218,7 +1218,7 @@ var EsploraProvider = class {
1218
1218
  return response.json();
1219
1219
  }
1220
1220
  async broadcastTx(tx) {
1221
- const response = await chunkRNNCQHAI_cjs.baseFetch(`${this.baseUrl}/tx`, {
1221
+ const response = await chunkQDXQULVM_cjs.baseFetch(`${this.baseUrl}/tx`, {
1222
1222
  method: "POST",
1223
1223
  headers: {
1224
1224
  "Content-Type": "text/plain"
@@ -1380,7 +1380,7 @@ function findP2AOutput(tx) {
1380
1380
  var CHILD_DUST_AMOUNT = 546;
1381
1381
  function buildAnchorChild(params) {
1382
1382
  const { parent, feeRate, fundingCoins, changeAddress, tapInternalKey, network } = params;
1383
- const child = new chunkRNNCQHAI_cjs.Transaction({ version: 3, allowLegacyWitnessUtxo: true });
1383
+ const child = new chunkQDXQULVM_cjs.Transaction({ version: 3, allowLegacyWitnessUtxo: true });
1384
1384
  child.addInput(findP2AOutput(parent));
1385
1385
  const estimator = TxWeightEstimator.create().addP2AInput();
1386
1386
  for (const _ of fundingCoins) {
@@ -1428,7 +1428,7 @@ function buildForfeitTx(inputs, forfeitPkScript, txLocktime) {
1428
1428
  );
1429
1429
  }
1430
1430
  function buildForfeitTxWithOutput(inputs, output, txLocktime) {
1431
- const tx = new chunkRNNCQHAI_cjs.Transaction({
1431
+ const tx = new chunkQDXQULVM_cjs.Transaction({
1432
1432
  version: 3,
1433
1433
  lockTime: txLocktime
1434
1434
  });
@@ -1504,7 +1504,7 @@ function validateVtxoTxGraph(graph, roundTransaction, sweepTapTreeRoot) {
1504
1504
  if (previousScriptKey.length !== 32) {
1505
1505
  throw new Error(`parent output ${childIndex} has invalid script`);
1506
1506
  }
1507
- const cosigners = chunkRNNCQHAI_cjs.getArkPsbtFields(child.root, 0, chunkRNNCQHAI_cjs.CosignerPublicKey);
1507
+ const cosigners = chunkQDXQULVM_cjs.getArkPsbtFields(child.root, 0, chunkQDXQULVM_cjs.CosignerPublicKey);
1508
1508
  if (cosigners.length === 0) {
1509
1509
  throw ErrMissingCosignersPublicKeys;
1510
1510
  }
@@ -1562,7 +1562,7 @@ var EmulatorPacket = class _EmulatorPacket {
1562
1562
  return new _EmulatorPacket(entries);
1563
1563
  }
1564
1564
  static fromBytes(data) {
1565
- const reader = new chunkRNNCQHAI_cjs.BufferReader(data);
1565
+ const reader = new chunkQDXQULVM_cjs.BufferReader(data);
1566
1566
  const entryCount = reader.readCompactSize();
1567
1567
  const entries = [];
1568
1568
  for (let i = 0; i < entryCount; i++) {
@@ -1580,7 +1580,7 @@ var EmulatorPacket = class _EmulatorPacket {
1580
1580
  return _EmulatorPacket.PACKET_TYPE;
1581
1581
  }
1582
1582
  serialize() {
1583
- const writer = new chunkRNNCQHAI_cjs.BufferWriter();
1583
+ const writer = new chunkQDXQULVM_cjs.BufferWriter();
1584
1584
  writer.writeCompactSize(this.entries.length);
1585
1585
  for (const entry of this.entries) {
1586
1586
  writer.writeUint16LE(entry.vin);
@@ -1667,7 +1667,7 @@ var Extension = class _Extension {
1667
1667
  `expected magic prefix ${base.hex.encode(ARKADE_MAGIC)}, got ${base.hex.encode(payload.slice(0, Math.min(payload.length, ARKADE_MAGIC.length)))}`
1668
1668
  );
1669
1669
  }
1670
- const reader = new chunkRNNCQHAI_cjs.BufferReader(payload.slice(ARKADE_MAGIC.length));
1670
+ const reader = new chunkQDXQULVM_cjs.BufferReader(payload.slice(ARKADE_MAGIC.length));
1671
1671
  const packets = [];
1672
1672
  while (reader.remaining() > 0) {
1673
1673
  const packetType = reader.readByte();
@@ -1741,7 +1741,7 @@ var Extension = class _Extension {
1741
1741
  */
1742
1742
  getAssetPacket() {
1743
1743
  for (const p of this.packets) {
1744
- if (p instanceof chunkRNNCQHAI_cjs.Packet) {
1744
+ if (p instanceof chunkQDXQULVM_cjs.Packet) {
1745
1745
  return p;
1746
1746
  }
1747
1747
  }
@@ -1779,8 +1779,8 @@ var Extension = class _Extension {
1779
1779
  };
1780
1780
  function parsePacket(packetType, data) {
1781
1781
  switch (packetType) {
1782
- case chunkRNNCQHAI_cjs.Packet.PACKET_TYPE:
1783
- return chunkRNNCQHAI_cjs.Packet.fromBytes(data);
1782
+ case chunkQDXQULVM_cjs.Packet.PACKET_TYPE:
1783
+ return chunkQDXQULVM_cjs.Packet.fromBytes(data);
1784
1784
  case EmulatorPacket.PACKET_TYPE:
1785
1785
  return EmulatorPacket.fromBytes(data);
1786
1786
  default:
@@ -2077,7 +2077,7 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
2077
2077
  const existing = inputsByAssetId.get(asset.assetId);
2078
2078
  inputsByAssetId.set(asset.assetId, [
2079
2079
  ...existing ?? [],
2080
- chunkRNNCQHAI_cjs.AssetInput.create(inputIndex, asset.amount)
2080
+ chunkQDXQULVM_cjs.AssetInput.create(inputIndex, asset.amount)
2081
2081
  ]);
2082
2082
  }
2083
2083
  }
@@ -2089,7 +2089,7 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
2089
2089
  const existing = outputsByAssetId.get(asset.assetId);
2090
2090
  outputsByAssetId.set(asset.assetId, [
2091
2091
  ...existing ?? [],
2092
- chunkRNNCQHAI_cjs.AssetOutput.create(outputIndex, asset.amount)
2092
+ chunkQDXQULVM_cjs.AssetOutput.create(outputIndex, asset.amount)
2093
2093
  ]);
2094
2094
  }
2095
2095
  }
@@ -2100,7 +2100,7 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
2100
2100
  const existing = outputsByAssetId.get(asset.assetId);
2101
2101
  outputsByAssetId.set(asset.assetId, [
2102
2102
  ...existing ?? [],
2103
- chunkRNNCQHAI_cjs.AssetOutput.create(outputIndex, asset.amount)
2103
+ chunkQDXQULVM_cjs.AssetOutput.create(outputIndex, asset.amount)
2104
2104
  ]);
2105
2105
  }
2106
2106
  }
@@ -2109,11 +2109,11 @@ function createAssetPacket(assetInputs, receivers, changeReceiver) {
2109
2109
  for (const assetIdStr of allAssetIds) {
2110
2110
  const inputs = inputsByAssetId.get(assetIdStr);
2111
2111
  const outputs = outputsByAssetId.get(assetIdStr);
2112
- const assetId = chunkRNNCQHAI_cjs.AssetId.fromString(assetIdStr);
2113
- const group = chunkRNNCQHAI_cjs.AssetGroup.create(assetId, null, inputs ?? [], outputs ?? [], []);
2112
+ const assetId = chunkQDXQULVM_cjs.AssetId.fromString(assetIdStr);
2113
+ const group = chunkQDXQULVM_cjs.AssetGroup.create(assetId, null, inputs ?? [], outputs ?? [], []);
2114
2114
  groups.push(group);
2115
2115
  }
2116
- return chunkRNNCQHAI_cjs.Packet.create(groups);
2116
+ return chunkQDXQULVM_cjs.Packet.create(groups);
2117
2117
  }
2118
2118
  function selectCoinsWithAsset(coins, assetId, requiredAmount) {
2119
2119
  const coinsWithAsset = coins.filter((coin) => coin.assets?.some((a) => a.assetId === assetId));
@@ -2230,7 +2230,7 @@ function buildVirtualTx(inputs, outputs) {
2230
2230
  }
2231
2231
  }
2232
2232
  }
2233
- const tx = new chunkRNNCQHAI_cjs.Transaction({
2233
+ const tx = new chunkQDXQULVM_cjs.Transaction({
2234
2234
  version: 3,
2235
2235
  lockTime: Number(lockTime)
2236
2236
  });
@@ -2245,7 +2245,7 @@ function buildVirtualTx(inputs, outputs) {
2245
2245
  },
2246
2246
  tapLeafScript: [input.tapLeafScript]
2247
2247
  });
2248
- chunkRNNCQHAI_cjs.setArkPsbtField(tx, i, chunkRNNCQHAI_cjs.VtxoTaprootTree, input.tapTree);
2248
+ chunkQDXQULVM_cjs.setArkPsbtField(tx, i, chunkQDXQULVM_cjs.VtxoTaprootTree, input.tapTree);
2249
2249
  }
2250
2250
  for (const output of outputs) {
2251
2251
  tx.addOutput(output);
@@ -2428,14 +2428,14 @@ async function submitOffchainTx(provider, offchainTx, signer, hooks) {
2428
2428
  let finalCheckpoints;
2429
2429
  if (userSignedCheckpoints) {
2430
2430
  finalCheckpoints = signedCheckpointTxs.map((c, i) => {
2431
- const serverSigned = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(c));
2431
+ const serverSigned = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(c));
2432
2432
  combineTapscriptSigs(userSignedCheckpoints[i], serverSigned);
2433
2433
  return base.base64.encode(serverSigned.toPSBT());
2434
2434
  });
2435
2435
  } else {
2436
2436
  finalCheckpoints = await Promise.all(
2437
2437
  signedCheckpointTxs.map(async (c) => {
2438
- const tx = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(c));
2438
+ const tx = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(c));
2439
2439
  const signed = await signer.signCheckpoint(tx);
2440
2440
  return base.base64.encode(signed.toPSBT());
2441
2441
  })
@@ -3339,7 +3339,7 @@ var VtxoManager = class _VtxoManager {
3339
3339
  `Sweep not economical: output ${outputAmount} sats after ${fee} sats fee is below dust (${dustAmount} sats)`
3340
3340
  );
3341
3341
  }
3342
- const tx = new chunkRNNCQHAI_cjs.Transaction();
3342
+ const tx = new chunkQDXQULVM_cjs.Transaction();
3343
3343
  for (const utxo of expiredUtxos) {
3344
3344
  const utxoScript = chunkE7HB3GKK_cjs.VtxoScript.decode(utxo.tapTree);
3345
3345
  const utxoExitLeaf = utxoScript.leaves.find(
@@ -3998,8 +3998,8 @@ var VtxoManager = class _VtxoManager {
3998
3998
  * or doesn't carry the metadata.
3999
3999
  */
4000
4000
  extractSpentOutpoint(error) {
4001
- const ark = chunkRNNCQHAI_cjs.maybeArkError(error);
4002
- if (!chunkRNNCQHAI_cjs.isArkError(ark, chunkRNNCQHAI_cjs.ArkErrorName.VTXO_ALREADY_SPENT)) return void 0;
4001
+ const ark = chunkQDXQULVM_cjs.maybeArkError(error);
4002
+ if (!chunkQDXQULVM_cjs.isArkError(ark, chunkQDXQULVM_cjs.ArkErrorName.VTXO_ALREADY_SPENT)) return void 0;
4003
4003
  const raw = ark.metadata?.vtxo_outpoint;
4004
4004
  if (typeof raw !== "string") return void 0;
4005
4005
  const [txid, voutStr] = raw.split(":");
@@ -4734,7 +4734,7 @@ async function captureExitBranch(params) {
4734
4734
  const nonCommitment = ordered.filter((c) => chainTxTypeToChainedExit(c.type) !== 1 /* Commitment */).map((c) => c.txid);
4735
4735
  if (nonCommitment.length > 0) {
4736
4736
  for (const psbt of await resolver.getVirtualTxs(nonCommitment)) {
4737
- psbtByTxid.set(chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(psbt)).id, psbt);
4737
+ psbtByTxid.set(chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(psbt)).id, psbt);
4738
4738
  }
4739
4739
  }
4740
4740
  }
@@ -4795,7 +4795,7 @@ var IndexerExitDataSource = class {
4795
4795
  pageSize: chunkE7HB3GKK_cjs.DEFAULT_PAGE_SIZE
4796
4796
  });
4797
4797
  for (const psbt of txs) {
4798
- out.set(chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(psbt)).id, psbt);
4798
+ out.set(chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(psbt)).id, psbt);
4799
4799
  }
4800
4800
  hasMore = page ? txs.length === chunkE7HB3GKK_cjs.DEFAULT_PAGE_SIZE : false;
4801
4801
  pageIndex++;
@@ -4818,7 +4818,7 @@ function chainedTxTypeToChainTxType(t) {
4818
4818
  }
4819
4819
  }
4820
4820
  function psbtInputTxids(psbtBase64) {
4821
- const tx = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(psbtBase64));
4821
+ const tx = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(psbtBase64));
4822
4822
  const ids = [];
4823
4823
  for (let i = 0; i < tx.inputsLength; i++) {
4824
4824
  const txid = tx.getInput(i).txid;
@@ -4921,7 +4921,7 @@ function createExitChainResolver(params) {
4921
4921
 
4922
4922
  // src/providers/availability.ts
4923
4923
  function isRetryableProviderError(error) {
4924
- return error instanceof chunkRNNCQHAI_cjs.ProviderUnavailableError || error instanceof chunkRNNCQHAI_cjs.FetchError || chunkRNNCQHAI_cjs.isFetchTimeoutError(error);
4924
+ return error instanceof chunkQDXQULVM_cjs.ProviderUnavailableError || error instanceof chunkQDXQULVM_cjs.FetchError || chunkQDXQULVM_cjs.isFetchTimeoutError(error);
4925
4925
  }
4926
4926
 
4927
4927
  // src/utils/syncCursors.ts
@@ -5174,7 +5174,7 @@ async function resolveArkInfo(arkProvider, walletRepository) {
5174
5174
  if (!isRetryableProviderError(err)) throw err;
5175
5175
  const snapshot = await loadArkInfoSnapshot(walletRepository);
5176
5176
  if (!snapshot) {
5177
- throw new chunkRNNCQHAI_cjs.ProviderUnavailableError(
5177
+ throw new chunkQDXQULVM_cjs.ProviderUnavailableError(
5178
5178
  "Arkade server info is unavailable and no cached snapshot exists",
5179
5179
  { cause: err }
5180
5180
  );
@@ -5709,7 +5709,7 @@ var AssetManager = class extends ReadonlyAssetManager {
5709
5709
  const virtualCoins = await this.wallet.getVtxos({
5710
5710
  withRecoverable: false
5711
5711
  });
5712
- const controlAssetRef = params.controlAssetId ? chunkRNNCQHAI_cjs.AssetRef.fromId(chunkRNNCQHAI_cjs.AssetId.fromString(params.controlAssetId)) : null;
5712
+ const controlAssetRef = params.controlAssetId ? chunkQDXQULVM_cjs.AssetRef.fromId(chunkQDXQULVM_cjs.AssetId.fromString(params.controlAssetId)) : null;
5713
5713
  const coinSelection = selectVirtualCoins(virtualCoins, Number(this.wallet.dustAmount));
5714
5714
  let totalBtcSelected = 0n;
5715
5715
  const assetChanges = /* @__PURE__ */ new Map();
@@ -5722,8 +5722,8 @@ var AssetManager = class extends ReadonlyAssetManager {
5722
5722
  }
5723
5723
  }
5724
5724
  const groups = [];
5725
- const issuedAssetOutput = chunkRNNCQHAI_cjs.AssetOutput.create(0, params.amount);
5726
- const issuedAssetGroup = chunkRNNCQHAI_cjs.AssetGroup.create(
5725
+ const issuedAssetOutput = chunkQDXQULVM_cjs.AssetOutput.create(0, params.amount);
5726
+ const issuedAssetGroup = chunkQDXQULVM_cjs.AssetGroup.create(
5727
5727
  null,
5728
5728
  controlAssetRef,
5729
5729
  [],
@@ -5738,15 +5738,15 @@ var AssetManager = class extends ReadonlyAssetManager {
5738
5738
  for (const [inputIndex, assets] of assetInputs) {
5739
5739
  for (const asset of assets) {
5740
5740
  if (asset.assetId !== assetId) continue;
5741
- changeInputs.push(chunkRNNCQHAI_cjs.AssetInput.create(inputIndex, asset.amount));
5741
+ changeInputs.push(chunkQDXQULVM_cjs.AssetInput.create(inputIndex, asset.amount));
5742
5742
  }
5743
5743
  }
5744
5744
  groups.push(
5745
- chunkRNNCQHAI_cjs.AssetGroup.create(
5746
- chunkRNNCQHAI_cjs.AssetId.fromString(assetId),
5745
+ chunkQDXQULVM_cjs.AssetGroup.create(
5746
+ chunkQDXQULVM_cjs.AssetId.fromString(assetId),
5747
5747
  null,
5748
5748
  changeInputs,
5749
- [chunkRNNCQHAI_cjs.AssetOutput.create(0, amount)],
5749
+ [chunkQDXQULVM_cjs.AssetOutput.create(0, amount)],
5750
5750
  []
5751
5751
  )
5752
5752
  );
@@ -5759,7 +5759,7 @@ var AssetManager = class extends ReadonlyAssetManager {
5759
5759
  script: outputAddress.pkScript,
5760
5760
  amount: BigInt(totalBtcSelected)
5761
5761
  },
5762
- Extension.create([chunkRNNCQHAI_cjs.Packet.create(groups)]).txOut()
5762
+ Extension.create([chunkQDXQULVM_cjs.Packet.create(groups)]).txOut()
5763
5763
  ];
5764
5764
  const { arkTxid } = await this.wallet.buildAndSubmitOffchainTx(
5765
5765
  coinSelection.inputs,
@@ -5767,7 +5767,7 @@ var AssetManager = class extends ReadonlyAssetManager {
5767
5767
  );
5768
5768
  return {
5769
5769
  arkTxId: arkTxid,
5770
- assetId: chunkRNNCQHAI_cjs.AssetId.create(arkTxid, 0).toString()
5770
+ assetId: chunkQDXQULVM_cjs.AssetId.create(arkTxid, 0).toString()
5771
5771
  };
5772
5772
  }
5773
5773
  /**
@@ -5839,16 +5839,16 @@ var AssetManager = class extends ReadonlyAssetManager {
5839
5839
  for (const [inputIndex, assets] of assetInputs) {
5840
5840
  for (const asset of assets) {
5841
5841
  if (asset.assetId !== params.assetId) continue;
5842
- reissueInputs.push(chunkRNNCQHAI_cjs.AssetInput.create(inputIndex, asset.amount));
5842
+ reissueInputs.push(chunkQDXQULVM_cjs.AssetInput.create(inputIndex, asset.amount));
5843
5843
  }
5844
5844
  }
5845
5845
  const totalAssetAmount = assetToReissueAmount + params.amount;
5846
- const reissueAssetIdObj = chunkRNNCQHAI_cjs.AssetId.fromString(params.assetId);
5847
- const reissueAssetGroup = chunkRNNCQHAI_cjs.AssetGroup.create(
5846
+ const reissueAssetIdObj = chunkQDXQULVM_cjs.AssetId.fromString(params.assetId);
5847
+ const reissueAssetGroup = chunkQDXQULVM_cjs.AssetGroup.create(
5848
5848
  reissueAssetIdObj,
5849
5849
  null,
5850
5850
  reissueInputs,
5851
- [chunkRNNCQHAI_cjs.AssetOutput.create(0, totalAssetAmount)],
5851
+ [chunkQDXQULVM_cjs.AssetOutput.create(0, totalAssetAmount)],
5852
5852
  []
5853
5853
  );
5854
5854
  const groups = [reissueAssetGroup];
@@ -5857,15 +5857,15 @@ var AssetManager = class extends ReadonlyAssetManager {
5857
5857
  for (const [inputIndex, assets] of assetInputs) {
5858
5858
  for (const asset of assets) {
5859
5859
  if (asset.assetId !== assetId) continue;
5860
- changeInputs.push(chunkRNNCQHAI_cjs.AssetInput.create(inputIndex, asset.amount));
5860
+ changeInputs.push(chunkQDXQULVM_cjs.AssetInput.create(inputIndex, asset.amount));
5861
5861
  }
5862
5862
  }
5863
5863
  groups.push(
5864
- chunkRNNCQHAI_cjs.AssetGroup.create(
5865
- chunkRNNCQHAI_cjs.AssetId.fromString(assetId),
5864
+ chunkQDXQULVM_cjs.AssetGroup.create(
5865
+ chunkQDXQULVM_cjs.AssetId.fromString(assetId),
5866
5866
  null,
5867
5867
  changeInputs,
5868
- [chunkRNNCQHAI_cjs.AssetOutput.create(0, amount)],
5868
+ [chunkQDXQULVM_cjs.AssetOutput.create(0, amount)],
5869
5869
  []
5870
5870
  )
5871
5871
  );
@@ -5877,7 +5877,7 @@ var AssetManager = class extends ReadonlyAssetManager {
5877
5877
  script: outputAddress.pkScript,
5878
5878
  amount: BigInt(totalBtcSelected)
5879
5879
  },
5880
- Extension.create([chunkRNNCQHAI_cjs.Packet.create(groups)]).txOut()
5880
+ Extension.create([chunkQDXQULVM_cjs.Packet.create(groups)]).txOut()
5881
5881
  ];
5882
5882
  const { arkTxid } = await this.wallet.buildAndSubmitOffchainTx(selectedCoins, outputs);
5883
5883
  return arkTxid;
@@ -5944,15 +5944,15 @@ var AssetManager = class extends ReadonlyAssetManager {
5944
5944
  for (const [inputIndex, assets] of assetInputs) {
5945
5945
  for (const asset of assets) {
5946
5946
  if (asset.assetId !== assetId) continue;
5947
- changeInputs.push(chunkRNNCQHAI_cjs.AssetInput.create(inputIndex, asset.amount));
5947
+ changeInputs.push(chunkQDXQULVM_cjs.AssetInput.create(inputIndex, asset.amount));
5948
5948
  }
5949
5949
  }
5950
5950
  groups.push(
5951
- chunkRNNCQHAI_cjs.AssetGroup.create(
5952
- chunkRNNCQHAI_cjs.AssetId.fromString(assetId),
5951
+ chunkQDXQULVM_cjs.AssetGroup.create(
5952
+ chunkQDXQULVM_cjs.AssetId.fromString(assetId),
5953
5953
  null,
5954
5954
  changeInputs,
5955
- amount > 0n ? [chunkRNNCQHAI_cjs.AssetOutput.create(0, amount)] : [],
5955
+ amount > 0n ? [chunkQDXQULVM_cjs.AssetOutput.create(0, amount)] : [],
5956
5956
  []
5957
5957
  )
5958
5958
  );
@@ -5964,7 +5964,7 @@ var AssetManager = class extends ReadonlyAssetManager {
5964
5964
  script: outputAddress.pkScript,
5965
5965
  amount: BigInt(totalBtcSelected)
5966
5966
  },
5967
- Extension.create([chunkRNNCQHAI_cjs.Packet.create(groups)]).txOut()
5967
+ Extension.create([chunkQDXQULVM_cjs.Packet.create(groups)]).txOut()
5968
5968
  ];
5969
5969
  const { arkTxid } = await this.wallet.buildAndSubmitOffchainTx(selectedCoins, outputs);
5970
5970
  return arkTxid;
@@ -5989,7 +5989,7 @@ function castMetadata(metadata) {
5989
5989
  } else {
5990
5990
  throw new Error("Invalid metadata value type");
5991
5991
  }
5992
- md.push(chunkRNNCQHAI_cjs.Metadata.create(textEncoder.encode(key), valueBytes));
5992
+ md.push(chunkQDXQULVM_cjs.Metadata.create(textEncoder.encode(key), valueBytes));
5993
5993
  }
5994
5994
  return md;
5995
5995
  }
@@ -6273,7 +6273,7 @@ async function makeSignedDelegateIntent(identity, coins, outputs, onchainOutputs
6273
6273
  expire_at: 0,
6274
6274
  cosigners_public_keys: cosignerPubKeys
6275
6275
  };
6276
- const proof = chunkRNNCQHAI_cjs.Intent.create(message, coins, outputs);
6276
+ const proof = chunkQDXQULVM_cjs.Intent.create(message, coins, outputs);
6277
6277
  const signedProof = await identity.sign(proof);
6278
6278
  return {
6279
6279
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -8322,7 +8322,7 @@ var ContractWatcher = class {
8322
8322
  this.connectionState = "connected";
8323
8323
  this.reconnectAttempts = 0;
8324
8324
  this.listenLoop().catch((e) => {
8325
- if (chunkRNNCQHAI_cjs.isEventSourceError(e)) {
8325
+ if (chunkQDXQULVM_cjs.isEventSourceError(e)) {
8326
8326
  console.debug("ContractWatcher subscription disconnected; reconnecting");
8327
8327
  } else {
8328
8328
  console.error(e);
@@ -10634,7 +10634,7 @@ var ReadonlyWallet = class _ReadonlyWallet {
10634
10634
  */
10635
10635
  static async setupWalletConfig(config, pubKey) {
10636
10636
  const arkadeServerUrl = getArkadeServerUrl(config);
10637
- const arkProvider = config.arkProvider || new chunkRNNCQHAI_cjs.RestArkProvider(arkadeServerUrl);
10637
+ const arkProvider = config.arkProvider || new chunkQDXQULVM_cjs.RestArkProvider(arkadeServerUrl);
10638
10638
  let indexerProvider = config.indexerProvider;
10639
10639
  if (!indexerProvider) {
10640
10640
  let indexerUrl = config.indexerUrl;
@@ -10651,7 +10651,7 @@ var ReadonlyWallet = class _ReadonlyWallet {
10651
10651
  indexerUrl = arkadeServerUrl;
10652
10652
  }
10653
10653
  }
10654
- indexerProvider = new chunkRNNCQHAI_cjs.RestIndexerProvider(indexerUrl);
10654
+ indexerProvider = new chunkQDXQULVM_cjs.RestIndexerProvider(indexerUrl);
10655
10655
  }
10656
10656
  const walletRepository = config.storage?.walletRepository ?? new IndexedDBWalletRepository();
10657
10657
  const contractRepository = config.storage?.contractRepository ?? new IndexedDBContractRepository();
@@ -12729,9 +12729,9 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12729
12729
  ...existing ?? {},
12730
12730
  intentTxId,
12731
12731
  registerProof: intent.proof,
12732
- registerProofMessage: chunkRNNCQHAI_cjs.Intent.encodeMessage(intent.message),
12732
+ registerProofMessage: chunkQDXQULVM_cjs.Intent.encodeMessage(intent.message),
12733
12733
  deleteProof: deleteIntent.proof,
12734
- deleteProofMessage: chunkRNNCQHAI_cjs.Intent.encodeMessage(deleteIntent.message),
12734
+ deleteProofMessage: chunkQDXQULVM_cjs.Intent.encodeMessage(deleteIntent.message),
12735
12735
  intentVtxos: inputs.map((i) => ({
12736
12736
  txid: i.txid,
12737
12737
  vout: i.vout
@@ -12763,7 +12763,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12763
12763
  try {
12764
12764
  return await this.arkProvider.registerIntent(intent);
12765
12765
  } catch (error) {
12766
- if (error instanceof chunkRNNCQHAI_cjs.ArkError && error.code === 0 && error.message.includes("duplicated input")) {
12766
+ if (error instanceof chunkQDXQULVM_cjs.ArkError && error.code === 0 && error.message.includes("duplicated input")) {
12767
12767
  const deleteIntent = await this.makeDeleteIntentSignature(inputs);
12768
12768
  await this.arkProvider.deleteIntent(deleteIntent);
12769
12769
  return this.arkProvider.registerIntent(intent);
@@ -12779,7 +12779,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12779
12779
  expire_at: 0,
12780
12780
  cosigners_public_keys: cosignerPubKeys
12781
12781
  };
12782
- const proof = chunkRNNCQHAI_cjs.Intent.create(message, coins, outputs);
12782
+ const proof = chunkQDXQULVM_cjs.Intent.create(message, coins, outputs);
12783
12783
  const signedProof = await this._signerRouter.sign(proof, intentProofJobs(coins));
12784
12784
  return {
12785
12785
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -12791,7 +12791,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12791
12791
  type: "delete",
12792
12792
  expire_at: 0
12793
12793
  };
12794
- const proof = chunkRNNCQHAI_cjs.Intent.create(message, coins, []);
12794
+ const proof = chunkQDXQULVM_cjs.Intent.create(message, coins, []);
12795
12795
  const signedProof = await this._signerRouter.sign(proof, intentProofJobs(coins));
12796
12796
  return {
12797
12797
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -12803,7 +12803,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12803
12803
  type: "get-pending-tx",
12804
12804
  expire_at: 0
12805
12805
  };
12806
- const proof = chunkRNNCQHAI_cjs.Intent.create(message, coins, []);
12806
+ const proof = chunkQDXQULVM_cjs.Intent.create(message, coins, []);
12807
12807
  const signedProof = await this._signerRouter.sign(proof, intentProofJobs(coins));
12808
12808
  return {
12809
12809
  proof: base.base64.encode(signedProof.toPSBT()),
@@ -13136,7 +13136,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13136
13136
  for (let i = 0; i < inputs.length; i += MAX_INPUTS_PER_INTENT) {
13137
13137
  const batch = inputs.slice(i, i + MAX_INPUTS_PER_INTENT);
13138
13138
  const message = { type: "get-pending-tx", expire_at: 0 };
13139
- const proof = chunkRNNCQHAI_cjs.Intent.create(message, batch, []);
13139
+ const proof = chunkQDXQULVM_cjs.Intent.create(message, batch, []);
13140
13140
  const signedProof = await identity.sign(
13141
13141
  proof,
13142
13142
  Array.from({ length: batch.length + 1 }, (_, j) => j)
@@ -14019,7 +14019,7 @@ var MessageBus = class {
14019
14019
  this.initialized = true;
14020
14020
  }
14021
14021
  async buildServices(config) {
14022
- const arkProvider = new chunkRNNCQHAI_cjs.RestArkProvider(config.arkServer.url);
14022
+ const arkProvider = new chunkQDXQULVM_cjs.RestArkProvider(config.arkServer.url);
14023
14023
  const storage = {
14024
14024
  walletRepository: this.walletRepository,
14025
14025
  contractRepository: this.contractRepository
@@ -15179,7 +15179,7 @@ var WalletMessageHandler = class {
15179
15179
  // Wallet methods
15180
15180
  async handleInitWallet({ payload }) {
15181
15181
  const { arkServerUrl } = payload;
15182
- this.indexerProvider = new chunkRNNCQHAI_cjs.RestIndexerProvider(arkServerUrl);
15182
+ this.indexerProvider = new chunkQDXQULVM_cjs.RestIndexerProvider(arkServerUrl);
15183
15183
  await this.onWalletInitialized();
15184
15184
  }
15185
15185
  async handleGetBalance() {
@@ -17047,7 +17047,7 @@ var OnchainWallet = class _OnchainWallet {
17047
17047
  if (!inputs) {
17048
17048
  throw new Error("Fee estimation failed");
17049
17049
  }
17050
- let tx = new chunkRNNCQHAI_cjs.Transaction();
17050
+ let tx = new chunkQDXQULVM_cjs.Transaction();
17051
17051
  for (const input of inputs) {
17052
17052
  tx.addInput({
17053
17053
  txid: input.txid,
@@ -17105,7 +17105,7 @@ var OnchainWallet = class _OnchainWallet {
17105
17105
  * @throws If the parent has no anchor, or funding cannot be selected/signed
17106
17106
  */
17107
17107
  async bumpAnchor(parentHex, feeRate) {
17108
- const parent = chunkRNNCQHAI_cjs.Transaction.fromRaw(base.hex.decode(parentHex));
17108
+ const parent = chunkQDXQULVM_cjs.Transaction.fromRaw(base.hex.decode(parentHex));
17109
17109
  const coins = (await this.getCoins()).filter((c) => c.status.confirmed);
17110
17110
  const child = await this.buildBumpPackage(parent, feeRate, coins);
17111
17111
  return [parent.hex, child.hex];
@@ -17870,7 +17870,7 @@ exports.BIP322 = void 0;
17870
17870
  async function sign2(message, identity, network) {
17871
17871
  const xOnlyPubKey = await identity.xOnlyPublicKey();
17872
17872
  const payment = btcSigner.p2tr(xOnlyPubKey, void 0, network);
17873
- const toSpend = chunkRNNCQHAI_cjs.craftToSpendTx(message, payment.script, TAG_BIP322);
17873
+ const toSpend = chunkQDXQULVM_cjs.craftToSpendTx(message, payment.script, TAG_BIP322);
17874
17874
  const toSign = craftBIP322ToSignP2TR(toSpend, payment.script, xOnlyPubKey);
17875
17875
  const signed = await identity.sign(toSign, [0]);
17876
17876
  signed.finalizeIdx(0);
@@ -17928,7 +17928,7 @@ function verifyP2TR(message, witnessItems, pkScript, pubkey) {
17928
17928
  if (sighashType !== btcSigner.SigHash.DEFAULT && sighashType !== btcSigner.SigHash.ALL) {
17929
17929
  return false;
17930
17930
  }
17931
- const toSpend = chunkRNNCQHAI_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
17931
+ const toSpend = chunkQDXQULVM_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
17932
17932
  const toSign = craftBIP322ToSignP2TR(toSpend, pkScript, pubkey);
17933
17933
  const sighash = toSign.preimageWitnessV1(0, [pkScript], sighashType, [0n]);
17934
17934
  const rawSig = sig.length === 65 ? sig.subarray(0, 64) : sig;
@@ -17949,7 +17949,7 @@ function verifyP2WPKH(message, witnessItems, pkScript, addressHash) {
17949
17949
  }
17950
17950
  const sighashType = sigWithHash[sigWithHash.length - 1];
17951
17951
  const derSig = sigWithHash.subarray(0, sigWithHash.length - 1);
17952
- const toSpend = chunkRNNCQHAI_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
17952
+ const toSpend = chunkQDXQULVM_cjs.craftToSpendTx(message, pkScript, TAG_BIP322);
17953
17953
  const toSign = craftBIP322ToSignSimple(toSpend, pkScript);
17954
17954
  const scriptCode = btcSigner.OutScript.encode({ type: "pkh", hash: addressHash });
17955
17955
  const sighash = toSign.preimageWitnessV0(0, scriptCode, sighashType, 0n);
@@ -18002,7 +18002,7 @@ function encodeCompactSize(n) {
18002
18002
  return buf;
18003
18003
  }
18004
18004
  function craftBIP322ToSignP2TR(toSpend, pkScript, tapInternalKey) {
18005
- const tx = new chunkRNNCQHAI_cjs.Transaction({ version: 0 });
18005
+ const tx = new chunkQDXQULVM_cjs.Transaction({ version: 0 });
18006
18006
  tx.addInput({
18007
18007
  txid: toSpend.id,
18008
18008
  index: 0,
@@ -18016,12 +18016,12 @@ function craftBIP322ToSignP2TR(toSpend, pkScript, tapInternalKey) {
18016
18016
  });
18017
18017
  tx.addOutput({
18018
18018
  amount: 0n,
18019
- script: chunkRNNCQHAI_cjs.OP_RETURN_EMPTY_PKSCRIPT
18019
+ script: chunkQDXQULVM_cjs.OP_RETURN_EMPTY_PKSCRIPT
18020
18020
  });
18021
18021
  return tx;
18022
18022
  }
18023
18023
  function craftBIP322ToSignSimple(toSpend, pkScript) {
18024
- const tx = new chunkRNNCQHAI_cjs.Transaction({ version: 0 });
18024
+ const tx = new chunkQDXQULVM_cjs.Transaction({ version: 0 });
18025
18025
  tx.addInput({
18026
18026
  txid: toSpend.id,
18027
18027
  index: 0,
@@ -18033,7 +18033,7 @@ function craftBIP322ToSignSimple(toSpend, pkScript) {
18033
18033
  });
18034
18034
  tx.addOutput({
18035
18035
  amount: 0n,
18036
- script: chunkRNNCQHAI_cjs.OP_RETURN_EMPTY_PKSCRIPT
18036
+ script: chunkQDXQULVM_cjs.OP_RETURN_EMPTY_PKSCRIPT
18037
18037
  });
18038
18038
  return tx;
18039
18039
  }
@@ -18164,7 +18164,7 @@ var RestEmulatorProvider = class {
18164
18164
  }
18165
18165
  };
18166
18166
  function finalizeVirtualTx(type, psbtBase64) {
18167
- const tx = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(psbtBase64));
18167
+ const tx = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(psbtBase64));
18168
18168
  if (type === "INDEXER_CHAINED_TX_TYPE_TREE" /* TREE */) {
18169
18169
  const input = tx.getInput(0);
18170
18170
  if (!input) {
@@ -18442,7 +18442,7 @@ async function prepareUnrollTransaction(wallet, vtxoTxIds, outputAddress) {
18442
18442
  btcSigner.TaprootControlBlock.encode(spendingLeaf[0]).length
18443
18443
  );
18444
18444
  }
18445
- const tx = new chunkRNNCQHAI_cjs.Transaction({ version: 2 });
18445
+ const tx = new chunkQDXQULVM_cjs.Transaction({ version: 2 });
18446
18446
  for (const input of inputs) {
18447
18447
  tx.addInput(input);
18448
18448
  }
@@ -18509,7 +18509,7 @@ async function buildSignedSweep(params) {
18509
18509
  `uneconomic vtxo ${vtxo.txid}:${vtxo.vout}: value ${vtxo.value} - fee ${fee} < dust`
18510
18510
  );
18511
18511
  }
18512
- const tx = new chunkRNNCQHAI_cjs.Transaction({ version: 2 });
18512
+ const tx = new chunkQDXQULVM_cjs.Transaction({ version: 2 });
18513
18513
  tx.addInput({
18514
18514
  txid: vtxo.txid,
18515
18515
  index: vtxo.vout,
@@ -18609,7 +18609,7 @@ async function computeExitLayout(opts, feeRate) {
18609
18609
  if (pendingNodes.length > 0) {
18610
18610
  const txs = await resolver.getVirtualTxs(pendingNodes.map((n) => n.txid));
18611
18611
  for (const psbt of txs) {
18612
- psbts.set(chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(psbt)).id, psbt);
18612
+ psbts.set(chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(psbt)).id, psbt);
18613
18613
  }
18614
18614
  }
18615
18615
  const childVsize = Number(
@@ -19056,7 +19056,7 @@ async function prepare(opts) {
19056
19056
  if (newFee <= splitterFee) break;
19057
19057
  splitterFee = newFee;
19058
19058
  }
19059
- const splitter = new chunkRNNCQHAI_cjs.Transaction({ version: 2 });
19059
+ const splitter = new chunkQDXQULVM_cjs.Transaction({ version: 2 });
19060
19060
  for (const coin of selected.inputs) {
19061
19061
  splitter.addInput({
19062
19062
  txid: coin.txid,
@@ -19263,7 +19263,7 @@ function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message
19263
19263
  if (!xOnlyPubkeys.includes(base.hex.encode(xonlySignerPubKey))) {
19264
19264
  return { skip: true };
19265
19265
  }
19266
- const commitmentTx = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(event.unsignedCommitmentTx));
19266
+ const commitmentTx = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(event.unsignedCommitmentTx));
19267
19267
  validateVtxoTxGraph(vtxoTree, commitmentTx, sweepTapTreeRoot);
19268
19268
  if (recipients && recipients.length > 0) {
19269
19269
  validateBatchRecipients(commitmentTx, vtxoTree.leaves(), recipients, network);
@@ -19294,7 +19294,7 @@ function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message
19294
19294
  if (connectorTree) {
19295
19295
  validateConnectorsTxGraph(event.commitmentTx, connectorTree);
19296
19296
  }
19297
- let commitmentPsbt = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(event.commitmentTx));
19297
+ let commitmentPsbt = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(event.commitmentTx));
19298
19298
  const signedForfeits = [];
19299
19299
  let connectorIndex = 0;
19300
19300
  const connectorLeaves = connectorTree?.leaves() || [];
@@ -19702,12 +19702,12 @@ var ArkadeTransactionBuilder = class {
19702
19702
  this.contract.client.checkpoint
19703
19703
  );
19704
19704
  if (coin.sourceTx) {
19705
- chunkRNNCQHAI_cjs.setArkPsbtField(arkTx, 0, chunkRNNCQHAI_cjs.PrevArkTxField, coin.sourceTx);
19705
+ chunkQDXQULVM_cjs.setArkPsbtField(arkTx, 0, chunkQDXQULVM_cjs.PrevArkTxField, coin.sourceTx);
19706
19706
  }
19707
19707
  const condition = (def.tapscript.witness ?? []).map((w) => this.witnessBytes(w));
19708
19708
  if (condition.length > 0) {
19709
- chunkRNNCQHAI_cjs.setArkPsbtField(arkTx, 0, chunkRNNCQHAI_cjs.ConditionWitness, condition);
19710
- chunkRNNCQHAI_cjs.setArkPsbtField(checkpoints[0], 0, chunkRNNCQHAI_cjs.ConditionWitness, condition);
19709
+ chunkQDXQULVM_cjs.setArkPsbtField(arkTx, 0, chunkQDXQULVM_cjs.ConditionWitness, condition);
19710
+ chunkQDXQULVM_cjs.setArkPsbtField(checkpoints[0], 0, chunkQDXQULVM_cjs.ConditionWitness, condition);
19711
19711
  }
19712
19712
  const packets = [];
19713
19713
  if (this.assetSpecs.length > 0) {
@@ -19746,7 +19746,7 @@ var ArkadeTransactionBuilder = class {
19746
19746
  base.base64.encode(signedArk2.toPSBT()),
19747
19747
  signedCps.map((c) => base.base64.encode(c.toPSBT()))
19748
19748
  );
19749
- const txid = chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(res2.signedArkTx)).id;
19749
+ const txid = chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(res2.signedArkTx)).id;
19750
19750
  return {
19751
19751
  txid,
19752
19752
  signedArkTx: res2.signedArkTx,
@@ -19764,7 +19764,7 @@ var ArkadeTransactionBuilder = class {
19764
19764
  const finalCps = await Promise.all(
19765
19765
  res.signedCheckpointTxs.map(
19766
19766
  async (b) => base.base64.encode(
19767
- (await client.identity.sign(chunkRNNCQHAI_cjs.Transaction.fromPSBT(base.base64.decode(b)), [0])).toPSBT()
19767
+ (await client.identity.sign(chunkQDXQULVM_cjs.Transaction.fromPSBT(base.base64.decode(b)), [0])).toPSBT()
19768
19768
  )
19769
19769
  )
19770
19770
  );
@@ -19805,16 +19805,16 @@ var ArkadeTransactionBuilder = class {
19805
19805
  }
19806
19806
  buildAssetPacket() {
19807
19807
  const groups = this.assetSpecs.map((s) => {
19808
- const id = typeof s.assetId === "string" ? chunkRNNCQHAI_cjs.AssetId.fromString(s.assetId) : chunkRNNCQHAI_cjs.AssetId.fromBytes(s.assetId);
19809
- return chunkRNNCQHAI_cjs.AssetGroup.create(
19808
+ const id = typeof s.assetId === "string" ? chunkQDXQULVM_cjs.AssetId.fromString(s.assetId) : chunkQDXQULVM_cjs.AssetId.fromBytes(s.assetId);
19809
+ return chunkQDXQULVM_cjs.AssetGroup.create(
19810
19810
  id,
19811
19811
  null,
19812
- s.inputs.map((i) => chunkRNNCQHAI_cjs.AssetInput.create(i.vin, i.amount)),
19813
- s.outputs.map((o) => chunkRNNCQHAI_cjs.AssetOutput.create(o.vout, o.amount)),
19814
- (s.metadata ?? []).map((m) => chunkRNNCQHAI_cjs.Metadata.create(m.key, m.value))
19812
+ s.inputs.map((i) => chunkQDXQULVM_cjs.AssetInput.create(i.vin, i.amount)),
19813
+ s.outputs.map((o) => chunkQDXQULVM_cjs.AssetOutput.create(o.vout, o.amount)),
19814
+ (s.metadata ?? []).map((m) => chunkQDXQULVM_cjs.Metadata.create(m.key, m.value))
19815
19815
  );
19816
19816
  });
19817
- return chunkRNNCQHAI_cjs.Packet.create(groups);
19817
+ return chunkQDXQULVM_cjs.Packet.create(groups);
19818
19818
  }
19819
19819
  witnessBytes(ref) {
19820
19820
  return chunkLJQ2VQBE_cjs.witnessRefToBytes(ref, this.args, this.contract.args);
@@ -20037,5 +20037,5 @@ exports.validateVtxoTxGraph = validateVtxoTxGraph;
20037
20037
  exports.verifyTapscriptSignatures = verifyTapscriptSignatures;
20038
20038
  exports.waitForIncomingFunds = waitForIncomingFunds;
20039
20039
  exports.warnAndFilterVtxosForScript = warnAndFilterVtxosForScript;
20040
- //# sourceMappingURL=chunk-R3LGVLKP.cjs.map
20041
- //# sourceMappingURL=chunk-R3LGVLKP.cjs.map
20040
+ //# sourceMappingURL=chunk-2LAJ3RTH.cjs.map
20041
+ //# sourceMappingURL=chunk-2LAJ3RTH.cjs.map