@settlemint/sdk-mcp 2.2.2-prdc5c6b48 → 2.2.2-prdc6e1d84

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 +1122 -583
  2. package/dist/mcp.js.map +29 -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) {
@@ -20480,7 +20484,7 @@ var require_File = __commonJS((exports) => {
20480
20484
  exports.PonyfillFile = PonyfillFile;
20481
20485
  });
20482
20486
 
20483
- // ../../node_modules/tslib/tslib.js
20487
+ // ../../node_modules/@whatwg-node/disposablestack/node_modules/tslib/tslib.js
20484
20488
  var require_tslib = __commonJS((exports, module) => {
20485
20489
  var __extends;
20486
20490
  var __assign;
@@ -22543,11 +22547,616 @@ var require_fetchCurl = __commonJS((exports) => {
22543
22547
  }
22544
22548
  });
22545
22549
 
22550
+ // ../../node_modules/@whatwg-node/node-fetch/node_modules/tslib/tslib.js
22551
+ var require_tslib2 = __commonJS((exports, module) => {
22552
+ var __extends;
22553
+ var __assign;
22554
+ var __rest;
22555
+ var __decorate;
22556
+ var __param;
22557
+ var __esDecorate;
22558
+ var __runInitializers;
22559
+ var __propKey;
22560
+ var __setFunctionName;
22561
+ var __metadata;
22562
+ var __awaiter;
22563
+ var __generator;
22564
+ var __exportStar;
22565
+ var __values;
22566
+ var __read;
22567
+ var __spread;
22568
+ var __spreadArrays;
22569
+ var __spreadArray;
22570
+ var __await;
22571
+ var __asyncGenerator;
22572
+ var __asyncDelegator;
22573
+ var __asyncValues;
22574
+ var __makeTemplateObject;
22575
+ var __importStar;
22576
+ var __importDefault;
22577
+ var __classPrivateFieldGet;
22578
+ var __classPrivateFieldSet;
22579
+ var __classPrivateFieldIn;
22580
+ var __createBinding;
22581
+ var __addDisposableResource;
22582
+ var __disposeResources;
22583
+ var __rewriteRelativeImportExtension;
22584
+ (function(factory) {
22585
+ var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
22586
+ if (typeof define === "function" && define.amd) {
22587
+ define("tslib", ["exports"], function(exports2) {
22588
+ factory(createExporter(root, createExporter(exports2)));
22589
+ });
22590
+ } else if (typeof module === "object" && typeof exports === "object") {
22591
+ factory(createExporter(root, createExporter(exports)));
22592
+ } else {
22593
+ factory(createExporter(root));
22594
+ }
22595
+ function createExporter(exports2, previous) {
22596
+ if (exports2 !== root) {
22597
+ if (typeof Object.create === "function") {
22598
+ Object.defineProperty(exports2, "__esModule", { value: true });
22599
+ } else {
22600
+ exports2.__esModule = true;
22601
+ }
22602
+ }
22603
+ return function(id, v) {
22604
+ return exports2[id] = previous ? previous(id, v) : v;
22605
+ };
22606
+ }
22607
+ })(function(exporter) {
22608
+ var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
22609
+ d.__proto__ = b;
22610
+ } || function(d, b) {
22611
+ for (var p in b)
22612
+ if (Object.prototype.hasOwnProperty.call(b, p))
22613
+ d[p] = b[p];
22614
+ };
22615
+ __extends = function(d, b) {
22616
+ if (typeof b !== "function" && b !== null)
22617
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
22618
+ extendStatics(d, b);
22619
+ function __() {
22620
+ this.constructor = d;
22621
+ }
22622
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
22623
+ };
22624
+ __assign = Object.assign || function(t) {
22625
+ for (var s, i = 1, n = arguments.length;i < n; i++) {
22626
+ s = arguments[i];
22627
+ for (var p in s)
22628
+ if (Object.prototype.hasOwnProperty.call(s, p))
22629
+ t[p] = s[p];
22630
+ }
22631
+ return t;
22632
+ };
22633
+ __rest = function(s, e) {
22634
+ var t = {};
22635
+ for (var p in s)
22636
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
22637
+ t[p] = s[p];
22638
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
22639
+ for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
22640
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
22641
+ t[p[i]] = s[p[i]];
22642
+ }
22643
+ return t;
22644
+ };
22645
+ __decorate = function(decorators, target, key, desc) {
22646
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22647
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
22648
+ r = Reflect.decorate(decorators, target, key, desc);
22649
+ else
22650
+ for (var i = decorators.length - 1;i >= 0; i--)
22651
+ if (d = decorators[i])
22652
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22653
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22654
+ };
22655
+ __param = function(paramIndex, decorator) {
22656
+ return function(target, key) {
22657
+ decorator(target, key, paramIndex);
22658
+ };
22659
+ };
22660
+ __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
22661
+ function accept(f) {
22662
+ if (f !== undefined && typeof f !== "function")
22663
+ throw new TypeError("Function expected");
22664
+ return f;
22665
+ }
22666
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
22667
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
22668
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
22669
+ var _, done = false;
22670
+ for (var i = decorators.length - 1;i >= 0; i--) {
22671
+ var context = {};
22672
+ for (var p in contextIn)
22673
+ context[p] = p === "access" ? {} : contextIn[p];
22674
+ for (var p in contextIn.access)
22675
+ context.access[p] = contextIn.access[p];
22676
+ context.addInitializer = function(f) {
22677
+ if (done)
22678
+ throw new TypeError("Cannot add initializers after decoration has completed");
22679
+ extraInitializers.push(accept(f || null));
22680
+ };
22681
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
22682
+ if (kind === "accessor") {
22683
+ if (result === undefined)
22684
+ continue;
22685
+ if (result === null || typeof result !== "object")
22686
+ throw new TypeError("Object expected");
22687
+ if (_ = accept(result.get))
22688
+ descriptor.get = _;
22689
+ if (_ = accept(result.set))
22690
+ descriptor.set = _;
22691
+ if (_ = accept(result.init))
22692
+ initializers.unshift(_);
22693
+ } else if (_ = accept(result)) {
22694
+ if (kind === "field")
22695
+ initializers.unshift(_);
22696
+ else
22697
+ descriptor[key] = _;
22698
+ }
22699
+ }
22700
+ if (target)
22701
+ Object.defineProperty(target, contextIn.name, descriptor);
22702
+ done = true;
22703
+ };
22704
+ __runInitializers = function(thisArg, initializers, value) {
22705
+ var useValue = arguments.length > 2;
22706
+ for (var i = 0;i < initializers.length; i++) {
22707
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
22708
+ }
22709
+ return useValue ? value : undefined;
22710
+ };
22711
+ __propKey = function(x) {
22712
+ return typeof x === "symbol" ? x : "".concat(x);
22713
+ };
22714
+ __setFunctionName = function(f, name, prefix) {
22715
+ if (typeof name === "symbol")
22716
+ name = name.description ? "[".concat(name.description, "]") : "";
22717
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
22718
+ };
22719
+ __metadata = function(metadataKey, metadataValue) {
22720
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
22721
+ return Reflect.metadata(metadataKey, metadataValue);
22722
+ };
22723
+ __awaiter = function(thisArg, _arguments, P, generator) {
22724
+ function adopt(value) {
22725
+ return value instanceof P ? value : new P(function(resolve) {
22726
+ resolve(value);
22727
+ });
22728
+ }
22729
+ return new (P || (P = Promise))(function(resolve, reject) {
22730
+ function fulfilled(value) {
22731
+ try {
22732
+ step(generator.next(value));
22733
+ } catch (e) {
22734
+ reject(e);
22735
+ }
22736
+ }
22737
+ function rejected(value) {
22738
+ try {
22739
+ step(generator["throw"](value));
22740
+ } catch (e) {
22741
+ reject(e);
22742
+ }
22743
+ }
22744
+ function step(result) {
22745
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
22746
+ }
22747
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22748
+ });
22749
+ };
22750
+ __generator = function(thisArg, body) {
22751
+ var _ = { label: 0, sent: function() {
22752
+ if (t[0] & 1)
22753
+ throw t[1];
22754
+ return t[1];
22755
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
22756
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
22757
+ return this;
22758
+ }), g;
22759
+ function verb(n) {
22760
+ return function(v) {
22761
+ return step([n, v]);
22762
+ };
22763
+ }
22764
+ function step(op) {
22765
+ if (f)
22766
+ throw new TypeError("Generator is already executing.");
22767
+ while (g && (g = 0, op[0] && (_ = 0)), _)
22768
+ try {
22769
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
22770
+ return t;
22771
+ if (y = 0, t)
22772
+ op = [op[0] & 2, t.value];
22773
+ switch (op[0]) {
22774
+ case 0:
22775
+ case 1:
22776
+ t = op;
22777
+ break;
22778
+ case 4:
22779
+ _.label++;
22780
+ return { value: op[1], done: false };
22781
+ case 5:
22782
+ _.label++;
22783
+ y = op[1];
22784
+ op = [0];
22785
+ continue;
22786
+ case 7:
22787
+ op = _.ops.pop();
22788
+ _.trys.pop();
22789
+ continue;
22790
+ default:
22791
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
22792
+ _ = 0;
22793
+ continue;
22794
+ }
22795
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
22796
+ _.label = op[1];
22797
+ break;
22798
+ }
22799
+ if (op[0] === 6 && _.label < t[1]) {
22800
+ _.label = t[1];
22801
+ t = op;
22802
+ break;
22803
+ }
22804
+ if (t && _.label < t[2]) {
22805
+ _.label = t[2];
22806
+ _.ops.push(op);
22807
+ break;
22808
+ }
22809
+ if (t[2])
22810
+ _.ops.pop();
22811
+ _.trys.pop();
22812
+ continue;
22813
+ }
22814
+ op = body.call(thisArg, _);
22815
+ } catch (e) {
22816
+ op = [6, e];
22817
+ y = 0;
22818
+ } finally {
22819
+ f = t = 0;
22820
+ }
22821
+ if (op[0] & 5)
22822
+ throw op[1];
22823
+ return { value: op[0] ? op[1] : undefined, done: true };
22824
+ }
22825
+ };
22826
+ __exportStar = function(m, o) {
22827
+ for (var p in m)
22828
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
22829
+ __createBinding(o, m, p);
22830
+ };
22831
+ __createBinding = Object.create ? function(o, m, k, k2) {
22832
+ if (k2 === undefined)
22833
+ k2 = k;
22834
+ var desc = Object.getOwnPropertyDescriptor(m, k);
22835
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
22836
+ desc = { enumerable: true, get: function() {
22837
+ return m[k];
22838
+ } };
22839
+ }
22840
+ Object.defineProperty(o, k2, desc);
22841
+ } : function(o, m, k, k2) {
22842
+ if (k2 === undefined)
22843
+ k2 = k;
22844
+ o[k2] = m[k];
22845
+ };
22846
+ __values = function(o) {
22847
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
22848
+ if (m)
22849
+ return m.call(o);
22850
+ if (o && typeof o.length === "number")
22851
+ return {
22852
+ next: function() {
22853
+ if (o && i >= o.length)
22854
+ o = undefined;
22855
+ return { value: o && o[i++], done: !o };
22856
+ }
22857
+ };
22858
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
22859
+ };
22860
+ __read = function(o, n) {
22861
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
22862
+ if (!m)
22863
+ return o;
22864
+ var i = m.call(o), r, ar = [], e;
22865
+ try {
22866
+ while ((n === undefined || n-- > 0) && !(r = i.next()).done)
22867
+ ar.push(r.value);
22868
+ } catch (error) {
22869
+ e = { error };
22870
+ } finally {
22871
+ try {
22872
+ if (r && !r.done && (m = i["return"]))
22873
+ m.call(i);
22874
+ } finally {
22875
+ if (e)
22876
+ throw e.error;
22877
+ }
22878
+ }
22879
+ return ar;
22880
+ };
22881
+ __spread = function() {
22882
+ for (var ar = [], i = 0;i < arguments.length; i++)
22883
+ ar = ar.concat(__read(arguments[i]));
22884
+ return ar;
22885
+ };
22886
+ __spreadArrays = function() {
22887
+ for (var s = 0, i = 0, il = arguments.length;i < il; i++)
22888
+ s += arguments[i].length;
22889
+ for (var r = Array(s), k = 0, i = 0;i < il; i++)
22890
+ for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
22891
+ r[k] = a[j];
22892
+ return r;
22893
+ };
22894
+ __spreadArray = function(to, from, pack) {
22895
+ if (pack || arguments.length === 2)
22896
+ for (var i = 0, l = from.length, ar;i < l; i++) {
22897
+ if (ar || !(i in from)) {
22898
+ if (!ar)
22899
+ ar = Array.prototype.slice.call(from, 0, i);
22900
+ ar[i] = from[i];
22901
+ }
22902
+ }
22903
+ return to.concat(ar || Array.prototype.slice.call(from));
22904
+ };
22905
+ __await = function(v) {
22906
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
22907
+ };
22908
+ __asyncGenerator = function(thisArg, _arguments, generator) {
22909
+ if (!Symbol.asyncIterator)
22910
+ throw new TypeError("Symbol.asyncIterator is not defined.");
22911
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
22912
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
22913
+ return this;
22914
+ }, i;
22915
+ function awaitReturn(f) {
22916
+ return function(v) {
22917
+ return Promise.resolve(v).then(f, reject);
22918
+ };
22919
+ }
22920
+ function verb(n, f) {
22921
+ if (g[n]) {
22922
+ i[n] = function(v) {
22923
+ return new Promise(function(a, b) {
22924
+ q.push([n, v, a, b]) > 1 || resume(n, v);
22925
+ });
22926
+ };
22927
+ if (f)
22928
+ i[n] = f(i[n]);
22929
+ }
22930
+ }
22931
+ function resume(n, v) {
22932
+ try {
22933
+ step(g[n](v));
22934
+ } catch (e) {
22935
+ settle(q[0][3], e);
22936
+ }
22937
+ }
22938
+ function step(r) {
22939
+ r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
22940
+ }
22941
+ function fulfill(value) {
22942
+ resume("next", value);
22943
+ }
22944
+ function reject(value) {
22945
+ resume("throw", value);
22946
+ }
22947
+ function settle(f, v) {
22948
+ if (f(v), q.shift(), q.length)
22949
+ resume(q[0][0], q[0][1]);
22950
+ }
22951
+ };
22952
+ __asyncDelegator = function(o) {
22953
+ var i, p;
22954
+ return i = {}, verb("next"), verb("throw", function(e) {
22955
+ throw e;
22956
+ }), verb("return"), i[Symbol.iterator] = function() {
22957
+ return this;
22958
+ }, i;
22959
+ function verb(n, f) {
22960
+ i[n] = o[n] ? function(v) {
22961
+ return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
22962
+ } : f;
22963
+ }
22964
+ };
22965
+ __asyncValues = function(o) {
22966
+ if (!Symbol.asyncIterator)
22967
+ throw new TypeError("Symbol.asyncIterator is not defined.");
22968
+ var m = o[Symbol.asyncIterator], i;
22969
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
22970
+ return this;
22971
+ }, i);
22972
+ function verb(n) {
22973
+ i[n] = o[n] && function(v) {
22974
+ return new Promise(function(resolve, reject) {
22975
+ v = o[n](v), settle(resolve, reject, v.done, v.value);
22976
+ });
22977
+ };
22978
+ }
22979
+ function settle(resolve, reject, d, v) {
22980
+ Promise.resolve(v).then(function(v2) {
22981
+ resolve({ value: v2, done: d });
22982
+ }, reject);
22983
+ }
22984
+ };
22985
+ __makeTemplateObject = function(cooked, raw) {
22986
+ if (Object.defineProperty) {
22987
+ Object.defineProperty(cooked, "raw", { value: raw });
22988
+ } else {
22989
+ cooked.raw = raw;
22990
+ }
22991
+ return cooked;
22992
+ };
22993
+ var __setModuleDefault = Object.create ? function(o, v) {
22994
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22995
+ } : function(o, v) {
22996
+ o["default"] = v;
22997
+ };
22998
+ var ownKeys = function(o) {
22999
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
23000
+ var ar = [];
23001
+ for (var k in o2)
23002
+ if (Object.prototype.hasOwnProperty.call(o2, k))
23003
+ ar[ar.length] = k;
23004
+ return ar;
23005
+ };
23006
+ return ownKeys(o);
23007
+ };
23008
+ __importStar = function(mod) {
23009
+ if (mod && mod.__esModule)
23010
+ return mod;
23011
+ var result = {};
23012
+ if (mod != null) {
23013
+ for (var k = ownKeys(mod), i = 0;i < k.length; i++)
23014
+ if (k[i] !== "default")
23015
+ __createBinding(result, mod, k[i]);
23016
+ }
23017
+ __setModuleDefault(result, mod);
23018
+ return result;
23019
+ };
23020
+ __importDefault = function(mod) {
23021
+ return mod && mod.__esModule ? mod : { default: mod };
23022
+ };
23023
+ __classPrivateFieldGet = function(receiver, state, kind, f) {
23024
+ if (kind === "a" && !f)
23025
+ throw new TypeError("Private accessor was defined without a getter");
23026
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
23027
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
23028
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
23029
+ };
23030
+ __classPrivateFieldSet = function(receiver, state, value, kind, f) {
23031
+ if (kind === "m")
23032
+ throw new TypeError("Private method is not writable");
23033
+ if (kind === "a" && !f)
23034
+ throw new TypeError("Private accessor was defined without a setter");
23035
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
23036
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
23037
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
23038
+ };
23039
+ __classPrivateFieldIn = function(state, receiver) {
23040
+ if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
23041
+ throw new TypeError("Cannot use 'in' operator on non-object");
23042
+ return typeof state === "function" ? receiver === state : state.has(receiver);
23043
+ };
23044
+ __addDisposableResource = function(env3, value, async) {
23045
+ if (value !== null && value !== undefined) {
23046
+ if (typeof value !== "object" && typeof value !== "function")
23047
+ throw new TypeError("Object expected.");
23048
+ var dispose, inner;
23049
+ if (async) {
23050
+ if (!Symbol.asyncDispose)
23051
+ throw new TypeError("Symbol.asyncDispose is not defined.");
23052
+ dispose = value[Symbol.asyncDispose];
23053
+ }
23054
+ if (dispose === undefined) {
23055
+ if (!Symbol.dispose)
23056
+ throw new TypeError("Symbol.dispose is not defined.");
23057
+ dispose = value[Symbol.dispose];
23058
+ if (async)
23059
+ inner = dispose;
23060
+ }
23061
+ if (typeof dispose !== "function")
23062
+ throw new TypeError("Object not disposable.");
23063
+ if (inner)
23064
+ dispose = function() {
23065
+ try {
23066
+ inner.call(this);
23067
+ } catch (e) {
23068
+ return Promise.reject(e);
23069
+ }
23070
+ };
23071
+ env3.stack.push({ value, dispose, async });
23072
+ } else if (async) {
23073
+ env3.stack.push({ async: true });
23074
+ }
23075
+ return value;
23076
+ };
23077
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
23078
+ var e = new Error(message);
23079
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
23080
+ };
23081
+ __disposeResources = function(env3) {
23082
+ function fail(e) {
23083
+ env3.error = env3.hasError ? new _SuppressedError(e, env3.error, "An error was suppressed during disposal.") : e;
23084
+ env3.hasError = true;
23085
+ }
23086
+ var r, s = 0;
23087
+ function next() {
23088
+ while (r = env3.stack.pop()) {
23089
+ try {
23090
+ if (!r.async && s === 1)
23091
+ return s = 0, env3.stack.push(r), Promise.resolve().then(next);
23092
+ if (r.dispose) {
23093
+ var result = r.dispose.call(r.value);
23094
+ if (r.async)
23095
+ return s |= 2, Promise.resolve(result).then(next, function(e) {
23096
+ fail(e);
23097
+ return next();
23098
+ });
23099
+ } else
23100
+ s |= 1;
23101
+ } catch (e) {
23102
+ fail(e);
23103
+ }
23104
+ }
23105
+ if (s === 1)
23106
+ return env3.hasError ? Promise.reject(env3.error) : Promise.resolve();
23107
+ if (env3.hasError)
23108
+ throw env3.error;
23109
+ }
23110
+ return next();
23111
+ };
23112
+ __rewriteRelativeImportExtension = function(path, preserveJsx) {
23113
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
23114
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
23115
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
23116
+ });
23117
+ }
23118
+ return path;
23119
+ };
23120
+ exporter("__extends", __extends);
23121
+ exporter("__assign", __assign);
23122
+ exporter("__rest", __rest);
23123
+ exporter("__decorate", __decorate);
23124
+ exporter("__param", __param);
23125
+ exporter("__esDecorate", __esDecorate);
23126
+ exporter("__runInitializers", __runInitializers);
23127
+ exporter("__propKey", __propKey);
23128
+ exporter("__setFunctionName", __setFunctionName);
23129
+ exporter("__metadata", __metadata);
23130
+ exporter("__awaiter", __awaiter);
23131
+ exporter("__generator", __generator);
23132
+ exporter("__exportStar", __exportStar);
23133
+ exporter("__createBinding", __createBinding);
23134
+ exporter("__values", __values);
23135
+ exporter("__read", __read);
23136
+ exporter("__spread", __spread);
23137
+ exporter("__spreadArrays", __spreadArrays);
23138
+ exporter("__spreadArray", __spreadArray);
23139
+ exporter("__await", __await);
23140
+ exporter("__asyncGenerator", __asyncGenerator);
23141
+ exporter("__asyncDelegator", __asyncDelegator);
23142
+ exporter("__asyncValues", __asyncValues);
23143
+ exporter("__makeTemplateObject", __makeTemplateObject);
23144
+ exporter("__importStar", __importStar);
23145
+ exporter("__importDefault", __importDefault);
23146
+ exporter("__classPrivateFieldGet", __classPrivateFieldGet);
23147
+ exporter("__classPrivateFieldSet", __classPrivateFieldSet);
23148
+ exporter("__classPrivateFieldIn", __classPrivateFieldIn);
23149
+ exporter("__addDisposableResource", __addDisposableResource);
23150
+ exporter("__disposeResources", __disposeResources);
23151
+ exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
23152
+ });
23153
+ });
23154
+
22546
23155
  // ../../node_modules/@whatwg-node/node-fetch/cjs/URL.js
22547
23156
  var require_URL = __commonJS((exports) => {
22548
23157
  Object.defineProperty(exports, "__esModule", { value: true });
22549
23158
  exports.PonyfillURL = undefined;
22550
- var tslib_1 = require_tslib();
23159
+ var tslib_1 = require_tslib2();
22551
23160
  var node_buffer_1 = tslib_1.__importDefault(__require("node:buffer"));
22552
23161
  var node_crypto_1 = __require("node:crypto");
22553
23162
  var NativeURL = globalThis.URL;
@@ -25492,7 +26101,7 @@ var require_dist2 = __commonJS((exports) => {
25492
26101
  // ../../node_modules/@dotenvx/dotenvx/package.json
25493
26102
  var require_package = __commonJS((exports, module) => {
25494
26103
  module.exports = {
25495
- version: "1.41.0",
26104
+ version: "1.43.0",
25496
26105
  name: "@dotenvx/dotenvx",
25497
26106
  description: "a better dotenv–from the creator of `dotenv`",
25498
26107
  author: "@motdotla",
@@ -25645,14 +26254,11 @@ var require_logger = __commonJS((exports, module) => {
25645
26254
  var { getColor, bold: bold2 } = require_colors();
25646
26255
  var levels = {
25647
26256
  error: 0,
25648
- errorv: 0,
25649
- errornocolor: 0,
25650
26257
  warn: 1,
25651
26258
  success: 2,
25652
26259
  successv: 2,
25653
26260
  info: 2,
25654
26261
  help: 2,
25655
- blank: 2,
25656
26262
  verbose: 4,
25657
26263
  debug: 5,
25658
26264
  silly: 6
@@ -25665,7 +26271,11 @@ var require_logger = __commonJS((exports, module) => {
25665
26271
  var verbose = getColor("plum");
25666
26272
  var debug = getColor("plum");
25667
26273
  var currentLevel = levels.info;
25668
- function log(level, message) {
26274
+ function stderr(level, message) {
26275
+ const formattedMessage = formatMessage(level, message);
26276
+ console.error(formattedMessage);
26277
+ }
26278
+ function stdout(level, message) {
25669
26279
  if (levels[level] === undefined) {
25670
26280
  throw new Error(`MISSING_LOG_LEVEL: '${level}'. implement in logger.`);
25671
26281
  }
@@ -25679,10 +26289,6 @@ var require_logger = __commonJS((exports, module) => {
25679
26289
  switch (level.toLowerCase()) {
25680
26290
  case "error":
25681
26291
  return error(formattedMessage);
25682
- case "errorv":
25683
- return error(`[dotenvx@${packageJson.version}] ${formattedMessage}`);
25684
- case "errornocolor":
25685
- return formattedMessage;
25686
26292
  case "warn":
25687
26293
  return warn(formattedMessage);
25688
26294
  case "success":
@@ -25697,23 +26303,18 @@ var require_logger = __commonJS((exports, module) => {
25697
26303
  return verbose(formattedMessage);
25698
26304
  case "debug":
25699
26305
  return debug(formattedMessage);
25700
- case "blank":
25701
- return formattedMessage;
25702
26306
  }
25703
26307
  }
25704
26308
  var logger = {
25705
26309
  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),
26310
+ error: (msg) => stderr("error", msg),
26311
+ warn: (msg) => stdout("warn", msg),
26312
+ success: (msg) => stdout("success", msg),
26313
+ successv: (msg) => stdout("successv", msg),
26314
+ info: (msg) => stdout("info", msg),
26315
+ help: (msg) => stdout("help", msg),
26316
+ verbose: (msg) => stdout("verbose", msg),
26317
+ debug: (msg) => stdout("debug", msg),
25717
26318
  setLevel: (level) => {
25718
26319
  if (levels[level] !== undefined) {
25719
26320
  currentLevel = levels[level];
@@ -28821,54 +29422,21 @@ var require_webcrypto = __commonJS((exports) => {
28821
29422
  exports.gcm = /* @__PURE__ */ (() => generate(mode.GCM))();
28822
29423
  });
28823
29424
 
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) */
29425
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/_assert.js
29426
+ var require__assert = __commonJS((exports) => {
28835
29427
  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
29428
  exports.anumber = anumber;
28839
29429
  exports.abytes = abytes;
28840
29430
  exports.ahash = ahash;
28841
29431
  exports.aexists = aexists;
28842
29432
  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
29433
  function anumber(n) {
28869
29434
  if (!Number.isSafeInteger(n) || n < 0)
28870
29435
  throw new Error("positive integer expected, got " + n);
28871
29436
  }
29437
+ function isBytes(a) {
29438
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
29439
+ }
28872
29440
  function abytes(b, ...lengths) {
28873
29441
  if (!isBytes(b))
28874
29442
  throw new Error("Uint8Array expected");
@@ -28877,7 +29445,7 @@ var require_utils7 = __commonJS((exports) => {
28877
29445
  }
28878
29446
  function ahash(h) {
28879
29447
  if (typeof h !== "function" || typeof h.create !== "function")
28880
- throw new Error("Hash should be wrapped by utils.createHasher");
29448
+ throw new Error("Hash should be wrapped by utils.wrapConstructor");
28881
29449
  anumber(h.outputLen);
28882
29450
  anumber(h.blockLen);
28883
29451
  }
@@ -28894,17 +29462,51 @@ var require_utils7 = __commonJS((exports) => {
28894
29462
  throw new Error("digestInto() expects output buffer of length at least " + min);
28895
29463
  }
28896
29464
  }
29465
+ });
29466
+
29467
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/cryptoNode.js
29468
+ var require_cryptoNode2 = __commonJS((exports) => {
29469
+ Object.defineProperty(exports, "__esModule", { value: true });
29470
+ exports.crypto = undefined;
29471
+ var nc = __require("node:crypto");
29472
+ exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
29473
+ });
29474
+
29475
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/utils.js
29476
+ var require_utils7 = __commonJS((exports) => {
29477
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
29478
+ Object.defineProperty(exports, "__esModule", { value: true });
29479
+ exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.isLE = undefined;
29480
+ exports.isBytes = isBytes;
29481
+ exports.u8 = u8;
29482
+ exports.u32 = u32;
29483
+ exports.createView = createView;
29484
+ exports.rotr = rotr;
29485
+ exports.rotl = rotl;
29486
+ exports.byteSwap = byteSwap;
29487
+ exports.byteSwap32 = byteSwap32;
29488
+ exports.bytesToHex = bytesToHex;
29489
+ exports.hexToBytes = hexToBytes;
29490
+ exports.asyncLoop = asyncLoop;
29491
+ exports.utf8ToBytes = utf8ToBytes;
29492
+ exports.toBytes = toBytes;
29493
+ exports.concatBytes = concatBytes;
29494
+ exports.checkOpts = checkOpts;
29495
+ exports.wrapConstructor = wrapConstructor;
29496
+ exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
29497
+ exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
29498
+ exports.randomBytes = randomBytes;
29499
+ var crypto_1 = require_cryptoNode2();
29500
+ var _assert_ts_1 = require__assert();
29501
+ function isBytes(a) {
29502
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
29503
+ }
28897
29504
  function u8(arr) {
28898
29505
  return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
28899
29506
  }
28900
29507
  function u32(arr) {
28901
29508
  return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
28902
29509
  }
28903
- function clean(...arrays) {
28904
- for (let i = 0;i < arrays.length; i++) {
28905
- arrays[i].fill(0);
28906
- }
28907
- }
28908
29510
  function createView(arr) {
28909
29511
  return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
28910
29512
  }
@@ -28918,19 +29520,16 @@ var require_utils7 = __commonJS((exports) => {
28918
29520
  function byteSwap(word) {
28919
29521
  return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
28920
29522
  }
28921
- exports.swap8IfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
28922
- exports.byteSwapIfBE = exports.swap8IfBE;
29523
+ exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
28923
29524
  function byteSwap32(arr) {
28924
29525
  for (let i = 0;i < arr.length; i++) {
28925
29526
  arr[i] = byteSwap(arr[i]);
28926
29527
  }
28927
- return arr;
28928
29528
  }
28929
- exports.swap32IfBE = exports.isLE ? (u) => u : byteSwap32;
28930
- var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
29529
+ var hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
28931
29530
  var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
28932
29531
  function bytesToHex(bytes) {
28933
- abytes(bytes);
29532
+ (0, _assert_ts_1.abytes)(bytes);
28934
29533
  if (hasHexBuiltin)
28935
29534
  return bytes.toHex();
28936
29535
  let hex = "";
@@ -28985,29 +29584,20 @@ var require_utils7 = __commonJS((exports) => {
28985
29584
  }
28986
29585
  function utf8ToBytes(str) {
28987
29586
  if (typeof str !== "string")
28988
- throw new Error("string expected");
29587
+ throw new Error("utf8ToBytes expected string, got " + typeof str);
28989
29588
  return new Uint8Array(new TextEncoder().encode(str));
28990
29589
  }
28991
- function bytesToUtf8(bytes) {
28992
- return new TextDecoder().decode(bytes);
28993
- }
28994
29590
  function toBytes(data) {
28995
29591
  if (typeof data === "string")
28996
29592
  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);
29593
+ (0, _assert_ts_1.abytes)(data);
29004
29594
  return data;
29005
29595
  }
29006
29596
  function concatBytes(...arrays) {
29007
29597
  let sum = 0;
29008
29598
  for (let i = 0;i < arrays.length; i++) {
29009
29599
  const a = arrays[i];
29010
- abytes(a);
29600
+ (0, _assert_ts_1.abytes)(a);
29011
29601
  sum += a.length;
29012
29602
  }
29013
29603
  const res = new Uint8Array(sum);
@@ -29018,17 +29608,20 @@ var require_utils7 = __commonJS((exports) => {
29018
29608
  }
29019
29609
  return res;
29020
29610
  }
29611
+
29612
+ class Hash {
29613
+ clone() {
29614
+ return this._cloneInto();
29615
+ }
29616
+ }
29617
+ exports.Hash = Hash;
29021
29618
  function checkOpts(defaults, opts) {
29022
29619
  if (opts !== undefined && {}.toString.call(opts) !== "[object Object]")
29023
- throw new Error("options should be object or undefined");
29620
+ throw new Error("Options should be object or undefined");
29024
29621
  const merged = Object.assign(defaults, opts);
29025
29622
  return merged;
29026
29623
  }
29027
-
29028
- class Hash {
29029
- }
29030
- exports.Hash = Hash;
29031
- function createHasher(hashCons) {
29624
+ function wrapConstructor(hashCons) {
29032
29625
  const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
29033
29626
  const tmp = hashCons();
29034
29627
  hashC.outputLen = tmp.outputLen;
@@ -29036,7 +29629,7 @@ var require_utils7 = __commonJS((exports) => {
29036
29629
  hashC.create = () => hashCons();
29037
29630
  return hashC;
29038
29631
  }
29039
- function createOptHasher(hashCons) {
29632
+ function wrapConstructorWithOpts(hashCons) {
29040
29633
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
29041
29634
  const tmp = hashCons({});
29042
29635
  hashC.outputLen = tmp.outputLen;
@@ -29044,7 +29637,7 @@ var require_utils7 = __commonJS((exports) => {
29044
29637
  hashC.create = (opts) => hashCons(opts);
29045
29638
  return hashC;
29046
29639
  }
29047
- function createXOFer(hashCons) {
29640
+ function wrapXOFConstructorWithOpts(hashCons) {
29048
29641
  const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
29049
29642
  const tmp = hashCons({});
29050
29643
  hashC.outputLen = tmp.outputLen;
@@ -29052,9 +29645,6 @@ var require_utils7 = __commonJS((exports) => {
29052
29645
  hashC.create = (opts) => hashCons(opts);
29053
29646
  return hashC;
29054
29647
  }
29055
- exports.wrapConstructor = createHasher;
29056
- exports.wrapConstructorWithOpts = createOptHasher;
29057
- exports.wrapXOFConstructorWithOpts = createXOFer;
29058
29648
  function randomBytes(bytesLength = 32) {
29059
29649
  if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
29060
29650
  return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
@@ -29069,10 +29659,11 @@ var require_utils7 = __commonJS((exports) => {
29069
29659
  // ../../node_modules/eciesjs/node_modules/@noble/hashes/_md.js
29070
29660
  var require__md = __commonJS((exports) => {
29071
29661
  Object.defineProperty(exports, "__esModule", { value: true });
29072
- exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = undefined;
29662
+ exports.HashMD = undefined;
29073
29663
  exports.setBigUint64 = setBigUint64;
29074
29664
  exports.Chi = Chi;
29075
29665
  exports.Maj = Maj;
29666
+ var _assert_ts_1 = require__assert();
29076
29667
  var utils_ts_1 = require_utils7();
29077
29668
  function setBigUint64(view, byteOffset, value, isLE) {
29078
29669
  if (typeof view.setBigUint64 === "function")
@@ -29108,10 +29699,9 @@ var require__md = __commonJS((exports) => {
29108
29699
  this.view = (0, utils_ts_1.createView)(this.buffer);
29109
29700
  }
29110
29701
  update(data) {
29111
- (0, utils_ts_1.aexists)(this);
29112
- data = (0, utils_ts_1.toBytes)(data);
29113
- (0, utils_ts_1.abytes)(data);
29702
+ (0, _assert_ts_1.aexists)(this);
29114
29703
  const { view, buffer, blockLen } = this;
29704
+ data = (0, utils_ts_1.toBytes)(data);
29115
29705
  const len = data.length;
29116
29706
  for (let pos = 0;pos < len; ) {
29117
29707
  const take = Math.min(blockLen - this.pos, len - pos);
@@ -29134,13 +29724,13 @@ var require__md = __commonJS((exports) => {
29134
29724
  return this;
29135
29725
  }
29136
29726
  digestInto(out) {
29137
- (0, utils_ts_1.aexists)(this);
29138
- (0, utils_ts_1.aoutput)(out, this);
29727
+ (0, _assert_ts_1.aexists)(this);
29728
+ (0, _assert_ts_1.aoutput)(out, this);
29139
29729
  this.finished = true;
29140
29730
  const { buffer, view, blockLen, isLE } = this;
29141
29731
  let { pos } = this;
29142
29732
  buffer[pos++] = 128;
29143
- (0, utils_ts_1.clean)(this.buffer.subarray(pos));
29733
+ this.buffer.subarray(pos).fill(0);
29144
29734
  if (this.padOffset > blockLen - pos) {
29145
29735
  this.process(view, 0);
29146
29736
  pos = 0;
@@ -29171,178 +29761,25 @@ var require__md = __commonJS((exports) => {
29171
29761
  to || (to = new this.constructor);
29172
29762
  to.set(...this.get());
29173
29763
  const { blockLen, buffer, length, finished, destroyed, pos } = this;
29174
- to.destroyed = destroyed;
29175
- to.finished = finished;
29176
29764
  to.length = length;
29177
29765
  to.pos = pos;
29766
+ to.finished = finished;
29767
+ to.destroyed = destroyed;
29178
29768
  if (length % blockLen)
29179
29769
  to.buffer.set(buffer);
29180
29770
  return to;
29181
29771
  }
29182
- clone() {
29183
- return this._cloneInto();
29184
- }
29185
29772
  }
29186
29773
  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
29774
  });
29244
29775
 
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
- });
29337
-
29338
- // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha2.js
29339
- var require_sha2 = __commonJS((exports) => {
29776
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha256.js
29777
+ var require_sha256 = __commonJS((exports) => {
29340
29778
  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;
29779
+ exports.sha224 = exports.sha256 = exports.SHA256 = undefined;
29342
29780
  var _md_ts_1 = require__md();
29343
- var u64 = require__u64();
29344
29781
  var utils_ts_1 = require_utils7();
29345
- var SHA256_K = /* @__PURE__ */ Uint32Array.from([
29782
+ var SHA256_K = /* @__PURE__ */ new Uint32Array([
29346
29783
  1116352408,
29347
29784
  1899447441,
29348
29785
  3049323471,
@@ -29408,19 +29845,29 @@ var require_sha2 = __commonJS((exports) => {
29408
29845
  3204031479,
29409
29846
  3329325298
29410
29847
  ]);
29848
+ var SHA256_IV = /* @__PURE__ */ new Uint32Array([
29849
+ 1779033703,
29850
+ 3144134277,
29851
+ 1013904242,
29852
+ 2773480762,
29853
+ 1359893119,
29854
+ 2600822924,
29855
+ 528734635,
29856
+ 1541459225
29857
+ ]);
29411
29858
  var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
29412
29859
 
29413
29860
  class SHA256 extends _md_ts_1.HashMD {
29414
29861
  constructor(outputLen = 32) {
29415
29862
  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;
29863
+ this.A = SHA256_IV[0] | 0;
29864
+ this.B = SHA256_IV[1] | 0;
29865
+ this.C = SHA256_IV[2] | 0;
29866
+ this.D = SHA256_IV[3] | 0;
29867
+ this.E = SHA256_IV[4] | 0;
29868
+ this.F = SHA256_IV[5] | 0;
29869
+ this.G = SHA256_IV[6] | 0;
29870
+ this.H = SHA256_IV[7] | 0;
29424
29871
  }
29425
29872
  get() {
29426
29873
  const { A, B, C, D, E, F, G, H } = this;
@@ -29472,11 +29919,11 @@ var require_sha2 = __commonJS((exports) => {
29472
29919
  this.set(A, B, C, D, E, F, G, H);
29473
29920
  }
29474
29921
  roundClean() {
29475
- (0, utils_ts_1.clean)(SHA256_W);
29922
+ SHA256_W.fill(0);
29476
29923
  }
29477
29924
  destroy() {
29478
29925
  this.set(0, 0, 0, 0, 0, 0, 0, 0);
29479
- (0, utils_ts_1.clean)(this.buffer);
29926
+ this.buffer.fill(0);
29480
29927
  }
29481
29928
  }
29482
29929
  exports.SHA256 = SHA256;
@@ -29484,18 +29931,120 @@ var require_sha2 = __commonJS((exports) => {
29484
29931
  class SHA224 extends SHA256 {
29485
29932
  constructor() {
29486
29933
  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([
29934
+ this.A = 3238371032 | 0;
29935
+ this.B = 914150663 | 0;
29936
+ this.C = 812702999 | 0;
29937
+ this.D = 4144912697 | 0;
29938
+ this.E = 4290775857 | 0;
29939
+ this.F = 1750603025 | 0;
29940
+ this.G = 1694076839 | 0;
29941
+ this.H = 3204075428 | 0;
29942
+ }
29943
+ }
29944
+ exports.sha256 = (0, utils_ts_1.wrapConstructor)(() => new SHA256);
29945
+ exports.sha224 = (0, utils_ts_1.wrapConstructor)(() => new SHA224);
29946
+ });
29947
+
29948
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/_u64.js
29949
+ var require__u64 = __commonJS((exports) => {
29950
+ Object.defineProperty(exports, "__esModule", { value: true });
29951
+ 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;
29952
+ exports.fromBig = fromBig;
29953
+ exports.split = split;
29954
+ exports.add = add;
29955
+ var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
29956
+ var _32n = /* @__PURE__ */ BigInt(32);
29957
+ function fromBig(n, le = false) {
29958
+ if (le)
29959
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
29960
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
29961
+ }
29962
+ function split(lst, le = false) {
29963
+ let Ah = new Uint32Array(lst.length);
29964
+ let Al = new Uint32Array(lst.length);
29965
+ for (let i = 0;i < lst.length; i++) {
29966
+ const { h, l } = fromBig(lst[i], le);
29967
+ [Ah[i], Al[i]] = [h, l];
29968
+ }
29969
+ return [Ah, Al];
29970
+ }
29971
+ var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
29972
+ exports.toBig = toBig;
29973
+ var shrSH = (h, _l, s) => h >>> s;
29974
+ exports.shrSH = shrSH;
29975
+ var shrSL = (h, l, s) => h << 32 - s | l >>> s;
29976
+ exports.shrSL = shrSL;
29977
+ var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
29978
+ exports.rotrSH = rotrSH;
29979
+ var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
29980
+ exports.rotrSL = rotrSL;
29981
+ var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
29982
+ exports.rotrBH = rotrBH;
29983
+ var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
29984
+ exports.rotrBL = rotrBL;
29985
+ var rotr32H = (_h, l) => l;
29986
+ exports.rotr32H = rotr32H;
29987
+ var rotr32L = (h, _l) => h;
29988
+ exports.rotr32L = rotr32L;
29989
+ var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
29990
+ exports.rotlSH = rotlSH;
29991
+ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
29992
+ exports.rotlSL = rotlSL;
29993
+ var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
29994
+ exports.rotlBH = rotlBH;
29995
+ var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
29996
+ exports.rotlBL = rotlBL;
29997
+ function add(Ah, Al, Bh, Bl) {
29998
+ const l = (Al >>> 0) + (Bl >>> 0);
29999
+ return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
30000
+ }
30001
+ var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
30002
+ exports.add3L = add3L;
30003
+ var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
30004
+ exports.add3H = add3H;
30005
+ var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
30006
+ exports.add4L = add4L;
30007
+ var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
30008
+ exports.add4H = add4H;
30009
+ var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
30010
+ exports.add5L = add5L;
30011
+ var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
30012
+ exports.add5H = add5H;
30013
+ var u64 = {
30014
+ fromBig,
30015
+ split,
30016
+ toBig,
30017
+ shrSH,
30018
+ shrSL,
30019
+ rotrSH,
30020
+ rotrSL,
30021
+ rotrBH,
30022
+ rotrBL,
30023
+ rotr32H,
30024
+ rotr32L,
30025
+ rotlSH,
30026
+ rotlSL,
30027
+ rotlBH,
30028
+ rotlBL,
30029
+ add,
30030
+ add3L,
30031
+ add3H,
30032
+ add4L,
30033
+ add4H,
30034
+ add5H,
30035
+ add5L
30036
+ };
30037
+ exports.default = u64;
30038
+ });
30039
+
30040
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha512.js
30041
+ var require_sha512 = __commonJS((exports) => {
30042
+ Object.defineProperty(exports, "__esModule", { value: true });
30043
+ exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = undefined;
30044
+ var _md_ts_1 = require__md();
30045
+ var _u64_ts_1 = require__u64();
30046
+ var utils_ts_1 = require_utils7();
30047
+ var [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_ts_1.default.split([
29499
30048
  "0x428a2f98d728ae22",
29500
30049
  "0x7137449123ef65cd",
29501
30050
  "0xb5c0fbcfec4d3b2f",
@@ -29577,30 +30126,28 @@ var require_sha2 = __commonJS((exports) => {
29577
30126
  "0x5fcb6fab3ad6faec",
29578
30127
  "0x6c44198c4a475817"
29579
30128
  ].map((n) => BigInt(n))))();
29580
- var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
29581
- var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
29582
30129
  var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
29583
30130
  var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
29584
30131
 
29585
30132
  class SHA512 extends _md_ts_1.HashMD {
29586
30133
  constructor(outputLen = 64) {
29587
30134
  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;
30135
+ this.Ah = 1779033703 | 0;
30136
+ this.Al = 4089235720 | 0;
30137
+ this.Bh = 3144134277 | 0;
30138
+ this.Bl = 2227873595 | 0;
30139
+ this.Ch = 1013904242 | 0;
30140
+ this.Cl = 4271175723 | 0;
30141
+ this.Dh = 2773480762 | 0;
30142
+ this.Dl = 1595750129 | 0;
30143
+ this.Eh = 1359893119 | 0;
30144
+ this.El = 2917565137 | 0;
30145
+ this.Fh = 2600822924 | 0;
30146
+ this.Fl = 725511199 | 0;
30147
+ this.Gh = 528734635 | 0;
30148
+ this.Gl = 4215389547 | 0;
30149
+ this.Hh = 1541459225 | 0;
30150
+ this.Hl = 327033209 | 0;
29604
30151
  }
29605
30152
  get() {
29606
30153
  const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
@@ -29632,28 +30179,28 @@ var require_sha2 = __commonJS((exports) => {
29632
30179
  for (let i = 16;i < 80; i++) {
29633
30180
  const W15h = SHA512_W_H[i - 15] | 0;
29634
30181
  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);
30182
+ 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);
30183
+ 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
30184
  const W2h = SHA512_W_H[i - 2] | 0;
29638
30185
  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]);
30186
+ 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);
30187
+ 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);
30188
+ const SUMl = _u64_ts_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
30189
+ const SUMh = _u64_ts_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
29643
30190
  SHA512_W_H[i] = SUMh | 0;
29644
30191
  SHA512_W_L[i] = SUMl | 0;
29645
30192
  }
29646
30193
  let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
29647
30194
  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);
30195
+ 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);
30196
+ 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
30197
  const CHIh = Eh & Fh ^ ~Eh & Gh;
29651
30198
  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]);
30199
+ const T1ll = _u64_ts_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
30200
+ const T1h = _u64_ts_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
29654
30201
  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);
30202
+ 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);
30203
+ 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
30204
  const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
29658
30205
  const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
29659
30206
  Hh = Gh | 0;
@@ -29662,115 +30209,57 @@ var require_sha2 = __commonJS((exports) => {
29662
30209
  Gl = Fl | 0;
29663
30210
  Fh = Eh | 0;
29664
30211
  Fl = El | 0;
29665
- ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
30212
+ ({ h: Eh, l: El } = _u64_ts_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
29666
30213
  Dh = Ch | 0;
29667
30214
  Dl = Cl | 0;
29668
30215
  Ch = Bh | 0;
29669
30216
  Cl = Bl | 0;
29670
30217
  Bh = Ah | 0;
29671
30218
  Bl = Al | 0;
29672
- const All = u64.add3L(T1l, sigma0l, MAJl);
29673
- Ah = u64.add3H(All, T1h, sigma0h, MAJh);
30219
+ const All = _u64_ts_1.default.add3L(T1l, sigma0l, MAJl);
30220
+ Ah = _u64_ts_1.default.add3H(All, T1h, sigma0h, MAJh);
29674
30221
  Al = All | 0;
29675
30222
  }
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));
30223
+ ({ h: Ah, l: Al } = _u64_ts_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
30224
+ ({ h: Bh, l: Bl } = _u64_ts_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
30225
+ ({ h: Ch, l: Cl } = _u64_ts_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
30226
+ ({ h: Dh, l: Dl } = _u64_ts_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
30227
+ ({ h: Eh, l: El } = _u64_ts_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
30228
+ ({ h: Fh, l: Fl } = _u64_ts_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
30229
+ ({ h: Gh, l: Gl } = _u64_ts_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
30230
+ ({ h: Hh, l: Hl } = _u64_ts_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
29684
30231
  this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
29685
30232
  }
29686
30233
  roundClean() {
29687
- (0, utils_ts_1.clean)(SHA512_W_H, SHA512_W_L);
30234
+ SHA512_W_H.fill(0);
30235
+ SHA512_W_L.fill(0);
29688
30236
  }
29689
30237
  destroy() {
29690
- (0, utils_ts_1.clean)(this.buffer);
30238
+ this.buffer.fill(0);
29691
30239
  this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
29692
30240
  }
29693
30241
  }
29694
30242
  exports.SHA512 = SHA512;
29695
30243
 
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
30244
  class SHA512_224 extends SHA512 {
29756
30245
  constructor() {
29757
30246
  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;
30247
+ this.Ah = 2352822216 | 0;
30248
+ this.Al = 424955298 | 0;
30249
+ this.Bh = 1944164710 | 0;
30250
+ this.Bl = 2312950998 | 0;
30251
+ this.Ch = 502970286 | 0;
30252
+ this.Cl = 855612546 | 0;
30253
+ this.Dh = 1738396948 | 0;
30254
+ this.Dl = 1479516111 | 0;
30255
+ this.Eh = 258812777 | 0;
30256
+ this.El = 2077511080 | 0;
30257
+ this.Fh = 2011393907 | 0;
30258
+ this.Fl = 79989058 | 0;
30259
+ this.Gh = 1067287976 | 0;
30260
+ this.Gl = 1780299464 | 0;
30261
+ this.Hh = 286451373 | 0;
30262
+ this.Hl = 2446758561 | 0;
29774
30263
  }
29775
30264
  }
29776
30265
  exports.SHA512_224 = SHA512_224;
@@ -29778,31 +30267,78 @@ var require_sha2 = __commonJS((exports) => {
29778
30267
  class SHA512_256 extends SHA512 {
29779
30268
  constructor() {
29780
30269
  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;
30270
+ this.Ah = 573645204 | 0;
30271
+ this.Al = 4230739756 | 0;
30272
+ this.Bh = 2673172387 | 0;
30273
+ this.Bl = 3360449730 | 0;
30274
+ this.Ch = 596883563 | 0;
30275
+ this.Cl = 1867755857 | 0;
30276
+ this.Dh = 2520282905 | 0;
30277
+ this.Dl = 1497426621 | 0;
30278
+ this.Eh = 2519219938 | 0;
30279
+ this.El = 2827943907 | 0;
30280
+ this.Fh = 3193839141 | 0;
30281
+ this.Fl = 1401305490 | 0;
30282
+ this.Gh = 721525244 | 0;
30283
+ this.Gl = 746961066 | 0;
30284
+ this.Hh = 246885852 | 0;
30285
+ this.Hl = 2177182882 | 0;
29797
30286
  }
29798
30287
  }
29799
30288
  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);
30289
+
30290
+ class SHA384 extends SHA512 {
30291
+ constructor() {
30292
+ super(48);
30293
+ this.Ah = 3418070365 | 0;
30294
+ this.Al = 3238371032 | 0;
30295
+ this.Bh = 1654270250 | 0;
30296
+ this.Bl = 914150663 | 0;
30297
+ this.Ch = 2438529370 | 0;
30298
+ this.Cl = 812702999 | 0;
30299
+ this.Dh = 355462360 | 0;
30300
+ this.Dl = 4144912697 | 0;
30301
+ this.Eh = 1731405415 | 0;
30302
+ this.El = 4290775857 | 0;
30303
+ this.Fh = 2394180231 | 0;
30304
+ this.Fl = 1750603025 | 0;
30305
+ this.Gh = 3675008525 | 0;
30306
+ this.Gl = 1694076839 | 0;
30307
+ this.Hh = 1203062813 | 0;
30308
+ this.Hl = 3204075428 | 0;
30309
+ }
30310
+ }
30311
+ exports.SHA384 = SHA384;
30312
+ exports.sha512 = (0, utils_ts_1.wrapConstructor)(() => new SHA512);
30313
+ exports.sha512_224 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_224);
30314
+ exports.sha512_256 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_256);
30315
+ exports.sha384 = (0, utils_ts_1.wrapConstructor)(() => new SHA384);
30316
+ });
30317
+
30318
+ // ../../node_modules/eciesjs/node_modules/@noble/hashes/sha2.js
30319
+ var require_sha2 = __commonJS((exports) => {
30320
+ Object.defineProperty(exports, "__esModule", { value: true });
30321
+ exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.sha384 = exports.sha256 = exports.sha224 = undefined;
30322
+ var sha256_ts_1 = require_sha256();
30323
+ Object.defineProperty(exports, "sha224", { enumerable: true, get: function() {
30324
+ return sha256_ts_1.sha224;
30325
+ } });
30326
+ Object.defineProperty(exports, "sha256", { enumerable: true, get: function() {
30327
+ return sha256_ts_1.sha256;
30328
+ } });
30329
+ var sha512_ts_1 = require_sha512();
30330
+ Object.defineProperty(exports, "sha384", { enumerable: true, get: function() {
30331
+ return sha512_ts_1.sha384;
30332
+ } });
30333
+ Object.defineProperty(exports, "sha512", { enumerable: true, get: function() {
30334
+ return sha512_ts_1.sha512;
30335
+ } });
30336
+ Object.defineProperty(exports, "sha512_224", { enumerable: true, get: function() {
30337
+ return sha512_ts_1.sha512_224;
30338
+ } });
30339
+ Object.defineProperty(exports, "sha512_256", { enumerable: true, get: function() {
30340
+ return sha512_ts_1.sha512_256;
30341
+ } });
29806
30342
  });
29807
30343
 
29808
30344
  // ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/utils.js
@@ -30104,7 +30640,6 @@ var require_modular = __commonJS((exports) => {
30104
30640
  exports.getMinHashLength = getMinHashLength;
30105
30641
  exports.mapHashToField = mapHashToField;
30106
30642
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
30107
- var utils_1 = require_utils7();
30108
30643
  var utils_ts_1 = require_utils8();
30109
30644
  var _0n = BigInt(0);
30110
30645
  var _1n = BigInt(1);
@@ -30164,17 +30699,13 @@ var require_modular = __commonJS((exports) => {
30164
30699
  return mod(x, modulo);
30165
30700
  }
30166
30701
  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");
30702
+ const legendreC = (P - _1n) / _2n;
30703
+ let Q, S, Z;
30704
+ for (Q = P - _1n, S = 0;Q % _2n === _0n; Q /= _2n, S++)
30705
+ ;
30706
+ for (Z = _2n;Z < P && pow(Z, legendreC, P) !== P - _1n; Z++) {
30707
+ if (Z > 1000)
30708
+ throw new Error("Cannot find square root: likely non-prime P");
30178
30709
  }
30179
30710
  if (S === 1) {
30180
30711
  const p1div4 = (P + _1n) / _4n;
@@ -30187,7 +30718,7 @@ var require_modular = __commonJS((exports) => {
30187
30718
  }
30188
30719
  const Q1div2 = (Q + _1n) / _2n;
30189
30720
  return function tonelliSlow(Fp, n) {
30190
- if (!FpIsSquare(Fp, n))
30721
+ if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))
30191
30722
  throw new Error("Cannot find square root");
30192
30723
  let r = S;
30193
30724
  let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q);
@@ -30213,8 +30744,8 @@ var require_modular = __commonJS((exports) => {
30213
30744
  }
30214
30745
  function FpSqrt(P) {
30215
30746
  if (P % _4n === _3n) {
30747
+ const p1div4 = (P + _1n) / _4n;
30216
30748
  return function sqrt3mod4(Fp, n) {
30217
- const p1div4 = (P + _1n) / _4n;
30218
30749
  const root = Fp.pow(n, p1div4);
30219
30750
  if (!Fp.eql(Fp.sqr(root), n))
30220
30751
  throw new Error("Cannot find square root");
@@ -30222,9 +30753,9 @@ var require_modular = __commonJS((exports) => {
30222
30753
  };
30223
30754
  }
30224
30755
  if (P % _8n === _5n) {
30756
+ const c1 = (P - _5n) / _8n;
30225
30757
  return function sqrt5mod8(Fp, n) {
30226
30758
  const n2 = Fp.mul(n, _2n);
30227
- const c1 = (P - _5n) / _8n;
30228
30759
  const v = Fp.pow(n2, c1);
30229
30760
  const nv = Fp.mul(n, v);
30230
30761
  const i = Fp.mul(Fp.mul(nv, _2n), v);
@@ -30271,60 +30802,55 @@ var require_modular = __commonJS((exports) => {
30271
30802
  }, initial);
30272
30803
  return (0, utils_ts_1.validateObject)(field, opts);
30273
30804
  }
30274
- function FpPow(Fp, num, power) {
30805
+ function FpPow(f, num, power) {
30275
30806
  if (power < _0n)
30276
30807
  throw new Error("invalid exponent, negatives unsupported");
30277
30808
  if (power === _0n)
30278
- return Fp.ONE;
30809
+ return f.ONE;
30279
30810
  if (power === _1n)
30280
30811
  return num;
30281
- let p = Fp.ONE;
30812
+ let p = f.ONE;
30282
30813
  let d = num;
30283
30814
  while (power > _0n) {
30284
30815
  if (power & _1n)
30285
- p = Fp.mul(p, d);
30286
- d = Fp.sqr(d);
30816
+ p = f.mul(p, d);
30817
+ d = f.sqr(d);
30287
30818
  power >>= _1n;
30288
30819
  }
30289
30820
  return p;
30290
30821
  }
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))
30822
+ function FpInvertBatch(f, nums) {
30823
+ const tmp = new Array(nums.length);
30824
+ const lastMultiplied = nums.reduce((acc, num, i) => {
30825
+ if (f.is0(num))
30295
30826
  return acc;
30296
- inverted[i] = acc;
30297
- return Fp.mul(acc, num);
30298
- }, Fp.ONE);
30299
- const invertedAcc = Fp.inv(multipliedAcc);
30827
+ tmp[i] = acc;
30828
+ return f.mul(acc, num);
30829
+ }, f.ONE);
30830
+ const inverted = f.inv(lastMultiplied);
30300
30831
  nums.reduceRight((acc, num, i) => {
30301
- if (Fp.is0(num))
30832
+ if (f.is0(num))
30302
30833
  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;
30834
+ tmp[i] = f.mul(acc, tmp[i]);
30835
+ return f.mul(acc, num);
30836
+ }, inverted);
30837
+ return tmp;
30838
+ }
30839
+ function FpDiv(f, lhs, rhs) {
30840
+ return f.mul(lhs, typeof rhs === "bigint" ? invert(rhs, f.ORDER) : f.inv(rhs));
30841
+ }
30842
+ function FpLegendre(order) {
30843
+ const legendreConst = (order - _1n) / _2n;
30844
+ return (f, x) => f.pow(x, legendreConst);
30845
+ }
30846
+ function FpIsSquare(f) {
30847
+ const legendre = FpLegendre(f.ORDER);
30848
+ return (x) => {
30849
+ const p = legendre(f, x);
30850
+ return f.eql(p, f.ZERO) || f.eql(p, f.ONE);
30851
+ };
30324
30852
  }
30325
30853
  function nLength(n, nBitLength) {
30326
- if (nBitLength !== undefined)
30327
- (0, utils_1.anumber)(nBitLength);
30328
30854
  const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
30329
30855
  const nByteLength = Math.ceil(_nBitLength / 8);
30330
30856
  return { nBitLength: _nBitLength, nByteLength };
@@ -30370,14 +30896,14 @@ var require_modular = __commonJS((exports) => {
30370
30896
  sqrtP = FpSqrt(ORDER);
30371
30897
  return sqrtP(f, n);
30372
30898
  }),
30899
+ invertBatch: (lst) => FpInvertBatch(f, lst),
30900
+ cmov: (a, b, c) => c ? b : a,
30373
30901
  toBytes: (num) => isLE ? (0, utils_ts_1.numberToBytesLE)(num, BYTES) : (0, utils_ts_1.numberToBytesBE)(num, BYTES),
30374
30902
  fromBytes: (bytes) => {
30375
30903
  if (bytes.length !== BYTES)
30376
30904
  throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
30377
30905
  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
30906
+ }
30381
30907
  });
30382
30908
  return Object.freeze(f);
30383
30909
  }
@@ -30783,7 +31309,7 @@ var require_edwards = __commonJS((exports) => {
30783
31309
  return new Point(x, y, _1n, modP(x * y));
30784
31310
  }
30785
31311
  static normalizeZ(points) {
30786
- const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.ez));
31312
+ const toInv = Fp.invertBatch(points.map((p) => p.ez));
30787
31313
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
30788
31314
  }
30789
31315
  static msm(points, scalars) {
@@ -30951,7 +31477,7 @@ var require_edwards = __commonJS((exports) => {
30951
31477
  function getPublicKey(privKey) {
30952
31478
  return getExtendedPublicKey(privKey).pointBytes;
30953
31479
  }
30954
- function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
31480
+ function hashDomainToScalar(context = new Uint8Array, ...msgs) {
30955
31481
  const msg = (0, utils_ts_1.concatBytes)(...msgs);
30956
31482
  return modN_LE(cHash(domain(msg, (0, utils_ts_1.ensureBytes)("context", context), !!prehash)));
30957
31483
  }
@@ -31122,47 +31648,43 @@ var require_hash_to_curve = __commonJS((exports) => {
31122
31648
  return u;
31123
31649
  }
31124
31650
  function isogenyMap(field, map2) {
31125
- const coeff = map2.map((i) => Array.from(i).reverse());
31651
+ const COEFF = map2.map((i) => Array.from(i).reverse());
31126
31652
  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));
31653
+ const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
31654
+ if (field.is0(xDen) || field.is0(yDen))
31655
+ throw new Error("bad point: ZERO");
31656
+ x = field.div(xNum, xDen);
31657
+ y = field.mul(y, field.div(yNum, yDen));
31131
31658
  return { x, y };
31132
31659
  };
31133
31660
  }
31134
- function createHasher(Point, mapToCurve, defaults) {
31661
+ function createHasher(Point, mapToCurve, def) {
31135
31662
  if (typeof mapToCurve !== "function")
31136
31663
  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
31664
  return {
31148
- defaults,
31149
31665
  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));
31666
+ const u = hash_to_field(msg, 2, { ...def, DST: def.DST, ...options });
31667
+ const u0 = Point.fromAffine(mapToCurve(u[0]));
31668
+ const u1 = Point.fromAffine(mapToCurve(u[1]));
31669
+ const P = u0.add(u1).clearCofactor();
31670
+ P.assertValidity();
31671
+ return P;
31154
31672
  },
31155
31673
  encodeToCurve(msg, options) {
31156
- const u = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });
31157
- return clear(map2(u[0]));
31674
+ const u = hash_to_field(msg, 1, { ...def, DST: def.encodeDST, ...options });
31675
+ const P = Point.fromAffine(mapToCurve(u[0])).clearCofactor();
31676
+ P.assertValidity();
31677
+ return P;
31158
31678
  },
31159
31679
  mapToCurve(scalars) {
31160
31680
  if (!Array.isArray(scalars))
31161
- throw new Error("expected array of bigints");
31681
+ throw new Error("mapToCurve: expected array of bigints");
31162
31682
  for (const i of scalars)
31163
31683
  if (typeof i !== "bigint")
31164
- throw new Error("expected array of bigints");
31165
- return clear(map2(scalars));
31684
+ throw new Error("mapToCurve: expected array of bigints");
31685
+ const P = Point.fromAffine(mapToCurve(scalars)).clearCofactor();
31686
+ P.assertValidity();
31687
+ return P;
31166
31688
  }
31167
31689
  };
31168
31690
  }
@@ -31193,13 +31715,12 @@ var require_montgomery = __commonJS((exports) => {
31193
31715
  function montgomery(curveDef) {
31194
31716
  const CURVE = validateOpts(curveDef);
31195
31717
  const { P } = CURVE;
31196
- const Fp = (0, modular_ts_1.Field)(P);
31197
31718
  const modP = (n) => (0, modular_ts_1.mod)(n, P);
31198
31719
  const montgomeryBits = CURVE.montgomeryBits;
31199
31720
  const montgomeryBytes = Math.ceil(montgomeryBits / 8);
31200
31721
  const fieldLen = CURVE.nByteLength;
31201
31722
  const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);
31202
- const powPminus2 = CURVE.powPminus2 || ((x) => Fp.pow(x, P - BigInt(2)));
31723
+ const powPminus2 = CURVE.powPminus2 || ((x) => (0, modular_ts_1.pow)(x, P - BigInt(2), P));
31203
31724
  function cswap(swap, x_2, x_3) {
31204
31725
  const dummy = modP(swap * (x_2 - x_3));
31205
31726
  x_2 = modP(x_2 - dummy);
@@ -31297,7 +31818,7 @@ var require_montgomery = __commonJS((exports) => {
31297
31818
  // ../../node_modules/eciesjs/node_modules/@noble/curves/ed25519.js
31298
31819
  var require_ed25519 = __commonJS((exports) => {
31299
31820
  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;
31821
+ 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
31822
  exports.edwardsToMontgomeryPub = edwardsToMontgomeryPub;
31302
31823
  exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
31303
31824
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -31482,10 +32003,10 @@ var require_ed25519 = __commonJS((exports) => {
31482
32003
  xd = Fp.cmov(xd, Fp.ONE, e3);
31483
32004
  yn = Fp.cmov(yn, Fp.ONE, e3);
31484
32005
  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) };
32006
+ const inv = Fp.invertBatch([xd, yd]);
32007
+ return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) };
31487
32008
  }
31488
- exports.ed25519_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
32009
+ var htf = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
31489
32010
  DST: "edwards25519_XMD:SHA-512_ELL2_RO_",
31490
32011
  encodeDST: "edwards25519_XMD:SHA-512_ELL2_NU_",
31491
32012
  p: Fp.ORDER,
@@ -31494,8 +32015,8 @@ var require_ed25519 = __commonJS((exports) => {
31494
32015
  expand: "xmd",
31495
32016
  hash: sha2_1.sha512
31496
32017
  }))();
31497
- exports.hashToCurve = (() => exports.ed25519_hasher.hashToCurve)();
31498
- exports.encodeToCurve = (() => exports.ed25519_hasher.encodeToCurve)();
32018
+ exports.hashToCurve = (() => htf.hashToCurve)();
32019
+ exports.encodeToCurve = (() => htf.encodeToCurve)();
31499
32020
  function aristp(other) {
31500
32021
  if (!(other instanceof RistPoint))
31501
32022
  throw new Error("RistrettoPoint expected");
@@ -31665,6 +32186,7 @@ var require_ed25519 = __commonJS((exports) => {
31665
32186
  var require_hmac = __commonJS((exports) => {
31666
32187
  Object.defineProperty(exports, "__esModule", { value: true });
31667
32188
  exports.hmac = exports.HMAC = undefined;
32189
+ var _assert_ts_1 = require__assert();
31668
32190
  var utils_ts_1 = require_utils7();
31669
32191
 
31670
32192
  class HMAC extends utils_ts_1.Hash {
@@ -31672,7 +32194,7 @@ var require_hmac = __commonJS((exports) => {
31672
32194
  super();
31673
32195
  this.finished = false;
31674
32196
  this.destroyed = false;
31675
- (0, utils_ts_1.ahash)(hash);
32197
+ (0, _assert_ts_1.ahash)(hash);
31676
32198
  const key = (0, utils_ts_1.toBytes)(_key);
31677
32199
  this.iHash = hash.create();
31678
32200
  if (typeof this.iHash.update !== "function")
@@ -31689,16 +32211,16 @@ var require_hmac = __commonJS((exports) => {
31689
32211
  for (let i = 0;i < pad.length; i++)
31690
32212
  pad[i] ^= 54 ^ 92;
31691
32213
  this.oHash.update(pad);
31692
- (0, utils_ts_1.clean)(pad);
32214
+ pad.fill(0);
31693
32215
  }
31694
32216
  update(buf) {
31695
- (0, utils_ts_1.aexists)(this);
32217
+ (0, _assert_ts_1.aexists)(this);
31696
32218
  this.iHash.update(buf);
31697
32219
  return this;
31698
32220
  }
31699
32221
  digestInto(out) {
31700
- (0, utils_ts_1.aexists)(this);
31701
- (0, utils_ts_1.abytes)(out, this.outputLen);
32222
+ (0, _assert_ts_1.aexists)(this);
32223
+ (0, _assert_ts_1.abytes)(out, this.outputLen);
31702
32224
  this.finished = true;
31703
32225
  this.iHash.digestInto(out);
31704
32226
  this.oHash.update(out);
@@ -31722,9 +32244,6 @@ var require_hmac = __commonJS((exports) => {
31722
32244
  to.iHash = iHash._cloneInto(to.iHash);
31723
32245
  return to;
31724
32246
  }
31725
- clone() {
31726
- return this._cloneInto();
31727
- }
31728
32247
  destroy() {
31729
32248
  this.destroyed = true;
31730
32249
  this.oHash.destroy();
@@ -31972,7 +32491,7 @@ var require_weierstrass = __commonJS((exports) => {
31972
32491
  constructor(px, py, pz) {
31973
32492
  if (px == null || !Fp.isValid(px))
31974
32493
  throw new Error("x required");
31975
- if (py == null || !Fp.isValid(py) || Fp.is0(py))
32494
+ if (py == null || !Fp.isValid(py))
31976
32495
  throw new Error("y required");
31977
32496
  if (pz == null || !Fp.isValid(pz))
31978
32497
  throw new Error("z required");
@@ -31999,7 +32518,7 @@ var require_weierstrass = __commonJS((exports) => {
31999
32518
  return this.toAffine().y;
32000
32519
  }
32001
32520
  static normalizeZ(points) {
32002
- const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.pz));
32521
+ const toInv = Fp.invertBatch(points.map((p) => p.pz));
32003
32522
  return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
32004
32523
  }
32005
32524
  static fromHex(hex) {
@@ -32360,7 +32879,7 @@ var require_weierstrass = __commonJS((exports) => {
32360
32879
  return (0, utils_ts_1.hexToBytes)(this.toDERHex());
32361
32880
  }
32362
32881
  toDERHex() {
32363
- return exports.DER.hexFromSig(this);
32882
+ return exports.DER.hexFromSig({ r: this.r, s: this.s });
32364
32883
  }
32365
32884
  toCompactRawBytes() {
32366
32885
  return (0, utils_ts_1.hexToBytes)(this.toCompactHex());
@@ -32635,8 +33154,7 @@ var require_weierstrass = __commonJS((exports) => {
32635
33154
  y = Fp.cmov(y, value, isValid2);
32636
33155
  const e1 = Fp.isOdd(u) === Fp.isOdd(y);
32637
33156
  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);
33157
+ x = Fp.div(x, tv4);
32640
33158
  return { x, y };
32641
33159
  };
32642
33160
  }
@@ -32667,7 +33185,7 @@ var require__shortw_utils = __commonJS((exports) => {
32667
33185
  // ../../node_modules/eciesjs/node_modules/@noble/curves/secp256k1.js
32668
33186
  var require_secp256k1 = __commonJS((exports) => {
32669
33187
  Object.defineProperty(exports, "__esModule", { value: true });
32670
- exports.encodeToCurve = exports.hashToCurve = exports.secp256k1_hasher = exports.schnorr = exports.secp256k1 = undefined;
33188
+ exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = undefined;
32671
33189
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
32672
33190
  var sha2_1 = require_sha2();
32673
33191
  var utils_1 = require_utils7();
@@ -32863,7 +33381,7 @@ var require_secp256k1 = __commonJS((exports) => {
32863
33381
  B: BigInt("1771"),
32864
33382
  Z: Fpk1.create(BigInt("-11"))
32865
33383
  }))();
32866
- exports.secp256k1_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
33384
+ var htf = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
32867
33385
  const { x, y } = mapSWU(Fpk1.create(scalars[0]));
32868
33386
  return isoMap(x, y);
32869
33387
  }, {
@@ -32875,8 +33393,8 @@ var require_secp256k1 = __commonJS((exports) => {
32875
33393
  expand: "xmd",
32876
33394
  hash: sha2_1.sha256
32877
33395
  }))();
32878
- exports.hashToCurve = (() => exports.secp256k1_hasher.hashToCurve)();
32879
- exports.encodeToCurve = (() => exports.secp256k1_hasher.encodeToCurve)();
33396
+ exports.hashToCurve = (() => htf.hashToCurve)();
33397
+ exports.encodeToCurve = (() => htf.encodeToCurve)();
32880
33398
  });
32881
33399
 
32882
33400
  // ../../node_modules/eciesjs/dist/utils/hex.js
@@ -32996,55 +33514,45 @@ var require_hkdf = __commonJS((exports) => {
32996
33514
  exports.hkdf = undefined;
32997
33515
  exports.extract = extract;
32998
33516
  exports.expand = expand;
33517
+ var _assert_ts_1 = require__assert();
32999
33518
  var hmac_ts_1 = require_hmac();
33000
33519
  var utils_ts_1 = require_utils7();
33001
33520
  function extract(hash, ikm, salt) {
33002
- (0, utils_ts_1.ahash)(hash);
33521
+ (0, _assert_ts_1.ahash)(hash);
33003
33522
  if (salt === undefined)
33004
33523
  salt = new Uint8Array(hash.outputLen);
33005
33524
  return (0, hmac_ts_1.hmac)(hash, (0, utils_ts_1.toBytes)(salt), (0, utils_ts_1.toBytes)(ikm));
33006
33525
  }
33007
- var HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
33008
- var EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
33526
+ var HKDF_COUNTER = /* @__PURE__ */ new Uint8Array([0]);
33527
+ var EMPTY_BUFFER = /* @__PURE__ */ new Uint8Array;
33009
33528
  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)
33529
+ (0, _assert_ts_1.ahash)(hash);
33530
+ (0, _assert_ts_1.anumber)(length);
33531
+ if (length > 255 * hash.outputLen)
33014
33532
  throw new Error("Length should be <= 255*HashLen");
33015
- const blocks = Math.ceil(length / olen);
33533
+ const blocks = Math.ceil(length / hash.outputLen);
33016
33534
  if (info === undefined)
33017
33535
  info = EMPTY_BUFFER;
33018
- const okm = new Uint8Array(blocks * olen);
33536
+ const okm = new Uint8Array(blocks * hash.outputLen);
33019
33537
  const HMAC = hmac_ts_1.hmac.create(hash, prk);
33020
33538
  const HMACTmp = HMAC._cloneInto();
33021
33539
  const T = new Uint8Array(HMAC.outputLen);
33022
33540
  for (let counter = 0;counter < blocks; counter++) {
33023
33541
  HKDF_COUNTER[0] = counter + 1;
33024
33542
  HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T).update(info).update(HKDF_COUNTER).digestInto(T);
33025
- okm.set(T, olen * counter);
33543
+ okm.set(T, hash.outputLen * counter);
33026
33544
  HMAC._cloneInto(HMACTmp);
33027
33545
  }
33028
33546
  HMAC.destroy();
33029
33547
  HMACTmp.destroy();
33030
- (0, utils_ts_1.clean)(T, HKDF_COUNTER);
33548
+ T.fill(0);
33549
+ HKDF_COUNTER.fill(0);
33031
33550
  return okm.slice(0, length);
33032
33551
  }
33033
33552
  var hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
33034
33553
  exports.hkdf = hkdf;
33035
33554
  });
33036
33555
 
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
33556
  // ../../node_modules/eciesjs/dist/utils/hash.js
33049
33557
  var require_hash = __commonJS((exports) => {
33050
33558
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -35351,15 +35859,15 @@ var require_main3 = __commonJS((exports, module) => {
35351
35859
  lastError = error;
35352
35860
  if (error.code === "MISSING_ENV_FILE") {
35353
35861
  if (!options.convention) {
35354
- console.error(error.message);
35862
+ logger.error(error.message);
35355
35863
  if (error.help) {
35356
- console.error(error.help);
35864
+ logger.error(error.help);
35357
35865
  }
35358
35866
  }
35359
35867
  } else {
35360
- console.error(error.message);
35868
+ logger.error(error.message);
35361
35869
  if (error.help) {
35362
- console.error(error.help);
35870
+ logger.error(error.help);
35363
35871
  }
35364
35872
  }
35365
35873
  }
@@ -35404,9 +35912,9 @@ var require_main3 = __commonJS((exports, module) => {
35404
35912
  const overload = options.overload || options.override;
35405
35913
  const { parsed, errors: errors2 } = new Parse(src, privateKey, processEnv, overload).run();
35406
35914
  for (const error of errors2) {
35407
- console.error(error.message);
35915
+ logger.error(error.message);
35408
35916
  if (error.help) {
35409
- console.error(error.help);
35917
+ logger.error(error.help);
35410
35918
  }
35411
35919
  }
35412
35920
  return parsed;
@@ -35477,9 +35985,9 @@ var require_main3 = __commonJS((exports, module) => {
35477
35985
  }
35478
35986
  if (options.strict)
35479
35987
  throw error;
35480
- console.error(error.message);
35988
+ logger.error(error.message);
35481
35989
  if (error.help) {
35482
- console.error(error.help);
35990
+ logger.error(error.help);
35483
35991
  }
35484
35992
  }
35485
35993
  if (key) {
@@ -49797,13 +50305,14 @@ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_
49797
50305
  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
50306
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
49799
50307
  function timeRegexSource(args) {
49800
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
50308
+ let secondsRegexSource = `[0-5]\\d`;
49801
50309
  if (args.precision) {
49802
- regex = `${regex}\\.\\d{${args.precision}}`;
50310
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
49803
50311
  } else if (args.precision == null) {
49804
- regex = `${regex}(\\.\\d+)?`;
50312
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
49805
50313
  }
49806
- return regex;
50314
+ const secondsQuantifier = args.precision ? "+" : "?";
50315
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
49807
50316
  }
49808
50317
  function timeRegex(args) {
49809
50318
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -52956,18 +53465,20 @@ var z = /* @__PURE__ */ Object.freeze({
52956
53465
  });
52957
53466
 
52958
53467
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
52959
- var LATEST_PROTOCOL_VERSION = "2024-11-05";
53468
+ var LATEST_PROTOCOL_VERSION = "2025-03-26";
52960
53469
  var SUPPORTED_PROTOCOL_VERSIONS = [
52961
53470
  LATEST_PROTOCOL_VERSION,
53471
+ "2024-11-05",
52962
53472
  "2024-10-07"
52963
53473
  ];
52964
53474
  var JSONRPC_VERSION = "2.0";
52965
53475
  var ProgressTokenSchema = z.union([z.string(), z.number().int()]);
52966
53476
  var CursorSchema = z.string();
53477
+ var RequestMetaSchema = z.object({
53478
+ progressToken: z.optional(ProgressTokenSchema)
53479
+ }).passthrough();
52967
53480
  var BaseRequestParamsSchema = z.object({
52968
- _meta: z.optional(z.object({
52969
- progressToken: z.optional(ProgressTokenSchema)
52970
- }).passthrough())
53481
+ _meta: z.optional(RequestMetaSchema)
52971
53482
  }).passthrough();
52972
53483
  var RequestSchema = z.object({
52973
53484
  method: z.string(),
@@ -53218,13 +53729,21 @@ var GetPromptResultSchema = ResultSchema.extend({
53218
53729
  var PromptListChangedNotificationSchema = NotificationSchema.extend({
53219
53730
  method: z.literal("notifications/prompts/list_changed")
53220
53731
  });
53732
+ var ToolAnnotationsSchema = z.object({
53733
+ title: z.optional(z.string()),
53734
+ readOnlyHint: z.optional(z.boolean()),
53735
+ destructiveHint: z.optional(z.boolean()),
53736
+ idempotentHint: z.optional(z.boolean()),
53737
+ openWorldHint: z.optional(z.boolean())
53738
+ }).passthrough();
53221
53739
  var ToolSchema = z.object({
53222
53740
  name: z.string(),
53223
53741
  description: z.optional(z.string()),
53224
53742
  inputSchema: z.object({
53225
53743
  type: z.literal("object"),
53226
53744
  properties: z.optional(z.object({}).passthrough())
53227
- }).passthrough()
53745
+ }).passthrough(),
53746
+ annotations: z.optional(ToolAnnotationsSchema)
53228
53747
  }).passthrough();
53229
53748
  var ListToolsRequestSchema = PaginatedRequestSchema.extend({
53230
53749
  method: z.literal("tools/list")
@@ -53507,7 +54026,7 @@ class Protocol {
53507
54026
  Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
53508
54027
  }
53509
54028
  _onrequest(request, extra) {
53510
- var _a, _b, _c;
54029
+ var _a, _b, _c, _d;
53511
54030
  const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== undefined ? _a : this.fallbackRequestHandler;
53512
54031
  if (handler === undefined) {
53513
54032
  (_b = this._transport) === null || _b === undefined || _b.send({
@@ -53525,9 +54044,11 @@ class Protocol {
53525
54044
  const fullExtra = {
53526
54045
  signal: abortController.signal,
53527
54046
  sessionId: (_c = this._transport) === null || _c === undefined ? undefined : _c.sessionId,
54047
+ _meta: (_d = request.params) === null || _d === undefined ? undefined : _d._meta,
53528
54048
  sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
53529
54049
  sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
53530
- authInfo: extra === null || extra === undefined ? undefined : extra.authInfo
54050
+ authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
54051
+ requestId: request.id
53531
54052
  };
53532
54053
  Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
53533
54054
  var _a2;
@@ -55157,7 +55678,8 @@ class McpServer {
55157
55678
  description: tool.description,
55158
55679
  inputSchema: tool.inputSchema ? zodToJsonSchema(tool.inputSchema, {
55159
55680
  strictUnions: true
55160
- }) : EMPTY_OBJECT_JSON_SCHEMA
55681
+ }) : EMPTY_OBJECT_JSON_SCHEMA,
55682
+ annotations: tool.annotations
55161
55683
  };
55162
55684
  })
55163
55685
  }));
@@ -55442,18 +55964,33 @@ class McpServer {
55442
55964
  if (this._registeredTools[name]) {
55443
55965
  throw new Error(`Tool ${name} is already registered`);
55444
55966
  }
55967
+ const isZodRawShape = (obj) => {
55968
+ if (typeof obj !== "object" || obj === null)
55969
+ return false;
55970
+ return Object.values(obj).some((v) => v instanceof ZodType);
55971
+ };
55445
55972
  let description;
55446
55973
  if (typeof rest[0] === "string") {
55447
55974
  description = rest.shift();
55448
55975
  }
55449
55976
  let paramsSchema;
55977
+ let annotations;
55450
55978
  if (rest.length > 1) {
55451
- paramsSchema = rest.shift();
55979
+ const firstArg = rest[0];
55980
+ if (isZodRawShape(firstArg)) {
55981
+ paramsSchema = rest.shift();
55982
+ if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShape(rest[0])) {
55983
+ annotations = rest.shift();
55984
+ }
55985
+ } else if (typeof firstArg === "object" && firstArg !== null) {
55986
+ annotations = rest.shift();
55987
+ }
55452
55988
  }
55453
55989
  const cb = rest[0];
55454
55990
  const registeredTool = {
55455
55991
  description,
55456
55992
  inputSchema: paramsSchema === undefined ? undefined : z.object(paramsSchema),
55993
+ annotations,
55457
55994
  callback: cb,
55458
55995
  enabled: true,
55459
55996
  disable: () => registeredTool.update({ enabled: false }),
@@ -55471,6 +56008,8 @@ class McpServer {
55471
56008
  registeredTool.inputSchema = z.object(updates.paramsSchema);
55472
56009
  if (typeof updates.callback !== "undefined")
55473
56010
  registeredTool.callback = updates.callback;
56011
+ if (typeof updates.annotations !== "undefined")
56012
+ registeredTool.annotations = updates.annotations;
55474
56013
  if (typeof updates.enabled !== "undefined")
55475
56014
  registeredTool.enabled = updates.enabled;
55476
56015
  this.sendToolListChanged();
@@ -61234,7 +61773,7 @@ var {
61234
61773
  var package_default = {
61235
61774
  name: "@settlemint/sdk-mcp",
61236
61775
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
61237
- version: "2.2.2-prdc5c6b48",
61776
+ version: "2.2.2-prdc6e1d84",
61238
61777
  type: "module",
61239
61778
  private: false,
61240
61779
  license: "FSL-1.1-MIT",
@@ -61275,12 +61814,12 @@ var package_default = {
61275
61814
  dependencies: {
61276
61815
  "@graphql-tools/load": "8.1.0",
61277
61816
  "@graphql-tools/url-loader": "8.0.31",
61278
- "@modelcontextprotocol/sdk": "1.10.2",
61279
- "@settlemint/sdk-js": "2.2.2-prdc5c6b48",
61280
- "@settlemint/sdk-utils": "2.2.2-prdc5c6b48",
61817
+ "@modelcontextprotocol/sdk": "1.11.0",
61818
+ "@settlemint/sdk-js": "2.2.2-prdc6e1d84",
61819
+ "@settlemint/sdk-utils": "2.2.2-prdc6e1d84",
61281
61820
  "@commander-js/extra-typings": "11.1.0",
61282
61821
  commander: "11.1.0",
61283
- zod: "3.24.3"
61822
+ zod: "3.24.4"
61284
61823
  },
61285
61824
  devDependencies: {},
61286
61825
  peerDependencies: {},
@@ -67025,4 +67564,4 @@ await main().catch((error2) => {
67025
67564
  process.exit(1);
67026
67565
  });
67027
67566
 
67028
- //# debugId=EE075A5B25FEA07964756E2164756E21
67567
+ //# debugId=898242E64901CBDF64756E2164756E21