@obolnetwork/obol-sdk 1.0.4 → 1.0.5

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 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/alone). Further guides and walkthroughs coming soon.
9
+ Checkout our [docs](https://docs.obol.tech/docs/int/quickstart). Further guides and walkthroughs coming soon.
@@ -18,8 +18,8 @@ export declare enum FORK_MAPPING {
18
18
  "0x80000069" = 3
19
19
  }
20
20
  export declare const dkg_algorithm = "default";
21
- export declare const config_version = "v1.5.0";
22
- export declare const SDK_VERSION = "1.0.0";
21
+ export declare const config_version = "v1.7.0";
22
+ export declare const SDK_VERSION = "1.0.3";
23
23
  export declare const DEFAULT_BASE_URL = "https://api.obol.tech";
24
24
  export declare const DEFAULT_CHAIN_ID = 5;
25
25
  //# sourceMappingURL=constants.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare const clusterLockV1X5: {
1
+ export declare const clusterLockV1X7: {
2
2
  cluster_definition: {
3
3
  name: string;
4
4
  creator: {
@@ -28,9 +28,25 @@ export declare const clusterLockV1X5: {
28
28
  distributed_validators: {
29
29
  distributed_public_key: string;
30
30
  public_shares: string[];
31
+ deposit_data: {
32
+ pubkey: string;
33
+ withdrawal_credentials: string;
34
+ amount: string;
35
+ signature: string;
36
+ };
37
+ builder_registration: {
38
+ message: {
39
+ fee_recipient: string;
40
+ gas_limit: number;
41
+ timestamp: number;
42
+ pubkey: string;
43
+ };
44
+ signature: string;
45
+ };
31
46
  }[];
32
47
  signature_aggregate: string;
33
48
  lock_hash: string;
49
+ node_signatures: string[];
34
50
  };
35
51
  export declare const clusterConfig: {
36
52
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4E3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAazB,CAAA"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF1B,CAAA;AAGF,eAAO,MAAM,aAAa;;;;;;;;;CAazB,CAAA"}
package/dist/hash.d.ts CHANGED
@@ -8,7 +8,7 @@ import { ClusterDefintion } from './types';
8
8
  * @returns The config hash or he definition hash in of the corresponding cluster definition
9
9
  */
10
10
  export declare const clusterConfigOrDefinitionHash: (cluster: ClusterDefintion, configOnly: boolean) => string;
11
- export declare const hashClusterDefinitionV1X5: (cluster: any, configOnly: boolean) => ValueOfFields<DefinitionFieldsV1X5>;
11
+ export declare const hashClusterDefinitionV1X7: (cluster: ClusterDefintion, configOnly: boolean) => ValueOfFields<DefinitionFieldsV1X7>;
12
12
  /**
13
13
  * Converts a string to a Uint8Array
14
14
  * @param str The string to convert
@@ -39,7 +39,7 @@ export declare const validatorsContainerType: ContainerType<{
39
39
  fee_recipient_address: ByteVectorType;
40
40
  withdrawal_address: ByteVectorType;
41
41
  }>;
42
- declare type DefinitionFieldsV1X5 = {
42
+ declare type DefinitionFieldsV1X7 = {
43
43
  uuid: ByteListType;
44
44
  name: ByteListType;
45
45
  version: ByteListType;
@@ -53,12 +53,12 @@ declare type DefinitionFieldsV1X5 = {
53
53
  validators: ListCompositeType<typeof validatorsContainerType>;
54
54
  config_hash?: ByteVectorType;
55
55
  };
56
- export declare type DefinitionContainerTypeV1X5 = ContainerType<DefinitionFieldsV1X5>;
56
+ export declare type DefinitionContainerTypeV1X7 = ContainerType<DefinitionFieldsV1X7>;
57
57
  /**
58
58
  * Returns the containerized cluster definition
59
59
  * @param cluster ClusterDefinition to calculate the type from
60
60
  * @returns SSZ Containerized type of cluster input
61
61
  */
62
- export declare const clusterDefinitionContainerTypeV1X5: (configOnly: boolean) => DefinitionContainerTypeV1X5;
62
+ export declare const clusterDefinitionContainerTypeV1X7: (configOnly: boolean) => DefinitionContainerTypeV1X7;
63
63
  export {};
64
64
  //# sourceMappingURL=hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YAC/B,gBAAgB,cACb,OAAO,KAClB,MAOF,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAC3B,GAAG,cACA,OAAO,KAClB,cAAc,oBAAoB,CAyCpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,KAAG,UAE7C,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,0BAA0B;;EAE9B,CAAC;AAEH,QAAA,MAAM,yBAAyB;;EAE7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;EAKhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;EAG/B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;EAGlC,CAAC;AAUH,aAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,YAAY,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,cAAc,CAAC;IAC1B,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,cAAc,CAAC;IAC7B,S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AAS,EAAE,YAAY,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,cAAc,CAAC;IAC1B,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,cAAc,CAAC;IAC7B,SAAS,EAAE,iBAAiB,CAC1B,OAAO,qBAAqB,GAAG,OAAO,0BAA0B,CACjE,CAAC;IACF,OAAO,EAAE,OAAO,oBAAoB,GAAG,OAAO,yBAAyB,CAAC;IACxE,UAAU,EAAE,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,CAAC;IAC9D,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B,CAAC;AAEF,oBAAY,2BAA2B,GACrC,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,eACjC,OAAO,gCAwBpB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,21 +1,42 @@
1
1
  import { Signer } from 'ethers';
2
2
  import { Base } from './base';
3
3
  import { ClusterLock, ClusterPayload } from './types';
4
+ export * from "./types";
5
+ /**
6
+ * Obol sdk Client can be used for creating, managing and activating distributed validators.
7
+ */
4
8
  export declare class Client extends Base {
5
9
  private signer;
10
+ /**
11
+ * @param config
12
+ * @param signer ethersJS Signer
13
+ * @returns Obol-SDK Client instance
14
+ *
15
+ * An example of how to instantiate obol-sdk Client:
16
+ * [obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L29)
17
+ */
6
18
  constructor(config: {
7
19
  baseUrl?: string | undefined;
8
20
  chainId?: number | undefined;
9
21
  }, signer: Signer);
10
22
  /**
11
- * @param cluster The new unique cluster
12
- * @returns Invite Link with config_hash
13
- */
23
+ * Creates a cluster definition which contains cluster configuration.
24
+ * @param {ClusterPayload} newCluster - The new unique cluster.
25
+ * @returns {Promise<string>} config_hash.
26
+ * @throws On duplicate entries, missing or wrong cluster keys.
27
+ *
28
+ * An example of how to use createClusterDefinition:
29
+ * [createObolCluster](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L45)
30
+ */
14
31
  createClusterDefinition(newCluster: ClusterPayload): Promise<string>;
15
32
  /**
16
33
  * @param configHash The config hash of the requested cluster
17
- * @returns The matched cluster details (lock) from DB
18
- */
34
+ * @returns {Promise<ClusterLock>} The matched cluster details (lock) from DB
35
+ * @throws On not found cluster definition or lock.
36
+ *
37
+ * An example of how to use getClusterLock:
38
+ * [getObolClusterLock](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L61)
39
+ */
19
40
  getClusterLock(configHash: string): Promise<ClusterLock>;
20
41
  }
21
42
  //# sourceMappingURL=index.d.ts.map
@@ -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,EAAoB,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAUxE,qBAAa,MAAO,SAAQ,IAAI;IAC9B,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,EAAE,MAAM,EAAE,MAAM;IAMlG;;;MAGE;IACI,uBAAuB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAyC1E;;;MAGE;IACI,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAQ/D"}
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,EAAoB,WA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