@ledgerhq/live-cli 24.19.5-nightly.0 → 24.19.5-nightly.1

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 (2) hide show
  1. package/lib/cli.js +433 -2592
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -16913,10 +16913,10 @@ var require_sha256 = __commonJS({
16913
16913
  Object.defineProperty(exports2, "__esModule", { value: true });
16914
16914
  exports2.sha256 = void 0;
16915
16915
  var crypto_1 = __importDefault(require("crypto"));
16916
- async function sha25617(source) {
16916
+ async function sha25616(source) {
16917
16917
  return crypto_1.default.createHash("sha256").update(source).digest();
16918
16918
  }
16919
- exports2.sha256 = sha25617;
16919
+ exports2.sha256 = sha25616;
16920
16920
  }
16921
16921
  });
16922
16922
 
@@ -16997,10 +16997,10 @@ var require_sha2562 = __commonJS({
16997
16997
  return sha256_sync(source);
16998
16998
  }
16999
16999
  exports2.sha256_fallback = sha256_fallback;
17000
- function sha25617(source) {
17000
+ function sha25616(source) {
17001
17001
  return (0, crypto_primitives_1.sha256)(source);
17002
17002
  }
17003
- exports2.sha256 = sha25617;
17003
+ exports2.sha256 = sha25616;
17004
17004
  }
17005
17005
  });
17006
17006
 
@@ -46010,7 +46010,7 @@ var require_sha3 = __commonJS({
46010
46010
  var require_htlc = __commonJS({
46011
46011
  "../../node_modules/.pnpm/algosdk@1.13.1/node_modules/algosdk/dist/esm/src/logicTemplates/htlc.js"(exports2, module2) {
46012
46012
  "use strict";
46013
- var sha25617 = require_sha2563();
46013
+ var sha25616 = require_sha2563();
46014
46014
  var { keccak256: keccak2568 } = require_sha3();
46015
46015
  var logic = (init_logic(), __toCommonJS(logic_exports));
46016
46016
  var logicSig = (init_logicsig(), __toCommonJS(logicsig_exports));
@@ -46098,7 +46098,7 @@ var require_htlc = __commonJS({
46098
46098
  const expectedHashedOutput = byteArrays[1];
46099
46099
  const hashFunction = contract[contract.length - 15];
46100
46100
  if (hashFunction === 1) {
46101
- const hash12 = sha25617.create();
46101
+ const hash12 = sha25616.create();
46102
46102
  hash12.update(preImageBytes);
46103
46103
  const actualHashedOutput = Buffer.from(hash12.hex(), "hex");
46104
46104
  if (!actualHashedOutput.equals(expectedHashedOutput)) {
@@ -54813,7 +54813,7 @@ var require_node3 = __commonJS({
54813
54813
  url4.path = unixParts[2];
54814
54814
  }
54815
54815
  if (this._connectOverride) {
54816
- var _url2 = url4, hostname = _url2.hostname;
54816
+ var _url = url4, hostname = _url.hostname;
54817
54817
  var match = hostname in this._connectOverride ? this._connectOverride[hostname] : this._connectOverride["*"];
54818
54818
  if (match) {
54819
54819
  if (!this._header.host) {
@@ -62959,9 +62959,9 @@ var require__19 = __commonJS({
62959
62959
  "use strict";
62960
62960
  var utils5 = require_utils5();
62961
62961
  var SHA2567 = require__18();
62962
- function SHA2244() {
62963
- if (!(this instanceof SHA2244))
62964
- return new SHA2244();
62962
+ function SHA2243() {
62963
+ if (!(this instanceof SHA2243))
62964
+ return new SHA2243();
62965
62965
  SHA2567.call(this);
62966
62966
  this.h = [
62967
62967
  3238371032,
@@ -62974,13 +62974,13 @@ var require__19 = __commonJS({
62974
62974
  3204075428
62975
62975
  ];
62976
62976
  }
62977
- utils5.inherits(SHA2244, SHA2567);
62978
- module2.exports = SHA2244;
62979
- SHA2244.blockSize = 512;
62980
- SHA2244.outSize = 224;
62981
- SHA2244.hmacStrength = 192;
62982
- SHA2244.padLength = 64;
62983
- SHA2244.prototype._digest = function digest3(enc) {
62977
+ utils5.inherits(SHA2243, SHA2567);
62978
+ module2.exports = SHA2243;
62979
+ SHA2243.blockSize = 512;
62980
+ SHA2243.outSize = 224;
62981
+ SHA2243.hmacStrength = 192;
62982
+ SHA2243.padLength = 64;
62983
+ SHA2243.prototype._digest = function digest3(enc) {
62984
62984
  if (enc === "hex")
62985
62985
  return utils5.toHex32(this.h.slice(0, 7), "big");
62986
62986
  else
@@ -63434,9 +63434,9 @@ var require__21 = __commonJS({
63434
63434
  "use strict";
63435
63435
  var utils5 = require_utils5();
63436
63436
  var SHA5126 = require__20();
63437
- function SHA3843() {
63438
- if (!(this instanceof SHA3843))
63439
- return new SHA3843();
63437
+ function SHA3842() {
63438
+ if (!(this instanceof SHA3842))
63439
+ return new SHA3842();
63440
63440
  SHA5126.call(this);
63441
63441
  this.h = [
63442
63442
  3418070365,
@@ -63457,13 +63457,13 @@ var require__21 = __commonJS({
63457
63457
  3204075428
63458
63458
  ];
63459
63459
  }
63460
- utils5.inherits(SHA3843, SHA5126);
63461
- module2.exports = SHA3843;
63462
- SHA3843.blockSize = 1024;
63463
- SHA3843.outSize = 384;
63464
- SHA3843.hmacStrength = 192;
63465
- SHA3843.padLength = 128;
63466
- SHA3843.prototype._digest = function digest3(enc) {
63460
+ utils5.inherits(SHA3842, SHA5126);
63461
+ module2.exports = SHA3842;
63462
+ SHA3842.blockSize = 1024;
63463
+ SHA3842.outSize = 384;
63464
+ SHA3842.hmacStrength = 192;
63465
+ SHA3842.padLength = 128;
63466
+ SHA3842.prototype._digest = function digest3(enc) {
63467
63467
  if (enc === "hex")
63468
63468
  return utils5.toHex32(this.h.slice(0, 12), "big");
63469
63469
  else
@@ -67900,16 +67900,16 @@ var require_crypto2 = __commonJS({
67900
67900
  return createHash4("sha1").update(buffer2).digest();
67901
67901
  }
67902
67902
  exports2.sha1 = sha13;
67903
- function sha25617(buffer2) {
67903
+ function sha25616(buffer2) {
67904
67904
  return createHash4("sha256").update(buffer2).digest();
67905
67905
  }
67906
- exports2.sha256 = sha25617;
67906
+ exports2.sha256 = sha25616;
67907
67907
  function hash1605(buffer2) {
67908
- return ripemd1608(sha25617(buffer2));
67908
+ return ripemd1608(sha25616(buffer2));
67909
67909
  }
67910
67910
  exports2.hash160 = hash1605;
67911
67911
  function hash2563(buffer2) {
67912
- return sha25617(sha25617(buffer2));
67912
+ return sha25616(sha25616(buffer2));
67913
67913
  }
67914
67914
  exports2.hash256 = hash2563;
67915
67915
  }
@@ -81291,9 +81291,9 @@ var require_elliptic2 = __commonJS({
81291
81291
  const point3 = pair.getPublic().mul(scalar);
81292
81292
  if (hashfn === void 0) {
81293
81293
  const data7 = point3.encode(null, true);
81294
- const sha25617 = ec2.hash().update(data7).digest();
81294
+ const sha25616 = ec2.hash().update(data7).digest();
81295
81295
  for (let i87 = 0; i87 < 32; ++i87)
81296
- output5[i87] = sha25617[i87];
81296
+ output5[i87] = sha25616[i87];
81297
81297
  } else {
81298
81298
  if (!xbuf)
81299
81299
  xbuf = new Uint8Array(32);
@@ -90318,7 +90318,7 @@ var require_transaction2 = __commonJS({
90318
90318
  }
90319
90319
  }
90320
90320
  exports2.parseSigningMode = parseSigningMode;
90321
- function parseTransaction3(tx) {
90321
+ function parseTransaction2(tx) {
90322
90322
  var _a5, _b2, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m;
90323
90323
  const network = (0, network_1.parseNetwork)(tx.network);
90324
90324
  (0, parse_1.validate)((0, parse_1.isArray)(tx.inputs), invalidDataReason_1.InvalidDataReason.INPUTS_NOT_ARRAY);
@@ -90377,7 +90377,7 @@ var require_transaction2 = __commonJS({
90377
90377
  donation
90378
90378
  };
90379
90379
  }
90380
- exports2.parseTransaction = parseTransaction3;
90380
+ exports2.parseTransaction = parseTransaction2;
90381
90381
  function parseTxOptions(options22) {
90382
90382
  return {
90383
90383
  tagCborSets: (options22 === null || options22 === void 0 ? void 0 : options22.tagCborSets) || false
@@ -90385,7 +90385,7 @@ var require_transaction2 = __commonJS({
90385
90385
  }
90386
90386
  function parseSignTransactionRequest(request3) {
90387
90387
  var _a5, _b2;
90388
- const tx = parseTransaction3(request3.tx);
90388
+ const tx = parseTransaction2(request3.tx);
90389
90389
  const signingMode = parseSigningMode(request3.signingMode);
90390
90390
  const options22 = parseTxOptions(request3.options);
90391
90391
  (0, parse_1.validate)((0, parse_1.isArray)((_a5 = request3.additionalWitnessPaths) !== null && _a5 !== void 0 ? _a5 : []), invalidDataReason_1.InvalidDataReason.ADDITIONAL_WITNESSES_NOT_ARRAY);
@@ -101289,7 +101289,7 @@ var require_lib5 = __commonJS({
101289
101289
  }
101290
101290
  return hex4;
101291
101291
  }
101292
- function hexToBytes10(hex4) {
101292
+ function hexToBytes9(hex4) {
101293
101293
  if (typeof hex4 !== "string") {
101294
101294
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
101295
101295
  }
@@ -101309,7 +101309,7 @@ var require_lib5 = __commonJS({
101309
101309
  function numberTo32BytesBE(num) {
101310
101310
  const length2 = 32;
101311
101311
  const hex4 = num.toString(16).padStart(length2 * 2, "0");
101312
- return hexToBytes10(hex4);
101312
+ return hexToBytes9(hex4);
101313
101313
  }
101314
101314
  function numberTo32BytesLE(num) {
101315
101315
  return numberTo32BytesBE(num).reverse();
@@ -101433,7 +101433,7 @@ var require_lib5 = __commonJS({
101433
101433
  return true;
101434
101434
  }
101435
101435
  function ensureBytes6(hex4, expectedLength) {
101436
- const bytes7 = hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes10(hex4);
101436
+ const bytes7 = hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes9(hex4);
101437
101437
  if (typeof expectedLength === "number" && bytes7.length !== expectedLength)
101438
101438
  throw new Error(`Expected ${expectedLength} bytes`);
101439
101439
  return bytes7;
@@ -101635,7 +101635,7 @@ var require_lib5 = __commonJS({
101635
101635
  };
101636
101636
  exports2.utils = {
101637
101637
  bytesToHex: bytesToHex10,
101638
- hexToBytes: hexToBytes10,
101638
+ hexToBytes: hexToBytes9,
101639
101639
  concatBytes: concatBytes11,
101640
101640
  getExtendedPublicKey,
101641
101641
  mod: mod7,
@@ -101768,7 +101768,7 @@ var require_utils11 = __commonJS({
101768
101768
  exports2.isBytes = isBytes13;
101769
101769
  exports2.byteSwap32 = byteSwap324;
101770
101770
  exports2.bytesToHex = bytesToHex10;
101771
- exports2.hexToBytes = hexToBytes10;
101771
+ exports2.hexToBytes = hexToBytes9;
101772
101772
  exports2.asyncLoop = asyncLoop3;
101773
101773
  exports2.utf8ToBytes = utf8ToBytes13;
101774
101774
  exports2.toBytes = toBytes8;
@@ -101811,17 +101811,17 @@ var require_utils11 = __commonJS({
101811
101811
  }
101812
101812
  return hex4;
101813
101813
  }
101814
- var asciis7 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
101815
- function asciiToBase167(ch) {
101816
- if (ch >= asciis7._0 && ch <= asciis7._9)
101817
- return ch - asciis7._0;
101818
- if (ch >= asciis7.A && ch <= asciis7.F)
101819
- return ch - (asciis7.A - 10);
101820
- if (ch >= asciis7.a && ch <= asciis7.f)
101821
- return ch - (asciis7.a - 10);
101814
+ var asciis6 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
101815
+ function asciiToBase166(ch) {
101816
+ if (ch >= asciis6._0 && ch <= asciis6._9)
101817
+ return ch - asciis6._0;
101818
+ if (ch >= asciis6.A && ch <= asciis6.F)
101819
+ return ch - (asciis6.A - 10);
101820
+ if (ch >= asciis6.a && ch <= asciis6.f)
101821
+ return ch - (asciis6.a - 10);
101822
101822
  return;
101823
101823
  }
101824
- function hexToBytes10(hex4) {
101824
+ function hexToBytes9(hex4) {
101825
101825
  if (typeof hex4 !== "string")
101826
101826
  throw new Error("hex string expected, got " + typeof hex4);
101827
101827
  const hl = hex4.length;
@@ -101830,8 +101830,8 @@ var require_utils11 = __commonJS({
101830
101830
  throw new Error("hex string expected, got unpadded hex of length " + hl);
101831
101831
  const array5 = new Uint8Array(al);
101832
101832
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
101833
- const n1 = asciiToBase167(hex4.charCodeAt(hi));
101834
- const n210 = asciiToBase167(hex4.charCodeAt(hi + 1));
101833
+ const n1 = asciiToBase166(hex4.charCodeAt(hi));
101834
+ const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
101835
101835
  if (n1 === void 0 || n210 === void 0) {
101836
101836
  const char = hex4[hi] + hex4[hi + 1];
101837
101837
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -102861,7 +102861,7 @@ var require_sha2565 = __commonJS({
102861
102861
  }
102862
102862
  };
102863
102863
  exports2.SHA256 = SHA2567;
102864
- var SHA2244 = class extends SHA2567 {
102864
+ var SHA2243 = class extends SHA2567 {
102865
102865
  constructor() {
102866
102866
  super();
102867
102867
  this.A = 3238371032 | 0;
@@ -102876,7 +102876,7 @@ var require_sha2565 = __commonJS({
102876
102876
  }
102877
102877
  };
102878
102878
  exports2.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2567());
102879
- exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2244());
102879
+ exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2243());
102880
102880
  }
102881
102881
  });
102882
102882
 
@@ -103132,7 +103132,7 @@ var require_sha5125 = __commonJS({
103132
103132
  }
103133
103133
  };
103134
103134
  exports2.SHA512_256 = SHA512_2562;
103135
- var SHA3843 = class extends SHA5126 {
103135
+ var SHA3842 = class extends SHA5126 {
103136
103136
  constructor() {
103137
103137
  super();
103138
103138
  this.Ah = 3418070365 | 0;
@@ -103154,11 +103154,11 @@ var require_sha5125 = __commonJS({
103154
103154
  this.outputLen = 48;
103155
103155
  }
103156
103156
  };
103157
- exports2.SHA384 = SHA3843;
103157
+ exports2.SHA384 = SHA3842;
103158
103158
  exports2.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5126());
103159
103159
  exports2.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2242());
103160
103160
  exports2.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2562());
103161
- exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3843());
103161
+ exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());
103162
103162
  }
103163
103163
  });
103164
103164
 
@@ -103531,7 +103531,7 @@ var require_lib6 = __commonJS({
103531
103531
  return Q6;
103532
103532
  }
103533
103533
  toRawBytes(isCompressed2 = false) {
103534
- return hexToBytes10(this.toHex(isCompressed2));
103534
+ return hexToBytes9(this.toHex(isCompressed2));
103535
103535
  }
103536
103536
  toHex(isCompressed2 = false) {
103537
103537
  const x26 = numTo32bStr2(this.x);
@@ -103638,7 +103638,7 @@ var require_lib6 = __commonJS({
103638
103638
  const arr = hex4 instanceof Uint8Array;
103639
103639
  if (typeof hex4 !== "string" && !arr)
103640
103640
  throw new TypeError(`Signature.fromDER: Expected string or Uint8Array`);
103641
- const { r: r37, s: s58 } = parseDERSignature2(arr ? hex4 : hexToBytes10(hex4));
103641
+ const { r: r37, s: s58 } = parseDERSignature2(arr ? hex4 : hexToBytes9(hex4));
103642
103642
  return new _Signature(r37, s58);
103643
103643
  }
103644
103644
  static fromHex(hex4) {
@@ -103659,7 +103659,7 @@ var require_lib6 = __commonJS({
103659
103659
  return this.hasHighS() ? new _Signature(this.r, mod7(-this.s, CURVE2.n)) : this;
103660
103660
  }
103661
103661
  toDERRawBytes() {
103662
- return hexToBytes10(this.toDERHex());
103662
+ return hexToBytes9(this.toDERHex());
103663
103663
  }
103664
103664
  toDERHex() {
103665
103665
  const sHex = sliceDER2(numberToHexUnpadded6(this.s));
@@ -103678,7 +103678,7 @@ var require_lib6 = __commonJS({
103678
103678
  return this.toDERHex();
103679
103679
  }
103680
103680
  toCompactRawBytes() {
103681
- return hexToBytes10(this.toCompactHex());
103681
+ return hexToBytes9(this.toCompactHex());
103682
103682
  }
103683
103683
  toCompactHex() {
103684
103684
  return numTo32bStr2(this.r) + numTo32bStr2(this.s);
@@ -103718,7 +103718,7 @@ var require_lib6 = __commonJS({
103718
103718
  return num.toString(16).padStart(64, "0");
103719
103719
  }
103720
103720
  function numTo32b2(num) {
103721
- const b21 = hexToBytes10(numTo32bStr2(num));
103721
+ const b21 = hexToBytes9(numTo32bStr2(num));
103722
103722
  if (b21.length !== 32)
103723
103723
  throw new Error("Error: expected 32 bytes");
103724
103724
  return b21;
@@ -103733,7 +103733,7 @@ var require_lib6 = __commonJS({
103733
103733
  }
103734
103734
  return BigInt(`0x${hex4}`);
103735
103735
  }
103736
- function hexToBytes10(hex4) {
103736
+ function hexToBytes9(hex4) {
103737
103737
  if (typeof hex4 !== "string") {
103738
103738
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
103739
103739
  }
@@ -103754,7 +103754,7 @@ var require_lib6 = __commonJS({
103754
103754
  return hexToNumber6(bytesToHex10(bytes7));
103755
103755
  }
103756
103756
  function ensureBytes6(hex4) {
103757
- return hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes10(hex4);
103757
+ return hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes9(hex4);
103758
103758
  }
103759
103759
  function normalizeScalar2(num) {
103760
103760
  if (typeof num === "number" && Number.isSafeInteger(num) && num > 0)
@@ -104132,7 +104132,7 @@ var require_lib6 = __commonJS({
104132
104132
  return numTo32bStr2(this.r) + numTo32bStr2(this.s);
104133
104133
  }
104134
104134
  toRawBytes() {
104135
- return hexToBytes10(this.toHex());
104135
+ return hexToBytes9(this.toHex());
104136
104136
  }
104137
104137
  };
104138
104138
  function schnorrGetPublicKey(privateKey) {
@@ -104258,7 +104258,7 @@ var require_lib6 = __commonJS({
104258
104258
  var TAGGED_HASH_PREFIXES2 = {};
104259
104259
  exports2.utils = {
104260
104260
  bytesToHex: bytesToHex10,
104261
- hexToBytes: hexToBytes10,
104261
+ hexToBytes: hexToBytes9,
104262
104262
  concatBytes: concatBytes11,
104263
104263
  mod: mod7,
104264
104264
  invert: invert6,
@@ -126533,7 +126533,7 @@ var require_utils12 = __commonJS({
126533
126533
  return hex4;
126534
126534
  }
126535
126535
  exports2.bytesToHex = bytesToHex10;
126536
- function hexToBytes10(hex4) {
126536
+ function hexToBytes9(hex4) {
126537
126537
  if (typeof hex4 !== "string") {
126538
126538
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
126539
126539
  }
@@ -126550,7 +126550,7 @@ var require_utils12 = __commonJS({
126550
126550
  }
126551
126551
  return array5;
126552
126552
  }
126553
- exports2.hexToBytes = hexToBytes10;
126553
+ exports2.hexToBytes = hexToBytes9;
126554
126554
  var nextTick3 = async () => {
126555
126555
  };
126556
126556
  exports2.nextTick = nextTick3;
@@ -126984,7 +126984,7 @@ var require_sha2566 = __commonJS({
126984
126984
  this.buffer.fill(0);
126985
126985
  }
126986
126986
  };
126987
- var SHA2244 = class extends SHA2567 {
126987
+ var SHA2243 = class extends SHA2567 {
126988
126988
  constructor() {
126989
126989
  super();
126990
126990
  this.A = 3238371032 | 0;
@@ -126999,7 +126999,7 @@ var require_sha2566 = __commonJS({
126999
126999
  }
127000
127000
  };
127001
127001
  exports2.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2567());
127002
- exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2244());
127002
+ exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2243());
127003
127003
  }
127004
127004
  });
127005
127005
 
@@ -127132,7 +127132,7 @@ var require_dist9 = __commonJS({
127132
127132
  const hexLength = numberToHex(len);
127133
127133
  const lLength = hexLength.length / 2;
127134
127134
  const firstByte = numberToHex(offset2 + 55 + lLength);
127135
- return Uint8Array.from(hexToBytes10(firstByte + hexLength));
127135
+ return Uint8Array.from(hexToBytes9(firstByte + hexLength));
127136
127136
  }
127137
127137
  function decode29(input, stream7 = false) {
127138
127138
  if (typeof input === "undefined" || input === null || input.length === 0) {
@@ -127234,7 +127234,7 @@ var require_dist9 = __commonJS({
127234
127234
  throw new Error("Invalid byte sequence");
127235
127235
  return byte;
127236
127236
  }
127237
- function hexToBytes10(hex4) {
127237
+ function hexToBytes9(hex4) {
127238
127238
  if (typeof hex4 !== "string") {
127239
127239
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
127240
127240
  }
@@ -127287,7 +127287,7 @@ var require_dist9 = __commonJS({
127287
127287
  }
127288
127288
  if (typeof v39 === "string") {
127289
127289
  if (isHexPrefixed(v39)) {
127290
- return hexToBytes10(padToEven(stripHexPrefix2(v39)));
127290
+ return hexToBytes9(padToEven(stripHexPrefix2(v39)));
127291
127291
  }
127292
127292
  return utf8ToBytes13(v39);
127293
127293
  }
@@ -127295,7 +127295,7 @@ var require_dist9 = __commonJS({
127295
127295
  if (!v39) {
127296
127296
  return Uint8Array.from([]);
127297
127297
  }
127298
- return hexToBytes10(numberToHex(v39));
127298
+ return hexToBytes9(numberToHex(v39));
127299
127299
  }
127300
127300
  if (v39 === null || v39 === void 0) {
127301
127301
  return Uint8Array.from([]);
@@ -127305,7 +127305,7 @@ var require_dist9 = __commonJS({
127305
127305
  exports2.utils = {
127306
127306
  bytesToHex: bytesToHex10,
127307
127307
  concatBytes: concatBytes11,
127308
- hexToBytes: hexToBytes10,
127308
+ hexToBytes: hexToBytes9,
127309
127309
  utf8ToBytes: utf8ToBytes13
127310
127310
  };
127311
127311
  exports2.RLP = { encode: encode27, decode: decode29 };
@@ -127619,11 +127619,11 @@ var require_utils13 = __commonJS({
127619
127619
  return new TextDecoder().decode(data6);
127620
127620
  }
127621
127621
  exports2.bytesToUtf8 = bytesToUtf82;
127622
- function hexToBytes10(data6) {
127622
+ function hexToBytes9(data6) {
127623
127623
  const sliced = data6.startsWith("0x") ? data6.substring(2) : data6;
127624
127624
  return (0, utils_12.hexToBytes)(sliced);
127625
127625
  }
127626
- exports2.hexToBytes = hexToBytes10;
127626
+ exports2.hexToBytes = hexToBytes9;
127627
127627
  function equalsBytes(a72, b21) {
127628
127628
  if (a72.length !== b21.length) {
127629
127629
  return false;
@@ -140954,17 +140954,17 @@ var require_utils14 = __commonJS({
140954
140954
  return hex4;
140955
140955
  }
140956
140956
  exports2.bytesToHex = bytesToHex10;
140957
- var asciis7 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
140958
- function asciiToBase167(char) {
140959
- if (char >= asciis7._0 && char <= asciis7._9)
140960
- return char - asciis7._0;
140961
- if (char >= asciis7._A && char <= asciis7._F)
140962
- return char - (asciis7._A - 10);
140963
- if (char >= asciis7._a && char <= asciis7._f)
140964
- return char - (asciis7._a - 10);
140957
+ var asciis6 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
140958
+ function asciiToBase166(char) {
140959
+ if (char >= asciis6._0 && char <= asciis6._9)
140960
+ return char - asciis6._0;
140961
+ if (char >= asciis6._A && char <= asciis6._F)
140962
+ return char - (asciis6._A - 10);
140963
+ if (char >= asciis6._a && char <= asciis6._f)
140964
+ return char - (asciis6._a - 10);
140965
140965
  return;
140966
140966
  }
140967
- function hexToBytes10(hex4) {
140967
+ function hexToBytes9(hex4) {
140968
140968
  if (typeof hex4 !== "string")
140969
140969
  throw new Error("hex string expected, got " + typeof hex4);
140970
140970
  const hl = hex4.length;
@@ -140973,8 +140973,8 @@ var require_utils14 = __commonJS({
140973
140973
  throw new Error("padded hex string expected, got unpadded hex of length " + hl);
140974
140974
  const array5 = new Uint8Array(al);
140975
140975
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
140976
- const n1 = asciiToBase167(hex4.charCodeAt(hi));
140977
- const n210 = asciiToBase167(hex4.charCodeAt(hi + 1));
140976
+ const n1 = asciiToBase166(hex4.charCodeAt(hi));
140977
+ const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
140978
140978
  if (n1 === void 0 || n210 === void 0) {
140979
140979
  const char = hex4[hi] + hex4[hi + 1];
140980
140980
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -140983,7 +140983,7 @@ var require_utils14 = __commonJS({
140983
140983
  }
140984
140984
  return array5;
140985
140985
  }
140986
- exports2.hexToBytes = hexToBytes10;
140986
+ exports2.hexToBytes = hexToBytes9;
140987
140987
  var nextTick3 = async () => {
140988
140988
  };
140989
140989
  exports2.nextTick = nextTick3;
@@ -141349,7 +141349,7 @@ var require_sha2568 = __commonJS({
141349
141349
  this.buffer.fill(0);
141350
141350
  }
141351
141351
  };
141352
- var SHA2244 = class extends SHA2567 {
141352
+ var SHA2243 = class extends SHA2567 {
141353
141353
  constructor() {
141354
141354
  super();
141355
141355
  this.A = 3238371032 | 0;
@@ -141364,7 +141364,7 @@ var require_sha2568 = __commonJS({
141364
141364
  }
141365
141365
  };
141366
141366
  exports2.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2567());
141367
- exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2244());
141367
+ exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2243());
141368
141368
  }
141369
141369
  });
141370
141370
 
@@ -141403,17 +141403,17 @@ var require_utils15 = __commonJS({
141403
141403
  return BigInt(hex4 === "" ? "0" : `0x${hex4}`);
141404
141404
  }
141405
141405
  exports2.hexToNumber = hexToNumber6;
141406
- var asciis7 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
141407
- function asciiToBase167(char) {
141408
- if (char >= asciis7._0 && char <= asciis7._9)
141409
- return char - asciis7._0;
141410
- if (char >= asciis7._A && char <= asciis7._F)
141411
- return char - (asciis7._A - 10);
141412
- if (char >= asciis7._a && char <= asciis7._f)
141413
- return char - (asciis7._a - 10);
141406
+ var asciis6 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
141407
+ function asciiToBase166(char) {
141408
+ if (char >= asciis6._0 && char <= asciis6._9)
141409
+ return char - asciis6._0;
141410
+ if (char >= asciis6._A && char <= asciis6._F)
141411
+ return char - (asciis6._A - 10);
141412
+ if (char >= asciis6._a && char <= asciis6._f)
141413
+ return char - (asciis6._a - 10);
141414
141414
  return;
141415
141415
  }
141416
- function hexToBytes10(hex4) {
141416
+ function hexToBytes9(hex4) {
141417
141417
  if (typeof hex4 !== "string")
141418
141418
  throw new Error("hex string expected, got " + typeof hex4);
141419
141419
  const hl = hex4.length;
@@ -141422,8 +141422,8 @@ var require_utils15 = __commonJS({
141422
141422
  throw new Error("padded hex string expected, got unpadded hex of length " + hl);
141423
141423
  const array5 = new Uint8Array(al);
141424
141424
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
141425
- const n1 = asciiToBase167(hex4.charCodeAt(hi));
141426
- const n210 = asciiToBase167(hex4.charCodeAt(hi + 1));
141425
+ const n1 = asciiToBase166(hex4.charCodeAt(hi));
141426
+ const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
141427
141427
  if (n1 === void 0 || n210 === void 0) {
141428
141428
  const char = hex4[hi] + hex4[hi + 1];
141429
141429
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -141432,7 +141432,7 @@ var require_utils15 = __commonJS({
141432
141432
  }
141433
141433
  return array5;
141434
141434
  }
141435
- exports2.hexToBytes = hexToBytes10;
141435
+ exports2.hexToBytes = hexToBytes9;
141436
141436
  function bytesToNumberBE5(bytes7) {
141437
141437
  return hexToNumber6(bytesToHex10(bytes7));
141438
141438
  }
@@ -141444,7 +141444,7 @@ var require_utils15 = __commonJS({
141444
141444
  }
141445
141445
  exports2.bytesToNumberLE = bytesToNumberLE5;
141446
141446
  function numberToBytesBE5(n44, len) {
141447
- return hexToBytes10(n44.toString(16).padStart(len * 2, "0"));
141447
+ return hexToBytes9(n44.toString(16).padStart(len * 2, "0"));
141448
141448
  }
141449
141449
  exports2.numberToBytesBE = numberToBytesBE5;
141450
141450
  function numberToBytesLE5(n44, len) {
@@ -141452,14 +141452,14 @@ var require_utils15 = __commonJS({
141452
141452
  }
141453
141453
  exports2.numberToBytesLE = numberToBytesLE5;
141454
141454
  function numberToVarBytesBE4(n44) {
141455
- return hexToBytes10(numberToHexUnpadded6(n44));
141455
+ return hexToBytes9(numberToHexUnpadded6(n44));
141456
141456
  }
141457
141457
  exports2.numberToVarBytesBE = numberToVarBytesBE4;
141458
141458
  function ensureBytes6(title, hex4, expectedLength) {
141459
141459
  let res;
141460
141460
  if (typeof hex4 === "string") {
141461
141461
  try {
141462
- res = hexToBytes10(hex4);
141462
+ res = hexToBytes9(hex4);
141463
141463
  } catch (e34) {
141464
141464
  throw new Error(`${title} must be valid hex string, got "${hex4}". Cause: ${e34}`);
141465
141465
  }
@@ -143836,11 +143836,11 @@ var require_utils16 = __commonJS({
143836
143836
  return new TextDecoder().decode(data6);
143837
143837
  }
143838
143838
  exports2.bytesToUtf8 = bytesToUtf82;
143839
- function hexToBytes10(data6) {
143839
+ function hexToBytes9(data6) {
143840
143840
  const sliced = data6.startsWith("0x") ? data6.substring(2) : data6;
143841
143841
  return (0, utils_12.hexToBytes)(sliced);
143842
143842
  }
143843
- exports2.hexToBytes = hexToBytes10;
143843
+ exports2.hexToBytes = hexToBytes9;
143844
143844
  function equalsBytes(a72, b21) {
143845
143845
  if (a72.length !== b21.length) {
143846
143846
  return false;
@@ -145766,7 +145766,7 @@ var require_utils18 = __commonJS({
145766
145766
  }
145767
145767
  return "0x" + hex4.join("");
145768
145768
  };
145769
- var hexToBytes10 = function(hex4) {
145769
+ var hexToBytes9 = function(hex4) {
145770
145770
  hex4 = hex4.toString(16);
145771
145771
  if (!isHexStrict(hex4)) {
145772
145772
  throw new Error('Given value "' + hex4 + '" is not a valid hex string.');
@@ -145886,7 +145886,7 @@ var require_utils18 = __commonJS({
145886
145886
  hexToNumberString,
145887
145887
  numberToHex,
145888
145888
  toHex: toHex4,
145889
- hexToBytes: hexToBytes10,
145889
+ hexToBytes: hexToBytes9,
145890
145890
  bytesToHex: bytesToHex10,
145891
145891
  isHex: isHex4,
145892
145892
  isHexStrict,
@@ -150857,19 +150857,19 @@ var require_signatureUtils2 = __commonJS({
150857
150857
  return { v: Number(v39), r: (0, util_1.bufferToHex)(r37), s: (0, util_1.bufferToHex)(s58) };
150858
150858
  }
150859
150859
  exports2.signMessageWithoutPrefix = signMessageWithoutPrefix;
150860
- function verifySignature2(message2, signature4, signer2) {
150860
+ function verifySignature(message2, signature4, signer2) {
150861
150861
  try {
150862
- parseSignature2(message2, signature4, signer2);
150862
+ parseSignature(message2, signature4, signer2);
150863
150863
  return true;
150864
150864
  } catch (error) {
150865
150865
  return false;
150866
150866
  }
150867
150867
  }
150868
- exports2.verifySignature = verifySignature2;
150869
- function parseSignature2(message2, signature4, signer2) {
150868
+ exports2.verifySignature = verifySignature;
150869
+ function parseSignature(message2, signature4, signer2) {
150870
150870
  return parseSignatureWithoutPrefix(hashMessageWithPrefix(message2), signature4, signer2);
150871
150871
  }
150872
- exports2.parseSignature = parseSignature2;
150872
+ exports2.parseSignature = parseSignature;
150873
150873
  function parseSignatureWithoutPrefix(messageHash, signature4, signer2) {
150874
150874
  let { r: r37, s: s58, v: v39 } = parseSignatureAsRsv(signature4.slice(2));
150875
150875
  if (isValidSignature(signer2, messageHash, v39, r37, s58)) {
@@ -150948,7 +150948,7 @@ var require_signatureUtils2 = __commonJS({
150948
150948
  LocalSigner,
150949
150949
  signMessage: signMessage12,
150950
150950
  signMessageWithoutPrefix,
150951
- parseSignature: parseSignature2,
150951
+ parseSignature,
150952
150952
  parseSignatureWithoutPrefix,
150953
150953
  serializeSignature: signatureUtils_1.serializeSignature,
150954
150954
  recoverEIP712TypedDataSignerRsv,
@@ -177881,11 +177881,11 @@ var require_hash5 = __commonJS({
177881
177881
  a72 = (0, bytes_1.toBuffer)(a72);
177882
177882
  return createHash4("sha256").update(a72).digest();
177883
177883
  };
177884
- var sha25617 = function(a72) {
177884
+ var sha25616 = function(a72) {
177885
177885
  (0, helpers_1.assertIsBuffer)(a72);
177886
177886
  return _sha2562(a72);
177887
177887
  };
177888
- exports2.sha256 = sha25617;
177888
+ exports2.sha256 = sha25616;
177889
177889
  var sha256FromString = function(a72) {
177890
177890
  (0, helpers_1.assertIsString)(a72);
177891
177891
  return _sha2562(a72);
@@ -215308,17 +215308,17 @@ var require_utils21 = __commonJS({
215308
215308
  return hex4;
215309
215309
  }
215310
215310
  exports2.bytesToHex = bytesToHex10;
215311
- var asciis7 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
215312
- function asciiToBase167(char) {
215313
- if (char >= asciis7._0 && char <= asciis7._9)
215314
- return char - asciis7._0;
215315
- if (char >= asciis7._A && char <= asciis7._F)
215316
- return char - (asciis7._A - 10);
215317
- if (char >= asciis7._a && char <= asciis7._f)
215318
- return char - (asciis7._a - 10);
215311
+ var asciis6 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
215312
+ function asciiToBase166(char) {
215313
+ if (char >= asciis6._0 && char <= asciis6._9)
215314
+ return char - asciis6._0;
215315
+ if (char >= asciis6._A && char <= asciis6._F)
215316
+ return char - (asciis6._A - 10);
215317
+ if (char >= asciis6._a && char <= asciis6._f)
215318
+ return char - (asciis6._a - 10);
215319
215319
  return;
215320
215320
  }
215321
- function hexToBytes10(hex4) {
215321
+ function hexToBytes9(hex4) {
215322
215322
  if (typeof hex4 !== "string")
215323
215323
  throw new Error("hex string expected, got " + typeof hex4);
215324
215324
  const hl = hex4.length;
@@ -215327,8 +215327,8 @@ var require_utils21 = __commonJS({
215327
215327
  throw new Error("padded hex string expected, got unpadded hex of length " + hl);
215328
215328
  const array5 = new Uint8Array(al);
215329
215329
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
215330
- const n1 = asciiToBase167(hex4.charCodeAt(hi));
215331
- const n210 = asciiToBase167(hex4.charCodeAt(hi + 1));
215330
+ const n1 = asciiToBase166(hex4.charCodeAt(hi));
215331
+ const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
215332
215332
  if (n1 === void 0 || n210 === void 0) {
215333
215333
  const char = hex4[hi] + hex4[hi + 1];
215334
215334
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -215337,7 +215337,7 @@ var require_utils21 = __commonJS({
215337
215337
  }
215338
215338
  return array5;
215339
215339
  }
215340
- exports2.hexToBytes = hexToBytes10;
215340
+ exports2.hexToBytes = hexToBytes9;
215341
215341
  function hexToNumber6(hex4) {
215342
215342
  if (typeof hex4 !== "string")
215343
215343
  throw new Error("hex string expected, got " + typeof hex4);
@@ -215349,7 +215349,7 @@ var require_utils21 = __commonJS({
215349
215349
  }
215350
215350
  exports2.bytesToNumberBE = bytesToNumberBE5;
215351
215351
  function numberToBytesBE5(n44, len) {
215352
- return hexToBytes10(n44.toString(16).padStart(len * 2, "0"));
215352
+ return hexToBytes9(n44.toString(16).padStart(len * 2, "0"));
215353
215353
  }
215354
215354
  exports2.numberToBytesBE = numberToBytesBE5;
215355
215355
  var nextTick3 = async () => {
@@ -216416,7 +216416,7 @@ var require_cjs = __commonJS({
216416
216416
  const hexLength = numberToHex(len);
216417
216417
  const lLength = hexLength.length / 2;
216418
216418
  const firstByte = numberToHex(offset2 + 55 + lLength);
216419
- return Uint8Array.from(hexToBytes10(firstByte + hexLength));
216419
+ return Uint8Array.from(hexToBytes9(firstByte + hexLength));
216420
216420
  }
216421
216421
  function decode29(input, stream7 = false) {
216422
216422
  if (typeof input === "undefined" || input === null || input.length === 0) {
@@ -216521,7 +216521,7 @@ var require_cjs = __commonJS({
216521
216521
  throw new Error("Invalid byte sequence");
216522
216522
  return byte;
216523
216523
  }
216524
- function hexToBytes10(hex4) {
216524
+ function hexToBytes9(hex4) {
216525
216525
  if (typeof hex4 !== "string") {
216526
216526
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
216527
216527
  }
@@ -216574,7 +216574,7 @@ var require_cjs = __commonJS({
216574
216574
  }
216575
216575
  if (typeof v39 === "string") {
216576
216576
  if (isHexPrefixed(v39)) {
216577
- return hexToBytes10(padToEven(stripHexPrefix2(v39)));
216577
+ return hexToBytes9(padToEven(stripHexPrefix2(v39)));
216578
216578
  }
216579
216579
  return utf8ToBytes13(v39);
216580
216580
  }
@@ -216582,7 +216582,7 @@ var require_cjs = __commonJS({
216582
216582
  if (!v39) {
216583
216583
  return Uint8Array.from([]);
216584
216584
  }
216585
- return hexToBytes10(numberToHex(v39));
216585
+ return hexToBytes9(numberToHex(v39));
216586
216586
  }
216587
216587
  if (v39 === null || v39 === void 0) {
216588
216588
  return Uint8Array.from([]);
@@ -216592,7 +216592,7 @@ var require_cjs = __commonJS({
216592
216592
  exports2.utils = {
216593
216593
  bytesToHex: bytesToHex10,
216594
216594
  concatBytes: concatBytes11,
216595
- hexToBytes: hexToBytes10,
216595
+ hexToBytes: hexToBytes9,
216596
216596
  utf8ToBytes: utf8ToBytes13
216597
216597
  };
216598
216598
  exports2.RLP = { encode: encode27, decode: decode29 };
@@ -216672,7 +216672,7 @@ var require_utils22 = __commonJS({
216672
216672
  exports2.isBytes = isBytes13;
216673
216673
  exports2.byteSwap32 = byteSwap324;
216674
216674
  exports2.bytesToHex = bytesToHex10;
216675
- exports2.hexToBytes = hexToBytes10;
216675
+ exports2.hexToBytes = hexToBytes9;
216676
216676
  exports2.asyncLoop = asyncLoop3;
216677
216677
  exports2.utf8ToBytes = utf8ToBytes13;
216678
216678
  exports2.toBytes = toBytes8;
@@ -216715,17 +216715,17 @@ var require_utils22 = __commonJS({
216715
216715
  }
216716
216716
  return hex4;
216717
216717
  }
216718
- var asciis7 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
216719
- function asciiToBase167(char) {
216720
- if (char >= asciis7._0 && char <= asciis7._9)
216721
- return char - asciis7._0;
216722
- if (char >= asciis7._A && char <= asciis7._F)
216723
- return char - (asciis7._A - 10);
216724
- if (char >= asciis7._a && char <= asciis7._f)
216725
- return char - (asciis7._a - 10);
216718
+ var asciis6 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
216719
+ function asciiToBase166(char) {
216720
+ if (char >= asciis6._0 && char <= asciis6._9)
216721
+ return char - asciis6._0;
216722
+ if (char >= asciis6._A && char <= asciis6._F)
216723
+ return char - (asciis6._A - 10);
216724
+ if (char >= asciis6._a && char <= asciis6._f)
216725
+ return char - (asciis6._a - 10);
216726
216726
  return;
216727
216727
  }
216728
- function hexToBytes10(hex4) {
216728
+ function hexToBytes9(hex4) {
216729
216729
  if (typeof hex4 !== "string")
216730
216730
  throw new Error("hex string expected, got " + typeof hex4);
216731
216731
  const hl = hex4.length;
@@ -216734,8 +216734,8 @@ var require_utils22 = __commonJS({
216734
216734
  throw new Error("padded hex string expected, got unpadded hex of length " + hl);
216735
216735
  const array5 = new Uint8Array(al);
216736
216736
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
216737
- const n1 = asciiToBase167(hex4.charCodeAt(hi));
216738
- const n210 = asciiToBase167(hex4.charCodeAt(hi + 1));
216737
+ const n1 = asciiToBase166(hex4.charCodeAt(hi));
216738
+ const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
216739
216739
  if (n1 === void 0 || n210 === void 0) {
216740
216740
  const char = hex4[hi] + hex4[hi + 1];
216741
216741
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -217104,7 +217104,7 @@ var require_sha2569 = __commonJS({
217104
217104
  }
217105
217105
  };
217106
217106
  exports2.SHA256 = SHA2567;
217107
- var SHA2244 = class extends SHA2567 {
217107
+ var SHA2243 = class extends SHA2567 {
217108
217108
  constructor() {
217109
217109
  super();
217110
217110
  this.A = 3238371032 | 0;
@@ -217119,7 +217119,7 @@ var require_sha2569 = __commonJS({
217119
217119
  }
217120
217120
  };
217121
217121
  exports2.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2567());
217122
- exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2244());
217122
+ exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2243());
217123
217123
  }
217124
217124
  });
217125
217125
 
@@ -217211,7 +217211,7 @@ var require_utils23 = __commonJS({
217211
217211
  exports2.bytesToHex = bytesToHex10;
217212
217212
  exports2.numberToHexUnpadded = numberToHexUnpadded6;
217213
217213
  exports2.hexToNumber = hexToNumber6;
217214
- exports2.hexToBytes = hexToBytes10;
217214
+ exports2.hexToBytes = hexToBytes9;
217215
217215
  exports2.bytesToNumberBE = bytesToNumberBE5;
217216
217216
  exports2.bytesToNumberLE = bytesToNumberLE5;
217217
217217
  exports2.numberToBytesBE = numberToBytesBE5;
@@ -217261,17 +217261,17 @@ var require_utils23 = __commonJS({
217261
217261
  throw new Error("hex string expected, got " + typeof hex4);
217262
217262
  return BigInt(hex4 === "" ? "0" : `0x${hex4}`);
217263
217263
  }
217264
- var asciis7 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
217265
- function asciiToBase167(char) {
217266
- if (char >= asciis7._0 && char <= asciis7._9)
217267
- return char - asciis7._0;
217268
- if (char >= asciis7._A && char <= asciis7._F)
217269
- return char - (asciis7._A - 10);
217270
- if (char >= asciis7._a && char <= asciis7._f)
217271
- return char - (asciis7._a - 10);
217264
+ var asciis6 = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
217265
+ function asciiToBase166(char) {
217266
+ if (char >= asciis6._0 && char <= asciis6._9)
217267
+ return char - asciis6._0;
217268
+ if (char >= asciis6._A && char <= asciis6._F)
217269
+ return char - (asciis6._A - 10);
217270
+ if (char >= asciis6._a && char <= asciis6._f)
217271
+ return char - (asciis6._a - 10);
217272
217272
  return;
217273
217273
  }
217274
- function hexToBytes10(hex4) {
217274
+ function hexToBytes9(hex4) {
217275
217275
  if (typeof hex4 !== "string")
217276
217276
  throw new Error("hex string expected, got " + typeof hex4);
217277
217277
  const hl = hex4.length;
@@ -217280,8 +217280,8 @@ var require_utils23 = __commonJS({
217280
217280
  throw new Error("padded hex string expected, got unpadded hex of length " + hl);
217281
217281
  const array5 = new Uint8Array(al);
217282
217282
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
217283
- const n1 = asciiToBase167(hex4.charCodeAt(hi));
217284
- const n210 = asciiToBase167(hex4.charCodeAt(hi + 1));
217283
+ const n1 = asciiToBase166(hex4.charCodeAt(hi));
217284
+ const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
217285
217285
  if (n1 === void 0 || n210 === void 0) {
217286
217286
  const char = hex4[hi] + hex4[hi + 1];
217287
217287
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -217298,19 +217298,19 @@ var require_utils23 = __commonJS({
217298
217298
  return hexToNumber6(bytesToHex10(Uint8Array.from(bytes7).reverse()));
217299
217299
  }
217300
217300
  function numberToBytesBE5(n44, len) {
217301
- return hexToBytes10(n44.toString(16).padStart(len * 2, "0"));
217301
+ return hexToBytes9(n44.toString(16).padStart(len * 2, "0"));
217302
217302
  }
217303
217303
  function numberToBytesLE5(n44, len) {
217304
217304
  return numberToBytesBE5(n44, len).reverse();
217305
217305
  }
217306
217306
  function numberToVarBytesBE4(n44) {
217307
- return hexToBytes10(numberToHexUnpadded6(n44));
217307
+ return hexToBytes9(numberToHexUnpadded6(n44));
217308
217308
  }
217309
217309
  function ensureBytes6(title, hex4, expectedLength) {
217310
217310
  let res;
217311
217311
  if (typeof hex4 === "string") {
217312
217312
  try {
217313
- res = hexToBytes10(hex4);
217313
+ res = hexToBytes9(hex4);
217314
217314
  } catch (e34) {
217315
217315
  throw new Error(`${title} must be valid hex string, got "${hex4}". Cause: ${e34}`);
217316
217316
  }
@@ -246939,7 +246939,7 @@ var require_sha2242 = __commonJS({
246939
246939
  var WordArray = C_lib.WordArray;
246940
246940
  var C_algo = C18.algo;
246941
246941
  var SHA2567 = C_algo.SHA256;
246942
- var SHA2244 = C_algo.SHA224 = SHA2567.extend({
246942
+ var SHA2243 = C_algo.SHA224 = SHA2567.extend({
246943
246943
  _doReset: function() {
246944
246944
  this._hash = new WordArray.init([
246945
246945
  3238371032,
@@ -246958,8 +246958,8 @@ var require_sha2242 = __commonJS({
246958
246958
  return hash12;
246959
246959
  }
246960
246960
  });
246961
- C18.SHA224 = SHA2567._createHelper(SHA2244);
246962
- C18.HmacSHA224 = SHA2567._createHmacHelper(SHA2244);
246961
+ C18.SHA224 = SHA2567._createHelper(SHA2243);
246962
+ C18.HmacSHA224 = SHA2567._createHmacHelper(SHA2243);
246963
246963
  })();
246964
246964
  return CryptoJS.SHA224;
246965
246965
  });
@@ -272065,10 +272065,10 @@ var require_sha6 = __commonJS({
272065
272065
  }
272066
272066
  };
272067
272067
  exports2.Sha256 = Sha2562;
272068
- function sha25617(data6) {
272068
+ function sha25616(data6) {
272069
272069
  return new Sha2562(data6).digest();
272070
272070
  }
272071
- exports2.sha256 = sha25617;
272071
+ exports2.sha256 = sha25616;
272072
272072
  var Sha512 = class {
272073
272073
  constructor(firstData) {
272074
272074
  this.blockSize = 1024 / 8;
@@ -277445,7 +277445,7 @@ var require_sha3842 = __commonJS({
277445
277445
  var X64WordArray = C_x64.WordArray;
277446
277446
  var C_algo = C18.algo;
277447
277447
  var SHA5126 = C_algo.SHA512;
277448
- var SHA3843 = C_algo.SHA384 = SHA5126.extend({
277448
+ var SHA3842 = C_algo.SHA384 = SHA5126.extend({
277449
277449
  _doReset: function() {
277450
277450
  this._hash = new X64WordArray.init([
277451
277451
  new X64Word.init(3418070365, 3238371032),
@@ -277464,8 +277464,8 @@ var require_sha3842 = __commonJS({
277464
277464
  return hash12;
277465
277465
  }
277466
277466
  });
277467
- C18.SHA384 = SHA5126._createHelper(SHA3843);
277468
- C18.HmacSHA384 = SHA5126._createHmacHelper(SHA3843);
277467
+ C18.SHA384 = SHA5126._createHelper(SHA3842);
277468
+ C18.HmacSHA384 = SHA5126._createHmacHelper(SHA3842);
277469
277469
  })();
277470
277470
  return CryptoJS.SHA384;
277471
277471
  });
@@ -284979,10 +284979,10 @@ var require_sha7 = __commonJS({
284979
284979
  }
284980
284980
  };
284981
284981
  exports2.Sha256 = Sha2562;
284982
- function sha25617(data6) {
284982
+ function sha25616(data6) {
284983
284983
  return new Sha2562(data6).digest();
284984
284984
  }
284985
- exports2.sha256 = sha25617;
284985
+ exports2.sha256 = sha25616;
284986
284986
  var Sha512 = class {
284987
284987
  constructor(firstData) {
284988
284988
  this.blockSize = 1024 / 8;
@@ -363287,7 +363287,7 @@ var require_utils33 = __commonJS({
363287
363287
  return hex4;
363288
363288
  }
363289
363289
  exports2.bytesToHex = bytesToHex10;
363290
- function hexToBytes10(hex4) {
363290
+ function hexToBytes9(hex4) {
363291
363291
  if (typeof hex4 !== "string") {
363292
363292
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
363293
363293
  }
@@ -363304,7 +363304,7 @@ var require_utils33 = __commonJS({
363304
363304
  }
363305
363305
  return array5;
363306
363306
  }
363307
- exports2.hexToBytes = hexToBytes10;
363307
+ exports2.hexToBytes = hexToBytes9;
363308
363308
  var nextTick3 = async () => {
363309
363309
  };
363310
363310
  exports2.nextTick = nextTick3;
@@ -363830,7 +363830,7 @@ var require_sha5127 = __commonJS({
363830
363830
  this.outputLen = 32;
363831
363831
  }
363832
363832
  };
363833
- var SHA3843 = class extends SHA5126 {
363833
+ var SHA3842 = class extends SHA5126 {
363834
363834
  constructor() {
363835
363835
  super();
363836
363836
  this.Ah = 3418070365 | 0;
@@ -363855,7 +363855,7 @@ var require_sha5127 = __commonJS({
363855
363855
  exports2.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5126());
363856
363856
  exports2.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2242());
363857
363857
  exports2.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2562());
363858
- exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3843());
363858
+ exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());
363859
363859
  }
363860
363860
  });
363861
363861
 
@@ -368694,7 +368694,7 @@ var require_utils35 = __commonJS({
368694
368694
  return hex4;
368695
368695
  }
368696
368696
  exports2.bytesToHex = bytesToHex10;
368697
- function hexToBytes10(hex4) {
368697
+ function hexToBytes9(hex4) {
368698
368698
  if (typeof hex4 !== "string")
368699
368699
  throw new Error("hex string expected, got " + typeof hex4);
368700
368700
  const len = hex4.length;
@@ -368711,7 +368711,7 @@ var require_utils35 = __commonJS({
368711
368711
  }
368712
368712
  return array5;
368713
368713
  }
368714
- exports2.hexToBytes = hexToBytes10;
368714
+ exports2.hexToBytes = hexToBytes9;
368715
368715
  var nextTick3 = async () => {
368716
368716
  };
368717
368717
  exports2.nextTick = nextTick3;
@@ -369260,7 +369260,7 @@ var require_sha5128 = __commonJS({
369260
369260
  this.outputLen = 32;
369261
369261
  }
369262
369262
  };
369263
- var SHA3843 = class extends SHA5126 {
369263
+ var SHA3842 = class extends SHA5126 {
369264
369264
  constructor() {
369265
369265
  super();
369266
369266
  this.Ah = 3418070365 | 0;
@@ -369285,7 +369285,7 @@ var require_sha5128 = __commonJS({
369285
369285
  exports2.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5126());
369286
369286
  exports2.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2242());
369287
369287
  exports2.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2562());
369288
- exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3843());
369288
+ exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());
369289
369289
  }
369290
369290
  });
369291
369291
 
@@ -369321,7 +369321,7 @@ var require_utils36 = __commonJS({
369321
369321
  return BigInt(hex4 === "" ? "0" : `0x${hex4}`);
369322
369322
  }
369323
369323
  exports2.hexToNumber = hexToNumber6;
369324
- function hexToBytes10(hex4) {
369324
+ function hexToBytes9(hex4) {
369325
369325
  if (typeof hex4 !== "string")
369326
369326
  throw new Error("hex string expected, got " + typeof hex4);
369327
369327
  const len = hex4.length;
@@ -369338,7 +369338,7 @@ var require_utils36 = __commonJS({
369338
369338
  }
369339
369339
  return array5;
369340
369340
  }
369341
- exports2.hexToBytes = hexToBytes10;
369341
+ exports2.hexToBytes = hexToBytes9;
369342
369342
  function bytesToNumberBE5(bytes7) {
369343
369343
  return hexToNumber6(bytesToHex10(bytes7));
369344
369344
  }
@@ -369350,7 +369350,7 @@ var require_utils36 = __commonJS({
369350
369350
  }
369351
369351
  exports2.bytesToNumberLE = bytesToNumberLE5;
369352
369352
  function numberToBytesBE5(n44, len) {
369353
- return hexToBytes10(n44.toString(16).padStart(len * 2, "0"));
369353
+ return hexToBytes9(n44.toString(16).padStart(len * 2, "0"));
369354
369354
  }
369355
369355
  exports2.numberToBytesBE = numberToBytesBE5;
369356
369356
  function numberToBytesLE5(n44, len) {
@@ -369358,14 +369358,14 @@ var require_utils36 = __commonJS({
369358
369358
  }
369359
369359
  exports2.numberToBytesLE = numberToBytesLE5;
369360
369360
  function numberToVarBytesBE4(n44) {
369361
- return hexToBytes10(numberToHexUnpadded6(n44));
369361
+ return hexToBytes9(numberToHexUnpadded6(n44));
369362
369362
  }
369363
369363
  exports2.numberToVarBytesBE = numberToVarBytesBE4;
369364
369364
  function ensureBytes6(title, hex4, expectedLength) {
369365
369365
  let res;
369366
369366
  if (typeof hex4 === "string") {
369367
369367
  try {
369368
- res = hexToBytes10(hex4);
369368
+ res = hexToBytes9(hex4);
369369
369369
  } catch (e34) {
369370
369370
  throw new Error(`${title} must be valid hex string, got "${hex4}". Cause: ${e34}`);
369371
369371
  }
@@ -403202,7 +403202,7 @@ function intToBigInt(value5, signed3) {
403202
403202
  if (parsedValue.toLowerCase().startsWith("0x")) {
403203
403203
  let hex4 = parsedValue.slice(2);
403204
403204
  hex4 = hex4.padStart(hex4.length + hex4.length % 2, "0");
403205
- parsedValue = hexToBytes8(hex4);
403205
+ parsedValue = hexToBytes7(hex4);
403206
403206
  } else {
403207
403207
  try {
403208
403208
  return BigInt(parsedValue);
@@ -403246,7 +403246,7 @@ function hexToInt(hex4) {
403246
403246
  }
403247
403247
  function bigIntToBytes2(value5, length2 = 16) {
403248
403248
  const hex4 = intToHex(value5, length2);
403249
- return hexToBytes8(hex4);
403249
+ return hexToBytes7(hex4);
403250
403250
  }
403251
403251
  function toTwos2(value5, width) {
403252
403252
  if (value5 < -(BigInt(1) << width - BigInt(1)) || (BigInt(1) << width - BigInt(1)) - BigInt(1) < value5) {
@@ -403275,7 +403275,7 @@ function bytesToHex8(uint8a) {
403275
403275
  }
403276
403276
  return hex4;
403277
403277
  }
403278
- function hexToBytes8(hex4) {
403278
+ function hexToBytes7(hex4) {
403279
403279
  if (typeof hex4 !== "string") {
403280
403280
  throw new TypeError(`hexToBytes: expected string, got ${typeof hex4}`);
403281
403281
  }
@@ -403406,7 +403406,7 @@ var init_signatures = __esm({
403406
403406
 
403407
403407
  // ../../node_modules/.pnpm/@stacks+common@6.16.0/node_modules/@stacks/common/dist/esm/keys.js
403408
403408
  function privateKeyToBytes(privateKey) {
403409
- const privateKeyBuffer = typeof privateKey === "string" ? hexToBytes8(privateKey) : privateKey;
403409
+ const privateKeyBuffer = typeof privateKey === "string" ? hexToBytes7(privateKey) : privateKey;
403410
403410
  if (privateKeyBuffer.length != 32 && privateKeyBuffer.length != 33) {
403411
403411
  throw new Error(`Improperly formatted private-key. Private-key byte length should be 32 or 33. Length provided: ${privateKeyBuffer.length}`);
403412
403412
  }
@@ -403544,7 +403544,7 @@ __export(esm_exports4, {
403544
403544
  getGlobalObjects: () => getGlobalObjects,
403545
403545
  getGlobalScope: () => getGlobalScope,
403546
403546
  hexToBigInt: () => hexToBigInt,
403547
- hexToBytes: () => hexToBytes8,
403547
+ hexToBytes: () => hexToBytes7,
403548
403548
  hexToInt: () => hexToInt,
403549
403549
  intToBigInt: () => intToBigInt,
403550
403550
  intToBytes: () => intToBytes,
@@ -403870,7 +403870,7 @@ var require_utils40 = __commonJS({
403870
403870
  return hex4;
403871
403871
  }
403872
403872
  exports2.bytesToHex = bytesToHex10;
403873
- function hexToBytes10(hex4) {
403873
+ function hexToBytes9(hex4) {
403874
403874
  if (typeof hex4 !== "string") {
403875
403875
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
403876
403876
  }
@@ -403887,7 +403887,7 @@ var require_utils40 = __commonJS({
403887
403887
  }
403888
403888
  return array5;
403889
403889
  }
403890
- exports2.hexToBytes = hexToBytes10;
403890
+ exports2.hexToBytes = hexToBytes9;
403891
403891
  var nextTick3 = async () => {
403892
403892
  };
403893
403893
  exports2.nextTick = nextTick3;
@@ -404341,7 +404341,7 @@ var require_sha25611 = __commonJS({
404341
404341
  this.buffer.fill(0);
404342
404342
  }
404343
404343
  };
404344
- var SHA2244 = class extends SHA2567 {
404344
+ var SHA2243 = class extends SHA2567 {
404345
404345
  constructor() {
404346
404346
  super();
404347
404347
  this.A = 3238371032 | 0;
@@ -404356,7 +404356,7 @@ var require_sha25611 = __commonJS({
404356
404356
  }
404357
404357
  };
404358
404358
  exports2.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2567());
404359
- exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2244());
404359
+ exports2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2243());
404360
404360
  }
404361
404361
  });
404362
404362
 
@@ -404687,7 +404687,7 @@ var require_sha5129 = __commonJS({
404687
404687
  this.outputLen = 32;
404688
404688
  }
404689
404689
  };
404690
- var SHA3843 = class extends SHA5126 {
404690
+ var SHA3842 = class extends SHA5126 {
404691
404691
  constructor() {
404692
404692
  super();
404693
404693
  this.Ah = 3418070365 | 0;
@@ -404712,7 +404712,7 @@ var require_sha5129 = __commonJS({
404712
404712
  exports2.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5126());
404713
404713
  exports2.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2242());
404714
404714
  exports2.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_2562());
404715
- exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3843());
404715
+ exports2.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());
404716
404716
  }
404717
404717
  });
404718
404718
 
@@ -412103,33 +412103,33 @@ var require_cross_sha256 = __commonJS({
412103
412103
  _nodeCryptoAvailable = isAvailable;
412104
412104
  return isAvailable;
412105
412105
  }
412106
- var sha25617 = (
412106
+ var sha25616 = (
412107
412107
  /** @class */
412108
412108
  function() {
412109
- function sha25618() {
412109
+ function sha25617() {
412110
412110
  if (isNodeCryptoAvailable()) {
412111
412111
  this.instance = new sha256nodeCrypto();
412112
412112
  } else {
412113
412113
  this.instance = new sha256js();
412114
412114
  }
412115
412115
  }
412116
- sha25618.prototype.update = function(data6, encoding) {
412116
+ sha25617.prototype.update = function(data6, encoding) {
412117
412117
  this.instance.update(data6, encoding);
412118
412118
  return this;
412119
412119
  };
412120
- sha25618.prototype.digest = function(encoding) {
412120
+ sha25617.prototype.digest = function(encoding) {
412121
412121
  if (encoding) {
412122
412122
  return this.instance.digest(encoding);
412123
412123
  } else {
412124
412124
  return this.instance.digest();
412125
412125
  }
412126
412126
  };
412127
- return sha25618;
412127
+ return sha25617;
412128
412128
  }()
412129
412129
  );
412130
- exports2.sha256 = sha25617;
412130
+ exports2.sha256 = sha25616;
412131
412131
  function hashSha256(data6) {
412132
- return new sha25617().update(data6).digest();
412132
+ return new sha25616().update(data6).digest();
412133
412133
  }
412134
412134
  exports2.hashSha256 = hashSha256;
412135
412135
  exports2.default = hashSha256;
@@ -445595,10 +445595,10 @@ var require_base8 = __commonJS({
445595
445595
  var require_bs58check2 = __commonJS({
445596
445596
  "../../node_modules/.pnpm/bs58check@3.0.1/node_modules/bs58check/index.js"(exports2, module2) {
445597
445597
  "use strict";
445598
- var { sha256: sha25617 } = require_sha2565();
445598
+ var { sha256: sha25616 } = require_sha2565();
445599
445599
  var bs58checkBase2 = require_base8();
445600
445600
  function sha256x2(buffer2) {
445601
- return sha25617(sha25617(buffer2));
445601
+ return sha25616(sha25616(buffer2));
445602
445602
  }
445603
445603
  module2.exports = bs58checkBase2(sha256x2);
445604
445604
  }
@@ -486855,7 +486855,7 @@ var require_abi_coder = __commonJS({
486855
486855
  }).join(",") + ")";
486856
486856
  }
486857
486857
  exports2.formatSignature = formatSignature2;
486858
- function parseSignature2(fragment) {
486858
+ function parseSignature(fragment) {
486859
486859
  if (typeof fragment === "string") {
486860
486860
  fragment = fragment.replace(/\s/g, " ");
486861
486861
  fragment = fragment.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " ");
@@ -486871,7 +486871,7 @@ var require_abi_coder = __commonJS({
486871
486871
  }
486872
486872
  throw new Error("unknown signature");
486873
486873
  }
486874
- exports2.parseSignature = parseSignature2;
486874
+ exports2.parseSignature = parseSignature;
486875
486875
  var Coder4 = (
486876
486876
  /** @class */
486877
486877
  /* @__PURE__ */ function() {
@@ -487529,18 +487529,18 @@ var require_sha25612 = __commonJS({
487529
487529
  (function(root4, factory) {
487530
487530
  var exports3 = {};
487531
487531
  factory(exports3);
487532
- var sha25617 = exports3["default"];
487532
+ var sha25616 = exports3["default"];
487533
487533
  for (var k17 in exports3) {
487534
- sha25617[k17] = exports3[k17];
487534
+ sha25616[k17] = exports3[k17];
487535
487535
  }
487536
487536
  if (typeof module2 === "object" && typeof module2.exports === "object") {
487537
- module2.exports = sha25617;
487537
+ module2.exports = sha25616;
487538
487538
  } else if (typeof define === "function" && define.amd) {
487539
487539
  define(function() {
487540
- return sha25617;
487540
+ return sha25616;
487541
487541
  });
487542
487542
  } else {
487543
- root4.sha256 = sha25617;
487543
+ root4.sha256 = sha25616;
487544
487544
  }
487545
487545
  })(exports2, function(exports3) {
487546
487546
  "use strict";
@@ -497789,10 +497789,10 @@ var require_utils46 = __commonJS({
497789
497789
  return buf2.toString("hex").toUpperCase();
497790
497790
  };
497791
497791
  exports2.bytesToHex = bytesToHex10;
497792
- var hexToBytes10 = (hex4) => {
497792
+ var hexToBytes9 = (hex4) => {
497793
497793
  return toUint8Array2(Buffer.from(hex4, "hex"));
497794
497794
  };
497795
- exports2.hexToBytes = hexToBytes10;
497795
+ exports2.hexToBytes = hexToBytes9;
497796
497796
  var randomBytes13 = (size2) => {
497797
497797
  return toUint8Array2((0, crypto_1.randomBytes)(size2));
497798
497798
  };
@@ -498126,7 +498126,7 @@ var require_lib64 = __commonJS({
498126
498126
  return Uint8Array.from(res);
498127
498127
  }
498128
498128
  };
498129
- var createBase58check2 = (sha25617) => /* @__PURE__ */ chain5(/* @__PURE__ */ checksum8(4, (data6) => sha25617(sha25617(data6))), exports2.base58);
498129
+ var createBase58check2 = (sha25616) => /* @__PURE__ */ chain5(/* @__PURE__ */ checksum8(4, (data6) => sha25616(sha25616(data6))), exports2.base58);
498130
498130
  exports2.createBase58check = createBase58check2;
498131
498131
  exports2.base58check = exports2.createBase58check;
498132
498132
  var BECH_ALPHABET = /* @__PURE__ */ chain5(/* @__PURE__ */ alphabet4("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), /* @__PURE__ */ join4(""));
@@ -498645,60 +498645,6 @@ var require_dist34 = __commonJS({
498645
498645
  }
498646
498646
  });
498647
498647
 
498648
- // ../../libs/live-config/lib/LiveConfig.js
498649
- var require_LiveConfig = __commonJS({
498650
- "../../libs/live-config/lib/LiveConfig.js"(exports2) {
498651
- "use strict";
498652
- var __importDefault = exports2 && exports2.__importDefault || function(mod7) {
498653
- return mod7 && mod7.__esModule ? mod7 : { "default": mod7 };
498654
- };
498655
- Object.defineProperty(exports2, "__esModule", { value: true });
498656
- exports2.LiveConfig = void 0;
498657
- var merge_1 = __importDefault(require("lodash/merge"));
498658
- var LiveConfig3 = class _LiveConfig {
498659
- provider;
498660
- config = {};
498661
- appVersion;
498662
- platform;
498663
- environment;
498664
- static instance = new _LiveConfig();
498665
- constructor() {
498666
- }
498667
- static setAppinfo(params) {
498668
- _LiveConfig.instance.appVersion = params.appVersion;
498669
- _LiveConfig.instance.platform = params.platform;
498670
- _LiveConfig.instance.environment = params.environment;
498671
- }
498672
- static setProvider(provider) {
498673
- _LiveConfig.instance.provider = provider;
498674
- }
498675
- static setConfig(config4) {
498676
- _LiveConfig.instance.config = config4;
498677
- }
498678
- static getValueByKey(key2) {
498679
- if (Object.keys(_LiveConfig.instance.config).length === 0) {
498680
- throw new Error("Config not set");
498681
- }
498682
- if (!_LiveConfig.instance.provider) {
498683
- return _LiveConfig.instance.config[key2]?.default;
498684
- }
498685
- const providerValue = _LiveConfig.instance.provider.getValueByKey(key2, _LiveConfig.instance.config[key2]) ?? _LiveConfig.instance.config[key2]?.default;
498686
- if (_LiveConfig.instance.config[key2]?.type === "object") {
498687
- return (0, merge_1.default)(_LiveConfig.instance.config[key2]?.default, providerValue);
498688
- }
498689
- return providerValue;
498690
- }
498691
- static getDefaultValueByKey(key2) {
498692
- if (Object.keys(_LiveConfig.instance.config).length === 0) {
498693
- throw new Error("Config not set");
498694
- }
498695
- return _LiveConfig.instance.config[key2]?.default;
498696
- }
498697
- };
498698
- exports2.LiveConfig = LiveConfig3;
498699
- }
498700
- });
498701
-
498702
498648
  // ../../libs/ledgerjs/packages/devices/lib-es/hid-framing.js
498703
498649
  function asUInt16BE(value5) {
498704
498650
  const b21 = Buffer.alloc(2);
@@ -511398,7 +511344,7 @@ var require_build19 = __commonJS({
511398
511344
  });
511399
511345
  exports2.separateMessageFromStack = exports2.getTopFrame = exports2.getStackTraceLines = exports2.formatStackTrace = exports2.formatResultsErrors = exports2.formatExecError = void 0;
511400
511346
  var path4 = _interopRequireWildcard(require("path"));
511401
- var _url2 = require("url");
511347
+ var _url = require("url");
511402
511348
  var _codeFrame = require_lib66();
511403
511349
  var _chalk = _interopRequireDefault(require_source());
511404
511350
  var fs14 = _interopRequireWildcard(require_graceful_fs());
@@ -511656,7 +511602,7 @@ ${message2}`;
511656
511602
  if (parsedFrame && parsedFrame.file) {
511657
511603
  if (parsedFrame.file.startsWith("file://")) {
511658
511604
  parsedFrame.file = (0, _slash.default)(
511659
- (0, _url2.fileURLToPath)(parsedFrame.file)
511605
+ (0, _url.fileURLToPath)(parsedFrame.file)
511660
511606
  );
511661
511607
  }
511662
511608
  return parsedFrame;
@@ -515527,17 +515473,17 @@ var require_AcreBtcOld = __commonJS({
515527
515473
  const checksum8 = hash2563(extendedKeyBytes).slice(0, 4);
515528
515474
  return bs58_1.default.encode(Buffer.concat([extendedKeyBytes, checksum8]));
515529
515475
  }
515530
- function sha25617(buffer2) {
515476
+ function sha25616(buffer2) {
515531
515477
  return (0, sha_js_1.default)("sha256").update(buffer2).digest();
515532
515478
  }
515533
515479
  function hash2563(buffer2) {
515534
- return sha25617(sha25617(buffer2));
515480
+ return sha25616(sha25616(buffer2));
515535
515481
  }
515536
515482
  function ripemd1608(buffer2) {
515537
515483
  return new ripemd160_1.default().update(buffer2).digest();
515538
515484
  }
515539
515485
  function hash1605(buffer2) {
515540
- return ripemd1608(sha25617(buffer2));
515486
+ return ripemd1608(sha25616(buffer2));
515541
515487
  }
515542
515488
  }
515543
515489
  });
@@ -516725,7 +516671,7 @@ var require_package8 = __commonJS({
516725
516671
  module2.exports = {
516726
516672
  name: "@ledgerhq/live-common",
516727
516673
  description: "Common ground for the Ledger Live apps",
516728
- version: "34.42.0-nightly.0",
516674
+ version: "34.42.0-nightly.1",
516729
516675
  repository: {
516730
516676
  type: "git",
516731
516677
  url: "https://github.com/LedgerHQ/ledger-live.git"
@@ -522734,9 +522680,9 @@ var require_elliptic4 = __commonJS({
522734
522680
  const point3 = pair.getPublic().mul(scalar);
522735
522681
  if (hashfn === void 0) {
522736
522682
  const data7 = point3.encode(null, true);
522737
- const sha25617 = ec2.hash().update(data7).digest();
522683
+ const sha25616 = ec2.hash().update(data7).digest();
522738
522684
  for (let i87 = 0; i87 < 32; ++i87)
522739
- output5[i87] = sha25617[i87];
522685
+ output5[i87] = sha25616[i87];
522740
522686
  } else {
522741
522687
  if (!xbuf)
522742
522688
  xbuf = new Uint8Array(32);
@@ -523526,7 +523472,7 @@ var require_package9 = __commonJS({
523526
523472
  "package.json"(exports2, module2) {
523527
523473
  module2.exports = {
523528
523474
  name: "@ledgerhq/live-cli",
523529
- version: "24.19.5-nightly.0",
523475
+ version: "24.19.5-nightly.1",
523530
523476
  description: "ledger-live CLI version",
523531
523477
  repository: {
523532
523478
  type: "git",
@@ -530002,6 +529948,9 @@ var cryptocurrenciesById = {
530002
529948
  magnitude: 18
530003
529949
  }
530004
529950
  ],
529951
+ ethereumLikeInfo: {
529952
+ chainId: 42220
529953
+ },
530005
529954
  explorerViews: [
530006
529955
  {
530007
529956
  tx: "https://explorer.celo.org/tx/$hash",
@@ -559733,7 +559682,7 @@ function checksum(len, fn3) {
559733
559682
  }
559734
559683
  var genBase58 = (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(""));
559735
559684
  var base58 = /* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
559736
- var createBase58check = (sha25617) => /* @__PURE__ */ chain(/* @__PURE__ */ checksum(4, (data6) => sha25617(sha25617(data6))), base58);
559685
+ var createBase58check = (sha25616) => /* @__PURE__ */ chain(/* @__PURE__ */ checksum(4, (data6) => sha25616(sha25616(data6))), base58);
559737
559686
 
559738
559687
  // ../../node_modules/.pnpm/@scure+bip39@1.3.0/node_modules/@scure/bip39/esm/index.js
559739
559688
  function nfkd(str) {
@@ -610289,9 +610238,9 @@ var getFeeData = async (currency24, transaction) => {
610289
610238
  /**
610290
610239
  * ⚠️ We don't know the type of the transaction for sure at this stage since
610291
610240
  * `getFeeData` is called before `getTypedTransaction` in prepareTransaction
610292
- * libs/coin-evm/src/prepareTransaction.ts:201
610241
+ * libs/coin-modules/coin-evm/src/bridge/prepareTransaction.ts:201
610293
610242
  * It's most probably always 2 since it's the default type value for a new transaction
610294
- * cf. libs/coin-evm/src/createTransaction.ts:23
610243
+ * cf. libs/coin-modules/coin-evm/src/bridge/createTransaction.ts:23
610295
610244
  */
610296
610245
  options: {
610297
610246
  useEIP1559: getEnv("EVM_FORCE_LEGACY_TRANSACTIONS") ? false : transaction.type === 2,
@@ -625805,10 +625754,10 @@ function _decode3(data6, offset2) {
625805
625754
  }
625806
625755
  return { consumed: 1, result: hexlifyByte(data6[offset2]) };
625807
625756
  }
625808
- function decodeRlp(_data3) {
625809
- const data6 = getBytes(_data3, "data");
625757
+ function decodeRlp(_data2) {
625758
+ const data6 = getBytes(_data2, "data");
625810
625759
  const decoded = _decode3(data6, 0);
625811
- assertArgument(decoded.consumed === data6.length, "unexpected junk after rlp payload", "data", _data3);
625760
+ assertArgument(decoded.consumed === data6.length, "unexpected junk after rlp payload", "data", _data2);
625812
625761
  return decoded.result;
625813
625762
  }
625814
625763
 
@@ -626343,9 +626292,9 @@ var _computeHmac = function(algorithm2, key2, data6) {
626343
626292
  return (0, import_crypto12.createHmac)(algorithm2, key2).update(data6).digest();
626344
626293
  };
626345
626294
  var __computeHmac = _computeHmac;
626346
- function computeHmac2(algorithm2, _key, _data3) {
626295
+ function computeHmac2(algorithm2, _key, _data2) {
626347
626296
  const key2 = getBytes(_key, "key");
626348
- const data6 = getBytes(_data3, "data");
626297
+ const data6 = getBytes(_data2, "data");
626349
626298
  return hexlify2(__computeHmac(algorithm2, key2, data6));
626350
626299
  }
626351
626300
  computeHmac2._ = _computeHmac;
@@ -626683,8 +626632,8 @@ var _keccak256 = function(data6) {
626683
626632
  return keccak_2563(data6);
626684
626633
  };
626685
626634
  var __keccak256 = _keccak256;
626686
- function keccak2563(_data3) {
626687
- const data6 = getBytes(_data3, "data");
626635
+ function keccak2563(_data2) {
626636
+ const data6 = getBytes(_data2, "data");
626688
626637
  return hexlify2(__keccak256(data6));
626689
626638
  }
626690
626639
  keccak2563._ = _keccak256;
@@ -626902,8 +626851,8 @@ var _ripemd160 = function(data6) {
626902
626851
  return ripemd1604(data6);
626903
626852
  };
626904
626853
  var __ripemd160 = _ripemd160;
626905
- function ripemd1605(_data3) {
626906
- const data6 = getBytes(_data3, "data");
626854
+ function ripemd1605(_data2) {
626855
+ const data6 = getBytes(_data2, "data");
626907
626856
  return hexlify2(__ripemd160(data6));
626908
626857
  }
626909
626858
  ripemd1605._ = _ripemd160;
@@ -627455,8 +627404,8 @@ var __sha256 = _sha256;
627455
627404
  var __sha512 = _sha512;
627456
627405
  var locked256 = false;
627457
627406
  var locked512 = false;
627458
- function sha2567(_data3) {
627459
- const data6 = getBytes(_data3, "data");
627407
+ function sha2567(_data2) {
627408
+ const data6 = getBytes(_data2, "data");
627460
627409
  return hexlify2(__sha256(data6));
627461
627410
  }
627462
627411
  sha2567._ = _sha256;
@@ -627470,8 +627419,8 @@ sha2567.register = function(func) {
627470
627419
  __sha256 = func;
627471
627420
  };
627472
627421
  Object.freeze(sha2567);
627473
- function sha5127(_data3) {
627474
- const data6 = getBytes(_data3, "data");
627422
+ function sha5127(_data2) {
627423
+ const data6 = getBytes(_data2, "data");
627475
627424
  return hexlify2(__sha512(data6));
627476
627425
  }
627477
627426
  sha5127._ = _sha512;
@@ -635337,8 +635286,8 @@ var Interface2 = class _Interface {
635337
635286
  info: { method: fragment.name, signature: fragment.format() }
635338
635287
  });
635339
635288
  }
635340
- makeError(_data3, tx) {
635341
- const data6 = getBytes(_data3, "data");
635289
+ makeError(_data2, tx) {
635290
+ const data6 = getBytes(_data2, "data");
635342
635291
  const error = AbiCoder2.getBuiltinCallException("call", tx, data6);
635343
635292
  const customPrefix = "execution reverted (unknown custom error)";
635344
635293
  if (error.message.startsWith(customPrefix)) {
@@ -690211,7 +690160,7 @@ function decodeString64(data6, pos, _minor, options22) {
690211
690160
  var encodeString = encodeBytes3;
690212
690161
 
690213
690162
  // ../../node_modules/.pnpm/cborg@4.1.4/node_modules/cborg/lib/4array.js
690214
- function toToken3(_data3, _pos, prefix3, length2) {
690163
+ function toToken3(_data2, _pos, prefix3, length2) {
690215
690164
  return new Token2(Type2.array, length2, prefix3);
690216
690165
  }
690217
690166
  function decodeArrayCompact(data6, pos, minor, _options2) {
@@ -690248,7 +690197,7 @@ encodeArray.encodedSize = function encodedSize5(token) {
690248
690197
  };
690249
690198
 
690250
690199
  // ../../node_modules/.pnpm/cborg@4.1.4/node_modules/cborg/lib/5map.js
690251
- function toToken4(_data3, _pos, prefix3, length2) {
690200
+ function toToken4(_data2, _pos, prefix3, length2) {
690252
690201
  return new Token2(Type2.map, length2, prefix3);
690253
690202
  }
690254
690203
  function decodeMapCompact(data6, pos, minor, _options2) {
@@ -690285,7 +690234,7 @@ encodeMap.encodedSize = function encodedSize6(token) {
690285
690234
  };
690286
690235
 
690287
690236
  // ../../node_modules/.pnpm/cborg@4.1.4/node_modules/cborg/lib/6tag.js
690288
- function decodeTagCompact(_data3, _pos, minor, _options2) {
690237
+ function decodeTagCompact(_data2, _pos, minor, _options2) {
690289
690238
  return new Token2(Type2.tag, minor, 1);
690290
690239
  }
690291
690240
  function decodeTag8(data6, pos, _minor, options22) {
@@ -690313,7 +690262,7 @@ var MINOR_FALSE = 20;
690313
690262
  var MINOR_TRUE = 21;
690314
690263
  var MINOR_NULL = 22;
690315
690264
  var MINOR_UNDEFINED = 23;
690316
- function decodeUndefined(_data3, _pos, _minor, options22) {
690265
+ function decodeUndefined(_data2, _pos, _minor, options22) {
690317
690266
  if (options22.allowUndefined === false) {
690318
690267
  throw new Error(`${decodeErrPrefix} undefined values are not supported`);
690319
690268
  } else if (options22.coerceUndefinedToNull === true) {
@@ -690321,7 +690270,7 @@ function decodeUndefined(_data3, _pos, _minor, options22) {
690321
690270
  }
690322
690271
  return new Token2(Type2.undefined, void 0, 1);
690323
690272
  }
690324
- function decodeBreak(_data3, _pos, _minor, options22) {
690273
+ function decodeBreak(_data2, _pos, _minor, options22) {
690325
690274
  if (options22.allowIndefinite === false) {
690326
690275
  throw new Error(`${decodeErrPrefix} indefinite length items not allowed`);
690327
690276
  }
@@ -748186,37 +748135,6 @@ function bytesToHex6(bytes7) {
748186
748135
  }
748187
748136
  return hex4;
748188
748137
  }
748189
- var asciis5 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
748190
- function asciiToBase165(ch) {
748191
- if (ch >= asciis5._0 && ch <= asciis5._9)
748192
- return ch - asciis5._0;
748193
- if (ch >= asciis5.A && ch <= asciis5.F)
748194
- return ch - (asciis5.A - 10);
748195
- if (ch >= asciis5.a && ch <= asciis5.f)
748196
- return ch - (asciis5.a - 10);
748197
- return;
748198
- }
748199
- function hexToBytes6(hex4) {
748200
- if (typeof hex4 !== "string")
748201
- throw new Error("hex string expected, got " + typeof hex4);
748202
- if (hasHexBuiltin)
748203
- return Uint8Array.fromHex(hex4);
748204
- const hl = hex4.length;
748205
- const al = hl / 2;
748206
- if (hl % 2)
748207
- throw new Error("hex string expected, got unpadded hex of length " + hl);
748208
- const array5 = new Uint8Array(al);
748209
- for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
748210
- const n1 = asciiToBase165(hex4.charCodeAt(hi));
748211
- const n210 = asciiToBase165(hex4.charCodeAt(hi + 1));
748212
- if (n1 === void 0 || n210 === void 0) {
748213
- const char = hex4[hi] + hex4[hi + 1];
748214
- throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
748215
- }
748216
- array5[ai] = n1 * 16 + n210;
748217
- }
748218
- return array5;
748219
- }
748220
748138
  function utf8ToBytes10(str) {
748221
748139
  if (typeof str !== "string")
748222
748140
  throw new Error("string expected");
@@ -748390,24 +748308,6 @@ var SHA256_IV4 = /* @__PURE__ */ Uint32Array.from([
748390
748308
  528734635,
748391
748309
  1541459225
748392
748310
  ]);
748393
- var SHA384_IV = /* @__PURE__ */ Uint32Array.from([
748394
- 3418070365,
748395
- 3238371032,
748396
- 1654270250,
748397
- 914150663,
748398
- 2438529370,
748399
- 812702999,
748400
- 355462360,
748401
- 4144912697,
748402
- 1731405415,
748403
- 4290775857,
748404
- 2394180231,
748405
- 1750603025,
748406
- 3675008525,
748407
- 1694076839,
748408
- 1203062813,
748409
- 3204075428
748410
- ]);
748411
748311
  var SHA512_IV = /* @__PURE__ */ Uint32Array.from([
748412
748312
  1779033703,
748413
748313
  4089235720,
@@ -748799,30 +748699,8 @@ var SHA5124 = class extends HashMD4 {
748799
748699
  this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
748800
748700
  }
748801
748701
  };
748802
- var SHA384 = class extends SHA5124 {
748803
- constructor() {
748804
- super(48);
748805
- this.Ah = SHA384_IV[0] | 0;
748806
- this.Al = SHA384_IV[1] | 0;
748807
- this.Bh = SHA384_IV[2] | 0;
748808
- this.Bl = SHA384_IV[3] | 0;
748809
- this.Ch = SHA384_IV[4] | 0;
748810
- this.Cl = SHA384_IV[5] | 0;
748811
- this.Dh = SHA384_IV[6] | 0;
748812
- this.Dl = SHA384_IV[7] | 0;
748813
- this.Eh = SHA384_IV[8] | 0;
748814
- this.El = SHA384_IV[9] | 0;
748815
- this.Fh = SHA384_IV[10] | 0;
748816
- this.Fl = SHA384_IV[11] | 0;
748817
- this.Gh = SHA384_IV[12] | 0;
748818
- this.Gl = SHA384_IV[13] | 0;
748819
- this.Hh = SHA384_IV[14] | 0;
748820
- this.Hl = SHA384_IV[15] | 0;
748821
- }
748822
- };
748823
748702
  var sha2569 = /* @__PURE__ */ createHasher(() => new SHA2565());
748824
748703
  var sha5128 = /* @__PURE__ */ createHasher(() => new SHA5124());
748825
- var sha384 = /* @__PURE__ */ createHasher(() => new SHA384());
748826
748704
 
748827
748705
  // ../../node_modules/.pnpm/@noble+curves@1.9.0/node_modules/@noble/curves/esm/abstract/utils.js
748828
748706
  var _0n22 = /* @__PURE__ */ BigInt(0);
@@ -748862,17 +748740,17 @@ function bytesToHex7(bytes7) {
748862
748740
  }
748863
748741
  return hex4;
748864
748742
  }
748865
- var asciis6 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
748866
- function asciiToBase166(ch) {
748867
- if (ch >= asciis6._0 && ch <= asciis6._9)
748868
- return ch - asciis6._0;
748869
- if (ch >= asciis6.A && ch <= asciis6.F)
748870
- return ch - (asciis6.A - 10);
748871
- if (ch >= asciis6.a && ch <= asciis6.f)
748872
- return ch - (asciis6.a - 10);
748743
+ var asciis5 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
748744
+ function asciiToBase165(ch) {
748745
+ if (ch >= asciis5._0 && ch <= asciis5._9)
748746
+ return ch - asciis5._0;
748747
+ if (ch >= asciis5.A && ch <= asciis5.F)
748748
+ return ch - (asciis5.A - 10);
748749
+ if (ch >= asciis5.a && ch <= asciis5.f)
748750
+ return ch - (asciis5.a - 10);
748873
748751
  return;
748874
748752
  }
748875
- function hexToBytes7(hex4) {
748753
+ function hexToBytes6(hex4) {
748876
748754
  if (typeof hex4 !== "string")
748877
748755
  throw new Error("hex string expected, got " + typeof hex4);
748878
748756
  if (hasHexBuiltin2)
@@ -748883,8 +748761,8 @@ function hexToBytes7(hex4) {
748883
748761
  throw new Error("hex string expected, got unpadded hex of length " + hl);
748884
748762
  const array5 = new Uint8Array(al);
748885
748763
  for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
748886
- const n1 = asciiToBase166(hex4.charCodeAt(hi));
748887
- const n210 = asciiToBase166(hex4.charCodeAt(hi + 1));
748764
+ const n1 = asciiToBase165(hex4.charCodeAt(hi));
748765
+ const n210 = asciiToBase165(hex4.charCodeAt(hi + 1));
748888
748766
  if (n1 === void 0 || n210 === void 0) {
748889
748767
  const char = hex4[hi] + hex4[hi + 1];
748890
748768
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -748901,7 +748779,7 @@ function bytesToNumberLE4(bytes7) {
748901
748779
  return hexToNumber4(bytesToHex7(Uint8Array.from(bytes7).reverse()));
748902
748780
  }
748903
748781
  function numberToBytesBE4(n44, len) {
748904
- return hexToBytes7(n44.toString(16).padStart(len * 2, "0"));
748782
+ return hexToBytes6(n44.toString(16).padStart(len * 2, "0"));
748905
748783
  }
748906
748784
  function numberToBytesLE4(n44, len) {
748907
748785
  return numberToBytesBE4(n44, len).reverse();
@@ -748910,7 +748788,7 @@ function ensureBytes4(title, hex4, expectedLength) {
748910
748788
  let res;
748911
748789
  if (typeof hex4 === "string") {
748912
748790
  try {
748913
- res = hexToBytes7(hex4);
748791
+ res = hexToBytes6(hex4);
748914
748792
  } catch (e34) {
748915
748793
  throw new Error(title + " must be hex string or Uint8Array, cause: " + e34);
748916
748794
  }
@@ -751491,14 +751369,14 @@ function weierstrass4(curveDef) {
751491
751369
  }
751492
751370
  // DER-encoded
751493
751371
  toDERRawBytes() {
751494
- return hexToBytes7(this.toDERHex());
751372
+ return hexToBytes6(this.toDERHex());
751495
751373
  }
751496
751374
  toDERHex() {
751497
751375
  return DER4.hexFromSig(this);
751498
751376
  }
751499
751377
  // padded bytes of r, then padded bytes of s
751500
751378
  toCompactRawBytes() {
751501
- return hexToBytes7(this.toCompactHex());
751379
+ return hexToBytes6(this.toCompactHex());
751502
751380
  }
751503
751381
  toCompactHex() {
751504
751382
  return numToNByteHex(this.r) + numToNByteHex(this.s);
@@ -769199,7 +769077,7 @@ var SHA512_256 = class extends SHA5125 {
769199
769077
  this.outputLen = 32;
769200
769078
  }
769201
769079
  };
769202
- var SHA3842 = class extends SHA5125 {
769080
+ var SHA384 = class extends SHA5125 {
769203
769081
  constructor() {
769204
769082
  super();
769205
769083
  this.Ah = 3418070365 | 0;
@@ -769224,7 +769102,7 @@ var SHA3842 = class extends SHA5125 {
769224
769102
  var sha5129 = wrapConstructor6(() => new SHA5125());
769225
769103
  var sha512_224 = wrapConstructor6(() => new SHA512_224());
769226
769104
  var sha512_256 = wrapConstructor6(() => new SHA512_256());
769227
- var sha3842 = wrapConstructor6(() => new SHA3842());
769105
+ var sha384 = wrapConstructor6(() => new SHA384());
769228
769106
 
769229
769107
  // ../../node_modules/.pnpm/@noble+secp256k1@1.7.1/node_modules/@noble/secp256k1/lib/esm/index.js
769230
769108
  var nodeCrypto2 = __toESM(require("crypto"), 1);
@@ -769589,7 +769467,7 @@ var Point7 = class _Point {
769589
769467
  return Q6;
769590
769468
  }
769591
769469
  toRawBytes(isCompressed2 = false) {
769592
- return hexToBytes9(this.toHex(isCompressed2));
769470
+ return hexToBytes8(this.toHex(isCompressed2));
769593
769471
  }
769594
769472
  toHex(isCompressed2 = false) {
769595
769473
  const x26 = numTo32bStr(this.x);
@@ -769695,7 +769573,7 @@ var Signature3 = class _Signature {
769695
769573
  const arr = hex4 instanceof Uint8Array;
769696
769574
  if (typeof hex4 !== "string" && !arr)
769697
769575
  throw new TypeError(`Signature.fromDER: Expected string or Uint8Array`);
769698
- const { r: r37, s: s58 } = parseDERSignature(arr ? hex4 : hexToBytes9(hex4));
769576
+ const { r: r37, s: s58 } = parseDERSignature(arr ? hex4 : hexToBytes8(hex4));
769699
769577
  return new _Signature(r37, s58);
769700
769578
  }
769701
769579
  static fromHex(hex4) {
@@ -769716,7 +769594,7 @@ var Signature3 = class _Signature {
769716
769594
  return this.hasHighS() ? new _Signature(this.r, mod6(-this.s, CURVE.n)) : this;
769717
769595
  }
769718
769596
  toDERRawBytes() {
769719
- return hexToBytes9(this.toDERHex());
769597
+ return hexToBytes8(this.toDERHex());
769720
769598
  }
769721
769599
  toDERHex() {
769722
769600
  const sHex = sliceDER(numberToHexUnpadded5(this.s));
@@ -769735,7 +769613,7 @@ var Signature3 = class _Signature {
769735
769613
  return this.toDERHex();
769736
769614
  }
769737
769615
  toCompactRawBytes() {
769738
- return hexToBytes9(this.toCompactHex());
769616
+ return hexToBytes8(this.toCompactHex());
769739
769617
  }
769740
769618
  toCompactHex() {
769741
769619
  return numTo32bStr(this.r) + numTo32bStr(this.s);
@@ -769774,7 +769652,7 @@ function numTo32bStr(num) {
769774
769652
  return num.toString(16).padStart(64, "0");
769775
769653
  }
769776
769654
  function numTo32b(num) {
769777
- const b21 = hexToBytes9(numTo32bStr(num));
769655
+ const b21 = hexToBytes8(numTo32bStr(num));
769778
769656
  if (b21.length !== 32)
769779
769657
  throw new Error("Error: expected 32 bytes");
769780
769658
  return b21;
@@ -769789,7 +769667,7 @@ function hexToNumber5(hex4) {
769789
769667
  }
769790
769668
  return BigInt(`0x${hex4}`);
769791
769669
  }
769792
- function hexToBytes9(hex4) {
769670
+ function hexToBytes8(hex4) {
769793
769671
  if (typeof hex4 !== "string") {
769794
769672
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
769795
769673
  }
@@ -769810,7 +769688,7 @@ function bytesToNumber2(bytes7) {
769810
769688
  return hexToNumber5(bytesToHex9(bytes7));
769811
769689
  }
769812
769690
  function ensureBytes5(hex4) {
769813
- return hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes9(hex4);
769691
+ return hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes8(hex4);
769814
769692
  }
769815
769693
  function normalizeScalar(num) {
769816
769694
  if (typeof num === "number" && Number.isSafeInteger(num) && num > 0)
@@ -770094,7 +769972,7 @@ var crypto32 = {
770094
769972
  var TAGGED_HASH_PREFIXES = {};
770095
769973
  var utils3 = {
770096
769974
  bytesToHex: bytesToHex9,
770097
- hexToBytes: hexToBytes9,
769975
+ hexToBytes: hexToBytes8,
770098
769976
  concatBytes: concatBytes10,
770099
769977
  mod: mod6,
770100
769978
  invert: invert5,
@@ -770221,7 +770099,7 @@ init_esm4();
770221
770099
  var import_c32check2 = __toESM(require_lib59());
770222
770100
  init_esm4();
770223
770101
  function createMessageSignature(signature4) {
770224
- const length2 = hexToBytes8(signature4).byteLength;
770102
+ const length2 = hexToBytes7(signature4).byteLength;
770225
770103
  if (length2 != RECOVERABLE_ECDSA_SIG_LENGTH_BYTES) {
770226
770104
  throw Error("Invalid signature");
770227
770105
  }
@@ -770589,14 +770467,14 @@ utils3.hmacSha256Sync = (key2, ...msgs) => {
770589
770467
  function getAddressFromPublicKey(publicKey3, transactionVersion = TransactionVersion2.Mainnet) {
770590
770468
  publicKey3 = typeof publicKey3 === "string" ? publicKey3 : bytesToHex8(publicKey3);
770591
770469
  const addrVer = addressHashModeToVersion(AddressHashMode.SerializeP2PKH, transactionVersion);
770592
- const addr = addressFromVersionHash(addrVer, hashP2PKH(hexToBytes8(publicKey3)));
770470
+ const addr = addressFromVersionHash(addrVer, hashP2PKH(hexToBytes7(publicKey3)));
770593
770471
  const addrString = addressToString(addr);
770594
770472
  return addrString;
770595
770473
  }
770596
770474
  function createStacksPublicKey(key2) {
770597
770475
  return {
770598
770476
  type: StacksMessageType.PublicKey,
770599
- data: hexToBytes8(key2)
770477
+ data: hexToBytes7(key2)
770600
770478
  };
770601
770479
  }
770602
770480
  function publicKeyFromSignatureVrs(messageHash, messageSignature, pubKeyEncoding = PubKeyEncoding.Compressed) {
@@ -770709,13 +770587,13 @@ function serializePayload(payload) {
770709
770587
  bytesArray.push(payload.vrfProof);
770710
770588
  break;
770711
770589
  case PayloadType.TenureChange:
770712
- bytesArray.push(hexToBytes8(payload.tenureHash));
770713
- bytesArray.push(hexToBytes8(payload.previousTenureHash));
770714
- bytesArray.push(hexToBytes8(payload.burnViewHash));
770715
- bytesArray.push(hexToBytes8(payload.previousTenureEnd));
770590
+ bytesArray.push(hexToBytes7(payload.tenureHash));
770591
+ bytesArray.push(hexToBytes7(payload.previousTenureHash));
770592
+ bytesArray.push(hexToBytes7(payload.burnViewHash));
770593
+ bytesArray.push(hexToBytes7(payload.previousTenureEnd));
770716
770594
  bytesArray.push(writeUInt32BE(new Uint8Array(4), payload.previousTenureBlocks));
770717
770595
  bytesArray.push(writeUInt8(new Uint8Array(1), payload.cause));
770718
- bytesArray.push(hexToBytes8(payload.publicKeyHash));
770596
+ bytesArray.push(hexToBytes7(payload.publicKeyHash));
770719
770597
  break;
770720
770598
  }
770721
770599
  return concatArray(bytesArray);
@@ -770775,7 +770653,7 @@ function createTransactionAuthField(pubKeyEncoding, contents) {
770775
770653
  };
770776
770654
  }
770777
770655
  function serializeMessageSignature(messageSignature) {
770778
- return hexToBytes8(messageSignature.data);
770656
+ return hexToBytes7(messageSignature.data);
770779
770657
  }
770780
770658
  function serializeTransactionAuthField(field) {
770781
770659
  const bytesArray = [];
@@ -770855,8 +770733,8 @@ function addressFromPublicKeys(version33, hashMode, numSigs, publicKeys) {
770855
770733
  }
770856
770734
  function serializeAddress(address4) {
770857
770735
  const bytesArray = [];
770858
- bytesArray.push(hexToBytes8(intToHex(address4.version, 1)));
770859
- bytesArray.push(hexToBytes8(address4.hash160));
770736
+ bytesArray.push(hexToBytes7(intToHex(address4.version, 1)));
770737
+ bytesArray.push(hexToBytes7(address4.hash160));
770860
770738
  return concatArray(bytesArray);
770861
770739
  }
770862
770740
  function deserializeAddress(bytesReader) {
@@ -770877,7 +770755,7 @@ function serializeLPString(lps) {
770877
770755
  const bytesArray = [];
770878
770756
  const contentBytes = utf8ToBytes11(lps.content);
770879
770757
  const length2 = contentBytes.byteLength;
770880
- bytesArray.push(hexToBytes8(intToHex(length2, lps.lengthPrefixBytes)));
770758
+ bytesArray.push(hexToBytes7(intToHex(length2, lps.lengthPrefixBytes)));
770881
770759
  bytesArray.push(contentBytes);
770882
770760
  return concatArray(bytesArray);
770883
770761
  }
@@ -770897,7 +770775,7 @@ function serializeMemoString(memoString) {
770897
770775
  const bytesArray = [];
770898
770776
  const contentBytes = utf8ToBytes11(memoString.content);
770899
770777
  const paddedContent = rightPadHexToLength(bytesToHex8(contentBytes), MEMO_MAX_LENGTH_BYTES * 2);
770900
- bytesArray.push(hexToBytes8(paddedContent));
770778
+ bytesArray.push(hexToBytes7(paddedContent));
770901
770779
  return concatArray(bytesArray);
770902
770780
  }
770903
770781
  function serializeAssetInfo(info6) {
@@ -770917,7 +770795,7 @@ function createLPList(values, lengthPrefixBytes) {
770917
770795
  function serializeLPList(lpList) {
770918
770796
  const list2 = lpList.values;
770919
770797
  const bytesArray = [];
770920
- bytesArray.push(hexToBytes8(intToHex(list2.length, lpList.lengthPrefixBytes)));
770798
+ bytesArray.push(hexToBytes7(intToHex(list2.length, lpList.lengthPrefixBytes)));
770921
770799
  for (const l69 of list2) {
770922
770800
  bytesArray.push(serializeStacksMessage(l69));
770923
770801
  }
@@ -771122,7 +771000,7 @@ function deserializeCV(serializedClarityValue) {
771122
771000
  let bytesReader;
771123
771001
  if (typeof serializedClarityValue === "string") {
771124
771002
  const hasHexPrefix = serializedClarityValue.slice(0, 2).toLowerCase() === "0x";
771125
- bytesReader = new BytesReader(hexToBytes8(hasHexPrefix ? serializedClarityValue.slice(2) : serializedClarityValue));
771003
+ bytesReader = new BytesReader(hexToBytes7(hasHexPrefix ? serializedClarityValue.slice(2) : serializedClarityValue));
771126
771004
  } else if (serializedClarityValue instanceof Uint8Array) {
771127
771005
  bytesReader = new BytesReader(serializedClarityValue);
771128
771006
  } else {
@@ -771312,7 +771190,7 @@ function clearCondition(condition) {
771312
771190
  function serializeSingleSigSpendingCondition(condition) {
771313
771191
  const bytesArray = [
771314
771192
  condition.hashMode,
771315
- hexToBytes8(condition.signer),
771193
+ hexToBytes7(condition.signer),
771316
771194
  intToBytes(condition.nonce, false, 8),
771317
771195
  intToBytes(condition.fee, false, 8),
771318
771196
  condition.keyEncoding,
@@ -771323,7 +771201,7 @@ function serializeSingleSigSpendingCondition(condition) {
771323
771201
  function serializeMultiSigSpendingCondition(condition) {
771324
771202
  const bytesArray = [
771325
771203
  condition.hashMode,
771326
- hexToBytes8(condition.signer),
771204
+ hexToBytes7(condition.signer),
771327
771205
  intToBytes(condition.nonce, false, 8),
771328
771206
  intToBytes(condition.fee, false, 8)
771329
771207
  ];
@@ -771343,16 +771221,16 @@ function serializeSpendingCondition(condition) {
771343
771221
  function makeSigHashPreSign(curSigHash, authType, fee, nonce) {
771344
771222
  const hashLength = 32 + 1 + 8 + 8;
771345
771223
  const sigHash = curSigHash + bytesToHex8(new Uint8Array([authType])) + bytesToHex8(intToBytes(fee, false, 8)) + bytesToHex8(intToBytes(nonce, false, 8));
771346
- if (hexToBytes8(sigHash).byteLength !== hashLength) {
771224
+ if (hexToBytes7(sigHash).byteLength !== hashLength) {
771347
771225
  throw Error("Invalid signature hash length");
771348
771226
  }
771349
- return txidFromData(hexToBytes8(sigHash));
771227
+ return txidFromData(hexToBytes7(sigHash));
771350
771228
  }
771351
771229
  function makeSigHashPostSign(curSigHash, pubKey, signature4) {
771352
771230
  const hashLength = 32 + 1 + RECOVERABLE_ECDSA_SIG_LENGTH_BYTES;
771353
771231
  const pubKeyEncoding = isCompressed(pubKey) ? PubKeyEncoding.Compressed : PubKeyEncoding.Uncompressed;
771354
771232
  const sigHash = curSigHash + leftPadHex(pubKeyEncoding.toString(16)) + signature4.data;
771355
- const sigHashBytes = hexToBytes8(sigHash);
771233
+ const sigHashBytes = hexToBytes7(sigHash);
771356
771234
  if (sigHashBytes.byteLength > hashLength) {
771357
771235
  throw Error("Invalid signature hash length");
771358
771236
  }
@@ -807445,13 +807323,11 @@ var fetcher = (url4, options22, retry6 = 3) => {
807445
807323
  };
807446
807324
  async function withApi2(execute2) {
807447
807325
  const url4 = config_default9.getCoinConfig().node.url;
807448
- if (!apiMap[url4]) {
807449
- const transport = new SuiHTTPTransport({
807450
- url: url4,
807451
- fetch: fetcher
807452
- });
807453
- apiMap[url4] = new SuiClient({ transport });
807454
- }
807326
+ const transport = new SuiHTTPTransport({
807327
+ url: url4,
807328
+ fetch: fetcher
807329
+ });
807330
+ apiMap[url4] ??= new SuiClient({ transport });
807455
807331
  const result2 = await execute2(apiMap[url4]);
807456
807332
  return result2;
807457
807333
  }
@@ -807555,11 +807431,35 @@ function transactionToOperation3(accountId2, address4, transaction) {
807555
807431
  };
807556
807432
  }
807557
807433
  var getOperations5 = async (accountId2, addr, cursor) => withApi2(async (api7) => {
807558
- const sentOps = await loadOperations({ api: api7, addr, type: "OUT", cursor });
807559
- const receivedOps = await loadOperations({ api: api7, addr, type: "IN", cursor });
807560
- const rawTransactions = [...sentOps, ...receivedOps].sort((a72, b21) => Number(b21.timestampMs) - Number(a72.timestampMs));
807434
+ const sentOps = await loadOperations({
807435
+ api: api7,
807436
+ addr,
807437
+ type: "OUT",
807438
+ cursor,
807439
+ order: cursor ? "ascending" : "descending",
807440
+ operations: []
807441
+ });
807442
+ const receivedOps = await loadOperations({
807443
+ api: api7,
807444
+ addr,
807445
+ type: "IN",
807446
+ cursor,
807447
+ order: cursor ? "ascending" : "descending",
807448
+ operations: []
807449
+ });
807450
+ const rawTransactions = filterOperations(sentOps, receivedOps, cursor);
807561
807451
  return rawTransactions.map((transaction) => transactionToOperation3(accountId2, addr, transaction));
807562
807452
  });
807453
+ var filterOperations = (operationList1, operationList2, cursor) => {
807454
+ let filterTimestamp = 0;
807455
+ if (!cursor && operationList1.length && operationList2.length && (operationList1.length === TRANSACTIONS_LIMIT || operationList2.length === TRANSACTIONS_LIMIT)) {
807456
+ const aTime = operationList1[operationList1.length - 1].timestampMs ?? 0;
807457
+ const bTime = operationList2[operationList2.length - 1].timestampMs ?? 0;
807458
+ filterTimestamp = Math.max(Number(aTime), Number(bTime));
807459
+ }
807460
+ const result2 = [...operationList1, ...operationList2].sort((a72, b21) => Number(b21.timestampMs) - Number(a72.timestampMs)).filter((op) => Number(op.timestampMs) >= filterTimestamp);
807461
+ return (0, import_unionBy.default)(result2, (tx) => tx.digest);
807462
+ };
807563
807463
  var getTotalGasUsed = (effects) => {
807564
807464
  const gasSummary = effects?.gasUsed;
807565
807465
  if (!gasSummary)
@@ -807627,43 +807527,40 @@ var createTransaction24 = async (address4, transaction) => withApi2(async (api7)
807627
807527
  var executeTransactionBlock = async (params) => withApi2(async (api7) => {
807628
807528
  return api7.executeTransactionBlock(params);
807629
807529
  });
807630
- var loadOperations = async (params) => {
807631
- const operations2 = [];
807632
- let currentCursor = params.cursor;
807633
- while (operations2.length < TRANSACTIONS_LIMIT) {
807634
- try {
807635
- const { data: data6, nextCursor, hasNextPage } = await queryTransactions({
807636
- ...params,
807637
- cursor: currentCursor
807530
+ var loadOperations = async ({ cursor, operations: operations2, order, ...params }) => {
807531
+ try {
807532
+ if (order === "descending" && operations2.length >= TRANSACTIONS_LIMIT) {
807533
+ return operations2;
807534
+ }
807535
+ const { data: data6, nextCursor, hasNextPage } = await queryTransactions({
807536
+ ...params,
807537
+ order,
807538
+ cursor
807539
+ });
807540
+ operations2.push(...data6);
807541
+ if (!hasNextPage) {
807542
+ return operations2;
807543
+ }
807544
+ await loadOperations({ ...params, cursor: nextCursor, operations: operations2, order });
807545
+ } catch (error) {
807546
+ if (error.type === "InvalidParams") {
807547
+ log2("coin:sui", "(network/sdk): loadOperations failed with cursor, retrying without it", {
807548
+ error,
807549
+ params
807638
807550
  });
807639
- operations2.push(...data6);
807640
- if (data6.length < TRANSACTIONS_LIMIT_PER_QUERY || !hasNextPage) {
807641
- break;
807642
- }
807643
- currentCursor = nextCursor;
807644
- } catch (error) {
807645
- if (error.type === "InvalidParams") {
807646
- log2("coin:sui", "(network/sdk): loadOperations failed with cursor, retrying without it", {
807647
- error,
807648
- params
807649
- });
807650
- currentCursor = null;
807651
- continue;
807652
- } else {
807653
- log2("coin:sui", "(network/sdk): loadOperations error", { error, params });
807654
- break;
807655
- }
807551
+ } else {
807552
+ log2("coin:sui", "(network/sdk): loadOperations error", { error, params });
807656
807553
  }
807657
807554
  }
807658
807555
  return operations2;
807659
807556
  };
807660
807557
  var queryTransactions = async (params) => {
807661
- const { api: api7, addr, type: type4, cursor } = params;
807558
+ const { api: api7, addr, type: type4, cursor, order } = params;
807662
807559
  const filter26 = type4 === "IN" ? { ToAddress: addr } : { FromAddress: addr };
807663
807560
  return await api7.queryTransactionBlocks({
807664
807561
  filter: filter26,
807665
807562
  cursor,
807666
- order: "descending",
807563
+ order,
807667
807564
  options: {
807668
807565
  showInput: true,
807669
807566
  showBalanceChanges: true,
@@ -807923,7 +807820,7 @@ var import_rxjs148 = require("rxjs");
807923
807820
  init_lib_es2();
807924
807821
  var PRELOAD_MAX_AGE8 = 30 * 60 * 1e3;
807925
807822
  var currentPreloadedData3 = {};
807926
- function fromHydratePreloadData5(_data3) {
807823
+ function fromHydratePreloadData5(_data2) {
807927
807824
  return {};
807928
807825
  }
807929
807826
  var updates6 = new import_rxjs148.Subject();
@@ -808051,55 +807948,6 @@ var SIGNATURE_FLAG_TO_SCHEME = {
808051
807948
  6: "Passkey"
808052
807949
  };
808053
807950
 
808054
- // ../../node_modules/.pnpm/@noble+curves@1.9.0/node_modules/@noble/curves/esm/nist.js
808055
- var Fp256 = Field4(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"));
808056
- var p256_a = Fp256.create(BigInt("-3"));
808057
- var p256_b = BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b");
808058
- var p256 = createCurve4({
808059
- a: p256_a,
808060
- b: p256_b,
808061
- Fp: Fp256,
808062
- n: BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),
808063
- Gx: BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),
808064
- Gy: BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),
808065
- h: BigInt(1),
808066
- lowS: false
808067
- }, sha2569);
808068
- var Fp384 = Field4(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"));
808069
- var p384_a = Fp384.create(BigInt("-3"));
808070
- var p384_b = BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");
808071
- var p384 = createCurve4({
808072
- a: p384_a,
808073
- b: p384_b,
808074
- Fp: Fp384,
808075
- n: BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),
808076
- Gx: BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),
808077
- Gy: BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),
808078
- h: BigInt(1),
808079
- lowS: false
808080
- }, sha384);
808081
- var Fp521 = Field4(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));
808082
- var p521_a = Fp521.create(BigInt("-3"));
808083
- var p521_b = BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");
808084
- var p521 = createCurve4({
808085
- a: p521_a,
808086
- b: p521_b,
808087
- Fp: Fp521,
808088
- n: BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),
808089
- Gx: BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),
808090
- Gy: BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),
808091
- h: BigInt(1),
808092
- lowS: false,
808093
- allowedPrivateKeyLengths: [130, 131, 132]
808094
- // P521 keys are variable-length. Normalize to 132b
808095
- }, sha5128);
808096
-
808097
- // ../../node_modules/.pnpm/@noble+curves@1.9.0/node_modules/@noble/curves/esm/p256.js
808098
- var secp256r1 = p256;
808099
-
808100
- // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
808101
- var sha25612 = sha2569;
808102
-
808103
807951
  // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/cryptography/publickey.js
808104
807952
  function bytesEqual2(a72, b21) {
808105
807953
  if (a72 === b21)
@@ -808210,1470 +808058,6 @@ function parseSerializedKeypairSignature(serializedSignature) {
808210
808058
  }
808211
808059
  }
808212
808060
 
808213
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/keypairs/passkey/publickey.js
808214
- var PASSKEY_PUBLIC_KEY_SIZE = 33;
808215
- var PASSKEY_SIGNATURE_SIZE = 64;
808216
- var SECP256R1_SPKI_HEADER = new Uint8Array([
808217
- 48,
808218
- 89,
808219
- // SEQUENCE, length 89
808220
- 48,
808221
- 19,
808222
- // SEQUENCE, length 19
808223
- 6,
808224
- 7,
808225
- // OID, length 7
808226
- 42,
808227
- 134,
808228
- 72,
808229
- 206,
808230
- 61,
808231
- 2,
808232
- 1,
808233
- // OID: 1.2.840.10045.2.1 (ecPublicKey)
808234
- 6,
808235
- 8,
808236
- // OID, length 8
808237
- 42,
808238
- 134,
808239
- 72,
808240
- 206,
808241
- 61,
808242
- 3,
808243
- 1,
808244
- 7,
808245
- // OID: 1.2.840.10045.3.1.7 (prime256v1/secp256r1)
808246
- 3,
808247
- 66,
808248
- // BIT STRING, length 66
808249
- 0
808250
- // no unused bits
808251
- ]);
808252
- var PasskeyPublicKey = class extends PublicKey10 {
808253
- /**
808254
- * Create a new PasskeyPublicKey object
808255
- * @param value passkey public key as buffer or base-64 encoded string
808256
- */
808257
- constructor(value5) {
808258
- super();
808259
- if (typeof value5 === "string") {
808260
- this.data = fromBase64(value5);
808261
- } else if (value5 instanceof Uint8Array) {
808262
- this.data = value5;
808263
- } else {
808264
- this.data = Uint8Array.from(value5);
808265
- }
808266
- if (this.data.length !== PASSKEY_PUBLIC_KEY_SIZE) {
808267
- throw new Error(
808268
- `Invalid public key input. Expected ${PASSKEY_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`
808269
- );
808270
- }
808271
- }
808272
- /**
808273
- * Checks if two passkey public keys are equal
808274
- */
808275
- equals(publicKey3) {
808276
- return super.equals(publicKey3);
808277
- }
808278
- /**
808279
- * Return the byte array representation of the Secp256r1 public key
808280
- */
808281
- toRawBytes() {
808282
- return this.data;
808283
- }
808284
- /**
808285
- * Return the Sui address associated with this Secp256r1 public key
808286
- */
808287
- flag() {
808288
- return SIGNATURE_SCHEME_TO_FLAG["Passkey"];
808289
- }
808290
- /**
808291
- * Verifies that the signature is valid for for the provided message
808292
- */
808293
- async verify(message2, signature4) {
808294
- const parsed2 = parseSerializedPasskeySignature(signature4);
808295
- const clientDataJSON = JSON.parse(parsed2.clientDataJson);
808296
- if (clientDataJSON.type !== "webauthn.get") {
808297
- return false;
808298
- }
808299
- const parsedChallenge = fromBase64(
808300
- clientDataJSON.challenge.replace(/-/g, "+").replace(/_/g, "/")
808301
- );
808302
- if (!bytesEqual2(message2, parsedChallenge)) {
808303
- return false;
808304
- }
808305
- const pk = parsed2.userSignature.slice(1 + PASSKEY_SIGNATURE_SIZE);
808306
- if (!bytesEqual2(this.toRawBytes(), pk)) {
808307
- return false;
808308
- }
808309
- const payload = new Uint8Array([...parsed2.authenticatorData, ...sha25612(parsed2.clientDataJson)]);
808310
- const sig2 = parsed2.userSignature.slice(1, PASSKEY_SIGNATURE_SIZE + 1);
808311
- return secp256r1.verify(sig2, sha25612(payload), pk);
808312
- }
808313
- };
808314
- PasskeyPublicKey.SIZE = PASSKEY_PUBLIC_KEY_SIZE;
808315
- function parseSerializedPasskeySignature(signature4) {
808316
- const bytes7 = typeof signature4 === "string" ? fromBase64(signature4) : signature4;
808317
- if (bytes7[0] !== SIGNATURE_SCHEME_TO_FLAG.Passkey) {
808318
- throw new Error("Invalid signature scheme");
808319
- }
808320
- const dec = PasskeyAuthenticator.parse(bytes7.slice(1));
808321
- return {
808322
- signatureScheme: "Passkey",
808323
- serializedSignature: toBase64(bytes7),
808324
- signature: bytes7,
808325
- authenticatorData: dec.authenticatorData,
808326
- clientDataJson: dec.clientDataJson,
808327
- userSignature: new Uint8Array(dec.userSignature),
808328
- publicKey: new Uint8Array(dec.userSignature.slice(1 + PASSKEY_SIGNATURE_SIZE))
808329
- };
808330
- }
808331
-
808332
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/graphql/generated/queries.js
808333
- var ZkLoginIntentScope = /* @__PURE__ */ ((ZkLoginIntentScope2) => {
808334
- ZkLoginIntentScope2["PersonalMessage"] = "PERSONAL_MESSAGE";
808335
- ZkLoginIntentScope2["TransactionData"] = "TRANSACTION_DATA";
808336
- return ZkLoginIntentScope2;
808337
- })(ZkLoginIntentScope || {});
808338
- var TypedDocumentString = class extends String {
808339
- constructor(value5, __meta__) {
808340
- super(value5);
808341
- this.value = value5;
808342
- this.__meta__ = __meta__;
808343
- }
808344
- toString() {
808345
- return this.value;
808346
- }
808347
- };
808348
- var Object_Owner_FieldsFragmentDoc = new TypedDocumentString(`
808349
- fragment OBJECT_OWNER_FIELDS on ObjectOwner {
808350
- __typename
808351
- ... on AddressOwner {
808352
- owner {
808353
- asObject {
808354
- address
808355
- }
808356
- asAddress {
808357
- address
808358
- }
808359
- }
808360
- }
808361
- ... on Parent {
808362
- parent {
808363
- address
808364
- }
808365
- }
808366
- ... on Shared {
808367
- initialSharedVersion
808368
- }
808369
- ... on ConsensusV2 {
808370
- authenticator {
808371
- ... on Address {
808372
- address
808373
- }
808374
- }
808375
- }
808376
- }
808377
- `, { "fragmentName": "OBJECT_OWNER_FIELDS" });
808378
- var Object_FieldsFragmentDoc = new TypedDocumentString(`
808379
- fragment OBJECT_FIELDS on Object {
808380
- address
808381
- digest
808382
- version
808383
- asMoveObject {
808384
- contents {
808385
- bcs
808386
- type {
808387
- repr
808388
- }
808389
- }
808390
- }
808391
- owner {
808392
- ...OBJECT_OWNER_FIELDS
808393
- }
808394
- }
808395
- fragment OBJECT_OWNER_FIELDS on ObjectOwner {
808396
- __typename
808397
- ... on AddressOwner {
808398
- owner {
808399
- asObject {
808400
- address
808401
- }
808402
- asAddress {
808403
- address
808404
- }
808405
- }
808406
- }
808407
- ... on Parent {
808408
- parent {
808409
- address
808410
- }
808411
- }
808412
- ... on Shared {
808413
- initialSharedVersion
808414
- }
808415
- ... on ConsensusV2 {
808416
- authenticator {
808417
- ... on Address {
808418
- address
808419
- }
808420
- }
808421
- }
808422
- }`, { "fragmentName": "OBJECT_FIELDS" });
808423
- var Move_Object_FieldsFragmentDoc = new TypedDocumentString(`
808424
- fragment MOVE_OBJECT_FIELDS on MoveObject {
808425
- address
808426
- digest
808427
- version
808428
- contents {
808429
- bcs
808430
- type {
808431
- repr
808432
- }
808433
- }
808434
- owner {
808435
- ...OBJECT_OWNER_FIELDS
808436
- }
808437
- }
808438
- fragment OBJECT_OWNER_FIELDS on ObjectOwner {
808439
- __typename
808440
- ... on AddressOwner {
808441
- owner {
808442
- asObject {
808443
- address
808444
- }
808445
- asAddress {
808446
- address
808447
- }
808448
- }
808449
- }
808450
- ... on Parent {
808451
- parent {
808452
- address
808453
- }
808454
- }
808455
- ... on Shared {
808456
- initialSharedVersion
808457
- }
808458
- ... on ConsensusV2 {
808459
- authenticator {
808460
- ... on Address {
808461
- address
808462
- }
808463
- }
808464
- }
808465
- }`, { "fragmentName": "MOVE_OBJECT_FIELDS" });
808466
- var Transaction_FieldsFragmentDoc = new TypedDocumentString(`
808467
- fragment TRANSACTION_FIELDS on TransactionBlock {
808468
- digest
808469
- bcs
808470
- signatures
808471
- effects {
808472
- bcs
808473
- epoch {
808474
- epochId
808475
- }
808476
- unchangedSharedObjects {
808477
- nodes {
808478
- __typename
808479
- ... on SharedObjectRead {
808480
- object {
808481
- asMoveObject {
808482
- address
808483
- contents {
808484
- type {
808485
- repr
808486
- }
808487
- }
808488
- }
808489
- }
808490
- }
808491
- }
808492
- }
808493
- objectChanges {
808494
- nodes {
808495
- address
808496
- inputState {
808497
- version
808498
- asMoveObject {
808499
- address
808500
- contents {
808501
- type {
808502
- repr
808503
- }
808504
- }
808505
- }
808506
- }
808507
- outputState {
808508
- asMoveObject {
808509
- address
808510
- contents {
808511
- type {
808512
- repr
808513
- }
808514
- }
808515
- }
808516
- }
808517
- }
808518
- }
808519
- }
808520
- }
808521
- `, { "fragmentName": "TRANSACTION_FIELDS" });
808522
- var GetAllBalancesDocument = new TypedDocumentString(`
808523
- query getAllBalances($owner: SuiAddress!, $limit: Int, $cursor: String) {
808524
- address(address: $owner) {
808525
- balances(first: $limit, after: $cursor) {
808526
- pageInfo {
808527
- hasNextPage
808528
- endCursor
808529
- }
808530
- nodes {
808531
- coinType {
808532
- repr
808533
- }
808534
- coinObjectCount
808535
- totalBalance
808536
- }
808537
- }
808538
- }
808539
- }
808540
- `);
808541
- var GetBalanceDocument = new TypedDocumentString(`
808542
- query getBalance($owner: SuiAddress!, $type: String = "0x2::sui::SUI") {
808543
- address(address: $owner) {
808544
- balance(type: $type) {
808545
- coinType {
808546
- repr
808547
- }
808548
- coinObjectCount
808549
- totalBalance
808550
- }
808551
- }
808552
- }
808553
- `);
808554
- var GetCoinsDocument = new TypedDocumentString(`
808555
- query getCoins($owner: SuiAddress!, $first: Int, $cursor: String, $type: String = "0x2::sui::SUI") {
808556
- address(address: $owner) {
808557
- address
808558
- coins(first: $first, after: $cursor, type: $type) {
808559
- pageInfo {
808560
- hasNextPage
808561
- endCursor
808562
- }
808563
- nodes {
808564
- coinBalance
808565
- owner {
808566
- ...OBJECT_OWNER_FIELDS
808567
- }
808568
- contents {
808569
- bcs
808570
- type {
808571
- repr
808572
- }
808573
- }
808574
- address
808575
- version
808576
- digest
808577
- }
808578
- }
808579
- }
808580
- }
808581
- fragment OBJECT_OWNER_FIELDS on ObjectOwner {
808582
- __typename
808583
- ... on AddressOwner {
808584
- owner {
808585
- asObject {
808586
- address
808587
- }
808588
- asAddress {
808589
- address
808590
- }
808591
- }
808592
- }
808593
- ... on Parent {
808594
- parent {
808595
- address
808596
- }
808597
- }
808598
- ... on Shared {
808599
- initialSharedVersion
808600
- }
808601
- ... on ConsensusV2 {
808602
- authenticator {
808603
- ... on Address {
808604
- address
808605
- }
808606
- }
808607
- }
808608
- }`);
808609
- var GetDynamicFieldsDocument = new TypedDocumentString(`
808610
- query getDynamicFields($parentId: SuiAddress!, $first: Int, $cursor: String) {
808611
- owner(address: $parentId) {
808612
- dynamicFields(first: $first, after: $cursor) {
808613
- pageInfo {
808614
- hasNextPage
808615
- endCursor
808616
- }
808617
- nodes {
808618
- name {
808619
- bcs
808620
- type {
808621
- repr
808622
- }
808623
- }
808624
- value {
808625
- __typename
808626
- ... on MoveValue {
808627
- type {
808628
- repr
808629
- }
808630
- }
808631
- ... on MoveObject {
808632
- contents {
808633
- type {
808634
- repr
808635
- }
808636
- }
808637
- }
808638
- }
808639
- }
808640
- }
808641
- }
808642
- }
808643
- `);
808644
- var GetReferenceGasPriceDocument = new TypedDocumentString(`
808645
- query getReferenceGasPrice {
808646
- epoch {
808647
- referenceGasPrice
808648
- }
808649
- }
808650
- `);
808651
- var GetOwnedObjectsDocument = new TypedDocumentString(`
808652
- query getOwnedObjects($owner: SuiAddress!, $limit: Int, $cursor: String, $filter: ObjectFilter) {
808653
- address(address: $owner) {
808654
- objects(first: $limit, after: $cursor, filter: $filter) {
808655
- pageInfo {
808656
- hasNextPage
808657
- endCursor
808658
- }
808659
- nodes {
808660
- ...MOVE_OBJECT_FIELDS
808661
- }
808662
- }
808663
- }
808664
- }
808665
- fragment MOVE_OBJECT_FIELDS on MoveObject {
808666
- address
808667
- digest
808668
- version
808669
- contents {
808670
- bcs
808671
- type {
808672
- repr
808673
- }
808674
- }
808675
- owner {
808676
- ...OBJECT_OWNER_FIELDS
808677
- }
808678
- }
808679
- fragment OBJECT_OWNER_FIELDS on ObjectOwner {
808680
- __typename
808681
- ... on AddressOwner {
808682
- owner {
808683
- asObject {
808684
- address
808685
- }
808686
- asAddress {
808687
- address
808688
- }
808689
- }
808690
- }
808691
- ... on Parent {
808692
- parent {
808693
- address
808694
- }
808695
- }
808696
- ... on Shared {
808697
- initialSharedVersion
808698
- }
808699
- ... on ConsensusV2 {
808700
- authenticator {
808701
- ... on Address {
808702
- address
808703
- }
808704
- }
808705
- }
808706
- }`);
808707
- var MultiGetObjectsDocument = new TypedDocumentString(`
808708
- query multiGetObjects($objectIds: [SuiAddress!]!, $limit: Int, $cursor: String) {
808709
- objects(first: $limit, after: $cursor, filter: {objectIds: $objectIds}) {
808710
- pageInfo {
808711
- hasNextPage
808712
- endCursor
808713
- }
808714
- nodes {
808715
- ...OBJECT_FIELDS
808716
- }
808717
- }
808718
- }
808719
- fragment OBJECT_FIELDS on Object {
808720
- address
808721
- digest
808722
- version
808723
- asMoveObject {
808724
- contents {
808725
- bcs
808726
- type {
808727
- repr
808728
- }
808729
- }
808730
- }
808731
- owner {
808732
- ...OBJECT_OWNER_FIELDS
808733
- }
808734
- }
808735
- fragment OBJECT_OWNER_FIELDS on ObjectOwner {
808736
- __typename
808737
- ... on AddressOwner {
808738
- owner {
808739
- asObject {
808740
- address
808741
- }
808742
- asAddress {
808743
- address
808744
- }
808745
- }
808746
- }
808747
- ... on Parent {
808748
- parent {
808749
- address
808750
- }
808751
- }
808752
- ... on Shared {
808753
- initialSharedVersion
808754
- }
808755
- ... on ConsensusV2 {
808756
- authenticator {
808757
- ... on Address {
808758
- address
808759
- }
808760
- }
808761
- }
808762
- }`);
808763
- var DryRunTransactionBlockDocument = new TypedDocumentString(`
808764
- query dryRunTransactionBlock($txBytes: String!) {
808765
- dryRunTransactionBlock(txBytes: $txBytes) {
808766
- error
808767
- transaction {
808768
- ...TRANSACTION_FIELDS
808769
- }
808770
- }
808771
- }
808772
- fragment TRANSACTION_FIELDS on TransactionBlock {
808773
- digest
808774
- bcs
808775
- signatures
808776
- effects {
808777
- bcs
808778
- epoch {
808779
- epochId
808780
- }
808781
- unchangedSharedObjects {
808782
- nodes {
808783
- __typename
808784
- ... on SharedObjectRead {
808785
- object {
808786
- asMoveObject {
808787
- address
808788
- contents {
808789
- type {
808790
- repr
808791
- }
808792
- }
808793
- }
808794
- }
808795
- }
808796
- }
808797
- }
808798
- objectChanges {
808799
- nodes {
808800
- address
808801
- inputState {
808802
- version
808803
- asMoveObject {
808804
- address
808805
- contents {
808806
- type {
808807
- repr
808808
- }
808809
- }
808810
- }
808811
- }
808812
- outputState {
808813
- asMoveObject {
808814
- address
808815
- contents {
808816
- type {
808817
- repr
808818
- }
808819
- }
808820
- }
808821
- }
808822
- }
808823
- }
808824
- }
808825
- }`);
808826
- var ExecuteTransactionBlockDocument = new TypedDocumentString(`
808827
- mutation executeTransactionBlock($txBytes: String!, $signatures: [String!]!) {
808828
- executeTransactionBlock(txBytes: $txBytes, signatures: $signatures) {
808829
- errors
808830
- effects {
808831
- transactionBlock {
808832
- ...TRANSACTION_FIELDS
808833
- }
808834
- }
808835
- }
808836
- }
808837
- fragment TRANSACTION_FIELDS on TransactionBlock {
808838
- digest
808839
- bcs
808840
- signatures
808841
- effects {
808842
- bcs
808843
- epoch {
808844
- epochId
808845
- }
808846
- unchangedSharedObjects {
808847
- nodes {
808848
- __typename
808849
- ... on SharedObjectRead {
808850
- object {
808851
- asMoveObject {
808852
- address
808853
- contents {
808854
- type {
808855
- repr
808856
- }
808857
- }
808858
- }
808859
- }
808860
- }
808861
- }
808862
- }
808863
- objectChanges {
808864
- nodes {
808865
- address
808866
- inputState {
808867
- version
808868
- asMoveObject {
808869
- address
808870
- contents {
808871
- type {
808872
- repr
808873
- }
808874
- }
808875
- }
808876
- }
808877
- outputState {
808878
- asMoveObject {
808879
- address
808880
- contents {
808881
- type {
808882
- repr
808883
- }
808884
- }
808885
- }
808886
- }
808887
- }
808888
- }
808889
- }
808890
- }`);
808891
- var GetTransactionBlockDocument = new TypedDocumentString(`
808892
- query getTransactionBlock($digest: String!) {
808893
- transactionBlock(digest: $digest) {
808894
- ...TRANSACTION_FIELDS
808895
- }
808896
- }
808897
- fragment TRANSACTION_FIELDS on TransactionBlock {
808898
- digest
808899
- bcs
808900
- signatures
808901
- effects {
808902
- bcs
808903
- epoch {
808904
- epochId
808905
- }
808906
- unchangedSharedObjects {
808907
- nodes {
808908
- __typename
808909
- ... on SharedObjectRead {
808910
- object {
808911
- asMoveObject {
808912
- address
808913
- contents {
808914
- type {
808915
- repr
808916
- }
808917
- }
808918
- }
808919
- }
808920
- }
808921
- }
808922
- }
808923
- objectChanges {
808924
- nodes {
808925
- address
808926
- inputState {
808927
- version
808928
- asMoveObject {
808929
- address
808930
- contents {
808931
- type {
808932
- repr
808933
- }
808934
- }
808935
- }
808936
- }
808937
- outputState {
808938
- asMoveObject {
808939
- address
808940
- contents {
808941
- type {
808942
- repr
808943
- }
808944
- }
808945
- }
808946
- }
808947
- }
808948
- }
808949
- }
808950
- }`);
808951
- var VerifyZkLoginSignatureDocument = new TypedDocumentString(`
808952
- query verifyZkLoginSignature($bytes: Base64!, $signature: Base64!, $intentScope: ZkLoginIntentScope!, $author: SuiAddress!) {
808953
- verifyZkloginSignature(
808954
- bytes: $bytes
808955
- signature: $signature
808956
- intentScope: $intentScope
808957
- author: $author
808958
- ) {
808959
- success
808960
- errors
808961
- }
808962
- }
808963
- `);
808964
-
808965
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/experimental/transports/graphql.js
808966
- var __typeError7 = (msg) => {
808967
- throw TypeError(msg);
808968
- };
808969
- var __accessCheck7 = (obj2, member2, msg) => member2.has(obj2) || __typeError7("Cannot " + msg);
808970
- var __privateGet7 = (obj2, member2, getter) => (__accessCheck7(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
808971
- var __privateAdd7 = (obj2, member2, value5) => member2.has(obj2) ? __typeError7("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
808972
- var __privateSet7 = (obj2, member2, value5, setter) => (__accessCheck7(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
808973
- var __privateMethod4 = (obj2, member2, method2) => (__accessCheck7(obj2, member2, "access private method"), method2);
808974
- var _graphqlClient;
808975
- var _GraphQLTransport_instances;
808976
- var graphqlQuery_fn;
808977
- var GraphQLTransport = class extends Experimental_CoreClient {
808978
- constructor(graphqlClient) {
808979
- super({ network: graphqlClient.network });
808980
- __privateAdd7(this, _GraphQLTransport_instances);
808981
- __privateAdd7(this, _graphqlClient);
808982
- __privateSet7(this, _graphqlClient, graphqlClient);
808983
- }
808984
- async getObjects(options22) {
808985
- const objects = [];
808986
- let hasNextPage = true;
808987
- let cursor = null;
808988
- while (hasNextPage) {
808989
- const objectsPage = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
808990
- query: MultiGetObjectsDocument,
808991
- variables: {
808992
- objectIds: options22.objectIds,
808993
- cursor
808994
- }
808995
- }, (result2) => result2.objects);
808996
- objects.push(...objectsPage.nodes);
808997
- hasNextPage = objectsPage.pageInfo.hasNextPage;
808998
- cursor = objectsPage.pageInfo.endCursor ?? null;
808999
- }
809000
- return {
809001
- objects: options22.objectIds.map((id5) => normalizeSuiAddress(id5)).map(
809002
- (id5) => objects.find((obj2) => obj2.address === id5) ?? new ObjectError("notFound", `Object ${id5} not found`)
809003
- ).map((obj2) => {
809004
- if (obj2 instanceof ObjectError) {
809005
- return obj2;
809006
- }
809007
- return {
809008
- id: obj2.address,
809009
- version: obj2.version,
809010
- digest: obj2.digest,
809011
- owner: mapOwner(obj2.owner),
809012
- type: obj2.asMoveObject?.contents?.type?.repr,
809013
- content: fromBase64(obj2.asMoveObject?.contents?.bcs)
809014
- };
809015
- })
809016
- };
809017
- }
809018
- async getOwnedObjects(options22) {
809019
- const objects = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809020
- query: GetOwnedObjectsDocument,
809021
- variables: {
809022
- owner: options22.address,
809023
- limit: options22.limit,
809024
- cursor: options22.cursor,
809025
- filter: options22.type ? { type: options22.type } : void 0
809026
- }
809027
- }, (result2) => result2.address?.objects);
809028
- return {
809029
- objects: objects.nodes.map((obj2) => ({
809030
- id: obj2.address,
809031
- version: obj2.version,
809032
- digest: obj2.digest,
809033
- owner: mapOwner(obj2.owner),
809034
- type: obj2.contents?.type?.repr,
809035
- content: fromBase64(obj2.contents?.bcs)
809036
- })),
809037
- hasNextPage: objects.pageInfo.hasNextPage,
809038
- cursor: objects.pageInfo.endCursor ?? null
809039
- };
809040
- }
809041
- async getCoins(options22) {
809042
- const coins = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809043
- query: GetCoinsDocument,
809044
- variables: {
809045
- owner: options22.address,
809046
- cursor: options22.cursor,
809047
- first: options22.limit,
809048
- type: options22.coinType
809049
- }
809050
- }, (result2) => result2.address?.coins);
809051
- return {
809052
- cursor: coins.pageInfo.endCursor ?? null,
809053
- hasNextPage: coins.pageInfo.hasNextPage,
809054
- objects: coins.nodes.map((coin) => ({
809055
- id: coin.address,
809056
- version: coin.version,
809057
- digest: coin.digest,
809058
- owner: mapOwner(coin.owner),
809059
- type: coin.contents?.type?.repr,
809060
- balance: coin.coinBalance,
809061
- content: fromBase64(coin.contents?.bcs)
809062
- }))
809063
- };
809064
- }
809065
- async getBalance(options22) {
809066
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809067
- query: GetBalanceDocument,
809068
- variables: { owner: options22.address, type: options22.coinType }
809069
- }, (result22) => result22.address?.balance);
809070
- return {
809071
- balance: {
809072
- coinType: result2.coinType.repr,
809073
- balance: result2.totalBalance
809074
- }
809075
- };
809076
- }
809077
- async getAllBalances(options22) {
809078
- const balances = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809079
- query: GetAllBalancesDocument,
809080
- variables: { owner: options22.address }
809081
- }, (result2) => result2.address?.balances);
809082
- return {
809083
- cursor: balances.pageInfo.endCursor ?? null,
809084
- hasNextPage: balances.pageInfo.hasNextPage,
809085
- balances: balances.nodes.map((balance) => ({
809086
- coinType: balance.coinType.repr,
809087
- balance: balance.totalBalance
809088
- }))
809089
- };
809090
- }
809091
- async getTransaction(options22) {
809092
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809093
- query: GetTransactionBlockDocument,
809094
- variables: { digest: options22.digest }
809095
- }, (result22) => result22.transactionBlock);
809096
- return {
809097
- transaction: parseTransaction2(result2)
809098
- };
809099
- }
809100
- async executeTransaction(options22) {
809101
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809102
- query: ExecuteTransactionBlockDocument,
809103
- variables: { txBytes: toBase64(options22.transaction), signatures: options22.signatures }
809104
- }, (result22) => result22.executeTransactionBlock);
809105
- if (result2.errors) {
809106
- if (result2.errors.length === 1) {
809107
- throw new Error(result2.errors[0]);
809108
- }
809109
- throw new AggregateError(result2.errors.map((error) => new Error(error)));
809110
- }
809111
- return {
809112
- transaction: parseTransaction2(result2.effects.transactionBlock)
809113
- };
809114
- }
809115
- async dryRunTransaction(options22) {
809116
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809117
- query: DryRunTransactionBlockDocument,
809118
- variables: { txBytes: toBase64(options22.transaction) }
809119
- }, (result22) => result22.dryRunTransactionBlock);
809120
- if (result2.error) {
809121
- throw new Error(result2.error);
809122
- }
809123
- return {
809124
- transaction: parseTransaction2(result2.transaction)
809125
- };
809126
- }
809127
- async getReferenceGasPrice() {
809128
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809129
- query: GetReferenceGasPriceDocument
809130
- }, (result22) => result22.epoch?.referenceGasPrice);
809131
- return {
809132
- referenceGasPrice: result2.referenceGasPrice
809133
- };
809134
- }
809135
- async getDynamicFields(options22) {
809136
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809137
- query: GetDynamicFieldsDocument,
809138
- variables: { parentId: options22.parentId }
809139
- }, (result22) => result22.owner?.dynamicFields);
809140
- return {
809141
- dynamicFields: result2.nodes.map((dynamicField) => {
809142
- const valueType = dynamicField.value?.__typename === "MoveObject" ? dynamicField.value.contents?.type?.repr : dynamicField.value?.type.repr;
809143
- return {
809144
- id: deriveDynamicFieldID(
809145
- options22.parentId,
809146
- dynamicField.name?.type.repr,
809147
- dynamicField.name?.bcs
809148
- ),
809149
- type: normalizeStructTag(
809150
- dynamicField.value?.__typename === "MoveObject" ? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${dynamicField.name?.type.repr}>,0x2::object::ID>` : `0x2::dynamic_field::Field<${dynamicField.name?.type.repr},${valueType}>`
809151
- ),
809152
- name: {
809153
- type: dynamicField.name?.type.repr,
809154
- bcs: fromBase64(dynamicField.name?.bcs)
809155
- },
809156
- valueType
809157
- };
809158
- }),
809159
- cursor: result2.pageInfo.endCursor ?? null,
809160
- hasNextPage: result2.pageInfo.hasNextPage
809161
- };
809162
- }
809163
- async verifyZkLoginSignature(options22) {
809164
- const intentScope = options22.intentScope === "TransactionData" ? ZkLoginIntentScope.TransactionData : ZkLoginIntentScope.PersonalMessage;
809165
- const result2 = await __privateMethod4(this, _GraphQLTransport_instances, graphqlQuery_fn).call(this, {
809166
- query: VerifyZkLoginSignatureDocument,
809167
- variables: {
809168
- bytes: options22.bytes,
809169
- signature: options22.signature,
809170
- intentScope,
809171
- author: options22.author
809172
- }
809173
- }, (result22) => result22.verifyZkloginSignature);
809174
- return {
809175
- success: result2.success,
809176
- errors: result2.errors
809177
- };
809178
- }
809179
- resolveTransactionPlugin() {
809180
- throw new Error("GraphQL client does not support transaction resolution yet");
809181
- }
809182
- };
809183
- _graphqlClient = /* @__PURE__ */ new WeakMap();
809184
- _GraphQLTransport_instances = /* @__PURE__ */ new WeakSet();
809185
- graphqlQuery_fn = async function(options22, getData2) {
809186
- const { data: data6, errors } = await __privateGet7(this, _graphqlClient).query(options22);
809187
- handleGraphQLErrors(errors);
809188
- const extractedData = data6 && (getData2 ? getData2(data6) : data6);
809189
- if (extractedData == null) {
809190
- throw new Error("Missing response data");
809191
- }
809192
- return extractedData;
809193
- };
809194
- function handleGraphQLErrors(errors) {
809195
- if (!errors || errors.length === 0)
809196
- return;
809197
- const errorInstances = errors.map((error) => new GraphQLResponseError(error));
809198
- if (errorInstances.length === 1) {
809199
- throw errorInstances[0];
809200
- }
809201
- throw new AggregateError(errorInstances);
809202
- }
809203
- var GraphQLResponseError = class extends Error {
809204
- constructor(error) {
809205
- super(error.message);
809206
- this.locations = error.locations;
809207
- }
809208
- };
809209
- function mapOwner(owner) {
809210
- switch (owner.__typename) {
809211
- case "AddressOwner":
809212
- return { $kind: "AddressOwner", AddressOwner: owner.owner?.asAddress?.address };
809213
- case "ConsensusV2":
809214
- return { $kind: "ConsensusV2", ConsensusV2: owner.authenticator.address };
809215
- case "Immutable":
809216
- return { $kind: "Immutable", Immutable: true };
809217
- case "Parent":
809218
- return { $kind: "ObjectOwner", ObjectOwner: owner.parent?.address };
809219
- case "Shared":
809220
- return { $kind: "Shared", Shared: owner.initialSharedVersion };
809221
- }
809222
- }
809223
- function parseTransaction2(transaction) {
809224
- const objectTypes = {};
809225
- transaction.effects?.unchangedSharedObjects.nodes.forEach((node3) => {
809226
- if (node3.__typename === "SharedObjectRead") {
809227
- const type4 = node3.object?.asMoveObject?.contents?.type.repr;
809228
- const address4 = node3.object?.asMoveObject?.address;
809229
- if (type4 && address4) {
809230
- objectTypes[address4] = type4;
809231
- }
809232
- }
809233
- });
809234
- transaction.effects?.objectChanges.nodes.forEach((node3) => {
809235
- const address4 = node3.address;
809236
- const type4 = node3.inputState?.asMoveObject?.contents?.type.repr ?? node3.outputState?.asMoveObject?.contents?.type.repr;
809237
- if (address4 && type4) {
809238
- objectTypes[address4] = type4;
809239
- }
809240
- });
809241
- return {
809242
- digest: transaction.digest,
809243
- effects: parseTransactionEffectsBcs(new Uint8Array(transaction.effects?.bcs)),
809244
- epoch: transaction.effects?.epoch?.epochId ?? null,
809245
- objectTypes: Promise.resolve(objectTypes),
809246
- transaction: parseTransactionBcs(transaction.bcs),
809247
- signatures: transaction.signatures
809248
- };
809249
- }
809250
-
809251
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/graphql/client.js
809252
- var __typeError8 = (msg) => {
809253
- throw TypeError(msg);
809254
- };
809255
- var __accessCheck8 = (obj2, member2, msg) => member2.has(obj2) || __typeError8("Cannot " + msg);
809256
- var __privateGet8 = (obj2, member2, getter) => (__accessCheck8(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
809257
- var __privateAdd8 = (obj2, member2, value5) => member2.has(obj2) ? __typeError8("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
809258
- var __privateSet8 = (obj2, member2, value5, setter) => (__accessCheck8(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
809259
- var _url;
809260
- var _queries;
809261
- var _headers;
809262
- var _fetch;
809263
- var SuiGraphQLRequestError = class extends Error {
809264
- };
809265
- var SuiGraphQLClient = class extends Experimental_BaseClient {
809266
- constructor({
809267
- url: url4,
809268
- fetch: fetchFn = fetch,
809269
- headers = {},
809270
- queries = {},
809271
- network = "unknown"
809272
- }) {
809273
- super({
809274
- network
809275
- });
809276
- __privateAdd8(this, _url);
809277
- __privateAdd8(this, _queries);
809278
- __privateAdd8(this, _headers);
809279
- __privateAdd8(this, _fetch);
809280
- this.core = new GraphQLTransport(this);
809281
- __privateSet8(this, _url, url4);
809282
- __privateSet8(this, _queries, queries);
809283
- __privateSet8(this, _headers, headers);
809284
- __privateSet8(this, _fetch, (...args3) => fetchFn(...args3));
809285
- }
809286
- async query(options22) {
809287
- const res = await __privateGet8(this, _fetch).call(this, __privateGet8(this, _url), {
809288
- method: "POST",
809289
- headers: {
809290
- "Content-Type": "application/json",
809291
- ...__privateGet8(this, _headers)
809292
- },
809293
- body: JSON.stringify({
809294
- query: typeof options22.query === "string" || options22.query instanceof String ? String(options22.query) : print2(options22.query),
809295
- variables: options22.variables,
809296
- extensions: options22.extensions,
809297
- operationName: options22.operationName
809298
- }),
809299
- signal: options22.signal
809300
- });
809301
- if (!res.ok) {
809302
- throw new SuiGraphQLRequestError(`GraphQL request failed: ${res.statusText} (${res.status})`);
809303
- }
809304
- return await res.json();
809305
- }
809306
- async execute(query3, options22) {
809307
- return this.query({
809308
- ...options22,
809309
- query: __privateGet8(this, _queries)[query3]
809310
- });
809311
- }
809312
- };
809313
- _url = /* @__PURE__ */ new WeakMap();
809314
- _queries = /* @__PURE__ */ new WeakMap();
809315
- _headers = /* @__PURE__ */ new WeakMap();
809316
- _fetch = /* @__PURE__ */ new WeakMap();
809317
-
809318
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/zklogin/utils.js
809319
- function findFirstNonZeroIndex(bytes7) {
809320
- for (let i87 = 0; i87 < bytes7.length; i87++) {
809321
- if (bytes7[i87] !== 0) {
809322
- return i87;
809323
- }
809324
- }
809325
- return -1;
809326
- }
809327
- function toPaddedBigEndianBytes(num, width) {
809328
- const hex4 = num.toString(16);
809329
- return hexToBytes6(hex4.padStart(width * 2, "0").slice(-width * 2));
809330
- }
809331
- function toBigEndianBytes(num, width) {
809332
- const bytes7 = toPaddedBigEndianBytes(num, width);
809333
- const firstNonZeroIndex = findFirstNonZeroIndex(bytes7);
809334
- if (firstNonZeroIndex === -1) {
809335
- return new Uint8Array([0]);
809336
- }
809337
- return bytes7.slice(firstNonZeroIndex);
809338
- }
809339
- function normalizeZkLoginIssuer(iss) {
809340
- if (iss === "accounts.google.com") {
809341
- return "https://accounts.google.com";
809342
- }
809343
- return iss;
809344
- }
809345
-
809346
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/zklogin/jwt-utils.js
809347
- function base64UrlCharTo6Bits(base64UrlChar) {
809348
- if (base64UrlChar.length !== 1) {
809349
- throw new Error("Invalid base64Url character: " + base64UrlChar);
809350
- }
809351
- const base64UrlCharacterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
809352
- const index = base64UrlCharacterSet.indexOf(base64UrlChar);
809353
- if (index === -1) {
809354
- throw new Error("Invalid base64Url character: " + base64UrlChar);
809355
- }
809356
- const binaryString = index.toString(2).padStart(6, "0");
809357
- const bits2 = Array.from(binaryString).map(Number);
809358
- return bits2;
809359
- }
809360
- function base64UrlStringToBitVector(base64UrlString) {
809361
- let bitVector = [];
809362
- for (let i87 = 0; i87 < base64UrlString.length; i87++) {
809363
- const base64UrlChar = base64UrlString.charAt(i87);
809364
- const bits2 = base64UrlCharTo6Bits(base64UrlChar);
809365
- bitVector = bitVector.concat(bits2);
809366
- }
809367
- return bitVector;
809368
- }
809369
- function decodeBase64URL(s58, i87) {
809370
- if (s58.length < 2) {
809371
- throw new Error(`Input (s = ${s58}) is not tightly packed because s.length < 2`);
809372
- }
809373
- let bits2 = base64UrlStringToBitVector(s58);
809374
- const firstCharOffset = i87 % 4;
809375
- if (firstCharOffset === 0) {
809376
- } else if (firstCharOffset === 1) {
809377
- bits2 = bits2.slice(2);
809378
- } else if (firstCharOffset === 2) {
809379
- bits2 = bits2.slice(4);
809380
- } else {
809381
- throw new Error(`Input (s = ${s58}) is not tightly packed because i%4 = 3 (i = ${i87}))`);
809382
- }
809383
- const lastCharOffset = (i87 + s58.length - 1) % 4;
809384
- if (lastCharOffset === 3) {
809385
- } else if (lastCharOffset === 2) {
809386
- bits2 = bits2.slice(0, bits2.length - 2);
809387
- } else if (lastCharOffset === 1) {
809388
- bits2 = bits2.slice(0, bits2.length - 4);
809389
- } else {
809390
- throw new Error(
809391
- `Input (s = ${s58}) is not tightly packed because (i + s.length - 1)%4 = 0 (i = ${i87}))`
809392
- );
809393
- }
809394
- if (bits2.length % 8 !== 0) {
809395
- throw new Error(`We should never reach here...`);
809396
- }
809397
- const bytes7 = new Uint8Array(Math.floor(bits2.length / 8));
809398
- let currentByteIndex = 0;
809399
- for (let i210 = 0; i210 < bits2.length; i210 += 8) {
809400
- const bitChunk = bits2.slice(i210, i210 + 8);
809401
- const byte = parseInt(bitChunk.join(""), 2);
809402
- bytes7[currentByteIndex++] = byte;
809403
- }
809404
- return new TextDecoder().decode(bytes7);
809405
- }
809406
- function verifyExtendedClaim(claim) {
809407
- if (!(claim.slice(-1) === "}" || claim.slice(-1) === ",")) {
809408
- throw new Error("Invalid claim");
809409
- }
809410
- const json2 = JSON.parse("{" + claim.slice(0, -1) + "}");
809411
- if (Object.keys(json2).length !== 1) {
809412
- throw new Error("Invalid claim");
809413
- }
809414
- const key2 = Object.keys(json2)[0];
809415
- return [key2, json2[key2]];
809416
- }
809417
- function extractClaimValue(claim, claimName) {
809418
- const extendedClaim = decodeBase64URL(claim.value, claim.indexMod4);
809419
- const [name3, value5] = verifyExtendedClaim(extendedClaim);
809420
- if (name3 !== claimName) {
809421
- throw new Error(`Invalid field name: found ${name3} expected ${claimName}`);
809422
- }
809423
- return value5;
809424
- }
809425
-
809426
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/zklogin/bcs.js
809427
- var zkLoginSignature = bcs.struct("ZkLoginSignature", {
809428
- inputs: bcs.struct("ZkLoginSignatureInputs", {
809429
- proofPoints: bcs.struct("ZkLoginSignatureInputsProofPoints", {
809430
- a: bcs.vector(bcs.string()),
809431
- b: bcs.vector(bcs.vector(bcs.string())),
809432
- c: bcs.vector(bcs.string())
809433
- }),
809434
- issBase64Details: bcs.struct("ZkLoginSignatureInputsClaim", {
809435
- value: bcs.string(),
809436
- indexMod4: bcs.u8()
809437
- }),
809438
- headerBase64: bcs.string(),
809439
- addressSeed: bcs.string()
809440
- }),
809441
- maxEpoch: bcs.u64(),
809442
- userSignature: bcs.vector(bcs.u8())
809443
- });
809444
-
809445
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/zklogin/signature.js
809446
- function parseZkLoginSignature(signature4) {
809447
- return zkLoginSignature.parse(typeof signature4 === "string" ? fromBase64(signature4) : signature4);
809448
- }
809449
-
809450
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/zklogin/publickey.js
809451
- var __typeError9 = (msg) => {
809452
- throw TypeError(msg);
809453
- };
809454
- var __accessCheck9 = (obj2, member2, msg) => member2.has(obj2) || __typeError9("Cannot " + msg);
809455
- var __privateGet9 = (obj2, member2, getter) => (__accessCheck9(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
809456
- var __privateAdd9 = (obj2, member2, value5) => member2.has(obj2) ? __typeError9("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
809457
- var __privateSet9 = (obj2, member2, value5, setter) => (__accessCheck9(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
809458
- var __privateMethod5 = (obj2, member2, method2) => (__accessCheck9(obj2, member2, "access private method"), method2);
809459
- var _data2;
809460
- var _client;
809461
- var _legacyAddress;
809462
- var _ZkLoginPublicIdentifier_instances;
809463
- var toLegacyAddress_fn;
809464
- var _ZkLoginPublicIdentifier = class _ZkLoginPublicIdentifier2 extends PublicKey10 {
809465
- /**
809466
- * Create a new ZkLoginPublicIdentifier object
809467
- * @param value zkLogin public identifier as buffer or base-64 encoded string
809468
- */
809469
- constructor(value5, { client } = {}) {
809470
- super();
809471
- __privateAdd9(this, _ZkLoginPublicIdentifier_instances);
809472
- __privateAdd9(this, _data2);
809473
- __privateAdd9(this, _client);
809474
- __privateAdd9(this, _legacyAddress);
809475
- __privateSet9(this, _client, client);
809476
- if (typeof value5 === "string") {
809477
- __privateSet9(this, _data2, fromBase64(value5));
809478
- } else if (value5 instanceof Uint8Array) {
809479
- __privateSet9(this, _data2, value5);
809480
- } else {
809481
- __privateSet9(this, _data2, Uint8Array.from(value5));
809482
- }
809483
- __privateSet9(this, _legacyAddress, __privateGet9(this, _data2).length !== __privateGet9(this, _data2)[0] + 1 + 32);
809484
- if (__privateGet9(this, _legacyAddress)) {
809485
- __privateSet9(this, _data2, normalizeZkLoginPublicKeyBytes(__privateGet9(this, _data2)));
809486
- }
809487
- }
809488
- static fromBytes(bytes7, {
809489
- client,
809490
- address: address4,
809491
- legacyAddress
809492
- } = {}) {
809493
- let publicKey3;
809494
- if (legacyAddress === true) {
809495
- publicKey3 = new _ZkLoginPublicIdentifier2(normalizeZkLoginPublicKeyBytes(bytes7, true), {
809496
- client
809497
- });
809498
- } else if (legacyAddress === false) {
809499
- publicKey3 = new _ZkLoginPublicIdentifier2(normalizeZkLoginPublicKeyBytes(bytes7, false), {
809500
- client
809501
- });
809502
- } else if (address4) {
809503
- publicKey3 = new _ZkLoginPublicIdentifier2(normalizeZkLoginPublicKeyBytes(bytes7, false), {
809504
- client
809505
- });
809506
- if (publicKey3.toSuiAddress() !== address4) {
809507
- publicKey3 = new _ZkLoginPublicIdentifier2(normalizeZkLoginPublicKeyBytes(bytes7, true), {
809508
- client
809509
- });
809510
- }
809511
- } else {
809512
- publicKey3 = new _ZkLoginPublicIdentifier2(bytes7, {
809513
- client
809514
- });
809515
- }
809516
- if (address4 && publicKey3.toSuiAddress() !== address4) {
809517
- throw new Error("Public key bytes do not match the provided address");
809518
- }
809519
- return publicKey3;
809520
- }
809521
- static fromProof(address4, proof) {
809522
- const { issBase64Details, addressSeed } = proof;
809523
- const iss = extractClaimValue(issBase64Details, "iss");
809524
- const legacyPublicKey = toZkLoginPublicIdentifier(BigInt(addressSeed), iss, {
809525
- legacyAddress: true
809526
- });
809527
- if (legacyPublicKey.toSuiAddress() === address4) {
809528
- return legacyPublicKey;
809529
- }
809530
- const publicKey3 = toZkLoginPublicIdentifier(BigInt(addressSeed), iss, {
809531
- legacyAddress: false
809532
- });
809533
- if (publicKey3.toSuiAddress() !== address4) {
809534
- throw new Error("Proof does not match address");
809535
- }
809536
- return publicKey3;
809537
- }
809538
- /**
809539
- * Checks if two zkLogin public identifiers are equal
809540
- */
809541
- equals(publicKey3) {
809542
- return super.equals(publicKey3);
809543
- }
809544
- toSuiAddress() {
809545
- if (__privateGet9(this, _legacyAddress)) {
809546
- return __privateMethod5(this, _ZkLoginPublicIdentifier_instances, toLegacyAddress_fn).call(this);
809547
- }
809548
- return super.toSuiAddress();
809549
- }
809550
- /**
809551
- * Return the byte array representation of the zkLogin public identifier
809552
- */
809553
- toRawBytes() {
809554
- return __privateGet9(this, _data2);
809555
- }
809556
- /**
809557
- * Return the Sui address associated with this ZkLogin public identifier
809558
- */
809559
- flag() {
809560
- return SIGNATURE_SCHEME_TO_FLAG["ZkLogin"];
809561
- }
809562
- /**
809563
- * Verifies that the signature is valid for for the provided message
809564
- */
809565
- async verify(_message, _signature) {
809566
- throw Error("does not support");
809567
- }
809568
- /**
809569
- * Verifies that the signature is valid for for the provided PersonalMessage
809570
- */
809571
- verifyPersonalMessage(message2, signature4) {
809572
- const parsedSignature = parseSerializedZkLoginSignature(signature4);
809573
- const address4 = new _ZkLoginPublicIdentifier2(parsedSignature.publicKey).toSuiAddress();
809574
- return graphqlVerifyZkLoginSignature({
809575
- address: address4,
809576
- bytes: toBase64(message2),
809577
- signature: parsedSignature.serializedSignature,
809578
- intentScope: "PersonalMessage",
809579
- client: __privateGet9(this, _client)
809580
- });
809581
- }
809582
- /**
809583
- * Verifies that the signature is valid for for the provided Transaction
809584
- */
809585
- verifyTransaction(transaction, signature4) {
809586
- const parsedSignature = parseSerializedZkLoginSignature(signature4);
809587
- const address4 = new _ZkLoginPublicIdentifier2(parsedSignature.publicKey).toSuiAddress();
809588
- return graphqlVerifyZkLoginSignature({
809589
- address: address4,
809590
- bytes: toBase64(transaction),
809591
- signature: parsedSignature.serializedSignature,
809592
- intentScope: "TransactionData",
809593
- client: __privateGet9(this, _client)
809594
- });
809595
- }
809596
- /**
809597
- * Verifies that the public key is associated with the provided address
809598
- */
809599
- verifyAddress(address4) {
809600
- return address4 === super.toSuiAddress() || address4 === __privateMethod5(this, _ZkLoginPublicIdentifier_instances, toLegacyAddress_fn).call(this);
809601
- }
809602
- };
809603
- _data2 = /* @__PURE__ */ new WeakMap();
809604
- _client = /* @__PURE__ */ new WeakMap();
809605
- _legacyAddress = /* @__PURE__ */ new WeakMap();
809606
- _ZkLoginPublicIdentifier_instances = /* @__PURE__ */ new WeakSet();
809607
- toLegacyAddress_fn = function() {
809608
- const legacyBytes = normalizeZkLoginPublicKeyBytes(__privateGet9(this, _data2), true);
809609
- const addressBytes = new Uint8Array(legacyBytes.length + 1);
809610
- addressBytes[0] = this.flag();
809611
- addressBytes.set(legacyBytes, 1);
809612
- return normalizeSuiAddress(
809613
- bytesToHex6(blake2b6(addressBytes, { dkLen: 32 })).slice(0, SUI_ADDRESS_LENGTH * 2)
809614
- );
809615
- };
809616
- var ZkLoginPublicIdentifier = _ZkLoginPublicIdentifier;
809617
- function toZkLoginPublicIdentifier(addressSeed, iss, options22) {
809618
- const addressSeedBytesBigEndian = options22?.legacyAddress ? toBigEndianBytes(addressSeed, 32) : toPaddedBigEndianBytes(addressSeed, 32);
809619
- const issBytes = new TextEncoder().encode(normalizeZkLoginIssuer(iss));
809620
- const tmp = new Uint8Array(1 + issBytes.length + addressSeedBytesBigEndian.length);
809621
- tmp.set([issBytes.length], 0);
809622
- tmp.set(issBytes, 1);
809623
- tmp.set(addressSeedBytesBigEndian, 1 + issBytes.length);
809624
- return new ZkLoginPublicIdentifier(tmp, options22);
809625
- }
809626
- function normalizeZkLoginPublicKeyBytes(bytes7, legacyAddress = false) {
809627
- const issByteLength = bytes7[0] + 1;
809628
- const addressSeed = BigInt(`0x${toHex3(bytes7.slice(issByteLength))}`);
809629
- const seedBytes = legacyAddress ? toBigEndianBytes(addressSeed, 32) : toPaddedBigEndianBytes(addressSeed, 32);
809630
- const data6 = new Uint8Array(issByteLength + seedBytes.length);
809631
- data6.set(bytes7.slice(0, issByteLength), 0);
809632
- data6.set(seedBytes, issByteLength);
809633
- return data6;
809634
- }
809635
- async function graphqlVerifyZkLoginSignature({
809636
- address: address4,
809637
- bytes: bytes7,
809638
- signature: signature4,
809639
- intentScope,
809640
- client = new SuiGraphQLClient({
809641
- url: "https://sui-mainnet.mystenlabs.com/graphql"
809642
- })
809643
- }) {
809644
- const resp = await client.core.verifyZkLoginSignature({
809645
- bytes: bytes7,
809646
- signature: signature4,
809647
- intentScope,
809648
- author: address4
809649
- });
809650
- return resp.success === true && resp.errors.length === 0;
809651
- }
809652
- function parseSerializedZkLoginSignature(signature4) {
809653
- const bytes7 = typeof signature4 === "string" ? fromBase64(signature4) : signature4;
809654
- if (bytes7[0] !== SIGNATURE_SCHEME_TO_FLAG.ZkLogin) {
809655
- throw new Error("Invalid signature scheme");
809656
- }
809657
- const signatureBytes = bytes7.slice(1);
809658
- const { inputs, maxEpoch, userSignature } = parseZkLoginSignature(signatureBytes);
809659
- const { issBase64Details, addressSeed } = inputs;
809660
- const iss = extractClaimValue(issBase64Details, "iss");
809661
- const publicIdentifer = toZkLoginPublicIdentifier(BigInt(addressSeed), iss);
809662
- return {
809663
- serializedSignature: toBase64(bytes7),
809664
- signatureScheme: "ZkLogin",
809665
- zkLogin: {
809666
- inputs,
809667
- maxEpoch,
809668
- userSignature,
809669
- iss,
809670
- addressSeed: BigInt(addressSeed)
809671
- },
809672
- signature: bytes7,
809673
- publicKey: publicIdentifer.toRawBytes()
809674
- };
809675
- }
809676
-
809677
808061
  // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/cryptography/signature.js
809678
808062
  function toSerializedSignature({
809679
808063
  signature: signature4,
@@ -809690,31 +808074,6 @@ function toSerializedSignature({
809690
808074
  serializedSignature.set(pubKeyBytes, 1 + signature4.length);
809691
808075
  return toBase64(serializedSignature);
809692
808076
  }
809693
- function parseSerializedSignature(serializedSignature) {
809694
- const bytes7 = fromBase64(serializedSignature);
809695
- const signatureScheme = SIGNATURE_FLAG_TO_SCHEME[bytes7[0]];
809696
- switch (signatureScheme) {
809697
- case "Passkey":
809698
- return parseSerializedPasskeySignature(serializedSignature);
809699
- case "MultiSig":
809700
- const multisig = suiBcs.MultiSig.parse(bytes7.slice(1));
809701
- return {
809702
- serializedSignature,
809703
- signatureScheme,
809704
- multisig,
809705
- bytes: bytes7,
809706
- signature: void 0
809707
- };
809708
- case "ZkLogin":
809709
- return parseSerializedZkLoginSignature(serializedSignature);
809710
- case "ED25519":
809711
- case "Secp256k1":
809712
- case "Secp256r1":
809713
- return parseSerializedKeypairSignature(serializedSignature);
809714
- default:
809715
- throw new Error("Unsupported signature scheme");
809716
- }
809717
- }
809718
808077
 
809719
808078
  // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/cryptography/keypair.js
809720
808079
  var Signer2 = class {
@@ -809833,505 +808192,6 @@ var Ed25519PublicKey3 = class extends PublicKey10 {
809833
808192
  };
809834
808193
  Ed25519PublicKey3.SIZE = PUBLIC_KEY_SIZE;
809835
808194
 
809836
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/keypairs/secp256k1/publickey.js
809837
- var SECP256K1_PUBLIC_KEY_SIZE = 33;
809838
- var Secp256k1PublicKey = class extends PublicKey10 {
809839
- /**
809840
- * Create a new Secp256k1PublicKey object
809841
- * @param value secp256k1 public key as buffer or base-64 encoded string
809842
- */
809843
- constructor(value5) {
809844
- super();
809845
- if (typeof value5 === "string") {
809846
- this.data = fromBase64(value5);
809847
- } else if (value5 instanceof Uint8Array) {
809848
- this.data = value5;
809849
- } else {
809850
- this.data = Uint8Array.from(value5);
809851
- }
809852
- if (this.data.length !== SECP256K1_PUBLIC_KEY_SIZE) {
809853
- throw new Error(
809854
- `Invalid public key input. Expected ${SECP256K1_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`
809855
- );
809856
- }
809857
- }
809858
- /**
809859
- * Checks if two Secp256k1 public keys are equal
809860
- */
809861
- equals(publicKey3) {
809862
- return super.equals(publicKey3);
809863
- }
809864
- /**
809865
- * Return the byte array representation of the Secp256k1 public key
809866
- */
809867
- toRawBytes() {
809868
- return this.data;
809869
- }
809870
- /**
809871
- * Return the Sui address associated with this Secp256k1 public key
809872
- */
809873
- flag() {
809874
- return SIGNATURE_SCHEME_TO_FLAG["Secp256k1"];
809875
- }
809876
- /**
809877
- * Verifies that the signature is valid for for the provided message
809878
- */
809879
- async verify(message2, signature4) {
809880
- let bytes7;
809881
- if (typeof signature4 === "string") {
809882
- const parsed2 = parseSerializedKeypairSignature(signature4);
809883
- if (parsed2.signatureScheme !== "Secp256k1") {
809884
- throw new Error("Invalid signature scheme");
809885
- }
809886
- if (!bytesEqual2(this.toRawBytes(), parsed2.publicKey)) {
809887
- throw new Error("Signature does not match public key");
809888
- }
809889
- bytes7 = parsed2.signature;
809890
- } else {
809891
- bytes7 = signature4;
809892
- }
809893
- return secp256k16.verify(
809894
- secp256k16.Signature.fromCompact(bytes7),
809895
- sha25612(message2),
809896
- this.toRawBytes()
809897
- );
809898
- }
809899
- };
809900
- Secp256k1PublicKey.SIZE = SECP256K1_PUBLIC_KEY_SIZE;
809901
-
809902
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/keypairs/secp256r1/publickey.js
809903
- var SECP256R1_PUBLIC_KEY_SIZE = 33;
809904
- var Secp256r1PublicKey = class extends PublicKey10 {
809905
- /**
809906
- * Create a new Secp256r1PublicKey object
809907
- * @param value secp256r1 public key as buffer or base-64 encoded string
809908
- */
809909
- constructor(value5) {
809910
- super();
809911
- if (typeof value5 === "string") {
809912
- this.data = fromBase64(value5);
809913
- } else if (value5 instanceof Uint8Array) {
809914
- this.data = value5;
809915
- } else {
809916
- this.data = Uint8Array.from(value5);
809917
- }
809918
- if (this.data.length !== SECP256R1_PUBLIC_KEY_SIZE) {
809919
- throw new Error(
809920
- `Invalid public key input. Expected ${SECP256R1_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`
809921
- );
809922
- }
809923
- }
809924
- /**
809925
- * Checks if two Secp256r1 public keys are equal
809926
- */
809927
- equals(publicKey3) {
809928
- return super.equals(publicKey3);
809929
- }
809930
- /**
809931
- * Return the byte array representation of the Secp256r1 public key
809932
- */
809933
- toRawBytes() {
809934
- return this.data;
809935
- }
809936
- /**
809937
- * Return the Sui address associated with this Secp256r1 public key
809938
- */
809939
- flag() {
809940
- return SIGNATURE_SCHEME_TO_FLAG["Secp256r1"];
809941
- }
809942
- /**
809943
- * Verifies that the signature is valid for for the provided message
809944
- */
809945
- async verify(message2, signature4) {
809946
- let bytes7;
809947
- if (typeof signature4 === "string") {
809948
- const parsed2 = parseSerializedSignature(signature4);
809949
- if (parsed2.signatureScheme !== "Secp256r1") {
809950
- throw new Error("Invalid signature scheme");
809951
- }
809952
- if (!bytesEqual2(this.toRawBytes(), parsed2.publicKey)) {
809953
- throw new Error("Signature does not match public key");
809954
- }
809955
- bytes7 = parsed2.signature;
809956
- } else {
809957
- bytes7 = signature4;
809958
- }
809959
- return secp256r1.verify(
809960
- secp256r1.Signature.fromCompact(bytes7),
809961
- sha25612(message2),
809962
- this.toRawBytes()
809963
- );
809964
- }
809965
- };
809966
- Secp256r1PublicKey.SIZE = SECP256R1_PUBLIC_KEY_SIZE;
809967
-
809968
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/multisig/signer.js
809969
- var __typeError10 = (msg) => {
809970
- throw TypeError(msg);
809971
- };
809972
- var __accessCheck10 = (obj2, member2, msg) => member2.has(obj2) || __typeError10("Cannot " + msg);
809973
- var __privateGet10 = (obj2, member2, getter) => (__accessCheck10(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
809974
- var __privateAdd10 = (obj2, member2, value5) => member2.has(obj2) ? __typeError10("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
809975
- var __privateSet10 = (obj2, member2, value5, setter) => (__accessCheck10(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
809976
- var _pubkey;
809977
- var _signers;
809978
- var MultiSigSigner = class extends Signer2 {
809979
- constructor(pubkey, signers = []) {
809980
- super();
809981
- __privateAdd10(this, _pubkey);
809982
- __privateAdd10(this, _signers);
809983
- __privateSet10(this, _pubkey, pubkey);
809984
- __privateSet10(this, _signers, signers);
809985
- const uniqueKeys = /* @__PURE__ */ new Set();
809986
- let combinedWeight = 0;
809987
- const weights = pubkey.getPublicKeys().map(({ weight, publicKey: publicKey3 }) => ({
809988
- weight,
809989
- address: publicKey3.toSuiAddress()
809990
- }));
809991
- for (const signer2 of signers) {
809992
- const address4 = signer2.toSuiAddress();
809993
- if (uniqueKeys.has(address4)) {
809994
- throw new Error(`Can't create MultiSigSigner with duplicate signers`);
809995
- }
809996
- uniqueKeys.add(address4);
809997
- const weight = weights.find((w13) => w13.address === address4)?.weight;
809998
- if (!weight) {
809999
- throw new Error(`Signer ${address4} is not part of the MultiSig public key`);
810000
- }
810001
- combinedWeight += weight;
810002
- }
810003
- if (combinedWeight < pubkey.getThreshold()) {
810004
- throw new Error(`Combined weight of signers is less than threshold`);
810005
- }
810006
- }
810007
- getKeyScheme() {
810008
- return "MultiSig";
810009
- }
810010
- getPublicKey() {
810011
- return __privateGet10(this, _pubkey);
810012
- }
810013
- sign(_data3) {
810014
- throw new Error(
810015
- "MultiSigSigner does not support signing directly. Use signTransaction or signPersonalMessage instead"
810016
- );
810017
- }
810018
- signData(_data3) {
810019
- throw new Error(
810020
- "MultiSigSigner does not support signing directly. Use signTransaction or signPersonalMessage instead"
810021
- );
810022
- }
810023
- async signTransaction(bytes7) {
810024
- const signature4 = __privateGet10(this, _pubkey).combinePartialSignatures(
810025
- await Promise.all(
810026
- __privateGet10(this, _signers).map(async (signer2) => (await signer2.signTransaction(bytes7)).signature)
810027
- )
810028
- );
810029
- return {
810030
- signature: signature4,
810031
- bytes: toBase64(bytes7)
810032
- };
810033
- }
810034
- async signPersonalMessage(bytes7) {
810035
- const signature4 = __privateGet10(this, _pubkey).combinePartialSignatures(
810036
- await Promise.all(
810037
- __privateGet10(this, _signers).map(async (signer2) => (await signer2.signPersonalMessage(bytes7)).signature)
810038
- )
810039
- );
810040
- return {
810041
- signature: signature4,
810042
- bytes: toBase64(bytes7)
810043
- };
810044
- }
810045
- };
810046
- _pubkey = /* @__PURE__ */ new WeakMap();
810047
- _signers = /* @__PURE__ */ new WeakMap();
810048
-
810049
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/multisig/publickey.js
810050
- var MAX_SIGNER_IN_MULTISIG = 10;
810051
- var MIN_SIGNER_IN_MULTISIG = 1;
810052
- var MultiSigPublicKey2 = class _MultiSigPublicKey extends PublicKey10 {
810053
- /**
810054
- * Create a new MultiSigPublicKey object
810055
- */
810056
- constructor(value5, options22 = {}) {
810057
- super();
810058
- if (typeof value5 === "string") {
810059
- this.rawBytes = fromBase64(value5);
810060
- this.multisigPublicKey = suiBcs.MultiSigPublicKey.parse(this.rawBytes);
810061
- } else if (value5 instanceof Uint8Array) {
810062
- this.rawBytes = value5;
810063
- this.multisigPublicKey = suiBcs.MultiSigPublicKey.parse(this.rawBytes);
810064
- } else {
810065
- this.multisigPublicKey = value5;
810066
- this.rawBytes = suiBcs.MultiSigPublicKey.serialize(value5).toBytes();
810067
- }
810068
- if (this.multisigPublicKey.threshold < 1) {
810069
- throw new Error("Invalid threshold");
810070
- }
810071
- const seenPublicKeys = /* @__PURE__ */ new Set();
810072
- this.publicKeys = this.multisigPublicKey.pk_map.map(({ pubKey, weight }) => {
810073
- const [scheme, bytes7] = Object.entries(pubKey).filter(([name3]) => name3 !== "$kind")[0];
810074
- const publicKeyStr = Uint8Array.from(bytes7).toString();
810075
- if (seenPublicKeys.has(publicKeyStr)) {
810076
- throw new Error(`Multisig does not support duplicate public keys`);
810077
- }
810078
- seenPublicKeys.add(publicKeyStr);
810079
- if (weight < 1) {
810080
- throw new Error(`Invalid weight`);
810081
- }
810082
- return {
810083
- publicKey: publicKeyFromRawBytes(scheme, Uint8Array.from(bytes7), options22),
810084
- weight
810085
- };
810086
- });
810087
- const totalWeight = this.publicKeys.reduce((sum2, { weight }) => sum2 + weight, 0);
810088
- if (this.multisigPublicKey.threshold > totalWeight) {
810089
- throw new Error(`Unreachable threshold`);
810090
- }
810091
- if (this.publicKeys.length > MAX_SIGNER_IN_MULTISIG) {
810092
- throw new Error(`Max number of signers in a multisig is ${MAX_SIGNER_IN_MULTISIG}`);
810093
- }
810094
- if (this.publicKeys.length < MIN_SIGNER_IN_MULTISIG) {
810095
- throw new Error(`Min number of signers in a multisig is ${MIN_SIGNER_IN_MULTISIG}`);
810096
- }
810097
- }
810098
- /**
810099
- * A static method to create a new MultiSig publickey instance from a set of public keys and their associated weights pairs and threshold.
810100
- */
810101
- static fromPublicKeys({
810102
- threshold,
810103
- publicKeys
810104
- }) {
810105
- return new _MultiSigPublicKey({
810106
- pk_map: publicKeys.map(({ publicKey: publicKey3, weight }) => {
810107
- const scheme = SIGNATURE_FLAG_TO_SCHEME[publicKey3.flag()];
810108
- return {
810109
- pubKey: { [scheme]: Array.from(publicKey3.toRawBytes()) },
810110
- weight
810111
- };
810112
- }),
810113
- threshold
810114
- });
810115
- }
810116
- /**
810117
- * Checks if two MultiSig public keys are equal
810118
- */
810119
- equals(publicKey3) {
810120
- return super.equals(publicKey3);
810121
- }
810122
- /**
810123
- * Return the byte array representation of the MultiSig public key
810124
- */
810125
- toRawBytes() {
810126
- return this.rawBytes;
810127
- }
810128
- getPublicKeys() {
810129
- return this.publicKeys;
810130
- }
810131
- getThreshold() {
810132
- return this.multisigPublicKey.threshold;
810133
- }
810134
- getSigner(...signers) {
810135
- return new MultiSigSigner(this, signers);
810136
- }
810137
- /**
810138
- * Return the Sui address associated with this MultiSig public key
810139
- */
810140
- toSuiAddress() {
810141
- const maxLength2 = 1 + (64 + 1) * MAX_SIGNER_IN_MULTISIG + 2;
810142
- const tmp = new Uint8Array(maxLength2);
810143
- tmp.set([SIGNATURE_SCHEME_TO_FLAG["MultiSig"]]);
810144
- tmp.set(suiBcs.u16().serialize(this.multisigPublicKey.threshold).toBytes(), 1);
810145
- let i87 = 3;
810146
- for (const { publicKey: publicKey3, weight } of this.publicKeys) {
810147
- const bytes7 = publicKey3.toSuiBytes();
810148
- tmp.set(bytes7, i87);
810149
- i87 += bytes7.length;
810150
- tmp.set([weight], i87++);
810151
- }
810152
- return normalizeSuiAddress(bytesToHex6(blake2b6(tmp.slice(0, i87), { dkLen: 32 })));
810153
- }
810154
- /**
810155
- * Return the Sui address associated with this MultiSig public key
810156
- */
810157
- flag() {
810158
- return SIGNATURE_SCHEME_TO_FLAG["MultiSig"];
810159
- }
810160
- /**
810161
- * Verifies that the signature is valid for for the provided message
810162
- */
810163
- async verify(message2, multisigSignature) {
810164
- const parsed2 = parseSerializedSignature(multisigSignature);
810165
- if (parsed2.signatureScheme !== "MultiSig") {
810166
- throw new Error("Invalid signature scheme");
810167
- }
810168
- const { multisig } = parsed2;
810169
- let signatureWeight = 0;
810170
- if (!bytesEqual2(
810171
- suiBcs.MultiSigPublicKey.serialize(this.multisigPublicKey).toBytes(),
810172
- suiBcs.MultiSigPublicKey.serialize(multisig.multisig_pk).toBytes()
810173
- )) {
810174
- return false;
810175
- }
810176
- for (const { publicKey: publicKey3, weight, signature: signature4 } of parsePartialSignatures(multisig)) {
810177
- if (!await publicKey3.verify(message2, signature4)) {
810178
- return false;
810179
- }
810180
- signatureWeight += weight;
810181
- }
810182
- return signatureWeight >= this.multisigPublicKey.threshold;
810183
- }
810184
- /**
810185
- * Combines multiple partial signatures into a single multisig, ensuring that each public key signs only once
810186
- * and that all the public keys involved are known and valid, and then serializes multisig into the standard format
810187
- */
810188
- combinePartialSignatures(signatures2) {
810189
- if (signatures2.length > MAX_SIGNER_IN_MULTISIG) {
810190
- throw new Error(`Max number of signatures in a multisig is ${MAX_SIGNER_IN_MULTISIG}`);
810191
- }
810192
- let bitmap = 0;
810193
- const compressedSignatures = new Array(signatures2.length);
810194
- for (let i87 = 0; i87 < signatures2.length; i87++) {
810195
- const parsed2 = parseSerializedSignature(signatures2[i87]);
810196
- if (parsed2.signatureScheme === "MultiSig") {
810197
- throw new Error("MultiSig is not supported inside MultiSig");
810198
- }
810199
- let publicKey3;
810200
- if (parsed2.signatureScheme === "ZkLogin") {
810201
- publicKey3 = toZkLoginPublicIdentifier(
810202
- parsed2.zkLogin?.addressSeed,
810203
- parsed2.zkLogin?.iss
810204
- ).toRawBytes();
810205
- } else {
810206
- publicKey3 = parsed2.publicKey;
810207
- }
810208
- compressedSignatures[i87] = {
810209
- [parsed2.signatureScheme]: Array.from(parsed2.signature.map((x26) => Number(x26)))
810210
- };
810211
- let publicKeyIndex;
810212
- for (let j9 = 0; j9 < this.publicKeys.length; j9++) {
810213
- if (bytesEqual2(publicKey3, this.publicKeys[j9].publicKey.toRawBytes())) {
810214
- if (bitmap & 1 << j9) {
810215
- throw new Error("Received multiple signatures from the same public key");
810216
- }
810217
- publicKeyIndex = j9;
810218
- break;
810219
- }
810220
- }
810221
- if (publicKeyIndex === void 0) {
810222
- throw new Error("Received signature from unknown public key");
810223
- }
810224
- bitmap |= 1 << publicKeyIndex;
810225
- }
810226
- const multisig = {
810227
- sigs: compressedSignatures,
810228
- bitmap,
810229
- multisig_pk: this.multisigPublicKey
810230
- };
810231
- const bytes7 = suiBcs.MultiSig.serialize(multisig, { maxSize: 8192 }).toBytes();
810232
- const tmp = new Uint8Array(bytes7.length + 1);
810233
- tmp.set([SIGNATURE_SCHEME_TO_FLAG["MultiSig"]]);
810234
- tmp.set(bytes7, 1);
810235
- return toBase64(tmp);
810236
- }
810237
- };
810238
- function parsePartialSignatures(multisig, options22 = {}) {
810239
- const res = new Array(multisig.sigs.length);
810240
- for (let i87 = 0; i87 < multisig.sigs.length; i87++) {
810241
- const [signatureScheme, signature4] = Object.entries(multisig.sigs[i87]).filter(
810242
- ([name3]) => name3 !== "$kind"
810243
- )[0];
810244
- const pkIndex = asIndices(multisig.bitmap).at(i87);
810245
- const pair = multisig.multisig_pk.pk_map[pkIndex];
810246
- const pkBytes = Uint8Array.from(Object.values(pair.pubKey)[0]);
810247
- if (signatureScheme === "MultiSig") {
810248
- throw new Error("MultiSig is not supported inside MultiSig");
810249
- }
810250
- const publicKey3 = publicKeyFromRawBytes(signatureScheme, pkBytes, options22);
810251
- res[i87] = {
810252
- signatureScheme,
810253
- signature: Uint8Array.from(signature4),
810254
- publicKey: publicKey3,
810255
- weight: pair.weight
810256
- };
810257
- }
810258
- return res;
810259
- }
810260
- function asIndices(bitmap) {
810261
- if (bitmap < 0 || bitmap > 1024) {
810262
- throw new Error("Invalid bitmap");
810263
- }
810264
- const res = [];
810265
- for (let i87 = 0; i87 < 10; i87++) {
810266
- if ((bitmap & 1 << i87) !== 0) {
810267
- res.push(i87);
810268
- }
810269
- }
810270
- return Uint8Array.from(res);
810271
- }
810272
-
810273
- // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/verify/verify.js
810274
- async function verifyTransactionSignature(transaction, signature4, options22 = {}) {
810275
- const parsedSignature = parseSignature(signature4, options22);
810276
- if (!await parsedSignature.publicKey.verifyTransaction(
810277
- transaction,
810278
- parsedSignature.serializedSignature
810279
- )) {
810280
- throw new Error(`Signature is not valid for the provided Transaction`);
810281
- }
810282
- if (options22?.address && !parsedSignature.publicKey.verifyAddress(options22.address)) {
810283
- throw new Error(`Signature is not valid for the provided address`);
810284
- }
810285
- return parsedSignature.publicKey;
810286
- }
810287
- function parseSignature(signature4, options22 = {}) {
810288
- const parsedSignature = parseSerializedSignature(signature4);
810289
- if (parsedSignature.signatureScheme === "MultiSig") {
810290
- return {
810291
- ...parsedSignature,
810292
- publicKey: new MultiSigPublicKey2(parsedSignature.multisig.multisig_pk)
810293
- };
810294
- }
810295
- const publicKey3 = publicKeyFromRawBytes(
810296
- parsedSignature.signatureScheme,
810297
- parsedSignature.publicKey,
810298
- options22
810299
- );
810300
- return {
810301
- ...parsedSignature,
810302
- publicKey: publicKey3
810303
- };
810304
- }
810305
- function publicKeyFromRawBytes(signatureScheme, bytes7, options22 = {}) {
810306
- let publicKey3;
810307
- switch (signatureScheme) {
810308
- case "ED25519":
810309
- publicKey3 = new Ed25519PublicKey3(bytes7);
810310
- break;
810311
- case "Secp256k1":
810312
- publicKey3 = new Secp256k1PublicKey(bytes7);
810313
- break;
810314
- case "Secp256r1":
810315
- publicKey3 = new Secp256r1PublicKey(bytes7);
810316
- break;
810317
- case "MultiSig":
810318
- publicKey3 = new MultiSigPublicKey2(bytes7);
810319
- break;
810320
- case "ZkLogin":
810321
- publicKey3 = ZkLoginPublicIdentifier.fromBytes(bytes7, options22);
810322
- break;
810323
- case "Passkey":
810324
- publicKey3 = new PasskeyPublicKey(bytes7);
810325
- break;
810326
- default:
810327
- throw new Error(`Unsupported signature scheme ${signatureScheme}`);
810328
- }
810329
- if (options22.address && publicKey3.toSuiAddress() !== options22.address) {
810330
- throw new Error(`Public key bytes do not match the provided address`);
810331
- }
810332
- return publicKey3;
810333
- }
810334
-
810335
808195
  // ../../node_modules/.pnpm/@mysten+signers@0.2.10_typescript@5.4.3/node_modules/@mysten/signers/dist/esm/ledger/bcs.js
810336
808196
  var SUI_FRAMEWORK_ADDRESS2 = normalizeSuiAddress("0x2");
810337
808197
  var SUI_SYSTEM_ADDRESS2 = normalizeSuiAddress("0x3");
@@ -810394,14 +808254,14 @@ var SuiMoveObject = suiBcs.struct("SuiMoveObject", {
810394
808254
  });
810395
808255
 
810396
808256
  // ../../node_modules/.pnpm/@mysten+signers@0.2.10_typescript@5.4.3/node_modules/@mysten/signers/dist/esm/ledger/index.js
810397
- var __typeError11 = (msg) => {
808257
+ var __typeError7 = (msg) => {
810398
808258
  throw TypeError(msg);
810399
808259
  };
810400
- var __accessCheck11 = (obj2, member2, msg) => member2.has(obj2) || __typeError11("Cannot " + msg);
810401
- var __privateGet11 = (obj2, member2, getter) => (__accessCheck11(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
810402
- var __privateAdd11 = (obj2, member2, value5) => member2.has(obj2) ? __typeError11("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
810403
- var __privateSet11 = (obj2, member2, value5, setter) => (__accessCheck11(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
810404
- var __privateMethod6 = (obj2, member2, method2) => (__accessCheck11(obj2, member2, "access private method"), method2);
808260
+ var __accessCheck7 = (obj2, member2, msg) => member2.has(obj2) || __typeError7("Cannot " + msg);
808261
+ var __privateGet7 = (obj2, member2, getter) => (__accessCheck7(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
808262
+ var __privateAdd7 = (obj2, member2, value5) => member2.has(obj2) ? __typeError7("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
808263
+ var __privateSet7 = (obj2, member2, value5, setter) => (__accessCheck7(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
808264
+ var __privateMethod4 = (obj2, member2, method2) => (__accessCheck7(obj2, member2, "access private method"), method2);
810405
808265
  var _derivationPath;
810406
808266
  var _publicKey;
810407
808267
  var _ledgerClient;
@@ -810418,15 +808278,15 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810418
808278
  */
810419
808279
  constructor({ publicKey: publicKey3, derivationPath, ledgerClient, suiClient }) {
810420
808280
  super();
810421
- __privateAdd11(this, _LedgerSigner_instances);
810422
- __privateAdd11(this, _derivationPath);
810423
- __privateAdd11(this, _publicKey);
810424
- __privateAdd11(this, _ledgerClient);
810425
- __privateAdd11(this, _suiClient);
810426
- __privateSet11(this, _publicKey, publicKey3);
810427
- __privateSet11(this, _derivationPath, derivationPath);
810428
- __privateSet11(this, _ledgerClient, ledgerClient);
810429
- __privateSet11(this, _suiClient, suiClient);
808281
+ __privateAdd7(this, _LedgerSigner_instances);
808282
+ __privateAdd7(this, _derivationPath);
808283
+ __privateAdd7(this, _publicKey);
808284
+ __privateAdd7(this, _ledgerClient);
808285
+ __privateAdd7(this, _suiClient);
808286
+ __privateSet7(this, _publicKey, publicKey3);
808287
+ __privateSet7(this, _derivationPath, derivationPath);
808288
+ __privateSet7(this, _ledgerClient, ledgerClient);
808289
+ __privateSet7(this, _suiClient, suiClient);
810430
808290
  }
810431
808291
  /**
810432
808292
  * Retrieves the key scheme used by this signer.
@@ -810439,20 +808299,20 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810439
808299
  * @returns The Ed25519PublicKey instance.
810440
808300
  */
810441
808301
  getPublicKey() {
810442
- return __privateGet11(this, _publicKey);
808302
+ return __privateGet7(this, _publicKey);
810443
808303
  }
810444
808304
  /**
810445
808305
  * Signs the provided transaction bytes.
810446
808306
  * @returns The signed transaction bytes and signature.
810447
808307
  */
810448
808308
  async signTransaction(bytes7) {
810449
- const transactionOptions = await __privateMethod6(this, _LedgerSigner_instances, getClearSigningOptions_fn).call(this, bytes7).catch(() => ({
808309
+ const transactionOptions = await __privateMethod4(this, _LedgerSigner_instances, getClearSigningOptions_fn).call(this, bytes7).catch(() => ({
810450
808310
  // Fail gracefully so network errors or serialization issues don't break transaction signing:
810451
808311
  bcsObjects: []
810452
808312
  }));
810453
808313
  const intentMessage = messageWithIntent("TransactionData", bytes7);
810454
- const { signature: signature4 } = await __privateGet11(this, _ledgerClient).signTransaction(
810455
- __privateGet11(this, _derivationPath),
808314
+ const { signature: signature4 } = await __privateGet7(this, _ledgerClient).signTransaction(
808315
+ __privateGet7(this, _derivationPath),
810456
808316
  intentMessage,
810457
808317
  transactionOptions
810458
808318
  );
@@ -810461,7 +808321,7 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810461
808321
  signature: toSerializedSignature({
810462
808322
  signature: signature4,
810463
808323
  signatureScheme: this.getKeyScheme(),
810464
- publicKey: __privateGet11(this, _publicKey)
808324
+ publicKey: __privateGet7(this, _publicKey)
810465
808325
  })
810466
808326
  };
810467
808327
  }
@@ -810474,8 +808334,8 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810474
808334
  "PersonalMessage",
810475
808335
  suiBcs.byteVector().serialize(bytes7).toBytes()
810476
808336
  );
810477
- const { signature: signature4 } = await __privateGet11(this, _ledgerClient).signTransaction(
810478
- __privateGet11(this, _derivationPath),
808337
+ const { signature: signature4 } = await __privateGet7(this, _ledgerClient).signTransaction(
808338
+ __privateGet7(this, _derivationPath),
810479
808339
  intentMessage
810480
808340
  );
810481
808341
  return {
@@ -810483,7 +808343,7 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810483
808343
  signature: toSerializedSignature({
810484
808344
  signature: signature4,
810485
808345
  signatureScheme: this.getKeyScheme(),
810486
- publicKey: __privateGet11(this, _publicKey)
808346
+ publicKey: __privateGet7(this, _publicKey)
810487
808347
  })
810488
808348
  };
810489
808349
  }
@@ -810531,7 +808391,7 @@ getClearSigningOptions_fn = async function(transactionBytes) {
810531
808391
  const inputObjectIds = data6.inputs.map((input) => {
810532
808392
  return input.$kind === "Object" && input.Object.$kind === "ImmOrOwnedObject" ? input.Object.ImmOrOwnedObject.objectId : null;
810533
808393
  }).filter((objectId) => !!objectId);
810534
- const objects = await __privateGet11(this, _suiClient).multiGetObjects({
808394
+ const objects = await __privateGet7(this, _suiClient).multiGetObjects({
810535
808395
  ids: [...gasObjectIds, ...inputObjectIds],
810536
808396
  options: {
810537
808397
  showBcs: true,
@@ -810684,16 +808544,6 @@ var buildSignOperation23 = (signerContext4) => {
810684
808544
  const ledgerSigner = await LedgerSigner2.fromDerivationPath(account3.freshAddressPath, suiSigner, suiClient);
810685
808545
  return ledgerSigner.signTransaction(unsigned2);
810686
808546
  }));
810687
- if (!transaction.skipVerify) {
810688
- const publicKeyResult = await signerContext4(deviceId, (signer2) => signer2.getPublicKey(account3.freshAddressPath));
810689
- const publicKey3 = new Ed25519PublicKey3(publicKeyResult.publicKey);
810690
- const verify9 = await verifyTransactionSignature(unsigned2, signed3.signature, {
810691
- address: ensureAddressFormat(account3.freshAddress)
810692
- });
810693
- if (!verify9.equals(publicKey3)) {
810694
- throw new Error("verifyTransactionSignature failed");
810695
- }
810696
- }
810697
808547
  subscriber.next({
810698
808548
  type: "device-signature-granted"
810699
808549
  });
@@ -810880,14 +808730,14 @@ function createBridges23(signerContext4, coinConfig18) {
810880
808730
 
810881
808731
  // ../../node_modules/.pnpm/@mysten+ledgerjs-hw-app-sui@0.5.0/node_modules/@mysten/ledgerjs-hw-app-sui/dist/esm/Sui.js
810882
808732
  var import_fast_sha256 = __toESM(require_sha25612(), 1);
810883
- var __typeError12 = (msg) => {
808733
+ var __typeError8 = (msg) => {
810884
808734
  throw TypeError(msg);
810885
808735
  };
810886
- var __accessCheck12 = (obj2, member2, msg) => member2.has(obj2) || __typeError12("Cannot " + msg);
810887
- var __privateGet12 = (obj2, member2, getter) => (__accessCheck12(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
810888
- var __privateAdd12 = (obj2, member2, value5) => member2.has(obj2) ? __typeError12("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
810889
- var __privateSet12 = (obj2, member2, value5, setter) => (__accessCheck12(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
810890
- var __privateMethod7 = (obj2, member2, method2) => (__accessCheck12(obj2, member2, "access private method"), method2);
808736
+ var __accessCheck8 = (obj2, member2, msg) => member2.has(obj2) || __typeError8("Cannot " + msg);
808737
+ var __privateGet8 = (obj2, member2, getter) => (__accessCheck8(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
808738
+ var __privateAdd8 = (obj2, member2, value5) => member2.has(obj2) ? __typeError8("Cannot add the same private member more than once") : member2 instanceof WeakSet ? member2.add(obj2) : member2.set(obj2, value5);
808739
+ var __privateSet8 = (obj2, member2, value5, setter) => (__accessCheck8(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
808740
+ var __privateMethod5 = (obj2, member2, method2) => (__accessCheck8(obj2, member2, "access private method"), method2);
810891
808741
  var _verbose;
810892
808742
  var _Sui_instances;
810893
808743
  var internalGetVersion_fn;
@@ -810903,9 +808753,9 @@ var LedgerToHost = /* @__PURE__ */ ((LedgerToHost2) => {
810903
808753
  })(LedgerToHost || {});
810904
808754
  var Sui = class {
810905
808755
  constructor(transport, scrambleKey = "default_sui_scramble_key", verbose = false) {
810906
- __privateAdd12(this, _Sui_instances);
810907
- __privateAdd12(this, _verbose);
810908
- __privateSet12(this, _verbose, verbose);
808756
+ __privateAdd8(this, _Sui_instances);
808757
+ __privateAdd8(this, _verbose);
808758
+ __privateSet8(this, _verbose, verbose);
810909
808759
  this.transport = transport;
810910
808760
  this.transport.decorateAppAPIMethods(
810911
808761
  this,
@@ -810926,7 +808776,7 @@ var Sui = class {
810926
808776
  const p1 = 0;
810927
808777
  const p210 = 0;
810928
808778
  const payload = buildBip32KeyPayload(path4);
810929
- const response = await __privateMethod7(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payload);
808779
+ const response = await __privateMethod5(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payload);
810930
808780
  const keySize = response[0];
810931
808781
  const publicKey3 = response.slice(1, keySize + 1);
810932
808782
  let address4 = null;
@@ -810952,19 +808802,19 @@ var Sui = class {
810952
808802
  const ins = 3;
810953
808803
  const p1 = 0;
810954
808804
  const p210 = 0;
810955
- if (__privateGet12(this, _verbose))
810956
- __privateMethod7(this, _Sui_instances, log_fn).call(this, txn);
808805
+ if (__privateGet8(this, _verbose))
808806
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, txn);
810957
808807
  const rawTxn = Buffer.from(txn);
810958
808808
  const hashSize = Buffer.alloc(4);
810959
808809
  hashSize.writeUInt32LE(rawTxn.length, 0);
810960
808810
  const payloadTxn = Buffer.concat([hashSize, rawTxn]);
810961
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Payload Txn", payloadTxn);
808811
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Payload Txn", payloadTxn);
810962
808812
  const bip32KeyPayload = buildBip32KeyPayload(path4);
810963
808813
  const payloads = [payloadTxn, bip32KeyPayload];
810964
- const { major } = await __privateMethod7(this, _Sui_instances, internalGetVersion_fn).call(this);
808814
+ const { major } = await __privateMethod5(this, _Sui_instances, internalGetVersion_fn).call(this);
810965
808815
  const bcsObjects = options22?.bcsObjects ?? [];
810966
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Objects list length", bcsObjects.length);
810967
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "App version", major);
808816
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Objects list length", bcsObjects.length);
808817
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "App version", major);
810968
808818
  if (major > 0 && bcsObjects.length > 0) {
810969
808819
  const numItems = Buffer.alloc(4);
810970
808820
  numItems.writeUInt32LE(bcsObjects.length, 0);
@@ -810977,20 +808827,20 @@ var Sui = class {
810977
808827
  }
810978
808828
  payloads.push(listData);
810979
808829
  }
810980
- const signature4 = await __privateMethod7(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payloads);
808830
+ const signature4 = await __privateMethod5(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payloads);
810981
808831
  return { signature: signature4 };
810982
808832
  }
810983
808833
  /**
810984
808834
  * Retrieve the app version on the attached Ledger device.
810985
808835
  */
810986
808836
  async getVersion() {
810987
- return await __privateMethod7(this, _Sui_instances, internalGetVersion_fn).call(this);
808837
+ return await __privateMethod5(this, _Sui_instances, internalGetVersion_fn).call(this);
810988
808838
  }
810989
808839
  };
810990
808840
  _verbose = /* @__PURE__ */ new WeakMap();
810991
808841
  _Sui_instances = /* @__PURE__ */ new WeakSet();
810992
808842
  internalGetVersion_fn = async function() {
810993
- const [major, minor, patch] = await __privateMethod7(this, _Sui_instances, sendChunks_fn).call(this, 0, 0, 0, 0, Buffer.alloc(1));
808843
+ const [major, minor, patch] = await __privateMethod5(this, _Sui_instances, sendChunks_fn).call(this, 0, 0, 0, 0, Buffer.alloc(1));
810994
808844
  return {
810995
808845
  major,
810996
808846
  minor,
@@ -811011,11 +808861,11 @@ sendChunks_fn = async function(cla, ins, p1, p210, payload, extraData = /* @__PU
811011
808861
  chunkList.push(cur);
811012
808862
  }
811013
808863
  let lastHash = Buffer.alloc(32);
811014
- __privateMethod7(this, _Sui_instances, log_fn).call(this, lastHash);
808864
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, lastHash);
811015
808865
  data6 = chunkList.reduceRight((blocks2, chunk5) => {
811016
808866
  let linkedChunk = Buffer.concat([lastHash, chunk5]);
811017
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Chunk: ", chunk5);
811018
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "linkedChunk: ", linkedChunk);
808867
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Chunk: ", chunk5);
808868
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "linkedChunk: ", linkedChunk);
811019
808869
  lastHash = Buffer.from((0, import_fast_sha256.default)(linkedChunk));
811020
808870
  blocks2.set(lastHash.toString("hex"), linkedChunk);
811021
808871
  return blocks2;
@@ -811023,8 +808873,8 @@ sendChunks_fn = async function(cla, ins, p1, p210, payload, extraData = /* @__PU
811023
808873
  parameterList.push(lastHash);
811024
808874
  lastHash = Buffer.alloc(32);
811025
808875
  }
811026
- __privateMethod7(this, _Sui_instances, log_fn).call(this, data6);
811027
- return await __privateMethod7(this, _Sui_instances, handleBlocksProtocol_fn).call(this, cla, ins, p1, p210, Buffer.concat([Buffer.from([
808876
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, data6);
808877
+ return await __privateMethod5(this, _Sui_instances, handleBlocksProtocol_fn).call(this, cla, ins, p1, p210, Buffer.concat([Buffer.from([
811028
808878
  0
811029
808879
  /* START */
811030
808880
  ])].concat(parameterList)), data6);
@@ -811033,9 +808883,9 @@ handleBlocksProtocol_fn = async function(cla, ins, p1, p210, initialPayload, dat
811033
808883
  let payload = initialPayload;
811034
808884
  let result2 = Buffer.alloc(0);
811035
808885
  do {
811036
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Sending payload to ledger: ", payload.toString("hex"));
808886
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Sending payload to ledger: ", payload.toString("hex"));
811037
808887
  let rv = await this.transport.send(cla, ins, p1, p210, payload);
811038
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Received response: ", rv);
808888
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Received response: ", rv);
811039
808889
  var rv_instruction = rv[0];
811040
808890
  let rv_payload = rv.slice(1, rv.length - 2);
811041
808891
  if (!(rv_instruction in LedgerToHost)) {
@@ -811052,8 +808902,8 @@ handleBlocksProtocol_fn = async function(cla, ins, p1, p210, initialPayload, dat
811052
808902
  break;
811053
808903
  case 2:
811054
808904
  let chunk5 = data6.get(rv_payload.toString("hex"));
811055
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Getting block ", rv_payload);
811056
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Found block ", chunk5);
808905
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Getting block ", rv_payload);
808906
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Found block ", chunk5);
811057
808907
  if (chunk5) {
811058
808908
  payload = Buffer.concat([
811059
808909
  Buffer.from([
@@ -811081,7 +808931,7 @@ handleBlocksProtocol_fn = async function(cla, ins, p1, p210, initialPayload, dat
811081
808931
  return result2;
811082
808932
  };
811083
808933
  log_fn = function(...args3) {
811084
- if (__privateGet12(this, _verbose))
808934
+ if (__privateGet8(this, _verbose))
811085
808935
  console.log(args3);
811086
808936
  };
811087
808937
  function buildBip32KeyPayload(path4) {
@@ -818572,9 +816422,6 @@ function getAlpacaCurrencyBridge(network, kind) {
818572
816422
  };
818573
816423
  }
818574
816424
 
818575
- // ../../libs/ledger-live-common/lib-es/bridge/crypto-assets/index.js
818576
- var import_LiveConfig3 = __toESM(require_LiveConfig());
818577
-
818578
816425
  // ../../libs/ledger-live-common/lib-es/bridge/impl.js
818579
816426
  var alpacaized = {
818580
816427
  xrp: true
@@ -818985,7 +816832,7 @@ var import_bignumber361 = __toESM(require("bignumber.js"));
818985
816832
  var import_bignumber362 = require("bignumber.js");
818986
816833
 
818987
816834
  // ../../libs/coin-modules/coin-ton/lib-es/deviceTransactionConfig.js
818988
- var import_core22 = __toESM(require_dist2());
816835
+ var import_core21 = __toESM(require_dist2());
818989
816836
  var import_bignumber363 = require("bignumber.js");
818990
816837
 
818991
816838
  // ../../libs/coin-modules/coin-algorand/lib-es/transaction.js
@@ -820003,7 +817850,7 @@ var transaction_default20 = {
820003
817850
 
820004
817851
  // ../../libs/coin-modules/coin-ton/lib-es/transaction.js
820005
817852
  var import_bignumber381 = __toESM(require("bignumber.js"));
820006
- var import_core23 = __toESM(require_dist2());
817853
+ var import_core22 = __toESM(require_dist2());
820007
817854
  var formatTransaction20 = ({ recipient, useAllAmount, amount }, account3) => `
820008
817855
  SEND ${useAllAmount ? "MAX" : amount.isZero() ? "" : " " + formatCurrencyUnit(getAccountCurrency(account3).units[0], amount, {
820009
817856
  showCode: true,
@@ -820014,7 +817861,7 @@ var getCellOrBuffer = (customPayload) => {
820014
817861
  if (!customPayload)
820015
817862
  return null;
820016
817863
  try {
820017
- return import_core23.Cell.fromBase64(customPayload);
817864
+ return import_core22.Cell.fromBase64(customPayload);
820018
817865
  } catch {
820019
817866
  return Buffer.from(customPayload, "hex");
820020
817867
  }
@@ -820023,14 +817870,14 @@ var safeToBigInt = (value5) => {
820023
817870
  return value5 ? BigInt(value5) : null;
820024
817871
  };
820025
817872
  var safeCellFromBase64 = (value5) => {
820026
- return value5 ? import_core23.Cell.fromBase64(value5) : null;
817873
+ return value5 ? import_core22.Cell.fromBase64(value5) : null;
820027
817874
  };
820028
817875
  var fromRecordRaw = (record4) => {
820029
817876
  if (record4.type === "wallet") {
820030
817877
  return {
820031
817878
  type: record4.type,
820032
817879
  value: record4.value ? {
820033
- address: import_core23.Address.parse(record4.value.address),
817880
+ address: import_core22.Address.parse(record4.value.address),
820034
817881
  capabilities: record4.value.capabilities
820035
817882
  } : null
820036
817883
  };
@@ -820046,15 +817893,15 @@ var fromTransactionPayloadRaw = (payload) => {
820046
817893
  case "unsafe":
820047
817894
  return {
820048
817895
  type: payload.type,
820049
- message: import_core23.Cell.fromBase64(payload.message)
817896
+ message: import_core22.Cell.fromBase64(payload.message)
820050
817897
  };
820051
817898
  case "jetton-transfer":
820052
817899
  return {
820053
817900
  type: payload.type,
820054
817901
  queryId: safeToBigInt(payload.queryId),
820055
817902
  amount: BigInt(payload.amount),
820056
- destination: import_core23.Address.parse(payload.destination),
820057
- responseDestination: import_core23.Address.parse(payload.responseDestination),
817903
+ destination: import_core22.Address.parse(payload.destination),
817904
+ responseDestination: import_core22.Address.parse(payload.responseDestination),
820058
817905
  customPayload: safeCellFromBase64(payload.customPayload),
820059
817906
  forwardAmount: BigInt(payload.forwardAmount),
820060
817907
  forwardPayload: safeCellFromBase64(payload.forwardPayload),
@@ -820064,8 +817911,8 @@ var fromTransactionPayloadRaw = (payload) => {
820064
817911
  return {
820065
817912
  type: payload.type,
820066
817913
  queryId: safeToBigInt(payload.queryId),
820067
- newOwner: import_core23.Address.parse(payload.newOwner),
820068
- responseDestination: import_core23.Address.parse(payload.responseDestination),
817914
+ newOwner: import_core22.Address.parse(payload.newOwner),
817915
+ responseDestination: import_core22.Address.parse(payload.responseDestination),
820069
817916
  customPayload: safeCellFromBase64(payload.customPayload),
820070
817917
  forwardAmount: BigInt(payload.forwardAmount),
820071
817918
  forwardPayload: safeCellFromBase64(payload.forwardPayload)
@@ -820075,7 +817922,7 @@ var fromTransactionPayloadRaw = (payload) => {
820075
817922
  type: payload.type,
820076
817923
  queryId: safeToBigInt(payload.queryId),
820077
817924
  amount: BigInt(payload.amount),
820078
- responseDestination: import_core23.Address.parse(payload.responseDestination),
817925
+ responseDestination: import_core22.Address.parse(payload.responseDestination),
820079
817926
  customPayload: getCellOrBuffer(payload.customPayload)
820080
817927
  };
820081
817928
  case "add-whitelist":
@@ -820083,7 +817930,7 @@ var fromTransactionPayloadRaw = (payload) => {
820083
817930
  return {
820084
817931
  type: payload.type,
820085
817932
  queryId: safeToBigInt(payload.queryId),
820086
- address: import_core23.Address.parse(payload.address)
817933
+ address: import_core22.Address.parse(payload.address)
820087
817934
  };
820088
817935
  case "single-nominator-withdraw":
820089
817936
  return {
@@ -820101,7 +817948,7 @@ var fromTransactionPayloadRaw = (payload) => {
820101
817948
  return {
820102
817949
  type: payload.type,
820103
817950
  queryId: safeToBigInt(payload.queryId),
820104
- votingAddress: import_core23.Address.parse(payload.votingAddress),
817951
+ votingAddress: import_core22.Address.parse(payload.votingAddress),
820105
817952
  expirationDate: payload.expirationDate,
820106
817953
  vote: payload.vote,
820107
817954
  needConfirmation: payload.needConfirmation
@@ -831466,7 +829313,7 @@ function getPortfolio(topAccounts, range5, cvState, cvCurrency, options22) {
831466
829313
 
831467
829314
  // ../../libs/ledger-live-common/lib-es/crypto/index.js
831468
829315
  var import_sha5 = __toESM(require_sha5());
831469
- function sha25614(buffer2) {
829316
+ function sha25613(buffer2) {
831470
829317
  return (0, import_sha5.default)("sha256").update(buffer2).digest();
831471
829318
  }
831472
829319
 
@@ -831928,7 +829775,7 @@ ${slackBody}`;
831928
829775
  const serializedReport = {
831929
829776
  results: results2.map(convertSpecReport),
831930
829777
  environment: BOT_ENVIRONMENT,
831931
- seedHash: sha25614(getEnv("SEED"))
829778
+ seedHash: sha25613(getEnv("SEED"))
831932
829779
  };
831933
829780
  await Promise.all([
831934
829781
  import_fs3.default.promises.writeFile(import_path3.default.join(BOT_REPORT_FOLDER, "github-report.md"), githubBody, "utf-8"),
@@ -833276,17 +831123,17 @@ var import_bs588 = __toESM(require_bs58());
833276
831123
  // ../../libs/coin-modules/coin-bitcoin/lib-es/crypto-util.js
833277
831124
  var import_ripemd1608 = __toESM(require_ripemd160());
833278
831125
  var import_sha6 = __toESM(require_sha5());
833279
- function sha25615(buffer2) {
831126
+ function sha25614(buffer2) {
833280
831127
  return (0, import_sha6.default)("sha256").update(buffer2).digest();
833281
831128
  }
833282
831129
  function hash2562(buffer2) {
833283
- return sha25615(sha25615(buffer2));
831130
+ return sha25614(sha25614(buffer2));
833284
831131
  }
833285
831132
  function ripemd1607(buffer2) {
833286
831133
  return new import_ripemd1608.default().update(buffer2).digest();
833287
831134
  }
833288
831135
  function hash1604(buffer2) {
833289
- return ripemd1607(sha25615(buffer2));
831136
+ return ripemd1607(sha25614(buffer2));
833290
831137
  }
833291
831138
 
833292
831139
  // ../../libs/coin-modules/coin-bitcoin/lib-es/descriptor.js
@@ -834181,12 +832028,12 @@ init_lib_es();
834181
832028
 
834182
832029
  // ../../libs/device-core/lib-es/managerApi/use-cases/getUserHashes.js
834183
832030
  var import_sha7 = __toESM(require_sha5());
834184
- function sha25616(buffer2) {
832031
+ function sha25615(buffer2) {
834185
832032
  return (0, import_sha7.default)("sha256").update(buffer2).digest();
834186
832033
  }
834187
832034
  function userHashesPerUserId(userId) {
834188
- const firmwareSalt = sha25616(userId + "|firmwareSalt").toString("hex").slice(0, 6);
834189
- const endpointOverrides100 = sha25616(userId + "|endpoint").readUInt16BE(0) % 100;
832035
+ const firmwareSalt = sha25615(userId + "|firmwareSalt").toString("hex").slice(0, 6);
832036
+ const endpointOverrides100 = sha25615(userId + "|endpoint").readUInt16BE(0) % 100;
834190
832037
  return {
834191
832038
  firmwareSalt,
834192
832039
  endpointOverrides100
@@ -844806,8 +842653,8 @@ var import_rxjs264 = require("rxjs");
844806
842653
 
844807
842654
  // ../../libs/ledger-live-common/lib-es/user.js
844808
842655
  var userHashesPerUserId2 = (userId) => {
844809
- const firmwareSalt = sha25614(userId + "|firmwareSalt").toString("hex").slice(0, 6);
844810
- const endpointOverrides100 = sha25614(userId + "|endpoint").readUInt16BE(0) % 100;
842656
+ const firmwareSalt = sha25613(userId + "|firmwareSalt").toString("hex").slice(0, 6);
842657
+ const endpointOverrides100 = sha25613(userId + "|endpoint").readUInt16BE(0) % 100;
844811
842658
  return {
844812
842659
  firmwareSalt,
844813
842660
  endpointOverrides100
@@ -845275,7 +843122,7 @@ init_lib_es2();
845275
843122
  var import_bignumber419 = require("bignumber.js");
845276
843123
  var import_invariant120 = __toESM(require("invariant"));
845277
843124
  var import_rxjs267 = require("rxjs");
845278
- var import_secp256k116 = __toESM(require_secp256k12());
843125
+ var import_secp256k115 = __toESM(require_secp256k12());
845279
843126
 
845280
843127
  // ../../libs/ledger-live-common/lib-es/exchange/index.js
845281
843128
  var import_semver28 = __toESM(require_semver2());
@@ -845756,7 +843603,7 @@ var initSwap = (input) => {
845756
843603
  await swap.processTransaction(Buffer.from(swapResult.binaryPayload, "hex"), estimatedFees);
845757
843604
  if (unsubscribed)
845758
843605
  return;
845759
- const goodSign = import_secp256k116.default.signatureExport(Buffer.from(swapResult.signature, "hex"));
843606
+ const goodSign = import_secp256k115.default.signatureExport(Buffer.from(swapResult.signature, "hex"));
845760
843607
  await swap.checkTransactionSignature(goodSign);
845761
843608
  if (unsubscribed)
845762
843609
  return;
@@ -847235,10 +845082,4 @@ ky/distribution/index.js:
847235
845082
 
847236
845083
  @scure/base/lib/esm/index.js:
847237
845084
  (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
847238
-
847239
- @noble/curves/esm/nist.js:
847240
- (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
847241
-
847242
- @noble/curves/esm/p256.js:
847243
- (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
847244
845085
  */