Documentation

Complete guide to building secure and private applications on oako

Getting Started

🚀 Quick Start

Get up and running with oako in minutes

npm install @oako/sdk
import { OakoClient } from '@oako/sdk'

const client = new OakoClient({
  network: 'devnet' // or 'mainnet'
})

⚙️ Installation

Multiple ways to integrate oako into your project

  • NPM Package
  • CDN Integration
  • Source Build

API Reference

Core Methods

encrypt(data, publicKey)

Encrypts data using fully homomorphic encryption

Parameters:
  • data - The data to encrypt
  • publicKey - Recipient's public key

compute(encryptedData, function)

Performs computations on encrypted data

Parameters:
  • encryptedData - Previously encrypted data
  • function - Computation function

Examples

Private Machine Learning

// Train a model on encrypted data
const model = await client.ml.createModel({
  type: 'linear_regression',
  privacy: 'homomorphic'
})

const encryptedData = await client.encrypt(trainingData)
await model.train(encryptedData)

// Make predictions without decrypting
const prediction = await model.predict(encryptedInput)

Secure Transactions

// Create a private transaction
const transaction = await client.transaction.create({
  from: wallet.publicKey,
  to: recipientKey,
  amount: encryptedAmount,
  memo: encryptedMemo
})

await transaction.sign(wallet)
await transaction.submit()

Resources