@ssv-labs/ssv-sdk 0.0.3 → 0.0.5

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,9 +1,16 @@
1
- import { PublicClient, WalletClient } from 'viem';
1
+ import { Address, PublicClient, WalletClient } from 'viem';
2
2
  import { z } from 'zod';
3
- type ZodConfigArgs = {
4
- walletClient: z.ZodType<WalletClient>;
5
- publicClient: z.ZodType<PublicClient>;
3
+ export declare const configArgsSchema: z.ZodType<ConfigArgs, z.ZodTypeDef, ConfigArgs>;
4
+ export type ConfigArgs = {
5
+ walletClient: WalletClient;
6
+ publicClient: PublicClient;
7
+ _?: {
8
+ graphUrl?: string;
9
+ restUrl?: string;
10
+ contractAddresses?: {
11
+ setter?: Address;
12
+ getter?: Address;
13
+ token?: Address;
14
+ };
15
+ };
6
16
  };
7
- export declare const configArgsSchema: z.ZodObject<ZodConfigArgs>;
8
- export type ConfigArgs = z.infer<z.ZodObject<ZodConfigArgs>>;
9
- export {};
package/dist/utils.js CHANGED
@@ -1,43 +1,43 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const config = require("./config-DPI30L0i.js");
4
- const waitForTransaction = async (config2, fn) => {
3
+ const globals = require("./globals-fh7gkHKO.js");
4
+ const waitForTransaction = async (config, fn) => {
5
5
  const hash = await fn;
6
- return config2.publicClient.waitForTransactionReceipt({ hash });
6
+ return config.publicClient.waitForTransactionReceipt({ hash });
7
7
  };
8
- exports.KeysharesValidationError = config.KeysharesValidationError;
9
- exports.KeysharesValidationErrors = config.KeysharesValidationErrors;
10
- exports.KeysharesValidationErrorsMessages = config.KeysharesValidationErrorsMessages;
11
- exports._percentageFormatter = config._percentageFormatter;
12
- exports.add0x = config.add0x;
13
- exports.bigintAbs = config.bigintAbs;
14
- exports.bigintFloor = config.bigintFloor;
15
- exports.bigintFormatter = config.bigintFormatter;
16
- exports.bigintMax = config.bigintMax;
17
- exports.bigintMin = config.bigintMin;
18
- exports.bigintRound = config.bigintRound;
19
- exports.bigintifyNumbers = config.bigintifyNumbers;
20
- exports.configArgsSchema = config.configArgsSchema;
21
- exports.createClusterId = config.createClusterId;
22
- exports.createEmptyCluster = config.createEmptyCluster;
23
- exports.decodeOperatorPublicKey = config.decodeOperatorPublicKey;
24
- exports.ensureNoKeysharesErrors = config.ensureNoKeysharesErrors;
25
- exports.ensureValidatorsUniqueness = config.ensureValidatorsUniqueness;
26
- exports.ethFormatter = config.ethFormatter;
27
- exports.formatBigintInput = config.formatBigintInput;
28
- exports.formatSSV = config.formatSSV;
29
- exports.getClusterSnapshot = config.getClusterSnapshot;
30
- exports.getOperatorIds = config.getOperatorIds;
31
- exports.isBigIntChanged = config.isBigIntChanged;
32
- exports.isClusterId = config.isClusterId;
33
- exports.isKeySharesItem = config.isKeySharesItem;
34
- exports.ms = config.ms;
35
- exports.numberFormatter = config.numberFormatter;
36
- exports.percentageFormatter = config.percentageFormatter;
37
- exports.roundOperatorFee = config.roundOperatorFee;
38
- exports.sortNumbers = config.sortNumbers;
39
- exports.stringifyBigints = config.stringifyBigints;
40
- exports.tryCatch = config.tryCatch;
41
- exports.validateConsistentOperatorIds = config.validateConsistentOperatorIds;
42
- exports.validateConsistentOperatorPublicKeys = config.validateConsistentOperatorPublicKeys;
8
+ exports.KeysharesValidationError = globals.KeysharesValidationError;
9
+ exports.KeysharesValidationErrors = globals.KeysharesValidationErrors;
10
+ exports.KeysharesValidationErrorsMessages = globals.KeysharesValidationErrorsMessages;
11
+ exports._percentageFormatter = globals._percentageFormatter;
12
+ exports.add0x = globals.add0x;
13
+ exports.bigintAbs = globals.bigintAbs;
14
+ exports.bigintFloor = globals.bigintFloor;
15
+ exports.bigintFormatter = globals.bigintFormatter;
16
+ exports.bigintMax = globals.bigintMax;
17
+ exports.bigintMin = globals.bigintMin;
18
+ exports.bigintRound = globals.bigintRound;
19
+ exports.bigintifyNumbers = globals.bigintifyNumbers;
20
+ exports.configArgsSchema = globals.configArgsSchema;
21
+ exports.createClusterId = globals.createClusterId;
22
+ exports.createEmptyCluster = globals.createEmptyCluster;
23
+ exports.decodeOperatorPublicKey = globals.decodeOperatorPublicKey;
24
+ exports.ensureNoKeysharesErrors = globals.ensureNoKeysharesErrors;
25
+ exports.ensureValidatorsUniqueness = globals.ensureValidatorsUniqueness;
26
+ exports.ethFormatter = globals.ethFormatter;
27
+ exports.formatBigintInput = globals.formatBigintInput;
28
+ exports.formatSSV = globals.formatSSV;
29
+ exports.getClusterSnapshot = globals.getClusterSnapshot;
30
+ exports.getOperatorIds = globals.getOperatorIds;
31
+ exports.isBigIntChanged = globals.isBigIntChanged;
32
+ exports.isClusterId = globals.isClusterId;
33
+ exports.isKeySharesItem = globals.isKeySharesItem;
34
+ exports.ms = globals.ms;
35
+ exports.numberFormatter = globals.numberFormatter;
36
+ exports.percentageFormatter = globals.percentageFormatter;
37
+ exports.roundOperatorFee = globals.roundOperatorFee;
38
+ exports.sortNumbers = globals.sortNumbers;
39
+ exports.stringifyBigints = globals.stringifyBigints;
40
+ exports.tryCatch = globals.tryCatch;
41
+ exports.validateConsistentOperatorIds = globals.validateConsistentOperatorIds;
42
+ exports.validateConsistentOperatorPublicKeys = globals.validateConsistentOperatorPublicKeys;
43
43
  exports.waitForTransaction = waitForTransaction;
package/dist/utils.mjs CHANGED
@@ -1,43 +1,43 @@
1
- import { K, y, H, _, G, C, B, L, p, z, A, E, k, n, o, d, q, u, N, P, O, l, R, D, F, m, Q, I, J, r, x, s, t, w, v } from "./config-DlwfpwZd.mjs";
1
+ import { K, F, V, _, T, O, N, Y, z, J, L, Q, k, v, w, d, A, B, Z, a0, $, o, a2, P, R, q, a1, W, X, x, E, s, t, D, C } from "./globals-DsbufPrE.mjs";
2
2
  const waitForTransaction = async (config, fn) => {
3
3
  const hash = await fn;
4
4
  return config.publicClient.waitForTransactionReceipt({ hash });
5
5
  };
6
6
  export {
7
7
  K as KeysharesValidationError,
8
- y as KeysharesValidationErrors,
9
- H as KeysharesValidationErrorsMessages,
8
+ F as KeysharesValidationErrors,
9
+ V as KeysharesValidationErrorsMessages,
10
10
  _ as _percentageFormatter,
11
- G as add0x,
12
- C as bigintAbs,
13
- B as bigintFloor,
14
- L as bigintFormatter,
15
- p as bigintMax,
16
- z as bigintMin,
17
- A as bigintRound,
18
- E as bigintifyNumbers,
11
+ T as add0x,
12
+ O as bigintAbs,
13
+ N as bigintFloor,
14
+ Y as bigintFormatter,
15
+ z as bigintMax,
16
+ J as bigintMin,
17
+ L as bigintRound,
18
+ Q as bigintifyNumbers,
19
19
  k as configArgsSchema,
20
- n as createClusterId,
21
- o as createEmptyCluster,
20
+ v as createClusterId,
21
+ w as createEmptyCluster,
22
22
  d as decodeOperatorPublicKey,
23
- q as ensureNoKeysharesErrors,
24
- u as ensureValidatorsUniqueness,
25
- N as ethFormatter,
26
- P as formatBigintInput,
27
- O as formatSSV,
28
- l as getClusterSnapshot,
29
- R as getOperatorIds,
30
- D as isBigIntChanged,
31
- F as isClusterId,
32
- m as isKeySharesItem,
33
- Q as ms,
34
- I as numberFormatter,
35
- J as percentageFormatter,
36
- r as roundOperatorFee,
37
- x as sortNumbers,
23
+ A as ensureNoKeysharesErrors,
24
+ B as ensureValidatorsUniqueness,
25
+ Z as ethFormatter,
26
+ a0 as formatBigintInput,
27
+ $ as formatSSV,
28
+ o as getClusterSnapshot,
29
+ a2 as getOperatorIds,
30
+ P as isBigIntChanged,
31
+ R as isClusterId,
32
+ q as isKeySharesItem,
33
+ a1 as ms,
34
+ W as numberFormatter,
35
+ X as percentageFormatter,
36
+ x as roundOperatorFee,
37
+ E as sortNumbers,
38
38
  s as stringifyBigints,
39
39
  t as tryCatch,
40
- w as validateConsistentOperatorIds,
41
- v as validateConsistentOperatorPublicKeys,
40
+ D as validateConsistentOperatorIds,
41
+ C as validateConsistentOperatorPublicKeys,
42
42
  waitForTransaction
43
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssv-labs/ssv-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "author": "SSV.Labs",
5
5
  "description": "ssv labs sdk",
6
6
  "keywords": [