# Intro

**SDK Version:** v2.11.8

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

## Obol SDK

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

## Getting Started

Checkout our [docs](https://docs.obol.org/next/advanced-and-troubleshooting/advanced/create-a-dv-using-the-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

## 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.

## ⚠️ Important Security Notice:

If you're integrating this SDK with a **backend** (e.g., in Node.js), and you store a private key for executing splitter transactions, handle it with extreme caution. Ensure that:

* 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` or `RPC_HOODI` environment variable, pointing to the correct network's RPC URL. This is required to interact with Safe kit.

## Contributing

Please review the following guidelines:

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

### How to Report Bugs

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

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

### How to Propose Changes

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

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

### Code Review Process

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

Thank you for contributing to Obol-SDK!

## Next.js / SSR Configuration

If using this SDK in **Next.js** or other SSR frameworks, add this minimal config to your `next.config.js`:

```javascript
webpack: (config, { isServer, webpack }) => {
  if (!isServer) {
    config.plugins.push(
      new webpack.DefinePlugin({
        'process.stdout.isTTY': 'false',
        'process.stderr.isTTY': 'false',
      })
    );
  } else {
    // Server: Externalize native dependencies
    config.externals = config.externals || [];
    config.externals.push({
      '@chainsafe/bls': 'commonjs @chainsafe/bls',
      '@chainsafe/blst': 'commonjs @chainsafe/blst',
      'bcrypto': 'commonjs bcrypto',
    });
  }
  
  // Ignore .node files
  config.plugins.push(
    new webpack.IgnorePlugin({ resourceRegExp: /\.node$/ })
  );
  
  return config;
}
```

## Enumerations

* [FORK\_MAPPING](https://docs.obol.org/next/sdk/enumerations/fork_mapping)

## Classes

* [EOA](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/classes/EOA.md)
* [Exit](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/classes/Exit.md)
* [Incentives](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/classes/Incentives.md)
* [Client](https://docs.obol.org/next/sdk/classes/client)
* [ObolSplits](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/classes/ObolSplits.md)

## Interfaces

* [ClusterDefinition](https://docs.obol.org/next/sdk/interfaces/clusterdefinition)
* [RewardsSplitPayload](https://docs.obol.org/next/sdk/interfaces/rewardssplitpayload)
* [ExitOperator](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitOperator.md)
* [ExitClusterDefinition](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitClusterDefinition.md)
* [ExitDistributedValidator](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitDistributedValidator.md)
* [ExitClusterConfig](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitClusterConfig.md)
* [ExitValidationMessage](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitValidationMessage.md)
* [SignedExitValidationMessage](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/SignedExitValidationMessage.md)
* [ExitValidationBlob](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitValidationBlob.md)
* [ExitValidationPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExitValidationPayload.md)
* [ExistingExitValidationBlobData](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/interfaces/ExistingExitValidationBlobData.md)

## Type Aliases

* [ClusterOperator](https://docs.obol.org/next/sdk/type-aliases/clusteroperator)
* [OperatorPayload](https://docs.obol.org/next/sdk/type-aliases/operatorpayload)
* [ClusterCreator](https://docs.obol.org/next/sdk/type-aliases/clustercreator)
* [ClusterValidator](https://docs.obol.org/next/sdk/type-aliases/clustervalidator)
* [ClusterPayload](https://docs.obol.org/next/sdk/type-aliases/clusterpayload)
* [SplitRecipient](https://docs.obol.org/next/sdk/type-aliases/splitrecipient)
* [TotalSplitPayload](https://docs.obol.org/next/sdk/type-aliases/totalsplitpayload)
* [OVMBaseSplitPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMBaseSplitPayload.md)
* [OVMRewardsSplitPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMRewardsSplitPayload.md)
* [OVMTotalSplitPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMTotalSplitPayload.md)
* [OVMSplitPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMSplitPayload.md)
* [SplitV2Recipient](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/SplitV2Recipient.md)
* [OWRTranches](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OWRTranches.md)
* [BuilderRegistrationMessage](https://docs.obol.org/next/sdk/type-aliases/builderregistrationmessage)
* [BuilderRegistration](https://docs.obol.org/next/sdk/type-aliases/builderregistration)
* [DepositData](https://docs.obol.org/next/sdk/type-aliases/depositdata)
* [DistributedValidator](https://docs.obol.org/next/sdk/type-aliases/distributedvalidator)
* [ClusterLock](https://docs.obol.org/next/sdk/type-aliases/clusterlock)
* [ClaimableIncentives](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/ClaimableIncentives.md)
* [ETH\_ADDRESS](https://docs.obol.org/next/sdk/type-aliases/eth_address)
* [ProviderType](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/ProviderType.md)
* [SafeRpcUrl](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/SafeRpcUrl.md)
* [SignerType](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/SignerType.md)
* [ClaimIncentivesResponse](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/ClaimIncentivesResponse.md)
* [HttpRequestFunc](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/HttpRequestFunc.md)
* [OVMArgs](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMArgs.md)
* [OVMRequestWithdrawalPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMRequestWithdrawalPayload.md)
* [EOAWithdrawalPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/EOAWithdrawalPayload.md)
* [OVMDepositPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/OVMDepositPayload.md)
* [EOADepositPayload](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/type-aliases/EOADepositPayload.md)

## Variables

* [CAPELLA\_FORK\_MAPPING](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/variables/CAPELLA_FORK_MAPPING.md)

## Functions

* [validateClusterLock](https://docs.obol.org/next/sdk/functions/validateclusterlock)
* [clusterConfigOrDefinitionHash](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/functions/clusterConfigOrDefinitionHash.md)
* [clusterLockHash](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/functions/clusterLockHash.md)
* [verifyDepositData](https://github.com/ObolNetwork/obol-gitbook/blob/main/sdk/functions/verifyDepositData.md)
