@obolnetwork/obol-sdk 2.11.3 → 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.
Files changed (143) hide show
  1. package/dist/cjs/src/index.js +17457 -382
  2. package/dist/cjs/src/index.js.map +1 -0
  3. package/dist/esm/src/index.js +17424 -361
  4. package/dist/esm/src/index.js.map +1 -0
  5. package/dist/types/src/abi/OVM.d.ts +103 -0
  6. package/dist/types/src/bytecodes.d.ts +3 -2
  7. package/dist/types/src/constants.d.ts +1 -2
  8. package/dist/types/src/eoa/eoaHelpers.d.ts +1 -1
  9. package/dist/types/src/exits/verificationHelpers.d.ts +0 -2
  10. package/dist/types/src/incentives/incentiveHelpers.d.ts +1 -1
  11. package/dist/types/src/splits/splitHelpers.d.ts +3 -3
  12. package/dist/types/src/utils.d.ts +2 -2
  13. package/dist/types/src/verification/common.d.ts +0 -2
  14. package/dist/types/src/verification/signature-validator.d.ts +4 -4
  15. package/dist/types/src/verification/v1.10.0.d.ts +1 -1
  16. package/dist/types/src/verification/v1.6.0.d.ts +1 -1
  17. package/dist/types/src/verification/v1.7.0.d.ts +1 -1
  18. package/dist/types/src/verification/v1.8.0.d.ts +1 -1
  19. package/dist/types/test/client/methods.spec.d.ts +17 -0
  20. package/dist/types/tsconfig.types.tsbuildinfo +1 -0
  21. package/dist/types/tsup.config.d.ts +2 -0
  22. package/package.json +79 -54
  23. package/dist/cjs/package.json +0 -139
  24. package/dist/cjs/src/abi/BatchDeposit.js +0 -120
  25. package/dist/cjs/src/abi/MerkleDistributorWithDeadline.js +0 -73
  26. package/dist/cjs/src/abi/Multicall3.js +0 -253
  27. package/dist/cjs/src/abi/OVMFactory.js +0 -620
  28. package/dist/cjs/src/abi/OWR.js +0 -304
  29. package/dist/cjs/src/abi/SplitMain.js +0 -929
  30. package/dist/cjs/src/abi/splitV2FactoryAbi.js +0 -420
  31. package/dist/cjs/src/ajv.js +0 -136
  32. package/dist/cjs/src/base.js +0 -42
  33. package/dist/cjs/src/bytecodes.js +0 -18
  34. package/dist/cjs/src/constants.js +0 -268
  35. package/dist/cjs/src/eoa/eoa.js +0 -132
  36. package/dist/cjs/src/eoa/eoaHelpers.js +0 -82
  37. package/dist/cjs/src/errors.js +0 -11
  38. package/dist/cjs/src/exits/ethUtils.js +0 -57
  39. package/dist/cjs/src/exits/exit.js +0 -502
  40. package/dist/cjs/src/exits/verificationHelpers.js +0 -86
  41. package/dist/cjs/src/incentives/incentiveHelpers.js +0 -39
  42. package/dist/cjs/src/incentives/incentives.js +0 -119
  43. package/dist/cjs/src/schema.js +0 -352
  44. package/dist/cjs/src/services.js +0 -33
  45. package/dist/cjs/src/splits/splitHelpers.js +0 -571
  46. package/dist/cjs/src/splits/splits.js +0 -366
  47. package/dist/cjs/src/types.js +0 -29
  48. package/dist/cjs/src/utils.js +0 -77
  49. package/dist/cjs/src/verification/common.js +0 -355
  50. package/dist/cjs/src/verification/signature-validator.js +0 -73
  51. package/dist/cjs/src/verification/sszTypes.js +0 -69
  52. package/dist/cjs/src/verification/termsAndConditions.js +0 -40
  53. package/dist/cjs/src/verification/v1.10.0.js +0 -146
  54. package/dist/cjs/src/verification/v1.6.0.js +0 -149
  55. package/dist/cjs/src/verification/v1.7.0.js +0 -173
  56. package/dist/cjs/src/verification/v1.8.0.js +0 -196
  57. package/dist/cjs/test/client/ajv.spec.js +0 -320
  58. package/dist/cjs/test/client/methods.spec.js +0 -418
  59. package/dist/cjs/test/eoa/eoa.spec.js +0 -176
  60. package/dist/cjs/test/exit/ethUtils.spec.js +0 -83
  61. package/dist/cjs/test/exit/exit.spec.js +0 -399
  62. package/dist/cjs/test/exit/verificationHelpers.spec.js +0 -68
  63. package/dist/cjs/test/fixtures.js +0 -896
  64. package/dist/cjs/test/incentives/incentives.spec.js +0 -202
  65. package/dist/cjs/test/splits/splits.spec.js +0 -402
  66. package/dist/esm/package.json +0 -139
  67. package/dist/esm/src/abi/BatchDeposit.js +0 -117
  68. package/dist/esm/src/abi/MerkleDistributorWithDeadline.js +0 -70
  69. package/dist/esm/src/abi/Multicall3.js +0 -250
  70. package/dist/esm/src/abi/OVMFactory.js +0 -617
  71. package/dist/esm/src/abi/OWR.js +0 -301
  72. package/dist/esm/src/abi/SplitMain.js +0 -926
  73. package/dist/esm/src/abi/splitV2FactoryAbi.js +0 -417
  74. package/dist/esm/src/ajv.js +0 -129
  75. package/dist/esm/src/base.js +0 -38
  76. package/dist/esm/src/bytecodes.js +0 -15
  77. package/dist/esm/src/constants.js +0 -234
  78. package/dist/esm/src/eoa/eoa.js +0 -128
  79. package/dist/esm/src/eoa/eoaHelpers.js +0 -77
  80. package/dist/esm/src/errors.js +0 -7
  81. package/dist/esm/src/exits/ethUtils.js +0 -52
  82. package/dist/esm/src/exits/exit.js +0 -475
  83. package/dist/esm/src/exits/verificationHelpers.js +0 -81
  84. package/dist/esm/src/incentives/incentiveHelpers.js +0 -34
  85. package/dist/esm/src/incentives/incentives.js +0 -115
  86. package/dist/esm/src/schema.js +0 -349
  87. package/dist/esm/src/services.js +0 -29
  88. package/dist/esm/src/splits/splitHelpers.js +0 -554
  89. package/dist/esm/src/splits/splits.js +0 -362
  90. package/dist/esm/src/types.js +0 -26
  91. package/dist/esm/src/utils.js +0 -68
  92. package/dist/esm/src/verification/common.js +0 -319
  93. package/dist/esm/src/verification/signature-validator.js +0 -64
  94. package/dist/esm/src/verification/sszTypes.js +0 -64
  95. package/dist/esm/src/verification/termsAndConditions.js +0 -33
  96. package/dist/esm/src/verification/v1.10.0.js +0 -140
  97. package/dist/esm/src/verification/v1.6.0.js +0 -142
  98. package/dist/esm/src/verification/v1.7.0.js +0 -166
  99. package/dist/esm/src/verification/v1.8.0.js +0 -189
  100. package/dist/esm/test/client/ajv.spec.js +0 -318
  101. package/dist/esm/test/client/methods.spec.js +0 -393
  102. package/dist/esm/test/eoa/eoa.spec.js +0 -174
  103. package/dist/esm/test/exit/ethUtils.spec.js +0 -81
  104. package/dist/esm/test/exit/exit.spec.js +0 -374
  105. package/dist/esm/test/exit/verificationHelpers.spec.js +0 -66
  106. package/dist/esm/test/fixtures.js +0 -893
  107. package/dist/esm/test/incentives/incentives.spec.js +0 -177
  108. package/dist/esm/test/splits/splits.spec.js +0 -400
  109. package/dist/types/src/abi/OVMFactory.d.ts +0 -662
  110. package/src/abi/BatchDeposit.ts +0 -117
  111. package/src/abi/MerkleDistributorWithDeadline.ts +0 -70
  112. package/src/abi/Multicall3.ts +0 -250
  113. package/src/abi/OVMFactory.ts +0 -617
  114. package/src/abi/OWR.ts +0 -302
  115. package/src/abi/SplitMain.ts +0 -927
  116. package/src/abi/splitV2FactoryAbi.ts +0 -417
  117. package/src/ajv.ts +0 -191
  118. package/src/base.ts +0 -54
  119. package/src/bytecodes.ts +0 -31
  120. package/src/constants.ts +0 -304
  121. package/src/eoa/eoa.ts +0 -153
  122. package/src/eoa/eoaHelpers.ts +0 -112
  123. package/src/errors.ts +0 -8
  124. package/src/exits/ethUtils.ts +0 -49
  125. package/src/exits/exit.ts +0 -661
  126. package/src/exits/verificationHelpers.ts +0 -110
  127. package/src/incentives/incentiveHelpers.ts +0 -55
  128. package/src/incentives/incentives.ts +0 -153
  129. package/src/index.ts +0 -614
  130. package/src/schema.ts +0 -376
  131. package/src/services.ts +0 -24
  132. package/src/splits/splitHelpers.ts +0 -1032
  133. package/src/splits/splits.ts +0 -504
  134. package/src/types.ts +0 -687
  135. package/src/utils.ts +0 -88
  136. package/src/verification/common.ts +0 -532
  137. package/src/verification/signature-validator.ts +0 -103
  138. package/src/verification/sszTypes.ts +0 -88
  139. package/src/verification/termsAndConditions.ts +0 -32
  140. package/src/verification/v1.10.0.ts +0 -245
  141. package/src/verification/v1.6.0.ts +0 -256
  142. package/src/verification/v1.7.0.ts +0 -309
  143. package/src/verification/v1.8.0.ts +0 -340
@@ -1,12 +1,12 @@
1
1
  import { type TypedMessage } from '@metamask/eth-sig-util';
2
- import { type EIP712TypedData } from '@safe-global/safe-core-sdk-types';
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?: string | undefined;
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?: string | undefined;
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"}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("tsup").Options | import("tsup").Options[] | ((overrideOptions: import("tsup").Options) => import("tsup").Options | import("tsup").Options[] | Promise<import("tsup").Options | import("tsup").Options[]>);
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-sdk",
3
- "version": "2.11.3",
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 compile",
18
- "test": "jest test/**/*.spec.ts --testPathIgnorePatterns=test/sdk-package/",
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.9",
45
- "@chainsafe/discv5": "^0.5.1",
45
+ "@chainsafe/blst": "^0.2.0",
46
+ "@chainsafe/enr": "^5.0.1",
46
47
  "@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",
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": "^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",
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": "^8.0.1",
63
+ "@release-it/conventional-changelog": "^10.0.1",
70
64
  "@types/elliptic": "^6.4.18",
71
- "@types/jest": "^28.1.8",
72
- "@types/node": "^20.2.5",
73
- "@types/semver": "^7.5.8",
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": "^8.57.0",
76
- "husky": "^9.0.11",
77
- "jest": "^28.1.3",
78
- "lint-staged": "^15.2.2",
79
- "msw": "^2.2.1",
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.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"
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
- "\\.[jt]sx?$": "ts-jest"
123
- },
124
- "globals": {
125
- "ts-jest": {
126
- "useESM": true
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
- "^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"
140
+ "^(\\.\\.?\\/.+)\\.js$": "$1",
141
+ "^(\\.\\.?\\/.+)$": "$1"
134
142
  },
135
- "extensionsToTreatAsEsm": [
136
- ".ts"
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
  }
@@ -1,139 +0,0 @@
1
- {
2
- "name": "@obolnetwork/obol-sdk",
3
- "version": "2.11.3",
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
- };
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MerkleDistributorABI = void 0;
4
- exports.MerkleDistributorABI = {
5
- abi: [
6
- {
7
- inputs: [
8
- { internalType: 'address', name: 'token_', type: 'address' },
9
- { internalType: 'bytes32', name: 'merkleRoot_', type: 'bytes32' },
10
- ],
11
- stateMutability: 'nonpayable',
12
- type: 'constructor',
13
- },
14
- {
15
- anonymous: false,
16
- inputs: [
17
- {
18
- indexed: false,
19
- internalType: 'uint256',
20
- name: 'index',
21
- type: 'uint256',
22
- },
23
- {
24
- indexed: false,
25
- internalType: 'address',
26
- name: 'account',
27
- type: 'address',
28
- },
29
- {
30
- indexed: false,
31
- internalType: 'uint256',
32
- name: 'amount',
33
- type: 'uint256',
34
- },
35
- ],
36
- name: 'Claimed',
37
- type: 'event',
38
- },
39
- {
40
- inputs: [
41
- { internalType: 'uint256', name: 'index', type: 'uint256' },
42
- { internalType: 'address', name: 'account', type: 'address' },
43
- { internalType: 'uint256', name: 'amount', type: 'uint256' },
44
- { internalType: 'bytes32[]', name: 'merkleProof', type: 'bytes32[]' },
45
- ],
46
- name: 'claim',
47
- outputs: [],
48
- stateMutability: 'nonpayable',
49
- type: 'function',
50
- },
51
- {
52
- inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
53
- name: 'isClaimed',
54
- outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
55
- stateMutability: 'view',
56
- type: 'function',
57
- },
58
- {
59
- inputs: [],
60
- name: 'merkleRoot',
61
- outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
62
- stateMutability: 'view',
63
- type: 'function',
64
- },
65
- {
66
- inputs: [],
67
- name: 'token',
68
- outputs: [{ internalType: 'address', name: '', type: 'address' }],
69
- stateMutability: 'view',
70
- type: 'function',
71
- },
72
- ],
73
- };