@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.
@@ -1,5 +1,167 @@
1
1
  "use strict";
2
2
  const viem = require("viem");
3
+ function getDefaultExportFromCjs(x) {
4
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
+ }
6
+ var browser = { exports: {} };
7
+ var process = browser.exports = {};
8
+ var cachedSetTimeout;
9
+ var cachedClearTimeout;
10
+ function defaultSetTimout() {
11
+ throw new Error("setTimeout has not been defined");
12
+ }
13
+ function defaultClearTimeout() {
14
+ throw new Error("clearTimeout has not been defined");
15
+ }
16
+ (function() {
17
+ try {
18
+ if (typeof setTimeout === "function") {
19
+ cachedSetTimeout = setTimeout;
20
+ } else {
21
+ cachedSetTimeout = defaultSetTimout;
22
+ }
23
+ } catch (e) {
24
+ cachedSetTimeout = defaultSetTimout;
25
+ }
26
+ try {
27
+ if (typeof clearTimeout === "function") {
28
+ cachedClearTimeout = clearTimeout;
29
+ } else {
30
+ cachedClearTimeout = defaultClearTimeout;
31
+ }
32
+ } catch (e) {
33
+ cachedClearTimeout = defaultClearTimeout;
34
+ }
35
+ })();
36
+ function runTimeout(fun) {
37
+ if (cachedSetTimeout === setTimeout) {
38
+ return setTimeout(fun, 0);
39
+ }
40
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
41
+ cachedSetTimeout = setTimeout;
42
+ return setTimeout(fun, 0);
43
+ }
44
+ try {
45
+ return cachedSetTimeout(fun, 0);
46
+ } catch (e) {
47
+ try {
48
+ return cachedSetTimeout.call(null, fun, 0);
49
+ } catch (e2) {
50
+ return cachedSetTimeout.call(this, fun, 0);
51
+ }
52
+ }
53
+ }
54
+ function runClearTimeout(marker) {
55
+ if (cachedClearTimeout === clearTimeout) {
56
+ return clearTimeout(marker);
57
+ }
58
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
59
+ cachedClearTimeout = clearTimeout;
60
+ return clearTimeout(marker);
61
+ }
62
+ try {
63
+ return cachedClearTimeout(marker);
64
+ } catch (e) {
65
+ try {
66
+ return cachedClearTimeout.call(null, marker);
67
+ } catch (e2) {
68
+ return cachedClearTimeout.call(this, marker);
69
+ }
70
+ }
71
+ }
72
+ var queue = [];
73
+ var draining = false;
74
+ var currentQueue;
75
+ var queueIndex = -1;
76
+ function cleanUpNextTick() {
77
+ if (!draining || !currentQueue) {
78
+ return;
79
+ }
80
+ draining = false;
81
+ if (currentQueue.length) {
82
+ queue = currentQueue.concat(queue);
83
+ } else {
84
+ queueIndex = -1;
85
+ }
86
+ if (queue.length) {
87
+ drainQueue();
88
+ }
89
+ }
90
+ function drainQueue() {
91
+ if (draining) {
92
+ return;
93
+ }
94
+ var timeout = runTimeout(cleanUpNextTick);
95
+ draining = true;
96
+ var len = queue.length;
97
+ while (len) {
98
+ currentQueue = queue;
99
+ queue = [];
100
+ while (++queueIndex < len) {
101
+ if (currentQueue) {
102
+ currentQueue[queueIndex].run();
103
+ }
104
+ }
105
+ queueIndex = -1;
106
+ len = queue.length;
107
+ }
108
+ currentQueue = null;
109
+ draining = false;
110
+ runClearTimeout(timeout);
111
+ }
112
+ process.nextTick = function(fun) {
113
+ var args = new Array(arguments.length - 1);
114
+ if (arguments.length > 1) {
115
+ for (var i = 1; i < arguments.length; i++) {
116
+ args[i - 1] = arguments[i];
117
+ }
118
+ }
119
+ queue.push(new Item(fun, args));
120
+ if (queue.length === 1 && !draining) {
121
+ runTimeout(drainQueue);
122
+ }
123
+ };
124
+ function Item(fun, array) {
125
+ this.fun = fun;
126
+ this.array = array;
127
+ }
128
+ Item.prototype.run = function() {
129
+ this.fun.apply(null, this.array);
130
+ };
131
+ process.title = "browser";
132
+ process.browser = true;
133
+ process.env = {};
134
+ process.argv = [];
135
+ process.version = "";
136
+ process.versions = {};
137
+ function noop() {
138
+ }
139
+ process.on = noop;
140
+ process.addListener = noop;
141
+ process.once = noop;
142
+ process.off = noop;
143
+ process.removeListener = noop;
144
+ process.removeAllListeners = noop;
145
+ process.emit = noop;
146
+ process.prependListener = noop;
147
+ process.prependOnceListener = noop;
148
+ process.listeners = function(name) {
149
+ return [];
150
+ };
151
+ process.binding = function(name) {
152
+ throw new Error("process.binding is not supported");
153
+ };
154
+ process.cwd = function() {
155
+ return "/";
156
+ };
157
+ process.chdir = function(dir) {
158
+ throw new Error("process.chdir is not supported");
159
+ };
160
+ process.umask = function() {
161
+ return 0;
162
+ };
163
+ var browserExports = browser.exports;
164
+ const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
3
165
  const numberFormatter = new Intl.NumberFormat("en-US", {
4
166
  useGrouping: true,
5
167
  maximumFractionDigits: 2
@@ -45,6 +207,125 @@ const getOperatorIds = (operators) => {
45
207
  const decodeOperatorPublicKey = (publicKey) => {
46
208
  return viem.decodeAbiParameters([{ type: "string" }], publicKey)[0];
47
209
  };
210
+ function defineChain(chain) {
211
+ return {
212
+ formatters: void 0,
213
+ fees: void 0,
214
+ serializers: void 0,
215
+ ...chain
216
+ };
217
+ }
218
+ const holesky = /* @__PURE__ */ defineChain({
219
+ id: 17e3,
220
+ name: "Holesky",
221
+ nativeCurrency: { name: "Holesky Ether", symbol: "ETH", decimals: 18 },
222
+ rpcUrls: {
223
+ default: {
224
+ http: ["https://ethereum-holesky-rpc.publicnode.com"]
225
+ }
226
+ },
227
+ blockExplorers: {
228
+ default: {
229
+ name: "Etherscan",
230
+ url: "https://holesky.etherscan.io",
231
+ apiUrl: "https://api-holesky.etherscan.io/api"
232
+ }
233
+ },
234
+ contracts: {
235
+ multicall3: {
236
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
237
+ blockCreated: 77
238
+ },
239
+ ensRegistry: {
240
+ address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
241
+ blockCreated: 801613
242
+ },
243
+ ensUniversalResolver: {
244
+ address: "0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",
245
+ blockCreated: 973484
246
+ }
247
+ },
248
+ testnet: true
249
+ });
250
+ const mainnet = /* @__PURE__ */ defineChain({
251
+ id: 1,
252
+ name: "Ethereum",
253
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
254
+ rpcUrls: {
255
+ default: {
256
+ http: ["https://cloudflare-eth.com"]
257
+ }
258
+ },
259
+ blockExplorers: {
260
+ default: {
261
+ name: "Etherscan",
262
+ url: "https://etherscan.io",
263
+ apiUrl: "https://api.etherscan.io/api"
264
+ }
265
+ },
266
+ contracts: {
267
+ ensRegistry: {
268
+ address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
269
+ },
270
+ ensUniversalResolver: {
271
+ address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
272
+ blockCreated: 19258213
273
+ },
274
+ multicall3: {
275
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
276
+ blockCreated: 14353601
277
+ }
278
+ }
279
+ });
280
+ const hoodi = viem.defineChain({
281
+ id: 560048,
282
+ name: "Hoodi",
283
+ rpcUrls: {
284
+ default: {
285
+ http: ["https://rpc.hoodi.ethpandaops.io"]
286
+ }
287
+ },
288
+ nativeCurrency: {
289
+ name: "Hoodi Ether",
290
+ symbol: "ETH",
291
+ decimals: 18
292
+ },
293
+ testnet: true
294
+ });
295
+ const chains = {
296
+ mainnet,
297
+ holesky,
298
+ hoodi
299
+ };
300
+ const chainIds = Object.values(chains).map((chain) => chain.id);
301
+ const networks = Object.values(chains).map((chain) => chain.name);
302
+ const graph_endpoints = {
303
+ [mainnet.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest",
304
+ [holesky.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-holesky/version/latest",
305
+ [hoodi.id]: "https://graph-node-hoodi.stage.ops.ssvlabsinternal.com/subgraphs/name/ssv-bapps-hoodi"
306
+ };
307
+ const rest_endpoints = {
308
+ [mainnet.id]: "https://api.ssv.network/api/v4/mainnet",
309
+ [holesky.id]: "https://api.ssv.network/api/v4/holesky",
310
+ [hoodi.id]: "https://api.ssv.network/api/v4/hoodi"
311
+ };
312
+ const contracts = {
313
+ [mainnet.id]: {
314
+ setter: "0xDD9BC35aE942eF0cFa76930954a156B3fF30a4E1",
315
+ getter: "0xafE830B6Ee262ba11cce5F32fDCd760FFE6a66e4",
316
+ token: "0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54"
317
+ },
318
+ [holesky.id]: {
319
+ setter: "0x38A4794cCEd47d3baf7370CcC43B560D3a1beEFA",
320
+ getter: "0x352A18AEe90cdcd825d1E37d9939dCA86C00e281",
321
+ token: "0xad45A78180961079BFaeEe349704F411dfF947C6"
322
+ },
323
+ [hoodi.id]: {
324
+ setter: "0x58410Bef803ECd7E63B23664C586A6DB72DAf59c",
325
+ getter: "0x5AdDb3f1529C5ec70D77400499eE4bbF328368fe",
326
+ token: "0x9F5d4Ec84fC4785788aB44F9de973cF34F7A038e"
327
+ }
328
+ };
48
329
  const global = globalThis || void 0 || self;
49
330
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
50
331
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
@@ -681,12 +962,6 @@ Stack.prototype["delete"] = stackDelete;
681
962
  Stack.prototype.get = stackGet;
682
963
  Stack.prototype.has = stackHas;
683
964
  Stack.prototype.set = stackSet;
684
- function baseAssign(object, source) {
685
- return object && copyObject(source, keys(source), object);
686
- }
687
- function baseAssignIn(object, source) {
688
- return object && copyObject(source, keysIn(source), object);
689
- }
690
965
  var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
691
966
  var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
692
967
  var moduleExports = freeModule && freeModule.exports === freeExports;
@@ -714,31 +989,16 @@ function stubArray() {
714
989
  }
715
990
  var objectProto$1 = Object.prototype;
716
991
  var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
717
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
718
- var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
992
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
993
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
719
994
  if (object == null) {
720
995
  return [];
721
996
  }
722
997
  object = Object(object);
723
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
998
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
724
999
  return propertyIsEnumerable.call(object, symbol);
725
1000
  });
726
1001
  };
727
- function copySymbols(source, object) {
728
- return copyObject(source, getSymbols(source), object);
729
- }
730
- var nativeGetSymbols = Object.getOwnPropertySymbols;
731
- var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
732
- var result = [];
733
- while (object) {
734
- arrayPush(result, getSymbols(object));
735
- object = getPrototype(object);
736
- }
737
- return result;
738
- };
739
- function copySymbolsIn(source, object) {
740
- return copyObject(source, getSymbolsIn(source), object);
741
- }
742
1002
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
743
1003
  var result = keysFunc(object);
744
1004
  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
@@ -746,9 +1006,6 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
746
1006
  function getAllKeys(object) {
747
1007
  return baseGetAllKeys(object, keys, getSymbols);
748
1008
  }
749
- function getAllKeysIn(object) {
750
- return baseGetAllKeys(object, keysIn, getSymbolsIn);
751
- }
752
1009
  var DataView = getNative(root, "DataView");
753
1010
  var Promise$1 = getNative(root, "Promise");
754
1011
  var Set$1 = getNative(root, "Set");
@@ -793,7 +1050,7 @@ function cloneArrayBuffer(arrayBuffer) {
793
1050
  return result;
794
1051
  }
795
1052
  function cloneDataView(dataView, isDeep) {
796
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
1053
+ var buffer = cloneArrayBuffer(dataView.buffer);
797
1054
  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
798
1055
  }
799
1056
  var reFlags = /\w*$/;
@@ -821,7 +1078,7 @@ function initCloneByTag(object, tag, isDeep) {
821
1078
  case dateTag$1:
822
1079
  return new Ctor(+object);
823
1080
  case dataViewTag$1:
824
- return cloneDataView(object, isDeep);
1081
+ return cloneDataView(object);
825
1082
  case float32Tag$1:
826
1083
  case float64Tag$1:
827
1084
  case int8Tag$1:
@@ -860,14 +1117,14 @@ function baseIsSet(value) {
860
1117
  }
861
1118
  var nodeIsSet = nodeUtil && nodeUtil.isSet;
862
1119
  var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
863
- var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
1120
+ var CLONE_DEEP_FLAG$1 = 1;
864
1121
  var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
865
1122
  var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
866
1123
  var cloneableTags = {};
867
1124
  cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
868
1125
  cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
869
1126
  function baseClone(value, bitmask, customizer, key, object, stack) {
870
- var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
1127
+ var result, isDeep = bitmask & CLONE_DEEP_FLAG$1;
871
1128
  if (customizer) {
872
1129
  result = object ? customizer(value, key, object, stack) : customizer(value);
873
1130
  }
@@ -880,19 +1137,13 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
880
1137
  var isArr = isArray(value);
881
1138
  if (isArr) {
882
1139
  result = initCloneArray(value);
883
- if (!isDeep) {
884
- return copyArray(value, result);
885
- }
886
1140
  } else {
887
1141
  var tag = exports.getTag(value), isFunc = tag == funcTag || tag == genTag;
888
1142
  if (isBuffer(value)) {
889
1143
  return cloneBuffer(value, isDeep);
890
1144
  }
891
1145
  if (tag == objectTag || tag == argsTag || isFunc && !object) {
892
- result = isFlat || isFunc ? {} : initCloneObject(value);
893
- if (!isDeep) {
894
- return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
895
- }
1146
+ result = isFunc ? {} : initCloneObject(value);
896
1147
  } else {
897
1148
  if (!cloneableTags[tag]) {
898
1149
  return object ? value : {};
@@ -915,7 +1166,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
915
1166
  result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
916
1167
  });
917
1168
  }
918
- var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
1169
+ var keysFunc = getAllKeys;
919
1170
  var props = isArr ? void 0 : keysFunc(value);
920
1171
  arrayEach(props || value, function(subValue, key2) {
921
1172
  if (props) {
@@ -1652,11 +1903,11 @@ const isDirty = (x) => x.status === "dirty";
1652
1903
  const isValid = (x) => x.status === "valid";
1653
1904
  const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
1654
1905
  function __classPrivateFieldGet(receiver, state, kind, f) {
1655
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1906
+ if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1656
1907
  return state.get(receiver);
1657
1908
  }
1658
1909
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
1659
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1910
+ if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1660
1911
  return state.set(receiver, value), value;
1661
1912
  }
1662
1913
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
@@ -5108,9 +5359,98 @@ var z = /* @__PURE__ */ Object.freeze({
5108
5359
  ZodError
5109
5360
  });
5110
5361
  const configArgsSchema = z.object({
5111
- walletClient: z.custom((val) => typeof val === "object" && val !== null, {}),
5112
- publicClient: z.custom((val) => typeof val === "object" && val !== null, {})
5362
+ publicClient: z.custom().superRefine((val, ctx) => {
5363
+ const client = val;
5364
+ if (!client) {
5365
+ ctx.addIssue({
5366
+ code: z.ZodIssueCode.custom,
5367
+ message: "Public client must be provided"
5368
+ });
5369
+ return false;
5370
+ }
5371
+ if (client.chain === void 0) {
5372
+ ctx.addIssue({
5373
+ code: z.ZodIssueCode.custom,
5374
+ message: "Public client must have a chain property"
5375
+ });
5376
+ return false;
5377
+ }
5378
+ if (!chainIds.includes(client.chain?.id)) {
5379
+ ctx.addIssue({
5380
+ code: z.ZodIssueCode.custom,
5381
+ message: `Public client chain must be one of [${networks.join(", ")}]`
5382
+ });
5383
+ return false;
5384
+ }
5385
+ return true;
5386
+ }),
5387
+ walletClient: z.custom().superRefine((val, ctx) => {
5388
+ const client = val;
5389
+ if (!client) {
5390
+ ctx.addIssue({
5391
+ code: z.ZodIssueCode.custom,
5392
+ message: "Wallet client must be provided"
5393
+ });
5394
+ return false;
5395
+ }
5396
+ if (client.chain === void 0) {
5397
+ ctx.addIssue({
5398
+ code: z.ZodIssueCode.custom,
5399
+ message: "Wallet client must have a chain property"
5400
+ });
5401
+ return false;
5402
+ }
5403
+ if (!chainIds.includes(client.chain?.id)) {
5404
+ ctx.addIssue({
5405
+ code: z.ZodIssueCode.custom,
5406
+ message: `Wallet client chain must be one of [${networks.join(", ")}]`
5407
+ });
5408
+ return false;
5409
+ }
5410
+ return true;
5411
+ }),
5412
+ _: z.object({
5413
+ graphUrl: z.string().url().optional(),
5414
+ restUrl: z.string().url().optional(),
5415
+ contractAddresses: z.object({
5416
+ setter: z.string().optional(),
5417
+ getter: z.string().optional(),
5418
+ token: z.string().optional()
5419
+ }).optional()
5420
+ }).optional()
5113
5421
  });
5422
+ const globals = {
5423
+ MAX_WEI_AMOUNT: 115792089237316195423570985008687907853269984665640564039457584007913129639935n,
5424
+ CLUSTER_SIZES: {
5425
+ QUAD_CLUSTER: 4,
5426
+ SEPT_CLUSTER: 7,
5427
+ DECA_CLUSTER: 10,
5428
+ TRISKAIDEKA_CLUSTER: 13
5429
+ },
5430
+ FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE: {
5431
+ QUAD_CLUSTER: 80,
5432
+ SEPT_CLUSTER: 40,
5433
+ DECA_CLUSTER: 30,
5434
+ TRISKAIDEKA_CLUSTER: 20
5435
+ },
5436
+ BLOCKS_PER_DAY: 7160n,
5437
+ OPERATORS_PER_PAGE: 50,
5438
+ BLOCKS_PER_YEAR: 2613400n,
5439
+ DEFAULT_CLUSTER_PERIOD: 730,
5440
+ NUMBERS_OF_WEEKS_IN_YEAR: 52.1429,
5441
+ MAX_VALIDATORS_COUNT_MULTI_FLOW: 50,
5442
+ CLUSTER_VALIDITY_PERIOD_MINIMUM: 30,
5443
+ OPERATOR_VALIDATORS_LIMIT_PRESERVE: 5,
5444
+ MINIMUM_OPERATOR_FEE_PER_BLOCK: 1000000000n,
5445
+ MIN_VALIDATORS_COUNT_PER_BULK_REGISTRATION: 1,
5446
+ DEFAULT_ADDRESS_WHITELIST: "0x0000000000000000000000000000000000000000"
5447
+ };
5448
+ const registerValidatorsByClusterSizeLimits = {
5449
+ [globals.CLUSTER_SIZES.QUAD_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.QUAD_CLUSTER,
5450
+ [globals.CLUSTER_SIZES.SEPT_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.SEPT_CLUSTER,
5451
+ [globals.CLUSTER_SIZES.DECA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.DECA_CLUSTER,
5452
+ [globals.CLUSTER_SIZES.TRISKAIDEKA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.TRISKAIDEKA_CLUSTER
5453
+ };
5114
5454
  exports.KeysharesValidationError = KeysharesValidationError;
5115
5455
  exports.KeysharesValidationErrors = KeysharesValidationErrors;
5116
5456
  exports.KeysharesValidationErrorsMessages = KeysharesValidationErrorsMessages;
@@ -5127,7 +5467,10 @@ exports.bigintMax = bigintMax;
5127
5467
  exports.bigintMin = bigintMin;
5128
5468
  exports.bigintRound = bigintRound;
5129
5469
  exports.bigintifyNumbers = bigintifyNumbers;
5470
+ exports.chainIds = chainIds;
5471
+ exports.chains = chains;
5130
5472
  exports.configArgsSchema = configArgsSchema;
5473
+ exports.contracts = contracts;
5131
5474
  exports.createClusterId = createClusterId;
5132
5475
  exports.createEmptyCluster = createEmptyCluster;
5133
5476
  exports.decodeOperatorPublicKey = decodeOperatorPublicKey;
@@ -5140,6 +5483,9 @@ exports.formatSSV = formatSSV;
5140
5483
  exports.getAllKeys = getAllKeys;
5141
5484
  exports.getClusterSnapshot = getClusterSnapshot;
5142
5485
  exports.getOperatorIds = getOperatorIds;
5486
+ exports.globals = globals;
5487
+ exports.graph_endpoints = graph_endpoints;
5488
+ exports.hoodi = hoodi;
5143
5489
  exports.isArray = isArray;
5144
5490
  exports.isBigIntChanged = isBigIntChanged;
5145
5491
  exports.isBuffer = isBuffer;
@@ -5149,8 +5495,12 @@ exports.isObjectLike = isObjectLike;
5149
5495
  exports.isTypedArray = isTypedArray;
5150
5496
  exports.isUndefined = isUndefined;
5151
5497
  exports.ms = ms;
5498
+ exports.networks = networks;
5152
5499
  exports.numberFormatter = numberFormatter;
5153
5500
  exports.percentageFormatter = percentageFormatter;
5501
+ exports.process$1 = process$1;
5502
+ exports.registerValidatorsByClusterSizeLimits = registerValidatorsByClusterSizeLimits;
5503
+ exports.rest_endpoints = rest_endpoints;
5154
5504
  exports.roundOperatorFee = roundOperatorFee;
5155
5505
  exports.sortNumbers = sortNumbers;
5156
5506
  exports.stringifyBigints = stringifyBigints;
@@ -1964,7 +1964,7 @@ export declare const createClusterManager: (config: ConfigReturnType) => {
1964
1964
  })[];
1965
1965
  }>;
1966
1966
  }>>;
1967
- registerValidators: RemoveConfigArg<(config: ConfigReturnType, { args: { keyshares, depositAmount }, ...writeOptions }: Omit<import('viem').SimulateContractParameters, "address" | "value" | "account" | "args" | "chain" | "abi" | "functionName"> & {
1967
+ registerValidators: RemoveConfigArg<(config: ConfigReturnType, { args: { keyshares, depositAmount }, ...writeOptions }: {
1968
1968
  args: {
1969
1969
  keyshares: import('ssv-keys').KeySharesItem[] | import('ssv-keys/dist/tsc/src/lib/KeyShares/KeySharesData/KeySharesPayload').KeySharesPayload[];
1970
1970
  depositAmount?: bigint | undefined;
@@ -2244,6 +2244,12 @@ export declare const createClusterManager: (config: ConfigReturnType) => {
2244
2244
  })[];
2245
2245
  }>;
2246
2246
  }>>;
2247
+ registerValidatorsRawData: RemoveConfigArg<(config: ConfigReturnType, { args: { keyshares, depositAmount } }: {
2248
+ args: {
2249
+ keyshares: import('ssv-keys').KeySharesItem[] | import('ssv-keys/dist/tsc/src/lib/KeyShares/KeySharesData/KeySharesPayload').KeySharesPayload[];
2250
+ depositAmount?: bigint | undefined;
2251
+ };
2252
+ }) => Promise<`0x${string}`>>;
2247
2253
  validateSharesPostRegistration: RemoveConfigArg<(config: ConfigReturnType, args: {
2248
2254
  txHash: `0x${string}`;
2249
2255
  }) => Promise<{
@@ -2,7 +2,7 @@ export { deposit } from './deposit';
2
2
  export { exitValidators } from './exit-validators';
3
3
  export { liquidateCluster } from './liquidate-cluster';
4
4
  export { reactivateCluster } from './reactivate-cluster';
5
- export { registerValidators, validateSharesPostRegistration } from './register-validators';
5
+ export { registerValidators, registerValidatorsRawData, validateSharesPostRegistration } from './register-validators';
6
6
  export { removeValidators } from './remove-validators';
7
7
  export { setFeeRecipient } from './set-fee-recipient';
8
8
  export { withdraw } from './withdraw';
@@ -2,10 +2,10 @@ import { ConfigReturnType } from '../../../config/create';
2
2
  import { SmartFnWriteOptions } from '../../../contract-interactions/types';
3
3
  import { SSVKeys, KeySharesItem } from 'ssv-keys';
4
4
  import { Hex } from 'viem';
5
- type RegisterValidatorsProps = SmartFnWriteOptions<{
5
+ type RegisterValidatorsProps = Pick<SmartFnWriteOptions<{
6
6
  keyshares: KeySharesItem[] | KeySharesItem['payload'][];
7
7
  depositAmount?: bigint;
8
- }>;
8
+ }>, 'args'>;
9
9
  export declare const registerValidators: (config: ConfigReturnType, { args: { keyshares, depositAmount }, ...writeOptions }: RegisterValidatorsProps) => Promise<{
10
10
  hash: `0x${string}`;
11
11
  wait: () => Promise<import('viem').TransactionReceipt & {
@@ -281,6 +281,7 @@ export declare const registerValidators: (config: ConfigReturnType, { args: { ke
281
281
  })[];
282
282
  }>;
283
283
  }>;
284
+ export declare const registerValidatorsRawData: (config: ConfigReturnType, { args: { keyshares, depositAmount } }: RegisterValidatorsProps) => Promise<`0x${string}`>;
284
285
  declare const ssvKeys: SSVKeys;
285
286
  export declare const validateSharesPostRegistration: (config: ConfigReturnType, args: {
286
287
  txHash: Hex;