Overview
The Onyx SDK is a TypeScript library for interacting with the Enzyme Onyx protocol - an Ethereum-based platform for decentralized on-chain asset management. This SDK provides a comprehensive set of tools for building applications that manage digital assets, create investment funds, and implement sophisticated DeFi strategies.
Installation
Install the Onyx SDK and its peer dependencies using your preferred package manager:
# npm
npm install @enzymefinance/onyx-sdk
# Install peer dependencies
npm install @enzymefinance/onyx-environment @enzymefinance/onyx-abis viem
Note:
@enzymefinance/onyx-environment,@enzymefinance/onyx-abis, andviemare peer dependencies that must be installed alongside the main SDK package.
Prerequisites
Node.js 18 or later
TypeScript 5.0 or later
Basic understanding of Ethereum and smart contracts
Familiarity with Viem (the underlying Ethereum client library)
Supported Networks
The Onyx SDK supports the following networks:
Ethereum Mainnet (Chain ID: 1)
Arbitrum (Chain ID: 42161)
Base (Chain ID: 8453)
Plume (Chain ID: 98866)
📋 View all contract addresses →
Quick Start
1. Set up a Viem Client
First, create a Viem client to interact with the blockchain:
2. Get Network Environment
Use the environment package to get deployment addresses and configurations:
3. Basic Asset Operations
Work with ERC20 tokens and get asset information:
4. Deploy Shares (Fund Tokens)
Create a new fund by deploying shares:
5. Working with Components
The SDK provides various components for fund management:
6. Reading Fund Data
Query information about existing funds:
TypeScript Support
The SDK is built with TypeScript and provides full type safety:
Common Patterns
Transaction Simulation
Before sending transactions, simulate them to catch errors:
Batch Operations
Use Promise.all for multiple read operations:
Support
If you encounter issues or have questions:
Check the GitHub Issues
Join our Discord server
Start a Discussion on GitHub
This SDK is under active development. APIs may change between versions. Always check the changelog before upgrading.
Last updated
Was this helpful?