@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.
- package/dist/KeyShares-7biQfDev.js +19422 -0
- package/dist/KeyShares-DEqBZits.mjs +19423 -0
- package/dist/api/subgraph/index.d.ts +15 -54
- package/dist/config/chains.d.ts +17 -51
- package/dist/config/create.d.ts +7 -3
- package/dist/globals-CkyOvtF5.js +450 -0
- package/dist/globals-DlonCtsi.mjs +451 -0
- package/dist/graphql/graphql.d.ts +10 -33
- package/dist/keys.js +9 -0
- package/dist/keys.mjs +9 -0
- package/dist/libs/api/index.d.ts +9 -69
- package/dist/libs/cluster/index.d.ts +11 -5638
- package/dist/libs/cluster/methods/deposit.d.ts +1 -1
- package/dist/libs/cluster/methods/exit-validators.d.ts +1 -1
- package/dist/libs/cluster/methods/liquidate-cluster.d.ts +1 -1
- package/dist/libs/cluster/methods/reactivate-cluster.d.ts +1 -1
- package/dist/libs/cluster/methods/register-validators.d.ts +3 -2
- package/dist/libs/cluster/methods/remove-validators.d.ts +1 -1
- package/dist/libs/cluster/methods/set-fee-recipient.d.ts +1 -1
- package/dist/libs/cluster/methods/withdraw.d.ts +1 -1
- package/dist/libs/operator/index.d.ts +94 -911
- package/dist/libs/operator/methods.d.ts +3 -3
- package/dist/libs/ssv-keys/BLS/index.d.ts +2 -0
- package/dist/libs/ssv-keys/Encryption/Encryption.d.ts +7 -0
- package/dist/libs/ssv-keys/Encryption/__test__/RsaKeys.d.ts +3 -0
- package/dist/libs/ssv-keys/Encryption/utils.d.ts +55 -0
- package/dist/libs/ssv-keys/EthereumKeyStore/EthereumKeyStore.d.ts +23 -0
- package/dist/libs/ssv-keys/EthereumKeyStore/index.d.ts +1 -0
- package/dist/libs/ssv-keys/KeyShares/KeyShares.d.ts +32 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/KeySharesData.d.ts +21 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/KeySharesPayload.d.ts +32 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/OperatorData.d.ts +10 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/encrypted-key.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/index.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/match.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/operator-public-key.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/operator-unique.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/owner-address.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/owner-nonce.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesData/validators/public-key.d.ts +6 -0
- package/dist/libs/ssv-keys/KeyShares/KeySharesItem.d.ts +60 -0
- package/dist/libs/ssv-keys/SSVKeys.d.ts +66 -0
- package/dist/libs/ssv-keys/Threshold/Threshold.d.ts +28 -0
- package/dist/libs/ssv-keys/Threshold/__test__/helper/share_signatures.d.ts +7 -0
- package/dist/libs/ssv-keys/Threshold/index.d.ts +1 -0
- package/dist/libs/ssv-keys/exceptions/base.d.ts +4 -0
- package/dist/libs/ssv-keys/exceptions/bls.d.ts +9 -0
- package/dist/libs/ssv-keys/exceptions/index.d.ts +2 -0
- package/dist/libs/ssv-keys/exceptions/keyshares.d.ts +5 -0
- package/dist/libs/ssv-keys/exceptions/keystore.d.ts +27 -0
- package/dist/libs/ssv-keys/exceptions/operator.d.ts +22 -0
- package/dist/libs/ssv-keys/helpers/operator.helper.d.ts +7 -0
- package/dist/libs/ssv-keys/helpers/web3.helper.d.ts +36 -0
- package/dist/libs/ssv-keys/index.d.ts +4 -0
- package/dist/libs/ssv-keys/interfaces/IEncryptShare.d.ts +5 -0
- package/dist/libs/ssv-keys/interfaces/IKeySharesData.d.ts +18 -0
- package/dist/libs/ssv-keys/interfaces/IKeySharesPayload.d.ts +13 -0
- package/dist/libs/ssv-keys/interfaces/IOperator.d.ts +4 -0
- package/dist/libs/ssv-keys/interfaces/IOperatorData.d.ts +5 -0
- package/dist/libs/ssv-keys/interfaces/IShares.d.ts +10 -0
- package/dist/libs/ssv-keys/interfaces/index.d.ts +6 -0
- package/dist/libs/ssv-keys/validators/index.d.ts +2 -0
- package/dist/libs/ssv-keys/validators/operatorPublicKey.validator.d.ts +1 -0
- package/dist/libs/ssv-keys/validators/operatorsLength.validator.d.ts +1 -0
- package/dist/libs/utils/index.d.ts +8 -18
- package/dist/libs/utils/methods/keyshares.d.ts +5 -2
- package/dist/libs/utils/methods/keystores.d.ts +2 -2
- package/dist/main.d.ts +1 -0
- package/dist/main.js +3976 -35215
- package/dist/main.mjs +3977 -35215
- package/dist/mock/api.d.ts +1 -1
- package/dist/types/contract-interactions.d.ts +2 -2
- package/dist/utils/cluster.d.ts +1 -1
- package/dist/utils/contract.d.ts +2 -1
- package/dist/utils/keyshares.d.ts +2 -2
- package/dist/utils/number.d.ts +1 -1
- package/dist/utils/zod/config.d.ts +10 -5
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +34 -34
- package/package.json +76 -61
- package/dist/abi/holesky/v4/getter.d.ts +0 -824
- package/dist/abi/holesky/v4/setter.d.ts +0 -1662
- package/dist/globals-BHuFvs8-.mjs +0 -5511
- package/dist/globals-DCoa7oI7.js +0 -5509
|
@@ -15,7 +15,7 @@ export declare const getCluster: (client: GraphQLClient, args: GetClusterQueryVa
|
|
|
15
15
|
balance: string;
|
|
16
16
|
index: string;
|
|
17
17
|
networkFeeIndex: string;
|
|
18
|
-
operatorIds: string
|
|
18
|
+
operatorIds: Array<string>;
|
|
19
19
|
} | null | undefined>;
|
|
20
20
|
export declare const getClusters: (client: GraphQLClient, args: GetClustersQueryVariables) => Promise<{
|
|
21
21
|
id: string;
|
|
@@ -24,7 +24,7 @@ export declare const getClusters: (client: GraphQLClient, args: GetClustersQuery
|
|
|
24
24
|
balance: string;
|
|
25
25
|
index: string;
|
|
26
26
|
networkFeeIndex: string;
|
|
27
|
-
operatorIds: string
|
|
27
|
+
operatorIds: Array<string>;
|
|
28
28
|
}[]>;
|
|
29
29
|
export declare const getOperator: (client: GraphQLClient, args: GetOperatorQueryVariables) => Promise<{
|
|
30
30
|
publicKey: string;
|
|
@@ -32,7 +32,7 @@ export declare const getOperator: (client: GraphQLClient, args: GetOperatorQuery
|
|
|
32
32
|
id: string;
|
|
33
33
|
validatorCount: string;
|
|
34
34
|
isPrivate: boolean;
|
|
35
|
-
whitelistedContract:
|
|
35
|
+
whitelistedContract: import('abitype').Address;
|
|
36
36
|
} | null>;
|
|
37
37
|
export declare const getOperators: (client: GraphQLClient, args: GetOperatorsQueryVariables) => Promise<{
|
|
38
38
|
publicKey: string;
|
|
@@ -40,62 +40,23 @@ export declare const getOperators: (client: GraphQLClient, args: GetOperatorsQue
|
|
|
40
40
|
id: string;
|
|
41
41
|
validatorCount: string;
|
|
42
42
|
isPrivate: boolean;
|
|
43
|
-
whitelistedContract:
|
|
43
|
+
whitelistedContract: import('abitype').Address;
|
|
44
44
|
}[]>;
|
|
45
45
|
export declare const getValidators: (client: GraphQLClient, args: GetValidatorsQueryVariables) => Promise<{
|
|
46
|
-
id:
|
|
46
|
+
id: import('abitype').Address;
|
|
47
47
|
}[]>;
|
|
48
48
|
export declare const getValidator: (client: GraphQLClient, args: GetValidatorQueryVariables) => Promise<{
|
|
49
|
-
id:
|
|
49
|
+
id: import('abitype').Address;
|
|
50
50
|
} | null | undefined>;
|
|
51
51
|
export declare const getClusterBalance: (client: GraphQLClient, args: GetClusterBalanceQueryVariables) => Promise<import('../../graphql/graphql').GetClusterBalanceQuery>;
|
|
52
52
|
export declare const getQueries: (client: GraphQLClient) => {
|
|
53
|
-
getOwnerNonce: RemoveConfigArg<
|
|
54
|
-
getClusterSnapshot: RemoveConfigArg<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
active: boolean;
|
|
63
|
-
validatorCount: string;
|
|
64
|
-
balance: string;
|
|
65
|
-
index: string;
|
|
66
|
-
networkFeeIndex: string;
|
|
67
|
-
operatorIds: string[];
|
|
68
|
-
} | null | undefined>>;
|
|
69
|
-
getClusters: RemoveConfigArg<(client: GraphQLClient, args: GetClustersQueryVariables) => Promise<{
|
|
70
|
-
id: string;
|
|
71
|
-
active: boolean;
|
|
72
|
-
validatorCount: string;
|
|
73
|
-
balance: string;
|
|
74
|
-
index: string;
|
|
75
|
-
networkFeeIndex: string;
|
|
76
|
-
operatorIds: string[];
|
|
77
|
-
}[]>>;
|
|
78
|
-
getOperator: RemoveConfigArg<(client: GraphQLClient, args: GetOperatorQueryVariables) => Promise<{
|
|
79
|
-
publicKey: string;
|
|
80
|
-
whitelisted: `0x${string}`[];
|
|
81
|
-
id: string;
|
|
82
|
-
validatorCount: string;
|
|
83
|
-
isPrivate: boolean;
|
|
84
|
-
whitelistedContract: `0x${string}`;
|
|
85
|
-
} | null>>;
|
|
86
|
-
getOperators: RemoveConfigArg<(client: GraphQLClient, args: GetOperatorsQueryVariables) => Promise<{
|
|
87
|
-
publicKey: string;
|
|
88
|
-
whitelisted: `0x${string}`[];
|
|
89
|
-
id: string;
|
|
90
|
-
validatorCount: string;
|
|
91
|
-
isPrivate: boolean;
|
|
92
|
-
whitelistedContract: `0x${string}`;
|
|
93
|
-
}[]>>;
|
|
94
|
-
getValidators: RemoveConfigArg<(client: GraphQLClient, args: GetValidatorsQueryVariables) => Promise<{
|
|
95
|
-
id: `0x${string}`;
|
|
96
|
-
}[]>>;
|
|
97
|
-
getValidator: RemoveConfigArg<(client: GraphQLClient, args: GetValidatorQueryVariables) => Promise<{
|
|
98
|
-
id: `0x${string}`;
|
|
99
|
-
} | null | undefined>>;
|
|
100
|
-
getClusterBalance: RemoveConfigArg<(client: GraphQLClient, args: GetClusterBalanceQueryVariables) => Promise<import('../../graphql/graphql').GetClusterBalanceQuery>>;
|
|
53
|
+
getOwnerNonce: RemoveConfigArg<typeof getOwnerNonce>;
|
|
54
|
+
getClusterSnapshot: RemoveConfigArg<typeof getClusterSnapshot>;
|
|
55
|
+
getCluster: RemoveConfigArg<typeof getCluster>;
|
|
56
|
+
getClusters: RemoveConfigArg<typeof getClusters>;
|
|
57
|
+
getOperator: RemoveConfigArg<typeof getOperator>;
|
|
58
|
+
getOperators: RemoveConfigArg<typeof getOperators>;
|
|
59
|
+
getValidators: RemoveConfigArg<typeof getValidators>;
|
|
60
|
+
getValidator: RemoveConfigArg<typeof getValidator>;
|
|
61
|
+
getClusterBalance: RemoveConfigArg<typeof getClusterBalance>;
|
|
101
62
|
};
|
package/dist/config/chains.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export declare const hoodi: {
|
|
|
11
11
|
url: string;
|
|
12
12
|
apiUrl?: string | undefined;
|
|
13
13
|
};
|
|
14
|
-
} | undefined;
|
|
14
|
+
} | undefined | undefined;
|
|
15
|
+
blockTime?: number | undefined | undefined;
|
|
15
16
|
contracts?: {
|
|
16
17
|
[x: string]: import('viem').ChainContract | {
|
|
17
18
|
[sourceId: number]: import('viem').ChainContract | undefined;
|
|
@@ -21,6 +22,7 @@ export declare const hoodi: {
|
|
|
21
22
|
multicall3?: import('viem').ChainContract | undefined;
|
|
22
23
|
universalSignatureVerifier?: import('viem').ChainContract | undefined;
|
|
23
24
|
} | undefined;
|
|
25
|
+
ensTlds?: readonly string[] | undefined;
|
|
24
26
|
id: 560048;
|
|
25
27
|
name: "Hoodi";
|
|
26
28
|
nativeCurrency: {
|
|
@@ -33,7 +35,7 @@ export declare const hoodi: {
|
|
|
33
35
|
readonly http: readonly ["https://rpc.hoodi.ethpandaops.io"];
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
|
-
sourceId?: number | undefined;
|
|
38
|
+
sourceId?: number | undefined | undefined;
|
|
37
39
|
testnet: true;
|
|
38
40
|
custom?: Record<string, unknown> | undefined;
|
|
39
41
|
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
@@ -49,6 +51,7 @@ export declare const chains: {
|
|
|
49
51
|
readonly apiUrl: "https://api.etherscan.io/api";
|
|
50
52
|
};
|
|
51
53
|
};
|
|
54
|
+
blockTime?: number | undefined | undefined;
|
|
52
55
|
contracts: {
|
|
53
56
|
readonly ensRegistry: {
|
|
54
57
|
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
@@ -62,6 +65,7 @@ export declare const chains: {
|
|
|
62
65
|
readonly blockCreated: 14353601;
|
|
63
66
|
};
|
|
64
67
|
};
|
|
68
|
+
ensTlds?: readonly string[] | undefined;
|
|
65
69
|
id: 1;
|
|
66
70
|
name: "Ethereum";
|
|
67
71
|
nativeCurrency: {
|
|
@@ -71,56 +75,15 @@ export declare const chains: {
|
|
|
71
75
|
};
|
|
72
76
|
rpcUrls: {
|
|
73
77
|
readonly default: {
|
|
74
|
-
readonly http: readonly ["https://
|
|
78
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
75
79
|
};
|
|
76
80
|
};
|
|
77
|
-
sourceId?: number | undefined;
|
|
78
|
-
testnet?: boolean | undefined;
|
|
81
|
+
sourceId?: number | undefined | undefined;
|
|
82
|
+
testnet?: boolean | undefined | undefined;
|
|
79
83
|
custom?: Record<string, unknown> | undefined;
|
|
80
84
|
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
81
85
|
formatters?: undefined;
|
|
82
|
-
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable
|
|
83
|
-
};
|
|
84
|
-
readonly holesky: {
|
|
85
|
-
blockExplorers: {
|
|
86
|
-
readonly default: {
|
|
87
|
-
readonly name: "Etherscan";
|
|
88
|
-
readonly url: "https://holesky.etherscan.io";
|
|
89
|
-
readonly apiUrl: "https://api-holesky.etherscan.io/api";
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
contracts: {
|
|
93
|
-
readonly multicall3: {
|
|
94
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
95
|
-
readonly blockCreated: 77;
|
|
96
|
-
};
|
|
97
|
-
readonly ensRegistry: {
|
|
98
|
-
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
99
|
-
readonly blockCreated: 801613;
|
|
100
|
-
};
|
|
101
|
-
readonly ensUniversalResolver: {
|
|
102
|
-
readonly address: "0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b";
|
|
103
|
-
readonly blockCreated: 973484;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
id: 17000;
|
|
107
|
-
name: "Holesky";
|
|
108
|
-
nativeCurrency: {
|
|
109
|
-
readonly name: "Holesky Ether";
|
|
110
|
-
readonly symbol: "ETH";
|
|
111
|
-
readonly decimals: 18;
|
|
112
|
-
};
|
|
113
|
-
rpcUrls: {
|
|
114
|
-
readonly default: {
|
|
115
|
-
readonly http: readonly ["https://ethereum-holesky-rpc.publicnode.com"];
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
sourceId?: number | undefined;
|
|
119
|
-
testnet: true;
|
|
120
|
-
custom?: Record<string, unknown> | undefined;
|
|
121
|
-
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
122
|
-
formatters?: undefined;
|
|
123
|
-
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable<bigint, number>> | undefined;
|
|
86
|
+
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
124
87
|
};
|
|
125
88
|
readonly hoodi: {
|
|
126
89
|
blockExplorers?: {
|
|
@@ -134,7 +97,8 @@ export declare const chains: {
|
|
|
134
97
|
url: string;
|
|
135
98
|
apiUrl?: string | undefined;
|
|
136
99
|
};
|
|
137
|
-
} | undefined;
|
|
100
|
+
} | undefined | undefined;
|
|
101
|
+
blockTime?: number | undefined | undefined;
|
|
138
102
|
contracts?: {
|
|
139
103
|
[x: string]: import('viem').ChainContract | {
|
|
140
104
|
[sourceId: number]: import('viem').ChainContract | undefined;
|
|
@@ -144,6 +108,7 @@ export declare const chains: {
|
|
|
144
108
|
multicall3?: import('viem').ChainContract | undefined;
|
|
145
109
|
universalSignatureVerifier?: import('viem').ChainContract | undefined;
|
|
146
110
|
} | undefined;
|
|
111
|
+
ensTlds?: readonly string[] | undefined;
|
|
147
112
|
id: 560048;
|
|
148
113
|
name: "Hoodi";
|
|
149
114
|
nativeCurrency: {
|
|
@@ -156,7 +121,7 @@ export declare const chains: {
|
|
|
156
121
|
readonly http: readonly ["https://rpc.hoodi.ethpandaops.io"];
|
|
157
122
|
};
|
|
158
123
|
};
|
|
159
|
-
sourceId?: number | undefined;
|
|
124
|
+
sourceId?: number | undefined | undefined;
|
|
160
125
|
testnet: true;
|
|
161
126
|
custom?: Record<string, unknown> | undefined;
|
|
162
127
|
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
@@ -164,10 +129,11 @@ export declare const chains: {
|
|
|
164
129
|
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
165
130
|
};
|
|
166
131
|
};
|
|
167
|
-
export declare const chainIds: (1 | 560048
|
|
168
|
-
export declare const networks: ("Hoodi" | "Ethereum"
|
|
132
|
+
export declare const chainIds: (1 | 560048)[];
|
|
133
|
+
export declare const networks: ("Hoodi" | "Ethereum")[];
|
|
169
134
|
export type SupportedChainsIDs = (typeof chainIds)[number];
|
|
170
135
|
export declare const graph_endpoints: Record<SupportedChainsIDs, string>;
|
|
136
|
+
export declare const paid_graph_endpoints: Record<SupportedChainsIDs, string>;
|
|
171
137
|
export declare const rest_endpoints: Record<SupportedChainsIDs, string>;
|
|
172
138
|
export type ContractAddresses = {
|
|
173
139
|
setter: Address;
|
package/dist/config/create.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export type ConfigReturnType = {
|
|
|
9
9
|
walletClient: WalletClient;
|
|
10
10
|
chain: Chain;
|
|
11
11
|
api: ReturnType<typeof createQueries> & ReturnType<typeof createSSVAPI>;
|
|
12
|
-
graphQLClient: GraphQLClient;
|
|
13
12
|
contractAddresses: {
|
|
14
13
|
setter: Address;
|
|
15
14
|
getter: Address;
|
|
@@ -22,8 +21,13 @@ export type ConfigReturnType = {
|
|
|
22
21
|
};
|
|
23
22
|
token: ContractInteractions<'token'>;
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
subgraph: {
|
|
25
|
+
client: GraphQLClient;
|
|
26
|
+
endpoint: string;
|
|
27
|
+
};
|
|
28
|
+
rest: {
|
|
29
|
+
endpoint: string;
|
|
30
|
+
};
|
|
27
31
|
};
|
|
28
32
|
export declare const isConfig: (props: unknown) => props is ConfigReturnType;
|
|
29
33
|
type CreateContractInteractionsArgs = {
|