Skip to main content

Onyx

The Dark Layer for the Agentic Web.

Onyx is the production-ready privacy infrastructure for Solana, engineered specifically for Python developers and AI agents. By combining a high-level Python SDK with a high-performance Rust cryptographic core, Onyx solves the "transparency paradox" by enabling fully shielded transactions, private transfers, and chain-agnostic micropayments (x402) without sacrificing the speed required for modern DeFi or the usability required for autonomous agents.

Documentation License: MIT Python 3.12+ Rust

The Onyx Trinity (Core Features)

1. The Onyx Shield (Privacy Primitives)

Turn public capital into private state. Onyx uses Pedersen Commitments on the BN254 curve to perfectly hide transaction amounts.

  • Information-Theoretic Privacy: Amount data is mathematically impossible to extract without the blinding factor.
  • Circuit-Safe Nullifiers: Two-step Poseidon hashing prevents double-spending while keeping your master secret isolated from the circuit.
  • Front-Running Protection: A 30-root history buffer ensures your proofs remain valid even during network congestion.

2. Onyx Transfer (ZK-Transactions)

Move value without leaving a trace.

  • Groth16 zkSNARKs: Generate proofs in seconds (2-5s) that certify transaction validity without revealing sender, recipient, or amount.
  • Encrypted Notes: Uses ECDH and ChaCha20-Poly1305 to allow recipients to discover and decrypt their incoming funds securely.
  • Unlinkability: The transaction graph is severed. Observers see a commitment enter and a different one leave, with no link between them.

3. Onyx Pay (x402 Integration)

Chain-agnostic payments for a multi-chain world.

  • Gas Abstraction: Pay for privacy services on Solana using USDC on Base, Polygon, Avalanche, or 12+ other networks.
  • Agent-Native: Based on the HTTP 402 standard, allowing AI agents to autonomously negotiate and pay for resources.
  • Seamless Access: No accounts required. Cryptographically authorized per-request.

Developer Experience (The Stack)

"Python Simplicity. Rust Velocity."

Onyx utilizes a hybrid architecture to balance developer experience with raw performance.

Layer Technology Function
Interface Python 3.12+ Async/await SDK for easy integration with AI agents and trading bots.
Engine Rust Core Native binaries handling heavy cryptography (Poseidon hashing, Proof generation).
Verifier Anchor (Solana) On-chain program handling state, Merkle trees, and nullifier tracking.

Quick Start

Installation

pip install onyx-solana

Basic Usage

from onyx import OnyxClient
from solders.keypair import Keypair

# Initialize the Dark Layer
client = OnyxClient(rpc_url="https://api.mainnet-beta.solana.com")
user_keypair = Keypair()

# Shield assets (Public -> Private)
# Returns a commitment signature
secret, commitment = client.shield_assets(
    amount=1_000_000_000,  # 1 SOL
    token="SOL",
    keypair=user_keypair
)

# Transfer privately (Private -> Private)
# Proof generation takes <5s via Rust core
tx = await client.private_transfer_async(
    recipient=recipient_address,
    amount=500_000_000,  # 0.5 SOL
    sender_secret=secret,
    sender_commitment=commitment
)

# Unshield assets (Private -> Public)
tx = client.unshield_assets(
    commitment=commitment,
    secret=secret,
    recipient=user_keypair.pubkey()
)

Development

Prerequisites

  • Python 3.12+
  • Rust 1.70+
  • Solana CLI tools
  • Anchor Framework (for Solana program)

Building from Source

# Clone the repository
git clone https://github.com/onyxsolana/onyx-sdk.git
cd onyx-sdk

# Install all packages in development mode
make install-dev

# Run tests
make test

# Build all packages
make build

Roadmap (The Path Forward)

  • Phase 1: Foundation (Current)
    • Python SDK & Rust Core released.
    • Groth16 Circuits (~7,000 constraints) live on Devnet.
    • x402 Payment integration active on 15+ chains.
  • Phase 2: The Network (v0.2.0)
    • Public Onyx Relayer Network launch.
    • Self-hosting infrastructure for relayers.
  • Phase 3: Decentralization
    • Trusted Setup Ceremony (MPC) for production parameters.
    • Mainnet Launch.
  • Phase 4: Expansion (2026)
    • Full Gas Abstraction (Pay all Solana fees with USDC).
    • Multi-asset support beyond SOL.

Onyx Security Architecture

  • Curve: BN254 (alt_bn128).
  • Hash: Poseidon (t=3, RF=8, RP=57).
  • Proof System: Groth16 (256-byte proofs).
  • Encryption: ChaCha20-Poly1305 + ECDH.
  • Tree Depth: 20 levels (~1M leaves).
  • Audit Status: MPC Ceremony Pending.

Documentation

Supported Networks (x402)

Onyx x402 integration supports payments on 15+ blockchains:

Mainnets: Base, Polygon, Avalanche, Solana, IoTeX, Peaq, Sei, XLayer Testnets: Base Sepolia, Polygon Amoy, Avalanche Fuji, Solana Devnet, and more

See x402 networks documentation for full list.

License

MIT License - see LICENSE for details

Contributing

Contributions welcome! Please see our contributing guidelines.


Onyx - The Dark Layer for the Agentic Web. Privacy for the Machine Economy.

Metadata

Release files for onyx-solana 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onyx-solana 0.1.0
File Size Uploaded Provenance Actions
onyx_solana-0.1.0.tar.gz 224.6 kB Without provenance Details for onyx_solana-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for onyx-solana 0.1.0
File Interpreter ABI Platform Actions
onyx_solana-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for onyx_solana-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
onyx_solana-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for onyx_solana-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
onyx_solana-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for onyx_solana-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 1.2 MB

Release files / onyx_solana-0.1.0.tar.gz

Download URL onyx_solana-0.1.0.tar.gz
Size 224.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f11a263ea4bb4f6a115e92d8e213a089b94a71c1fc0bf4eec2400cf4c09b6186
BLAKE2b-256 checksum
How to use checksums
7d7237ebd05fa6b15453740d265206f00f622b694763ce4bc08600c25a5dbb80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / onyx_solana-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL onyx_solana-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 329.6 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
9f66aea5d61141516365117f0ead00d02648d198434c9cb0541b43d04a1e5687
BLAKE2b-256 checksum
How to use checksums
7f76441a6ad1854d6e0e2d674952e5a62a9d0a5444cd089427b876d972a1b7f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / onyx_solana-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL onyx_solana-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Size 329.9 kB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
494701eed40bf3157935ad9c0c0eb45c712f4ceb36fcc7e88c8214c4eb7a7543
BLAKE2b-256 checksum
How to use checksums
618eff76ec7dc03fa471c9a958beb89e6617845c016075f413e662146c70ecda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / onyx_solana-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL onyx_solana-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Size 329.9 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b665f0d6bb7fd10656ceb3a0024f4bcb43230564e7f1c3d2fc577ab9b28942b2
BLAKE2b-256 checksum
How to use checksums
831abe30d35fc0f52792799c0d0672b2be7d3bde3a26225deea363d1dce7b9b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Security for onyx-solana 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

4 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page