@obolnetwork/obol-sdk 1.0.7 → 1.0.9
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 +1 -1
- package/dist/ajv.d.ts +1 -2
- package/dist/ajv.d.ts.map +1 -1
- package/dist/base.d.ts +2 -1
- package/dist/base.d.ts.map +1 -1
- package/dist/constants.d.ts +15 -10
- package/dist/constants.d.ts.map +1 -1
- package/dist/fixtures.d.ts +1 -0
- package/dist/fixtures.d.ts.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +216 -8751
- package/dist/index.js +217 -8775
- package/dist/schema.d.ts +58 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -6,4 +6,4 @@ This repo contains the Obol Software Development Kit, for creating Distributed V
|
|
|
6
6
|
|
|
7
7
|
## Getting Started
|
|
8
8
|
|
|
9
|
-
Checkout our [docs](https://docs.obol.tech/docs/int/quickstart). Further guides and walkthroughs coming soon.
|
|
9
|
+
Checkout our [docs](https://docs.obol.tech/docs/int/quickstart/advanced/quickstart-sdk), [examples](https://github.com/ObolNetwork/obol-sdk-examples/), and SDK [reference](https://obolnetwork.github.io/obol-packages). Further guides and walkthroughs coming soon.
|
package/dist/ajv.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ErrorObject } from 'ajv';
|
|
2
|
-
|
|
3
|
-
export declare function validateDefinition(data: ClusterPayload): ErrorObject[] | undefined | null;
|
|
2
|
+
export declare function validatePayload(data: any, schema: any): ErrorObject[] | undefined | null | boolean;
|
|
4
3
|
//# sourceMappingURL=ajv.d.ts.map
|
package/dist/ajv.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../src/ajv.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,
|
|
1
|
+
{"version":3,"file":"ajv.d.ts","sourceRoot":"","sources":["../src/ajv.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,WAAW,EAAE,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAQlG"}
|
package/dist/base.d.ts
CHANGED
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,aAAK,MAAM,GAAG;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,8BAAsB,IAAI;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;gBAIT,EAAE,OAA0B,EAAE,OAA0B,EAAE,EAAE,MAAM;cAM9D,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;CAqBhF"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -5,21 +5,26 @@ export declare const CreatorConfigHashSigningTypes: {
|
|
|
5
5
|
type: string;
|
|
6
6
|
}[];
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const EnrSigningTypes: {
|
|
9
|
+
ENR: {
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
export declare const OperatorConfigHashSigningTypes: {
|
|
15
|
+
OperatorConfigHash: {
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
export declare const Domain: (chainId: number) => {
|
|
9
21
|
name: string;
|
|
10
22
|
version: string;
|
|
11
23
|
chainId: number;
|
|
12
24
|
};
|
|
13
|
-
export declare enum FORK_MAPPING {
|
|
14
|
-
"0x00000000" = 1,
|
|
15
|
-
"0x00001020" = 5,
|
|
16
|
-
"0x00000064" = 100,
|
|
17
|
-
"0x70000069" = 1337802,
|
|
18
|
-
"0x80000069" = 3
|
|
19
|
-
}
|
|
20
25
|
export declare const dkg_algorithm = "default";
|
|
21
26
|
export declare const config_version = "v1.7.0";
|
|
22
|
-
export declare const SDK_VERSION = "1.0.
|
|
27
|
+
export declare const SDK_VERSION = "1.0.8";
|
|
23
28
|
export declare const DEFAULT_BASE_URL = "https://api.obol.tech";
|
|
24
|
-
export declare const DEFAULT_CHAIN_ID =
|
|
29
|
+
export declare const DEFAULT_CHAIN_ID = 1;
|
|
25
30
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAG5C,eAAO,MAAM,6BAA6B;;;;;CAEzC,CAAC;AACF,eAAO,MAAM,eAAe;;;;;CAE3B,CAAC;AACF,eAAO,MAAM,8BAA8B;;;;;CAE1C,CAAC;AACF,eAAO,MAAM,MAAM,YAAa,MAAM;;;;CAMrC,CAAA;AACD,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD,eAAO,MAAM,gBAAgB,IAAI,CAAC"}
|
package/dist/fixtures.d.ts
CHANGED
package/dist/fixtures.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF3B,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;CAazB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
2
|
import { Base } from './base';
|
|
3
|
-
import { ClusterDefintion, ClusterLock, ClusterPayload } from './types';
|
|
3
|
+
import { ClusterDefintion, ClusterLock, ClusterPayload, OperatorPayload } from './types';
|
|
4
4
|
export * from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* Obol sdk Client can be used for creating, managing and activating distributed validators.
|
|
@@ -18,7 +18,7 @@ export declare class Client extends Base {
|
|
|
18
18
|
constructor(config: {
|
|
19
19
|
baseUrl?: string | undefined;
|
|
20
20
|
chainId?: number | undefined;
|
|
21
|
-
}, signer
|
|
21
|
+
}, signer?: Signer);
|
|
22
22
|
/**
|
|
23
23
|
* Creates a cluster definition which contains cluster configuration.
|
|
24
24
|
* @param {ClusterPayload} newCluster - The new unique cluster.
|
|
@@ -29,6 +29,17 @@ export declare class Client extends Base {
|
|
|
29
29
|
* [createObolCluster](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts)
|
|
30
30
|
*/
|
|
31
31
|
createClusterDefinition(newCluster: ClusterPayload): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Approves joining a cluster with specific configuration.
|
|
34
|
+
* @param {OperatorPayload} operatorPayload - The operator data including signatures.
|
|
35
|
+
* @param {string} configHash - The config hash of the cluster which the operator confirms joining to.
|
|
36
|
+
* @returns {Promise<ClusterDefintion>} The cluster definition.
|
|
37
|
+
* @throws On unauthorized, duplicate entries, missing keys, not found cluster or invalid data.
|
|
38
|
+
*
|
|
39
|
+
* An example of how to use updateClusterDefinition:
|
|
40
|
+
* [updateClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts)
|
|
41
|
+
*/
|
|
42
|
+
updateClusterDefinition(operatorPayload: OperatorPayload, configHash: string): Promise<ClusterDefintion>;
|
|
32
43
|
/**
|
|
33
44
|
* @returns {Promise<ClusterDefintion>} The cluster definition for config hash
|
|
34
45
|
* @throws On not found config hash.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAIzF,cAAc,SAAS,CAAC;AAExB;;GAEG;AACH,qBAAa,MAAO,SAAQ,IAAI;IAC9B,OAAO,CAAC,MAAM,CAAqB;IAEnC;;;;;;;OAOG;gBACS,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,MAAM;IAMnG;;;;;;;;OAQG;IACG,uBAAuB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAyC1E;;;;;;;;;MASE;IACI,uBAAuB,CAAC,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgC9G;;;;;;OAMG;IACG,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IASzE;;;;;;OAMG;IACG,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAQ/D"}
|