Prerequisites
- Node.js version 20.x or higher.
Install
The Otim SDK is available on npm and can be installed with your favorite package manager.viem
is a peer dependency and is required for the SDK to function correctly.
TypeScript Requirements
We support TypeScript v5.0+ and require the followingtsconfig.json
settings:
strict: true
in your tsconfig.json
. This is the single most impactful setting for ensuring type safety.
Basic Usage
This example shows how to create and execute a transfer using the Otim SDK. The builder pattern creates an instruction that gets activated to execute the transfer on-chain. Note:privateKeyToAccount
is just one option. You can also use embedded wallet solutions like Privy, Turnkey, or connect to wallet apps directly using a wallet connector in your app.