@ssv-labs/ssv-sdk 0.0.4 → 0.0.7

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.
package/dist/main.js CHANGED
@@ -1,170 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const config$2 = require("./config-DPI30L0i.js");
3
+ const globals = require("./globals-DCoa7oI7.js");
4
4
  const viem = require("viem");
5
5
  const ssvKeys$2 = require("ssv-keys");
6
- function getDefaultExportFromCjs$1(x) {
7
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
8
- }
9
- var browser$e = { exports: {} };
10
- var process = browser$e.exports = {};
11
- var cachedSetTimeout;
12
- var cachedClearTimeout;
13
- function defaultSetTimout() {
14
- throw new Error("setTimeout has not been defined");
15
- }
16
- function defaultClearTimeout() {
17
- throw new Error("clearTimeout has not been defined");
18
- }
19
- (function() {
20
- try {
21
- if (typeof setTimeout === "function") {
22
- cachedSetTimeout = setTimeout;
23
- } else {
24
- cachedSetTimeout = defaultSetTimout;
25
- }
26
- } catch (e) {
27
- cachedSetTimeout = defaultSetTimout;
28
- }
29
- try {
30
- if (typeof clearTimeout === "function") {
31
- cachedClearTimeout = clearTimeout;
32
- } else {
33
- cachedClearTimeout = defaultClearTimeout;
34
- }
35
- } catch (e) {
36
- cachedClearTimeout = defaultClearTimeout;
37
- }
38
- })();
39
- function runTimeout(fun) {
40
- if (cachedSetTimeout === setTimeout) {
41
- return setTimeout(fun, 0);
42
- }
43
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
44
- cachedSetTimeout = setTimeout;
45
- return setTimeout(fun, 0);
46
- }
47
- try {
48
- return cachedSetTimeout(fun, 0);
49
- } catch (e) {
50
- try {
51
- return cachedSetTimeout.call(null, fun, 0);
52
- } catch (e2) {
53
- return cachedSetTimeout.call(this, fun, 0);
54
- }
55
- }
56
- }
57
- function runClearTimeout(marker) {
58
- if (cachedClearTimeout === clearTimeout) {
59
- return clearTimeout(marker);
60
- }
61
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
62
- cachedClearTimeout = clearTimeout;
63
- return clearTimeout(marker);
64
- }
65
- try {
66
- return cachedClearTimeout(marker);
67
- } catch (e) {
68
- try {
69
- return cachedClearTimeout.call(null, marker);
70
- } catch (e2) {
71
- return cachedClearTimeout.call(this, marker);
72
- }
73
- }
74
- }
75
- var queue = [];
76
- var draining = false;
77
- var currentQueue;
78
- var queueIndex = -1;
79
- function cleanUpNextTick() {
80
- if (!draining || !currentQueue) {
81
- return;
82
- }
83
- draining = false;
84
- if (currentQueue.length) {
85
- queue = currentQueue.concat(queue);
86
- } else {
87
- queueIndex = -1;
88
- }
89
- if (queue.length) {
90
- drainQueue();
91
- }
92
- }
93
- function drainQueue() {
94
- if (draining) {
95
- return;
96
- }
97
- var timeout = runTimeout(cleanUpNextTick);
98
- draining = true;
99
- var len = queue.length;
100
- while (len) {
101
- currentQueue = queue;
102
- queue = [];
103
- while (++queueIndex < len) {
104
- if (currentQueue) {
105
- currentQueue[queueIndex].run();
106
- }
107
- }
108
- queueIndex = -1;
109
- len = queue.length;
110
- }
111
- currentQueue = null;
112
- draining = false;
113
- runClearTimeout(timeout);
114
- }
115
- process.nextTick = function(fun) {
116
- var args = new Array(arguments.length - 1);
117
- if (arguments.length > 1) {
118
- for (var i = 1; i < arguments.length; i++) {
119
- args[i - 1] = arguments[i];
120
- }
121
- }
122
- queue.push(new Item(fun, args));
123
- if (queue.length === 1 && !draining) {
124
- runTimeout(drainQueue);
125
- }
126
- };
127
- function Item(fun, array) {
128
- this.fun = fun;
129
- this.array = array;
130
- }
131
- Item.prototype.run = function() {
132
- this.fun.apply(null, this.array);
133
- };
134
- process.title = "browser";
135
- process.browser = true;
136
- process.env = {};
137
- process.argv = [];
138
- process.version = "";
139
- process.versions = {};
140
- function noop$2() {
141
- }
142
- process.on = noop$2;
143
- process.addListener = noop$2;
144
- process.once = noop$2;
145
- process.off = noop$2;
146
- process.removeListener = noop$2;
147
- process.removeAllListeners = noop$2;
148
- process.emit = noop$2;
149
- process.prependListener = noop$2;
150
- process.prependOnceListener = noop$2;
151
- process.listeners = function(name2) {
152
- return [];
153
- };
154
- process.binding = function(name2) {
155
- throw new Error("process.binding is not supported");
156
- };
157
- process.cwd = function() {
158
- return "/";
159
- };
160
- process.chdir = function(dir) {
161
- throw new Error("process.chdir is not supported");
162
- };
163
- process.umask = function() {
164
- return 0;
165
- };
166
- var browserExports$1 = browser$e.exports;
167
- const process$1 = /* @__PURE__ */ getDefaultExportFromCjs$1(browserExports$1);
168
6
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
169
7
  function getDefaultExportFromCjs(x) {
170
8
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -1729,9 +1567,9 @@ var dist = {};
1729
1567
  }
1730
1568
  E(
1731
1569
  "ERR_BUFFER_OUT_OF_BOUNDS",
1732
- function(name2) {
1733
- if (name2) {
1734
- return `${name2} is outside of buffer bounds`;
1570
+ function(name) {
1571
+ if (name) {
1572
+ return `${name} is outside of buffer bounds`;
1735
1573
  }
1736
1574
  return "Attempt to access memory outside buffer bounds";
1737
1575
  },
@@ -1739,8 +1577,8 @@ var dist = {};
1739
1577
  );
1740
1578
  E(
1741
1579
  "ERR_INVALID_ARG_TYPE",
1742
- function(name2, actual) {
1743
- return `The "${name2}" argument must be of type number. Received type ${typeof actual}`;
1580
+ function(name, actual) {
1581
+ return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1744
1582
  },
1745
1583
  TypeError
1746
1584
  );
@@ -1793,9 +1631,9 @@ var dist = {};
1793
1631
  }
1794
1632
  checkBounds(buf, offset, byteLength3);
1795
1633
  }
1796
- function validateNumber(value, name2) {
1634
+ function validateNumber(value, name) {
1797
1635
  if (typeof value !== "number") {
1798
- throw new errors.ERR_INVALID_ARG_TYPE(name2, "number", value);
1636
+ throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
1799
1637
  }
1800
1638
  }
1801
1639
  function boundsError(value, length, type2) {
@@ -1958,7 +1796,7 @@ var dist = {};
1958
1796
  exports2.transcode = buffer2.transcode;
1959
1797
  })(dist);
1960
1798
  const Buffer$C = /* @__PURE__ */ getDefaultExportFromCjs(dist);
1961
- var main$2 = { exports: {} };
1799
+ var main = { exports: {} };
1962
1800
  var empty = null;
1963
1801
  var empty_1 = empty;
1964
1802
  function assertPath(path3) {
@@ -2052,7 +1890,7 @@ var posix = {
2052
1890
  path3 = arguments[i];
2053
1891
  else {
2054
1892
  if (cwd === void 0)
2055
- cwd = process$1.cwd();
1893
+ cwd = globals.process$1.cwd();
2056
1894
  path3 = cwd;
2057
1895
  }
2058
1896
  assertPath(path3);
@@ -2361,57 +2199,57 @@ var posix = {
2361
2199
  };
2362
2200
  posix.posix = posix;
2363
2201
  var pathBrowserify = posix;
2364
- var browser$d = {};
2365
- browser$d.endianness = function() {
2202
+ var browser$c = {};
2203
+ browser$c.endianness = function() {
2366
2204
  return "LE";
2367
2205
  };
2368
- browser$d.hostname = function() {
2206
+ browser$c.hostname = function() {
2369
2207
  if (typeof location !== "undefined") {
2370
2208
  return location.hostname;
2371
2209
  } else return "";
2372
2210
  };
2373
- browser$d.loadavg = function() {
2211
+ browser$c.loadavg = function() {
2374
2212
  return [];
2375
2213
  };
2376
- browser$d.uptime = function() {
2214
+ browser$c.uptime = function() {
2377
2215
  return 0;
2378
2216
  };
2379
- browser$d.freemem = function() {
2217
+ browser$c.freemem = function() {
2380
2218
  return Number.MAX_VALUE;
2381
2219
  };
2382
- browser$d.totalmem = function() {
2220
+ browser$c.totalmem = function() {
2383
2221
  return Number.MAX_VALUE;
2384
2222
  };
2385
- browser$d.cpus = function() {
2223
+ browser$c.cpus = function() {
2386
2224
  return [];
2387
2225
  };
2388
- browser$d.type = function() {
2226
+ browser$c.type = function() {
2389
2227
  return "Browser";
2390
2228
  };
2391
- browser$d.release = function() {
2229
+ browser$c.release = function() {
2392
2230
  if (typeof navigator !== "undefined") {
2393
2231
  return navigator.appVersion;
2394
2232
  }
2395
2233
  return "";
2396
2234
  };
2397
- browser$d.networkInterfaces = browser$d.getNetworkInterfaces = function() {
2235
+ browser$c.networkInterfaces = browser$c.getNetworkInterfaces = function() {
2398
2236
  return {};
2399
2237
  };
2400
- browser$d.arch = function() {
2238
+ browser$c.arch = function() {
2401
2239
  return "javascript";
2402
2240
  };
2403
- browser$d.platform = function() {
2241
+ browser$c.platform = function() {
2404
2242
  return "browser";
2405
2243
  };
2406
- browser$d.tmpdir = browser$d.tmpDir = function() {
2244
+ browser$c.tmpdir = browser$c.tmpDir = function() {
2407
2245
  return "/tmp";
2408
2246
  };
2409
- browser$d.EOL = "\n";
2410
- browser$d.homedir = function() {
2247
+ browser$c.EOL = "\n";
2248
+ browser$c.homedir = function() {
2411
2249
  return "/";
2412
2250
  };
2413
2251
  var cryptoBrowserify = {};
2414
- var browser$c = { exports: {} };
2252
+ var browser$b = { exports: {} };
2415
2253
  var safeBuffer$2 = { exports: {} };
2416
2254
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2417
2255
  (function(module2, exports2) {
@@ -2477,9 +2315,9 @@ function oldBrowser$1() {
2477
2315
  var Buffer$B = safeBufferExports$1.Buffer;
2478
2316
  var crypto$2 = commonjsGlobal.crypto || commonjsGlobal.msCrypto;
2479
2317
  if (crypto$2 && crypto$2.getRandomValues) {
2480
- browser$c.exports = randomBytes$2;
2318
+ browser$b.exports = randomBytes$2;
2481
2319
  } else {
2482
- browser$c.exports = oldBrowser$1;
2320
+ browser$b.exports = oldBrowser$1;
2483
2321
  }
2484
2322
  function randomBytes$2(size, cb) {
2485
2323
  if (size > MAX_UINT32) throw new RangeError("requested too many random bytes");
@@ -2494,13 +2332,13 @@ function randomBytes$2(size, cb) {
2494
2332
  }
2495
2333
  }
2496
2334
  if (typeof cb === "function") {
2497
- return process$1.nextTick(function() {
2335
+ return globals.process$1.nextTick(function() {
2498
2336
  cb(null, bytes);
2499
2337
  });
2500
2338
  }
2501
2339
  return bytes;
2502
2340
  }
2503
- var browserExports = browser$c.exports;
2341
+ var browserExports = browser$b.exports;
2504
2342
  var inherits_browser = { exports: {} };
2505
2343
  if (typeof Object.create === "function") {
2506
2344
  inherits_browser.exports = function inherits2(ctor, superCtor) {
@@ -2851,10 +2689,10 @@ function unwrapListeners(arr) {
2851
2689
  }
2852
2690
  return ret;
2853
2691
  }
2854
- function once$2(emitter, name2) {
2692
+ function once$2(emitter, name) {
2855
2693
  return new Promise(function(resolve2, reject) {
2856
2694
  function errorListener(err) {
2857
- emitter.removeListener(name2, resolver);
2695
+ emitter.removeListener(name, resolver);
2858
2696
  reject(err);
2859
2697
  }
2860
2698
  function resolver() {
@@ -2863,8 +2701,8 @@ function once$2(emitter, name2) {
2863
2701
  }
2864
2702
  resolve2([].slice.call(arguments));
2865
2703
  }
2866
- eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
2867
- if (name2 !== "error") {
2704
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
2705
+ if (name !== "error") {
2868
2706
  addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
2869
2707
  }
2870
2708
  });
@@ -2874,17 +2712,17 @@ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
2874
2712
  eventTargetAgnosticAddListener(emitter, "error", handler, flags);
2875
2713
  }
2876
2714
  }
2877
- function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
2715
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
2878
2716
  if (typeof emitter.on === "function") {
2879
2717
  if (flags.once) {
2880
- emitter.once(name2, listener);
2718
+ emitter.once(name, listener);
2881
2719
  } else {
2882
- emitter.on(name2, listener);
2720
+ emitter.on(name, listener);
2883
2721
  }
2884
2722
  } else if (typeof emitter.addEventListener === "function") {
2885
- emitter.addEventListener(name2, function wrapListener(arg) {
2723
+ emitter.addEventListener(name, function wrapListener(arg) {
2886
2724
  if (flags.once) {
2887
- emitter.removeEventListener(name2, wrapListener);
2725
+ emitter.removeEventListener(name, wrapListener);
2888
2726
  }
2889
2727
  listener(arg);
2890
2728
  });
@@ -2895,7 +2733,7 @@ function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
2895
2733
  var eventsExports = events.exports;
2896
2734
  var streamBrowser$1 = eventsExports.EventEmitter;
2897
2735
  var util$3 = {};
2898
- var types$1 = {};
2736
+ var types = {};
2899
2737
  var shams$1 = function hasSymbols2() {
2900
2738
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
2901
2739
  return false;
@@ -3175,26 +3013,26 @@ if (getProto$1) {
3175
3013
  INTRINSICS["%Error.prototype%"] = errorProto;
3176
3014
  }
3177
3015
  }
3178
- var doEval = function doEval2(name2) {
3016
+ var doEval = function doEval2(name) {
3179
3017
  var value;
3180
- if (name2 === "%AsyncFunction%") {
3018
+ if (name === "%AsyncFunction%") {
3181
3019
  value = getEvalledConstructor("async function () {}");
3182
- } else if (name2 === "%GeneratorFunction%") {
3020
+ } else if (name === "%GeneratorFunction%") {
3183
3021
  value = getEvalledConstructor("function* () {}");
3184
- } else if (name2 === "%AsyncGeneratorFunction%") {
3022
+ } else if (name === "%AsyncGeneratorFunction%") {
3185
3023
  value = getEvalledConstructor("async function* () {}");
3186
- } else if (name2 === "%AsyncGenerator%") {
3024
+ } else if (name === "%AsyncGenerator%") {
3187
3025
  var fn = doEval2("%AsyncGeneratorFunction%");
3188
3026
  if (fn) {
3189
3027
  value = fn.prototype;
3190
3028
  }
3191
- } else if (name2 === "%AsyncIteratorPrototype%") {
3029
+ } else if (name === "%AsyncIteratorPrototype%") {
3192
3030
  var gen = doEval2("%AsyncGenerator%");
3193
3031
  if (gen && getProto$1) {
3194
3032
  value = getProto$1(gen.prototype);
3195
3033
  }
3196
3034
  }
3197
- INTRINSICS[name2] = value;
3035
+ INTRINSICS[name] = value;
3198
3036
  return value;
3199
3037
  };
3200
3038
  var LEGACY_ALIASES = {
@@ -3274,8 +3112,8 @@ var stringToPath = function stringToPath2(string) {
3274
3112
  });
3275
3113
  return result;
3276
3114
  };
3277
- var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3278
- var intrinsicName = name2;
3115
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
3116
+ var intrinsicName = name;
3279
3117
  var alias;
3280
3118
  if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
3281
3119
  alias = LEGACY_ALIASES[intrinsicName];
@@ -3287,7 +3125,7 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3287
3125
  value = doEval(intrinsicName);
3288
3126
  }
3289
3127
  if (typeof value === "undefined" && !allowMissing) {
3290
- throw new $TypeError$2("intrinsic " + name2 + " exists, but is not available. Please file an issue!");
3128
+ throw new $TypeError$2("intrinsic " + name + " exists, but is not available. Please file an issue!");
3291
3129
  }
3292
3130
  return {
3293
3131
  alias,
@@ -3295,19 +3133,19 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3295
3133
  value
3296
3134
  };
3297
3135
  }
3298
- throw new $SyntaxError$1("intrinsic " + name2 + " does not exist!");
3136
+ throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
3299
3137
  };
3300
- var getIntrinsic = function GetIntrinsic2(name2, allowMissing) {
3301
- if (typeof name2 !== "string" || name2.length === 0) {
3138
+ var getIntrinsic = function GetIntrinsic2(name, allowMissing) {
3139
+ if (typeof name !== "string" || name.length === 0) {
3302
3140
  throw new $TypeError$2("intrinsic name must be a non-empty string");
3303
3141
  }
3304
3142
  if (arguments.length > 1 && typeof allowMissing !== "boolean") {
3305
3143
  throw new $TypeError$2('"allowMissing" argument must be a boolean');
3306
3144
  }
3307
- if ($exec(/^%?[^%]*%?$/, name2) === null) {
3145
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
3308
3146
  throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3309
3147
  }
3310
- var parts = stringToPath(name2);
3148
+ var parts = stringToPath(name);
3311
3149
  var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
3312
3150
  var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
3313
3151
  var intrinsicRealName = intrinsic.name;
@@ -3335,7 +3173,7 @@ var getIntrinsic = function GetIntrinsic2(name2, allowMissing) {
3335
3173
  } else if (value != null) {
3336
3174
  if (!(part in value)) {
3337
3175
  if (!allowMissing) {
3338
- throw new $TypeError$2("base intrinsic for " + name2 + " exists, but the property is not available.");
3176
+ throw new $TypeError$2("base intrinsic for " + name + " exists, but the property is not available.");
3339
3177
  }
3340
3178
  return void 0;
3341
3179
  }
@@ -3522,9 +3360,9 @@ var callBindExports = callBind$2.exports;
3522
3360
  var GetIntrinsic = getIntrinsic;
3523
3361
  var callBind$1 = callBindExports;
3524
3362
  var $indexOf$1 = callBind$1(GetIntrinsic("String.prototype.indexOf"));
3525
- var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
3526
- var intrinsic = GetIntrinsic(name2, !!allowMissing);
3527
- if (typeof intrinsic === "function" && $indexOf$1(name2, ".prototype.") > -1) {
3363
+ var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
3364
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
3365
+ if (typeof intrinsic === "function" && $indexOf$1(name, ".prototype.") > -1) {
3528
3366
  return callBind$1(intrinsic);
3529
3367
  }
3530
3368
  return intrinsic;
@@ -3840,11 +3678,11 @@ var trySlices = function tryAllSlices(value) {
3840
3678
  /** @type {any} */
3841
3679
  cache,
3842
3680
  /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
3843
- function(getter, name2) {
3681
+ function(getter, name) {
3844
3682
  if (!found) {
3845
3683
  try {
3846
3684
  getter(value);
3847
- found = $slice(name2, 1);
3685
+ found = $slice(name, 1);
3848
3686
  } catch (e) {
3849
3687
  }
3850
3688
  }
@@ -4097,7 +3935,7 @@ var isTypedArray = function isTypedArray2(value) {
4097
3935
  }
4098
3936
  });
4099
3937
  });
4100
- })(types$1);
3938
+ })(types);
4101
3939
  var isBufferBrowser = function isBuffer(arg) {
4102
3940
  return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
4103
3941
  };
@@ -4150,10 +3988,10 @@ var isBufferBrowser = function isBuffer(arg) {
4150
3988
  return str;
4151
3989
  };
4152
3990
  exports2.deprecate = function(fn, msg) {
4153
- if (typeof process$1 !== "undefined" && process$1.noDeprecation === true) {
3991
+ if (typeof globals.process$1 !== "undefined" && globals.process$1.noDeprecation === true) {
4154
3992
  return fn;
4155
3993
  }
4156
- if (typeof process$1 === "undefined") {
3994
+ if (typeof globals.process$1 === "undefined") {
4157
3995
  return function() {
4158
3996
  return exports2.deprecate(fn, msg).apply(this, arguments);
4159
3997
  };
@@ -4161,9 +3999,9 @@ var isBufferBrowser = function isBuffer(arg) {
4161
3999
  var warned = false;
4162
4000
  function deprecated() {
4163
4001
  if (!warned) {
4164
- if (process$1.throwDeprecation) {
4002
+ if (globals.process$1.throwDeprecation) {
4165
4003
  throw new Error(msg);
4166
- } else if (process$1.traceDeprecation) {
4004
+ } else if (globals.process$1.traceDeprecation) {
4167
4005
  console.trace(msg);
4168
4006
  } else {
4169
4007
  console.error(msg);
@@ -4176,8 +4014,8 @@ var isBufferBrowser = function isBuffer(arg) {
4176
4014
  };
4177
4015
  var debugs = {};
4178
4016
  var debugEnvRegex = /^$/;
4179
- if (process$1.env.NODE_DEBUG) {
4180
- var debugEnv = process$1.env.NODE_DEBUG;
4017
+ if (globals.process$1.env.NODE_DEBUG) {
4018
+ var debugEnv = globals.process$1.env.NODE_DEBUG;
4181
4019
  debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase();
4182
4020
  debugEnvRegex = new RegExp("^" + debugEnv + "$", "i");
4183
4021
  }
@@ -4185,7 +4023,7 @@ var isBufferBrowser = function isBuffer(arg) {
4185
4023
  set = set.toUpperCase();
4186
4024
  if (!debugs[set]) {
4187
4025
  if (debugEnvRegex.test(set)) {
4188
- var pid = process$1.pid;
4026
+ var pid = globals.process$1.pid;
4189
4027
  debugs[set] = function() {
4190
4028
  var msg = exports2.format.apply(exports2, arguments);
4191
4029
  console.error("%s %d: %s", set, pid, msg);
@@ -4285,8 +4123,8 @@ var isBufferBrowser = function isBuffer(arg) {
4285
4123
  }
4286
4124
  if (keys.length === 0) {
4287
4125
  if (isFunction2(value)) {
4288
- var name2 = value.name ? ": " + value.name : "";
4289
- return ctx.stylize("[Function" + name2 + "]", "special");
4126
+ var name = value.name ? ": " + value.name : "";
4127
+ return ctx.stylize("[Function" + name + "]", "special");
4290
4128
  }
4291
4129
  if (isRegExp2(value)) {
4292
4130
  return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
@@ -4386,7 +4224,7 @@ var isBufferBrowser = function isBuffer(arg) {
4386
4224
  return output;
4387
4225
  }
4388
4226
  function formatProperty(ctx, value, recurseTimes, visibleKeys, key2, array) {
4389
- var name2, str, desc;
4227
+ var name, str, desc;
4390
4228
  desc = Object.getOwnPropertyDescriptor(value, key2) || { value: value[key2] };
4391
4229
  if (desc.get) {
4392
4230
  if (desc.set) {
@@ -4400,7 +4238,7 @@ var isBufferBrowser = function isBuffer(arg) {
4400
4238
  }
4401
4239
  }
4402
4240
  if (!hasOwnProperty2(visibleKeys, key2)) {
4403
- name2 = "[" + key2 + "]";
4241
+ name = "[" + key2 + "]";
4404
4242
  }
4405
4243
  if (!str) {
4406
4244
  if (ctx.seen.indexOf(desc.value) < 0) {
@@ -4424,20 +4262,20 @@ var isBufferBrowser = function isBuffer(arg) {
4424
4262
  str = ctx.stylize("[Circular]", "special");
4425
4263
  }
4426
4264
  }
4427
- if (isUndefined2(name2)) {
4265
+ if (isUndefined2(name)) {
4428
4266
  if (array && key2.match(/^\d+$/)) {
4429
4267
  return str;
4430
4268
  }
4431
- name2 = JSON.stringify("" + key2);
4432
- if (name2.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
4433
- name2 = name2.slice(1, -1);
4434
- name2 = ctx.stylize(name2, "name");
4269
+ name = JSON.stringify("" + key2);
4270
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
4271
+ name = name.slice(1, -1);
4272
+ name = ctx.stylize(name, "name");
4435
4273
  } else {
4436
- name2 = name2.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
4437
- name2 = ctx.stylize(name2, "string");
4274
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
4275
+ name = ctx.stylize(name, "string");
4438
4276
  }
4439
4277
  }
4440
- return name2 + ": " + str;
4278
+ return name + ": " + str;
4441
4279
  }
4442
4280
  function reduceToSingleString(output, base2, braces) {
4443
4281
  var length = output.reduce(function(prev, cur) {
@@ -4449,7 +4287,7 @@ var isBufferBrowser = function isBuffer(arg) {
4449
4287
  }
4450
4288
  return braces[0] + base2 + " " + output.join(", ") + " " + braces[1];
4451
4289
  }
4452
- exports2.types = types$1;
4290
+ exports2.types = types;
4453
4291
  function isArray2(ar) {
4454
4292
  return Array.isArray(ar);
4455
4293
  }
@@ -4637,10 +4475,10 @@ var isBufferBrowser = function isBuffer(arg) {
4637
4475
  };
4638
4476
  original.apply(this, args).then(
4639
4477
  function(ret) {
4640
- process$1.nextTick(cb.bind(null, null, ret));
4478
+ globals.process$1.nextTick(cb.bind(null, null, ret));
4641
4479
  },
4642
4480
  function(rej) {
4643
- process$1.nextTick(callbackifyOnRejected.bind(null, rej, cb));
4481
+ globals.process$1.nextTick(callbackifyOnRejected.bind(null, rej, cb));
4644
4482
  }
4645
4483
  );
4646
4484
  }
@@ -4715,11 +4553,11 @@ function requireBuffer_list() {
4715
4553
  if (typeof input !== "object" || input === null) return input;
4716
4554
  var prim = input[Symbol.toPrimitive];
4717
4555
  if (prim !== void 0) {
4718
- var res = prim.call(input, hint || "default");
4556
+ var res = prim.call(input, hint);
4719
4557
  if (typeof res !== "object") return res;
4720
4558
  throw new TypeError("@@toPrimitive must return a primitive value.");
4721
4559
  }
4722
- return (hint === "string" ? String : Number)(input);
4560
+ return String(input);
4723
4561
  }
4724
4562
  var _require = dist, Buffer2 = _require.Buffer;
4725
4563
  var _require2 = util$3, inspect7 = _require2.inspect;
@@ -4901,10 +4739,10 @@ function destroy$1(err, cb) {
4901
4739
  cb(err);
4902
4740
  } else if (err) {
4903
4741
  if (!this._writableState) {
4904
- process$1.nextTick(emitErrorNT$1, this, err);
4742
+ globals.process$1.nextTick(emitErrorNT$1, this, err);
4905
4743
  } else if (!this._writableState.errorEmitted) {
4906
4744
  this._writableState.errorEmitted = true;
4907
- process$1.nextTick(emitErrorNT$1, this, err);
4745
+ globals.process$1.nextTick(emitErrorNT$1, this, err);
4908
4746
  }
4909
4747
  }
4910
4748
  return this;
@@ -4918,18 +4756,18 @@ function destroy$1(err, cb) {
4918
4756
  this._destroy(err || null, function(err2) {
4919
4757
  if (!cb && err2) {
4920
4758
  if (!_this._writableState) {
4921
- process$1.nextTick(emitErrorAndCloseNT, _this, err2);
4759
+ globals.process$1.nextTick(emitErrorAndCloseNT, _this, err2);
4922
4760
  } else if (!_this._writableState.errorEmitted) {
4923
4761
  _this._writableState.errorEmitted = true;
4924
- process$1.nextTick(emitErrorAndCloseNT, _this, err2);
4762
+ globals.process$1.nextTick(emitErrorAndCloseNT, _this, err2);
4925
4763
  } else {
4926
- process$1.nextTick(emitCloseNT, _this);
4764
+ globals.process$1.nextTick(emitCloseNT, _this);
4927
4765
  }
4928
4766
  } else if (cb) {
4929
- process$1.nextTick(emitCloseNT, _this);
4767
+ globals.process$1.nextTick(emitCloseNT, _this);
4930
4768
  cb(err2);
4931
4769
  } else {
4932
- process$1.nextTick(emitCloseNT, _this);
4770
+ globals.process$1.nextTick(emitCloseNT, _this);
4933
4771
  }
4934
4772
  });
4935
4773
  return this;
@@ -5039,10 +4877,10 @@ function includes(str, search, start) {
5039
4877
  return str.indexOf(search, start) !== -1;
5040
4878
  }
5041
4879
  }
5042
- createErrorType("ERR_INVALID_OPT_VALUE", function(name2, value) {
5043
- return 'The value "' + value + '" is invalid for option "' + name2 + '"';
4880
+ createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
4881
+ return 'The value "' + value + '" is invalid for option "' + name + '"';
5044
4882
  }, TypeError);
5045
- createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) {
4883
+ createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
5046
4884
  var determiner;
5047
4885
  if (typeof expected === "string" && startsWith(expected, "not ")) {
5048
4886
  determiner = "must not be";
@@ -5051,22 +4889,22 @@ createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) {
5051
4889
  determiner = "must be";
5052
4890
  }
5053
4891
  var msg;
5054
- if (endsWith(name2, " argument")) {
5055
- msg = "The ".concat(name2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
4892
+ if (endsWith(name, " argument")) {
4893
+ msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
5056
4894
  } else {
5057
- var type2 = includes(name2, ".") ? "property" : "argument";
5058
- msg = 'The "'.concat(name2, '" ').concat(type2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
4895
+ var type2 = includes(name, ".") ? "property" : "argument";
4896
+ msg = 'The "'.concat(name, '" ').concat(type2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
5059
4897
  }
5060
4898
  msg += ". Received type ".concat(typeof actual);
5061
4899
  return msg;
5062
4900
  }, TypeError);
5063
4901
  createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
5064
- createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name2) {
5065
- return "The " + name2 + " method is not implemented";
4902
+ createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
4903
+ return "The " + name + " method is not implemented";
5066
4904
  });
5067
4905
  createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
5068
- createErrorType("ERR_STREAM_DESTROYED", function(name2) {
5069
- return "Cannot call " + name2 + " after a stream was destroyed";
4906
+ createErrorType("ERR_STREAM_DESTROYED", function(name) {
4907
+ return "Cannot call " + name + " after a stream was destroyed";
5070
4908
  });
5071
4909
  createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
5072
4910
  createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
@@ -5085,8 +4923,8 @@ function getHighWaterMark(state2, options2, duplexKey, isDuplex) {
5085
4923
  var hwm = highWaterMarkFrom(options2, isDuplex, duplexKey);
5086
4924
  if (hwm != null) {
5087
4925
  if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
5088
- var name2 = isDuplex ? duplexKey : "highWaterMark";
5089
- throw new ERR_INVALID_OPT_VALUE(name2, hwm);
4926
+ var name = isDuplex ? duplexKey : "highWaterMark";
4927
+ throw new ERR_INVALID_OPT_VALUE(name, hwm);
5090
4928
  }
5091
4929
  return Math.floor(hwm);
5092
4930
  }
@@ -5095,7 +4933,7 @@ function getHighWaterMark(state2, options2, duplexKey, isDuplex) {
5095
4933
  var state = {
5096
4934
  getHighWaterMark
5097
4935
  };
5098
- var browser$b = deprecate;
4936
+ var browser$a = deprecate;
5099
4937
  function deprecate(fn, msg) {
5100
4938
  if (config$1("noDeprecation")) {
5101
4939
  return fn;
@@ -5116,13 +4954,13 @@ function deprecate(fn, msg) {
5116
4954
  }
5117
4955
  return deprecated;
5118
4956
  }
5119
- function config$1(name2) {
4957
+ function config$1(name) {
5120
4958
  try {
5121
4959
  if (!commonjsGlobal.localStorage) return false;
5122
4960
  } catch (_) {
5123
4961
  return false;
5124
4962
  }
5125
- var val = commonjsGlobal.localStorage[name2];
4963
+ var val = commonjsGlobal.localStorage[name];
5126
4964
  if (null == val) return false;
5127
4965
  return String(val).toLowerCase() === "true";
5128
4966
  }
@@ -5143,7 +4981,7 @@ function require_stream_writable$1() {
5143
4981
  var Duplex2;
5144
4982
  Writable.WritableState = WritableState;
5145
4983
  var internalUtil = {
5146
- deprecate: browser$b
4984
+ deprecate: browser$a
5147
4985
  };
5148
4986
  var Stream2 = streamBrowser$1;
5149
4987
  var Buffer2 = dist.Buffer;
@@ -5252,7 +5090,7 @@ function require_stream_writable$1() {
5252
5090
  function writeAfterEnd(stream, cb) {
5253
5091
  var er = new ERR_STREAM_WRITE_AFTER_END();
5254
5092
  errorOrDestroy2(stream, er);
5255
- process$1.nextTick(cb, er);
5093
+ globals.process$1.nextTick(cb, er);
5256
5094
  }
5257
5095
  function validChunk(stream, state2, chunk, cb) {
5258
5096
  var er;
@@ -5263,7 +5101,7 @@ function require_stream_writable$1() {
5263
5101
  }
5264
5102
  if (er) {
5265
5103
  errorOrDestroy2(stream, er);
5266
- process$1.nextTick(cb, er);
5104
+ globals.process$1.nextTick(cb, er);
5267
5105
  return false;
5268
5106
  }
5269
5107
  return true;
@@ -5375,8 +5213,8 @@ function require_stream_writable$1() {
5375
5213
  function onwriteError(stream, state2, sync2, er, cb) {
5376
5214
  --state2.pendingcb;
5377
5215
  if (sync2) {
5378
- process$1.nextTick(cb, er);
5379
- process$1.nextTick(finishMaybe, stream, state2);
5216
+ globals.process$1.nextTick(cb, er);
5217
+ globals.process$1.nextTick(finishMaybe, stream, state2);
5380
5218
  stream._writableState.errorEmitted = true;
5381
5219
  errorOrDestroy2(stream, er);
5382
5220
  } else {
@@ -5405,7 +5243,7 @@ function require_stream_writable$1() {
5405
5243
  clearBuffer(stream, state2);
5406
5244
  }
5407
5245
  if (sync2) {
5408
- process$1.nextTick(afterWrite, stream, state2, finished, cb);
5246
+ globals.process$1.nextTick(afterWrite, stream, state2, finished, cb);
5409
5247
  } else {
5410
5248
  afterWrite(stream, state2, finished, cb);
5411
5249
  }
@@ -5518,7 +5356,7 @@ function require_stream_writable$1() {
5518
5356
  if (typeof stream._final === "function" && !state2.destroyed) {
5519
5357
  state2.pendingcb++;
5520
5358
  state2.finalCalled = true;
5521
- process$1.nextTick(callFinal, stream, state2);
5359
+ globals.process$1.nextTick(callFinal, stream, state2);
5522
5360
  } else {
5523
5361
  state2.prefinished = true;
5524
5362
  stream.emit("prefinish");
@@ -5546,7 +5384,7 @@ function require_stream_writable$1() {
5546
5384
  state2.ending = true;
5547
5385
  finishMaybe(stream, state2);
5548
5386
  if (cb) {
5549
- if (state2.finished) process$1.nextTick(cb);
5387
+ if (state2.finished) globals.process$1.nextTick(cb);
5550
5388
  else stream.once("finish", cb);
5551
5389
  }
5552
5390
  state2.ended = true;
@@ -5652,7 +5490,7 @@ function require_stream_duplex$1() {
5652
5490
  });
5653
5491
  function onend() {
5654
5492
  if (this._writableState.ended) return;
5655
- process$1.nextTick(onEndNT, this);
5493
+ globals.process$1.nextTick(onEndNT, this);
5656
5494
  }
5657
5495
  function onEndNT(self2) {
5658
5496
  self2.end();
@@ -6015,7 +5853,7 @@ function requireAsync_iterator() {
6015
5853
  if (typeof input !== "object" || input === null) return input;
6016
5854
  var prim = input[Symbol.toPrimitive];
6017
5855
  if (prim !== void 0) {
6018
- var res = prim.call(input, hint || "default");
5856
+ var res = prim.call(input, hint);
6019
5857
  if (typeof res !== "object") return res;
6020
5858
  throw new TypeError("@@toPrimitive must return a primitive value.");
6021
5859
  }
@@ -6048,7 +5886,7 @@ function requireAsync_iterator() {
6048
5886
  }
6049
5887
  }
6050
5888
  function onReadable(iter) {
6051
- process$1.nextTick(readAndResolve, iter);
5889
+ globals.process$1.nextTick(readAndResolve, iter);
6052
5890
  }
6053
5891
  function wrapForNext(lastPromise, iter) {
6054
5892
  return function(resolve2, reject) {
@@ -6078,7 +5916,7 @@ function requireAsync_iterator() {
6078
5916
  }
6079
5917
  if (this[kStream].destroyed) {
6080
5918
  return new Promise(function(resolve2, reject) {
6081
- process$1.nextTick(function() {
5919
+ globals.process$1.nextTick(function() {
6082
5920
  if (_this[kError]) {
6083
5921
  reject(_this[kError]);
6084
5922
  } else {
@@ -6508,7 +6346,7 @@ function require_stream_readable$1() {
6508
6346
  if (!state2.emittedReadable) {
6509
6347
  debug("emitReadable", state2.flowing);
6510
6348
  state2.emittedReadable = true;
6511
- process$1.nextTick(emitReadable_, stream);
6349
+ globals.process$1.nextTick(emitReadable_, stream);
6512
6350
  }
6513
6351
  }
6514
6352
  function emitReadable_(stream) {
@@ -6524,7 +6362,7 @@ function require_stream_readable$1() {
6524
6362
  function maybeReadMore(stream, state2) {
6525
6363
  if (!state2.readingMore) {
6526
6364
  state2.readingMore = true;
6527
- process$1.nextTick(maybeReadMore_, stream, state2);
6365
+ globals.process$1.nextTick(maybeReadMore_, stream, state2);
6528
6366
  }
6529
6367
  }
6530
6368
  function maybeReadMore_(stream, state2) {
@@ -6556,9 +6394,9 @@ function require_stream_readable$1() {
6556
6394
  }
6557
6395
  state2.pipesCount += 1;
6558
6396
  debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
6559
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process$1.stdout && dest !== process$1.stderr;
6397
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== globals.process$1.stdout && dest !== globals.process$1.stderr;
6560
6398
  var endFn = doEnd ? onend : unpipe;
6561
- if (state2.endEmitted) process$1.nextTick(endFn);
6399
+ if (state2.endEmitted) globals.process$1.nextTick(endFn);
6562
6400
  else src.once("end", endFn);
6563
6401
  dest.on("unpipe", onunpipe);
6564
6402
  function onunpipe(readable, unpipeInfo) {
@@ -6692,7 +6530,7 @@ function require_stream_readable$1() {
6692
6530
  if (state2.length) {
6693
6531
  emitReadable(this);
6694
6532
  } else if (!state2.reading) {
6695
- process$1.nextTick(nReadingNextTick, this);
6533
+ globals.process$1.nextTick(nReadingNextTick, this);
6696
6534
  }
6697
6535
  }
6698
6536
  }
@@ -6702,14 +6540,14 @@ function require_stream_readable$1() {
6702
6540
  Readable.prototype.removeListener = function(ev, fn) {
6703
6541
  var res = Stream2.prototype.removeListener.call(this, ev, fn);
6704
6542
  if (ev === "readable") {
6705
- process$1.nextTick(updateReadableListening, this);
6543
+ globals.process$1.nextTick(updateReadableListening, this);
6706
6544
  }
6707
6545
  return res;
6708
6546
  };
6709
6547
  Readable.prototype.removeAllListeners = function(ev) {
6710
6548
  var res = Stream2.prototype.removeAllListeners.apply(this, arguments);
6711
6549
  if (ev === "readable" || ev === void 0) {
6712
- process$1.nextTick(updateReadableListening, this);
6550
+ globals.process$1.nextTick(updateReadableListening, this);
6713
6551
  }
6714
6552
  return res;
6715
6553
  };
@@ -6739,7 +6577,7 @@ function require_stream_readable$1() {
6739
6577
  function resume(stream, state2) {
6740
6578
  if (!state2.resumeScheduled) {
6741
6579
  state2.resumeScheduled = true;
6742
- process$1.nextTick(resume_, stream, state2);
6580
+ globals.process$1.nextTick(resume_, stream, state2);
6743
6581
  }
6744
6582
  }
6745
6583
  function resume_(stream, state2) {
@@ -6880,7 +6718,7 @@ function require_stream_readable$1() {
6880
6718
  debug("endReadable", state2.endEmitted);
6881
6719
  if (!state2.endEmitted) {
6882
6720
  state2.ended = true;
6883
- process$1.nextTick(endReadableNT, state2, stream);
6721
+ globals.process$1.nextTick(endReadableNT, state2, stream);
6884
6722
  }
6885
6723
  }
6886
6724
  function endReadableNT(state2, stream) {
@@ -8489,18 +8327,18 @@ Sha384.prototype._hash = function() {
8489
8327
  return H;
8490
8328
  };
8491
8329
  var sha384$1 = Sha384;
8492
- var exports$2 = sha_js.exports = function SHA(algorithm) {
8330
+ var exports$1 = sha_js.exports = function SHA(algorithm) {
8493
8331
  algorithm = algorithm.toLowerCase();
8494
- var Algorithm = exports$2[algorithm];
8332
+ var Algorithm = exports$1[algorithm];
8495
8333
  if (!Algorithm) throw new Error(algorithm + " is not supported (we accept pull requests)");
8496
8334
  return new Algorithm();
8497
8335
  };
8498
- exports$2.sha = sha$4;
8499
- exports$2.sha1 = sha1;
8500
- exports$2.sha224 = sha224$1;
8501
- exports$2.sha256 = sha256$1;
8502
- exports$2.sha384 = sha384$1;
8503
- exports$2.sha512 = sha512$1;
8336
+ exports$1.sha = sha$4;
8337
+ exports$1.sha1 = sha1;
8338
+ exports$1.sha224 = sha224$1;
8339
+ exports$1.sha256 = sha256$1;
8340
+ exports$1.sha384 = sha384$1;
8341
+ exports$1.sha512 = sha512$1;
8504
8342
  var sha_jsExports = sha_js.exports;
8505
8343
  var streamBrowserify = Stream;
8506
8344
  var EE = eventsExports.EventEmitter;
@@ -8674,7 +8512,7 @@ Hash.prototype._update = function(data) {
8674
8512
  Hash.prototype._final = function() {
8675
8513
  return this._hash.digest();
8676
8514
  };
8677
- var browser$a = function createHash2(alg) {
8515
+ var browser$9 = function createHash2(alg) {
8678
8516
  alg = alg.toLowerCase();
8679
8517
  if (alg === "md5") return new MD5$2();
8680
8518
  if (alg === "rmd160" || alg === "ripemd160") return new RIPEMD160$3();
@@ -8758,7 +8596,7 @@ Hmac$2.prototype._final = function() {
8758
8596
  var hash3 = this._alg === "rmd160" ? new RIPEMD160$2() : sha$2(this._alg);
8759
8597
  return hash3.update(this._opad).update(h).digest();
8760
8598
  };
8761
- var browser$9 = function createHmac(alg, key2) {
8599
+ var browser$8 = function createHmac(alg, key2) {
8762
8600
  alg = alg.toLowerCase();
8763
8601
  if (alg === "rmd160" || alg === "ripemd160") {
8764
8602
  return new Hmac$2("rmd160", key2);
@@ -8932,7 +8770,7 @@ const require$$6 = {
8932
8770
  }
8933
8771
  };
8934
8772
  var algos = require$$6;
8935
- var browser$8 = {};
8773
+ var browser$7 = {};
8936
8774
  var MAX_ALLOC = Math.pow(2, 30) - 1;
8937
8775
  var precondition = function(iterations, keylen) {
8938
8776
  if (typeof iterations !== "number") {
@@ -8952,14 +8790,14 @@ var defaultEncoding$2;
8952
8790
  if (commonjsGlobal.process && commonjsGlobal.process.browser) {
8953
8791
  defaultEncoding$2 = "utf-8";
8954
8792
  } else if (commonjsGlobal.process && commonjsGlobal.process.version) {
8955
- var pVersionMajor = parseInt(process$1.version.split(".")[0].slice(1), 10);
8793
+ var pVersionMajor = parseInt(globals.process$1.version.split(".")[0].slice(1), 10);
8956
8794
  defaultEncoding$2 = pVersionMajor >= 6 ? "utf-8" : "binary";
8957
8795
  } else {
8958
8796
  defaultEncoding$2 = "utf-8";
8959
8797
  }
8960
8798
  var defaultEncoding_1 = defaultEncoding$2;
8961
8799
  var Buffer$m = safeBufferExports$1.Buffer;
8962
- var toBuffer$2 = function(thing, encoding, name2) {
8800
+ var toBuffer$2 = function(thing, encoding, name) {
8963
8801
  if (Buffer$m.isBuffer(thing)) {
8964
8802
  return thing;
8965
8803
  } else if (typeof thing === "string") {
@@ -8967,7 +8805,7 @@ var toBuffer$2 = function(thing, encoding, name2) {
8967
8805
  } else if (ArrayBuffer.isView(thing)) {
8968
8806
  return Buffer$m.from(thing.buffer);
8969
8807
  } else {
8970
- throw new TypeError(name2 + " must be a string, a Buffer, a typed array or a DataView");
8808
+ throw new TypeError(name + " must be a string, a Buffer, a typed array or a DataView");
8971
8809
  }
8972
8810
  };
8973
8811
  var md5 = md5$2;
@@ -9168,9 +9006,9 @@ var async = function(password, salt, iterations, keylen, digest9, callback) {
9168
9006
  return sync(password, salt, iterations, keylen, digest9);
9169
9007
  }), callback);
9170
9008
  };
9171
- browser$8.pbkdf2 = async;
9172
- browser$8.pbkdf2Sync = syncBrowser;
9173
- var browser$7 = {};
9009
+ browser$7.pbkdf2 = async;
9010
+ browser$7.pbkdf2Sync = syncBrowser;
9011
+ var browser$6 = {};
9174
9012
  var des$2 = {};
9175
9013
  var utils$n = {};
9176
9014
  utils$n.readUInt32BE = function readUInt32BE(bytes, off) {
@@ -10306,7 +10144,7 @@ DES$1.prototype._update = function(data) {
10306
10144
  DES$1.prototype._final = function() {
10307
10145
  return Buffer$j.from(this._des.final());
10308
10146
  };
10309
- var browser$6 = {};
10147
+ var browser$5 = {};
10310
10148
  var encrypter = {};
10311
10149
  var ecb = {};
10312
10150
  ecb.encrypt = function(self2, block2) {
@@ -11281,11 +11119,11 @@ var modes$1 = require$$2;
11281
11119
  function getCiphers$1() {
11282
11120
  return Object.keys(modes$1);
11283
11121
  }
11284
- browser$6.createCipher = browser$6.Cipher = ciphers$2.createCipher;
11285
- browser$6.createCipheriv = browser$6.Cipheriv = ciphers$2.createCipheriv;
11286
- browser$6.createDecipher = browser$6.Decipher = deciphers.createDecipher;
11287
- browser$6.createDecipheriv = browser$6.Decipheriv = deciphers.createDecipheriv;
11288
- browser$6.listCiphers = browser$6.getCiphers = getCiphers$1;
11122
+ browser$5.createCipher = browser$5.Cipher = ciphers$2.createCipher;
11123
+ browser$5.createCipheriv = browser$5.Cipheriv = ciphers$2.createCipheriv;
11124
+ browser$5.createDecipher = browser$5.Decipher = deciphers.createDecipher;
11125
+ browser$5.createDecipheriv = browser$5.Decipheriv = deciphers.createDecipheriv;
11126
+ browser$5.listCiphers = browser$5.getCiphers = getCiphers$1;
11289
11127
  var modes = {};
11290
11128
  (function(exports2) {
11291
11129
  exports2["des-ecb"] = {
@@ -11314,7 +11152,7 @@ var modes = {};
11314
11152
  };
11315
11153
  })(modes);
11316
11154
  var DES = browserifyDes;
11317
- var aes = browser$6;
11155
+ var aes = browser$5;
11318
11156
  var aesModes = modes_1;
11319
11157
  var desModes = modes;
11320
11158
  var ebtk = evp_bytestokey;
@@ -11363,12 +11201,12 @@ function createDecipheriv(suite, key2, iv) {
11363
11201
  function getCiphers() {
11364
11202
  return Object.keys(desModes).concat(aes.getCiphers());
11365
11203
  }
11366
- browser$7.createCipher = browser$7.Cipher = createCipher;
11367
- browser$7.createCipheriv = browser$7.Cipheriv = createCipheriv;
11368
- browser$7.createDecipher = browser$7.Decipher = createDecipher;
11369
- browser$7.createDecipheriv = browser$7.Decipheriv = createDecipheriv;
11370
- browser$7.listCiphers = browser$7.getCiphers = getCiphers;
11371
- var browser$5 = {};
11204
+ browser$6.createCipher = browser$6.Cipher = createCipher;
11205
+ browser$6.createCipheriv = browser$6.Cipheriv = createCipheriv;
11206
+ browser$6.createDecipher = browser$6.Decipher = createDecipher;
11207
+ browser$6.createDecipheriv = browser$6.Decipheriv = createDecipheriv;
11208
+ browser$6.listCiphers = browser$6.getCiphers = getCiphers;
11209
+ var browser$4 = {};
11372
11210
  var bn$1 = { exports: {} };
11373
11211
  bn$1.exports;
11374
11212
  (function(module2) {
@@ -12951,7 +12789,7 @@ bn$1.exports;
12951
12789
  rws[i] = 0;
12952
12790
  }
12953
12791
  assert2(carry === 0);
12954
- assert2((carry & ~8191) === 0);
12792
+ assert2((carry & -8192) === 0);
12955
12793
  };
12956
12794
  FFTM.prototype.stub = function stub(N) {
12957
12795
  var ph = new Array(N);
@@ -13779,8 +13617,8 @@ bn$1.exports;
13779
13617
  p192: null,
13780
13618
  p25519: null
13781
13619
  };
13782
- function MPrime(name2, p) {
13783
- this.name = name2;
13620
+ function MPrime(name, p) {
13621
+ this.name = name;
13784
13622
  this.p = new BN2(p, 16);
13785
13623
  this.n = this.p.bitLength();
13786
13624
  this.k = new BN2(1).iushln(this.n).isub(this.p);
@@ -13913,21 +13751,21 @@ bn$1.exports;
13913
13751
  }
13914
13752
  return num;
13915
13753
  };
13916
- BN2._prime = function prime(name2) {
13917
- if (primes[name2]) return primes[name2];
13754
+ BN2._prime = function prime(name) {
13755
+ if (primes[name]) return primes[name];
13918
13756
  var prime2;
13919
- if (name2 === "k256") {
13757
+ if (name === "k256") {
13920
13758
  prime2 = new K256();
13921
- } else if (name2 === "p224") {
13759
+ } else if (name === "p224") {
13922
13760
  prime2 = new P224();
13923
- } else if (name2 === "p192") {
13761
+ } else if (name === "p192") {
13924
13762
  prime2 = new P192();
13925
- } else if (name2 === "p25519") {
13763
+ } else if (name === "p25519") {
13926
13764
  prime2 = new P25519();
13927
13765
  } else {
13928
- throw new Error("Unknown prime " + name2);
13766
+ throw new Error("Unknown prime " + name);
13929
13767
  }
13930
- primes[name2] = prime2;
13768
+ primes[name] = prime2;
13931
13769
  return prime2;
13932
13770
  };
13933
13771
  function Red(m) {
@@ -14610,7 +14448,7 @@ function requireDh() {
14610
14448
  }
14611
14449
  var hasRequiredBrowser$2;
14612
14450
  function requireBrowser$2() {
14613
- if (hasRequiredBrowser$2) return browser$5;
14451
+ if (hasRequiredBrowser$2) return browser$4;
14614
14452
  hasRequiredBrowser$2 = 1;
14615
14453
  var generatePrime2 = requireGeneratePrime();
14616
14454
  var primes = require$$1$1;
@@ -14643,16 +14481,16 @@ function requireBrowser$2() {
14643
14481
  }
14644
14482
  return new DH(prime, generator, true);
14645
14483
  }
14646
- browser$5.DiffieHellmanGroup = browser$5.createDiffieHellmanGroup = browser$5.getDiffieHellman = getDiffieHellman;
14647
- browser$5.createDiffieHellman = browser$5.DiffieHellman = createDiffieHellman;
14648
- return browser$5;
14484
+ browser$4.DiffieHellmanGroup = browser$4.createDiffieHellmanGroup = browser$4.getDiffieHellman = getDiffieHellman;
14485
+ browser$4.createDiffieHellman = browser$4.DiffieHellman = createDiffieHellman;
14486
+ return browser$4;
14649
14487
  }
14650
14488
  var readableBrowser = { exports: {} };
14651
14489
  var processNextickArgs = { exports: {} };
14652
- if (typeof process$1 === "undefined" || !process$1.version || process$1.version.indexOf("v0.") === 0 || process$1.version.indexOf("v1.") === 0 && process$1.version.indexOf("v1.8.") !== 0) {
14490
+ if (typeof globals.process$1 === "undefined" || !globals.process$1.version || globals.process$1.version.indexOf("v0.") === 0 || globals.process$1.version.indexOf("v1.") === 0 && globals.process$1.version.indexOf("v1.8.") !== 0) {
14653
14491
  processNextickArgs.exports = { nextTick };
14654
14492
  } else {
14655
- processNextickArgs.exports = process$1;
14493
+ processNextickArgs.exports = globals.process$1;
14656
14494
  }
14657
14495
  function nextTick(fn, arg1, arg2, arg3) {
14658
14496
  if (typeof fn !== "function") {
@@ -14663,17 +14501,17 @@ function nextTick(fn, arg1, arg2, arg3) {
14663
14501
  switch (len) {
14664
14502
  case 0:
14665
14503
  case 1:
14666
- return process$1.nextTick(fn);
14504
+ return globals.process$1.nextTick(fn);
14667
14505
  case 2:
14668
- return process$1.nextTick(function afterTickOne() {
14506
+ return globals.process$1.nextTick(function afterTickOne() {
14669
14507
  fn.call(null, arg1);
14670
14508
  });
14671
14509
  case 3:
14672
- return process$1.nextTick(function afterTickTwo() {
14510
+ return globals.process$1.nextTick(function afterTickTwo() {
14673
14511
  fn.call(null, arg1, arg2);
14674
14512
  });
14675
14513
  case 4:
14676
- return process$1.nextTick(function afterTickThree() {
14514
+ return globals.process$1.nextTick(function afterTickThree() {
14677
14515
  fn.call(null, arg1, arg2, arg3);
14678
14516
  });
14679
14517
  default:
@@ -14682,7 +14520,7 @@ function nextTick(fn, arg1, arg2, arg3) {
14682
14520
  while (i < args.length) {
14683
14521
  args[i++] = arguments[i];
14684
14522
  }
14685
- return process$1.nextTick(function afterTick() {
14523
+ return globals.process$1.nextTick(function afterTick() {
14686
14524
  fn.apply(null, args);
14687
14525
  });
14688
14526
  }
@@ -14970,13 +14808,13 @@ function require_stream_writable() {
14970
14808
  onCorkedFinish(_this, state2);
14971
14809
  };
14972
14810
  }
14973
- var asyncWrite = !process$1.browser && ["v0.10", "v0.9."].indexOf(process$1.version.slice(0, 5)) > -1 ? setImmediate : pna2.nextTick;
14811
+ var asyncWrite = !globals.process$1.browser && ["v0.10", "v0.9."].indexOf(globals.process$1.version.slice(0, 5)) > -1 ? setImmediate : pna2.nextTick;
14974
14812
  var Duplex2;
14975
14813
  Writable.WritableState = WritableState;
14976
14814
  var util2 = Object.create(util$2);
14977
14815
  util2.inherits = inherits_browserExports;
14978
14816
  var internalUtil = {
14979
- deprecate: browser$b
14817
+ deprecate: browser$a
14980
14818
  };
14981
14819
  var Stream2 = streamBrowser;
14982
14820
  var Buffer2 = safeBufferExports.Buffer;
@@ -15813,7 +15651,7 @@ function require_stream_readable() {
15813
15651
  }
15814
15652
  state2.pipesCount += 1;
15815
15653
  debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
15816
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process$1.stdout && dest !== process$1.stderr;
15654
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== globals.process$1.stdout && dest !== globals.process$1.stderr;
15817
15655
  var endFn = doEnd ? onend : unpipe;
15818
15656
  if (state2.endEmitted) pna2.nextTick(endFn);
15819
15657
  else src.once("end", endFn);
@@ -18619,8 +18457,8 @@ bn.exports;
18619
18457
  p192: null,
18620
18458
  p25519: null
18621
18459
  };
18622
- function MPrime(name2, p) {
18623
- this.name = name2;
18460
+ function MPrime(name, p) {
18461
+ this.name = name;
18624
18462
  this.p = new BN2(p, 16);
18625
18463
  this.n = this.p.bitLength();
18626
18464
  this.k = new BN2(1).iushln(this.n).isub(this.p);
@@ -18753,21 +18591,21 @@ bn.exports;
18753
18591
  }
18754
18592
  return num;
18755
18593
  };
18756
- BN2._prime = function prime(name2) {
18757
- if (primes[name2]) return primes[name2];
18594
+ BN2._prime = function prime(name) {
18595
+ if (primes[name]) return primes[name];
18758
18596
  var prime2;
18759
- if (name2 === "k256") {
18597
+ if (name === "k256") {
18760
18598
  prime2 = new K256();
18761
- } else if (name2 === "p224") {
18599
+ } else if (name === "p224") {
18762
18600
  prime2 = new P224();
18763
- } else if (name2 === "p192") {
18601
+ } else if (name === "p192") {
18764
18602
  prime2 = new P192();
18765
- } else if (name2 === "p25519") {
18603
+ } else if (name === "p25519") {
18766
18604
  prime2 = new P25519();
18767
18605
  } else {
18768
- throw new Error("Unknown prime " + name2);
18606
+ throw new Error("Unknown prime " + name);
18769
18607
  }
18770
- primes[name2] = prime2;
18608
+ primes[name] = prime2;
18771
18609
  return prime2;
18772
18610
  };
18773
18611
  function Red(m) {
@@ -19047,75 +18885,9 @@ function crt$2(msg, priv2) {
19047
18885
  crt$2.getr = getr;
19048
18886
  var browserifyRsa = crt$2;
19049
18887
  var elliptic = {};
19050
- const name$1 = "elliptic";
19051
18888
  const version$2 = "6.5.7";
19052
- const description$1 = "EC cryptography";
19053
- const main$1 = "lib/elliptic.js";
19054
- const files = [
19055
- "lib"
19056
- ];
19057
- const scripts$1 = {
19058
- lint: "eslint lib test",
19059
- "lint:fix": "npm run lint -- --fix",
19060
- unit: "istanbul test _mocha --reporter=spec test/index.js",
19061
- test: "npm run lint && npm run unit",
19062
- version: "grunt dist && git add dist/"
19063
- };
19064
- const repository$1 = {
19065
- type: "git",
19066
- url: "git@github.com:indutny/elliptic"
19067
- };
19068
- const keywords$1 = [
19069
- "EC",
19070
- "Elliptic",
19071
- "curve",
19072
- "Cryptography"
19073
- ];
19074
- const author = "Fedor Indutny <fedor@indutny.com>";
19075
- const license$1 = "MIT";
19076
- const bugs = {
19077
- url: "https://github.com/indutny/elliptic/issues"
19078
- };
19079
- const homepage = "https://github.com/indutny/elliptic";
19080
- const devDependencies$1 = {
19081
- brfs: "^2.0.2",
19082
- coveralls: "^3.1.0",
19083
- eslint: "^7.6.0",
19084
- grunt: "^1.2.1",
19085
- "grunt-browserify": "^5.3.0",
19086
- "grunt-cli": "^1.3.2",
19087
- "grunt-contrib-connect": "^3.0.0",
19088
- "grunt-contrib-copy": "^1.0.0",
19089
- "grunt-contrib-uglify": "^5.0.0",
19090
- "grunt-mocha-istanbul": "^5.0.2",
19091
- "grunt-saucelabs": "^9.0.1",
19092
- istanbul: "^0.4.5",
19093
- mocha: "^8.0.1"
19094
- };
19095
- const dependencies = {
19096
- "bn.js": "^4.11.9",
19097
- brorand: "^1.1.0",
19098
- "hash.js": "^1.0.0",
19099
- "hmac-drbg": "^1.0.1",
19100
- inherits: "^2.0.4",
19101
- "minimalistic-assert": "^1.0.1",
19102
- "minimalistic-crypto-utils": "^1.0.1"
19103
- };
19104
18889
  const require$$0 = {
19105
- name: name$1,
19106
- version: version$2,
19107
- description: description$1,
19108
- main: main$1,
19109
- files,
19110
- scripts: scripts$1,
19111
- repository: repository$1,
19112
- keywords: keywords$1,
19113
- author,
19114
- license: license$1,
19115
- bugs,
19116
- homepage,
19117
- devDependencies: devDependencies$1,
19118
- dependencies
18890
+ version: version$2
19119
18891
  };
19120
18892
  var utils$l = {};
19121
18893
  var utils$k = {};
@@ -19258,9 +19030,9 @@ var utils$k = {};
19258
19030
  return jsf;
19259
19031
  }
19260
19032
  utils2.getJSF = getJSF2;
19261
- function cachedProperty2(obj, name2, computer) {
19262
- var key2 = "_" + name2;
19263
- obj.prototype[name2] = function cachedProperty3() {
19033
+ function cachedProperty2(obj, name, computer) {
19034
+ var key2 = "_" + name;
19035
+ obj.prototype[name] = function cachedProperty3() {
19264
19036
  return this[key2] !== void 0 ? this[key2] : this[key2] = computer.call(this);
19265
19037
  };
19266
19038
  }
@@ -23060,13 +22832,13 @@ function requireSecp256k1() {
23060
22832
  assert2(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O");
23061
22833
  }
23062
22834
  curves2.PresetCurve = PresetCurve;
23063
- function defineCurve(name2, options2) {
23064
- Object.defineProperty(curves2, name2, {
22835
+ function defineCurve(name, options2) {
22836
+ Object.defineProperty(curves2, name, {
23065
22837
  configurable: true,
23066
22838
  enumerable: true,
23067
22839
  get: function() {
23068
22840
  var curve2 = new PresetCurve(options2);
23069
- Object.defineProperty(curves2, name2, {
22841
+ Object.defineProperty(curves2, name, {
23070
22842
  configurable: true,
23071
22843
  enumerable: true,
23072
22844
  value: curve2
@@ -23890,7 +23662,7 @@ EDDSA.prototype.encodePoint = function encodePoint(point5) {
23890
23662
  EDDSA.prototype.decodePoint = function decodePoint3(bytes) {
23891
23663
  bytes = utils.parseBytes(bytes);
23892
23664
  var lastIx = bytes.length - 1;
23893
- var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
23665
+ var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & -129);
23894
23666
  var xIsOdd = (bytes[lastIx] & 128) !== 0;
23895
23667
  var y = utils.intFromLE(normed);
23896
23668
  return this.curve.pointFromY(y, xIsOdd);
@@ -23953,8 +23725,8 @@ function requireVmBrowserify() {
23953
23725
  var defineProp = function() {
23954
23726
  try {
23955
23727
  Object.defineProperty({}, "_", {});
23956
- return function(obj, name2, value) {
23957
- Object.defineProperty(obj, name2, {
23728
+ return function(obj, name, value) {
23729
+ Object.defineProperty(obj, name, {
23958
23730
  writable: true,
23959
23731
  enumerable: false,
23960
23732
  configurable: true,
@@ -23962,8 +23734,8 @@ function requireVmBrowserify() {
23962
23734
  });
23963
23735
  };
23964
23736
  } catch (e) {
23965
- return function(obj, name2, value) {
23966
- obj[name2] = value;
23737
+ return function(obj, name, value) {
23738
+ obj[name] = value;
23967
23739
  };
23968
23740
  }
23969
23741
  }();
@@ -24057,10 +23829,10 @@ function requireVmBrowserify() {
24057
23829
  }
24058
23830
  return res;
24059
23831
  };
24060
- forEach(Object_keys(Script.prototype), function(name2) {
24061
- exports[name2] = Script[name2] = function(code) {
23832
+ forEach(Object_keys(Script.prototype), function(name) {
23833
+ exports[name] = Script[name] = function(code) {
24062
23834
  var s2 = Script(code);
24063
- return s2[name2].apply(s2, [].slice.call(arguments, 1));
23835
+ return s2[name].apply(s2, [].slice.call(arguments, 1));
24064
23836
  };
24065
23837
  });
24066
23838
  exports.isContext = function(context) {
@@ -24089,11 +23861,11 @@ function requireApi() {
24089
23861
  var asn12 = requireAsn1();
24090
23862
  var inherits2 = inherits_browserExports;
24091
23863
  var api2 = exports2;
24092
- api2.define = function define2(name2, body) {
24093
- return new Entity(name2, body);
23864
+ api2.define = function define2(name, body) {
23865
+ return new Entity(name, body);
24094
23866
  };
24095
- function Entity(name2, body) {
24096
- this.name = name2;
23867
+ function Entity(name, body) {
23868
+ this.name = name;
24097
23869
  this.body = body;
24098
23870
  this.decoders = {};
24099
23871
  this.encoders = {};
@@ -25753,7 +25525,7 @@ var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:2
25753
25525
  var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;
25754
25526
  var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m;
25755
25527
  var evp = evp_bytestokey;
25756
- var ciphers$1 = browser$6;
25528
+ var ciphers$1 = browser$5;
25757
25529
  var Buffer$6 = safeBufferExports$1.Buffer;
25758
25530
  var fixProc$1 = function(okey, password) {
25759
25531
  var key2 = okey.toString();
@@ -25782,8 +25554,8 @@ var fixProc$1 = function(okey, password) {
25782
25554
  var asn1 = asn1$3;
25783
25555
  var aesid = require$$1;
25784
25556
  var fixProc = fixProc$1;
25785
- var ciphers = browser$6;
25786
- var compat = browser$8;
25557
+ var ciphers = browser$5;
25558
+ var compat = browser$7;
25787
25559
  var Buffer$5 = safeBufferExports$1.Buffer;
25788
25560
  function decrypt$1(data, password) {
25789
25561
  var salt = data.algorithm.decrypt.kde.kdeparams.salt;
@@ -25895,7 +25667,7 @@ function requireSign() {
25895
25667
  if (hasRequiredSign) return sign.exports;
25896
25668
  hasRequiredSign = 1;
25897
25669
  var Buffer2 = safeBufferExports$1.Buffer;
25898
- var createHmac2 = browser$9;
25670
+ var createHmac2 = browser$8;
25899
25671
  var crt2 = browserifyRsa;
25900
25672
  var EC = requireElliptic().ec;
25901
25673
  var BN2 = bnExports;
@@ -26133,13 +25905,13 @@ function requireVerify() {
26133
25905
  verify_1 = verify4;
26134
25906
  return verify_1;
26135
25907
  }
26136
- var browser$4;
25908
+ var browser$3;
26137
25909
  var hasRequiredBrowser$1;
26138
25910
  function requireBrowser$1() {
26139
- if (hasRequiredBrowser$1) return browser$4;
25911
+ if (hasRequiredBrowser$1) return browser$3;
26140
25912
  hasRequiredBrowser$1 = 1;
26141
25913
  var Buffer2 = safeBufferExports$1.Buffer;
26142
- var createHash3 = browser$a;
25914
+ var createHash3 = browser$9;
26143
25915
  var stream = readableBrowserExports;
26144
25916
  var inherits2 = inherits_browserExports;
26145
25917
  var sign5 = requireSign();
@@ -26206,22 +25978,22 @@ function requireBrowser$1() {
26206
25978
  function createVerify(algorithm) {
26207
25979
  return new Verify(algorithm);
26208
25980
  }
26209
- browser$4 = {
25981
+ browser$3 = {
26210
25982
  Sign: createSign,
26211
25983
  Verify: createVerify,
26212
25984
  createSign,
26213
25985
  createVerify
26214
25986
  };
26215
- return browser$4;
25987
+ return browser$3;
26216
25988
  }
26217
- var browser$3;
25989
+ var browser$2;
26218
25990
  var hasRequiredBrowser;
26219
25991
  function requireBrowser() {
26220
- if (hasRequiredBrowser) return browser$3;
25992
+ if (hasRequiredBrowser) return browser$2;
26221
25993
  hasRequiredBrowser = 1;
26222
25994
  var elliptic2 = requireElliptic();
26223
25995
  var BN2 = bnExports$1;
26224
- browser$3 = function createECDH(curve2) {
25996
+ browser$2 = function createECDH(curve2) {
26225
25997
  return new ECDH(curve2);
26226
25998
  };
26227
25999
  var aliases = {
@@ -26331,10 +26103,10 @@ function requireBrowser() {
26331
26103
  return buf.toString(enc);
26332
26104
  }
26333
26105
  }
26334
- return browser$3;
26106
+ return browser$2;
26335
26107
  }
26336
- var browser$2 = {};
26337
- var createHash$2 = browser$a;
26108
+ var browser$1 = {};
26109
+ var createHash$2 = browser$9;
26338
26110
  var Buffer$4 = safeBufferExports$1.Buffer;
26339
26111
  var mgf$2 = function(seed, len) {
26340
26112
  var t = Buffer$4.alloc(0);
@@ -26367,7 +26139,7 @@ function withPublic$2(paddedMsg, key2) {
26367
26139
  var withPublic_1 = withPublic$2;
26368
26140
  var parseKeys$1 = parseAsn1;
26369
26141
  var randomBytes = browserExports;
26370
- var createHash$1 = browser$a;
26142
+ var createHash$1 = browser$9;
26371
26143
  var mgf$1 = mgf$2;
26372
26144
  var xor$1 = xor$2;
26373
26145
  var BN$1 = bnExports$1;
@@ -26456,7 +26228,7 @@ var mgf = mgf$2;
26456
26228
  var xor = xor$2;
26457
26229
  var BN = bnExports$1;
26458
26230
  var crt = browserifyRsa;
26459
- var createHash = browser$a;
26231
+ var createHash = browser$9;
26460
26232
  var withPublic = withPublic_1;
26461
26233
  var Buffer$1 = safeBufferExports$1.Buffer;
26462
26234
  var privateDecrypt = function privateDecrypt2(privateKey, enc, reverse) {
@@ -26560,8 +26332,8 @@ function compare(a, b) {
26560
26332
  exports2.publicDecrypt = function publicDecrypt(key2, buf) {
26561
26333
  return exports2.privateDecrypt(key2, buf, true);
26562
26334
  };
26563
- })(browser$2);
26564
- var browser$1 = {};
26335
+ })(browser$1);
26336
+ var browser = {};
26565
26337
  function oldBrowser() {
26566
26338
  throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11");
26567
26339
  }
@@ -26593,12 +26365,12 @@ function assertSize(size, offset, length) {
26593
26365
  throw new RangeError("buffer too small");
26594
26366
  }
26595
26367
  }
26596
- if (crypto$1 && crypto$1.getRandomValues || !process$1.browser) {
26597
- browser$1.randomFill = randomFill;
26598
- browser$1.randomFillSync = randomFillSync;
26368
+ if (crypto$1 && crypto$1.getRandomValues || !globals.process$1.browser) {
26369
+ browser.randomFill = randomFill;
26370
+ browser.randomFillSync = randomFillSync;
26599
26371
  } else {
26600
- browser$1.randomFill = oldBrowser;
26601
- browser$1.randomFillSync = oldBrowser;
26372
+ browser.randomFill = oldBrowser;
26373
+ browser.randomFillSync = oldBrowser;
26602
26374
  }
26603
26375
  function randomFill(buf, offset, size, cb) {
26604
26376
  if (!Buffer.isBuffer(buf) && !(buf instanceof commonjsGlobal.Uint8Array)) {
@@ -26619,12 +26391,12 @@ function randomFill(buf, offset, size, cb) {
26619
26391
  return actualFill(buf, offset, size, cb);
26620
26392
  }
26621
26393
  function actualFill(buf, offset, size, cb) {
26622
- if (process$1.browser) {
26394
+ if (globals.process$1.browser) {
26623
26395
  var ourBuf = buf.buffer;
26624
26396
  var uint = new Uint8Array(ourBuf, offset, size);
26625
26397
  crypto$1.getRandomValues(uint);
26626
26398
  if (cb) {
26627
- process$1.nextTick(function() {
26399
+ globals.process$1.nextTick(function() {
26628
26400
  cb(null, buf);
26629
26401
  });
26630
26402
  return;
@@ -26662,8 +26434,8 @@ function requireCryptoBrowserify() {
26662
26434
  if (hasRequiredCryptoBrowserify) return cryptoBrowserify;
26663
26435
  hasRequiredCryptoBrowserify = 1;
26664
26436
  cryptoBrowserify.randomBytes = cryptoBrowserify.rng = cryptoBrowserify.pseudoRandomBytes = cryptoBrowserify.prng = browserExports;
26665
- cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$a;
26666
- cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$9;
26437
+ cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$9;
26438
+ cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$8;
26667
26439
  var algos$1 = algos;
26668
26440
  var algoKeys = Object.keys(algos$1);
26669
26441
  var hashes = [
@@ -26678,10 +26450,10 @@ function requireCryptoBrowserify() {
26678
26450
  cryptoBrowserify.getHashes = function() {
26679
26451
  return hashes;
26680
26452
  };
26681
- var p = browser$8;
26453
+ var p = browser$7;
26682
26454
  cryptoBrowserify.pbkdf2 = p.pbkdf2;
26683
26455
  cryptoBrowserify.pbkdf2Sync = p.pbkdf2Sync;
26684
- var aes2 = browser$7;
26456
+ var aes2 = browser$6;
26685
26457
  cryptoBrowserify.Cipher = aes2.Cipher;
26686
26458
  cryptoBrowserify.createCipher = aes2.createCipher;
26687
26459
  cryptoBrowserify.Cipheriv = aes2.Cipheriv;
@@ -26704,12 +26476,12 @@ function requireCryptoBrowserify() {
26704
26476
  cryptoBrowserify.createVerify = sign5.createVerify;
26705
26477
  cryptoBrowserify.Verify = sign5.Verify;
26706
26478
  cryptoBrowserify.createECDH = requireBrowser();
26707
- var publicEncrypt3 = browser$2;
26479
+ var publicEncrypt3 = browser$1;
26708
26480
  cryptoBrowserify.publicEncrypt = publicEncrypt3.publicEncrypt;
26709
26481
  cryptoBrowserify.privateEncrypt = publicEncrypt3.privateEncrypt;
26710
26482
  cryptoBrowserify.publicDecrypt = publicEncrypt3.publicDecrypt;
26711
26483
  cryptoBrowserify.privateDecrypt = publicEncrypt3.privateDecrypt;
26712
- var rf = browser$1;
26484
+ var rf = browser;
26713
26485
  cryptoBrowserify.randomFill = rf.randomFill;
26714
26486
  cryptoBrowserify.randomFillSync = rf.randomFillSync;
26715
26487
  cryptoBrowserify.createCredentials = function() {
@@ -26734,89 +26506,13 @@ function requireCryptoBrowserify() {
26734
26506
  };
26735
26507
  return cryptoBrowserify;
26736
26508
  }
26737
- const name = "dotenv";
26738
26509
  const version$1 = "16.4.5";
26739
- const description = "Loads environment variables from .env file";
26740
- const main = "lib/main.js";
26741
- const types = "lib/main.d.ts";
26742
- const exports$1 = {
26743
- ".": {
26744
- types: "./lib/main.d.ts",
26745
- require: "./lib/main.js",
26746
- "default": "./lib/main.js"
26747
- },
26748
- "./config": "./config.js",
26749
- "./config.js": "./config.js",
26750
- "./lib/env-options": "./lib/env-options.js",
26751
- "./lib/env-options.js": "./lib/env-options.js",
26752
- "./lib/cli-options": "./lib/cli-options.js",
26753
- "./lib/cli-options.js": "./lib/cli-options.js",
26754
- "./package.json": "./package.json"
26755
- };
26756
- const scripts = {
26757
- "dts-check": "tsc --project tests/types/tsconfig.json",
26758
- lint: "standard",
26759
- "lint-readme": "standard-markdown",
26760
- pretest: "npm run lint && npm run dts-check",
26761
- test: "tap tests/*.js --100 -Rspec",
26762
- "test:coverage": "tap --coverage-report=lcov",
26763
- prerelease: "npm test",
26764
- release: "standard-version"
26765
- };
26766
- const repository = {
26767
- type: "git",
26768
- url: "git://github.com/motdotla/dotenv.git"
26769
- };
26770
- const funding = "https://dotenvx.com";
26771
- const keywords = [
26772
- "dotenv",
26773
- "env",
26774
- ".env",
26775
- "environment",
26776
- "variables",
26777
- "config",
26778
- "settings"
26779
- ];
26780
- const readmeFilename = "README.md";
26781
- const license = "BSD-2-Clause";
26782
- const devDependencies = {
26783
- "@definitelytyped/dtslint": "^0.0.133",
26784
- "@types/node": "^18.11.3",
26785
- decache: "^4.6.1",
26786
- sinon: "^14.0.1",
26787
- standard: "^17.0.0",
26788
- "standard-markdown": "^7.1.0",
26789
- "standard-version": "^9.5.0",
26790
- tap: "^16.3.0",
26791
- tar: "^6.1.11",
26792
- typescript: "^4.8.4"
26793
- };
26794
- const engines = {
26795
- node: ">=12"
26796
- };
26797
- const browser = {
26798
- fs: false
26799
- };
26800
26510
  const require$$4 = {
26801
- name,
26802
- version: version$1,
26803
- description,
26804
- main,
26805
- types,
26806
- exports: exports$1,
26807
- scripts,
26808
- repository,
26809
- funding,
26810
- keywords,
26811
- readmeFilename,
26812
- license,
26813
- devDependencies,
26814
- engines,
26815
- browser
26511
+ version: version$1
26816
26512
  };
26817
26513
  const fs = empty_1;
26818
26514
  const path = pathBrowserify;
26819
- const os = browser$d;
26515
+ const os = browser$c;
26820
26516
  const crypto = requireCryptoBrowserify();
26821
26517
  const packageJson = require$$4;
26822
26518
  const version = packageJson.version;
@@ -26878,8 +26574,8 @@ function _dotenvKey(options2) {
26878
26574
  if (options2 && options2.DOTENV_KEY && options2.DOTENV_KEY.length > 0) {
26879
26575
  return options2.DOTENV_KEY;
26880
26576
  }
26881
- if (process$1.env.DOTENV_KEY && process$1.env.DOTENV_KEY.length > 0) {
26882
- return process$1.env.DOTENV_KEY;
26577
+ if (globals.process$1.env.DOTENV_KEY && globals.process$1.env.DOTENV_KEY.length > 0) {
26578
+ return globals.process$1.env.DOTENV_KEY;
26883
26579
  }
26884
26580
  return "";
26885
26581
  }
@@ -26929,7 +26625,7 @@ function _vaultPath(options2) {
26929
26625
  possibleVaultPath = options2.path.endsWith(".vault") ? options2.path : `${options2.path}.vault`;
26930
26626
  }
26931
26627
  } else {
26932
- possibleVaultPath = path.resolve(process$1.cwd(), ".env.vault");
26628
+ possibleVaultPath = path.resolve(globals.process$1.cwd(), ".env.vault");
26933
26629
  }
26934
26630
  if (fs.existsSync(possibleVaultPath)) {
26935
26631
  return possibleVaultPath;
@@ -26942,7 +26638,7 @@ function _resolveHome(envPath) {
26942
26638
  function _configVault(options2) {
26943
26639
  _log("Loading env from encrypted .env.vault");
26944
26640
  const parsed = DotenvModule._parseVault(options2);
26945
- let processEnv = process$1.env;
26641
+ let processEnv = globals.process$1.env;
26946
26642
  if (options2 && options2.processEnv != null) {
26947
26643
  processEnv = options2.processEnv;
26948
26644
  }
@@ -26950,7 +26646,7 @@ function _configVault(options2) {
26950
26646
  return { parsed };
26951
26647
  }
26952
26648
  function configDotenv(options2) {
26953
- const dotenvPath = path.resolve(process$1.cwd(), ".env");
26649
+ const dotenvPath = path.resolve(globals.process$1.cwd(), ".env");
26954
26650
  let encoding = "utf8";
26955
26651
  const debug = Boolean(options2 && options2.debug);
26956
26652
  if (options2 && options2.encoding) {
@@ -26984,7 +26680,7 @@ function configDotenv(options2) {
26984
26680
  lastError = e;
26985
26681
  }
26986
26682
  }
26987
- let processEnv = process$1.env;
26683
+ let processEnv = globals.process$1.env;
26988
26684
  if (options2 && options2.processEnv != null) {
26989
26685
  processEnv = options2.processEnv;
26990
26686
  }
@@ -27067,30 +26763,30 @@ const DotenvModule = {
27067
26763
  parse: parse$1,
27068
26764
  populate
27069
26765
  };
27070
- main$2.exports.configDotenv = DotenvModule.configDotenv;
27071
- main$2.exports._configVault = DotenvModule._configVault;
27072
- main$2.exports._parseVault = DotenvModule._parseVault;
27073
- main$2.exports.config = DotenvModule.config;
27074
- main$2.exports.decrypt = DotenvModule.decrypt;
27075
- main$2.exports.parse = DotenvModule.parse;
27076
- main$2.exports.populate = DotenvModule.populate;
27077
- main$2.exports = DotenvModule;
27078
- var mainExports = main$2.exports;
26766
+ main.exports.configDotenv = DotenvModule.configDotenv;
26767
+ main.exports._configVault = DotenvModule._configVault;
26768
+ main.exports._parseVault = DotenvModule._parseVault;
26769
+ main.exports.config = DotenvModule.config;
26770
+ main.exports.decrypt = DotenvModule.decrypt;
26771
+ main.exports.parse = DotenvModule.parse;
26772
+ main.exports.populate = DotenvModule.populate;
26773
+ main.exports = DotenvModule;
26774
+ var mainExports = main.exports;
27079
26775
  const options = {};
27080
- if (process$1.env.DOTENV_CONFIG_ENCODING != null) {
27081
- options.encoding = process$1.env.DOTENV_CONFIG_ENCODING;
26776
+ if (globals.process$1.env.DOTENV_CONFIG_ENCODING != null) {
26777
+ options.encoding = globals.process$1.env.DOTENV_CONFIG_ENCODING;
27082
26778
  }
27083
- if (process$1.env.DOTENV_CONFIG_PATH != null) {
27084
- options.path = process$1.env.DOTENV_CONFIG_PATH;
26779
+ if (globals.process$1.env.DOTENV_CONFIG_PATH != null) {
26780
+ options.path = globals.process$1.env.DOTENV_CONFIG_PATH;
27085
26781
  }
27086
- if (process$1.env.DOTENV_CONFIG_DEBUG != null) {
27087
- options.debug = process$1.env.DOTENV_CONFIG_DEBUG;
26782
+ if (globals.process$1.env.DOTENV_CONFIG_DEBUG != null) {
26783
+ options.debug = globals.process$1.env.DOTENV_CONFIG_DEBUG;
27088
26784
  }
27089
- if (process$1.env.DOTENV_CONFIG_OVERRIDE != null) {
27090
- options.override = process$1.env.DOTENV_CONFIG_OVERRIDE;
26785
+ if (globals.process$1.env.DOTENV_CONFIG_OVERRIDE != null) {
26786
+ options.override = globals.process$1.env.DOTENV_CONFIG_OVERRIDE;
27091
26787
  }
27092
- if (process$1.env.DOTENV_CONFIG_DOTENV_KEY != null) {
27093
- options.DOTENV_KEY = process$1.env.DOTENV_CONFIG_DOTENV_KEY;
26788
+ if (globals.process$1.env.DOTENV_CONFIG_DOTENV_KEY != null) {
26789
+ options.DOTENV_KEY = globals.process$1.env.DOTENV_CONFIG_DOTENV_KEY;
27094
26790
  }
27095
26791
  var envOptions = options;
27096
26792
  const re = /^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/;
@@ -27108,7 +26804,7 @@ var cliOptions = function optionMatcher(args) {
27108
26804
  Object.assign(
27109
26805
  {},
27110
26806
  envOptions,
27111
- cliOptions(process$1.argv)
26807
+ cliOptions(globals.process$1.argv)
27112
26808
  )
27113
26809
  );
27114
26810
  })();
@@ -27133,14 +26829,14 @@ const getOperator = (client, args) => client.request(GetOperatorDocument, args).
27133
26829
  if (!res.operator) return null;
27134
26830
  return {
27135
26831
  ...res.operator,
27136
- publicKey: config$2.decodeOperatorPublicKey(res.operator.publicKey),
26832
+ publicKey: globals.decodeOperatorPublicKey(res.operator.publicKey),
27137
26833
  whitelisted: res.operator.whitelisted.map((v) => v.id)
27138
26834
  };
27139
26835
  });
27140
26836
  const getOperators = (client, args) => client.request(GetOperatorsDocument, args).then(
27141
26837
  (res) => res.operators.map((o) => ({
27142
26838
  ...o,
27143
- publicKey: config$2.decodeOperatorPublicKey(o.publicKey),
26839
+ publicKey: globals.decodeOperatorPublicKey(o.publicKey),
27144
26840
  whitelisted: o.whitelisted.map((v) => v.id)
27145
26841
  }))
27146
26842
  );
@@ -27158,124 +26854,6 @@ const getQueries = (client) => ({
27158
26854
  getValidator: getValidator.bind(null, client),
27159
26855
  getClusterBalance: getClusterBalance$1.bind(null, client)
27160
26856
  });
27161
- function defineChain(chain) {
27162
- return {
27163
- formatters: void 0,
27164
- fees: void 0,
27165
- serializers: void 0,
27166
- ...chain
27167
- };
27168
- }
27169
- const holesky = /* @__PURE__ */ defineChain({
27170
- id: 17e3,
27171
- name: "Holesky",
27172
- nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
27173
- rpcUrls: {
27174
- default: {
27175
- http: ["https://ethereum-holesky-rpc.publicnode.com"]
27176
- }
27177
- },
27178
- blockExplorers: {
27179
- default: {
27180
- name: "Etherscan",
27181
- url: "https://holesky.etherscan.io",
27182
- apiUrl: "https://api-holesky.etherscan.io/api"
27183
- }
27184
- },
27185
- contracts: {
27186
- multicall3: {
27187
- address: "0xca11bde05977b3631167028862be2a173976ca11",
27188
- blockCreated: 77
27189
- },
27190
- ensRegistry: {
27191
- address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
27192
- blockCreated: 801613
27193
- },
27194
- ensUniversalResolver: {
27195
- address: "0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",
27196
- blockCreated: 973484
27197
- }
27198
- },
27199
- testnet: true
27200
- });
27201
- const mainnet = /* @__PURE__ */ defineChain({
27202
- id: 1,
27203
- name: "Ethereum",
27204
- nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
27205
- rpcUrls: {
27206
- default: {
27207
- http: ["https://cloudflare-eth.com"]
27208
- }
27209
- },
27210
- blockExplorers: {
27211
- default: {
27212
- name: "Etherscan",
27213
- url: "https://etherscan.io",
27214
- apiUrl: "https://api.etherscan.io/api"
27215
- }
27216
- },
27217
- contracts: {
27218
- ensRegistry: {
27219
- address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
27220
- },
27221
- ensUniversalResolver: {
27222
- address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
27223
- blockCreated: 19258213
27224
- },
27225
- multicall3: {
27226
- address: "0xca11bde05977b3631167028862be2a173976ca11",
27227
- blockCreated: 14353601
27228
- }
27229
- }
27230
- });
27231
- const hoodi = viem.defineChain({
27232
- id: 560048,
27233
- name: "Hoodi",
27234
- rpcUrls: {
27235
- default: {
27236
- http: ["https://rpc.hoodi.ethpandaops.io"]
27237
- }
27238
- },
27239
- nativeCurrency: {
27240
- name: "Hoodi Ether",
27241
- symbol: "ETH",
27242
- decimals: 18
27243
- },
27244
- testnet: true
27245
- });
27246
- const chains = {
27247
- mainnet,
27248
- holesky,
27249
- hoodi
27250
- };
27251
- const chainIds = Object.values(chains).map((chain) => chain.id);
27252
- const graph_endpoints = {
27253
- [mainnet.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest",
27254
- [holesky.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-holesky/version/latest",
27255
- [hoodi.id]: "https://graph-node-hoodi.stage.ops.ssvlabsinternal.com/subgraphs/name/ssv-bapps-hoodi/graphql"
27256
- };
27257
- const rest_endpoints = {
27258
- [mainnet.id]: "https://api.ssv.network/api/v4/mainnet",
27259
- [holesky.id]: "https://api.ssv.network/api/v4/holesky",
27260
- [hoodi.id]: "https://api.stage.ops.ssvlabsinternal.com/api/v4/hoodi"
27261
- };
27262
- const contracts = {
27263
- [mainnet.id]: {
27264
- setter: "0xDD9BC35aE942eF0cFa76930954a156B3fF30a4E1",
27265
- getter: "0xafE830B6Ee262ba11cce5F32fDCd760FFE6a66e4",
27266
- token: "0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54"
27267
- },
27268
- [holesky.id]: {
27269
- setter: "0x38A4794cCEd47d3baf7370CcC43B560D3a1beEFA",
27270
- getter: "0x352A18AEe90cdcd825d1E37d9939dCA86C00e281",
27271
- token: "0xad45A78180961079BFaeEe349704F411dfF947C6"
27272
- },
27273
- [hoodi.id]: {
27274
- setter: "0x58410Bef803ECd7E63B23664C586A6DB72DAf59c",
27275
- getter: "0x5AdDb3f1529C5ec70D77400499eE4bbF328368fe",
27276
- token: "0x9F5d4Ec84fC4785788aB44F9de973cF34F7A038e"
27277
- }
27278
- };
27279
26857
  const MainnetV4GetterABI = [
27280
26858
  {
27281
26859
  inputs: [],
@@ -31952,7 +31530,7 @@ function setCacheHas(value) {
31952
31530
  }
31953
31531
  function SetCache(values) {
31954
31532
  var index = -1, length = values == null ? 0 : values.length;
31955
- this.__data__ = new config$2.MapCache();
31533
+ this.__data__ = new globals.MapCache();
31956
31534
  while (++index < length) {
31957
31535
  this.add(values[index]);
31958
31536
  }
@@ -32032,7 +31610,7 @@ function setToArray(set) {
32032
31610
  var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
32033
31611
  var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
32034
31612
  var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
32035
- var symbolProto = config$2.Symbol ? config$2.Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
31613
+ var symbolProto = globals.Symbol ? globals.Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
32036
31614
  function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
32037
31615
  switch (tag) {
32038
31616
  case dataViewTag:
@@ -32042,14 +31620,14 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
32042
31620
  object = object.buffer;
32043
31621
  other = other.buffer;
32044
31622
  case arrayBufferTag:
32045
- if (object.byteLength != other.byteLength || !equalFunc(new config$2.Uint8Array(object), new config$2.Uint8Array(other))) {
31623
+ if (object.byteLength != other.byteLength || !equalFunc(new globals.Uint8Array(object), new globals.Uint8Array(other))) {
32046
31624
  return false;
32047
31625
  }
32048
31626
  return true;
32049
31627
  case boolTag:
32050
31628
  case dateTag:
32051
31629
  case numberTag:
32052
- return config$2.eq(+object, +other);
31630
+ return globals.eq(+object, +other);
32053
31631
  case errorTag:
32054
31632
  return object.name == other.name && object.message == other.message;
32055
31633
  case regexpTag:
@@ -32083,7 +31661,7 @@ var COMPARE_PARTIAL_FLAG$1 = 1;
32083
31661
  var objectProto$1 = Object.prototype;
32084
31662
  var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
32085
31663
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
32086
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = config$2.getAllKeys(object), objLength = objProps.length, othProps = config$2.getAllKeys(other), othLength = othProps.length;
31664
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = globals.getAllKeys(object), objLength = objProps.length, othProps = globals.getAllKeys(other), othLength = othProps.length;
32087
31665
  if (objLength != othLength && !isPartial) {
32088
31666
  return false;
32089
31667
  }
@@ -32130,40 +31708,40 @@ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[o
32130
31708
  var objectProto = Object.prototype;
32131
31709
  var hasOwnProperty = objectProto.hasOwnProperty;
32132
31710
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
32133
- var objIsArr = config$2.isArray(object), othIsArr = config$2.isArray(other), objTag = objIsArr ? arrayTag : config$2.getTag(object), othTag = othIsArr ? arrayTag : config$2.getTag(other);
31711
+ var objIsArr = globals.isArray(object), othIsArr = globals.isArray(other), objTag = objIsArr ? arrayTag : globals.getTag(object), othTag = othIsArr ? arrayTag : globals.getTag(other);
32134
31712
  objTag = objTag == argsTag ? objectTag : objTag;
32135
31713
  othTag = othTag == argsTag ? objectTag : othTag;
32136
31714
  var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
32137
- if (isSameTag && config$2.isBuffer(object)) {
32138
- if (!config$2.isBuffer(other)) {
31715
+ if (isSameTag && globals.isBuffer(object)) {
31716
+ if (!globals.isBuffer(other)) {
32139
31717
  return false;
32140
31718
  }
32141
31719
  objIsArr = true;
32142
31720
  objIsObj = false;
32143
31721
  }
32144
31722
  if (isSameTag && !objIsObj) {
32145
- stack || (stack = new config$2.Stack());
32146
- return objIsArr || config$2.isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
31723
+ stack || (stack = new globals.Stack());
31724
+ return objIsArr || globals.isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
32147
31725
  }
32148
31726
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
32149
31727
  var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
32150
31728
  if (objIsWrapped || othIsWrapped) {
32151
31729
  var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
32152
- stack || (stack = new config$2.Stack());
31730
+ stack || (stack = new globals.Stack());
32153
31731
  return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
32154
31732
  }
32155
31733
  }
32156
31734
  if (!isSameTag) {
32157
31735
  return false;
32158
31736
  }
32159
- stack || (stack = new config$2.Stack());
31737
+ stack || (stack = new globals.Stack());
32160
31738
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
32161
31739
  }
32162
31740
  function baseIsEqual(value, other, bitmask, customizer, stack) {
32163
31741
  if (value === other) {
32164
31742
  return true;
32165
31743
  }
32166
- if (value == null || other == null || !config$2.isObjectLike(value) && !config$2.isObjectLike(other)) {
31744
+ if (value == null || other == null || !globals.isObjectLike(value) && !globals.isObjectLike(other)) {
32167
31745
  return value !== value && other !== other;
32168
31746
  }
32169
31747
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
@@ -32175,10 +31753,10 @@ const paramsToArray = ({
32175
31753
  params,
32176
31754
  abiFunction
32177
31755
  }) => {
32178
- return config$2.stringifyBigints(
31756
+ return globals.stringifyBigints(
32179
31757
  abiFunction.inputs.reduce(
32180
31758
  (acc, param) => {
32181
- if (param.name && !config$2.isUndefined(params[param.name])) {
31759
+ if (param.name && !globals.isUndefined(params[param.name])) {
32182
31760
  return [...acc, params[param.name]];
32183
31761
  } else {
32184
31762
  console.error(`Missing argument for ${param}`);
@@ -32271,6 +31849,13 @@ const createWriter = ({
32271
31849
  args: paramsToArray({ params: options2.args, abiFunction: fn }),
32272
31850
  account: walletClient.account
32273
31851
  });
31852
+ const getTransactionData = (params) => {
31853
+ return viem.encodeFunctionData({
31854
+ abi,
31855
+ functionName: fn.name,
31856
+ args: paramsToArray({ params, abiFunction: fn })
31857
+ });
31858
+ };
32274
31859
  const func = async (options2) => {
32275
31860
  const { request } = await simulate(options2);
32276
31861
  const hash3 = await walletClient.writeContract(request);
@@ -32289,7 +31874,7 @@ const createWriter = ({
32289
31874
  acc.push(event);
32290
31875
  } catch {
32291
31876
  for (const eventAbi of ABIS) {
32292
- config$2.tryCatch(() => {
31877
+ globals.tryCatch(() => {
32293
31878
  const event = viem.decodeEventLog({
32294
31879
  abi: eventAbi,
32295
31880
  data: log.data,
@@ -32307,6 +31892,7 @@ const createWriter = ({
32307
31892
  };
32308
31893
  };
32309
31894
  func.simulate = simulate;
31895
+ func.getTransactionData = getTransactionData;
32310
31896
  return [fn.name, func];
32311
31897
  })
32312
31898
  );
@@ -32387,9 +31973,9 @@ const HeadersInitToPlainObject = (headers) => {
32387
31973
  if (headers instanceof Headers) {
32388
31974
  oHeaders = HeadersInstanceToPlainObject(headers);
32389
31975
  } else if (Array.isArray(headers)) {
32390
- headers.forEach(([name2, value]) => {
32391
- if (name2 && value !== void 0) {
32392
- oHeaders[name2] = value;
31976
+ headers.forEach(([name, value]) => {
31977
+ if (name && value !== void 0) {
31978
+ oHeaders[name] = value;
32393
31979
  }
32394
31980
  });
32395
31981
  } else if (headers) {
@@ -32672,8 +32258,8 @@ class GraphQLError extends Error {
32672
32258
  function undefinedIfEmpty(array) {
32673
32259
  return array === void 0 || array.length === 0 ? void 0 : array;
32674
32260
  }
32675
- function syntaxError(source, position, description2) {
32676
- return new GraphQLError(`Syntax Error: ${description2}`, {
32261
+ function syntaxError(source, position, description) {
32262
+ return new GraphQLError(`Syntax Error: ${description}`, {
32677
32263
  source,
32678
32264
  positions: [position]
32679
32265
  });
@@ -33582,15 +33168,15 @@ function formatArray(array, seenValues) {
33582
33168
  function getObjectTag(object) {
33583
33169
  const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
33584
33170
  if (tag === "Object" && typeof object.constructor === "function") {
33585
- const name2 = object.constructor.name;
33586
- if (typeof name2 === "string" && name2 !== "") {
33587
- return name2;
33171
+ const name = object.constructor.name;
33172
+ if (typeof name === "string" && name !== "") {
33173
+ return name;
33588
33174
  }
33589
33175
  }
33590
33176
  return tag;
33591
33177
  }
33592
33178
  const isProduction = globalThis.process && // eslint-disable-next-line no-undef
33593
- process$1.env.NODE_ENV === "production";
33179
+ globals.process$1.env.NODE_ENV === "production";
33594
33180
  const instanceOf = (
33595
33181
  /* c8 ignore next 6 */
33596
33182
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
@@ -33627,13 +33213,13 @@ spurious results.`);
33627
33213
  }
33628
33214
  );
33629
33215
  class Source {
33630
- constructor(body, name2 = "GraphQL request", locationOffset = {
33216
+ constructor(body, name = "GraphQL request", locationOffset = {
33631
33217
  line: 1,
33632
33218
  column: 1
33633
33219
  }) {
33634
33220
  typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);
33635
33221
  this.body = body;
33636
- this.name = name2;
33222
+ this.name = name;
33637
33223
  this.locationOffset = locationOffset;
33638
33224
  this.locationOffset.line > 0 || devAssert(
33639
33225
  false,
@@ -33773,14 +33359,14 @@ class Parser {
33773
33359
  });
33774
33360
  }
33775
33361
  const operation = this.parseOperationType();
33776
- let name2;
33362
+ let name;
33777
33363
  if (this.peek(TokenKind.NAME)) {
33778
- name2 = this.parseName();
33364
+ name = this.parseName();
33779
33365
  }
33780
33366
  return this.node(start, {
33781
33367
  kind: Kind.OPERATION_DEFINITION,
33782
33368
  operation,
33783
- name: name2,
33369
+ name,
33784
33370
  variableDefinitions: this.parseVariableDefinitions(),
33785
33371
  directives: this.parseDirectives(false),
33786
33372
  selectionSet: this.parseSelectionSet()
@@ -33867,17 +33453,17 @@ class Parser {
33867
33453
  const start = this._lexer.token;
33868
33454
  const nameOrAlias = this.parseName();
33869
33455
  let alias;
33870
- let name2;
33456
+ let name;
33871
33457
  if (this.expectOptionalToken(TokenKind.COLON)) {
33872
33458
  alias = nameOrAlias;
33873
- name2 = this.parseName();
33459
+ name = this.parseName();
33874
33460
  } else {
33875
- name2 = nameOrAlias;
33461
+ name = nameOrAlias;
33876
33462
  }
33877
33463
  return this.node(start, {
33878
33464
  kind: Kind.FIELD,
33879
33465
  alias,
33880
- name: name2,
33466
+ name,
33881
33467
  arguments: this.parseArguments(false),
33882
33468
  directives: this.parseDirectives(false),
33883
33469
  selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -33895,11 +33481,11 @@ class Parser {
33895
33481
  */
33896
33482
  parseArgument(isConst = false) {
33897
33483
  const start = this._lexer.token;
33898
- const name2 = this.parseName();
33484
+ const name = this.parseName();
33899
33485
  this.expectToken(TokenKind.COLON);
33900
33486
  return this.node(start, {
33901
33487
  kind: Kind.ARGUMENT,
33902
- name: name2,
33488
+ name,
33903
33489
  value: this.parseValueLiteral(isConst)
33904
33490
  });
33905
33491
  }
@@ -34094,11 +33680,11 @@ class Parser {
34094
33680
  */
34095
33681
  parseObjectField(isConst) {
34096
33682
  const start = this._lexer.token;
34097
- const name2 = this.parseName();
33683
+ const name = this.parseName();
34098
33684
  this.expectToken(TokenKind.COLON);
34099
33685
  return this.node(start, {
34100
33686
  kind: Kind.OBJECT_FIELD,
34101
- name: name2,
33687
+ name,
34102
33688
  value: this.parseValueLiteral(isConst)
34103
33689
  });
34104
33690
  }
@@ -34186,7 +33772,7 @@ class Parser {
34186
33772
  */
34187
33773
  parseSchemaDefinition() {
34188
33774
  const start = this._lexer.token;
34189
- const description2 = this.parseDescription();
33775
+ const description = this.parseDescription();
34190
33776
  this.expectKeyword("schema");
34191
33777
  const directives = this.parseConstDirectives();
34192
33778
  const operationTypes = this.many(
@@ -34196,7 +33782,7 @@ class Parser {
34196
33782
  );
34197
33783
  return this.node(start, {
34198
33784
  kind: Kind.SCHEMA_DEFINITION,
34199
- description: description2,
33785
+ description,
34200
33786
  directives,
34201
33787
  operationTypes
34202
33788
  });
@@ -34220,14 +33806,14 @@ class Parser {
34220
33806
  */
34221
33807
  parseScalarTypeDefinition() {
34222
33808
  const start = this._lexer.token;
34223
- const description2 = this.parseDescription();
33809
+ const description = this.parseDescription();
34224
33810
  this.expectKeyword("scalar");
34225
- const name2 = this.parseName();
33811
+ const name = this.parseName();
34226
33812
  const directives = this.parseConstDirectives();
34227
33813
  return this.node(start, {
34228
33814
  kind: Kind.SCALAR_TYPE_DEFINITION,
34229
- description: description2,
34230
- name: name2,
33815
+ description,
33816
+ name,
34231
33817
  directives
34232
33818
  });
34233
33819
  }
@@ -34238,16 +33824,16 @@ class Parser {
34238
33824
  */
34239
33825
  parseObjectTypeDefinition() {
34240
33826
  const start = this._lexer.token;
34241
- const description2 = this.parseDescription();
33827
+ const description = this.parseDescription();
34242
33828
  this.expectKeyword("type");
34243
- const name2 = this.parseName();
33829
+ const name = this.parseName();
34244
33830
  const interfaces = this.parseImplementsInterfaces();
34245
33831
  const directives = this.parseConstDirectives();
34246
33832
  const fields = this.parseFieldsDefinition();
34247
33833
  return this.node(start, {
34248
33834
  kind: Kind.OBJECT_TYPE_DEFINITION,
34249
- description: description2,
34250
- name: name2,
33835
+ description,
33836
+ name,
34251
33837
  interfaces,
34252
33838
  directives,
34253
33839
  fields
@@ -34279,16 +33865,16 @@ class Parser {
34279
33865
  */
34280
33866
  parseFieldDefinition() {
34281
33867
  const start = this._lexer.token;
34282
- const description2 = this.parseDescription();
34283
- const name2 = this.parseName();
33868
+ const description = this.parseDescription();
33869
+ const name = this.parseName();
34284
33870
  const args = this.parseArgumentDefs();
34285
33871
  this.expectToken(TokenKind.COLON);
34286
33872
  const type2 = this.parseTypeReference();
34287
33873
  const directives = this.parseConstDirectives();
34288
33874
  return this.node(start, {
34289
33875
  kind: Kind.FIELD_DEFINITION,
34290
- description: description2,
34291
- name: name2,
33876
+ description,
33877
+ name,
34292
33878
  arguments: args,
34293
33879
  type: type2,
34294
33880
  directives
@@ -34310,8 +33896,8 @@ class Parser {
34310
33896
  */
34311
33897
  parseInputValueDef() {
34312
33898
  const start = this._lexer.token;
34313
- const description2 = this.parseDescription();
34314
- const name2 = this.parseName();
33899
+ const description = this.parseDescription();
33900
+ const name = this.parseName();
34315
33901
  this.expectToken(TokenKind.COLON);
34316
33902
  const type2 = this.parseTypeReference();
34317
33903
  let defaultValue;
@@ -34321,8 +33907,8 @@ class Parser {
34321
33907
  const directives = this.parseConstDirectives();
34322
33908
  return this.node(start, {
34323
33909
  kind: Kind.INPUT_VALUE_DEFINITION,
34324
- description: description2,
34325
- name: name2,
33910
+ description,
33911
+ name,
34326
33912
  type: type2,
34327
33913
  defaultValue,
34328
33914
  directives
@@ -34334,16 +33920,16 @@ class Parser {
34334
33920
  */
34335
33921
  parseInterfaceTypeDefinition() {
34336
33922
  const start = this._lexer.token;
34337
- const description2 = this.parseDescription();
33923
+ const description = this.parseDescription();
34338
33924
  this.expectKeyword("interface");
34339
- const name2 = this.parseName();
33925
+ const name = this.parseName();
34340
33926
  const interfaces = this.parseImplementsInterfaces();
34341
33927
  const directives = this.parseConstDirectives();
34342
33928
  const fields = this.parseFieldsDefinition();
34343
33929
  return this.node(start, {
34344
33930
  kind: Kind.INTERFACE_TYPE_DEFINITION,
34345
- description: description2,
34346
- name: name2,
33931
+ description,
33932
+ name,
34347
33933
  interfaces,
34348
33934
  directives,
34349
33935
  fields
@@ -34355,15 +33941,15 @@ class Parser {
34355
33941
  */
34356
33942
  parseUnionTypeDefinition() {
34357
33943
  const start = this._lexer.token;
34358
- const description2 = this.parseDescription();
33944
+ const description = this.parseDescription();
34359
33945
  this.expectKeyword("union");
34360
- const name2 = this.parseName();
33946
+ const name = this.parseName();
34361
33947
  const directives = this.parseConstDirectives();
34362
33948
  const types2 = this.parseUnionMemberTypes();
34363
33949
  return this.node(start, {
34364
33950
  kind: Kind.UNION_TYPE_DEFINITION,
34365
- description: description2,
34366
- name: name2,
33951
+ description,
33952
+ name,
34367
33953
  directives,
34368
33954
  types: types2
34369
33955
  });
@@ -34382,15 +33968,15 @@ class Parser {
34382
33968
  */
34383
33969
  parseEnumTypeDefinition() {
34384
33970
  const start = this._lexer.token;
34385
- const description2 = this.parseDescription();
33971
+ const description = this.parseDescription();
34386
33972
  this.expectKeyword("enum");
34387
- const name2 = this.parseName();
33973
+ const name = this.parseName();
34388
33974
  const directives = this.parseConstDirectives();
34389
33975
  const values = this.parseEnumValuesDefinition();
34390
33976
  return this.node(start, {
34391
33977
  kind: Kind.ENUM_TYPE_DEFINITION,
34392
- description: description2,
34393
- name: name2,
33978
+ description,
33979
+ name,
34394
33980
  directives,
34395
33981
  values
34396
33982
  });
@@ -34412,13 +33998,13 @@ class Parser {
34412
33998
  */
34413
33999
  parseEnumValueDefinition() {
34414
34000
  const start = this._lexer.token;
34415
- const description2 = this.parseDescription();
34416
- const name2 = this.parseEnumValueName();
34001
+ const description = this.parseDescription();
34002
+ const name = this.parseEnumValueName();
34417
34003
  const directives = this.parseConstDirectives();
34418
34004
  return this.node(start, {
34419
34005
  kind: Kind.ENUM_VALUE_DEFINITION,
34420
- description: description2,
34421
- name: name2,
34006
+ description,
34007
+ name,
34422
34008
  directives
34423
34009
  });
34424
34010
  }
@@ -34443,15 +34029,15 @@ class Parser {
34443
34029
  */
34444
34030
  parseInputObjectTypeDefinition() {
34445
34031
  const start = this._lexer.token;
34446
- const description2 = this.parseDescription();
34032
+ const description = this.parseDescription();
34447
34033
  this.expectKeyword("input");
34448
- const name2 = this.parseName();
34034
+ const name = this.parseName();
34449
34035
  const directives = this.parseConstDirectives();
34450
34036
  const fields = this.parseInputFieldsDefinition();
34451
34037
  return this.node(start, {
34452
34038
  kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
34453
- description: description2,
34454
- name: name2,
34039
+ description,
34040
+ name,
34455
34041
  directives,
34456
34042
  fields
34457
34043
  });
@@ -34537,14 +34123,14 @@ class Parser {
34537
34123
  const start = this._lexer.token;
34538
34124
  this.expectKeyword("extend");
34539
34125
  this.expectKeyword("scalar");
34540
- const name2 = this.parseName();
34126
+ const name = this.parseName();
34541
34127
  const directives = this.parseConstDirectives();
34542
34128
  if (directives.length === 0) {
34543
34129
  throw this.unexpected();
34544
34130
  }
34545
34131
  return this.node(start, {
34546
34132
  kind: Kind.SCALAR_TYPE_EXTENSION,
34547
- name: name2,
34133
+ name,
34548
34134
  directives
34549
34135
  });
34550
34136
  }
@@ -34558,7 +34144,7 @@ class Parser {
34558
34144
  const start = this._lexer.token;
34559
34145
  this.expectKeyword("extend");
34560
34146
  this.expectKeyword("type");
34561
- const name2 = this.parseName();
34147
+ const name = this.parseName();
34562
34148
  const interfaces = this.parseImplementsInterfaces();
34563
34149
  const directives = this.parseConstDirectives();
34564
34150
  const fields = this.parseFieldsDefinition();
@@ -34567,7 +34153,7 @@ class Parser {
34567
34153
  }
34568
34154
  return this.node(start, {
34569
34155
  kind: Kind.OBJECT_TYPE_EXTENSION,
34570
- name: name2,
34156
+ name,
34571
34157
  interfaces,
34572
34158
  directives,
34573
34159
  fields
@@ -34583,7 +34169,7 @@ class Parser {
34583
34169
  const start = this._lexer.token;
34584
34170
  this.expectKeyword("extend");
34585
34171
  this.expectKeyword("interface");
34586
- const name2 = this.parseName();
34172
+ const name = this.parseName();
34587
34173
  const interfaces = this.parseImplementsInterfaces();
34588
34174
  const directives = this.parseConstDirectives();
34589
34175
  const fields = this.parseFieldsDefinition();
@@ -34592,7 +34178,7 @@ class Parser {
34592
34178
  }
34593
34179
  return this.node(start, {
34594
34180
  kind: Kind.INTERFACE_TYPE_EXTENSION,
34595
- name: name2,
34181
+ name,
34596
34182
  interfaces,
34597
34183
  directives,
34598
34184
  fields
@@ -34607,7 +34193,7 @@ class Parser {
34607
34193
  const start = this._lexer.token;
34608
34194
  this.expectKeyword("extend");
34609
34195
  this.expectKeyword("union");
34610
- const name2 = this.parseName();
34196
+ const name = this.parseName();
34611
34197
  const directives = this.parseConstDirectives();
34612
34198
  const types2 = this.parseUnionMemberTypes();
34613
34199
  if (directives.length === 0 && types2.length === 0) {
@@ -34615,7 +34201,7 @@ class Parser {
34615
34201
  }
34616
34202
  return this.node(start, {
34617
34203
  kind: Kind.UNION_TYPE_EXTENSION,
34618
- name: name2,
34204
+ name,
34619
34205
  directives,
34620
34206
  types: types2
34621
34207
  });
@@ -34629,7 +34215,7 @@ class Parser {
34629
34215
  const start = this._lexer.token;
34630
34216
  this.expectKeyword("extend");
34631
34217
  this.expectKeyword("enum");
34632
- const name2 = this.parseName();
34218
+ const name = this.parseName();
34633
34219
  const directives = this.parseConstDirectives();
34634
34220
  const values = this.parseEnumValuesDefinition();
34635
34221
  if (directives.length === 0 && values.length === 0) {
@@ -34637,7 +34223,7 @@ class Parser {
34637
34223
  }
34638
34224
  return this.node(start, {
34639
34225
  kind: Kind.ENUM_TYPE_EXTENSION,
34640
- name: name2,
34226
+ name,
34641
34227
  directives,
34642
34228
  values
34643
34229
  });
@@ -34651,7 +34237,7 @@ class Parser {
34651
34237
  const start = this._lexer.token;
34652
34238
  this.expectKeyword("extend");
34653
34239
  this.expectKeyword("input");
34654
- const name2 = this.parseName();
34240
+ const name = this.parseName();
34655
34241
  const directives = this.parseConstDirectives();
34656
34242
  const fields = this.parseInputFieldsDefinition();
34657
34243
  if (directives.length === 0 && fields.length === 0) {
@@ -34659,7 +34245,7 @@ class Parser {
34659
34245
  }
34660
34246
  return this.node(start, {
34661
34247
  kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
34662
- name: name2,
34248
+ name,
34663
34249
  directives,
34664
34250
  fields
34665
34251
  });
@@ -34672,18 +34258,18 @@ class Parser {
34672
34258
  */
34673
34259
  parseDirectiveDefinition() {
34674
34260
  const start = this._lexer.token;
34675
- const description2 = this.parseDescription();
34261
+ const description = this.parseDescription();
34676
34262
  this.expectKeyword("directive");
34677
34263
  this.expectToken(TokenKind.AT);
34678
- const name2 = this.parseName();
34264
+ const name = this.parseName();
34679
34265
  const args = this.parseArgumentDefs();
34680
34266
  const repeatable = this.expectOptionalKeyword("repeatable");
34681
34267
  this.expectKeyword("on");
34682
34268
  const locations = this.parseDirectiveLocations();
34683
34269
  return this.node(start, {
34684
34270
  kind: Kind.DIRECTIVE_DEFINITION,
34685
- description: description2,
34686
- name: name2,
34271
+ description,
34272
+ name,
34687
34273
  arguments: args,
34688
34274
  repeatable,
34689
34275
  locations
@@ -34726,9 +34312,9 @@ class Parser {
34726
34312
  */
34727
34313
  parseDirectiveLocation() {
34728
34314
  const start = this._lexer.token;
34729
- const name2 = this.parseName();
34730
- if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name2.value)) {
34731
- return name2;
34315
+ const name = this.parseName();
34316
+ if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {
34317
+ return name;
34732
34318
  }
34733
34319
  throw this.unexpected(start);
34734
34320
  }
@@ -35238,8 +34824,8 @@ const printDocASTReducer = {
35238
34824
  leave: ({ selections }) => block(selections)
35239
34825
  },
35240
34826
  Field: {
35241
- leave({ alias, name: name2, arguments: args, directives, selectionSet }) {
35242
- const prefix = wrap("", alias, ": ") + name2;
34827
+ leave({ alias, name, arguments: args, directives, selectionSet }) {
34828
+ const prefix = wrap("", alias, ": ") + name;
35243
34829
  let argsLine = prefix + wrap("(", join(args, ", "), ")");
35244
34830
  if (argsLine.length > MAX_LINE_LENGTH) {
35245
34831
  argsLine = prefix + wrap("(\n", indent(join(args, "\n")), "\n)");
@@ -35248,11 +34834,11 @@ const printDocASTReducer = {
35248
34834
  }
35249
34835
  },
35250
34836
  Argument: {
35251
- leave: ({ name: name2, value }) => name2 + ": " + value
34837
+ leave: ({ name, value }) => name + ": " + value
35252
34838
  },
35253
34839
  // Fragments
35254
34840
  FragmentSpread: {
35255
- leave: ({ name: name2, directives }) => "..." + name2 + wrap(" ", join(directives, " "))
34841
+ leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
35256
34842
  },
35257
34843
  InlineFragment: {
35258
34844
  leave: ({ typeCondition, directives, selectionSet }) => join(
@@ -35266,9 +34852,9 @@ const printDocASTReducer = {
35266
34852
  )
35267
34853
  },
35268
34854
  FragmentDefinition: {
35269
- leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => (
34855
+ leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => (
35270
34856
  // or removed in the future.
35271
- `fragment ${name2}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
34857
+ `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
35272
34858
  )
35273
34859
  },
35274
34860
  // Value
@@ -35297,15 +34883,15 @@ const printDocASTReducer = {
35297
34883
  leave: ({ fields }) => "{" + join(fields, ", ") + "}"
35298
34884
  },
35299
34885
  ObjectField: {
35300
- leave: ({ name: name2, value }) => name2 + ": " + value
34886
+ leave: ({ name, value }) => name + ": " + value
35301
34887
  },
35302
34888
  // Directive
35303
34889
  Directive: {
35304
- leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap("(", join(args, ", "), ")")
34890
+ leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
35305
34891
  },
35306
34892
  // Type
35307
34893
  NamedType: {
35308
- leave: ({ name: name2 }) => name2
34894
+ leave: ({ name }) => name
35309
34895
  },
35310
34896
  ListType: {
35311
34897
  leave: ({ type: type2 }) => "[" + type2 + "]"
@@ -35315,19 +34901,19 @@ const printDocASTReducer = {
35315
34901
  },
35316
34902
  // Type System Definitions
35317
34903
  SchemaDefinition: {
35318
- leave: ({ description: description2, directives, operationTypes }) => wrap("", description2, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
34904
+ leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
35319
34905
  },
35320
34906
  OperationTypeDefinition: {
35321
34907
  leave: ({ operation, type: type2 }) => operation + ": " + type2
35322
34908
  },
35323
34909
  ScalarTypeDefinition: {
35324
- leave: ({ description: description2, name: name2, directives }) => wrap("", description2, "\n") + join(["scalar", name2, join(directives, " ")], " ")
34910
+ leave: ({ description, name, directives }) => wrap("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
35325
34911
  },
35326
34912
  ObjectTypeDefinition: {
35327
- leave: ({ description: description2, name: name2, interfaces, directives, fields }) => wrap("", description2, "\n") + join(
34913
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
35328
34914
  [
35329
34915
  "type",
35330
- name2,
34916
+ name,
35331
34917
  wrap("implements ", join(interfaces, " & ")),
35332
34918
  join(directives, " "),
35333
34919
  block(fields)
@@ -35336,19 +34922,19 @@ const printDocASTReducer = {
35336
34922
  )
35337
34923
  },
35338
34924
  FieldDefinition: {
35339
- leave: ({ description: description2, name: name2, arguments: args, type: type2, directives }) => wrap("", description2, "\n") + name2 + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + ": " + type2 + wrap(" ", join(directives, " "))
34925
+ leave: ({ description, name, arguments: args, type: type2, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + ": " + type2 + wrap(" ", join(directives, " "))
35340
34926
  },
35341
34927
  InputValueDefinition: {
35342
- leave: ({ description: description2, name: name2, type: type2, defaultValue, directives }) => wrap("", description2, "\n") + join(
35343
- [name2 + ": " + type2, wrap("= ", defaultValue), join(directives, " ")],
34928
+ leave: ({ description, name, type: type2, defaultValue, directives }) => wrap("", description, "\n") + join(
34929
+ [name + ": " + type2, wrap("= ", defaultValue), join(directives, " ")],
35344
34930
  " "
35345
34931
  )
35346
34932
  },
35347
34933
  InterfaceTypeDefinition: {
35348
- leave: ({ description: description2, name: name2, interfaces, directives, fields }) => wrap("", description2, "\n") + join(
34934
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
35349
34935
  [
35350
34936
  "interface",
35351
- name2,
34937
+ name,
35352
34938
  wrap("implements ", join(interfaces, " & ")),
35353
34939
  join(directives, " "),
35354
34940
  block(fields)
@@ -35357,22 +34943,22 @@ const printDocASTReducer = {
35357
34943
  )
35358
34944
  },
35359
34945
  UnionTypeDefinition: {
35360
- leave: ({ description: description2, name: name2, directives, types: types2 }) => wrap("", description2, "\n") + join(
35361
- ["union", name2, join(directives, " "), wrap("= ", join(types2, " | "))],
34946
+ leave: ({ description, name, directives, types: types2 }) => wrap("", description, "\n") + join(
34947
+ ["union", name, join(directives, " "), wrap("= ", join(types2, " | "))],
35362
34948
  " "
35363
34949
  )
35364
34950
  },
35365
34951
  EnumTypeDefinition: {
35366
- leave: ({ description: description2, name: name2, directives, values }) => wrap("", description2, "\n") + join(["enum", name2, join(directives, " "), block(values)], " ")
34952
+ leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
35367
34953
  },
35368
34954
  EnumValueDefinition: {
35369
- leave: ({ description: description2, name: name2, directives }) => wrap("", description2, "\n") + join([name2, join(directives, " ")], " ")
34955
+ leave: ({ description, name, directives }) => wrap("", description, "\n") + join([name, join(directives, " ")], " ")
35370
34956
  },
35371
34957
  InputObjectTypeDefinition: {
35372
- leave: ({ description: description2, name: name2, directives, fields }) => wrap("", description2, "\n") + join(["input", name2, join(directives, " "), block(fields)], " ")
34958
+ leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
35373
34959
  },
35374
34960
  DirectiveDefinition: {
35375
- leave: ({ description: description2, name: name2, arguments: args, repeatable, locations }) => wrap("", description2, "\n") + "directive @" + name2 + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
34961
+ leave: ({ description, name, arguments: args, repeatable, locations }) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
35376
34962
  },
35377
34963
  SchemaExtension: {
35378
34964
  leave: ({ directives, operationTypes }) => join(
@@ -35381,13 +34967,13 @@ const printDocASTReducer = {
35381
34967
  )
35382
34968
  },
35383
34969
  ScalarTypeExtension: {
35384
- leave: ({ name: name2, directives }) => join(["extend scalar", name2, join(directives, " ")], " ")
34970
+ leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
35385
34971
  },
35386
34972
  ObjectTypeExtension: {
35387
- leave: ({ name: name2, interfaces, directives, fields }) => join(
34973
+ leave: ({ name, interfaces, directives, fields }) => join(
35388
34974
  [
35389
34975
  "extend type",
35390
- name2,
34976
+ name,
35391
34977
  wrap("implements ", join(interfaces, " & ")),
35392
34978
  join(directives, " "),
35393
34979
  block(fields)
@@ -35396,10 +34982,10 @@ const printDocASTReducer = {
35396
34982
  )
35397
34983
  },
35398
34984
  InterfaceTypeExtension: {
35399
- leave: ({ name: name2, interfaces, directives, fields }) => join(
34985
+ leave: ({ name, interfaces, directives, fields }) => join(
35400
34986
  [
35401
34987
  "extend interface",
35402
- name2,
34988
+ name,
35403
34989
  wrap("implements ", join(interfaces, " & ")),
35404
34990
  join(directives, " "),
35405
34991
  block(fields)
@@ -35408,10 +34994,10 @@ const printDocASTReducer = {
35408
34994
  )
35409
34995
  },
35410
34996
  UnionTypeExtension: {
35411
- leave: ({ name: name2, directives, types: types2 }) => join(
34997
+ leave: ({ name, directives, types: types2 }) => join(
35412
34998
  [
35413
34999
  "extend union",
35414
- name2,
35000
+ name,
35415
35001
  join(directives, " "),
35416
35002
  wrap("= ", join(types2, " | "))
35417
35003
  ],
@@ -35419,10 +35005,10 @@ const printDocASTReducer = {
35419
35005
  )
35420
35006
  },
35421
35007
  EnumTypeExtension: {
35422
- leave: ({ name: name2, directives, values }) => join(["extend enum", name2, join(directives, " "), block(values)], " ")
35008
+ leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
35423
35009
  },
35424
35010
  InputObjectTypeExtension: {
35425
- leave: ({ name: name2, directives, fields }) => join(["extend input", name2, join(directives, " "), block(fields)], " ")
35011
+ leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
35426
35012
  }
35427
35013
  };
35428
35014
  function join(maybeArray, separator = "") {
@@ -35635,8 +35221,8 @@ const createFetcher = (method) => async (params) => {
35635
35221
  initResolved = initNew;
35636
35222
  }
35637
35223
  if (searchParams) {
35638
- searchParams.forEach((value, name2) => {
35639
- url.searchParams.append(name2, value);
35224
+ searchParams.forEach((value, name) => {
35225
+ url.searchParams.append(name, value);
35640
35226
  });
35641
35227
  }
35642
35228
  const $fetch = params.fetch ?? fetch;
@@ -35881,23 +35467,28 @@ const createContractInteractions = ({
35881
35467
  };
35882
35468
  };
35883
35469
  const createConfig = (props) => {
35884
- const parsed = config$2.configArgsSchema.parse(props);
35885
- const { walletClient, publicClient } = parsed;
35886
- if (!walletClient.chain || !publicClient.chain || !chainIds.includes(walletClient.chain?.id) || !chainIds.includes(publicClient.chain?.id))
35887
- throw new Error(`Chain must be one of ${chainIds.join(", ")}`);
35888
- const chainId = walletClient.chain.id;
35470
+ const parsed = globals.configArgsSchema.parse(props);
35471
+ if (!parsed.walletClient.chain || !parsed.publicClient.chain || !globals.chainIds.includes(parsed.walletClient.chain?.id) || !globals.chainIds.includes(parsed.publicClient.chain?.id))
35472
+ throw new Error(`Chain must be one of ${globals.chainIds.join(", ")}`);
35473
+ const chainId = parsed.walletClient.chain.id;
35474
+ const chainContracts = globals.contracts[chainId];
35475
+ const addresses = {
35476
+ setter: parsed._?.contractAddresses?.setter || chainContracts.setter,
35477
+ getter: parsed._?.contractAddresses?.getter || chainContracts.getter,
35478
+ token: parsed._?.contractAddresses?.token || chainContracts.token
35479
+ };
35889
35480
  const contract = createContractInteractions({
35890
- walletClient,
35891
- publicClient,
35892
- addresses: contracts[chainId]
35481
+ walletClient: parsed.walletClient,
35482
+ publicClient: parsed.publicClient,
35483
+ addresses
35893
35484
  });
35894
- const graphEndpoint = graph_endpoints[chainId];
35895
- const restEndpoint = rest_endpoints[chainId];
35485
+ const graphEndpoint = parsed._?.graphUrl || globals.graph_endpoints[chainId];
35486
+ const restEndpoint = parsed._?.restUrl || globals.rest_endpoints[chainId];
35896
35487
  const graphQLClient = new GraphQLClient(graphEndpoint);
35897
35488
  return {
35898
- publicClient,
35899
- walletClient,
35900
- chain: walletClient.chain,
35489
+ publicClient: parsed.publicClient,
35490
+ walletClient: parsed.walletClient,
35491
+ chain: parsed.walletClient.chain,
35901
35492
  graphEndpoint,
35902
35493
  restEndpoint,
35903
35494
  api: {
@@ -35905,49 +35496,16 @@ const createConfig = (props) => {
35905
35496
  ...createSSVAPI(restEndpoint)
35906
35497
  },
35907
35498
  graphQLClient,
35908
- contractAddresses: contracts[chainId],
35499
+ contractAddresses: addresses,
35909
35500
  contract
35910
35501
  };
35911
35502
  };
35912
- const globals = {
35913
- MAX_WEI_AMOUNT: 115792089237316195423570985008687907853269984665640564039457584007913129639935n,
35914
- CLUSTER_SIZES: {
35915
- QUAD_CLUSTER: 4,
35916
- SEPT_CLUSTER: 7,
35917
- DECA_CLUSTER: 10,
35918
- TRISKAIDEKA_CLUSTER: 13
35919
- },
35920
- FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE: {
35921
- QUAD_CLUSTER: 80,
35922
- SEPT_CLUSTER: 40,
35923
- DECA_CLUSTER: 30,
35924
- TRISKAIDEKA_CLUSTER: 20
35925
- },
35926
- BLOCKS_PER_DAY: 7160n,
35927
- OPERATORS_PER_PAGE: 50,
35928
- BLOCKS_PER_YEAR: 2613400n,
35929
- DEFAULT_CLUSTER_PERIOD: 730,
35930
- NUMBERS_OF_WEEKS_IN_YEAR: 52.1429,
35931
- MAX_VALIDATORS_COUNT_MULTI_FLOW: 50,
35932
- CLUSTER_VALIDITY_PERIOD_MINIMUM: 30,
35933
- OPERATOR_VALIDATORS_LIMIT_PRESERVE: 5,
35934
- MINIMUM_OPERATOR_FEE_PER_BLOCK: 1000000000n,
35935
- MIN_VALIDATORS_COUNT_PER_BULK_REGISTRATION: 1,
35936
- DEFAULT_ADDRESS_WHITELIST: "0x0000000000000000000000000000000000000000"
35937
- };
35938
- const registerValidatorsByClusterSizeLimits = {
35939
- [globals.CLUSTER_SIZES.QUAD_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.QUAD_CLUSTER,
35940
- [globals.CLUSTER_SIZES.SEPT_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.SEPT_CLUSTER,
35941
- [globals.CLUSTER_SIZES.DECA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.DECA_CLUSTER,
35942
- [globals.CLUSTER_SIZES.TRISKAIDEKA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.TRISKAIDEKA_CLUSTER
35943
- };
35944
35503
  const deposit = async (config2, { args: { id, amount }, ...writeOptions }, options2 = {}) => {
35945
35504
  const cluster = await config2.api.getCluster({ id });
35946
- console.log("cluster:", cluster);
35947
35505
  if (!cluster) {
35948
35506
  throw new Error("Cluster not found");
35949
35507
  }
35950
- const snapshot = config$2.getClusterSnapshot(cluster);
35508
+ const snapshot = globals.getClusterSnapshot(cluster);
35951
35509
  if (options2?.approve) {
35952
35510
  const allowance = await config2.contract.token.read.allowance({
35953
35511
  owner: config2.walletClient.account.address,
@@ -35966,7 +35524,7 @@ const deposit = async (config2, { args: { id, amount }, ...writeOptions }, optio
35966
35524
  args: {
35967
35525
  amount,
35968
35526
  cluster: snapshot,
35969
- clusterOwner: process$1.env.OWNER_ADDRESS,
35527
+ clusterOwner: globals.process$1.env.OWNER_ADDRESS,
35970
35528
  operatorIds: cluster.operatorIds.map(BigInt)
35971
35529
  },
35972
35530
  ...writeOptions
@@ -35997,7 +35555,7 @@ const liquidateCluster = async (config2, { args: { id }, ...writeOptions }) => {
35997
35555
  }
35998
35556
  return config2.contract.ssv.write.liquidate({
35999
35557
  args: {
36000
- cluster: config$2.getClusterSnapshot(cluster),
35558
+ cluster: globals.getClusterSnapshot(cluster),
36001
35559
  clusterOwner: config2.walletClient.account.address,
36002
35560
  operatorIds: cluster.operatorIds.map(BigInt)
36003
35561
  },
@@ -36011,7 +35569,7 @@ const reactivateCluster = async (config2, { args: { id, amount }, ...writeOption
36011
35569
  }
36012
35570
  return config2.contract.ssv.write.reactivate({
36013
35571
  args: {
36014
- cluster: config$2.getClusterSnapshot(cluster),
35572
+ cluster: globals.getClusterSnapshot(cluster),
36015
35573
  amount,
36016
35574
  operatorIds: cluster.operatorIds.map(BigInt)
36017
35575
  },
@@ -36020,37 +35578,35 @@ const reactivateCluster = async (config2, { args: { id, amount }, ...writeOption
36020
35578
  };
36021
35579
  const registerValidators = async (config2, { args: { keyshares, depositAmount = 0n }, ...writeOptions }) => {
36022
35580
  const shares = keyshares.map((share) => {
36023
- return config$2.isKeySharesItem(share) ? share.payload : share;
35581
+ return globals.isKeySharesItem(share) ? share.payload : share;
36024
35582
  });
36025
35583
  const operatorIds = shares[0].operatorIds;
36026
35584
  const clusterSize = operatorIds.length;
36027
- const limit = registerValidatorsByClusterSizeLimits[clusterSize];
35585
+ const limit = globals.registerValidatorsByClusterSizeLimits[clusterSize];
36028
35586
  if (!limit) {
36029
35587
  throw new Error(
36030
- `Invalid number of operators in keyshares: ${clusterSize}, should be one of: ${Object.keys(registerValidatorsByClusterSizeLimits).join(", ")}`
35588
+ `Invalid number of operators in keyshares: ${clusterSize}, should be one of: ${Object.keys(globals.registerValidatorsByClusterSizeLimits).join(", ")}`
36031
35589
  );
36032
35590
  }
36033
35591
  if (shares.length > limit) {
36034
35592
  throw new Error(`You can't register more than ${limit} validators in a single transaction`);
36035
35593
  }
36036
- const clusterId = config$2.createClusterId(config2.walletClient.account.address, operatorIds);
35594
+ const clusterId = globals.createClusterId(config2.walletClient.account.address, operatorIds);
36037
35595
  const cluster = await config2.api.getCluster({
36038
35596
  id: clusterId
36039
35597
  });
36040
- const snapshot = cluster ? config$2.getClusterSnapshot(cluster) : config$2.createEmptyCluster();
35598
+ const snapshot = cluster ? globals.getClusterSnapshot(cluster) : globals.createEmptyCluster();
36041
35599
  if (shares.length === 1) {
36042
- return config2.contract.ssv.write.registerValidator(
36043
- {
36044
- args: {
36045
- amount: depositAmount,
36046
- cluster: snapshot,
36047
- operatorIds: operatorIds.map(BigInt),
36048
- publicKey: shares[0].publicKey,
36049
- sharesData: shares[0].sharesData
36050
- },
36051
- ...writeOptions
36052
- }
36053
- );
35600
+ return config2.contract.ssv.write.registerValidator({
35601
+ args: {
35602
+ amount: depositAmount,
35603
+ cluster: snapshot,
35604
+ operatorIds: operatorIds.map(BigInt),
35605
+ publicKey: shares[0].publicKey,
35606
+ sharesData: shares[0].sharesData
35607
+ },
35608
+ ...writeOptions
35609
+ });
36054
35610
  }
36055
35611
  return config2.contract.ssv.write.bulkRegisterValidator({
36056
35612
  args: {
@@ -36063,6 +35619,43 @@ const registerValidators = async (config2, { args: { keyshares, depositAmount =
36063
35619
  ...writeOptions
36064
35620
  });
36065
35621
  };
35622
+ const registerValidatorsRawData = async (config2, { args: { keyshares, depositAmount = 0n } }) => {
35623
+ const shares = keyshares.map((share) => {
35624
+ return globals.isKeySharesItem(share) ? share.payload : share;
35625
+ });
35626
+ const operatorIds = shares[0].operatorIds;
35627
+ const clusterSize = operatorIds.length;
35628
+ const limit = globals.registerValidatorsByClusterSizeLimits[clusterSize];
35629
+ if (!limit) {
35630
+ throw new Error(
35631
+ `Invalid number of operators in keyshares: ${clusterSize}, should be one of: ${Object.keys(globals.registerValidatorsByClusterSizeLimits).join(", ")}`
35632
+ );
35633
+ }
35634
+ if (shares.length > limit) {
35635
+ throw new Error(`You can't register more than ${limit} validators in a single transaction`);
35636
+ }
35637
+ const clusterId = globals.createClusterId(config2.walletClient.account.address, operatorIds);
35638
+ const cluster = await config2.api.getCluster({
35639
+ id: clusterId
35640
+ });
35641
+ const snapshot = cluster ? globals.getClusterSnapshot(cluster) : globals.createEmptyCluster();
35642
+ if (shares.length === 1) {
35643
+ return config2.contract.ssv.write.registerValidator.getTransactionData({
35644
+ amount: depositAmount,
35645
+ cluster: snapshot,
35646
+ operatorIds: operatorIds.map(BigInt),
35647
+ publicKey: shares[0].publicKey,
35648
+ sharesData: shares[0].sharesData
35649
+ });
35650
+ }
35651
+ return config2.contract.ssv.write.bulkRegisterValidator.getTransactionData({
35652
+ cluster: snapshot,
35653
+ amount: depositAmount,
35654
+ operatorIds: operatorIds.map(BigInt),
35655
+ publicKeys: shares.map((share) => share.publicKey),
35656
+ sharesData: shares.map((share) => share.sharesData)
35657
+ });
35658
+ };
36066
35659
  const ssvKeys$1 = new ssvKeys$2.SSVKeys();
36067
35660
  const validateSharesPostRegistration = async (config2, args) => {
36068
35661
  const receipt = await config2.publicClient.waitForTransactionReceipt({
@@ -36072,7 +35665,7 @@ const validateSharesPostRegistration = async (config2, args) => {
36072
35665
  owner: config2.walletClient.account.address,
36073
35666
  block: Number(receipt.blockNumber) - 1
36074
35667
  });
36075
- if (config$2.isUndefined(ownerNonce)) {
35668
+ if (globals.isUndefined(ownerNonce)) {
36076
35669
  throw new Error("Could not fetch owner nonce");
36077
35670
  }
36078
35671
  const validatorAddedEvents = await config2.publicClient.getContractEvents({
@@ -36121,7 +35714,7 @@ const removeValidators = async (config2, { args: { id, publicKeys }, ...writeOpt
36121
35714
  if (publicKeys.length === 1) {
36122
35715
  return config2.contract.ssv.write.removeValidator({
36123
35716
  args: {
36124
- cluster: config$2.getClusterSnapshot(cluster),
35717
+ cluster: globals.getClusterSnapshot(cluster),
36125
35718
  publicKey: publicKeys[0],
36126
35719
  operatorIds: cluster.operatorIds.map(BigInt)
36127
35720
  },
@@ -36130,7 +35723,7 @@ const removeValidators = async (config2, { args: { id, publicKeys }, ...writeOpt
36130
35723
  }
36131
35724
  return config2.contract.ssv.write.bulkRemoveValidator({
36132
35725
  args: {
36133
- cluster: config$2.getClusterSnapshot(cluster),
35726
+ cluster: globals.getClusterSnapshot(cluster),
36134
35727
  publicKeys,
36135
35728
  operatorIds: cluster.operatorIds.map(BigInt)
36136
35729
  },
@@ -36153,7 +35746,7 @@ const withdraw$1 = async (config2, { args: { id, amount }, ...writeOptions }) =>
36153
35746
  return config2.contract.ssv.write.withdraw({
36154
35747
  args: {
36155
35748
  amount,
36156
- cluster: config$2.getClusterSnapshot(cluster),
35749
+ cluster: globals.getClusterSnapshot(cluster),
36157
35750
  operatorIds: cluster.operatorIds.map(BigInt)
36158
35751
  },
36159
35752
  ...writeOptions
@@ -36168,6 +35761,7 @@ const createClusterManager = (config2) => ({
36168
35761
  setFeeRecipient: setFeeRecipient.bind(null, config2),
36169
35762
  exitValidators: exitValidators.bind(null, config2),
36170
35763
  registerValidators: registerValidators.bind(null, config2),
35764
+ registerValidatorsRawData: registerValidatorsRawData.bind(null, config2),
36171
35765
  validateSharesPostRegistration: validateSharesPostRegistration.bind(
36172
35766
  null,
36173
35767
  config2
@@ -36198,7 +35792,7 @@ const registerOperator = async (config2, { args: { isPrivate, yearlyFee, publicK
36198
35792
  return config2.contract.ssv.write.registerOperator({
36199
35793
  args: {
36200
35794
  publicKey: viem.encodeAbiParameters(viem.parseAbiParameters("string"), [publicKey]),
36201
- fee: config$2.roundOperatorFee(yearlyFee / globals.BLOCKS_PER_YEAR),
35795
+ fee: globals.roundOperatorFee(yearlyFee / globals.globals.BLOCKS_PER_YEAR),
36202
35796
  setPrivate: isPrivate
36203
35797
  },
36204
35798
  ...writeOptions
@@ -36255,7 +35849,7 @@ const getClusterBalance = async (config2, { operatorIds }) => {
36255
35849
  const query = await config2.api.getClusterBalance({
36256
35850
  daoAddress: config2.contractAddresses.setter,
36257
35851
  operatorIds: operatorIds.map(String),
36258
- clusterId: config$2.createClusterId(config2.walletClient.account.address, operatorIds)
35852
+ clusterId: globals.createClusterId(config2.walletClient.account.address, operatorIds)
36259
35853
  });
36260
35854
  if (!query.cluster || !query.daovalues || !query._meta) {
36261
35855
  throw new Error("Could not fetch cluster balance");
@@ -36271,9 +35865,9 @@ const getClusterBalance = async (config2, { operatorIds }) => {
36271
35865
  const calculatedClusterBalance = BigInt(query.cluster.balance) - (cumulativeNetworkFee + cumulativeOperatorFee) * BigInt(query.cluster.validatorCount) || 1n;
36272
35866
  const burnRate = (operatorsFee + BigInt(query.daovalues.networkFee)) * BigInt(query.cluster.validatorCount) || 1n;
36273
35867
  const mLc = BigInt(query.daovalues.minimumLiquidationCollateral);
36274
- const LC = config$2.bigintMax(mLc, burnRate * BigInt(query.daovalues.liquidationThreshold));
35868
+ const LC = globals.bigintMax(mLc, burnRate * BigInt(query.daovalues.liquidationThreshold));
36275
35869
  const runwaySSV = calculatedClusterBalance - LC;
36276
- const operationalRunway = runwaySSV / burnRate / globals.BLOCKS_PER_DAY;
35870
+ const operationalRunway = runwaySSV / burnRate / globals.globals.BLOCKS_PER_DAY;
36277
35871
  return {
36278
35872
  balance: calculatedClusterBalance,
36279
35873
  operationalRunway
@@ -36338,9 +35932,9 @@ const validateKeysharesJSON = async ({
36338
35932
  keyshares
36339
35933
  }) => {
36340
35934
  const shares = (await ssvKeys$2.KeyShares.fromJson(keyshares)).list();
36341
- config$2.ensureNoKeysharesErrors(shares);
36342
- config$2.ensureValidatorsUniqueness(shares);
36343
- config$2.validateConsistentOperatorPublicKeys(shares, operators);
35935
+ globals.ensureNoKeysharesErrors(shares);
35936
+ globals.ensureValidatorsUniqueness(shares);
35937
+ globals.validateConsistentOperatorPublicKeys(shares, operators);
36344
35938
  await Promise.all(
36345
35939
  shares.map(
36346
35940
  (share) => share.validateSingleShares(share.payload.sharesData, {
@@ -36350,10 +35944,10 @@ const validateKeysharesJSON = async ({
36350
35944
  })
36351
35945
  )
36352
35946
  );
36353
- const shareOperatorIds = config$2.validateConsistentOperatorIds(shares);
36354
- const operatorIds = config$2.sortNumbers(operators.map((operator) => Number(operator.id)));
36355
- if (!isEqual(config$2.sortNumbers(shareOperatorIds), config$2.sortNumbers(operatorIds))) {
36356
- throw new config$2.KeysharesValidationError(config$2.KeysharesValidationErrors.ClusterMismatch);
35947
+ const shareOperatorIds = globals.validateConsistentOperatorIds(shares);
35948
+ const operatorIds = globals.sortNumbers(operators.map((operator) => Number(operator.id)));
35949
+ if (!isEqual(globals.sortNumbers(shareOperatorIds), globals.sortNumbers(operatorIds))) {
35950
+ throw new globals.KeysharesValidationError(globals.KeysharesValidationErrors.ClusterMismatch);
36357
35951
  }
36358
35952
  return shares;
36359
35953
  };
@@ -36430,10 +36024,16 @@ class SSVSDK {
36430
36024
  this.utils = createUtils(this.config);
36431
36025
  }
36432
36026
  }
36027
+ exports.chainIds = globals.chainIds;
36028
+ exports.chains = globals.chains;
36029
+ exports.contracts = globals.contracts;
36030
+ exports.globals = globals.globals;
36031
+ exports.graph_endpoints = globals.graph_endpoints;
36032
+ exports.hoodi = globals.hoodi;
36033
+ exports.networks = globals.networks;
36034
+ exports.registerValidatorsByClusterSizeLimits = globals.registerValidatorsByClusterSizeLimits;
36035
+ exports.rest_endpoints = globals.rest_endpoints;
36433
36036
  exports.SSVSDK = SSVSDK;
36434
- exports.chainIds = chainIds;
36435
- exports.chains = chains;
36436
- exports.contracts = contracts;
36437
36037
  exports.createClusterManager = createClusterManager;
36438
36038
  exports.createConfig = createConfig;
36439
36039
  exports.createContractInteractions = createContractInteractions;
@@ -36453,9 +36053,4 @@ exports.getOwnerNonce = getOwnerNonce;
36453
36053
  exports.getQueries = getQueries;
36454
36054
  exports.getValidator = getValidator;
36455
36055
  exports.getValidators = getValidators;
36456
- exports.globals = globals;
36457
- exports.graph_endpoints = graph_endpoints;
36458
- exports.hoodi = hoodi;
36459
36056
  exports.isConfig = isConfig;
36460
- exports.registerValidatorsByClusterSizeLimits = registerValidatorsByClusterSizeLimits;
36461
- exports.rest_endpoints = rest_endpoints;