@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.mjs CHANGED
@@ -1,168 +1,7 @@
1
- import { d as decodeOperatorPublicKey, M as MapCache, S as Symbol$1, e as eq, U as Uint8Array$1, g as getAllKeys, a as getTag, i as isBuffer, b as Stack, c as isTypedArray$1, f as isArray$1, h as isObjectLike$1, s as stringifyBigints, j as isUndefined$1, t as tryCatch$1, k as configArgsSchema, l as getClusterSnapshot$1, m as isKeySharesItem, n as createClusterId, o as createEmptyCluster, r as roundOperatorFee, p as bigintMax, q as ensureNoKeysharesErrors, u as ensureValidatorsUniqueness, v as validateConsistentOperatorPublicKeys, w as validateConsistentOperatorIds, x as sortNumbers, K as KeysharesValidationError, y as KeysharesValidationErrors } from "./config-DlwfpwZd.mjs";
2
- import { defineChain as defineChain$1, decodeEventLog, encodeAbiParameters, parseAbiParameters, isAddressEqual, zeroAddress } from "viem";
1
+ import { p as process$1, d as decodeOperatorPublicKey, M as MapCache, S as Symbol$1, e as eq, U as Uint8Array$1, g as getAllKeys, a as getTag, i as isBuffer, b as Stack, c as isTypedArray$1, f as isArray$1, h as isObjectLike$1, s as stringifyBigints, j as isUndefined$1, t as tryCatch$1, k as configArgsSchema, l as chainIds, m as contracts, n as graph_endpoints, r as rest_endpoints, o as getClusterSnapshot$1, q as isKeySharesItem, u as registerValidatorsByClusterSizeLimits, v as createClusterId, w as createEmptyCluster, x as roundOperatorFee, y as globals, z as bigintMax, A as ensureNoKeysharesErrors, B as ensureValidatorsUniqueness, C as validateConsistentOperatorPublicKeys, D as validateConsistentOperatorIds, E as sortNumbers, K as KeysharesValidationError, F as KeysharesValidationErrors } from "./globals-BHuFvs8-.mjs";
2
+ import { H, G as G2, I } from "./globals-BHuFvs8-.mjs";
3
+ import { decodeEventLog, encodeFunctionData, encodeAbiParameters, parseAbiParameters, isAddressEqual, zeroAddress } from "viem";
3
4
  import { SSVKeys, KeyShares, KeySharesItem } from "ssv-keys";
4
- function getDefaultExportFromCjs$1(x) {
5
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
6
- }
7
- var browser$e = { exports: {} };
8
- var process = browser$e.exports = {};
9
- var cachedSetTimeout;
10
- var cachedClearTimeout;
11
- function defaultSetTimout() {
12
- throw new Error("setTimeout has not been defined");
13
- }
14
- function defaultClearTimeout() {
15
- throw new Error("clearTimeout has not been defined");
16
- }
17
- (function() {
18
- try {
19
- if (typeof setTimeout === "function") {
20
- cachedSetTimeout = setTimeout;
21
- } else {
22
- cachedSetTimeout = defaultSetTimout;
23
- }
24
- } catch (e) {
25
- cachedSetTimeout = defaultSetTimout;
26
- }
27
- try {
28
- if (typeof clearTimeout === "function") {
29
- cachedClearTimeout = clearTimeout;
30
- } else {
31
- cachedClearTimeout = defaultClearTimeout;
32
- }
33
- } catch (e) {
34
- cachedClearTimeout = defaultClearTimeout;
35
- }
36
- })();
37
- function runTimeout(fun) {
38
- if (cachedSetTimeout === setTimeout) {
39
- return setTimeout(fun, 0);
40
- }
41
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
42
- cachedSetTimeout = setTimeout;
43
- return setTimeout(fun, 0);
44
- }
45
- try {
46
- return cachedSetTimeout(fun, 0);
47
- } catch (e) {
48
- try {
49
- return cachedSetTimeout.call(null, fun, 0);
50
- } catch (e2) {
51
- return cachedSetTimeout.call(this, fun, 0);
52
- }
53
- }
54
- }
55
- function runClearTimeout(marker) {
56
- if (cachedClearTimeout === clearTimeout) {
57
- return clearTimeout(marker);
58
- }
59
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
60
- cachedClearTimeout = clearTimeout;
61
- return clearTimeout(marker);
62
- }
63
- try {
64
- return cachedClearTimeout(marker);
65
- } catch (e) {
66
- try {
67
- return cachedClearTimeout.call(null, marker);
68
- } catch (e2) {
69
- return cachedClearTimeout.call(this, marker);
70
- }
71
- }
72
- }
73
- var queue = [];
74
- var draining = false;
75
- var currentQueue;
76
- var queueIndex = -1;
77
- function cleanUpNextTick() {
78
- if (!draining || !currentQueue) {
79
- return;
80
- }
81
- draining = false;
82
- if (currentQueue.length) {
83
- queue = currentQueue.concat(queue);
84
- } else {
85
- queueIndex = -1;
86
- }
87
- if (queue.length) {
88
- drainQueue();
89
- }
90
- }
91
- function drainQueue() {
92
- if (draining) {
93
- return;
94
- }
95
- var timeout = runTimeout(cleanUpNextTick);
96
- draining = true;
97
- var len = queue.length;
98
- while (len) {
99
- currentQueue = queue;
100
- queue = [];
101
- while (++queueIndex < len) {
102
- if (currentQueue) {
103
- currentQueue[queueIndex].run();
104
- }
105
- }
106
- queueIndex = -1;
107
- len = queue.length;
108
- }
109
- currentQueue = null;
110
- draining = false;
111
- runClearTimeout(timeout);
112
- }
113
- process.nextTick = function(fun) {
114
- var args = new Array(arguments.length - 1);
115
- if (arguments.length > 1) {
116
- for (var i = 1; i < arguments.length; i++) {
117
- args[i - 1] = arguments[i];
118
- }
119
- }
120
- queue.push(new Item(fun, args));
121
- if (queue.length === 1 && !draining) {
122
- runTimeout(drainQueue);
123
- }
124
- };
125
- function Item(fun, array) {
126
- this.fun = fun;
127
- this.array = array;
128
- }
129
- Item.prototype.run = function() {
130
- this.fun.apply(null, this.array);
131
- };
132
- process.title = "browser";
133
- process.browser = true;
134
- process.env = {};
135
- process.argv = [];
136
- process.version = "";
137
- process.versions = {};
138
- function noop$2() {
139
- }
140
- process.on = noop$2;
141
- process.addListener = noop$2;
142
- process.once = noop$2;
143
- process.off = noop$2;
144
- process.removeListener = noop$2;
145
- process.removeAllListeners = noop$2;
146
- process.emit = noop$2;
147
- process.prependListener = noop$2;
148
- process.prependOnceListener = noop$2;
149
- process.listeners = function(name2) {
150
- return [];
151
- };
152
- process.binding = function(name2) {
153
- throw new Error("process.binding is not supported");
154
- };
155
- process.cwd = function() {
156
- return "/";
157
- };
158
- process.chdir = function(dir) {
159
- throw new Error("process.chdir is not supported");
160
- };
161
- process.umask = function() {
162
- return 0;
163
- };
164
- var browserExports$1 = browser$e.exports;
165
- const process$1 = /* @__PURE__ */ getDefaultExportFromCjs$1(browserExports$1);
166
5
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
167
6
  function getDefaultExportFromCjs(x) {
168
7
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -1727,9 +1566,9 @@ var dist = {};
1727
1566
  }
1728
1567
  E(
1729
1568
  "ERR_BUFFER_OUT_OF_BOUNDS",
1730
- function(name2) {
1731
- if (name2) {
1732
- return `${name2} is outside of buffer bounds`;
1569
+ function(name) {
1570
+ if (name) {
1571
+ return `${name} is outside of buffer bounds`;
1733
1572
  }
1734
1573
  return "Attempt to access memory outside buffer bounds";
1735
1574
  },
@@ -1737,8 +1576,8 @@ var dist = {};
1737
1576
  );
1738
1577
  E(
1739
1578
  "ERR_INVALID_ARG_TYPE",
1740
- function(name2, actual) {
1741
- return `The "${name2}" argument must be of type number. Received type ${typeof actual}`;
1579
+ function(name, actual) {
1580
+ return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1742
1581
  },
1743
1582
  TypeError
1744
1583
  );
@@ -1791,9 +1630,9 @@ var dist = {};
1791
1630
  }
1792
1631
  checkBounds(buf, offset, byteLength3);
1793
1632
  }
1794
- function validateNumber(value, name2) {
1633
+ function validateNumber(value, name) {
1795
1634
  if (typeof value !== "number") {
1796
- throw new errors.ERR_INVALID_ARG_TYPE(name2, "number", value);
1635
+ throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
1797
1636
  }
1798
1637
  }
1799
1638
  function boundsError(value, length, type2) {
@@ -1956,7 +1795,7 @@ var dist = {};
1956
1795
  exports2.transcode = buffer2.transcode;
1957
1796
  })(dist);
1958
1797
  const Buffer$C = /* @__PURE__ */ getDefaultExportFromCjs(dist);
1959
- var main$2 = { exports: {} };
1798
+ var main = { exports: {} };
1960
1799
  var empty = null;
1961
1800
  var empty_1 = empty;
1962
1801
  function assertPath(path3) {
@@ -2359,57 +2198,57 @@ var posix = {
2359
2198
  };
2360
2199
  posix.posix = posix;
2361
2200
  var pathBrowserify = posix;
2362
- var browser$d = {};
2363
- browser$d.endianness = function() {
2201
+ var browser$c = {};
2202
+ browser$c.endianness = function() {
2364
2203
  return "LE";
2365
2204
  };
2366
- browser$d.hostname = function() {
2205
+ browser$c.hostname = function() {
2367
2206
  if (typeof location !== "undefined") {
2368
2207
  return location.hostname;
2369
2208
  } else return "";
2370
2209
  };
2371
- browser$d.loadavg = function() {
2210
+ browser$c.loadavg = function() {
2372
2211
  return [];
2373
2212
  };
2374
- browser$d.uptime = function() {
2213
+ browser$c.uptime = function() {
2375
2214
  return 0;
2376
2215
  };
2377
- browser$d.freemem = function() {
2216
+ browser$c.freemem = function() {
2378
2217
  return Number.MAX_VALUE;
2379
2218
  };
2380
- browser$d.totalmem = function() {
2219
+ browser$c.totalmem = function() {
2381
2220
  return Number.MAX_VALUE;
2382
2221
  };
2383
- browser$d.cpus = function() {
2222
+ browser$c.cpus = function() {
2384
2223
  return [];
2385
2224
  };
2386
- browser$d.type = function() {
2225
+ browser$c.type = function() {
2387
2226
  return "Browser";
2388
2227
  };
2389
- browser$d.release = function() {
2228
+ browser$c.release = function() {
2390
2229
  if (typeof navigator !== "undefined") {
2391
2230
  return navigator.appVersion;
2392
2231
  }
2393
2232
  return "";
2394
2233
  };
2395
- browser$d.networkInterfaces = browser$d.getNetworkInterfaces = function() {
2234
+ browser$c.networkInterfaces = browser$c.getNetworkInterfaces = function() {
2396
2235
  return {};
2397
2236
  };
2398
- browser$d.arch = function() {
2237
+ browser$c.arch = function() {
2399
2238
  return "javascript";
2400
2239
  };
2401
- browser$d.platform = function() {
2240
+ browser$c.platform = function() {
2402
2241
  return "browser";
2403
2242
  };
2404
- browser$d.tmpdir = browser$d.tmpDir = function() {
2243
+ browser$c.tmpdir = browser$c.tmpDir = function() {
2405
2244
  return "/tmp";
2406
2245
  };
2407
- browser$d.EOL = "\n";
2408
- browser$d.homedir = function() {
2246
+ browser$c.EOL = "\n";
2247
+ browser$c.homedir = function() {
2409
2248
  return "/";
2410
2249
  };
2411
2250
  var cryptoBrowserify = {};
2412
- var browser$c = { exports: {} };
2251
+ var browser$b = { exports: {} };
2413
2252
  var safeBuffer$2 = { exports: {} };
2414
2253
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2415
2254
  (function(module, exports2) {
@@ -2475,9 +2314,9 @@ function oldBrowser$1() {
2475
2314
  var Buffer$B = safeBufferExports$1.Buffer;
2476
2315
  var crypto$2 = commonjsGlobal.crypto || commonjsGlobal.msCrypto;
2477
2316
  if (crypto$2 && crypto$2.getRandomValues) {
2478
- browser$c.exports = randomBytes$2;
2317
+ browser$b.exports = randomBytes$2;
2479
2318
  } else {
2480
- browser$c.exports = oldBrowser$1;
2319
+ browser$b.exports = oldBrowser$1;
2481
2320
  }
2482
2321
  function randomBytes$2(size, cb) {
2483
2322
  if (size > MAX_UINT32) throw new RangeError("requested too many random bytes");
@@ -2498,7 +2337,7 @@ function randomBytes$2(size, cb) {
2498
2337
  }
2499
2338
  return bytes;
2500
2339
  }
2501
- var browserExports = browser$c.exports;
2340
+ var browserExports = browser$b.exports;
2502
2341
  var inherits_browser = { exports: {} };
2503
2342
  if (typeof Object.create === "function") {
2504
2343
  inherits_browser.exports = function inherits2(ctor, superCtor) {
@@ -2849,10 +2688,10 @@ function unwrapListeners(arr) {
2849
2688
  }
2850
2689
  return ret;
2851
2690
  }
2852
- function once$2(emitter, name2) {
2691
+ function once$2(emitter, name) {
2853
2692
  return new Promise(function(resolve2, reject) {
2854
2693
  function errorListener(err) {
2855
- emitter.removeListener(name2, resolver);
2694
+ emitter.removeListener(name, resolver);
2856
2695
  reject(err);
2857
2696
  }
2858
2697
  function resolver() {
@@ -2861,8 +2700,8 @@ function once$2(emitter, name2) {
2861
2700
  }
2862
2701
  resolve2([].slice.call(arguments));
2863
2702
  }
2864
- eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
2865
- if (name2 !== "error") {
2703
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
2704
+ if (name !== "error") {
2866
2705
  addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
2867
2706
  }
2868
2707
  });
@@ -2872,17 +2711,17 @@ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
2872
2711
  eventTargetAgnosticAddListener(emitter, "error", handler, flags);
2873
2712
  }
2874
2713
  }
2875
- function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
2714
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
2876
2715
  if (typeof emitter.on === "function") {
2877
2716
  if (flags.once) {
2878
- emitter.once(name2, listener);
2717
+ emitter.once(name, listener);
2879
2718
  } else {
2880
- emitter.on(name2, listener);
2719
+ emitter.on(name, listener);
2881
2720
  }
2882
2721
  } else if (typeof emitter.addEventListener === "function") {
2883
- emitter.addEventListener(name2, function wrapListener(arg) {
2722
+ emitter.addEventListener(name, function wrapListener(arg) {
2884
2723
  if (flags.once) {
2885
- emitter.removeEventListener(name2, wrapListener);
2724
+ emitter.removeEventListener(name, wrapListener);
2886
2725
  }
2887
2726
  listener(arg);
2888
2727
  });
@@ -2893,7 +2732,7 @@ function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
2893
2732
  var eventsExports = events.exports;
2894
2733
  var streamBrowser$1 = eventsExports.EventEmitter;
2895
2734
  var util$3 = {};
2896
- var types$1 = {};
2735
+ var types = {};
2897
2736
  var shams$1 = function hasSymbols2() {
2898
2737
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
2899
2738
  return false;
@@ -3173,26 +3012,26 @@ if (getProto$1) {
3173
3012
  INTRINSICS["%Error.prototype%"] = errorProto;
3174
3013
  }
3175
3014
  }
3176
- var doEval = function doEval2(name2) {
3015
+ var doEval = function doEval2(name) {
3177
3016
  var value;
3178
- if (name2 === "%AsyncFunction%") {
3017
+ if (name === "%AsyncFunction%") {
3179
3018
  value = getEvalledConstructor("async function () {}");
3180
- } else if (name2 === "%GeneratorFunction%") {
3019
+ } else if (name === "%GeneratorFunction%") {
3181
3020
  value = getEvalledConstructor("function* () {}");
3182
- } else if (name2 === "%AsyncGeneratorFunction%") {
3021
+ } else if (name === "%AsyncGeneratorFunction%") {
3183
3022
  value = getEvalledConstructor("async function* () {}");
3184
- } else if (name2 === "%AsyncGenerator%") {
3023
+ } else if (name === "%AsyncGenerator%") {
3185
3024
  var fn = doEval2("%AsyncGeneratorFunction%");
3186
3025
  if (fn) {
3187
3026
  value = fn.prototype;
3188
3027
  }
3189
- } else if (name2 === "%AsyncIteratorPrototype%") {
3028
+ } else if (name === "%AsyncIteratorPrototype%") {
3190
3029
  var gen = doEval2("%AsyncGenerator%");
3191
3030
  if (gen && getProto$1) {
3192
3031
  value = getProto$1(gen.prototype);
3193
3032
  }
3194
3033
  }
3195
- INTRINSICS[name2] = value;
3034
+ INTRINSICS[name] = value;
3196
3035
  return value;
3197
3036
  };
3198
3037
  var LEGACY_ALIASES = {
@@ -3272,8 +3111,8 @@ var stringToPath = function stringToPath2(string) {
3272
3111
  });
3273
3112
  return result;
3274
3113
  };
3275
- var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3276
- var intrinsicName = name2;
3114
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
3115
+ var intrinsicName = name;
3277
3116
  var alias;
3278
3117
  if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
3279
3118
  alias = LEGACY_ALIASES[intrinsicName];
@@ -3285,7 +3124,7 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3285
3124
  value = doEval(intrinsicName);
3286
3125
  }
3287
3126
  if (typeof value === "undefined" && !allowMissing) {
3288
- throw new $TypeError$2("intrinsic " + name2 + " exists, but is not available. Please file an issue!");
3127
+ throw new $TypeError$2("intrinsic " + name + " exists, but is not available. Please file an issue!");
3289
3128
  }
3290
3129
  return {
3291
3130
  alias,
@@ -3293,19 +3132,19 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3293
3132
  value
3294
3133
  };
3295
3134
  }
3296
- throw new $SyntaxError$1("intrinsic " + name2 + " does not exist!");
3135
+ throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
3297
3136
  };
3298
- var getIntrinsic = function GetIntrinsic2(name2, allowMissing) {
3299
- if (typeof name2 !== "string" || name2.length === 0) {
3137
+ var getIntrinsic = function GetIntrinsic2(name, allowMissing) {
3138
+ if (typeof name !== "string" || name.length === 0) {
3300
3139
  throw new $TypeError$2("intrinsic name must be a non-empty string");
3301
3140
  }
3302
3141
  if (arguments.length > 1 && typeof allowMissing !== "boolean") {
3303
3142
  throw new $TypeError$2('"allowMissing" argument must be a boolean');
3304
3143
  }
3305
- if ($exec(/^%?[^%]*%?$/, name2) === null) {
3144
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
3306
3145
  throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3307
3146
  }
3308
- var parts = stringToPath(name2);
3147
+ var parts = stringToPath(name);
3309
3148
  var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
3310
3149
  var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
3311
3150
  var intrinsicRealName = intrinsic.name;
@@ -3333,7 +3172,7 @@ var getIntrinsic = function GetIntrinsic2(name2, allowMissing) {
3333
3172
  } else if (value != null) {
3334
3173
  if (!(part in value)) {
3335
3174
  if (!allowMissing) {
3336
- throw new $TypeError$2("base intrinsic for " + name2 + " exists, but the property is not available.");
3175
+ throw new $TypeError$2("base intrinsic for " + name + " exists, but the property is not available.");
3337
3176
  }
3338
3177
  return void 0;
3339
3178
  }
@@ -3520,9 +3359,9 @@ var callBindExports = callBind$2.exports;
3520
3359
  var GetIntrinsic = getIntrinsic;
3521
3360
  var callBind$1 = callBindExports;
3522
3361
  var $indexOf$1 = callBind$1(GetIntrinsic("String.prototype.indexOf"));
3523
- var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
3524
- var intrinsic = GetIntrinsic(name2, !!allowMissing);
3525
- if (typeof intrinsic === "function" && $indexOf$1(name2, ".prototype.") > -1) {
3362
+ var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
3363
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
3364
+ if (typeof intrinsic === "function" && $indexOf$1(name, ".prototype.") > -1) {
3526
3365
  return callBind$1(intrinsic);
3527
3366
  }
3528
3367
  return intrinsic;
@@ -3838,11 +3677,11 @@ var trySlices = function tryAllSlices(value) {
3838
3677
  /** @type {any} */
3839
3678
  cache,
3840
3679
  /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
3841
- function(getter, name2) {
3680
+ function(getter, name) {
3842
3681
  if (!found) {
3843
3682
  try {
3844
3683
  getter(value);
3845
- found = $slice(name2, 1);
3684
+ found = $slice(name, 1);
3846
3685
  } catch (e) {
3847
3686
  }
3848
3687
  }
@@ -4095,7 +3934,7 @@ var isTypedArray = function isTypedArray2(value) {
4095
3934
  }
4096
3935
  });
4097
3936
  });
4098
- })(types$1);
3937
+ })(types);
4099
3938
  var isBufferBrowser = function isBuffer2(arg) {
4100
3939
  return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
4101
3940
  };
@@ -4283,8 +4122,8 @@ var isBufferBrowser = function isBuffer2(arg) {
4283
4122
  }
4284
4123
  if (keys.length === 0) {
4285
4124
  if (isFunction2(value)) {
4286
- var name2 = value.name ? ": " + value.name : "";
4287
- return ctx.stylize("[Function" + name2 + "]", "special");
4125
+ var name = value.name ? ": " + value.name : "";
4126
+ return ctx.stylize("[Function" + name + "]", "special");
4288
4127
  }
4289
4128
  if (isRegExp2(value)) {
4290
4129
  return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
@@ -4384,7 +4223,7 @@ var isBufferBrowser = function isBuffer2(arg) {
4384
4223
  return output;
4385
4224
  }
4386
4225
  function formatProperty(ctx, value, recurseTimes, visibleKeys, key2, array) {
4387
- var name2, str, desc;
4226
+ var name, str, desc;
4388
4227
  desc = Object.getOwnPropertyDescriptor(value, key2) || { value: value[key2] };
4389
4228
  if (desc.get) {
4390
4229
  if (desc.set) {
@@ -4398,7 +4237,7 @@ var isBufferBrowser = function isBuffer2(arg) {
4398
4237
  }
4399
4238
  }
4400
4239
  if (!hasOwnProperty2(visibleKeys, key2)) {
4401
- name2 = "[" + key2 + "]";
4240
+ name = "[" + key2 + "]";
4402
4241
  }
4403
4242
  if (!str) {
4404
4243
  if (ctx.seen.indexOf(desc.value) < 0) {
@@ -4422,20 +4261,20 @@ var isBufferBrowser = function isBuffer2(arg) {
4422
4261
  str = ctx.stylize("[Circular]", "special");
4423
4262
  }
4424
4263
  }
4425
- if (isUndefined2(name2)) {
4264
+ if (isUndefined2(name)) {
4426
4265
  if (array && key2.match(/^\d+$/)) {
4427
4266
  return str;
4428
4267
  }
4429
- name2 = JSON.stringify("" + key2);
4430
- if (name2.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
4431
- name2 = name2.slice(1, -1);
4432
- name2 = ctx.stylize(name2, "name");
4268
+ name = JSON.stringify("" + key2);
4269
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
4270
+ name = name.slice(1, -1);
4271
+ name = ctx.stylize(name, "name");
4433
4272
  } else {
4434
- name2 = name2.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
4435
- name2 = ctx.stylize(name2, "string");
4273
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
4274
+ name = ctx.stylize(name, "string");
4436
4275
  }
4437
4276
  }
4438
- return name2 + ": " + str;
4277
+ return name + ": " + str;
4439
4278
  }
4440
4279
  function reduceToSingleString(output, base2, braces) {
4441
4280
  var length = output.reduce(function(prev, cur) {
@@ -4447,7 +4286,7 @@ var isBufferBrowser = function isBuffer2(arg) {
4447
4286
  }
4448
4287
  return braces[0] + base2 + " " + output.join(", ") + " " + braces[1];
4449
4288
  }
4450
- exports2.types = types$1;
4289
+ exports2.types = types;
4451
4290
  function isArray2(ar) {
4452
4291
  return Array.isArray(ar);
4453
4292
  }
@@ -4713,11 +4552,11 @@ function requireBuffer_list() {
4713
4552
  if (typeof input !== "object" || input === null) return input;
4714
4553
  var prim = input[Symbol.toPrimitive];
4715
4554
  if (prim !== void 0) {
4716
- var res = prim.call(input, hint || "default");
4555
+ var res = prim.call(input, hint);
4717
4556
  if (typeof res !== "object") return res;
4718
4557
  throw new TypeError("@@toPrimitive must return a primitive value.");
4719
4558
  }
4720
- return (hint === "string" ? String : Number)(input);
4559
+ return String(input);
4721
4560
  }
4722
4561
  var _require = dist, Buffer2 = _require.Buffer;
4723
4562
  var _require2 = util$3, inspect7 = _require2.inspect;
@@ -5037,10 +4876,10 @@ function includes(str, search, start) {
5037
4876
  return str.indexOf(search, start) !== -1;
5038
4877
  }
5039
4878
  }
5040
- createErrorType("ERR_INVALID_OPT_VALUE", function(name2, value) {
5041
- return 'The value "' + value + '" is invalid for option "' + name2 + '"';
4879
+ createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
4880
+ return 'The value "' + value + '" is invalid for option "' + name + '"';
5042
4881
  }, TypeError);
5043
- createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) {
4882
+ createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
5044
4883
  var determiner;
5045
4884
  if (typeof expected === "string" && startsWith(expected, "not ")) {
5046
4885
  determiner = "must not be";
@@ -5049,22 +4888,22 @@ createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) {
5049
4888
  determiner = "must be";
5050
4889
  }
5051
4890
  var msg;
5052
- if (endsWith(name2, " argument")) {
5053
- msg = "The ".concat(name2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
4891
+ if (endsWith(name, " argument")) {
4892
+ msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
5054
4893
  } else {
5055
- var type2 = includes(name2, ".") ? "property" : "argument";
5056
- msg = 'The "'.concat(name2, '" ').concat(type2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
4894
+ var type2 = includes(name, ".") ? "property" : "argument";
4895
+ msg = 'The "'.concat(name, '" ').concat(type2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
5057
4896
  }
5058
4897
  msg += ". Received type ".concat(typeof actual);
5059
4898
  return msg;
5060
4899
  }, TypeError);
5061
4900
  createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
5062
- createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name2) {
5063
- return "The " + name2 + " method is not implemented";
4901
+ createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
4902
+ return "The " + name + " method is not implemented";
5064
4903
  });
5065
4904
  createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
5066
- createErrorType("ERR_STREAM_DESTROYED", function(name2) {
5067
- return "Cannot call " + name2 + " after a stream was destroyed";
4905
+ createErrorType("ERR_STREAM_DESTROYED", function(name) {
4906
+ return "Cannot call " + name + " after a stream was destroyed";
5068
4907
  });
5069
4908
  createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
5070
4909
  createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
@@ -5083,8 +4922,8 @@ function getHighWaterMark(state2, options2, duplexKey, isDuplex) {
5083
4922
  var hwm = highWaterMarkFrom(options2, isDuplex, duplexKey);
5084
4923
  if (hwm != null) {
5085
4924
  if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
5086
- var name2 = isDuplex ? duplexKey : "highWaterMark";
5087
- throw new ERR_INVALID_OPT_VALUE(name2, hwm);
4925
+ var name = isDuplex ? duplexKey : "highWaterMark";
4926
+ throw new ERR_INVALID_OPT_VALUE(name, hwm);
5088
4927
  }
5089
4928
  return Math.floor(hwm);
5090
4929
  }
@@ -5093,7 +4932,7 @@ function getHighWaterMark(state2, options2, duplexKey, isDuplex) {
5093
4932
  var state = {
5094
4933
  getHighWaterMark
5095
4934
  };
5096
- var browser$b = deprecate;
4935
+ var browser$a = deprecate;
5097
4936
  function deprecate(fn, msg) {
5098
4937
  if (config$1("noDeprecation")) {
5099
4938
  return fn;
@@ -5114,13 +4953,13 @@ function deprecate(fn, msg) {
5114
4953
  }
5115
4954
  return deprecated;
5116
4955
  }
5117
- function config$1(name2) {
4956
+ function config$1(name) {
5118
4957
  try {
5119
4958
  if (!commonjsGlobal.localStorage) return false;
5120
4959
  } catch (_) {
5121
4960
  return false;
5122
4961
  }
5123
- var val = commonjsGlobal.localStorage[name2];
4962
+ var val = commonjsGlobal.localStorage[name];
5124
4963
  if (null == val) return false;
5125
4964
  return String(val).toLowerCase() === "true";
5126
4965
  }
@@ -5141,7 +4980,7 @@ function require_stream_writable$1() {
5141
4980
  var Duplex2;
5142
4981
  Writable.WritableState = WritableState;
5143
4982
  var internalUtil = {
5144
- deprecate: browser$b
4983
+ deprecate: browser$a
5145
4984
  };
5146
4985
  var Stream2 = streamBrowser$1;
5147
4986
  var Buffer2 = dist.Buffer;
@@ -6013,7 +5852,7 @@ function requireAsync_iterator() {
6013
5852
  if (typeof input !== "object" || input === null) return input;
6014
5853
  var prim = input[Symbol.toPrimitive];
6015
5854
  if (prim !== void 0) {
6016
- var res = prim.call(input, hint || "default");
5855
+ var res = prim.call(input, hint);
6017
5856
  if (typeof res !== "object") return res;
6018
5857
  throw new TypeError("@@toPrimitive must return a primitive value.");
6019
5858
  }
@@ -7840,13 +7679,13 @@ Sha.prototype._update = function(M) {
7840
7679
  this._e = e + this._e | 0;
7841
7680
  };
7842
7681
  Sha.prototype._hash = function() {
7843
- var H = Buffer$v.allocUnsafe(20);
7844
- H.writeInt32BE(this._a | 0, 0);
7845
- H.writeInt32BE(this._b | 0, 4);
7846
- H.writeInt32BE(this._c | 0, 8);
7847
- H.writeInt32BE(this._d | 0, 12);
7848
- H.writeInt32BE(this._e | 0, 16);
7849
- return H;
7682
+ var H2 = Buffer$v.allocUnsafe(20);
7683
+ H2.writeInt32BE(this._a | 0, 0);
7684
+ H2.writeInt32BE(this._b | 0, 4);
7685
+ H2.writeInt32BE(this._c | 0, 8);
7686
+ H2.writeInt32BE(this._d | 0, 12);
7687
+ H2.writeInt32BE(this._e | 0, 16);
7688
+ return H2;
7850
7689
  };
7851
7690
  var sha$4 = Sha;
7852
7691
  var inherits$m = inherits_browserExports;
@@ -7912,13 +7751,13 @@ Sha1.prototype._update = function(M) {
7912
7751
  this._e = e + this._e | 0;
7913
7752
  };
7914
7753
  Sha1.prototype._hash = function() {
7915
- var H = Buffer$u.allocUnsafe(20);
7916
- H.writeInt32BE(this._a | 0, 0);
7917
- H.writeInt32BE(this._b | 0, 4);
7918
- H.writeInt32BE(this._c | 0, 8);
7919
- H.writeInt32BE(this._d | 0, 12);
7920
- H.writeInt32BE(this._e | 0, 16);
7921
- return H;
7754
+ var H2 = Buffer$u.allocUnsafe(20);
7755
+ H2.writeInt32BE(this._a | 0, 0);
7756
+ H2.writeInt32BE(this._b | 0, 4);
7757
+ H2.writeInt32BE(this._c | 0, 8);
7758
+ H2.writeInt32BE(this._d | 0, 12);
7759
+ H2.writeInt32BE(this._e | 0, 16);
7760
+ return H2;
7922
7761
  };
7923
7762
  var sha1 = Sha1;
7924
7763
  var inherits$l = inherits_browserExports;
@@ -8060,16 +7899,16 @@ Sha256$1.prototype._update = function(M) {
8060
7899
  this._h = h + this._h | 0;
8061
7900
  };
8062
7901
  Sha256$1.prototype._hash = function() {
8063
- var H = Buffer$t.allocUnsafe(32);
8064
- H.writeInt32BE(this._a, 0);
8065
- H.writeInt32BE(this._b, 4);
8066
- H.writeInt32BE(this._c, 8);
8067
- H.writeInt32BE(this._d, 12);
8068
- H.writeInt32BE(this._e, 16);
8069
- H.writeInt32BE(this._f, 20);
8070
- H.writeInt32BE(this._g, 24);
8071
- H.writeInt32BE(this._h, 28);
8072
- return H;
7902
+ var H2 = Buffer$t.allocUnsafe(32);
7903
+ H2.writeInt32BE(this._a, 0);
7904
+ H2.writeInt32BE(this._b, 4);
7905
+ H2.writeInt32BE(this._c, 8);
7906
+ H2.writeInt32BE(this._d, 12);
7907
+ H2.writeInt32BE(this._e, 16);
7908
+ H2.writeInt32BE(this._f, 20);
7909
+ H2.writeInt32BE(this._g, 24);
7910
+ H2.writeInt32BE(this._h, 28);
7911
+ return H2;
8073
7912
  };
8074
7913
  var sha256$1 = Sha256$1;
8075
7914
  var inherits$k = inherits_browserExports;
@@ -8095,15 +7934,15 @@ Sha224.prototype.init = function() {
8095
7934
  return this;
8096
7935
  };
8097
7936
  Sha224.prototype._hash = function() {
8098
- var H = Buffer$s.allocUnsafe(28);
8099
- H.writeInt32BE(this._a, 0);
8100
- H.writeInt32BE(this._b, 4);
8101
- H.writeInt32BE(this._c, 8);
8102
- H.writeInt32BE(this._d, 12);
8103
- H.writeInt32BE(this._e, 16);
8104
- H.writeInt32BE(this._f, 20);
8105
- H.writeInt32BE(this._g, 24);
8106
- return H;
7937
+ var H2 = Buffer$s.allocUnsafe(28);
7938
+ H2.writeInt32BE(this._a, 0);
7939
+ H2.writeInt32BE(this._b, 4);
7940
+ H2.writeInt32BE(this._c, 8);
7941
+ H2.writeInt32BE(this._d, 12);
7942
+ H2.writeInt32BE(this._e, 16);
7943
+ H2.writeInt32BE(this._f, 20);
7944
+ H2.writeInt32BE(this._g, 24);
7945
+ return H2;
8107
7946
  };
8108
7947
  var sha224$1 = Sha224;
8109
7948
  var inherits$j = inherits_browserExports;
@@ -8426,10 +8265,10 @@ Sha512.prototype._update = function(M) {
8426
8265
  this._hh = this._hh + hh + getCarry(this._hl, hl2) | 0;
8427
8266
  };
8428
8267
  Sha512.prototype._hash = function() {
8429
- var H = Buffer$r.allocUnsafe(64);
8268
+ var H2 = Buffer$r.allocUnsafe(64);
8430
8269
  function writeInt64BE(h, l, offset) {
8431
- H.writeInt32BE(h, offset);
8432
- H.writeInt32BE(l, offset + 4);
8270
+ H2.writeInt32BE(h, offset);
8271
+ H2.writeInt32BE(l, offset + 4);
8433
8272
  }
8434
8273
  writeInt64BE(this._ah, this._al, 0);
8435
8274
  writeInt64BE(this._bh, this._bl, 8);
@@ -8439,7 +8278,7 @@ Sha512.prototype._hash = function() {
8439
8278
  writeInt64BE(this._fh, this._fl, 40);
8440
8279
  writeInt64BE(this._gh, this._gl, 48);
8441
8280
  writeInt64BE(this._hh, this._hl, 56);
8442
- return H;
8281
+ return H2;
8443
8282
  };
8444
8283
  var sha512$1 = Sha512;
8445
8284
  var inherits$i = inherits_browserExports;
@@ -8473,10 +8312,10 @@ Sha384.prototype.init = function() {
8473
8312
  return this;
8474
8313
  };
8475
8314
  Sha384.prototype._hash = function() {
8476
- var H = Buffer$q.allocUnsafe(48);
8315
+ var H2 = Buffer$q.allocUnsafe(48);
8477
8316
  function writeInt64BE(h, l, offset) {
8478
- H.writeInt32BE(h, offset);
8479
- H.writeInt32BE(l, offset + 4);
8317
+ H2.writeInt32BE(h, offset);
8318
+ H2.writeInt32BE(l, offset + 4);
8480
8319
  }
8481
8320
  writeInt64BE(this._ah, this._al, 0);
8482
8321
  writeInt64BE(this._bh, this._bl, 8);
@@ -8484,21 +8323,21 @@ Sha384.prototype._hash = function() {
8484
8323
  writeInt64BE(this._dh, this._dl, 24);
8485
8324
  writeInt64BE(this._eh, this._el, 32);
8486
8325
  writeInt64BE(this._fh, this._fl, 40);
8487
- return H;
8326
+ return H2;
8488
8327
  };
8489
8328
  var sha384$1 = Sha384;
8490
- var exports$1 = sha_js.exports = function SHA(algorithm) {
8329
+ var exports = sha_js.exports = function SHA(algorithm) {
8491
8330
  algorithm = algorithm.toLowerCase();
8492
- var Algorithm = exports$1[algorithm];
8331
+ var Algorithm = exports[algorithm];
8493
8332
  if (!Algorithm) throw new Error(algorithm + " is not supported (we accept pull requests)");
8494
8333
  return new Algorithm();
8495
8334
  };
8496
- exports$1.sha = sha$4;
8497
- exports$1.sha1 = sha1;
8498
- exports$1.sha224 = sha224$1;
8499
- exports$1.sha256 = sha256$1;
8500
- exports$1.sha384 = sha384$1;
8501
- exports$1.sha512 = sha512$1;
8335
+ exports.sha = sha$4;
8336
+ exports.sha1 = sha1;
8337
+ exports.sha224 = sha224$1;
8338
+ exports.sha256 = sha256$1;
8339
+ exports.sha384 = sha384$1;
8340
+ exports.sha512 = sha512$1;
8502
8341
  var sha_jsExports = sha_js.exports;
8503
8342
  var streamBrowserify = Stream;
8504
8343
  var EE = eventsExports.EventEmitter;
@@ -8672,7 +8511,7 @@ Hash.prototype._update = function(data) {
8672
8511
  Hash.prototype._final = function() {
8673
8512
  return this._hash.digest();
8674
8513
  };
8675
- var browser$a = function createHash2(alg) {
8514
+ var browser$9 = function createHash2(alg) {
8676
8515
  alg = alg.toLowerCase();
8677
8516
  if (alg === "md5") return new MD5$2();
8678
8517
  if (alg === "rmd160" || alg === "ripemd160") return new RIPEMD160$3();
@@ -8756,7 +8595,7 @@ Hmac$2.prototype._final = function() {
8756
8595
  var hash3 = this._alg === "rmd160" ? new RIPEMD160$2() : sha$2(this._alg);
8757
8596
  return hash3.update(this._opad).update(h).digest();
8758
8597
  };
8759
- var browser$9 = function createHmac(alg, key2) {
8598
+ var browser$8 = function createHmac(alg, key2) {
8760
8599
  alg = alg.toLowerCase();
8761
8600
  if (alg === "rmd160" || alg === "ripemd160") {
8762
8601
  return new Hmac$2("rmd160", key2);
@@ -8930,7 +8769,7 @@ const require$$6 = {
8930
8769
  }
8931
8770
  };
8932
8771
  var algos = require$$6;
8933
- var browser$8 = {};
8772
+ var browser$7 = {};
8934
8773
  var MAX_ALLOC = Math.pow(2, 30) - 1;
8935
8774
  var precondition = function(iterations, keylen) {
8936
8775
  if (typeof iterations !== "number") {
@@ -8957,7 +8796,7 @@ if (commonjsGlobal.process && commonjsGlobal.process.browser) {
8957
8796
  }
8958
8797
  var defaultEncoding_1 = defaultEncoding$2;
8959
8798
  var Buffer$m = safeBufferExports$1.Buffer;
8960
- var toBuffer$2 = function(thing, encoding, name2) {
8799
+ var toBuffer$2 = function(thing, encoding, name) {
8961
8800
  if (Buffer$m.isBuffer(thing)) {
8962
8801
  return thing;
8963
8802
  } else if (typeof thing === "string") {
@@ -8965,7 +8804,7 @@ var toBuffer$2 = function(thing, encoding, name2) {
8965
8804
  } else if (ArrayBuffer.isView(thing)) {
8966
8805
  return Buffer$m.from(thing.buffer);
8967
8806
  } else {
8968
- throw new TypeError(name2 + " must be a string, a Buffer, a typed array or a DataView");
8807
+ throw new TypeError(name + " must be a string, a Buffer, a typed array or a DataView");
8969
8808
  }
8970
8809
  };
8971
8810
  var md5 = md5$2;
@@ -9166,9 +9005,9 @@ var async = function(password, salt, iterations, keylen, digest9, callback) {
9166
9005
  return sync(password, salt, iterations, keylen, digest9);
9167
9006
  }), callback);
9168
9007
  };
9169
- browser$8.pbkdf2 = async;
9170
- browser$8.pbkdf2Sync = syncBrowser;
9171
- var browser$7 = {};
9008
+ browser$7.pbkdf2 = async;
9009
+ browser$7.pbkdf2Sync = syncBrowser;
9010
+ var browser$6 = {};
9172
9011
  var des$2 = {};
9173
9012
  var utils$n = {};
9174
9013
  utils$n.readUInt32BE = function readUInt32BE(bytes, off) {
@@ -10304,7 +10143,7 @@ DES$1.prototype._update = function(data) {
10304
10143
  DES$1.prototype._final = function() {
10305
10144
  return Buffer$j.from(this._des.final());
10306
10145
  };
10307
- var browser$6 = {};
10146
+ var browser$5 = {};
10308
10147
  var encrypter = {};
10309
10148
  var ecb = {};
10310
10149
  ecb.encrypt = function(self2, block2) {
@@ -11279,11 +11118,11 @@ var modes$1 = require$$2;
11279
11118
  function getCiphers$1() {
11280
11119
  return Object.keys(modes$1);
11281
11120
  }
11282
- browser$6.createCipher = browser$6.Cipher = ciphers$2.createCipher;
11283
- browser$6.createCipheriv = browser$6.Cipheriv = ciphers$2.createCipheriv;
11284
- browser$6.createDecipher = browser$6.Decipher = deciphers.createDecipher;
11285
- browser$6.createDecipheriv = browser$6.Decipheriv = deciphers.createDecipheriv;
11286
- browser$6.listCiphers = browser$6.getCiphers = getCiphers$1;
11121
+ browser$5.createCipher = browser$5.Cipher = ciphers$2.createCipher;
11122
+ browser$5.createCipheriv = browser$5.Cipheriv = ciphers$2.createCipheriv;
11123
+ browser$5.createDecipher = browser$5.Decipher = deciphers.createDecipher;
11124
+ browser$5.createDecipheriv = browser$5.Decipheriv = deciphers.createDecipheriv;
11125
+ browser$5.listCiphers = browser$5.getCiphers = getCiphers$1;
11287
11126
  var modes = {};
11288
11127
  (function(exports2) {
11289
11128
  exports2["des-ecb"] = {
@@ -11312,7 +11151,7 @@ var modes = {};
11312
11151
  };
11313
11152
  })(modes);
11314
11153
  var DES = browserifyDes;
11315
- var aes = browser$6;
11154
+ var aes = browser$5;
11316
11155
  var aesModes = modes_1;
11317
11156
  var desModes = modes;
11318
11157
  var ebtk = evp_bytestokey;
@@ -11361,12 +11200,12 @@ function createDecipheriv(suite, key2, iv) {
11361
11200
  function getCiphers() {
11362
11201
  return Object.keys(desModes).concat(aes.getCiphers());
11363
11202
  }
11364
- browser$7.createCipher = browser$7.Cipher = createCipher;
11365
- browser$7.createCipheriv = browser$7.Cipheriv = createCipheriv;
11366
- browser$7.createDecipher = browser$7.Decipher = createDecipher;
11367
- browser$7.createDecipheriv = browser$7.Decipheriv = createDecipheriv;
11368
- browser$7.listCiphers = browser$7.getCiphers = getCiphers;
11369
- var browser$5 = {};
11203
+ browser$6.createCipher = browser$6.Cipher = createCipher;
11204
+ browser$6.createCipheriv = browser$6.Cipheriv = createCipheriv;
11205
+ browser$6.createDecipher = browser$6.Decipher = createDecipher;
11206
+ browser$6.createDecipheriv = browser$6.Decipheriv = createDecipheriv;
11207
+ browser$6.listCiphers = browser$6.getCiphers = getCiphers;
11208
+ var browser$4 = {};
11370
11209
  var bn$1 = { exports: {} };
11371
11210
  bn$1.exports;
11372
11211
  (function(module) {
@@ -12949,7 +12788,7 @@ bn$1.exports;
12949
12788
  rws[i] = 0;
12950
12789
  }
12951
12790
  assert2(carry === 0);
12952
- assert2((carry & ~8191) === 0);
12791
+ assert2((carry & -8192) === 0);
12953
12792
  };
12954
12793
  FFTM.prototype.stub = function stub(N) {
12955
12794
  var ph = new Array(N);
@@ -13777,8 +13616,8 @@ bn$1.exports;
13777
13616
  p192: null,
13778
13617
  p25519: null
13779
13618
  };
13780
- function MPrime(name2, p) {
13781
- this.name = name2;
13619
+ function MPrime(name, p) {
13620
+ this.name = name;
13782
13621
  this.p = new BN2(p, 16);
13783
13622
  this.n = this.p.bitLength();
13784
13623
  this.k = new BN2(1).iushln(this.n).isub(this.p);
@@ -13911,21 +13750,21 @@ bn$1.exports;
13911
13750
  }
13912
13751
  return num;
13913
13752
  };
13914
- BN2._prime = function prime(name2) {
13915
- if (primes[name2]) return primes[name2];
13753
+ BN2._prime = function prime(name) {
13754
+ if (primes[name]) return primes[name];
13916
13755
  var prime2;
13917
- if (name2 === "k256") {
13756
+ if (name === "k256") {
13918
13757
  prime2 = new K256();
13919
- } else if (name2 === "p224") {
13758
+ } else if (name === "p224") {
13920
13759
  prime2 = new P224();
13921
- } else if (name2 === "p192") {
13760
+ } else if (name === "p192") {
13922
13761
  prime2 = new P192();
13923
- } else if (name2 === "p25519") {
13762
+ } else if (name === "p25519") {
13924
13763
  prime2 = new P25519();
13925
13764
  } else {
13926
- throw new Error("Unknown prime " + name2);
13765
+ throw new Error("Unknown prime " + name);
13927
13766
  }
13928
- primes[name2] = prime2;
13767
+ primes[name] = prime2;
13929
13768
  return prime2;
13930
13769
  };
13931
13770
  function Red(m) {
@@ -14608,7 +14447,7 @@ function requireDh() {
14608
14447
  }
14609
14448
  var hasRequiredBrowser$2;
14610
14449
  function requireBrowser$2() {
14611
- if (hasRequiredBrowser$2) return browser$5;
14450
+ if (hasRequiredBrowser$2) return browser$4;
14612
14451
  hasRequiredBrowser$2 = 1;
14613
14452
  var generatePrime2 = requireGeneratePrime();
14614
14453
  var primes = require$$1$1;
@@ -14641,9 +14480,9 @@ function requireBrowser$2() {
14641
14480
  }
14642
14481
  return new DH(prime, generator, true);
14643
14482
  }
14644
- browser$5.DiffieHellmanGroup = browser$5.createDiffieHellmanGroup = browser$5.getDiffieHellman = getDiffieHellman;
14645
- browser$5.createDiffieHellman = browser$5.DiffieHellman = createDiffieHellman;
14646
- return browser$5;
14483
+ browser$4.DiffieHellmanGroup = browser$4.createDiffieHellmanGroup = browser$4.getDiffieHellman = getDiffieHellman;
14484
+ browser$4.createDiffieHellman = browser$4.DiffieHellman = createDiffieHellman;
14485
+ return browser$4;
14647
14486
  }
14648
14487
  var readableBrowser = { exports: {} };
14649
14488
  var processNextickArgs = { exports: {} };
@@ -14974,7 +14813,7 @@ function require_stream_writable() {
14974
14813
  var util2 = Object.create(util$2);
14975
14814
  util2.inherits = inherits_browserExports;
14976
14815
  var internalUtil = {
14977
- deprecate: browser$b
14816
+ deprecate: browser$a
14978
14817
  };
14979
14818
  var Stream2 = streamBrowser;
14980
14819
  var Buffer2 = safeBufferExports.Buffer;
@@ -18617,8 +18456,8 @@ bn.exports;
18617
18456
  p192: null,
18618
18457
  p25519: null
18619
18458
  };
18620
- function MPrime(name2, p) {
18621
- this.name = name2;
18459
+ function MPrime(name, p) {
18460
+ this.name = name;
18622
18461
  this.p = new BN2(p, 16);
18623
18462
  this.n = this.p.bitLength();
18624
18463
  this.k = new BN2(1).iushln(this.n).isub(this.p);
@@ -18751,21 +18590,21 @@ bn.exports;
18751
18590
  }
18752
18591
  return num;
18753
18592
  };
18754
- BN2._prime = function prime(name2) {
18755
- if (primes[name2]) return primes[name2];
18593
+ BN2._prime = function prime(name) {
18594
+ if (primes[name]) return primes[name];
18756
18595
  var prime2;
18757
- if (name2 === "k256") {
18596
+ if (name === "k256") {
18758
18597
  prime2 = new K256();
18759
- } else if (name2 === "p224") {
18598
+ } else if (name === "p224") {
18760
18599
  prime2 = new P224();
18761
- } else if (name2 === "p192") {
18600
+ } else if (name === "p192") {
18762
18601
  prime2 = new P192();
18763
- } else if (name2 === "p25519") {
18602
+ } else if (name === "p25519") {
18764
18603
  prime2 = new P25519();
18765
18604
  } else {
18766
- throw new Error("Unknown prime " + name2);
18605
+ throw new Error("Unknown prime " + name);
18767
18606
  }
18768
- primes[name2] = prime2;
18607
+ primes[name] = prime2;
18769
18608
  return prime2;
18770
18609
  };
18771
18610
  function Red(m) {
@@ -19045,75 +18884,9 @@ function crt$2(msg, priv2) {
19045
18884
  crt$2.getr = getr;
19046
18885
  var browserifyRsa = crt$2;
19047
18886
  var elliptic = {};
19048
- const name$1 = "elliptic";
19049
18887
  const version$2 = "6.5.7";
19050
- const description$1 = "EC cryptography";
19051
- const main$1 = "lib/elliptic.js";
19052
- const files = [
19053
- "lib"
19054
- ];
19055
- const scripts$1 = {
19056
- lint: "eslint lib test",
19057
- "lint:fix": "npm run lint -- --fix",
19058
- unit: "istanbul test _mocha --reporter=spec test/index.js",
19059
- test: "npm run lint && npm run unit",
19060
- version: "grunt dist && git add dist/"
19061
- };
19062
- const repository$1 = {
19063
- type: "git",
19064
- url: "git@github.com:indutny/elliptic"
19065
- };
19066
- const keywords$1 = [
19067
- "EC",
19068
- "Elliptic",
19069
- "curve",
19070
- "Cryptography"
19071
- ];
19072
- const author = "Fedor Indutny <fedor@indutny.com>";
19073
- const license$1 = "MIT";
19074
- const bugs = {
19075
- url: "https://github.com/indutny/elliptic/issues"
19076
- };
19077
- const homepage = "https://github.com/indutny/elliptic";
19078
- const devDependencies$1 = {
19079
- brfs: "^2.0.2",
19080
- coveralls: "^3.1.0",
19081
- eslint: "^7.6.0",
19082
- grunt: "^1.2.1",
19083
- "grunt-browserify": "^5.3.0",
19084
- "grunt-cli": "^1.3.2",
19085
- "grunt-contrib-connect": "^3.0.0",
19086
- "grunt-contrib-copy": "^1.0.0",
19087
- "grunt-contrib-uglify": "^5.0.0",
19088
- "grunt-mocha-istanbul": "^5.0.2",
19089
- "grunt-saucelabs": "^9.0.1",
19090
- istanbul: "^0.4.5",
19091
- mocha: "^8.0.1"
19092
- };
19093
- const dependencies = {
19094
- "bn.js": "^4.11.9",
19095
- brorand: "^1.1.0",
19096
- "hash.js": "^1.0.0",
19097
- "hmac-drbg": "^1.0.1",
19098
- inherits: "^2.0.4",
19099
- "minimalistic-assert": "^1.0.1",
19100
- "minimalistic-crypto-utils": "^1.0.1"
19101
- };
19102
18888
  const require$$0 = {
19103
- name: name$1,
19104
- version: version$2,
19105
- description: description$1,
19106
- main: main$1,
19107
- files,
19108
- scripts: scripts$1,
19109
- repository: repository$1,
19110
- keywords: keywords$1,
19111
- author,
19112
- license: license$1,
19113
- bugs,
19114
- homepage,
19115
- devDependencies: devDependencies$1,
19116
- dependencies
18889
+ version: version$2
19117
18890
  };
19118
18891
  var utils$l = {};
19119
18892
  var utils$k = {};
@@ -19256,9 +19029,9 @@ var utils$k = {};
19256
19029
  return jsf;
19257
19030
  }
19258
19031
  utils2.getJSF = getJSF2;
19259
- function cachedProperty2(obj, name2, computer) {
19260
- var key2 = "_" + name2;
19261
- obj.prototype[name2] = function cachedProperty3() {
19032
+ function cachedProperty2(obj, name, computer) {
19033
+ var key2 = "_" + name;
19034
+ obj.prototype[name] = function cachedProperty3() {
19262
19035
  return this[key2] !== void 0 ? this[key2] : this[key2] = computer.call(this);
19263
19036
  };
19264
19037
  }
@@ -19311,8 +19084,8 @@ BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
19311
19084
  assert$d(p.precomputed);
19312
19085
  var doubles = p._getDoubles();
19313
19086
  var naf = getNAF(k, 1, this._bitLength);
19314
- var I = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);
19315
- I /= 3;
19087
+ var I2 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);
19088
+ I2 /= 3;
19316
19089
  var repr = [];
19317
19090
  var j;
19318
19091
  var nafW;
@@ -19324,7 +19097,7 @@ BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
19324
19097
  }
19325
19098
  var a = this.jpoint(null, null, null);
19326
19099
  var b = this.jpoint(null, null, null);
19327
- for (var i = I; i > 0; i--) {
19100
+ for (var i = I2; i > 0; i--) {
19328
19101
  for (j = 0; j < repr.length; j++) {
19329
19102
  nafW = repr[j];
19330
19103
  if (nafW === i)
@@ -23058,13 +22831,13 @@ function requireSecp256k1() {
23058
22831
  assert2(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O");
23059
22832
  }
23060
22833
  curves2.PresetCurve = PresetCurve;
23061
- function defineCurve(name2, options2) {
23062
- Object.defineProperty(curves2, name2, {
22834
+ function defineCurve(name, options2) {
22835
+ Object.defineProperty(curves2, name, {
23063
22836
  configurable: true,
23064
22837
  enumerable: true,
23065
22838
  get: function() {
23066
22839
  var curve2 = new PresetCurve(options2);
23067
- Object.defineProperty(curves2, name2, {
22840
+ Object.defineProperty(curves2, name, {
23068
22841
  configurable: true,
23069
22842
  enumerable: true,
23070
22843
  value: curve2
@@ -23888,7 +23661,7 @@ EDDSA.prototype.encodePoint = function encodePoint(point5) {
23888
23661
  EDDSA.prototype.decodePoint = function decodePoint3(bytes) {
23889
23662
  bytes = utils.parseBytes(bytes);
23890
23663
  var lastIx = bytes.length - 1;
23891
- var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
23664
+ var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & -129);
23892
23665
  var xIsOdd = (bytes[lastIx] & 128) !== 0;
23893
23666
  var y = utils.intFromLE(normed);
23894
23667
  return this.curve.pointFromY(y, xIsOdd);
@@ -23951,8 +23724,8 @@ function requireVmBrowserify() {
23951
23724
  var defineProp = function() {
23952
23725
  try {
23953
23726
  Object.defineProperty({}, "_", {});
23954
- return function(obj, name2, value) {
23955
- Object.defineProperty(obj, name2, {
23727
+ return function(obj, name, value) {
23728
+ Object.defineProperty(obj, name, {
23956
23729
  writable: true,
23957
23730
  enumerable: false,
23958
23731
  configurable: true,
@@ -23960,8 +23733,8 @@ function requireVmBrowserify() {
23960
23733
  });
23961
23734
  };
23962
23735
  } catch (e) {
23963
- return function(obj, name2, value) {
23964
- obj[name2] = value;
23736
+ return function(obj, name, value) {
23737
+ obj[name] = value;
23965
23738
  };
23966
23739
  }
23967
23740
  }();
@@ -24055,10 +23828,10 @@ function requireVmBrowserify() {
24055
23828
  }
24056
23829
  return res;
24057
23830
  };
24058
- forEach(Object_keys(Script.prototype), function(name2) {
24059
- exports[name2] = Script[name2] = function(code) {
23831
+ forEach(Object_keys(Script.prototype), function(name) {
23832
+ exports[name] = Script[name] = function(code) {
24060
23833
  var s2 = Script(code);
24061
- return s2[name2].apply(s2, [].slice.call(arguments, 1));
23834
+ return s2[name].apply(s2, [].slice.call(arguments, 1));
24062
23835
  };
24063
23836
  });
24064
23837
  exports.isContext = function(context) {
@@ -24087,11 +23860,11 @@ function requireApi() {
24087
23860
  var asn12 = requireAsn1();
24088
23861
  var inherits2 = inherits_browserExports;
24089
23862
  var api2 = exports2;
24090
- api2.define = function define2(name2, body) {
24091
- return new Entity(name2, body);
23863
+ api2.define = function define2(name, body) {
23864
+ return new Entity(name, body);
24092
23865
  };
24093
- function Entity(name2, body) {
24094
- this.name = name2;
23866
+ function Entity(name, body) {
23867
+ this.name = name;
24095
23868
  this.body = body;
24096
23869
  this.decoders = {};
24097
23870
  this.encoders = {};
@@ -25751,7 +25524,7 @@ var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:2
25751
25524
  var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;
25752
25525
  var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m;
25753
25526
  var evp = evp_bytestokey;
25754
- var ciphers$1 = browser$6;
25527
+ var ciphers$1 = browser$5;
25755
25528
  var Buffer$6 = safeBufferExports$1.Buffer;
25756
25529
  var fixProc$1 = function(okey, password) {
25757
25530
  var key2 = okey.toString();
@@ -25780,8 +25553,8 @@ var fixProc$1 = function(okey, password) {
25780
25553
  var asn1 = asn1$3;
25781
25554
  var aesid = require$$1;
25782
25555
  var fixProc = fixProc$1;
25783
- var ciphers = browser$6;
25784
- var compat = browser$8;
25556
+ var ciphers = browser$5;
25557
+ var compat = browser$7;
25785
25558
  var Buffer$5 = safeBufferExports$1.Buffer;
25786
25559
  function decrypt$1(data, password) {
25787
25560
  var salt = data.algorithm.decrypt.kde.kdeparams.salt;
@@ -25893,7 +25666,7 @@ function requireSign() {
25893
25666
  if (hasRequiredSign) return sign.exports;
25894
25667
  hasRequiredSign = 1;
25895
25668
  var Buffer2 = safeBufferExports$1.Buffer;
25896
- var createHmac2 = browser$9;
25669
+ var createHmac2 = browser$8;
25897
25670
  var crt2 = browserifyRsa;
25898
25671
  var EC = requireElliptic().ec;
25899
25672
  var BN2 = bnExports;
@@ -25950,13 +25723,13 @@ function requireSign() {
25950
25723
  var g2 = priv2.params.g;
25951
25724
  var r2 = new BN2(0);
25952
25725
  var k;
25953
- var H = bits2int(hash3, q).mod(q);
25726
+ var H2 = bits2int(hash3, q).mod(q);
25954
25727
  var s2 = false;
25955
25728
  var kv = getKey(x, q, hash3, algo);
25956
25729
  while (s2 === false) {
25957
25730
  k = makeKey(q, kv, algo);
25958
25731
  r2 = makeR(g2, k, p, q);
25959
- s2 = k.invm(q).imul(H.add(x.mul(r2))).mod(q);
25732
+ s2 = k.invm(q).imul(H2.add(x.mul(r2))).mod(q);
25960
25733
  if (s2.cmpn(0) === 0) {
25961
25734
  s2 = false;
25962
25735
  r2 = new BN2(0);
@@ -26131,13 +25904,13 @@ function requireVerify() {
26131
25904
  verify_1 = verify4;
26132
25905
  return verify_1;
26133
25906
  }
26134
- var browser$4;
25907
+ var browser$3;
26135
25908
  var hasRequiredBrowser$1;
26136
25909
  function requireBrowser$1() {
26137
- if (hasRequiredBrowser$1) return browser$4;
25910
+ if (hasRequiredBrowser$1) return browser$3;
26138
25911
  hasRequiredBrowser$1 = 1;
26139
25912
  var Buffer2 = safeBufferExports$1.Buffer;
26140
- var createHash3 = browser$a;
25913
+ var createHash3 = browser$9;
26141
25914
  var stream = readableBrowserExports;
26142
25915
  var inherits2 = inherits_browserExports;
26143
25916
  var sign5 = requireSign();
@@ -26204,22 +25977,22 @@ function requireBrowser$1() {
26204
25977
  function createVerify(algorithm) {
26205
25978
  return new Verify(algorithm);
26206
25979
  }
26207
- browser$4 = {
25980
+ browser$3 = {
26208
25981
  Sign: createSign,
26209
25982
  Verify: createVerify,
26210
25983
  createSign,
26211
25984
  createVerify
26212
25985
  };
26213
- return browser$4;
25986
+ return browser$3;
26214
25987
  }
26215
- var browser$3;
25988
+ var browser$2;
26216
25989
  var hasRequiredBrowser;
26217
25990
  function requireBrowser() {
26218
- if (hasRequiredBrowser) return browser$3;
25991
+ if (hasRequiredBrowser) return browser$2;
26219
25992
  hasRequiredBrowser = 1;
26220
25993
  var elliptic2 = requireElliptic();
26221
25994
  var BN2 = bnExports$1;
26222
- browser$3 = function createECDH(curve2) {
25995
+ browser$2 = function createECDH(curve2) {
26223
25996
  return new ECDH(curve2);
26224
25997
  };
26225
25998
  var aliases = {
@@ -26329,10 +26102,10 @@ function requireBrowser() {
26329
26102
  return buf.toString(enc);
26330
26103
  }
26331
26104
  }
26332
- return browser$3;
26105
+ return browser$2;
26333
26106
  }
26334
- var browser$2 = {};
26335
- var createHash$2 = browser$a;
26107
+ var browser$1 = {};
26108
+ var createHash$2 = browser$9;
26336
26109
  var Buffer$4 = safeBufferExports$1.Buffer;
26337
26110
  var mgf$2 = function(seed, len) {
26338
26111
  var t = Buffer$4.alloc(0);
@@ -26365,7 +26138,7 @@ function withPublic$2(paddedMsg, key2) {
26365
26138
  var withPublic_1 = withPublic$2;
26366
26139
  var parseKeys$1 = parseAsn1;
26367
26140
  var randomBytes = browserExports;
26368
- var createHash$1 = browser$a;
26141
+ var createHash$1 = browser$9;
26369
26142
  var mgf$1 = mgf$2;
26370
26143
  var xor$1 = xor$2;
26371
26144
  var BN$1 = bnExports$1;
@@ -26454,7 +26227,7 @@ var mgf = mgf$2;
26454
26227
  var xor = xor$2;
26455
26228
  var BN = bnExports$1;
26456
26229
  var crt = browserifyRsa;
26457
- var createHash = browser$a;
26230
+ var createHash = browser$9;
26458
26231
  var withPublic = withPublic_1;
26459
26232
  var Buffer$1 = safeBufferExports$1.Buffer;
26460
26233
  var privateDecrypt = function privateDecrypt2(privateKey, enc, reverse) {
@@ -26558,8 +26331,8 @@ function compare(a, b) {
26558
26331
  exports2.publicDecrypt = function publicDecrypt(key2, buf) {
26559
26332
  return exports2.privateDecrypt(key2, buf, true);
26560
26333
  };
26561
- })(browser$2);
26562
- var browser$1 = {};
26334
+ })(browser$1);
26335
+ var browser = {};
26563
26336
  function oldBrowser() {
26564
26337
  throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11");
26565
26338
  }
@@ -26592,11 +26365,11 @@ function assertSize(size, offset, length) {
26592
26365
  }
26593
26366
  }
26594
26367
  if (crypto$1 && crypto$1.getRandomValues || !process$1.browser) {
26595
- browser$1.randomFill = randomFill;
26596
- browser$1.randomFillSync = randomFillSync;
26368
+ browser.randomFill = randomFill;
26369
+ browser.randomFillSync = randomFillSync;
26597
26370
  } else {
26598
- browser$1.randomFill = oldBrowser;
26599
- browser$1.randomFillSync = oldBrowser;
26371
+ browser.randomFill = oldBrowser;
26372
+ browser.randomFillSync = oldBrowser;
26600
26373
  }
26601
26374
  function randomFill(buf, offset, size, cb) {
26602
26375
  if (!Buffer.isBuffer(buf) && !(buf instanceof commonjsGlobal.Uint8Array)) {
@@ -26660,8 +26433,8 @@ function requireCryptoBrowserify() {
26660
26433
  if (hasRequiredCryptoBrowserify) return cryptoBrowserify;
26661
26434
  hasRequiredCryptoBrowserify = 1;
26662
26435
  cryptoBrowserify.randomBytes = cryptoBrowserify.rng = cryptoBrowserify.pseudoRandomBytes = cryptoBrowserify.prng = browserExports;
26663
- cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$a;
26664
- cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$9;
26436
+ cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$9;
26437
+ cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$8;
26665
26438
  var algos$1 = algos;
26666
26439
  var algoKeys = Object.keys(algos$1);
26667
26440
  var hashes = [
@@ -26676,10 +26449,10 @@ function requireCryptoBrowserify() {
26676
26449
  cryptoBrowserify.getHashes = function() {
26677
26450
  return hashes;
26678
26451
  };
26679
- var p = browser$8;
26452
+ var p = browser$7;
26680
26453
  cryptoBrowserify.pbkdf2 = p.pbkdf2;
26681
26454
  cryptoBrowserify.pbkdf2Sync = p.pbkdf2Sync;
26682
- var aes2 = browser$7;
26455
+ var aes2 = browser$6;
26683
26456
  cryptoBrowserify.Cipher = aes2.Cipher;
26684
26457
  cryptoBrowserify.createCipher = aes2.createCipher;
26685
26458
  cryptoBrowserify.Cipheriv = aes2.Cipheriv;
@@ -26702,12 +26475,12 @@ function requireCryptoBrowserify() {
26702
26475
  cryptoBrowserify.createVerify = sign5.createVerify;
26703
26476
  cryptoBrowserify.Verify = sign5.Verify;
26704
26477
  cryptoBrowserify.createECDH = requireBrowser();
26705
- var publicEncrypt3 = browser$2;
26478
+ var publicEncrypt3 = browser$1;
26706
26479
  cryptoBrowserify.publicEncrypt = publicEncrypt3.publicEncrypt;
26707
26480
  cryptoBrowserify.privateEncrypt = publicEncrypt3.privateEncrypt;
26708
26481
  cryptoBrowserify.publicDecrypt = publicEncrypt3.publicDecrypt;
26709
26482
  cryptoBrowserify.privateDecrypt = publicEncrypt3.privateDecrypt;
26710
- var rf = browser$1;
26483
+ var rf = browser;
26711
26484
  cryptoBrowserify.randomFill = rf.randomFill;
26712
26485
  cryptoBrowserify.randomFillSync = rf.randomFillSync;
26713
26486
  cryptoBrowserify.createCredentials = function() {
@@ -26732,89 +26505,13 @@ function requireCryptoBrowserify() {
26732
26505
  };
26733
26506
  return cryptoBrowserify;
26734
26507
  }
26735
- const name = "dotenv";
26736
26508
  const version$1 = "16.4.5";
26737
- const description = "Loads environment variables from .env file";
26738
- const main = "lib/main.js";
26739
- const types = "lib/main.d.ts";
26740
- const exports = {
26741
- ".": {
26742
- types: "./lib/main.d.ts",
26743
- require: "./lib/main.js",
26744
- "default": "./lib/main.js"
26745
- },
26746
- "./config": "./config.js",
26747
- "./config.js": "./config.js",
26748
- "./lib/env-options": "./lib/env-options.js",
26749
- "./lib/env-options.js": "./lib/env-options.js",
26750
- "./lib/cli-options": "./lib/cli-options.js",
26751
- "./lib/cli-options.js": "./lib/cli-options.js",
26752
- "./package.json": "./package.json"
26753
- };
26754
- const scripts = {
26755
- "dts-check": "tsc --project tests/types/tsconfig.json",
26756
- lint: "standard",
26757
- "lint-readme": "standard-markdown",
26758
- pretest: "npm run lint && npm run dts-check",
26759
- test: "tap tests/*.js --100 -Rspec",
26760
- "test:coverage": "tap --coverage-report=lcov",
26761
- prerelease: "npm test",
26762
- release: "standard-version"
26763
- };
26764
- const repository = {
26765
- type: "git",
26766
- url: "git://github.com/motdotla/dotenv.git"
26767
- };
26768
- const funding = "https://dotenvx.com";
26769
- const keywords = [
26770
- "dotenv",
26771
- "env",
26772
- ".env",
26773
- "environment",
26774
- "variables",
26775
- "config",
26776
- "settings"
26777
- ];
26778
- const readmeFilename = "README.md";
26779
- const license = "BSD-2-Clause";
26780
- const devDependencies = {
26781
- "@definitelytyped/dtslint": "^0.0.133",
26782
- "@types/node": "^18.11.3",
26783
- decache: "^4.6.1",
26784
- sinon: "^14.0.1",
26785
- standard: "^17.0.0",
26786
- "standard-markdown": "^7.1.0",
26787
- "standard-version": "^9.5.0",
26788
- tap: "^16.3.0",
26789
- tar: "^6.1.11",
26790
- typescript: "^4.8.4"
26791
- };
26792
- const engines = {
26793
- node: ">=12"
26794
- };
26795
- const browser = {
26796
- fs: false
26797
- };
26798
26509
  const require$$4 = {
26799
- name,
26800
- version: version$1,
26801
- description,
26802
- main,
26803
- types,
26804
- exports,
26805
- scripts,
26806
- repository,
26807
- funding,
26808
- keywords,
26809
- readmeFilename,
26810
- license,
26811
- devDependencies,
26812
- engines,
26813
- browser
26510
+ version: version$1
26814
26511
  };
26815
26512
  const fs = empty_1;
26816
26513
  const path = pathBrowserify;
26817
- const os = browser$d;
26514
+ const os = browser$c;
26818
26515
  const crypto = requireCryptoBrowserify();
26819
26516
  const packageJson = require$$4;
26820
26517
  const version = packageJson.version;
@@ -27065,15 +26762,15 @@ const DotenvModule = {
27065
26762
  parse: parse$1,
27066
26763
  populate
27067
26764
  };
27068
- main$2.exports.configDotenv = DotenvModule.configDotenv;
27069
- main$2.exports._configVault = DotenvModule._configVault;
27070
- main$2.exports._parseVault = DotenvModule._parseVault;
27071
- main$2.exports.config = DotenvModule.config;
27072
- main$2.exports.decrypt = DotenvModule.decrypt;
27073
- main$2.exports.parse = DotenvModule.parse;
27074
- main$2.exports.populate = DotenvModule.populate;
27075
- main$2.exports = DotenvModule;
27076
- var mainExports = main$2.exports;
26765
+ main.exports.configDotenv = DotenvModule.configDotenv;
26766
+ main.exports._configVault = DotenvModule._configVault;
26767
+ main.exports._parseVault = DotenvModule._parseVault;
26768
+ main.exports.config = DotenvModule.config;
26769
+ main.exports.decrypt = DotenvModule.decrypt;
26770
+ main.exports.parse = DotenvModule.parse;
26771
+ main.exports.populate = DotenvModule.populate;
26772
+ main.exports = DotenvModule;
26773
+ var mainExports = main.exports;
27077
26774
  const options = {};
27078
26775
  if (process$1.env.DOTENV_CONFIG_ENCODING != null) {
27079
26776
  options.encoding = process$1.env.DOTENV_CONFIG_ENCODING;
@@ -27156,124 +26853,6 @@ const getQueries = (client) => ({
27156
26853
  getValidator: getValidator.bind(null, client),
27157
26854
  getClusterBalance: getClusterBalance$1.bind(null, client)
27158
26855
  });
27159
- function defineChain(chain) {
27160
- return {
27161
- formatters: void 0,
27162
- fees: void 0,
27163
- serializers: void 0,
27164
- ...chain
27165
- };
27166
- }
27167
- const holesky = /* @__PURE__ */ defineChain({
27168
- id: 17e3,
27169
- name: "Holesky",
27170
- nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
27171
- rpcUrls: {
27172
- default: {
27173
- http: ["https://ethereum-holesky-rpc.publicnode.com"]
27174
- }
27175
- },
27176
- blockExplorers: {
27177
- default: {
27178
- name: "Etherscan",
27179
- url: "https://holesky.etherscan.io",
27180
- apiUrl: "https://api-holesky.etherscan.io/api"
27181
- }
27182
- },
27183
- contracts: {
27184
- multicall3: {
27185
- address: "0xca11bde05977b3631167028862be2a173976ca11",
27186
- blockCreated: 77
27187
- },
27188
- ensRegistry: {
27189
- address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
27190
- blockCreated: 801613
27191
- },
27192
- ensUniversalResolver: {
27193
- address: "0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",
27194
- blockCreated: 973484
27195
- }
27196
- },
27197
- testnet: true
27198
- });
27199
- const mainnet = /* @__PURE__ */ defineChain({
27200
- id: 1,
27201
- name: "Ethereum",
27202
- nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
27203
- rpcUrls: {
27204
- default: {
27205
- http: ["https://cloudflare-eth.com"]
27206
- }
27207
- },
27208
- blockExplorers: {
27209
- default: {
27210
- name: "Etherscan",
27211
- url: "https://etherscan.io",
27212
- apiUrl: "https://api.etherscan.io/api"
27213
- }
27214
- },
27215
- contracts: {
27216
- ensRegistry: {
27217
- address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
27218
- },
27219
- ensUniversalResolver: {
27220
- address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
27221
- blockCreated: 19258213
27222
- },
27223
- multicall3: {
27224
- address: "0xca11bde05977b3631167028862be2a173976ca11",
27225
- blockCreated: 14353601
27226
- }
27227
- }
27228
- });
27229
- const hoodi = defineChain$1({
27230
- id: 560048,
27231
- name: "Hoodi",
27232
- rpcUrls: {
27233
- default: {
27234
- http: ["https://rpc.hoodi.ethpandaops.io"]
27235
- }
27236
- },
27237
- nativeCurrency: {
27238
- name: "Hoodi Ether",
27239
- symbol: "ETH",
27240
- decimals: 18
27241
- },
27242
- testnet: true
27243
- });
27244
- const chains = {
27245
- mainnet,
27246
- holesky,
27247
- hoodi
27248
- };
27249
- const chainIds = Object.values(chains).map((chain) => chain.id);
27250
- const graph_endpoints = {
27251
- [mainnet.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest",
27252
- [holesky.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-holesky/version/latest",
27253
- [hoodi.id]: "https://graph-node-hoodi.stage.ops.ssvlabsinternal.com/subgraphs/name/ssv-bapps-hoodi/graphql"
27254
- };
27255
- const rest_endpoints = {
27256
- [mainnet.id]: "https://api.ssv.network/api/v4/mainnet",
27257
- [holesky.id]: "https://api.ssv.network/api/v4/holesky",
27258
- [hoodi.id]: "https://api.stage.ops.ssvlabsinternal.com/api/v4/hoodi"
27259
- };
27260
- const contracts = {
27261
- [mainnet.id]: {
27262
- setter: "0xDD9BC35aE942eF0cFa76930954a156B3fF30a4E1",
27263
- getter: "0xafE830B6Ee262ba11cce5F32fDCd760FFE6a66e4",
27264
- token: "0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54"
27265
- },
27266
- [holesky.id]: {
27267
- setter: "0x38A4794cCEd47d3baf7370CcC43B560D3a1beEFA",
27268
- getter: "0x352A18AEe90cdcd825d1E37d9939dCA86C00e281",
27269
- token: "0xad45A78180961079BFaeEe349704F411dfF947C6"
27270
- },
27271
- [hoodi.id]: {
27272
- setter: "0x58410Bef803ECd7E63B23664C586A6DB72DAf59c",
27273
- getter: "0x5AdDb3f1529C5ec70D77400499eE4bbF328368fe",
27274
- token: "0x9F5d4Ec84fC4785788aB44F9de973cF34F7A038e"
27275
- }
27276
- };
27277
26856
  const MainnetV4GetterABI = [
27278
26857
  {
27279
26858
  inputs: [],
@@ -32269,6 +31848,13 @@ const createWriter = ({
32269
31848
  args: paramsToArray({ params: options2.args, abiFunction: fn }),
32270
31849
  account: walletClient.account
32271
31850
  });
31851
+ const getTransactionData = (params) => {
31852
+ return encodeFunctionData({
31853
+ abi,
31854
+ functionName: fn.name,
31855
+ args: paramsToArray({ params, abiFunction: fn })
31856
+ });
31857
+ };
32272
31858
  const func = async (options2) => {
32273
31859
  const { request } = await simulate(options2);
32274
31860
  const hash3 = await walletClient.writeContract(request);
@@ -32305,6 +31891,7 @@ const createWriter = ({
32305
31891
  };
32306
31892
  };
32307
31893
  func.simulate = simulate;
31894
+ func.getTransactionData = getTransactionData;
32308
31895
  return [fn.name, func];
32309
31896
  })
32310
31897
  );
@@ -32385,9 +31972,9 @@ const HeadersInitToPlainObject = (headers) => {
32385
31972
  if (headers instanceof Headers) {
32386
31973
  oHeaders = HeadersInstanceToPlainObject(headers);
32387
31974
  } else if (Array.isArray(headers)) {
32388
- headers.forEach(([name2, value]) => {
32389
- if (name2 && value !== void 0) {
32390
- oHeaders[name2] = value;
31975
+ headers.forEach(([name, value]) => {
31976
+ if (name && value !== void 0) {
31977
+ oHeaders[name] = value;
32391
31978
  }
32392
31979
  });
32393
31980
  } else if (headers) {
@@ -32670,8 +32257,8 @@ class GraphQLError extends Error {
32670
32257
  function undefinedIfEmpty(array) {
32671
32258
  return array === void 0 || array.length === 0 ? void 0 : array;
32672
32259
  }
32673
- function syntaxError(source, position, description2) {
32674
- return new GraphQLError(`Syntax Error: ${description2}`, {
32260
+ function syntaxError(source, position, description) {
32261
+ return new GraphQLError(`Syntax Error: ${description}`, {
32675
32262
  source,
32676
32263
  positions: [position]
32677
32264
  });
@@ -33580,9 +33167,9 @@ function formatArray(array, seenValues) {
33580
33167
  function getObjectTag(object) {
33581
33168
  const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
33582
33169
  if (tag === "Object" && typeof object.constructor === "function") {
33583
- const name2 = object.constructor.name;
33584
- if (typeof name2 === "string" && name2 !== "") {
33585
- return name2;
33170
+ const name = object.constructor.name;
33171
+ if (typeof name === "string" && name !== "") {
33172
+ return name;
33586
33173
  }
33587
33174
  }
33588
33175
  return tag;
@@ -33625,13 +33212,13 @@ spurious results.`);
33625
33212
  }
33626
33213
  );
33627
33214
  class Source {
33628
- constructor(body, name2 = "GraphQL request", locationOffset = {
33215
+ constructor(body, name = "GraphQL request", locationOffset = {
33629
33216
  line: 1,
33630
33217
  column: 1
33631
33218
  }) {
33632
33219
  typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);
33633
33220
  this.body = body;
33634
- this.name = name2;
33221
+ this.name = name;
33635
33222
  this.locationOffset = locationOffset;
33636
33223
  this.locationOffset.line > 0 || devAssert(
33637
33224
  false,
@@ -33771,14 +33358,14 @@ class Parser {
33771
33358
  });
33772
33359
  }
33773
33360
  const operation = this.parseOperationType();
33774
- let name2;
33361
+ let name;
33775
33362
  if (this.peek(TokenKind.NAME)) {
33776
- name2 = this.parseName();
33363
+ name = this.parseName();
33777
33364
  }
33778
33365
  return this.node(start, {
33779
33366
  kind: Kind.OPERATION_DEFINITION,
33780
33367
  operation,
33781
- name: name2,
33368
+ name,
33782
33369
  variableDefinitions: this.parseVariableDefinitions(),
33783
33370
  directives: this.parseDirectives(false),
33784
33371
  selectionSet: this.parseSelectionSet()
@@ -33865,17 +33452,17 @@ class Parser {
33865
33452
  const start = this._lexer.token;
33866
33453
  const nameOrAlias = this.parseName();
33867
33454
  let alias;
33868
- let name2;
33455
+ let name;
33869
33456
  if (this.expectOptionalToken(TokenKind.COLON)) {
33870
33457
  alias = nameOrAlias;
33871
- name2 = this.parseName();
33458
+ name = this.parseName();
33872
33459
  } else {
33873
- name2 = nameOrAlias;
33460
+ name = nameOrAlias;
33874
33461
  }
33875
33462
  return this.node(start, {
33876
33463
  kind: Kind.FIELD,
33877
33464
  alias,
33878
- name: name2,
33465
+ name,
33879
33466
  arguments: this.parseArguments(false),
33880
33467
  directives: this.parseDirectives(false),
33881
33468
  selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -33893,11 +33480,11 @@ class Parser {
33893
33480
  */
33894
33481
  parseArgument(isConst = false) {
33895
33482
  const start = this._lexer.token;
33896
- const name2 = this.parseName();
33483
+ const name = this.parseName();
33897
33484
  this.expectToken(TokenKind.COLON);
33898
33485
  return this.node(start, {
33899
33486
  kind: Kind.ARGUMENT,
33900
- name: name2,
33487
+ name,
33901
33488
  value: this.parseValueLiteral(isConst)
33902
33489
  });
33903
33490
  }
@@ -34092,11 +33679,11 @@ class Parser {
34092
33679
  */
34093
33680
  parseObjectField(isConst) {
34094
33681
  const start = this._lexer.token;
34095
- const name2 = this.parseName();
33682
+ const name = this.parseName();
34096
33683
  this.expectToken(TokenKind.COLON);
34097
33684
  return this.node(start, {
34098
33685
  kind: Kind.OBJECT_FIELD,
34099
- name: name2,
33686
+ name,
34100
33687
  value: this.parseValueLiteral(isConst)
34101
33688
  });
34102
33689
  }
@@ -34184,7 +33771,7 @@ class Parser {
34184
33771
  */
34185
33772
  parseSchemaDefinition() {
34186
33773
  const start = this._lexer.token;
34187
- const description2 = this.parseDescription();
33774
+ const description = this.parseDescription();
34188
33775
  this.expectKeyword("schema");
34189
33776
  const directives = this.parseConstDirectives();
34190
33777
  const operationTypes = this.many(
@@ -34194,7 +33781,7 @@ class Parser {
34194
33781
  );
34195
33782
  return this.node(start, {
34196
33783
  kind: Kind.SCHEMA_DEFINITION,
34197
- description: description2,
33784
+ description,
34198
33785
  directives,
34199
33786
  operationTypes
34200
33787
  });
@@ -34218,14 +33805,14 @@ class Parser {
34218
33805
  */
34219
33806
  parseScalarTypeDefinition() {
34220
33807
  const start = this._lexer.token;
34221
- const description2 = this.parseDescription();
33808
+ const description = this.parseDescription();
34222
33809
  this.expectKeyword("scalar");
34223
- const name2 = this.parseName();
33810
+ const name = this.parseName();
34224
33811
  const directives = this.parseConstDirectives();
34225
33812
  return this.node(start, {
34226
33813
  kind: Kind.SCALAR_TYPE_DEFINITION,
34227
- description: description2,
34228
- name: name2,
33814
+ description,
33815
+ name,
34229
33816
  directives
34230
33817
  });
34231
33818
  }
@@ -34236,16 +33823,16 @@ class Parser {
34236
33823
  */
34237
33824
  parseObjectTypeDefinition() {
34238
33825
  const start = this._lexer.token;
34239
- const description2 = this.parseDescription();
33826
+ const description = this.parseDescription();
34240
33827
  this.expectKeyword("type");
34241
- const name2 = this.parseName();
33828
+ const name = this.parseName();
34242
33829
  const interfaces = this.parseImplementsInterfaces();
34243
33830
  const directives = this.parseConstDirectives();
34244
33831
  const fields = this.parseFieldsDefinition();
34245
33832
  return this.node(start, {
34246
33833
  kind: Kind.OBJECT_TYPE_DEFINITION,
34247
- description: description2,
34248
- name: name2,
33834
+ description,
33835
+ name,
34249
33836
  interfaces,
34250
33837
  directives,
34251
33838
  fields
@@ -34277,16 +33864,16 @@ class Parser {
34277
33864
  */
34278
33865
  parseFieldDefinition() {
34279
33866
  const start = this._lexer.token;
34280
- const description2 = this.parseDescription();
34281
- const name2 = this.parseName();
33867
+ const description = this.parseDescription();
33868
+ const name = this.parseName();
34282
33869
  const args = this.parseArgumentDefs();
34283
33870
  this.expectToken(TokenKind.COLON);
34284
33871
  const type2 = this.parseTypeReference();
34285
33872
  const directives = this.parseConstDirectives();
34286
33873
  return this.node(start, {
34287
33874
  kind: Kind.FIELD_DEFINITION,
34288
- description: description2,
34289
- name: name2,
33875
+ description,
33876
+ name,
34290
33877
  arguments: args,
34291
33878
  type: type2,
34292
33879
  directives
@@ -34308,8 +33895,8 @@ class Parser {
34308
33895
  */
34309
33896
  parseInputValueDef() {
34310
33897
  const start = this._lexer.token;
34311
- const description2 = this.parseDescription();
34312
- const name2 = this.parseName();
33898
+ const description = this.parseDescription();
33899
+ const name = this.parseName();
34313
33900
  this.expectToken(TokenKind.COLON);
34314
33901
  const type2 = this.parseTypeReference();
34315
33902
  let defaultValue;
@@ -34319,8 +33906,8 @@ class Parser {
34319
33906
  const directives = this.parseConstDirectives();
34320
33907
  return this.node(start, {
34321
33908
  kind: Kind.INPUT_VALUE_DEFINITION,
34322
- description: description2,
34323
- name: name2,
33909
+ description,
33910
+ name,
34324
33911
  type: type2,
34325
33912
  defaultValue,
34326
33913
  directives
@@ -34332,16 +33919,16 @@ class Parser {
34332
33919
  */
34333
33920
  parseInterfaceTypeDefinition() {
34334
33921
  const start = this._lexer.token;
34335
- const description2 = this.parseDescription();
33922
+ const description = this.parseDescription();
34336
33923
  this.expectKeyword("interface");
34337
- const name2 = this.parseName();
33924
+ const name = this.parseName();
34338
33925
  const interfaces = this.parseImplementsInterfaces();
34339
33926
  const directives = this.parseConstDirectives();
34340
33927
  const fields = this.parseFieldsDefinition();
34341
33928
  return this.node(start, {
34342
33929
  kind: Kind.INTERFACE_TYPE_DEFINITION,
34343
- description: description2,
34344
- name: name2,
33930
+ description,
33931
+ name,
34345
33932
  interfaces,
34346
33933
  directives,
34347
33934
  fields
@@ -34353,15 +33940,15 @@ class Parser {
34353
33940
  */
34354
33941
  parseUnionTypeDefinition() {
34355
33942
  const start = this._lexer.token;
34356
- const description2 = this.parseDescription();
33943
+ const description = this.parseDescription();
34357
33944
  this.expectKeyword("union");
34358
- const name2 = this.parseName();
33945
+ const name = this.parseName();
34359
33946
  const directives = this.parseConstDirectives();
34360
33947
  const types2 = this.parseUnionMemberTypes();
34361
33948
  return this.node(start, {
34362
33949
  kind: Kind.UNION_TYPE_DEFINITION,
34363
- description: description2,
34364
- name: name2,
33950
+ description,
33951
+ name,
34365
33952
  directives,
34366
33953
  types: types2
34367
33954
  });
@@ -34380,15 +33967,15 @@ class Parser {
34380
33967
  */
34381
33968
  parseEnumTypeDefinition() {
34382
33969
  const start = this._lexer.token;
34383
- const description2 = this.parseDescription();
33970
+ const description = this.parseDescription();
34384
33971
  this.expectKeyword("enum");
34385
- const name2 = this.parseName();
33972
+ const name = this.parseName();
34386
33973
  const directives = this.parseConstDirectives();
34387
33974
  const values = this.parseEnumValuesDefinition();
34388
33975
  return this.node(start, {
34389
33976
  kind: Kind.ENUM_TYPE_DEFINITION,
34390
- description: description2,
34391
- name: name2,
33977
+ description,
33978
+ name,
34392
33979
  directives,
34393
33980
  values
34394
33981
  });
@@ -34410,13 +33997,13 @@ class Parser {
34410
33997
  */
34411
33998
  parseEnumValueDefinition() {
34412
33999
  const start = this._lexer.token;
34413
- const description2 = this.parseDescription();
34414
- const name2 = this.parseEnumValueName();
34000
+ const description = this.parseDescription();
34001
+ const name = this.parseEnumValueName();
34415
34002
  const directives = this.parseConstDirectives();
34416
34003
  return this.node(start, {
34417
34004
  kind: Kind.ENUM_VALUE_DEFINITION,
34418
- description: description2,
34419
- name: name2,
34005
+ description,
34006
+ name,
34420
34007
  directives
34421
34008
  });
34422
34009
  }
@@ -34441,15 +34028,15 @@ class Parser {
34441
34028
  */
34442
34029
  parseInputObjectTypeDefinition() {
34443
34030
  const start = this._lexer.token;
34444
- const description2 = this.parseDescription();
34031
+ const description = this.parseDescription();
34445
34032
  this.expectKeyword("input");
34446
- const name2 = this.parseName();
34033
+ const name = this.parseName();
34447
34034
  const directives = this.parseConstDirectives();
34448
34035
  const fields = this.parseInputFieldsDefinition();
34449
34036
  return this.node(start, {
34450
34037
  kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
34451
- description: description2,
34452
- name: name2,
34038
+ description,
34039
+ name,
34453
34040
  directives,
34454
34041
  fields
34455
34042
  });
@@ -34535,14 +34122,14 @@ class Parser {
34535
34122
  const start = this._lexer.token;
34536
34123
  this.expectKeyword("extend");
34537
34124
  this.expectKeyword("scalar");
34538
- const name2 = this.parseName();
34125
+ const name = this.parseName();
34539
34126
  const directives = this.parseConstDirectives();
34540
34127
  if (directives.length === 0) {
34541
34128
  throw this.unexpected();
34542
34129
  }
34543
34130
  return this.node(start, {
34544
34131
  kind: Kind.SCALAR_TYPE_EXTENSION,
34545
- name: name2,
34132
+ name,
34546
34133
  directives
34547
34134
  });
34548
34135
  }
@@ -34556,7 +34143,7 @@ class Parser {
34556
34143
  const start = this._lexer.token;
34557
34144
  this.expectKeyword("extend");
34558
34145
  this.expectKeyword("type");
34559
- const name2 = this.parseName();
34146
+ const name = this.parseName();
34560
34147
  const interfaces = this.parseImplementsInterfaces();
34561
34148
  const directives = this.parseConstDirectives();
34562
34149
  const fields = this.parseFieldsDefinition();
@@ -34565,7 +34152,7 @@ class Parser {
34565
34152
  }
34566
34153
  return this.node(start, {
34567
34154
  kind: Kind.OBJECT_TYPE_EXTENSION,
34568
- name: name2,
34155
+ name,
34569
34156
  interfaces,
34570
34157
  directives,
34571
34158
  fields
@@ -34581,7 +34168,7 @@ class Parser {
34581
34168
  const start = this._lexer.token;
34582
34169
  this.expectKeyword("extend");
34583
34170
  this.expectKeyword("interface");
34584
- const name2 = this.parseName();
34171
+ const name = this.parseName();
34585
34172
  const interfaces = this.parseImplementsInterfaces();
34586
34173
  const directives = this.parseConstDirectives();
34587
34174
  const fields = this.parseFieldsDefinition();
@@ -34590,7 +34177,7 @@ class Parser {
34590
34177
  }
34591
34178
  return this.node(start, {
34592
34179
  kind: Kind.INTERFACE_TYPE_EXTENSION,
34593
- name: name2,
34180
+ name,
34594
34181
  interfaces,
34595
34182
  directives,
34596
34183
  fields
@@ -34605,7 +34192,7 @@ class Parser {
34605
34192
  const start = this._lexer.token;
34606
34193
  this.expectKeyword("extend");
34607
34194
  this.expectKeyword("union");
34608
- const name2 = this.parseName();
34195
+ const name = this.parseName();
34609
34196
  const directives = this.parseConstDirectives();
34610
34197
  const types2 = this.parseUnionMemberTypes();
34611
34198
  if (directives.length === 0 && types2.length === 0) {
@@ -34613,7 +34200,7 @@ class Parser {
34613
34200
  }
34614
34201
  return this.node(start, {
34615
34202
  kind: Kind.UNION_TYPE_EXTENSION,
34616
- name: name2,
34203
+ name,
34617
34204
  directives,
34618
34205
  types: types2
34619
34206
  });
@@ -34627,7 +34214,7 @@ class Parser {
34627
34214
  const start = this._lexer.token;
34628
34215
  this.expectKeyword("extend");
34629
34216
  this.expectKeyword("enum");
34630
- const name2 = this.parseName();
34217
+ const name = this.parseName();
34631
34218
  const directives = this.parseConstDirectives();
34632
34219
  const values = this.parseEnumValuesDefinition();
34633
34220
  if (directives.length === 0 && values.length === 0) {
@@ -34635,7 +34222,7 @@ class Parser {
34635
34222
  }
34636
34223
  return this.node(start, {
34637
34224
  kind: Kind.ENUM_TYPE_EXTENSION,
34638
- name: name2,
34225
+ name,
34639
34226
  directives,
34640
34227
  values
34641
34228
  });
@@ -34649,7 +34236,7 @@ class Parser {
34649
34236
  const start = this._lexer.token;
34650
34237
  this.expectKeyword("extend");
34651
34238
  this.expectKeyword("input");
34652
- const name2 = this.parseName();
34239
+ const name = this.parseName();
34653
34240
  const directives = this.parseConstDirectives();
34654
34241
  const fields = this.parseInputFieldsDefinition();
34655
34242
  if (directives.length === 0 && fields.length === 0) {
@@ -34657,7 +34244,7 @@ class Parser {
34657
34244
  }
34658
34245
  return this.node(start, {
34659
34246
  kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
34660
- name: name2,
34247
+ name,
34661
34248
  directives,
34662
34249
  fields
34663
34250
  });
@@ -34670,18 +34257,18 @@ class Parser {
34670
34257
  */
34671
34258
  parseDirectiveDefinition() {
34672
34259
  const start = this._lexer.token;
34673
- const description2 = this.parseDescription();
34260
+ const description = this.parseDescription();
34674
34261
  this.expectKeyword("directive");
34675
34262
  this.expectToken(TokenKind.AT);
34676
- const name2 = this.parseName();
34263
+ const name = this.parseName();
34677
34264
  const args = this.parseArgumentDefs();
34678
34265
  const repeatable = this.expectOptionalKeyword("repeatable");
34679
34266
  this.expectKeyword("on");
34680
34267
  const locations = this.parseDirectiveLocations();
34681
34268
  return this.node(start, {
34682
34269
  kind: Kind.DIRECTIVE_DEFINITION,
34683
- description: description2,
34684
- name: name2,
34270
+ description,
34271
+ name,
34685
34272
  arguments: args,
34686
34273
  repeatable,
34687
34274
  locations
@@ -34724,9 +34311,9 @@ class Parser {
34724
34311
  */
34725
34312
  parseDirectiveLocation() {
34726
34313
  const start = this._lexer.token;
34727
- const name2 = this.parseName();
34728
- if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name2.value)) {
34729
- return name2;
34314
+ const name = this.parseName();
34315
+ if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {
34316
+ return name;
34730
34317
  }
34731
34318
  throw this.unexpected(start);
34732
34319
  }
@@ -35236,8 +34823,8 @@ const printDocASTReducer = {
35236
34823
  leave: ({ selections }) => block(selections)
35237
34824
  },
35238
34825
  Field: {
35239
- leave({ alias, name: name2, arguments: args, directives, selectionSet }) {
35240
- const prefix = wrap("", alias, ": ") + name2;
34826
+ leave({ alias, name, arguments: args, directives, selectionSet }) {
34827
+ const prefix = wrap("", alias, ": ") + name;
35241
34828
  let argsLine = prefix + wrap("(", join(args, ", "), ")");
35242
34829
  if (argsLine.length > MAX_LINE_LENGTH) {
35243
34830
  argsLine = prefix + wrap("(\n", indent(join(args, "\n")), "\n)");
@@ -35246,11 +34833,11 @@ const printDocASTReducer = {
35246
34833
  }
35247
34834
  },
35248
34835
  Argument: {
35249
- leave: ({ name: name2, value }) => name2 + ": " + value
34836
+ leave: ({ name, value }) => name + ": " + value
35250
34837
  },
35251
34838
  // Fragments
35252
34839
  FragmentSpread: {
35253
- leave: ({ name: name2, directives }) => "..." + name2 + wrap(" ", join(directives, " "))
34840
+ leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
35254
34841
  },
35255
34842
  InlineFragment: {
35256
34843
  leave: ({ typeCondition, directives, selectionSet }) => join(
@@ -35264,9 +34851,9 @@ const printDocASTReducer = {
35264
34851
  )
35265
34852
  },
35266
34853
  FragmentDefinition: {
35267
- leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => (
34854
+ leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => (
35268
34855
  // or removed in the future.
35269
- `fragment ${name2}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
34856
+ `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
35270
34857
  )
35271
34858
  },
35272
34859
  // Value
@@ -35295,15 +34882,15 @@ const printDocASTReducer = {
35295
34882
  leave: ({ fields }) => "{" + join(fields, ", ") + "}"
35296
34883
  },
35297
34884
  ObjectField: {
35298
- leave: ({ name: name2, value }) => name2 + ": " + value
34885
+ leave: ({ name, value }) => name + ": " + value
35299
34886
  },
35300
34887
  // Directive
35301
34888
  Directive: {
35302
- leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap("(", join(args, ", "), ")")
34889
+ leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
35303
34890
  },
35304
34891
  // Type
35305
34892
  NamedType: {
35306
- leave: ({ name: name2 }) => name2
34893
+ leave: ({ name }) => name
35307
34894
  },
35308
34895
  ListType: {
35309
34896
  leave: ({ type: type2 }) => "[" + type2 + "]"
@@ -35313,19 +34900,19 @@ const printDocASTReducer = {
35313
34900
  },
35314
34901
  // Type System Definitions
35315
34902
  SchemaDefinition: {
35316
- leave: ({ description: description2, directives, operationTypes }) => wrap("", description2, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
34903
+ leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
35317
34904
  },
35318
34905
  OperationTypeDefinition: {
35319
34906
  leave: ({ operation, type: type2 }) => operation + ": " + type2
35320
34907
  },
35321
34908
  ScalarTypeDefinition: {
35322
- leave: ({ description: description2, name: name2, directives }) => wrap("", description2, "\n") + join(["scalar", name2, join(directives, " ")], " ")
34909
+ leave: ({ description, name, directives }) => wrap("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
35323
34910
  },
35324
34911
  ObjectTypeDefinition: {
35325
- leave: ({ description: description2, name: name2, interfaces, directives, fields }) => wrap("", description2, "\n") + join(
34912
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
35326
34913
  [
35327
34914
  "type",
35328
- name2,
34915
+ name,
35329
34916
  wrap("implements ", join(interfaces, " & ")),
35330
34917
  join(directives, " "),
35331
34918
  block(fields)
@@ -35334,19 +34921,19 @@ const printDocASTReducer = {
35334
34921
  )
35335
34922
  },
35336
34923
  FieldDefinition: {
35337
- 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, " "))
34924
+ 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, " "))
35338
34925
  },
35339
34926
  InputValueDefinition: {
35340
- leave: ({ description: description2, name: name2, type: type2, defaultValue, directives }) => wrap("", description2, "\n") + join(
35341
- [name2 + ": " + type2, wrap("= ", defaultValue), join(directives, " ")],
34927
+ leave: ({ description, name, type: type2, defaultValue, directives }) => wrap("", description, "\n") + join(
34928
+ [name + ": " + type2, wrap("= ", defaultValue), join(directives, " ")],
35342
34929
  " "
35343
34930
  )
35344
34931
  },
35345
34932
  InterfaceTypeDefinition: {
35346
- leave: ({ description: description2, name: name2, interfaces, directives, fields }) => wrap("", description2, "\n") + join(
34933
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
35347
34934
  [
35348
34935
  "interface",
35349
- name2,
34936
+ name,
35350
34937
  wrap("implements ", join(interfaces, " & ")),
35351
34938
  join(directives, " "),
35352
34939
  block(fields)
@@ -35355,22 +34942,22 @@ const printDocASTReducer = {
35355
34942
  )
35356
34943
  },
35357
34944
  UnionTypeDefinition: {
35358
- leave: ({ description: description2, name: name2, directives, types: types2 }) => wrap("", description2, "\n") + join(
35359
- ["union", name2, join(directives, " "), wrap("= ", join(types2, " | "))],
34945
+ leave: ({ description, name, directives, types: types2 }) => wrap("", description, "\n") + join(
34946
+ ["union", name, join(directives, " "), wrap("= ", join(types2, " | "))],
35360
34947
  " "
35361
34948
  )
35362
34949
  },
35363
34950
  EnumTypeDefinition: {
35364
- leave: ({ description: description2, name: name2, directives, values }) => wrap("", description2, "\n") + join(["enum", name2, join(directives, " "), block(values)], " ")
34951
+ leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
35365
34952
  },
35366
34953
  EnumValueDefinition: {
35367
- leave: ({ description: description2, name: name2, directives }) => wrap("", description2, "\n") + join([name2, join(directives, " ")], " ")
34954
+ leave: ({ description, name, directives }) => wrap("", description, "\n") + join([name, join(directives, " ")], " ")
35368
34955
  },
35369
34956
  InputObjectTypeDefinition: {
35370
- leave: ({ description: description2, name: name2, directives, fields }) => wrap("", description2, "\n") + join(["input", name2, join(directives, " "), block(fields)], " ")
34957
+ leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
35371
34958
  },
35372
34959
  DirectiveDefinition: {
35373
- 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, " | ")
34960
+ 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, " | ")
35374
34961
  },
35375
34962
  SchemaExtension: {
35376
34963
  leave: ({ directives, operationTypes }) => join(
@@ -35379,13 +34966,13 @@ const printDocASTReducer = {
35379
34966
  )
35380
34967
  },
35381
34968
  ScalarTypeExtension: {
35382
- leave: ({ name: name2, directives }) => join(["extend scalar", name2, join(directives, " ")], " ")
34969
+ leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
35383
34970
  },
35384
34971
  ObjectTypeExtension: {
35385
- leave: ({ name: name2, interfaces, directives, fields }) => join(
34972
+ leave: ({ name, interfaces, directives, fields }) => join(
35386
34973
  [
35387
34974
  "extend type",
35388
- name2,
34975
+ name,
35389
34976
  wrap("implements ", join(interfaces, " & ")),
35390
34977
  join(directives, " "),
35391
34978
  block(fields)
@@ -35394,10 +34981,10 @@ const printDocASTReducer = {
35394
34981
  )
35395
34982
  },
35396
34983
  InterfaceTypeExtension: {
35397
- leave: ({ name: name2, interfaces, directives, fields }) => join(
34984
+ leave: ({ name, interfaces, directives, fields }) => join(
35398
34985
  [
35399
34986
  "extend interface",
35400
- name2,
34987
+ name,
35401
34988
  wrap("implements ", join(interfaces, " & ")),
35402
34989
  join(directives, " "),
35403
34990
  block(fields)
@@ -35406,10 +34993,10 @@ const printDocASTReducer = {
35406
34993
  )
35407
34994
  },
35408
34995
  UnionTypeExtension: {
35409
- leave: ({ name: name2, directives, types: types2 }) => join(
34996
+ leave: ({ name, directives, types: types2 }) => join(
35410
34997
  [
35411
34998
  "extend union",
35412
- name2,
34999
+ name,
35413
35000
  join(directives, " "),
35414
35001
  wrap("= ", join(types2, " | "))
35415
35002
  ],
@@ -35417,10 +35004,10 @@ const printDocASTReducer = {
35417
35004
  )
35418
35005
  },
35419
35006
  EnumTypeExtension: {
35420
- leave: ({ name: name2, directives, values }) => join(["extend enum", name2, join(directives, " "), block(values)], " ")
35007
+ leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
35421
35008
  },
35422
35009
  InputObjectTypeExtension: {
35423
- leave: ({ name: name2, directives, fields }) => join(["extend input", name2, join(directives, " "), block(fields)], " ")
35010
+ leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
35424
35011
  }
35425
35012
  };
35426
35013
  function join(maybeArray, separator = "") {
@@ -35633,8 +35220,8 @@ const createFetcher = (method) => async (params) => {
35633
35220
  initResolved = initNew;
35634
35221
  }
35635
35222
  if (searchParams) {
35636
- searchParams.forEach((value, name2) => {
35637
- url.searchParams.append(name2, value);
35223
+ searchParams.forEach((value, name) => {
35224
+ url.searchParams.append(name, value);
35638
35225
  });
35639
35226
  }
35640
35227
  const $fetch = params.fetch ?? fetch;
@@ -35880,22 +35467,27 @@ const createContractInteractions = ({
35880
35467
  };
35881
35468
  const createConfig = (props) => {
35882
35469
  const parsed = configArgsSchema.parse(props);
35883
- const { walletClient, publicClient } = parsed;
35884
- if (!walletClient.chain || !publicClient.chain || !chainIds.includes(walletClient.chain?.id) || !chainIds.includes(publicClient.chain?.id))
35470
+ if (!parsed.walletClient.chain || !parsed.publicClient.chain || !chainIds.includes(parsed.walletClient.chain?.id) || !chainIds.includes(parsed.publicClient.chain?.id))
35885
35471
  throw new Error(`Chain must be one of ${chainIds.join(", ")}`);
35886
- const chainId = walletClient.chain.id;
35472
+ const chainId = parsed.walletClient.chain.id;
35473
+ const chainContracts = contracts[chainId];
35474
+ const addresses = {
35475
+ setter: parsed._?.contractAddresses?.setter || chainContracts.setter,
35476
+ getter: parsed._?.contractAddresses?.getter || chainContracts.getter,
35477
+ token: parsed._?.contractAddresses?.token || chainContracts.token
35478
+ };
35887
35479
  const contract = createContractInteractions({
35888
- walletClient,
35889
- publicClient,
35890
- addresses: contracts[chainId]
35480
+ walletClient: parsed.walletClient,
35481
+ publicClient: parsed.publicClient,
35482
+ addresses
35891
35483
  });
35892
- const graphEndpoint = graph_endpoints[chainId];
35893
- const restEndpoint = rest_endpoints[chainId];
35484
+ const graphEndpoint = parsed._?.graphUrl || graph_endpoints[chainId];
35485
+ const restEndpoint = parsed._?.restUrl || rest_endpoints[chainId];
35894
35486
  const graphQLClient = new GraphQLClient(graphEndpoint);
35895
35487
  return {
35896
- publicClient,
35897
- walletClient,
35898
- chain: walletClient.chain,
35488
+ publicClient: parsed.publicClient,
35489
+ walletClient: parsed.walletClient,
35490
+ chain: parsed.walletClient.chain,
35899
35491
  graphEndpoint,
35900
35492
  restEndpoint,
35901
35493
  api: {
@@ -35903,45 +35495,12 @@ const createConfig = (props) => {
35903
35495
  ...createSSVAPI(restEndpoint)
35904
35496
  },
35905
35497
  graphQLClient,
35906
- contractAddresses: contracts[chainId],
35498
+ contractAddresses: addresses,
35907
35499
  contract
35908
35500
  };
35909
35501
  };
35910
- const globals = {
35911
- MAX_WEI_AMOUNT: 115792089237316195423570985008687907853269984665640564039457584007913129639935n,
35912
- CLUSTER_SIZES: {
35913
- QUAD_CLUSTER: 4,
35914
- SEPT_CLUSTER: 7,
35915
- DECA_CLUSTER: 10,
35916
- TRISKAIDEKA_CLUSTER: 13
35917
- },
35918
- FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE: {
35919
- QUAD_CLUSTER: 80,
35920
- SEPT_CLUSTER: 40,
35921
- DECA_CLUSTER: 30,
35922
- TRISKAIDEKA_CLUSTER: 20
35923
- },
35924
- BLOCKS_PER_DAY: 7160n,
35925
- OPERATORS_PER_PAGE: 50,
35926
- BLOCKS_PER_YEAR: 2613400n,
35927
- DEFAULT_CLUSTER_PERIOD: 730,
35928
- NUMBERS_OF_WEEKS_IN_YEAR: 52.1429,
35929
- MAX_VALIDATORS_COUNT_MULTI_FLOW: 50,
35930
- CLUSTER_VALIDITY_PERIOD_MINIMUM: 30,
35931
- OPERATOR_VALIDATORS_LIMIT_PRESERVE: 5,
35932
- MINIMUM_OPERATOR_FEE_PER_BLOCK: 1000000000n,
35933
- MIN_VALIDATORS_COUNT_PER_BULK_REGISTRATION: 1,
35934
- DEFAULT_ADDRESS_WHITELIST: "0x0000000000000000000000000000000000000000"
35935
- };
35936
- const registerValidatorsByClusterSizeLimits = {
35937
- [globals.CLUSTER_SIZES.QUAD_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.QUAD_CLUSTER,
35938
- [globals.CLUSTER_SIZES.SEPT_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.SEPT_CLUSTER,
35939
- [globals.CLUSTER_SIZES.DECA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.DECA_CLUSTER,
35940
- [globals.CLUSTER_SIZES.TRISKAIDEKA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.TRISKAIDEKA_CLUSTER
35941
- };
35942
35502
  const deposit = async (config2, { args: { id, amount }, ...writeOptions }, options2 = {}) => {
35943
35503
  const cluster = await config2.api.getCluster({ id });
35944
- console.log("cluster:", cluster);
35945
35504
  if (!cluster) {
35946
35505
  throw new Error("Cluster not found");
35947
35506
  }
@@ -36037,18 +35596,16 @@ const registerValidators = async (config2, { args: { keyshares, depositAmount =
36037
35596
  });
36038
35597
  const snapshot = cluster ? getClusterSnapshot$1(cluster) : createEmptyCluster();
36039
35598
  if (shares.length === 1) {
36040
- return config2.contract.ssv.write.registerValidator(
36041
- {
36042
- args: {
36043
- amount: depositAmount,
36044
- cluster: snapshot,
36045
- operatorIds: operatorIds.map(BigInt),
36046
- publicKey: shares[0].publicKey,
36047
- sharesData: shares[0].sharesData
36048
- },
36049
- ...writeOptions
36050
- }
36051
- );
35599
+ return config2.contract.ssv.write.registerValidator({
35600
+ args: {
35601
+ amount: depositAmount,
35602
+ cluster: snapshot,
35603
+ operatorIds: operatorIds.map(BigInt),
35604
+ publicKey: shares[0].publicKey,
35605
+ sharesData: shares[0].sharesData
35606
+ },
35607
+ ...writeOptions
35608
+ });
36052
35609
  }
36053
35610
  return config2.contract.ssv.write.bulkRegisterValidator({
36054
35611
  args: {
@@ -36061,6 +35618,43 @@ const registerValidators = async (config2, { args: { keyshares, depositAmount =
36061
35618
  ...writeOptions
36062
35619
  });
36063
35620
  };
35621
+ const registerValidatorsRawData = async (config2, { args: { keyshares, depositAmount = 0n } }) => {
35622
+ const shares = keyshares.map((share) => {
35623
+ return isKeySharesItem(share) ? share.payload : share;
35624
+ });
35625
+ const operatorIds = shares[0].operatorIds;
35626
+ const clusterSize = operatorIds.length;
35627
+ const limit = registerValidatorsByClusterSizeLimits[clusterSize];
35628
+ if (!limit) {
35629
+ throw new Error(
35630
+ `Invalid number of operators in keyshares: ${clusterSize}, should be one of: ${Object.keys(registerValidatorsByClusterSizeLimits).join(", ")}`
35631
+ );
35632
+ }
35633
+ if (shares.length > limit) {
35634
+ throw new Error(`You can't register more than ${limit} validators in a single transaction`);
35635
+ }
35636
+ const clusterId = createClusterId(config2.walletClient.account.address, operatorIds);
35637
+ const cluster = await config2.api.getCluster({
35638
+ id: clusterId
35639
+ });
35640
+ const snapshot = cluster ? getClusterSnapshot$1(cluster) : createEmptyCluster();
35641
+ if (shares.length === 1) {
35642
+ return config2.contract.ssv.write.registerValidator.getTransactionData({
35643
+ amount: depositAmount,
35644
+ cluster: snapshot,
35645
+ operatorIds: operatorIds.map(BigInt),
35646
+ publicKey: shares[0].publicKey,
35647
+ sharesData: shares[0].sharesData
35648
+ });
35649
+ }
35650
+ return config2.contract.ssv.write.bulkRegisterValidator.getTransactionData({
35651
+ cluster: snapshot,
35652
+ amount: depositAmount,
35653
+ operatorIds: operatorIds.map(BigInt),
35654
+ publicKeys: shares.map((share) => share.publicKey),
35655
+ sharesData: shares.map((share) => share.sharesData)
35656
+ });
35657
+ };
36064
35658
  const ssvKeys$1 = new SSVKeys();
36065
35659
  const validateSharesPostRegistration = async (config2, args) => {
36066
35660
  const receipt = await config2.publicClient.waitForTransactionReceipt({
@@ -36166,6 +35760,7 @@ const createClusterManager = (config2) => ({
36166
35760
  setFeeRecipient: setFeeRecipient.bind(null, config2),
36167
35761
  exitValidators: exitValidators.bind(null, config2),
36168
35762
  registerValidators: registerValidators.bind(null, config2),
35763
+ registerValidatorsRawData: registerValidatorsRawData.bind(null, config2),
36169
35764
  validateSharesPostRegistration: validateSharesPostRegistration.bind(
36170
35765
  null,
36171
35766
  config2
@@ -36431,7 +36026,7 @@ class SSVSDK {
36431
36026
  export {
36432
36027
  SSVSDK,
36433
36028
  chainIds,
36434
- chains,
36029
+ H as chains,
36435
36030
  contracts,
36436
36031
  createClusterManager,
36437
36032
  createConfig,
@@ -36454,8 +36049,9 @@ export {
36454
36049
  getValidators,
36455
36050
  globals,
36456
36051
  graph_endpoints,
36457
- hoodi,
36052
+ G2 as hoodi,
36458
36053
  isConfig,
36054
+ I as networks,
36459
36055
  registerValidatorsByClusterSizeLimits,
36460
36056
  rest_endpoints
36461
36057
  };