@obolnetwork/obol-sdk 1.0.8 → 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 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
- import { ClusterPayload } from './types';
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,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,WAAW,EAAE,GAAG,SAAS,GAAG,IAAI,CAQzF"}
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"}
@@ -5,6 +5,18 @@ export declare const CreatorConfigHashSigningTypes: {
5
5
  type: string;
6
6
  }[];
7
7
  };
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
+ };
8
20
  export declare const Domain: (chainId: number) => {
9
21
  name: string;
10
22
  version: string;
@@ -12,7 +24,7 @@ export declare const Domain: (chainId: number) => {
12
24
  };
13
25
  export declare const dkg_algorithm = "default";
14
26
  export declare const config_version = "v1.7.0";
15
- export declare const SDK_VERSION = "1.0.7";
27
+ export declare const SDK_VERSION = "1.0.8";
16
28
  export declare const DEFAULT_BASE_URL = "https://api.obol.tech";
17
29
  export declare const DEFAULT_CHAIN_ID = 1;
18
30
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAI5C,eAAO,MAAM,6BAA6B;;;;;CAEzC,CAAC;AACF,eAAO,MAAM,MAAM,YAAY,MAAM;;;;CAMpC,CAAA;AAGD,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD,eAAO,MAAM,gBAAgB,IAAI,CAAC"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF1B,CAAA;AAGF,eAAO,MAAM,aAAa;;;;;;;;;CAazB,CAAA"}
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: 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.
@@ -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;AAGxE,cAAc,SAAS,CAAC;AAExB;;GAEG;AACH,qBAAa,MAAO,SAAQ,IAAI;IAC9B,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;;;OAOG;gBACS,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,EAAE,MAAM,EAAE,MAAM;IAMlG;;;;;;;;OAQG;IACG,uBAAuB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IA0C1E;;;;;;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"}
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"}
package/dist/index.es.js CHANGED
@@ -69,6 +69,12 @@ const EIP712_DOMAIN_VERSION = "1";
69
69
  const CreatorConfigHashSigningTypes = {
70
70
  CreatorConfigHash: [{ name: "creator_config_hash", type: "string" }],
71
71
  };
72
+ const EnrSigningTypes = {
73
+ ENR: [{ name: "enr", type: "string" }],
74
+ };
75
+ const OperatorConfigHashSigningTypes = {
76
+ OperatorConfigHash: [{ name: "operator_config_hash", type: "string" }],
77
+ };
72
78
  const Domain = (chainId) => {
73
79
  return {
74
80
  name: EIP712_DOMAIN_NAME,
@@ -78,7 +84,7 @@ const Domain = (chainId) => {
78
84
  };
79
85
  const dkg_algorithm = "default";
80
86
  const config_version = "v1.7.0";
81
- const SDK_VERSION = "1.0.7";
87
+ const SDK_VERSION = "1.0.8";
82
88
  const DEFAULT_BASE_URL = "https://api.obol.tech";
83
89
  const DEFAULT_CHAIN_ID = 1;
84
90
 
@@ -11291,11 +11297,11 @@ function getJsonPointer(parsedRef, { baseId, schema, root }) {
11291
11297
 
11292
11298
  var $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
11293
11299
  var description = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
11294
- var type$2 = "object";
11295
- var required$2 = [
11300
+ var type$1 = "object";
11301
+ var required$1 = [
11296
11302
  "$data"
11297
11303
  ];
11298
- var properties$3 = {
11304
+ var properties$2 = {
11299
11305
  $data: {
11300
11306
  type: "string",
11301
11307
  anyOf: [
@@ -11312,9 +11318,9 @@ var additionalProperties$1 = false;
11312
11318
  var require$$9 = {
11313
11319
  $id: $id$1,
11314
11320
  description: description,
11315
- type: type$2,
11316
- required: required$2,
11317
- properties: properties$3,
11321
+ type: type$1,
11322
+ required: required$1,
11323
+ properties: properties$2,
11318
11324
  additionalProperties: additionalProperties$1
11319
11325
  };
11320
11326
 
@@ -13668,9 +13674,9 @@ const def$m = {
13668
13674
  };
13669
13675
  limitProperties.default = def$m;
13670
13676
 
13671
- var required$1 = {};
13677
+ var required = {};
13672
13678
 
13673
- Object.defineProperty(required$1, "__esModule", { value: true });
13679
+ Object.defineProperty(required, "__esModule", { value: true });
13674
13680
  const code_1$6 = requireCode();
13675
13681
  const codegen_1$f = requireCodegen();
13676
13682
  const util_1$h = util;
@@ -13746,7 +13752,7 @@ const def$l = {
13746
13752
  }
13747
13753
  },
13748
13754
  };
13749
- required$1.default = def$l;
13755
+ required.default = def$l;
13750
13756
 
13751
13757
  var limitItems = {};
13752
13758
 
@@ -13927,7 +13933,7 @@ const multipleOf_1 = multipleOf;
13927
13933
  const limitLength_1 = limitLength;
13928
13934
  const pattern_1 = pattern;
13929
13935
  const limitProperties_1 = limitProperties;
13930
- const required_1 = required$1;
13936
+ const required_1 = required;
13931
13937
  const limitItems_1 = limitItems;
13932
13938
  const uniqueItems_1 = uniqueItems;
13933
13939
  const const_1 = _const;
@@ -14433,9 +14439,9 @@ const def$a = {
14433
14439
  };
14434
14440
  additionalProperties.default = def$a;
14435
14441
 
14436
- var properties$2 = {};
14442
+ var properties$1 = {};
14437
14443
 
14438
- Object.defineProperty(properties$2, "__esModule", { value: true });
14444
+ Object.defineProperty(properties$1, "__esModule", { value: true });
14439
14445
  const validate_1 = requireValidate();
14440
14446
  const code_1$2 = requireCode();
14441
14447
  const util_1$7 = util;
@@ -14486,7 +14492,7 @@ const def$9 = {
14486
14492
  }
14487
14493
  },
14488
14494
  };
14489
- properties$2.default = def$9;
14495
+ properties$1.default = def$9;
14490
14496
 
14491
14497
  var patternProperties = {};
14492
14498
 
@@ -14779,7 +14785,7 @@ const contains_1 = contains;
14779
14785
  const dependencies_1 = dependencies;
14780
14786
  const propertyNames_1 = propertyNames;
14781
14787
  const additionalProperties_1 = additionalProperties;
14782
- const properties_1 = properties$2;
14788
+ const properties_1 = properties$1;
14783
14789
  const patternProperties_1 = patternProperties;
14784
14790
  const not_1 = not;
14785
14791
  const anyOf_1 = anyOf;
@@ -15107,11 +15113,11 @@ var definitions = {
15107
15113
  ]
15108
15114
  }
15109
15115
  };
15110
- var type$1 = [
15116
+ var type = [
15111
15117
  "object",
15112
15118
  "boolean"
15113
15119
  ];
15114
- var properties$1 = {
15120
+ var properties = {
15115
15121
  $id: {
15116
15122
  type: "string",
15117
15123
  format: "uri-reference"
@@ -15308,8 +15314,8 @@ var require$$3 = {
15308
15314
  $id: $id,
15309
15315
  title: title,
15310
15316
  definitions: definitions,
15311
- type: type$1,
15312
- properties: properties$1,
15317
+ type: type,
15318
+ properties: properties,
15313
15319
  "default": true
15314
15320
  };
15315
15321
 
@@ -15368,73 +15374,85 @@ ajv.exports;
15368
15374
  var ajvExports = ajv.exports;
15369
15375
  var Ajv = /*@__PURE__*/getDefaultExportFromCjs(ajvExports);
15370
15376
 
15371
- var type = "object";
15372
- var properties = {
15373
- name: {
15374
- type: "string"
15375
- },
15376
- operators: {
15377
- type: "array",
15378
- minItems: 4,
15379
- uniqueItems: true,
15380
- items: {
15381
- type: "object",
15382
- properties: {
15383
- address: {
15384
- type: "string",
15385
- minLength: 42,
15386
- maxLength: 42
15387
- }
15388
- },
15389
- required: [
15390
- "address"
15391
- ]
15392
- }
15393
- },
15394
- validators: {
15395
- type: "array",
15396
- minItems: 1,
15397
- items: {
15398
- type: "object",
15399
- properties: {
15400
- fee_recipient_address: {
15401
- type: "string",
15402
- minLength: 42,
15403
- maxLength: 42
15404
- },
15405
- withdrawal_address: {
15406
- type: "string",
15407
- minLength: 42,
15408
- maxLength: 42
15409
- }
15410
- },
15411
- required: [
15412
- "fee_recipient_address",
15413
- "withdrawal_address"
15414
- ]
15415
- }
15416
- }
15417
- };
15418
- var required = [
15419
- "name",
15420
- "operators",
15421
- "validators"
15422
- ];
15423
- var definitionSchema = {
15424
- type: type,
15425
- properties: properties,
15426
- required: required
15427
- };
15428
-
15429
- function validateDefinition(data) {
15377
+ function validatePayload(data, schema) {
15430
15378
  const ajv = new Ajv();
15431
- const validate = ajv.compile(definitionSchema);
15379
+ const validate = ajv.compile(schema);
15432
15380
  const isValid = validate(data);
15433
15381
  if (!isValid) {
15434
- return validate.errors;
15382
+ throw new Error(`Schema compilation errors', ${validate.errors && validate.errors[0].message}`);
15435
15383
  }
15436
- return null;
15437
- }
15384
+ return isValid;
15385
+ }
15386
+
15387
+ const operatorPayloadSchema = {
15388
+ type: "object",
15389
+ properties: {
15390
+ version: {
15391
+ type: "string"
15392
+ },
15393
+ enr: {
15394
+ type: "string"
15395
+ },
15396
+ },
15397
+ required: [
15398
+ "version",
15399
+ "enr",
15400
+ ]
15401
+ };
15402
+ const definitionSchema = {
15403
+ type: "object",
15404
+ properties: {
15405
+ name: {
15406
+ type: "string"
15407
+ },
15408
+ operators: {
15409
+ type: "array",
15410
+ minItems: 4,
15411
+ uniqueItems: true,
15412
+ items: {
15413
+ type: "object",
15414
+ properties: {
15415
+ address: {
15416
+ type: "string",
15417
+ minLength: 42,
15418
+ maxLength: 42
15419
+ }
15420
+ },
15421
+ required: [
15422
+ "address"
15423
+ ]
15424
+ }
15425
+ },
15426
+ validators: {
15427
+ type: "array",
15428
+ minItems: 1,
15429
+ items: {
15430
+ type: "object",
15431
+ properties: {
15432
+ fee_recipient_address: {
15433
+ type: "string",
15434
+ minLength: 42,
15435
+ maxLength: 42
15436
+ },
15437
+ withdrawal_address: {
15438
+ type: "string",
15439
+ minLength: 42,
15440
+ maxLength: 42
15441
+ }
15442
+ },
15443
+ required: [
15444
+ "fee_recipient_address",
15445
+ "withdrawal_address"
15446
+ ]
15447
+ }
15448
+ }
15449
+ },
15450
+ required: [
15451
+ "name",
15452
+ "operators",
15453
+ "validators"
15454
+ ]
15455
+ };
15438
15456
 
15439
15457
  /**
15440
15458
  * Obol sdk Client can be used for creating, managing and activating distributed validators.
@@ -15462,9 +15480,9 @@ class Client extends Base {
15462
15480
  * [createObolCluster](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts)
15463
15481
  */
15464
15482
  async createClusterDefinition(newCluster) {
15465
- const isValid = validateDefinition(newCluster);
15466
- if (isValid !== null)
15467
- throw new Error(`An error occurred: ${isValid && isValid[0].message}`);
15483
+ if (!this.signer)
15484
+ throw "Signer is required in createClusterDefinition";
15485
+ validatePayload(newCluster, definitionSchema);
15468
15486
  const clusterConfig = {
15469
15487
  ...newCluster,
15470
15488
  fork_version: this.fork_version,
@@ -15493,7 +15511,44 @@ class Client extends Base {
15493
15511
  catch (err) {
15494
15512
  if (err?.message == CONFLICT_ERROR_MSG)
15495
15513
  throw new ConflictError();
15496
- throw err?.message;
15514
+ throw err;
15515
+ }
15516
+ }
15517
+ /**
15518
+ * Approves joining a cluster with specific configuration.
15519
+ * @param {OperatorPayload} operatorPayload - The operator data including signatures.
15520
+ * @param {string} configHash - The config hash of the cluster which the operator confirms joining to.
15521
+ * @returns {Promise<ClusterDefintion>} The cluster definition.
15522
+ * @throws On unauthorized, duplicate entries, missing keys, not found cluster or invalid data.
15523
+ *
15524
+ * An example of how to use updateClusterDefinition:
15525
+ * [updateClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts)
15526
+ */
15527
+ async updateClusterDefinition(operatorPayload, configHash) {
15528
+ if (!this.signer)
15529
+ throw "Signer is required in updateClusterDefinition";
15530
+ validatePayload(operatorPayload, operatorPayloadSchema);
15531
+ try {
15532
+ const address = await this.signer.getAddress();
15533
+ const operatorConfigSignature = await this.signer.signTypedData(Domain(this.chainId), OperatorConfigHashSigningTypes, { operator_config_hash: configHash });
15534
+ const operatorENRSignature = await this.signer.signTypedData(Domain(this.chainId), EnrSigningTypes, { enr: operatorPayload.enr });
15535
+ const operatorData = {
15536
+ ...operatorPayload,
15537
+ address,
15538
+ enr_signature: operatorENRSignature,
15539
+ fork_version: this.fork_version
15540
+ };
15541
+ const clusterDefinition = await this.request(`/dv/${configHash}`, {
15542
+ method: 'PUT',
15543
+ body: JSON.stringify(operatorData),
15544
+ headers: {
15545
+ Authorization: `Bearer ${operatorConfigSignature}`,
15546
+ }
15547
+ });
15548
+ return clusterDefinition;
15549
+ }
15550
+ catch (err) {
15551
+ throw err;
15497
15552
  }
15498
15553
  }
15499
15554
  /**
package/dist/index.js CHANGED
@@ -73,6 +73,12 @@ const EIP712_DOMAIN_VERSION = "1";
73
73
  const CreatorConfigHashSigningTypes = {
74
74
  CreatorConfigHash: [{ name: "creator_config_hash", type: "string" }],
75
75
  };
76
+ const EnrSigningTypes = {
77
+ ENR: [{ name: "enr", type: "string" }],
78
+ };
79
+ const OperatorConfigHashSigningTypes = {
80
+ OperatorConfigHash: [{ name: "operator_config_hash", type: "string" }],
81
+ };
76
82
  const Domain = (chainId) => {
77
83
  return {
78
84
  name: EIP712_DOMAIN_NAME,
@@ -82,7 +88,7 @@ const Domain = (chainId) => {
82
88
  };
83
89
  const dkg_algorithm = "default";
84
90
  const config_version = "v1.7.0";
85
- const SDK_VERSION = "1.0.7";
91
+ const SDK_VERSION = "1.0.8";
86
92
  const DEFAULT_BASE_URL = "https://api.obol.tech";
87
93
  const DEFAULT_CHAIN_ID = 1;
88
94
 
@@ -11295,11 +11301,11 @@ function getJsonPointer(parsedRef, { baseId, schema, root }) {
11295
11301
 
11296
11302
  var $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
11297
11303
  var description = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
11298
- var type$2 = "object";
11299
- var required$2 = [
11304
+ var type$1 = "object";
11305
+ var required$1 = [
11300
11306
  "$data"
11301
11307
  ];
11302
- var properties$3 = {
11308
+ var properties$2 = {
11303
11309
  $data: {
11304
11310
  type: "string",
11305
11311
  anyOf: [
@@ -11316,9 +11322,9 @@ var additionalProperties$1 = false;
11316
11322
  var require$$9 = {
11317
11323
  $id: $id$1,
11318
11324
  description: description,
11319
- type: type$2,
11320
- required: required$2,
11321
- properties: properties$3,
11325
+ type: type$1,
11326
+ required: required$1,
11327
+ properties: properties$2,
11322
11328
  additionalProperties: additionalProperties$1
11323
11329
  };
11324
11330
 
@@ -13672,9 +13678,9 @@ const def$m = {
13672
13678
  };
13673
13679
  limitProperties.default = def$m;
13674
13680
 
13675
- var required$1 = {};
13681
+ var required = {};
13676
13682
 
13677
- Object.defineProperty(required$1, "__esModule", { value: true });
13683
+ Object.defineProperty(required, "__esModule", { value: true });
13678
13684
  const code_1$6 = requireCode();
13679
13685
  const codegen_1$f = requireCodegen();
13680
13686
  const util_1$h = util;
@@ -13750,7 +13756,7 @@ const def$l = {
13750
13756
  }
13751
13757
  },
13752
13758
  };
13753
- required$1.default = def$l;
13759
+ required.default = def$l;
13754
13760
 
13755
13761
  var limitItems = {};
13756
13762
 
@@ -13931,7 +13937,7 @@ const multipleOf_1 = multipleOf;
13931
13937
  const limitLength_1 = limitLength;
13932
13938
  const pattern_1 = pattern;
13933
13939
  const limitProperties_1 = limitProperties;
13934
- const required_1 = required$1;
13940
+ const required_1 = required;
13935
13941
  const limitItems_1 = limitItems;
13936
13942
  const uniqueItems_1 = uniqueItems;
13937
13943
  const const_1 = _const;
@@ -14437,9 +14443,9 @@ const def$a = {
14437
14443
  };
14438
14444
  additionalProperties.default = def$a;
14439
14445
 
14440
- var properties$2 = {};
14446
+ var properties$1 = {};
14441
14447
 
14442
- Object.defineProperty(properties$2, "__esModule", { value: true });
14448
+ Object.defineProperty(properties$1, "__esModule", { value: true });
14443
14449
  const validate_1 = requireValidate();
14444
14450
  const code_1$2 = requireCode();
14445
14451
  const util_1$7 = util;
@@ -14490,7 +14496,7 @@ const def$9 = {
14490
14496
  }
14491
14497
  },
14492
14498
  };
14493
- properties$2.default = def$9;
14499
+ properties$1.default = def$9;
14494
14500
 
14495
14501
  var patternProperties = {};
14496
14502
 
@@ -14783,7 +14789,7 @@ const contains_1 = contains;
14783
14789
  const dependencies_1 = dependencies;
14784
14790
  const propertyNames_1 = propertyNames;
14785
14791
  const additionalProperties_1 = additionalProperties;
14786
- const properties_1 = properties$2;
14792
+ const properties_1 = properties$1;
14787
14793
  const patternProperties_1 = patternProperties;
14788
14794
  const not_1 = not;
14789
14795
  const anyOf_1 = anyOf;
@@ -15111,11 +15117,11 @@ var definitions = {
15111
15117
  ]
15112
15118
  }
15113
15119
  };
15114
- var type$1 = [
15120
+ var type = [
15115
15121
  "object",
15116
15122
  "boolean"
15117
15123
  ];
15118
- var properties$1 = {
15124
+ var properties = {
15119
15125
  $id: {
15120
15126
  type: "string",
15121
15127
  format: "uri-reference"
@@ -15312,8 +15318,8 @@ var require$$3 = {
15312
15318
  $id: $id,
15313
15319
  title: title,
15314
15320
  definitions: definitions,
15315
- type: type$1,
15316
- properties: properties$1,
15321
+ type: type,
15322
+ properties: properties,
15317
15323
  "default": true
15318
15324
  };
15319
15325
 
@@ -15372,73 +15378,85 @@ ajv.exports;
15372
15378
  var ajvExports = ajv.exports;
15373
15379
  var Ajv = /*@__PURE__*/getDefaultExportFromCjs(ajvExports);
15374
15380
 
15375
- var type = "object";
15376
- var properties = {
15377
- name: {
15378
- type: "string"
15379
- },
15380
- operators: {
15381
- type: "array",
15382
- minItems: 4,
15383
- uniqueItems: true,
15384
- items: {
15385
- type: "object",
15386
- properties: {
15387
- address: {
15388
- type: "string",
15389
- minLength: 42,
15390
- maxLength: 42
15391
- }
15392
- },
15393
- required: [
15394
- "address"
15395
- ]
15396
- }
15397
- },
15398
- validators: {
15399
- type: "array",
15400
- minItems: 1,
15401
- items: {
15402
- type: "object",
15403
- properties: {
15404
- fee_recipient_address: {
15405
- type: "string",
15406
- minLength: 42,
15407
- maxLength: 42
15408
- },
15409
- withdrawal_address: {
15410
- type: "string",
15411
- minLength: 42,
15412
- maxLength: 42
15413
- }
15414
- },
15415
- required: [
15416
- "fee_recipient_address",
15417
- "withdrawal_address"
15418
- ]
15419
- }
15420
- }
15421
- };
15422
- var required = [
15423
- "name",
15424
- "operators",
15425
- "validators"
15426
- ];
15427
- var definitionSchema = {
15428
- type: type,
15429
- properties: properties,
15430
- required: required
15431
- };
15432
-
15433
- function validateDefinition(data) {
15381
+ function validatePayload(data, schema) {
15434
15382
  const ajv = new Ajv();
15435
- const validate = ajv.compile(definitionSchema);
15383
+ const validate = ajv.compile(schema);
15436
15384
  const isValid = validate(data);
15437
15385
  if (!isValid) {
15438
- return validate.errors;
15386
+ throw new Error(`Schema compilation errors', ${validate.errors && validate.errors[0].message}`);
15439
15387
  }
15440
- return null;
15441
- }
15388
+ return isValid;
15389
+ }
15390
+
15391
+ const operatorPayloadSchema = {
15392
+ type: "object",
15393
+ properties: {
15394
+ version: {
15395
+ type: "string"
15396
+ },
15397
+ enr: {
15398
+ type: "string"
15399
+ },
15400
+ },
15401
+ required: [
15402
+ "version",
15403
+ "enr",
15404
+ ]
15405
+ };
15406
+ const definitionSchema = {
15407
+ type: "object",
15408
+ properties: {
15409
+ name: {
15410
+ type: "string"
15411
+ },
15412
+ operators: {
15413
+ type: "array",
15414
+ minItems: 4,
15415
+ uniqueItems: true,
15416
+ items: {
15417
+ type: "object",
15418
+ properties: {
15419
+ address: {
15420
+ type: "string",
15421
+ minLength: 42,
15422
+ maxLength: 42
15423
+ }
15424
+ },
15425
+ required: [
15426
+ "address"
15427
+ ]
15428
+ }
15429
+ },
15430
+ validators: {
15431
+ type: "array",
15432
+ minItems: 1,
15433
+ items: {
15434
+ type: "object",
15435
+ properties: {
15436
+ fee_recipient_address: {
15437
+ type: "string",
15438
+ minLength: 42,
15439
+ maxLength: 42
15440
+ },
15441
+ withdrawal_address: {
15442
+ type: "string",
15443
+ minLength: 42,
15444
+ maxLength: 42
15445
+ }
15446
+ },
15447
+ required: [
15448
+ "fee_recipient_address",
15449
+ "withdrawal_address"
15450
+ ]
15451
+ }
15452
+ }
15453
+ },
15454
+ required: [
15455
+ "name",
15456
+ "operators",
15457
+ "validators"
15458
+ ]
15459
+ };
15442
15460
 
15443
15461
  /**
15444
15462
  * Obol sdk Client can be used for creating, managing and activating distributed validators.
@@ -15466,9 +15484,9 @@ class Client extends Base {
15466
15484
  * [createObolCluster](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts)
15467
15485
  */
15468
15486
  async createClusterDefinition(newCluster) {
15469
- const isValid = validateDefinition(newCluster);
15470
- if (isValid !== null)
15471
- throw new Error(`An error occurred: ${isValid && isValid[0].message}`);
15487
+ if (!this.signer)
15488
+ throw "Signer is required in createClusterDefinition";
15489
+ validatePayload(newCluster, definitionSchema);
15472
15490
  const clusterConfig = {
15473
15491
  ...newCluster,
15474
15492
  fork_version: this.fork_version,
@@ -15497,7 +15515,44 @@ class Client extends Base {
15497
15515
  catch (err) {
15498
15516
  if (err?.message == CONFLICT_ERROR_MSG)
15499
15517
  throw new ConflictError();
15500
- throw err?.message;
15518
+ throw err;
15519
+ }
15520
+ }
15521
+ /**
15522
+ * Approves joining a cluster with specific configuration.
15523
+ * @param {OperatorPayload} operatorPayload - The operator data including signatures.
15524
+ * @param {string} configHash - The config hash of the cluster which the operator confirms joining to.
15525
+ * @returns {Promise<ClusterDefintion>} The cluster definition.
15526
+ * @throws On unauthorized, duplicate entries, missing keys, not found cluster or invalid data.
15527
+ *
15528
+ * An example of how to use updateClusterDefinition:
15529
+ * [updateClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts)
15530
+ */
15531
+ async updateClusterDefinition(operatorPayload, configHash) {
15532
+ if (!this.signer)
15533
+ throw "Signer is required in updateClusterDefinition";
15534
+ validatePayload(operatorPayload, operatorPayloadSchema);
15535
+ try {
15536
+ const address = await this.signer.getAddress();
15537
+ const operatorConfigSignature = await this.signer.signTypedData(Domain(this.chainId), OperatorConfigHashSigningTypes, { operator_config_hash: configHash });
15538
+ const operatorENRSignature = await this.signer.signTypedData(Domain(this.chainId), EnrSigningTypes, { enr: operatorPayload.enr });
15539
+ const operatorData = {
15540
+ ...operatorPayload,
15541
+ address,
15542
+ enr_signature: operatorENRSignature,
15543
+ fork_version: this.fork_version
15544
+ };
15545
+ const clusterDefinition = await this.request(`/dv/${configHash}`, {
15546
+ method: 'PUT',
15547
+ body: JSON.stringify(operatorData),
15548
+ headers: {
15549
+ Authorization: `Bearer ${operatorConfigSignature}`,
15550
+ }
15551
+ });
15552
+ return clusterDefinition;
15553
+ }
15554
+ catch (err) {
15555
+ throw err;
15501
15556
  }
15502
15557
  }
15503
15558
  /**
@@ -0,0 +1,58 @@
1
+ export declare const operatorPayloadSchema: {
2
+ type: string;
3
+ properties: {
4
+ version: {
5
+ type: string;
6
+ };
7
+ enr: {
8
+ type: string;
9
+ };
10
+ };
11
+ required: string[];
12
+ };
13
+ export declare const definitionSchema: {
14
+ type: string;
15
+ properties: {
16
+ name: {
17
+ type: string;
18
+ };
19
+ operators: {
20
+ type: string;
21
+ minItems: number;
22
+ uniqueItems: boolean;
23
+ items: {
24
+ type: string;
25
+ properties: {
26
+ address: {
27
+ type: string;
28
+ minLength: number;
29
+ maxLength: number;
30
+ };
31
+ };
32
+ required: string[];
33
+ };
34
+ };
35
+ validators: {
36
+ type: string;
37
+ minItems: number;
38
+ items: {
39
+ type: string;
40
+ properties: {
41
+ fee_recipient_address: {
42
+ type: string;
43
+ minLength: number;
44
+ maxLength: number;
45
+ };
46
+ withdrawal_address: {
47
+ type: string;
48
+ minLength: number;
49
+ maxLength: number;
50
+ };
51
+ };
52
+ required: string[];
53
+ };
54
+ };
55
+ };
56
+ required: string[];
57
+ };
58
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;;;;;;;;CAcjC,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqD5B,CAAA"}
package/dist/types.d.ts CHANGED
@@ -28,6 +28,10 @@ export declare type ClusterOperator = {
28
28
  /** The operator configuration signature. */
29
29
  config_signature?: string;
30
30
  };
31
+ /**
32
+ * A partial view of `ClusterOperator` with `enr` and `version` as required properties.
33
+ */
34
+ export declare type OperatorPayload = Partial<ClusterOperator> & Required<Pick<ClusterOperator, 'enr' | 'version'>>;
31
35
  /**
32
36
  * Cluster Creator
33
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,eAAe;IACf,YAAY,IAAI;IAEhB,qBAAqB;IACrB,YAAY,IAAI;IAEhB,oBAAoB;IACpB,YAAY,MAAM;IAElB,eAAe;IACf,YAAY,QAAQ;CACrB;AAGD;;GAEG;AACH,oBAAY,eAAe,GAAG;IA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AE,MAAM,CAAC;CACnB,CAAA;AAED;;GAEG;AACH,oBAAY,oBAAoB,GAAG;IACjC,mDAAmD;IACnD,sBAAsB,EAAE,MAAM,CAAC;IAE/B,8DAA8D;IAC9D,aAAa,EAAE,MAAM,EAAE,CAAC;IAExB,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnC,yFAAyF;IACzF,oBAAoB,EAAE,mBAAmB,CAAC;CAC3C,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,kBAAkB,EAAE,gBAAgB,CAAC;IAErC,0CAA0C;IAC1C,sBAAsB,EAAE,oBAAoB,EAAE,CAAC;IAE/C,2CAA2C;IAC3C,mBAAmB,EAAE,MAAM,CAAC;IAE5B,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAElB,kEAAkE;IAClE,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obolnetwork/obol-sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A package for creating Distributed Validators using the Obol API.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -20,7 +20,7 @@
20
20
  "generate-typedoc": "typedoc",
21
21
  "ds:release:major": "npm version $(semver $npm_package_version -i major) && npm publish --tag latest",
22
22
  "ds:release:minor": "npm version $(semver $npm_package_version -i minor) && npm publish --tag latest",
23
- "ds:release:patch": "npm config list && npm version $(semver $npm_package_version -i patch) && npm publish --tag latest"
23
+ "ds:release:patch": "npm version $(semver $npm_package_version -i patch) && npm publish --tag latest"
24
24
  },
25
25
  "author": "Obol Labs (https://obol.tech)",
26
26
  "repository": {