1.9 KiB

title, sidebar_position
title sidebar_position
SDK Overview 1

SDK Overview

Oko provides specialized SDKs for different blockchain ecosystems. Choose the right packages for your project.

:::tip Get started faster Prefer a ready-to-run example? Try the Starter Templates. :::

Installation

# For Cosmos ecosystem
npm install @oko-wallet/oko-sdk-cosmos

# For Ethereum/EVM chains
npm install @oko-wallet/oko-sdk-eth

# For Solana/SVM chains
npm install @oko-wallet/oko-sdk-svm

# Core SDK (for custom integration)
npm install @oko-wallet/oko-sdk-core

Quick Setup

Cosmos

import { OkoCosmosWallet } from "@oko-wallet/oko-sdk-cosmos";

const initRes = OkoCosmosWallet.init(config);
if (!initRes.success) {
  throw new Error(`Cosmos wallet initialization failed: ${initRes.err}`);
}

const cosmosWallet = initRes.data;

Ethereum

import { OkoEthWallet } from "@oko-wallet/oko-sdk-eth";

const initRes = OkoEthWallet.init(config);
if (!initRes.success) {
  throw new Error(`Eth wallet initialization failed: ${initRes.err}`);
}

const ethWallet = initRes.data;
const provider = await ethWallet.getEthereumProvider();

Solana

import { OkoSvmWallet } from "@oko-wallet/oko-sdk-svm";

const initRes = OkoSvmWallet.init(config);
if (!initRes.success) {
  throw new Error(`Solana wallet initialization failed: ${initRes.err}`);
}

const svmWallet = initRes.data;
await svmWallet.connect();

Next Steps