@ssv-labs/ssv-sdk 0.0.5 → 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,6 +1,6 @@
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-DsbufPrE.mjs";
2
- import { H, G as G2, I } from "./globals-DsbufPrE.mjs";
3
- import { 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";
4
4
  import { SSVKeys, KeyShares, KeySharesItem } from "ssv-keys";
5
5
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6
6
  function getDefaultExportFromCjs(x) {
@@ -1566,9 +1566,9 @@ var dist = {};
1566
1566
  }
1567
1567
  E(
1568
1568
  "ERR_BUFFER_OUT_OF_BOUNDS",
1569
- function(name2) {
1570
- if (name2) {
1571
- return `${name2} is outside of buffer bounds`;
1569
+ function(name) {
1570
+ if (name) {
1571
+ return `${name} is outside of buffer bounds`;
1572
1572
  }
1573
1573
  return "Attempt to access memory outside buffer bounds";
1574
1574
  },
@@ -1576,8 +1576,8 @@ var dist = {};
1576
1576
  );
1577
1577
  E(
1578
1578
  "ERR_INVALID_ARG_TYPE",
1579
- function(name2, actual) {
1580
- 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}`;
1581
1581
  },
1582
1582
  TypeError
1583
1583
  );
@@ -1630,9 +1630,9 @@ var dist = {};
1630
1630
  }
1631
1631
  checkBounds(buf, offset, byteLength3);
1632
1632
  }
1633
- function validateNumber(value, name2) {
1633
+ function validateNumber(value, name) {
1634
1634
  if (typeof value !== "number") {
1635
- throw new errors.ERR_INVALID_ARG_TYPE(name2, "number", value);
1635
+ throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
1636
1636
  }
1637
1637
  }
1638
1638
  function boundsError(value, length, type2) {
@@ -1795,7 +1795,7 @@ var dist = {};
1795
1795
  exports2.transcode = buffer2.transcode;
1796
1796
  })(dist);
1797
1797
  const Buffer$C = /* @__PURE__ */ getDefaultExportFromCjs(dist);
1798
- var main$2 = { exports: {} };
1798
+ var main = { exports: {} };
1799
1799
  var empty = null;
1800
1800
  var empty_1 = empty;
1801
1801
  function assertPath(path3) {
@@ -2198,57 +2198,57 @@ var posix = {
2198
2198
  };
2199
2199
  posix.posix = posix;
2200
2200
  var pathBrowserify = posix;
2201
- var browser$d = {};
2202
- browser$d.endianness = function() {
2201
+ var browser$c = {};
2202
+ browser$c.endianness = function() {
2203
2203
  return "LE";
2204
2204
  };
2205
- browser$d.hostname = function() {
2205
+ browser$c.hostname = function() {
2206
2206
  if (typeof location !== "undefined") {
2207
2207
  return location.hostname;
2208
2208
  } else return "";
2209
2209
  };
2210
- browser$d.loadavg = function() {
2210
+ browser$c.loadavg = function() {
2211
2211
  return [];
2212
2212
  };
2213
- browser$d.uptime = function() {
2213
+ browser$c.uptime = function() {
2214
2214
  return 0;
2215
2215
  };
2216
- browser$d.freemem = function() {
2216
+ browser$c.freemem = function() {
2217
2217
  return Number.MAX_VALUE;
2218
2218
  };
2219
- browser$d.totalmem = function() {
2219
+ browser$c.totalmem = function() {
2220
2220
  return Number.MAX_VALUE;
2221
2221
  };
2222
- browser$d.cpus = function() {
2222
+ browser$c.cpus = function() {
2223
2223
  return [];
2224
2224
  };
2225
- browser$d.type = function() {
2225
+ browser$c.type = function() {
2226
2226
  return "Browser";
2227
2227
  };
2228
- browser$d.release = function() {
2228
+ browser$c.release = function() {
2229
2229
  if (typeof navigator !== "undefined") {
2230
2230
  return navigator.appVersion;
2231
2231
  }
2232
2232
  return "";
2233
2233
  };
2234
- browser$d.networkInterfaces = browser$d.getNetworkInterfaces = function() {
2234
+ browser$c.networkInterfaces = browser$c.getNetworkInterfaces = function() {
2235
2235
  return {};
2236
2236
  };
2237
- browser$d.arch = function() {
2237
+ browser$c.arch = function() {
2238
2238
  return "javascript";
2239
2239
  };
2240
- browser$d.platform = function() {
2240
+ browser$c.platform = function() {
2241
2241
  return "browser";
2242
2242
  };
2243
- browser$d.tmpdir = browser$d.tmpDir = function() {
2243
+ browser$c.tmpdir = browser$c.tmpDir = function() {
2244
2244
  return "/tmp";
2245
2245
  };
2246
- browser$d.EOL = "\n";
2247
- browser$d.homedir = function() {
2246
+ browser$c.EOL = "\n";
2247
+ browser$c.homedir = function() {
2248
2248
  return "/";
2249
2249
  };
2250
2250
  var cryptoBrowserify = {};
2251
- var browser$c = { exports: {} };
2251
+ var browser$b = { exports: {} };
2252
2252
  var safeBuffer$2 = { exports: {} };
2253
2253
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2254
2254
  (function(module, exports2) {
@@ -2314,9 +2314,9 @@ function oldBrowser$1() {
2314
2314
  var Buffer$B = safeBufferExports$1.Buffer;
2315
2315
  var crypto$2 = commonjsGlobal.crypto || commonjsGlobal.msCrypto;
2316
2316
  if (crypto$2 && crypto$2.getRandomValues) {
2317
- browser$c.exports = randomBytes$2;
2317
+ browser$b.exports = randomBytes$2;
2318
2318
  } else {
2319
- browser$c.exports = oldBrowser$1;
2319
+ browser$b.exports = oldBrowser$1;
2320
2320
  }
2321
2321
  function randomBytes$2(size, cb) {
2322
2322
  if (size > MAX_UINT32) throw new RangeError("requested too many random bytes");
@@ -2337,7 +2337,7 @@ function randomBytes$2(size, cb) {
2337
2337
  }
2338
2338
  return bytes;
2339
2339
  }
2340
- var browserExports = browser$c.exports;
2340
+ var browserExports = browser$b.exports;
2341
2341
  var inherits_browser = { exports: {} };
2342
2342
  if (typeof Object.create === "function") {
2343
2343
  inherits_browser.exports = function inherits2(ctor, superCtor) {
@@ -2688,10 +2688,10 @@ function unwrapListeners(arr) {
2688
2688
  }
2689
2689
  return ret;
2690
2690
  }
2691
- function once$2(emitter, name2) {
2691
+ function once$2(emitter, name) {
2692
2692
  return new Promise(function(resolve2, reject) {
2693
2693
  function errorListener(err) {
2694
- emitter.removeListener(name2, resolver);
2694
+ emitter.removeListener(name, resolver);
2695
2695
  reject(err);
2696
2696
  }
2697
2697
  function resolver() {
@@ -2700,8 +2700,8 @@ function once$2(emitter, name2) {
2700
2700
  }
2701
2701
  resolve2([].slice.call(arguments));
2702
2702
  }
2703
- eventTargetAgnosticAddListener(emitter, name2, resolver, { once: true });
2704
- if (name2 !== "error") {
2703
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
2704
+ if (name !== "error") {
2705
2705
  addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
2706
2706
  }
2707
2707
  });
@@ -2711,17 +2711,17 @@ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
2711
2711
  eventTargetAgnosticAddListener(emitter, "error", handler, flags);
2712
2712
  }
2713
2713
  }
2714
- function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
2714
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
2715
2715
  if (typeof emitter.on === "function") {
2716
2716
  if (flags.once) {
2717
- emitter.once(name2, listener);
2717
+ emitter.once(name, listener);
2718
2718
  } else {
2719
- emitter.on(name2, listener);
2719
+ emitter.on(name, listener);
2720
2720
  }
2721
2721
  } else if (typeof emitter.addEventListener === "function") {
2722
- emitter.addEventListener(name2, function wrapListener(arg) {
2722
+ emitter.addEventListener(name, function wrapListener(arg) {
2723
2723
  if (flags.once) {
2724
- emitter.removeEventListener(name2, wrapListener);
2724
+ emitter.removeEventListener(name, wrapListener);
2725
2725
  }
2726
2726
  listener(arg);
2727
2727
  });
@@ -2732,7 +2732,7 @@ function eventTargetAgnosticAddListener(emitter, name2, listener, flags) {
2732
2732
  var eventsExports = events.exports;
2733
2733
  var streamBrowser$1 = eventsExports.EventEmitter;
2734
2734
  var util$3 = {};
2735
- var types$1 = {};
2735
+ var types = {};
2736
2736
  var shams$1 = function hasSymbols2() {
2737
2737
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
2738
2738
  return false;
@@ -3012,26 +3012,26 @@ if (getProto$1) {
3012
3012
  INTRINSICS["%Error.prototype%"] = errorProto;
3013
3013
  }
3014
3014
  }
3015
- var doEval = function doEval2(name2) {
3015
+ var doEval = function doEval2(name) {
3016
3016
  var value;
3017
- if (name2 === "%AsyncFunction%") {
3017
+ if (name === "%AsyncFunction%") {
3018
3018
  value = getEvalledConstructor("async function () {}");
3019
- } else if (name2 === "%GeneratorFunction%") {
3019
+ } else if (name === "%GeneratorFunction%") {
3020
3020
  value = getEvalledConstructor("function* () {}");
3021
- } else if (name2 === "%AsyncGeneratorFunction%") {
3021
+ } else if (name === "%AsyncGeneratorFunction%") {
3022
3022
  value = getEvalledConstructor("async function* () {}");
3023
- } else if (name2 === "%AsyncGenerator%") {
3023
+ } else if (name === "%AsyncGenerator%") {
3024
3024
  var fn = doEval2("%AsyncGeneratorFunction%");
3025
3025
  if (fn) {
3026
3026
  value = fn.prototype;
3027
3027
  }
3028
- } else if (name2 === "%AsyncIteratorPrototype%") {
3028
+ } else if (name === "%AsyncIteratorPrototype%") {
3029
3029
  var gen = doEval2("%AsyncGenerator%");
3030
3030
  if (gen && getProto$1) {
3031
3031
  value = getProto$1(gen.prototype);
3032
3032
  }
3033
3033
  }
3034
- INTRINSICS[name2] = value;
3034
+ INTRINSICS[name] = value;
3035
3035
  return value;
3036
3036
  };
3037
3037
  var LEGACY_ALIASES = {
@@ -3111,8 +3111,8 @@ var stringToPath = function stringToPath2(string) {
3111
3111
  });
3112
3112
  return result;
3113
3113
  };
3114
- var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3115
- var intrinsicName = name2;
3114
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
3115
+ var intrinsicName = name;
3116
3116
  var alias;
3117
3117
  if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
3118
3118
  alias = LEGACY_ALIASES[intrinsicName];
@@ -3124,7 +3124,7 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3124
3124
  value = doEval(intrinsicName);
3125
3125
  }
3126
3126
  if (typeof value === "undefined" && !allowMissing) {
3127
- 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!");
3128
3128
  }
3129
3129
  return {
3130
3130
  alias,
@@ -3132,19 +3132,19 @@ var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {
3132
3132
  value
3133
3133
  };
3134
3134
  }
3135
- throw new $SyntaxError$1("intrinsic " + name2 + " does not exist!");
3135
+ throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
3136
3136
  };
3137
- var getIntrinsic = function GetIntrinsic2(name2, allowMissing) {
3138
- if (typeof name2 !== "string" || name2.length === 0) {
3137
+ var getIntrinsic = function GetIntrinsic2(name, allowMissing) {
3138
+ if (typeof name !== "string" || name.length === 0) {
3139
3139
  throw new $TypeError$2("intrinsic name must be a non-empty string");
3140
3140
  }
3141
3141
  if (arguments.length > 1 && typeof allowMissing !== "boolean") {
3142
3142
  throw new $TypeError$2('"allowMissing" argument must be a boolean');
3143
3143
  }
3144
- if ($exec(/^%?[^%]*%?$/, name2) === null) {
3144
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
3145
3145
  throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3146
3146
  }
3147
- var parts = stringToPath(name2);
3147
+ var parts = stringToPath(name);
3148
3148
  var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
3149
3149
  var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
3150
3150
  var intrinsicRealName = intrinsic.name;
@@ -3172,7 +3172,7 @@ var getIntrinsic = function GetIntrinsic2(name2, allowMissing) {
3172
3172
  } else if (value != null) {
3173
3173
  if (!(part in value)) {
3174
3174
  if (!allowMissing) {
3175
- 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.");
3176
3176
  }
3177
3177
  return void 0;
3178
3178
  }
@@ -3359,9 +3359,9 @@ var callBindExports = callBind$2.exports;
3359
3359
  var GetIntrinsic = getIntrinsic;
3360
3360
  var callBind$1 = callBindExports;
3361
3361
  var $indexOf$1 = callBind$1(GetIntrinsic("String.prototype.indexOf"));
3362
- var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
3363
- var intrinsic = GetIntrinsic(name2, !!allowMissing);
3364
- 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) {
3365
3365
  return callBind$1(intrinsic);
3366
3366
  }
3367
3367
  return intrinsic;
@@ -3677,11 +3677,11 @@ var trySlices = function tryAllSlices(value) {
3677
3677
  /** @type {any} */
3678
3678
  cache,
3679
3679
  /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
3680
- function(getter, name2) {
3680
+ function(getter, name) {
3681
3681
  if (!found) {
3682
3682
  try {
3683
3683
  getter(value);
3684
- found = $slice(name2, 1);
3684
+ found = $slice(name, 1);
3685
3685
  } catch (e) {
3686
3686
  }
3687
3687
  }
@@ -3934,7 +3934,7 @@ var isTypedArray = function isTypedArray2(value) {
3934
3934
  }
3935
3935
  });
3936
3936
  });
3937
- })(types$1);
3937
+ })(types);
3938
3938
  var isBufferBrowser = function isBuffer2(arg) {
3939
3939
  return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
3940
3940
  };
@@ -4122,8 +4122,8 @@ var isBufferBrowser = function isBuffer2(arg) {
4122
4122
  }
4123
4123
  if (keys.length === 0) {
4124
4124
  if (isFunction2(value)) {
4125
- var name2 = value.name ? ": " + value.name : "";
4126
- return ctx.stylize("[Function" + name2 + "]", "special");
4125
+ var name = value.name ? ": " + value.name : "";
4126
+ return ctx.stylize("[Function" + name + "]", "special");
4127
4127
  }
4128
4128
  if (isRegExp2(value)) {
4129
4129
  return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
@@ -4223,7 +4223,7 @@ var isBufferBrowser = function isBuffer2(arg) {
4223
4223
  return output;
4224
4224
  }
4225
4225
  function formatProperty(ctx, value, recurseTimes, visibleKeys, key2, array) {
4226
- var name2, str, desc;
4226
+ var name, str, desc;
4227
4227
  desc = Object.getOwnPropertyDescriptor(value, key2) || { value: value[key2] };
4228
4228
  if (desc.get) {
4229
4229
  if (desc.set) {
@@ -4237,7 +4237,7 @@ var isBufferBrowser = function isBuffer2(arg) {
4237
4237
  }
4238
4238
  }
4239
4239
  if (!hasOwnProperty2(visibleKeys, key2)) {
4240
- name2 = "[" + key2 + "]";
4240
+ name = "[" + key2 + "]";
4241
4241
  }
4242
4242
  if (!str) {
4243
4243
  if (ctx.seen.indexOf(desc.value) < 0) {
@@ -4261,20 +4261,20 @@ var isBufferBrowser = function isBuffer2(arg) {
4261
4261
  str = ctx.stylize("[Circular]", "special");
4262
4262
  }
4263
4263
  }
4264
- if (isUndefined2(name2)) {
4264
+ if (isUndefined2(name)) {
4265
4265
  if (array && key2.match(/^\d+$/)) {
4266
4266
  return str;
4267
4267
  }
4268
- name2 = JSON.stringify("" + key2);
4269
- if (name2.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
4270
- name2 = name2.slice(1, -1);
4271
- 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");
4272
4272
  } else {
4273
- name2 = name2.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
4274
- name2 = ctx.stylize(name2, "string");
4273
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
4274
+ name = ctx.stylize(name, "string");
4275
4275
  }
4276
4276
  }
4277
- return name2 + ": " + str;
4277
+ return name + ": " + str;
4278
4278
  }
4279
4279
  function reduceToSingleString(output, base2, braces) {
4280
4280
  var length = output.reduce(function(prev, cur) {
@@ -4286,7 +4286,7 @@ var isBufferBrowser = function isBuffer2(arg) {
4286
4286
  }
4287
4287
  return braces[0] + base2 + " " + output.join(", ") + " " + braces[1];
4288
4288
  }
4289
- exports2.types = types$1;
4289
+ exports2.types = types;
4290
4290
  function isArray2(ar) {
4291
4291
  return Array.isArray(ar);
4292
4292
  }
@@ -4552,11 +4552,11 @@ function requireBuffer_list() {
4552
4552
  if (typeof input !== "object" || input === null) return input;
4553
4553
  var prim = input[Symbol.toPrimitive];
4554
4554
  if (prim !== void 0) {
4555
- var res = prim.call(input, hint || "default");
4555
+ var res = prim.call(input, hint);
4556
4556
  if (typeof res !== "object") return res;
4557
4557
  throw new TypeError("@@toPrimitive must return a primitive value.");
4558
4558
  }
4559
- return (hint === "string" ? String : Number)(input);
4559
+ return String(input);
4560
4560
  }
4561
4561
  var _require = dist, Buffer2 = _require.Buffer;
4562
4562
  var _require2 = util$3, inspect7 = _require2.inspect;
@@ -4876,10 +4876,10 @@ function includes(str, search, start) {
4876
4876
  return str.indexOf(search, start) !== -1;
4877
4877
  }
4878
4878
  }
4879
- createErrorType("ERR_INVALID_OPT_VALUE", function(name2, value) {
4880
- 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 + '"';
4881
4881
  }, TypeError);
4882
- createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) {
4882
+ createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
4883
4883
  var determiner;
4884
4884
  if (typeof expected === "string" && startsWith(expected, "not ")) {
4885
4885
  determiner = "must not be";
@@ -4888,22 +4888,22 @@ createErrorType("ERR_INVALID_ARG_TYPE", function(name2, expected, actual) {
4888
4888
  determiner = "must be";
4889
4889
  }
4890
4890
  var msg;
4891
- if (endsWith(name2, " argument")) {
4892
- 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"));
4893
4893
  } else {
4894
- var type2 = includes(name2, ".") ? "property" : "argument";
4895
- 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"));
4896
4896
  }
4897
4897
  msg += ". Received type ".concat(typeof actual);
4898
4898
  return msg;
4899
4899
  }, TypeError);
4900
4900
  createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
4901
- createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name2) {
4902
- return "The " + name2 + " method is not implemented";
4901
+ createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
4902
+ return "The " + name + " method is not implemented";
4903
4903
  });
4904
4904
  createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
4905
- createErrorType("ERR_STREAM_DESTROYED", function(name2) {
4906
- 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";
4907
4907
  });
4908
4908
  createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
4909
4909
  createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
@@ -4922,8 +4922,8 @@ function getHighWaterMark(state2, options2, duplexKey, isDuplex) {
4922
4922
  var hwm = highWaterMarkFrom(options2, isDuplex, duplexKey);
4923
4923
  if (hwm != null) {
4924
4924
  if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
4925
- var name2 = isDuplex ? duplexKey : "highWaterMark";
4926
- throw new ERR_INVALID_OPT_VALUE(name2, hwm);
4925
+ var name = isDuplex ? duplexKey : "highWaterMark";
4926
+ throw new ERR_INVALID_OPT_VALUE(name, hwm);
4927
4927
  }
4928
4928
  return Math.floor(hwm);
4929
4929
  }
@@ -4932,7 +4932,7 @@ function getHighWaterMark(state2, options2, duplexKey, isDuplex) {
4932
4932
  var state = {
4933
4933
  getHighWaterMark
4934
4934
  };
4935
- var browser$b = deprecate;
4935
+ var browser$a = deprecate;
4936
4936
  function deprecate(fn, msg) {
4937
4937
  if (config$1("noDeprecation")) {
4938
4938
  return fn;
@@ -4953,13 +4953,13 @@ function deprecate(fn, msg) {
4953
4953
  }
4954
4954
  return deprecated;
4955
4955
  }
4956
- function config$1(name2) {
4956
+ function config$1(name) {
4957
4957
  try {
4958
4958
  if (!commonjsGlobal.localStorage) return false;
4959
4959
  } catch (_) {
4960
4960
  return false;
4961
4961
  }
4962
- var val = commonjsGlobal.localStorage[name2];
4962
+ var val = commonjsGlobal.localStorage[name];
4963
4963
  if (null == val) return false;
4964
4964
  return String(val).toLowerCase() === "true";
4965
4965
  }
@@ -4980,7 +4980,7 @@ function require_stream_writable$1() {
4980
4980
  var Duplex2;
4981
4981
  Writable.WritableState = WritableState;
4982
4982
  var internalUtil = {
4983
- deprecate: browser$b
4983
+ deprecate: browser$a
4984
4984
  };
4985
4985
  var Stream2 = streamBrowser$1;
4986
4986
  var Buffer2 = dist.Buffer;
@@ -5852,7 +5852,7 @@ function requireAsync_iterator() {
5852
5852
  if (typeof input !== "object" || input === null) return input;
5853
5853
  var prim = input[Symbol.toPrimitive];
5854
5854
  if (prim !== void 0) {
5855
- var res = prim.call(input, hint || "default");
5855
+ var res = prim.call(input, hint);
5856
5856
  if (typeof res !== "object") return res;
5857
5857
  throw new TypeError("@@toPrimitive must return a primitive value.");
5858
5858
  }
@@ -8326,18 +8326,18 @@ Sha384.prototype._hash = function() {
8326
8326
  return H2;
8327
8327
  };
8328
8328
  var sha384$1 = Sha384;
8329
- var exports$1 = sha_js.exports = function SHA(algorithm) {
8329
+ var exports = sha_js.exports = function SHA(algorithm) {
8330
8330
  algorithm = algorithm.toLowerCase();
8331
- var Algorithm = exports$1[algorithm];
8331
+ var Algorithm = exports[algorithm];
8332
8332
  if (!Algorithm) throw new Error(algorithm + " is not supported (we accept pull requests)");
8333
8333
  return new Algorithm();
8334
8334
  };
8335
- exports$1.sha = sha$4;
8336
- exports$1.sha1 = sha1;
8337
- exports$1.sha224 = sha224$1;
8338
- exports$1.sha256 = sha256$1;
8339
- exports$1.sha384 = sha384$1;
8340
- 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;
8341
8341
  var sha_jsExports = sha_js.exports;
8342
8342
  var streamBrowserify = Stream;
8343
8343
  var EE = eventsExports.EventEmitter;
@@ -8511,7 +8511,7 @@ Hash.prototype._update = function(data) {
8511
8511
  Hash.prototype._final = function() {
8512
8512
  return this._hash.digest();
8513
8513
  };
8514
- var browser$a = function createHash2(alg) {
8514
+ var browser$9 = function createHash2(alg) {
8515
8515
  alg = alg.toLowerCase();
8516
8516
  if (alg === "md5") return new MD5$2();
8517
8517
  if (alg === "rmd160" || alg === "ripemd160") return new RIPEMD160$3();
@@ -8595,7 +8595,7 @@ Hmac$2.prototype._final = function() {
8595
8595
  var hash3 = this._alg === "rmd160" ? new RIPEMD160$2() : sha$2(this._alg);
8596
8596
  return hash3.update(this._opad).update(h).digest();
8597
8597
  };
8598
- var browser$9 = function createHmac(alg, key2) {
8598
+ var browser$8 = function createHmac(alg, key2) {
8599
8599
  alg = alg.toLowerCase();
8600
8600
  if (alg === "rmd160" || alg === "ripemd160") {
8601
8601
  return new Hmac$2("rmd160", key2);
@@ -8769,7 +8769,7 @@ const require$$6 = {
8769
8769
  }
8770
8770
  };
8771
8771
  var algos = require$$6;
8772
- var browser$8 = {};
8772
+ var browser$7 = {};
8773
8773
  var MAX_ALLOC = Math.pow(2, 30) - 1;
8774
8774
  var precondition = function(iterations, keylen) {
8775
8775
  if (typeof iterations !== "number") {
@@ -8796,7 +8796,7 @@ if (commonjsGlobal.process && commonjsGlobal.process.browser) {
8796
8796
  }
8797
8797
  var defaultEncoding_1 = defaultEncoding$2;
8798
8798
  var Buffer$m = safeBufferExports$1.Buffer;
8799
- var toBuffer$2 = function(thing, encoding, name2) {
8799
+ var toBuffer$2 = function(thing, encoding, name) {
8800
8800
  if (Buffer$m.isBuffer(thing)) {
8801
8801
  return thing;
8802
8802
  } else if (typeof thing === "string") {
@@ -8804,7 +8804,7 @@ var toBuffer$2 = function(thing, encoding, name2) {
8804
8804
  } else if (ArrayBuffer.isView(thing)) {
8805
8805
  return Buffer$m.from(thing.buffer);
8806
8806
  } else {
8807
- 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");
8808
8808
  }
8809
8809
  };
8810
8810
  var md5 = md5$2;
@@ -9005,9 +9005,9 @@ var async = function(password, salt, iterations, keylen, digest9, callback) {
9005
9005
  return sync(password, salt, iterations, keylen, digest9);
9006
9006
  }), callback);
9007
9007
  };
9008
- browser$8.pbkdf2 = async;
9009
- browser$8.pbkdf2Sync = syncBrowser;
9010
- var browser$7 = {};
9008
+ browser$7.pbkdf2 = async;
9009
+ browser$7.pbkdf2Sync = syncBrowser;
9010
+ var browser$6 = {};
9011
9011
  var des$2 = {};
9012
9012
  var utils$n = {};
9013
9013
  utils$n.readUInt32BE = function readUInt32BE(bytes, off) {
@@ -10143,7 +10143,7 @@ DES$1.prototype._update = function(data) {
10143
10143
  DES$1.prototype._final = function() {
10144
10144
  return Buffer$j.from(this._des.final());
10145
10145
  };
10146
- var browser$6 = {};
10146
+ var browser$5 = {};
10147
10147
  var encrypter = {};
10148
10148
  var ecb = {};
10149
10149
  ecb.encrypt = function(self2, block2) {
@@ -11118,11 +11118,11 @@ var modes$1 = require$$2;
11118
11118
  function getCiphers$1() {
11119
11119
  return Object.keys(modes$1);
11120
11120
  }
11121
- browser$6.createCipher = browser$6.Cipher = ciphers$2.createCipher;
11122
- browser$6.createCipheriv = browser$6.Cipheriv = ciphers$2.createCipheriv;
11123
- browser$6.createDecipher = browser$6.Decipher = deciphers.createDecipher;
11124
- browser$6.createDecipheriv = browser$6.Decipheriv = deciphers.createDecipheriv;
11125
- 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;
11126
11126
  var modes = {};
11127
11127
  (function(exports2) {
11128
11128
  exports2["des-ecb"] = {
@@ -11151,7 +11151,7 @@ var modes = {};
11151
11151
  };
11152
11152
  })(modes);
11153
11153
  var DES = browserifyDes;
11154
- var aes = browser$6;
11154
+ var aes = browser$5;
11155
11155
  var aesModes = modes_1;
11156
11156
  var desModes = modes;
11157
11157
  var ebtk = evp_bytestokey;
@@ -11200,12 +11200,12 @@ function createDecipheriv(suite, key2, iv) {
11200
11200
  function getCiphers() {
11201
11201
  return Object.keys(desModes).concat(aes.getCiphers());
11202
11202
  }
11203
- browser$7.createCipher = browser$7.Cipher = createCipher;
11204
- browser$7.createCipheriv = browser$7.Cipheriv = createCipheriv;
11205
- browser$7.createDecipher = browser$7.Decipher = createDecipher;
11206
- browser$7.createDecipheriv = browser$7.Decipheriv = createDecipheriv;
11207
- browser$7.listCiphers = browser$7.getCiphers = getCiphers;
11208
- 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 = {};
11209
11209
  var bn$1 = { exports: {} };
11210
11210
  bn$1.exports;
11211
11211
  (function(module) {
@@ -12788,7 +12788,7 @@ bn$1.exports;
12788
12788
  rws[i] = 0;
12789
12789
  }
12790
12790
  assert2(carry === 0);
12791
- assert2((carry & ~8191) === 0);
12791
+ assert2((carry & -8192) === 0);
12792
12792
  };
12793
12793
  FFTM.prototype.stub = function stub(N) {
12794
12794
  var ph = new Array(N);
@@ -13616,8 +13616,8 @@ bn$1.exports;
13616
13616
  p192: null,
13617
13617
  p25519: null
13618
13618
  };
13619
- function MPrime(name2, p) {
13620
- this.name = name2;
13619
+ function MPrime(name, p) {
13620
+ this.name = name;
13621
13621
  this.p = new BN2(p, 16);
13622
13622
  this.n = this.p.bitLength();
13623
13623
  this.k = new BN2(1).iushln(this.n).isub(this.p);
@@ -13750,21 +13750,21 @@ bn$1.exports;
13750
13750
  }
13751
13751
  return num;
13752
13752
  };
13753
- BN2._prime = function prime(name2) {
13754
- if (primes[name2]) return primes[name2];
13753
+ BN2._prime = function prime(name) {
13754
+ if (primes[name]) return primes[name];
13755
13755
  var prime2;
13756
- if (name2 === "k256") {
13756
+ if (name === "k256") {
13757
13757
  prime2 = new K256();
13758
- } else if (name2 === "p224") {
13758
+ } else if (name === "p224") {
13759
13759
  prime2 = new P224();
13760
- } else if (name2 === "p192") {
13760
+ } else if (name === "p192") {
13761
13761
  prime2 = new P192();
13762
- } else if (name2 === "p25519") {
13762
+ } else if (name === "p25519") {
13763
13763
  prime2 = new P25519();
13764
13764
  } else {
13765
- throw new Error("Unknown prime " + name2);
13765
+ throw new Error("Unknown prime " + name);
13766
13766
  }
13767
- primes[name2] = prime2;
13767
+ primes[name] = prime2;
13768
13768
  return prime2;
13769
13769
  };
13770
13770
  function Red(m) {
@@ -14447,7 +14447,7 @@ function requireDh() {
14447
14447
  }
14448
14448
  var hasRequiredBrowser$2;
14449
14449
  function requireBrowser$2() {
14450
- if (hasRequiredBrowser$2) return browser$5;
14450
+ if (hasRequiredBrowser$2) return browser$4;
14451
14451
  hasRequiredBrowser$2 = 1;
14452
14452
  var generatePrime2 = requireGeneratePrime();
14453
14453
  var primes = require$$1$1;
@@ -14480,9 +14480,9 @@ function requireBrowser$2() {
14480
14480
  }
14481
14481
  return new DH(prime, generator, true);
14482
14482
  }
14483
- browser$5.DiffieHellmanGroup = browser$5.createDiffieHellmanGroup = browser$5.getDiffieHellman = getDiffieHellman;
14484
- browser$5.createDiffieHellman = browser$5.DiffieHellman = createDiffieHellman;
14485
- 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;
14486
14486
  }
14487
14487
  var readableBrowser = { exports: {} };
14488
14488
  var processNextickArgs = { exports: {} };
@@ -14813,7 +14813,7 @@ function require_stream_writable() {
14813
14813
  var util2 = Object.create(util$2);
14814
14814
  util2.inherits = inherits_browserExports;
14815
14815
  var internalUtil = {
14816
- deprecate: browser$b
14816
+ deprecate: browser$a
14817
14817
  };
14818
14818
  var Stream2 = streamBrowser;
14819
14819
  var Buffer2 = safeBufferExports.Buffer;
@@ -18456,8 +18456,8 @@ bn.exports;
18456
18456
  p192: null,
18457
18457
  p25519: null
18458
18458
  };
18459
- function MPrime(name2, p) {
18460
- this.name = name2;
18459
+ function MPrime(name, p) {
18460
+ this.name = name;
18461
18461
  this.p = new BN2(p, 16);
18462
18462
  this.n = this.p.bitLength();
18463
18463
  this.k = new BN2(1).iushln(this.n).isub(this.p);
@@ -18590,21 +18590,21 @@ bn.exports;
18590
18590
  }
18591
18591
  return num;
18592
18592
  };
18593
- BN2._prime = function prime(name2) {
18594
- if (primes[name2]) return primes[name2];
18593
+ BN2._prime = function prime(name) {
18594
+ if (primes[name]) return primes[name];
18595
18595
  var prime2;
18596
- if (name2 === "k256") {
18596
+ if (name === "k256") {
18597
18597
  prime2 = new K256();
18598
- } else if (name2 === "p224") {
18598
+ } else if (name === "p224") {
18599
18599
  prime2 = new P224();
18600
- } else if (name2 === "p192") {
18600
+ } else if (name === "p192") {
18601
18601
  prime2 = new P192();
18602
- } else if (name2 === "p25519") {
18602
+ } else if (name === "p25519") {
18603
18603
  prime2 = new P25519();
18604
18604
  } else {
18605
- throw new Error("Unknown prime " + name2);
18605
+ throw new Error("Unknown prime " + name);
18606
18606
  }
18607
- primes[name2] = prime2;
18607
+ primes[name] = prime2;
18608
18608
  return prime2;
18609
18609
  };
18610
18610
  function Red(m) {
@@ -18884,75 +18884,9 @@ function crt$2(msg, priv2) {
18884
18884
  crt$2.getr = getr;
18885
18885
  var browserifyRsa = crt$2;
18886
18886
  var elliptic = {};
18887
- const name$1 = "elliptic";
18888
18887
  const version$2 = "6.5.7";
18889
- const description$1 = "EC cryptography";
18890
- const main$1 = "lib/elliptic.js";
18891
- const files = [
18892
- "lib"
18893
- ];
18894
- const scripts$1 = {
18895
- lint: "eslint lib test",
18896
- "lint:fix": "npm run lint -- --fix",
18897
- unit: "istanbul test _mocha --reporter=spec test/index.js",
18898
- test: "npm run lint && npm run unit",
18899
- version: "grunt dist && git add dist/"
18900
- };
18901
- const repository$1 = {
18902
- type: "git",
18903
- url: "git@github.com:indutny/elliptic"
18904
- };
18905
- const keywords$1 = [
18906
- "EC",
18907
- "Elliptic",
18908
- "curve",
18909
- "Cryptography"
18910
- ];
18911
- const author = "Fedor Indutny <fedor@indutny.com>";
18912
- const license$1 = "MIT";
18913
- const bugs = {
18914
- url: "https://github.com/indutny/elliptic/issues"
18915
- };
18916
- const homepage = "https://github.com/indutny/elliptic";
18917
- const devDependencies$1 = {
18918
- brfs: "^2.0.2",
18919
- coveralls: "^3.1.0",
18920
- eslint: "^7.6.0",
18921
- grunt: "^1.2.1",
18922
- "grunt-browserify": "^5.3.0",
18923
- "grunt-cli": "^1.3.2",
18924
- "grunt-contrib-connect": "^3.0.0",
18925
- "grunt-contrib-copy": "^1.0.0",
18926
- "grunt-contrib-uglify": "^5.0.0",
18927
- "grunt-mocha-istanbul": "^5.0.2",
18928
- "grunt-saucelabs": "^9.0.1",
18929
- istanbul: "^0.4.5",
18930
- mocha: "^8.0.1"
18931
- };
18932
- const dependencies = {
18933
- "bn.js": "^4.11.9",
18934
- brorand: "^1.1.0",
18935
- "hash.js": "^1.0.0",
18936
- "hmac-drbg": "^1.0.1",
18937
- inherits: "^2.0.4",
18938
- "minimalistic-assert": "^1.0.1",
18939
- "minimalistic-crypto-utils": "^1.0.1"
18940
- };
18941
18888
  const require$$0 = {
18942
- name: name$1,
18943
- version: version$2,
18944
- description: description$1,
18945
- main: main$1,
18946
- files,
18947
- scripts: scripts$1,
18948
- repository: repository$1,
18949
- keywords: keywords$1,
18950
- author,
18951
- license: license$1,
18952
- bugs,
18953
- homepage,
18954
- devDependencies: devDependencies$1,
18955
- dependencies
18889
+ version: version$2
18956
18890
  };
18957
18891
  var utils$l = {};
18958
18892
  var utils$k = {};
@@ -19095,9 +19029,9 @@ var utils$k = {};
19095
19029
  return jsf;
19096
19030
  }
19097
19031
  utils2.getJSF = getJSF2;
19098
- function cachedProperty2(obj, name2, computer) {
19099
- var key2 = "_" + name2;
19100
- obj.prototype[name2] = function cachedProperty3() {
19032
+ function cachedProperty2(obj, name, computer) {
19033
+ var key2 = "_" + name;
19034
+ obj.prototype[name] = function cachedProperty3() {
19101
19035
  return this[key2] !== void 0 ? this[key2] : this[key2] = computer.call(this);
19102
19036
  };
19103
19037
  }
@@ -22897,13 +22831,13 @@ function requireSecp256k1() {
22897
22831
  assert2(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O");
22898
22832
  }
22899
22833
  curves2.PresetCurve = PresetCurve;
22900
- function defineCurve(name2, options2) {
22901
- Object.defineProperty(curves2, name2, {
22834
+ function defineCurve(name, options2) {
22835
+ Object.defineProperty(curves2, name, {
22902
22836
  configurable: true,
22903
22837
  enumerable: true,
22904
22838
  get: function() {
22905
22839
  var curve2 = new PresetCurve(options2);
22906
- Object.defineProperty(curves2, name2, {
22840
+ Object.defineProperty(curves2, name, {
22907
22841
  configurable: true,
22908
22842
  enumerable: true,
22909
22843
  value: curve2
@@ -23727,7 +23661,7 @@ EDDSA.prototype.encodePoint = function encodePoint(point5) {
23727
23661
  EDDSA.prototype.decodePoint = function decodePoint3(bytes) {
23728
23662
  bytes = utils.parseBytes(bytes);
23729
23663
  var lastIx = bytes.length - 1;
23730
- var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);
23664
+ var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & -129);
23731
23665
  var xIsOdd = (bytes[lastIx] & 128) !== 0;
23732
23666
  var y = utils.intFromLE(normed);
23733
23667
  return this.curve.pointFromY(y, xIsOdd);
@@ -23790,8 +23724,8 @@ function requireVmBrowserify() {
23790
23724
  var defineProp = function() {
23791
23725
  try {
23792
23726
  Object.defineProperty({}, "_", {});
23793
- return function(obj, name2, value) {
23794
- Object.defineProperty(obj, name2, {
23727
+ return function(obj, name, value) {
23728
+ Object.defineProperty(obj, name, {
23795
23729
  writable: true,
23796
23730
  enumerable: false,
23797
23731
  configurable: true,
@@ -23799,8 +23733,8 @@ function requireVmBrowserify() {
23799
23733
  });
23800
23734
  };
23801
23735
  } catch (e) {
23802
- return function(obj, name2, value) {
23803
- obj[name2] = value;
23736
+ return function(obj, name, value) {
23737
+ obj[name] = value;
23804
23738
  };
23805
23739
  }
23806
23740
  }();
@@ -23894,10 +23828,10 @@ function requireVmBrowserify() {
23894
23828
  }
23895
23829
  return res;
23896
23830
  };
23897
- forEach(Object_keys(Script.prototype), function(name2) {
23898
- exports[name2] = Script[name2] = function(code) {
23831
+ forEach(Object_keys(Script.prototype), function(name) {
23832
+ exports[name] = Script[name] = function(code) {
23899
23833
  var s2 = Script(code);
23900
- return s2[name2].apply(s2, [].slice.call(arguments, 1));
23834
+ return s2[name].apply(s2, [].slice.call(arguments, 1));
23901
23835
  };
23902
23836
  });
23903
23837
  exports.isContext = function(context) {
@@ -23926,11 +23860,11 @@ function requireApi() {
23926
23860
  var asn12 = requireAsn1();
23927
23861
  var inherits2 = inherits_browserExports;
23928
23862
  var api2 = exports2;
23929
- api2.define = function define2(name2, body) {
23930
- return new Entity(name2, body);
23863
+ api2.define = function define2(name, body) {
23864
+ return new Entity(name, body);
23931
23865
  };
23932
- function Entity(name2, body) {
23933
- this.name = name2;
23866
+ function Entity(name, body) {
23867
+ this.name = name;
23934
23868
  this.body = body;
23935
23869
  this.decoders = {};
23936
23870
  this.encoders = {};
@@ -25590,7 +25524,7 @@ var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:2
25590
25524
  var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;
25591
25525
  var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m;
25592
25526
  var evp = evp_bytestokey;
25593
- var ciphers$1 = browser$6;
25527
+ var ciphers$1 = browser$5;
25594
25528
  var Buffer$6 = safeBufferExports$1.Buffer;
25595
25529
  var fixProc$1 = function(okey, password) {
25596
25530
  var key2 = okey.toString();
@@ -25619,8 +25553,8 @@ var fixProc$1 = function(okey, password) {
25619
25553
  var asn1 = asn1$3;
25620
25554
  var aesid = require$$1;
25621
25555
  var fixProc = fixProc$1;
25622
- var ciphers = browser$6;
25623
- var compat = browser$8;
25556
+ var ciphers = browser$5;
25557
+ var compat = browser$7;
25624
25558
  var Buffer$5 = safeBufferExports$1.Buffer;
25625
25559
  function decrypt$1(data, password) {
25626
25560
  var salt = data.algorithm.decrypt.kde.kdeparams.salt;
@@ -25732,7 +25666,7 @@ function requireSign() {
25732
25666
  if (hasRequiredSign) return sign.exports;
25733
25667
  hasRequiredSign = 1;
25734
25668
  var Buffer2 = safeBufferExports$1.Buffer;
25735
- var createHmac2 = browser$9;
25669
+ var createHmac2 = browser$8;
25736
25670
  var crt2 = browserifyRsa;
25737
25671
  var EC = requireElliptic().ec;
25738
25672
  var BN2 = bnExports;
@@ -25970,13 +25904,13 @@ function requireVerify() {
25970
25904
  verify_1 = verify4;
25971
25905
  return verify_1;
25972
25906
  }
25973
- var browser$4;
25907
+ var browser$3;
25974
25908
  var hasRequiredBrowser$1;
25975
25909
  function requireBrowser$1() {
25976
- if (hasRequiredBrowser$1) return browser$4;
25910
+ if (hasRequiredBrowser$1) return browser$3;
25977
25911
  hasRequiredBrowser$1 = 1;
25978
25912
  var Buffer2 = safeBufferExports$1.Buffer;
25979
- var createHash3 = browser$a;
25913
+ var createHash3 = browser$9;
25980
25914
  var stream = readableBrowserExports;
25981
25915
  var inherits2 = inherits_browserExports;
25982
25916
  var sign5 = requireSign();
@@ -26043,22 +25977,22 @@ function requireBrowser$1() {
26043
25977
  function createVerify(algorithm) {
26044
25978
  return new Verify(algorithm);
26045
25979
  }
26046
- browser$4 = {
25980
+ browser$3 = {
26047
25981
  Sign: createSign,
26048
25982
  Verify: createVerify,
26049
25983
  createSign,
26050
25984
  createVerify
26051
25985
  };
26052
- return browser$4;
25986
+ return browser$3;
26053
25987
  }
26054
- var browser$3;
25988
+ var browser$2;
26055
25989
  var hasRequiredBrowser;
26056
25990
  function requireBrowser() {
26057
- if (hasRequiredBrowser) return browser$3;
25991
+ if (hasRequiredBrowser) return browser$2;
26058
25992
  hasRequiredBrowser = 1;
26059
25993
  var elliptic2 = requireElliptic();
26060
25994
  var BN2 = bnExports$1;
26061
- browser$3 = function createECDH(curve2) {
25995
+ browser$2 = function createECDH(curve2) {
26062
25996
  return new ECDH(curve2);
26063
25997
  };
26064
25998
  var aliases = {
@@ -26168,10 +26102,10 @@ function requireBrowser() {
26168
26102
  return buf.toString(enc);
26169
26103
  }
26170
26104
  }
26171
- return browser$3;
26105
+ return browser$2;
26172
26106
  }
26173
- var browser$2 = {};
26174
- var createHash$2 = browser$a;
26107
+ var browser$1 = {};
26108
+ var createHash$2 = browser$9;
26175
26109
  var Buffer$4 = safeBufferExports$1.Buffer;
26176
26110
  var mgf$2 = function(seed, len) {
26177
26111
  var t = Buffer$4.alloc(0);
@@ -26204,7 +26138,7 @@ function withPublic$2(paddedMsg, key2) {
26204
26138
  var withPublic_1 = withPublic$2;
26205
26139
  var parseKeys$1 = parseAsn1;
26206
26140
  var randomBytes = browserExports;
26207
- var createHash$1 = browser$a;
26141
+ var createHash$1 = browser$9;
26208
26142
  var mgf$1 = mgf$2;
26209
26143
  var xor$1 = xor$2;
26210
26144
  var BN$1 = bnExports$1;
@@ -26293,7 +26227,7 @@ var mgf = mgf$2;
26293
26227
  var xor = xor$2;
26294
26228
  var BN = bnExports$1;
26295
26229
  var crt = browserifyRsa;
26296
- var createHash = browser$a;
26230
+ var createHash = browser$9;
26297
26231
  var withPublic = withPublic_1;
26298
26232
  var Buffer$1 = safeBufferExports$1.Buffer;
26299
26233
  var privateDecrypt = function privateDecrypt2(privateKey, enc, reverse) {
@@ -26397,8 +26331,8 @@ function compare(a, b) {
26397
26331
  exports2.publicDecrypt = function publicDecrypt(key2, buf) {
26398
26332
  return exports2.privateDecrypt(key2, buf, true);
26399
26333
  };
26400
- })(browser$2);
26401
- var browser$1 = {};
26334
+ })(browser$1);
26335
+ var browser = {};
26402
26336
  function oldBrowser() {
26403
26337
  throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11");
26404
26338
  }
@@ -26431,11 +26365,11 @@ function assertSize(size, offset, length) {
26431
26365
  }
26432
26366
  }
26433
26367
  if (crypto$1 && crypto$1.getRandomValues || !process$1.browser) {
26434
- browser$1.randomFill = randomFill;
26435
- browser$1.randomFillSync = randomFillSync;
26368
+ browser.randomFill = randomFill;
26369
+ browser.randomFillSync = randomFillSync;
26436
26370
  } else {
26437
- browser$1.randomFill = oldBrowser;
26438
- browser$1.randomFillSync = oldBrowser;
26371
+ browser.randomFill = oldBrowser;
26372
+ browser.randomFillSync = oldBrowser;
26439
26373
  }
26440
26374
  function randomFill(buf, offset, size, cb) {
26441
26375
  if (!Buffer.isBuffer(buf) && !(buf instanceof commonjsGlobal.Uint8Array)) {
@@ -26499,8 +26433,8 @@ function requireCryptoBrowserify() {
26499
26433
  if (hasRequiredCryptoBrowserify) return cryptoBrowserify;
26500
26434
  hasRequiredCryptoBrowserify = 1;
26501
26435
  cryptoBrowserify.randomBytes = cryptoBrowserify.rng = cryptoBrowserify.pseudoRandomBytes = cryptoBrowserify.prng = browserExports;
26502
- cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$a;
26503
- cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$9;
26436
+ cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$9;
26437
+ cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$8;
26504
26438
  var algos$1 = algos;
26505
26439
  var algoKeys = Object.keys(algos$1);
26506
26440
  var hashes = [
@@ -26515,10 +26449,10 @@ function requireCryptoBrowserify() {
26515
26449
  cryptoBrowserify.getHashes = function() {
26516
26450
  return hashes;
26517
26451
  };
26518
- var p = browser$8;
26452
+ var p = browser$7;
26519
26453
  cryptoBrowserify.pbkdf2 = p.pbkdf2;
26520
26454
  cryptoBrowserify.pbkdf2Sync = p.pbkdf2Sync;
26521
- var aes2 = browser$7;
26455
+ var aes2 = browser$6;
26522
26456
  cryptoBrowserify.Cipher = aes2.Cipher;
26523
26457
  cryptoBrowserify.createCipher = aes2.createCipher;
26524
26458
  cryptoBrowserify.Cipheriv = aes2.Cipheriv;
@@ -26541,12 +26475,12 @@ function requireCryptoBrowserify() {
26541
26475
  cryptoBrowserify.createVerify = sign5.createVerify;
26542
26476
  cryptoBrowserify.Verify = sign5.Verify;
26543
26477
  cryptoBrowserify.createECDH = requireBrowser();
26544
- var publicEncrypt3 = browser$2;
26478
+ var publicEncrypt3 = browser$1;
26545
26479
  cryptoBrowserify.publicEncrypt = publicEncrypt3.publicEncrypt;
26546
26480
  cryptoBrowserify.privateEncrypt = publicEncrypt3.privateEncrypt;
26547
26481
  cryptoBrowserify.publicDecrypt = publicEncrypt3.publicDecrypt;
26548
26482
  cryptoBrowserify.privateDecrypt = publicEncrypt3.privateDecrypt;
26549
- var rf = browser$1;
26483
+ var rf = browser;
26550
26484
  cryptoBrowserify.randomFill = rf.randomFill;
26551
26485
  cryptoBrowserify.randomFillSync = rf.randomFillSync;
26552
26486
  cryptoBrowserify.createCredentials = function() {
@@ -26571,89 +26505,13 @@ function requireCryptoBrowserify() {
26571
26505
  };
26572
26506
  return cryptoBrowserify;
26573
26507
  }
26574
- const name = "dotenv";
26575
26508
  const version$1 = "16.4.5";
26576
- const description = "Loads environment variables from .env file";
26577
- const main = "lib/main.js";
26578
- const types = "lib/main.d.ts";
26579
- const exports = {
26580
- ".": {
26581
- types: "./lib/main.d.ts",
26582
- require: "./lib/main.js",
26583
- "default": "./lib/main.js"
26584
- },
26585
- "./config": "./config.js",
26586
- "./config.js": "./config.js",
26587
- "./lib/env-options": "./lib/env-options.js",
26588
- "./lib/env-options.js": "./lib/env-options.js",
26589
- "./lib/cli-options": "./lib/cli-options.js",
26590
- "./lib/cli-options.js": "./lib/cli-options.js",
26591
- "./package.json": "./package.json"
26592
- };
26593
- const scripts = {
26594
- "dts-check": "tsc --project tests/types/tsconfig.json",
26595
- lint: "standard",
26596
- "lint-readme": "standard-markdown",
26597
- pretest: "npm run lint && npm run dts-check",
26598
- test: "tap tests/*.js --100 -Rspec",
26599
- "test:coverage": "tap --coverage-report=lcov",
26600
- prerelease: "npm test",
26601
- release: "standard-version"
26602
- };
26603
- const repository = {
26604
- type: "git",
26605
- url: "git://github.com/motdotla/dotenv.git"
26606
- };
26607
- const funding = "https://dotenvx.com";
26608
- const keywords = [
26609
- "dotenv",
26610
- "env",
26611
- ".env",
26612
- "environment",
26613
- "variables",
26614
- "config",
26615
- "settings"
26616
- ];
26617
- const readmeFilename = "README.md";
26618
- const license = "BSD-2-Clause";
26619
- const devDependencies = {
26620
- "@definitelytyped/dtslint": "^0.0.133",
26621
- "@types/node": "^18.11.3",
26622
- decache: "^4.6.1",
26623
- sinon: "^14.0.1",
26624
- standard: "^17.0.0",
26625
- "standard-markdown": "^7.1.0",
26626
- "standard-version": "^9.5.0",
26627
- tap: "^16.3.0",
26628
- tar: "^6.1.11",
26629
- typescript: "^4.8.4"
26630
- };
26631
- const engines = {
26632
- node: ">=12"
26633
- };
26634
- const browser = {
26635
- fs: false
26636
- };
26637
26509
  const require$$4 = {
26638
- name,
26639
- version: version$1,
26640
- description,
26641
- main,
26642
- types,
26643
- exports,
26644
- scripts,
26645
- repository,
26646
- funding,
26647
- keywords,
26648
- readmeFilename,
26649
- license,
26650
- devDependencies,
26651
- engines,
26652
- browser
26510
+ version: version$1
26653
26511
  };
26654
26512
  const fs = empty_1;
26655
26513
  const path = pathBrowserify;
26656
- const os = browser$d;
26514
+ const os = browser$c;
26657
26515
  const crypto = requireCryptoBrowserify();
26658
26516
  const packageJson = require$$4;
26659
26517
  const version = packageJson.version;
@@ -26904,15 +26762,15 @@ const DotenvModule = {
26904
26762
  parse: parse$1,
26905
26763
  populate
26906
26764
  };
26907
- main$2.exports.configDotenv = DotenvModule.configDotenv;
26908
- main$2.exports._configVault = DotenvModule._configVault;
26909
- main$2.exports._parseVault = DotenvModule._parseVault;
26910
- main$2.exports.config = DotenvModule.config;
26911
- main$2.exports.decrypt = DotenvModule.decrypt;
26912
- main$2.exports.parse = DotenvModule.parse;
26913
- main$2.exports.populate = DotenvModule.populate;
26914
- main$2.exports = DotenvModule;
26915
- 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;
26916
26774
  const options = {};
26917
26775
  if (process$1.env.DOTENV_CONFIG_ENCODING != null) {
26918
26776
  options.encoding = process$1.env.DOTENV_CONFIG_ENCODING;
@@ -31990,6 +31848,13 @@ const createWriter = ({
31990
31848
  args: paramsToArray({ params: options2.args, abiFunction: fn }),
31991
31849
  account: walletClient.account
31992
31850
  });
31851
+ const getTransactionData = (params) => {
31852
+ return encodeFunctionData({
31853
+ abi,
31854
+ functionName: fn.name,
31855
+ args: paramsToArray({ params, abiFunction: fn })
31856
+ });
31857
+ };
31993
31858
  const func = async (options2) => {
31994
31859
  const { request } = await simulate(options2);
31995
31860
  const hash3 = await walletClient.writeContract(request);
@@ -32026,6 +31891,7 @@ const createWriter = ({
32026
31891
  };
32027
31892
  };
32028
31893
  func.simulate = simulate;
31894
+ func.getTransactionData = getTransactionData;
32029
31895
  return [fn.name, func];
32030
31896
  })
32031
31897
  );
@@ -32106,9 +31972,9 @@ const HeadersInitToPlainObject = (headers) => {
32106
31972
  if (headers instanceof Headers) {
32107
31973
  oHeaders = HeadersInstanceToPlainObject(headers);
32108
31974
  } else if (Array.isArray(headers)) {
32109
- headers.forEach(([name2, value]) => {
32110
- if (name2 && value !== void 0) {
32111
- oHeaders[name2] = value;
31975
+ headers.forEach(([name, value]) => {
31976
+ if (name && value !== void 0) {
31977
+ oHeaders[name] = value;
32112
31978
  }
32113
31979
  });
32114
31980
  } else if (headers) {
@@ -32391,8 +32257,8 @@ class GraphQLError extends Error {
32391
32257
  function undefinedIfEmpty(array) {
32392
32258
  return array === void 0 || array.length === 0 ? void 0 : array;
32393
32259
  }
32394
- function syntaxError(source, position, description2) {
32395
- return new GraphQLError(`Syntax Error: ${description2}`, {
32260
+ function syntaxError(source, position, description) {
32261
+ return new GraphQLError(`Syntax Error: ${description}`, {
32396
32262
  source,
32397
32263
  positions: [position]
32398
32264
  });
@@ -33301,9 +33167,9 @@ function formatArray(array, seenValues) {
33301
33167
  function getObjectTag(object) {
33302
33168
  const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
33303
33169
  if (tag === "Object" && typeof object.constructor === "function") {
33304
- const name2 = object.constructor.name;
33305
- if (typeof name2 === "string" && name2 !== "") {
33306
- return name2;
33170
+ const name = object.constructor.name;
33171
+ if (typeof name === "string" && name !== "") {
33172
+ return name;
33307
33173
  }
33308
33174
  }
33309
33175
  return tag;
@@ -33346,13 +33212,13 @@ spurious results.`);
33346
33212
  }
33347
33213
  );
33348
33214
  class Source {
33349
- constructor(body, name2 = "GraphQL request", locationOffset = {
33215
+ constructor(body, name = "GraphQL request", locationOffset = {
33350
33216
  line: 1,
33351
33217
  column: 1
33352
33218
  }) {
33353
33219
  typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);
33354
33220
  this.body = body;
33355
- this.name = name2;
33221
+ this.name = name;
33356
33222
  this.locationOffset = locationOffset;
33357
33223
  this.locationOffset.line > 0 || devAssert(
33358
33224
  false,
@@ -33492,14 +33358,14 @@ class Parser {
33492
33358
  });
33493
33359
  }
33494
33360
  const operation = this.parseOperationType();
33495
- let name2;
33361
+ let name;
33496
33362
  if (this.peek(TokenKind.NAME)) {
33497
- name2 = this.parseName();
33363
+ name = this.parseName();
33498
33364
  }
33499
33365
  return this.node(start, {
33500
33366
  kind: Kind.OPERATION_DEFINITION,
33501
33367
  operation,
33502
- name: name2,
33368
+ name,
33503
33369
  variableDefinitions: this.parseVariableDefinitions(),
33504
33370
  directives: this.parseDirectives(false),
33505
33371
  selectionSet: this.parseSelectionSet()
@@ -33586,17 +33452,17 @@ class Parser {
33586
33452
  const start = this._lexer.token;
33587
33453
  const nameOrAlias = this.parseName();
33588
33454
  let alias;
33589
- let name2;
33455
+ let name;
33590
33456
  if (this.expectOptionalToken(TokenKind.COLON)) {
33591
33457
  alias = nameOrAlias;
33592
- name2 = this.parseName();
33458
+ name = this.parseName();
33593
33459
  } else {
33594
- name2 = nameOrAlias;
33460
+ name = nameOrAlias;
33595
33461
  }
33596
33462
  return this.node(start, {
33597
33463
  kind: Kind.FIELD,
33598
33464
  alias,
33599
- name: name2,
33465
+ name,
33600
33466
  arguments: this.parseArguments(false),
33601
33467
  directives: this.parseDirectives(false),
33602
33468
  selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -33614,11 +33480,11 @@ class Parser {
33614
33480
  */
33615
33481
  parseArgument(isConst = false) {
33616
33482
  const start = this._lexer.token;
33617
- const name2 = this.parseName();
33483
+ const name = this.parseName();
33618
33484
  this.expectToken(TokenKind.COLON);
33619
33485
  return this.node(start, {
33620
33486
  kind: Kind.ARGUMENT,
33621
- name: name2,
33487
+ name,
33622
33488
  value: this.parseValueLiteral(isConst)
33623
33489
  });
33624
33490
  }
@@ -33813,11 +33679,11 @@ class Parser {
33813
33679
  */
33814
33680
  parseObjectField(isConst) {
33815
33681
  const start = this._lexer.token;
33816
- const name2 = this.parseName();
33682
+ const name = this.parseName();
33817
33683
  this.expectToken(TokenKind.COLON);
33818
33684
  return this.node(start, {
33819
33685
  kind: Kind.OBJECT_FIELD,
33820
- name: name2,
33686
+ name,
33821
33687
  value: this.parseValueLiteral(isConst)
33822
33688
  });
33823
33689
  }
@@ -33905,7 +33771,7 @@ class Parser {
33905
33771
  */
33906
33772
  parseSchemaDefinition() {
33907
33773
  const start = this._lexer.token;
33908
- const description2 = this.parseDescription();
33774
+ const description = this.parseDescription();
33909
33775
  this.expectKeyword("schema");
33910
33776
  const directives = this.parseConstDirectives();
33911
33777
  const operationTypes = this.many(
@@ -33915,7 +33781,7 @@ class Parser {
33915
33781
  );
33916
33782
  return this.node(start, {
33917
33783
  kind: Kind.SCHEMA_DEFINITION,
33918
- description: description2,
33784
+ description,
33919
33785
  directives,
33920
33786
  operationTypes
33921
33787
  });
@@ -33939,14 +33805,14 @@ class Parser {
33939
33805
  */
33940
33806
  parseScalarTypeDefinition() {
33941
33807
  const start = this._lexer.token;
33942
- const description2 = this.parseDescription();
33808
+ const description = this.parseDescription();
33943
33809
  this.expectKeyword("scalar");
33944
- const name2 = this.parseName();
33810
+ const name = this.parseName();
33945
33811
  const directives = this.parseConstDirectives();
33946
33812
  return this.node(start, {
33947
33813
  kind: Kind.SCALAR_TYPE_DEFINITION,
33948
- description: description2,
33949
- name: name2,
33814
+ description,
33815
+ name,
33950
33816
  directives
33951
33817
  });
33952
33818
  }
@@ -33957,16 +33823,16 @@ class Parser {
33957
33823
  */
33958
33824
  parseObjectTypeDefinition() {
33959
33825
  const start = this._lexer.token;
33960
- const description2 = this.parseDescription();
33826
+ const description = this.parseDescription();
33961
33827
  this.expectKeyword("type");
33962
- const name2 = this.parseName();
33828
+ const name = this.parseName();
33963
33829
  const interfaces = this.parseImplementsInterfaces();
33964
33830
  const directives = this.parseConstDirectives();
33965
33831
  const fields = this.parseFieldsDefinition();
33966
33832
  return this.node(start, {
33967
33833
  kind: Kind.OBJECT_TYPE_DEFINITION,
33968
- description: description2,
33969
- name: name2,
33834
+ description,
33835
+ name,
33970
33836
  interfaces,
33971
33837
  directives,
33972
33838
  fields
@@ -33998,16 +33864,16 @@ class Parser {
33998
33864
  */
33999
33865
  parseFieldDefinition() {
34000
33866
  const start = this._lexer.token;
34001
- const description2 = this.parseDescription();
34002
- const name2 = this.parseName();
33867
+ const description = this.parseDescription();
33868
+ const name = this.parseName();
34003
33869
  const args = this.parseArgumentDefs();
34004
33870
  this.expectToken(TokenKind.COLON);
34005
33871
  const type2 = this.parseTypeReference();
34006
33872
  const directives = this.parseConstDirectives();
34007
33873
  return this.node(start, {
34008
33874
  kind: Kind.FIELD_DEFINITION,
34009
- description: description2,
34010
- name: name2,
33875
+ description,
33876
+ name,
34011
33877
  arguments: args,
34012
33878
  type: type2,
34013
33879
  directives
@@ -34029,8 +33895,8 @@ class Parser {
34029
33895
  */
34030
33896
  parseInputValueDef() {
34031
33897
  const start = this._lexer.token;
34032
- const description2 = this.parseDescription();
34033
- const name2 = this.parseName();
33898
+ const description = this.parseDescription();
33899
+ const name = this.parseName();
34034
33900
  this.expectToken(TokenKind.COLON);
34035
33901
  const type2 = this.parseTypeReference();
34036
33902
  let defaultValue;
@@ -34040,8 +33906,8 @@ class Parser {
34040
33906
  const directives = this.parseConstDirectives();
34041
33907
  return this.node(start, {
34042
33908
  kind: Kind.INPUT_VALUE_DEFINITION,
34043
- description: description2,
34044
- name: name2,
33909
+ description,
33910
+ name,
34045
33911
  type: type2,
34046
33912
  defaultValue,
34047
33913
  directives
@@ -34053,16 +33919,16 @@ class Parser {
34053
33919
  */
34054
33920
  parseInterfaceTypeDefinition() {
34055
33921
  const start = this._lexer.token;
34056
- const description2 = this.parseDescription();
33922
+ const description = this.parseDescription();
34057
33923
  this.expectKeyword("interface");
34058
- const name2 = this.parseName();
33924
+ const name = this.parseName();
34059
33925
  const interfaces = this.parseImplementsInterfaces();
34060
33926
  const directives = this.parseConstDirectives();
34061
33927
  const fields = this.parseFieldsDefinition();
34062
33928
  return this.node(start, {
34063
33929
  kind: Kind.INTERFACE_TYPE_DEFINITION,
34064
- description: description2,
34065
- name: name2,
33930
+ description,
33931
+ name,
34066
33932
  interfaces,
34067
33933
  directives,
34068
33934
  fields
@@ -34074,15 +33940,15 @@ class Parser {
34074
33940
  */
34075
33941
  parseUnionTypeDefinition() {
34076
33942
  const start = this._lexer.token;
34077
- const description2 = this.parseDescription();
33943
+ const description = this.parseDescription();
34078
33944
  this.expectKeyword("union");
34079
- const name2 = this.parseName();
33945
+ const name = this.parseName();
34080
33946
  const directives = this.parseConstDirectives();
34081
33947
  const types2 = this.parseUnionMemberTypes();
34082
33948
  return this.node(start, {
34083
33949
  kind: Kind.UNION_TYPE_DEFINITION,
34084
- description: description2,
34085
- name: name2,
33950
+ description,
33951
+ name,
34086
33952
  directives,
34087
33953
  types: types2
34088
33954
  });
@@ -34101,15 +33967,15 @@ class Parser {
34101
33967
  */
34102
33968
  parseEnumTypeDefinition() {
34103
33969
  const start = this._lexer.token;
34104
- const description2 = this.parseDescription();
33970
+ const description = this.parseDescription();
34105
33971
  this.expectKeyword("enum");
34106
- const name2 = this.parseName();
33972
+ const name = this.parseName();
34107
33973
  const directives = this.parseConstDirectives();
34108
33974
  const values = this.parseEnumValuesDefinition();
34109
33975
  return this.node(start, {
34110
33976
  kind: Kind.ENUM_TYPE_DEFINITION,
34111
- description: description2,
34112
- name: name2,
33977
+ description,
33978
+ name,
34113
33979
  directives,
34114
33980
  values
34115
33981
  });
@@ -34131,13 +33997,13 @@ class Parser {
34131
33997
  */
34132
33998
  parseEnumValueDefinition() {
34133
33999
  const start = this._lexer.token;
34134
- const description2 = this.parseDescription();
34135
- const name2 = this.parseEnumValueName();
34000
+ const description = this.parseDescription();
34001
+ const name = this.parseEnumValueName();
34136
34002
  const directives = this.parseConstDirectives();
34137
34003
  return this.node(start, {
34138
34004
  kind: Kind.ENUM_VALUE_DEFINITION,
34139
- description: description2,
34140
- name: name2,
34005
+ description,
34006
+ name,
34141
34007
  directives
34142
34008
  });
34143
34009
  }
@@ -34162,15 +34028,15 @@ class Parser {
34162
34028
  */
34163
34029
  parseInputObjectTypeDefinition() {
34164
34030
  const start = this._lexer.token;
34165
- const description2 = this.parseDescription();
34031
+ const description = this.parseDescription();
34166
34032
  this.expectKeyword("input");
34167
- const name2 = this.parseName();
34033
+ const name = this.parseName();
34168
34034
  const directives = this.parseConstDirectives();
34169
34035
  const fields = this.parseInputFieldsDefinition();
34170
34036
  return this.node(start, {
34171
34037
  kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
34172
- description: description2,
34173
- name: name2,
34038
+ description,
34039
+ name,
34174
34040
  directives,
34175
34041
  fields
34176
34042
  });
@@ -34256,14 +34122,14 @@ class Parser {
34256
34122
  const start = this._lexer.token;
34257
34123
  this.expectKeyword("extend");
34258
34124
  this.expectKeyword("scalar");
34259
- const name2 = this.parseName();
34125
+ const name = this.parseName();
34260
34126
  const directives = this.parseConstDirectives();
34261
34127
  if (directives.length === 0) {
34262
34128
  throw this.unexpected();
34263
34129
  }
34264
34130
  return this.node(start, {
34265
34131
  kind: Kind.SCALAR_TYPE_EXTENSION,
34266
- name: name2,
34132
+ name,
34267
34133
  directives
34268
34134
  });
34269
34135
  }
@@ -34277,7 +34143,7 @@ class Parser {
34277
34143
  const start = this._lexer.token;
34278
34144
  this.expectKeyword("extend");
34279
34145
  this.expectKeyword("type");
34280
- const name2 = this.parseName();
34146
+ const name = this.parseName();
34281
34147
  const interfaces = this.parseImplementsInterfaces();
34282
34148
  const directives = this.parseConstDirectives();
34283
34149
  const fields = this.parseFieldsDefinition();
@@ -34286,7 +34152,7 @@ class Parser {
34286
34152
  }
34287
34153
  return this.node(start, {
34288
34154
  kind: Kind.OBJECT_TYPE_EXTENSION,
34289
- name: name2,
34155
+ name,
34290
34156
  interfaces,
34291
34157
  directives,
34292
34158
  fields
@@ -34302,7 +34168,7 @@ class Parser {
34302
34168
  const start = this._lexer.token;
34303
34169
  this.expectKeyword("extend");
34304
34170
  this.expectKeyword("interface");
34305
- const name2 = this.parseName();
34171
+ const name = this.parseName();
34306
34172
  const interfaces = this.parseImplementsInterfaces();
34307
34173
  const directives = this.parseConstDirectives();
34308
34174
  const fields = this.parseFieldsDefinition();
@@ -34311,7 +34177,7 @@ class Parser {
34311
34177
  }
34312
34178
  return this.node(start, {
34313
34179
  kind: Kind.INTERFACE_TYPE_EXTENSION,
34314
- name: name2,
34180
+ name,
34315
34181
  interfaces,
34316
34182
  directives,
34317
34183
  fields
@@ -34326,7 +34192,7 @@ class Parser {
34326
34192
  const start = this._lexer.token;
34327
34193
  this.expectKeyword("extend");
34328
34194
  this.expectKeyword("union");
34329
- const name2 = this.parseName();
34195
+ const name = this.parseName();
34330
34196
  const directives = this.parseConstDirectives();
34331
34197
  const types2 = this.parseUnionMemberTypes();
34332
34198
  if (directives.length === 0 && types2.length === 0) {
@@ -34334,7 +34200,7 @@ class Parser {
34334
34200
  }
34335
34201
  return this.node(start, {
34336
34202
  kind: Kind.UNION_TYPE_EXTENSION,
34337
- name: name2,
34203
+ name,
34338
34204
  directives,
34339
34205
  types: types2
34340
34206
  });
@@ -34348,7 +34214,7 @@ class Parser {
34348
34214
  const start = this._lexer.token;
34349
34215
  this.expectKeyword("extend");
34350
34216
  this.expectKeyword("enum");
34351
- const name2 = this.parseName();
34217
+ const name = this.parseName();
34352
34218
  const directives = this.parseConstDirectives();
34353
34219
  const values = this.parseEnumValuesDefinition();
34354
34220
  if (directives.length === 0 && values.length === 0) {
@@ -34356,7 +34222,7 @@ class Parser {
34356
34222
  }
34357
34223
  return this.node(start, {
34358
34224
  kind: Kind.ENUM_TYPE_EXTENSION,
34359
- name: name2,
34225
+ name,
34360
34226
  directives,
34361
34227
  values
34362
34228
  });
@@ -34370,7 +34236,7 @@ class Parser {
34370
34236
  const start = this._lexer.token;
34371
34237
  this.expectKeyword("extend");
34372
34238
  this.expectKeyword("input");
34373
- const name2 = this.parseName();
34239
+ const name = this.parseName();
34374
34240
  const directives = this.parseConstDirectives();
34375
34241
  const fields = this.parseInputFieldsDefinition();
34376
34242
  if (directives.length === 0 && fields.length === 0) {
@@ -34378,7 +34244,7 @@ class Parser {
34378
34244
  }
34379
34245
  return this.node(start, {
34380
34246
  kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
34381
- name: name2,
34247
+ name,
34382
34248
  directives,
34383
34249
  fields
34384
34250
  });
@@ -34391,18 +34257,18 @@ class Parser {
34391
34257
  */
34392
34258
  parseDirectiveDefinition() {
34393
34259
  const start = this._lexer.token;
34394
- const description2 = this.parseDescription();
34260
+ const description = this.parseDescription();
34395
34261
  this.expectKeyword("directive");
34396
34262
  this.expectToken(TokenKind.AT);
34397
- const name2 = this.parseName();
34263
+ const name = this.parseName();
34398
34264
  const args = this.parseArgumentDefs();
34399
34265
  const repeatable = this.expectOptionalKeyword("repeatable");
34400
34266
  this.expectKeyword("on");
34401
34267
  const locations = this.parseDirectiveLocations();
34402
34268
  return this.node(start, {
34403
34269
  kind: Kind.DIRECTIVE_DEFINITION,
34404
- description: description2,
34405
- name: name2,
34270
+ description,
34271
+ name,
34406
34272
  arguments: args,
34407
34273
  repeatable,
34408
34274
  locations
@@ -34445,9 +34311,9 @@ class Parser {
34445
34311
  */
34446
34312
  parseDirectiveLocation() {
34447
34313
  const start = this._lexer.token;
34448
- const name2 = this.parseName();
34449
- if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name2.value)) {
34450
- return name2;
34314
+ const name = this.parseName();
34315
+ if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {
34316
+ return name;
34451
34317
  }
34452
34318
  throw this.unexpected(start);
34453
34319
  }
@@ -34957,8 +34823,8 @@ const printDocASTReducer = {
34957
34823
  leave: ({ selections }) => block(selections)
34958
34824
  },
34959
34825
  Field: {
34960
- leave({ alias, name: name2, arguments: args, directives, selectionSet }) {
34961
- const prefix = wrap("", alias, ": ") + name2;
34826
+ leave({ alias, name, arguments: args, directives, selectionSet }) {
34827
+ const prefix = wrap("", alias, ": ") + name;
34962
34828
  let argsLine = prefix + wrap("(", join(args, ", "), ")");
34963
34829
  if (argsLine.length > MAX_LINE_LENGTH) {
34964
34830
  argsLine = prefix + wrap("(\n", indent(join(args, "\n")), "\n)");
@@ -34967,11 +34833,11 @@ const printDocASTReducer = {
34967
34833
  }
34968
34834
  },
34969
34835
  Argument: {
34970
- leave: ({ name: name2, value }) => name2 + ": " + value
34836
+ leave: ({ name, value }) => name + ": " + value
34971
34837
  },
34972
34838
  // Fragments
34973
34839
  FragmentSpread: {
34974
- leave: ({ name: name2, directives }) => "..." + name2 + wrap(" ", join(directives, " "))
34840
+ leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
34975
34841
  },
34976
34842
  InlineFragment: {
34977
34843
  leave: ({ typeCondition, directives, selectionSet }) => join(
@@ -34985,9 +34851,9 @@ const printDocASTReducer = {
34985
34851
  )
34986
34852
  },
34987
34853
  FragmentDefinition: {
34988
- leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => (
34854
+ leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => (
34989
34855
  // or removed in the future.
34990
- `fragment ${name2}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
34856
+ `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
34991
34857
  )
34992
34858
  },
34993
34859
  // Value
@@ -35016,15 +34882,15 @@ const printDocASTReducer = {
35016
34882
  leave: ({ fields }) => "{" + join(fields, ", ") + "}"
35017
34883
  },
35018
34884
  ObjectField: {
35019
- leave: ({ name: name2, value }) => name2 + ": " + value
34885
+ leave: ({ name, value }) => name + ": " + value
35020
34886
  },
35021
34887
  // Directive
35022
34888
  Directive: {
35023
- leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap("(", join(args, ", "), ")")
34889
+ leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
35024
34890
  },
35025
34891
  // Type
35026
34892
  NamedType: {
35027
- leave: ({ name: name2 }) => name2
34893
+ leave: ({ name }) => name
35028
34894
  },
35029
34895
  ListType: {
35030
34896
  leave: ({ type: type2 }) => "[" + type2 + "]"
@@ -35034,19 +34900,19 @@ const printDocASTReducer = {
35034
34900
  },
35035
34901
  // Type System Definitions
35036
34902
  SchemaDefinition: {
35037
- 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)], " ")
35038
34904
  },
35039
34905
  OperationTypeDefinition: {
35040
34906
  leave: ({ operation, type: type2 }) => operation + ": " + type2
35041
34907
  },
35042
34908
  ScalarTypeDefinition: {
35043
- 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, " ")], " ")
35044
34910
  },
35045
34911
  ObjectTypeDefinition: {
35046
- leave: ({ description: description2, name: name2, interfaces, directives, fields }) => wrap("", description2, "\n") + join(
34912
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
35047
34913
  [
35048
34914
  "type",
35049
- name2,
34915
+ name,
35050
34916
  wrap("implements ", join(interfaces, " & ")),
35051
34917
  join(directives, " "),
35052
34918
  block(fields)
@@ -35055,19 +34921,19 @@ const printDocASTReducer = {
35055
34921
  )
35056
34922
  },
35057
34923
  FieldDefinition: {
35058
- 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, " "))
35059
34925
  },
35060
34926
  InputValueDefinition: {
35061
- leave: ({ description: description2, name: name2, type: type2, defaultValue, directives }) => wrap("", description2, "\n") + join(
35062
- [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, " ")],
35063
34929
  " "
35064
34930
  )
35065
34931
  },
35066
34932
  InterfaceTypeDefinition: {
35067
- leave: ({ description: description2, name: name2, interfaces, directives, fields }) => wrap("", description2, "\n") + join(
34933
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
35068
34934
  [
35069
34935
  "interface",
35070
- name2,
34936
+ name,
35071
34937
  wrap("implements ", join(interfaces, " & ")),
35072
34938
  join(directives, " "),
35073
34939
  block(fields)
@@ -35076,22 +34942,22 @@ const printDocASTReducer = {
35076
34942
  )
35077
34943
  },
35078
34944
  UnionTypeDefinition: {
35079
- leave: ({ description: description2, name: name2, directives, types: types2 }) => wrap("", description2, "\n") + join(
35080
- ["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, " | "))],
35081
34947
  " "
35082
34948
  )
35083
34949
  },
35084
34950
  EnumTypeDefinition: {
35085
- 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)], " ")
35086
34952
  },
35087
34953
  EnumValueDefinition: {
35088
- 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, " ")], " ")
35089
34955
  },
35090
34956
  InputObjectTypeDefinition: {
35091
- 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)], " ")
35092
34958
  },
35093
34959
  DirectiveDefinition: {
35094
- 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, " | ")
35095
34961
  },
35096
34962
  SchemaExtension: {
35097
34963
  leave: ({ directives, operationTypes }) => join(
@@ -35100,13 +34966,13 @@ const printDocASTReducer = {
35100
34966
  )
35101
34967
  },
35102
34968
  ScalarTypeExtension: {
35103
- leave: ({ name: name2, directives }) => join(["extend scalar", name2, join(directives, " ")], " ")
34969
+ leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
35104
34970
  },
35105
34971
  ObjectTypeExtension: {
35106
- leave: ({ name: name2, interfaces, directives, fields }) => join(
34972
+ leave: ({ name, interfaces, directives, fields }) => join(
35107
34973
  [
35108
34974
  "extend type",
35109
- name2,
34975
+ name,
35110
34976
  wrap("implements ", join(interfaces, " & ")),
35111
34977
  join(directives, " "),
35112
34978
  block(fields)
@@ -35115,10 +34981,10 @@ const printDocASTReducer = {
35115
34981
  )
35116
34982
  },
35117
34983
  InterfaceTypeExtension: {
35118
- leave: ({ name: name2, interfaces, directives, fields }) => join(
34984
+ leave: ({ name, interfaces, directives, fields }) => join(
35119
34985
  [
35120
34986
  "extend interface",
35121
- name2,
34987
+ name,
35122
34988
  wrap("implements ", join(interfaces, " & ")),
35123
34989
  join(directives, " "),
35124
34990
  block(fields)
@@ -35127,10 +34993,10 @@ const printDocASTReducer = {
35127
34993
  )
35128
34994
  },
35129
34995
  UnionTypeExtension: {
35130
- leave: ({ name: name2, directives, types: types2 }) => join(
34996
+ leave: ({ name, directives, types: types2 }) => join(
35131
34997
  [
35132
34998
  "extend union",
35133
- name2,
34999
+ name,
35134
35000
  join(directives, " "),
35135
35001
  wrap("= ", join(types2, " | "))
35136
35002
  ],
@@ -35138,10 +35004,10 @@ const printDocASTReducer = {
35138
35004
  )
35139
35005
  },
35140
35006
  EnumTypeExtension: {
35141
- 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)], " ")
35142
35008
  },
35143
35009
  InputObjectTypeExtension: {
35144
- 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)], " ")
35145
35011
  }
35146
35012
  };
35147
35013
  function join(maybeArray, separator = "") {
@@ -35354,8 +35220,8 @@ const createFetcher = (method) => async (params) => {
35354
35220
  initResolved = initNew;
35355
35221
  }
35356
35222
  if (searchParams) {
35357
- searchParams.forEach((value, name2) => {
35358
- url.searchParams.append(name2, value);
35223
+ searchParams.forEach((value, name) => {
35224
+ url.searchParams.append(name, value);
35359
35225
  });
35360
35226
  }
35361
35227
  const $fetch = params.fetch ?? fetch;
@@ -35635,7 +35501,6 @@ const createConfig = (props) => {
35635
35501
  };
35636
35502
  const deposit = async (config2, { args: { id, amount }, ...writeOptions }, options2 = {}) => {
35637
35503
  const cluster = await config2.api.getCluster({ id });
35638
- console.log("cluster:", cluster);
35639
35504
  if (!cluster) {
35640
35505
  throw new Error("Cluster not found");
35641
35506
  }
@@ -35731,18 +35596,16 @@ const registerValidators = async (config2, { args: { keyshares, depositAmount =
35731
35596
  });
35732
35597
  const snapshot = cluster ? getClusterSnapshot$1(cluster) : createEmptyCluster();
35733
35598
  if (shares.length === 1) {
35734
- return config2.contract.ssv.write.registerValidator(
35735
- {
35736
- args: {
35737
- amount: depositAmount,
35738
- cluster: snapshot,
35739
- operatorIds: operatorIds.map(BigInt),
35740
- publicKey: shares[0].publicKey,
35741
- sharesData: shares[0].sharesData
35742
- },
35743
- ...writeOptions
35744
- }
35745
- );
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
+ });
35746
35609
  }
35747
35610
  return config2.contract.ssv.write.bulkRegisterValidator({
35748
35611
  args: {
@@ -35755,6 +35618,43 @@ const registerValidators = async (config2, { args: { keyshares, depositAmount =
35755
35618
  ...writeOptions
35756
35619
  });
35757
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
+ };
35758
35658
  const ssvKeys$1 = new SSVKeys();
35759
35659
  const validateSharesPostRegistration = async (config2, args) => {
35760
35660
  const receipt = await config2.publicClient.waitForTransactionReceipt({
@@ -35860,6 +35760,7 @@ const createClusterManager = (config2) => ({
35860
35760
  setFeeRecipient: setFeeRecipient.bind(null, config2),
35861
35761
  exitValidators: exitValidators.bind(null, config2),
35862
35762
  registerValidators: registerValidators.bind(null, config2),
35763
+ registerValidatorsRawData: registerValidatorsRawData.bind(null, config2),
35863
35764
  validateSharesPostRegistration: validateSharesPostRegistration.bind(
35864
35765
  null,
35865
35766
  config2