{"id":49767749,"url":"https://github.com/obolnetwork/obol-sdk","last_synced_at":"2026-05-11T11:09:55.898Z","repository":{"id":250905324,"uuid":"614910601","full_name":"ObolNetwork/obol-sdk","owner":"ObolNetwork","description":"A typescript package for interacting with the Obol Network","archived":false,"fork":false,"pushed_at":"2026-05-04T12:22:25.000Z","size":7069,"stargazers_count":0,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-04T12:30:02.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ObolNetwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-16T15:05:15.000Z","updated_at":"2026-05-04T12:22:28.000Z","dependencies_parsed_at":"2024-07-30T19:33:59.732Z","dependency_job_id":"ec3e3969-a28d-4cc8-b048-8132a1973fca","html_url":"https://github.com/ObolNetwork/obol-sdk","commit_stats":null,"previous_names":["obolnetwork/obol-sdk"],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/ObolNetwork/obol-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObolNetwork%2Fobol-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObolNetwork%2Fobol-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObolNetwork%2Fobol-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObolNetwork%2Fobol-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ObolNetwork","download_url":"https://codeload.github.com/ObolNetwork/obol-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ObolNetwork%2Fobol-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32892077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-11T11:09:54.849Z","updated_at":"2026-05-11T11:09:55.891Z","avatar_url":"https://github.com/ObolNetwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Obol Logo](https://obol.org/obolnetwork.png)\n\n\u003ch1 align=\"center\"\u003eObol SDK\u003c/h1\u003e\n\nThis repo contains the Obol Software Development Kit, for creating Distributed Validators with the help of the [Obol API](https://docs.obol.org/api).\n\n## Quick Start\n\n```typescript\nimport { Client } from \"@obolnetwork/obol-sdk\";\nimport { Wallet } from \"ethers\";\n\n// 1. Create a client (Hoodi testnet)\nconst signer = new Wallet(process.env.PRIVATE_KEY!);\nconst client = new Client({ chainId: 560048 }, signer);\n\n// 2. Accept terms and conditions (required once per address)\nawait client.acceptObolLatestTermsAndConditions();\n\n// 3. Create a cluster definition\nconst configHash = await client.createClusterDefinition({\n  name: \"my-cluster\",\n  operators: [{ address: \"0xOperator1...\" }, { address: \"0xOperator2...\" }],\n  validators: [{\n    fee_recipient_address: \"0xFeeRecipient...\",\n    withdrawal_address: \"0xWithdrawal...\",\n  }],\n});\n\n// 4. Retrieve the definition / lock (read-only, no signer needed)\nconst definition = await client.getClusterDefinition(configHash);\nconst lock = await client.getClusterLock(configHash);\n```\n\n## Getting Started\n\nCheckout our [docs](https://docs.obol.org/docs/advanced/quickstart-sdk), [examples](https://github.com/ObolNetwork/obol-sdk-examples/), and SDK [reference](https://docs.obol.org/sdk). Further guides and walkthroughs coming soon.\n\n## Terms and Conditions\nTo 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.\n\n## ⚠️ Important Security Notice:\nIf 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:\n\n- The private key is securely stored (e.g., in an `.env` file).\n- Never commit or push your `.env` file containing the private key to version control.\n\n## ⚡️ Integration with Safe Wallet\n\nWhen integrating the Obol SDK with a **Safe Wallet**, you can either pass an RPC URL OR provide the `RPC_MAINNET` 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.\n\n\n## Contributing\n\nPlease review the following guidelines:\n\n- [How to Report Bugs](#how-to-report-bugs)\n- [How to Propose Changes](#how-to-propose-changes)\n- [Code Review Process](#code-review-process)\n\n### How to Report Bugs\n\nIf you encounter a bug or unexpected behavior, please follow these steps to report it:\n\n1. Go to the \"Issues\" tab of this repository.\n2. Click on the \"Get started\" button in the Bug report section.\n3. Provide a clear title and description of the issue following the format provided.\n\n### How to Propose Changes\n\nIf you'd like to propose improvements or new features, please follow these steps:\n\n1. Fork this repository.\n2. Create a new branch for your changes.\n3. Make your changes and commit them with clear messages.\n4. Open a pull request with a detailed description of the changes.\n\n### Code Review Process\n\nAll contributions are reviewed before they are merged into the main branch. Please address any feedback provided during the review process.\n\nThank you for contributing to Obol-SDK!\n\n## For AI Agents and Code Generators\n\nIf you are an LLM, code-generation agent, or tool using this SDK programmatically, follow these guidelines to avoid common mistakes:\n\n- **Primary entrypoint:** `Client` from `@obolnetwork/obol-sdk`.\n- **Constructor:** `new Client({ chainId }, signer?, provider?)` – `chainId` defaults to `560048` (Hoodi).\n- **All operations are namespaced** under the client instance. Do **not** construct HTTP requests manually.\n\n### Client API Surface\n\n| Namespace | Method | Description |\n|-----------|--------|-------------|\n| *(root)* | `acceptObolLatestTermsAndConditions()` | Accept T\u0026C (required once before writes) |\n| *(root)* | `createClusterDefinition(payload)` | Create a new cluster → returns `config_hash` |\n| *(root)* | `acceptClusterDefinition(operatorPayload, configHash)` | Join a cluster as an operator |\n| *(root)* | `getClusterDefinition(configHash)` | Fetch cluster definition (read-only) |\n| *(root)* | `getClusterLock(configHash)` | Fetch cluster lock by config hash (read-only) |\n| *(root)* | `getClusterLockByHash(lockHash)` | Fetch cluster lock by lock hash (read-only) |\n| *(root)* | `createObolRewardsSplit(payload)` | Deploy OWR + splitter (rewards-only split) |\n| *(root)* | `createObolTotalSplit(payload)` | Deploy splitter (total split) |\n| *(root)* | `getOWRTranches(owrAddress)` | Read OWR tranche info (read-only on-chain) |\n| `client.splits` | `createValidatorManagerAndRewardsSplit(payload)` | Deploy OVM + SplitV2 (rewards-only) |\n| `client.splits` | `createValidatorManagerAndTotalSplit(payload)` | Deploy OVM + SplitV2 (total) |\n| `client.splits` | `requestWithdrawal(payload)` | Request withdrawal from OVM |\n| `client.splits` | `deposit(payload)` | Deposit to OVM contract |\n| `client.incentives` | `getIncentivesByAddress(address)` | Fetch claimable incentives (read-only) |\n| `client.incentives` | `isClaimed(contractAddress, index)` | Check if incentives claimed (read-only) |\n| `client.incentives` | `claimIncentives(address)` | Claim incentives on-chain |\n| `client.eoa` | `requestWithdrawal(payload)` | Request EOA withdrawal |\n| `client.eoa` | `deposit(payload)` | Batch deposit validators |\n| `client.exit` | `verifyPartialExitSignature(...)` | Verify BLS partial exit signature |\n| `client.exit` | `verifyExitPayloadSignature(...)` | Verify ECDSA exit payload signature |\n| `client.exit` | `validateExitBlobs(...)` | Validate exit blobs against cluster config |\n| `client.exit` | `recombineExitBlobs(...)` | Aggregate partial exit signatures |\n\n### Standalone Utilities\n\n| Export | Description |\n|--------|-------------|\n| `validateClusterLock(lock, safeRpcUrl?)` | Cryptographic verification (signatures, hashes). Does not mirror every Charon runtime check—passing here is necessary, not sufficient, for Charon. |\n\n### Key Rules\n\n1. All request/response types are exported from the package root.\n2. Error types exported: `ConflictError`, `SignerRequiredError`, `UnsupportedChainError`.\n3. Methods that **write** (create, deploy, claim) require a `signer`. Methods that **read** (get, fetch) do not.\n4. Supported chain IDs: `1` (Mainnet), `560048` (Hoodi).\n5. Splitter/OVM deployment is only supported on chains 1 and 560048.\n\n## Next.js / SSR Configuration\n\nIf using this SDK in **Next.js** or other SSR frameworks, add this minimal config to your `next.config.js`:\n\n```javascript\nwebpack: (config, { isServer, webpack }) =\u003e {\n  if (!isServer) {\n    config.plugins.push(\n      new webpack.DefinePlugin({\n        'process.stdout.isTTY': 'false',\n        'process.stderr.isTTY': 'false',\n      })\n    );\n  } else {\n    // Server: Externalize native dependencies\n    config.externals = config.externals || [];\n    config.externals.push({\n      '@chainsafe/bls': 'commonjs @chainsafe/bls',\n      'bcrypto': 'commonjs bcrypto',\n    });\n  }\n  \n  // Ignore .node files\n  config.plugins.push(\n    new webpack.IgnorePlugin({ resourceRegExp: /\\.node$/ })\n  );\n  \n  return config;\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobolnetwork%2Fobol-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobolnetwork%2Fobol-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobolnetwork%2Fobol-sdk/lists"}