Skip to main content

cngn

Official Python SDK for the cNGN API.

Install

pip install cngn

Use pip install "cngn[wallet]" to include wallet helpers.

Async usage

import asyncio

from cngn import AsyncCNGN


async def main() -> None:
    async with AsyncCNGN(
        api_key="cngn_test_...",
        encryption_key="...",
        private_key=open("cngn_ed25519").read(),
    ) as client:
        balances = await client.get_balance()
        networks = await client.get_networks()
        print(balances, networks)


asyncio.run(main())

AsyncCNGN is recommended for applications and services. Use CNGN for synchronous code; it exposes the same methods without await.

Features

  • Balances and paginated transactions
  • Dedicated and temporary virtual accounts
  • Bank verification and cNGN redemption
  • On-chain withdrawals and address whitelisting
  • Cross-network quotes and bridges
  • Webhook signature verification
  • Optional wallet generation and validation
account = await client.create_temporary_virtual_account(
    amount=5000,
    customer_email="user@example.com",
    customer_name="Ada Obi",
    account_name="ACME Checkout",
)

quote = await client.get_bridge_quote(
    amount=250,
    origin_network_id="...",
    destination_network_id="...",
    destination_address="0x...",
)

Manage API keys, encryption keys, Ed25519 keys, and IP allowlisting at app.cngn.co. Test and live credentials are separate.

Release files for cngn 2.0.3

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

Source distribution (sdist)

Source distribution for cngn 2.0.3
File Size Uploaded
cngn-2.0.3.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cngn 2.0.3
File Interpreter ABI Platform
cngn-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 43.4 kB

Release files / cngn-2.0.3.tar.gz

Download URL cngn-2.0.3.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cc89f6fcaa5ccc04bbe42dec71d0711b36ad58abd1cb8785d7085b5debd1ae8
BLAKE2b-256 checksum
How to use checksums
c1ab4bc358480ec529cc6d9b5577fd49d1e594a29d79e059e649cb222fec71f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cngn-2.0.3-py3-none-any.whl

Download URL cngn-2.0.3-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89c96d592f63a0bf0e84d30a5144dc8f553b55b7eab330a5334bebdb790feb81
BLAKE2b-256 checksum
How to use checksums
dc0305f52d7eed0bdc1e47c908b1126a7bed4f985bbcc59de7ddc41382573218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

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