{"_id":"@byzantine/operator-sdk","_rev":"7-3ab8da2ab85ed500cd3c7d09e489d65d","name":"@byzantine/operator-sdk","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@byzantine/operator-sdk","version":"1.0.0","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic"],"author":{"name":"Byzantine Finance"},"license":"MIT","_id":"@byzantine/operator-sdk@1.0.0","maintainers":[{"name":"benoitded","email":"benoitded82@hotmail.fr"}],"homepage":"https://docs.byzantine.fi","bugs":{"url":"https://github.com/byzantine-fi/operator-sdk/issues"},"dist":{"shasum":"d29b50c44efa8cbe7d55bcc87fefa653f5eacaa1","tarball":"https://registry.npmjs.org/@byzantine/operator-sdk/-/operator-sdk-1.0.0.tgz","fileCount":32,"integrity":"sha512-wERYS4mYf2oAUdu61JTkadQPaRohFsrp+KS+a+YEcvBkY7T7phhX2iF/dN906dqVMF4l5hqsBhj27n1tsdF2OQ==","signatures":[{"sig":"MEYCIQDyqcsbMcJz1DoAXD3IIJSZ6nPBlcDQEgGVbRPIup5U1gIhAMcUCmn2PAex0deMv9DEDTI6xRAp0XzWlfAGXYlsnnZG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157880},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2184b3d8abbed204a18890e56b9d7abcee2ff1c5","scripts":{"test":"node test/optinSymbiotic.test.js","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"benoitded","email":"benoitded82@hotmail.fr"},"repository":{"url":"git+https://github.com/byzantine-fi/operator-sdk.git","type":"git"},"_npmVersion":"11.1.0","description":"SDK for integrating operators with Byzantine Finance ecosystem","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ethers":"^6.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.0.0","rimraf":"^4.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-sdk_1.0.0_1746542006640_0.24366234999098202","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@byzantine/operator-sdk","version":"1.0.1","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic"],"author":{"name":"Byzantine Finance"},"license":"MIT","_id":"@byzantine/operator-sdk@1.0.1","maintainers":[{"name":"benoitded","email":"benoitded82@hotmail.fr"}],"homepage":"https://byzantine.finance","bugs":{"url":"https://github.com/byzantine-finance/operator-sdk/issues"},"dist":{"shasum":"0174f02f00877e75b215a4a3345849cca092f5c0","tarball":"https://registry.npmjs.org/@byzantine/operator-sdk/-/operator-sdk-1.0.1.tgz","fileCount":32,"integrity":"sha512-ljcjZjrWDTVAqXcLGokAujRGFNhBMDqDTl053CQyjQz1wbDCVzvh8kTI/swU5gOFKf1nhYKHSRIXQ6eLOu00LQ==","signatures":[{"sig":"MEQCIG4zcFcPowJa++lJ2GRGND3g1XWZNHui9e7HDUgzGjl/AiBd3GpIt97WNntGXD8PZfYzXUkZ5WhLgPkfkVYtIPdxKQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":158023},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2347b6bdc447fc12ef113719e4b4adb0bce5b6f4","scripts":{"test":"node test/optinSymbiotic.test.js","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"benoitded","email":"benoitded82@hotmail.fr"},"repository":{"url":"git+https://github.com/byzantine-finance/operator-sdk.git","type":"git"},"_npmVersion":"11.1.0","description":"SDK for integrating operators with Byzantine Finance ecosystem","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ethers":"^6.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.0.0","rimraf":"^4.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-sdk_1.0.1_1746542797515_0.6757988445919143","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@byzantine/operator-sdk","version":"1.0.2","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic"],"author":{"name":"Byzantine Finance"},"license":"MIT","_id":"@byzantine/operator-sdk@1.0.2","maintainers":[{"name":"benoitded","email":"benoitded82@hotmail.fr"}],"homepage":"https://byzantine.finance","bugs":{"url":"https://github.com/byzantine-finance/operator-sdk/issues"},"dist":{"shasum":"3aba5a3337f9db8fd3311585883762b7c0ff9a9d","tarball":"https://registry.npmjs.org/@byzantine/operator-sdk/-/operator-sdk-1.0.2.tgz","fileCount":32,"integrity":"sha512-G9Hi41+j4jZIbtZrmP28o7+a0jTnKeAiWWSXAiZxOSNwEKQ8GTLfk0La1WxOFmgctLTdqgsijLtp4MuX+6zAdw==","signatures":[{"sig":"MEUCIA2lEAqFqTQwegoDWwISJIV5ZCjNXwyR0Zd+8bADnDu/AiEA1nE4w0kTI76uWyFNN+9dTMJWGr/9Rp+q6WiIfwJOvtw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":158357},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"90752743490c38bbdce6163bf5c7f9d1b5d82d37","scripts":{"test":"node test/optinSymbiotic.test.js","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"benoitded","email":"benoitded82@hotmail.fr"},"repository":{"url":"git+https://github.com/byzantine-finance/operator-sdk.git","type":"git"},"_npmVersion":"11.1.0","description":"SDK for integrating operators with Byzantine Finance ecosystem","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ethers":"^6.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.0.0","rimraf":"^4.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-sdk_1.0.2_1746549064068_0.25133584022990285","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@byzantine/operator-sdk","version":"1.0.3","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic","native"],"author":{"name":"Byzantine Finance"},"license":"MIT","_id":"@byzantine/operator-sdk@1.0.3","maintainers":[{"name":"benoitded","email":"benoitded82@hotmail.fr"}],"homepage":"https://byzantine.finance","bugs":{"url":"https://github.com/byzantine-finance/operator-sdk/issues"},"dist":{"shasum":"44044c3ad1438502ac757af084e74ca876c96f7b","tarball":"https://registry.npmjs.org/@byzantine/operator-sdk/-/operator-sdk-1.0.3.tgz","fileCount":42,"integrity":"sha512-6ky24EAUFOsb9AIL29VZut4fEU0cTtuY0OGMgiKio0rWTiGHRi128z+VIzOk1sr7XGwEomrPAd7rRSi7bhk32A==","signatures":[{"sig":"MEUCIQD+Qkf+t4169nVef5Sd8x+c1+rIIT4UzT/s213IEi2/5gIgTGj7542LSA26LCTlPbj2mNWthEtLApb99tWGZyDTW70=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":193321},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a851287255f69bf906a3e69a4fdf1d3028553816","scripts":{"test":"node test/readWalletOperator.js && node test/optinNative.test.js && node test/optinSymbiotic.test.js","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:read":"node test/readWalletOperator.js","test:native":"node test/optinNative.test.js","prepublishOnly":"npm run build","test:symbiotic":"node test/optinSymbiotic.test.js"},"_npmUser":{"name":"benoitded","email":"benoitded82@hotmail.fr"},"repository":{"url":"git+https://github.com/byzantine-finance/operator-sdk.git","type":"git"},"_npmVersion":"11.1.0","description":"SDK for integrating operators with Byzantine Finance ecosystem","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ethers":"^6.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.0.0","rimraf":"^4.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-sdk_1.0.3_1746634685188_0.995177180713273","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@byzantine/operator-sdk","version":"1.0.4","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic","native"],"author":{"name":"Byzantine Finance"},"license":"MIT","_id":"@byzantine/operator-sdk@1.0.4","maintainers":[{"name":"benoitded","email":"benoitded82@hotmail.fr"}],"homepage":"https://byzantine.finance","bugs":{"url":"https://github.com/byzantine-finance/operator-sdk/issues"},"dist":{"shasum":"113e5c1e1e39f3c1384c471165d38ddfbd062013","tarball":"https://registry.npmjs.org/@byzantine/operator-sdk/-/operator-sdk-1.0.4.tgz","fileCount":42,"integrity":"sha512-z1r6PfKt7jNXB5WGrerRvlgskM8jzS9qG3xpF4pboFhTrKKB7s0ZEfQndeJFddk1/c//WbtcrGMlzC/LW9QeTg==","signatures":[{"sig":"MEUCIAtb+BR5yW7N8fWDtaQ2rXryVTypLlgFZ8VdT2TCyNc8AiEA43dtNd9uBOJ+sl6Q6jk933M6MUT8hCs0WW9uo5Fw3lU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":193322},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7412afef41405ae309f8a79dd9ccf9860f9b99fc","scripts":{"test":"node test/readWalletOperator.js && node test/optinNative.test.js && node test/optinSymbiotic.test.js","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:read":"node test/readWalletOperator.js","test:native":"node test/optinNative.test.js","prepublishOnly":"npm run build","test:symbiotic":"node test/optinSymbiotic.test.js"},"_npmUser":{"name":"benoitded","email":"benoitded82@hotmail.fr"},"repository":{"url":"git+https://github.com/byzantine-finance/operator-sdk.git","type":"git"},"_npmVersion":"11.1.0","description":"SDK for integrating operators with Byzantine Finance ecosystem","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ethers":"^6.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.0.0","rimraf":"^4.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-sdk_1.0.4_1746635388575_0.03319801471121031","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@byzantine/operator-sdk","version":"1.0.5","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic","native"],"author":{"name":"Byzantine Finance"},"license":"MIT","_id":"@byzantine/operator-sdk@1.0.5","maintainers":[{"name":"benoitded","email":"benoitded82@hotmail.fr"}],"homepage":"https://byzantine.finance","bugs":{"url":"https://github.com/byzantine-finance/operator-sdk/issues"},"dist":{"shasum":"e9e7c0d507b3072263024cd3fbc74ff43fc8ed8e","tarball":"https://registry.npmjs.org/@byzantine/operator-sdk/-/operator-sdk-1.0.5.tgz","fileCount":42,"integrity":"sha512-4oUKPlJl08pZK7dosgmmzFtnhTA4nscfSovcmosvINilQMowQkxFTppZI9EunKHvRknBqPHwM6rROhu9SgV57g==","signatures":[{"sig":"MEYCIQDM3WggHUnl5dXxfEOdhBZenD0d93AZvOR6snfLJ+INdQIhAP0hqWOmYiD5LWJXgHFluSct8VTHUWTg6YqQJxIK/wxA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":194106},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"642c6253daeaabdc67d4acb4c1b5f27c2b591f68","scripts":{"test":"node test/readWalletOperator.js && node test/optinNative.test.js && node test/optinSymbiotic.test.js","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:read":"node test/readWalletOperator.js","test:native":"node test/optinNative.test.js","prepublishOnly":"npm run build","test:symbiotic":"node test/optinSymbiotic.test.js"},"_npmUser":{"name":"benoitded","email":"benoitded82@hotmail.fr"},"repository":{"url":"git+https://github.com/byzantine-finance/operator-sdk.git","type":"git"},"_npmVersion":"11.3.0","description":"SDK for integrating operators with Byzantine Finance ecosystem","directories":{},"_nodeVersion":"20.17.0","dependencies":{"ethers":"^6.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^16.0.0","rimraf":"^4.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/operator-sdk_1.0.5_1748269689867_0.4620603624752664","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-05-06T14:33:26.545Z","modified":"2025-12-01T09:44:14.352Z","1.0.0":"2025-05-06T14:33:26.837Z","1.0.1":"2025-05-06T14:46:37.725Z","1.0.2":"2025-05-06T16:31:04.238Z","1.0.3":"2025-05-07T16:18:05.423Z","1.0.4":"2025-05-07T16:29:48.757Z","1.0.5":"2025-05-26T14:28:10.078Z"},"bugs":{"url":"https://github.com/byzantine-finance/operator-sdk/issues"},"author":{"name":"Byzantine Finance"},"license":"MIT","homepage":"https://byzantine.finance","keywords":["blockchain","ethereum","defi","restaking","byzantine","operator","symbiotic","native"],"repository":{"url":"git+https://github.com/byzantine-finance/operator-sdk.git","type":"git"},"description":"SDK for integrating operators with Byzantine Finance ecosystem","maintainers":[{"email":"lin@byzantine.fi","name":"lin007"},{"email":"benoitded82@hotmail.fr","name":"benoitded"}],"readme":"# Byzantine Operator SDK\n\nA TypeScript/JavaScript SDK for operators to integrate with Byzantine Finance ecosystem.\n\n## About Byzantine Finance\n\nByzantine Finance is the first native restaking aggregation and abstraction layer. The protocol allows users to deploy various types of vaults for generating staking and restaking revenues, and operators to provide validation services.\n\nThis SDK provides a simple interface for operators to register and participate in the Byzantine ecosystem on:\n\n- _Ethereum Mainnet -> Soon_\n- **Holesky Testnet**\n- _Hoodi Testnet -> Soon_\n\n## Installation\n\n```bash\nnpm install @byzantine/operator-sdk\n```\n\n## Basic Setup\n\n1. Create a `.env` file in your project root with the following variables:\n\n```shell\nRPC_URL=https://holesky.infura.io/v3/your_api_key_here\n\n# Choose ONE of the following authentication methods:\nMNEMONIC=your_wallet_mnemonic\n# OR\nPRIVATE_KEY=your_wallet_private_key_without_0x_prefix\n\nDEFAULT_CHAIN_ID=17000  # 17000 for Holesky testnet, 1 for Ethereum Mainnet, 560048 for Hoodi Testnet\n```\n\n2. Import and initialize the client:\n\n```typescript\nimport { ByzOperatorClient } from \"@byzantine/operator-sdk\";\nimport { ethers } from \"ethers\";\nimport * as dotenv from \"dotenv\";\n\ndotenv.config();\n\nconst provider = new ethers.JsonRpcProvider(process.env.RPC_URL);\n\n// Initialize wallet from either mnemonic or private key\nconst wallet = ethers.Wallet.fromPhrase(process.env.MNEMONIC).connect(provider);\n// OR const wallet = new ethers.Wallet(process.env.PRIVATE_KEY).connect(provider);\n\nconst client = new ByzOperatorClient({\n  chainId: 17000, // 17000 for Holesky, 1 for Mainnet, 560048 for Hoodi\n  provider: provider,\n  signer: wallet,\n});\n```\n\n## Quick Start Symbiotic\n\nHere's a complete example showing how to register as an operator and opt into vaults and networks:\n\n```js\n// 1. Import the necessary dependencies\nimport { ByzOperatorClient, getNetworkConfig } from \"@byzantine/operator-sdk\";\nimport { ethers } from \"ethers\";\nimport * as dotenv from \"dotenv\";\n\n// 2. Load environment variables\ndotenv.config();\n\nasync function main() {\n  // 3. Initialize provider and wallet\n  const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);\n  const wallet = ethers.Wallet.fromPhrase(process.env.MNEMONIC).connect(\n    provider\n  );\n  // OR const wallet = new ethers.Wallet(process.env.PRIVATE_KEY).connect(provider);\n\n  const userAddress = await wallet.getAddress();\n\n  // 4. Initialize client\n  const chainId = 17000; // Holesky testnet\n  const client = new ByzOperatorClient({\n    chainId,\n    provider,\n    signer: wallet,\n  });\n\n  // 5. Get network configuration\n  const networkConfig = getNetworkConfig(chainId);\n\n  // 6. Define addresses\n  // Replace these with actual addresses for your use case\n  const VAULT_ADDRESS = \"0x123...\";\n  const NETWORK_ADDRESS_1 = \"0x456...\";\n  const NETWORK_ADDRESS_2 = \"0x789...\"; // Another network you want to validate for\n\n  console.log(`Operating as: ${userAddress}`);\n\n  try {\n    // STEP 1: Register as an operator if not already done\n    const tx1 = await client.registerOperator();\n    const receipt1 = await tx1.wait();\n\n    // STEP 2: Opt into networks\n    // Network 1\n    const tx2 = await client.optInNetwork(NETWORK_ADDRESS_1);\n    const receipt2 = await tx2.wait();\n\n    // Network 2\n    const tx3 = await client.optInNetwork(NETWORK_ADDRESS_2);\n    const receipt3 = await tx3.wait();\n\n    // STEP 3: Opt into vault\n    const tx4 = await client.optInVault(VAULT_ADDRESS);\n    const receipt4 = await tx4.wait();\n  } catch (error) {\n    console.error(\"Error during integration:\", error);\n  }\n}\n\nmain();\n```\n\n## Quick Start Native\n\nHere's a complete example showing how to register a native operator, update its fee, and unregister it:\n\n```js\nimport { ByzOperatorClient } from \"@byzantine/operator-sdk\";\nimport { ethers } from \"ethers\";\nimport * as dotenv from \"dotenv\";\n\ndotenv.config();\n\nconst provider = new ethers.JsonRpcProvider(process.env.RPC_URL);\nconst wallet = ethers.Wallet.fromPhrase(process.env.MNEMONIC).connect(provider);\n\nconst client = new ByzOperatorClient({\n  chainId: 17000, // or 560048 for Hoodi\n  provider,\n  signer: wallet,\n});\n\nconst operatorName = \"your-native-operator-name\";\nconst admin = await wallet.getAddress();\nconst operatorFee = 1000; // 10%\nconst managers = [admin];\n\nawait tx.wait();\nconst operatorIndex = await client.getNativeOperatorId(operatorName);\n\n// Update fee\nawait client.updateNativeOperatorFee(operatorIndex, 500); // 5%\n```\n\n## Available Functions\n\n### Symbiotic Protocol\n\n```js\n// Registration\nawait client.registerOperator();\nawait client.isOperator(operatorAddress);\nawait client.getTotalOperators();\nawait client.getOperatorAtIndex(index);\n\n// Network Opt-In\nawait client.optInNetwork(networkAddress);\nawait client.optOutNetwork(networkAddress);\nawait client.isOptedInNetwork(operatorAddress, networkAddress);\n\n// Vault Opt-In\nawait client.optInVault(vaultAddress);\nawait client.optOutVault(vaultAddress);\nawait client.isOptedInVault(operatorAddress, vaultAddress);\n```\n\n### Native Staking\n\n```js\n// Registration\nawait client.registerNativeOperator(name, admin, operatorFee, managers); // Only for ByzanTeam\nawait client.unregisterNativeOperator(operatorIndex); // Only for ByzanTeam\nawait client.isNativeOperatorRegistered(name);\nawait client.getNativeOperatorId(name);\nawait client.getNativeOperatorAdmin(operatorIndex);\nawait client.getNativeOperatorFee(operatorIndex);\n\n// Management\nawait client.updateNativeOperatorFee(operatorIndex, newFee);\nawait client.setNativeOperatorManager(operatorIndex, [address], true);\nawait client.transferNativeAdminRole(operatorIndex, newAdmin);\n```\n\n### EigenLayer Protocol\n\n_Coming soon_\n\n## Testing\n\nThe SDK includes tests for operator integration:\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the SDK\nnpm run build\n\n# Run all tests\nnpm run test\n\n# Run read functions with the wallet\nnpm run test:read\n\n# Run Native test\nnpm run test:native\n\n# Run Symbiotic test\nnpm run test:symbiotic\n```\n\n## Supported Networks\n\n- _Ethereum Mainnet (Chain ID: 1) -> Soon_\n- **Holesky Testnet (Chain ID: 17000)**\n- _Hoodi Testnet (Chain ID: 560048) -> Soon_\n\nBy default, the SDK is configured to use Holesky testnet (Chain ID: 17000). To use Ethereum Mainnet, specify `chainId: 1` when initializing the client. Or `chainId: 560048` for Hoodi Testnet.\n\n## NPM Package\n\nThis SDK is available on npm as [@byzantine/operator-sdk](https://www.npmjs.com/package/@byzantine/operator-sdk).\n\n## Security\n\nAll Byzantine Finance contracts have been thoroughly audited.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}