Metadata-Version: 2.4
Name: cryptnox_cli
Version: 1.0.4
Summary: CLI for managing Cryptnox smart card wallets.
Home-page: https://www.cryptnox.com/
Author: Cryptnox SA
Author-email: info@cryptnox.com
License: LGPL-3.0
Project-URL: Source Code, https://github.com/Cryptnox-Software/cryptnox-cli
Keywords: python,cryptography,bitcoin,ethereum,cryptocurrency,wallet
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Hardware :: Universal Serial Bus (USB) :: Smart Card
Requires-Python: <=3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: argparse
Requires-Dist: appdirs
Requires-Dist: base58
Requires-Dist: ecdsa>=0.19.2
Requires-Dist: colander
Requires-Dist: cryptnox-sdk-py>=1.0.4
Requires-Dist: lazy-import
Requires-Dist: pytz
Requires-Dist: requests>=2.33.0
Requires-Dist: tabulate
Requires-Dist: stdiomask
Requires-Dist: web3>=7.15.0
Requires-Dist: winsdk; platform_system == "Windows"
Dynamic: description
Dynamic: license-file

<p align="center">
  <img src="https://github.com/user-attachments/assets/6ce54a27-8fb6-48e6-9d1f-da144f43425a"/>
</p>

<h3 align="center">cryptnox-cli</h3>
<p align="center">CLI for managing Cryptnox Hardware Wallet smart cards</p>

<br/>
<br/>

[![PyPI](https://img.shields.io/pypi/v/cryptnox-cli.svg)](https://pypi.org/project/cryptnox-cli/)
[![Python versions](https://img.shields.io/pypi/pyversions/cryptnox-cli.svg)](https://pypi.org/project/cryptnox-cli/)
[![MStore](https://img.shields.io/badge/MStore-Available-blue)](https://apps.microsoft.com/detail/9p6g3hn0k1mz)
[![Documentation status](https://img.shields.io/badge/docs-latest-blue)](https://cryptnox.github.io/cryptnox-cli)
[![License: GPLv3](https://img.shields.io/badge/License-LGPLv3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)

`cryptnox-cli` is a command-line interface for managing **Cryptnox Hardware Wallet** smart cards, enabling secure seed initialization and cryptographic signing for **Bitcoin** and **Ethereum**.

---

## Supported hardware

### Cryptnox Hardware Wallet smart cards

Works with Cryptnox Hardware Wallet smart cards running firmware v1.6.0 or later.

| Smart card | Wallet version |
|------|---------------|
| [Crypto Hardware Wallet – Dual Card Set](https://shop.cryptnox.com/product/hardware-wallet-smartcard-dual/) | v1.6.1 |

### Smart card readers

Works with Cryptnox readers and any other standard PC/SC smart card reader:

| Reader | Type | Interface |
|--------|------|-----------|
| [Cryptnox® Smartcard Reader](https://shop.cryptnox.com/product/cryptnox-smartcard-reader/) | Contact (ID-1 + SIM) | USB-A |
| [Compact USB Mini Smartcard Reader](https://shop.cryptnox.com/product/mini-smartcard-reader/) | Contact (ID-1) | USB-A |
| [Cryptnox NFC Contactless Reader](https://shop.cryptnox.com/product/cryptnox-contactless-reader/) | Contactless (NFC/ISO 14443) | USB-C |

---

## Installation
> [!IMPORTANT]
> This is only a minimal setup. Additional packages may be required depending on your operating system. See [Installation and requirements](https://cryptnox.github.io/cryptnox-cli/overview.html#installation-and-requirements).

### From PyPI

```bash
pip install cryptnox-cli
```

### From MStore

```bash
mstore install cryptnox-cli
```

Visit the [MStore page](https://apps.microsoft.com/detail/9p6g3hn0k1mz) to install `cryptnox-cli` via the graphical user interface.

### From source

```bash
git clone https://github.com/cryptnox/cryptnox-cli.git
cd cryptnox-cli
pip install .
```
This installs the package and makes the `cryptnox` command available (if your Python installation is in your system `PATH`).

---

## Quick usage examples
> [!TIP]
>  The examples below are only a subset of available commands. The complete list of commands and detailed usage instructions is described in the [official documentation](https://cryptnox.github.io/cryptnox-cli).

### 1. Sign and send a Bitcoin transaction

1. Create or obtain a raw unsigned transaction externally.
2. Run the signing & send command:  
   `cryptnox btc send <recipient_address> <amount> [-f <fees>]`

![BTC send transaction demo](BTC_send_transaction.webp)

### 2. Dual initialization

1. Factory reset each card:  
   `cryptnox reset` → enter PUK → verify reset.

2. Initialize each card:  
   `cryptnox init` → (optional) set name/email → set **PIN** (4–9 digits) → set or generate **PUK** → verify init.

3. Run dual seed procedure:  
   `cryptnox seed dual` — follow prompts: insert Card A (enter PIN), swap to Card B (enter PIN), swap back as requested.

### 3. Change PIN code

1. Run command: `cryptnox change_pin`
2. Enter current PIN → enter new PIN → verify change.  
3. Check with `cryptnox info` using new PIN (BTC & ETH accounts displayed).

### 4. Get extended public key (xpub)

1. Run command: `cryptnox get_xpub`
2. Enter **PIN** → enter **PUK**
3. The card returns the **xpub**

---

## Documentation

The full **User & Developer documentation** is available at the [Cryptnox CLI Documentation](https://cryptnox.github.io/cryptnox-cli). It covers installation and setup, usage guides and examples, CLI command reference, and developer notes with API details.

---

## License

`cryptnox-cli` is dual-licensed:

- **LGPL-3.0** for open-source projects and proprietary projects that comply with LGPL requirements  
- **Commercial license** for projects that require a proprietary license without LGPL obligations (see COMMERCIAL.md for details)

For commercial inquiries, contact: contact@cryptnox.com

=========
Changelog
=========

`1.0.4 <https://github.com/Cryptnox-Software/cryptnox-cli/compare/ver1.0.3...ver1.0.4>`_
------------------------------------------------------------------------------------------------

Added
^^^^^
- Bitcoin (BTC) send transaction support with SegWit/bech32 address support
- Bitcoin testnet4 support for development and testing
- QuickNode integration via Blockbook UTXOs for UTXO fetching, with JSON-RPC for fee estimation and broadcast
- Parallel network queries for faster Bitcoin balance and UTXO lookups
- XRP and BNB address display in card info
- Manufacturer certificate retrieval command
- Power cycle prompt with automatic card reconnection when required
- Double confirmation when changing PIN or PUK to prevent accidental changes
- Ctrl+C cancellation support in PIN/PUK input prompts
- CodeQL, Semgrep, and OSV security scanning workflows in CI/CD

Changed
^^^^^^^
- Updated cryptnox-sdk-py to 1.0.4
- Added Python 3.14 support
- Mainnet set as the default network configuration
- Improved PIN/PUK input UX on Windows (simplified getpass, removed polling loop)
- Improved verify PIN flow: warns instead of blocking when PUK change is attempted with PIN locked
- Card info command now performs network queries in parallel for improved performance
- Updated dependencies to address security vulnerabilities (Dependabot)

Fixed
^^^^^
- Restored Ctrl+C handling in ``getpass`` on all platforms
- Fixed Ctrl+C handling in ``confirm_pin_code`` and ``confirm_puk_code``
- Fixed thread-safety issue by pre-fetching card config before ``ThreadPoolExecutor``
- Fixed CodeQL ``py/incomplete-url-substring-sanitization`` finding in URL validation
- Fixed ``PinBlockedException`` handling and propagation

Removed
^^^^^^^
- Removed AWS backup and seed backup features (``backup.py``, ``seed_backup.py``, ``download_folder.py``)

`1.0.3 <https://github.com/Cryptnox-Software/cryptnox-cli/compare/v1.0.2...v1.0.3>`_
------------------------------------------------------------------------------------------------

Added
^^^^^
- Added Cryptnox logo to documentation
- Added Other/Proprietary License option

Changed
^^^^^^^
- Updated cryptnox-sdk-py to 1.0.2
- Updated other dependencies to latest versions
- Modified documentation UI, colors, and layout
- Updated documentation license information

`1.0.2 <https://github.com/Cryptnox-Software/cryptnox-cli/compare/v1.0.1...v1.0.2>`_
------------------------------------------------------------------------------------------------

Changed
^^^^^^^
- Updated README file with improved documentation
- Modified commercial license details

`1.0.1 <https://github.com/Cryptnox-Software/cryptnox-cli/compare/v2.9.1...ver1.0.1>`_
------------------------------------------------------------------------------------------------

Added
^^^^^
- Package renamed from ``cryptnoxpro`` to ``cryptnox_cli``
  - Install using: ``pip install cryptnox-cli``
- BIP39 passphrase support for seed generation and recovery
- BIP39 passphrase length limitation and validation
- Sphinx documentation framework for comprehensive CLI documentation
- GitHub Actions workflows for automated documentation deployment
- Constants file for centralized configuration management
- Flake8 code quality checks in CI/CD workflow

Changed
^^^^^^^

- Updated README with improved documentation and examples
- Modified documentation configuration and deployment process
- Reconfigured documentation deployment workflow
- Updated setup configuration (setup.cfg) for better package management
- Improved code organization with constants file

Fixed
^^^^^

- Resolved runtime import errors
- Fixed flake8 code style errors throughout the codebase
- Fixed PUK retries persistence issue

Removed
^^^^^^^

- Removed cleos dependency
- Removed Ropsten testnet support (deprecated network)
