@buildonspark/spark-sdk 0.1.41 → 0.1.43

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 (156) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/android/src/main/jniLibs/arm64-v8a/libuniffi_spark_frost.so +0 -0
  3. package/android/src/main/jniLibs/armeabi-v7a/libuniffi_spark_frost.so +0 -0
  4. package/android/src/main/jniLibs/x86/libuniffi_spark_frost.so +0 -0
  5. package/android/src/main/jniLibs/x86_64/libuniffi_spark_frost.so +0 -0
  6. package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.cts +10 -0
  7. package/dist/LightningSendFeeEstimateInput-BgOhEAI-.d.ts +10 -0
  8. package/dist/{RequestLightningSendInput-mXUWn_cp.d.ts → RequestLightningSendInput-D7fZdT4A.d.ts} +35 -16
  9. package/dist/{RequestLightningSendInput-DXcLoiCe.d.cts → RequestLightningSendInput-Na1mHdWg.d.cts} +35 -16
  10. package/dist/address/index.cjs +38 -7
  11. package/dist/address/index.d.cts +2 -2
  12. package/dist/address/index.d.ts +2 -2
  13. package/dist/address/index.js +3 -3
  14. package/dist/{chunk-ATEHMLKP.js → chunk-6AFUC5M2.js} +1 -1
  15. package/dist/{chunk-ZXDE2XMU.js → chunk-BUTZWYBW.js} +9 -6
  16. package/dist/{chunk-7EFSUADA.js → chunk-DOA6QXYQ.js} +1 -0
  17. package/dist/{chunk-J5W5Q2ZP.js → chunk-DQYKQJRZ.js} +291 -7
  18. package/dist/{chunk-TWF35O6M.js → chunk-GSI4OLXZ.js} +32 -1
  19. package/dist/{chunk-2ZXXLPG2.js → chunk-GYQR4B4P.js} +5 -4
  20. package/dist/{chunk-ROKY5KS4.js → chunk-HRQRRDSS.js} +53 -15
  21. package/dist/{chunk-YEZDPUFY.js → chunk-IRW5TWMH.js} +8 -8
  22. package/dist/{chunk-7VMYMQLF.js → chunk-NSJF5F5O.js} +1 -1
  23. package/dist/{chunk-TM4TOEOX.js → chunk-O4RYNJNB.js} +3 -3
  24. package/dist/{chunk-MGPRLH6Q.js → chunk-QNNSEJ4P.js} +1 -1
  25. package/dist/{chunk-UKT6OFLO.js → chunk-TIUBYNN5.js} +13 -7
  26. package/dist/{chunk-6YVPOQ2A.js → chunk-TOSP3INR.js} +235 -143
  27. package/dist/chunk-VFJQNBFX.js +21 -0
  28. package/dist/{chunk-KKSU7OZO.js → chunk-WWOTVNPP.js} +195 -67
  29. package/dist/{chunk-HK6LPV6Z.js → chunk-Z5HIAYFT.js} +1 -1
  30. package/dist/graphql/objects/index.cjs +229 -135
  31. package/dist/graphql/objects/index.d.cts +54 -9
  32. package/dist/graphql/objects/index.d.ts +54 -9
  33. package/dist/graphql/objects/index.js +3 -3
  34. package/dist/{index-OSDtPMmC.d.ts → index-7RYRH5wc.d.ts} +10 -8
  35. package/dist/{index-CFh4uWzi.d.cts → index-BJOc8Ur-.d.cts} +10 -8
  36. package/dist/index.cjs +790 -315
  37. package/dist/index.d.cts +8 -7
  38. package/dist/index.d.ts +8 -7
  39. package/dist/index.js +26 -26
  40. package/dist/index.node.cjs +790 -315
  41. package/dist/index.node.d.cts +9 -8
  42. package/dist/index.node.d.ts +9 -8
  43. package/dist/index.node.js +26 -26
  44. package/dist/native/index.cjs +812 -332
  45. package/dist/native/index.d.cts +53 -18
  46. package/dist/native/index.d.ts +53 -18
  47. package/dist/native/index.js +659 -181
  48. package/dist/{network-BiwBmoOg.d.cts → network-D5lKssVl.d.cts} +1 -1
  49. package/dist/{network-BF2GYPye.d.ts → network-xkBSpaTn.d.ts} +1 -1
  50. package/dist/proto/lrc20.d.cts +1 -1
  51. package/dist/proto/lrc20.d.ts +1 -1
  52. package/dist/proto/spark.d.cts +1 -1
  53. package/dist/proto/spark.d.ts +1 -1
  54. package/dist/proto/spark_token.d.cts +1 -1
  55. package/dist/proto/spark_token.d.ts +1 -1
  56. package/dist/{sdk-types-CfhdFnsA.d.cts → sdk-types-B-q9py_P.d.cts} +1 -1
  57. package/dist/{sdk-types-MnQrHolg.d.ts → sdk-types-BPoPgzda.d.ts} +1 -1
  58. package/dist/services/config.cjs +118 -69
  59. package/dist/services/config.d.cts +6 -4
  60. package/dist/services/config.d.ts +6 -4
  61. package/dist/services/config.js +9 -9
  62. package/dist/services/connection.cjs +95 -15
  63. package/dist/services/connection.d.cts +6 -4
  64. package/dist/services/connection.d.ts +6 -4
  65. package/dist/services/connection.js +3 -3
  66. package/dist/services/index.cjs +487 -117
  67. package/dist/services/index.d.cts +5 -4
  68. package/dist/services/index.d.ts +5 -4
  69. package/dist/services/index.js +19 -19
  70. package/dist/services/lrc-connection.cjs +50 -7
  71. package/dist/services/lrc-connection.d.cts +5 -4
  72. package/dist/services/lrc-connection.d.ts +5 -4
  73. package/dist/services/lrc-connection.js +3 -3
  74. package/dist/services/token-transactions.cjs +351 -36
  75. package/dist/services/token-transactions.d.cts +5 -4
  76. package/dist/services/token-transactions.d.ts +5 -4
  77. package/dist/services/token-transactions.js +6 -6
  78. package/dist/services/wallet-config.cjs +1 -0
  79. package/dist/services/wallet-config.d.cts +6 -4
  80. package/dist/services/wallet-config.d.ts +6 -4
  81. package/dist/services/wallet-config.js +1 -1
  82. package/dist/signer/signer.cjs +117 -64
  83. package/dist/signer/signer.d.cts +4 -3
  84. package/dist/signer/signer.d.ts +4 -3
  85. package/dist/signer/signer.js +15 -7
  86. package/dist/{signer-CylxIujU.d.ts → signer-IO3oMRNj.d.cts} +2 -1
  87. package/dist/{signer-BhLS7SYR.d.cts → signer-wqesWifN.d.ts} +2 -1
  88. package/dist/{spark-DjR1b3TC.d.cts → spark-CDm4gqS6.d.cts} +1 -1
  89. package/dist/{spark-DjR1b3TC.d.ts → spark-CDm4gqS6.d.ts} +1 -1
  90. package/dist/types/index.cjs +282 -188
  91. package/dist/types/index.d.cts +7 -6
  92. package/dist/types/index.d.ts +7 -6
  93. package/dist/types/index.js +3 -3
  94. package/dist/utils/index.cjs +90 -58
  95. package/dist/utils/index.d.cts +6 -5
  96. package/dist/utils/index.d.ts +6 -5
  97. package/dist/utils/index.js +16 -16
  98. package/ios/spark_frostFFI.xcframework/ios-arm64/SparkFrost +0 -0
  99. package/ios/spark_frostFFI.xcframework/ios-arm64/spark_frostFFI.framework/spark_frostFFI +0 -0
  100. package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/SparkFrost +0 -0
  101. package/ios/spark_frostFFI.xcframework/ios-arm64_x86_64-simulator/spark_frostFFI.framework/spark_frostFFI +0 -0
  102. package/ios/spark_frostFFI.xcframework/macos-arm64_x86_64/spark_frostFFI.framework/spark_frostFFI +0 -0
  103. package/package.json +4 -4
  104. package/src/constants.ts +21 -0
  105. package/src/errors/base.ts +43 -1
  106. package/src/graphql/client.ts +4 -0
  107. package/src/graphql/mutations/RequestLightningSend.ts +2 -0
  108. package/src/graphql/objects/ClaimStaticDepositInput.ts +1 -1
  109. package/src/graphql/objects/ClaimStaticDepositStatus.ts +4 -2
  110. package/src/graphql/objects/Connection.ts +7 -7
  111. package/src/graphql/objects/CoopExitFeeEstimate.ts +1 -1
  112. package/src/graphql/objects/CoopExitFeeQuote.ts +202 -0
  113. package/src/graphql/objects/CoopExitFeeQuoteInput.ts +41 -0
  114. package/src/graphql/objects/CoopExitFeeQuoteOutput.ts +45 -0
  115. package/src/graphql/objects/CoopExitRequest.ts +21 -0
  116. package/src/graphql/objects/CurrencyUnit.ts +26 -28
  117. package/src/graphql/objects/Entity.ts +84 -0
  118. package/src/graphql/objects/Invoice.ts +2 -2
  119. package/src/graphql/objects/Leaf.ts +1 -1
  120. package/src/graphql/objects/LeavesSwapFeeEstimateOutput.ts +1 -1
  121. package/src/graphql/objects/LeavesSwapRequest.ts +6 -0
  122. package/src/graphql/objects/LightningReceiveRequest.ts +11 -0
  123. package/src/graphql/objects/LightningSendFeeEstimateInput.ts +8 -0
  124. package/src/graphql/objects/LightningSendFeeEstimateOutput.ts +1 -1
  125. package/src/graphql/objects/LightningSendRequest.ts +3 -0
  126. package/src/graphql/objects/RequestCoopExitInput.ts +8 -0
  127. package/src/graphql/objects/RequestLeavesSwapInput.ts +5 -1
  128. package/src/graphql/objects/RequestLightningReceiveInput.ts +9 -2
  129. package/src/graphql/objects/RequestLightningSendInput.ts +8 -0
  130. package/src/graphql/objects/SparkCoopExitRequestStatus.ts +2 -0
  131. package/src/graphql/objects/SparkUserRequestType.ts +2 -0
  132. package/src/graphql/objects/SparkWalletUser.ts +20 -0
  133. package/src/graphql/objects/UserRequest.ts +32 -0
  134. package/src/graphql/objects/VerifyChallengeInput.ts +1 -1
  135. package/src/graphql/objects/index.ts +12 -3
  136. package/src/graphql/queries/LightningSendFeeEstimate.ts +2 -0
  137. package/src/logger.ts +3 -0
  138. package/src/native/index.ts +1 -0
  139. package/src/services/config.ts +4 -0
  140. package/src/services/connection.ts +68 -29
  141. package/src/services/coop-exit.ts +1 -1
  142. package/src/services/lightning.ts +25 -1
  143. package/src/services/lrc-connection.ts +3 -3
  144. package/src/services/token-transactions.ts +6 -2
  145. package/src/services/wallet-config.ts +2 -0
  146. package/src/signer/signer.ts +4 -1
  147. package/src/spark-wallet/spark-wallet.ts +51 -15
  148. package/src/spark-wallet/types.ts +1 -0
  149. package/src/tests/errors.test.ts +58 -0
  150. package/src/tests/integration/lightning.test.ts +184 -0
  151. package/src/tests/integration/ssp/static_deposit.test.ts +1 -2
  152. package/src/tests/tokens.test.ts +52 -3
  153. package/src/utils/token-hashing.ts +335 -1
  154. package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.cts +0 -5
  155. package/dist/LightningSendFeeEstimateInput-CJvPnCSB.d.ts +0 -5
  156. package/dist/chunk-HKAKEKCE.js +0 -8
@@ -192,6 +192,7 @@ var BASE_CONFIG = {
192
192
  signingOperators: getLocalSigningOperators(),
193
193
  tokenSignatures: "SCHNORR",
194
194
  tokenTransactionVersion: "V0",
195
+ tokenValidityDurationSeconds: 180,
195
196
  electrsUrl: getElectrsUrl("LOCAL"),
196
197
  expectedWithdrawBondSats: 1e4,
197
198
  expectedWithdrawRelativeBlockLocktime: 1e3,
@@ -1,15 +1,16 @@
1
1
  import { MayHaveLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
2
- import { M as MayHaveSspClientOptions, B as SspClientOptions } from '../RequestLightningSendInput-DXcLoiCe.cjs';
3
- import { a as NetworkType } from '../network-BiwBmoOg.cjs';
2
+ import { M as MayHaveSspClientOptions, B as SspClientOptions } from '../RequestLightningSendInput-Na1mHdWg.cjs';
3
+ import { a as NetworkType } from '../network-D5lKssVl.cjs';
4
4
  import '@lightsparkdev/core';
5
5
  import '../BitcoinNetwork-TnABML0T.cjs';
6
- import '../signer-BhLS7SYR.cjs';
6
+ import '../signer-IO3oMRNj.cjs';
7
7
  import '@scure/bip32';
8
- import '../spark-DjR1b3TC.cjs';
8
+ import '../spark-CDm4gqS6.cjs';
9
9
  import '@bufbuild/protobuf/wire';
10
10
  import 'nice-grpc-common';
11
11
  import '@scure/btc-signer';
12
12
  import 'bitcoinjs-lib';
13
+ import '@buildonspark/lrc20-sdk/lrc/types';
13
14
 
14
15
  declare const ELECTRS_CREDENTIALS: {
15
16
  username: string;
@@ -35,6 +36,7 @@ type ConfigOptions = MayHaveLrc20WalletApiConfig & MayHaveSspClientOptions & {
35
36
  readonly lrc20Address?: string;
36
37
  readonly threshold?: number;
37
38
  readonly tokenSignatures?: "ECDSA" | "SCHNORR";
39
+ readonly tokenValidityDurationSeconds?: number;
38
40
  readonly tokenTransactionVersion?: "V0" | "V1";
39
41
  readonly electrsUrl?: string;
40
42
  readonly lrc20ApiConfig?: LRC20WalletApiConfig;
@@ -1,15 +1,16 @@
1
1
  import { MayHaveLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
2
- import { M as MayHaveSspClientOptions, B as SspClientOptions } from '../RequestLightningSendInput-mXUWn_cp.js';
3
- import { a as NetworkType } from '../network-BF2GYPye.js';
2
+ import { M as MayHaveSspClientOptions, B as SspClientOptions } from '../RequestLightningSendInput-D7fZdT4A.js';
3
+ import { a as NetworkType } from '../network-xkBSpaTn.js';
4
4
  import '@lightsparkdev/core';
5
5
  import '../BitcoinNetwork-TnABML0T.js';
6
- import '../signer-CylxIujU.js';
6
+ import '../signer-wqesWifN.js';
7
7
  import '@scure/bip32';
8
- import '../spark-DjR1b3TC.js';
8
+ import '../spark-CDm4gqS6.js';
9
9
  import '@bufbuild/protobuf/wire';
10
10
  import 'nice-grpc-common';
11
11
  import '@scure/btc-signer';
12
12
  import 'bitcoinjs-lib';
13
+ import '@buildonspark/lrc20-sdk/lrc/types';
13
14
 
14
15
  declare const ELECTRS_CREDENTIALS: {
15
16
  username: string;
@@ -35,6 +36,7 @@ type ConfigOptions = MayHaveLrc20WalletApiConfig & MayHaveSspClientOptions & {
35
36
  readonly lrc20Address?: string;
36
37
  readonly threshold?: number;
37
38
  readonly tokenSignatures?: "ECDSA" | "SCHNORR";
39
+ readonly tokenValidityDurationSeconds?: number;
38
40
  readonly tokenTransactionVersion?: "V0" | "V1";
39
41
  readonly electrsUrl?: string;
40
42
  readonly lrc20ApiConfig?: LRC20WalletApiConfig;
@@ -12,7 +12,7 @@ import {
12
12
  getSspIdentityPublicKey,
13
13
  getSspSchemaEndpoint,
14
14
  getSspUrl
15
- } from "../chunk-7EFSUADA.js";
15
+ } from "../chunk-DOA6QXYQ.js";
16
16
  import "../chunk-MVRQ5US7.js";
17
17
  export {
18
18
  ELECTRS_CREDENTIALS,
@@ -1114,12 +1114,16 @@ var init_wasm = __esm({
1114
1114
  var signer_exports = {};
1115
1115
  __export(signer_exports, {
1116
1116
  DefaultSparkSigner: () => DefaultSparkSigner,
1117
+ MultisigReceiptInput: () => import_types2.MultisigReceiptInput,
1118
+ PARITY: () => import_lrc20_sdk2.PARITY,
1119
+ Receipt: () => import_lrc20_sdk2.Receipt,
1117
1120
  TaprootOutputKeysGenerator: () => TaprootOutputKeysGenerator,
1118
- TaprootSparkSigner: () => TaprootSparkSigner
1121
+ TaprootSparkSigner: () => TaprootSparkSigner,
1122
+ fromPrivateKey: () => import_lrc20_sdk2.fromPrivateKey
1119
1123
  });
1120
1124
  module.exports = __toCommonJS(signer_exports);
1121
1125
  init_buffer();
1122
- var import_utils4 = require("@noble/curves/abstract/utils");
1126
+ var import_utils5 = require("@noble/curves/abstract/utils");
1123
1127
  var import_secp256k15 = require("@noble/curves/secp256k1");
1124
1128
  var import_bip32 = require("@scure/bip32");
1125
1129
  var import_bip39 = require("@scure/bip39");
@@ -1128,14 +1132,27 @@ var ecies = __toESM(require("eciesjs"), 1);
1128
1132
 
1129
1133
  // src/constants.ts
1130
1134
  init_buffer();
1135
+ var import_core = require("@lightsparkdev/core");
1131
1136
  var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
1132
1137
  var isBun = globalThis.Bun !== void 0;
1138
+ var packageVersion = true ? "0.1.43" : "unknown";
1139
+ var baseEnvStr = "unknown";
1140
+ if (import_core.isNode) {
1141
+ baseEnvStr = `node/${process.version}`;
1142
+ } else if (isReactNative) {
1143
+ baseEnvStr = "react-native";
1144
+ } else {
1145
+ const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "unknown-user-agent";
1146
+ baseEnvStr = `browser/${userAgent}`;
1147
+ }
1148
+ var clientEnv = `js-spark-sdk/${packageVersion} ${baseEnvStr}`;
1133
1149
 
1134
1150
  // src/errors/types.ts
1135
1151
  init_buffer();
1136
1152
 
1137
1153
  // src/errors/base.ts
1138
1154
  init_buffer();
1155
+ var import_utils = require("@noble/hashes/utils");
1139
1156
  var SparkSDKError = class extends Error {
1140
1157
  context;
1141
1158
  originalError;
@@ -1167,12 +1184,42 @@ var SparkSDKError = class extends Error {
1167
1184
  }
1168
1185
  };
1169
1186
  function getMessage(message, context = {}, originalError) {
1170
- const contextStr = Object.entries(context).map(([key, value]) => `${key}: ${JSON.stringify(value)}`).join(", ");
1187
+ const contextStr = Object.entries(context).map(([key, value]) => `${key}: ${safeStringify(value)}`).join(", ");
1171
1188
  const originalErrorStr = originalError ? `
1172
1189
  Original Error: ${originalError.message}` : "";
1173
1190
  return `SparkSDKError: ${message}${contextStr ? `
1174
1191
  Context: ${contextStr}` : ""}${originalErrorStr}`;
1175
1192
  }
1193
+ function safeStringify(value) {
1194
+ const replacer = (_, v) => {
1195
+ if (typeof v === "bigint") {
1196
+ return v.toString();
1197
+ }
1198
+ if (v instanceof Uint8Array) {
1199
+ return formatUint8Array(v);
1200
+ }
1201
+ return v;
1202
+ };
1203
+ if (typeof value === "bigint") {
1204
+ return `"${value.toString()}"`;
1205
+ }
1206
+ if (value instanceof Uint8Array) {
1207
+ return `"${formatUint8Array(value)}"`;
1208
+ }
1209
+ try {
1210
+ const result = JSON.stringify(value, replacer);
1211
+ return result === void 0 ? String(value) : result;
1212
+ } catch {
1213
+ try {
1214
+ return String(value);
1215
+ } catch {
1216
+ return "[Unserializable]";
1217
+ }
1218
+ }
1219
+ }
1220
+ function formatUint8Array(arr) {
1221
+ return `Uint8Array(0x${(0, import_utils.bytesToHex)(arr)})`;
1222
+ }
1176
1223
 
1177
1224
  // src/errors/types.ts
1178
1225
  var ValidationError = class extends SparkSDKError {
@@ -1189,7 +1236,7 @@ var ConfigurationError = class extends SparkSDKError {
1189
1236
  // src/utils/adaptor-signature.ts
1190
1237
  init_buffer();
1191
1238
  var import_modular = require("@noble/curves/abstract/modular");
1192
- var import_utils = require("@noble/curves/abstract/utils");
1239
+ var import_utils2 = require("@noble/curves/abstract/utils");
1193
1240
  var import_secp256k1 = require("@noble/curves/secp256k1");
1194
1241
 
1195
1242
  // src/errors/index.ts
@@ -1199,10 +1246,10 @@ init_buffer();
1199
1246
  function generateAdaptorFromSignature(signature) {
1200
1247
  const adaptorPrivateKey = import_secp256k1.secp256k1.utils.randomPrivateKey();
1201
1248
  const { r, s } = parseSignature(signature);
1202
- const sBigInt = (0, import_utils.bytesToNumberBE)(s);
1203
- const tBigInt = (0, import_utils.bytesToNumberBE)(adaptorPrivateKey);
1249
+ const sBigInt = (0, import_utils2.bytesToNumberBE)(s);
1250
+ const tBigInt = (0, import_utils2.bytesToNumberBE)(adaptorPrivateKey);
1204
1251
  const newS = (0, import_modular.mod)(sBigInt - tBigInt, import_secp256k1.secp256k1.CURVE.n);
1205
- const newSignature = new Uint8Array([...r, ...(0, import_utils.numberToBytesBE)(newS, 32)]);
1252
+ const newSignature = new Uint8Array([...r, ...(0, import_utils2.numberToBytesBE)(newS, 32)]);
1206
1253
  return {
1207
1254
  adaptorSignature: newSignature,
1208
1255
  adaptorPrivateKey
@@ -1223,15 +1270,15 @@ function parseSignature(signature) {
1223
1270
  }
1224
1271
  const r = signature.slice(0, 32);
1225
1272
  const s = signature.slice(32, 64);
1226
- if ((0, import_utils.bytesToNumberBE)(r) >= import_secp256k1.secp256k1.CURVE.Fp.ORDER) {
1273
+ if ((0, import_utils2.bytesToNumberBE)(r) >= import_secp256k1.secp256k1.CURVE.Fp.ORDER) {
1227
1274
  throw new ValidationError("Invalid signature: r >= field prime", {
1228
- rValue: (0, import_utils.bytesToNumberBE)(r),
1275
+ rValue: (0, import_utils2.bytesToNumberBE)(r),
1229
1276
  fieldPrime: import_secp256k1.secp256k1.CURVE.Fp.ORDER
1230
1277
  });
1231
1278
  }
1232
- if ((0, import_utils.bytesToNumberBE)(s) >= import_secp256k1.secp256k1.CURVE.n) {
1279
+ if ((0, import_utils2.bytesToNumberBE)(s) >= import_secp256k1.secp256k1.CURVE.n) {
1233
1280
  throw new ValidationError("Invalid signature: s >= group order", {
1234
- sValue: (0, import_utils.bytesToNumberBE)(s),
1281
+ sValue: (0, import_utils2.bytesToNumberBE)(s),
1235
1282
  groupOrder: import_secp256k1.secp256k1.CURVE.n
1236
1283
  });
1237
1284
  }
@@ -1240,7 +1287,7 @@ function parseSignature(signature) {
1240
1287
 
1241
1288
  // src/utils/keys.ts
1242
1289
  init_buffer();
1243
- var import_utils2 = require("@noble/curves/abstract/utils");
1290
+ var import_utils3 = require("@noble/curves/abstract/utils");
1244
1291
  var import_secp256k12 = require("@noble/curves/secp256k1");
1245
1292
  function subtractPrivateKeys(a, b) {
1246
1293
  if (a.length !== 32 || b.length !== 32) {
@@ -1253,12 +1300,12 @@ function subtractPrivateKeys(a, b) {
1253
1300
  const privA = import_secp256k12.secp256k1.utils.normPrivateKeyToScalar(a);
1254
1301
  const privB = import_secp256k12.secp256k1.utils.normPrivateKeyToScalar(b);
1255
1302
  const sum = (import_secp256k12.secp256k1.CURVE.n - privB + privA) % import_secp256k12.secp256k1.CURVE.n;
1256
- return (0, import_utils2.numberToBytesBE)(sum, 32);
1303
+ return (0, import_utils3.numberToBytesBE)(sum, 32);
1257
1304
  }
1258
1305
 
1259
1306
  // src/utils/secret-sharing.ts
1260
1307
  init_buffer();
1261
- var import_utils3 = require("@noble/curves/abstract/utils");
1308
+ var import_utils4 = require("@noble/curves/abstract/utils");
1262
1309
  var import_secp256k13 = require("@noble/curves/secp256k1");
1263
1310
 
1264
1311
  // src/utils/crypto.ts
@@ -1277,7 +1324,7 @@ function getRandomBigInt(max) {
1277
1324
  const mask = (1n << BigInt(max.toString(2).length)) - 1n;
1278
1325
  while (true) {
1279
1326
  const randBytes = crypto.getRandomValues(new Uint8Array(byteLength + 1));
1280
- const randValue = BigInt("0x" + (0, import_utils3.bytesToHex)(randBytes)) & mask;
1327
+ const randValue = BigInt("0x" + (0, import_utils4.bytesToHex)(randBytes)) & mask;
1281
1328
  if (randValue < maxBigInt) {
1282
1329
  return randValue;
1283
1330
  }
@@ -1369,7 +1416,9 @@ function getSigningCommitmentFromNonce(nonce) {
1369
1416
  var import_secp256k16 = require("@bitcoinerlab/secp256k1");
1370
1417
  var import_lrc20_sdk = require("@buildonspark/lrc20-sdk");
1371
1418
  var import_sha2 = require("@noble/hashes/sha2");
1372
- var import_utils5 = require("@scure/btc-signer/utils");
1419
+ var import_utils6 = require("@scure/btc-signer/utils");
1420
+ var import_lrc20_sdk2 = require("@buildonspark/lrc20-sdk");
1421
+ var import_types2 = require("@buildonspark/lrc20-sdk/lrc/types");
1373
1422
  var sparkFrostModule = void 0;
1374
1423
  var getSparkFrostModule = async () => {
1375
1424
  if (isReactNative) {
@@ -1439,7 +1488,7 @@ var TaprootOutputKeysGenerator = class {
1439
1488
  }
1440
1489
  const derivationPath = this.useAddressIndex ? `m/86'/0'/0'/0/${accountNumber}` : `m/86'/0'/${accountNumber}'/0/0`;
1441
1490
  const taprootInternalKey = hdkey.derive(derivationPath);
1442
- let tweakedPrivateKey = (0, import_utils5.taprootTweakPrivKey)(taprootInternalKey.privateKey);
1491
+ let tweakedPrivateKey = (0, import_utils6.taprootTweakPrivKey)(taprootInternalKey.privateKey);
1443
1492
  let tweakedPublicKey = import_secp256k15.secp256k1.getPublicKey(tweakedPrivateKey);
1444
1493
  if (tweakedPublicKey[0] === 3) {
1445
1494
  tweakedPrivateKey = (0, import_secp256k16.privateNegate)(tweakedPrivateKey);
@@ -1526,28 +1575,28 @@ var DefaultSparkSigner = class {
1526
1575
  const privateKey = this.deriveSigningKey(hash);
1527
1576
  const publicKey = import_secp256k15.secp256k1.getPublicKey(privateKey);
1528
1577
  this.publicKeyToPrivateKeyMap.set(
1529
- (0, import_utils4.bytesToHex)(publicKey),
1530
- (0, import_utils4.bytesToHex)(privateKey)
1578
+ (0, import_utils5.bytesToHex)(publicKey),
1579
+ (0, import_utils5.bytesToHex)(privateKey)
1531
1580
  );
1532
1581
  }
1533
1582
  }
1534
1583
  async getSchnorrPublicKey(publicKey) {
1535
- const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey));
1584
+ const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey));
1536
1585
  if (!privateKey) {
1537
1586
  throw new ValidationError("Private key is not set", {
1538
1587
  field: "privateKey"
1539
1588
  });
1540
1589
  }
1541
- return import_secp256k15.schnorr.getPublicKey((0, import_utils4.hexToBytes)(privateKey));
1590
+ return import_secp256k15.schnorr.getPublicKey((0, import_utils5.hexToBytes)(privateKey));
1542
1591
  }
1543
1592
  async signSchnorr(message, publicKey) {
1544
- const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey));
1593
+ const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey));
1545
1594
  if (!privateKey) {
1546
1595
  throw new ValidationError("Private key is not set", {
1547
1596
  field: "privateKey"
1548
1597
  });
1549
1598
  }
1550
- return import_secp256k15.schnorr.sign(message, (0, import_utils4.hexToBytes)(privateKey));
1599
+ return import_secp256k15.schnorr.sign(message, (0, import_utils5.hexToBytes)(privateKey));
1551
1600
  }
1552
1601
  async signSchnorrWithIdentityKey(message) {
1553
1602
  if (!this.identityKey?.privateKey) {
@@ -1589,8 +1638,8 @@ var DefaultSparkSigner = class {
1589
1638
  );
1590
1639
  this.staticDepositKeyMap.set(idx, staticDepositKey);
1591
1640
  this.publicKeyToPrivateKeyMap.set(
1592
- (0, import_utils4.bytesToHex)(staticDepositKey.publicKey),
1593
- (0, import_utils4.bytesToHex)(staticDepositKey.privateKey)
1641
+ (0, import_utils5.bytesToHex)(staticDepositKey.publicKey),
1642
+ (0, import_utils5.bytesToHex)(staticDepositKey.privateKey)
1594
1643
  );
1595
1644
  return staticDepositKey.publicKey;
1596
1645
  }
@@ -1635,7 +1684,7 @@ var DefaultSparkSigner = class {
1635
1684
  return await (0, import_bip39.mnemonicToSeed)(mnemonic);
1636
1685
  }
1637
1686
  async getTrackedPublicKeys() {
1638
- return Array.from(this.publicKeyToPrivateKeyMap.keys()).map(import_utils4.hexToBytes);
1687
+ return Array.from(this.publicKeyToPrivateKeyMap.keys()).map(import_utils5.hexToBytes);
1639
1688
  }
1640
1689
  async generatePublicKey(hash) {
1641
1690
  if (!this.signingKey) {
@@ -1655,31 +1704,31 @@ var DefaultSparkSigner = class {
1655
1704
  });
1656
1705
  }
1657
1706
  const publicKey = import_secp256k15.secp256k1.getPublicKey(newPrivateKey);
1658
- const pubKeyHex = (0, import_utils4.bytesToHex)(publicKey);
1659
- const privKeyHex = (0, import_utils4.bytesToHex)(newPrivateKey);
1707
+ const pubKeyHex = (0, import_utils5.bytesToHex)(publicKey);
1708
+ const privKeyHex = (0, import_utils5.bytesToHex)(newPrivateKey);
1660
1709
  this.publicKeyToPrivateKeyMap.set(pubKeyHex, privKeyHex);
1661
1710
  return publicKey;
1662
1711
  }
1663
1712
  async removePublicKey(publicKey) {
1664
- this.publicKeyToPrivateKeyMap.delete((0, import_utils4.bytesToHex)(publicKey));
1713
+ this.publicKeyToPrivateKeyMap.delete((0, import_utils5.bytesToHex)(publicKey));
1665
1714
  }
1666
1715
  async subtractPrivateKeysGivenPublicKeys(first, second) {
1667
- const firstPubKeyHex = (0, import_utils4.bytesToHex)(first);
1668
- const secondPubKeyHex = (0, import_utils4.bytesToHex)(second);
1716
+ const firstPubKeyHex = (0, import_utils5.bytesToHex)(first);
1717
+ const secondPubKeyHex = (0, import_utils5.bytesToHex)(second);
1669
1718
  const firstPrivateKeyHex = this.publicKeyToPrivateKeyMap.get(firstPubKeyHex);
1670
1719
  const secondPrivateKeyHex = this.publicKeyToPrivateKeyMap.get(secondPubKeyHex);
1671
1720
  if (!firstPrivateKeyHex || !secondPrivateKeyHex) {
1672
1721
  throw new Error("Private key is not set");
1673
1722
  }
1674
- const firstPrivateKey = (0, import_utils4.hexToBytes)(firstPrivateKeyHex);
1675
- const secondPrivateKey = (0, import_utils4.hexToBytes)(secondPrivateKeyHex);
1723
+ const firstPrivateKey = (0, import_utils5.hexToBytes)(firstPrivateKeyHex);
1724
+ const secondPrivateKey = (0, import_utils5.hexToBytes)(secondPrivateKeyHex);
1676
1725
  const resultPrivKey = subtractPrivateKeys(
1677
1726
  firstPrivateKey,
1678
1727
  secondPrivateKey
1679
1728
  );
1680
1729
  const resultPubKey = import_secp256k15.secp256k1.getPublicKey(resultPrivKey);
1681
- const resultPrivKeyHex = (0, import_utils4.bytesToHex)(resultPrivKey);
1682
- const resultPubKeyHex = (0, import_utils4.bytesToHex)(resultPubKey);
1730
+ const resultPrivKeyHex = (0, import_utils5.bytesToHex)(resultPrivKey);
1731
+ const resultPubKeyHex = (0, import_utils5.bytesToHex)(resultPubKey);
1683
1732
  this.publicKeyToPrivateKeyMap.set(resultPubKeyHex, resultPrivKeyHex);
1684
1733
  return resultPubKey;
1685
1734
  }
@@ -1691,14 +1740,14 @@ var DefaultSparkSigner = class {
1691
1740
  isSecretPubkey = false
1692
1741
  }) {
1693
1742
  if (isSecretPubkey) {
1694
- const pubKeyHex = (0, import_utils4.bytesToHex)(secret);
1743
+ const pubKeyHex = (0, import_utils5.bytesToHex)(secret);
1695
1744
  const privateKey = this.publicKeyToPrivateKeyMap.get(pubKeyHex);
1696
1745
  if (!privateKey) {
1697
1746
  throw new Error("Private key is not set");
1698
1747
  }
1699
- secret = (0, import_utils4.hexToBytes)(privateKey);
1748
+ secret = (0, import_utils5.hexToBytes)(privateKey);
1700
1749
  }
1701
- const secretAsInt = (0, import_utils4.bytesToNumberBE)(secret);
1750
+ const secretAsInt = (0, import_utils5.bytesToNumberBE)(secret);
1702
1751
  return splitSecretWithProofs(secretAsInt, curveOrder, threshold, numShares);
1703
1752
  }
1704
1753
  async signFrost({
@@ -1716,7 +1765,7 @@ var DefaultSparkSigner = class {
1716
1765
  field: "SparkFrost"
1717
1766
  });
1718
1767
  }
1719
- const privateAsPubKeyHex = (0, import_utils4.bytesToHex)(privateAsPubKey);
1768
+ const privateAsPubKeyHex = (0, import_utils5.bytesToHex)(privateAsPubKey);
1720
1769
  const signingPrivateKey = this.publicKeyToPrivateKeyMap.get(privateAsPubKeyHex);
1721
1770
  if (!signingPrivateKey) {
1722
1771
  throw new ValidationError("Private key not found for public key", {
@@ -1730,7 +1779,7 @@ var DefaultSparkSigner = class {
1730
1779
  });
1731
1780
  }
1732
1781
  const keyPackage = {
1733
- secretKey: (0, import_utils4.hexToBytes)(signingPrivateKey),
1782
+ secretKey: (0, import_utils5.hexToBytes)(signingPrivateKey),
1734
1783
  publicKey,
1735
1784
  verifyingKey
1736
1785
  };
@@ -1774,7 +1823,7 @@ var DefaultSparkSigner = class {
1774
1823
  }
1775
1824
  async createSparkWalletFromSeed(seed, accountNumber) {
1776
1825
  if (typeof seed === "string") {
1777
- seed = (0, import_utils4.hexToBytes)(seed);
1826
+ seed = (0, import_utils5.hexToBytes)(seed);
1778
1827
  }
1779
1828
  const {
1780
1829
  masterPublicKey,
@@ -1789,28 +1838,28 @@ var DefaultSparkSigner = class {
1789
1838
  this.signingKey = signingKey.hdKey;
1790
1839
  this.staticDepositKey = staticDepositKey.hdKey;
1791
1840
  this.publicKeyToPrivateKeyMap.set(
1792
- (0, import_utils4.bytesToHex)(identityKey.publicKey),
1793
- (0, import_utils4.bytesToHex)(identityKey.privateKey)
1841
+ (0, import_utils5.bytesToHex)(identityKey.publicKey),
1842
+ (0, import_utils5.bytesToHex)(identityKey.privateKey)
1794
1843
  );
1795
1844
  this.publicKeyToPrivateKeyMap.set(
1796
- (0, import_utils4.bytesToHex)(depositKey.publicKey),
1797
- (0, import_utils4.bytesToHex)(depositKey.privateKey)
1845
+ (0, import_utils5.bytesToHex)(depositKey.publicKey),
1846
+ (0, import_utils5.bytesToHex)(depositKey.privateKey)
1798
1847
  );
1799
1848
  this.publicKeyToPrivateKeyMap.set(
1800
- (0, import_utils4.bytesToHex)(staticDepositKey.publicKey),
1801
- (0, import_utils4.bytesToHex)(staticDepositKey.privateKey)
1849
+ (0, import_utils5.bytesToHex)(staticDepositKey.publicKey),
1850
+ (0, import_utils5.bytesToHex)(staticDepositKey.privateKey)
1802
1851
  );
1803
- return (0, import_utils4.bytesToHex)(identityKey.publicKey);
1852
+ return (0, import_utils5.bytesToHex)(identityKey.publicKey);
1804
1853
  }
1805
1854
  async signMessageWithPublicKey(message, publicKey, compact) {
1806
- const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey));
1855
+ const privateKey = this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey));
1807
1856
  if (!privateKey) {
1808
1857
  throw new ValidationError("Private key not found for public key", {
1809
1858
  field: "privateKey",
1810
- value: (0, import_utils4.bytesToHex)(publicKey)
1859
+ value: (0, import_utils5.bytesToHex)(publicKey)
1811
1860
  });
1812
1861
  }
1813
- const signature = import_secp256k15.secp256k1.sign(message, (0, import_utils4.hexToBytes)(privateKey));
1862
+ const signature = import_secp256k15.secp256k1.sign(message, (0, import_utils5.hexToBytes)(privateKey));
1814
1863
  if (compact) {
1815
1864
  return signature.toCompactRawBytes();
1816
1865
  }
@@ -1829,12 +1878,12 @@ var DefaultSparkSigner = class {
1829
1878
  return signature.toDERRawBytes();
1830
1879
  }
1831
1880
  async encryptLeafPrivateKeyEcies(receiverPublicKey, publicKey) {
1832
- const publicKeyHex = (0, import_utils4.bytesToHex)(publicKey);
1881
+ const publicKeyHex = (0, import_utils5.bytesToHex)(publicKey);
1833
1882
  const privateKey = this.publicKeyToPrivateKeyMap.get(publicKeyHex);
1834
1883
  if (!privateKey) {
1835
1884
  throw new Error("Private key is not set");
1836
1885
  }
1837
- return ecies.encrypt(receiverPublicKey, (0, import_utils4.hexToBytes)(privateKey));
1886
+ return ecies.encrypt(receiverPublicKey, (0, import_utils5.hexToBytes)(privateKey));
1838
1887
  }
1839
1888
  async decryptEcies(ciphertext) {
1840
1889
  if (!this.identityKey?.privateKey) {
@@ -1843,12 +1892,12 @@ var DefaultSparkSigner = class {
1843
1892
  });
1844
1893
  }
1845
1894
  const receiverEciesPrivKey = ecies.PrivateKey.fromHex(
1846
- (0, import_utils4.bytesToHex)(this.identityKey.privateKey)
1895
+ (0, import_utils5.bytesToHex)(this.identityKey.privateKey)
1847
1896
  );
1848
1897
  const privateKey = ecies.decrypt(receiverEciesPrivKey.toHex(), ciphertext);
1849
1898
  const publicKey = import_secp256k15.secp256k1.getPublicKey(privateKey);
1850
- const publicKeyHex = (0, import_utils4.bytesToHex)(publicKey);
1851
- const privateKeyHex = (0, import_utils4.bytesToHex)(privateKey);
1899
+ const publicKeyHex = (0, import_utils5.bytesToHex)(publicKey);
1900
+ const privateKeyHex = (0, import_utils5.bytesToHex)(privateKey);
1852
1901
  this.publicKeyToPrivateKeyMap.set(publicKeyHex, privateKeyHex);
1853
1902
  return publicKey;
1854
1903
  }
@@ -1865,8 +1914,8 @@ var DefaultSparkSigner = class {
1865
1914
  const adaptor = generateAdaptorFromSignature(signature);
1866
1915
  const adaptorPublicKey = import_secp256k15.secp256k1.getPublicKey(adaptor.adaptorPrivateKey);
1867
1916
  this.publicKeyToPrivateKeyMap.set(
1868
- (0, import_utils4.bytesToHex)(adaptorPublicKey),
1869
- (0, import_utils4.bytesToHex)(adaptor.adaptorPrivateKey)
1917
+ (0, import_utils5.bytesToHex)(adaptorPublicKey),
1918
+ (0, import_utils5.bytesToHex)(adaptor.adaptorPrivateKey)
1870
1919
  );
1871
1920
  return {
1872
1921
  adaptorSignature: signature,
@@ -1917,19 +1966,19 @@ var DefaultSparkSigner = class {
1917
1966
  }
1918
1967
  signTransactionIndex(tx, index, publicKey) {
1919
1968
  let privateKey;
1920
- if ((0, import_utils4.equalBytes)(publicKey, this.identityKey?.publicKey ?? new Uint8Array())) {
1969
+ if ((0, import_utils5.equalBytes)(publicKey, this.identityKey?.publicKey ?? new Uint8Array())) {
1921
1970
  privateKey = this.identityKey?.privateKey;
1922
- } else if ((0, import_utils4.equalBytes)(publicKey, this.depositKey?.publicKey ?? new Uint8Array())) {
1971
+ } else if ((0, import_utils5.equalBytes)(publicKey, this.depositKey?.publicKey ?? new Uint8Array())) {
1923
1972
  privateKey = this.depositKey?.privateKey;
1924
1973
  } else {
1925
- privateKey = (0, import_utils4.hexToBytes)(
1926
- this.publicKeyToPrivateKeyMap.get((0, import_utils4.bytesToHex)(publicKey)) ?? ""
1974
+ privateKey = (0, import_utils5.hexToBytes)(
1975
+ this.publicKeyToPrivateKeyMap.get((0, import_utils5.bytesToHex)(publicKey)) ?? ""
1927
1976
  );
1928
1977
  }
1929
1978
  if (!privateKey) {
1930
1979
  throw new ValidationError("Private key not found for public key", {
1931
1980
  field: "privateKey",
1932
- value: (0, import_utils4.bytesToHex)(publicKey)
1981
+ value: (0, import_utils5.bytesToHex)(publicKey)
1933
1982
  });
1934
1983
  }
1935
1984
  tx.signIdx(privateKey, index);
@@ -1943,6 +1992,10 @@ var TaprootSparkSigner = class extends DefaultSparkSigner {
1943
1992
  // Annotate the CommonJS export names for ESM import in node:
1944
1993
  0 && (module.exports = {
1945
1994
  DefaultSparkSigner,
1995
+ MultisigReceiptInput,
1996
+ PARITY,
1997
+ Receipt,
1946
1998
  TaprootOutputKeysGenerator,
1947
- TaprootSparkSigner
1999
+ TaprootSparkSigner,
2000
+ fromPrivateKey
1948
2001
  });
@@ -1,8 +1,9 @@
1
1
  import '@scure/bip32';
2
- import '../spark-DjR1b3TC.cjs';
3
- export { A as AggregateFrostParams, D as DefaultSparkSigner, k as SignFrostParams, h as SigningCommitment, i as SigningNonce, S as SparkSigner, l as SplitSecretWithProofsParams, j as TaprootOutputKeysGenerator, T as TaprootSparkSigner } from '../signer-BhLS7SYR.cjs';
4
- import '@buildonspark/lrc20-sdk';
2
+ import '../spark-CDm4gqS6.cjs';
3
+ export { A as AggregateFrostParams, D as DefaultSparkSigner, k as SignFrostParams, h as SigningCommitment, i as SigningNonce, S as SparkSigner, l as SplitSecretWithProofsParams, j as TaprootOutputKeysGenerator, T as TaprootSparkSigner } from '../signer-IO3oMRNj.cjs';
4
+ export { PARITY, Receipt, TokenSigner, fromPrivateKey } from '@buildonspark/lrc20-sdk';
5
5
  import '@scure/btc-signer';
6
6
  import 'bitcoinjs-lib';
7
+ export { MultisigReceiptInput } from '@buildonspark/lrc20-sdk/lrc/types';
7
8
  import '@bufbuild/protobuf/wire';
8
9
  import 'nice-grpc-common';
@@ -1,8 +1,9 @@
1
1
  import '@scure/bip32';
2
- import '../spark-DjR1b3TC.js';
3
- export { A as AggregateFrostParams, D as DefaultSparkSigner, k as SignFrostParams, h as SigningCommitment, i as SigningNonce, S as SparkSigner, l as SplitSecretWithProofsParams, j as TaprootOutputKeysGenerator, T as TaprootSparkSigner } from '../signer-CylxIujU.js';
4
- import '@buildonspark/lrc20-sdk';
2
+ import '../spark-CDm4gqS6.js';
3
+ export { A as AggregateFrostParams, D as DefaultSparkSigner, k as SignFrostParams, h as SigningCommitment, i as SigningNonce, S as SparkSigner, l as SplitSecretWithProofsParams, j as TaprootOutputKeysGenerator, T as TaprootSparkSigner } from '../signer-wqesWifN.js';
4
+ export { PARITY, Receipt, TokenSigner, fromPrivateKey } from '@buildonspark/lrc20-sdk';
5
5
  import '@scure/btc-signer';
6
6
  import 'bitcoinjs-lib';
7
+ export { MultisigReceiptInput } from '@buildonspark/lrc20-sdk/lrc/types';
7
8
  import '@bufbuild/protobuf/wire';
8
9
  import 'nice-grpc-common';
@@ -1,16 +1,24 @@
1
1
  import {
2
2
  DefaultSparkSigner,
3
+ MultisigReceiptInput,
4
+ PARITY,
5
+ Receipt,
3
6
  TaprootOutputKeysGenerator,
4
- TaprootSparkSigner
5
- } from "../chunk-UKT6OFLO.js";
6
- import "../chunk-7VMYMQLF.js";
7
- import "../chunk-HKAKEKCE.js";
8
- import "../chunk-MGPRLH6Q.js";
7
+ TaprootSparkSigner,
8
+ fromPrivateKey
9
+ } from "../chunk-TIUBYNN5.js";
10
+ import "../chunk-VFJQNBFX.js";
11
+ import "../chunk-NSJF5F5O.js";
12
+ import "../chunk-QNNSEJ4P.js";
9
13
  import "../chunk-VTUGIIWI.js";
10
- import "../chunk-TWF35O6M.js";
14
+ import "../chunk-GSI4OLXZ.js";
11
15
  import "../chunk-MVRQ5US7.js";
12
16
  export {
13
17
  DefaultSparkSigner,
18
+ MultisigReceiptInput,
19
+ PARITY,
20
+ Receipt,
14
21
  TaprootOutputKeysGenerator,
15
- TaprootSparkSigner
22
+ TaprootSparkSigner,
23
+ fromPrivateKey
16
24
  };
@@ -1,8 +1,9 @@
1
1
  import { HDKey } from '@scure/bip32';
2
- import { b as TreeNode } from './spark-DjR1b3TC.js';
2
+ import { d as TreeNode } from './spark-CDm4gqS6.cjs';
3
3
  import { TokenSigner, Receipt } from '@buildonspark/lrc20-sdk';
4
4
  import { Transaction } from '@scure/btc-signer';
5
5
  import { Psbt } from 'bitcoinjs-lib';
6
+ import '@buildonspark/lrc20-sdk/lrc/types';
6
7
 
7
8
  interface ISigningCommitment {
8
9
  hiding: Uint8Array;
@@ -1,8 +1,9 @@
1
1
  import { HDKey } from '@scure/bip32';
2
- import { b as TreeNode } from './spark-DjR1b3TC.cjs';
2
+ import { d as TreeNode } from './spark-CDm4gqS6.js';
3
3
  import { TokenSigner, Receipt } from '@buildonspark/lrc20-sdk';
4
4
  import { Transaction } from '@scure/btc-signer';
5
5
  import { Psbt } from 'bitcoinjs-lib';
6
+ import '@buildonspark/lrc20-sdk/lrc/types';
6
7
 
7
8
  interface ISigningCommitment {
8
9
  hiding: Uint8Array;