Skip to content

Commit

Permalink
Change: The docs theme from sphinx_rtd_theme to furo template.
Browse files Browse the repository at this point in the history
  • Loading branch information
meherett committed Dec 25, 2021
1 parent 1c1a3ca commit 0644caf
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 28 deletions.
18 changes: 2 additions & 16 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@
Command Line Interface (CLI)
============================

After you have installed, type ``hdwallet`` to verify that it worked:

::

$ hdwallet
Usage: hdwallet [OPTIONS] COMMAND [ARGS]...

Options:
-v, --version Show HDWallet version and exit.
-h, --help Show this message and exit.

Commands:
generate (g) Select Generate for HDWallet.
list (l) Select List for HDWallet information.


.. image:: static/gif/hdwallet.gif
:alt: HDWallet CLI

.. click:: hdwallet.cli.__main__:main
:prog: hdwallet
Expand Down
20 changes: 17 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "sphinx_rtd_theme"
html_theme = "furo"
# Product logo name
# html_logo = "static/png/hdwallet.png"
# Theme options
html_theme_options = {
# "canonical_url": "",
# "analytics_id": "UA-XXXXXXX-1", # Provided by Google in your dashboard
"logo_only": False,
"display_version": True,
# "logo_only": False,
# "display_version": True,
# "prev_next_buttons_location": "bottom",
# "style_external_links": False,
# "vcs_pageview_mode": "",
Expand All @@ -75,6 +75,20 @@
# "navigation_depth": 4,
# "includehidden": True,
# "titles_only": False

# "light_css_variables": {
# "color-brand-primary": "darkblue",
# "color-brand-content": "darkblue",
# "color-admonition-background": "black",
# },
# "dark_css_variables": {
# "color-brand-primary": "green",
# "color-brand-content": "green",
# "color-admonition-background": "white",
# },
# "sidebar_hide_name": True,
# "navigation_with_keys": True,
# "announcement": "<em>Important</em> announcement!",
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
12 changes: 7 additions & 5 deletions docs/cryptocurrencies.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
:orphan:

==========================
Available Cryptocurrencies
==========================
================
Cryptocurrencies
================

This library simplifies the process of generating a new HDWallet's for:

.. note::

All Cryptocurrencies testnet networks default paths are set to ``m/44'/1'/0'/0/0`` value.

.. list-table::
:widths: 25 25 25 25 15 25 50
:header-rows: 1
Expand Down Expand Up @@ -997,5 +1001,3 @@ This library simplifies the process of generating a new HDWallet's for:
- No
- 121
- m/44'/121'/0'/0/0

**NOTICE:** All Cryptocurrencies testnet networks default paths are set to ``m/44'/1'/0'/0/0`` value.
109 changes: 106 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,119 @@
Hierarchical Deterministic Wallet
=================================

|Build Status| |PyPI Version| |Documentation Status| |PyPI License| |PyPI Python Version| |Coverage Status|

.. |Build Status| image:: https://travis-ci.org/meherett/python-hdwallet.svg?branch=master
:target: https://travis-ci.org/meherett/python-hdwallet?branch=master

.. |PyPI Version| image:: https://img.shields.io/pypi/v/hdwallet.svg?color=blue
:target: https://pypi.org/project/hdwallet

.. |Documentation Status| image:: https://readthedocs.org/projects/hdwallet/badge/?version=master
:target: https://hdwallet.readthedocs.io/en/master/?badge=master

.. |PyPI License| image:: https://img.shields.io/pypi/l/hdwallet?color=black
:target: https://pypi.org/project/hdwallet

.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/hdwallet.svg
:target: https://pypi.org/project/hdwallet

.. |Coverage Status| image:: https://coveralls.io/repos/github/meherett/python-hdwallet/badge.svg?branch=master
:target: https://coveralls.io/github/meherett/python-hdwallet?branch=master

Python-based library for the implementation of a hierarchical deterministic wallet generator for over 140+ multiple cryptocurrencies.
It allows the handling of multiple coins, multiple accounts, external and internal chains per account and millions of addresses per the chain.

.. image:: static/gif/hdwallet.gif
:alt: HDWallet CLI
Simple Bitcoin mainnet HDWallet generator:

::

#!/usr/bin/env python3

from hdwallet import HDWallet
from hdwallet.utils import generate_entropy
from hdwallet.symbols import BTC as SYMBOL
from typing import Optional

import json

# Choose strength 128, 160, 192, 224 or 256
STRENGTH: int = 160 # Default is 128
# Choose language english, french, italian, spanish, chinese_simplified, chinese_traditional, japanese or korean
LANGUAGE: str = "korean" # Default is english
# Generate new entropy hex string
ENTROPY: str = generate_entropy(strength=STRENGTH)
# Secret passphrase for mnemonic
PASSPHRASE: Optional[str] = None # "meherett"

# Initialize Bitcoin mainnet HDWallet
hdwallet: HDWallet = HDWallet(symbol=SYMBOL, use_default_path=False)
# Get Bitcoin HDWallet from entropy
hdwallet.from_entropy(
entropy=ENTROPY, language=LANGUAGE, passphrase=PASSPHRASE
)

# Derivation from path
# hdwallet.from_path("m/44'/0'/0'/0/0")
# Or derivation from index
hdwallet.from_index(44, hardened=True)
hdwallet.from_index(0, hardened=True)
hdwallet.from_index(0, hardened=True)
hdwallet.from_index(0)
hdwallet.from_index(0)

# Print all Bitcoin HDWallet information's
print(json.dumps(hdwallet.dumps(), indent=4, ensure_ascii=False))

.. raw:: html

<details open>
<summary>Output</summary>

.. code-block:: python
{
"cryptocurrency": "Bitcoin",
"symbol": "BTC",
"network": "mainnet",
"strength": 160,
"entropy": "c5b0d0ee698f3f72b6265f1bc591f8f2d7afa6dd",
"mnemonic": "주일 액수 명단 천둥 해수욕장 전망 추천 직업 그룹 단위 신체 파란색 시청 천천히 스트레스",
"language": "korean",
"passphrase": null,
"seed": "5a9b9667ccd07b3c641b1ba95e9119dd1d5a3034fd46cd2f27fc1f160c7dcd824fc0ab4710a9ae90582dffc3b0803bcbc0a8160feeaab4c70511c5035859decf",
"root_xprivate_key": "xprv9s21ZrQH143K2qMHU8aghJ4MoQR5g5mowXbeP2vCP937bseZGX929dmJudL7u4xRxtKvh58pxz1PhtCbWW2yUH14jdduKVMV9FkBMpM2Hyw",
"root_xpublic_key": "xpub661MyMwAqRbcFKRkaA7h4S16MSFa5YVfJkXFBRKowUa6Ufyhp4TGhS5nkvkLXSmdNjoszzDkU26WW2rg1zBsQBt6Pv3T8oLEAExGHD3hcQs",
"xprivate_key": "xprvA2YyMZWyPK2xo4eZgyypp2CzcHnxNzGbruGg7vmgaAVCtBtrjwzuhXJBNM3FrwBh85ajxHErNR6ByN77WJARpC1HDC7kTwa2yr7Mu9Pz5Qq",
"xpublic_key": "xpub6FYKm53sDgbG1Yj2o1WqBA9jAKdSnSzTE8CGvKBJ8W2BkzE1HVKAFKcfDcCHKpL5BQRg2HjbNSt55jpFshY7W1KFtp7zjB3DhNAmiFv6kzB",
"uncompressed": "081016370b45d7e23bd89b07d6886036f5e4df9a129eee3b488c177ba7881856e24d337b280f9d32539a22445e567543b39b708edf5289442f36dcde958a3433",
"compressed": "03081016370b45d7e23bd89b07d6886036f5e4df9a129eee3b488c177ba7881856",
"chain_code": "cf9ee427ed8073e009a5743056e8cf19167f67ca5082c2c6635b391e9a4e0b0d",
"private_key": "f79495fda777197ce73551bcd8e162ceca19167575760d3cc2bced4bf2a213dc",
"public_key": "03081016370b45d7e23bd89b07d6886036f5e4df9a129eee3b488c177ba7881856",
"wif": "L5WyVfBu8Sz3iGZtrwJVSP2wDJmu7HThGd1EGekFBnviWgzLXpJd",
"finger_print": "ac13e305",
"semantic": "p2pkh",
"path": "m/44'/0'/0'/0/0",
"hash": "ac13e305a88bd9968f1c058fcf5d9a6b1b9ef484",
"addresses": {
"p2pkh": "1Ggs3kkNrPPWoW17iDFQWgMdw3CD8BzBiv",
"p2sh": "3GQVUFePz517Hf61Vsa9H2tHj5jw5y6ngV",
"p2wpkh": "bc1q4sf7xpdg30vedrcuqk8u7hv6dvdeaayy3uw5cj",
"p2wpkh_in_p2sh": "3JyV5aSgdVYEjQodPWHfvehQ5227EDr3sN",
"p2wsh": "bc1qnk0s9q4379n6v9vg0lnhdu5qhjyx99u2xm238pmckmjg9v29q54saddzp9",
"p2wsh_in_p2sh": "3MmsEoP7GLHzuLVgkAtcRtyXLTWh8zNAcd"
}
}
.. raw:: html

</details>

For more info see the BIP specs.

.. list-table::
:widths: 15 80
:widths: 10 185
:header-rows: 1

* - BIP's
Expand Down
14 changes: 14 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ If you want to run the latest version of the code, you can install from git:

$ pip install git+git://github.com/meherett/python-hdwallet.git

After you have installed, type ``hdwallet`` to verify that it worked:

::

$ hdwallet
Usage: hdwallet [OPTIONS] COMMAND [ARGS]...

Options:
-v, --version Show HDWallet version and exit.
-h, --help Show this message and exit.

Commands:
generate (g) Select Generate for HDWallet.
list (l) Select List for HDWallet information.

For the versions available, see the `tags on this repository <https://github.com/meherett/python-hdwallet/tags>`_.

Expand Down
2 changes: 1 addition & 1 deletion docs/toctree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ HDWallet
Overview <index.rst>
install.rst
cli.rst
Cryptocurrencies <cryptocurrencies.rst>
Available Cryptocurrencies <cryptocurrencies.rst>

.. toctree::
:maxdepth: 3
Expand Down

0 comments on commit 0644caf

Please sign in to comment.