Home/Documentation
Documentation

Build on Cube.

Everything you need to build on the onchain operating system — from your first app to settling on CubeCore.

Introduction

Cube is the onchain operating system you truly own. It powers the Cube Sovereign Phone — self-custody at the core, data-free by default, private by design. The platform is made of a few key building blocks:

  • CubeOSThe onchain operating system at the core of the Cube Sovereign Phone — self-custody by default, data-free, private by design.
  • CubeCoreThe settlement layer for digital capital markets — instant finality, atomic transactions and T+0 settlement.
  • DVU (Digital Value Unit)The native asset class traded on LOYEX — economic value tied to businesses that appreciates as they grow.
  • DPO (Direct Public Offering)Issue, manage and trade public offerings entirely on-chain, with automated compliance and instant secondary listing.

Quick Start

Spin up a project and talk to the Cube Network in minutes. Install the SDK, authenticate with your API key, and make your first call.

bash
# Install the Cube SDK
npm install @cube/sdk

# or with pnpm
pnpm add @cube/sdk

Installation

Grab an API key from Cube Studio, then initialize the client. The SDK works in Node, the browser, and on CubeOS.

JavaScript
import { CubeSDK } from '@cube/sdk'

const cube = new CubeSDK({
  apiKey: process.env.CUBE_API_KEY,
  environment: 'production',
})

// Verify connectivity
const status = await cube.network.status()
console.log(status.chainId, status.blockHeight)

CubeOS

CubeOS is hardened from the silicon up. One onchain identity and a self-custody wallet are built into the operating system, so apps can sign, pay, and prove who you are without ever handing your data to a third party. Connectivity is native — calls, data, and messages are free across the Cube Network.

CubeCore

CubeCore is the settlement backbone for every Cube market — LOYEX, DPOs, commodities, and public equities. Settlement is atomic: assets and payment move together, or not at all.

JavaScript
// Settle a DVU trade atomically
const settlement = await cube.settle({
  from: '0x1234...',
  to: '0x5678...',
  asset: 'DVU:URBN',
  amount: 1000,
  payment: { currency: 'xNGN', amount: 4370 },
})

console.log(settlement.status) // 'confirmed'
console.log(settlement.time)   // '<1s'

Read more in the CubeCore overview.

DVU

Digital Value Units (DVU) are the native asset class of the LOYEX market. Each DVU represents economic value tied to a business in the Cube ecosystem and appreciates as that business grows. DVUs are issued and tracked on CubeCore, with every transfer recorded as cryptographic proof — no central clearinghouse.

DPO

A Direct Public Offering (DPO) lets a business raise capital directly from the public. Smart contracts handle DVU issuance, investor allocation, vesting, and cap-table management automatically. When a DPO completes, its DVUs are immediately tradeable on LOYEX — day-one liquidity, no manual listing process.

AppHub

The AppHub is the native, onchain app store for CubeOS. Publish straight from Cube Studio, reach users with zero gatekeepers and no 30% cut, and reward engagement in DVU — every install and reward settles on CubeCore.

Cube Studio

Cube Studio is the AI-native development environment for onchain apps. Describe what you want in plain language, and Cube AI scaffolds the contracts, UI, and tests — then ships to the Cube Network and publishes to the AppHub. No pipelines, no servers.

Cube SDK

The SDK gives you typed access to identity, wallet, settlement, and AppHub publishing. Here's a complete example that creates a DPO campaign:

JavaScript
// Create a DPO campaign
const campaign = await cube.dpo.create({
  name: 'Summer Raise',
  asset: 'DVU:BREW',
  target: 250000,        // xNGN
  vesting: { months: 12, cliff: 3 },
})

console.log('DPO live:', campaign.id)

Full method reference in the API Reference.

Best Practices

  • Keep API keys server-side — never ship them in client bundles.
  • Prefer atomic settlement over multi-step transfers to avoid partial state.
  • Test against the Cube testnet and faucet before going to mainnet.
  • Subscribe to webhooks for settlement events instead of polling.

Ready to ship?

Open Cube Studio and build your first onchain app with AI.