Metadata-Version: 2.5
Name: cngn
Version: 2.0.3
Summary: Official Python SDK for the cNGN API, the regulated Nigerian Naira stablecoin
Project-URL: Homepage, https://cngn.co
Project-URL: Documentation, https://docs.cngn.co
Project-URL: Source, https://github.com/wrappedcbdc/cngn-python-library
Author-email: Wrapped CBDC / Convexity <support@cngn.co>
License: MIT
License-File: LICENSE
Keywords: cngn,crypto,naira,nigeria,payments,stablecoin
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: cryptography
Requires-Dist: httpx>=0.28
Requires-Dist: pydantic>=2.10
Requires-Dist: pynacl
Provides-Extra: wallet
Requires-Dist: bip32utils; extra == 'wallet'
Requires-Dist: mnemonic; extra == 'wallet'
Requires-Dist: stellar-sdk; extra == 'wallet'
Requires-Dist: tronpy; extra == 'wallet'
Description-Content-Type: text/markdown

# cngn

Official Python SDK for the [cNGN API](https://docs.cngn.co).

## Install

```bash
pip install cngn
```

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

## Async usage

```python
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

```python
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](https://app.cngn.co). Test and live credentials are separate.
