@settlemint/sdk-mcp 2.2.2-pr75b59b5f → 2.2.2-pr915f6bfb

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 +483 -583
  2. package/dist/mcp.js.map +23 -21
  3. package/package.json +4 -4
package/dist/mcp.js CHANGED
@@ -25496,7 +25496,7 @@ var require_dist2 = __commonJS((exports) => {
25496
25496
  // ../../node_modules/@dotenvx/dotenvx/package.json
25497
25497
  var require_package = __commonJS((exports, module) => {
25498
25498
  module.exports = {
25499
- version: "1.41.0",
25499
+ version: "1.43.0",
25500
25500
  name: "@dotenvx/dotenvx",
25501
25501
  description: "a better dotenv–from the creator of `dotenv`",
25502
25502
  author: "@motdotla",
@@ -25649,14 +25649,11 @@ var require_logger = __commonJS((exports, module) => {
25649
25649
  var { getColor, bold: bold2 } = require_colors();
25650
25650
  var levels = {
25651
25651
  error: 0,
25652
- errorv: 0,
25653
- errornocolor: 0,
25654
25652
  warn: 1,
25655
25653
  success: 2,
25656
25654
  successv: 2,
25657
25655
  info: 2,
25658
25656
  help: 2,
25659
- blank: 2,
25660
25657
  verbose: 4,
25661
25658
  debug: 5,
25662
25659
  silly: 6
@@ -25669,7 +25666,11 @@ var require_logger = __commonJS((exports, module) => {
25669
25666
  var verbose = getColor("plum");
25670
25667
  var debug = getColor("plum");
25671
25668
  var currentLevel = levels.info;
25672
- 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) {
25673
25674
  if (levels[level] === undefined) {
25674
25675
  throw new Error(`MISSING_LOG_LEVEL: '${level}'. implement in logger.`);
25675
25676
  }
@@ -25683,10 +25684,6 @@ var require_logger = __commonJS((exports, module) => {
25683
25684
  switch (level.toLowerCase()) {
25684
25685
  case "error":
25685
25686
  return error(formattedMessage);
25686
- case "errorv":
25687
- return error(`[dotenvx@${packageJson.version}] ${formattedMessage}`);
25688
- case "errornocolor":
25689
- return formattedMessage;
25690
25687
  case "warn":
25691
25688
  return warn(formattedMessage);
25692
25689
  case "success":
@@ -25701,23 +25698,18 @@ var require_logger = __commonJS((exports, module) => {
25701
25698
  return verbose(formattedMessage);
25702
25699
  case "debug":
25703
25700
  return debug(formattedMessage);
25704
- case "blank":
25705
- return formattedMessage;
25706
25701
  }
25707
25702
  }
25708
25703
  var logger = {
25709
25704
  level: "info",
25710
- error: (msg) => log("error", msg),
25711
- errorv: (msg) => log("errorv", msg),
25712
- errornocolor: (msg) => log("errornocolor", msg),
25713
- warn: (msg) => log("warn", msg),
25714
- success: (msg) => log("success", msg),
25715
- successv: (msg) => log("successv", msg),
25716
- info: (msg) => log("info", msg),
25717
- help: (msg) => log("help", msg),
25718
- verbose: (msg) => log("verbose", msg),
25719
- debug: (msg) => log("debug", msg),
25720
- 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),
25721
25713
  setLevel: (level) => {
25722
25714
  if (levels[level] !== undefined) {
25723
25715
  currentLevel = levels[level];
@@ -28825,54 +28817,21 @@ var require_webcrypto = __commonJS((exports) => {
28825
28817
  exports.gcm = /* @__PURE__ */ (() => generate(mode.GCM))();
28826
28818
  });
28827
28819
 
28828
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/cryptoNode.js
28829
- var require_cryptoNode2 = __commonJS((exports) => {
28830
- Object.defineProperty(exports, "__esModule", { value: true });
28831
- exports.crypto = undefined;
28832
- var nc = __require("node:crypto");
28833
- exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
28834
- });
28835
-
28836
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/utils.js
28837
- var require_utils7 = __commonJS((exports) => {
28838
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
28820
+ // ../../node_modules/@noble/hashes/_assert.js
28821
+ var require__assert = __commonJS((exports) => {
28839
28822
  Object.defineProperty(exports, "__esModule", { value: true });
28840
- exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.Hash = exports.nextTick = exports.swap32IfBE = exports.byteSwapIfBE = exports.swap8IfBE = exports.isLE = undefined;
28841
- exports.isBytes = isBytes;
28842
28823
  exports.anumber = anumber;
28843
28824
  exports.abytes = abytes;
28844
28825
  exports.ahash = ahash;
28845
28826
  exports.aexists = aexists;
28846
28827
  exports.aoutput = aoutput;
28847
- exports.u8 = u8;
28848
- exports.u32 = u32;
28849
- exports.clean = clean;
28850
- exports.createView = createView;
28851
- exports.rotr = rotr;
28852
- exports.rotl = rotl;
28853
- exports.byteSwap = byteSwap;
28854
- exports.byteSwap32 = byteSwap32;
28855
- exports.bytesToHex = bytesToHex;
28856
- exports.hexToBytes = hexToBytes;
28857
- exports.asyncLoop = asyncLoop;
28858
- exports.utf8ToBytes = utf8ToBytes;
28859
- exports.bytesToUtf8 = bytesToUtf8;
28860
- exports.toBytes = toBytes;
28861
- exports.kdfInputToBytes = kdfInputToBytes;
28862
- exports.concatBytes = concatBytes;
28863
- exports.checkOpts = checkOpts;
28864
- exports.createHasher = createHasher;
28865
- exports.createOptHasher = createOptHasher;
28866
- exports.createXOFer = createXOFer;
28867
- exports.randomBytes = randomBytes;
28868
- var crypto_1 = require_cryptoNode2();
28869
- function isBytes(a) {
28870
- return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
28871
- }
28872
28828
  function anumber(n) {
28873
28829
  if (!Number.isSafeInteger(n) || n < 0)
28874
28830
  throw new Error("positive integer expected, got " + n);
28875
28831
  }
28832
+ function isBytes(a) {
28833
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
28834
+ }
28876
28835
  function abytes(b, ...lengths) {
28877
28836
  if (!isBytes(b))
28878
28837
  throw new Error("Uint8Array expected");
@@ -28881,7 +28840,7 @@ var require_utils7 = __commonJS((exports) => {
28881
28840
  }
28882
28841
  function ahash(h) {
28883
28842
  if (typeof h !== "function" || typeof h.create !== "function")
28884
- throw new Error("Hash should be wrapped by utils.createHasher");
28843
+ throw new Error("Hash should be wrapped by utils.wrapConstructor");
28885
28844
  anumber(h.outputLen);
28886
28845
  anumber(h.blockLen);
28887
28846
  }
@@ -28898,17 +28857,51 @@ var require_utils7 = __commonJS((exports) => {
28898
28857
  throw new Error("digestInto() expects output buffer of length at least " + min);
28899
28858
  }
28900
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
+ }
28901
28899
  function u8(arr) {
28902
28900
  return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
28903
28901
  }
28904
28902
  function u32(arr) {
28905
28903
  return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
28906
28904
  }
28907
- function clean(...arrays) {
28908
- for (let i = 0;i < arrays.length; i++) {
28909
- arrays[i].fill(0);
28910
- }
28911
- }
28912
28905
  function createView(arr) {
28913
28906
  return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
28914
28907
  }
@@ -28922,19 +28915,16 @@ var require_utils7 = __commonJS((exports) => {
28922
28915
  function byteSwap(word) {
28923
28916
  return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
28924
28917
  }
28925
- exports.swap8IfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
28926
- exports.byteSwapIfBE = exports.swap8IfBE;
28918
+ exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
28927
28919
  function byteSwap32(arr) {
28928
28920
  for (let i = 0;i < arr.length; i++) {
28929
28921
  arr[i] = byteSwap(arr[i]);
28930
28922
  }
28931
- return arr;
28932
28923
  }
28933
- exports.swap32IfBE = exports.isLE ? (u) => u : byteSwap32;
28934
- var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
28924
+ var hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
28935
28925
  var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
28936
28926
  function bytesToHex(bytes) {
28937
- abytes(bytes);
28927
+ (0, _assert_ts_1.abytes)(bytes);
28938
28928
  if (hasHexBuiltin)
28939
28929
  return bytes.toHex();
28940
28930
  let hex = "";
@@ -28989,29 +28979,20 @@ var require_utils7 = __commonJS((exports) => {
28989
28979
  }
28990
28980
  function utf8ToBytes(str) {
28991
28981
  if (typeof str !== "string")
28992
- throw new Error("string expected");
28982
+ throw new Error("utf8ToBytes expected string, got " + typeof str);
28993
28983
  return new Uint8Array(new TextEncoder().encode(str));
28994
28984
  }
28995
- function bytesToUtf8(bytes) {
28996
- return new TextDecoder().decode(bytes);
28997
- }
28998
28985
  function toBytes(data) {
28999
28986
  if (typeof data === "string")
29000
28987
  data = utf8ToBytes(data);
29001
- abytes(data);
29002
- return data;
29003
- }
29004
- function kdfInputToBytes(data) {
29005
- if (typeof data === "string")
29006
- data = utf8ToBytes(data);
29007
- abytes(data);
28988
+ (0, _assert_ts_1.abytes)(data);
29008
28989
  return data;
29009
28990
  }
29010
28991
  function concatBytes(...arrays) {
29011
28992
  let sum = 0;
29012
28993
  for (let i = 0;i < arrays.length; i++) {
29013
28994
  const a = arrays[i];
29014
- abytes(a);
28995
+ (0, _assert_ts_1.abytes)(a);
29015
28996
  sum += a.length;
29016
28997
  }
29017
28998
  const res = new Uint8Array(sum);
@@ -29022,17 +29003,20 @@ var require_utils7 = __commonJS((exports) => {
29022
29003
  }
29023
29004
  return res;
29024
29005
  }
29006
+
29007
+ class Hash {
29008
+ clone() {
29009
+ return this._cloneInto();
29010
+ }
29011
+ }
29012
+ exports.Hash = Hash;
29025
29013
  function checkOpts(defaults, opts) {
29026
29014
  if (opts !== undefined && {}.toString.call(opts) !== "[object Object]")
29027
- throw new Error("options should be object or undefined");
29015
+ throw new Error("Options should be object or undefined");
29028
29016
  const merged = Object.assign(defaults, opts);
29029
29017
  return merged;
29030
29018
  }
29031
-
29032
- class Hash {
29033
- }
29034
- exports.Hash = Hash;
29035
- function createHasher(hashCons) {
29019
+ function wrapConstructor(hashCons) {
29036
29020
  const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
29037
29021
  const tmp = hashCons();
29038
29022
  hashC.outputLen = tmp.outputLen;
@@ -29040,7 +29024,7 @@ var require_utils7 = __commonJS((exports) => {
29040
29024
  hashC.create = () => hashCons();
29041
29025
  return hashC;
29042
29026
  }
29043
- function createOptHasher(hashCons) {
29027
+ function wrapConstructorWithOpts(hashCons) {
29044
29028
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
29045
29029
  const tmp = hashCons({});
29046
29030
  hashC.outputLen = tmp.outputLen;
@@ -29048,7 +29032,7 @@ var require_utils7 = __commonJS((exports) => {
29048
29032
  hashC.create = (opts) => hashCons(opts);
29049
29033
  return hashC;
29050
29034
  }
29051
- function createXOFer(hashCons) {
29035
+ function wrapXOFConstructorWithOpts(hashCons) {
29052
29036
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
29053
29037
  const tmp = hashCons({});
29054
29038
  hashC.outputLen = tmp.outputLen;
@@ -29056,9 +29040,6 @@ var require_utils7 = __commonJS((exports) => {
29056
29040
  hashC.create = (opts) => hashCons(opts);
29057
29041
  return hashC;
29058
29042
  }
29059
- exports.wrapConstructor = createHasher;
29060
- exports.wrapConstructorWithOpts = createOptHasher;
29061
- exports.wrapXOFConstructorWithOpts = createXOFer;
29062
29043
  function randomBytes(bytesLength = 32) {
29063
29044
  if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
29064
29045
  return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
@@ -29070,13 +29051,14 @@ var require_utils7 = __commonJS((exports) => {
29070
29051
  }
29071
29052
  });
29072
29053
 
29073
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/_md.js
29054
+ // ../../node_modules/@noble/hashes/_md.js
29074
29055
  var require__md = __commonJS((exports) => {
29075
29056
  Object.defineProperty(exports, "__esModule", { value: true });
29076
- exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = undefined;
29057
+ exports.HashMD = undefined;
29077
29058
  exports.setBigUint64 = setBigUint64;
29078
29059
  exports.Chi = Chi;
29079
29060
  exports.Maj = Maj;
29061
+ var _assert_ts_1 = require__assert();
29080
29062
  var utils_ts_1 = require_utils7();
29081
29063
  function setBigUint64(view, byteOffset, value, isLE) {
29082
29064
  if (typeof view.setBigUint64 === "function")
@@ -29112,10 +29094,9 @@ var require__md = __commonJS((exports) => {
29112
29094
  this.view = (0, utils_ts_1.createView)(this.buffer);
29113
29095
  }
29114
29096
  update(data) {
29115
- (0, utils_ts_1.aexists)(this);
29116
- data = (0, utils_ts_1.toBytes)(data);
29117
- (0, utils_ts_1.abytes)(data);
29097
+ (0, _assert_ts_1.aexists)(this);
29118
29098
  const { view, buffer, blockLen } = this;
29099
+ data = (0, utils_ts_1.toBytes)(data);
29119
29100
  const len = data.length;
29120
29101
  for (let pos = 0;pos < len; ) {
29121
29102
  const take = Math.min(blockLen - this.pos, len - pos);
@@ -29138,13 +29119,13 @@ var require__md = __commonJS((exports) => {
29138
29119
  return this;
29139
29120
  }
29140
29121
  digestInto(out) {
29141
- (0, utils_ts_1.aexists)(this);
29142
- (0, utils_ts_1.aoutput)(out, this);
29122
+ (0, _assert_ts_1.aexists)(this);
29123
+ (0, _assert_ts_1.aoutput)(out, this);
29143
29124
  this.finished = true;
29144
29125
  const { buffer, view, blockLen, isLE } = this;
29145
29126
  let { pos } = this;
29146
29127
  buffer[pos++] = 128;
29147
- (0, utils_ts_1.clean)(this.buffer.subarray(pos));
29128
+ this.buffer.subarray(pos).fill(0);
29148
29129
  if (this.padOffset > blockLen - pos) {
29149
29130
  this.process(view, 0);
29150
29131
  pos = 0;
@@ -29175,178 +29156,25 @@ var require__md = __commonJS((exports) => {
29175
29156
  to || (to = new this.constructor);
29176
29157
  to.set(...this.get());
29177
29158
  const { blockLen, buffer, length, finished, destroyed, pos } = this;
29178
- to.destroyed = destroyed;
29179
- to.finished = finished;
29180
29159
  to.length = length;
29181
29160
  to.pos = pos;
29161
+ to.finished = finished;
29162
+ to.destroyed = destroyed;
29182
29163
  if (length % blockLen)
29183
29164
  to.buffer.set(buffer);
29184
29165
  return to;
29185
29166
  }
29186
- clone() {
29187
- return this._cloneInto();
29188
- }
29189
29167
  }
29190
29168
  exports.HashMD = HashMD;
29191
- exports.SHA256_IV = Uint32Array.from([
29192
- 1779033703,
29193
- 3144134277,
29194
- 1013904242,
29195
- 2773480762,
29196
- 1359893119,
29197
- 2600822924,
29198
- 528734635,
29199
- 1541459225
29200
- ]);
29201
- exports.SHA224_IV = Uint32Array.from([
29202
- 3238371032,
29203
- 914150663,
29204
- 812702999,
29205
- 4144912697,
29206
- 4290775857,
29207
- 1750603025,
29208
- 1694076839,
29209
- 3204075428
29210
- ]);
29211
- exports.SHA384_IV = Uint32Array.from([
29212
- 3418070365,
29213
- 3238371032,
29214
- 1654270250,
29215
- 914150663,
29216
- 2438529370,
29217
- 812702999,
29218
- 355462360,
29219
- 4144912697,
29220
- 1731405415,
29221
- 4290775857,
29222
- 2394180231,
29223
- 1750603025,
29224
- 3675008525,
29225
- 1694076839,
29226
- 1203062813,
29227
- 3204075428
29228
- ]);
29229
- exports.SHA512_IV = Uint32Array.from([
29230
- 1779033703,
29231
- 4089235720,
29232
- 3144134277,
29233
- 2227873595,
29234
- 1013904242,
29235
- 4271175723,
29236
- 2773480762,
29237
- 1595750129,
29238
- 1359893119,
29239
- 2917565137,
29240
- 2600822924,
29241
- 725511199,
29242
- 528734635,
29243
- 4215389547,
29244
- 1541459225,
29245
- 327033209
29246
- ]);
29247
- });
29248
-
29249
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/_u64.js
29250
- var require__u64 = __commonJS((exports) => {
29251
- Object.defineProperty(exports, "__esModule", { value: true });
29252
- 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;
29253
- exports.add = add;
29254
- exports.fromBig = fromBig;
29255
- exports.split = split;
29256
- var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
29257
- var _32n = /* @__PURE__ */ BigInt(32);
29258
- function fromBig(n, le = false) {
29259
- if (le)
29260
- return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
29261
- return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
29262
- }
29263
- function split(lst, le = false) {
29264
- const len = lst.length;
29265
- let Ah = new Uint32Array(len);
29266
- let Al = new Uint32Array(len);
29267
- for (let i = 0;i < len; i++) {
29268
- const { h, l } = fromBig(lst[i], le);
29269
- [Ah[i], Al[i]] = [h, l];
29270
- }
29271
- return [Ah, Al];
29272
- }
29273
- var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
29274
- exports.toBig = toBig;
29275
- var shrSH = (h, _l, s) => h >>> s;
29276
- exports.shrSH = shrSH;
29277
- var shrSL = (h, l, s) => h << 32 - s | l >>> s;
29278
- exports.shrSL = shrSL;
29279
- var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
29280
- exports.rotrSH = rotrSH;
29281
- var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
29282
- exports.rotrSL = rotrSL;
29283
- var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
29284
- exports.rotrBH = rotrBH;
29285
- var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
29286
- exports.rotrBL = rotrBL;
29287
- var rotr32H = (_h, l) => l;
29288
- exports.rotr32H = rotr32H;
29289
- var rotr32L = (h, _l) => h;
29290
- exports.rotr32L = rotr32L;
29291
- var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
29292
- exports.rotlSH = rotlSH;
29293
- var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
29294
- exports.rotlSL = rotlSL;
29295
- var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
29296
- exports.rotlBH = rotlBH;
29297
- var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
29298
- exports.rotlBL = rotlBL;
29299
- function add(Ah, Al, Bh, Bl) {
29300
- const l = (Al >>> 0) + (Bl >>> 0);
29301
- return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
29302
- }
29303
- var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
29304
- exports.add3L = add3L;
29305
- var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
29306
- exports.add3H = add3H;
29307
- var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
29308
- exports.add4L = add4L;
29309
- var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
29310
- exports.add4H = add4H;
29311
- var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
29312
- exports.add5L = add5L;
29313
- var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
29314
- exports.add5H = add5H;
29315
- var u64 = {
29316
- fromBig,
29317
- split,
29318
- toBig,
29319
- shrSH,
29320
- shrSL,
29321
- rotrSH,
29322
- rotrSL,
29323
- rotrBH,
29324
- rotrBL,
29325
- rotr32H,
29326
- rotr32L,
29327
- rotlSH,
29328
- rotlSL,
29329
- rotlBH,
29330
- rotlBL,
29331
- add,
29332
- add3L,
29333
- add3H,
29334
- add4L,
29335
- add4H,
29336
- add5H,
29337
- add5L
29338
- };
29339
- exports.default = u64;
29340
29169
  });
29341
29170
 
29342
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha2.js
29343
- var require_sha2 = __commonJS((exports) => {
29171
+ // ../../node_modules/@noble/hashes/sha256.js
29172
+ var require_sha256 = __commonJS((exports) => {
29344
29173
  Object.defineProperty(exports, "__esModule", { value: true });
29345
- 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;
29346
29175
  var _md_ts_1 = require__md();
29347
- var u64 = require__u64();
29348
29176
  var utils_ts_1 = require_utils7();
29349
- var SHA256_K = /* @__PURE__ */ Uint32Array.from([
29177
+ var SHA256_K = /* @__PURE__ */ new Uint32Array([
29350
29178
  1116352408,
29351
29179
  1899447441,
29352
29180
  3049323471,
@@ -29412,19 +29240,29 @@ var require_sha2 = __commonJS((exports) => {
29412
29240
  3204031479,
29413
29241
  3329325298
29414
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
+ ]);
29415
29253
  var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
29416
29254
 
29417
29255
  class SHA256 extends _md_ts_1.HashMD {
29418
29256
  constructor(outputLen = 32) {
29419
29257
  super(64, outputLen, 8, false);
29420
- this.A = _md_ts_1.SHA256_IV[0] | 0;
29421
- this.B = _md_ts_1.SHA256_IV[1] | 0;
29422
- this.C = _md_ts_1.SHA256_IV[2] | 0;
29423
- this.D = _md_ts_1.SHA256_IV[3] | 0;
29424
- this.E = _md_ts_1.SHA256_IV[4] | 0;
29425
- this.F = _md_ts_1.SHA256_IV[5] | 0;
29426
- this.G = _md_ts_1.SHA256_IV[6] | 0;
29427
- 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;
29428
29266
  }
29429
29267
  get() {
29430
29268
  const { A, B, C, D, E, F, G, H } = this;
@@ -29476,11 +29314,11 @@ var require_sha2 = __commonJS((exports) => {
29476
29314
  this.set(A, B, C, D, E, F, G, H);
29477
29315
  }
29478
29316
  roundClean() {
29479
- (0, utils_ts_1.clean)(SHA256_W);
29317
+ SHA256_W.fill(0);
29480
29318
  }
29481
29319
  destroy() {
29482
29320
  this.set(0, 0, 0, 0, 0, 0, 0, 0);
29483
- (0, utils_ts_1.clean)(this.buffer);
29321
+ this.buffer.fill(0);
29484
29322
  }
29485
29323
  }
29486
29324
  exports.SHA256 = SHA256;
@@ -29488,18 +29326,120 @@ var require_sha2 = __commonJS((exports) => {
29488
29326
  class SHA224 extends SHA256 {
29489
29327
  constructor() {
29490
29328
  super(28);
29491
- this.A = _md_ts_1.SHA224_IV[0] | 0;
29492
- this.B = _md_ts_1.SHA224_IV[1] | 0;
29493
- this.C = _md_ts_1.SHA224_IV[2] | 0;
29494
- this.D = _md_ts_1.SHA224_IV[3] | 0;
29495
- this.E = _md_ts_1.SHA224_IV[4] | 0;
29496
- this.F = _md_ts_1.SHA224_IV[5] | 0;
29497
- this.G = _md_ts_1.SHA224_IV[6] | 0;
29498
- this.H = _md_ts_1.SHA224_IV[7] | 0;
29499
- }
29500
- }
29501
- exports.SHA224 = SHA224;
29502
- 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([
29503
29443
  "0x428a2f98d728ae22",
29504
29444
  "0x7137449123ef65cd",
29505
29445
  "0xb5c0fbcfec4d3b2f",
@@ -29581,30 +29521,28 @@ var require_sha2 = __commonJS((exports) => {
29581
29521
  "0x5fcb6fab3ad6faec",
29582
29522
  "0x6c44198c4a475817"
29583
29523
  ].map((n) => BigInt(n))))();
29584
- var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
29585
- var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
29586
29524
  var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
29587
29525
  var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
29588
29526
 
29589
29527
  class SHA512 extends _md_ts_1.HashMD {
29590
29528
  constructor(outputLen = 64) {
29591
29529
  super(128, outputLen, 16, false);
29592
- this.Ah = _md_ts_1.SHA512_IV[0] | 0;
29593
- this.Al = _md_ts_1.SHA512_IV[1] | 0;
29594
- this.Bh = _md_ts_1.SHA512_IV[2] | 0;
29595
- this.Bl = _md_ts_1.SHA512_IV[3] | 0;
29596
- this.Ch = _md_ts_1.SHA512_IV[4] | 0;
29597
- this.Cl = _md_ts_1.SHA512_IV[5] | 0;
29598
- this.Dh = _md_ts_1.SHA512_IV[6] | 0;
29599
- this.Dl = _md_ts_1.SHA512_IV[7] | 0;
29600
- this.Eh = _md_ts_1.SHA512_IV[8] | 0;
29601
- this.El = _md_ts_1.SHA512_IV[9] | 0;
29602
- this.Fh = _md_ts_1.SHA512_IV[10] | 0;
29603
- this.Fl = _md_ts_1.SHA512_IV[11] | 0;
29604
- this.Gh = _md_ts_1.SHA512_IV[12] | 0;
29605
- this.Gl = _md_ts_1.SHA512_IV[13] | 0;
29606
- this.Hh = _md_ts_1.SHA512_IV[14] | 0;
29607
- 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;
29608
29546
  }
29609
29547
  get() {
29610
29548
  const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
@@ -29636,28 +29574,28 @@ var require_sha2 = __commonJS((exports) => {
29636
29574
  for (let i = 16;i < 80; i++) {
29637
29575
  const W15h = SHA512_W_H[i - 15] | 0;
29638
29576
  const W15l = SHA512_W_L[i - 15] | 0;
29639
- const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
29640
- 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);
29641
29579
  const W2h = SHA512_W_H[i - 2] | 0;
29642
29580
  const W2l = SHA512_W_L[i - 2] | 0;
29643
- const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
29644
- const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
29645
- const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
29646
- 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]);
29647
29585
  SHA512_W_H[i] = SUMh | 0;
29648
29586
  SHA512_W_L[i] = SUMl | 0;
29649
29587
  }
29650
29588
  let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
29651
29589
  for (let i = 0;i < 80; i++) {
29652
- const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
29653
- 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);
29654
29592
  const CHIh = Eh & Fh ^ ~Eh & Gh;
29655
29593
  const CHIl = El & Fl ^ ~El & Gl;
29656
- const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
29657
- 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]);
29658
29596
  const T1l = T1ll | 0;
29659
- const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
29660
- 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);
29661
29599
  const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
29662
29600
  const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
29663
29601
  Hh = Gh | 0;
@@ -29666,115 +29604,57 @@ var require_sha2 = __commonJS((exports) => {
29666
29604
  Gl = Fl | 0;
29667
29605
  Fh = Eh | 0;
29668
29606
  Fl = El | 0;
29669
- ({ 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));
29670
29608
  Dh = Ch | 0;
29671
29609
  Dl = Cl | 0;
29672
29610
  Ch = Bh | 0;
29673
29611
  Cl = Bl | 0;
29674
29612
  Bh = Ah | 0;
29675
29613
  Bl = Al | 0;
29676
- const All = u64.add3L(T1l, sigma0l, MAJl);
29677
- 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);
29678
29616
  Al = All | 0;
29679
29617
  }
29680
- ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
29681
- ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
29682
- ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
29683
- ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
29684
- ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
29685
- ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
29686
- ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
29687
- ({ 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));
29688
29626
  this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
29689
29627
  }
29690
29628
  roundClean() {
29691
- (0, utils_ts_1.clean)(SHA512_W_H, SHA512_W_L);
29629
+ SHA512_W_H.fill(0);
29630
+ SHA512_W_L.fill(0);
29692
29631
  }
29693
29632
  destroy() {
29694
- (0, utils_ts_1.clean)(this.buffer);
29633
+ this.buffer.fill(0);
29695
29634
  this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
29696
29635
  }
29697
29636
  }
29698
29637
  exports.SHA512 = SHA512;
29699
29638
 
29700
- class SHA384 extends SHA512 {
29701
- constructor() {
29702
- super(48);
29703
- this.Ah = _md_ts_1.SHA384_IV[0] | 0;
29704
- this.Al = _md_ts_1.SHA384_IV[1] | 0;
29705
- this.Bh = _md_ts_1.SHA384_IV[2] | 0;
29706
- this.Bl = _md_ts_1.SHA384_IV[3] | 0;
29707
- this.Ch = _md_ts_1.SHA384_IV[4] | 0;
29708
- this.Cl = _md_ts_1.SHA384_IV[5] | 0;
29709
- this.Dh = _md_ts_1.SHA384_IV[6] | 0;
29710
- this.Dl = _md_ts_1.SHA384_IV[7] | 0;
29711
- this.Eh = _md_ts_1.SHA384_IV[8] | 0;
29712
- this.El = _md_ts_1.SHA384_IV[9] | 0;
29713
- this.Fh = _md_ts_1.SHA384_IV[10] | 0;
29714
- this.Fl = _md_ts_1.SHA384_IV[11] | 0;
29715
- this.Gh = _md_ts_1.SHA384_IV[12] | 0;
29716
- this.Gl = _md_ts_1.SHA384_IV[13] | 0;
29717
- this.Hh = _md_ts_1.SHA384_IV[14] | 0;
29718
- this.Hl = _md_ts_1.SHA384_IV[15] | 0;
29719
- }
29720
- }
29721
- exports.SHA384 = SHA384;
29722
- var T224_IV = /* @__PURE__ */ Uint32Array.from([
29723
- 2352822216,
29724
- 424955298,
29725
- 1944164710,
29726
- 2312950998,
29727
- 502970286,
29728
- 855612546,
29729
- 1738396948,
29730
- 1479516111,
29731
- 258812777,
29732
- 2077511080,
29733
- 2011393907,
29734
- 79989058,
29735
- 1067287976,
29736
- 1780299464,
29737
- 286451373,
29738
- 2446758561
29739
- ]);
29740
- var T256_IV = /* @__PURE__ */ Uint32Array.from([
29741
- 573645204,
29742
- 4230739756,
29743
- 2673172387,
29744
- 3360449730,
29745
- 596883563,
29746
- 1867755857,
29747
- 2520282905,
29748
- 1497426621,
29749
- 2519219938,
29750
- 2827943907,
29751
- 3193839141,
29752
- 1401305490,
29753
- 721525244,
29754
- 746961066,
29755
- 246885852,
29756
- 2177182882
29757
- ]);
29758
-
29759
29639
  class SHA512_224 extends SHA512 {
29760
29640
  constructor() {
29761
29641
  super(28);
29762
- this.Ah = T224_IV[0] | 0;
29763
- this.Al = T224_IV[1] | 0;
29764
- this.Bh = T224_IV[2] | 0;
29765
- this.Bl = T224_IV[3] | 0;
29766
- this.Ch = T224_IV[4] | 0;
29767
- this.Cl = T224_IV[5] | 0;
29768
- this.Dh = T224_IV[6] | 0;
29769
- this.Dl = T224_IV[7] | 0;
29770
- this.Eh = T224_IV[8] | 0;
29771
- this.El = T224_IV[9] | 0;
29772
- this.Fh = T224_IV[10] | 0;
29773
- this.Fl = T224_IV[11] | 0;
29774
- this.Gh = T224_IV[12] | 0;
29775
- this.Gl = T224_IV[13] | 0;
29776
- this.Hh = T224_IV[14] | 0;
29777
- 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;
29778
29658
  }
29779
29659
  }
29780
29660
  exports.SHA512_224 = SHA512_224;
@@ -29782,34 +29662,81 @@ var require_sha2 = __commonJS((exports) => {
29782
29662
  class SHA512_256 extends SHA512 {
29783
29663
  constructor() {
29784
29664
  super(32);
29785
- this.Ah = T256_IV[0] | 0;
29786
- this.Al = T256_IV[1] | 0;
29787
- this.Bh = T256_IV[2] | 0;
29788
- this.Bl = T256_IV[3] | 0;
29789
- this.Ch = T256_IV[4] | 0;
29790
- this.Cl = T256_IV[5] | 0;
29791
- this.Dh = T256_IV[6] | 0;
29792
- this.Dl = T256_IV[7] | 0;
29793
- this.Eh = T256_IV[8] | 0;
29794
- this.El = T256_IV[9] | 0;
29795
- this.Fh = T256_IV[10] | 0;
29796
- this.Fl = T256_IV[11] | 0;
29797
- this.Gh = T256_IV[12] | 0;
29798
- this.Gl = T256_IV[13] | 0;
29799
- this.Hh = T256_IV[14] | 0;
29800
- 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;
29801
29681
  }
29802
29682
  }
29803
29683
  exports.SHA512_256 = SHA512_256;
29804
- exports.sha256 = (0, utils_ts_1.createHasher)(() => new SHA256);
29805
- exports.sha224 = (0, utils_ts_1.createHasher)(() => new SHA224);
29806
- exports.sha512 = (0, utils_ts_1.createHasher)(() => new SHA512);
29807
- exports.sha384 = (0, utils_ts_1.createHasher)(() => new SHA384);
29808
- exports.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256);
29809
- 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);
29810
29711
  });
29811
29712
 
29812
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/utils.js
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
+ } });
29737
+ });
29738
+
29739
+ // ../../node_modules/@noble/curves/abstract/utils.js
29813
29740
  var require_utils8 = __commonJS((exports) => {
29814
29741
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
29815
29742
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -30083,7 +30010,7 @@ var require_utils8 = __commonJS((exports) => {
30083
30010
  }
30084
30011
  });
30085
30012
 
30086
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/modular.js
30013
+ // ../../node_modules/@noble/curves/abstract/modular.js
30087
30014
  var require_modular = __commonJS((exports) => {
30088
30015
  Object.defineProperty(exports, "__esModule", { value: true });
30089
30016
  exports.isNegativeLE = undefined;
@@ -30108,7 +30035,6 @@ var require_modular = __commonJS((exports) => {
30108
30035
  exports.getMinHashLength = getMinHashLength;
30109
30036
  exports.mapHashToField = mapHashToField;
30110
30037
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
30111
- var utils_1 = require_utils7();
30112
30038
  var utils_ts_1 = require_utils8();
30113
30039
  var _0n = BigInt(0);
30114
30040
  var _1n = BigInt(1);
@@ -30168,17 +30094,13 @@ var require_modular = __commonJS((exports) => {
30168
30094
  return mod(x, modulo);
30169
30095
  }
30170
30096
  function tonelliShanks(P) {
30171
- let Q = P - _1n;
30172
- let S = 0;
30173
- while (Q % _2n === _0n) {
30174
- Q /= _2n;
30175
- S++;
30176
- }
30177
- let Z = _2n;
30178
- const _Fp = Field(P);
30179
- while (Z < P && FpIsSquare(_Fp, Z)) {
30180
- if (Z++ > 1000)
30181
- 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");
30182
30104
  }
30183
30105
  if (S === 1) {
30184
30106
  const p1div4 = (P + _1n) / _4n;
@@ -30191,7 +30113,7 @@ var require_modular = __commonJS((exports) => {
30191
30113
  }
30192
30114
  const Q1div2 = (Q + _1n) / _2n;
30193
30115
  return function tonelliSlow(Fp, n) {
30194
- if (!FpIsSquare(Fp, n))
30116
+ if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))
30195
30117
  throw new Error("Cannot find square root");
30196
30118
  let r = S;
30197
30119
  let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q);
@@ -30217,8 +30139,8 @@ var require_modular = __commonJS((exports) => {
30217
30139
  }
30218
30140
  function FpSqrt(P) {
30219
30141
  if (P % _4n === _3n) {
30142
+ const p1div4 = (P + _1n) / _4n;
30220
30143
  return function sqrt3mod4(Fp, n) {
30221
- const p1div4 = (P + _1n) / _4n;
30222
30144
  const root = Fp.pow(n, p1div4);
30223
30145
  if (!Fp.eql(Fp.sqr(root), n))
30224
30146
  throw new Error("Cannot find square root");
@@ -30226,9 +30148,9 @@ var require_modular = __commonJS((exports) => {
30226
30148
  };
30227
30149
  }
30228
30150
  if (P % _8n === _5n) {
30151
+ const c1 = (P - _5n) / _8n;
30229
30152
  return function sqrt5mod8(Fp, n) {
30230
30153
  const n2 = Fp.mul(n, _2n);
30231
- const c1 = (P - _5n) / _8n;
30232
30154
  const v = Fp.pow(n2, c1);
30233
30155
  const nv = Fp.mul(n, v);
30234
30156
  const i = Fp.mul(Fp.mul(nv, _2n), v);
@@ -30275,60 +30197,55 @@ var require_modular = __commonJS((exports) => {
30275
30197
  }, initial);
30276
30198
  return (0, utils_ts_1.validateObject)(field, opts);
30277
30199
  }
30278
- function FpPow(Fp, num, power) {
30200
+ function FpPow(f, num, power) {
30279
30201
  if (power < _0n)
30280
30202
  throw new Error("invalid exponent, negatives unsupported");
30281
30203
  if (power === _0n)
30282
- return Fp.ONE;
30204
+ return f.ONE;
30283
30205
  if (power === _1n)
30284
30206
  return num;
30285
- let p = Fp.ONE;
30207
+ let p = f.ONE;
30286
30208
  let d = num;
30287
30209
  while (power > _0n) {
30288
30210
  if (power & _1n)
30289
- p = Fp.mul(p, d);
30290
- d = Fp.sqr(d);
30211
+ p = f.mul(p, d);
30212
+ d = f.sqr(d);
30291
30213
  power >>= _1n;
30292
30214
  }
30293
30215
  return p;
30294
30216
  }
30295
- function FpInvertBatch(Fp, nums, passZero = false) {
30296
- const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : undefined);
30297
- const multipliedAcc = nums.reduce((acc, num, i) => {
30298
- 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))
30299
30221
  return acc;
30300
- inverted[i] = acc;
30301
- return Fp.mul(acc, num);
30302
- }, Fp.ONE);
30303
- const invertedAcc = Fp.inv(multipliedAcc);
30222
+ tmp[i] = acc;
30223
+ return f.mul(acc, num);
30224
+ }, f.ONE);
30225
+ const inverted = f.inv(lastMultiplied);
30304
30226
  nums.reduceRight((acc, num, i) => {
30305
- if (Fp.is0(num))
30227
+ if (f.is0(num))
30306
30228
  return acc;
30307
- inverted[i] = Fp.mul(acc, inverted[i]);
30308
- return Fp.mul(acc, num);
30309
- }, invertedAcc);
30310
- return inverted;
30311
- }
30312
- function FpDiv(Fp, lhs, rhs) {
30313
- return Fp.mul(lhs, typeof rhs === "bigint" ? invert(rhs, Fp.ORDER) : Fp.inv(rhs));
30314
- }
30315
- function FpLegendre(Fp, n) {
30316
- const legc = (Fp.ORDER - _1n) / _2n;
30317
- const powered = Fp.pow(n, legc);
30318
- const yes = Fp.eql(powered, Fp.ONE);
30319
- const zero = Fp.eql(powered, Fp.ZERO);
30320
- const no = Fp.eql(powered, Fp.neg(Fp.ONE));
30321
- if (!yes && !zero && !no)
30322
- throw new Error("Cannot find square root: probably non-prime P");
30323
- return yes ? 1 : zero ? 0 : -1;
30324
- }
30325
- function FpIsSquare(Fp, n) {
30326
- const l = FpLegendre(Fp, n);
30327
- 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
+ };
30328
30247
  }
30329
30248
  function nLength(n, nBitLength) {
30330
- if (nBitLength !== undefined)
30331
- (0, utils_1.anumber)(nBitLength);
30332
30249
  const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
30333
30250
  const nByteLength = Math.ceil(_nBitLength / 8);
30334
30251
  return { nBitLength: _nBitLength, nByteLength };
@@ -30374,14 +30291,14 @@ var require_modular = __commonJS((exports) => {
30374
30291
  sqrtP = FpSqrt(ORDER);
30375
30292
  return sqrtP(f, n);
30376
30293
  }),
30294
+ invertBatch: (lst) => FpInvertBatch(f, lst),
30295
+ cmov: (a, b, c) => c ? b : a,
30377
30296
  toBytes: (num) => isLE ? (0, utils_ts_1.numberToBytesLE)(num, BYTES) : (0, utils_ts_1.numberToBytesBE)(num, BYTES),
30378
30297
  fromBytes: (bytes) => {
30379
30298
  if (bytes.length !== BYTES)
30380
30299
  throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
30381
30300
  return isLE ? (0, utils_ts_1.bytesToNumberLE)(bytes) : (0, utils_ts_1.bytesToNumberBE)(bytes);
30382
- },
30383
- invertBatch: (lst) => FpInvertBatch(f, lst),
30384
- cmov: (a, b, c) => c ? b : a
30301
+ }
30385
30302
  });
30386
30303
  return Object.freeze(f);
30387
30304
  }
@@ -30428,7 +30345,7 @@ var require_modular = __commonJS((exports) => {
30428
30345
  }
30429
30346
  });
30430
30347
 
30431
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/curve.js
30348
+ // ../../node_modules/@noble/curves/abstract/curve.js
30432
30349
  var require_curve = __commonJS((exports) => {
30433
30350
  Object.defineProperty(exports, "__esModule", { value: true });
30434
30351
  exports.wNAF = wNAF;
@@ -30669,7 +30586,7 @@ var require_curve = __commonJS((exports) => {
30669
30586
  }
30670
30587
  });
30671
30588
 
30672
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/edwards.js
30589
+ // ../../node_modules/@noble/curves/abstract/edwards.js
30673
30590
  var require_edwards = __commonJS((exports) => {
30674
30591
  Object.defineProperty(exports, "__esModule", { value: true });
30675
30592
  exports.twistedEdwards = twistedEdwards;
@@ -30787,7 +30704,7 @@ var require_edwards = __commonJS((exports) => {
30787
30704
  return new Point(x, y, _1n, modP(x * y));
30788
30705
  }
30789
30706
  static normalizeZ(points) {
30790
- const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.ez));
30707
+ const toInv = Fp.invertBatch(points.map((p) => p.ez));
30791
30708
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
30792
30709
  }
30793
30710
  static msm(points, scalars) {
@@ -30955,7 +30872,7 @@ var require_edwards = __commonJS((exports) => {
30955
30872
  function getPublicKey(privKey) {
30956
30873
  return getExtendedPublicKey(privKey).pointBytes;
30957
30874
  }
30958
- function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
30875
+ function hashDomainToScalar(context = new Uint8Array, ...msgs) {
30959
30876
  const msg = (0, utils_ts_1.concatBytes)(...msgs);
30960
30877
  return modN_LE(cHash(domain(msg, (0, utils_ts_1.ensureBytes)("context", context), !!prehash)));
30961
30878
  }
@@ -31019,7 +30936,7 @@ var require_edwards = __commonJS((exports) => {
31019
30936
  }
31020
30937
  });
31021
30938
 
31022
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/hash-to-curve.js
30939
+ // ../../node_modules/@noble/curves/abstract/hash-to-curve.js
31023
30940
  var require_hash_to_curve = __commonJS((exports) => {
31024
30941
  Object.defineProperty(exports, "__esModule", { value: true });
31025
30942
  exports.expand_message_xmd = expand_message_xmd;
@@ -31126,53 +31043,49 @@ var require_hash_to_curve = __commonJS((exports) => {
31126
31043
  return u;
31127
31044
  }
31128
31045
  function isogenyMap(field, map2) {
31129
- const coeff = map2.map((i) => Array.from(i).reverse());
31046
+ const COEFF = map2.map((i) => Array.from(i).reverse());
31130
31047
  return (x, y) => {
31131
- const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
31132
- const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(field, [xd, yd], true);
31133
- x = field.mul(xn, xd_inv);
31134
- 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));
31135
31053
  return { x, y };
31136
31054
  };
31137
31055
  }
31138
- function createHasher(Point, mapToCurve, defaults) {
31056
+ function createHasher(Point, mapToCurve, def) {
31139
31057
  if (typeof mapToCurve !== "function")
31140
31058
  throw new Error("mapToCurve() must be defined");
31141
- function map2(num) {
31142
- return Point.fromAffine(mapToCurve(num));
31143
- }
31144
- function clear(initial) {
31145
- const P = initial.clearCofactor();
31146
- if (P.equals(Point.ZERO))
31147
- return Point.ZERO;
31148
- P.assertValidity();
31149
- return P;
31150
- }
31151
31059
  return {
31152
- defaults,
31153
31060
  hashToCurve(msg, options) {
31154
- const u = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });
31155
- const u0 = map2(u[0]);
31156
- const u1 = map2(u[1]);
31157
- 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;
31158
31067
  },
31159
31068
  encodeToCurve(msg, options) {
31160
- const u = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });
31161
- 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;
31162
31073
  },
31163
31074
  mapToCurve(scalars) {
31164
31075
  if (!Array.isArray(scalars))
31165
- throw new Error("expected array of bigints");
31076
+ throw new Error("mapToCurve: expected array of bigints");
31166
31077
  for (const i of scalars)
31167
31078
  if (typeof i !== "bigint")
31168
- throw new Error("expected array of bigints");
31169
- 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;
31170
31083
  }
31171
31084
  };
31172
31085
  }
31173
31086
  });
31174
31087
 
31175
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/montgomery.js
31088
+ // ../../node_modules/@noble/curves/abstract/montgomery.js
31176
31089
  var require_montgomery = __commonJS((exports) => {
31177
31090
  Object.defineProperty(exports, "__esModule", { value: true });
31178
31091
  exports.montgomery = montgomery;
@@ -31197,13 +31110,12 @@ var require_montgomery = __commonJS((exports) => {
31197
31110
  function montgomery(curveDef) {
31198
31111
  const CURVE = validateOpts(curveDef);
31199
31112
  const { P } = CURVE;
31200
- const Fp = (0, modular_ts_1.Field)(P);
31201
31113
  const modP = (n) => (0, modular_ts_1.mod)(n, P);
31202
31114
  const montgomeryBits = CURVE.montgomeryBits;
31203
31115
  const montgomeryBytes = Math.ceil(montgomeryBits / 8);
31204
31116
  const fieldLen = CURVE.nByteLength;
31205
31117
  const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);
31206
- 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));
31207
31119
  function cswap(swap, x_2, x_3) {
31208
31120
  const dummy = modP(swap * (x_2 - x_3));
31209
31121
  x_2 = modP(x_2 - dummy);
@@ -31298,10 +31210,10 @@ var require_montgomery = __commonJS((exports) => {
31298
31210
  }
31299
31211
  });
31300
31212
 
31301
- // ../../node_modules/eciesjs/node_modules/@noble/curves/ed25519.js
31213
+ // ../../node_modules/@noble/curves/ed25519.js
31302
31214
  var require_ed25519 = __commonJS((exports) => {
31303
31215
  Object.defineProperty(exports, "__esModule", { value: true });
31304
- 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;
31305
31217
  exports.edwardsToMontgomeryPub = edwardsToMontgomeryPub;
31306
31218
  exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
31307
31219
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -31486,10 +31398,10 @@ var require_ed25519 = __commonJS((exports) => {
31486
31398
  xd = Fp.cmov(xd, Fp.ONE, e3);
31487
31399
  yn = Fp.cmov(yn, Fp.ONE, e3);
31488
31400
  yd = Fp.cmov(yd, Fp.ONE, e3);
31489
- const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(Fp, [xd, yd], true);
31490
- 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]) };
31491
31403
  }
31492
- 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]), {
31493
31405
  DST: "edwards25519_XMD:SHA-512_ELL2_RO_",
31494
31406
  encodeDST: "edwards25519_XMD:SHA-512_ELL2_NU_",
31495
31407
  p: Fp.ORDER,
@@ -31498,8 +31410,8 @@ var require_ed25519 = __commonJS((exports) => {
31498
31410
  expand: "xmd",
31499
31411
  hash: sha2_1.sha512
31500
31412
  }))();
31501
- exports.hashToCurve = (() => exports.ed25519_hasher.hashToCurve)();
31502
- exports.encodeToCurve = (() => exports.ed25519_hasher.encodeToCurve)();
31413
+ exports.hashToCurve = (() => htf.hashToCurve)();
31414
+ exports.encodeToCurve = (() => htf.encodeToCurve)();
31503
31415
  function aristp(other) {
31504
31416
  if (!(other instanceof RistPoint))
31505
31417
  throw new Error("RistrettoPoint expected");
@@ -31665,10 +31577,11 @@ var require_ed25519 = __commonJS((exports) => {
31665
31577
  exports.hash_to_ristretto255 = exports.hashToRistretto255;
31666
31578
  });
31667
31579
 
31668
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/hmac.js
31580
+ // ../../node_modules/@noble/hashes/hmac.js
31669
31581
  var require_hmac = __commonJS((exports) => {
31670
31582
  Object.defineProperty(exports, "__esModule", { value: true });
31671
31583
  exports.hmac = exports.HMAC = undefined;
31584
+ var _assert_ts_1 = require__assert();
31672
31585
  var utils_ts_1 = require_utils7();
31673
31586
 
31674
31587
  class HMAC extends utils_ts_1.Hash {
@@ -31676,7 +31589,7 @@ var require_hmac = __commonJS((exports) => {
31676
31589
  super();
31677
31590
  this.finished = false;
31678
31591
  this.destroyed = false;
31679
- (0, utils_ts_1.ahash)(hash);
31592
+ (0, _assert_ts_1.ahash)(hash);
31680
31593
  const key = (0, utils_ts_1.toBytes)(_key);
31681
31594
  this.iHash = hash.create();
31682
31595
  if (typeof this.iHash.update !== "function")
@@ -31693,16 +31606,16 @@ var require_hmac = __commonJS((exports) => {
31693
31606
  for (let i = 0;i < pad.length; i++)
31694
31607
  pad[i] ^= 54 ^ 92;
31695
31608
  this.oHash.update(pad);
31696
- (0, utils_ts_1.clean)(pad);
31609
+ pad.fill(0);
31697
31610
  }
31698
31611
  update(buf) {
31699
- (0, utils_ts_1.aexists)(this);
31612
+ (0, _assert_ts_1.aexists)(this);
31700
31613
  this.iHash.update(buf);
31701
31614
  return this;
31702
31615
  }
31703
31616
  digestInto(out) {
31704
- (0, utils_ts_1.aexists)(this);
31705
- (0, utils_ts_1.abytes)(out, this.outputLen);
31617
+ (0, _assert_ts_1.aexists)(this);
31618
+ (0, _assert_ts_1.abytes)(out, this.outputLen);
31706
31619
  this.finished = true;
31707
31620
  this.iHash.digestInto(out);
31708
31621
  this.oHash.update(out);
@@ -31726,9 +31639,6 @@ var require_hmac = __commonJS((exports) => {
31726
31639
  to.iHash = iHash._cloneInto(to.iHash);
31727
31640
  return to;
31728
31641
  }
31729
- clone() {
31730
- return this._cloneInto();
31731
- }
31732
31642
  destroy() {
31733
31643
  this.destroyed = true;
31734
31644
  this.oHash.destroy();
@@ -31741,7 +31651,7 @@ var require_hmac = __commonJS((exports) => {
31741
31651
  exports.hmac.create = (hash, key) => new HMAC(hash, key);
31742
31652
  });
31743
31653
 
31744
- // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/weierstrass.js
31654
+ // ../../node_modules/@noble/curves/abstract/weierstrass.js
31745
31655
  var require_weierstrass = __commonJS((exports) => {
31746
31656
  Object.defineProperty(exports, "__esModule", { value: true });
31747
31657
  exports.DER = exports.DERErr = undefined;
@@ -31976,7 +31886,7 @@ var require_weierstrass = __commonJS((exports) => {
31976
31886
  constructor(px, py, pz) {
31977
31887
  if (px == null || !Fp.isValid(px))
31978
31888
  throw new Error("x required");
31979
- if (py == null || !Fp.isValid(py) || Fp.is0(py))
31889
+ if (py == null || !Fp.isValid(py))
31980
31890
  throw new Error("y required");
31981
31891
  if (pz == null || !Fp.isValid(pz))
31982
31892
  throw new Error("z required");
@@ -32003,7 +31913,7 @@ var require_weierstrass = __commonJS((exports) => {
32003
31913
  return this.toAffine().y;
32004
31914
  }
32005
31915
  static normalizeZ(points) {
32006
- const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.pz));
31916
+ const toInv = Fp.invertBatch(points.map((p) => p.pz));
32007
31917
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
32008
31918
  }
32009
31919
  static fromHex(hex) {
@@ -32364,7 +32274,7 @@ var require_weierstrass = __commonJS((exports) => {
32364
32274
  return (0, utils_ts_1.hexToBytes)(this.toDERHex());
32365
32275
  }
32366
32276
  toDERHex() {
32367
- return exports.DER.hexFromSig(this);
32277
+ return exports.DER.hexFromSig({ r: this.r, s: this.s });
32368
32278
  }
32369
32279
  toCompactRawBytes() {
32370
32280
  return (0, utils_ts_1.hexToBytes)(this.toCompactHex());
@@ -32639,14 +32549,13 @@ var require_weierstrass = __commonJS((exports) => {
32639
32549
  y = Fp.cmov(y, value, isValid2);
32640
32550
  const e1 = Fp.isOdd(u) === Fp.isOdd(y);
32641
32551
  y = Fp.cmov(Fp.neg(y), y, e1);
32642
- const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];
32643
- x = Fp.mul(x, tv4_inv);
32552
+ x = Fp.div(x, tv4);
32644
32553
  return { x, y };
32645
32554
  };
32646
32555
  }
32647
32556
  });
32648
32557
 
32649
- // ../../node_modules/eciesjs/node_modules/@noble/curves/_shortw_utils.js
32558
+ // ../../node_modules/@noble/curves/_shortw_utils.js
32650
32559
  var require__shortw_utils = __commonJS((exports) => {
32651
32560
  Object.defineProperty(exports, "__esModule", { value: true });
32652
32561
  exports.getHash = getHash;
@@ -32668,10 +32577,10 @@ var require__shortw_utils = __commonJS((exports) => {
32668
32577
  }
32669
32578
  });
32670
32579
 
32671
- // ../../node_modules/eciesjs/node_modules/@noble/curves/secp256k1.js
32580
+ // ../../node_modules/@noble/curves/secp256k1.js
32672
32581
  var require_secp256k1 = __commonJS((exports) => {
32673
32582
  Object.defineProperty(exports, "__esModule", { value: true });
32674
- exports.encodeToCurve = exports.hashToCurve = exports.secp256k1_hasher = exports.schnorr = exports.secp256k1 = undefined;
32583
+ exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = undefined;
32675
32584
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
32676
32585
  var sha2_1 = require_sha2();
32677
32586
  var utils_1 = require_utils7();
@@ -32867,7 +32776,7 @@ var require_secp256k1 = __commonJS((exports) => {
32867
32776
  B: BigInt("1771"),
32868
32777
  Z: Fpk1.create(BigInt("-11"))
32869
32778
  }))();
32870
- 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) => {
32871
32780
  const { x, y } = mapSWU(Fpk1.create(scalars[0]));
32872
32781
  return isoMap(x, y);
32873
32782
  }, {
@@ -32879,8 +32788,8 @@ var require_secp256k1 = __commonJS((exports) => {
32879
32788
  expand: "xmd",
32880
32789
  hash: sha2_1.sha256
32881
32790
  }))();
32882
- exports.hashToCurve = (() => exports.secp256k1_hasher.hashToCurve)();
32883
- exports.encodeToCurve = (() => exports.secp256k1_hasher.encodeToCurve)();
32791
+ exports.hashToCurve = (() => htf.hashToCurve)();
32792
+ exports.encodeToCurve = (() => htf.encodeToCurve)();
32884
32793
  });
32885
32794
 
32886
32795
  // ../../node_modules/eciesjs/dist/utils/hex.js
@@ -32994,61 +32903,51 @@ var require_elliptic = __commonJS((exports) => {
32994
32903
  };
32995
32904
  });
32996
32905
 
32997
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/hkdf.js
32906
+ // ../../node_modules/@noble/hashes/hkdf.js
32998
32907
  var require_hkdf = __commonJS((exports) => {
32999
32908
  Object.defineProperty(exports, "__esModule", { value: true });
33000
32909
  exports.hkdf = undefined;
33001
32910
  exports.extract = extract;
33002
32911
  exports.expand = expand;
32912
+ var _assert_ts_1 = require__assert();
33003
32913
  var hmac_ts_1 = require_hmac();
33004
32914
  var utils_ts_1 = require_utils7();
33005
32915
  function extract(hash, ikm, salt) {
33006
- (0, utils_ts_1.ahash)(hash);
32916
+ (0, _assert_ts_1.ahash)(hash);
33007
32917
  if (salt === undefined)
33008
32918
  salt = new Uint8Array(hash.outputLen);
33009
32919
  return (0, hmac_ts_1.hmac)(hash, (0, utils_ts_1.toBytes)(salt), (0, utils_ts_1.toBytes)(ikm));
33010
32920
  }
33011
- var HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
33012
- var EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
32921
+ var HKDF_COUNTER = /* @__PURE__ */ new Uint8Array([0]);
32922
+ var EMPTY_BUFFER = /* @__PURE__ */ new Uint8Array;
33013
32923
  function expand(hash, prk, info, length = 32) {
33014
- (0, utils_ts_1.ahash)(hash);
33015
- (0, utils_ts_1.anumber)(length);
33016
- const olen = hash.outputLen;
33017
- if (length > 255 * olen)
32924
+ (0, _assert_ts_1.ahash)(hash);
32925
+ (0, _assert_ts_1.anumber)(length);
32926
+ if (length > 255 * hash.outputLen)
33018
32927
  throw new Error("Length should be <= 255*HashLen");
33019
- const blocks = Math.ceil(length / olen);
32928
+ const blocks = Math.ceil(length / hash.outputLen);
33020
32929
  if (info === undefined)
33021
32930
  info = EMPTY_BUFFER;
33022
- const okm = new Uint8Array(blocks * olen);
32931
+ const okm = new Uint8Array(blocks * hash.outputLen);
33023
32932
  const HMAC = hmac_ts_1.hmac.create(hash, prk);
33024
32933
  const HMACTmp = HMAC._cloneInto();
33025
32934
  const T = new Uint8Array(HMAC.outputLen);
33026
32935
  for (let counter = 0;counter < blocks; counter++) {
33027
32936
  HKDF_COUNTER[0] = counter + 1;
33028
32937
  HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T).update(info).update(HKDF_COUNTER).digestInto(T);
33029
- okm.set(T, olen * counter);
32938
+ okm.set(T, hash.outputLen * counter);
33030
32939
  HMAC._cloneInto(HMACTmp);
33031
32940
  }
33032
32941
  HMAC.destroy();
33033
32942
  HMACTmp.destroy();
33034
- (0, utils_ts_1.clean)(T, HKDF_COUNTER);
32943
+ T.fill(0);
32944
+ HKDF_COUNTER.fill(0);
33035
32945
  return okm.slice(0, length);
33036
32946
  }
33037
32947
  var hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
33038
32948
  exports.hkdf = hkdf;
33039
32949
  });
33040
32950
 
33041
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha256.js
33042
- var require_sha256 = __commonJS((exports) => {
33043
- Object.defineProperty(exports, "__esModule", { value: true });
33044
- exports.sha224 = exports.SHA224 = exports.sha256 = exports.SHA256 = undefined;
33045
- var sha2_ts_1 = require_sha2();
33046
- exports.SHA256 = sha2_ts_1.SHA256;
33047
- exports.sha256 = sha2_ts_1.sha256;
33048
- exports.SHA224 = sha2_ts_1.SHA224;
33049
- exports.sha224 = sha2_ts_1.sha224;
33050
- });
33051
-
33052
32951
  // ../../node_modules/eciesjs/dist/utils/hash.js
33053
32952
  var require_hash = __commonJS((exports) => {
33054
32953
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -35355,15 +35254,15 @@ var require_main3 = __commonJS((exports, module) => {
35355
35254
  lastError = error;
35356
35255
  if (error.code === "MISSING_ENV_FILE") {
35357
35256
  if (!options.convention) {
35358
- console.error(error.message);
35257
+ logger.error(error.message);
35359
35258
  if (error.help) {
35360
- console.error(error.help);
35259
+ logger.error(error.help);
35361
35260
  }
35362
35261
  }
35363
35262
  } else {
35364
- console.error(error.message);
35263
+ logger.error(error.message);
35365
35264
  if (error.help) {
35366
- console.error(error.help);
35265
+ logger.error(error.help);
35367
35266
  }
35368
35267
  }
35369
35268
  }
@@ -35408,9 +35307,9 @@ var require_main3 = __commonJS((exports, module) => {
35408
35307
  const overload = options.overload || options.override;
35409
35308
  const { parsed, errors: errors2 } = new Parse(src, privateKey, processEnv, overload).run();
35410
35309
  for (const error of errors2) {
35411
- console.error(error.message);
35310
+ logger.error(error.message);
35412
35311
  if (error.help) {
35413
- console.error(error.help);
35312
+ logger.error(error.help);
35414
35313
  }
35415
35314
  }
35416
35315
  return parsed;
@@ -35481,9 +35380,9 @@ var require_main3 = __commonJS((exports, module) => {
35481
35380
  }
35482
35381
  if (options.strict)
35483
35382
  throw error;
35484
- console.error(error.message);
35383
+ logger.error(error.message);
35485
35384
  if (error.help) {
35486
- console.error(error.help);
35385
+ logger.error(error.help);
35487
35386
  }
35488
35387
  }
35489
35388
  if (key) {
@@ -49801,13 +49700,14 @@ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_
49801
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])))`;
49802
49701
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
49803
49702
  function timeRegexSource(args) {
49804
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
49703
+ let secondsRegexSource = `[0-5]\\d`;
49805
49704
  if (args.precision) {
49806
- regex = `${regex}\\.\\d{${args.precision}}`;
49705
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
49807
49706
  } else if (args.precision == null) {
49808
- regex = `${regex}(\\.\\d+)?`;
49707
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
49809
49708
  }
49810
- return regex;
49709
+ const secondsQuantifier = args.precision ? "+" : "?";
49710
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
49811
49711
  }
49812
49712
  function timeRegex(args) {
49813
49713
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -61268,7 +61168,7 @@ var {
61268
61168
  var package_default = {
61269
61169
  name: "@settlemint/sdk-mcp",
61270
61170
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
61271
- version: "2.2.2-pr75b59b5f",
61171
+ version: "2.2.2-pr915f6bfb",
61272
61172
  type: "module",
61273
61173
  private: false,
61274
61174
  license: "FSL-1.1-MIT",
@@ -61310,11 +61210,11 @@ var package_default = {
61310
61210
  "@graphql-tools/load": "8.1.0",
61311
61211
  "@graphql-tools/url-loader": "8.0.31",
61312
61212
  "@modelcontextprotocol/sdk": "1.11.0",
61313
- "@settlemint/sdk-js": "2.2.2-pr75b59b5f",
61314
- "@settlemint/sdk-utils": "2.2.2-pr75b59b5f",
61213
+ "@settlemint/sdk-js": "2.2.2-pr915f6bfb",
61214
+ "@settlemint/sdk-utils": "2.2.2-pr915f6bfb",
61315
61215
  "@commander-js/extra-typings": "11.1.0",
61316
61216
  commander: "11.1.0",
61317
- zod: "3.24.3"
61217
+ zod: "3.24.4"
61318
61218
  },
61319
61219
  devDependencies: {},
61320
61220
  peerDependencies: {},
@@ -67059,4 +66959,4 @@ await main().catch((error2) => {
67059
66959
  process.exit(1);
67060
66960
  });
67061
66961
 
67062
- //# debugId=436FF7D056E0BBCD64756E2164756E21
66962
+ //# debugId=8B11C336D4BB46D764756E2164756E21