@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.
- 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 +18 -10
- package/dist/contract-interactions/types.d.ts +3 -1
- package/dist/globals-BZbDG7rK.mjs +472 -0
- package/dist/globals-iY-Y-uDY.js +471 -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 -5632
- 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/index.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 +6 -4
- 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 +119 -901
- 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 +3862 -34136
- package/dist/main.mjs +3920 -34193
- 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 +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +34 -34
- package/package.json +29 -14
- package/dist/globals-DsbufPrE.mjs +0 -5541
- package/dist/globals-fh7gkHKO.js +0 -5539
|
@@ -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,15 +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
|
|
86
|
+
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
83
87
|
};
|
|
84
88
|
readonly holesky: {
|
|
85
89
|
blockExplorers: {
|
|
@@ -89,6 +93,7 @@ export declare const chains: {
|
|
|
89
93
|
readonly apiUrl: "https://api-holesky.etherscan.io/api";
|
|
90
94
|
};
|
|
91
95
|
};
|
|
96
|
+
blockTime?: number | undefined | undefined;
|
|
92
97
|
contracts: {
|
|
93
98
|
readonly multicall3: {
|
|
94
99
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
@@ -103,6 +108,7 @@ export declare const chains: {
|
|
|
103
108
|
readonly blockCreated: 973484;
|
|
104
109
|
};
|
|
105
110
|
};
|
|
111
|
+
ensTlds?: readonly string[] | undefined;
|
|
106
112
|
id: 17000;
|
|
107
113
|
name: "Holesky";
|
|
108
114
|
nativeCurrency: {
|
|
@@ -115,12 +121,12 @@ export declare const chains: {
|
|
|
115
121
|
readonly http: readonly ["https://ethereum-holesky-rpc.publicnode.com"];
|
|
116
122
|
};
|
|
117
123
|
};
|
|
118
|
-
sourceId?: number | undefined;
|
|
124
|
+
sourceId?: number | undefined | undefined;
|
|
119
125
|
testnet: true;
|
|
120
126
|
custom?: Record<string, unknown> | undefined;
|
|
121
127
|
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
122
128
|
formatters?: undefined;
|
|
123
|
-
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable
|
|
129
|
+
serializers?: import('viem').ChainSerializers<undefined, import('viem').TransactionSerializable> | undefined;
|
|
124
130
|
};
|
|
125
131
|
readonly hoodi: {
|
|
126
132
|
blockExplorers?: {
|
|
@@ -134,7 +140,8 @@ export declare const chains: {
|
|
|
134
140
|
url: string;
|
|
135
141
|
apiUrl?: string | undefined;
|
|
136
142
|
};
|
|
137
|
-
} | undefined;
|
|
143
|
+
} | undefined | undefined;
|
|
144
|
+
blockTime?: number | undefined | undefined;
|
|
138
145
|
contracts?: {
|
|
139
146
|
[x: string]: import('viem').ChainContract | {
|
|
140
147
|
[sourceId: number]: import('viem').ChainContract | undefined;
|
|
@@ -144,6 +151,7 @@ export declare const chains: {
|
|
|
144
151
|
multicall3?: import('viem').ChainContract | undefined;
|
|
145
152
|
universalSignatureVerifier?: import('viem').ChainContract | undefined;
|
|
146
153
|
} | undefined;
|
|
154
|
+
ensTlds?: readonly string[] | undefined;
|
|
147
155
|
id: 560048;
|
|
148
156
|
name: "Hoodi";
|
|
149
157
|
nativeCurrency: {
|
|
@@ -156,7 +164,7 @@ export declare const chains: {
|
|
|
156
164
|
readonly http: readonly ["https://rpc.hoodi.ethpandaops.io"];
|
|
157
165
|
};
|
|
158
166
|
};
|
|
159
|
-
sourceId?: number | undefined;
|
|
167
|
+
sourceId?: number | undefined | undefined;
|
|
160
168
|
testnet: true;
|
|
161
169
|
custom?: Record<string, unknown> | undefined;
|
|
162
170
|
fees?: import('viem').ChainFees<undefined> | undefined;
|
|
@@ -4,7 +4,7 @@ import { TokenABI } from '../abi/token';
|
|
|
4
4
|
import { AbiInputsToParams } from '../types/contract-interactions';
|
|
5
5
|
import { Prettify } from '../types/utils';
|
|
6
6
|
import { Abi, Address, ExtractAbiFunctions } from 'abitype';
|
|
7
|
-
import { ContractFunctionArgs, ContractFunctionName, DecodeEventLogReturnType, Hash, PublicClient, ReadContractReturnType, SimulateContractParameters, SimulateContractReturnType, WaitForTransactionReceiptReturnType, WalletClient } from 'viem';
|
|
7
|
+
import { ContractFunctionArgs, ContractFunctionName, DecodeEventLogReturnType, Hash, Hex, PublicClient, ReadContractReturnType, SimulateContractParameters, SimulateContractReturnType, WaitForTransactionReceiptReturnType, WalletClient } from 'viem';
|
|
8
8
|
export type SupportedAbis = typeof TokenABI | typeof MainnetV4GetterABI | typeof MainnetV4SetterABI;
|
|
9
9
|
export type TokenEvents = DecodeEventLogReturnType<typeof TokenABI>;
|
|
10
10
|
export type MainnetEvents = DecodeEventLogReturnType<typeof MainnetV4SetterABI>;
|
|
@@ -67,6 +67,7 @@ export type WriterFunctions<ContractName extends ContractNames, Fns extends Cont
|
|
|
67
67
|
simulate: (props?: Prettify<(K['stateMutability'] extends 'payable' ? {
|
|
68
68
|
value?: bigint;
|
|
69
69
|
} : object) & WriteOptions<K>>) => SimulateContractReturnType<SupportedAbis, K['name']>;
|
|
70
|
+
getTransactionData: () => Hex;
|
|
70
71
|
} : {
|
|
71
72
|
(props: Prettify<((K['stateMutability'] extends 'payable' ? {
|
|
72
73
|
value?: bigint;
|
|
@@ -78,6 +79,7 @@ export type WriterFunctions<ContractName extends ContractNames, Fns extends Cont
|
|
|
78
79
|
} : object) & (K['inputs'] extends readonly [] ? object : {
|
|
79
80
|
args: Prettify<AbiInputsToParams<K['inputs']>>;
|
|
80
81
|
})) & WriteOptions<K>>) => SimulateContractReturnType<SupportedAbis, K['name']>;
|
|
82
|
+
getTransactionData: (props: K['inputs'] extends readonly [] ? object : Prettify<AbiInputsToParams<K['inputs']>>) => Hex;
|
|
81
83
|
};
|
|
82
84
|
};
|
|
83
85
|
export type ReaderFunctions<ContractName extends keyof Contracts, Fns extends Contracts[ContractName]['readFunctions'] = Contracts[ContractName]['readFunctions']> = {
|