@oaknetwork/contracts-sdk package is published on npm. Install it with your preferred package manager.
You can also usenpm install @oaknetwork/contracts-sdkoryarn add @oaknetwork/contracts-sdk.
Requirements
@oaknetwork/contracts-sdk>= 1.0.0- Node.js 18 or later
- TypeScript 5.x recommended (the SDK ships type declarations)
Supported chains
The SDK ships aCHAIN_IDS constant with all supported networks:
| Chain | Chain ID | Use for |
|---|---|---|
| Celo Sepolia | 11142220 | Testnet development and integration testing |
| Celo Mainnet | 42220 | Production deployments |
| Ethereum Sepolia | 11155111 | Testnet development on Ethereum |
| Ethereum Mainnet | 1 | Production deployments on Ethereum |
| Ethereum Goerli | 5 | Legacy testnet (deprecated) |
Environment variables
Store your private key in an environment variable — never hardcode it.| Variable | Required | Description |
|---|---|---|
PRIVATE_KEY | Yes | 0x-prefixed private key for the signer account |
RPC_URL | Yes | RPC endpoint for the target chain |
Installdotenvif you want to load variables from a.envfile:pnpm add dotenv. Then addimport 'dotenv/config'at the top of your entry file.