@ssv-labs/ssv-sdk 0.0.5 → 0.1.0

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