@arkade-os/sdk 0.4.54 → 0.4.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/adapters/expo.cjs +5 -5
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +3 -3
  5. package/dist/adapters/indexedDB.cjs +5 -5
  6. package/dist/adapters/indexedDB.js +4 -4
  7. package/dist/{ark-acFuA57I.d.cts → ark-Do9Lqfsp.d.cts} +35 -2
  8. package/dist/{ark-acFuA57I.d.ts → ark-Do9Lqfsp.d.ts} +35 -2
  9. package/dist/{asyncStorageTaskQueue-BO3cvMpP.d.cts → asyncStorageTaskQueue-C3DYxvAT.d.cts} +2 -2
  10. package/dist/{asyncStorageTaskQueue-DACXtP0I.d.ts → asyncStorageTaskQueue-DOnBOEDn.d.ts} +2 -2
  11. package/dist/{chunk-YRLBZJYO.cjs → chunk-C6UYPHTQ.cjs} +9 -9
  12. package/dist/{chunk-YRLBZJYO.cjs.map → chunk-C6UYPHTQ.cjs.map} +1 -1
  13. package/dist/{chunk-BYJJIITU.cjs → chunk-CSS74VCN.cjs} +17 -17
  14. package/dist/{chunk-BYJJIITU.cjs.map → chunk-CSS74VCN.cjs.map} +1 -1
  15. package/dist/{chunk-ZOY5JSVA.js → chunk-ENWR2F2P.js} +3 -3
  16. package/dist/{chunk-ZOY5JSVA.js.map → chunk-ENWR2F2P.js.map} +1 -1
  17. package/dist/{chunk-RNECH3TA.cjs → chunk-G7DOBFQN.cjs} +15 -15
  18. package/dist/{chunk-RNECH3TA.cjs.map → chunk-G7DOBFQN.cjs.map} +1 -1
  19. package/dist/{chunk-4EIKOJLD.js → chunk-JCJ5WFS3.js} +11 -4
  20. package/dist/chunk-JCJ5WFS3.js.map +1 -0
  21. package/dist/{chunk-7L3P3EP5.js → chunk-LAONNMM5.js} +4 -4
  22. package/dist/{chunk-7L3P3EP5.js.map → chunk-LAONNMM5.js.map} +1 -1
  23. package/dist/{chunk-GMUVWKOK.cjs → chunk-OWCPXRGP.cjs} +11 -3
  24. package/dist/chunk-OWCPXRGP.cjs.map +1 -0
  25. package/dist/{chunk-A37WVZ5T.js → chunk-QMPNPZ2T.js} +23 -4
  26. package/dist/chunk-QMPNPZ2T.js.map +1 -0
  27. package/dist/{chunk-TEHJCEF3.js → chunk-QO3IKBYL.js} +366 -51
  28. package/dist/chunk-QO3IKBYL.js.map +1 -0
  29. package/dist/{chunk-QY2YVFZT.js → chunk-SG4X7SEC.js} +4 -4
  30. package/dist/{chunk-QY2YVFZT.js.map → chunk-SG4X7SEC.js.map} +1 -1
  31. package/dist/{chunk-53XNU2EL.cjs → chunk-V2TOHHPW.cjs} +60 -40
  32. package/dist/chunk-V2TOHHPW.cjs.map +1 -0
  33. package/dist/{chunk-D5LUPJJP.cjs → chunk-ZPL34T2Q.cjs} +717 -395
  34. package/dist/chunk-ZPL34T2Q.cjs.map +1 -0
  35. package/dist/contracts/handlers/index.cjs +8 -8
  36. package/dist/contracts/handlers/index.d.cts +3 -3
  37. package/dist/contracts/handlers/index.d.ts +3 -3
  38. package/dist/contracts/handlers/index.js +2 -2
  39. package/dist/{delegate-Ca_wXiYE.d.cts → delegate-C0iIBxen.d.cts} +1 -1
  40. package/dist/{delegate-DjwZZi6L.d.ts → delegate-DmhFrtdq.d.ts} +1 -1
  41. package/dist/{index-Ddq0mIKX.d.ts → index-BNt4wcSh.d.ts} +2 -2
  42. package/dist/{index-DFfefdpc.d.cts → index-BnLM1XxA.d.cts} +2 -2
  43. package/dist/index.cjs +238 -202
  44. package/dist/index.d.cts +138 -14
  45. package/dist/index.d.ts +138 -14
  46. package/dist/index.js +4 -4
  47. package/dist/repositories/realm/index.cjs +19 -19
  48. package/dist/repositories/realm/index.d.cts +2 -2
  49. package/dist/repositories/realm/index.d.ts +2 -2
  50. package/dist/repositories/realm/index.js +5 -5
  51. package/dist/repositories/sqlite/index.cjs +18 -18
  52. package/dist/repositories/sqlite/index.d.cts +2 -2
  53. package/dist/repositories/sqlite/index.d.ts +2 -2
  54. package/dist/repositories/sqlite/index.js +5 -5
  55. package/dist/{taskRunner-DbCNRP31.d.ts → taskRunner-Bgs-0I3x.d.ts} +2 -2
  56. package/dist/{taskRunner-DEwlrgId.d.cts → taskRunner-RwUvgQ5M.d.cts} +2 -2
  57. package/dist/wallet/expo/background.cjs +14 -14
  58. package/dist/wallet/expo/background.d.cts +3 -3
  59. package/dist/wallet/expo/background.d.ts +3 -3
  60. package/dist/wallet/expo/background.js +6 -6
  61. package/dist/wallet/expo/index.cjs +14 -14
  62. package/dist/wallet/expo/index.d.cts +5 -5
  63. package/dist/wallet/expo/index.d.ts +5 -5
  64. package/dist/wallet/expo/index.js +5 -5
  65. package/dist/{wallet-ByjM6L20.d.cts → wallet-5Aou-V5n.d.ts} +83 -6
  66. package/dist/{wallet-B9rpddG2.d.ts → wallet-Ck7BH8zR.d.cts} +83 -6
  67. package/dist/worker/expo/index.cjs +9 -9
  68. package/dist/worker/expo/index.d.cts +4 -4
  69. package/dist/worker/expo/index.d.ts +4 -4
  70. package/dist/worker/expo/index.js +5 -5
  71. package/package.json +1 -1
  72. package/dist/chunk-4EIKOJLD.js.map +0 -1
  73. package/dist/chunk-53XNU2EL.cjs.map +0 -1
  74. package/dist/chunk-A37WVZ5T.js.map +0 -1
  75. package/dist/chunk-D5LUPJJP.cjs.map +0 -1
  76. package/dist/chunk-GMUVWKOK.cjs.map +0 -1
  77. package/dist/chunk-TEHJCEF3.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, BufferReader, BufferWriter, AssetRef, RestIndexerProvider } from './chunk-ZOY5JSVA.js';
2
- import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, DefaultVtxo, speculativeReceiveMetadata, DelegateVtxo, deriveDescriptorLeafPubKey, WALLET_RECEIVE_SOURCE, BoardingContractHandler } from './chunk-A37WVZ5T.js';
3
- import { VtxoScript, Transaction, isRecoverable, CSVMultisigTapscript, DEFAULT_NETWORK, hasTerminalSpend, getNormalizedVtxos, setArkPsbtField, PrevArkTxField, ConditionWitness, craftToSpendTx, isVirtualCoin, getArkPsbtFields, CosignerPublicKey, ArkAddress, OP_RETURN_EMPTY_PKSCRIPT, sequenceToTimelock, decodeTapscript, scriptFromTapLeafScript, CLTVMultisigTapscript, VtxoTaprootTree, timelockToSequence, baseFetch, Intent, rateGate, DEFAULT_NETWORK_NAME, normalizeVtxo, getSequence, toBatchExpiry, maybeArkError, isArkError, ArkErrorName, toOffchainInputFeeParams, canRecoverOnchain, getNetwork, MultisigTapscript, isEventSourceError, isRetryableProviderError, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, RestArkProvider, canSpendOffchain, toVirtualStatus, ArkError, resolveTimeHeight, parseLegacyExpiry, isExpired, DEFAULT_ARKADE_SERVER_URL, ProviderUnavailableError, networks as networks$1, isPastExpiry, fetchVtxoCreatedAtByTxid } from './chunk-4EIKOJLD.js';
1
+ import { AssetId, AssetGroup, AssetInput, AssetOutput, Metadata, Packet, BufferReader, BufferWriter, AssetRef, RestIndexerProvider } from './chunk-ENWR2F2P.js';
2
+ import { witnessRefToBytes, validateProgram, toASM, stringifyArtifact, serializeArkadeContractParams, resolveAsm, parseArtifact, getOpcodeValue, getOpcodeName, fromASM, deserializeArkadeContractParams, computeArkadeScriptPublicKey, bytesToASM, asmToBytes, arkadeWitnessHash, arkadeScriptHash, SUPPORTED_PROGRAM_VERSION, OPCODE_VALUES, OPCODE_NAMES, bignum_exports, ArkadeScript, ArkadeProgramScript, ARKADE_OPS, ARKADE_OPCODE_VALUES, ARKADE_OPCODE_NAMES, ARKADE_OPCODES, ARKADE_OP, inputName, contractHandlers, isMainnetDescriptor, descriptorIsOurs, deriveDescriptorLeafPubKey, deriveDescriptorLeafCompressedPubKey, DefaultVtxo, speculativeReceiveMetadata, DelegateVtxo, WALLET_RECEIVE_SOURCE, BoardingContractHandler } from './chunk-QMPNPZ2T.js';
3
+ import { VtxoScript, Transaction, isRecoverable, CSVMultisigTapscript, DEFAULT_NETWORK, hasTerminalSpend, getNormalizedVtxos, setArkPsbtField, PrevArkTxField, ConditionWitness, craftToSpendTx, ArkAddress, isVirtualCoin, getArkPsbtFields, CosignerPublicKey, ServerResponseMismatchError, OP_RETURN_EMPTY_PKSCRIPT, sequenceToTimelock, decodeTapscript, scriptFromTapLeafScript, CLTVMultisigTapscript, VtxoTaprootTree, timelockToSequence, baseFetch, Intent, rateGate, DEFAULT_NETWORK_NAME, normalizeVtxo, getSequence, toBatchExpiry, maybeArkError, isArkError, ArkErrorName, toOffchainInputFeeParams, canRecoverOnchain, getNetwork, MultisigTapscript, isEventSourceError, isRetryableProviderError, getAllNormalizedVtxos, DEFAULT_PAGE_SIZE, RestArkProvider, canSpendOffchain, toVirtualStatus, ArkError, resolveTimeHeight, parseLegacyExpiry, isExpired, DEFAULT_ARKADE_SERVER_URL, ProviderUnavailableError, networks as networks$1, isPastExpiry, fetchVtxoCreatedAtByTxid } from './chunk-JCJ5WFS3.js';
4
4
  import { __export } from './chunk-NSBPE2FW.js';
5
5
  import { sha256, equalBytes, hash160, sha256x2, concatBytes, randomPrivateKeyBytes, pubECDSA, pubSchnorr } from '@scure/btc-signer/utils.js';
6
6
  import { SigHash, Script, OP, OutScript, Address, RawWitness, p2tr, p2wpkh, TaprootControlBlock, DEFAULT_SEQUENCE, Transaction as Transaction$2 } from '@scure/btc-signer';
@@ -517,6 +517,18 @@ var SeedIdentity = class _SeedIdentity {
517
517
  const key = this.derivePrivateKeyForDescriptor(descriptor);
518
518
  return this.signMessageWithKey(key, message, signatureType);
519
519
  }
520
+ /**
521
+ * BIP-340 sign `messageHash` with the key derived from `descriptor`,
522
+ * aux_rand = 0. Backs {@link DescriptorIdentity.signSchnorrDeterministic},
523
+ * which swap preimage derivation reads through.
524
+ */
525
+ async signSchnorrDeterministicWithDescriptor(descriptor, messageHash) {
526
+ if (!this.isOurs(descriptor)) {
527
+ throw new Error(`Descriptor ${descriptor} does not belong to this identity`);
528
+ }
529
+ const key = this.derivePrivateKeyForDescriptor(descriptor);
530
+ return schnorr$1.signAsync(messageHash, key, new Uint8Array(32));
531
+ }
520
532
  // ── internal helpers ─────────────────────────────────────────────
521
533
  derivePrivateKeyForDescriptor(descriptor) {
522
534
  const network = isMainnetDescriptor(descriptor) ? networks.bitcoin : networks.testnet;
@@ -803,6 +815,59 @@ function assertValidSerializedIdentity(s) {
803
815
  }
804
816
  }
805
817
 
818
+ // src/identity/descriptorIdentity.ts
819
+ function isHDDeterministicSignCapable(value) {
820
+ return typeof value === "object" && value !== null && typeof value.signSchnorrDeterministicWithDescriptor === "function";
821
+ }
822
+ var DescriptorIdentity = class {
823
+ descriptor;
824
+ signer;
825
+ base;
826
+ constructor({ descriptor, signer, base }) {
827
+ this.descriptor = descriptor;
828
+ this.signer = signer;
829
+ this.base = base;
830
+ }
831
+ async xOnlyPublicKey() {
832
+ return deriveDescriptorLeafPubKey(this.descriptor);
833
+ }
834
+ async compressedPublicKey() {
835
+ return deriveDescriptorLeafCompressedPubKey(this.descriptor);
836
+ }
837
+ async sign(tx, inputIndexes) {
838
+ const [signed] = await this.signer.signWithDescriptor([
839
+ { descriptor: this.descriptor, tx, inputIndexes }
840
+ ]);
841
+ if (!signed) {
842
+ throw new Error(`Descriptor signer returned no transaction for ${this.descriptor}`);
843
+ }
844
+ return signed;
845
+ }
846
+ async signMessage(message, signatureType = "schnorr") {
847
+ return this.signer.signMessageWithDescriptor(this.descriptor, message, signatureType);
848
+ }
849
+ /**
850
+ * Delegated: `TreeSignerSession.random()` consults no key material, so the
851
+ * session is index-independent.
852
+ */
853
+ signerSession() {
854
+ return this.base.signerSession();
855
+ }
856
+ /**
857
+ * Throws rather than falling back to the baseline key: a preimage derived
858
+ * from the wrong index is unrecoverable, and callers probe this member
859
+ * through a structural guard that cannot tell the two apart.
860
+ */
861
+ async signSchnorrDeterministic(messageHash) {
862
+ if (!isHDDeterministicSignCapable(this.base)) {
863
+ throw new Error(
864
+ `Identity cannot sign deterministically for descriptor ${this.descriptor}`
865
+ );
866
+ }
867
+ return this.base.signSchnorrDeterministicWithDescriptor(this.descriptor, messageHash);
868
+ }
869
+ };
870
+
806
871
  // src/identity/hdCapableIdentity.ts
807
872
  function isHDCapableIdentity(value) {
808
873
  if (typeof value !== "object" || value === null) return false;
@@ -815,6 +880,13 @@ function isBatchSignable(identity) {
815
880
  return "signMultiple" in identity && typeof identity.signMultiple === "function";
816
881
  }
817
882
 
883
+ // src/wallet/hdWalletCapable.ts
884
+ function isHDWalletCapable(value) {
885
+ if (typeof value !== "object" || value === null) return false;
886
+ const v = value;
887
+ return typeof v.getCurrentSigningDescriptor === "function" && typeof v.getUsedSigningDescriptors === "function" && typeof v.signerForDescriptor === "function";
888
+ }
889
+
818
890
  // src/worker/browser/service-worker-manager.ts
819
891
  var registrations = /* @__PURE__ */ new Map();
820
892
  var handshakes = /* @__PURE__ */ new WeakSet();
@@ -1808,14 +1880,28 @@ function buildOpReturnScript(data) {
1808
1880
  }
1809
1881
  return script;
1810
1882
  }
1811
- var ErrOffchainOutputNotFound = (address) => new Error(`offchain send output not found: ${address}`);
1812
- var ErrInvalidAssetOutputAmount = (got, want, assetId) => new Error(`invalid asset output amount for ${assetId}: got ${got}, want ${want}`);
1813
- var ErrAssetGroupNotFound = (assetId) => new Error(`asset group not found in batch leaf: ${assetId}`);
1814
- var ErrAssetOutputNotFound = (assetId, outputIndex) => new Error(`asset output not found in asset group ${assetId} at index ${outputIndex}`);
1883
+ var ErrOffchainOutputNotFound = (address) => new ServerResponseMismatchError(`offchain send output not found: ${address}`);
1884
+ var ErrInvalidAssetOutputAmount = (got, want, assetId) => new ServerResponseMismatchError(
1885
+ `invalid asset output amount for ${assetId}: got ${got}, want ${want}`
1886
+ );
1887
+ var ErrAssetGroupNotFound = (assetId) => new ServerResponseMismatchError(`asset group not found in batch leaf: ${assetId}`);
1888
+ var ErrAssetOutputNotFound = (assetId, outputIndex) => new ServerResponseMismatchError(
1889
+ `asset output not found in asset group ${assetId} at index ${outputIndex}`
1890
+ );
1891
+ var ErrOnchainOutputNotFound = (address) => new ServerResponseMismatchError(`onchain output not found: ${address}`);
1892
+ var ErrUnvalidatedOffchainOutput = (address) => new ServerResponseMismatchError(
1893
+ `offchain output ${address} cannot be validated: virtual output tree signing did not run`
1894
+ );
1815
1895
  var ErrInvalidOnchainOutputAmount = (address) => new Error(`invalid onchain output amount: ${address}`);
1816
1896
  var ErrInvalidOnchainOutputAssets = (address) => new Error(`onchain output ${address} cannot have assets`);
1817
- var ErrOnchainOutputNotFound = (address) => new Error(`onchain output not found: ${address}`);
1818
1897
  var ErrInvalidOffchainOutputAmount = (address) => new Error(`invalid offchain output ${address}, missing amount`);
1898
+ function assertFinalCommitmentMatchesValidated(finalCommitmentTx, validatedCommitmentTxid, context) {
1899
+ if (!validatedCommitmentTxid) return;
1900
+ if (finalCommitmentTx.id === validatedCommitmentTxid) return;
1901
+ throw new ServerResponseMismatchError(
1902
+ `${context}: finalization commitment tx ${finalCommitmentTx.id} differs from the validated commitment tx ${validatedCommitmentTxid}`
1903
+ );
1904
+ }
1819
1905
  function validateBatchRecipients(commitmentTx, vtxoTreeLeaves, recipients, network) {
1820
1906
  const usedOutputs = /* @__PURE__ */ new Set();
1821
1907
  const usedOnchainOutputs = /* @__PURE__ */ new Set();
@@ -1830,6 +1916,18 @@ function validateBatchRecipients(commitmentTx, vtxoTreeLeaves, recipients, netwo
1830
1916
  validateOffchainRecipient(vtxoTreeLeaves, arkAddress, recipient, usedOutputs);
1831
1917
  }
1832
1918
  }
1919
+ function validateBatchRecipientsWithoutTree(commitmentTx, recipients, network) {
1920
+ const usedOnchainOutputs = /* @__PURE__ */ new Set();
1921
+ for (const recipient of recipients) {
1922
+ try {
1923
+ ArkAddress.decode(recipient.address);
1924
+ } catch {
1925
+ validateOnchainRecipient(commitmentTx, recipient, network, usedOnchainOutputs);
1926
+ continue;
1927
+ }
1928
+ throw ErrUnvalidatedOffchainOutput(recipient.address);
1929
+ }
1930
+ }
1833
1931
  function validateOnchainRecipient(commitmentTx, recipient, network, usedOutputs) {
1834
1932
  const addr = Address(network).decode(recipient.address);
1835
1933
  const expectedPkScript = OutScript.encode(addr);
@@ -1922,8 +2020,6 @@ function validateAssetGroupOutput(packet, outputIndex, assetId, expectedAmount)
1922
2020
  throw ErrInvalidAssetOutputAmount(assetOutput.amount, expectedAmount, assetId);
1923
2021
  }
1924
2022
  }
1925
-
1926
- // src/wallet/activity.ts
1927
2023
  async function buildActivities(txs, resolvers) {
1928
2024
  const preparedResolvers = (await Promise.all(
1929
2025
  resolvers.map(async (r) => {
@@ -2033,9 +2129,49 @@ function boardingResolver() {
2033
2129
  }
2034
2130
  };
2035
2131
  }
2132
+ function collabExitResolver() {
2133
+ return {
2134
+ id: "collab-exit",
2135
+ resolve(tx) {
2136
+ if (tx.tag !== "exit" || !tx.key.commitmentTxid) return void 0;
2137
+ return [
2138
+ {
2139
+ groupId: `exit:${tx.key.commitmentTxid}`,
2140
+ label: "Collaborative exit",
2141
+ kind: "exit"
2142
+ }
2143
+ ];
2144
+ }
2145
+ };
2146
+ }
2147
+ function assetMintResolver() {
2148
+ return {
2149
+ id: "asset-mint",
2150
+ resolve(tx) {
2151
+ if (!tx.assets?.length || !tx.key.arkTxid) return void 0;
2152
+ const minted = tx.assets.filter((a) => {
2153
+ try {
2154
+ return hex.encode(AssetId.fromString(a.assetId).txid) === tx.key.arkTxid;
2155
+ } catch {
2156
+ return false;
2157
+ }
2158
+ });
2159
+ if (minted.length === 0) return void 0;
2160
+ const received = tx.type === "RECEIVED" /* TxReceived */;
2161
+ return minted.map((a) => ({
2162
+ groupId: `mint:${a.assetId}`,
2163
+ label: received ? "Asset receive" : "Asset mint",
2164
+ kind: received ? "asset-receive" : "asset-mint",
2165
+ metadata: { assetId: a.assetId, amount: a.amount.toString() }
2166
+ }));
2167
+ }
2168
+ };
2169
+ }
2036
2170
  function createDefaultActivityRegistry() {
2037
2171
  const registry = new ActivityRegistry();
2038
2172
  registry.use(boardingResolver());
2173
+ registry.use(collabExitResolver());
2174
+ registry.use(assetMintResolver());
2039
2175
  return registry;
2040
2176
  }
2041
2177
 
@@ -2395,6 +2531,70 @@ function isValidArkAddress(address) {
2395
2531
  return false;
2396
2532
  }
2397
2533
  }
2534
+ function matchServerCheckpoints(serverCheckpointTxs, expectedCheckpoints, context) {
2535
+ if (serverCheckpointTxs.length !== expectedCheckpoints.length) {
2536
+ throw new ServerResponseMismatchError(
2537
+ `${context} returned ${serverCheckpointTxs.length} checkpoints, expected ${expectedCheckpoints.length}`
2538
+ );
2539
+ }
2540
+ const byTxid = new Map(expectedCheckpoints.map((c) => [c.id, c]));
2541
+ return serverCheckpointTxs.map((encoded, index) => {
2542
+ const server = Transaction.fromPSBT(base64.decode(encoded));
2543
+ const local = byTxid.get(server.id);
2544
+ if (!local) {
2545
+ throw new ServerResponseMismatchError(
2546
+ `${context} checkpoint ${index} txid ${server.id} does not match any submitted checkpoint`
2547
+ );
2548
+ }
2549
+ byTxid.delete(server.id);
2550
+ return { server, local };
2551
+ });
2552
+ }
2553
+ function assertSubmittedArkTxid(response, signedArkTx, context) {
2554
+ if (response.arkTxid !== signedArkTx.id) {
2555
+ throw new ServerResponseMismatchError(
2556
+ `${context} returned ark txid ${response.arkTxid}, expected ${signedArkTx.id}`
2557
+ );
2558
+ }
2559
+ if (response.finalArkTx === void 0) return;
2560
+ const finalTxid = Transaction.fromPSBT(base64.decode(response.finalArkTx)).id;
2561
+ if (finalTxid !== signedArkTx.id) {
2562
+ throw new ServerResponseMismatchError(
2563
+ `${context} returned final ark tx ${finalTxid}, expected ${signedArkTx.id}`
2564
+ );
2565
+ }
2566
+ }
2567
+ function assertCheckpointsMatchInputs(checkpoints, inputs, unrollCandidates, context) {
2568
+ const byOutpoint = new Map(inputs.map((input) => [`${input.txid}:${input.vout}`, input]));
2569
+ for (const [index, checkpoint] of checkpoints.entries()) {
2570
+ if (checkpoint.inputsLength !== 1) {
2571
+ throw new ServerResponseMismatchError(
2572
+ `${context}: checkpoint ${index} spends ${checkpoint.inputsLength} inputs, expected 1`
2573
+ );
2574
+ }
2575
+ const spent = checkpoint.getInput(0);
2576
+ if (!spent.txid || spent.index === void 0) {
2577
+ throw new ServerResponseMismatchError(
2578
+ `${context}: checkpoint ${index} has no input outpoint`
2579
+ );
2580
+ }
2581
+ const outpoint = `${hex.encode(spent.txid)}:${spent.index}`;
2582
+ const input = byOutpoint.get(outpoint);
2583
+ if (!input) {
2584
+ throw new ServerResponseMismatchError(
2585
+ `${context}: checkpoint ${index} spends ${outpoint}, which is not one of the requested virtual outputs`
2586
+ );
2587
+ }
2588
+ const rebuilt = unrollCandidates.some(
2589
+ (unroll) => buildCheckpointTx(input, unroll).tx.id === checkpoint.id
2590
+ );
2591
+ if (!rebuilt) {
2592
+ throw new ServerResponseMismatchError(
2593
+ `${context}: checkpoint ${index} txid ${checkpoint.id} differs from the checkpoint built locally for ${outpoint}`
2594
+ );
2595
+ }
2596
+ }
2597
+ }
2398
2598
  async function submitOffchainTx(provider, offchainTx, signer, hooks) {
2399
2599
  const { arkTx: signedArkTx, userSignedCheckpoints } = await signer.signArkTx(
2400
2600
  offchainTx.arkTx,
@@ -2406,27 +2606,26 @@ async function submitOffchainTx(provider, offchainTx, signer, hooks) {
2406
2606
  );
2407
2607
  }
2408
2608
  await hooks?.beforeSubmit?.();
2409
- const { arkTxid, signedCheckpointTxs } = await provider.submitTx(
2609
+ const response = await provider.submitTx(
2410
2610
  base64.encode(signedArkTx.toPSBT()),
2411
2611
  offchainTx.checkpoints.map((c) => base64.encode(c.toPSBT()))
2412
2612
  );
2413
- if (signedCheckpointTxs.length !== offchainTx.checkpoints.length) {
2414
- throw new Error(
2415
- `submitTx returned ${signedCheckpointTxs.length} checkpoints, expected ${offchainTx.checkpoints.length}`
2416
- );
2417
- }
2613
+ assertSubmittedArkTxid(response, signedArkTx, "submitTx");
2614
+ const { arkTxid, signedCheckpointTxs } = response;
2615
+ const matched = matchServerCheckpoints(signedCheckpointTxs, offchainTx.checkpoints, "submitTx");
2418
2616
  let finalCheckpoints;
2419
2617
  if (userSignedCheckpoints) {
2420
- finalCheckpoints = signedCheckpointTxs.map((c, i) => {
2421
- const serverSigned = Transaction.fromPSBT(base64.decode(c));
2422
- combineTapscriptSigs(userSignedCheckpoints[i], serverSigned);
2423
- return base64.encode(serverSigned.toPSBT());
2618
+ const userByTxid = new Map(
2619
+ userSignedCheckpoints.map((c, i) => [offchainTx.checkpoints[i].id, c])
2620
+ );
2621
+ finalCheckpoints = matched.map(({ server, local }) => {
2622
+ combineTapscriptSigs(userByTxid.get(local.id), server);
2623
+ return base64.encode(server.toPSBT());
2424
2624
  });
2425
2625
  } else {
2426
2626
  finalCheckpoints = await Promise.all(
2427
- signedCheckpointTxs.map(async (c) => {
2428
- const tx = Transaction.fromPSBT(base64.decode(c));
2429
- const signed = await signer.signCheckpoint(tx);
2627
+ matched.map(async ({ server }) => {
2628
+ const signed = await signer.signCheckpoint(server);
2430
2629
  return base64.encode(signed.toPSBT());
2431
2630
  })
2432
2631
  );
@@ -11952,6 +12151,51 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
11952
12151
  }
11953
12152
  return newBoarding.onchainAddress(this.network);
11954
12153
  }
12154
+ /**
12155
+ * @see HDWalletCapable.getCurrentSigningDescriptor
12156
+ */
12157
+ async getCurrentSigningDescriptor() {
12158
+ const provider = this._descriptorProvider;
12159
+ if (!(provider instanceof HDDescriptorProvider)) return void 0;
12160
+ return provider.getCurrentSigningDescriptor();
12161
+ }
12162
+ /**
12163
+ * @see HDWalletCapable.getUsedSigningDescriptors
12164
+ *
12165
+ * Union of the watermark band and the descriptors persisted on contracts:
12166
+ * the band alone would miss rows a restore scan wrote, and the contracts
12167
+ * alone would miss indices allocated for something the wallet never
12168
+ * persisted (a swap, an externally issued invoice).
12169
+ */
12170
+ async getUsedSigningDescriptors() {
12171
+ const provider = this._descriptorProvider;
12172
+ const descriptors = /* @__PURE__ */ new Set();
12173
+ if (provider instanceof HDDescriptorProvider) {
12174
+ const lastIndexUsed = await provider.getLastIndexUsed();
12175
+ for (let i = 0; i <= (lastIndexUsed ?? -1); i++) {
12176
+ descriptors.add(provider.materializeDescriptorAt(i));
12177
+ }
12178
+ }
12179
+ for (const contract of await this.contractRepository.getContracts()) {
12180
+ const descriptor = contract.metadata?.signingDescriptor;
12181
+ if (typeof descriptor === "string" && descriptor.length > 0) {
12182
+ descriptors.add(descriptor);
12183
+ }
12184
+ }
12185
+ return [...descriptors].sort(
12186
+ (a, b) => signingDescriptorIndex(a) - signingDescriptorIndex(b)
12187
+ );
12188
+ }
12189
+ /**
12190
+ * @see HDWalletCapable.signerForDescriptor
12191
+ */
12192
+ async signerForDescriptor(descriptor) {
12193
+ const provider = this._descriptorProvider;
12194
+ if (!(provider instanceof HDDescriptorProvider) || !provider.isOurs(descriptor)) {
12195
+ return this.identity;
12196
+ }
12197
+ return new DescriptorIdentity({ descriptor, signer: provider, base: this.identity });
12198
+ }
11955
12199
  /**
11956
12200
  * Mid-session server-signer rotation (plan §4). When arkd rotates its
11957
12201
  * active signer mid-session — the case the long-lived service worker and
@@ -12762,9 +13006,17 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12762
13006
  console.warn("Failed to rotate boarding address after board", e);
12763
13007
  }
12764
13008
  }
12765
- async handleSettlementFinalizationEvent(event, inputs, forfeitOutputScript, connectorsGraph) {
13009
+ async handleSettlementFinalizationEvent(event, inputs, forfeitOutputScript, expectedRecipients, connectorsGraph, validatedCommitmentTxid) {
12766
13010
  const signedForfeits = [];
12767
13011
  let settlementPsbt = Transaction$2.fromPSBT(base64.decode(event.commitmentTx));
13012
+ assertFinalCommitmentMatchesValidated(
13013
+ settlementPsbt,
13014
+ validatedCommitmentTxid,
13015
+ "settlement finalization"
13016
+ );
13017
+ if (!validatedCommitmentTxid && expectedRecipients.length > 0) {
13018
+ validateBatchRecipientsWithoutTree(settlementPsbt, expectedRecipients, this.network);
13019
+ }
12768
13020
  let hasBoardingUtxos = false;
12769
13021
  let connectorIndex = 0;
12770
13022
  const connectorsLeaves = connectorsGraph?.leaves() || [];
@@ -12887,6 +13139,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12887
13139
  */
12888
13140
  createBatchHandler(intentId, inputs, expectedRecipients, session) {
12889
13141
  let sweepTapTreeRoot;
13142
+ let validatedCommitmentTxid;
12890
13143
  return {
12891
13144
  onBatchStarted: async (event) => {
12892
13145
  const utf8IntentId = new TextEncoder().encode(intentId);
@@ -12944,6 +13197,7 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12944
13197
  if (!sharedOutput?.amount) {
12945
13198
  throw new Error("Shared output not found");
12946
13199
  }
13200
+ validatedCommitmentTxid = commitmentTx.id;
12947
13201
  await session.init(vtxoTree, sweepTapTreeRoot, sharedOutput.amount);
12948
13202
  const pubkey = hex.encode(await session.getPublicKey());
12949
13203
  const nonces = await session.getNonces();
@@ -12972,7 +13226,9 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
12972
13226
  event,
12973
13227
  inputs,
12974
13228
  this.forfeitOutputScript,
12975
- connectorTree
13229
+ expectedRecipients,
13230
+ connectorTree,
13231
+ validatedCommitmentTxid
12976
13232
  );
12977
13233
  }
12978
13234
  };
@@ -13131,6 +13387,11 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13131
13387
  for (let i = 0; i < vtxos.length; i += MAX_INPUTS_PER_INTENT) {
13132
13388
  batches.push(vtxos.slice(i, i + MAX_INPUTS_PER_INTENT));
13133
13389
  }
13390
+ const unrollCandidates = this.checkpointUnrollCandidates(await this.arkProvider.getInfo());
13391
+ const checkpointInputs = vtxos.map((vtxo) => ({
13392
+ ...vtxo,
13393
+ tapLeafScript: vtxo.forfeitTapLeafScript
13394
+ }));
13134
13395
  const seen = /* @__PURE__ */ new Set();
13135
13396
  const results = await Promise.all(
13136
13397
  batches.map(async (batch) => {
@@ -13146,6 +13407,12 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13146
13407
  const checkpointTxs = pendingTx.signedCheckpointTxs.map(
13147
13408
  (c) => Transaction$2.fromPSBT(base64.decode(c))
13148
13409
  );
13410
+ assertCheckpointsMatchInputs(
13411
+ checkpointTxs,
13412
+ checkpointInputs,
13413
+ unrollCandidates,
13414
+ `pending tx ${pendingTx.arkTxid}`
13415
+ );
13149
13416
  const checkpointJobs = checkpointTxs.map(
13150
13417
  (tx) => this.inputSigningJobsFromWitnessUtxos(tx)
13151
13418
  );
@@ -13201,6 +13468,32 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13201
13468
  }
13202
13469
  return { finalized, pending };
13203
13470
  }
13471
+ /**
13472
+ * The server unroll scripts a pending checkpoint may legitimately have been
13473
+ * built under: this wallet's configured one, the server's current one, and
13474
+ * one per deprecated signer (same closure, deprecated key). A tx submitted
13475
+ * before a signer rotation was built under the old key, so rebuilding
13476
+ * against the current key alone would leave it pending forever.
13477
+ */
13478
+ checkpointUnrollCandidates(info) {
13479
+ const current = CSVMultisigTapscript.decode(hex.decode(info.checkpointTapscript));
13480
+ const candidates = [this._serverUnrollScript, current];
13481
+ for (const deprecated of signerSetFromInfo(info).deprecated.keys()) {
13482
+ candidates.push(
13483
+ CSVMultisigTapscript.encode({
13484
+ ...current.params,
13485
+ pubkeys: [hex.decode(deprecated)]
13486
+ })
13487
+ );
13488
+ }
13489
+ const seen = /* @__PURE__ */ new Set();
13490
+ return candidates.filter((candidate) => {
13491
+ const script = hex.encode(candidate.script);
13492
+ if (seen.has(script)) return false;
13493
+ seen.add(script);
13494
+ return true;
13495
+ });
13496
+ }
13204
13497
  async hasPendingTxFlag() {
13205
13498
  const state = await this.walletRepository.getWalletState();
13206
13499
  return state?.settings?.hasPendingTx === true;
@@ -13433,12 +13726,23 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13433
13726
  pendingTxs.push(pendingTx);
13434
13727
  }
13435
13728
  }
13729
+ if (pendingTxs.length === 0) return result;
13436
13730
  const myPkScriptHex = hex.encode(myPkScript);
13731
+ const unrollCandidates = this.checkpointUnrollCandidates(await this.arkProvider.getInfo());
13437
13732
  for (const pendingTx of pendingTxs) {
13438
13733
  try {
13439
13734
  const checkpointTxs = pendingTx.signedCheckpointTxs.map(
13440
13735
  (checkpoint) => Transaction$2.fromPSBT(base64.decode(checkpoint))
13441
13736
  );
13737
+ assertCheckpointsMatchInputs(
13738
+ checkpointTxs,
13739
+ inputs.map((input) => ({
13740
+ ...input,
13741
+ tapLeafScript: input.forfeitTapLeafScript
13742
+ })),
13743
+ unrollCandidates,
13744
+ `pending arkadeCash tx ${pendingTx.arkTxid}`
13745
+ );
13442
13746
  const finalCheckpoints = await Promise.all(
13443
13747
  checkpointTxs.map(
13444
13748
  async (checkpoint) => base64.encode((await identity.sign(checkpoint)).toPSBT())
@@ -13848,28 +14152,29 @@ var Wallet2 = class _Wallet extends ReadonlyWallet {
13848
14152
  `updateDbAfterOffchainTx: inputs length (${inputs.length}) differs from signedCheckpointTxs length (${signedCheckpointTxs.length})`
13849
14153
  );
13850
14154
  }
13851
- const safeLength = Math.min(inputs.length, signedCheckpointTxs.length);
14155
+ const checkpointIdByOutpoint = /* @__PURE__ */ new Map();
14156
+ for (const encoded of signedCheckpointTxs) {
14157
+ const checkpoint = Transaction$2.fromPSBT(base64.decode(encoded));
14158
+ for (let i = 0; i < checkpoint.inputsLength; i++) {
14159
+ const input = checkpoint.getInput(i);
14160
+ if (!input.txid) continue;
14161
+ checkpointIdByOutpoint.set(
14162
+ `${hex.encode(input.txid)}:${input.index}`,
14163
+ checkpoint.id
14164
+ );
14165
+ }
14166
+ }
13852
14167
  const cm = await this.getContractManager();
13853
14168
  const annotatedInputs = await cm.annotateVtxos(inputs);
13854
- for (const [inputIndex, vtxo] of annotatedInputs.entries()) {
14169
+ for (const vtxo of annotatedInputs) {
13855
14170
  const spentFacts = { ...vtxo, isSpent: true };
13856
- if (inputIndex < safeLength && signedCheckpointTxs[inputIndex]) {
13857
- const checkpoint = Transaction$2.fromPSBT(
13858
- base64.decode(signedCheckpointTxs[inputIndex])
13859
- );
13860
- spentVtxos.push({
13861
- ...spentFacts,
13862
- virtualStatus: toVirtualStatus(spentFacts),
13863
- spentBy: checkpoint.id,
13864
- arkTxId: arkTxid
13865
- });
13866
- } else {
13867
- spentVtxos.push({
13868
- ...spentFacts,
13869
- virtualStatus: toVirtualStatus(spentFacts),
13870
- arkTxId: arkTxid
13871
- });
13872
- }
14171
+ const spentBy = checkpointIdByOutpoint.get(`${vtxo.txid}:${vtxo.vout}`);
14172
+ spentVtxos.push({
14173
+ ...spentFacts,
14174
+ virtualStatus: toVirtualStatus(spentFacts),
14175
+ ...spentBy ? { spentBy } : {},
14176
+ arkTxId: arkTxid
14177
+ });
13873
14178
  for (const id of vtxo.commitmentTxIds) {
13874
14179
  commitmentTxIds.add(id);
13875
14180
  }
@@ -19528,6 +19833,7 @@ var isVtxoCoin = (input) => isVirtualCoin(input);
19528
19833
  function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message, session, arkProvider, emulator, network, recipients) {
19529
19834
  let batchId;
19530
19835
  let sweepTapTreeRoot;
19836
+ let validatedCommitmentTxid;
19531
19837
  return {
19532
19838
  onBatchStarted: async (event) => {
19533
19839
  const utf8IntentId = new TextEncoder().encode(intentId);
@@ -19563,6 +19869,7 @@ function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message
19563
19869
  if (!sharedOutput?.amount) {
19564
19870
  throw new Error("Shared output not found");
19565
19871
  }
19872
+ validatedCommitmentTxid = commitmentTx.id;
19566
19873
  await session.init(vtxoTree, sweepTapTreeRoot, sharedOutput.amount);
19567
19874
  const pubkey = hex.encode(await session.getPublicKey());
19568
19875
  const nonces = await session.getNonces();
@@ -19586,6 +19893,14 @@ function createArkadeBatchHandler(intentId, inputs, signer, signedProof, message
19586
19893
  validateConnectorsTxGraph(event.commitmentTx, connectorTree);
19587
19894
  }
19588
19895
  let commitmentPsbt = Transaction.fromPSBT(base64.decode(event.commitmentTx));
19896
+ assertFinalCommitmentMatchesValidated(
19897
+ commitmentPsbt,
19898
+ validatedCommitmentTxid,
19899
+ "arkade batch finalization"
19900
+ );
19901
+ if (!validatedCommitmentTxid && recipients && recipients.length > 0) {
19902
+ validateBatchRecipientsWithoutTree(commitmentPsbt, recipients, network);
19903
+ }
19589
19904
  const signedForfeits = [];
19590
19905
  let connectorIndex = 0;
19591
19906
  const connectorLeaves = connectorTree?.leaves() || [];
@@ -20052,11 +20367,11 @@ var ArkadeTransactionBuilder = class {
20052
20367
  base64.encode(signedArk.toPSBT()),
20053
20368
  checkpoints.map((c) => base64.encode(c.toPSBT()))
20054
20369
  );
20370
+ assertSubmittedArkTxid(res, signedArk, "submitTx");
20371
+ const matched = matchServerCheckpoints(res.signedCheckpointTxs, checkpoints, "submitTx");
20055
20372
  const finalCps = await Promise.all(
20056
- res.signedCheckpointTxs.map(
20057
- async (b) => base64.encode(
20058
- (await client.identity.sign(Transaction.fromPSBT(base64.decode(b)), [0])).toPSBT()
20059
- )
20373
+ matched.map(
20374
+ async ({ server }) => base64.encode((await client.identity.sign(server, [0])).toPSBT())
20060
20375
  )
20061
20376
  );
20062
20377
  await client.arkProvider.finalizeTx(res.arkTxid, finalCps);
@@ -20553,6 +20868,6 @@ function isArkContract(str) {
20553
20868
  return str.startsWith(ARKCONTRACT_PREFIX + "=");
20554
20869
  }
20555
20870
 
20556
- export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports, assertIntentIdUnique, assertSendableAmount, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, intentPageBounds, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, makeHandle, mergeChainedTxType, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
20557
- //# sourceMappingURL=chunk-TEHJCEF3.js.map
20558
- //# sourceMappingURL=chunk-TEHJCEF3.js.map
20871
+ export { ARKADE_MAGIC, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DB_VERSION, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet2 as Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, arkade_exports, assertIntentIdUnique, assertSendableAmount, assertSubmittedArkTxid, assetMintResolver, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, decodeArkContract, deserializeAssets, deserializeExitPackage, deserializeUtxo, deserializeVtxo, encodeArkContract, extendVirtualCoinForContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, intentMatchesFilter, intentPageBounds, invoiceTarget, isArkContract, isBatchSignable, isBtcAddress, isCooperativelyMigratable, isDiscoverable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, isVtxoForScript, makeHandle, matchServerCheckpoints, mergeChainedTxType, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, saveVtxosForContract, scriptFromArkAddress, selectCoinsWithAsset, selectVirtualCoins, serializeAssets, serializeExitPackage, serializeUtxo, serializeVtxo, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, tryResolveSendAmount, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, warnAndFilterVtxosForScript };
20872
+ //# sourceMappingURL=chunk-QO3IKBYL.js.map
20873
+ //# sourceMappingURL=chunk-QO3IKBYL.js.map