@obolnetwork/obol-sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/ajv.d.ts +4 -0
- package/dist/ajv.d.ts.map +1 -0
- package/dist/base.d.ts +13 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/cluster.test.d.ts +2 -0
- package/dist/cluster.test.d.ts.map +1 -0
- package/dist/constants.d.ts +23 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/errors.d.ts +5 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/fixtures.d.ts +45 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/hash.d.ts +64 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +97101 -0
- package/dist/index.js +97114 -0
- package/dist/types.d.ts +45 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +57 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare type ClusterOperator = {
|
|
2
|
+
address: string;
|
|
3
|
+
enr?: string;
|
|
4
|
+
fork_version?: string;
|
|
5
|
+
version?: string;
|
|
6
|
+
enr_signature?: string;
|
|
7
|
+
config_signature?: string;
|
|
8
|
+
};
|
|
9
|
+
declare type ClusterCreator = {
|
|
10
|
+
address: string;
|
|
11
|
+
config_signature?: string;
|
|
12
|
+
};
|
|
13
|
+
declare type ClusterValidator = {
|
|
14
|
+
fee_recipient_address: string;
|
|
15
|
+
withdrawal_address: string;
|
|
16
|
+
};
|
|
17
|
+
export interface ClusterPayload {
|
|
18
|
+
name: string;
|
|
19
|
+
operators: ClusterOperator[];
|
|
20
|
+
validators: ClusterValidator[];
|
|
21
|
+
}
|
|
22
|
+
export interface ClusterDefintion extends ClusterPayload {
|
|
23
|
+
creator: ClusterCreator;
|
|
24
|
+
version: string;
|
|
25
|
+
dkg_algorithm: string;
|
|
26
|
+
fork_version: string;
|
|
27
|
+
uuid: string;
|
|
28
|
+
timestamp: string;
|
|
29
|
+
config_hash: string;
|
|
30
|
+
threshold: number;
|
|
31
|
+
num_validators: number;
|
|
32
|
+
definition_hash?: string;
|
|
33
|
+
}
|
|
34
|
+
declare type DistributedValidator = {
|
|
35
|
+
distributed_public_key: string;
|
|
36
|
+
public_shares: string[];
|
|
37
|
+
};
|
|
38
|
+
export interface ClusterLock {
|
|
39
|
+
cluster_definition: ClusterDefintion;
|
|
40
|
+
distributed_validators: DistributedValidator[];
|
|
41
|
+
signature_aggregate: string;
|
|
42
|
+
lock_hash: string;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAA;AAED,aAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAA;AAED,aAAK,gBAAgB,GAAG;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,aAAK,oBAAoB,GAAG;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED,MAAM,WAAW,WAAW;IAC1B,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,sBAAsB,EAAE,oBAAoB,EAAE,CAAC;IAC/C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@obolnetwork/obol-sdk",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A package for creating Distributed Validators using the Obol API.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.es.js",
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"Obol",
|
|
10
|
+
"Distributed Validators",
|
|
11
|
+
"Ethereum"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rm -rf dist && tsc",
|
|
18
|
+
"test": "jest --config ./src/jest.config.json",
|
|
19
|
+
"ds:build": "rollup -c",
|
|
20
|
+
"ds:release:major": "npm version $(semver $npm_package_version -i major) && npm publish --tag latest",
|
|
21
|
+
"ds:release:minor": "npm version $(semver $npm_package_version -i minor) && npm publish --tag latest",
|
|
22
|
+
"ds:release:patch": "npm config list && npm version $(semver $npm_package_version -i patch) && npm publish --tag latest"
|
|
23
|
+
},
|
|
24
|
+
"author": "Obol Labs (https://obol.tech)",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/obolnetwork/obol-packages.git"
|
|
28
|
+
},
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/obolnetwork/obol-packages/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://docs.obol.tech/",
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"registry": "https://registry.npmjs.org/",
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@chainsafe/ssz": "^0.11.1",
|
|
40
|
+
"ajv": "^8.12.0",
|
|
41
|
+
"cross-fetch": "^3.1.5",
|
|
42
|
+
"ethers": "^6.4.0",
|
|
43
|
+
"nock": "^13.3.1",
|
|
44
|
+
"uuid": "^9.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/jest": "^28.1.8",
|
|
48
|
+
"@types/node": "^20.2.5",
|
|
49
|
+
"@types/uuid": "^9.0.1",
|
|
50
|
+
"jest": "^28.1.3",
|
|
51
|
+
"ts-jest": "^28.0.8",
|
|
52
|
+
"tsconfig": "*",
|
|
53
|
+
"rollup-config": "*",
|
|
54
|
+
"tsup": "^6.7.0",
|
|
55
|
+
"typescript": "^5.1.3"
|
|
56
|
+
}
|
|
57
|
+
}
|