@obolnetwork/obol-sdk 2.11.4 → 2.11.5-rc.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/cjs/src/index.js +17457 -382
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/esm/src/index.js +17424 -361
- package/dist/esm/src/index.js.map +1 -0
- package/dist/types/src/constants.d.ts +1 -2
- package/dist/types/src/eoa/eoaHelpers.d.ts +1 -1
- package/dist/types/src/exits/verificationHelpers.d.ts +0 -2
- package/dist/types/src/incentives/incentiveHelpers.d.ts +1 -1
- package/dist/types/src/splits/splitHelpers.d.ts +3 -3
- package/dist/types/src/utils.d.ts +2 -2
- package/dist/types/src/verification/common.d.ts +0 -2
- package/dist/types/src/verification/signature-validator.d.ts +4 -4
- package/dist/types/src/verification/v1.10.0.d.ts +1 -1
- package/dist/types/src/verification/v1.6.0.d.ts +1 -1
- package/dist/types/src/verification/v1.7.0.d.ts +1 -1
- package/dist/types/src/verification/v1.8.0.d.ts +1 -1
- package/dist/types/test/client/methods.spec.d.ts +17 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/tsup.config.d.ts +2 -0
- package/package.json +79 -54
- package/dist/cjs/package.json +0 -139
- package/dist/cjs/src/abi/BatchDeposit.js +0 -120
- package/dist/cjs/src/abi/MerkleDistributorWithDeadline.js +0 -73
- package/dist/cjs/src/abi/Multicall3.js +0 -253
- package/dist/cjs/src/abi/OVM.js +0 -627
- package/dist/cjs/src/abi/OWR.js +0 -304
- package/dist/cjs/src/abi/SplitMain.js +0 -929
- package/dist/cjs/src/abi/splitV2FactoryAbi.js +0 -420
- package/dist/cjs/src/ajv.js +0 -136
- package/dist/cjs/src/base.js +0 -42
- package/dist/cjs/src/bytecodes.js +0 -19
- package/dist/cjs/src/constants.js +0 -272
- package/dist/cjs/src/eoa/eoa.js +0 -132
- package/dist/cjs/src/eoa/eoaHelpers.js +0 -82
- package/dist/cjs/src/errors.js +0 -11
- package/dist/cjs/src/exits/ethUtils.js +0 -57
- package/dist/cjs/src/exits/exit.js +0 -502
- package/dist/cjs/src/exits/verificationHelpers.js +0 -86
- package/dist/cjs/src/incentives/incentiveHelpers.js +0 -39
- package/dist/cjs/src/incentives/incentives.js +0 -119
- package/dist/cjs/src/schema.js +0 -352
- package/dist/cjs/src/services.js +0 -33
- package/dist/cjs/src/splits/splitHelpers.js +0 -571
- package/dist/cjs/src/splits/splits.js +0 -366
- package/dist/cjs/src/types.js +0 -29
- package/dist/cjs/src/utils.js +0 -77
- package/dist/cjs/src/verification/common.js +0 -355
- package/dist/cjs/src/verification/signature-validator.js +0 -73
- package/dist/cjs/src/verification/sszTypes.js +0 -69
- package/dist/cjs/src/verification/termsAndConditions.js +0 -40
- package/dist/cjs/src/verification/v1.10.0.js +0 -146
- package/dist/cjs/src/verification/v1.6.0.js +0 -149
- package/dist/cjs/src/verification/v1.7.0.js +0 -173
- package/dist/cjs/src/verification/v1.8.0.js +0 -196
- package/dist/cjs/test/client/ajv.spec.js +0 -320
- package/dist/cjs/test/client/methods.spec.js +0 -418
- package/dist/cjs/test/eoa/eoa.spec.js +0 -176
- package/dist/cjs/test/exit/ethUtils.spec.js +0 -83
- package/dist/cjs/test/exit/exit.spec.js +0 -399
- package/dist/cjs/test/exit/verificationHelpers.spec.js +0 -68
- package/dist/cjs/test/fixtures.js +0 -896
- package/dist/cjs/test/incentives/incentives.spec.js +0 -202
- package/dist/cjs/test/splits/splits.spec.js +0 -402
- package/dist/esm/package.json +0 -139
- package/dist/esm/src/abi/BatchDeposit.js +0 -117
- package/dist/esm/src/abi/MerkleDistributorWithDeadline.js +0 -70
- package/dist/esm/src/abi/Multicall3.js +0 -250
- package/dist/esm/src/abi/OVM.js +0 -624
- package/dist/esm/src/abi/OWR.js +0 -301
- package/dist/esm/src/abi/SplitMain.js +0 -926
- package/dist/esm/src/abi/splitV2FactoryAbi.js +0 -417
- package/dist/esm/src/ajv.js +0 -129
- package/dist/esm/src/base.js +0 -38
- package/dist/esm/src/bytecodes.js +0 -16
- package/dist/esm/src/constants.js +0 -238
- package/dist/esm/src/eoa/eoa.js +0 -128
- package/dist/esm/src/eoa/eoaHelpers.js +0 -77
- package/dist/esm/src/errors.js +0 -7
- package/dist/esm/src/exits/ethUtils.js +0 -52
- package/dist/esm/src/exits/exit.js +0 -475
- package/dist/esm/src/exits/verificationHelpers.js +0 -81
- package/dist/esm/src/incentives/incentiveHelpers.js +0 -34
- package/dist/esm/src/incentives/incentives.js +0 -115
- package/dist/esm/src/schema.js +0 -349
- package/dist/esm/src/services.js +0 -29
- package/dist/esm/src/splits/splitHelpers.js +0 -554
- package/dist/esm/src/splits/splits.js +0 -362
- package/dist/esm/src/types.js +0 -26
- package/dist/esm/src/utils.js +0 -68
- package/dist/esm/src/verification/common.js +0 -319
- package/dist/esm/src/verification/signature-validator.js +0 -64
- package/dist/esm/src/verification/sszTypes.js +0 -64
- package/dist/esm/src/verification/termsAndConditions.js +0 -33
- package/dist/esm/src/verification/v1.10.0.js +0 -140
- package/dist/esm/src/verification/v1.6.0.js +0 -142
- package/dist/esm/src/verification/v1.7.0.js +0 -166
- package/dist/esm/src/verification/v1.8.0.js +0 -189
- package/dist/esm/test/client/ajv.spec.js +0 -318
- package/dist/esm/test/client/methods.spec.js +0 -393
- package/dist/esm/test/eoa/eoa.spec.js +0 -174
- package/dist/esm/test/exit/ethUtils.spec.js +0 -81
- package/dist/esm/test/exit/exit.spec.js +0 -374
- package/dist/esm/test/exit/verificationHelpers.spec.js +0 -66
- package/dist/esm/test/fixtures.js +0 -893
- package/dist/esm/test/incentives/incentives.spec.js +0 -177
- package/dist/esm/test/splits/splits.spec.js +0 -400
- package/src/abi/BatchDeposit.ts +0 -117
- package/src/abi/MerkleDistributorWithDeadline.ts +0 -70
- package/src/abi/Multicall3.ts +0 -250
- package/src/abi/OVM.ts +0 -624
- package/src/abi/OWR.ts +0 -302
- package/src/abi/SplitMain.ts +0 -927
- package/src/abi/splitV2FactoryAbi.ts +0 -417
- package/src/ajv.ts +0 -191
- package/src/base.ts +0 -54
- package/src/bytecodes.ts +0 -32
- package/src/constants.ts +0 -309
- package/src/eoa/eoa.ts +0 -153
- package/src/eoa/eoaHelpers.ts +0 -112
- package/src/errors.ts +0 -8
- package/src/exits/ethUtils.ts +0 -49
- package/src/exits/exit.ts +0 -661
- package/src/exits/verificationHelpers.ts +0 -110
- package/src/incentives/incentiveHelpers.ts +0 -55
- package/src/incentives/incentives.ts +0 -153
- package/src/index.ts +0 -614
- package/src/schema.ts +0 -376
- package/src/services.ts +0 -24
- package/src/splits/splitHelpers.ts +0 -1032
- package/src/splits/splits.ts +0 -504
- package/src/types.ts +0 -687
- package/src/utils.ts +0 -88
- package/src/verification/common.ts +0 -532
- package/src/verification/signature-validator.ts +0 -103
- package/src/verification/sszTypes.ts +0 -88
- package/src/verification/termsAndConditions.ts +0 -32
- package/src/verification/v1.10.0.ts +0 -245
- package/src/verification/v1.6.0.ts +0 -256
- package/src/verification/v1.7.0.ts +0 -309
- package/src/verification/v1.8.0.ts +0 -340
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TypedMessage } from '@metamask/eth-sig-util';
|
|
2
2
|
import { type TypedDataDomain } from 'ethers';
|
|
3
|
-
import { type ChainConfig } from './types';
|
|
3
|
+
import { type ChainConfig } from './types.js';
|
|
4
4
|
export declare const CONFLICT_ERROR_MSG = "Conflict";
|
|
5
5
|
export declare const EIP712_DOMAIN_NAME = "Obol";
|
|
6
6
|
export declare const EIP712_DOMAIN_VERSION = "1";
|
|
@@ -104,4 +104,3 @@ export declare const PROVIDER_MAP: Record<number, string>;
|
|
|
104
104
|
* Example: Mainnet Capella fork version.
|
|
105
105
|
*/
|
|
106
106
|
export declare const CAPELLA_FORK_MAPPING: Record<string, string>;
|
|
107
|
-
export declare const CHAIN_PUBLIC_RPC_URL: Record<number, string>;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
export declare const GENESIS_VALIDATOR_ROOT_HEX_STRING = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
4
2
|
/**
|
|
5
3
|
* Computes the domain for a given domain type, fork version, and genesis state.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ProviderType, type SignerType, type ETH_ADDRESS } from '../types';
|
|
1
|
+
import { type ProviderType, type SignerType, type ETH_ADDRESS } from '../types.js';
|
|
2
2
|
export declare const claimIncentivesFromMerkleDistributor: (incentivesData: {
|
|
3
3
|
signer: SignerType;
|
|
4
4
|
contractAddress: ETH_ADDRESS;
|
|
@@ -90,13 +90,13 @@ export declare const deployOVMContract: ({ OVMOwnerAddress, principalRecipient,
|
|
|
90
90
|
export declare const deployOVMAndSplitV2: ({ ovmArgs, rewardRecipients, isRewardsSplitterDeployed, distributorFeePercent, salt, signer, chainId, principalSplitRecipients, isPrincipalSplitDeployed, splitOwnerAddress, }: {
|
|
91
91
|
ovmArgs: OVMArgs;
|
|
92
92
|
rewardRecipients: SplitV2Recipient[];
|
|
93
|
-
isRewardsSplitterDeployed?: boolean
|
|
93
|
+
isRewardsSplitterDeployed?: boolean;
|
|
94
94
|
distributorFeePercent: number;
|
|
95
95
|
salt: `0x${string}`;
|
|
96
96
|
signer: SignerType;
|
|
97
97
|
chainId: number;
|
|
98
|
-
principalSplitRecipients?: SplitV2Recipient[]
|
|
99
|
-
isPrincipalSplitDeployed?: boolean
|
|
98
|
+
principalSplitRecipients?: SplitV2Recipient[];
|
|
99
|
+
isPrincipalSplitDeployed?: boolean;
|
|
100
100
|
splitOwnerAddress: string;
|
|
101
101
|
}) => Promise<string>;
|
|
102
102
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import { DefinitionFlow } from './constants';
|
|
3
|
-
import { type ProviderType, type ClusterDefinition } from './types';
|
|
2
|
+
import { DefinitionFlow } from './constants.js';
|
|
3
|
+
import { type ProviderType, type ClusterDefinition } from './types.js';
|
|
4
4
|
export declare const hexWithout0x: (hex: string) => string;
|
|
5
5
|
export declare const strToUint8Array: (str: string) => Uint8Array;
|
|
6
6
|
export declare const definitionFlow: (clusterDefinition: ClusterDefinition) => DefinitionFlow | null;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { type ClusterDefinition, type ClusterLock, type DepositData, type DistributedValidator, type SafeRpcUrl } from '../types.js';
|
|
4
2
|
/**
|
|
5
3
|
* @param cluster The cluster configuration or the cluster definition
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type TypedMessage } from '@metamask/eth-sig-util';
|
|
2
|
-
import { type EIP712TypedData } from '@safe-global/
|
|
3
|
-
import { type SafeRpcUrl } from '../types';
|
|
2
|
+
import { type EIP712TypedData } from '@safe-global/types-kit';
|
|
3
|
+
import { type SafeRpcUrl } from '../types.js';
|
|
4
4
|
export declare const validateAddressSignature: ({ address, token, data, chainId, safeRpcUrl, }: {
|
|
5
5
|
address: string;
|
|
6
6
|
token: string;
|
|
7
7
|
data: TypedMessage<any>;
|
|
8
8
|
chainId: number;
|
|
9
|
-
safeRpcUrl?:
|
|
9
|
+
safeRpcUrl?: SafeRpcUrl;
|
|
10
10
|
}) => Promise<boolean>;
|
|
11
11
|
export declare const validateEOASignature: ({ token, data, address, }: {
|
|
12
12
|
token: string;
|
|
@@ -18,5 +18,5 @@ export declare const validateSmartContractSignature: ({ token, data, address, ch
|
|
|
18
18
|
data: EIP712TypedData;
|
|
19
19
|
address: string;
|
|
20
20
|
chainId: number;
|
|
21
|
-
safeRpcUrl?:
|
|
21
|
+
safeRpcUrl?: SafeRpcUrl;
|
|
22
22
|
}) => Promise<boolean>;
|
|
@@ -34,5 +34,5 @@ export declare const hashClusterDefinitionV1X10: (cluster: ClusterDefinition, co
|
|
|
34
34
|
* @returns The lock hash in of the corresponding cluster
|
|
35
35
|
*/
|
|
36
36
|
export declare const hashClusterLockV1X10: (cluster: ClusterLock) => string;
|
|
37
|
-
export declare const verifyDVV1X10: (clusterLock: ClusterLock) => boolean
|
|
37
|
+
export declare const verifyDVV1X10: (clusterLock: ClusterLock) => Promise<boolean>;
|
|
38
38
|
export {};
|
|
@@ -30,5 +30,5 @@ export declare const hashClusterDefinitionV1X6: (cluster: ClusterDefinition, con
|
|
|
30
30
|
* @returns The lock hash in of the corresponding cluster
|
|
31
31
|
*/
|
|
32
32
|
export declare const hashClusterLockV1X6: (cluster: ClusterLock) => string;
|
|
33
|
-
export declare const verifyDVV1X6: (clusterLock: ClusterLock) => boolean
|
|
33
|
+
export declare const verifyDVV1X6: (clusterLock: ClusterLock) => Promise<boolean>;
|
|
34
34
|
export {};
|
|
@@ -30,5 +30,5 @@ export declare const hashClusterDefinitionV1X7: (cluster: ClusterDefinition, con
|
|
|
30
30
|
* @returns The lock hash in of the corresponding cluster
|
|
31
31
|
*/
|
|
32
32
|
export declare const hashClusterLockV1X7: (cluster: ClusterLock) => string;
|
|
33
|
-
export declare const verifyDVV1X7: (clusterLock: ClusterLock) => boolean
|
|
33
|
+
export declare const verifyDVV1X7: (clusterLock: ClusterLock) => Promise<boolean>;
|
|
34
34
|
export {};
|
|
@@ -31,5 +31,5 @@ export declare const hashClusterDefinitionV1X8: (cluster: ClusterDefinition, con
|
|
|
31
31
|
* @returns The lock hash in of the corresponding cluster
|
|
32
32
|
*/
|
|
33
33
|
export declare const hashClusterLockV1X8: (cluster: ClusterLock) => string;
|
|
34
|
-
export declare const verifyDVV1X8: (clusterLock: ClusterLock) => boolean
|
|
34
|
+
export declare const verifyDVV1X8: (clusterLock: ClusterLock) => Promise<boolean>;
|
|
35
35
|
export {};
|
|
@@ -1 +1,18 @@
|
|
|
1
1
|
export {};
|
|
2
|
+
/**
|
|
3
|
+
* Note: Tests for createObolRewardsSplit and createObolTotalSplit are in the e2e test suite
|
|
4
|
+
* See: test/sdk-package/cluster.spec.ts
|
|
5
|
+
*
|
|
6
|
+
* These methods require real blockchain interactions (contract deployments) which cannot be
|
|
7
|
+
* effectively mocked in unit tests with Jest 29 + ESM. The e2e tests cover:
|
|
8
|
+
*
|
|
9
|
+
* createObolRewardsSplit:
|
|
10
|
+
* - Deploy OWR and splitter with various configurations
|
|
11
|
+
* - Tests: signer validation, chainId validation, recipient validation, ObolRAFSplit validation,
|
|
12
|
+
* contract deployment, address prediction, and tranches retrieval
|
|
13
|
+
*
|
|
14
|
+
* createObolTotalSplit:
|
|
15
|
+
* - Deploy splitter contracts with various configurations
|
|
16
|
+
* - Tests: same recipients return same addresses, different configs return different addresses,
|
|
17
|
+
* distributorFee and controllerAddress parameters
|
|
18
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../../tsup.config.ts","../../src/ajv.ts","../../src/base.ts","../../src/bytecodes.ts","../../src/constants.ts","../../src/errors.ts","../../src/index.ts","../../src/schema.ts","../../src/services.ts","../../src/types.ts","../../src/utils.ts","../../src/abi/BatchDeposit.ts","../../src/abi/MerkleDistributorWithDeadline.ts","../../src/abi/Multicall3.ts","../../src/abi/OVM.ts","../../src/abi/OWR.ts","../../src/abi/SplitMain.ts","../../src/abi/splitV2FactoryAbi.ts","../../src/eoa/eoa.ts","../../src/eoa/eoaHelpers.ts","../../src/exits/ethUtils.ts","../../src/exits/exit.ts","../../src/exits/verificationHelpers.ts","../../src/incentives/incentiveHelpers.ts","../../src/incentives/incentives.ts","../../src/splits/splitHelpers.ts","../../src/splits/splits.ts","../../src/verification/common.ts","../../src/verification/signature-validator.ts","../../src/verification/sszTypes.ts","../../src/verification/termsAndConditions.ts","../../src/verification/v1.10.0.ts","../../src/verification/v1.6.0.ts","../../src/verification/v1.7.0.ts","../../src/verification/v1.8.0.ts","../../test/fixtures.ts","../../test/client/ajv.spec.ts","../../test/client/methods.spec.ts","../../test/eoa/eoa.spec.ts","../../test/exit/ethUtils.spec.ts","../../test/exit/exit.spec.ts","../../test/exit/verificationHelpers.spec.ts","../../test/incentives/incentives.spec.ts","../../test/splits/splits.spec.ts"],"version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obolnetwork/obol-sdk",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.5-rc.0",
|
|
4
4
|
"description": "A package for creating Distributed Validators using the Obol API.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/obolnetwork/obol-sdk/issues"
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
"Ethereum"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
16
15
|
"build:clean": "rm -rf ./dist",
|
|
17
|
-
"build": "npm-run-all build:clean
|
|
18
|
-
"
|
|
16
|
+
"build": "npm-run-all build:clean build:tsup",
|
|
17
|
+
"build:tsup": "tsup && tsc -b ./tsconfig.types.json",
|
|
18
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest test/**/**.spec.ts --testPathIgnorePatterns=test/sdk-package/",
|
|
19
19
|
"generate-typedoc": "typedoc",
|
|
20
20
|
"npm:publish": "npm publish --tag latest",
|
|
21
|
+
"npm:publish:next": "npm publish --tag next",
|
|
21
22
|
"release": "release-it",
|
|
22
23
|
"release:dry": "release-it --dry-run --no-npm",
|
|
23
24
|
"lint": "eslint \"{src,test}/**/*.{js,ts}\" --fix",
|
|
@@ -41,50 +42,51 @@
|
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"@chainsafe/bls": "6.0.3",
|
|
44
|
-
"@chainsafe/blst": "^0.2.
|
|
45
|
-
"@chainsafe/
|
|
45
|
+
"@chainsafe/blst": "^0.2.0",
|
|
46
|
+
"@chainsafe/enr": "^5.0.1",
|
|
46
47
|
"@chainsafe/ssz": "^0.14.0",
|
|
47
|
-
"@metamask/eth-sig-util": "^
|
|
48
|
-
"@safe-global/protocol-kit": "
|
|
49
|
-
"@safe-global/
|
|
50
|
-
"
|
|
51
|
-
"ajv": "^8.12.0",
|
|
48
|
+
"@metamask/eth-sig-util": "^8.2.0",
|
|
49
|
+
"@safe-global/protocol-kit": "6.1.1",
|
|
50
|
+
"@safe-global/types-kit": "^3.0.0",
|
|
51
|
+
"ajv": "^8.17.1",
|
|
52
52
|
"ajv-formats": "^3.0.1",
|
|
53
53
|
"ajv-keywords": "^5.1.0",
|
|
54
|
-
"cross-fetch": "^
|
|
55
|
-
"dotenv": "^
|
|
56
|
-
"elliptic": "^6.
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
61
|
-
"ethers": "^6.13.5",
|
|
62
|
-
"nock": "^13.5.3",
|
|
63
|
-
"pdf-parse": "^1.1.1",
|
|
64
|
-
"semver": "^7.6.0",
|
|
65
|
-
"typescript-eslint": "^7.1.0",
|
|
54
|
+
"cross-fetch": "^4.1.0",
|
|
55
|
+
"dotenv": "^17.2.2",
|
|
56
|
+
"elliptic": "^6.6.1",
|
|
57
|
+
"ethers": "^6.15.0",
|
|
58
|
+
"pdf-parse-debugging-disabled": "^1.1.1",
|
|
59
|
+
"semver": "^7.7.2",
|
|
66
60
|
"uuid": "^9.0.0"
|
|
67
61
|
},
|
|
68
62
|
"devDependencies": {
|
|
69
|
-
"@release-it/conventional-changelog": "^
|
|
63
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
70
64
|
"@types/elliptic": "^6.4.18",
|
|
71
|
-
"@types/jest": "^
|
|
72
|
-
"@types/node": "^
|
|
73
|
-
"@types/
|
|
65
|
+
"@types/jest": "^29.5.12",
|
|
66
|
+
"@types/node": "^24.5.2",
|
|
67
|
+
"@types/pdf-parse": "^1.1.5",
|
|
68
|
+
"@types/semver": "^7.7.1",
|
|
74
69
|
"@types/uuid": "^9.0.1",
|
|
75
|
-
"eslint": "^
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
71
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
72
|
+
"eslint": "8.57.0",
|
|
73
|
+
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
74
|
+
"eslint-plugin-import": "^2.32.0",
|
|
75
|
+
"eslint-plugin-n": "^16.0.0",
|
|
76
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
77
|
+
"husky": "^9.1.7",
|
|
78
|
+
"jest": "^29.7.0",
|
|
79
|
+
"lint-staged": "^16.2.3",
|
|
80
|
+
"msw": "^2.11.3",
|
|
81
|
+
"nock": "^14.0.10",
|
|
80
82
|
"npm-run-all": "^4.1.5",
|
|
81
|
-
"prettier": "^3.2
|
|
82
|
-
"release-it": "^
|
|
83
|
-
"ts-jest": "^
|
|
84
|
-
"tsup": "^
|
|
85
|
-
"typedoc": "^0.28.
|
|
86
|
-
"typedoc-plugin-markdown": "^4.
|
|
87
|
-
"typescript": "~5.
|
|
83
|
+
"prettier": "^3.6.2",
|
|
84
|
+
"release-it": "^19.0.5",
|
|
85
|
+
"ts-jest": "^29.1.5",
|
|
86
|
+
"tsup": "^8.5.0",
|
|
87
|
+
"typedoc": "^0.28.13",
|
|
88
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
89
|
+
"typescript": "~5.9.2"
|
|
88
90
|
},
|
|
89
91
|
"engines": {
|
|
90
92
|
"node": ">= 16"
|
|
@@ -92,8 +94,7 @@
|
|
|
92
94
|
"files": [
|
|
93
95
|
"package.json",
|
|
94
96
|
"README.md",
|
|
95
|
-
"dist"
|
|
96
|
-
"src"
|
|
97
|
+
"dist"
|
|
97
98
|
],
|
|
98
99
|
"release-it": {
|
|
99
100
|
"git": {
|
|
@@ -118,22 +119,46 @@
|
|
|
118
119
|
}
|
|
119
120
|
},
|
|
120
121
|
"jest": {
|
|
122
|
+
"preset": "ts-jest/presets/default-esm",
|
|
123
|
+
"extensionsToTreatAsEsm": [
|
|
124
|
+
".ts"
|
|
125
|
+
],
|
|
121
126
|
"transform": {
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
"^.+\\.tsx?$": [
|
|
128
|
+
"ts-jest",
|
|
129
|
+
{
|
|
130
|
+
"useESM": true,
|
|
131
|
+
"tsconfig": {
|
|
132
|
+
"module": "esnext",
|
|
133
|
+
"target": "es2020",
|
|
134
|
+
"moduleResolution": "node"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
128
138
|
},
|
|
129
139
|
"moduleNameMapper": {
|
|
130
|
-
"^
|
|
131
|
-
"^
|
|
132
|
-
"^hash.js$": "<rootDir>/node_modules/hash.js",
|
|
133
|
-
"^(\\.\\.?\\/.+)\\.js$": "$1"
|
|
140
|
+
"^(\\.\\.?\\/.+)\\.js$": "$1",
|
|
141
|
+
"^(\\.\\.?\\/.+)$": "$1"
|
|
134
142
|
},
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
|
|
143
|
+
"moduleFileExtensions": [
|
|
144
|
+
"ts",
|
|
145
|
+
"tsx",
|
|
146
|
+
"js",
|
|
147
|
+
"jsx",
|
|
148
|
+
"json"
|
|
149
|
+
],
|
|
150
|
+
"transformIgnorePatterns": [
|
|
151
|
+
"node_modules/(?!(@chainsafe|ethers|msw|until-async|bn.js|asn1.js|hash.js)/)"
|
|
152
|
+
],
|
|
153
|
+
"testEnvironment": "node",
|
|
154
|
+
"testPathIgnorePatterns": [
|
|
155
|
+
"<rootDir>/dist/",
|
|
156
|
+
"<rootDir>/node_modules/"
|
|
157
|
+
],
|
|
158
|
+
"roots": [
|
|
159
|
+
"<rootDir>/src",
|
|
160
|
+
"<rootDir>/test"
|
|
161
|
+
],
|
|
162
|
+
"maxWorkers": "50%"
|
|
138
163
|
}
|
|
139
164
|
}
|
package/dist/cjs/package.json
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@obolnetwork/obol-sdk",
|
|
3
|
-
"version": "2.11.4",
|
|
4
|
-
"description": "A package for creating Distributed Validators using the Obol API.",
|
|
5
|
-
"bugs": {
|
|
6
|
-
"url": "https://github.com/obolnetwork/obol-sdk/issues"
|
|
7
|
-
},
|
|
8
|
-
"homepage": "https://docs.obol.org/",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"Obol",
|
|
11
|
-
"Distributed Validators",
|
|
12
|
-
"Ethereum"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
16
|
-
"build:clean": "rm -rf ./dist",
|
|
17
|
-
"build": "npm-run-all build:clean compile",
|
|
18
|
-
"test": "jest test/**/*.spec.ts --testPathIgnorePatterns=test/sdk-package/",
|
|
19
|
-
"generate-typedoc": "typedoc",
|
|
20
|
-
"npm:publish": "npm publish --tag latest",
|
|
21
|
-
"release": "release-it",
|
|
22
|
-
"release:dry": "release-it --dry-run --no-npm",
|
|
23
|
-
"lint": "eslint \"{src,test}/**/*.{js,ts}\" --fix",
|
|
24
|
-
"lint-ci": "eslint \"{src,test}/**/*.{js,ts}\"",
|
|
25
|
-
"prettier-ci": "prettier --check \"{src,test}/**/*.{js,ts}\"",
|
|
26
|
-
"prettier": "prettier --write \"{src,test}/**/*.{js,ts}\"",
|
|
27
|
-
"docs": "typedoc"
|
|
28
|
-
},
|
|
29
|
-
"main": "./dist/cjs/src/index.js",
|
|
30
|
-
"module": "./dist/esm/src/index.js",
|
|
31
|
-
"typings": "./dist/types/src/index.d.ts",
|
|
32
|
-
"author": "Obol Labs (https://obol.org)",
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/obolnetwork/obol-sdk.git"
|
|
36
|
-
},
|
|
37
|
-
"license": "ISC",
|
|
38
|
-
"publishConfig": {
|
|
39
|
-
"registry": "https://registry.npmjs.org/",
|
|
40
|
-
"access": "public"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@chainsafe/bls": "6.0.3",
|
|
44
|
-
"@chainsafe/blst": "^0.2.9",
|
|
45
|
-
"@chainsafe/discv5": "^0.5.1",
|
|
46
|
-
"@chainsafe/ssz": "^0.14.0",
|
|
47
|
-
"@metamask/eth-sig-util": "^7.0.1",
|
|
48
|
-
"@safe-global/protocol-kit": "4.1.1",
|
|
49
|
-
"@safe-global/safe-core-sdk-types": "5.1.0",
|
|
50
|
-
"@types/pdf-parse": "^1.1.4",
|
|
51
|
-
"ajv": "^8.12.0",
|
|
52
|
-
"ajv-formats": "^3.0.1",
|
|
53
|
-
"ajv-keywords": "^5.1.0",
|
|
54
|
-
"cross-fetch": "^3.1.5",
|
|
55
|
-
"dotenv": "^16.4.7",
|
|
56
|
-
"elliptic": "^6.5.4",
|
|
57
|
-
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
58
|
-
"eslint-plugin-import": "^2.29.1",
|
|
59
|
-
"eslint-plugin-n": "^16.6.2",
|
|
60
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
61
|
-
"ethers": "^6.13.5",
|
|
62
|
-
"nock": "^13.5.3",
|
|
63
|
-
"pdf-parse": "^1.1.1",
|
|
64
|
-
"semver": "^7.6.0",
|
|
65
|
-
"typescript-eslint": "^7.1.0",
|
|
66
|
-
"uuid": "^9.0.0"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@release-it/conventional-changelog": "^8.0.1",
|
|
70
|
-
"@types/elliptic": "^6.4.18",
|
|
71
|
-
"@types/jest": "^28.1.8",
|
|
72
|
-
"@types/node": "^20.2.5",
|
|
73
|
-
"@types/semver": "^7.5.8",
|
|
74
|
-
"@types/uuid": "^9.0.1",
|
|
75
|
-
"eslint": "^8.57.0",
|
|
76
|
-
"husky": "^9.0.11",
|
|
77
|
-
"jest": "^28.1.3",
|
|
78
|
-
"lint-staged": "^15.2.2",
|
|
79
|
-
"msw": "^2.2.1",
|
|
80
|
-
"npm-run-all": "^4.1.5",
|
|
81
|
-
"prettier": "^3.2.5",
|
|
82
|
-
"release-it": "^17.2.1",
|
|
83
|
-
"ts-jest": "^28.0.8",
|
|
84
|
-
"tsup": "^6.7.0",
|
|
85
|
-
"typedoc": "^0.28.0",
|
|
86
|
-
"typedoc-plugin-markdown": "^4.5.2",
|
|
87
|
-
"typescript": "~5.3.3"
|
|
88
|
-
},
|
|
89
|
-
"engines": {
|
|
90
|
-
"node": ">= 16"
|
|
91
|
-
},
|
|
92
|
-
"files": [
|
|
93
|
-
"package.json",
|
|
94
|
-
"README.md",
|
|
95
|
-
"dist",
|
|
96
|
-
"src"
|
|
97
|
-
],
|
|
98
|
-
"release-it": {
|
|
99
|
-
"git": {
|
|
100
|
-
"changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs",
|
|
101
|
-
"commitMessage": "chore(release): v${version}",
|
|
102
|
-
"push": true,
|
|
103
|
-
"commit": true,
|
|
104
|
-
"tag": true,
|
|
105
|
-
"requireCommits": false,
|
|
106
|
-
"requireCleanWorkingDir": false
|
|
107
|
-
},
|
|
108
|
-
"github": {
|
|
109
|
-
"release": true,
|
|
110
|
-
"draft": true
|
|
111
|
-
},
|
|
112
|
-
"npm": {
|
|
113
|
-
"publish": false,
|
|
114
|
-
"ignoreVersion": false
|
|
115
|
-
},
|
|
116
|
-
"hooks": {
|
|
117
|
-
"after:bump": "npx auto-changelog -p --hide-credit"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"jest": {
|
|
121
|
-
"transform": {
|
|
122
|
-
"\\.[jt]sx?$": "ts-jest"
|
|
123
|
-
},
|
|
124
|
-
"globals": {
|
|
125
|
-
"ts-jest": {
|
|
126
|
-
"useESM": true
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"moduleNameMapper": {
|
|
130
|
-
"^bn.js$": "<rootDir>/node_modules/bn.js",
|
|
131
|
-
"^asn1.js$": "<rootDir>/node_modules/asn1.js",
|
|
132
|
-
"^hash.js$": "<rootDir>/node_modules/hash.js",
|
|
133
|
-
"^(\\.\\.?\\/.+)\\.js$": "$1"
|
|
134
|
-
},
|
|
135
|
-
"extensionsToTreatAsEsm": [
|
|
136
|
-
".ts"
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BatchDepositContract = void 0;
|
|
4
|
-
exports.BatchDepositContract = {
|
|
5
|
-
abi: [
|
|
6
|
-
{
|
|
7
|
-
inputs: [],
|
|
8
|
-
name: 'DepositValueGreaterThan2048ETH',
|
|
9
|
-
type: 'error',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
inputs: [],
|
|
13
|
-
name: 'DepositValueLessThan1ETH',
|
|
14
|
-
type: 'error',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
inputs: [],
|
|
18
|
-
name: 'DepositValueMustBeMultipleOfGwei',
|
|
19
|
-
type: 'error',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
inputs: [],
|
|
23
|
-
name: 'InvalidPubKeyLength',
|
|
24
|
-
type: 'error',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
inputs: [],
|
|
28
|
-
name: 'InvalidSignatureLength',
|
|
29
|
-
type: 'error',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
inputs: [],
|
|
33
|
-
name: 'InvalidWithdrawalCredLength',
|
|
34
|
-
type: 'error',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
inputs: [],
|
|
38
|
-
name: 'MsgValueNotEqualToTotalDepositAmount',
|
|
39
|
-
type: 'error',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
inputs: [],
|
|
43
|
-
name: 'NoDepositsProvided',
|
|
44
|
-
type: 'error',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
anonymous: false,
|
|
48
|
-
inputs: [
|
|
49
|
-
{
|
|
50
|
-
indexed: true,
|
|
51
|
-
internalType: 'bytes',
|
|
52
|
-
name: 'pubKey',
|
|
53
|
-
type: 'bytes',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
indexed: true,
|
|
57
|
-
internalType: 'bytes',
|
|
58
|
-
name: 'withdrawalCredentials',
|
|
59
|
-
type: 'bytes',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
indexed: false,
|
|
63
|
-
internalType: 'uint256',
|
|
64
|
-
name: 'amount',
|
|
65
|
-
type: 'uint256',
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
name: 'ValidatorDeposit',
|
|
69
|
-
type: 'event',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
inputs: [
|
|
73
|
-
{
|
|
74
|
-
components: [
|
|
75
|
-
{
|
|
76
|
-
internalType: 'bytes',
|
|
77
|
-
name: 'pubKey',
|
|
78
|
-
type: 'bytes',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
internalType: 'bytes',
|
|
82
|
-
name: 'withdrawalCredentials',
|
|
83
|
-
type: 'bytes',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
internalType: 'bytes',
|
|
87
|
-
name: 'signature',
|
|
88
|
-
type: 'bytes',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
internalType: 'uint256',
|
|
92
|
-
name: 'amount',
|
|
93
|
-
type: 'uint256',
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
internalType: 'struct IBatchDeposit.Deposit[]',
|
|
97
|
-
name: '_deposits',
|
|
98
|
-
type: 'tuple[]',
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
name: 'batchDeposit',
|
|
102
|
-
outputs: [],
|
|
103
|
-
stateMutability: 'payable',
|
|
104
|
-
type: 'function',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
inputs: [],
|
|
108
|
-
name: 'depositContract',
|
|
109
|
-
outputs: [
|
|
110
|
-
{
|
|
111
|
-
internalType: 'contract IDepositContract',
|
|
112
|
-
name: '',
|
|
113
|
-
type: 'address',
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
stateMutability: 'view',
|
|
117
|
-
type: 'function',
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
};
|