From 6e0959755c2226d4f19b189d88c3e9d49f2c1a3a Mon Sep 17 00:00:00 2001 From: YanNaingWinDev Date: Mon, 27 Oct 2025 16:54:42 +0700 Subject: [PATCH 1/3] Added missing modules documentation --- docs/conf.py | 74 ++++++++++++++++++++++---- docs/cryptnoxpro.command.card.rst | 14 +++++ docs/cryptnoxpro.command.erc_token.rst | 14 +++++ docs/cryptnoxpro.command.helper.rst | 4 ++ docs/cryptnoxpro.command.options.rst | 9 ++++ docs/cryptnoxpro.command.rst | 3 ++ docs/cryptnoxpro.command.user_keys.rst | 24 +++++++++ docs/cryptnoxpro.lib.cryptos.coins.rst | 9 ++++ docs/cryptnoxpro.lib.cryptos.rst | 16 ++++++ docs/cryptnoxpro.lib.rst | 3 ++ docs/cryptnoxpro.rst | 8 +++ docs/cryptnoxpro.wallet.eth.rst | 24 +++++++++ docs/cryptnoxpro.wallet.rst | 3 ++ 13 files changed, 194 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 950892a..5e34592 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,6 +8,7 @@ import os import sys + sys.path.insert(0, os.path.abspath("..")) project = 'cryptnoxpro' @@ -25,33 +26,84 @@ "sphinx.ext.viewcode", ] +# Disable autosummary generation to prevent hangs +autosummary_generate = False + templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +# autodoc_mock_imports - Sphinx will create mock imports for these modules +# This is safer than manual sys.modules mocking and prevents hangs autodoc_mock_imports = [ - 'winsdk', + # Cryptnox 'cryptnoxpy', - 'boto3', - 'botocore', - 'cryptography', + # Input/Output 'stdiomask', 'tabulate', - 'requests', + # AWS + 'boto3', + 'botocore', + 'botocore.exceptions', + 'botocore.client', + 'botocore.config', + # Web3 and Ethereum 'web3', - 'eth_typing', + 'web3.eth', + 'web3.contract', + 'web3.middleware', 'eth_account', + 'eth_account._utils', + 'eth_account._utils.legacy_transactions', 'eth_account.transactions', 'eth_account.account', - 'eth_account._utils', 'eth_account.datastructures', - 'pydantic', - 'pydantic_core', 'eth_utils', + 'eth_utils.curried', + 'eth_typing', + 'eth_keys', + 'eth_rlp', + 'eth_abi', + 'eth_hash', 'hexbytes', - 'enums', - 'config' + 'ecdsa', + 'rlp', + # Validation + 'pydantic', + 'pydantic_core', + # Smart card + 'pyscard', + 'smartcard', + 'smartcard.CardConnection', + 'smartcard.System', + 'smartcard.Exceptions', + 'smartcard.CardType', + 'smartcard.CardRequest', + 'smartcard.util', + 'smartcard.scard', + # Utilities + 'cytoolz', + 'toolz', + 'winsdk', + 'base58', ] +# Autodoc configuration +autodoc_default_options = { + 'members': True, + 'member-order': 'bysource', + 'special-members': '__init__', + 'undoc-members': True, + 'exclude-members': '__weakref__' +} + +# Allow autodoc to import modules with errors +autodoc_inherit_docstrings = True +autodoc_typehints = 'description' +autodoc_typehints_description_target = 'documented' + +# Set autodoc to not fail on import errors +autoclass_content = 'both' + # Handle ambiguous cross-references nitpicky = False nitpick_ignore = [ diff --git a/docs/cryptnoxpro.command.card.rst b/docs/cryptnoxpro.command.card.rst index 678bdf6..2084c6d 100644 --- a/docs/cryptnoxpro.command.card.rst +++ b/docs/cryptnoxpro.command.card.rst @@ -28,3 +28,17 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.command.card`` package provides card management functionality and exports: + +.. py:currentmodule:: cryptnoxpro.command.card + +.. py:class:: Info + :no-index: + + Command class for displaying card information. See :class:`cryptnoxpro.command.card.info.Info` for details. + +.. py:class:: Initialize + :no-index: + + Command class for initializing cards. See :class:`cryptnoxpro.command.card.initialize.Initialize` for details. + diff --git a/docs/cryptnoxpro.command.erc_token.rst b/docs/cryptnoxpro.command.erc_token.rst index b05d892..1717487 100644 --- a/docs/cryptnoxpro.command.erc_token.rst +++ b/docs/cryptnoxpro.command.erc_token.rst @@ -36,3 +36,17 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.command.erc_token`` package provides ERC token management and exports: + +.. py:currentmodule:: cryptnoxpro.command.erc_token + +.. py:class:: Info + :no-index: + + Command class for displaying ERC token information. See :class:`cryptnoxpro.command.erc_token.info.Info` for details. + +.. py:class:: Initialize + :no-index: + + Command class for initializing ERC tokens. See :class:`cryptnoxpro.command.erc_token.initialize.Initialize` for details. + diff --git a/docs/cryptnoxpro.command.helper.rst b/docs/cryptnoxpro.command.helper.rst index c8949ba..f0434e5 100644 --- a/docs/cryptnoxpro.command.helper.rst +++ b/docs/cryptnoxpro.command.helper.rst @@ -84,3 +84,7 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.command.helper`` package provides utility functions and helper modules for command implementations. +This package contains shared functionality used across multiple commands, including user interface components, +security helpers, configuration management, and backup utilities. + diff --git a/docs/cryptnoxpro.command.options.rst b/docs/cryptnoxpro.command.options.rst index af4453c..232bcfb 100644 --- a/docs/cryptnoxpro.command.options.rst +++ b/docs/cryptnoxpro.command.options.rst @@ -36,3 +36,12 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.command.options`` package provides command-line argument parsing and exports: + +.. py:currentmodule:: cryptnoxpro.command.options + +.. py:function:: add(subparsers, command_class) + :no-index: + + Add command-line options for a command class. See :func:`cryptnoxpro.command.options.options.add` for details. + diff --git a/docs/cryptnoxpro.command.rst b/docs/cryptnoxpro.command.rst index 42008a3..f04e52f 100644 --- a/docs/cryptnoxpro.command.rst +++ b/docs/cryptnoxpro.command.rst @@ -200,3 +200,6 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.command`` package provides command-line interface commands for interacting with Cryptnox cards. +This package contains all command implementations that can be executed from the CLI. + diff --git a/docs/cryptnoxpro.command.user_keys.rst b/docs/cryptnoxpro.command.user_keys.rst index cc089ce..94133ff 100644 --- a/docs/cryptnoxpro.command.user_keys.rst +++ b/docs/cryptnoxpro.command.user_keys.rst @@ -38,3 +38,27 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.command.user_keys`` package provides authentication functionality and exports: + +.. py:currentmodule:: cryptnoxpro.command.user_keys + +.. py:function:: add(data) + :no-index: + + Add a new authentication method. See :func:`cryptnoxpro.command.user_keys.authentication.add` for details. + +.. py:function:: authenticate(data) + :no-index: + + Authenticate using a configured method. See :func:`cryptnoxpro.command.user_keys.authentication.authenticate` for details. + +.. py:function:: delete(data) + :no-index: + + Delete an authentication method. See :func:`cryptnoxpro.command.user_keys.authentication.delete` for details. + +.. py:function:: get(data) + :no-index: + + Get information about authentication methods. See :func:`cryptnoxpro.command.user_keys.authentication.get` for details. + diff --git a/docs/cryptnoxpro.lib.cryptos.coins.rst b/docs/cryptnoxpro.lib.cryptos.coins.rst index 6699707..a19a6b9 100644 --- a/docs/cryptnoxpro.lib.cryptos.coins.rst +++ b/docs/cryptnoxpro.lib.cryptos.coins.rst @@ -28,3 +28,12 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.lib.cryptos.coins`` package provides cryptocurrency coin implementations and exports: + +.. py:currentmodule:: cryptnoxpro.lib.cryptos.coins + +.. py:class:: Bitcoin + :no-index: + + Bitcoin cryptocurrency implementation. See :class:`cryptnoxpro.lib.cryptos.coins.bitcoin.Bitcoin` for details. + diff --git a/docs/cryptnoxpro.lib.cryptos.rst b/docs/cryptnoxpro.lib.cryptos.rst index e042543..b7a8289 100644 --- a/docs/cryptnoxpro.lib.cryptos.rst +++ b/docs/cryptnoxpro.lib.cryptos.rst @@ -140,3 +140,19 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.lib.cryptos`` package provides cryptocurrency utilities and re-exports functionality from: + +* :mod:`cryptnoxpro.lib.cryptos.blocks` - Block-related utilities +* :mod:`cryptnoxpro.lib.cryptos.composite` - Composite key handling +* :mod:`cryptnoxpro.lib.cryptos.deterministic` - Deterministic wallet functions +* :mod:`cryptnoxpro.lib.cryptos.main` - Main crypto operations +* :mod:`cryptnoxpro.lib.cryptos.mnemonic` - Mnemonic phrase handling +* :mod:`cryptnoxpro.lib.cryptos.specials` - Special cryptocurrency operations +* :mod:`cryptnoxpro.lib.cryptos.stealth` - Stealth address support +* :mod:`cryptnoxpro.lib.cryptos.transaction` - Transaction handling +* :mod:`cryptnoxpro.lib.cryptos.coins` - Coin implementations +* :mod:`cryptnoxpro.lib.cryptos.keystore` - Key storage utilities +* :mod:`cryptnoxpro.lib.cryptos.wallet` - Wallet functionality + +All public members from these modules are available directly from ``cryptnoxpro.lib.cryptos``. + diff --git a/docs/cryptnoxpro.lib.rst b/docs/cryptnoxpro.lib.rst index ed15d2d..541ae76 100644 --- a/docs/cryptnoxpro.lib.rst +++ b/docs/cryptnoxpro.lib.rst @@ -17,3 +17,6 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.lib`` package provides library functionality for cryptocurrency operations. +The main subpackage is :mod:`cryptnoxpro.lib.cryptos` which contains comprehensive cryptocurrency utilities. + diff --git a/docs/cryptnoxpro.rst b/docs/cryptnoxpro.rst index 20f3b56..7407f2d 100644 --- a/docs/cryptnoxpro.rst +++ b/docs/cryptnoxpro.rst @@ -54,3 +54,11 @@ Module contents :undoc-members: :show-inheritance: +The main ``cryptnoxpro`` package exports: + +.. py:data:: __version__ + :type: str + :value: "2.9.1" + + Current version of the CryptnoxPro package. + diff --git a/docs/cryptnoxpro.wallet.eth.rst b/docs/cryptnoxpro.wallet.eth.rst index 51b3c9e..7537fed 100644 --- a/docs/cryptnoxpro.wallet.eth.rst +++ b/docs/cryptnoxpro.wallet.eth.rst @@ -28,3 +28,27 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.wallet.eth`` package provides Ethereum wallet utilities and exports: + +.. py:currentmodule:: cryptnoxpro.wallet.eth + +.. py:function:: address(public_key) + :no-index: + + Generate an Ethereum address from a public key. See :func:`cryptnoxpro.wallet.eth.api.address` for details. + +.. py:class:: Api + :no-index: + + Ethereum API interface. See :class:`cryptnoxpro.wallet.eth.api.Api` for details. + +.. py:function:: checksum_address(address_str) + :no-index: + + Convert an address to checksummed format. See :func:`cryptnoxpro.wallet.eth.api.checksum_address` for details. + +.. py:class:: EthValidator + :no-index: + + Ethereum address and transaction validator. See :class:`cryptnoxpro.wallet.eth.api.EthValidator` for details. + diff --git a/docs/cryptnoxpro.wallet.rst b/docs/cryptnoxpro.wallet.rst index f930f56..843535b 100644 --- a/docs/cryptnoxpro.wallet.rst +++ b/docs/cryptnoxpro.wallet.rst @@ -36,3 +36,6 @@ Module contents :undoc-members: :show-inheritance: +The ``cryptnoxpro.wallet`` package provides wallet functionality for various cryptocurrencies. +It includes Bitcoin wallet operations, Ethereum wallet utilities, and validation functions. + From a14cf93132675db8779f016ad587eac6b8871f6a Mon Sep 17 00:00:00 2001 From: YanNaingWinDev Date: Wed, 29 Oct 2025 15:53:04 +0700 Subject: [PATCH 2/3] Modified readme and documentation config --- README.rst | 4 ---- docs/conf.py | 5 ----- 2 files changed, 9 deletions(-) diff --git a/README.rst b/README.rst index c184576..ae4b35b 100644 --- a/README.rst +++ b/README.rst @@ -6,10 +6,6 @@ Cryptnox Pro :target: https://pypi.org/project/cryptnoxpro -**Warning: This is a beta release of the software. -It is released for development purposes. -Use at your own risk.** - A command line user interface to manage and use of `Cryptnox Smart cards `_. This provides basic wallets for `Bitcoin `_ and diff --git a/docs/conf.py b/docs/conf.py index 5e34592..0dfd197 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -96,11 +96,6 @@ 'exclude-members': '__weakref__' } -# Allow autodoc to import modules with errors -autodoc_inherit_docstrings = True -autodoc_typehints = 'description' -autodoc_typehints_description_target = 'documented' - # Set autodoc to not fail on import errors autoclass_content = 'both' From 1f6a1f9e979c7986bda0efba02e1472f654a6941 Mon Sep 17 00:00:00 2001 From: YanNaingWinDev Date: Wed, 29 Oct 2025 15:58:16 +0700 Subject: [PATCH 3/3] Modified readme --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index ae4b35b..38c608b 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,6 @@ Cryptnox Pro .. image:: https://img.shields.io/pypi/v/cryptnoxpro :target: https://pypi.org/project/cryptnoxpro - A command line user interface to manage and use of `Cryptnox Smart cards `_. This provides basic wallets for `Bitcoin `_ and