@ssv-labs/ssv-sdk 0.0.7 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/KeyShares-7biQfDev.js +19422 -0
  2. package/dist/KeyShares-DEqBZits.mjs +19423 -0
  3. package/dist/api/subgraph/index.d.ts +15 -54
  4. package/dist/config/chains.d.ts +17 -51
  5. package/dist/config/create.d.ts +7 -3
  6. package/dist/globals-CkyOvtF5.js +450 -0
  7. package/dist/globals-DlonCtsi.mjs +451 -0
  8. package/dist/graphql/graphql.d.ts +10 -33
  9. package/dist/keys.js +9 -0
  10. package/dist/keys.mjs +9 -0
  11. package/dist/libs/api/index.d.ts +9 -69
  12. package/dist/libs/cluster/index.d.ts +11 -5638
  13. package/dist/libs/cluster/methods/deposit.d.ts +1 -1
  14. package/dist/libs/cluster/methods/exit-validators.d.ts +1 -1
  15. package/dist/libs/cluster/methods/liquidate-cluster.d.ts +1 -1
  16. package/dist/libs/cluster/methods/reactivate-cluster.d.ts +1 -1
  17. package/dist/libs/cluster/methods/register-validators.d.ts +3 -2
  18. package/dist/libs/cluster/methods/remove-validators.d.ts +1 -1
  19. package/dist/libs/cluster/methods/set-fee-recipient.d.ts +1 -1
  20. package/dist/libs/cluster/methods/withdraw.d.ts +1 -1
  21. package/dist/libs/operator/index.d.ts +94 -911
  22. package/dist/libs/operator/methods.d.ts +3 -3
  23. package/dist/libs/ssv-keys/BLS/index.d.ts +2 -0
  24. package/dist/libs/ssv-keys/Encryption/Encryption.d.ts +7 -0
  25. package/dist/libs/ssv-keys/Encryption/__test__/RsaKeys.d.ts +3 -0
  26. package/dist/libs/ssv-keys/Encryption/utils.d.ts +55 -0
  27. package/dist/libs/ssv-keys/EthereumKeyStore/EthereumKeyStore.d.ts +23 -0
  28. package/dist/libs/ssv-keys/EthereumKeyStore/index.d.ts +1 -0
  29. package/dist/libs/ssv-keys/KeyShares/KeyShares.d.ts +32 -0
  30. package/dist/libs/ssv-keys/KeyShares/KeySharesData/KeySharesData.d.ts +21 -0
  31. package/dist/libs/ssv-keys/KeyShares/KeySharesData/KeySharesPayload.d.ts +32 -0
  32. package/dist/libs/ssv-keys/KeyShares/KeySharesData/OperatorData.d.ts +10 -0
  33. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/encrypted-key.d.ts +6 -0
  34. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/index.d.ts +6 -0
  35. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/match.d.ts +6 -0
  36. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/operator-public-key.d.ts +6 -0
  37. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/operator-unique.d.ts +6 -0
  38. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/owner-address.d.ts +6 -0
  39. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/owner-nonce.d.ts +6 -0
  40. package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/public-key.d.ts +6 -0
  41. package/dist/libs/ssv-keys/KeyShares/KeySharesItem.d.ts +60 -0
  42. package/dist/libs/ssv-keys/SSVKeys.d.ts +66 -0
  43. package/dist/libs/ssv-keys/Threshold/Threshold.d.ts +28 -0
  44. package/dist/libs/ssv-keys/Threshold/__test__/helper/share_signatures.d.ts +7 -0
  45. package/dist/libs/ssv-keys/Threshold/index.d.ts +1 -0
  46. package/dist/libs/ssv-keys/exceptions/base.d.ts +4 -0
  47. package/dist/libs/ssv-keys/exceptions/bls.d.ts +9 -0
  48. package/dist/libs/ssv-keys/exceptions/index.d.ts +2 -0
  49. package/dist/libs/ssv-keys/exceptions/keyshares.d.ts +5 -0
  50. package/dist/libs/ssv-keys/exceptions/keystore.d.ts +27 -0
  51. package/dist/libs/ssv-keys/exceptions/operator.d.ts +22 -0
  52. package/dist/libs/ssv-keys/helpers/operator.helper.d.ts +7 -0
  53. package/dist/libs/ssv-keys/helpers/web3.helper.d.ts +36 -0
  54. package/dist/libs/ssv-keys/index.d.ts +4 -0
  55. package/dist/libs/ssv-keys/interfaces/IEncryptShare.d.ts +5 -0
  56. package/dist/libs/ssv-keys/interfaces/IKeySharesData.d.ts +18 -0
  57. package/dist/libs/ssv-keys/interfaces/IKeySharesPayload.d.ts +13 -0
  58. package/dist/libs/ssv-keys/interfaces/IOperator.d.ts +4 -0
  59. package/dist/libs/ssv-keys/interfaces/IOperatorData.d.ts +5 -0
  60. package/dist/libs/ssv-keys/interfaces/IShares.d.ts +10 -0
  61. package/dist/libs/ssv-keys/interfaces/index.d.ts +6 -0
  62. package/dist/libs/ssv-keys/validators/index.d.ts +2 -0
  63. package/dist/libs/ssv-keys/validators/operatorPublicKey.validator.d.ts +1 -0
  64. package/dist/libs/ssv-keys/validators/operatorsLength.validator.d.ts +1 -0
  65. package/dist/libs/utils/index.d.ts +8 -18
  66. package/dist/libs/utils/methods/keyshares.d.ts +5 -2
  67. package/dist/libs/utils/methods/keystores.d.ts +2 -2
  68. package/dist/main.d.ts +1 -0
  69. package/dist/main.js +3976 -35215
  70. package/dist/main.mjs +3977 -35215
  71. package/dist/mock/api.d.ts +1 -1
  72. package/dist/types/contract-interactions.d.ts +2 -2
  73. package/dist/utils/cluster.d.ts +1 -1
  74. package/dist/utils/contract.d.ts +2 -1
  75. package/dist/utils/keyshares.d.ts +2 -2
  76. package/dist/utils/number.d.ts +1 -1
  77. package/dist/utils/zod/config.d.ts +10 -5
  78. package/dist/utils.js +1 -1
  79. package/dist/utils.mjs +34 -34
  80. package/package.json +76 -61
  81. package/dist/abi/holesky/v4/getter.d.ts +0 -824
  82. package/dist/abi/holesky/v4/setter.d.ts +0 -1662
  83. package/dist/globals-BHuFvs8-.mjs +0 -5511
  84. package/dist/globals-DCoa7oI7.js +0 -5509
@@ -0,0 +1,450 @@
1
+ "use strict";
2
+ const lodashEs = require("lodash-es");
3
+ const viem = require("viem");
4
+ require("graphql-request");
5
+ const zod = require("zod");
6
+ const numberFormatter = new Intl.NumberFormat("en-US", {
7
+ useGrouping: true,
8
+ maximumFractionDigits: 2
9
+ });
10
+ const _percentageFormatter = new Intl.NumberFormat("en-US", {
11
+ style: "percent",
12
+ maximumFractionDigits: 2
13
+ });
14
+ const percentageFormatter = {
15
+ format: (value) => {
16
+ if (!value) return "0%";
17
+ return _percentageFormatter.format(value / 100);
18
+ }
19
+ };
20
+ const bigintFormatter = new Intl.NumberFormat("en-US", {
21
+ useGrouping: false,
22
+ maximumFractionDigits: 7
23
+ });
24
+ const ethFormatter = new Intl.NumberFormat("en-US", {
25
+ useGrouping: true,
26
+ maximumFractionDigits: 4
27
+ });
28
+ const formatSSV = (num, decimals = 18) => ethFormatter.format(+viem.formatUnits(num, decimals));
29
+ const formatBigintInput = (num, decimals = 18) => bigintFormatter.format(+viem.formatUnits(num, decimals));
30
+ const units = {
31
+ seconds: 1e3,
32
+ minutes: 6e4,
33
+ hours: 36e5,
34
+ days: 864e5,
35
+ weeks: 6048e5,
36
+ months: 2629746e3,
37
+ years: 31556952e3
38
+ };
39
+ const ms = (value, unit) => {
40
+ return value * units[unit];
41
+ };
42
+ const sortNumbers = (numbers) => {
43
+ return [...numbers].sort((a, b) => Number(a) - Number(b));
44
+ };
45
+ const getOperatorIds = (operators) => {
46
+ return sortNumbers(operators.map((operator) => operator.id));
47
+ };
48
+ const decodeOperatorPublicKey = (publicKey) => {
49
+ return viem.decodeAbiParameters([{ type: "string" }], publicKey)[0];
50
+ };
51
+ function defineChain(chain) {
52
+ return {
53
+ formatters: void 0,
54
+ fees: void 0,
55
+ serializers: void 0,
56
+ ...chain
57
+ };
58
+ }
59
+ const mainnet = /* @__PURE__ */ defineChain({
60
+ id: 1,
61
+ name: "Ethereum",
62
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
63
+ rpcUrls: {
64
+ default: {
65
+ http: ["https://eth.merkle.io"]
66
+ }
67
+ },
68
+ blockExplorers: {
69
+ default: {
70
+ name: "Etherscan",
71
+ url: "https://etherscan.io",
72
+ apiUrl: "https://api.etherscan.io/api"
73
+ }
74
+ },
75
+ contracts: {
76
+ ensRegistry: {
77
+ address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
78
+ },
79
+ ensUniversalResolver: {
80
+ address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
81
+ blockCreated: 19258213
82
+ },
83
+ multicall3: {
84
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
85
+ blockCreated: 14353601
86
+ }
87
+ }
88
+ });
89
+ const hoodi = viem.defineChain({
90
+ id: 560048,
91
+ name: "Hoodi",
92
+ rpcUrls: {
93
+ default: {
94
+ http: ["https://rpc.hoodi.ethpandaops.io"]
95
+ }
96
+ },
97
+ nativeCurrency: {
98
+ name: "Hoodi Ether",
99
+ symbol: "ETH",
100
+ decimals: 18
101
+ },
102
+ testnet: true
103
+ });
104
+ const chains = {
105
+ mainnet,
106
+ hoodi
107
+ };
108
+ const chainIds = Object.values(chains).map((chain) => chain.id);
109
+ const networks = Object.values(chains).map((chain) => chain.name);
110
+ const graph_endpoints = {
111
+ [mainnet.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest",
112
+ [hoodi.id]: "https://api.studio.thegraph.com/query/71118/ssv-network-hoodi/version/latest"
113
+ };
114
+ const paid_graph_endpoints = {
115
+ [mainnet.id]: "https://gateway.thegraph.com/api/subgraphs/id/7V45fKPugp9psQjgrGsfif98gWzCyC6ChN7CW98VyQnr",
116
+ [hoodi.id]: "https://gateway.thegraph.com/api/subgraphs/id/F4AU5vPCuKfHvnLsusibxJEiTN7ELCoYTvnzg3YHGYbh"
117
+ };
118
+ const rest_endpoints = {
119
+ [mainnet.id]: "https://api.ssv.network/api/v4/mainnet",
120
+ [hoodi.id]: "https://api.ssv.network/api/v4/hoodi"
121
+ };
122
+ const contracts = {
123
+ [mainnet.id]: {
124
+ setter: "0xDD9BC35aE942eF0cFa76930954a156B3fF30a4E1",
125
+ getter: "0xafE830B6Ee262ba11cce5F32fDCd760FFE6a66e4",
126
+ token: "0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54"
127
+ },
128
+ [hoodi.id]: {
129
+ setter: "0x58410Bef803ECd7E63B23664C586A6DB72DAf59c",
130
+ getter: "0x5AdDb3f1529C5ec70D77400499eE4bbF328368fe",
131
+ token: "0x9F5d4Ec84fC4785788aB44F9de973cF34F7A038e"
132
+ }
133
+ };
134
+ const bigintMax = (...args) => {
135
+ return args.filter((x) => !lodashEs.isUndefined(x)).reduce((max, cur) => cur > max ? cur : max);
136
+ };
137
+ const bigintMin = (...args) => {
138
+ return args.filter((x) => !lodashEs.isUndefined(x)).reduce((min, cur) => cur < min ? cur : min);
139
+ };
140
+ const bigintRound = (value, precision) => {
141
+ const remainder = value % precision;
142
+ return remainder >= precision / 2n ? value + (precision - remainder) : value - remainder;
143
+ };
144
+ const bigintFloor = (value, precision = 10000000n) => {
145
+ return value - value % precision;
146
+ };
147
+ const bigintAbs = (n) => n < 0n ? -n : n;
148
+ const isBigIntChanged = (a, b, tolerance = viem.parseUnits("0.0001", 18)) => {
149
+ return bigintAbs(a - b) > tolerance;
150
+ };
151
+ const roundOperatorFee = (fee, precision = 10000000n) => {
152
+ return bigintRound(fee, precision);
153
+ };
154
+ const stringifyBigints = (anything) => {
155
+ return lodashEs.cloneDeepWith(anything, (value) => {
156
+ if (typeof value === "bigint") return value.toString();
157
+ });
158
+ };
159
+ const bigintifyNumbers = (numbers) => {
160
+ return lodashEs.cloneDeepWith(numbers, (value) => {
161
+ if (typeof value === "number") return BigInt(value);
162
+ });
163
+ };
164
+ const createClusterId = (ownerAddress, operatorIds) => {
165
+ if (!viem.isAddress(ownerAddress)) {
166
+ throw new Error("Invalid owner address");
167
+ }
168
+ return `${ownerAddress.toLowerCase()}-${operatorIds.join("-")}`;
169
+ };
170
+ const isClusterId = (clusterId) => {
171
+ const [ownerAddress, ...operatorIds] = clusterId.split("-");
172
+ return viem.isAddress(ownerAddress) && operatorIds.length >= 4 && operatorIds.every((id) => !isNaN(Number(id)));
173
+ };
174
+ const getClusterSnapshot = (cluster) => {
175
+ return {
176
+ active: cluster.active,
177
+ balance: BigInt(cluster.balance),
178
+ index: BigInt(cluster.index),
179
+ networkFeeIndex: BigInt(cluster.networkFeeIndex),
180
+ validatorCount: +cluster.validatorCount
181
+ };
182
+ };
183
+ const createEmptyCluster = (cluster = {}) => lodashEs.merge(
184
+ {
185
+ validatorCount: 0,
186
+ networkFeeIndex: 0n,
187
+ index: 0n,
188
+ balance: 0n,
189
+ active: true
190
+ },
191
+ cluster
192
+ );
193
+ const add0x = (value) => !value.startsWith("0x") ? `0x${value}` : value;
194
+ const isKeySharesItem = (item) => {
195
+ return !!item && typeof item === "object" && "data" in item && "payload" in item && "error" in item;
196
+ };
197
+ var KeysharesValidationErrors = /* @__PURE__ */ ((KeysharesValidationErrors2) => {
198
+ KeysharesValidationErrors2[KeysharesValidationErrors2["OperatorDoesNotExist"] = 0] = "OperatorDoesNotExist";
199
+ KeysharesValidationErrors2[KeysharesValidationErrors2["OperatorMismatch"] = 1] = "OperatorMismatch";
200
+ KeysharesValidationErrors2[KeysharesValidationErrors2["ValidatorAlreadyExists"] = 2] = "ValidatorAlreadyExists";
201
+ KeysharesValidationErrors2[KeysharesValidationErrors2["ClusterMismatch"] = 3] = "ClusterMismatch";
202
+ KeysharesValidationErrors2[KeysharesValidationErrors2["DuplicateValidatorKeys"] = 4] = "DuplicateValidatorKeys";
203
+ KeysharesValidationErrors2[KeysharesValidationErrors2["InconsistentOperatorPublicKeys"] = 5] = "InconsistentOperatorPublicKeys";
204
+ KeysharesValidationErrors2[KeysharesValidationErrors2["InconsistentOperators"] = 6] = "InconsistentOperators";
205
+ return KeysharesValidationErrors2;
206
+ })(KeysharesValidationErrors || {});
207
+ const KeysharesValidationErrorsMessages = {
208
+ [
209
+ 0
210
+ /* OperatorDoesNotExist */
211
+ ]: "Operator not found. Please verify the operator ID.",
212
+ [
213
+ 1
214
+ /* OperatorMismatch */
215
+ ]: "Operator details mismatch. Check provided information.",
216
+ [
217
+ 2
218
+ /* ValidatorAlreadyExists */
219
+ ]: "Validator public key already in use. Must be unique.",
220
+ [
221
+ 3
222
+ /* ClusterMismatch */
223
+ ]: "The operators in the provided keyshares do not match the provided operators. Please ensure the keyshares correspond to the cluster you are trying to register.",
224
+ [
225
+ 4
226
+ /* DuplicateValidatorKeys */
227
+ ]: "Duplicate validator keys detected. Each must be unique.",
228
+ [
229
+ 5
230
+ /* InconsistentOperatorPublicKeys */
231
+ ]: "Operator public keys mismatch. Verify operator data.",
232
+ [
233
+ 6
234
+ /* InconsistentOperators */
235
+ ]: "Inconsistent operator IDs across keyshares. Check all entries."
236
+ };
237
+ class KeysharesValidationError extends Error {
238
+ constructor(code) {
239
+ super(KeysharesValidationErrorsMessages[code]);
240
+ this.code = code;
241
+ }
242
+ }
243
+ const validateConsistentOperatorIds = (keyshares) => {
244
+ const operatorIds = sortNumbers(keyshares[0].payload.operatorIds);
245
+ keyshares.every(({ payload, data }) => {
246
+ const payloadOperatorIds = sortNumbers(payload.operatorIds).toString();
247
+ const dataOperatorIds = getOperatorIds(data.operators ?? []).toString();
248
+ const valid = payloadOperatorIds === dataOperatorIds && dataOperatorIds === operatorIds.toString();
249
+ if (!valid) {
250
+ throw new KeysharesValidationError(
251
+ 6
252
+ /* InconsistentOperators */
253
+ );
254
+ }
255
+ return true;
256
+ });
257
+ return operatorIds;
258
+ };
259
+ const ensureValidatorsUniqueness = (keyshares) => {
260
+ const set = new Set(keyshares.map(({ data }) => data.publicKey));
261
+ if (set.size !== keyshares.length) {
262
+ throw new KeysharesValidationError(
263
+ 4
264
+ /* DuplicateValidatorKeys */
265
+ );
266
+ }
267
+ return true;
268
+ };
269
+ const validateConsistentOperatorPublicKeys = (keyshares, operators) => {
270
+ const operatorsMap = new Map(operators.map((o) => [o.id, o.publicKey]));
271
+ const valid = keyshares.every(({ data }) => {
272
+ return data.operators?.every(({ id, operatorKey }) => {
273
+ return operatorsMap.get(id.toString()) === operatorKey;
274
+ });
275
+ });
276
+ if (!valid) {
277
+ throw new KeysharesValidationError(
278
+ 5
279
+ /* InconsistentOperatorPublicKeys */
280
+ );
281
+ }
282
+ return valid;
283
+ };
284
+ const ensureNoKeysharesErrors = (keyshares) => {
285
+ keyshares.forEach((share) => {
286
+ if (share.error) {
287
+ throw share.error;
288
+ }
289
+ });
290
+ return true;
291
+ };
292
+ const tryCatch = (fn) => {
293
+ try {
294
+ return [fn(), null];
295
+ } catch (e) {
296
+ return [null, e];
297
+ }
298
+ };
299
+ const configArgsSchema = zod.z.object({
300
+ publicClient: zod.z.custom().superRefine((val, ctx) => {
301
+ const client = val;
302
+ if (!client) {
303
+ ctx.addIssue({
304
+ code: zod.z.ZodIssueCode.custom,
305
+ message: "Public client must be provided"
306
+ });
307
+ return false;
308
+ }
309
+ if (client.chain === void 0) {
310
+ ctx.addIssue({
311
+ code: zod.z.ZodIssueCode.custom,
312
+ message: "Public client must have a chain property"
313
+ });
314
+ return false;
315
+ }
316
+ if (![...chainIds].includes(client.chain?.id)) {
317
+ ctx.addIssue({
318
+ code: zod.z.ZodIssueCode.custom,
319
+ message: `Public client chain must be one of [${networks.join(", ")}]`
320
+ });
321
+ return false;
322
+ }
323
+ return true;
324
+ }),
325
+ walletClient: zod.z.custom().superRefine((val, ctx) => {
326
+ const client = val;
327
+ if (!client) {
328
+ ctx.addIssue({
329
+ code: zod.z.ZodIssueCode.custom,
330
+ message: "Wallet client must be provided"
331
+ });
332
+ return false;
333
+ }
334
+ if (client.chain === void 0) {
335
+ ctx.addIssue({
336
+ code: zod.z.ZodIssueCode.custom,
337
+ message: "Wallet client must have a chain property"
338
+ });
339
+ return false;
340
+ }
341
+ if (![...chainIds].includes(client.chain?.id)) {
342
+ ctx.addIssue({
343
+ code: zod.z.ZodIssueCode.custom,
344
+ message: `Wallet client chain must be one of [${networks.join(", ")}]`
345
+ });
346
+ return false;
347
+ }
348
+ return true;
349
+ }),
350
+ extendedConfig: zod.z.object({
351
+ subgraph: zod.z.object({
352
+ endpoint: zod.z.string().url().optional(),
353
+ apiKey: zod.z.string().optional()
354
+ }).optional(),
355
+ rest: zod.z.object({
356
+ endpoint: zod.z.string().url().optional()
357
+ }).optional(),
358
+ contracts: zod.z.object({
359
+ setter: zod.z.string().optional(),
360
+ getter: zod.z.string().optional(),
361
+ token: zod.z.string().optional()
362
+ }).optional()
363
+ }).optional()
364
+ }).refine(
365
+ (val) => {
366
+ const publicClient = val.publicClient;
367
+ const walletClient = val.walletClient;
368
+ return publicClient?.chain?.id === walletClient?.chain?.id;
369
+ },
370
+ {
371
+ message: "Public and wallet client chains must be the same"
372
+ }
373
+ );
374
+ const globals = {
375
+ MAX_WEI_AMOUNT: 115792089237316195423570985008687907853269984665640564039457584007913129639935n,
376
+ CLUSTER_SIZES: {
377
+ QUAD_CLUSTER: 4,
378
+ SEPT_CLUSTER: 7,
379
+ DECA_CLUSTER: 10,
380
+ TRISKAIDEKA_CLUSTER: 13
381
+ },
382
+ FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE: {
383
+ QUAD_CLUSTER: 80,
384
+ SEPT_CLUSTER: 40,
385
+ DECA_CLUSTER: 30,
386
+ TRISKAIDEKA_CLUSTER: 20
387
+ },
388
+ BLOCKS_PER_DAY: 7160n,
389
+ OPERATORS_PER_PAGE: 50,
390
+ BLOCKS_PER_YEAR: 2613400n,
391
+ DEFAULT_CLUSTER_PERIOD: 730,
392
+ NUMBERS_OF_WEEKS_IN_YEAR: 52.1429,
393
+ MAX_VALIDATORS_COUNT_MULTI_FLOW: 50,
394
+ CLUSTER_VALIDITY_PERIOD_MINIMUM: 30,
395
+ OPERATOR_VALIDATORS_LIMIT_PRESERVE: 5,
396
+ MINIMUM_OPERATOR_FEE_PER_BLOCK: 1000000000n,
397
+ MIN_VALIDATORS_COUNT_PER_BULK_REGISTRATION: 1,
398
+ DEFAULT_ADDRESS_WHITELIST: "0x0000000000000000000000000000000000000000"
399
+ };
400
+ const registerValidatorsByClusterSizeLimits = {
401
+ [globals.CLUSTER_SIZES.QUAD_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.QUAD_CLUSTER,
402
+ [globals.CLUSTER_SIZES.SEPT_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.SEPT_CLUSTER,
403
+ [globals.CLUSTER_SIZES.DECA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.DECA_CLUSTER,
404
+ [globals.CLUSTER_SIZES.TRISKAIDEKA_CLUSTER]: globals.FIXED_VALIDATORS_COUNT_PER_CLUSTER_SIZE.TRISKAIDEKA_CLUSTER
405
+ };
406
+ exports.KeysharesValidationError = KeysharesValidationError;
407
+ exports.KeysharesValidationErrors = KeysharesValidationErrors;
408
+ exports.KeysharesValidationErrorsMessages = KeysharesValidationErrorsMessages;
409
+ exports._percentageFormatter = _percentageFormatter;
410
+ exports.add0x = add0x;
411
+ exports.bigintAbs = bigintAbs;
412
+ exports.bigintFloor = bigintFloor;
413
+ exports.bigintFormatter = bigintFormatter;
414
+ exports.bigintMax = bigintMax;
415
+ exports.bigintMin = bigintMin;
416
+ exports.bigintRound = bigintRound;
417
+ exports.bigintifyNumbers = bigintifyNumbers;
418
+ exports.chainIds = chainIds;
419
+ exports.chains = chains;
420
+ exports.configArgsSchema = configArgsSchema;
421
+ exports.contracts = contracts;
422
+ exports.createClusterId = createClusterId;
423
+ exports.createEmptyCluster = createEmptyCluster;
424
+ exports.decodeOperatorPublicKey = decodeOperatorPublicKey;
425
+ exports.ensureNoKeysharesErrors = ensureNoKeysharesErrors;
426
+ exports.ensureValidatorsUniqueness = ensureValidatorsUniqueness;
427
+ exports.ethFormatter = ethFormatter;
428
+ exports.formatBigintInput = formatBigintInput;
429
+ exports.formatSSV = formatSSV;
430
+ exports.getClusterSnapshot = getClusterSnapshot;
431
+ exports.getOperatorIds = getOperatorIds;
432
+ exports.globals = globals;
433
+ exports.graph_endpoints = graph_endpoints;
434
+ exports.hoodi = hoodi;
435
+ exports.isBigIntChanged = isBigIntChanged;
436
+ exports.isClusterId = isClusterId;
437
+ exports.isKeySharesItem = isKeySharesItem;
438
+ exports.ms = ms;
439
+ exports.networks = networks;
440
+ exports.numberFormatter = numberFormatter;
441
+ exports.paid_graph_endpoints = paid_graph_endpoints;
442
+ exports.percentageFormatter = percentageFormatter;
443
+ exports.registerValidatorsByClusterSizeLimits = registerValidatorsByClusterSizeLimits;
444
+ exports.rest_endpoints = rest_endpoints;
445
+ exports.roundOperatorFee = roundOperatorFee;
446
+ exports.sortNumbers = sortNumbers;
447
+ exports.stringifyBigints = stringifyBigints;
448
+ exports.tryCatch = tryCatch;
449
+ exports.validateConsistentOperatorIds = validateConsistentOperatorIds;
450
+ exports.validateConsistentOperatorPublicKeys = validateConsistentOperatorPublicKeys;