Skip to main content
The @oaknetwork/contracts-sdk package is published on npm. Install it with your preferred package manager.
You can also use npm install @oaknetwork/contracts-sdk or yarn 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)
The SDK depends on viem for blockchain interactions. It is included as a dependency — you do not need to install it separately.

Supported chains

The SDK ships a CHAIN_IDS constant with all supported networks:
Start with testnetUse CHAIN_IDS.CELO_TESTNET_SEPOLIA for development. You can get testnet tokens from the Celo faucet.

Environment variables

Store your private key in an environment variable — never hardcode it.
Install dotenv if you want to load variables from a .env file: pnpm add dotenv. Then add import 'dotenv/config' at the top of your entry file.