Skip to main content

Nyx Privacy

The Dark Layer for the Agentic Web.

Nyx Privacy 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, Nyx Privacy 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 Trinity (Core Features)

1. The Nyx Shield (Privacy Primitives)

Turn public capital into private state. Nyx Privacy 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. Nyx 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. Nyx 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."

Nyx Privacy 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 nyx-privacy

Basic Usage

from nyx import NyxClient
from solders.keypair import Keypair

# Initialize the Dark Layer
client = NyxClient(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/nyxprivacy/nyx-privacy.git
cd nyx-privacy

# 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 Nyx 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.

Nyx 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)

Nyx Privacy 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.


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

Metadata

Release files for nyx-privacy 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 nyx-privacy 0.1.0
File Size Uploaded Provenance Actions
nyx_privacy-0.1.0.tar.gz 213.3 kB Without provenance Details for nyx_privacy-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for nyx-privacy 0.1.0
File Actions
nyx_privacy-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for nyx_privacy-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
nyx_privacy-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 nyx_privacy-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
nyx_privacy-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 nyx_privacy-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
nyx_privacy-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 nyx_privacy-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 1.5 MB

Release files / nyx_privacy-0.1.0.tar.gz

Download URL nyx_privacy-0.1.0.tar.gz
Size 213.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f3950d57430def480e9c040f01c6a7aca900b49af9eeea56c89bcea6d6fa27e9
BLAKE2b-256 checksum
How to use checksums
5f89b6142115948a5998ea999455d6646fdeda5a97eaab4a88a5442269f37703
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / nyx_privacy-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL nyx_privacy-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Size 329.6 kB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
892426c2bba5e54ecba2d79f69c979a6f9ba4c5d296d2b9306bd8ecf669a6ceb
BLAKE2b-256 checksum
How to use checksums
6832601abc6ef9f1909291c80b9a1eb8a75de9bd6664f43fb40d1d4627f28b30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

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

Download URL nyx_privacy-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
a56c5816cf9fa8f6d80c3bb88a852c9b974a04bd8507a2c56f9eca0721f74ab4
BLAKE2b-256 checksum
How to use checksums
0dca39f5d4ddaef6458e5374b38014bca3fca6a918fd44bd54d6b2eadebcdf08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

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

Download URL nyx_privacy-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
6365ca453f692c4ab9affc8e6f7883fb611a30a5be57a4d70c82b1ec185d958a
BLAKE2b-256 checksum
How to use checksums
7c75fad0617918e84261355d1c09d0526d9b82909752719b622bae0ab11b9a71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

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

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

Security for nyx-privacy 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

5 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