@settlemint/sdk-mcp 2.2.2-pr53afc65e → 2.2.2-pr5e99366e

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 (3) hide show
  1. package/dist/mcp.js +528 -594
  2. package/dist/mcp.js.map +28 -26
  3. package/package.json +5 -5
package/dist/mcp.js CHANGED
@@ -14412,6 +14412,10 @@ var require_permessage_deflate = __commonJS((exports, module) => {
14412
14412
  }
14413
14413
  function inflateOnError(err) {
14414
14414
  this[kPerMessageDeflate]._inflate = null;
14415
+ if (this[kError]) {
14416
+ this[kCallback](this[kError]);
14417
+ return;
14418
+ }
14415
14419
  err[kStatusCode] = 1007;
14416
14420
  this[kCallback](err);
14417
14421
  }
@@ -16055,7 +16059,7 @@ var require_websocket = __commonJS((exports, module) => {
16055
16059
  const isIpcUrl = parsedUrl.protocol === "ws+unix:";
16056
16060
  let invalidUrlMessage;
16057
16061
  if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
16058
- invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", ` + '"http:", "https", or "ws+unix:"';
16062
+ invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", ` + '"http:", "https:", or "ws+unix:"';
16059
16063
  } else if (isIpcUrl && !parsedUrl.pathname) {
16060
16064
  invalidUrlMessage = "The URL's pathname is empty";
16061
16065
  } else if (parsedUrl.hash) {
@@ -25492,7 +25496,7 @@ var require_dist2 = __commonJS((exports) => {
25492
25496
  // ../../node_modules/@dotenvx/dotenvx/package.json
25493
25497
  var require_package = __commonJS((exports, module) => {
25494
25498
  module.exports = {
25495
- version: "1.41.0",
25499
+ version: "1.43.0",
25496
25500
  name: "@dotenvx/dotenvx",
25497
25501
  description: "a better dotenv–from the creator of `dotenv`",
25498
25502
  author: "@motdotla",
@@ -25645,14 +25649,11 @@ var require_logger = __commonJS((exports, module) => {
25645
25649
  var { getColor, bold: bold2 } = require_colors();
25646
25650
  var levels = {
25647
25651
  error: 0,
25648
- errorv: 0,
25649
- errornocolor: 0,
25650
25652
  warn: 1,
25651
25653
  success: 2,
25652
25654
  successv: 2,
25653
25655
  info: 2,
25654
25656
  help: 2,
25655
- blank: 2,
25656
25657
  verbose: 4,
25657
25658
  debug: 5,
25658
25659
  silly: 6
@@ -25665,7 +25666,11 @@ var require_logger = __commonJS((exports, module) => {
25665
25666
  var verbose = getColor("plum");
25666
25667
  var debug = getColor("plum");
25667
25668
  var currentLevel = levels.info;
25668
- function log(level, message) {
25669
+ function stderr(level, message) {
25670
+ const formattedMessage = formatMessage(level, message);
25671
+ console.error(formattedMessage);
25672
+ }
25673
+ function stdout(level, message) {
25669
25674
  if (levels[level] === undefined) {
25670
25675
  throw new Error(`MISSING_LOG_LEVEL: '${level}'. implement in logger.`);
25671
25676
  }
@@ -25679,10 +25684,6 @@ var require_logger = __commonJS((exports, module) => {
25679
25684
  switch (level.toLowerCase()) {
25680
25685
  case "error":
25681
25686
  return error(formattedMessage);
25682
- case "errorv":
25683
- return error(`[dotenvx@${packageJson.version}] ${formattedMessage}`);
25684
- case "errornocolor":
25685
- return formattedMessage;
25686
25687
  case "warn":
25687
25688
  return warn(formattedMessage);
25688
25689
  case "success":
@@ -25697,23 +25698,18 @@ var require_logger = __commonJS((exports, module) => {
25697
25698
  return verbose(formattedMessage);
25698
25699
  case "debug":
25699
25700
  return debug(formattedMessage);
25700
- case "blank":
25701
- return formattedMessage;
25702
25701
  }
25703
25702
  }
25704
25703
  var logger = {
25705
25704
  level: "info",
25706
- error: (msg) => log("error", msg),
25707
- errorv: (msg) => log("errorv", msg),
25708
- errornocolor: (msg) => log("errornocolor", msg),
25709
- warn: (msg) => log("warn", msg),
25710
- success: (msg) => log("success", msg),
25711
- successv: (msg) => log("successv", msg),
25712
- info: (msg) => log("info", msg),
25713
- help: (msg) => log("help", msg),
25714
- verbose: (msg) => log("verbose", msg),
25715
- debug: (msg) => log("debug", msg),
25716
- blank: (msg) => log("blank", msg),
25705
+ error: (msg) => stderr("error", msg),
25706
+ warn: (msg) => stdout("warn", msg),
25707
+ success: (msg) => stdout("success", msg),
25708
+ successv: (msg) => stdout("successv", msg),
25709
+ info: (msg) => stdout("info", msg),
25710
+ help: (msg) => stdout("help", msg),
25711
+ verbose: (msg) => stdout("verbose", msg),
25712
+ debug: (msg) => stdout("debug", msg),
25717
25713
  setLevel: (level) => {
25718
25714
  if (levels[level] !== undefined) {
25719
25715
  currentLevel = levels[level];
@@ -28821,54 +28817,21 @@ var require_webcrypto = __commonJS((exports) => {
28821
28817
  exports.gcm = /* @__PURE__ */ (() => generate(mode.GCM))();
28822
28818
  });
28823
28819
 
28824
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/cryptoNode.js
28825
- var require_cryptoNode2 = __commonJS((exports) => {
28826
- Object.defineProperty(exports, "__esModule", { value: true });
28827
- exports.crypto = undefined;
28828
- var nc = __require("node:crypto");
28829
- exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
28830
- });
28831
-
28832
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/utils.js
28833
- var require_utils7 = __commonJS((exports) => {
28834
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
28820
+ // ../../node_modules/@noble/hashes/_assert.js
28821
+ var require__assert = __commonJS((exports) => {
28835
28822
  Object.defineProperty(exports, "__esModule", { value: true });
28836
- exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.Hash = exports.nextTick = exports.swap32IfBE = exports.byteSwapIfBE = exports.swap8IfBE = exports.isLE = undefined;
28837
- exports.isBytes = isBytes;
28838
28823
  exports.anumber = anumber;
28839
28824
  exports.abytes = abytes;
28840
28825
  exports.ahash = ahash;
28841
28826
  exports.aexists = aexists;
28842
28827
  exports.aoutput = aoutput;
28843
- exports.u8 = u8;
28844
- exports.u32 = u32;
28845
- exports.clean = clean;
28846
- exports.createView = createView;
28847
- exports.rotr = rotr;
28848
- exports.rotl = rotl;
28849
- exports.byteSwap = byteSwap;
28850
- exports.byteSwap32 = byteSwap32;
28851
- exports.bytesToHex = bytesToHex;
28852
- exports.hexToBytes = hexToBytes;
28853
- exports.asyncLoop = asyncLoop;
28854
- exports.utf8ToBytes = utf8ToBytes;
28855
- exports.bytesToUtf8 = bytesToUtf8;
28856
- exports.toBytes = toBytes;
28857
- exports.kdfInputToBytes = kdfInputToBytes;
28858
- exports.concatBytes = concatBytes;
28859
- exports.checkOpts = checkOpts;
28860
- exports.createHasher = createHasher;
28861
- exports.createOptHasher = createOptHasher;
28862
- exports.createXOFer = createXOFer;
28863
- exports.randomBytes = randomBytes;
28864
- var crypto_1 = require_cryptoNode2();
28865
- function isBytes(a) {
28866
- return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
28867
- }
28868
28828
  function anumber(n) {
28869
28829
  if (!Number.isSafeInteger(n) || n < 0)
28870
28830
  throw new Error("positive integer expected, got " + n);
28871
28831
  }
28832
+ function isBytes(a) {
28833
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
28834
+ }
28872
28835
  function abytes(b, ...lengths) {
28873
28836
  if (!isBytes(b))
28874
28837
  throw new Error("Uint8Array expected");
@@ -28877,7 +28840,7 @@ var require_utils7 = __commonJS((exports) => {
28877
28840
  }
28878
28841
  function ahash(h) {
28879
28842
  if (typeof h !== "function" || typeof h.create !== "function")
28880
- throw new Error("Hash should be wrapped by utils.createHasher");
28843
+ throw new Error("Hash should be wrapped by utils.wrapConstructor");
28881
28844
  anumber(h.outputLen);
28882
28845
  anumber(h.blockLen);
28883
28846
  }
@@ -28894,17 +28857,51 @@ var require_utils7 = __commonJS((exports) => {
28894
28857
  throw new Error("digestInto() expects output buffer of length at least " + min);
28895
28858
  }
28896
28859
  }
28860
+ });
28861
+
28862
+ // ../../node_modules/@noble/hashes/cryptoNode.js
28863
+ var require_cryptoNode2 = __commonJS((exports) => {
28864
+ Object.defineProperty(exports, "__esModule", { value: true });
28865
+ exports.crypto = undefined;
28866
+ var nc = __require("node:crypto");
28867
+ exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
28868
+ });
28869
+
28870
+ // ../../node_modules/@noble/hashes/utils.js
28871
+ var require_utils7 = __commonJS((exports) => {
28872
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
28873
+ Object.defineProperty(exports, "__esModule", { value: true });
28874
+ exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.isLE = undefined;
28875
+ exports.isBytes = isBytes;
28876
+ exports.u8 = u8;
28877
+ exports.u32 = u32;
28878
+ exports.createView = createView;
28879
+ exports.rotr = rotr;
28880
+ exports.rotl = rotl;
28881
+ exports.byteSwap = byteSwap;
28882
+ exports.byteSwap32 = byteSwap32;
28883
+ exports.bytesToHex = bytesToHex;
28884
+ exports.hexToBytes = hexToBytes;
28885
+ exports.asyncLoop = asyncLoop;
28886
+ exports.utf8ToBytes = utf8ToBytes;
28887
+ exports.toBytes = toBytes;
28888
+ exports.concatBytes = concatBytes;
28889
+ exports.checkOpts = checkOpts;
28890
+ exports.wrapConstructor = wrapConstructor;
28891
+ exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
28892
+ exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
28893
+ exports.randomBytes = randomBytes;
28894
+ var crypto_1 = require_cryptoNode2();
28895
+ var _assert_ts_1 = require__assert();
28896
+ function isBytes(a) {
28897
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
28898
+ }
28897
28899
  function u8(arr) {
28898
28900
  return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
28899
28901
  }
28900
28902
  function u32(arr) {
28901
28903
  return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
28902
28904
  }
28903
- function clean(...arrays) {
28904
- for (let i = 0;i < arrays.length; i++) {
28905
- arrays[i].fill(0);
28906
- }
28907
- }
28908
28905
  function createView(arr) {
28909
28906
  return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
28910
28907
  }
@@ -28918,19 +28915,16 @@ var require_utils7 = __commonJS((exports) => {
28918
28915
  function byteSwap(word) {
28919
28916
  return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
28920
28917
  }
28921
- exports.swap8IfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
28922
- exports.byteSwapIfBE = exports.swap8IfBE;
28918
+ exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
28923
28919
  function byteSwap32(arr) {
28924
28920
  for (let i = 0;i < arr.length; i++) {
28925
28921
  arr[i] = byteSwap(arr[i]);
28926
28922
  }
28927
- return arr;
28928
28923
  }
28929
- exports.swap32IfBE = exports.isLE ? (u) => u : byteSwap32;
28930
- var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
28924
+ var hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
28931
28925
  var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
28932
28926
  function bytesToHex(bytes) {
28933
- abytes(bytes);
28927
+ (0, _assert_ts_1.abytes)(bytes);
28934
28928
  if (hasHexBuiltin)
28935
28929
  return bytes.toHex();
28936
28930
  let hex = "";
@@ -28985,29 +28979,20 @@ var require_utils7 = __commonJS((exports) => {
28985
28979
  }
28986
28980
  function utf8ToBytes(str) {
28987
28981
  if (typeof str !== "string")
28988
- throw new Error("string expected");
28982
+ throw new Error("utf8ToBytes expected string, got " + typeof str);
28989
28983
  return new Uint8Array(new TextEncoder().encode(str));
28990
28984
  }
28991
- function bytesToUtf8(bytes) {
28992
- return new TextDecoder().decode(bytes);
28993
- }
28994
28985
  function toBytes(data) {
28995
28986
  if (typeof data === "string")
28996
28987
  data = utf8ToBytes(data);
28997
- abytes(data);
28998
- return data;
28999
- }
29000
- function kdfInputToBytes(data) {
29001
- if (typeof data === "string")
29002
- data = utf8ToBytes(data);
29003
- abytes(data);
28988
+ (0, _assert_ts_1.abytes)(data);
29004
28989
  return data;
29005
28990
  }
29006
28991
  function concatBytes(...arrays) {
29007
28992
  let sum = 0;
29008
28993
  for (let i = 0;i < arrays.length; i++) {
29009
28994
  const a = arrays[i];
29010
- abytes(a);
28995
+ (0, _assert_ts_1.abytes)(a);
29011
28996
  sum += a.length;
29012
28997
  }
29013
28998
  const res = new Uint8Array(sum);
@@ -29018,17 +29003,20 @@ var require_utils7 = __commonJS((exports) => {
29018
29003
  }
29019
29004
  return res;
29020
29005
  }
29006
+
29007
+ class Hash {
29008
+ clone() {
29009
+ return this._cloneInto();
29010
+ }
29011
+ }
29012
+ exports.Hash = Hash;
29021
29013
  function checkOpts(defaults, opts) {
29022
29014
  if (opts !== undefined && {}.toString.call(opts) !== "[object Object]")
29023
- throw new Error("options should be object or undefined");
29015
+ throw new Error("Options should be object or undefined");
29024
29016
  const merged = Object.assign(defaults, opts);
29025
29017
  return merged;
29026
29018
  }
29027
-
29028
- class Hash {
29029
- }
29030
- exports.Hash = Hash;
29031
- function createHasher(hashCons) {
29019
+ function wrapConstructor(hashCons) {
29032
29020
  const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
29033
29021
  const tmp = hashCons();
29034
29022
  hashC.outputLen = tmp.outputLen;
@@ -29036,7 +29024,7 @@ var require_utils7 = __commonJS((exports) => {
29036
29024
  hashC.create = () => hashCons();
29037
29025
  return hashC;
29038
29026
  }
29039
- function createOptHasher(hashCons) {
29027
+ function wrapConstructorWithOpts(hashCons) {
29040
29028
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
29041
29029
  const tmp = hashCons({});
29042
29030
  hashC.outputLen = tmp.outputLen;
@@ -29044,7 +29032,7 @@ var require_utils7 = __commonJS((exports) => {
29044
29032
  hashC.create = (opts) => hashCons(opts);
29045
29033
  return hashC;
29046
29034
  }
29047
- function createXOFer(hashCons) {
29035
+ function wrapXOFConstructorWithOpts(hashCons) {
29048
29036
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
29049
29037
  const tmp = hashCons({});
29050
29038
  hashC.outputLen = tmp.outputLen;
@@ -29052,9 +29040,6 @@ var require_utils7 = __commonJS((exports) => {
29052
29040
  hashC.create = (opts) => hashCons(opts);
29053
29041
  return hashC;
29054
29042
  }
29055
- exports.wrapConstructor = createHasher;
29056
- exports.wrapConstructorWithOpts = createOptHasher;
29057
- exports.wrapXOFConstructorWithOpts = createXOFer;
29058
29043
  function randomBytes(bytesLength = 32) {
29059
29044
  if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
29060
29045
  return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
@@ -29066,13 +29051,14 @@ var require_utils7 = __commonJS((exports) => {
29066
29051
  }
29067
29052
  });
29068
29053
 
29069
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/_md.js
29054
+ // ../../node_modules/@noble/hashes/_md.js
29070
29055
  var require__md = __commonJS((exports) => {
29071
29056
  Object.defineProperty(exports, "__esModule", { value: true });
29072
- exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = undefined;
29057
+ exports.HashMD = undefined;
29073
29058
  exports.setBigUint64 = setBigUint64;
29074
29059
  exports.Chi = Chi;
29075
29060
  exports.Maj = Maj;
29061
+ var _assert_ts_1 = require__assert();
29076
29062
  var utils_ts_1 = require_utils7();
29077
29063
  function setBigUint64(view, byteOffset, value, isLE) {
29078
29064
  if (typeof view.setBigUint64 === "function")
@@ -29108,10 +29094,9 @@ var require__md = __commonJS((exports) => {
29108
29094
  this.view = (0, utils_ts_1.createView)(this.buffer);
29109
29095
  }
29110
29096
  update(data) {
29111
- (0, utils_ts_1.aexists)(this);
29112
- data = (0, utils_ts_1.toBytes)(data);
29113
- (0, utils_ts_1.abytes)(data);
29097
+ (0, _assert_ts_1.aexists)(this);
29114
29098
  const { view, buffer, blockLen } = this;
29099
+ data = (0, utils_ts_1.toBytes)(data);
29115
29100
  const len = data.length;
29116
29101
  for (let pos = 0;pos < len; ) {
29117
29102
  const take = Math.min(blockLen - this.pos, len - pos);
@@ -29134,13 +29119,13 @@ var require__md = __commonJS((exports) => {
29134
29119
  return this;
29135
29120
  }
29136
29121
  digestInto(out) {
29137
- (0, utils_ts_1.aexists)(this);
29138
- (0, utils_ts_1.aoutput)(out, this);
29122
+ (0, _assert_ts_1.aexists)(this);
29123
+ (0, _assert_ts_1.aoutput)(out, this);
29139
29124
  this.finished = true;
29140
29125
  const { buffer, view, blockLen, isLE } = this;
29141
29126
  let { pos } = this;
29142
29127
  buffer[pos++] = 128;
29143
- (0, utils_ts_1.clean)(this.buffer.subarray(pos));
29128
+ this.buffer.subarray(pos).fill(0);
29144
29129
  if (this.padOffset > blockLen - pos) {
29145
29130
  this.process(view, 0);
29146
29131
  pos = 0;
@@ -29171,178 +29156,25 @@ var require__md = __commonJS((exports) => {
29171
29156
  to || (to = new this.constructor);
29172
29157
  to.set(...this.get());
29173
29158
  const { blockLen, buffer, length, finished, destroyed, pos } = this;
29174
- to.destroyed = destroyed;
29175
- to.finished = finished;
29176
29159
  to.length = length;
29177
29160
  to.pos = pos;
29161
+ to.finished = finished;
29162
+ to.destroyed = destroyed;
29178
29163
  if (length % blockLen)
29179
29164
  to.buffer.set(buffer);
29180
29165
  return to;
29181
29166
  }
29182
- clone() {
29183
- return this._cloneInto();
29184
- }
29185
29167
  }
29186
29168
  exports.HashMD = HashMD;
29187
- exports.SHA256_IV = Uint32Array.from([
29188
- 1779033703,
29189
- 3144134277,
29190
- 1013904242,
29191
- 2773480762,
29192
- 1359893119,
29193
- 2600822924,
29194
- 528734635,
29195
- 1541459225
29196
- ]);
29197
- exports.SHA224_IV = Uint32Array.from([
29198
- 3238371032,
29199
- 914150663,
29200
- 812702999,
29201
- 4144912697,
29202
- 4290775857,
29203
- 1750603025,
29204
- 1694076839,
29205
- 3204075428
29206
- ]);
29207
- exports.SHA384_IV = Uint32Array.from([
29208
- 3418070365,
29209
- 3238371032,
29210
- 1654270250,
29211
- 914150663,
29212
- 2438529370,
29213
- 812702999,
29214
- 355462360,
29215
- 4144912697,
29216
- 1731405415,
29217
- 4290775857,
29218
- 2394180231,
29219
- 1750603025,
29220
- 3675008525,
29221
- 1694076839,
29222
- 1203062813,
29223
- 3204075428
29224
- ]);
29225
- exports.SHA512_IV = Uint32Array.from([
29226
- 1779033703,
29227
- 4089235720,
29228
- 3144134277,
29229
- 2227873595,
29230
- 1013904242,
29231
- 4271175723,
29232
- 2773480762,
29233
- 1595750129,
29234
- 1359893119,
29235
- 2917565137,
29236
- 2600822924,
29237
- 725511199,
29238
- 528734635,
29239
- 4215389547,
29240
- 1541459225,
29241
- 327033209
29242
- ]);
29243
- });
29244
-
29245
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/_u64.js
29246
- var require__u64 = __commonJS((exports) => {
29247
- Object.defineProperty(exports, "__esModule", { value: true });
29248
- exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = undefined;
29249
- exports.add = add;
29250
- exports.fromBig = fromBig;
29251
- exports.split = split;
29252
- var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
29253
- var _32n = /* @__PURE__ */ BigInt(32);
29254
- function fromBig(n, le = false) {
29255
- if (le)
29256
- return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
29257
- return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
29258
- }
29259
- function split(lst, le = false) {
29260
- const len = lst.length;
29261
- let Ah = new Uint32Array(len);
29262
- let Al = new Uint32Array(len);
29263
- for (let i = 0;i < len; i++) {
29264
- const { h, l } = fromBig(lst[i], le);
29265
- [Ah[i], Al[i]] = [h, l];
29266
- }
29267
- return [Ah, Al];
29268
- }
29269
- var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
29270
- exports.toBig = toBig;
29271
- var shrSH = (h, _l, s) => h >>> s;
29272
- exports.shrSH = shrSH;
29273
- var shrSL = (h, l, s) => h << 32 - s | l >>> s;
29274
- exports.shrSL = shrSL;
29275
- var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
29276
- exports.rotrSH = rotrSH;
29277
- var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
29278
- exports.rotrSL = rotrSL;
29279
- var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
29280
- exports.rotrBH = rotrBH;
29281
- var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
29282
- exports.rotrBL = rotrBL;
29283
- var rotr32H = (_h, l) => l;
29284
- exports.rotr32H = rotr32H;
29285
- var rotr32L = (h, _l) => h;
29286
- exports.rotr32L = rotr32L;
29287
- var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
29288
- exports.rotlSH = rotlSH;
29289
- var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
29290
- exports.rotlSL = rotlSL;
29291
- var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
29292
- exports.rotlBH = rotlBH;
29293
- var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
29294
- exports.rotlBL = rotlBL;
29295
- function add(Ah, Al, Bh, Bl) {
29296
- const l = (Al >>> 0) + (Bl >>> 0);
29297
- return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
29298
- }
29299
- var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
29300
- exports.add3L = add3L;
29301
- var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
29302
- exports.add3H = add3H;
29303
- var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
29304
- exports.add4L = add4L;
29305
- var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
29306
- exports.add4H = add4H;
29307
- var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
29308
- exports.add5L = add5L;
29309
- var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
29310
- exports.add5H = add5H;
29311
- var u64 = {
29312
- fromBig,
29313
- split,
29314
- toBig,
29315
- shrSH,
29316
- shrSL,
29317
- rotrSH,
29318
- rotrSL,
29319
- rotrBH,
29320
- rotrBL,
29321
- rotr32H,
29322
- rotr32L,
29323
- rotlSH,
29324
- rotlSL,
29325
- rotlBH,
29326
- rotlBL,
29327
- add,
29328
- add3L,
29329
- add3H,
29330
- add4L,
29331
- add4H,
29332
- add5H,
29333
- add5L
29334
- };
29335
- exports.default = u64;
29336
29169
  });
29337
29170
 
29338
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha2.js
29339
- var require_sha2 = __commonJS((exports) => {
29171
+ // ../../node_modules/@noble/hashes/sha256.js
29172
+ var require_sha256 = __commonJS((exports) => {
29340
29173
  Object.defineProperty(exports, "__esModule", { value: true });
29341
- exports.sha512_224 = exports.sha512_256 = exports.sha384 = exports.sha512 = exports.sha224 = exports.sha256 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA384 = exports.SHA512 = exports.SHA224 = exports.SHA256 = undefined;
29174
+ exports.sha224 = exports.sha256 = exports.SHA256 = undefined;
29342
29175
  var _md_ts_1 = require__md();
29343
- var u64 = require__u64();
29344
29176
  var utils_ts_1 = require_utils7();
29345
- var SHA256_K = /* @__PURE__ */ Uint32Array.from([
29177
+ var SHA256_K = /* @__PURE__ */ new Uint32Array([
29346
29178
  1116352408,
29347
29179
  1899447441,
29348
29180
  3049323471,
@@ -29408,19 +29240,29 @@ var require_sha2 = __commonJS((exports) => {
29408
29240
  3204031479,
29409
29241
  3329325298
29410
29242
  ]);
29243
+ var SHA256_IV = /* @__PURE__ */ new Uint32Array([
29244
+ 1779033703,
29245
+ 3144134277,
29246
+ 1013904242,
29247
+ 2773480762,
29248
+ 1359893119,
29249
+ 2600822924,
29250
+ 528734635,
29251
+ 1541459225
29252
+ ]);
29411
29253
  var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
29412
29254
 
29413
29255
  class SHA256 extends _md_ts_1.HashMD {
29414
29256
  constructor(outputLen = 32) {
29415
29257
  super(64, outputLen, 8, false);
29416
- this.A = _md_ts_1.SHA256_IV[0] | 0;
29417
- this.B = _md_ts_1.SHA256_IV[1] | 0;
29418
- this.C = _md_ts_1.SHA256_IV[2] | 0;
29419
- this.D = _md_ts_1.SHA256_IV[3] | 0;
29420
- this.E = _md_ts_1.SHA256_IV[4] | 0;
29421
- this.F = _md_ts_1.SHA256_IV[5] | 0;
29422
- this.G = _md_ts_1.SHA256_IV[6] | 0;
29423
- this.H = _md_ts_1.SHA256_IV[7] | 0;
29258
+ this.A = SHA256_IV[0] | 0;
29259
+ this.B = SHA256_IV[1] | 0;
29260
+ this.C = SHA256_IV[2] | 0;
29261
+ this.D = SHA256_IV[3] | 0;
29262
+ this.E = SHA256_IV[4] | 0;
29263
+ this.F = SHA256_IV[5] | 0;
29264
+ this.G = SHA256_IV[6] | 0;
29265
+ this.H = SHA256_IV[7] | 0;
29424
29266
  }
29425
29267
  get() {
29426
29268
  const { A, B, C, D, E, F, G, H } = this;
@@ -29472,11 +29314,11 @@ var require_sha2 = __commonJS((exports) => {
29472
29314
  this.set(A, B, C, D, E, F, G, H);
29473
29315
  }
29474
29316
  roundClean() {
29475
- (0, utils_ts_1.clean)(SHA256_W);
29317
+ SHA256_W.fill(0);
29476
29318
  }
29477
29319
  destroy() {
29478
29320
  this.set(0, 0, 0, 0, 0, 0, 0, 0);
29479
- (0, utils_ts_1.clean)(this.buffer);
29321
+ this.buffer.fill(0);
29480
29322
  }
29481
29323
  }
29482
29324
  exports.SHA256 = SHA256;
@@ -29484,18 +29326,120 @@ var require_sha2 = __commonJS((exports) => {
29484
29326
  class SHA224 extends SHA256 {
29485
29327
  constructor() {
29486
29328
  super(28);
29487
- this.A = _md_ts_1.SHA224_IV[0] | 0;
29488
- this.B = _md_ts_1.SHA224_IV[1] | 0;
29489
- this.C = _md_ts_1.SHA224_IV[2] | 0;
29490
- this.D = _md_ts_1.SHA224_IV[3] | 0;
29491
- this.E = _md_ts_1.SHA224_IV[4] | 0;
29492
- this.F = _md_ts_1.SHA224_IV[5] | 0;
29493
- this.G = _md_ts_1.SHA224_IV[6] | 0;
29494
- this.H = _md_ts_1.SHA224_IV[7] | 0;
29495
- }
29496
- }
29497
- exports.SHA224 = SHA224;
29498
- var K512 = /* @__PURE__ */ (() => u64.split([
29329
+ this.A = 3238371032 | 0;
29330
+ this.B = 914150663 | 0;
29331
+ this.C = 812702999 | 0;
29332
+ this.D = 4144912697 | 0;
29333
+ this.E = 4290775857 | 0;
29334
+ this.F = 1750603025 | 0;
29335
+ this.G = 1694076839 | 0;
29336
+ this.H = 3204075428 | 0;
29337
+ }
29338
+ }
29339
+ exports.sha256 = (0, utils_ts_1.wrapConstructor)(() => new SHA256);
29340
+ exports.sha224 = (0, utils_ts_1.wrapConstructor)(() => new SHA224);
29341
+ });
29342
+
29343
+ // ../../node_modules/@noble/hashes/_u64.js
29344
+ var require__u64 = __commonJS((exports) => {
29345
+ Object.defineProperty(exports, "__esModule", { value: true });
29346
+ exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = undefined;
29347
+ exports.fromBig = fromBig;
29348
+ exports.split = split;
29349
+ exports.add = add;
29350
+ var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
29351
+ var _32n = /* @__PURE__ */ BigInt(32);
29352
+ function fromBig(n, le = false) {
29353
+ if (le)
29354
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
29355
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
29356
+ }
29357
+ function split(lst, le = false) {
29358
+ let Ah = new Uint32Array(lst.length);
29359
+ let Al = new Uint32Array(lst.length);
29360
+ for (let i = 0;i < lst.length; i++) {
29361
+ const { h, l } = fromBig(lst[i], le);
29362
+ [Ah[i], Al[i]] = [h, l];
29363
+ }
29364
+ return [Ah, Al];
29365
+ }
29366
+ var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
29367
+ exports.toBig = toBig;
29368
+ var shrSH = (h, _l, s) => h >>> s;
29369
+ exports.shrSH = shrSH;
29370
+ var shrSL = (h, l, s) => h << 32 - s | l >>> s;
29371
+ exports.shrSL = shrSL;
29372
+ var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
29373
+ exports.rotrSH = rotrSH;
29374
+ var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
29375
+ exports.rotrSL = rotrSL;
29376
+ var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
29377
+ exports.rotrBH = rotrBH;
29378
+ var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
29379
+ exports.rotrBL = rotrBL;
29380
+ var rotr32H = (_h, l) => l;
29381
+ exports.rotr32H = rotr32H;
29382
+ var rotr32L = (h, _l) => h;
29383
+ exports.rotr32L = rotr32L;
29384
+ var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
29385
+ exports.rotlSH = rotlSH;
29386
+ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
29387
+ exports.rotlSL = rotlSL;
29388
+ var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
29389
+ exports.rotlBH = rotlBH;
29390
+ var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
29391
+ exports.rotlBL = rotlBL;
29392
+ function add(Ah, Al, Bh, Bl) {
29393
+ const l = (Al >>> 0) + (Bl >>> 0);
29394
+ return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
29395
+ }
29396
+ var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
29397
+ exports.add3L = add3L;
29398
+ var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
29399
+ exports.add3H = add3H;
29400
+ var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
29401
+ exports.add4L = add4L;
29402
+ var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
29403
+ exports.add4H = add4H;
29404
+ var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
29405
+ exports.add5L = add5L;
29406
+ var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
29407
+ exports.add5H = add5H;
29408
+ var u64 = {
29409
+ fromBig,
29410
+ split,
29411
+ toBig,
29412
+ shrSH,
29413
+ shrSL,
29414
+ rotrSH,
29415
+ rotrSL,
29416
+ rotrBH,
29417
+ rotrBL,
29418
+ rotr32H,
29419
+ rotr32L,
29420
+ rotlSH,
29421
+ rotlSL,
29422
+ rotlBH,
29423
+ rotlBL,
29424
+ add,
29425
+ add3L,
29426
+ add3H,
29427
+ add4L,
29428
+ add4H,
29429
+ add5H,
29430
+ add5L
29431
+ };
29432
+ exports.default = u64;
29433
+ });
29434
+
29435
+ // ../../node_modules/@noble/hashes/sha512.js
29436
+ var require_sha512 = __commonJS((exports) => {
29437
+ Object.defineProperty(exports, "__esModule", { value: true });
29438
+ exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = undefined;
29439
+ var _md_ts_1 = require__md();
29440
+ var _u64_ts_1 = require__u64();
29441
+ var utils_ts_1 = require_utils7();
29442
+ var [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_ts_1.default.split([
29499
29443
  "0x428a2f98d728ae22",
29500
29444
  "0x7137449123ef65cd",
29501
29445
  "0xb5c0fbcfec4d3b2f",
@@ -29577,30 +29521,28 @@ var require_sha2 = __commonJS((exports) => {
29577
29521
  "0x5fcb6fab3ad6faec",
29578
29522
  "0x6c44198c4a475817"
29579
29523
  ].map((n) => BigInt(n))))();
29580
- var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
29581
- var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
29582
29524
  var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
29583
29525
  var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
29584
29526
 
29585
29527
  class SHA512 extends _md_ts_1.HashMD {
29586
29528
  constructor(outputLen = 64) {
29587
29529
  super(128, outputLen, 16, false);
29588
- this.Ah = _md_ts_1.SHA512_IV[0] | 0;
29589
- this.Al = _md_ts_1.SHA512_IV[1] | 0;
29590
- this.Bh = _md_ts_1.SHA512_IV[2] | 0;
29591
- this.Bl = _md_ts_1.SHA512_IV[3] | 0;
29592
- this.Ch = _md_ts_1.SHA512_IV[4] | 0;
29593
- this.Cl = _md_ts_1.SHA512_IV[5] | 0;
29594
- this.Dh = _md_ts_1.SHA512_IV[6] | 0;
29595
- this.Dl = _md_ts_1.SHA512_IV[7] | 0;
29596
- this.Eh = _md_ts_1.SHA512_IV[8] | 0;
29597
- this.El = _md_ts_1.SHA512_IV[9] | 0;
29598
- this.Fh = _md_ts_1.SHA512_IV[10] | 0;
29599
- this.Fl = _md_ts_1.SHA512_IV[11] | 0;
29600
- this.Gh = _md_ts_1.SHA512_IV[12] | 0;
29601
- this.Gl = _md_ts_1.SHA512_IV[13] | 0;
29602
- this.Hh = _md_ts_1.SHA512_IV[14] | 0;
29603
- this.Hl = _md_ts_1.SHA512_IV[15] | 0;
29530
+ this.Ah = 1779033703 | 0;
29531
+ this.Al = 4089235720 | 0;
29532
+ this.Bh = 3144134277 | 0;
29533
+ this.Bl = 2227873595 | 0;
29534
+ this.Ch = 1013904242 | 0;
29535
+ this.Cl = 4271175723 | 0;
29536
+ this.Dh = 2773480762 | 0;
29537
+ this.Dl = 1595750129 | 0;
29538
+ this.Eh = 1359893119 | 0;
29539
+ this.El = 2917565137 | 0;
29540
+ this.Fh = 2600822924 | 0;
29541
+ this.Fl = 725511199 | 0;
29542
+ this.Gh = 528734635 | 0;
29543
+ this.Gl = 4215389547 | 0;
29544
+ this.Hh = 1541459225 | 0;
29545
+ this.Hl = 327033209 | 0;
29604
29546
  }
29605
29547
  get() {
29606
29548
  const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
@@ -29632,28 +29574,28 @@ var require_sha2 = __commonJS((exports) => {
29632
29574
  for (let i = 16;i < 80; i++) {
29633
29575
  const W15h = SHA512_W_H[i - 15] | 0;
29634
29576
  const W15l = SHA512_W_L[i - 15] | 0;
29635
- const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
29636
- const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
29577
+ const s0h = _u64_ts_1.default.rotrSH(W15h, W15l, 1) ^ _u64_ts_1.default.rotrSH(W15h, W15l, 8) ^ _u64_ts_1.default.shrSH(W15h, W15l, 7);
29578
+ const s0l = _u64_ts_1.default.rotrSL(W15h, W15l, 1) ^ _u64_ts_1.default.rotrSL(W15h, W15l, 8) ^ _u64_ts_1.default.shrSL(W15h, W15l, 7);
29637
29579
  const W2h = SHA512_W_H[i - 2] | 0;
29638
29580
  const W2l = SHA512_W_L[i - 2] | 0;
29639
- const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
29640
- const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
29641
- const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
29642
- const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
29581
+ const s1h = _u64_ts_1.default.rotrSH(W2h, W2l, 19) ^ _u64_ts_1.default.rotrBH(W2h, W2l, 61) ^ _u64_ts_1.default.shrSH(W2h, W2l, 6);
29582
+ const s1l = _u64_ts_1.default.rotrSL(W2h, W2l, 19) ^ _u64_ts_1.default.rotrBL(W2h, W2l, 61) ^ _u64_ts_1.default.shrSL(W2h, W2l, 6);
29583
+ const SUMl = _u64_ts_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
29584
+ const SUMh = _u64_ts_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
29643
29585
  SHA512_W_H[i] = SUMh | 0;
29644
29586
  SHA512_W_L[i] = SUMl | 0;
29645
29587
  }
29646
29588
  let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
29647
29589
  for (let i = 0;i < 80; i++) {
29648
- const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
29649
- const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
29590
+ const sigma1h = _u64_ts_1.default.rotrSH(Eh, El, 14) ^ _u64_ts_1.default.rotrSH(Eh, El, 18) ^ _u64_ts_1.default.rotrBH(Eh, El, 41);
29591
+ const sigma1l = _u64_ts_1.default.rotrSL(Eh, El, 14) ^ _u64_ts_1.default.rotrSL(Eh, El, 18) ^ _u64_ts_1.default.rotrBL(Eh, El, 41);
29650
29592
  const CHIh = Eh & Fh ^ ~Eh & Gh;
29651
29593
  const CHIl = El & Fl ^ ~El & Gl;
29652
- const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
29653
- const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
29594
+ const T1ll = _u64_ts_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
29595
+ const T1h = _u64_ts_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
29654
29596
  const T1l = T1ll | 0;
29655
- const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
29656
- const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
29597
+ const sigma0h = _u64_ts_1.default.rotrSH(Ah, Al, 28) ^ _u64_ts_1.default.rotrBH(Ah, Al, 34) ^ _u64_ts_1.default.rotrBH(Ah, Al, 39);
29598
+ const sigma0l = _u64_ts_1.default.rotrSL(Ah, Al, 28) ^ _u64_ts_1.default.rotrBL(Ah, Al, 34) ^ _u64_ts_1.default.rotrBL(Ah, Al, 39);
29657
29599
  const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
29658
29600
  const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
29659
29601
  Hh = Gh | 0;
@@ -29662,115 +29604,57 @@ var require_sha2 = __commonJS((exports) => {
29662
29604
  Gl = Fl | 0;
29663
29605
  Fh = Eh | 0;
29664
29606
  Fl = El | 0;
29665
- ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
29607
+ ({ h: Eh, l: El } = _u64_ts_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
29666
29608
  Dh = Ch | 0;
29667
29609
  Dl = Cl | 0;
29668
29610
  Ch = Bh | 0;
29669
29611
  Cl = Bl | 0;
29670
29612
  Bh = Ah | 0;
29671
29613
  Bl = Al | 0;
29672
- const All = u64.add3L(T1l, sigma0l, MAJl);
29673
- Ah = u64.add3H(All, T1h, sigma0h, MAJh);
29614
+ const All = _u64_ts_1.default.add3L(T1l, sigma0l, MAJl);
29615
+ Ah = _u64_ts_1.default.add3H(All, T1h, sigma0h, MAJh);
29674
29616
  Al = All | 0;
29675
29617
  }
29676
- ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
29677
- ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
29678
- ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
29679
- ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
29680
- ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
29681
- ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
29682
- ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
29683
- ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
29618
+ ({ h: Ah, l: Al } = _u64_ts_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
29619
+ ({ h: Bh, l: Bl } = _u64_ts_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
29620
+ ({ h: Ch, l: Cl } = _u64_ts_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
29621
+ ({ h: Dh, l: Dl } = _u64_ts_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
29622
+ ({ h: Eh, l: El } = _u64_ts_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
29623
+ ({ h: Fh, l: Fl } = _u64_ts_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
29624
+ ({ h: Gh, l: Gl } = _u64_ts_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
29625
+ ({ h: Hh, l: Hl } = _u64_ts_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
29684
29626
  this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
29685
29627
  }
29686
29628
  roundClean() {
29687
- (0, utils_ts_1.clean)(SHA512_W_H, SHA512_W_L);
29629
+ SHA512_W_H.fill(0);
29630
+ SHA512_W_L.fill(0);
29688
29631
  }
29689
29632
  destroy() {
29690
- (0, utils_ts_1.clean)(this.buffer);
29633
+ this.buffer.fill(0);
29691
29634
  this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
29692
29635
  }
29693
29636
  }
29694
29637
  exports.SHA512 = SHA512;
29695
29638
 
29696
- class SHA384 extends SHA512 {
29697
- constructor() {
29698
- super(48);
29699
- this.Ah = _md_ts_1.SHA384_IV[0] | 0;
29700
- this.Al = _md_ts_1.SHA384_IV[1] | 0;
29701
- this.Bh = _md_ts_1.SHA384_IV[2] | 0;
29702
- this.Bl = _md_ts_1.SHA384_IV[3] | 0;
29703
- this.Ch = _md_ts_1.SHA384_IV[4] | 0;
29704
- this.Cl = _md_ts_1.SHA384_IV[5] | 0;
29705
- this.Dh = _md_ts_1.SHA384_IV[6] | 0;
29706
- this.Dl = _md_ts_1.SHA384_IV[7] | 0;
29707
- this.Eh = _md_ts_1.SHA384_IV[8] | 0;
29708
- this.El = _md_ts_1.SHA384_IV[9] | 0;
29709
- this.Fh = _md_ts_1.SHA384_IV[10] | 0;
29710
- this.Fl = _md_ts_1.SHA384_IV[11] | 0;
29711
- this.Gh = _md_ts_1.SHA384_IV[12] | 0;
29712
- this.Gl = _md_ts_1.SHA384_IV[13] | 0;
29713
- this.Hh = _md_ts_1.SHA384_IV[14] | 0;
29714
- this.Hl = _md_ts_1.SHA384_IV[15] | 0;
29715
- }
29716
- }
29717
- exports.SHA384 = SHA384;
29718
- var T224_IV = /* @__PURE__ */ Uint32Array.from([
29719
- 2352822216,
29720
- 424955298,
29721
- 1944164710,
29722
- 2312950998,
29723
- 502970286,
29724
- 855612546,
29725
- 1738396948,
29726
- 1479516111,
29727
- 258812777,
29728
- 2077511080,
29729
- 2011393907,
29730
- 79989058,
29731
- 1067287976,
29732
- 1780299464,
29733
- 286451373,
29734
- 2446758561
29735
- ]);
29736
- var T256_IV = /* @__PURE__ */ Uint32Array.from([
29737
- 573645204,
29738
- 4230739756,
29739
- 2673172387,
29740
- 3360449730,
29741
- 596883563,
29742
- 1867755857,
29743
- 2520282905,
29744
- 1497426621,
29745
- 2519219938,
29746
- 2827943907,
29747
- 3193839141,
29748
- 1401305490,
29749
- 721525244,
29750
- 746961066,
29751
- 246885852,
29752
- 2177182882
29753
- ]);
29754
-
29755
29639
  class SHA512_224 extends SHA512 {
29756
29640
  constructor() {
29757
29641
  super(28);
29758
- this.Ah = T224_IV[0] | 0;
29759
- this.Al = T224_IV[1] | 0;
29760
- this.Bh = T224_IV[2] | 0;
29761
- this.Bl = T224_IV[3] | 0;
29762
- this.Ch = T224_IV[4] | 0;
29763
- this.Cl = T224_IV[5] | 0;
29764
- this.Dh = T224_IV[6] | 0;
29765
- this.Dl = T224_IV[7] | 0;
29766
- this.Eh = T224_IV[8] | 0;
29767
- this.El = T224_IV[9] | 0;
29768
- this.Fh = T224_IV[10] | 0;
29769
- this.Fl = T224_IV[11] | 0;
29770
- this.Gh = T224_IV[12] | 0;
29771
- this.Gl = T224_IV[13] | 0;
29772
- this.Hh = T224_IV[14] | 0;
29773
- this.Hl = T224_IV[15] | 0;
29642
+ this.Ah = 2352822216 | 0;
29643
+ this.Al = 424955298 | 0;
29644
+ this.Bh = 1944164710 | 0;
29645
+ this.Bl = 2312950998 | 0;
29646
+ this.Ch = 502970286 | 0;
29647
+ this.Cl = 855612546 | 0;
29648
+ this.Dh = 1738396948 | 0;
29649
+ this.Dl = 1479516111 | 0;
29650
+ this.Eh = 258812777 | 0;
29651
+ this.El = 2077511080 | 0;
29652
+ this.Fh = 2011393907 | 0;
29653
+ this.Fl = 79989058 | 0;
29654
+ this.Gh = 1067287976 | 0;
29655
+ this.Gl = 1780299464 | 0;
29656
+ this.Hh = 286451373 | 0;
29657
+ this.Hl = 2446758561 | 0;
29774
29658
  }
29775
29659
  }
29776
29660
  exports.SHA512_224 = SHA512_224;
@@ -29778,34 +29662,81 @@ var require_sha2 = __commonJS((exports) => {
29778
29662
  class SHA512_256 extends SHA512 {
29779
29663
  constructor() {
29780
29664
  super(32);
29781
- this.Ah = T256_IV[0] | 0;
29782
- this.Al = T256_IV[1] | 0;
29783
- this.Bh = T256_IV[2] | 0;
29784
- this.Bl = T256_IV[3] | 0;
29785
- this.Ch = T256_IV[4] | 0;
29786
- this.Cl = T256_IV[5] | 0;
29787
- this.Dh = T256_IV[6] | 0;
29788
- this.Dl = T256_IV[7] | 0;
29789
- this.Eh = T256_IV[8] | 0;
29790
- this.El = T256_IV[9] | 0;
29791
- this.Fh = T256_IV[10] | 0;
29792
- this.Fl = T256_IV[11] | 0;
29793
- this.Gh = T256_IV[12] | 0;
29794
- this.Gl = T256_IV[13] | 0;
29795
- this.Hh = T256_IV[14] | 0;
29796
- this.Hl = T256_IV[15] | 0;
29665
+ this.Ah = 573645204 | 0;
29666
+ this.Al = 4230739756 | 0;
29667
+ this.Bh = 2673172387 | 0;
29668
+ this.Bl = 3360449730 | 0;
29669
+ this.Ch = 596883563 | 0;
29670
+ this.Cl = 1867755857 | 0;
29671
+ this.Dh = 2520282905 | 0;
29672
+ this.Dl = 1497426621 | 0;
29673
+ this.Eh = 2519219938 | 0;
29674
+ this.El = 2827943907 | 0;
29675
+ this.Fh = 3193839141 | 0;
29676
+ this.Fl = 1401305490 | 0;
29677
+ this.Gh = 721525244 | 0;
29678
+ this.Gl = 746961066 | 0;
29679
+ this.Hh = 246885852 | 0;
29680
+ this.Hl = 2177182882 | 0;
29797
29681
  }
29798
29682
  }
29799
29683
  exports.SHA512_256 = SHA512_256;
29800
- exports.sha256 = (0, utils_ts_1.createHasher)(() => new SHA256);
29801
- exports.sha224 = (0, utils_ts_1.createHasher)(() => new SHA224);
29802
- exports.sha512 = (0, utils_ts_1.createHasher)(() => new SHA512);
29803
- exports.sha384 = (0, utils_ts_1.createHasher)(() => new SHA384);
29804
- exports.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256);
29805
- exports.sha512_224 = (0, utils_ts_1.createHasher)(() => new SHA512_224);
29684
+
29685
+ class SHA384 extends SHA512 {
29686
+ constructor() {
29687
+ super(48);
29688
+ this.Ah = 3418070365 | 0;
29689
+ this.Al = 3238371032 | 0;
29690
+ this.Bh = 1654270250 | 0;
29691
+ this.Bl = 914150663 | 0;
29692
+ this.Ch = 2438529370 | 0;
29693
+ this.Cl = 812702999 | 0;
29694
+ this.Dh = 355462360 | 0;
29695
+ this.Dl = 4144912697 | 0;
29696
+ this.Eh = 1731405415 | 0;
29697
+ this.El = 4290775857 | 0;
29698
+ this.Fh = 2394180231 | 0;
29699
+ this.Fl = 1750603025 | 0;
29700
+ this.Gh = 3675008525 | 0;
29701
+ this.Gl = 1694076839 | 0;
29702
+ this.Hh = 1203062813 | 0;
29703
+ this.Hl = 3204075428 | 0;
29704
+ }
29705
+ }
29706
+ exports.SHA384 = SHA384;
29707
+ exports.sha512 = (0, utils_ts_1.wrapConstructor)(() => new SHA512);
29708
+ exports.sha512_224 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_224);
29709
+ exports.sha512_256 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_256);
29710
+ exports.sha384 = (0, utils_ts_1.wrapConstructor)(() => new SHA384);
29711
+ });
29712
+
29713
+ // ../../node_modules/@noble/hashes/sha2.js
29714
+ var require_sha2 = __commonJS((exports) => {
29715
+ Object.defineProperty(exports, "__esModule", { value: true });
29716
+ exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.sha384 = exports.sha256 = exports.sha224 = undefined;
29717
+ var sha256_ts_1 = require_sha256();
29718
+ Object.defineProperty(exports, "sha224", { enumerable: true, get: function() {
29719
+ return sha256_ts_1.sha224;
29720
+ } });
29721
+ Object.defineProperty(exports, "sha256", { enumerable: true, get: function() {
29722
+ return sha256_ts_1.sha256;
29723
+ } });
29724
+ var sha512_ts_1 = require_sha512();
29725
+ Object.defineProperty(exports, "sha384", { enumerable: true, get: function() {
29726
+ return sha512_ts_1.sha384;
29727
+ } });
29728
+ Object.defineProperty(exports, "sha512", { enumerable: true, get: function() {
29729
+ return sha512_ts_1.sha512;
29730
+ } });
29731
+ Object.defineProperty(exports, "sha512_224", { enumerable: true, get: function() {
29732
+ return sha512_ts_1.sha512_224;
29733
+ } });
29734
+ Object.defineProperty(exports, "sha512_256", { enumerable: true, get: function() {
29735
+ return sha512_ts_1.sha512_256;
29736
+ } });
29806
29737
  });
29807
29738
 
29808
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/utils.js
29739
+ // ../../node_modules/@noble/curves/abstract/utils.js
29809
29740
  var require_utils8 = __commonJS((exports) => {
29810
29741
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
29811
29742
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -30079,7 +30010,7 @@ var require_utils8 = __commonJS((exports) => {
30079
30010
  }
30080
30011
  });
30081
30012
 
30082
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/modular.js
30013
+ // ../../node_modules/@noble/curves/abstract/modular.js
30083
30014
  var require_modular = __commonJS((exports) => {
30084
30015
  Object.defineProperty(exports, "__esModule", { value: true });
30085
30016
  exports.isNegativeLE = undefined;
@@ -30104,7 +30035,6 @@ var require_modular = __commonJS((exports) => {
30104
30035
  exports.getMinHashLength = getMinHashLength;
30105
30036
  exports.mapHashToField = mapHashToField;
30106
30037
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
30107
- var utils_1 = require_utils7();
30108
30038
  var utils_ts_1 = require_utils8();
30109
30039
  var _0n = BigInt(0);
30110
30040
  var _1n = BigInt(1);
@@ -30164,17 +30094,13 @@ var require_modular = __commonJS((exports) => {
30164
30094
  return mod(x, modulo);
30165
30095
  }
30166
30096
  function tonelliShanks(P) {
30167
- let Q = P - _1n;
30168
- let S = 0;
30169
- while (Q % _2n === _0n) {
30170
- Q /= _2n;
30171
- S++;
30172
- }
30173
- let Z = _2n;
30174
- const _Fp = Field(P);
30175
- while (Z < P && FpIsSquare(_Fp, Z)) {
30176
- if (Z++ > 1000)
30177
- throw new Error("Cannot find square root: probably non-prime P");
30097
+ const legendreC = (P - _1n) / _2n;
30098
+ let Q, S, Z;
30099
+ for (Q = P - _1n, S = 0;Q % _2n === _0n; Q /= _2n, S++)
30100
+ ;
30101
+ for (Z = _2n;Z < P && pow(Z, legendreC, P) !== P - _1n; Z++) {
30102
+ if (Z > 1000)
30103
+ throw new Error("Cannot find square root: likely non-prime P");
30178
30104
  }
30179
30105
  if (S === 1) {
30180
30106
  const p1div4 = (P + _1n) / _4n;
@@ -30187,7 +30113,7 @@ var require_modular = __commonJS((exports) => {
30187
30113
  }
30188
30114
  const Q1div2 = (Q + _1n) / _2n;
30189
30115
  return function tonelliSlow(Fp, n) {
30190
- if (!FpIsSquare(Fp, n))
30116
+ if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))
30191
30117
  throw new Error("Cannot find square root");
30192
30118
  let r = S;
30193
30119
  let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q);
@@ -30213,8 +30139,8 @@ var require_modular = __commonJS((exports) => {
30213
30139
  }
30214
30140
  function FpSqrt(P) {
30215
30141
  if (P % _4n === _3n) {
30142
+ const p1div4 = (P + _1n) / _4n;
30216
30143
  return function sqrt3mod4(Fp, n) {
30217
- const p1div4 = (P + _1n) / _4n;
30218
30144
  const root = Fp.pow(n, p1div4);
30219
30145
  if (!Fp.eql(Fp.sqr(root), n))
30220
30146
  throw new Error("Cannot find square root");
@@ -30222,9 +30148,9 @@ var require_modular = __commonJS((exports) => {
30222
30148
  };
30223
30149
  }
30224
30150
  if (P % _8n === _5n) {
30151
+ const c1 = (P - _5n) / _8n;
30225
30152
  return function sqrt5mod8(Fp, n) {
30226
30153
  const n2 = Fp.mul(n, _2n);
30227
- const c1 = (P - _5n) / _8n;
30228
30154
  const v = Fp.pow(n2, c1);
30229
30155
  const nv = Fp.mul(n, v);
30230
30156
  const i = Fp.mul(Fp.mul(nv, _2n), v);
@@ -30271,60 +30197,55 @@ var require_modular = __commonJS((exports) => {
30271
30197
  }, initial);
30272
30198
  return (0, utils_ts_1.validateObject)(field, opts);
30273
30199
  }
30274
- function FpPow(Fp, num, power) {
30200
+ function FpPow(f, num, power) {
30275
30201
  if (power < _0n)
30276
30202
  throw new Error("invalid exponent, negatives unsupported");
30277
30203
  if (power === _0n)
30278
- return Fp.ONE;
30204
+ return f.ONE;
30279
30205
  if (power === _1n)
30280
30206
  return num;
30281
- let p = Fp.ONE;
30207
+ let p = f.ONE;
30282
30208
  let d = num;
30283
30209
  while (power > _0n) {
30284
30210
  if (power & _1n)
30285
- p = Fp.mul(p, d);
30286
- d = Fp.sqr(d);
30211
+ p = f.mul(p, d);
30212
+ d = f.sqr(d);
30287
30213
  power >>= _1n;
30288
30214
  }
30289
30215
  return p;
30290
30216
  }
30291
- function FpInvertBatch(Fp, nums, passZero = false) {
30292
- const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : undefined);
30293
- const multipliedAcc = nums.reduce((acc, num, i) => {
30294
- if (Fp.is0(num))
30217
+ function FpInvertBatch(f, nums) {
30218
+ const tmp = new Array(nums.length);
30219
+ const lastMultiplied = nums.reduce((acc, num, i) => {
30220
+ if (f.is0(num))
30295
30221
  return acc;
30296
- inverted[i] = acc;
30297
- return Fp.mul(acc, num);
30298
- }, Fp.ONE);
30299
- const invertedAcc = Fp.inv(multipliedAcc);
30222
+ tmp[i] = acc;
30223
+ return f.mul(acc, num);
30224
+ }, f.ONE);
30225
+ const inverted = f.inv(lastMultiplied);
30300
30226
  nums.reduceRight((acc, num, i) => {
30301
- if (Fp.is0(num))
30227
+ if (f.is0(num))
30302
30228
  return acc;
30303
- inverted[i] = Fp.mul(acc, inverted[i]);
30304
- return Fp.mul(acc, num);
30305
- }, invertedAcc);
30306
- return inverted;
30307
- }
30308
- function FpDiv(Fp, lhs, rhs) {
30309
- return Fp.mul(lhs, typeof rhs === "bigint" ? invert(rhs, Fp.ORDER) : Fp.inv(rhs));
30310
- }
30311
- function FpLegendre(Fp, n) {
30312
- const legc = (Fp.ORDER - _1n) / _2n;
30313
- const powered = Fp.pow(n, legc);
30314
- const yes = Fp.eql(powered, Fp.ONE);
30315
- const zero = Fp.eql(powered, Fp.ZERO);
30316
- const no = Fp.eql(powered, Fp.neg(Fp.ONE));
30317
- if (!yes && !zero && !no)
30318
- throw new Error("Cannot find square root: probably non-prime P");
30319
- return yes ? 1 : zero ? 0 : -1;
30320
- }
30321
- function FpIsSquare(Fp, n) {
30322
- const l = FpLegendre(Fp, n);
30323
- return l === 0 || l === 1;
30229
+ tmp[i] = f.mul(acc, tmp[i]);
30230
+ return f.mul(acc, num);
30231
+ }, inverted);
30232
+ return tmp;
30233
+ }
30234
+ function FpDiv(f, lhs, rhs) {
30235
+ return f.mul(lhs, typeof rhs === "bigint" ? invert(rhs, f.ORDER) : f.inv(rhs));
30236
+ }
30237
+ function FpLegendre(order) {
30238
+ const legendreConst = (order - _1n) / _2n;
30239
+ return (f, x) => f.pow(x, legendreConst);
30240
+ }
30241
+ function FpIsSquare(f) {
30242
+ const legendre = FpLegendre(f.ORDER);
30243
+ return (x) => {
30244
+ const p = legendre(f, x);
30245
+ return f.eql(p, f.ZERO) || f.eql(p, f.ONE);
30246
+ };
30324
30247
  }
30325
30248
  function nLength(n, nBitLength) {
30326
- if (nBitLength !== undefined)
30327
- (0, utils_1.anumber)(nBitLength);
30328
30249
  const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
30329
30250
  const nByteLength = Math.ceil(_nBitLength / 8);
30330
30251
  return { nBitLength: _nBitLength, nByteLength };
@@ -30370,14 +30291,14 @@ var require_modular = __commonJS((exports) => {
30370
30291
  sqrtP = FpSqrt(ORDER);
30371
30292
  return sqrtP(f, n);
30372
30293
  }),
30294
+ invertBatch: (lst) => FpInvertBatch(f, lst),
30295
+ cmov: (a, b, c) => c ? b : a,
30373
30296
  toBytes: (num) => isLE ? (0, utils_ts_1.numberToBytesLE)(num, BYTES) : (0, utils_ts_1.numberToBytesBE)(num, BYTES),
30374
30297
  fromBytes: (bytes) => {
30375
30298
  if (bytes.length !== BYTES)
30376
30299
  throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
30377
30300
  return isLE ? (0, utils_ts_1.bytesToNumberLE)(bytes) : (0, utils_ts_1.bytesToNumberBE)(bytes);
30378
- },
30379
- invertBatch: (lst) => FpInvertBatch(f, lst),
30380
- cmov: (a, b, c) => c ? b : a
30301
+ }
30381
30302
  });
30382
30303
  return Object.freeze(f);
30383
30304
  }
@@ -30424,7 +30345,7 @@ var require_modular = __commonJS((exports) => {
30424
30345
  }
30425
30346
  });
30426
30347
 
30427
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/curve.js
30348
+ // ../../node_modules/@noble/curves/abstract/curve.js
30428
30349
  var require_curve = __commonJS((exports) => {
30429
30350
  Object.defineProperty(exports, "__esModule", { value: true });
30430
30351
  exports.wNAF = wNAF;
@@ -30665,7 +30586,7 @@ var require_curve = __commonJS((exports) => {
30665
30586
  }
30666
30587
  });
30667
30588
 
30668
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/edwards.js
30589
+ // ../../node_modules/@noble/curves/abstract/edwards.js
30669
30590
  var require_edwards = __commonJS((exports) => {
30670
30591
  Object.defineProperty(exports, "__esModule", { value: true });
30671
30592
  exports.twistedEdwards = twistedEdwards;
@@ -30783,7 +30704,7 @@ var require_edwards = __commonJS((exports) => {
30783
30704
  return new Point(x, y, _1n, modP(x * y));
30784
30705
  }
30785
30706
  static normalizeZ(points) {
30786
- const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.ez));
30707
+ const toInv = Fp.invertBatch(points.map((p) => p.ez));
30787
30708
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
30788
30709
  }
30789
30710
  static msm(points, scalars) {
@@ -30951,7 +30872,7 @@ var require_edwards = __commonJS((exports) => {
30951
30872
  function getPublicKey(privKey) {
30952
30873
  return getExtendedPublicKey(privKey).pointBytes;
30953
30874
  }
30954
- function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
30875
+ function hashDomainToScalar(context = new Uint8Array, ...msgs) {
30955
30876
  const msg = (0, utils_ts_1.concatBytes)(...msgs);
30956
30877
  return modN_LE(cHash(domain(msg, (0, utils_ts_1.ensureBytes)("context", context), !!prehash)));
30957
30878
  }
@@ -31015,7 +30936,7 @@ var require_edwards = __commonJS((exports) => {
31015
30936
  }
31016
30937
  });
31017
30938
 
31018
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/hash-to-curve.js
30939
+ // ../../node_modules/@noble/curves/abstract/hash-to-curve.js
31019
30940
  var require_hash_to_curve = __commonJS((exports) => {
31020
30941
  Object.defineProperty(exports, "__esModule", { value: true });
31021
30942
  exports.expand_message_xmd = expand_message_xmd;
@@ -31122,53 +31043,49 @@ var require_hash_to_curve = __commonJS((exports) => {
31122
31043
  return u;
31123
31044
  }
31124
31045
  function isogenyMap(field, map2) {
31125
- const coeff = map2.map((i) => Array.from(i).reverse());
31046
+ const COEFF = map2.map((i) => Array.from(i).reverse());
31126
31047
  return (x, y) => {
31127
- const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
31128
- const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(field, [xd, yd], true);
31129
- x = field.mul(xn, xd_inv);
31130
- y = field.mul(y, field.mul(yn, yd_inv));
31048
+ const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
31049
+ if (field.is0(xDen) || field.is0(yDen))
31050
+ throw new Error("bad point: ZERO");
31051
+ x = field.div(xNum, xDen);
31052
+ y = field.mul(y, field.div(yNum, yDen));
31131
31053
  return { x, y };
31132
31054
  };
31133
31055
  }
31134
- function createHasher(Point, mapToCurve, defaults) {
31056
+ function createHasher(Point, mapToCurve, def) {
31135
31057
  if (typeof mapToCurve !== "function")
31136
31058
  throw new Error("mapToCurve() must be defined");
31137
- function map2(num) {
31138
- return Point.fromAffine(mapToCurve(num));
31139
- }
31140
- function clear(initial) {
31141
- const P = initial.clearCofactor();
31142
- if (P.equals(Point.ZERO))
31143
- return Point.ZERO;
31144
- P.assertValidity();
31145
- return P;
31146
- }
31147
31059
  return {
31148
- defaults,
31149
31060
  hashToCurve(msg, options) {
31150
- const u = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });
31151
- const u0 = map2(u[0]);
31152
- const u1 = map2(u[1]);
31153
- return clear(u0.add(u1));
31061
+ const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });
31062
+ const u0 = Point.fromAffine(mapToCurve(u[0]));
31063
+ const u1 = Point.fromAffine(mapToCurve(u[1]));
31064
+ const P = u0.add(u1).clearCofactor();
31065
+ P.assertValidity();
31066
+ return P;
31154
31067
  },
31155
31068
  encodeToCurve(msg, options) {
31156
- const u = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });
31157
- return clear(map2(u[0]));
31069
+ const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });
31070
+ const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();
31071
+ P.assertValidity();
31072
+ return P;
31158
31073
  },
31159
31074
  mapToCurve(scalars) {
31160
31075
  if (!Array.isArray(scalars))
31161
- throw new Error("expected array of bigints");
31076
+ throw new Error("mapToCurve: expected array of bigints");
31162
31077
  for (const i of scalars)
31163
31078
  if (typeof i !== "bigint")
31164
- throw new Error("expected array of bigints");
31165
- return clear(map2(scalars));
31079
+ throw new Error("mapToCurve: expected array of bigints");
31080
+ const P = Point.fromAffine(mapToCurve(scalars)).clearCofactor();
31081
+ P.assertValidity();
31082
+ return P;
31166
31083
  }
31167
31084
  };
31168
31085
  }
31169
31086
  });
31170
31087
 
31171
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/montgomery.js
31088
+ // ../../node_modules/@noble/curves/abstract/montgomery.js
31172
31089
  var require_montgomery = __commonJS((exports) => {
31173
31090
  Object.defineProperty(exports, "__esModule", { value: true });
31174
31091
  exports.montgomery = montgomery;
@@ -31193,13 +31110,12 @@ var require_montgomery = __commonJS((exports) => {
31193
31110
  function montgomery(curveDef) {
31194
31111
  const CURVE = validateOpts(curveDef);
31195
31112
  const { P } = CURVE;
31196
- const Fp = (0, modular_ts_1.Field)(P);
31197
31113
  const modP = (n) => (0, modular_ts_1.mod)(n, P);
31198
31114
  const montgomeryBits = CURVE.montgomeryBits;
31199
31115
  const montgomeryBytes = Math.ceil(montgomeryBits / 8);
31200
31116
  const fieldLen = CURVE.nByteLength;
31201
31117
  const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);
31202
- const powPminus2 = CURVE.powPminus2 || ((x) => Fp.pow(x, P - BigInt(2)));
31118
+ const powPminus2 = CURVE.powPminus2 || ((x) => (0, modular_ts_1.pow)(x, P - BigInt(2), P));
31203
31119
  function cswap(swap, x_2, x_3) {
31204
31120
  const dummy = modP(swap * (x_2 - x_3));
31205
31121
  x_2 = modP(x_2 - dummy);
@@ -31294,10 +31210,10 @@ var require_montgomery = __commonJS((exports) => {
31294
31210
  }
31295
31211
  });
31296
31212
 
31297
- // ../../node_modules/eciesjs/node_modules/@noble/curves/ed25519.js
31213
+ // ../../node_modules/@noble/curves/ed25519.js
31298
31214
  var require_ed25519 = __commonJS((exports) => {
31299
31215
  Object.defineProperty(exports, "__esModule", { value: true });
31300
- exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.ed25519_hasher = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
31216
+ exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
31301
31217
  exports.edwardsToMontgomeryPub = edwardsToMontgomeryPub;
31302
31218
  exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
31303
31219
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -31482,10 +31398,10 @@ var require_ed25519 = __commonJS((exports) => {
31482
31398
  xd = Fp.cmov(xd, Fp.ONE, e3);
31483
31399
  yn = Fp.cmov(yn, Fp.ONE, e3);
31484
31400
  yd = Fp.cmov(yd, Fp.ONE, e3);
31485
- const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(Fp, [xd, yd], true);
31486
- return { x: Fp.mul(xn, xd_inv), y: Fp.mul(yn, yd_inv) };
31401
+ const inv = Fp.invertBatch([xd, yd]);
31402
+ return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) };
31487
31403
  }
31488
- exports.ed25519_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
31404
+ var htf = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
31489
31405
  DST: "edwards25519_XMD:SHA-512_ELL2_RO_",
31490
31406
  encodeDST: "edwards25519_XMD:SHA-512_ELL2_NU_",
31491
31407
  p: Fp.ORDER,
@@ -31494,8 +31410,8 @@ var require_ed25519 = __commonJS((exports) => {
31494
31410
  expand: "xmd",
31495
31411
  hash: sha2_1.sha512
31496
31412
  }))();
31497
- exports.hashToCurve = (() => exports.ed25519_hasher.hashToCurve)();
31498
- exports.encodeToCurve = (() => exports.ed25519_hasher.encodeToCurve)();
31413
+ exports.hashToCurve = (() => htf.hashToCurve)();
31414
+ exports.encodeToCurve = (() => htf.encodeToCurve)();
31499
31415
  function aristp(other) {
31500
31416
  if (!(other instanceof RistPoint))
31501
31417
  throw new Error("RistrettoPoint expected");
@@ -31661,10 +31577,11 @@ var require_ed25519 = __commonJS((exports) => {
31661
31577
  exports.hash_to_ristretto255 = exports.hashToRistretto255;
31662
31578
  });
31663
31579
 
31664
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/hmac.js
31580
+ // ../../node_modules/@noble/hashes/hmac.js
31665
31581
  var require_hmac = __commonJS((exports) => {
31666
31582
  Object.defineProperty(exports, "__esModule", { value: true });
31667
31583
  exports.hmac = exports.HMAC = undefined;
31584
+ var _assert_ts_1 = require__assert();
31668
31585
  var utils_ts_1 = require_utils7();
31669
31586
 
31670
31587
  class HMAC extends utils_ts_1.Hash {
@@ -31672,7 +31589,7 @@ var require_hmac = __commonJS((exports) => {
31672
31589
  super();
31673
31590
  this.finished = false;
31674
31591
  this.destroyed = false;
31675
- (0, utils_ts_1.ahash)(hash);
31592
+ (0, _assert_ts_1.ahash)(hash);
31676
31593
  const key = (0, utils_ts_1.toBytes)(_key);
31677
31594
  this.iHash = hash.create();
31678
31595
  if (typeof this.iHash.update !== "function")
@@ -31689,16 +31606,16 @@ var require_hmac = __commonJS((exports) => {
31689
31606
  for (let i = 0;i < pad.length; i++)
31690
31607
  pad[i] ^= 54 ^ 92;
31691
31608
  this.oHash.update(pad);
31692
- (0, utils_ts_1.clean)(pad);
31609
+ pad.fill(0);
31693
31610
  }
31694
31611
  update(buf) {
31695
- (0, utils_ts_1.aexists)(this);
31612
+ (0, _assert_ts_1.aexists)(this);
31696
31613
  this.iHash.update(buf);
31697
31614
  return this;
31698
31615
  }
31699
31616
  digestInto(out) {
31700
- (0, utils_ts_1.aexists)(this);
31701
- (0, utils_ts_1.abytes)(out, this.outputLen);
31617
+ (0, _assert_ts_1.aexists)(this);
31618
+ (0, _assert_ts_1.abytes)(out, this.outputLen);
31702
31619
  this.finished = true;
31703
31620
  this.iHash.digestInto(out);
31704
31621
  this.oHash.update(out);
@@ -31722,9 +31639,6 @@ var require_hmac = __commonJS((exports) => {
31722
31639
  to.iHash = iHash._cloneInto(to.iHash);
31723
31640
  return to;
31724
31641
  }
31725
- clone() {
31726
- return this._cloneInto();
31727
- }
31728
31642
  destroy() {
31729
31643
  this.destroyed = true;
31730
31644
  this.oHash.destroy();
@@ -31737,7 +31651,7 @@ var require_hmac = __commonJS((exports) => {
31737
31651
  exports.hmac.create = (hash, key) => new HMAC(hash, key);
31738
31652
  });
31739
31653
 
31740
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/weierstrass.js
31654
+ // ../../node_modules/@noble/curves/abstract/weierstrass.js
31741
31655
  var require_weierstrass = __commonJS((exports) => {
31742
31656
  Object.defineProperty(exports, "__esModule", { value: true });
31743
31657
  exports.DER = exports.DERErr = undefined;
@@ -31972,7 +31886,7 @@ var require_weierstrass = __commonJS((exports) => {
31972
31886
  constructor(px, py, pz) {
31973
31887
  if (px == null || !Fp.isValid(px))
31974
31888
  throw new Error("x required");
31975
- if (py == null || !Fp.isValid(py) || Fp.is0(py))
31889
+ if (py == null || !Fp.isValid(py))
31976
31890
  throw new Error("y required");
31977
31891
  if (pz == null || !Fp.isValid(pz))
31978
31892
  throw new Error("z required");
@@ -31999,7 +31913,7 @@ var require_weierstrass = __commonJS((exports) => {
31999
31913
  return this.toAffine().y;
32000
31914
  }
32001
31915
  static normalizeZ(points) {
32002
- const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.pz));
31916
+ const toInv = Fp.invertBatch(points.map((p) => p.pz));
32003
31917
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
32004
31918
  }
32005
31919
  static fromHex(hex) {
@@ -32360,7 +32274,7 @@ var require_weierstrass = __commonJS((exports) => {
32360
32274
  return (0, utils_ts_1.hexToBytes)(this.toDERHex());
32361
32275
  }
32362
32276
  toDERHex() {
32363
- return exports.DER.hexFromSig(this);
32277
+ return exports.DER.hexFromSig({ r: this.r, s: this.s });
32364
32278
  }
32365
32279
  toCompactRawBytes() {
32366
32280
  return (0, utils_ts_1.hexToBytes)(this.toCompactHex());
@@ -32635,14 +32549,13 @@ var require_weierstrass = __commonJS((exports) => {
32635
32549
  y = Fp.cmov(y, value, isValid2);
32636
32550
  const e1 = Fp.isOdd(u) === Fp.isOdd(y);
32637
32551
  y = Fp.cmov(Fp.neg(y), y, e1);
32638
- const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];
32639
- x = Fp.mul(x, tv4_inv);
32552
+ x = Fp.div(x, tv4);
32640
32553
  return { x, y };
32641
32554
  };
32642
32555
  }
32643
32556
  });
32644
32557
 
32645
- // ../../node_modules/eciesjs/node_modules/@noble/curves/_shortw_utils.js
32558
+ // ../../node_modules/@noble/curves/_shortw_utils.js
32646
32559
  var require__shortw_utils = __commonJS((exports) => {
32647
32560
  Object.defineProperty(exports, "__esModule", { value: true });
32648
32561
  exports.getHash = getHash;
@@ -32664,10 +32577,10 @@ var require__shortw_utils = __commonJS((exports) => {
32664
32577
  }
32665
32578
  });
32666
32579
 
32667
- // ../../node_modules/eciesjs/node_modules/@noble/curves/secp256k1.js
32580
+ // ../../node_modules/@noble/curves/secp256k1.js
32668
32581
  var require_secp256k1 = __commonJS((exports) => {
32669
32582
  Object.defineProperty(exports, "__esModule", { value: true });
32670
- exports.encodeToCurve = exports.hashToCurve = exports.secp256k1_hasher = exports.schnorr = exports.secp256k1 = undefined;
32583
+ exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = undefined;
32671
32584
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
32672
32585
  var sha2_1 = require_sha2();
32673
32586
  var utils_1 = require_utils7();
@@ -32863,7 +32776,7 @@ var require_secp256k1 = __commonJS((exports) => {
32863
32776
  B: BigInt("1771"),
32864
32777
  Z: Fpk1.create(BigInt("-11"))
32865
32778
  }))();
32866
- exports.secp256k1_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
32779
+ var htf = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
32867
32780
  const { x, y } = mapSWU(Fpk1.create(scalars[0]));
32868
32781
  return isoMap(x, y);
32869
32782
  }, {
@@ -32875,8 +32788,8 @@ var require_secp256k1 = __commonJS((exports) => {
32875
32788
  expand: "xmd",
32876
32789
  hash: sha2_1.sha256
32877
32790
  }))();
32878
- exports.hashToCurve = (() => exports.secp256k1_hasher.hashToCurve)();
32879
- exports.encodeToCurve = (() => exports.secp256k1_hasher.encodeToCurve)();
32791
+ exports.hashToCurve = (() => htf.hashToCurve)();
32792
+ exports.encodeToCurve = (() => htf.encodeToCurve)();
32880
32793
  });
32881
32794
 
32882
32795
  // ../../node_modules/eciesjs/dist/utils/hex.js
@@ -32990,61 +32903,51 @@ var require_elliptic = __commonJS((exports) => {
32990
32903
  };
32991
32904
  });
32992
32905
 
32993
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/hkdf.js
32906
+ // ../../node_modules/@noble/hashes/hkdf.js
32994
32907
  var require_hkdf = __commonJS((exports) => {
32995
32908
  Object.defineProperty(exports, "__esModule", { value: true });
32996
32909
  exports.hkdf = undefined;
32997
32910
  exports.extract = extract;
32998
32911
  exports.expand = expand;
32912
+ var _assert_ts_1 = require__assert();
32999
32913
  var hmac_ts_1 = require_hmac();
33000
32914
  var utils_ts_1 = require_utils7();
33001
32915
  function extract(hash, ikm, salt) {
33002
- (0, utils_ts_1.ahash)(hash);
32916
+ (0, _assert_ts_1.ahash)(hash);
33003
32917
  if (salt === undefined)
33004
32918
  salt = new Uint8Array(hash.outputLen);
33005
32919
  return (0, hmac_ts_1.hmac)(hash, (0, utils_ts_1.toBytes)(salt), (0, utils_ts_1.toBytes)(ikm));
33006
32920
  }
33007
- var HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
33008
- var EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
32921
+ var HKDF_COUNTER = /* @__PURE__ */ new Uint8Array([0]);
32922
+ var EMPTY_BUFFER = /* @__PURE__ */ new Uint8Array;
33009
32923
  function expand(hash, prk, info, length = 32) {
33010
- (0, utils_ts_1.ahash)(hash);
33011
- (0, utils_ts_1.anumber)(length);
33012
- const olen = hash.outputLen;
33013
- if (length > 255 * olen)
32924
+ (0, _assert_ts_1.ahash)(hash);
32925
+ (0, _assert_ts_1.anumber)(length);
32926
+ if (length > 255 * hash.outputLen)
33014
32927
  throw new Error("Length should be <= 255*HashLen");
33015
- const blocks = Math.ceil(length / olen);
32928
+ const blocks = Math.ceil(length / hash.outputLen);
33016
32929
  if (info === undefined)
33017
32930
  info = EMPTY_BUFFER;
33018
- const okm = new Uint8Array(blocks * olen);
32931
+ const okm = new Uint8Array(blocks * hash.outputLen);
33019
32932
  const HMAC = hmac_ts_1.hmac.create(hash, prk);
33020
32933
  const HMACTmp = HMAC._cloneInto();
33021
32934
  const T = new Uint8Array(HMAC.outputLen);
33022
32935
  for (let counter = 0;counter < blocks; counter++) {
33023
32936
  HKDF_COUNTER[0] = counter + 1;
33024
32937
  HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T).update(info).update(HKDF_COUNTER).digestInto(T);
33025
- okm.set(T, olen * counter);
32938
+ okm.set(T, hash.outputLen * counter);
33026
32939
  HMAC._cloneInto(HMACTmp);
33027
32940
  }
33028
32941
  HMAC.destroy();
33029
32942
  HMACTmp.destroy();
33030
- (0, utils_ts_1.clean)(T, HKDF_COUNTER);
32943
+ T.fill(0);
32944
+ HKDF_COUNTER.fill(0);
33031
32945
  return okm.slice(0, length);
33032
32946
  }
33033
32947
  var hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
33034
32948
  exports.hkdf = hkdf;
33035
32949
  });
33036
32950
 
33037
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha256.js
33038
- var require_sha256 = __commonJS((exports) => {
33039
- Object.defineProperty(exports, "__esModule", { value: true });
33040
- exports.sha224 = exports.SHA224 = exports.sha256 = exports.SHA256 = undefined;
33041
- var sha2_ts_1 = require_sha2();
33042
- exports.SHA256 = sha2_ts_1.SHA256;
33043
- exports.sha256 = sha2_ts_1.sha256;
33044
- exports.SHA224 = sha2_ts_1.SHA224;
33045
- exports.sha224 = sha2_ts_1.sha224;
33046
- });
33047
-
33048
32951
  // ../../node_modules/eciesjs/dist/utils/hash.js
33049
32952
  var require_hash = __commonJS((exports) => {
33050
32953
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -35351,15 +35254,15 @@ var require_main3 = __commonJS((exports, module) => {
35351
35254
  lastError = error;
35352
35255
  if (error.code === "MISSING_ENV_FILE") {
35353
35256
  if (!options.convention) {
35354
- console.error(error.message);
35257
+ logger.error(error.message);
35355
35258
  if (error.help) {
35356
- console.error(error.help);
35259
+ logger.error(error.help);
35357
35260
  }
35358
35261
  }
35359
35262
  } else {
35360
- console.error(error.message);
35263
+ logger.error(error.message);
35361
35264
  if (error.help) {
35362
- console.error(error.help);
35265
+ logger.error(error.help);
35363
35266
  }
35364
35267
  }
35365
35268
  }
@@ -35404,9 +35307,9 @@ var require_main3 = __commonJS((exports, module) => {
35404
35307
  const overload = options.overload || options.override;
35405
35308
  const { parsed, errors: errors2 } = new Parse(src, privateKey, processEnv, overload).run();
35406
35309
  for (const error of errors2) {
35407
- console.error(error.message);
35310
+ logger.error(error.message);
35408
35311
  if (error.help) {
35409
- console.error(error.help);
35312
+ logger.error(error.help);
35410
35313
  }
35411
35314
  }
35412
35315
  return parsed;
@@ -35477,9 +35380,9 @@ var require_main3 = __commonJS((exports, module) => {
35477
35380
  }
35478
35381
  if (options.strict)
35479
35382
  throw error;
35480
- console.error(error.message);
35383
+ logger.error(error.message);
35481
35384
  if (error.help) {
35482
- console.error(error.help);
35385
+ logger.error(error.help);
35483
35386
  }
35484
35387
  }
35485
35388
  if (key) {
@@ -49797,13 +49700,14 @@ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_
49797
49700
  var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
49798
49701
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
49799
49702
  function timeRegexSource(args) {
49800
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
49703
+ let secondsRegexSource = `[0-5]\\d`;
49801
49704
  if (args.precision) {
49802
- regex = `${regex}\\.\\d{${args.precision}}`;
49705
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
49803
49706
  } else if (args.precision == null) {
49804
- regex = `${regex}(\\.\\d+)?`;
49707
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
49805
49708
  }
49806
- return regex;
49709
+ const secondsQuantifier = args.precision ? "+" : "?";
49710
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
49807
49711
  }
49808
49712
  function timeRegex(args) {
49809
49713
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -52956,18 +52860,20 @@ var z = /* @__PURE__ */ Object.freeze({
52956
52860
  });
52957
52861
 
52958
52862
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
52959
- var LATEST_PROTOCOL_VERSION = "2024-11-05";
52863
+ var LATEST_PROTOCOL_VERSION = "2025-03-26";
52960
52864
  var SUPPORTED_PROTOCOL_VERSIONS = [
52961
52865
  LATEST_PROTOCOL_VERSION,
52866
+ "2024-11-05",
52962
52867
  "2024-10-07"
52963
52868
  ];
52964
52869
  var JSONRPC_VERSION = "2.0";
52965
52870
  var ProgressTokenSchema = z.union([z.string(), z.number().int()]);
52966
52871
  var CursorSchema = z.string();
52872
+ var RequestMetaSchema = z.object({
52873
+ progressToken: z.optional(ProgressTokenSchema)
52874
+ }).passthrough();
52967
52875
  var BaseRequestParamsSchema = z.object({
52968
- _meta: z.optional(z.object({
52969
- progressToken: z.optional(ProgressTokenSchema)
52970
- }).passthrough())
52876
+ _meta: z.optional(RequestMetaSchema)
52971
52877
  }).passthrough();
52972
52878
  var RequestSchema = z.object({
52973
52879
  method: z.string(),
@@ -53218,13 +53124,21 @@ var GetPromptResultSchema = ResultSchema.extend({
53218
53124
  var PromptListChangedNotificationSchema = NotificationSchema.extend({
53219
53125
  method: z.literal("notifications/prompts/list_changed")
53220
53126
  });
53127
+ var ToolAnnotationsSchema = z.object({
53128
+ title: z.optional(z.string()),
53129
+ readOnlyHint: z.optional(z.boolean()),
53130
+ destructiveHint: z.optional(z.boolean()),
53131
+ idempotentHint: z.optional(z.boolean()),
53132
+ openWorldHint: z.optional(z.boolean())
53133
+ }).passthrough();
53221
53134
  var ToolSchema = z.object({
53222
53135
  name: z.string(),
53223
53136
  description: z.optional(z.string()),
53224
53137
  inputSchema: z.object({
53225
53138
  type: z.literal("object"),
53226
53139
  properties: z.optional(z.object({}).passthrough())
53227
- }).passthrough()
53140
+ }).passthrough(),
53141
+ annotations: z.optional(ToolAnnotationsSchema)
53228
53142
  }).passthrough();
53229
53143
  var ListToolsRequestSchema = PaginatedRequestSchema.extend({
53230
53144
  method: z.literal("tools/list")
@@ -53507,7 +53421,7 @@ class Protocol {
53507
53421
  Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
53508
53422
  }
53509
53423
  _onrequest(request, extra) {
53510
- var _a, _b, _c;
53424
+ var _a, _b, _c, _d;
53511
53425
  const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== undefined ? _a : this.fallbackRequestHandler;
53512
53426
  if (handler === undefined) {
53513
53427
  (_b = this._transport) === null || _b === undefined || _b.send({
@@ -53525,9 +53439,11 @@ class Protocol {
53525
53439
  const fullExtra = {
53526
53440
  signal: abortController.signal,
53527
53441
  sessionId: (_c = this._transport) === null || _c === undefined ? undefined : _c.sessionId,
53442
+ _meta: (_d = request.params) === null || _d === undefined ? undefined : _d._meta,
53528
53443
  sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
53529
53444
  sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
53530
- authInfo: extra === null || extra === undefined ? undefined : extra.authInfo
53445
+ authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
53446
+ requestId: request.id
53531
53447
  };
53532
53448
  Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
53533
53449
  var _a2;
@@ -55157,7 +55073,8 @@ class McpServer {
55157
55073
  description: tool.description,
55158
55074
  inputSchema: tool.inputSchema ? zodToJsonSchema(tool.inputSchema, {
55159
55075
  strictUnions: true
55160
- }) : EMPTY_OBJECT_JSON_SCHEMA
55076
+ }) : EMPTY_OBJECT_JSON_SCHEMA,
55077
+ annotations: tool.annotations
55161
55078
  };
55162
55079
  })
55163
55080
  }));
@@ -55442,18 +55359,33 @@ class McpServer {
55442
55359
  if (this._registeredTools[name]) {
55443
55360
  throw new Error(`Tool ${name} is already registered`);
55444
55361
  }
55362
+ const isZodRawShape = (obj) => {
55363
+ if (typeof obj !== "object" || obj === null)
55364
+ return false;
55365
+ return Object.values(obj).some((v) => v instanceof ZodType);
55366
+ };
55445
55367
  let description;
55446
55368
  if (typeof rest[0] === "string") {
55447
55369
  description = rest.shift();
55448
55370
  }
55449
55371
  let paramsSchema;
55372
+ let annotations;
55450
55373
  if (rest.length > 1) {
55451
- paramsSchema = rest.shift();
55374
+ const firstArg = rest[0];
55375
+ if (isZodRawShape(firstArg)) {
55376
+ paramsSchema = rest.shift();
55377
+ if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShape(rest[0])) {
55378
+ annotations = rest.shift();
55379
+ }
55380
+ } else if (typeof firstArg === "object" && firstArg !== null) {
55381
+ annotations = rest.shift();
55382
+ }
55452
55383
  }
55453
55384
  const cb = rest[0];
55454
55385
  const registeredTool = {
55455
55386
  description,
55456
55387
  inputSchema: paramsSchema === undefined ? undefined : z.object(paramsSchema),
55388
+ annotations,
55457
55389
  callback: cb,
55458
55390
  enabled: true,
55459
55391
  disable: () => registeredTool.update({ enabled: false }),
@@ -55471,6 +55403,8 @@ class McpServer {
55471
55403
  registeredTool.inputSchema = z.object(updates.paramsSchema);
55472
55404
  if (typeof updates.callback !== "undefined")
55473
55405
  registeredTool.callback = updates.callback;
55406
+ if (typeof updates.annotations !== "undefined")
55407
+ registeredTool.annotations = updates.annotations;
55474
55408
  if (typeof updates.enabled !== "undefined")
55475
55409
  registeredTool.enabled = updates.enabled;
55476
55410
  this.sendToolListChanged();
@@ -61234,7 +61168,7 @@ var {
61234
61168
  var package_default = {
61235
61169
  name: "@settlemint/sdk-mcp",
61236
61170
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
61237
- version: "2.2.2-pr53afc65e",
61171
+ version: "2.2.2-pr5e99366e",
61238
61172
  type: "module",
61239
61173
  private: false,
61240
61174
  license: "FSL-1.1-MIT",
@@ -61275,12 +61209,12 @@ var package_default = {
61275
61209
  dependencies: {
61276
61210
  "@graphql-tools/load": "8.1.0",
61277
61211
  "@graphql-tools/url-loader": "8.0.31",
61278
- "@modelcontextprotocol/sdk": "1.10.2",
61279
- "@settlemint/sdk-js": "2.2.2-pr53afc65e",
61280
- "@settlemint/sdk-utils": "2.2.2-pr53afc65e",
61212
+ "@modelcontextprotocol/sdk": "1.11.0",
61213
+ "@settlemint/sdk-js": "2.2.2-pr5e99366e",
61214
+ "@settlemint/sdk-utils": "2.2.2-pr5e99366e",
61281
61215
  "@commander-js/extra-typings": "11.1.0",
61282
61216
  commander: "11.1.0",
61283
- zod: "3.24.3"
61217
+ zod: "3.24.4"
61284
61218
  },
61285
61219
  devDependencies: {},
61286
61220
  peerDependencies: {},
@@ -67025,4 +66959,4 @@ await main().catch((error2) => {
67025
66959
  process.exit(1);
67026
66960
  });
67027
66961
 
67028
- //# debugId=B00C7991B456DD9064756E2164756E21
66962
+ //# debugId=B6E6C6AE722F96EA64756E2164756E21