@obolnetwork/obol-sdk 1.0.16 → 1.0.17
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/README.md +6 -3
- package/dist/cjs/package.json +11 -6
- package/dist/cjs/src/ajv.js +27 -0
- package/dist/cjs/src/constants.js +8 -4
- package/dist/cjs/src/index.js +10 -9
- package/dist/cjs/src/schema.js +8 -0
- package/dist/cjs/src/utils.js +3 -3
- package/dist/cjs/src/verification/common.js +19 -7
- package/dist/cjs/src/verification/termsAndConditions.js +1 -1
- package/dist/cjs/src/verification/v1.6.0.js +1 -1
- package/dist/cjs/src/verification/v1.7.0.js +3 -3
- package/dist/cjs/src/verification/v1.8.0.js +3 -3
- package/dist/cjs/test/fixtures.js +27 -33
- package/dist/cjs/test/methods.test.js +54 -27
- package/dist/esm/package.json +11 -6
- package/dist/esm/src/ajv.js +27 -0
- package/dist/esm/src/base.js +1 -1
- package/dist/esm/src/constants.js +7 -3
- package/dist/esm/src/index.js +11 -10
- package/dist/esm/src/schema.js +8 -0
- package/dist/esm/src/utils.js +3 -3
- package/dist/esm/src/verification/common.js +27 -15
- package/dist/esm/src/verification/sszTypes.js +1 -1
- package/dist/esm/src/verification/termsAndConditions.js +1 -1
- package/dist/esm/src/verification/v1.6.0.js +5 -5
- package/dist/esm/src/verification/v1.7.0.js +8 -8
- package/dist/esm/src/verification/v1.8.0.js +8 -8
- package/dist/esm/test/fixtures.js +27 -33
- package/dist/esm/test/methods.test.js +55 -28
- package/dist/types/src/constants.d.ts +3 -1
- package/dist/types/src/schema.d.ts +8 -0
- package/dist/types/src/types.d.ts +18 -18
- package/package.json +12 -7
- package/src/ajv.ts +38 -7
- package/src/base.ts +22 -18
- package/src/constants.ts +42 -36
- package/src/errors.ts +4 -4
- package/src/index.ts +85 -75
- package/src/schema.ts +10 -2
- package/src/services.ts +6 -6
- package/src/types.ts +65 -65
- package/src/utils.ts +17 -17
- package/src/verification/common.ts +374 -333
- package/src/verification/sszTypes.ts +60 -51
- package/src/verification/termsAndConditions.ts +16 -14
- package/src/verification/v1.6.0.ts +214 -184
- package/src/verification/v1.7.0.ts +268 -233
- package/src/verification/v1.8.0.ts +266 -225
package/README.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
<h1 align="center">Obol SDK</h1>
|
|
4
4
|
|
|
5
|
-
This repo contains the Obol Software Development Kit, for creating Distributed Validators with the help of the [Obol API](https://docs.obol.
|
|
5
|
+
This repo contains the Obol Software Development Kit, for creating Distributed Validators with the help of the [Obol API](https://docs.obol.org/api).
|
|
6
6
|
|
|
7
7
|
## Getting Started
|
|
8
8
|
|
|
9
|
-
Checkout our [docs](https://docs.obol.
|
|
9
|
+
Checkout our [docs](https://docs.obol.org/docs/advanced/quickstart-sdk), [examples](https://github.com/ObolNetwork/obol-sdk-examples/), and SDK [reference](https://obolnetwork.github.io/obol-sdk). Further guides and walkthroughs coming soon.
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
To use obol-sdk and in order to be able to create a cluster definition or accept an invite to join a cluster, you must accept the [latest Obol terms and conditions](https://obol.org/terms.pdf) by calling acceptObolLatestTermsAndConditions.
|
|
10
13
|
|
|
11
14
|
## Contributing
|
|
12
15
|
|
package/dist/cjs/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obolnetwork/obol-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
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"
|
|
7
7
|
},
|
|
8
|
-
"homepage": "https://docs.obol.
|
|
8
|
+
"homepage": "https://docs.obol.org/",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"Obol",
|
|
11
11
|
"Distributed Validators",
|
|
@@ -20,13 +20,15 @@
|
|
|
20
20
|
"npm:publish": "npm publish --tag latest",
|
|
21
21
|
"release": "release-it",
|
|
22
22
|
"release:dry": "release-it --dry-run --no-npm",
|
|
23
|
-
"lint": "eslint \"{src,
|
|
24
|
-
"lint-ci": "eslint \"{src,
|
|
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}\""
|
|
25
27
|
},
|
|
26
28
|
"main": "./dist/cjs/src/index.js",
|
|
27
29
|
"module": "./dist/esm/src/index.js",
|
|
28
30
|
"typings": "./dist/types/src/index.d.ts",
|
|
29
|
-
"author": "Obol Labs (https://obol.
|
|
31
|
+
"author": "Obol Labs (https://obol.org)",
|
|
30
32
|
"repository": {
|
|
31
33
|
"type": "git",
|
|
32
34
|
"url": "git+https://github.com/obolnetwork/obol-sdk.git"
|
|
@@ -65,15 +67,18 @@
|
|
|
65
67
|
"@types/semver": "^7.5.8",
|
|
66
68
|
"@types/uuid": "^9.0.1",
|
|
67
69
|
"eslint": "^8.57.0",
|
|
70
|
+
"husky": "^9.0.11",
|
|
68
71
|
"jest": "^28.1.3",
|
|
72
|
+
"lint-staged": "^15.2.2",
|
|
69
73
|
"msw": "^2.2.1",
|
|
70
74
|
"npm-run-all": "^4.1.5",
|
|
75
|
+
"prettier": "^3.2.5",
|
|
71
76
|
"release-it": "^17.2.1",
|
|
72
77
|
"ts-jest": "^28.0.8",
|
|
73
78
|
"tsup": "^6.7.0",
|
|
74
79
|
"typedoc": "^0.25.7",
|
|
75
80
|
"typedoc-plugin-markdown": "^4.0.0-next.50",
|
|
76
|
-
"typescript": "
|
|
81
|
+
"typescript": "~5.3.3"
|
|
77
82
|
},
|
|
78
83
|
"engines": {
|
|
79
84
|
"node": ">= 16"
|
package/dist/cjs/src/ajv.js
CHANGED
|
@@ -5,9 +5,36 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.validatePayload = void 0;
|
|
7
7
|
const ajv_1 = __importDefault(require("ajv"));
|
|
8
|
+
const ethers_1 = require("ethers");
|
|
9
|
+
function validDepositAmounts(data, deposits) {
|
|
10
|
+
let sum = 0;
|
|
11
|
+
// from ether togwei is same as from gwei to wei
|
|
12
|
+
const maxDeposit = Number((0, ethers_1.parseUnits)('32', 'gwei'));
|
|
13
|
+
const minDeposit = Number((0, ethers_1.parseUnits)('1', 'gwei'));
|
|
14
|
+
for (const element of deposits) {
|
|
15
|
+
const amountInGWei = Number(element);
|
|
16
|
+
if (!Number.isInteger(amountInGWei) ||
|
|
17
|
+
amountInGWei > maxDeposit ||
|
|
18
|
+
amountInGWei < minDeposit) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
sum += amountInGWei;
|
|
22
|
+
}
|
|
23
|
+
if (sum / minDeposit !== 32) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
8
30
|
function validatePayload(data, schema) {
|
|
9
31
|
var _a;
|
|
10
32
|
const ajv = new ajv_1.default();
|
|
33
|
+
ajv.addKeyword({
|
|
34
|
+
keyword: 'validDepositAmounts',
|
|
35
|
+
validate: validDepositAmounts,
|
|
36
|
+
errors: true,
|
|
37
|
+
});
|
|
11
38
|
const validate = ajv.compile(schema);
|
|
12
39
|
const isValid = validate(data);
|
|
13
40
|
if (!isValid) {
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.TERMS_AND_CONDITIONS_URL = exports.TERMS_AND_CONDITIONS_VERSION = exports.ETHER_TO_GWEI = exports.DEFAULT_CHAIN_ID = exports.DEFAULT_BASE_URL = exports.DefinitionFlow = exports.GENESIS_VALIDATOR_ROOT = exports.DOMAIN_DEPOSIT = exports.DOMAIN_APPLICATION_BUILDER = exports.SDK_VERSION = exports.CONFIG_VERSION = exports.DKG_ALGORITHM = exports.signEnrPayload = exports.signOperatorConfigHashPayload = exports.signCreatorConfigHashPayload = exports.ENRTypedMessage = exports.OperatorTypedMessage = exports.OperatorConfigHashSigningTypes = exports.EnrSigningTypes = exports.CreatorTypedMessage = exports.Domain = exports.TermsAndConditionsSigningTypes = exports.CreatorConfigHashSigningTypes = exports.EIP712_DOMAIN_VERSION = exports.EIP712_DOMAIN_NAME = exports.CONFLICT_ERROR_MSG = void 0;
|
|
26
|
+
exports.TERMS_AND_CONDITIONS_HASH = exports.TERMS_AND_CONDITIONS_URL = exports.TERMS_AND_CONDITIONS_VERSION = exports.ETHER_TO_GWEI = exports.DEFAULT_CHAIN_ID = exports.DEFAULT_BASE_VERSION = exports.DEFAULT_BASE_URL = exports.DefinitionFlow = exports.GENESIS_VALIDATOR_ROOT = exports.DOMAIN_DEPOSIT = exports.DOMAIN_APPLICATION_BUILDER = exports.SDK_VERSION = exports.CONFIG_VERSION = exports.DKG_ALGORITHM = exports.signEnrPayload = exports.signOperatorConfigHashPayload = exports.signCreatorConfigHashPayload = exports.ENRTypedMessage = exports.OperatorTypedMessage = exports.OperatorConfigHashSigningTypes = exports.EnrSigningTypes = exports.CreatorTypedMessage = exports.Domain = exports.TermsAndConditionsSigningTypes = exports.CreatorConfigHashSigningTypes = exports.EIP712_DOMAIN_VERSION = exports.EIP712_DOMAIN_NAME = exports.CONFLICT_ERROR_MSG = void 0;
|
|
27
27
|
const pjson = __importStar(require("../package.json"));
|
|
28
28
|
exports.CONFLICT_ERROR_MSG = 'Conflict';
|
|
29
29
|
exports.EIP712_DOMAIN_NAME = 'Obol';
|
|
@@ -35,7 +35,7 @@ exports.TermsAndConditionsSigningTypes = {
|
|
|
35
35
|
TermsAndConditions: [
|
|
36
36
|
{ name: 'terms_and_conditions_hash', type: 'string' },
|
|
37
37
|
{ name: 'version', type: 'uint256' },
|
|
38
|
-
]
|
|
38
|
+
],
|
|
39
39
|
};
|
|
40
40
|
const EIP712Domain = [
|
|
41
41
|
{ name: 'name', type: 'string' },
|
|
@@ -103,7 +103,7 @@ const signEnrPayload = (payload, chainId) => {
|
|
|
103
103
|
};
|
|
104
104
|
exports.signEnrPayload = signEnrPayload;
|
|
105
105
|
exports.DKG_ALGORITHM = 'default';
|
|
106
|
-
exports.CONFIG_VERSION = 'v1.
|
|
106
|
+
exports.CONFIG_VERSION = 'v1.8.0';
|
|
107
107
|
exports.SDK_VERSION = pjson.version;
|
|
108
108
|
exports.DOMAIN_APPLICATION_BUILDER = '00000001';
|
|
109
109
|
exports.DOMAIN_DEPOSIT = '03000000';
|
|
@@ -116,7 +116,11 @@ var DefinitionFlow;
|
|
|
116
116
|
DefinitionFlow["Charon"] = "Charon-Command";
|
|
117
117
|
})(DefinitionFlow || (exports.DefinitionFlow = DefinitionFlow = {}));
|
|
118
118
|
exports.DEFAULT_BASE_URL = 'https://api.obol.tech';
|
|
119
|
+
exports.DEFAULT_BASE_VERSION = 'v1';
|
|
119
120
|
exports.DEFAULT_CHAIN_ID = 17000;
|
|
120
121
|
exports.ETHER_TO_GWEI = 10 ** 9;
|
|
121
122
|
exports.TERMS_AND_CONDITIONS_VERSION = 1;
|
|
122
|
-
exports.TERMS_AND_CONDITIONS_URL =
|
|
123
|
+
exports.TERMS_AND_CONDITIONS_URL = exports.TERMS_AND_CONDITIONS_VERSION === 1
|
|
124
|
+
? 'https://obol.org/terms.pdf'
|
|
125
|
+
: `https://obol.org/${exports.TERMS_AND_CONDITIONS_VERSION}/terms.pdf`;
|
|
126
|
+
exports.TERMS_AND_CONDITIONS_HASH = '0xd33721644e8f3afab1495a74abe3523cec12d48b8da6cb760972492ca3f1a273';
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -31,7 +31,6 @@ const errors_js_1 = require("./errors.js");
|
|
|
31
31
|
const common_js_1 = require("./verification/common.js");
|
|
32
32
|
const ajv_js_1 = require("./ajv.js");
|
|
33
33
|
const schema_js_1 = require("./schema.js");
|
|
34
|
-
const termsAndConditions_js_1 = require("./verification/termsAndConditions.js");
|
|
35
34
|
__exportStar(require("./types.js"), exports);
|
|
36
35
|
__exportStar(require("./services.js"), exports);
|
|
37
36
|
/**
|
|
@@ -66,18 +65,18 @@ class Client extends base_js_1.Base {
|
|
|
66
65
|
throw new Error('Signer is required in acceptObolTermsAndConditions');
|
|
67
66
|
}
|
|
68
67
|
try {
|
|
69
|
-
const termsAndConditionsHash =
|
|
68
|
+
const termsAndConditionsHash = constants_js_1.TERMS_AND_CONDITIONS_HASH;
|
|
70
69
|
const address = yield this.signer.getAddress();
|
|
71
70
|
const termsAndConditionsPayload = {
|
|
72
71
|
address,
|
|
73
72
|
version: constants_js_1.TERMS_AND_CONDITIONS_VERSION,
|
|
74
|
-
terms_and_conditions_hash: termsAndConditionsHash
|
|
73
|
+
terms_and_conditions_hash: termsAndConditionsHash,
|
|
75
74
|
};
|
|
76
75
|
const termsAndConditionsSignature = yield this.signer.signTypedData((0, constants_js_1.Domain)(), constants_js_1.TermsAndConditionsSigningTypes, {
|
|
77
76
|
terms_and_conditions_hash: termsAndConditionsHash,
|
|
78
77
|
version: constants_js_1.TERMS_AND_CONDITIONS_VERSION,
|
|
79
78
|
});
|
|
80
|
-
const termsAndConditionsResponse = yield this.request(
|
|
79
|
+
const termsAndConditionsResponse = yield this.request(`/${constants_js_1.DEFAULT_BASE_VERSION}/termsAndConditions`, {
|
|
81
80
|
method: 'POST',
|
|
82
81
|
body: JSON.stringify(termsAndConditionsPayload),
|
|
83
82
|
headers: {
|
|
@@ -109,13 +108,15 @@ class Client extends base_js_1.Base {
|
|
|
109
108
|
throw new Error('Signer is required in createClusterDefinition');
|
|
110
109
|
}
|
|
111
110
|
(0, ajv_js_1.validatePayload)(newCluster, schema_js_1.definitionSchema);
|
|
112
|
-
const clusterConfig = Object.assign(Object.assign({}, newCluster), { fork_version: this.fork_version, dkg_algorithm: constants_js_1.DKG_ALGORITHM, version: constants_js_1.CONFIG_VERSION, uuid: (0, uuid_1.v4)(), timestamp: new Date().toISOString(), threshold: Math.ceil((2 * newCluster.operators.length) / 3), num_validators: newCluster.validators.length
|
|
111
|
+
const clusterConfig = Object.assign(Object.assign({}, newCluster), { fork_version: this.fork_version, dkg_algorithm: constants_js_1.DKG_ALGORITHM, version: constants_js_1.CONFIG_VERSION, uuid: (0, uuid_1.v4)(), timestamp: new Date().toISOString(), threshold: Math.ceil((2 * newCluster.operators.length) / 3), num_validators: newCluster.validators.length, deposit_amounts: newCluster.deposit_amounts
|
|
112
|
+
? newCluster.deposit_amounts
|
|
113
|
+
: ['32000000000'] });
|
|
113
114
|
try {
|
|
114
115
|
const address = yield this.signer.getAddress();
|
|
115
116
|
clusterConfig.creator = { address };
|
|
116
117
|
clusterConfig.config_hash = (0, common_js_1.clusterConfigOrDefinitionHash)(clusterConfig, true);
|
|
117
118
|
const creatorConfigSignature = yield this.signer.signTypedData((0, constants_js_1.Domain)(this.chainId), constants_js_1.CreatorConfigHashSigningTypes, { creator_config_hash: clusterConfig.config_hash });
|
|
118
|
-
const clusterDefinition = yield this.request(
|
|
119
|
+
const clusterDefinition = yield this.request(`/${constants_js_1.DEFAULT_BASE_VERSION}/definition`, {
|
|
119
120
|
method: 'POST',
|
|
120
121
|
body: JSON.stringify(clusterConfig),
|
|
121
122
|
headers: {
|
|
@@ -154,7 +155,7 @@ class Client extends base_js_1.Base {
|
|
|
154
155
|
const operatorConfigSignature = yield this.signer.signTypedData((0, constants_js_1.Domain)(this.chainId), constants_js_1.OperatorConfigHashSigningTypes, { operator_config_hash: configHash });
|
|
155
156
|
const operatorENRSignature = yield this.signer.signTypedData((0, constants_js_1.Domain)(this.chainId), constants_js_1.EnrSigningTypes, { enr: operatorPayload.enr });
|
|
156
157
|
const operatorData = Object.assign(Object.assign({}, operatorPayload), { address, enr_signature: operatorENRSignature, fork_version: this.fork_version });
|
|
157
|
-
const clusterDefinition = yield this.request(
|
|
158
|
+
const clusterDefinition = yield this.request(`/${constants_js_1.DEFAULT_BASE_VERSION}/definition/${configHash}`, {
|
|
158
159
|
method: 'PUT',
|
|
159
160
|
body: JSON.stringify(operatorData),
|
|
160
161
|
headers: {
|
|
@@ -178,7 +179,7 @@ class Client extends base_js_1.Base {
|
|
|
178
179
|
*/
|
|
179
180
|
getClusterDefinition(configHash) {
|
|
180
181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const clusterDefinition = yield this.request(
|
|
182
|
+
const clusterDefinition = yield this.request(`/${constants_js_1.DEFAULT_BASE_VERSION}/definition/${configHash}`, {
|
|
182
183
|
method: 'GET',
|
|
183
184
|
});
|
|
184
185
|
return clusterDefinition;
|
|
@@ -194,7 +195,7 @@ class Client extends base_js_1.Base {
|
|
|
194
195
|
*/
|
|
195
196
|
getClusterLock(configHash) {
|
|
196
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
const lock = yield this.request(
|
|
198
|
+
const lock = yield this.request(`/${constants_js_1.DEFAULT_BASE_VERSION}/lock/configHash/${configHash}`, {
|
|
198
199
|
method: 'GET',
|
|
199
200
|
});
|
|
200
201
|
return lock;
|
package/dist/cjs/src/schema.js
CHANGED
|
@@ -55,6 +55,14 @@ exports.definitionSchema = {
|
|
|
55
55
|
required: ['fee_recipient_address', 'withdrawal_address'],
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
+
deposit_amounts: {
|
|
59
|
+
type: 'array',
|
|
60
|
+
items: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
pattern: '^[0-9]+$',
|
|
63
|
+
},
|
|
64
|
+
validDepositAmounts: true,
|
|
65
|
+
},
|
|
58
66
|
},
|
|
59
67
|
required: ['name', 'operators', 'validators'],
|
|
60
68
|
};
|
package/dist/cjs/src/utils.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.strToUint8Array = strToUint8Array;
|
|
|
13
13
|
const definitionFlow = (clusterDefinition) => {
|
|
14
14
|
if (clusterDefinition.creator.address &&
|
|
15
15
|
clusterDefinition.creator.config_signature &&
|
|
16
|
-
clusterDefinition.operators.every(
|
|
16
|
+
clusterDefinition.operators.every(operator => {
|
|
17
17
|
return (operator.address &&
|
|
18
18
|
operator.config_signature &&
|
|
19
19
|
operator.enr &&
|
|
@@ -23,7 +23,7 @@ const definitionFlow = (clusterDefinition) => {
|
|
|
23
23
|
}
|
|
24
24
|
else if (clusterDefinition.creator.address &&
|
|
25
25
|
clusterDefinition.creator.config_signature &&
|
|
26
|
-
clusterDefinition.operators.every(
|
|
26
|
+
clusterDefinition.operators.every(operator => {
|
|
27
27
|
return (!operator.address &&
|
|
28
28
|
!operator.config_signature &&
|
|
29
29
|
operator.enr &&
|
|
@@ -33,7 +33,7 @@ const definitionFlow = (clusterDefinition) => {
|
|
|
33
33
|
}
|
|
34
34
|
else if (!clusterDefinition.creator.address &&
|
|
35
35
|
!clusterDefinition.creator.config_signature &&
|
|
36
|
-
clusterDefinition.operators.every(
|
|
36
|
+
clusterDefinition.operators.every(operator => {
|
|
37
37
|
return (!operator.address &&
|
|
38
38
|
!operator.config_signature &&
|
|
39
39
|
operator.enr &&
|
|
@@ -61,17 +61,20 @@ const clusterConfigOrDefinitionHash = (cluster, configOnly) => {
|
|
|
61
61
|
if (semver.eq(cluster.version, 'v1.6.0')) {
|
|
62
62
|
definitionType = (0, v1_6_0_js_1.clusterDefinitionContainerTypeV1X6)(configOnly);
|
|
63
63
|
val = (0, v1_6_0_js_1.hashClusterDefinitionV1X6)(cluster, configOnly);
|
|
64
|
-
return ('0x' +
|
|
64
|
+
return ('0x' +
|
|
65
|
+
Buffer.from(definitionType.hashTreeRoot(val).buffer).toString('hex'));
|
|
65
66
|
}
|
|
66
67
|
if (semver.eq(cluster.version, 'v1.7.0')) {
|
|
67
68
|
definitionType = (0, v1_7_0_js_1.clusterDefinitionContainerTypeV1X7)(configOnly);
|
|
68
69
|
val = (0, v1_7_0_js_1.hashClusterDefinitionV1X7)(cluster, configOnly);
|
|
69
|
-
return ('0x' +
|
|
70
|
+
return ('0x' +
|
|
71
|
+
Buffer.from(definitionType.hashTreeRoot(val).buffer).toString('hex'));
|
|
70
72
|
}
|
|
71
73
|
if (semver.eq(cluster.version, 'v1.8.0')) {
|
|
72
74
|
definitionType = (0, v1_8_0_js_1.clusterDefinitionContainerTypeV1X8)(configOnly);
|
|
73
75
|
val = (0, v1_8_0_js_1.hashClusterDefinitionV1X8)(cluster, configOnly);
|
|
74
|
-
return ('0x' +
|
|
76
|
+
return ('0x' +
|
|
77
|
+
Buffer.from(definitionType.hashTreeRoot(val).buffer).toString('hex'));
|
|
75
78
|
}
|
|
76
79
|
throw new Error('unsupported version');
|
|
77
80
|
};
|
|
@@ -143,7 +146,7 @@ const verifyDefinitionSignatures = (clusterDefinition, definitionType) => {
|
|
|
143
146
|
if (definitionType === constants_js_1.DefinitionFlow.Solo) {
|
|
144
147
|
return true;
|
|
145
148
|
}
|
|
146
|
-
return clusterDefinition.operators.every(
|
|
149
|
+
return clusterDefinition.operators.every(operator => {
|
|
147
150
|
const configSigner = getPUTConfigHashSigner(operator.config_signature, clusterDefinition.config_hash, types_js_1.FORK_MAPPING[clusterDefinition.fork_version]);
|
|
148
151
|
const enrSigner = getEnrSigner(operator.enr_signature, operator.enr, types_js_1.FORK_MAPPING[clusterDefinition.fork_version]);
|
|
149
152
|
if (configSigner !== operator.address.toLowerCase() ||
|
|
@@ -220,15 +223,24 @@ const verifyBuilderRegistration = (validator, feeRecipientAddress, forkVersion)
|
|
|
220
223
|
const builderDomain = computeDomain((0, ssz_1.fromHexString)(constants_js_1.DOMAIN_APPLICATION_BUILDER), forkVersion);
|
|
221
224
|
if (validator.distributed_public_key !==
|
|
222
225
|
((_a = validator.builder_registration) === null || _a === void 0 ? void 0 : _a.message.pubkey)) {
|
|
223
|
-
return {
|
|
226
|
+
return {
|
|
227
|
+
isValidBuilderRegistration: false,
|
|
228
|
+
builderRegistrationMsg: new Uint8Array(0),
|
|
229
|
+
};
|
|
224
230
|
}
|
|
225
231
|
if (feeRecipientAddress.toLowerCase() !==
|
|
226
232
|
validator.builder_registration.message.fee_recipient.toLowerCase()) {
|
|
227
|
-
return {
|
|
233
|
+
return {
|
|
234
|
+
isValidBuilderRegistration: false,
|
|
235
|
+
builderRegistrationMsg: new Uint8Array(0),
|
|
236
|
+
};
|
|
228
237
|
}
|
|
229
238
|
const builderRegistrationMessageBuffer = computebuilderRegistrationMsgRoot(validator.builder_registration.message);
|
|
230
239
|
const builderRegistrationMessage = (0, exports.signingRoot)(builderDomain, builderRegistrationMessageBuffer);
|
|
231
|
-
return {
|
|
240
|
+
return {
|
|
241
|
+
isValidBuilderRegistration: true,
|
|
242
|
+
builderRegistrationMsg: builderRegistrationMessage,
|
|
243
|
+
};
|
|
232
244
|
};
|
|
233
245
|
exports.verifyBuilderRegistration = verifyBuilderRegistration;
|
|
234
246
|
const verifyNodeSignatures = (clusterLock) => {
|
|
@@ -29,7 +29,7 @@ const hashTermsAndConditions = () => __awaiter(void 0, void 0, void 0, function*
|
|
|
29
29
|
terms_and_conditions_hash: new ssz_1.ByteListType(Number.MAX_SAFE_INTEGER),
|
|
30
30
|
});
|
|
31
31
|
const termsHasVal = termsType.defaultValue();
|
|
32
|
-
termsHasVal.terms_and_conditions_hash = (0, utils_1.strToUint8Array)(data === null || data === void 0 ? void 0 : data.text);
|
|
32
|
+
termsHasVal.terms_and_conditions_hash = (0, utils_1.strToUint8Array)(data === null || data === void 0 ? void 0 : data.text.replace(/[^a-zA-Z0-9]/g, ''));
|
|
33
33
|
return ('0x' +
|
|
34
34
|
Buffer.from(termsType.hashTreeRoot(termsHasVal).buffer).toString('hex'));
|
|
35
35
|
}
|
|
@@ -60,7 +60,7 @@ const hashClusterDefinitionV1X6 = (cluster, configOnly) => {
|
|
|
60
60
|
address: (0, ssz_1.fromHexString)(cluster.creator.address),
|
|
61
61
|
config_signature: (0, ssz_1.fromHexString)(cluster.creator.config_signature),
|
|
62
62
|
};
|
|
63
|
-
val.validators = cluster.validators.map(
|
|
63
|
+
val.validators = cluster.validators.map(validator => {
|
|
64
64
|
return {
|
|
65
65
|
fee_recipient_address: (0, ssz_1.fromHexString)(validator.fee_recipient_address),
|
|
66
66
|
withdrawal_address: (0, ssz_1.fromHexString)(validator.withdrawal_address),
|
|
@@ -60,7 +60,7 @@ const hashClusterDefinitionV1X7 = (cluster, configOnly) => {
|
|
|
60
60
|
address: (0, ssz_1.fromHexString)(cluster.creator.address),
|
|
61
61
|
config_signature: (0, ssz_1.fromHexString)(cluster.creator.config_signature),
|
|
62
62
|
};
|
|
63
|
-
val.validators = cluster.validators.map(
|
|
63
|
+
val.validators = cluster.validators.map(validator => {
|
|
64
64
|
return {
|
|
65
65
|
fee_recipient_address: (0, ssz_1.fromHexString)(validator.fee_recipient_address),
|
|
66
66
|
withdrawal_address: (0, ssz_1.fromHexString)(validator.withdrawal_address),
|
|
@@ -97,11 +97,11 @@ const hashClusterLockV1X7 = (cluster) => {
|
|
|
97
97
|
const val = lockType.defaultValue();
|
|
98
98
|
// Check if we can replace with definition_hash
|
|
99
99
|
val.cluster_definition = (0, exports.hashClusterDefinitionV1X7)(cluster.cluster_definition, false);
|
|
100
|
-
val.distributed_validators = cluster.distributed_validators.map(
|
|
100
|
+
val.distributed_validators = cluster.distributed_validators.map(dValidator => {
|
|
101
101
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
102
102
|
return {
|
|
103
103
|
distributed_public_key: (0, ssz_1.fromHexString)(dValidator.distributed_public_key),
|
|
104
|
-
public_shares: dValidator.public_shares.map(
|
|
104
|
+
public_shares: dValidator.public_shares.map(publicShare => (0, ssz_1.fromHexString)(publicShare)),
|
|
105
105
|
deposit_data: {
|
|
106
106
|
pubkey: (0, ssz_1.fromHexString)((_a = dValidator.deposit_data) === null || _a === void 0 ? void 0 : _a.pubkey),
|
|
107
107
|
withdrawal_credentials: (0, ssz_1.fromHexString)((_b = dValidator.deposit_data) === null || _b === void 0 ? void 0 : _b.withdrawal_credentials),
|
|
@@ -61,7 +61,7 @@ const hashClusterDefinitionV1X8 = (cluster, configOnly) => {
|
|
|
61
61
|
address: (0, ssz_1.fromHexString)(cluster.creator.address),
|
|
62
62
|
config_signature: (0, ssz_1.fromHexString)(cluster.creator.config_signature),
|
|
63
63
|
};
|
|
64
|
-
val.validators = cluster.validators.map(
|
|
64
|
+
val.validators = cluster.validators.map(validator => {
|
|
65
65
|
return {
|
|
66
66
|
fee_recipient_address: (0, ssz_1.fromHexString)(validator.fee_recipient_address),
|
|
67
67
|
withdrawal_address: (0, ssz_1.fromHexString)(validator.withdrawal_address),
|
|
@@ -146,8 +146,8 @@ const verifyDVV1X8 = (clusterLock) => {
|
|
|
146
146
|
pubShares.push((0, ssz_1.fromHexString)(element));
|
|
147
147
|
}
|
|
148
148
|
// Deposit Data Verification
|
|
149
|
-
for (
|
|
150
|
-
const depositData =
|
|
149
|
+
for (const element of validator.partial_deposit_data) {
|
|
150
|
+
const depositData = element;
|
|
151
151
|
const { isValidDepositData, depositDataMsg } = (0, common_1.verifyDepositData)(distributedPublicKey, depositData, clusterLock.cluster_definition.validators[i].withdrawal_address, clusterLock.cluster_definition.fork_version);
|
|
152
152
|
if (!isValidDepositData) {
|
|
153
153
|
return false;
|
|
@@ -187,44 +187,40 @@ exports.clusterConfigV1X8 = {
|
|
|
187
187
|
withdrawal_address: '0xE0C5ceA4D3869F156717C66E188Ae81C80914a6e',
|
|
188
188
|
},
|
|
189
189
|
],
|
|
190
|
-
deposit_amounts: [
|
|
191
|
-
'8000000000',
|
|
192
|
-
'16000000000',
|
|
193
|
-
'8000000000'
|
|
194
|
-
],
|
|
190
|
+
deposit_amounts: ['8000000000', '16000000000', '8000000000'],
|
|
195
191
|
};
|
|
196
192
|
exports.clusterLockV1X8 = {
|
|
197
193
|
cluster_definition: {
|
|
198
194
|
name: 'xxxx',
|
|
199
195
|
creator: {
|
|
200
196
|
address: '0x86B8145c98e5BD25BA722645b15eD65f024a87EC',
|
|
201
|
-
config_signature: '0xd30b182fadbc2c5b2bb3f3f6ed6ac2588f297ceb610ed5509bf3e5a25a9b30c70f8a09ef1d2c8e1dbe5ff441299fe66ec677734cc08beec87e94b7effcb089701b'
|
|
197
|
+
config_signature: '0xd30b182fadbc2c5b2bb3f3f6ed6ac2588f297ceb610ed5509bf3e5a25a9b30c70f8a09ef1d2c8e1dbe5ff441299fe66ec677734cc08beec87e94b7effcb089701b',
|
|
202
198
|
},
|
|
203
199
|
operators: [
|
|
204
200
|
{
|
|
205
201
|
address: '0x86B8145c98e5BD25BA722645b15eD65f024a87EC',
|
|
206
202
|
enr: 'enr:-HW4QLlrtMjFLGkFT1bwdGbvZQlH8hLi0M2g44JAxEYP3BZmYpcsy9Q56HPPD87fMucjvLv4-obEFacpsg0ehRilbHeAgmlkgnY0iXNlY3AyNTZrMaEDRaa5o2aSgqyFq_ERZcQTztrOij1mFtXX1bJuVI6ieak',
|
|
207
203
|
config_signature: '0x3df771ecfc9ae2d01da9249dc636a42893e48759c0fa5c51f5e5e14f3ea4513233d1e3bbdd0e11d4b67c8a907201fd08225a75a1e2d6f510a439d6b15f0c36341c',
|
|
208
|
-
enr_signature: '0x3fe2a124dabe3d517e4c274074b3529d36d9528ca6fa8a4e74ef356f86a07c1462fe72a5336421c2647be7babc4ce1835c2101133e0779cf81d4a8d8cb9fe5591c'
|
|
204
|
+
enr_signature: '0x3fe2a124dabe3d517e4c274074b3529d36d9528ca6fa8a4e74ef356f86a07c1462fe72a5336421c2647be7babc4ce1835c2101133e0779cf81d4a8d8cb9fe5591c',
|
|
209
205
|
},
|
|
210
206
|
{
|
|
211
207
|
address: '0xC35CfCd67b9C27345a54EDEcC1033F2284148c81',
|
|
212
208
|
enr: 'enr:-Iu4QNbiUUUwT18LynBbVPJhNxvzQsaSpUr40mQTWscnZaqKb6vAlvV8j-eDDR3E0wjMQumGRbGm2IAb5_k4bVWJiVGAgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPOiodUji0ohgJb5sNK1hgv8g6xO5_znZz3NkkBkyYyKIN0Y3CCDhqDdWRwgg4u',
|
|
213
209
|
config_signature: '0x12d19d6fc4c1a5d9e7be09f47c2f2357dd89f47aba8ae0185f5345e08bcc3adc324bdd51e68a12c3ca34c604d786cfde5f0798aa928dac496edb16c70e7086551b',
|
|
214
|
-
enr_signature: '0xa3d49832dfaf0ad87c5796f9bc151009343da70b91fd53bee3645baa63d001d3207662da8f67b3a20f2ee30c9cacb24a5719a78dc24e030c8ac93e7b3b46bf881b'
|
|
210
|
+
enr_signature: '0xa3d49832dfaf0ad87c5796f9bc151009343da70b91fd53bee3645baa63d001d3207662da8f67b3a20f2ee30c9cacb24a5719a78dc24e030c8ac93e7b3b46bf881b',
|
|
215
211
|
},
|
|
216
212
|
{
|
|
217
213
|
address: '0x33807D6F1DCe44b9C599fFE03640762A6F08C496',
|
|
218
214
|
enr: 'enr:-Iu4QJyserRukhG0Vgi2csu7GjpHYUGufNEbZ8Q7ZBrcZUb0KqpL5QzHonkh1xxHlxatTxrIcX_IS5J3SEWR_sa0ptGAgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQMAUgEqczOjevyculnUIofhCj0DkgJudErM7qCYIvIkzIN0Y3CCDhqDdWRwgg4u',
|
|
219
215
|
config_signature: '0x665d287c46921aad0dde389291b982f24dbbeb4b7ce5ee7bbc4a7d1fb55134f7136889eb3ce70208a7f276b9d4aefb1fbc6159476934567e5bf11765b2c9649b1b',
|
|
220
|
-
enr_signature: '0xc32d5ea29569b01354d48ddaf56df1481a5ae618ffb47602ef40e0e77357de5f23a5258923be5fa06ecce20f5692847860c25c38b97a4e306c94decd99c0519a1b'
|
|
216
|
+
enr_signature: '0xc32d5ea29569b01354d48ddaf56df1481a5ae618ffb47602ef40e0e77357de5f23a5258923be5fa06ecce20f5692847860c25c38b97a4e306c94decd99c0519a1b',
|
|
221
217
|
},
|
|
222
218
|
{
|
|
223
219
|
address: '0xc6e76F72Ea672FAe05C357157CfC37720F0aF26f',
|
|
224
220
|
enr: 'enr:-HW4QKJTwXC6Chw6zbnA3HFZi6Jo0DkIgjKy4eUBpsSOGnAeWE6ChEjEyk_6R6Qrm7jI-iqfs3_HYxiKde8vFgvHHrCAgmlkgnY0iXNlY3AyNTZrMaECfFKQH4spdZCHqrKVz1Q02xYla6J_RQECDNNYBRWdzv8',
|
|
225
221
|
config_signature: '0x610f7be9c7c38878cde1cb391de08eee2f86e62f31f450843b4e37164e738fc8769046e53ad1f018f54ddaf858ff372d22169702c60d68bda19c96fdd20150b61c',
|
|
226
|
-
enr_signature: '0xe2977c79f63b8fe6cb6551efec0cf69041c7f4aaa8ea338997a397450ee946023b03ccb70ad3cc97b1319e1eea9f7472a2ca161bc8b33acdcde689d84c7e771c1b'
|
|
227
|
-
}
|
|
222
|
+
enr_signature: '0xe2977c79f63b8fe6cb6551efec0cf69041c7f4aaa8ea338997a397450ee946023b03ccb70ad3cc97b1319e1eea9f7472a2ca161bc8b33acdcde689d84c7e771c1b',
|
|
223
|
+
},
|
|
228
224
|
],
|
|
229
225
|
uuid: 'bc2fec0c-0b8b-4415-bf48-1e96b07f50eb',
|
|
230
226
|
version: 'v1.8.0',
|
|
@@ -234,20 +230,18 @@ exports.clusterLockV1X8 = {
|
|
|
234
230
|
validators: [
|
|
235
231
|
{
|
|
236
232
|
fee_recipient_address: '0x7aC193bF9a9C6e6DD6302969E8Ea6EdF6df490d8',
|
|
237
|
-
withdrawal_address: '0x9e0AC0078F10d28E875577bb3A4A9EDAB60c03EC'
|
|
233
|
+
withdrawal_address: '0x9e0AC0078F10d28E875577bb3A4A9EDAB60c03EC',
|
|
238
234
|
},
|
|
239
235
|
{
|
|
240
236
|
fee_recipient_address: '0x7aC193bF9a9C6e6DD6302969E8Ea6EdF6df490d8',
|
|
241
|
-
withdrawal_address: '0x9e0AC0078F10d28E875577bb3A4A9EDAB60c03EC'
|
|
242
|
-
}
|
|
237
|
+
withdrawal_address: '0x9e0AC0078F10d28E875577bb3A4A9EDAB60c03EC',
|
|
238
|
+
},
|
|
243
239
|
],
|
|
244
240
|
dkg_algorithm: 'default',
|
|
245
241
|
fork_version: '0x01017000',
|
|
246
|
-
deposit_amounts: [
|
|
247
|
-
'32000000000'
|
|
248
|
-
],
|
|
242
|
+
deposit_amounts: ['32000000000'],
|
|
249
243
|
config_hash: '0xb2601f51d277f699acb8ea3b9fb4fc68087c0f1f2c6ae83d00fdd853a6cddb31',
|
|
250
|
-
definition_hash: '0x2a9d52b1dd13fd91661d81e3786512ffdcc3689e2ec97105add153f543c642b4'
|
|
244
|
+
definition_hash: '0x2a9d52b1dd13fd91661d81e3786512ffdcc3689e2ec97105add153f543c642b4',
|
|
251
245
|
},
|
|
252
246
|
distributed_validators: [
|
|
253
247
|
{
|
|
@@ -256,25 +250,25 @@ exports.clusterLockV1X8 = {
|
|
|
256
250
|
'0x849db297f690a26e76d5930f99eac9e3f95d9232256d6e39124fe071745b43c8b5418c733b06683aa240a2a0e44b9b8f',
|
|
257
251
|
'0xa1051bf5692153d5bc418946763bb5c82780a05e97bd5b258ea7abe6705047628edd8277366f6b5d0469abfee18988d9',
|
|
258
252
|
'0x87d0342e5dc49a0a0c8f08ec011da3bd859a333bfc46ddd0a194485aa5aa954b7c18d05a2c1ae148d4dc45331101f496',
|
|
259
|
-
'0xa4fa0e971e1a5e38ebe89c6457bc9316b3dd0933660b17e1c717ac148f8340a5db20d867c7a24758c701f6b6bec4d552'
|
|
253
|
+
'0xa4fa0e971e1a5e38ebe89c6457bc9316b3dd0933660b17e1c717ac148f8340a5db20d867c7a24758c701f6b6bec4d552',
|
|
260
254
|
],
|
|
261
255
|
builder_registration: {
|
|
262
256
|
message: {
|
|
263
257
|
fee_recipient: '0x7ac193bf9a9c6e6dd6302969e8ea6edf6df490d8',
|
|
264
258
|
gas_limit: 30000000,
|
|
265
259
|
timestamp: 1696000704,
|
|
266
|
-
pubkey: '0xa33ae80f967a669d8df3ae769acc114577fab185d53e10154b0b50cc0cf9b9f35e466a318f174e8cecdc12173d95cb27'
|
|
260
|
+
pubkey: '0xa33ae80f967a669d8df3ae769acc114577fab185d53e10154b0b50cc0cf9b9f35e466a318f174e8cecdc12173d95cb27',
|
|
267
261
|
},
|
|
268
|
-
signature: '0xb39977fe7c45bab28cfd1bcf356a71b0557187a75e0dfa0facaf5eddba05988c0da85800a4b4528704df44f280913ebc125eb3f9c091d6dd220c92dfcc3c80bc7a9ed2f1b96bffaeaa1053cf117b02b48eb755139c5623b6e61dd92c27d15813'
|
|
262
|
+
signature: '0xb39977fe7c45bab28cfd1bcf356a71b0557187a75e0dfa0facaf5eddba05988c0da85800a4b4528704df44f280913ebc125eb3f9c091d6dd220c92dfcc3c80bc7a9ed2f1b96bffaeaa1053cf117b02b48eb755139c5623b6e61dd92c27d15813',
|
|
269
263
|
},
|
|
270
264
|
partial_deposit_data: [
|
|
271
265
|
{
|
|
272
266
|
pubkey: '0xa33ae80f967a669d8df3ae769acc114577fab185d53e10154b0b50cc0cf9b9f35e466a318f174e8cecdc12173d95cb27',
|
|
273
267
|
withdrawal_credentials: '0x0100000000000000000000009e0ac0078f10d28e875577bb3a4a9edab60c03ec',
|
|
274
268
|
amount: '32000000000',
|
|
275
|
-
signature: '0x9861022ca71cf18aad49a201b023356b8c5ca090086614b681cb84a54327caeff53c0a71c5f55f49976114bb86de2ad6052d174d7948e6c8a924d9bfbbbc2181fad967d818454c6c4f7cffb7bb93dc2c4f4c87fc5598cb4582fa08eff0c7bc08'
|
|
276
|
-
}
|
|
277
|
-
]
|
|
269
|
+
signature: '0x9861022ca71cf18aad49a201b023356b8c5ca090086614b681cb84a54327caeff53c0a71c5f55f49976114bb86de2ad6052d174d7948e6c8a924d9bfbbbc2181fad967d818454c6c4f7cffb7bb93dc2c4f4c87fc5598cb4582fa08eff0c7bc08',
|
|
270
|
+
},
|
|
271
|
+
],
|
|
278
272
|
},
|
|
279
273
|
{
|
|
280
274
|
distributed_public_key: '0xaa888bf805bec7da7ac18dea3afefbf5b8510cbf76367229dab830b3ecdd4533b9d50fb9fcb454df5cbe08e4b31e8479',
|
|
@@ -282,26 +276,26 @@ exports.clusterLockV1X8 = {
|
|
|
282
276
|
'0x8279ae646839d946a622d096296ffcccd289e8c49ea2308560bbb731c63d4b49ea46db817a955e47634edbded4919d82',
|
|
283
277
|
'0xa8a12b5b645b015c55515b3220395e015fc051c58bf243e1b638770652c67f863852f9190e3e182aa86b99823b4cf28d',
|
|
284
278
|
'0xb0c557f812060bb1c409e5324c7b54f35fee8f1180c714e60784f7df6a58e3ba3da6cc8b3cebc01975f9f41efcd777cb',
|
|
285
|
-
'0xa7a8576c3b21221f2a6adefc41b4c1f979ee0761e9a7ff50d30434d1a0c4e7fc505b308636801925e698286b802de421'
|
|
279
|
+
'0xa7a8576c3b21221f2a6adefc41b4c1f979ee0761e9a7ff50d30434d1a0c4e7fc505b308636801925e698286b802de421',
|
|
286
280
|
],
|
|
287
281
|
builder_registration: {
|
|
288
282
|
message: {
|
|
289
283
|
fee_recipient: '0x7ac193bf9a9c6e6dd6302969e8ea6edf6df490d8',
|
|
290
284
|
gas_limit: 30000000,
|
|
291
285
|
timestamp: 1696000704,
|
|
292
|
-
pubkey: '0xaa888bf805bec7da7ac18dea3afefbf5b8510cbf76367229dab830b3ecdd4533b9d50fb9fcb454df5cbe08e4b31e8479'
|
|
286
|
+
pubkey: '0xaa888bf805bec7da7ac18dea3afefbf5b8510cbf76367229dab830b3ecdd4533b9d50fb9fcb454df5cbe08e4b31e8479',
|
|
293
287
|
},
|
|
294
|
-
signature: '0x8dcb54028adb8f5601b6ab20ded381dabb6739b3e506df795a279043997908c7d38a68b8e8dda27516165f18e437a84603935bfefc1a83befbd1a90ac43fcc7fb0eed81122852a2ee71fef414aa8879198da239527036b0eaebcdc88d6eca3d1'
|
|
288
|
+
signature: '0x8dcb54028adb8f5601b6ab20ded381dabb6739b3e506df795a279043997908c7d38a68b8e8dda27516165f18e437a84603935bfefc1a83befbd1a90ac43fcc7fb0eed81122852a2ee71fef414aa8879198da239527036b0eaebcdc88d6eca3d1',
|
|
295
289
|
},
|
|
296
290
|
partial_deposit_data: [
|
|
297
291
|
{
|
|
298
292
|
pubkey: '0xaa888bf805bec7da7ac18dea3afefbf5b8510cbf76367229dab830b3ecdd4533b9d50fb9fcb454df5cbe08e4b31e8479',
|
|
299
293
|
withdrawal_credentials: '0x0100000000000000000000009e0ac0078f10d28e875577bb3a4a9edab60c03ec',
|
|
300
294
|
amount: '32000000000',
|
|
301
|
-
signature: '0x95ee68e5191d34e10f567ab0f565cd927211b29be9ab830d39bf74d0486aee7bff78d8fe12d455cb40ec707378eea1040a9d80806f82afa58295de9d4db2dccc48cfaf3c98e9020c6b5c8a9aacf5bbfc7e316871f505000304d9d39b7ad5c5d8'
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
}
|
|
295
|
+
signature: '0x95ee68e5191d34e10f567ab0f565cd927211b29be9ab830d39bf74d0486aee7bff78d8fe12d455cb40ec707378eea1040a9d80806f82afa58295de9d4db2dccc48cfaf3c98e9020c6b5c8a9aacf5bbfc7e316871f505000304d9d39b7ad5c5d8',
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
},
|
|
305
299
|
],
|
|
306
300
|
signature_aggregate: '0x81ab6319191e3b9065f14231a71fe480b4a45e5e5db4a064faa19a31d04b9cb55fa88b8aa3c966b054b97ae7db2233ee060ae333c5ca3a55ed16b9a3de1894087901cb2d3a177de1cd40030c93301c23ca3edd28dfd1ad04e210b7e2c7625f89',
|
|
307
301
|
lock_hash: '0x186e7e61fb49373d9034d101f2f08429cb379bfcc2f7fa5e9598e8a14ae13ed7',
|
|
@@ -309,6 +303,6 @@ exports.clusterLockV1X8 = {
|
|
|
309
303
|
'0xd4b1b6f7b363015b9d1c1c4f199fffc3f9238b7326fdfc5059b175519b05c90a022a18bf2e3eae7d7b0e833384131c2e7be17cc78f6ca23644ae345904dc2d2601',
|
|
310
304
|
'0xc186f930d8d281ab3999fb0ff62b5d96045a4e2330d9d8b300d5d1014f6b4bd925d9c2fedbb53047a49d4008f82600f46e1131b981222c5e423c12b1c9fd544900',
|
|
311
305
|
'0xbc0831fa82b1a70e17eb4fe6f79249a8f5aab1d1f196dd07e32766eb27e72354757d7146b64fca4ad4efa554f7a5d4e7ef835aab6348e9afa37c9eeab069ff4e01',
|
|
312
|
-
'0x0135f307831fa58ff64f9af46e00b92e2375162646af88f6991ba6f98a8c262f2c41846af59da68eadb8ff9c94db42ee8005bd4236e5897635573db2911460aa00'
|
|
313
|
-
]
|
|
306
|
+
'0x0135f307831fa58ff64f9af46e00b92e2375162646af88f6991ba6f98a8c262f2c41846af59da68eadb8ff9c94db42ee8005bd4236e5897635573db2911460aa00',
|
|
307
|
+
],
|
|
314
308
|
};
|