Skip to content

Commit

Permalink
update sdkDocs and add sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
HananINouman committed Jun 3, 2024
1 parent cae2643 commit 85bac50
Show file tree
Hide file tree
Showing 18 changed files with 269 additions and 179 deletions.
16 changes: 8 additions & 8 deletions docs/sdk/classes/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ An example of how to use acceptObolLatestTermsAndConditions:

#### Source

index.ts:59
index.ts:61

***

Expand All @@ -73,7 +73,7 @@ Creates a cluster definition which contains cluster configuration.

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `newCluster` | [`ClusterPayload`](../interfaces/ClusterPayload.md) | The new unique cluster. |
| `newCluster` | [`ClusterPayload`](../type-aliases/ClusterPayload.md) | The new unique cluster. |

#### Returns

Expand All @@ -90,7 +90,7 @@ An example of how to use createClusterDefinition:

#### Source

index.ts:105
index.ts:107

***

Expand Down Expand Up @@ -122,7 +122,7 @@ An example of how to use acceptClusterDefinition:

#### Source

index.ts:163
index.ts:165

***

Expand Down Expand Up @@ -151,13 +151,13 @@ An example of how to use getClusterDefinition:

#### Source

index.ts:215
index.ts:217

***

### getClusterLock()

> **getClusterLock**(`configHash`): `Promise` \<[`ClusterLock`](../interfaces/ClusterLock.md)\>
> **getClusterLock**(`configHash`): `Promise` \<[`ClusterLock`](../type-aliases/ClusterLock.md)\>
#### Parameters

Expand All @@ -167,7 +167,7 @@ index.ts:215

#### Returns

`Promise` \<[`ClusterLock`](../interfaces/ClusterLock.md)\>
`Promise` \<[`ClusterLock`](../type-aliases/ClusterLock.md)\>

The matched cluster details (lock) from DB

Expand All @@ -180,4 +180,4 @@ An example of how to use getClusterLock:

#### Source

index.ts:234
index.ts:236
2 changes: 1 addition & 1 deletion docs/sdk/functions/validateClusterLock.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Verifies Cluster Lock's validity.

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `lock` | [`ClusterLock`](../interfaces/ClusterLock.md) | cluster lock |
| `lock` | [`ClusterLock`](../type-aliases/ClusterLock.md) | cluster lock |

## Returns

Expand Down
72 changes: 56 additions & 16 deletions docs/sdk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,81 @@
hide_title: true
---

<span className="theme-doc-version-badge badge badge--secondary">
<strong>SDK Version:</strong> v1.0.17
</span>

![Obol Logo](https://obol.tech/obolnetwork.png)

<h1 align="center">Obol SDK</h1>

This repo contains the Obol Software Development Kit, for creating Distributed Validators with the help of the [Obol API](https://docs.obol.tech/api).
This repo contains the Obol Software Development Kit, for creating Distributed Validators with the help of the [Obol API](https://docs.obol.tech/api).

## Getting Started

Checkout our [docs](https://docs.obol.tech/docs/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.
Checkout our [docs](https://docs.obol.tech/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.

## Terms and Conditions
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.tech/terms.pdf) by calling acceptObolLatestTermsAndConditions.

## Contributing

Please review the following guidelines:

- [How to Report Bugs](#how-to-report-bugs)
- [How to Propose Changes](#how-to-propose-changes)
- [Code Review Process](#code-review-process)

### How to Report Bugs

If you encounter a bug or unexpected behavior, please follow these steps to report it:

1. Go to the "Issues" tab of this repository.
2. Click on the "Get started" button in the Bug report section.
3. Provide a clear title and description of the issue following the format provided.

### How to Propose Changes

If you'd like to propose improvements or new features, please follow these steps:

1. Fork this repository.
2. Create a new branch for your changes.
3. Make your changes and commit them with clear messages.
4. Open a pull request with a detailed description of the changes.

### Code Review Process

All contributions are reviewed before they are merged into the main branch. Please address any feedback provided during the review process.

Thank you for contributing to Obol-SDK!

## API Index

## Enumerations
### Enumerations

- [FORK\_MAPPING](enumerations/FORK_MAPPING.md)

## Classes
### Classes

- [Client](classes/Client.md)

## Interfaces
### Interfaces

- [ClusterOperator](interfaces/ClusterOperator.md)
- [ClusterCreator](interfaces/ClusterCreator.md)
- [ClusterValidator](interfaces/ClusterValidator.md)
- [ClusterPayload](interfaces/ClusterPayload.md)
- [ClusterDefinition](interfaces/ClusterDefinition.md)
- [BuilderRegistrationMessage](interfaces/BuilderRegistrationMessage.md)
- [BuilderRegistration](interfaces/BuilderRegistration.md)
- [DepositData](interfaces/DepositData.md)
- [DistributedValidator](interfaces/DistributedValidator.md)
- [ClusterLock](interfaces/ClusterLock.md)

## Type Aliases
### Type Aliases

- [ClusterOperator](type-aliases/ClusterOperator.md)
- [OperatorPayload](type-aliases/OperatorPayload.md)
- [ClusterCreator](type-aliases/ClusterCreator.md)
- [ClusterValidator](type-aliases/ClusterValidator.md)
- [ClusterPayload](type-aliases/ClusterPayload.md)
- [BuilderRegistrationMessage](type-aliases/BuilderRegistrationMessage.md)
- [BuilderRegistration](type-aliases/BuilderRegistration.md)
- [DepositData](type-aliases/DepositData.md)
- [DistributedValidator](type-aliases/DistributedValidator.md)
- [ClusterLock](type-aliases/ClusterLock.md)

## Functions
### Functions

- [validateClusterLock](functions/validateClusterLock.md)
8 changes: 0 additions & 8 deletions docs/sdk/interfaces/ClusterCreator.md

This file was deleted.

12 changes: 6 additions & 6 deletions docs/sdk/interfaces/ClusterDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ Cluster definition data needed for dkg

## Extends

- [`ClusterPayload`](ClusterPayload.md)
- [`ClusterPayload`](../type-aliases/ClusterPayload.md)

## Properties

| Property | Type | Description | Overrides | Inherited from |
| :------ | :------ | :------ | :------ | :------ |
| `name` | `string` | The cluster name. | [`ClusterPayload`](ClusterPayload.md).`name` | [`ClusterPayload`](ClusterPayload.md).`name` |
| `operators` | [`ClusterOperator`](ClusterOperator.md)[] | The cluster nodes operators addresses. | [`ClusterPayload`](ClusterPayload.md).`operators` | [`ClusterPayload`](ClusterPayload.md).`operators` |
| `validators` | [`ClusterValidator`](ClusterValidator.md)[] | The cluster validators information. | [`ClusterPayload`](ClusterPayload.md).`validators` | [`ClusterPayload`](ClusterPayload.md).`validators` |
| `creator` | [`ClusterCreator`](ClusterCreator.md) | The creator of the cluster. | - | - |
| `name` | `string` | The cluster name. | `ClusterPayload.name` | `ClusterPayload.name` |
| `operators` | [`ClusterOperator`](../type-aliases/ClusterOperator.md)[] | The cluster nodes operators addresses. | `ClusterPayload.operators` | `ClusterPayload.operators` |
| `validators` | [`ClusterValidator`](../type-aliases/ClusterValidator.md)[] | The cluster validators information. | `ClusterPayload.validators` | `ClusterPayload.validators` |
| `creator` | [`ClusterCreator`](../type-aliases/ClusterCreator.md) | The creator of the cluster. | - | - |
| `version` | `string` | The cluster configuration version. | - | - |
| `dkg_algorithm` | `string` | The cluster dkg algorithm. | - | - |
| `fork_version` | `string` | The cluster fork version. | - | - |
Expand All @@ -20,5 +20,5 @@ Cluster definition data needed for dkg
| `config_hash` | `string` | The cluster configuration hash. | - | - |
| `threshold` | `number` | The distributed validator threshold. | - | - |
| `num_validators` | `number` | The number of distributed validators in the cluster. | - | - |
| `deposit_amounts?` | `string`[] | The cluster partial deposits in gwei or 32000000000. | [`ClusterPayload`](ClusterPayload.md).`deposit_amounts` | [`ClusterPayload`](ClusterPayload.md).`deposit_amounts` |
| `deposit_amounts?` | `string`[] | The cluster partial deposits in gwei or 32000000000. | `ClusterPayload.deposit_amounts` | `ClusterPayload.deposit_amounts` |
| `definition_hash?` | `string` | The hash of the cluster definition. | - | - |
12 changes: 0 additions & 12 deletions docs/sdk/interfaces/ClusterOperator.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/sdk/interfaces/DistributedValidator.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
> **BuilderRegistration**: `object`
Pre-generated Signed Validator Builder Registration

## Properties
## Type declaration

| Property | Type | Description |
| Member | Type | Description |
| :------ | :------ | :------ |
| `message` | [`BuilderRegistrationMessage`](BuilderRegistrationMessage.md) | Builder registration message. |
| `signature` | `string` | BLS signature of the builder registration message. |

## Source

types.ts:143
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
> **BuilderRegistrationMessage**: `object`
Unsigned DV Builder Registration Message

## Properties
## Type declaration

| Property | Type | Description |
| Member | Type | Description |
| :------ | :------ | :------ |
| `fee_recipient` | `string` | The DV fee recipient. |
| `gas_limit` | `number` | Default is 30000000. |
| `timestamp` | `number` | Timestamp when generating cluster lock file. |
| `pubkey` | `string` | The public key of the DV. |

## Source

types.ts:126
14 changes: 14 additions & 0 deletions docs/sdk/type-aliases/ClusterCreator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
> **ClusterCreator**: `object`
Cluster creator data

## Type declaration

| Member | Type | Description |
| :------ | :------ | :------ |
| `address` | `string` | The creator address. |
| `config_signature` | `string` | The cluster configuration signature. |

## Source

types.ts:50
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
> **ClusterLock**: `object`
Cluster Details after DKG is complete

## Properties
## Type declaration

| Property | Type | Description |
| Member | Type | Description |
| :------ | :------ | :------ |
| `cluster_definition` | [`ClusterDefinition`](ClusterDefinition.md) | The cluster definition. |
| `cluster_definition` | [`ClusterDefinition`](../interfaces/ClusterDefinition.md) | The cluster definition. |
| `distributed_validators` | [`DistributedValidator`](DistributedValidator.md)[] | The cluster distributed validators. |
| `signature_aggregate` | `string` | The cluster bls signature aggregate. |
| `lock_hash` | `string` | The hash of the cluster lock. |
| `node_signatures?` | `string`[] | Node Signature for the lock hash by the node secp256k1 key. |
| `node_signatures` | `string`[] | Node Signature for the lock hash by the node secp256k1 key. |

## Source

types.ts:194
18 changes: 18 additions & 0 deletions docs/sdk/type-aliases/ClusterOperator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
> **ClusterOperator**: `object`
Node operator data

## Type declaration

| Member | Type | Description |
| :------ | :------ | :------ |
| `address` | `string` | The operator address. |
| `enr` | `string` | The operator ethereum node record. |
| `fork_version` | `string` | The cluster fork_version. |
| `version` | `string` | The cluster version. |
| `enr_signature` | `string` | The operator enr signature. |
| `config_signature` | `string` | The operator configuration signature. |

## Source

types.ts:21
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Cluster configuration

## Extended by
> **ClusterPayload**: `object`
- [`ClusterDefinition`](ClusterDefinition.md)
Cluster configuration

## Properties
## Type declaration

| Property | Type | Description |
| Member | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The cluster name. |
| `operators` | [`ClusterOperator`](ClusterOperator.md)[] | The cluster nodes operators addresses. |
| `validators` | [`ClusterValidator`](ClusterValidator.md)[] | The cluster validators information. |
| `deposit_amounts?` | `string`[] | The cluster partial deposits in gwei or 32000000000. |
| `deposit_amounts` | `string`[] | The cluster partial deposits in gwei or 32000000000. |

## Source

types.ts:71
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
> **ClusterValidator**: `object`
Validator withdrawal configuration

## Properties
## Type declaration

| Property | Type | Description |
| Member | Type | Description |
| :------ | :------ | :------ |
| `fee_recipient_address` | `string` | The validator fee recipient address. |
| `withdrawal_address` | `string` | The validator reward address. |

## Source

types.ts:60
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
> **DepositData**: `object`
Required deposit data for validator activation

## Properties
## Type declaration

| Property | Type | Description |
| Member | Type | Description |
| :------ | :------ | :------ |
| `pubkey` | `string` | The public key of the distributed validator. |
| `withdrawal_credentials` | `string` | The 0x01 withdrawal address of the DV. |
| `amount` | `string` | 32 ethers. |
| `deposit_data_root` | `string` | A checksum for DepositData fields . |
| `signature` | `string` | BLS signature of the deposit message. |

## Source

types.ts:154
Loading

0 comments on commit 85bac50

Please sign in to comment.