@ledgerhq/live-cli 24.19.5-nightly.0 → 24.20.0-nightly.2

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 +563 -2595
  2. package/package.json +3 -3
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.2",
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.20.0-nightly.2",
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",
@@ -533296,6 +533245,72 @@ var cryptocurrenciesById = {
533296
533245
  }
533297
533246
  ]
533298
533247
  },
533248
+ berachain: {
533249
+ type: "CryptoCurrency",
533250
+ id: "berachain",
533251
+ coinType: CoinType.ETH,
533252
+ name: "Berachain",
533253
+ managerAppName: "Ethereum",
533254
+ ticker: "BERA",
533255
+ scheme: "berachain",
533256
+ color: "#814625",
533257
+ family: "evm",
533258
+ units: ethereumUnits("BERA", "BERA"),
533259
+ ethereumLikeInfo: {
533260
+ chainId: 80094
533261
+ },
533262
+ explorerViews: [
533263
+ {
533264
+ tx: "https://berascan.com/tx/$hash",
533265
+ address: "https://berascan.com/address/$address",
533266
+ token: "https://berascan.com/token/$contractAddress?a=$address"
533267
+ }
533268
+ ]
533269
+ },
533270
+ sei_network_evm: {
533271
+ type: "CryptoCurrency",
533272
+ id: "sei_network_evm",
533273
+ coinType: CoinType.ETH,
533274
+ name: "SEI Network EVM",
533275
+ managerAppName: "Ethereum",
533276
+ ticker: "SEI",
533277
+ scheme: "sei",
533278
+ color: "#89395b",
533279
+ family: "evm",
533280
+ units: ethereumUnits("SEI", "SEI"),
533281
+ ethereumLikeInfo: {
533282
+ chainId: 1329
533283
+ },
533284
+ explorerViews: [
533285
+ {
533286
+ tx: "https://seistream.app/transactions/$hash",
533287
+ address: "https://seistream.app/account/$address",
533288
+ token: "https://seistream.app/tokens/$address"
533289
+ }
533290
+ ]
533291
+ },
533292
+ hyperevm: {
533293
+ type: "CryptoCurrency",
533294
+ id: "hyperevm",
533295
+ coinType: CoinType.ETH,
533296
+ name: "HyperEVM",
533297
+ managerAppName: "Ethereum",
533298
+ ticker: "HYPE",
533299
+ scheme: "hyperevm",
533300
+ color: "#97FCE4",
533301
+ family: "evm",
533302
+ units: ethereumUnits("HYPE", "HYPE"),
533303
+ ethereumLikeInfo: {
533304
+ chainId: 999
533305
+ },
533306
+ explorerViews: [
533307
+ {
533308
+ tx: "https://www.hyperscan.com/tx/$hash",
533309
+ address: "https://www.hyperscan.com/address/$address",
533310
+ token: "https://www.hyperscan.com/token/$contractAddress"
533311
+ }
533312
+ ]
533313
+ },
533299
533314
  polygon_zk_evm: {
533300
533315
  type: "CryptoCurrency",
533301
533316
  id: "polygon_zk_evm",
@@ -534482,7 +534497,10 @@ var abandonSeedAddresses = {
534482
534497
  sonic: EVM_DEAD_ADDRESS,
534483
534498
  sonic_blaze: EVM_DEAD_ADDRESS,
534484
534499
  mina: "B62qmphduibdMJQjEvnnDizL9kVV4ripuiE9adR2wsqtegJaxHJzCic",
534485
- babylon: "bbn1vh34djka7ug2gww9njrsmmr7emj3dx3paz5sj4"
534500
+ babylon: "bbn1vh34djka7ug2gww9njrsmmr7emj3dx3paz5sj4",
534501
+ hyperevm: EVM_DEAD_ADDRESS,
534502
+ sei_network_evm: EVM_DEAD_ADDRESS,
534503
+ berachain: EVM_DEAD_ADDRESS
534486
534504
  };
534487
534505
  var getAbandonSeedAddress = (currencyId) => {
534488
534506
  (0, import_invariant.default)(abandonSeedAddresses[currencyId] !== void 0, `No abandonseed available for ${currencyId}`);
@@ -544957,6 +544975,9 @@ setSupportedCurrencies([
544957
544975
  "base_sepolia",
544958
544976
  "stacks",
544959
544977
  "telos_evm",
544978
+ "sei_network_evm",
544979
+ "berachain",
544980
+ "hyperevm",
544960
544981
  "coreum",
544961
544982
  "injective",
544962
544983
  "casper",
@@ -559733,7 +559754,7 @@ function checksum(len, fn3) {
559733
559754
  }
559734
559755
  var genBase58 = (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(""));
559735
559756
  var base58 = /* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
559736
- var createBase58check = (sha25617) => /* @__PURE__ */ chain(/* @__PURE__ */ checksum(4, (data6) => sha25617(sha25617(data6))), base58);
559757
+ var createBase58check = (sha25616) => /* @__PURE__ */ chain(/* @__PURE__ */ checksum(4, (data6) => sha25616(sha25616(data6))), base58);
559737
559758
 
559738
559759
  // ../../node_modules/.pnpm/@scure+bip39@1.3.0/node_modules/@scure/bip39/esm/index.js
559739
559760
  function nfkd(str) {
@@ -610289,9 +610310,9 @@ var getFeeData = async (currency24, transaction) => {
610289
610310
  /**
610290
610311
  * ⚠️ We don't know the type of the transaction for sure at this stage since
610291
610312
  * `getFeeData` is called before `getTypedTransaction` in prepareTransaction
610292
- * libs/coin-evm/src/prepareTransaction.ts:201
610313
+ * libs/coin-modules/coin-evm/src/bridge/prepareTransaction.ts:201
610293
610314
  * 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
610315
+ * cf. libs/coin-modules/coin-evm/src/bridge/createTransaction.ts:23
610295
610316
  */
610296
610317
  options: {
610297
610318
  useEIP1559: getEnv("EVM_FORCE_LEGACY_TRANSACTIONS") ? false : transaction.type === 2,
@@ -625805,10 +625826,10 @@ function _decode3(data6, offset2) {
625805
625826
  }
625806
625827
  return { consumed: 1, result: hexlifyByte(data6[offset2]) };
625807
625828
  }
625808
- function decodeRlp(_data3) {
625809
- const data6 = getBytes(_data3, "data");
625829
+ function decodeRlp(_data2) {
625830
+ const data6 = getBytes(_data2, "data");
625810
625831
  const decoded = _decode3(data6, 0);
625811
- assertArgument(decoded.consumed === data6.length, "unexpected junk after rlp payload", "data", _data3);
625832
+ assertArgument(decoded.consumed === data6.length, "unexpected junk after rlp payload", "data", _data2);
625812
625833
  return decoded.result;
625813
625834
  }
625814
625835
 
@@ -626343,9 +626364,9 @@ var _computeHmac = function(algorithm2, key2, data6) {
626343
626364
  return (0, import_crypto12.createHmac)(algorithm2, key2).update(data6).digest();
626344
626365
  };
626345
626366
  var __computeHmac = _computeHmac;
626346
- function computeHmac2(algorithm2, _key, _data3) {
626367
+ function computeHmac2(algorithm2, _key, _data2) {
626347
626368
  const key2 = getBytes(_key, "key");
626348
- const data6 = getBytes(_data3, "data");
626369
+ const data6 = getBytes(_data2, "data");
626349
626370
  return hexlify2(__computeHmac(algorithm2, key2, data6));
626350
626371
  }
626351
626372
  computeHmac2._ = _computeHmac;
@@ -626683,8 +626704,8 @@ var _keccak256 = function(data6) {
626683
626704
  return keccak_2563(data6);
626684
626705
  };
626685
626706
  var __keccak256 = _keccak256;
626686
- function keccak2563(_data3) {
626687
- const data6 = getBytes(_data3, "data");
626707
+ function keccak2563(_data2) {
626708
+ const data6 = getBytes(_data2, "data");
626688
626709
  return hexlify2(__keccak256(data6));
626689
626710
  }
626690
626711
  keccak2563._ = _keccak256;
@@ -626902,8 +626923,8 @@ var _ripemd160 = function(data6) {
626902
626923
  return ripemd1604(data6);
626903
626924
  };
626904
626925
  var __ripemd160 = _ripemd160;
626905
- function ripemd1605(_data3) {
626906
- const data6 = getBytes(_data3, "data");
626926
+ function ripemd1605(_data2) {
626927
+ const data6 = getBytes(_data2, "data");
626907
626928
  return hexlify2(__ripemd160(data6));
626908
626929
  }
626909
626930
  ripemd1605._ = _ripemd160;
@@ -627455,8 +627476,8 @@ var __sha256 = _sha256;
627455
627476
  var __sha512 = _sha512;
627456
627477
  var locked256 = false;
627457
627478
  var locked512 = false;
627458
- function sha2567(_data3) {
627459
- const data6 = getBytes(_data3, "data");
627479
+ function sha2567(_data2) {
627480
+ const data6 = getBytes(_data2, "data");
627460
627481
  return hexlify2(__sha256(data6));
627461
627482
  }
627462
627483
  sha2567._ = _sha256;
@@ -627470,8 +627491,8 @@ sha2567.register = function(func) {
627470
627491
  __sha256 = func;
627471
627492
  };
627472
627493
  Object.freeze(sha2567);
627473
- function sha5127(_data3) {
627474
- const data6 = getBytes(_data3, "data");
627494
+ function sha5127(_data2) {
627495
+ const data6 = getBytes(_data2, "data");
627475
627496
  return hexlify2(__sha512(data6));
627476
627497
  }
627477
627498
  sha5127._ = _sha512;
@@ -635337,8 +635358,8 @@ var Interface2 = class _Interface {
635337
635358
  info: { method: fragment.name, signature: fragment.format() }
635338
635359
  });
635339
635360
  }
635340
- makeError(_data3, tx) {
635341
- const data6 = getBytes(_data3, "data");
635361
+ makeError(_data2, tx) {
635362
+ const data6 = getBytes(_data2, "data");
635342
635363
  const error = AbiCoder2.getBuiltinCallException("call", tx, data6);
635343
635364
  const customPrefix = "execution reverted (unknown custom error)";
635344
635365
  if (error.message.startsWith(customPrefix)) {
@@ -690211,7 +690232,7 @@ function decodeString64(data6, pos, _minor, options22) {
690211
690232
  var encodeString = encodeBytes3;
690212
690233
 
690213
690234
  // ../../node_modules/.pnpm/cborg@4.1.4/node_modules/cborg/lib/4array.js
690214
- function toToken3(_data3, _pos, prefix3, length2) {
690235
+ function toToken3(_data2, _pos, prefix3, length2) {
690215
690236
  return new Token2(Type2.array, length2, prefix3);
690216
690237
  }
690217
690238
  function decodeArrayCompact(data6, pos, minor, _options2) {
@@ -690248,7 +690269,7 @@ encodeArray.encodedSize = function encodedSize5(token) {
690248
690269
  };
690249
690270
 
690250
690271
  // ../../node_modules/.pnpm/cborg@4.1.4/node_modules/cborg/lib/5map.js
690251
- function toToken4(_data3, _pos, prefix3, length2) {
690272
+ function toToken4(_data2, _pos, prefix3, length2) {
690252
690273
  return new Token2(Type2.map, length2, prefix3);
690253
690274
  }
690254
690275
  function decodeMapCompact(data6, pos, minor, _options2) {
@@ -690285,7 +690306,7 @@ encodeMap.encodedSize = function encodedSize6(token) {
690285
690306
  };
690286
690307
 
690287
690308
  // ../../node_modules/.pnpm/cborg@4.1.4/node_modules/cborg/lib/6tag.js
690288
- function decodeTagCompact(_data3, _pos, minor, _options2) {
690309
+ function decodeTagCompact(_data2, _pos, minor, _options2) {
690289
690310
  return new Token2(Type2.tag, minor, 1);
690290
690311
  }
690291
690312
  function decodeTag8(data6, pos, _minor, options22) {
@@ -690313,7 +690334,7 @@ var MINOR_FALSE = 20;
690313
690334
  var MINOR_TRUE = 21;
690314
690335
  var MINOR_NULL = 22;
690315
690336
  var MINOR_UNDEFINED = 23;
690316
- function decodeUndefined(_data3, _pos, _minor, options22) {
690337
+ function decodeUndefined(_data2, _pos, _minor, options22) {
690317
690338
  if (options22.allowUndefined === false) {
690318
690339
  throw new Error(`${decodeErrPrefix} undefined values are not supported`);
690319
690340
  } else if (options22.coerceUndefinedToNull === true) {
@@ -690321,7 +690342,7 @@ function decodeUndefined(_data3, _pos, _minor, options22) {
690321
690342
  }
690322
690343
  return new Token2(Type2.undefined, void 0, 1);
690323
690344
  }
690324
- function decodeBreak(_data3, _pos, _minor, options22) {
690345
+ function decodeBreak(_data2, _pos, _minor, options22) {
690325
690346
  if (options22.allowIndefinite === false) {
690326
690347
  throw new Error(`${decodeErrPrefix} indefinite length items not allowed`);
690327
690348
  }
@@ -748186,37 +748207,6 @@ function bytesToHex6(bytes7) {
748186
748207
  }
748187
748208
  return hex4;
748188
748209
  }
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
748210
  function utf8ToBytes10(str) {
748221
748211
  if (typeof str !== "string")
748222
748212
  throw new Error("string expected");
@@ -748390,24 +748380,6 @@ var SHA256_IV4 = /* @__PURE__ */ Uint32Array.from([
748390
748380
  528734635,
748391
748381
  1541459225
748392
748382
  ]);
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
748383
  var SHA512_IV = /* @__PURE__ */ Uint32Array.from([
748412
748384
  1779033703,
748413
748385
  4089235720,
@@ -748799,30 +748771,8 @@ var SHA5124 = class extends HashMD4 {
748799
748771
  this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
748800
748772
  }
748801
748773
  };
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
748774
  var sha2569 = /* @__PURE__ */ createHasher(() => new SHA2565());
748824
748775
  var sha5128 = /* @__PURE__ */ createHasher(() => new SHA5124());
748825
- var sha384 = /* @__PURE__ */ createHasher(() => new SHA384());
748826
748776
 
748827
748777
  // ../../node_modules/.pnpm/@noble+curves@1.9.0/node_modules/@noble/curves/esm/abstract/utils.js
748828
748778
  var _0n22 = /* @__PURE__ */ BigInt(0);
@@ -748862,17 +748812,17 @@ function bytesToHex7(bytes7) {
748862
748812
  }
748863
748813
  return hex4;
748864
748814
  }
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);
748815
+ var asciis5 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
748816
+ function asciiToBase165(ch) {
748817
+ if (ch >= asciis5._0 && ch <= asciis5._9)
748818
+ return ch - asciis5._0;
748819
+ if (ch >= asciis5.A && ch <= asciis5.F)
748820
+ return ch - (asciis5.A - 10);
748821
+ if (ch >= asciis5.a && ch <= asciis5.f)
748822
+ return ch - (asciis5.a - 10);
748873
748823
  return;
748874
748824
  }
748875
- function hexToBytes7(hex4) {
748825
+ function hexToBytes6(hex4) {
748876
748826
  if (typeof hex4 !== "string")
748877
748827
  throw new Error("hex string expected, got " + typeof hex4);
748878
748828
  if (hasHexBuiltin2)
@@ -748883,8 +748833,8 @@ function hexToBytes7(hex4) {
748883
748833
  throw new Error("hex string expected, got unpadded hex of length " + hl);
748884
748834
  const array5 = new Uint8Array(al);
748885
748835
  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));
748836
+ const n1 = asciiToBase165(hex4.charCodeAt(hi));
748837
+ const n210 = asciiToBase165(hex4.charCodeAt(hi + 1));
748888
748838
  if (n1 === void 0 || n210 === void 0) {
748889
748839
  const char = hex4[hi] + hex4[hi + 1];
748890
748840
  throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
@@ -748901,7 +748851,7 @@ function bytesToNumberLE4(bytes7) {
748901
748851
  return hexToNumber4(bytesToHex7(Uint8Array.from(bytes7).reverse()));
748902
748852
  }
748903
748853
  function numberToBytesBE4(n44, len) {
748904
- return hexToBytes7(n44.toString(16).padStart(len * 2, "0"));
748854
+ return hexToBytes6(n44.toString(16).padStart(len * 2, "0"));
748905
748855
  }
748906
748856
  function numberToBytesLE4(n44, len) {
748907
748857
  return numberToBytesBE4(n44, len).reverse();
@@ -748910,7 +748860,7 @@ function ensureBytes4(title, hex4, expectedLength) {
748910
748860
  let res;
748911
748861
  if (typeof hex4 === "string") {
748912
748862
  try {
748913
- res = hexToBytes7(hex4);
748863
+ res = hexToBytes6(hex4);
748914
748864
  } catch (e34) {
748915
748865
  throw new Error(title + " must be hex string or Uint8Array, cause: " + e34);
748916
748866
  }
@@ -751491,14 +751441,14 @@ function weierstrass4(curveDef) {
751491
751441
  }
751492
751442
  // DER-encoded
751493
751443
  toDERRawBytes() {
751494
- return hexToBytes7(this.toDERHex());
751444
+ return hexToBytes6(this.toDERHex());
751495
751445
  }
751496
751446
  toDERHex() {
751497
751447
  return DER4.hexFromSig(this);
751498
751448
  }
751499
751449
  // padded bytes of r, then padded bytes of s
751500
751450
  toCompactRawBytes() {
751501
- return hexToBytes7(this.toCompactHex());
751451
+ return hexToBytes6(this.toCompactHex());
751502
751452
  }
751503
751453
  toCompactHex() {
751504
751454
  return numToNByteHex(this.r) + numToNByteHex(this.s);
@@ -763045,7 +762995,8 @@ var TokenAccountExtensions = array3(union3([
763045
762995
  \u0421piGuardExt,
763046
762996
  NonTransferableAccountExt,
763047
762997
  ConfidentialTransferFeeAmountExt,
763048
- TransferHookAccountExt
762998
+ TransferHookAccountExt,
762999
+ UnknownExt
763049
763000
  ]));
763050
763001
  var MintExtensionType = enums([
763051
763002
  "transferFeeConfig",
@@ -769199,7 +769150,7 @@ var SHA512_256 = class extends SHA5125 {
769199
769150
  this.outputLen = 32;
769200
769151
  }
769201
769152
  };
769202
- var SHA3842 = class extends SHA5125 {
769153
+ var SHA384 = class extends SHA5125 {
769203
769154
  constructor() {
769204
769155
  super();
769205
769156
  this.Ah = 3418070365 | 0;
@@ -769224,7 +769175,7 @@ var SHA3842 = class extends SHA5125 {
769224
769175
  var sha5129 = wrapConstructor6(() => new SHA5125());
769225
769176
  var sha512_224 = wrapConstructor6(() => new SHA512_224());
769226
769177
  var sha512_256 = wrapConstructor6(() => new SHA512_256());
769227
- var sha3842 = wrapConstructor6(() => new SHA3842());
769178
+ var sha384 = wrapConstructor6(() => new SHA384());
769228
769179
 
769229
769180
  // ../../node_modules/.pnpm/@noble+secp256k1@1.7.1/node_modules/@noble/secp256k1/lib/esm/index.js
769230
769181
  var nodeCrypto2 = __toESM(require("crypto"), 1);
@@ -769589,7 +769540,7 @@ var Point7 = class _Point {
769589
769540
  return Q6;
769590
769541
  }
769591
769542
  toRawBytes(isCompressed2 = false) {
769592
- return hexToBytes9(this.toHex(isCompressed2));
769543
+ return hexToBytes8(this.toHex(isCompressed2));
769593
769544
  }
769594
769545
  toHex(isCompressed2 = false) {
769595
769546
  const x26 = numTo32bStr(this.x);
@@ -769695,7 +769646,7 @@ var Signature3 = class _Signature {
769695
769646
  const arr = hex4 instanceof Uint8Array;
769696
769647
  if (typeof hex4 !== "string" && !arr)
769697
769648
  throw new TypeError(`Signature.fromDER: Expected string or Uint8Array`);
769698
- const { r: r37, s: s58 } = parseDERSignature(arr ? hex4 : hexToBytes9(hex4));
769649
+ const { r: r37, s: s58 } = parseDERSignature(arr ? hex4 : hexToBytes8(hex4));
769699
769650
  return new _Signature(r37, s58);
769700
769651
  }
769701
769652
  static fromHex(hex4) {
@@ -769716,7 +769667,7 @@ var Signature3 = class _Signature {
769716
769667
  return this.hasHighS() ? new _Signature(this.r, mod6(-this.s, CURVE.n)) : this;
769717
769668
  }
769718
769669
  toDERRawBytes() {
769719
- return hexToBytes9(this.toDERHex());
769670
+ return hexToBytes8(this.toDERHex());
769720
769671
  }
769721
769672
  toDERHex() {
769722
769673
  const sHex = sliceDER(numberToHexUnpadded5(this.s));
@@ -769735,7 +769686,7 @@ var Signature3 = class _Signature {
769735
769686
  return this.toDERHex();
769736
769687
  }
769737
769688
  toCompactRawBytes() {
769738
- return hexToBytes9(this.toCompactHex());
769689
+ return hexToBytes8(this.toCompactHex());
769739
769690
  }
769740
769691
  toCompactHex() {
769741
769692
  return numTo32bStr(this.r) + numTo32bStr(this.s);
@@ -769774,7 +769725,7 @@ function numTo32bStr(num) {
769774
769725
  return num.toString(16).padStart(64, "0");
769775
769726
  }
769776
769727
  function numTo32b(num) {
769777
- const b21 = hexToBytes9(numTo32bStr(num));
769728
+ const b21 = hexToBytes8(numTo32bStr(num));
769778
769729
  if (b21.length !== 32)
769779
769730
  throw new Error("Error: expected 32 bytes");
769780
769731
  return b21;
@@ -769789,7 +769740,7 @@ function hexToNumber5(hex4) {
769789
769740
  }
769790
769741
  return BigInt(`0x${hex4}`);
769791
769742
  }
769792
- function hexToBytes9(hex4) {
769743
+ function hexToBytes8(hex4) {
769793
769744
  if (typeof hex4 !== "string") {
769794
769745
  throw new TypeError("hexToBytes: expected string, got " + typeof hex4);
769795
769746
  }
@@ -769810,7 +769761,7 @@ function bytesToNumber2(bytes7) {
769810
769761
  return hexToNumber5(bytesToHex9(bytes7));
769811
769762
  }
769812
769763
  function ensureBytes5(hex4) {
769813
- return hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes9(hex4);
769764
+ return hex4 instanceof Uint8Array ? Uint8Array.from(hex4) : hexToBytes8(hex4);
769814
769765
  }
769815
769766
  function normalizeScalar(num) {
769816
769767
  if (typeof num === "number" && Number.isSafeInteger(num) && num > 0)
@@ -770094,7 +770045,7 @@ var crypto32 = {
770094
770045
  var TAGGED_HASH_PREFIXES = {};
770095
770046
  var utils3 = {
770096
770047
  bytesToHex: bytesToHex9,
770097
- hexToBytes: hexToBytes9,
770048
+ hexToBytes: hexToBytes8,
770098
770049
  concatBytes: concatBytes10,
770099
770050
  mod: mod6,
770100
770051
  invert: invert5,
@@ -770221,7 +770172,7 @@ init_esm4();
770221
770172
  var import_c32check2 = __toESM(require_lib59());
770222
770173
  init_esm4();
770223
770174
  function createMessageSignature(signature4) {
770224
- const length2 = hexToBytes8(signature4).byteLength;
770175
+ const length2 = hexToBytes7(signature4).byteLength;
770225
770176
  if (length2 != RECOVERABLE_ECDSA_SIG_LENGTH_BYTES) {
770226
770177
  throw Error("Invalid signature");
770227
770178
  }
@@ -770589,14 +770540,14 @@ utils3.hmacSha256Sync = (key2, ...msgs) => {
770589
770540
  function getAddressFromPublicKey(publicKey3, transactionVersion = TransactionVersion2.Mainnet) {
770590
770541
  publicKey3 = typeof publicKey3 === "string" ? publicKey3 : bytesToHex8(publicKey3);
770591
770542
  const addrVer = addressHashModeToVersion(AddressHashMode.SerializeP2PKH, transactionVersion);
770592
- const addr = addressFromVersionHash(addrVer, hashP2PKH(hexToBytes8(publicKey3)));
770543
+ const addr = addressFromVersionHash(addrVer, hashP2PKH(hexToBytes7(publicKey3)));
770593
770544
  const addrString = addressToString(addr);
770594
770545
  return addrString;
770595
770546
  }
770596
770547
  function createStacksPublicKey(key2) {
770597
770548
  return {
770598
770549
  type: StacksMessageType.PublicKey,
770599
- data: hexToBytes8(key2)
770550
+ data: hexToBytes7(key2)
770600
770551
  };
770601
770552
  }
770602
770553
  function publicKeyFromSignatureVrs(messageHash, messageSignature, pubKeyEncoding = PubKeyEncoding.Compressed) {
@@ -770709,13 +770660,13 @@ function serializePayload(payload) {
770709
770660
  bytesArray.push(payload.vrfProof);
770710
770661
  break;
770711
770662
  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));
770663
+ bytesArray.push(hexToBytes7(payload.tenureHash));
770664
+ bytesArray.push(hexToBytes7(payload.previousTenureHash));
770665
+ bytesArray.push(hexToBytes7(payload.burnViewHash));
770666
+ bytesArray.push(hexToBytes7(payload.previousTenureEnd));
770716
770667
  bytesArray.push(writeUInt32BE(new Uint8Array(4), payload.previousTenureBlocks));
770717
770668
  bytesArray.push(writeUInt8(new Uint8Array(1), payload.cause));
770718
- bytesArray.push(hexToBytes8(payload.publicKeyHash));
770669
+ bytesArray.push(hexToBytes7(payload.publicKeyHash));
770719
770670
  break;
770720
770671
  }
770721
770672
  return concatArray(bytesArray);
@@ -770775,7 +770726,7 @@ function createTransactionAuthField(pubKeyEncoding, contents) {
770775
770726
  };
770776
770727
  }
770777
770728
  function serializeMessageSignature(messageSignature) {
770778
- return hexToBytes8(messageSignature.data);
770729
+ return hexToBytes7(messageSignature.data);
770779
770730
  }
770780
770731
  function serializeTransactionAuthField(field) {
770781
770732
  const bytesArray = [];
@@ -770855,8 +770806,8 @@ function addressFromPublicKeys(version33, hashMode, numSigs, publicKeys) {
770855
770806
  }
770856
770807
  function serializeAddress(address4) {
770857
770808
  const bytesArray = [];
770858
- bytesArray.push(hexToBytes8(intToHex(address4.version, 1)));
770859
- bytesArray.push(hexToBytes8(address4.hash160));
770809
+ bytesArray.push(hexToBytes7(intToHex(address4.version, 1)));
770810
+ bytesArray.push(hexToBytes7(address4.hash160));
770860
770811
  return concatArray(bytesArray);
770861
770812
  }
770862
770813
  function deserializeAddress(bytesReader) {
@@ -770877,7 +770828,7 @@ function serializeLPString(lps) {
770877
770828
  const bytesArray = [];
770878
770829
  const contentBytes = utf8ToBytes11(lps.content);
770879
770830
  const length2 = contentBytes.byteLength;
770880
- bytesArray.push(hexToBytes8(intToHex(length2, lps.lengthPrefixBytes)));
770831
+ bytesArray.push(hexToBytes7(intToHex(length2, lps.lengthPrefixBytes)));
770881
770832
  bytesArray.push(contentBytes);
770882
770833
  return concatArray(bytesArray);
770883
770834
  }
@@ -770897,7 +770848,7 @@ function serializeMemoString(memoString) {
770897
770848
  const bytesArray = [];
770898
770849
  const contentBytes = utf8ToBytes11(memoString.content);
770899
770850
  const paddedContent = rightPadHexToLength(bytesToHex8(contentBytes), MEMO_MAX_LENGTH_BYTES * 2);
770900
- bytesArray.push(hexToBytes8(paddedContent));
770851
+ bytesArray.push(hexToBytes7(paddedContent));
770901
770852
  return concatArray(bytesArray);
770902
770853
  }
770903
770854
  function serializeAssetInfo(info6) {
@@ -770917,7 +770868,7 @@ function createLPList(values, lengthPrefixBytes) {
770917
770868
  function serializeLPList(lpList) {
770918
770869
  const list2 = lpList.values;
770919
770870
  const bytesArray = [];
770920
- bytesArray.push(hexToBytes8(intToHex(list2.length, lpList.lengthPrefixBytes)));
770871
+ bytesArray.push(hexToBytes7(intToHex(list2.length, lpList.lengthPrefixBytes)));
770921
770872
  for (const l69 of list2) {
770922
770873
  bytesArray.push(serializeStacksMessage(l69));
770923
770874
  }
@@ -771122,7 +771073,7 @@ function deserializeCV(serializedClarityValue) {
771122
771073
  let bytesReader;
771123
771074
  if (typeof serializedClarityValue === "string") {
771124
771075
  const hasHexPrefix = serializedClarityValue.slice(0, 2).toLowerCase() === "0x";
771125
- bytesReader = new BytesReader(hexToBytes8(hasHexPrefix ? serializedClarityValue.slice(2) : serializedClarityValue));
771076
+ bytesReader = new BytesReader(hexToBytes7(hasHexPrefix ? serializedClarityValue.slice(2) : serializedClarityValue));
771126
771077
  } else if (serializedClarityValue instanceof Uint8Array) {
771127
771078
  bytesReader = new BytesReader(serializedClarityValue);
771128
771079
  } else {
@@ -771312,7 +771263,7 @@ function clearCondition(condition) {
771312
771263
  function serializeSingleSigSpendingCondition(condition) {
771313
771264
  const bytesArray = [
771314
771265
  condition.hashMode,
771315
- hexToBytes8(condition.signer),
771266
+ hexToBytes7(condition.signer),
771316
771267
  intToBytes(condition.nonce, false, 8),
771317
771268
  intToBytes(condition.fee, false, 8),
771318
771269
  condition.keyEncoding,
@@ -771323,7 +771274,7 @@ function serializeSingleSigSpendingCondition(condition) {
771323
771274
  function serializeMultiSigSpendingCondition(condition) {
771324
771275
  const bytesArray = [
771325
771276
  condition.hashMode,
771326
- hexToBytes8(condition.signer),
771277
+ hexToBytes7(condition.signer),
771327
771278
  intToBytes(condition.nonce, false, 8),
771328
771279
  intToBytes(condition.fee, false, 8)
771329
771280
  ];
@@ -771343,16 +771294,16 @@ function serializeSpendingCondition(condition) {
771343
771294
  function makeSigHashPreSign(curSigHash, authType, fee, nonce) {
771344
771295
  const hashLength = 32 + 1 + 8 + 8;
771345
771296
  const sigHash = curSigHash + bytesToHex8(new Uint8Array([authType])) + bytesToHex8(intToBytes(fee, false, 8)) + bytesToHex8(intToBytes(nonce, false, 8));
771346
- if (hexToBytes8(sigHash).byteLength !== hashLength) {
771297
+ if (hexToBytes7(sigHash).byteLength !== hashLength) {
771347
771298
  throw Error("Invalid signature hash length");
771348
771299
  }
771349
- return txidFromData(hexToBytes8(sigHash));
771300
+ return txidFromData(hexToBytes7(sigHash));
771350
771301
  }
771351
771302
  function makeSigHashPostSign(curSigHash, pubKey, signature4) {
771352
771303
  const hashLength = 32 + 1 + RECOVERABLE_ECDSA_SIG_LENGTH_BYTES;
771353
771304
  const pubKeyEncoding = isCompressed(pubKey) ? PubKeyEncoding.Compressed : PubKeyEncoding.Uncompressed;
771354
771305
  const sigHash = curSigHash + leftPadHex(pubKeyEncoding.toString(16)) + signature4.data;
771355
- const sigHashBytes = hexToBytes8(sigHash);
771306
+ const sigHashBytes = hexToBytes7(sigHash);
771356
771307
  if (sigHashBytes.byteLength > hashLength) {
771357
771308
  throw Error("Invalid signature hash length");
771358
771309
  }
@@ -807445,13 +807396,11 @@ var fetcher = (url4, options22, retry6 = 3) => {
807445
807396
  };
807446
807397
  async function withApi2(execute2) {
807447
807398
  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
- }
807399
+ const transport = new SuiHTTPTransport({
807400
+ url: url4,
807401
+ fetch: fetcher
807402
+ });
807403
+ apiMap[url4] ??= new SuiClient({ transport });
807455
807404
  const result2 = await execute2(apiMap[url4]);
807456
807405
  return result2;
807457
807406
  }
@@ -807555,11 +807504,35 @@ function transactionToOperation3(accountId2, address4, transaction) {
807555
807504
  };
807556
807505
  }
807557
807506
  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));
807507
+ const sentOps = await loadOperations({
807508
+ api: api7,
807509
+ addr,
807510
+ type: "OUT",
807511
+ cursor,
807512
+ order: cursor ? "ascending" : "descending",
807513
+ operations: []
807514
+ });
807515
+ const receivedOps = await loadOperations({
807516
+ api: api7,
807517
+ addr,
807518
+ type: "IN",
807519
+ cursor,
807520
+ order: cursor ? "ascending" : "descending",
807521
+ operations: []
807522
+ });
807523
+ const rawTransactions = filterOperations(sentOps, receivedOps, cursor);
807561
807524
  return rawTransactions.map((transaction) => transactionToOperation3(accountId2, addr, transaction));
807562
807525
  });
807526
+ var filterOperations = (operationList1, operationList2, cursor) => {
807527
+ let filterTimestamp = 0;
807528
+ if (!cursor && operationList1.length && operationList2.length && (operationList1.length === TRANSACTIONS_LIMIT || operationList2.length === TRANSACTIONS_LIMIT)) {
807529
+ const aTime = operationList1[operationList1.length - 1].timestampMs ?? 0;
807530
+ const bTime = operationList2[operationList2.length - 1].timestampMs ?? 0;
807531
+ filterTimestamp = Math.max(Number(aTime), Number(bTime));
807532
+ }
807533
+ const result2 = [...operationList1, ...operationList2].sort((a72, b21) => Number(b21.timestampMs) - Number(a72.timestampMs)).filter((op) => Number(op.timestampMs) >= filterTimestamp);
807534
+ return (0, import_unionBy.default)(result2, (tx) => tx.digest);
807535
+ };
807563
807536
  var getTotalGasUsed = (effects) => {
807564
807537
  const gasSummary = effects?.gasUsed;
807565
807538
  if (!gasSummary)
@@ -807627,43 +807600,40 @@ var createTransaction24 = async (address4, transaction) => withApi2(async (api7)
807627
807600
  var executeTransactionBlock = async (params) => withApi2(async (api7) => {
807628
807601
  return api7.executeTransactionBlock(params);
807629
807602
  });
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
807603
+ var loadOperations = async ({ cursor, operations: operations2, order, ...params }) => {
807604
+ try {
807605
+ if (order === "descending" && operations2.length >= TRANSACTIONS_LIMIT) {
807606
+ return operations2;
807607
+ }
807608
+ const { data: data6, nextCursor, hasNextPage } = await queryTransactions({
807609
+ ...params,
807610
+ order,
807611
+ cursor
807612
+ });
807613
+ operations2.push(...data6);
807614
+ if (!hasNextPage) {
807615
+ return operations2;
807616
+ }
807617
+ await loadOperations({ ...params, cursor: nextCursor, operations: operations2, order });
807618
+ } catch (error) {
807619
+ if (error.type === "InvalidParams") {
807620
+ log2("coin:sui", "(network/sdk): loadOperations failed with cursor, retrying without it", {
807621
+ error,
807622
+ params
807638
807623
  });
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
- }
807624
+ } else {
807625
+ log2("coin:sui", "(network/sdk): loadOperations error", { error, params });
807656
807626
  }
807657
807627
  }
807658
807628
  return operations2;
807659
807629
  };
807660
807630
  var queryTransactions = async (params) => {
807661
- const { api: api7, addr, type: type4, cursor } = params;
807631
+ const { api: api7, addr, type: type4, cursor, order } = params;
807662
807632
  const filter26 = type4 === "IN" ? { ToAddress: addr } : { FromAddress: addr };
807663
807633
  return await api7.queryTransactionBlocks({
807664
807634
  filter: filter26,
807665
807635
  cursor,
807666
- order: "descending",
807636
+ order,
807667
807637
  options: {
807668
807638
  showInput: true,
807669
807639
  showBalanceChanges: true,
@@ -807923,7 +807893,7 @@ var import_rxjs148 = require("rxjs");
807923
807893
  init_lib_es2();
807924
807894
  var PRELOAD_MAX_AGE8 = 30 * 60 * 1e3;
807925
807895
  var currentPreloadedData3 = {};
807926
- function fromHydratePreloadData5(_data3) {
807896
+ function fromHydratePreloadData5(_data2) {
807927
807897
  return {};
807928
807898
  }
807929
807899
  var updates6 = new import_rxjs148.Subject();
@@ -808051,55 +808021,6 @@ var SIGNATURE_FLAG_TO_SCHEME = {
808051
808021
  6: "Passkey"
808052
808022
  };
808053
808023
 
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
808024
  // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/cryptography/publickey.js
808104
808025
  function bytesEqual2(a72, b21) {
808105
808026
  if (a72 === b21)
@@ -808210,1470 +808131,6 @@ function parseSerializedKeypairSignature(serializedSignature) {
808210
808131
  }
808211
808132
  }
808212
808133
 
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
808134
  // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/cryptography/signature.js
809678
808135
  function toSerializedSignature({
809679
808136
  signature: signature4,
@@ -809690,31 +808147,6 @@ function toSerializedSignature({
809690
808147
  serializedSignature.set(pubKeyBytes, 1 + signature4.length);
809691
808148
  return toBase64(serializedSignature);
809692
808149
  }
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
808150
 
809719
808151
  // ../../node_modules/.pnpm/@mysten+sui@1.30.1_typescript@5.4.3/node_modules/@mysten/sui/dist/esm/cryptography/keypair.js
809720
808152
  var Signer2 = class {
@@ -809833,505 +808265,6 @@ var Ed25519PublicKey3 = class extends PublicKey10 {
809833
808265
  };
809834
808266
  Ed25519PublicKey3.SIZE = PUBLIC_KEY_SIZE;
809835
808267
 
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
808268
  // ../../node_modules/.pnpm/@mysten+signers@0.2.10_typescript@5.4.3/node_modules/@mysten/signers/dist/esm/ledger/bcs.js
810336
808269
  var SUI_FRAMEWORK_ADDRESS2 = normalizeSuiAddress("0x2");
810337
808270
  var SUI_SYSTEM_ADDRESS2 = normalizeSuiAddress("0x3");
@@ -810394,14 +808327,14 @@ var SuiMoveObject = suiBcs.struct("SuiMoveObject", {
810394
808327
  });
810395
808328
 
810396
808329
  // ../../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) => {
808330
+ var __typeError7 = (msg) => {
810398
808331
  throw TypeError(msg);
810399
808332
  };
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);
808333
+ var __accessCheck7 = (obj2, member2, msg) => member2.has(obj2) || __typeError7("Cannot " + msg);
808334
+ var __privateGet7 = (obj2, member2, getter) => (__accessCheck7(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
808335
+ 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);
808336
+ var __privateSet7 = (obj2, member2, value5, setter) => (__accessCheck7(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
808337
+ var __privateMethod4 = (obj2, member2, method2) => (__accessCheck7(obj2, member2, "access private method"), method2);
810405
808338
  var _derivationPath;
810406
808339
  var _publicKey;
810407
808340
  var _ledgerClient;
@@ -810418,15 +808351,15 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810418
808351
  */
810419
808352
  constructor({ publicKey: publicKey3, derivationPath, ledgerClient, suiClient }) {
810420
808353
  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);
808354
+ __privateAdd7(this, _LedgerSigner_instances);
808355
+ __privateAdd7(this, _derivationPath);
808356
+ __privateAdd7(this, _publicKey);
808357
+ __privateAdd7(this, _ledgerClient);
808358
+ __privateAdd7(this, _suiClient);
808359
+ __privateSet7(this, _publicKey, publicKey3);
808360
+ __privateSet7(this, _derivationPath, derivationPath);
808361
+ __privateSet7(this, _ledgerClient, ledgerClient);
808362
+ __privateSet7(this, _suiClient, suiClient);
810430
808363
  }
810431
808364
  /**
810432
808365
  * Retrieves the key scheme used by this signer.
@@ -810439,20 +808372,20 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810439
808372
  * @returns The Ed25519PublicKey instance.
810440
808373
  */
810441
808374
  getPublicKey() {
810442
- return __privateGet11(this, _publicKey);
808375
+ return __privateGet7(this, _publicKey);
810443
808376
  }
810444
808377
  /**
810445
808378
  * Signs the provided transaction bytes.
810446
808379
  * @returns The signed transaction bytes and signature.
810447
808380
  */
810448
808381
  async signTransaction(bytes7) {
810449
- const transactionOptions = await __privateMethod6(this, _LedgerSigner_instances, getClearSigningOptions_fn).call(this, bytes7).catch(() => ({
808382
+ const transactionOptions = await __privateMethod4(this, _LedgerSigner_instances, getClearSigningOptions_fn).call(this, bytes7).catch(() => ({
810450
808383
  // Fail gracefully so network errors or serialization issues don't break transaction signing:
810451
808384
  bcsObjects: []
810452
808385
  }));
810453
808386
  const intentMessage = messageWithIntent("TransactionData", bytes7);
810454
- const { signature: signature4 } = await __privateGet11(this, _ledgerClient).signTransaction(
810455
- __privateGet11(this, _derivationPath),
808387
+ const { signature: signature4 } = await __privateGet7(this, _ledgerClient).signTransaction(
808388
+ __privateGet7(this, _derivationPath),
810456
808389
  intentMessage,
810457
808390
  transactionOptions
810458
808391
  );
@@ -810461,7 +808394,7 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810461
808394
  signature: toSerializedSignature({
810462
808395
  signature: signature4,
810463
808396
  signatureScheme: this.getKeyScheme(),
810464
- publicKey: __privateGet11(this, _publicKey)
808397
+ publicKey: __privateGet7(this, _publicKey)
810465
808398
  })
810466
808399
  };
810467
808400
  }
@@ -810474,8 +808407,8 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810474
808407
  "PersonalMessage",
810475
808408
  suiBcs.byteVector().serialize(bytes7).toBytes()
810476
808409
  );
810477
- const { signature: signature4 } = await __privateGet11(this, _ledgerClient).signTransaction(
810478
- __privateGet11(this, _derivationPath),
808410
+ const { signature: signature4 } = await __privateGet7(this, _ledgerClient).signTransaction(
808411
+ __privateGet7(this, _derivationPath),
810479
808412
  intentMessage
810480
808413
  );
810481
808414
  return {
@@ -810483,7 +808416,7 @@ var _LedgerSigner = class _LedgerSigner2 extends Signer2 {
810483
808416
  signature: toSerializedSignature({
810484
808417
  signature: signature4,
810485
808418
  signatureScheme: this.getKeyScheme(),
810486
- publicKey: __privateGet11(this, _publicKey)
808419
+ publicKey: __privateGet7(this, _publicKey)
810487
808420
  })
810488
808421
  };
810489
808422
  }
@@ -810531,7 +808464,7 @@ getClearSigningOptions_fn = async function(transactionBytes) {
810531
808464
  const inputObjectIds = data6.inputs.map((input) => {
810532
808465
  return input.$kind === "Object" && input.Object.$kind === "ImmOrOwnedObject" ? input.Object.ImmOrOwnedObject.objectId : null;
810533
808466
  }).filter((objectId) => !!objectId);
810534
- const objects = await __privateGet11(this, _suiClient).multiGetObjects({
808467
+ const objects = await __privateGet7(this, _suiClient).multiGetObjects({
810535
808468
  ids: [...gasObjectIds, ...inputObjectIds],
810536
808469
  options: {
810537
808470
  showBcs: true,
@@ -810684,16 +808617,6 @@ var buildSignOperation23 = (signerContext4) => {
810684
808617
  const ledgerSigner = await LedgerSigner2.fromDerivationPath(account3.freshAddressPath, suiSigner, suiClient);
810685
808618
  return ledgerSigner.signTransaction(unsigned2);
810686
808619
  }));
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
808620
  subscriber.next({
810698
808621
  type: "device-signature-granted"
810699
808622
  });
@@ -810880,14 +808803,14 @@ function createBridges23(signerContext4, coinConfig18) {
810880
808803
 
810881
808804
  // ../../node_modules/.pnpm/@mysten+ledgerjs-hw-app-sui@0.5.0/node_modules/@mysten/ledgerjs-hw-app-sui/dist/esm/Sui.js
810882
808805
  var import_fast_sha256 = __toESM(require_sha25612(), 1);
810883
- var __typeError12 = (msg) => {
808806
+ var __typeError8 = (msg) => {
810884
808807
  throw TypeError(msg);
810885
808808
  };
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);
808809
+ var __accessCheck8 = (obj2, member2, msg) => member2.has(obj2) || __typeError8("Cannot " + msg);
808810
+ var __privateGet8 = (obj2, member2, getter) => (__accessCheck8(obj2, member2, "read from private field"), getter ? getter.call(obj2) : member2.get(obj2));
808811
+ 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);
808812
+ var __privateSet8 = (obj2, member2, value5, setter) => (__accessCheck8(obj2, member2, "write to private field"), setter ? setter.call(obj2, value5) : member2.set(obj2, value5), value5);
808813
+ var __privateMethod5 = (obj2, member2, method2) => (__accessCheck8(obj2, member2, "access private method"), method2);
810891
808814
  var _verbose;
810892
808815
  var _Sui_instances;
810893
808816
  var internalGetVersion_fn;
@@ -810903,9 +808826,9 @@ var LedgerToHost = /* @__PURE__ */ ((LedgerToHost2) => {
810903
808826
  })(LedgerToHost || {});
810904
808827
  var Sui = class {
810905
808828
  constructor(transport, scrambleKey = "default_sui_scramble_key", verbose = false) {
810906
- __privateAdd12(this, _Sui_instances);
810907
- __privateAdd12(this, _verbose);
810908
- __privateSet12(this, _verbose, verbose);
808829
+ __privateAdd8(this, _Sui_instances);
808830
+ __privateAdd8(this, _verbose);
808831
+ __privateSet8(this, _verbose, verbose);
810909
808832
  this.transport = transport;
810910
808833
  this.transport.decorateAppAPIMethods(
810911
808834
  this,
@@ -810926,7 +808849,7 @@ var Sui = class {
810926
808849
  const p1 = 0;
810927
808850
  const p210 = 0;
810928
808851
  const payload = buildBip32KeyPayload(path4);
810929
- const response = await __privateMethod7(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payload);
808852
+ const response = await __privateMethod5(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payload);
810930
808853
  const keySize = response[0];
810931
808854
  const publicKey3 = response.slice(1, keySize + 1);
810932
808855
  let address4 = null;
@@ -810952,19 +808875,19 @@ var Sui = class {
810952
808875
  const ins = 3;
810953
808876
  const p1 = 0;
810954
808877
  const p210 = 0;
810955
- if (__privateGet12(this, _verbose))
810956
- __privateMethod7(this, _Sui_instances, log_fn).call(this, txn);
808878
+ if (__privateGet8(this, _verbose))
808879
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, txn);
810957
808880
  const rawTxn = Buffer.from(txn);
810958
808881
  const hashSize = Buffer.alloc(4);
810959
808882
  hashSize.writeUInt32LE(rawTxn.length, 0);
810960
808883
  const payloadTxn = Buffer.concat([hashSize, rawTxn]);
810961
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Payload Txn", payloadTxn);
808884
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Payload Txn", payloadTxn);
810962
808885
  const bip32KeyPayload = buildBip32KeyPayload(path4);
810963
808886
  const payloads = [payloadTxn, bip32KeyPayload];
810964
- const { major } = await __privateMethod7(this, _Sui_instances, internalGetVersion_fn).call(this);
808887
+ const { major } = await __privateMethod5(this, _Sui_instances, internalGetVersion_fn).call(this);
810965
808888
  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);
808889
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Objects list length", bcsObjects.length);
808890
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "App version", major);
810968
808891
  if (major > 0 && bcsObjects.length > 0) {
810969
808892
  const numItems = Buffer.alloc(4);
810970
808893
  numItems.writeUInt32LE(bcsObjects.length, 0);
@@ -810977,20 +808900,20 @@ var Sui = class {
810977
808900
  }
810978
808901
  payloads.push(listData);
810979
808902
  }
810980
- const signature4 = await __privateMethod7(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payloads);
808903
+ const signature4 = await __privateMethod5(this, _Sui_instances, sendChunks_fn).call(this, cla, ins, p1, p210, payloads);
810981
808904
  return { signature: signature4 };
810982
808905
  }
810983
808906
  /**
810984
808907
  * Retrieve the app version on the attached Ledger device.
810985
808908
  */
810986
808909
  async getVersion() {
810987
- return await __privateMethod7(this, _Sui_instances, internalGetVersion_fn).call(this);
808910
+ return await __privateMethod5(this, _Sui_instances, internalGetVersion_fn).call(this);
810988
808911
  }
810989
808912
  };
810990
808913
  _verbose = /* @__PURE__ */ new WeakMap();
810991
808914
  _Sui_instances = /* @__PURE__ */ new WeakSet();
810992
808915
  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));
808916
+ const [major, minor, patch] = await __privateMethod5(this, _Sui_instances, sendChunks_fn).call(this, 0, 0, 0, 0, Buffer.alloc(1));
810994
808917
  return {
810995
808918
  major,
810996
808919
  minor,
@@ -811011,11 +808934,11 @@ sendChunks_fn = async function(cla, ins, p1, p210, payload, extraData = /* @__PU
811011
808934
  chunkList.push(cur);
811012
808935
  }
811013
808936
  let lastHash = Buffer.alloc(32);
811014
- __privateMethod7(this, _Sui_instances, log_fn).call(this, lastHash);
808937
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, lastHash);
811015
808938
  data6 = chunkList.reduceRight((blocks2, chunk5) => {
811016
808939
  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);
808940
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Chunk: ", chunk5);
808941
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "linkedChunk: ", linkedChunk);
811019
808942
  lastHash = Buffer.from((0, import_fast_sha256.default)(linkedChunk));
811020
808943
  blocks2.set(lastHash.toString("hex"), linkedChunk);
811021
808944
  return blocks2;
@@ -811023,8 +808946,8 @@ sendChunks_fn = async function(cla, ins, p1, p210, payload, extraData = /* @__PU
811023
808946
  parameterList.push(lastHash);
811024
808947
  lastHash = Buffer.alloc(32);
811025
808948
  }
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([
808949
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, data6);
808950
+ return await __privateMethod5(this, _Sui_instances, handleBlocksProtocol_fn).call(this, cla, ins, p1, p210, Buffer.concat([Buffer.from([
811028
808951
  0
811029
808952
  /* START */
811030
808953
  ])].concat(parameterList)), data6);
@@ -811033,9 +808956,9 @@ handleBlocksProtocol_fn = async function(cla, ins, p1, p210, initialPayload, dat
811033
808956
  let payload = initialPayload;
811034
808957
  let result2 = Buffer.alloc(0);
811035
808958
  do {
811036
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Sending payload to ledger: ", payload.toString("hex"));
808959
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Sending payload to ledger: ", payload.toString("hex"));
811037
808960
  let rv = await this.transport.send(cla, ins, p1, p210, payload);
811038
- __privateMethod7(this, _Sui_instances, log_fn).call(this, "Received response: ", rv);
808961
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Received response: ", rv);
811039
808962
  var rv_instruction = rv[0];
811040
808963
  let rv_payload = rv.slice(1, rv.length - 2);
811041
808964
  if (!(rv_instruction in LedgerToHost)) {
@@ -811052,8 +808975,8 @@ handleBlocksProtocol_fn = async function(cla, ins, p1, p210, initialPayload, dat
811052
808975
  break;
811053
808976
  case 2:
811054
808977
  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);
808978
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Getting block ", rv_payload);
808979
+ __privateMethod5(this, _Sui_instances, log_fn).call(this, "Found block ", chunk5);
811057
808980
  if (chunk5) {
811058
808981
  payload = Buffer.concat([
811059
808982
  Buffer.from([
@@ -811081,7 +809004,7 @@ handleBlocksProtocol_fn = async function(cla, ins, p1, p210, initialPayload, dat
811081
809004
  return result2;
811082
809005
  };
811083
809006
  log_fn = function(...args3) {
811084
- if (__privateGet12(this, _verbose))
809007
+ if (__privateGet8(this, _verbose))
811085
809008
  console.log(args3);
811086
809009
  };
811087
809010
  function buildBip32KeyPayload(path4) {
@@ -818572,9 +816495,6 @@ function getAlpacaCurrencyBridge(network, kind) {
818572
816495
  };
818573
816496
  }
818574
816497
 
818575
- // ../../libs/ledger-live-common/lib-es/bridge/crypto-assets/index.js
818576
- var import_LiveConfig3 = __toESM(require_LiveConfig());
818577
-
818578
816498
  // ../../libs/ledger-live-common/lib-es/bridge/impl.js
818579
816499
  var alpacaized = {
818580
816500
  xrp: true
@@ -818985,7 +816905,7 @@ var import_bignumber361 = __toESM(require("bignumber.js"));
818985
816905
  var import_bignumber362 = require("bignumber.js");
818986
816906
 
818987
816907
  // ../../libs/coin-modules/coin-ton/lib-es/deviceTransactionConfig.js
818988
- var import_core22 = __toESM(require_dist2());
816908
+ var import_core21 = __toESM(require_dist2());
818989
816909
  var import_bignumber363 = require("bignumber.js");
818990
816910
 
818991
816911
  // ../../libs/coin-modules/coin-algorand/lib-es/transaction.js
@@ -820003,7 +817923,7 @@ var transaction_default20 = {
820003
817923
 
820004
817924
  // ../../libs/coin-modules/coin-ton/lib-es/transaction.js
820005
817925
  var import_bignumber381 = __toESM(require("bignumber.js"));
820006
- var import_core23 = __toESM(require_dist2());
817926
+ var import_core22 = __toESM(require_dist2());
820007
817927
  var formatTransaction20 = ({ recipient, useAllAmount, amount }, account3) => `
820008
817928
  SEND ${useAllAmount ? "MAX" : amount.isZero() ? "" : " " + formatCurrencyUnit(getAccountCurrency(account3).units[0], amount, {
820009
817929
  showCode: true,
@@ -820014,7 +817934,7 @@ var getCellOrBuffer = (customPayload) => {
820014
817934
  if (!customPayload)
820015
817935
  return null;
820016
817936
  try {
820017
- return import_core23.Cell.fromBase64(customPayload);
817937
+ return import_core22.Cell.fromBase64(customPayload);
820018
817938
  } catch {
820019
817939
  return Buffer.from(customPayload, "hex");
820020
817940
  }
@@ -820023,14 +817943,14 @@ var safeToBigInt = (value5) => {
820023
817943
  return value5 ? BigInt(value5) : null;
820024
817944
  };
820025
817945
  var safeCellFromBase64 = (value5) => {
820026
- return value5 ? import_core23.Cell.fromBase64(value5) : null;
817946
+ return value5 ? import_core22.Cell.fromBase64(value5) : null;
820027
817947
  };
820028
817948
  var fromRecordRaw = (record4) => {
820029
817949
  if (record4.type === "wallet") {
820030
817950
  return {
820031
817951
  type: record4.type,
820032
817952
  value: record4.value ? {
820033
- address: import_core23.Address.parse(record4.value.address),
817953
+ address: import_core22.Address.parse(record4.value.address),
820034
817954
  capabilities: record4.value.capabilities
820035
817955
  } : null
820036
817956
  };
@@ -820046,15 +817966,15 @@ var fromTransactionPayloadRaw = (payload) => {
820046
817966
  case "unsafe":
820047
817967
  return {
820048
817968
  type: payload.type,
820049
- message: import_core23.Cell.fromBase64(payload.message)
817969
+ message: import_core22.Cell.fromBase64(payload.message)
820050
817970
  };
820051
817971
  case "jetton-transfer":
820052
817972
  return {
820053
817973
  type: payload.type,
820054
817974
  queryId: safeToBigInt(payload.queryId),
820055
817975
  amount: BigInt(payload.amount),
820056
- destination: import_core23.Address.parse(payload.destination),
820057
- responseDestination: import_core23.Address.parse(payload.responseDestination),
817976
+ destination: import_core22.Address.parse(payload.destination),
817977
+ responseDestination: import_core22.Address.parse(payload.responseDestination),
820058
817978
  customPayload: safeCellFromBase64(payload.customPayload),
820059
817979
  forwardAmount: BigInt(payload.forwardAmount),
820060
817980
  forwardPayload: safeCellFromBase64(payload.forwardPayload),
@@ -820064,8 +817984,8 @@ var fromTransactionPayloadRaw = (payload) => {
820064
817984
  return {
820065
817985
  type: payload.type,
820066
817986
  queryId: safeToBigInt(payload.queryId),
820067
- newOwner: import_core23.Address.parse(payload.newOwner),
820068
- responseDestination: import_core23.Address.parse(payload.responseDestination),
817987
+ newOwner: import_core22.Address.parse(payload.newOwner),
817988
+ responseDestination: import_core22.Address.parse(payload.responseDestination),
820069
817989
  customPayload: safeCellFromBase64(payload.customPayload),
820070
817990
  forwardAmount: BigInt(payload.forwardAmount),
820071
817991
  forwardPayload: safeCellFromBase64(payload.forwardPayload)
@@ -820075,7 +817995,7 @@ var fromTransactionPayloadRaw = (payload) => {
820075
817995
  type: payload.type,
820076
817996
  queryId: safeToBigInt(payload.queryId),
820077
817997
  amount: BigInt(payload.amount),
820078
- responseDestination: import_core23.Address.parse(payload.responseDestination),
817998
+ responseDestination: import_core22.Address.parse(payload.responseDestination),
820079
817999
  customPayload: getCellOrBuffer(payload.customPayload)
820080
818000
  };
820081
818001
  case "add-whitelist":
@@ -820083,7 +818003,7 @@ var fromTransactionPayloadRaw = (payload) => {
820083
818003
  return {
820084
818004
  type: payload.type,
820085
818005
  queryId: safeToBigInt(payload.queryId),
820086
- address: import_core23.Address.parse(payload.address)
818006
+ address: import_core22.Address.parse(payload.address)
820087
818007
  };
820088
818008
  case "single-nominator-withdraw":
820089
818009
  return {
@@ -820101,7 +818021,7 @@ var fromTransactionPayloadRaw = (payload) => {
820101
818021
  return {
820102
818022
  type: payload.type,
820103
818023
  queryId: safeToBigInt(payload.queryId),
820104
- votingAddress: import_core23.Address.parse(payload.votingAddress),
818024
+ votingAddress: import_core22.Address.parse(payload.votingAddress),
820105
818025
  expirationDate: payload.expirationDate,
820106
818026
  vote: payload.vote,
820107
818027
  needConfirmation: payload.needConfirmation
@@ -822607,6 +820527,57 @@ var evmConfig = {
822607
820527
  showNfts: false
822608
820528
  }
822609
820529
  },
820530
+ config_currency_sei_network_evm: {
820531
+ type: "object",
820532
+ default: {
820533
+ status: {
820534
+ type: "active"
820535
+ },
820536
+ node: {
820537
+ type: "external",
820538
+ uri: "https://sei-evm-rpc.publicnode.com"
820539
+ },
820540
+ explorer: {
820541
+ type: "etherscan",
820542
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/1329"
820543
+ },
820544
+ showNfts: false
820545
+ }
820546
+ },
820547
+ config_currency_berachain: {
820548
+ type: "object",
820549
+ default: {
820550
+ status: {
820551
+ type: "active"
820552
+ },
820553
+ node: {
820554
+ type: "external",
820555
+ uri: "https://rpc.berachain.com"
820556
+ },
820557
+ explorer: {
820558
+ type: "etherscan",
820559
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/80094"
820560
+ },
820561
+ showNfts: false
820562
+ }
820563
+ },
820564
+ config_currency_hyperevm: {
820565
+ type: "object",
820566
+ default: {
820567
+ status: {
820568
+ type: "active"
820569
+ },
820570
+ node: {
820571
+ type: "external",
820572
+ uri: "https://rpc.hypurrscan.io"
820573
+ },
820574
+ explorer: {
820575
+ type: "etherscan",
820576
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/999"
820577
+ },
820578
+ showNfts: false
820579
+ }
820580
+ },
822610
820581
  config_currency_polygon_zk_evm: {
822611
820582
  type: "object",
822612
820583
  default: {
@@ -825977,7 +823948,10 @@ var minBalancePerCurrencyId = {
825977
823948
  linea: 1e-3,
825978
823949
  linea_sepolia: 1e-3,
825979
823950
  blast: 1e-3,
825980
- blast_sepolia: 1e-3
823951
+ blast_sepolia: 1e-3,
823952
+ hyperevm: 1e-3,
823953
+ berachain: 1e-3,
823954
+ sei_network_evm: 1e-3
825981
823955
  };
825982
823956
  var testCoinDestination = (args3) => {
825983
823957
  const { sendingAccount } = args3;
@@ -831466,7 +829440,7 @@ function getPortfolio(topAccounts, range5, cvState, cvCurrency, options22) {
831466
829440
 
831467
829441
  // ../../libs/ledger-live-common/lib-es/crypto/index.js
831468
829442
  var import_sha5 = __toESM(require_sha5());
831469
- function sha25614(buffer2) {
829443
+ function sha25613(buffer2) {
831470
829444
  return (0, import_sha5.default)("sha256").update(buffer2).digest();
831471
829445
  }
831472
829446
 
@@ -831928,7 +829902,7 @@ ${slackBody}`;
831928
829902
  const serializedReport = {
831929
829903
  results: results2.map(convertSpecReport),
831930
829904
  environment: BOT_ENVIRONMENT,
831931
- seedHash: sha25614(getEnv("SEED"))
829905
+ seedHash: sha25613(getEnv("SEED"))
831932
829906
  };
831933
829907
  await Promise.all([
831934
829908
  import_fs3.default.promises.writeFile(import_path3.default.join(BOT_REPORT_FOLDER, "github-report.md"), githubBody, "utf-8"),
@@ -833276,17 +831250,17 @@ var import_bs588 = __toESM(require_bs58());
833276
831250
  // ../../libs/coin-modules/coin-bitcoin/lib-es/crypto-util.js
833277
831251
  var import_ripemd1608 = __toESM(require_ripemd160());
833278
831252
  var import_sha6 = __toESM(require_sha5());
833279
- function sha25615(buffer2) {
831253
+ function sha25614(buffer2) {
833280
831254
  return (0, import_sha6.default)("sha256").update(buffer2).digest();
833281
831255
  }
833282
831256
  function hash2562(buffer2) {
833283
- return sha25615(sha25615(buffer2));
831257
+ return sha25614(sha25614(buffer2));
833284
831258
  }
833285
831259
  function ripemd1607(buffer2) {
833286
831260
  return new import_ripemd1608.default().update(buffer2).digest();
833287
831261
  }
833288
831262
  function hash1604(buffer2) {
833289
- return ripemd1607(sha25615(buffer2));
831263
+ return ripemd1607(sha25614(buffer2));
833290
831264
  }
833291
831265
 
833292
831266
  // ../../libs/coin-modules/coin-bitcoin/lib-es/descriptor.js
@@ -834181,12 +832155,12 @@ init_lib_es();
834181
832155
 
834182
832156
  // ../../libs/device-core/lib-es/managerApi/use-cases/getUserHashes.js
834183
832157
  var import_sha7 = __toESM(require_sha5());
834184
- function sha25616(buffer2) {
832158
+ function sha25615(buffer2) {
834185
832159
  return (0, import_sha7.default)("sha256").update(buffer2).digest();
834186
832160
  }
834187
832161
  function userHashesPerUserId(userId) {
834188
- const firmwareSalt = sha25616(userId + "|firmwareSalt").toString("hex").slice(0, 6);
834189
- const endpointOverrides100 = sha25616(userId + "|endpoint").readUInt16BE(0) % 100;
832162
+ const firmwareSalt = sha25615(userId + "|firmwareSalt").toString("hex").slice(0, 6);
832163
+ const endpointOverrides100 = sha25615(userId + "|endpoint").readUInt16BE(0) % 100;
834190
832164
  return {
834191
832165
  firmwareSalt,
834192
832166
  endpointOverrides100
@@ -844806,8 +842780,8 @@ var import_rxjs264 = require("rxjs");
844806
842780
 
844807
842781
  // ../../libs/ledger-live-common/lib-es/user.js
844808
842782
  var userHashesPerUserId2 = (userId) => {
844809
- const firmwareSalt = sha25614(userId + "|firmwareSalt").toString("hex").slice(0, 6);
844810
- const endpointOverrides100 = sha25614(userId + "|endpoint").readUInt16BE(0) % 100;
842783
+ const firmwareSalt = sha25613(userId + "|firmwareSalt").toString("hex").slice(0, 6);
842784
+ const endpointOverrides100 = sha25613(userId + "|endpoint").readUInt16BE(0) % 100;
844811
842785
  return {
844812
842786
  firmwareSalt,
844813
842787
  endpointOverrides100
@@ -845275,7 +843249,7 @@ init_lib_es2();
845275
843249
  var import_bignumber419 = require("bignumber.js");
845276
843250
  var import_invariant120 = __toESM(require("invariant"));
845277
843251
  var import_rxjs267 = require("rxjs");
845278
- var import_secp256k116 = __toESM(require_secp256k12());
843252
+ var import_secp256k115 = __toESM(require_secp256k12());
845279
843253
 
845280
843254
  // ../../libs/ledger-live-common/lib-es/exchange/index.js
845281
843255
  var import_semver28 = __toESM(require_semver2());
@@ -845756,7 +843730,7 @@ var initSwap = (input) => {
845756
843730
  await swap.processTransaction(Buffer.from(swapResult.binaryPayload, "hex"), estimatedFees);
845757
843731
  if (unsubscribed)
845758
843732
  return;
845759
- const goodSign = import_secp256k116.default.signatureExport(Buffer.from(swapResult.signature, "hex"));
843733
+ const goodSign = import_secp256k115.default.signatureExport(Buffer.from(swapResult.signature, "hex"));
845760
843734
  await swap.checkTransactionSignature(goodSign);
845761
843735
  if (unsubscribed)
845762
843736
  return;
@@ -847235,10 +845209,4 @@ ky/distribution/index.js:
847235
845209
 
847236
845210
  @scure/base/lib/esm/index.js:
847237
845211
  (*! 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
845212
  */