SDKs Overview
OXN supports several client-side SDKs, each targeting a different runtime environment. This page helps you choose.
Decision tree
| Your app runs in | Recommended SDK | See |
|---|---|---|
| Browser (dApp frontend) | ethers.js + OXN wrapper | TypeScript / JavaScript |
| Node.js backend | ethers.js + OXN wrapper (or viem) | TypeScript / JavaScript |
| Go service / indexer | Go SDK | Go SDK |
| Rust service | Rust SDK | Rust SDK |
| Shell script / CI | CLI Tool | CLI Tool |
| Mobile app | Use REST API + native crypto | Not covered directly |
When in doubt, use TypeScript / ethers.js. It's the best-supported path and covers the majority of use cases.
Feature parity
| Feature | TS | Go | Rust | CLI |
|---|---|---|---|---|
| Send encrypted transactions | ✅ | ✅ | ✅ | Partial |
| Encrypted view calls | ✅ | ✅ | ✅ | Partial |
| Signed queries | ✅ | ✅ | ✅ | ❌ |
| Deploy contracts | ✅ | ✅ | ✅ | ✅ |
Query native oxn1… balances | ✅ | ✅ | ✅ | ✅ |
| Consensus-layer deposit/withdraw | ✅ | ✅ | ✅ | ✅ |
| Type-safe contract bindings | ✅ | Partial | ✅ | ❌ |
The TypeScript SDK is the most feature-complete because most dApp development happens in JavaScript. Go and Rust are close behind and are the right choice for high-performance backends.
Installation quick reference
TypeScript / JavaScript:
npm install ethers@^6.16.0 @oasisprotocol/sapphire-ethers-v6@^6.0.1
For Hardhat integration:
npm install --save-dev @oasisprotocol/sapphire-hardhat@^2.22.0
Go:
go get github.com/oasisprotocol/oasis-sdk/client-sdk/go@latest
Rust:
[dependencies]
oasis-runtime-sdk = "0.13"
CLI:
Download from the Oasis CLI releases or build from source.
Versioning
- All OXN SDK packages use semantic versioning.
- Breaking changes bump the major version.
- The SDK protocol format is stable — a v6.x client can talk to a v7.x runtime, and vice versa.
Support lifecycle
- Latest major version: actively supported.
- Previous major version: security fixes only for 6 months after next major release.
- Older versions: unsupported.
Next steps
- TypeScript / JavaScript — the most-used SDK
- Wallet Integration — MetaMask, WalletConnect, EIP-6963