Skip to main content

SDKs Overview

OXN supports several client-side SDKs, each targeting a different runtime environment. This page helps you choose.

Decision tree

Your app runs inRecommended SDKSee
Browser (dApp frontend)ethers.js + OXN wrapperTypeScript / JavaScript
Node.js backendethers.js + OXN wrapper (or viem)TypeScript / JavaScript
Go service / indexerGo SDKGo SDK
Rust serviceRust SDKRust SDK
Shell script / CICLI ToolCLI Tool
Mobile appUse REST API + native cryptoNot covered directly

When in doubt, use TypeScript / ethers.js. It's the best-supported path and covers the majority of use cases.

Feature parity

FeatureTSGoRustCLI
Send encrypted transactionsPartial
Encrypted view callsPartial
Signed queries
Deploy contracts
Query native oxn1… balances
Consensus-layer deposit/withdraw
Type-safe contract bindingsPartial

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