@ssv-labs/ssv-sdk 0.0.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.
- package/LICENSE +674 -0
- package/README.html +102 -0
- package/README.md +136 -0
- package/README.pdf +0 -0
- package/dist/abi/holesky/v4/getter.d.ts +824 -0
- package/dist/abi/holesky/v4/setter.d.ts +1662 -0
- package/dist/abi/mainnet/v4/getter.d.ts +824 -0
- package/dist/abi/mainnet/v4/setter.d.ts +1677 -0
- package/dist/abi/token.d.ts +292 -0
- package/dist/api/ssv-api/index.d.ts +16 -0
- package/dist/api/subgraph/index.d.ts +101 -0
- package/dist/config/chains.d.ts +94 -0
- package/dist/config/create.d.ts +45 -0
- package/dist/config/globals.d.ts +33 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config-DPI30L0i.js +5159 -0
- package/dist/config-DlwfpwZd.mjs +5161 -0
- package/dist/contract-interactions/create.d.ts +3 -0
- package/dist/contract-interactions/index.d.ts +1 -0
- package/dist/contract-interactions/types.d.ts +93 -0
- package/dist/graphql/graphql.d.ts +3249 -0
- package/dist/libs/api/index.d.ts +81 -0
- package/dist/libs/cluster/index.d.ts +5636 -0
- package/dist/libs/cluster/methods/deposit.d.ts +286 -0
- package/dist/libs/cluster/methods/exit-validators.d.ts +283 -0
- package/dist/libs/cluster/methods/index.d.ts +8 -0
- package/dist/libs/cluster/methods/liquidate-cluster.d.ts +281 -0
- package/dist/libs/cluster/methods/reactivate-cluster.d.ts +282 -0
- package/dist/libs/cluster/methods/register-validators.d.ts +3652 -0
- package/dist/libs/cluster/methods/remove-validators.d.ts +283 -0
- package/dist/libs/cluster/methods/set-fee-recipient.d.ts +282 -0
- package/dist/libs/cluster/methods/withdraw.d.ts +282 -0
- package/dist/libs/operator/index.d.ts +4005 -0
- package/dist/libs/operator/methods.d.ts +844 -0
- package/dist/libs/utils/index.d.ts +32 -0
- package/dist/libs/utils/methods/get-cluster-balance.d.ts +9 -0
- package/dist/libs/utils/methods/index.d.ts +4 -0
- package/dist/libs/utils/methods/keyshares.d.ts +21 -0
- package/dist/libs/utils/methods/keystores.d.ts +13 -0
- package/dist/libs/utils/methods/methods.d.ts +2 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.js +36437 -0
- package/dist/main.mjs +36437 -0
- package/dist/mock/api.d.ts +3 -0
- package/dist/mock/config.d.ts +6 -0
- package/dist/mock/index.d.ts +8 -0
- package/dist/sdk.d.ts +14 -0
- package/dist/types/contract-interactions.d.ts +21 -0
- package/dist/types/methods.d.ts +3 -0
- package/dist/types/operator.d.ts +9 -0
- package/dist/types/utils.d.ts +3 -0
- package/dist/utils/bigint.d.ts +29 -0
- package/dist/utils/cluster.d.ts +8 -0
- package/dist/utils/contract.d.ts +3 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/keyshares.d.ts +21 -0
- package/dist/utils/number.d.ts +21 -0
- package/dist/utils/operator.d.ts +5 -0
- package/dist/utils/try-catch.d.ts +1 -0
- package/dist/utils/url-join.d.ts +1 -0
- package/dist/utils/zod/config.d.ts +9 -0
- package/dist/utils.js +43 -0
- package/dist/utils.mjs +43 -0
- package/package.json +136 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ConfigReturnType } from '../../config/create';
|
|
2
|
+
import { RemoveConfigArg } from '../../types/methods';
|
|
3
|
+
export declare const createUtils: (config: ConfigReturnType) => {
|
|
4
|
+
generateKeyShares: (args: {
|
|
5
|
+
operator_keys: string[];
|
|
6
|
+
operator_ids: number[];
|
|
7
|
+
keystore: string | string[];
|
|
8
|
+
keystore_password: string;
|
|
9
|
+
owner_address: string;
|
|
10
|
+
nonce: number;
|
|
11
|
+
}) => Promise<import('ssv-keys/dist/tsc/src/lib/KeyShares/KeySharesData/KeySharesPayload').KeySharesPayload[]>;
|
|
12
|
+
validateKeysharesJSON: ({ account, operators, keyshares, }: {
|
|
13
|
+
account: `0x${string}`;
|
|
14
|
+
operators: Pick<import('../../types/operator').Operator, "id" | "publicKey">[];
|
|
15
|
+
keyshares: string | object;
|
|
16
|
+
}) => Promise<import('ssv-keys').KeySharesItem[]>;
|
|
17
|
+
validateSharesPreRegistration: RemoveConfigArg<(config: ConfigReturnType, { keyshares, operatorIds }: {
|
|
18
|
+
keyshares: string | object;
|
|
19
|
+
operatorIds: string[];
|
|
20
|
+
}) => Promise<{
|
|
21
|
+
available: import('ssv-keys').KeySharesItem[];
|
|
22
|
+
registered: import('ssv-keys').KeySharesItem[];
|
|
23
|
+
incorrect: import('ssv-keys').KeySharesItem[];
|
|
24
|
+
}>>;
|
|
25
|
+
getOperatorCapacity: RemoveConfigArg<(config: ConfigReturnType, operatorId: string) => Promise<number>>;
|
|
26
|
+
getClusterBalance: RemoveConfigArg<(config: ConfigReturnType, { operatorIds }: {
|
|
27
|
+
operatorIds: number[];
|
|
28
|
+
}) => Promise<{
|
|
29
|
+
balance: bigint;
|
|
30
|
+
operationalRunway: bigint;
|
|
31
|
+
}>>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigReturnType } from '../../../config/create';
|
|
2
|
+
type GetClusterBalanceArgs = {
|
|
3
|
+
operatorIds: number[];
|
|
4
|
+
};
|
|
5
|
+
export declare const getClusterBalance: (config: ConfigReturnType, { operatorIds }: GetClusterBalanceArgs) => Promise<{
|
|
6
|
+
balance: bigint;
|
|
7
|
+
operationalRunway: bigint;
|
|
8
|
+
}>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConfigReturnType } from '../../../config/create';
|
|
2
|
+
import { Operator } from '../../../types/operator';
|
|
3
|
+
import { KeySharesItem } from 'ssv-keys';
|
|
4
|
+
import { Address, Hash } from 'viem';
|
|
5
|
+
type ValidatedKeysharesArgs = {
|
|
6
|
+
keyshares: string | object;
|
|
7
|
+
operatorIds: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare const validateSharesPreRegistration: (config: ConfigReturnType, { keyshares, operatorIds }: ValidatedKeysharesArgs) => Promise<{
|
|
10
|
+
available: KeySharesItem[];
|
|
11
|
+
registered: KeySharesItem[];
|
|
12
|
+
incorrect: KeySharesItem[];
|
|
13
|
+
}>;
|
|
14
|
+
type ValidatedKeysharesJSONArgs = {
|
|
15
|
+
account: Address;
|
|
16
|
+
operators: Pick<Operator, 'id' | 'publicKey'>[];
|
|
17
|
+
keyshares: string | object;
|
|
18
|
+
};
|
|
19
|
+
export declare const validateKeysharesJSON: ({ account, operators, keyshares, }: ValidatedKeysharesJSONArgs) => Promise<KeySharesItem[]>;
|
|
20
|
+
export declare const validateEvent: (config: ConfigReturnType, hash: Hash) => Promise<any>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SSVKeys } from 'ssv-keys';
|
|
2
|
+
import { KeySharesPayload } from 'ssv-keys/dist/tsc/src/lib/KeyShares/KeySharesData/KeySharesPayload';
|
|
3
|
+
export declare const ssvKeys: SSVKeys;
|
|
4
|
+
type GenerateKeySharesArgs = {
|
|
5
|
+
operator_keys: string[];
|
|
6
|
+
operator_ids: number[];
|
|
7
|
+
keystore: string | string[];
|
|
8
|
+
keystore_password: string;
|
|
9
|
+
owner_address: string;
|
|
10
|
+
nonce: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const generateKeyShares: (args: GenerateKeySharesArgs) => Promise<KeySharesPayload[]>;
|
|
13
|
+
export {};
|
package/dist/main.d.ts
ADDED