Catalog npm
PACKAGE EXPLORERView in registry

0g-orbit

npm

The developer toolkit for 0G. Store, infer, deploy — one SDK, one CLI, five minutes.

0gaiblockchainclidecentralizedfine-tuninginferencesdkstorageweb3zero-gravity
Versions collected5
Direct dependencies9From release 0.2.3
Last observed20 Oct, 17:40 UTC

README

Current package documentation

0G Orbit

The developer toolkit for 0G. Store, infer, fine-tune — one SDK, one CLI, five minutes.

CI npm License: MIT Node.js

What is this?

0G Orbit wraps the 0G storage SDK, serving broker, and chain interactions into a single unified interface. Instead of juggling @0gfoundation/0g-ts-sdk, @0glabs/0g-serving-broker, and raw ethers calls, you get one Orbit class and one orbit CLI.

Storage — Upload and download files to 0G's decentralized storage network Inference — Run AI models on 0G's decentralized compute network Fine-Tuning — Upload datasets, create training tasks, download fine-tuned models

Install

npm install 0g-orbit

Quick Start

SDK

import { Orbit } from '0g-orbit'

const orbit = await Orbit.connect({
  network: 'testnet',
  privateKey: process.env.PRIVATE_KEY,
})

// Upload a file
const { root, txHash } = await orbit.store('./data.json')
console.log(`Stored: ${root}`)

// Download it back
await orbit.retrieve(root, './downloaded.json')

// Run AI inference
const response = await orbit.infer('meta-llama/Llama-3.2-3B-Instruct', {
  message: 'Explain zero-knowledge proofs in one sentence.',
})
console.log(response.content)

// Fine-tune a model
const dataset = await orbit.uploadDataset('./training-data.jsonl')
const task = await orbit.createFineTuneTask({
  model: 'base-model',
  dataset: dataset.root,
  providerAddress: '0x...',
})

CLI

# Set your private key
export PRIVATE_KEY=0x...

# Upload a file
orbit store ./my-file.txt

# Download a file
orbit retrieve <rootHash> ./output.txt

# Run inference
orbit infer meta-llama/Llama-3.2-3B-Instruct -m "Hello, 0G!"

# List available AI services
orbit services

# Fine-tune a model
orbit fine-tune ./dataset.jsonl --model base-model --provider 0x...

# Check account status
orbit status

API

Orbit.connect(config)

Creates a connected Orbit instance.

OptionTypeDescription
network'testnet' | 'mainnet'Network to connect to
privateKeystring?Wallet private key (falls back to PRIVATE_KEY env var)
rpcUrlstring?Custom RPC URL

Storage

MethodDescription
orbit.store(path, options?)Upload a file, returns { root, txHash }
orbit.storeData(text, options?)Upload a text string
orbit.retrieve(rootHash, outputPath, options?)Download a file by root hash

Inference

MethodDescription
orbit.infer(model, options)Run AI inference, returns { content, tokensUsed }
orbit.listServices()List available AI services on the network

Fine-Tuning

MethodDescription
orbit.uploadDataset(path)Upload a training dataset to storage
orbit.createFineTuneTask(options)Create a fine-tuning task
orbit.getFineTuneTask(provider, taskId)Check task status
orbit.downloadModel(provider, taskId, outputDir)Download a fine-tuned model
orbit.listModels()List available base models
orbit.listProviders()List fine-tuning providers

Direct Client Access

For advanced usage, access the underlying clients directly:

orbit.storage    // StorageClient
orbit.inference  // InferenceClient
orbit.fineTuning // FineTuningClient

Security

This package has transitive dependencies with known vulnerabilities (from upstream 0G SDKs). To mitigate, add this to your project's package.json:

{
  "overrides": {
    "axios": "1.14.0"
  }
}

See SECURITY.md for details.

Contributing

See CONTRIBUTING.md.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 5

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.3Registry latest5 Apr 20269
0.2.25 Apr 20269
0.2.15 Apr 20269
0.2.04 Apr 20269
0.1.04 Apr 20269

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
cyber/0g-orbit

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0649f4d72d57c24b68bfb46ea37cb7cc76a12d73f5ac3c131de5550a5bc59021