From a66a40e23f2cb143a9f286c35e79913ecc11481d Mon Sep 17 00:00:00 2001 From: HananINouman Date: Mon, 16 Jun 2025 12:50:58 +0300 Subject: [PATCH] sdk-v2.7.0 --- sdk/classes/Client.md | 278 +++++++++------- sdk/classes/Exit.md | 308 ++++++++++++++++++ sdk/classes/Incentives.md | 112 +++++++ sdk/classes/README.md | 2 - sdk/enumerations/FORK_MAPPING.md | 18 +- sdk/enumerations/README.md | 2 - sdk/functions/README.md | 2 - .../clusterConfigOrDefinitionHash.md | 22 ++ sdk/functions/clusterLockHash.md | 23 ++ sdk/functions/validateClusterLock.md | 32 +- sdk/functions/verifyDepositData.md | 32 ++ sdk/index.md | 33 +- sdk/interfaces/ClusterDefinition.md | 43 ++- .../ExistingExitValidationBlobData.md | 18 + sdk/interfaces/ExitClusterConfig.md | 16 + sdk/interfaces/ExitClusterDefinition.md | 17 + sdk/interfaces/ExitDistributedValidator.md | 16 + sdk/interfaces/ExitOperator.md | 15 + sdk/interfaces/ExitValidationBlob.md | 16 + sdk/interfaces/ExitValidationMessage.md | 16 + sdk/interfaces/ExitValidationPayload.md | 17 + sdk/interfaces/README.md | 2 - sdk/interfaces/RewardsSplitPayload.md | 32 +- sdk/interfaces/SignedExitValidationMessage.md | 16 + sdk/type-aliases/BuilderRegistration.md | 22 +- .../BuilderRegistrationMessage.md | 26 +- sdk/type-aliases/ClaimIncentivesResponse.md | 11 + sdk/type-aliases/ClaimableIncentives.md | 21 ++ sdk/type-aliases/ClusterCreator.md | 22 +- sdk/type-aliases/ClusterLock.md | 28 +- sdk/type-aliases/ClusterOperator.md | 30 +- sdk/type-aliases/ClusterPayload.md | 31 +- sdk/type-aliases/ClusterValidator.md | 22 +- sdk/type-aliases/DepositData.md | 28 +- sdk/type-aliases/DistributedValidator.md | 28 +- sdk/type-aliases/ETH_ADDRESS.md | 12 +- sdk/type-aliases/HttpRequestFunc.md | 27 ++ sdk/type-aliases/OWRTranches.md | 19 ++ sdk/type-aliases/OperatorPayload.md | 12 +- sdk/type-aliases/ProviderType.md | 11 + sdk/type-aliases/README.md | 2 - sdk/type-aliases/SafeRpcUrl.md | 11 + sdk/type-aliases/SignerType.md | 11 + sdk/type-aliases/SplitRecipient.md | 22 +- sdk/type-aliases/TotalSplitPayload.md | 28 +- sdk/variables/CAPELLA_FORK_MAPPING.md | 12 + 46 files changed, 1231 insertions(+), 293 deletions(-) create mode 100644 sdk/classes/Exit.md create mode 100644 sdk/classes/Incentives.md delete mode 100644 sdk/classes/README.md delete mode 100644 sdk/enumerations/README.md delete mode 100644 sdk/functions/README.md create mode 100644 sdk/functions/clusterConfigOrDefinitionHash.md create mode 100644 sdk/functions/clusterLockHash.md create mode 100644 sdk/functions/verifyDepositData.md create mode 100644 sdk/interfaces/ExistingExitValidationBlobData.md create mode 100644 sdk/interfaces/ExitClusterConfig.md create mode 100644 sdk/interfaces/ExitClusterDefinition.md create mode 100644 sdk/interfaces/ExitDistributedValidator.md create mode 100644 sdk/interfaces/ExitOperator.md create mode 100644 sdk/interfaces/ExitValidationBlob.md create mode 100644 sdk/interfaces/ExitValidationMessage.md create mode 100644 sdk/interfaces/ExitValidationPayload.md delete mode 100644 sdk/interfaces/README.md create mode 100644 sdk/interfaces/SignedExitValidationMessage.md create mode 100644 sdk/type-aliases/ClaimIncentivesResponse.md create mode 100644 sdk/type-aliases/ClaimableIncentives.md create mode 100644 sdk/type-aliases/HttpRequestFunc.md create mode 100644 sdk/type-aliases/OWRTranches.md create mode 100644 sdk/type-aliases/ProviderType.md delete mode 100644 sdk/type-aliases/README.md create mode 100644 sdk/type-aliases/SafeRpcUrl.md create mode 100644 sdk/type-aliases/SignerType.md create mode 100644 sdk/variables/CAPELLA_FORK_MAPPING.md diff --git a/sdk/classes/Client.md b/sdk/classes/Client.md index 65a0526..80c4edc 100644 --- a/sdk/classes/Client.md +++ b/sdk/classes/Client.md @@ -1,239 +1,299 @@ -# Client +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / Client + +Defined in: [index.ts:63](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L63) Obol sdk Client can be used for creating, managing and activating distributed validators. -### Extends +## Extends + +- `Base` -* `Base` +## Constructors -### Constructors +### new Client() -#### new Client() +> **new Client**(`config`, `signer`?, `provider`?): `Client` -> **new Client**(`config`, `signer`?): [`Client`](Client.md) +Defined in: [index.ts:97](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L97) -**Parameters** +#### Parameters -| Parameter | Type | Description | -| ----------------- | -------- | --------------------- | -| `config` | `object` | Client configurations | -| `config.baseUrl`? | `string` | obol-api url | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `config` | \{ `baseUrl`: `string`; `chainId`: `number`; \} | Client configurations | +| `config.baseUrl`? | `string` | obol-api url | | `config.chainId`? | `number` | Blockchain network ID | -| `signer`? | `Signer` | ethersJS Signer | +| `signer`? | [`SignerType`](../type-aliases/SignerType.md) | ethersJS Signer | +| `provider`? | [`ProviderType`](../type-aliases/ProviderType.md) | - | -**Returns** +#### Returns -[`Client`](Client.md) +`Client` Obol-SDK Client instance -An example of how to instantiate obol-sdk Client: [obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L29) +An example of how to instantiate obol-sdk Client: +[obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L29) -**Overrides** +#### Overrides `Base.constructor` -**Defined in** +## Properties + +| Property | Modifier | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| `incentives` | `public` | [`Incentives`](Incentives.md) | The incentives module, responsible for managing Obol tokens distribution. | [index.ts:73](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L73) | +| `exit` | `public` | [`Exit`](Exit.md) | The exit module, responsible for managing exit validation. | [index.ts:79](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L79) | +| `provider` | `public` | `undefined` \| `null` \| [`ProviderType`](../type-aliases/ProviderType.md) | The blockchain provider, used to interact with the network. It can be null, undefined, or a valid provider instance and defaults to the Signer provider if Signer is passed. | [index.ts:85](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L85) | -index.ts:66 +## Methods -### Methods +### acceptObolLatestTermsAndConditions() -#### acceptObolLatestTermsAndConditions() +> **acceptObolLatestTermsAndConditions**(): `Promise`\<`string`\> -> **acceptObolLatestTermsAndConditions**(): `Promise`<`string`> +Defined in: [index.ts:125](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L125) Accepts Obol terms and conditions to be able to create or update data. -**Returns** +#### Returns -`Promise`<`string`> +`Promise`\<`string`\> terms and conditions acceptance success message. -**Throws** +#### Throws On unverified signature or wrong hash. -An example of how to use acceptObolLatestTermsAndConditions: [acceptObolLatestTermsAndConditions](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L44) - -**Defined in** - -index.ts:79 +An example of how to use acceptObolLatestTermsAndConditions: +[acceptObolLatestTermsAndConditions](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L44) *** -#### createObolRewardsSplit() +### createObolRewardsSplit() + +> **createObolRewardsSplit**(`rewardsSplitPayload`): `Promise`\<[`ClusterValidator`](../type-aliases/ClusterValidator.md)\> -> **createObolRewardsSplit**(`rewardsSplitPayload`): `Promise`<[`ClusterValidator`](../type-aliases/ClusterValidator.md)> +Defined in: [index.ts:180](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L180) Deploys OWR and Splitter Proxy. -**Parameters** +#### Parameters -| Parameter | Type | Description | -| --------------------- | ------------------------------------------------------------- | --------------------------------------- | +| Parameter | Type | Description | +| ------ | ------ | ------ | | `rewardsSplitPayload` | [`RewardsSplitPayload`](../interfaces/RewardsSplitPayload.md) | Data needed to deploy owr and splitter. | -**Returns** +#### Returns -`Promise`<[`ClusterValidator`](../type-aliases/ClusterValidator.md)> +`Promise`\<[`ClusterValidator`](../type-aliases/ClusterValidator.md)\> owr address as withdrawal address and splitter as fee recipient -An example of how to use createObolRewardsSplit: [createObolRewardsSplit](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L141) +An example of how to use createObolRewardsSplit: +[createObolRewardsSplit](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L141) -**Remarks** +#### Remarks -**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed and not pushed to version control. - -**Defined in** - -index.ts:133 +**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed +and not pushed to version control. *** -#### createObolTotalSplit() +### createObolTotalSplit() + +> **createObolTotalSplit**(`totalSplitPayload`): `Promise`\<[`ClusterValidator`](../type-aliases/ClusterValidator.md)\> -> **createObolTotalSplit**(`totalSplitPayload`): `Promise`<[`ClusterValidator`](../type-aliases/ClusterValidator.md)> +Defined in: [index.ts:301](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L301) Deploys Splitter Proxy. -**Parameters** +#### Parameters -| Parameter | Type | Description | -| ------------------- | ----------------------------------------------------------- | -------------------------------------------------- | +| Parameter | Type | Description | +| ------ | ------ | ------ | | `totalSplitPayload` | [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md) | Data needed to deploy splitter if it doesnt exist. | -**Returns** +#### Returns -`Promise`<[`ClusterValidator`](../type-aliases/ClusterValidator.md)> +`Promise`\<[`ClusterValidator`](../type-aliases/ClusterValidator.md)\> splitter address as withdrawal address and splitter as fee recipient too -An example of how to use createObolTotalSplit: [createObolTotalSplit](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L168) +An example of how to use createObolTotalSplit: +[createObolTotalSplit](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L168) + +#### Remarks + +**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed +and not pushed to version control. + +*** + +### getOWRTranches() + +> **getOWRTranches**(`owrAddress`): `Promise`\<[`OWRTranches`](../type-aliases/OWRTranches.md)\> + +Defined in: [index.ts:400](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L400) + +Read OWR Tranches. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `owrAddress` | `string` | Address of the Deployed OWR Contract | + +#### Returns -**Remarks** +`Promise`\<[`OWRTranches`](../type-aliases/OWRTranches.md)\> -**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed and not pushed to version control. +owr tranch information about principal and reward reciepient, as well as the principal amount -**Defined in** +#### Remarks -index.ts:254 +**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed +and not pushed to version control. *** -#### createClusterDefinition() +### createClusterDefinition() -> **createClusterDefinition**(`newCluster`): `Promise`<`string`> +> **createClusterDefinition**(`newCluster`): `Promise`\<`string`\> + +Defined in: [index.ts:418](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L418) Creates a cluster definition which contains cluster configuration. -**Parameters** +#### Parameters -| Parameter | Type | Description | -| ------------ | ----------------------------------------------------- | ----------------------- | +| Parameter | Type | Description | +| ------ | ------ | ------ | | `newCluster` | [`ClusterPayload`](../type-aliases/ClusterPayload.md) | The new unique cluster. | -**Returns** +#### Returns -`Promise`<`string`> +`Promise`\<`string`\> -config\_hash. +config_hash. -**Throws** +#### Throws On duplicate entries, missing or wrong cluster keys. -An example of how to use createClusterDefinition: [createObolCluster](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L59) - -**Defined in** - -index.ts:350 +An example of how to use createClusterDefinition: +[createObolCluster](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L59) *** -#### acceptClusterDefinition() +### acceptClusterDefinition() -> **acceptClusterDefinition**(`operatorPayload`, `configHash`): `Promise`<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)> +> **acceptClusterDefinition**(`operatorPayload`, `configHash`): `Promise`\<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)\> + +Defined in: [index.ts:483](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L483) Approves joining a cluster with specific configuration. -**Parameters** +#### Parameters -| Parameter | Type | Description | -| ----------------- | ------------------------------------------------------- | ---------------------------------------------------------------------- | -| `operatorPayload` | [`OperatorPayload`](../type-aliases/OperatorPayload.md) | The operator data including signatures. | -| `configHash` | `string` | The config hash of the cluster which the operator confirms joining to. | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `operatorPayload` | [`OperatorPayload`](../type-aliases/OperatorPayload.md) | The operator data including signatures. | +| `configHash` | `string` | The config hash of the cluster which the operator confirms joining to. | -**Returns** +#### Returns -`Promise`<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)> +`Promise`\<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)\> The cluster definition. -**Throws** +#### Throws On unauthorized, duplicate entries, missing keys, not found cluster or invalid data. -An example of how to use acceptClusterDefinition: [acceptClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L106) - -**Defined in** - -index.ts:415 +An example of how to use acceptClusterDefinition: +[acceptClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L106) *** -#### getClusterDefinition() +### getClusterDefinition() -> **getClusterDefinition**(`configHash`): `Promise`<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)> +> **getClusterDefinition**(`configHash`): `Promise`\<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)\> -**Parameters** +Defined in: [index.ts:540](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L540) -| Parameter | Type | Description | -| ------------ | -------- | ---------------------------------------------------------- | +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | | `configHash` | `string` | The configuration hash returned in createClusterDefinition | -**Returns** +#### Returns -`Promise`<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)> +`Promise`\<[`ClusterDefinition`](../interfaces/ClusterDefinition.md)\> -The cluster definition for config hash +The cluster definition for config hash -**Throws** +#### Throws On not found config hash. -An example of how to use getClusterDefinition: [getObolClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L74) - -**Defined in** - -index.ts:469 +An example of how to use getClusterDefinition: +[getObolClusterDefinition](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L74) *** -#### getClusterLock() +### getClusterLock() -> **getClusterLock**(`configHash`): `Promise`<[`ClusterLock`](../type-aliases/ClusterLock.md)> +> **getClusterLock**(`configHash`): `Promise`\<[`ClusterLock`](../type-aliases/ClusterLock.md)\> -**Parameters** +Defined in: [index.ts:559](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L559) -| Parameter | Type | Description | -| ------------ | -------- | -------------------------------------------- | +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | | `configHash` | `string` | The configuration hash in cluster-definition | -**Returns** +#### Returns -`Promise`<[`ClusterLock`](../type-aliases/ClusterLock.md)> +`Promise`\<[`ClusterLock`](../type-aliases/ClusterLock.md)\> The matched cluster details (lock) from DB -**Throws** +#### Throws On not found cluster definition or lock. -An example of how to use getClusterLock: [getObolClusterLock](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L89) +An example of how to use getClusterLock: +[getObolClusterLock](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L89) + +*** + +### getClusterLockByHash() + +> **getClusterLockByHash**(`lockHash`): `Promise`\<[`ClusterLock`](../type-aliases/ClusterLock.md)\> + +Defined in: [index.ts:575](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/index.ts#L575) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `lockHash` | `string` | The configuration hash in cluster-definition | -**Defined in** +#### Returns -index.ts:488 +`Promise`\<[`ClusterLock`](../type-aliases/ClusterLock.md)\> + +The matched cluster details (lock) from DB + +#### Throws + +On not found cluster definition or lock. diff --git a/sdk/classes/Exit.md b/sdk/classes/Exit.md new file mode 100644 index 0000000..210e120 --- /dev/null +++ b/sdk/classes/Exit.md @@ -0,0 +1,308 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / Exit + +Defined in: [exits/exit.ts:84](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/exits/exit.ts#L84) + +Exit validation and verification class for Obol distributed validators. + +This class provides functionality to validate and verify voluntary exit signatures +for distributed validators in an Obol cluster. It handles both partial exit signatures +from individual operators and payload signatures that authorize exit operations. + +The class supports: +- Verification of BLS signatures for partial exit messages +- Verification of ECDSA signatures for exit payload authorization +- Validation of exit blobs against cluster configuration +- Duplicate detection and epoch validation + +## Example + +```typescript +const exit = new Exit(1, provider); // Mainnet with provider + +// Verify a partial exit signature +const isValid = await exit.verifyPartialExitSignature( + publicShareKey, + signedExitMessage, + forkVersion, + genesisValidatorsRoot +); + +// Validate exit blobs for a cluster +const validBlobs = await exit.validateExitBlobs( + clusterConfig, + exitsPayload, + beaconNodeApiUrl, + existingBlobData +); +``` + +## Constructors + +### new Exit() + +> **new Exit**(`chainId`, `provider`): `Exit` + +Defined in: [exits/exit.ts:103](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/exits/exit.ts#L103) + +Creates a new Exit instance for validator exit operations. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `chainId` | `number` | The Ethereum chain ID (e.g., 1 for mainnet, 5 for goerli) | +| `provider` | `undefined` \| `null` \| [`ProviderType`](../type-aliases/ProviderType.md) | Optional Ethereum provider for blockchain interactions | + +#### Returns + +`Exit` + +#### Example + +```typescript +// For mainnet with a provider +const exit = new Exit(1, provider); + +// For goerli testnet without provider +const exit = new Exit(5, null); +``` + +## Methods + +### verifyPartialExitSignature() + +> **verifyPartialExitSignature**(`publicShareKey`, `signedExitMessage`, `forkVersion`, `genesisValidatorsRootString`): `Promise`\<`boolean`\> + +Defined in: [exits/exit.ts:191](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/exits/exit.ts#L191) + +Verifies a partial exit signature from a distributed validator operator. + +This method validates that a partial exit signature was correctly signed by the +operator's share of the distributed validator's private key. It performs BLS +signature verification using the appropriate fork version and genesis validators root. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `publicShareKey` | `string` | The operator's public share key (BLS public key, hex string with or without 0x prefix) | +| `signedExitMessage` | [`SignedExitValidationMessage`](../interfaces/SignedExitValidationMessage.md) | The signed exit message containing the exit details and signature | +| `forkVersion` | `string` | The Ethereum fork version (e.g., "0x00000000" for mainnet) | +| `genesisValidatorsRootString` | `string` | The genesis validators root for the network (hex string) | + +#### Returns + +`Promise`\<`boolean`\> + +Promise resolving to true if the signature is valid, false otherwise + +#### Throws + +When unable to determine the Capella fork version for the given network + +#### Throws + +When BLS library initialization or verification fails + +#### Example + +```typescript +const isValid = await exit.verifyPartialExitSignature( + "0x1234...abcd", // operator's public share key + { + message: { epoch: "12345", validator_index: "67890" }, + signature: "0xabcd...1234" + }, + "0x00000000", // mainnet fork version + "0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95" +); +``` + +*** + +### verifyExitPayloadSignature() + +> **verifyExitPayloadSignature**(`enrString`, `exitsPayload`): `Promise`\<`boolean`\> + +Defined in: [exits/exit.ts:256](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/exits/exit.ts#L256) + +Verifies the exit payload signature using the operator's ENR. + +This method validates that an exit payload was signed by the correct operator +using ECDSA signature verification. The signature is verified against the +operator's public key extracted from their ENR (Ethereum Node Record). + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `enrString` | `string` | The operator's ENR string containing their identity and public key | +| `exitsPayload` | [`ExitValidationPayload`](../interfaces/ExitValidationPayload.md) | The exit validation payload containing partial exits and operator signature | + +#### Returns + +`Promise`\<`boolean`\> + +Promise resolving to true if the payload signature is valid, false otherwise + +#### Throws + +When the ENR string is invalid or cannot be decoded + +#### Throws + +When the signature format is invalid (must be 130 hex characters) + +#### Throws + +When signature verification encounters an error + +#### Example + +```typescript +const isValid = await exit.verifyExitPayloadSignature( + "enr:-LK4QFo_n0dUm4PKejSOXf8JkSWq5EINV0XhG1zY00d...", // operator ENR + { + partial_exits: [exitBlob1, exitBlob2], + share_idx: 1, + signature: "0x1234...abcd" // ECDSA signature (130 hex chars) + } +); +``` + +*** + +### validateExitBlobs() + +> **validateExitBlobs**(`clusterConfig`, `exitsPayload`, `beaconNodeApiUrl`, `existingBlobData`): `Promise`\<[`ExitValidationBlob`](../interfaces/ExitValidationBlob.md)[]\> + +Defined in: [exits/exit.ts:533](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/exits/exit.ts#L533) + +Validates exit blobs against cluster configuration and existing data. + +This method performs comprehensive validation of exit blobs including: +- Operator authorization and payload signature verification +- Network parameter validation (genesis root, fork version) +- Public key validation against cluster configuration +- Partial signature verification for each exit blob +- Duplicate detection and epoch progression validation +- Signature consistency checks for existing exits + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `clusterConfig` | [`ExitClusterConfig`](../interfaces/ExitClusterConfig.md) | The cluster configuration containing operators and distributed validators | +| `exitsPayload` | [`ExitValidationPayload`](../interfaces/ExitValidationPayload.md) | The exit validation payload with partial exits and operator info | +| `beaconNodeApiUrl` | `string` | The beacon node API URL for network parameter retrieval | +| `existingBlobData` | `null` \| [`ExistingExitValidationBlobData`](../interfaces/ExistingExitValidationBlobData.md) | Existing exit blob data for duplicate detection, or null if none exists | + +#### Returns + +`Promise`\<[`ExitValidationBlob`](../interfaces/ExitValidationBlob.md)[]\> + +Promise resolving to an array of validated, non-duplicate exit blobs + +#### Throws + +When share_idx is invalid or out of bounds for the cluster operators + +#### Throws + +When payload signature verification fails + +#### Throws + +When network parameters cannot be retrieved or are invalid + +#### Throws + +When a public key is not found in the cluster's distributed validators + +#### Throws + +When a partial exit signature is invalid + +#### Throws + +When exit epoch validation fails (new epoch not greater than existing) + +#### Throws + +When validator index mismatches with existing data + +#### Throws + +When signature mismatches for the same epoch and operator + +#### Example + +```typescript +const validExitBlobs = await exit.validateExitBlobs( + { + definition: { + operators: [{ enr: "enr:-LK4Q..." }], + fork_version: "0x00000000", + threshold: 1 + }, + distributed_validators: [{ + distributed_public_key: "0x1234...abcd", + public_shares: ["0x5678...efgh"] + }] + }, + { + partial_exits: [exitBlob], + share_idx: 1, + signature: "0x1234...abcd" + }, + "http://localhost:5052", + existingBlobData // or null for new exits +); +``` + +*** + +### recombineExitBlobs() + +> **recombineExitBlobs**(`exitBlob`): `Promise`\<`FullExitBlob`\> + +Defined in: [exits/exit.ts:585](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/exits/exit.ts#L585) + +Recombines exit blobs into a single exit blob. + +This method aggregates partial exit signatures from multiple operators into a single exit blob. +It ensures that the signatures are properly ordered and aggregated according to the operator indices. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `exitBlob` | [`ExistingExitValidationBlobData`](../interfaces/ExistingExitValidationBlobData.md) | The existing exit blob data containing partial exit signatures | + +#### Returns + +`Promise`\<`FullExitBlob`\> + +Promise resolving to a single exit blob with aggregated signatures + +#### Throws + +When no valid signatures are found for aggregation + +#### Throws + +When signature length is invalid + +#### Throws + +When signature parsing fails + +#### Example + +```typescript +const aggregatedExitBlob = await exit.recombineExitBlobs(existingBlobData); +``` diff --git a/sdk/classes/Incentives.md b/sdk/classes/Incentives.md new file mode 100644 index 0000000..883a7f8 --- /dev/null +++ b/sdk/classes/Incentives.md @@ -0,0 +1,112 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / Incentives + +Defined in: [incentives/incentives.ts:24](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/incentives/incentives.ts#L24) + +**`Internal`** + +Incentives can be used for fetching and claiming Obol incentives. + + Access it through Client.incentives. + +## Example + +```ts +const obolClient = new Client(config); +await obolClient.incentives.claimIncentives(address); +``` + +## Methods + +### claimIncentives() + +> **claimIncentives**(`address`): `Promise`\<[`ClaimIncentivesResponse`](../type-aliases/ClaimIncentivesResponse.md)\> + +Defined in: [incentives/incentives.ts:65](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/incentives/incentives.ts#L65) + +Claims Obol incentives from a Merkle Distributor contract using an address. + +This method automatically fetches incentive data and verifies whether the incentives have already been claimed. +If `txHash` is `null`, it indicates that the incentives were already claimed. + +Note: This method is not yet enabled and will throw an error if called. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `address` | `string` | The address to claim incentives for | + +#### Returns + +`Promise`\<[`ClaimIncentivesResponse`](../type-aliases/ClaimIncentivesResponse.md)\> + +The transaction hash or already claimed status + +#### Remarks + +**⚠️ Important:** If you're storing the private key in an `.env` file, ensure it is securely managed +and not pushed to version control. + +#### Throws + +Will throw an error if the incentives data is not found or the claim fails + +An example of how to use claimIncentives: +[obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L281) + +*** + +### isClaimed() + +> **isClaimed**(`contractAddress`, `index`): `Promise`\<`boolean`\> + +Defined in: [incentives/incentives.ts:124](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/incentives/incentives.ts#L124) + +Read isClaimed. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `contractAddress` | `string` | Address of the Merkle Distributor Contract | +| `index` | `number` | operator index in merkle tree | + +#### Returns + +`Promise`\<`boolean`\> + +true if incentives are already claime + +An example of how to use isClaimed: +[obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L266) + +*** + +### getIncentivesByAddress() + +> **getIncentivesByAddress**(`address`): `Promise`\<[`ClaimableIncentives`](../type-aliases/ClaimableIncentives.md)\> + +Defined in: [incentives/incentives.ts:143](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/incentives/incentives.ts#L143) + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `address` | `string` | Operator address | + +#### Returns + +`Promise`\<[`ClaimableIncentives`](../type-aliases/ClaimableIncentives.md)\> + +The matched incentives from DB + +#### Throws + +On not found if address not found. + +An example of how to use getIncentivesByAddress: +[obolClient](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L250) diff --git a/sdk/classes/README.md b/sdk/classes/README.md deleted file mode 100644 index 46d80f8..0000000 --- a/sdk/classes/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# classes - diff --git a/sdk/enumerations/FORK_MAPPING.md b/sdk/enumerations/FORK_MAPPING.md index e75f2a8..cd40bf4 100644 --- a/sdk/enumerations/FORK_MAPPING.md +++ b/sdk/enumerations/FORK_MAPPING.md @@ -1,10 +1,20 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / FORK\_MAPPING + +Defined in: [types.ts:14](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L14) + Permitted ChainID's ## Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | -| `0x00000000` | `1` | Mainnet. | types.ts:6 | -| `0x00001020` | `5` | Goerli/Prater. | types.ts:9 | -| `0x00000064` | `100` | Gnosis Chain. | types.ts:12 | -| `0x01017000` | `17000` | Holesky. | types.ts:15 | +| `0x00000000` | `1` | Mainnet. | [types.ts:16](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L16) | +| `0x00001020` | `5` | Goerli/Prater. | [types.ts:19](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L19) | +| `0x00000064` | `100` | Gnosis Chain. | [types.ts:22](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L22) | +| `0x01017000` | `17000` | Holesky. | [types.ts:25](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L25) | +| `0x90000069` | `11155111` | Sepolia. | [types.ts:28](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L28) | +| `0x10000910` | `560048` | Hoodi Chain. | [types.ts:31](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L31) | diff --git a/sdk/enumerations/README.md b/sdk/enumerations/README.md deleted file mode 100644 index ec74a1b..0000000 --- a/sdk/enumerations/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# enumerations - diff --git a/sdk/functions/README.md b/sdk/functions/README.md deleted file mode 100644 index 35b3fff..0000000 --- a/sdk/functions/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# functions - diff --git a/sdk/functions/clusterConfigOrDefinitionHash.md b/sdk/functions/clusterConfigOrDefinitionHash.md new file mode 100644 index 0000000..0c2726c --- /dev/null +++ b/sdk/functions/clusterConfigOrDefinitionHash.md @@ -0,0 +1,22 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / clusterConfigOrDefinitionHash + +> **clusterConfigOrDefinitionHash**(`cluster`, `configOnly`): `string` + +Defined in: [verification/common.ts:64](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/verification/common.ts#L64) + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `cluster` | [`ClusterDefinition`](../interfaces/ClusterDefinition.md) | The cluster configuration or the cluster definition | +| `configOnly` | `boolean` | a boolean to indicate config hash or definition hash | + +## Returns + +`string` + +The config hash or the definition hash in of the corresponding cluster diff --git a/sdk/functions/clusterLockHash.md b/sdk/functions/clusterLockHash.md new file mode 100644 index 0000000..a9b7c1b --- /dev/null +++ b/sdk/functions/clusterLockHash.md @@ -0,0 +1,23 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / clusterLockHash + +> **clusterLockHash**(`clusterLock`): `string` + +Defined in: [verification/common.ts:116](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/verification/common.ts#L116) + +Returns the SSZ cluster lock hash of the given cluster lock object + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `clusterLock` | [`ClusterLock`](../type-aliases/ClusterLock.md) | + +## Returns + +`string` + +The cluster lock hash in of the corresponding cluster lock diff --git a/sdk/functions/validateClusterLock.md b/sdk/functions/validateClusterLock.md index 8f622f4..8fde45b 100644 --- a/sdk/functions/validateClusterLock.md +++ b/sdk/functions/validateClusterLock.md @@ -1,27 +1,31 @@ -# validateClusterLock +[**@obolnetwork/obol-sdk**](../index.md) -> **validateClusterLock**(`lock`): `Promise`<`boolean`> +*** + +[@obolnetwork/obol-sdk](../index.md) / validateClusterLock + +> **validateClusterLock**(`lock`, `safeRpcUrl`?): `Promise`\<`boolean`\> + +Defined in: [services.ts:14](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/services.ts#L14) Verifies Cluster Lock's validity. -### Parameters +## Parameters -| Parameter | Type | Description | -| --------- | ----------------------------------------------- | ------------ | -| `lock` | [`ClusterLock`](../type-aliases/ClusterLock.md) | cluster lock | +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `lock` | [`ClusterLock`](../type-aliases/ClusterLock.md) | cluster lock | +| `safeRpcUrl`? | `string` | optional safeRpcUrl for safe wallet verification | -### Returns +## Returns -`Promise`<`boolean`> +`Promise`\<`boolean`\> boolean result to indicate if lock is valid -### Throws +## Throws on missing keys or values. -An example of how to use validateClusterLock: [validateClusterLock](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L127) - -### Defined in - -services.ts:13 +An example of how to use validateClusterLock: +[validateClusterLock](https://github.com/ObolNetwork/obol-sdk-examples/blob/main/TS-Example/index.ts#L127) diff --git a/sdk/functions/verifyDepositData.md b/sdk/functions/verifyDepositData.md new file mode 100644 index 0000000..769f628 --- /dev/null +++ b/sdk/functions/verifyDepositData.md @@ -0,0 +1,32 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / verifyDepositData + +> **verifyDepositData**(`distributedPublicKey`, `depositData`, `withdrawalAddress`, `forkVersion`, `compounding`?): `object` + +Defined in: [verification/common.ts:362](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/verification/common.ts#L362) + +Verify deposit data withdrawal credintials and signature + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `distributedPublicKey` | `string` | - | +| `depositData` | `Partial`\<[`DepositData`](../type-aliases/DepositData.md)\> | - | +| `withdrawalAddress` | `string` | withdrawal address in definition file. | +| `forkVersion` | `string` | fork version in definition file. | +| `compounding`? | `boolean` | - | + +## Returns + +`object` + +- return if deposit data is valid. + +| Name | Type | Defined in | +| ------ | ------ | ------ | +| `isValidDepositData` | `boolean` | [verification/common.ts:368](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/verification/common.ts#L368) | +| `depositDataMsg` | `Uint8Array` | [verification/common.ts:368](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/verification/common.ts#L368) | diff --git a/sdk/index.md b/sdk/index.md index 4bb6af8..180f10b 100644 --- a/sdk/index.md +++ b/sdk/index.md @@ -3,7 +3,7 @@ hide_title: true --- - SDK Version: v2.1.0 + SDK Version: v2.7.0 ![Obol Logo](https://obol.org/obolnetwork.png) @@ -14,7 +14,7 @@ This repo contains the Obol Software Development Kit, for creating Distributed V ## Getting Started -Checkout our [docs](https://docs.obol.org/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. +Checkout our [docs](https://docs.obol.org/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.org/terms.pdf) by calling acceptObolLatestTermsAndConditions. @@ -25,6 +25,10 @@ If you're integrating this SDK with a **backend** (e.g., in Node.js), and you st - The private key is securely stored (e.g., in an `.env` file). - Never commit or push your `.env` file containing the private key to version control. +## ⚡️ Integration with Safe Wallet + +When integrating the Obol SDK with a **Safe Wallet**, you can either pass an RPC URL OR provide the `RPC_MAINNET` or `RPC_HOLESKY` or `RPC_GNOSIS` or `RPC_SEPOLIA` environment variable, pointing to the correct network's RPC URL. This is required to interact with Safe kit. + ## Contributing Please review the following guidelines: @@ -62,12 +66,23 @@ Thank you for contributing to Obol-SDK! ## Classes +- [Exit](classes/Exit.md) +- [Incentives](classes/Incentives.md) - [Client](classes/Client.md) ## Interfaces - [ClusterDefinition](interfaces/ClusterDefinition.md) - [RewardsSplitPayload](interfaces/RewardsSplitPayload.md) +- [ExitOperator](interfaces/ExitOperator.md) +- [ExitClusterDefinition](interfaces/ExitClusterDefinition.md) +- [ExitDistributedValidator](interfaces/ExitDistributedValidator.md) +- [ExitClusterConfig](interfaces/ExitClusterConfig.md) +- [ExitValidationMessage](interfaces/ExitValidationMessage.md) +- [SignedExitValidationMessage](interfaces/SignedExitValidationMessage.md) +- [ExitValidationBlob](interfaces/ExitValidationBlob.md) +- [ExitValidationPayload](interfaces/ExitValidationPayload.md) +- [ExistingExitValidationBlobData](interfaces/ExistingExitValidationBlobData.md) ## Type Aliases @@ -78,13 +93,27 @@ Thank you for contributing to Obol-SDK! - [ClusterPayload](type-aliases/ClusterPayload.md) - [SplitRecipient](type-aliases/SplitRecipient.md) - [TotalSplitPayload](type-aliases/TotalSplitPayload.md) +- [OWRTranches](type-aliases/OWRTranches.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) +- [ClaimableIncentives](type-aliases/ClaimableIncentives.md) - [ETH\_ADDRESS](type-aliases/ETH_ADDRESS.md) +- [ProviderType](type-aliases/ProviderType.md) +- [SafeRpcUrl](type-aliases/SafeRpcUrl.md) +- [SignerType](type-aliases/SignerType.md) +- [ClaimIncentivesResponse](type-aliases/ClaimIncentivesResponse.md) +- [HttpRequestFunc](type-aliases/HttpRequestFunc.md) + +## Variables + +- [CAPELLA\_FORK\_MAPPING](variables/CAPELLA_FORK_MAPPING.md) ## Functions - [validateClusterLock](functions/validateClusterLock.md) +- [clusterConfigOrDefinitionHash](functions/clusterConfigOrDefinitionHash.md) +- [clusterLockHash](functions/clusterLockHash.md) +- [verifyDepositData](functions/verifyDepositData.md) diff --git a/sdk/interfaces/ClusterDefinition.md b/sdk/interfaces/ClusterDefinition.md index 23ea4a2..e0b5159 100644 --- a/sdk/interfaces/ClusterDefinition.md +++ b/sdk/interfaces/ClusterDefinition.md @@ -1,3 +1,11 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ClusterDefinition + +Defined in: [types.ts:122](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L122) + Cluster definition data needed for dkg ## Extends @@ -6,19 +14,22 @@ Cluster definition data needed for dkg ## Properties -| Property | Type | Description | Inherited from | Defined in | -| ------ | ------ | ------ | ------ | ------ | -| `name` | `string` | The cluster name. | `ClusterPayload.name` | types.ts:73 | -| `operators` | [`ClusterOperator`](../type-aliases/ClusterOperator.md)[] | The cluster nodes operators addresses. | `ClusterPayload.operators` | types.ts:76 | -| `validators` | [`ClusterValidator`](../type-aliases/ClusterValidator.md)[] | The cluster validators information. | `ClusterPayload.validators` | types.ts:79 | -| `deposit_amounts?` | `null` \| `string`[] | The cluster partial deposits in gwei or 32000000000. | `ClusterPayload.deposit_amounts` | types.ts:82 | -| `creator` | [`ClusterCreator`](../type-aliases/ClusterCreator.md) | The creator of the cluster. | - | types.ts:90 | -| `version` | `string` | The cluster configuration version. | - | types.ts:93 | -| `dkg_algorithm` | `string` | The cluster dkg algorithm. | - | types.ts:96 | -| `fork_version` | `string` | The cluster fork version. | - | types.ts:99 | -| `uuid` | `string` | The cluster uuid. | - | types.ts:102 | -| `timestamp` | `string` | The cluster creation timestamp. | - | types.ts:105 | -| `config_hash` | `string` | The cluster configuration hash. | - | types.ts:108 | -| `threshold` | `number` | The distributed validator threshold. | - | types.ts:111 | -| `num_validators` | `number` | The number of distributed validators in the cluster. | - | types.ts:114 | -| `definition_hash?` | `string` | The hash of the cluster definition. | - | types.ts:117 | +| Property | Type | Description | Overrides | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `name` | `string` | The cluster name. | - | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`name`](../type-aliases/ClusterPayload.md#name) | [types.ts:98](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L98) | +| `operators` | [`ClusterOperator`](../type-aliases/ClusterOperator.md)[] | The cluster nodes operators addresses. | - | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`operators`](../type-aliases/ClusterPayload.md#operators) | [types.ts:101](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L101) | +| `validators` | [`ClusterValidator`](../type-aliases/ClusterValidator.md)[] | The cluster validators information. | - | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`validators`](../type-aliases/ClusterPayload.md#validators) | [types.ts:104](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L104) | +| `deposit_amounts?` | `null` \| `string`[] | The cluster partial deposits in gwei or 32000000000. | - | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`deposit_amounts`](../type-aliases/ClusterPayload.md#deposit_amounts) | [types.ts:107](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L107) | +| `creator` | [`ClusterCreator`](../type-aliases/ClusterCreator.md) | The creator of the cluster. | - | - | [types.ts:124](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L124) | +| `version` | `string` | The cluster configuration version. | - | - | [types.ts:127](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L127) | +| `dkg_algorithm` | `string` | The cluster dkg algorithm. | - | - | [types.ts:130](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L130) | +| `fork_version` | `string` | The cluster fork version. | - | - | [types.ts:133](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L133) | +| `uuid` | `string` | The cluster uuid. | - | - | [types.ts:136](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L136) | +| `timestamp` | `string` | The cluster creation timestamp. | - | - | [types.ts:139](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L139) | +| `config_hash` | `string` | The cluster configuration hash. | - | - | [types.ts:142](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L142) | +| `threshold` | `number` | The distributed validator threshold. | - | - | [types.ts:145](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L145) | +| `num_validators` | `number` | The number of distributed validators in the cluster. | - | - | [types.ts:148](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L148) | +| `definition_hash?` | `string` | The hash of the cluster definition. | - | - | [types.ts:151](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L151) | +| `consensus_protocol?` | `string` | The consensus protocol e.g qbft. | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`consensus_protocol`](../type-aliases/ClusterPayload.md#consensus_protocol) | - | [types.ts:154](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L154) | +| `target_gas_limit?` | `number` | The target gas limit where default is 36M. | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`target_gas_limit`](../type-aliases/ClusterPayload.md#target_gas_limit) | - | [types.ts:157](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L157) | +| `compounding?` | `boolean` | A withdrawal mechanism with 0x02 withdrawal credentials. | [`ClusterPayload`](../type-aliases/ClusterPayload.md).[`compounding`](../type-aliases/ClusterPayload.md#compounding) | - | [types.ts:160](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L160) | diff --git a/sdk/interfaces/ExistingExitValidationBlobData.md b/sdk/interfaces/ExistingExitValidationBlobData.md new file mode 100644 index 0000000..fca6073 --- /dev/null +++ b/sdk/interfaces/ExistingExitValidationBlobData.md @@ -0,0 +1,18 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExistingExitValidationBlobData + +Defined in: [types.ts:450](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L450) + +Represents the data structure for an already existing exit blob for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `public_key` | `string` | The BLS public key of the validator in hex format | [types.ts:454](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L454) | +| `epoch` | `string` | The epoch number when the exit is scheduled to occur | [types.ts:458](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L458) | +| `validator_index` | `string` | The unique index of the validator in the beacon chain | [types.ts:462](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L462) | +| `shares_exit_data` | `Record`\<`string`, \{ `partial_exit_signature`: `string`; \}\>[] | Array of distributed validator shares exit data, where each share contains the partial exit signature from each operator in the cluster | [types.ts:467](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L467) | diff --git a/sdk/interfaces/ExitClusterConfig.md b/sdk/interfaces/ExitClusterConfig.md new file mode 100644 index 0000000..886096b --- /dev/null +++ b/sdk/interfaces/ExitClusterConfig.md @@ -0,0 +1,16 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitClusterConfig + +Defined in: [types.ts:392](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L392) + +Combined cluster information needed for exit validation in the SDK. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `definition` | [`ExitClusterDefinition`](ExitClusterDefinition.md) | The cluster definition with operators, fork version and threshold. | [types.ts:394](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L394) | +| `distributed_validators` | [`ExitDistributedValidator`](ExitDistributedValidator.md)[] | The cluster distributed validators. | [types.ts:397](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L397) | diff --git a/sdk/interfaces/ExitClusterDefinition.md b/sdk/interfaces/ExitClusterDefinition.md new file mode 100644 index 0000000..5287e6c --- /dev/null +++ b/sdk/interfaces/ExitClusterDefinition.md @@ -0,0 +1,17 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitClusterDefinition + +Defined in: [types.ts:367](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L367) + +Represents the core definition of a cluster relevant for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `operators` | [`ExitOperator`](ExitOperator.md)[] | The cluster nodes operators with their ENRs. | [types.ts:369](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L369) | +| `fork_version` | `string` | The cluster fork version. | [types.ts:372](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L372) | +| `threshold` | `number` | The distributed validator threshold. | [types.ts:375](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L375) | diff --git a/sdk/interfaces/ExitDistributedValidator.md b/sdk/interfaces/ExitDistributedValidator.md new file mode 100644 index 0000000..314e91f --- /dev/null +++ b/sdk/interfaces/ExitDistributedValidator.md @@ -0,0 +1,16 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitDistributedValidator + +Defined in: [types.ts:381](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L381) + +Represents a distributed validator's information relevant for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `distributed_public_key` | `string` | The public key of the distributed validator. | [types.ts:383](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L383) | +| `public_shares` | `string`[] | The public key shares of the distributed validator. | [types.ts:386](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L386) | diff --git a/sdk/interfaces/ExitOperator.md b/sdk/interfaces/ExitOperator.md new file mode 100644 index 0000000..653d722 --- /dev/null +++ b/sdk/interfaces/ExitOperator.md @@ -0,0 +1,15 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitOperator + +Defined in: [types.ts:359](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L359) + +Represents the structure of an Ethereum operator for exit validation, primarily their ENR. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `enr` | `string` | The operator's Ethereum Node Record (ENR). | [types.ts:361](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L361) | diff --git a/sdk/interfaces/ExitValidationBlob.md b/sdk/interfaces/ExitValidationBlob.md new file mode 100644 index 0000000..5846ca0 --- /dev/null +++ b/sdk/interfaces/ExitValidationBlob.md @@ -0,0 +1,16 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitValidationBlob + +Defined in: [types.ts:425](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L425) + +Represents a single partial exit blob for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `public_key` | `string` | The public key of the validator to exit. | [types.ts:427](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L427) | +| `signed_exit_message` | [`SignedExitValidationMessage`](SignedExitValidationMessage.md) | The signed exit message for the validator. | [types.ts:430](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L430) | diff --git a/sdk/interfaces/ExitValidationMessage.md b/sdk/interfaces/ExitValidationMessage.md new file mode 100644 index 0000000..5956154 --- /dev/null +++ b/sdk/interfaces/ExitValidationMessage.md @@ -0,0 +1,16 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitValidationMessage + +Defined in: [types.ts:403](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L403) + +Represents the message part of a signed exit for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `epoch` | `string` | The epoch at which the validator wishes to exit. | [types.ts:405](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L405) | +| `validator_index` | `string` | The index of the validator in the beacon chain. | [types.ts:408](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L408) | diff --git a/sdk/interfaces/ExitValidationPayload.md b/sdk/interfaces/ExitValidationPayload.md new file mode 100644 index 0000000..08d3960 --- /dev/null +++ b/sdk/interfaces/ExitValidationPayload.md @@ -0,0 +1,17 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ExitValidationPayload + +Defined in: [types.ts:436](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L436) + +Represents the overall exit payload structure for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `partial_exits` | [`ExitValidationBlob`](ExitValidationBlob.md)[] | Array of partial exits for validators. | [types.ts:438](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L438) | +| `share_idx` | `number` | Operator's share index (1-based). | [types.ts:441](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L441) | +| `signature` | `string` | Signature of the ExitValidationPayload by the operator. | [types.ts:444](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L444) | diff --git a/sdk/interfaces/README.md b/sdk/interfaces/README.md deleted file mode 100644 index 9510945..0000000 --- a/sdk/interfaces/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# interfaces - diff --git a/sdk/interfaces/RewardsSplitPayload.md b/sdk/interfaces/RewardsSplitPayload.md index 532f557..758a6ca 100644 --- a/sdk/interfaces/RewardsSplitPayload.md +++ b/sdk/interfaces/RewardsSplitPayload.md @@ -1,19 +1,25 @@ -# RewardsSplitPayload +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / RewardsSplitPayload + +Defined in: [types.ts:194](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L194) OWR and Split Proxy Params -### Extends +## Extends -* [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md) +- [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md) -### Properties +## Properties -| Property | Type | Description | Inherited from | Defined in | -| -------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ------------ | -| `splitRecipients` | [`SplitRecipient`](../type-aliases/SplitRecipient.md)\[] | The split recipients addresses and splits. | `TotalSplitPayload.splitRecipients` | types.ts:136 | -| `ObolRAFSplit?` | `number` | Split percentageNumber allocated for Obol protocol development fee, minimum is 1%. | `TotalSplitPayload.ObolRAFSplit` | types.ts:139 | -| `distributorFee?` | `number` | The percentageNumber of accrued rewards that is paid to the caller of the distribution function to compensate them for the gas costs of doing so. Cannot be greater than 10%. For example, 5 represents 5%. | `TotalSplitPayload.distributorFee` | types.ts:142 | -| `controllerAddress?` | `string` | Address that can mutate the split, should be ZeroAddress for immutable split. | `TotalSplitPayload.controllerAddress` | types.ts:145 | -| `principalRecipient` | `string` | Address that will reclaim validator principal after exit. | - | types.ts:153 | -| `etherAmount` | `number` | Amount needed to deploy all validators expected for the OWR/Splitter configuration. | - | types.ts:156 | -| `recoveryAddress?` | `string` | Address that can control where the owr erc-20 tokens can be pushed, if set to zero it goes to splitter or principal address. | - | types.ts:159 | +| Property | Type | Description | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| `splitRecipients` | [`SplitRecipient`](../type-aliases/SplitRecipient.md)[] | The split recipients addresses and splits. | [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md).[`splitRecipients`](../type-aliases/TotalSplitPayload.md#splitrecipients) | [types.ts:179](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L179) | +| `ObolRAFSplit?` | `number` | Split percentageNumber allocated for obol retroactive funding, minimum is 1%. | [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md).[`ObolRAFSplit`](../type-aliases/TotalSplitPayload.md#obolrafsplit) | [types.ts:182](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L182) | +| `distributorFee?` | `number` | The percentageNumber of accrued rewards that is paid to the caller of the distribution function to compensate them for the gas costs of doing so. Cannot be greater than 10%. For example, 5 represents 5%. | [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md).[`distributorFee`](../type-aliases/TotalSplitPayload.md#distributorfee) | [types.ts:185](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L185) | +| `controllerAddress?` | `string` | Address that can mutate the split, should be ZeroAddress for immutable split. | [`TotalSplitPayload`](../type-aliases/TotalSplitPayload.md).[`controllerAddress`](../type-aliases/TotalSplitPayload.md#controlleraddress) | [types.ts:188](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L188) | +| `principalRecipient` | `string` | Address that will reclaim validator principal after exit. | - | [types.ts:196](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L196) | +| `etherAmount` | `number` | Amount needed to deploy all validators expected for the OWR/Splitter configuration. | - | [types.ts:199](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L199) | +| `recoveryAddress?` | `string` | Address that can control where the owr erc-20 tokens can be pushed, if set to zero it goes to splitter or principal address. | - | [types.ts:202](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L202) | diff --git a/sdk/interfaces/SignedExitValidationMessage.md b/sdk/interfaces/SignedExitValidationMessage.md new file mode 100644 index 0000000..4d67238 --- /dev/null +++ b/sdk/interfaces/SignedExitValidationMessage.md @@ -0,0 +1,16 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / SignedExitValidationMessage + +Defined in: [types.ts:414](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L414) + +Represents a signed exit message for exit validation. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `message` | [`ExitValidationMessage`](ExitValidationMessage.md) | The exit message containing epoch and validator index. | [types.ts:416](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L416) | +| `signature` | `string` | BLS signature of the exit message. | [types.ts:419](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L419) | diff --git a/sdk/type-aliases/BuilderRegistration.md b/sdk/type-aliases/BuilderRegistration.md index 19d4dad..f14b063 100644 --- a/sdk/type-aliases/BuilderRegistration.md +++ b/sdk/type-aliases/BuilderRegistration.md @@ -1,14 +1,18 @@ -> **BuilderRegistration**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Pre-generated Signed Validator Builder Registration +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / BuilderRegistration -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `message` | [`BuilderRegistrationMessage`](BuilderRegistrationMessage.md) | Builder registration message. | types.ts:184 | -| `signature` | `string` | BLS signature of the builder registration message. | types.ts:187 | +> **BuilderRegistration** = `object` + +Defined in: [types.ts:239](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L239) -## Defined in +Pre-generated Signed Validator Builder Registration + +## Properties -types.ts:182 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `message` | [`BuilderRegistrationMessage`](BuilderRegistrationMessage.md) | Builder registration message. | [types.ts:241](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L241) | +| `signature` | `string` | BLS signature of the builder registration message. | [types.ts:244](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L244) | diff --git a/sdk/type-aliases/BuilderRegistrationMessage.md b/sdk/type-aliases/BuilderRegistrationMessage.md index 0c21d2c..61af2ad 100644 --- a/sdk/type-aliases/BuilderRegistrationMessage.md +++ b/sdk/type-aliases/BuilderRegistrationMessage.md @@ -1,16 +1,20 @@ -> **BuilderRegistrationMessage**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Unsigned DV Builder Registration Message +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / BuilderRegistrationMessage -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `fee_recipient` | `string` | The DV fee recipient. | types.ts:167 | -| `gas_limit` | `number` | Default is 30000000. | types.ts:170 | -| `timestamp` | `number` | Timestamp when generating cluster lock file. | types.ts:173 | -| `pubkey` | `string` | The public key of the DV. | types.ts:176 | +> **BuilderRegistrationMessage** = `object` + +Defined in: [types.ts:222](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L222) -## Defined in +Unsigned DV Builder Registration Message + +## Properties -types.ts:165 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `fee_recipient` | `string` | The DV fee recipient. | [types.ts:224](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L224) | +| `gas_limit` | `number` | Default is 30000000. | [types.ts:227](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L227) | +| `timestamp` | `number` | Timestamp when generating cluster lock file. | [types.ts:230](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L230) | +| `pubkey` | `string` | The public key of the DV. | [types.ts:233](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L233) | diff --git a/sdk/type-aliases/ClaimIncentivesResponse.md b/sdk/type-aliases/ClaimIncentivesResponse.md new file mode 100644 index 0000000..0fd8f4a --- /dev/null +++ b/sdk/type-aliases/ClaimIncentivesResponse.md @@ -0,0 +1,11 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ClaimIncentivesResponse + +> **ClaimIncentivesResponse** = `object` + +Defined in: [types.ts:354](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L354) + +claimIncentives Response diff --git a/sdk/type-aliases/ClaimableIncentives.md b/sdk/type-aliases/ClaimableIncentives.md new file mode 100644 index 0000000..63fa737 --- /dev/null +++ b/sdk/type-aliases/ClaimableIncentives.md @@ -0,0 +1,21 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ClaimableIncentives + +> **ClaimableIncentives** = `object` + +Defined in: [types.ts:310](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L310) + +Claimable Obol Incentives + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `operator_address` | `string` | Operator Address. | [types.ts:312](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L312) | +| `amount` | `string` | The amount the recipient is entitled to. | [types.ts:315](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L315) | +| `index` | `number` | The recipient's index in the Merkle tree. | [types.ts:318](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L318) | +| `merkle_proof` | `string`[] | The Merkle proof (an array of hashes) generated for the recipient. | [types.ts:321](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L321) | +| `contract_address` | `string` | The MerkleDistributor contract address. | [types.ts:324](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L324) | diff --git a/sdk/type-aliases/ClusterCreator.md b/sdk/type-aliases/ClusterCreator.md index 7ac2619..96908d2 100644 --- a/sdk/type-aliases/ClusterCreator.md +++ b/sdk/type-aliases/ClusterCreator.md @@ -1,14 +1,18 @@ -> **ClusterCreator**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Cluster creator data +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / ClusterCreator -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `address` | `string` | The creator address. | types.ts:52 | -| `config_signature`? | `string` | The cluster configuration signature. | types.ts:54 | +> **ClusterCreator** = `object` + +Defined in: [types.ts:75](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L75) -## Defined in +Cluster creator data + +## Properties -types.ts:50 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `address` | `string` | The creator address. | [types.ts:77](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L77) | +| `config_signature?` | `string` | The cluster configuration signature. | [types.ts:79](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L79) | diff --git a/sdk/type-aliases/ClusterLock.md b/sdk/type-aliases/ClusterLock.md index ac50cb9..dbf4026 100644 --- a/sdk/type-aliases/ClusterLock.md +++ b/sdk/type-aliases/ClusterLock.md @@ -1,17 +1,21 @@ -> **ClusterLock**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Cluster Details after DKG is complete +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / ClusterLock -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `cluster_definition` | [`ClusterDefinition`](../interfaces/ClusterDefinition.md) | The cluster definition. | types.ts:235 | -| `distributed_validators` | [`DistributedValidator`](DistributedValidator.md)[] | The cluster distributed validators. | types.ts:238 | -| `signature_aggregate` | `string` | The cluster bls signature aggregate. | types.ts:241 | -| `lock_hash` | `string` | The hash of the cluster lock. | types.ts:244 | -| `node_signatures`? | `string`[] | Node Signature for the lock hash by the node secp256k1 key. | types.ts:247 | +> **ClusterLock** = `object` + +Defined in: [types.ts:290](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L290) -## Defined in +Cluster Details after DKG is complete + +## Properties -types.ts:233 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `cluster_definition` | [`ClusterDefinition`](../interfaces/ClusterDefinition.md) | The cluster definition. | [types.ts:292](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L292) | +| `distributed_validators` | [`DistributedValidator`](DistributedValidator.md)[] | The cluster distributed validators. | [types.ts:295](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L295) | +| `signature_aggregate` | `string` | The cluster bls signature aggregate. | [types.ts:298](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L298) | +| `lock_hash` | `string` | The hash of the cluster lock. | [types.ts:301](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L301) | +| `node_signatures?` | `string`[] | Node Signature for the lock hash by the node secp256k1 key. | [types.ts:304](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L304) | diff --git a/sdk/type-aliases/ClusterOperator.md b/sdk/type-aliases/ClusterOperator.md index 5628815..5d2d9bc 100644 --- a/sdk/type-aliases/ClusterOperator.md +++ b/sdk/type-aliases/ClusterOperator.md @@ -1,18 +1,22 @@ -> **ClusterOperator**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Node operator data +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / ClusterOperator -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `address` | `string` | The operator address. | types.ts:23 | -| `enr`? | `string` | The operator ethereum node record. | types.ts:26 | -| `fork_version`? | `string` | The cluster fork_version. | types.ts:29 | -| `version`? | `string` | The cluster version. | types.ts:32 | -| `enr_signature`? | `string` | The operator enr signature. | types.ts:35 | -| `config_signature`? | `string` | The operator configuration signature. | types.ts:38 | +> **ClusterOperator** = `object` + +Defined in: [types.ts:46](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L46) -## Defined in +Node operator data + +## Properties -types.ts:21 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `address` | `string` | The operator address. | [types.ts:48](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L48) | +| `enr?` | `string` | The operator ethereum node record. | [types.ts:51](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L51) | +| `fork_version?` | `string` | The cluster fork_version. | [types.ts:54](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L54) | +| `version?` | `string` | The cluster version. | [types.ts:57](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L57) | +| `enr_signature?` | `string` | The operator enr signature. | [types.ts:60](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L60) | +| `config_signature?` | `string` | The operator configuration signature. | [types.ts:63](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L63) | diff --git a/sdk/type-aliases/ClusterPayload.md b/sdk/type-aliases/ClusterPayload.md index e300370..f99821a 100644 --- a/sdk/type-aliases/ClusterPayload.md +++ b/sdk/type-aliases/ClusterPayload.md @@ -1,16 +1,27 @@ -> **ClusterPayload**: `object` +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ClusterPayload + +> **ClusterPayload** = `object` + +Defined in: [types.ts:96](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L96) Cluster configuration -## Type declaration +## Extended by -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `name` | `string` | The cluster name. | types.ts:73 | -| `operators` | [`ClusterOperator`](ClusterOperator.md)[] | The cluster nodes operators addresses. | types.ts:76 | -| `validators` | [`ClusterValidator`](ClusterValidator.md)[] | The cluster validators information. | types.ts:79 | -| `deposit_amounts`? | `string`[] \| `null` | The cluster partial deposits in gwei or 32000000000. | types.ts:82 | +- [`ClusterDefinition`](../interfaces/ClusterDefinition.md) -## Defined in +## Properties -types.ts:71 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `name` | `string` | The cluster name. | [types.ts:98](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L98) | +| `operators` | [`ClusterOperator`](ClusterOperator.md)[] | The cluster nodes operators addresses. | [types.ts:101](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L101) | +| `validators` | [`ClusterValidator`](ClusterValidator.md)[] | The cluster validators information. | [types.ts:104](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L104) | +| `deposit_amounts?` | `string`[] \| `null` | The cluster partial deposits in gwei or 32000000000. | [types.ts:107](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L107) | +| `compounding?` | `boolean` | A withdrawal mechanism with 0x02 withdrawal credentials. | [types.ts:110](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L110) | +| `target_gas_limit?` | `number` | The target gas limit where default is 36M. | [types.ts:113](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L113) | +| `consensus_protocol?` | `string` | The consensus protocol e.g qbft. | [types.ts:116](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L116) | diff --git a/sdk/type-aliases/ClusterValidator.md b/sdk/type-aliases/ClusterValidator.md index 852f4ad..4bbc8a1 100644 --- a/sdk/type-aliases/ClusterValidator.md +++ b/sdk/type-aliases/ClusterValidator.md @@ -1,14 +1,18 @@ -> **ClusterValidator**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Validator withdrawal configuration +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / ClusterValidator -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `fee_recipient_address` | `string` | Address to receive MEV rewards (if enabled), block proposal and priority fees. | types.ts:62 | -| `withdrawal_address` | `string` | Address to receive skimming rewards and validator principal at exit. | types.ts:65 | +> **ClusterValidator** = `object` + +Defined in: [types.ts:85](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L85) -## Defined in +Validator withdrawal configuration + +## Properties -types.ts:60 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `fee_recipient_address` | `string` | Address to receive MEV rewards (if enabled), block proposal and priority fees. | [types.ts:87](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L87) | +| `withdrawal_address` | `string` | Address to receive skimming rewards and validator principal at exit. | [types.ts:90](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L90) | diff --git a/sdk/type-aliases/DepositData.md b/sdk/type-aliases/DepositData.md index 7659bf7..320c233 100644 --- a/sdk/type-aliases/DepositData.md +++ b/sdk/type-aliases/DepositData.md @@ -1,17 +1,21 @@ -> **DepositData**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Required deposit data for validator activation +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / DepositData -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `pubkey` | `string` | The public key of the distributed validator. | types.ts:195 | -| `withdrawal_credentials` | `string` | The 0x01 withdrawal address of the DV. | types.ts:198 | -| `amount` | `string` | 32 ethers. | types.ts:201 | -| `deposit_data_root` | `string` | A checksum for DepositData fields . | types.ts:204 | -| `signature` | `string` | BLS signature of the deposit message. | types.ts:207 | +> **DepositData** = `object` + +Defined in: [types.ts:250](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L250) -## Defined in +Required deposit data for validator activation + +## Properties -types.ts:193 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `pubkey` | `string` | The public key of the distributed validator. | [types.ts:252](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L252) | +| `withdrawal_credentials` | `string` | The 0x01 withdrawal address of the DV. | [types.ts:255](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L255) | +| `amount` | `string` | 32 ethers. | [types.ts:258](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L258) | +| `deposit_data_root` | `string` | A checksum for DepositData fields . | [types.ts:261](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L261) | +| `signature` | `string` | BLS signature of the deposit message. | [types.ts:264](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L264) | diff --git a/sdk/type-aliases/DistributedValidator.md b/sdk/type-aliases/DistributedValidator.md index a440fe6..c6868b9 100644 --- a/sdk/type-aliases/DistributedValidator.md +++ b/sdk/type-aliases/DistributedValidator.md @@ -1,17 +1,21 @@ -> **DistributedValidator**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Required deposit data for validator activation +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / DistributedValidator -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `distributed_public_key` | `string` | The public key of the distributed validator. | types.ts:215 | -| `public_shares` | `string`[] | The public key of the node distributed validator share. | types.ts:218 | -| `deposit_data`? | `Partial`\<[`DepositData`](DepositData.md)\> | The deposit data for activating the DV. | types.ts:221 | -| `partial_deposit_data`? | `Partial`\<[`DepositData`](DepositData.md)\>[] | The deposit data with partial amounts or full amount for activating the DV. | types.ts:224 | -| `builder_registration`? | [`BuilderRegistration`](BuilderRegistration.md) | pre-generated signed validator builder registration to be sent to builder network. | types.ts:227 | +> **DistributedValidator** = `object` + +Defined in: [types.ts:270](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L270) -## Defined in +Required deposit data for validator activation + +## Properties -types.ts:213 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `distributed_public_key` | `string` | The public key of the distributed validator. | [types.ts:272](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L272) | +| `public_shares` | `string`[] | The public key of the node distributed validator share. | [types.ts:275](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L275) | +| `deposit_data?` | `Partial`\<[`DepositData`](DepositData.md)\> | The deposit data for activating the DV. | [types.ts:278](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L278) | +| `partial_deposit_data?` | `Partial`\<[`DepositData`](DepositData.md)\>[] | The deposit data with partial amounts or full amount for activating the DV. | [types.ts:281](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L281) | +| `builder_registration?` | [`BuilderRegistration`](BuilderRegistration.md) | pre-generated signed validator builder registration to be sent to builder network. | [types.ts:284](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L284) | diff --git a/sdk/type-aliases/ETH_ADDRESS.md b/sdk/type-aliases/ETH_ADDRESS.md index 1d2ebd7..c0a356a 100644 --- a/sdk/type-aliases/ETH_ADDRESS.md +++ b/sdk/type-aliases/ETH_ADDRESS.md @@ -1,7 +1,11 @@ -> **ETH\_ADDRESS**: `string` +[**@obolnetwork/obol-sdk**](../index.md) -String expected to be Ethereum Address +*** + +[@obolnetwork/obol-sdk](../index.md) / ETH\_ADDRESS -## Defined in +> **ETH\_ADDRESS** = `string` -types.ts:253 +Defined in: [types.ts:330](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L330) + +String expected to be Ethereum Address diff --git a/sdk/type-aliases/HttpRequestFunc.md b/sdk/type-aliases/HttpRequestFunc.md new file mode 100644 index 0000000..f4948b9 --- /dev/null +++ b/sdk/type-aliases/HttpRequestFunc.md @@ -0,0 +1,27 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / HttpRequestFunc + +> **HttpRequestFunc** = (`url`, `config`?) => `Promise`\<`any`\> + +Defined in: [types.ts:507](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L507) + +Generic HTTP request function type. +Args: + url: string - The URL to request. + config?: Record - Optional request configuration (e.g., method, headers, body for POST). +Returns: + Promise - The response data. + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `url` | `string` | +| `config`? | `Record`\<`string`, `any`\> | + +## Returns + +`Promise`\<`any`\> diff --git a/sdk/type-aliases/OWRTranches.md b/sdk/type-aliases/OWRTranches.md new file mode 100644 index 0000000..f5b3a13 --- /dev/null +++ b/sdk/type-aliases/OWRTranches.md @@ -0,0 +1,19 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / OWRTranches + +> **OWRTranches** = `object` + +Defined in: [types.ts:208](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L208) + +OWR Tranches + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `principalRecipient` | [`ETH_ADDRESS`](ETH_ADDRESS.md) | Address that will reclaim validator principal after exit. | [types.ts:210](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L210) | +| `rewardRecipient` | [`ETH_ADDRESS`](ETH_ADDRESS.md) | Address that will reclaim validator rewards during operation. | [types.ts:213](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L213) | +| `amountOfPrincipalStake` | `number` | Amount of principal staked. | [types.ts:216](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L216) | diff --git a/sdk/type-aliases/OperatorPayload.md b/sdk/type-aliases/OperatorPayload.md index fed8c30..a87f686 100644 --- a/sdk/type-aliases/OperatorPayload.md +++ b/sdk/type-aliases/OperatorPayload.md @@ -1,7 +1,11 @@ -> **OperatorPayload**: `Partial`\<[`ClusterOperator`](ClusterOperator.md)\> & `Required`\<`Pick`\<[`ClusterOperator`](ClusterOperator.md), `"enr"` \| `"version"`\>\> +[**@obolnetwork/obol-sdk**](../index.md) -A partial view of `ClusterOperator` with `enr` and `version` as required properties. +*** + +[@obolnetwork/obol-sdk](../index.md) / OperatorPayload -## Defined in +> **OperatorPayload** = `Partial`\<[`ClusterOperator`](ClusterOperator.md)\> & `Required`\<`Pick`\<[`ClusterOperator`](ClusterOperator.md), `"enr"` \| `"version"`\>\> -types.ts:44 +Defined in: [types.ts:69](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L69) + +A partial view of `ClusterOperator` with `enr` and `version` as required properties. diff --git a/sdk/type-aliases/ProviderType.md b/sdk/type-aliases/ProviderType.md new file mode 100644 index 0000000..0f66157 --- /dev/null +++ b/sdk/type-aliases/ProviderType.md @@ -0,0 +1,11 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / ProviderType + +> **ProviderType** = `Provider` \| `JsonRpcProvider` \| `JsonRpcApiProvider` \| `ethers.BrowserProvider` + +Defined in: [types.ts:335](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L335) + +Provider Types diff --git a/sdk/type-aliases/README.md b/sdk/type-aliases/README.md deleted file mode 100644 index ef07201..0000000 --- a/sdk/type-aliases/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# type-aliases - diff --git a/sdk/type-aliases/SafeRpcUrl.md b/sdk/type-aliases/SafeRpcUrl.md new file mode 100644 index 0000000..6888e07 --- /dev/null +++ b/sdk/type-aliases/SafeRpcUrl.md @@ -0,0 +1,11 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / SafeRpcUrl + +> **SafeRpcUrl** = `string` + +Defined in: [types.ts:344](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L344) + +Safe Wallet Provider Types diff --git a/sdk/type-aliases/SignerType.md b/sdk/type-aliases/SignerType.md new file mode 100644 index 0000000..05d1ccc --- /dev/null +++ b/sdk/type-aliases/SignerType.md @@ -0,0 +1,11 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / SignerType + +> **SignerType** = `Signer` \| `JsonRpcSigner` \| `Wallet` + +Defined in: [types.ts:349](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L349) + +Signer Types diff --git a/sdk/type-aliases/SplitRecipient.md b/sdk/type-aliases/SplitRecipient.md index 2fd6d43..eb4434c 100644 --- a/sdk/type-aliases/SplitRecipient.md +++ b/sdk/type-aliases/SplitRecipient.md @@ -1,14 +1,18 @@ -> **SplitRecipient**: `object` +[**@obolnetwork/obol-sdk**](../index.md) -Split Recipient Keys +*** -## Type declaration +[@obolnetwork/obol-sdk](../index.md) / SplitRecipient -| Name | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `account` | `string` | The split recipient address. | types.ts:125 | -| `percentAllocation` | `number` | The recipient split. | types.ts:128 | +> **SplitRecipient** = `object` + +Defined in: [types.ts:166](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L166) -## Defined in +Split Recipient Keys + +## Properties -types.ts:123 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `account` | `string` | The split recipient address. | [types.ts:168](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L168) | +| `percentAllocation` | `number` | The recipient split. | [types.ts:171](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L171) | diff --git a/sdk/type-aliases/TotalSplitPayload.md b/sdk/type-aliases/TotalSplitPayload.md index 4704f93..8a99db1 100644 --- a/sdk/type-aliases/TotalSplitPayload.md +++ b/sdk/type-aliases/TotalSplitPayload.md @@ -1,18 +1,24 @@ -# TotalSplitPayload +[**@obolnetwork/obol-sdk**](../index.md) -> **TotalSplitPayload**: `object` +*** + +[@obolnetwork/obol-sdk](../index.md) / TotalSplitPayload + +> **TotalSplitPayload** = `object` + +Defined in: [types.ts:177](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L177) Split Proxy Params -### Type declaration +## Extended by -| Name | Type | Description | Defined in | -| -------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| `splitRecipients` | [`SplitRecipient`](SplitRecipient.md)\[] | The split recipients addresses and splits. | types.ts:136 | -| `ObolRAFSplit`? | `number` | Split percentageNumber allocated for Obol protocol development fee, minimum is 1%. | types.ts:139 | -| `distributorFee`? | `number` | The percentageNumber of accrued rewards that is paid to the caller of the distribution function to compensate them for the gas costs of doing so. Cannot be greater than 10%. For example, 5 represents 5%. | types.ts:142 | -| `controllerAddress`? | `string` | Address that can mutate the split, should be ZeroAddress for immutable split. | types.ts:145 | +- [`RewardsSplitPayload`](../interfaces/RewardsSplitPayload.md) -### Defined in +## Properties -types.ts:134 +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `splitRecipients` | [`SplitRecipient`](SplitRecipient.md)[] | The split recipients addresses and splits. | [types.ts:179](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L179) | +| `ObolRAFSplit?` | `number` | Split percentageNumber allocated for obol retroactive funding, minimum is 1%. | [types.ts:182](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L182) | +| `distributorFee?` | `number` | The percentageNumber of accrued rewards that is paid to the caller of the distribution function to compensate them for the gas costs of doing so. Cannot be greater than 10%. For example, 5 represents 5%. | [types.ts:185](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L185) | +| `controllerAddress?` | `string` | Address that can mutate the split, should be ZeroAddress for immutable split. | [types.ts:188](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/types.ts#L188) | diff --git a/sdk/variables/CAPELLA_FORK_MAPPING.md b/sdk/variables/CAPELLA_FORK_MAPPING.md new file mode 100644 index 0000000..8b48c02 --- /dev/null +++ b/sdk/variables/CAPELLA_FORK_MAPPING.md @@ -0,0 +1,12 @@ +[**@obolnetwork/obol-sdk**](../index.md) + +*** + +[@obolnetwork/obol-sdk](../index.md) / CAPELLA\_FORK\_MAPPING + +> `const` **CAPELLA\_FORK\_MAPPING**: `Record`\<`string`, `string`\> + +Defined in: [constants.ts:213](https://github.com/ObolNetwork/obol-sdk/blob/d77f4594233f658ddb52882926187420144e316d/src/constants.ts#L213) + +Maps base fork versions to their corresponding Capella fork versions. +Example: Mainnet Capella fork version.