From 0594657203b4c75678537652221f8f6666c7083f Mon Sep 17 00:00:00 2001 From: meherett Date: Tue, 10 Oct 2023 12:01:45 +0300 Subject: [PATCH] Update: all qtum-bip38 names, values, and docs. --- .coveragerc | 2 - .coveralls.yml | 1 - .../{pythonpackage.yml => workflow.yml} | 4 +- .readthedocs.yaml | 23 - .travis.yml | 16 - CONTRIBUTING.md | 55 -- LICENSE | 2 +- README.md | 260 +++++----- docs/bip38.rst | 9 - docs/conf.py | 104 ---- docs/index.html | 484 ----------------- docs/index.rst | 486 ------------------ docs/static/css/bip38.css | 3 - docs/toctree.rst | 15 - docs/utils.rst | 8 - examples/__init__.py | 33 ++ ...c-multiply, compression, lot-&-sequence.py | 4 +- ...ultiply, compression, no-lot-&-sequence.py | 4 +- ...ultiply, no-compression, lot-&-sequence.py | 4 +- ...iply, no-compression, no-lot-&-sequence.py | 4 +- examples/no-ec-multiply, compression.py | 4 +- examples/no-ec-multiply, no-compression.py | 4 +- pytest.ini | 2 +- setup.py | 19 +- tests/test_bip38.py | 2 +- tests/test_utils.py | 2 +- tests/values.json | 30 +- tox.ini | 29 -- 28 files changed, 191 insertions(+), 1422 deletions(-) delete mode 100644 .coveragerc delete mode 100644 .coveralls.yml rename .github/workflows/{pythonpackage.yml => workflow.yml} (92%) delete mode 100644 .readthedocs.yaml delete mode 100644 .travis.yml delete mode 100644 CONTRIBUTING.md delete mode 100644 docs/bip38.rst delete mode 100644 docs/conf.py delete mode 100644 docs/index.html delete mode 100644 docs/index.rst delete mode 100644 docs/static/css/bip38.css delete mode 100644 docs/toctree.rst delete mode 100644 docs/utils.rst delete mode 100644 tox.ini diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index ee43033..0000000 --- a/.coveragerc +++ /dev/null @@ -1,2 +0,0 @@ -[run] -omit = bip38/libs/* diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 6eca43b..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: YESCvaqoulzNhZ29qxJW7N869QnCCXY9K diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/workflow.yml similarity index 92% rename from .github/workflows/pythonpackage.yml rename to .github/workflows/workflow.yml index cf24bcd..bb59e2c 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/workflow.yml @@ -1,6 +1,6 @@ # This workflow will install Swap package dependencies, run tests and lint with a variety of Python versions. -name: bip38-workflow +name: workflow on: push: @@ -29,6 +29,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e .[tests,docs] + pip install -e .[tests] - name: Test with pytest run: pytest diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index de81385..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# .readthedocs.yaml - -version: 2 - -build: - os: ubuntu-22.04 - tools: - python: "3.11" - -python: - install: - - method: pip - path: . - extra_requirements: - - cli - - docs - -formats: all - -sphinx: - builder: html - configuration: docs/conf.py - fail_on_warning: false diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e17c725..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: python -dist: bionic -before_install: - - python -m pip install --upgrade pip -install: - - pip install -e .[tests,docs] tox-travis coveralls -matrix: - include: - - name: "3.9" - python: 3.9 - - name: "3.10" - python: 3.10 - - name: "3.11" - python: 3.11 -script: tox -after_success: if [ "${TRAVIS_PYTHON_VERSION}" == "3.11" ]; then coveralls; fi; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 9dcae67..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,55 +0,0 @@ -# Contributing to BIP38 - -First off, thanks for taking the time to contribute and -when contributing to this repository, please first discuss -the change you wish to make via [issue](https://github.com/meherett/bip38/issues) -with the owners of this repository before making a change. - -## Development - -To get started, just fork this repo, clone it locally, and run: - -``` -pip install -e .[tests,docs] -r requirements.txt -``` - -## Pull Request - -Add notes for pushing your branch: - -> When you are ready to generate a pull request, either for preliminary review, -or for consideration of merging into the project you must first push your local -topic branch back up to GitHub. - -Include a note about submitting the PR: - -> Once you've committed and pushed all of your changes to GitHub, go to the page -for your fork on GitHub, select your development branch, and click the pull request -button. If you need to make any adjustments to your pull request, just push the updates -to your branch. Your pull request will automatically track the changes on your -development branch and update. - -```commandline -git push origin new-feature -``` - -- Fork the repository and make a branch for your translation. -- Ensure any install or build dependencies are removed before the end of the layer when doing a build. -- Include any relevant documentation updates - -GitHub's documentation for working on pull requests is [available here](https://help.github.com/articles/about-pull-requests/). - -## Testing - -You can run the tests with: - -``` -pytest -``` - -Or use `tox` to run the complete suite against the full set of build targets, or pytest to run specific -tests against a specific version of Python. - -## License - -Distributed under the [ISC](https://github.com/meherett/python-bip38/blob/master/LICENSE) license. See ``LICENSE`` for more information. diff --git a/LICENSE b/LICENSE index 6495eb5..2c1be90 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright © 2023, Meheret Tesfaye Batu or +Copyright © 2023, Meheret Tesfaye Batu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 55962bc..29a0c08 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,34 @@ -# Bitcoin Improvement Proposal - 0038 / BIP38 +# Qtum-BIP38 -[![Build Status](https://app.travis-ci.com/meherett/python-bip38.svg?branch=master)](https://app.travis-ci.com/meherett/python-bip38) -[![PyPI Version](https://img.shields.io/pypi/v/bip38.svg?color=blue)](https://pypi.org/project/bip38) -[![Documentation Status](https://readthedocs.org/projects/bip38/badge/?version=master)](https://bip38.readthedocs.io) -[![PyPI License](https://img.shields.io/pypi/l/bip38?color=black)](https://pypi.org/project/bip38) -[![PyPI Python Version](https://img.shields.io/pypi/pyversions/bip38.svg)](https://pypi.org/project/bip38) -[![Coverage Status](https://coveralls.io/repos/github/meherett/python-bip38/badge.svg?branch=master)](https://coveralls.io/github/meherett/python-bip38) +[![GitHub Workflow](https://github.com/qtumproject/qtum-bip38/actions/workflows/workflow.yml/badge.svg)](https://github.com/qtumproject/qtum-bip38) +[![PyPI Version](https://img.shields.io/pypi/v/qtum-bip38.svg?color=blue)](https://pypi.org/project/qtum-bip38) +[![PyPI License](https://img.shields.io/pypi/l/qtum-bip38?color=black)](https://pypi.org/project/qtum-bip38) +[![PyPI Python Version](https://img.shields.io/pypi/pyversions/qtum-bip38.svg)](https://pypi.org/project/qtum-bip38) -Python library for implementation of Bitcoin Improvement Proposal - 0038 / BIP38 protocol. It supports both [No EC-multiply](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki#encryption-when-ec-multiply-flag-is-not-used) and [EC-multiply](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki#encryption-when-ec-multiply-mode-is-used) modes. - -BIP38 is a cryptographic standard that defines a method for encrypting and securing private keys associated with Bitcoin addresses. It provides a way to create encrypted versions of private keys, which can then be decrypted using a passphrase. This adds an additional layer of security to the process of storing and transmitting private keys. - -By encrypting a private key with BIP38, users can protect their funds even if the encrypted private key is exposed. This is because an attacker would need to know the passphrase in order to decrypt the private key and gain access to the associated funds. BIP38 encryption is often used to create "paper wallets" or physical copies of Bitcoin private keys that can be stored offline for enhanced security. +Python library for implementation of BIP38 for Qtum. It supports both [No EC-multiply](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki#encryption-when-ec-multiply-flag-is-not-used) and [EC-multiply](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki#encryption-when-ec-multiply-mode-is-used) modes. For more info see the [Passphrase-protected private key - BIP38](https://en.bitcoin.it/wiki/BIP_0038) spec. ## Installation -The easiest way to install `bip38` is via pip: +The easiest way to install `qtum-bip38` is via pip: ``` -pip install bip38 +pip install qtum-bip38 ``` If you want to run the latest version of the code, you can install from the git: ``` -pip install git+git://github.com/meherett/python-bip38.git +pip install git+git://github.com/qtumproject/qtum-bip38.git ``` +## Documentation + +Read here: https://bip38.readthedocs.io + +When you import, replace `bip38` to `qtum_bip38` package name. + ## Quick Usage ##### no EC multiply: @@ -36,7 +36,7 @@ pip install git+git://github.com/meherett/python-bip38.git ```python #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( private_key_to_wif, bip38_encrypt, bip38_decrypt ) from typing import List @@ -46,7 +46,7 @@ import json # Private key PRIVATE_KEY: str = "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5" # Passphrase / password -PASSPHRASE: str = "meherett" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" +PASSPHRASE: str = "qtum123" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" # To show detail DETAIL: bool = True # Wallet important format's @@ -75,8 +75,8 @@ for WIF in WIFs: Output
```shell -WFI: 5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR -BIP38 Encrypted WIF: 6PRVWUbkzNehVoPSCKYviigdnwsck69PLiMPpTVWGENzUAy7spnAZqnxit +WIF: 5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR +BIP38 Encrypted WIF: 6PRP4FDk4BWidB539rEWBH26DRcG2tavQg52WRcyuK5dxMdu8WHVftRZof BIP38 Decrypted: { "wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", @@ -84,13 +84,13 @@ BIP38 Decrypted: { "public_key": "04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", "public_key_type": "uncompressed", "seed": null, - "address": "1Jq6MksXQVWzrznvZzxkV6oY57oWXD9TXB", + "address": "QeS5U4AEaxPpJ8swzLHEcNbAaNkDfpWjQN", "lot": null, "sequence": null } ----------------------------------------------------------------------------------------------------------------------------- -WFI: L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP -BIP38 Encrypted WIF: 6PYNKZ1EASfdDgcUgtxxRi7DkYPTXzwYUzEqzDxv2H8QbeKDV9D9wBWUA7 +WIF: L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP +BIP38 Encrypted WIF: 6PYUYP8xySgSbqtYXHGfWUn1xL9F3r9qKru8CUbqeK94QSrJcrSAmZoaEd BIP38 Decrypted: { "wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", @@ -98,7 +98,7 @@ BIP38 Decrypted: { "public_key": "02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", "public_key_type": "compressed", "seed": null, - "address": "164MQi977u9GUteHr4EPH27VkkdxmfCvGW", + "address": "QRfLX1RpJN25v2jKGPYsQHu8G1ag3sHJeL", "lot": null, "sequence": null } @@ -111,7 +111,7 @@ BIP38 Decrypted: { ```python #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt ) from typing import List @@ -120,7 +120,7 @@ import json import os # Passphrase / password -PASSPHRASE: str = "meherett" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" +PASSPHRASE: str = "qtum123" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" # To show detail DETAIL: bool = True # List of samples with owner salt, seed, public key type, lot, and sequence @@ -170,226 +170,226 @@ for SAMPLE in SAMPLES: Output
```shell -Intermediate Passphrase: passphraseqtFiMLZSKYBJo6ZdivCqkPyMX3bnPFnedQRtEHWHmADXqEfSyJHE1CLuTbF6Wf +Intermediate Passphrase: passphraserBh92DkAgrAfqUTZoL8daK85X4UtSzQnEFABTmZf6prj1bAa6kPihApMd92xmw Encrypted WIF: { - "encrypted_wif": "6PfPd3hFPNjBMqirrvSSgEtDnErh9BzqK1NUdk6fiQCaN7LwdGFus4PhQV", - "confirmation_code": "cfrm38V5QE7EN2eF9SfWsesQCjJZSoSjc5YiqLDCgEJoqEDoV2D9f7NRXSqQHsWb3MKogaN8zAs", - "public_key": "0412bb1ec0a2fa1e7c90f4061578d8deeaa6984c9ec5c37717546fb0d127573a03f3050a9f7cb24f62e107c43470388531193fcd8b878618cf74e1d71698069e07", - "seed": "d010fe7f60a25982f3ee7e056e1bcd027f1c15bd26ddd221", + "encrypted_wif": "6PfVzPRrrLrv3geDZV6GWcLfGRHBGagK31jBTTBd5f5QknK2S1p1ajLMe6", + "confirmation_code": "cfrm38V5kycvZygpKdQmq3TjNED2womqd24UgVxFaxCuBnEAqp1aCUqQLSSAJBifBkcQDj33EcP", + "public_key": "0440097fbf7fc6a3dea0962ee4e1701a9cd3964eb0223f243b759e1c04fda754ab88efcdb76753217c7d7b6456932bb8d77e5db1b4de3b22ce561d5daec1c8f809", + "seed": "8637d0313eac9aab134ace0d010cf7856ffd2275cd4aba4c", "public_key_type": "uncompressed", - "address": "1CHsGDzDbZJPVKiC9hUKe1hnAevwu5RTKi" + "address": "QTPiD2P1zBz5fiGXxBkLdDyhySqTR7dvuy" } Confirm Code: { - "public_key": "0412bb1ec0a2fa1e7c90f4061578d8deeaa6984c9ec5c37717546fb0d127573a03f3050a9f7cb24f62e107c43470388531193fcd8b878618cf74e1d71698069e07", + "public_key": "0440097fbf7fc6a3dea0962ee4e1701a9cd3964eb0223f243b759e1c04fda754ab88efcdb76753217c7d7b6456932bb8d77e5db1b4de3b22ce561d5daec1c8f809", "public_key_type": "uncompressed", - "address": "1CHsGDzDbZJPVKiC9hUKe1hnAevwu5RTKi", + "address": "QTPiD2P1zBz5fiGXxBkLdDyhySqTR7dvuy", "lot": null, "sequence": null } BIP38 Decrypted: { - "wif": "5Jp53JGVEkX2dxXXJyb2UdJw3259yk3YjJCdhcHA3eXpJsr6PBB", - "private_key": "83348354ac6638ad7ea78505bd85ff96485e17edcffe85572df9a66f997e1324", + "wif": "5JSLzkUVB6ifEHgQBYrNKBpupV9SFccSfYiVjazAu3bpykVLJ5z", + "private_key": "51e047d800758ea123d778f0bc7b375ef7a4a980ed5defaa9d535bc22d728e60", "wif_type": "wif", - "public_key": "0412bb1ec0a2fa1e7c90f4061578d8deeaa6984c9ec5c37717546fb0d127573a03f3050a9f7cb24f62e107c43470388531193fcd8b878618cf74e1d71698069e07", + "public_key": "0440097fbf7fc6a3dea0962ee4e1701a9cd3964eb0223f243b759e1c04fda754ab88efcdb76753217c7d7b6456932bb8d77e5db1b4de3b22ce561d5daec1c8f809", "public_key_type": "uncompressed", - "seed": "d010fe7f60a25982f3ee7e056e1bcd027f1c15bd26ddd221", - "address": "1CHsGDzDbZJPVKiC9hUKe1hnAevwu5RTKi", + "seed": "8637d0313eac9aab134ace0d010cf7856ffd2275cd4aba4c", + "address": "QTPiD2P1zBz5fiGXxBkLdDyhySqTR7dvuy", "lot": null, "sequence": null } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphrasedcXyya37d7imwPshCWV77N6SdDCXCGkbUDQ8dgg39Xutzej2UoNTRXCWjcVSk3 +Intermediate Passphrase: passphrasea9wRhemdARJDoZzZMiVcmZaBrQYhofqaNuTAHgLyQmoUjLmpwFtyzFvjcoPRqA Encrypted WIF: { - "encrypted_wif": "6PgHqxpPU2tA4rqjL5gMMkqeahFRRDDe3g1jJy5mhQdNasT1WtwEkzGcdk", - "confirmation_code": "cfrm38V8LPy6dJTRpd7Qs74zLAdE26F3ZGqJ1Dmr5HheKY2miBwbJMdk1qY6VhZDjNJkitu5Di5", - "public_key": "049b3dcf56a38df3a2437055f2ad3aec950a54f7205bbcc9949d5299ee4e0215d0924a756dce3baf3356da8465341ebf1c580c4ee13e2602508df57ec49a15e981", - "seed": "8195ac15d84c139531faec482a9d312f86f79242acb728a7", + "encrypted_wif": "6PgP82oWUAUAVAT41HBXsWih74ZSC5GT5dMbFWoxPYgLHHYbgo3XM7yJ3C", + "confirmation_code": "cfrm38V8dbJk9zPFcbN84DF4u4mnkGBMrmM56rtWQyt22aDLNqfYmgEyYuLVq1uEW41LdqVfaf7", + "public_key": "045c68c340753c4f416f44cf94eaa2240f0ed054332c87d9a6c4e0bcb4f6f5ebaaaf325b62f066a4e561ec1fd8d3bc546cddbe97889c59a2fd60e2d89b101a1171", + "seed": "88cfd3b2a526ff29a62d429e52e597c24af6465edd011de3", "public_key_type": "uncompressed", - "address": "17YeFTwCoxVhz5P8KiGHv4d8JwUEwPUbhj" + "address": "Qf5NdtPRxsNeUTPckEyMW6cc7JpipJRJSw" } Confirm Code: { - "public_key": "049b3dcf56a38df3a2437055f2ad3aec950a54f7205bbcc9949d5299ee4e0215d0924a756dce3baf3356da8465341ebf1c580c4ee13e2602508df57ec49a15e981", + "public_key": "045c68c340753c4f416f44cf94eaa2240f0ed054332c87d9a6c4e0bcb4f6f5ebaaaf325b62f066a4e561ec1fd8d3bc546cddbe97889c59a2fd60e2d89b101a1171", "public_key_type": "uncompressed", - "address": "17YeFTwCoxVhz5P8KiGHv4d8JwUEwPUbhj", + "address": "Qf5NdtPRxsNeUTPckEyMW6cc7JpipJRJSw", "lot": 863741, "sequence": 1 } BIP38 Decrypted: { - "wif": "5KGpex1ZJaPoG2L6cHtzAU1nM9un8nw3uD8d6v8xGJs6M6q9qQj", - "private_key": "bff2e24adfd0323ecd0b969cb3768adba578a0ea503306fd647e6b11e8739d70", + "wif": "5JhYHSPBT4XHuzyjGgxiL6be1zGJzQGoSrRRm7ijWccASdLiCkC", + "private_key": "746098bcac5ecbd247f8fd1ca75340bc95bffa53e800169deb77b7e7143b246b", "wif_type": "wif", - "public_key": "049b3dcf56a38df3a2437055f2ad3aec950a54f7205bbcc9949d5299ee4e0215d0924a756dce3baf3356da8465341ebf1c580c4ee13e2602508df57ec49a15e981", + "public_key": "045c68c340753c4f416f44cf94eaa2240f0ed054332c87d9a6c4e0bcb4f6f5ebaaaf325b62f066a4e561ec1fd8d3bc546cddbe97889c59a2fd60e2d89b101a1171", "public_key_type": "uncompressed", - "seed": "8195ac15d84c139531faec482a9d312f86f79242acb728a7", - "address": "17YeFTwCoxVhz5P8KiGHv4d8JwUEwPUbhj", + "seed": "88cfd3b2a526ff29a62d429e52e597c24af6465edd011de3", + "address": "Qf5NdtPRxsNeUTPckEyMW6cc7JpipJRJSw", "lot": 863741, "sequence": 1 } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphraseoH4GEqnBR53ipb9gwLfbJM8nKMx4LnZPCzYbvgPyR2zYkF5DqKrW2gf8DZ8s7y +Intermediate Passphrase: passphrasemh3J6kj36t1846BnPFZL1caQN55pJfdcSSCztsQLBzF3jETYppiU5xYSsZrC5e Encrypted WIF: { - "encrypted_wif": "6PnYW3V9jp8sKA4aMEWJjBvNTRtVYBCSRWb6Yja6xZqBhVVrDXWSnYz2at", - "confirmation_code": "cfrm38VUi8UMcgVUDQRSjjn1VxVLfHYQxphSRvAQYSU244oNwHoxt24UByEnUeqSbN6QatRVtaR", - "public_key": "022604144840ed73bc5055916e2e114efe2a706ee71033b48644e3e322a2c58dab", - "seed": "e0051112f4903c0bbe52dc698c031467bf4646040b6b12a3", + "encrypted_wif": "6PnSDkPgRS869GdKSHbUkm6VdKzUZiEtuDSUQUuYAJ2VumpTo3Y7cXbjFc", + "confirmation_code": "cfrm38VUMfQFA5nUna7HpkQoiQSWMmw64rnPF3Zwu6g6S6CnXoXDey3Ptovhr9DKZymFQRYnesB", + "public_key": "0208d6c6104daf76cdf8eb4ee75afd83b5776fd120e2d9a7cb78df5268fe534a37", + "seed": "4bc118a7011b225af9e475f21816e8e71d47c103846e19c2", "public_key_type": "compressed", - "address": "1EVSAfcUHG8Ce2CF74QwW58wSr7WY4QBaH" + "address": "QgCL3wEfZP7RPQ3RRhazRx9Buuq2PLLqoG" } Confirm Code: { - "public_key": "022604144840ed73bc5055916e2e114efe2a706ee71033b48644e3e322a2c58dab", + "public_key": "0208d6c6104daf76cdf8eb4ee75afd83b5776fd120e2d9a7cb78df5268fe534a37", "public_key_type": "compressed", - "address": "1EVSAfcUHG8Ce2CF74QwW58wSr7WY4QBaH", + "address": "QgCL3wEfZP7RPQ3RRhazRx9Buuq2PLLqoG", "lot": null, "sequence": null } BIP38 Decrypted: { - "wif": "Kz2v4F99WaPamvCC2LwGTwdr25TnUXUB991wKpVhHGxtJE6iAveq", - "private_key": "53f56bb7fc1a9e9682aa55be6e501776fc9ac2369654c6c85b00b87d41ab8229", + "wif": "L4ybEBRKhicidQbeGHjy4f4Wyvad5Kgnwk7FqeQntqwUMcr7ERF1", + "private_key": "e76f72811b89f63d88a7329eeedef16710ea66714672021a177e07fd5473f61a", "wif_type": "wif-compressed", - "public_key": "022604144840ed73bc5055916e2e114efe2a706ee71033b48644e3e322a2c58dab", + "public_key": "0208d6c6104daf76cdf8eb4ee75afd83b5776fd120e2d9a7cb78df5268fe534a37", "public_key_type": "compressed", - "seed": "e0051112f4903c0bbe52dc698c031467bf4646040b6b12a3", - "address": "1EVSAfcUHG8Ce2CF74QwW58wSr7WY4QBaH", + "seed": "4bc118a7011b225af9e475f21816e8e71d47c103846e19c2", + "address": "QgCL3wEfZP7RPQ3RRhazRx9Buuq2PLLqoG", "lot": null, "sequence": null } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphraseaWdkWraG6G7W9TCAhCtmoLXbFWdDYjrG8gtv2VPCY7mCvJgbFCoktRKm4ePsQU +Intermediate Passphrase: passphraseZi3JhthoBvhc8wenvQW7Hd7jBcmNjMKg544pQE2kVd5NCvt8qqoV6RLUaWZrEV Encrypted WIF: { - "encrypted_wif": "6PoHWWXXJTibxUGKcVmyts86N8rcTHXJpAoj5VeRf2FhJqj2oQgCsHheKg", - "confirmation_code": "cfrm38VX8GoZrei4jxLQKA6Mx2zSWkrQZPhxQW1FcCRjtizmQDoWoomm5SW63ESEAUuLkA8MFmc", - "public_key": "025f4476d9d8c093a04499fe9d7fbd34533dae14a498a2506a90d6cfdda66e99b3", - "seed": "1ac2513b9149124a0a0d697ae76cbb4583e85d4a652330a6", + "encrypted_wif": "6PoE1PPV7YBVbkPZLsKZGE3T6imCpuDq9pxF1v779xtzo4dd8W13tAn2qD", + "confirmation_code": "cfrm38VWvrvCAhjKDVmjnJp1dsTcJphB8YkK9jXygpLAEDQVCoeguazChN5JCpP6EsmWr5iB4wb", + "public_key": "036a8f9c1a4d769b7326037cea69009560dbdb35b749ce1b8e716485a8730cfc09", + "seed": "1140bf8c4f8c4ca09f90cce6da1ea8de1e43ac37165fe27f", "public_key_type": "compressed", - "address": "1ESHxrqxMLrdzwfif9nQbq4PTGhDGi1uq2" + "address": "QdxToVfxRc5PXtf28STR8u2JpmvpQsevF4" } Confirm Code: { - "public_key": "025f4476d9d8c093a04499fe9d7fbd34533dae14a498a2506a90d6cfdda66e99b3", + "public_key": "036a8f9c1a4d769b7326037cea69009560dbdb35b749ce1b8e716485a8730cfc09", "public_key_type": "compressed", - "address": "1ESHxrqxMLrdzwfif9nQbq4PTGhDGi1uq2", + "address": "QdxToVfxRc5PXtf28STR8u2JpmvpQsevF4", "lot": 863741, "sequence": 1 } BIP38 Decrypted: { - "wif": "L2otjF2N8EpKvh541jw1n3MrXZLpnCfQ2GB4eiGZLFwoSj1UHprw", - "private_key": "a6c57a43bf2a8ecc153b6b1e8807ec2409033616d4fc98a4edae277c02312eb7", + "wif": "L5BrcjdARTnCVjZa9AbeRR6GpZoP9bqp44Puj7VzvWeBUTYUu597", + "private_key": "edbebe261a5eca1164911bf523f890a4a99051947c34bec7df71db16b29cfb98", "wif_type": "wif-compressed", - "public_key": "025f4476d9d8c093a04499fe9d7fbd34533dae14a498a2506a90d6cfdda66e99b3", + "public_key": "036a8f9c1a4d769b7326037cea69009560dbdb35b749ce1b8e716485a8730cfc09", "public_key_type": "compressed", - "seed": "1ac2513b9149124a0a0d697ae76cbb4583e85d4a652330a6", - "address": "1ESHxrqxMLrdzwfif9nQbq4PTGhDGi1uq2", + "seed": "1140bf8c4f8c4ca09f90cce6da1ea8de1e43ac37165fe27f", + "address": "QdxToVfxRc5PXtf28STR8u2JpmvpQsevF4", "lot": 863741, "sequence": 1 } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphraseondJwvQGEWFNrNJRPi4G5XAL5SU777GwTNtqmDXqA3CGP7HXfH6AdBxxc5WUKC +Intermediate Passphrase: passphraseondJwvQGEWFNsbiN6AVu4r4dPFz4xeJoLg2vQGULvMzgYRKiGezwNDzaAxfX57 Encrypted WIF: { - "encrypted_wif": "6PfP7T3iQ5jLJLsH5DneySLLF5bhd879DHW87Pxzwtwvn2ggcncxsNKN5c", - "confirmation_code": "cfrm38V5NZfTZKRaRDTvFAMkNKqKAxTxdDjDdb5RpFfXrVRw7Nov5m2iP3K1Eg5QQRxs52kgapy", - "public_key": "04cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b09e25cb1d8628cd559c6c57c627fa486b8d452da89c1e9778ea967822188990a4", + "encrypted_wif": "6PfMmFWzXobLGrJReqJaNnGcaCMd9T3Xhcwp2jkCHZ6jZoDJ2MnKk15ZuV", + "confirmation_code": "cfrm38V5JArEGuKEKE8VSMDSKvS8eZXYq3DckKyFDtw76GxW1TBzdKcovWdL4PbQnPLvJ5EpmZp", + "public_key": "049e60857454bff0635324e132e00f102fbe1ab6b0846b12737eca18a05b473e2a0afa7d996c7b49b03fb4d070d94fd765841f7e172f7727bfceed65e98f940c2d", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "uncompressed", - "address": "18VLTHgu95JPi1iLRtN2WwYroAHvHwE2Ws" + "address": "QXsy25WUg3kARS1o4t8si4AsyuwZjLkY9R" } Confirm Code: { - "public_key": "04cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b09e25cb1d8628cd559c6c57c627fa486b8d452da89c1e9778ea967822188990a4", + "public_key": "049e60857454bff0635324e132e00f102fbe1ab6b0846b12737eca18a05b473e2a0afa7d996c7b49b03fb4d070d94fd765841f7e172f7727bfceed65e98f940c2d", "public_key_type": "uncompressed", - "address": "18VLTHgu95JPi1iLRtN2WwYroAHvHwE2Ws", + "address": "QXsy25WUg3kARS1o4t8si4AsyuwZjLkY9R", "lot": null, "sequence": null } BIP38 Decrypted: { - "wif": "5Jh21edvnWUXFjRz8mDVN3CSPp1CyTuUSFBKZeWYU726R6MW3ux", - "private_key": "733134eb516f94aa56ab7ef0874a0d71daf38c5c009dec2a1261861a15889631", + "wif": "5JDa1CcN3iLbFeexZC2RhyEkFU2B7oieHAVs5YDwieMhgVS9S9c", + "private_key": "34de039d8e90172f246ec3190fc8bd98e46f11bc5d50d062d0d6f806e43372a9", "wif_type": "wif", - "public_key": "04cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b09e25cb1d8628cd559c6c57c627fa486b8d452da89c1e9778ea967822188990a4", + "public_key": "049e60857454bff0635324e132e00f102fbe1ab6b0846b12737eca18a05b473e2a0afa7d996c7b49b03fb4d070d94fd765841f7e172f7727bfceed65e98f940c2d", "public_key_type": "uncompressed", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "18VLTHgu95JPi1iLRtN2WwYroAHvHwE2Ws", + "address": "QXsy25WUg3kARS1o4t8si4AsyuwZjLkY9R", "lot": null, "sequence": null } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphraseb7ruSNPsLdQF7t1gh7fs1xvWB4MKDssFQwL11EHkVr4njFX5PtsCUqQqwzh9rS +Intermediate Passphrase: passphraseb7ruSNPsLdQF57XQM4waP887G6qoGhPVpDS7jEorTKpfXYFxnUSSVwtpQZPT4U Encrypted WIF: { - "encrypted_wif": "6PgKxJUke6BcDc1XuvPDKCD9krZEebapef98SJ3YAjWQHtR3EVsaeK62ja", - "confirmation_code": "cfrm38V8TGcdd9WSGpaB56JaiW7cbvv1ZD89BHjBGu7S7yUFGcht8CqFQoexCHCoiCp4JzsH1Pk", - "public_key": "049afcaa528358eddf54634fee9505e90b9572f8733b94260c94d20b563a65a1c94c338d5c09d20c5895d89bd5a2ba39f96ae4b1cf637828714c432042172723b6", + "encrypted_wif": "6PgLaWLw6fb6uDBtnN6QVyT9AbvN4zFi8E4oLdSiEWCqsHZFAtcY4wP4LW", + "confirmation_code": "cfrm38V8VJb8xnvVY1kkRRVanmL4F91nfuQAZctydcGYKS8ZjPxyZHnACqfJ3ni1AwaCkDMsWVF", + "public_key": "04263351adcb7d9298c6865a597ef63094a8e79f35110aab71d29347acd29ddb0c22e139924e329ae9a84b806c27f919c5e60f8f299ed004256109658b5c11b7b7", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "uncompressed", - "address": "1DkQJuST62GkJP9kss68fHT8ftLf4SmLVT" + "address": "QfAtAjYNEQMAVtxNaXCWcg1rws3ubJJAED" } Confirm Code: { - "public_key": "049afcaa528358eddf54634fee9505e90b9572f8733b94260c94d20b563a65a1c94c338d5c09d20c5895d89bd5a2ba39f96ae4b1cf637828714c432042172723b6", + "public_key": "04263351adcb7d9298c6865a597ef63094a8e79f35110aab71d29347acd29ddb0c22e139924e329ae9a84b806c27f919c5e60f8f299ed004256109658b5c11b7b7", "public_key_type": "uncompressed", - "address": "1DkQJuST62GkJP9kss68fHT8ftLf4SmLVT", + "address": "QfAtAjYNEQMAVtxNaXCWcg1rws3ubJJAED", "lot": 567885, "sequence": 1 } BIP38 Decrypted: { - "wif": "5JGYLxWwyh9agrM6u63RadubRFjTxbDtvBcQ5EywZrHXBLpPrZW", - "private_key": "3b9d38cb7d1d97efad80b3934cb1928ae70179317ea4657aaffcdff029f43b90", + "wif": "5KXP2dhbmUsgPAFU6Uu6iY4ePafMc53fLjs9mdQXbmPvoLtxiSj", + "private_key": "e1013f4521ffeefb06aad092a040189075a5163af3c6cb7ca1622cbea2d498fc", "wif_type": "wif", - "public_key": "049afcaa528358eddf54634fee9505e90b9572f8733b94260c94d20b563a65a1c94c338d5c09d20c5895d89bd5a2ba39f96ae4b1cf637828714c432042172723b6", + "public_key": "04263351adcb7d9298c6865a597ef63094a8e79f35110aab71d29347acd29ddb0c22e139924e329ae9a84b806c27f919c5e60f8f299ed004256109658b5c11b7b7", "public_key_type": "uncompressed", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "1DkQJuST62GkJP9kss68fHT8ftLf4SmLVT", + "address": "QfAtAjYNEQMAVtxNaXCWcg1rws3ubJJAED", "lot": 567885, "sequence": 1 } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphraseondJwvQGEWFNrNJRPi4G5XAL5SU777GwTNtqmDXqA3CGP7HXfH6AdBxxc5WUKC +Intermediate Passphrase: passphraseondJwvQGEWFNsbiN6AVu4r4dPFz4xeJoLg2vQGULvMzgYRKiGezwNDzaAxfX57 Encrypted WIF: { - "encrypted_wif": "6PnUVPinrvPGwoYJK3GbGBNgFuqEXmfvagE4QiAxj7yrZp4i29p22MrY5r", - "confirmation_code": "cfrm38VUV4NK45caNN5aomS3dSQLT3FVHq556kehuZX1RNuPs8ArWjw18KCCjyTXktVCDBW65pZ", - "public_key": "02cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b0", + "encrypted_wif": "6PnQ3P5GdsSJSUcJCAmtvn74U9gqPs8JMZLdVBkBYsUvSVd4TjgSZEqB7w", + "confirmation_code": "cfrm38VUEZdLCyEmCMZqbbvdhUdsuPZdYy2tmBcbDdmdkyFiLyiScPQSeotgvS6vQZjPXhj92Xj", + "public_key": "039e60857454bff0635324e132e00f102fbe1ab6b0846b12737eca18a05b473e2a", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "compressed", - "address": "1BPmkfRYzPAkeErMS6DLDYxPvQEEkoVRz1" + "address": "QS3xSF9psn8DMT6uBExPDkm258eJPqJbsB" } Confirm Code: { - "public_key": "02cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b0", + "public_key": "039e60857454bff0635324e132e00f102fbe1ab6b0846b12737eca18a05b473e2a", "public_key_type": "compressed", - "address": "1BPmkfRYzPAkeErMS6DLDYxPvQEEkoVRz1", + "address": "QS3xSF9psn8DMT6uBExPDkm258eJPqJbsB", "lot": null, "sequence": null } BIP38 Decrypted: { - "wif": "L15dTs7zPs6UY2HHBGA8BrhV5gTurDkc6RaYw6ZPtdZptsuPR7K3", - "private_key": "733134eb516f94aa56ab7ef0874a0d71daf38c5c009dec2a1261861a15889631", + "wif": "KxzUftF5tyTUBfCYD5fJ3qDftrGBf3CoYLvQ32p8WotNYrMW4c3t", + "private_key": "34de039d8e90172f246ec3190fc8bd98e46f11bc5d50d062d0d6f806e43372a9", "wif_type": "wif-compressed", - "public_key": "02cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b0", + "public_key": "039e60857454bff0635324e132e00f102fbe1ab6b0846b12737eca18a05b473e2a", "public_key_type": "compressed", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "1BPmkfRYzPAkeErMS6DLDYxPvQEEkoVRz1", + "address": "QS3xSF9psn8DMT6uBExPDkm258eJPqJbsB", "lot": null, "sequence": null } ----------------------------------------------------------------------------------------------------------------------------- -Intermediate Passphrase: passphraseb7ruSNDGP7cmnFHQpmos7TeAy26AFN4GyRTBqq6hiaFbQzQBvirD9oHsafQvzd +Intermediate Passphrase: passphraseb7ruSNDGP7cmphxdxHWx8oo88zHuBBeFyvaWYD2zqHUpLwvXYhqTBnwxiiCUf6 Encrypted WIF: { - "encrypted_wif": "6PoEPBnJjm8UAiSGWQEKKNq9V2GMHqKkTcUqUFzsaX7wgjpQWR2qWPdnpt", - "confirmation_code": "cfrm38VWx5xH1JFm5EVE3mzQvDPFkz7SqNiaFxhyUfp3Fjc2wdYmK7dGEWoW6irDPSrwoaxB5zS", - "public_key": "024c5175a177a0b6cf0a3d06065345e2e2d0529ea0191ace3d7b003f304353511b", + "encrypted_wif": "6PoLtrDYSMopr5nRKDN9LDanSPiSPRQ3vkfmT2gj4c3E3S5FeGTmyuG12z", + "confirmation_code": "cfrm38VXKJasUvzUJiyuBsX5TqVdhNV4BhzXEE8ge9TAm3Y13jobt5x8BMqcXNEpdDLgumedBBW", + "public_key": "03548814ac8ce03397f544dfa9bde1d148b503237103362da170fd3f330cf3e094", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "compressed", - "address": "1MQaLNgukYWRkNgtmc1dzJ13yFvJoW34u4" + "address": "QQ2yBHc39h3Fyb8AnKuwtw1Soxpq9f4GRt" } Confirm Code: { - "public_key": "024c5175a177a0b6cf0a3d06065345e2e2d0529ea0191ace3d7b003f304353511b", + "public_key": "03548814ac8ce03397f544dfa9bde1d148b503237103362da170fd3f330cf3e094", "public_key_type": "compressed", - "address": "1MQaLNgukYWRkNgtmc1dzJ13yFvJoW34u4", + "address": "QQ2yBHc39h3Fyb8AnKuwtw1Soxpq9f4GRt", "lot": 369861, "sequence": 1 } BIP38 Decrypted: { - "wif": "KzFbTBirbEEtEPgWL3xhohUcrg6yUmJupAGrid7vBP9F2Vh8GTUB", - "private_key": "5a7b39eef5d02551b2d362384e57f9823a1c9bed48a260af920a8bb5d6ad971f", + "wif": "L3uXqD8dC2zNpRdDVfsmUCNrz6HMXk2j9fVkgftwd3SM35W6XNVL", + "private_key": "c7829407b0a6aee68539bcc4f58878722ac0f441aa462b303da31ab232253d64", "wif_type": "wif-compressed", - "public_key": "024c5175a177a0b6cf0a3d06065345e2e2d0529ea0191ace3d7b003f304353511b", + "public_key": "03548814ac8ce03397f544dfa9bde1d148b503237103362da170fd3f330cf3e094", "public_key_type": "compressed", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "1MQaLNgukYWRkNgtmc1dzJ13yFvJoW34u4", + "address": "QQ2yBHc39h3Fyb8AnKuwtw1Soxpq9f4GRt", "lot": 369861, "sequence": 1 } @@ -416,24 +416,6 @@ pytest Or use `tox` to run the complete suite against the full set of build targets, or pytest to run specific tests against a specific version of Python. -## Contributing - -Feel free to open an [issue](https://github.com/meherett/python-bip38/issues) if you find a problem, -or a pull request if you've solved an issue. And also any help in testing, development, -documentation and other tasks is highly appreciated and useful to the project. -There are tasks for contributors of all experience levels. - -For more information, see the [CONTRIBUTING.md](https://github.com/meherett/python-bip38/blob/master/CONTRIBUTING.md) file. - -## Donations - -Buy me a coffee if You found this tool helpful: - -- **BTC** - 12uaGVdX1t86FXLQ4yYPrRQDCK7xGGu82r -- **BTC / ETH / USDT** - [hd.wallet](https://ud.me/hd.wallet) - -Thank you very much for your support. - ## License Distributed under the [MIT](https://github.com/meherett/python-bip38/blob/master/LICENSE) license. See ``LICENSE`` for more information. diff --git a/docs/bip38.rst b/docs/bip38.rst deleted file mode 100644 index 68a59f3..0000000 --- a/docs/bip38.rst +++ /dev/null @@ -1,9 +0,0 @@ -:orphan: - -===== -BIP38 -===== - -.. automodule:: bip38.bip38 - :members: - diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 3b4d4ac..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,104 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. - -import os -import sys -import datetime - -from bip38 import ( - __version__, __author__ -) - -sys.path.insert(0, os.path.abspath("../..")) -sys.path.insert(1, os.path.abspath("./extensions")) - - -# -- Project information ----------------------------------------------------- - -project = "Python-BIP38" -copyright = f"{datetime.datetime.now().year}, {__author__}" -author = __author__ - -# The full version, including alpha/beta/rc tags -release = __version__ - -# The master toctree document. -master_doc = "toctree" - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named "sphinx.ext.*") or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc" -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = "sphinx_rtd_theme" -# 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, - # "prev_next_buttons_location": "bottom", - # "style_external_links": False, - # "vcs_pageview_mode": "", - # "style_nav_header_background": "white", - # Toc options - # "collapse_navigation": True, - # "sticky_navigation": True, - # "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": "Important announcement!", -} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["static", "static/css"] - -# Autodoc member order -autodoc_member_order = "bysource" - - -# Sphinx docs setup. -def setup(sphinx): - sphinx.add_css_file("css/bip38.css") diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 45ea30b..0000000 --- a/docs/index.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - -Bitcoin Improvement Proposal 38 - - - -
-

Bitcoin Improvement Proposal 38

- -

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

-

BIP38 (Bitcoin Improvement Proposal 38) is a cryptographic standard that defines a method for encrypting and securing private keys associated with Bitcoin addresses. It provides a way to create encrypted versions of private keys, which can then be decrypted using a passphrase. This adds an additional layer of security to the process of storing and transmitting private keys.

-

By encrypting a private key with BIP38, users can protect their funds even if the encrypted private key is exposed. This is because an attacker would need to know the passphrase in order to decrypt the private key and gain access to the associated funds. BIP38 encryption is often used to create "paper wallets" or physical copies of Bitcoin private keys that can be stored offline for enhanced security.

-

For more info see the BIP38 specs.

-
-

Installing BIP38

-

The easiest way to install bip38 is via pip:

-
-pip install bip38
-
-

If you want to run the latest version of the code, you can install from git:

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

For the versions available, see the tags on this repository.

-
-
-

Quick Usage

-
-

No compression, no EC multiply:

-
-#!/usr/bin/env python3
-
-from bip38 import bip38_encrypt, bip38_decrypt
-
-import json
-
-wif: str = "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase="TestingOneTwoThree")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="TestingOneTwoThree"))
-
-wif: str = "5HtasZ6ofTHP6HCwTqTkLDuLQisYPah7aUnSKfC7h4hMUVw2gi5"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase="Satoshi")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="Satoshi", detail=False))
-
-wif: str = "5Jajm8eQ22H3pGWLEVCXyvND8dQZhiQhoLJNKjYXk9roUFTMSZ4"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase=u"\u03D2\u0301\u0000\U00010400\U0001F4A9")
-print(encrypted_wif, json.dumps(bip38_decrypt(encrypted_wif=encrypted_wif, passphrase=u"\u03D2\u0301\u0000\U00010400\U0001F4A9", detail=True), indent=4))
-
-
- Output
-6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg 5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR
-6PRNFFkZc2NZ6dJqFfhRoFNMR9Lnyj7dYGrzdgXXVMXcxoKTePPX1dWByq 5HtasZ6ofTHP6HCwTqTkLDuLQisYPah7aUnSKfC7h4hMUVw2gi5
-6PRW5o9FLp4gJDDVqJQKJFTpMvdsSGJxMYHtHaQBF3ooa8mwD69bapcDQn {
-     "wif": "5Jajm8eQ22H3pGWLEVCXyvND8dQZhiQhoLJNKjYXk9roUFTMSZ4",
-     "private_key": "64eeab5f9be2a01a8365a579511eb3373c87c40da6d2a25f05bda68fe077b66e",
-     "wif_type": "wif",
-     "public_key": "04b18e0ff1cbd907b45ad3d3df73fe637625435a5363fc1c7d26532e0642a5791dabbcefcb8145eeb4ca239649d15d3f8850ed2b3d37fadb6d69eb6f8d5e97a1b6",
-     "public_key_type": "uncompressed",
-     "address": "16ktGzmfrurhbhi6JGqsMWf7TyqK9HNAeF",
-     "lot": null,
-     "sequence": null
-}
-
-
-
-

Compression, no EC multiply:

-
-#!/usr/bin/env python3
-
-from bip38 import bip38_encrypt, bip38_decrypt
-
-wif: str = "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP"
-encrypted_wif: str = bip38_encrypt(wif=wif, passphrase="TestingOneTwoThree")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="TestingOneTwoThree"))
-
-wif: str = "KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7"
-encrypted_wif: str = bip38_encrypt(wif=wif", passphrase="Satoshi")
-print(encrypted_wif, bip38_decrypt(encrypted_wif=encrypted_wif, passphrase="Satoshi"))
-
-
- Output
-6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP
-6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7 KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7
-
-
-
-

EC multiply, no compression, no lot/sequence:

-
-#!/usr/bin/env python3
-
-from bip38 import intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt
-
-import json
-
-intermediate_passphrase: str = intermediate_code(
-    passphrase="meherett", lot=None, sequence=None
-)
-print("Intermediate Passphrase:", intermediate_passphrase)
-encrypted_wif: dict = create_new_encrypted_wif(
-    intermediate_passphrase=intermediate_passphrase, public_key_type="uncompressed", seed=SEED
-)
-print("Encrypted WIF:", json.dumps(encrypted_wif, indent=4))
-
-print("Confirm Code:", json.dumps(confirm_code(
-    passphrase="meherett", confirmation_code=encrypted_wif["confirmation_code"], detail=False
-), indent=4))
-
-print("BIP38 Decrypted:", json.dumps(bip38_decrypt(
-    encrypted_wif=encrypted_wif["encrypted_wif"], passphrase="meherett", detail=False
-), indent=4))
-
-
- Output
-6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP
-6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7 KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7
-
-
-
-
-

Development

-

We welcome pull requests. To get started, just fork this github repository, clone it locally, and run:

-
-$ pip install -e .[cli,tests,docs] -r requirements.txt
-
-
-
- - diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 76d4abd..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,486 +0,0 @@ -=========================================== -Bitcoin Improvement Proposal - 0038 / BIP38 -=========================================== - -|Build Status| |PyPI Version| |Documentation Status| |PyPI License| |PyPI Python Version| |Coverage Status| - -.. |Build Status| image:: https://travis-ci.org/meherett/python-bip38.svg?branch=master - :target: https://travis-ci.org/meherett/python-bip38?branch=master - -.. |PyPI Version| image:: https://img.shields.io/pypi/v/bip38.svg?color=blue - :target: https://pypi.org/project/bip38 - -.. |Documentation Status| image:: https://readthedocs.org/projects/bip38/badge/?version=master - :target: https://bip38.readthedocs.io/en/master/?badge=master - -.. |PyPI License| image:: https://img.shields.io/pypi/l/bip38?color=black - :target: https://pypi.org/project/bip38 - -.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/bip38.svg - :target: https://pypi.org/project/bip38 - -.. |Coverage Status| image:: https://coveralls.io/repos/github/meherett/python-bip38/badge.svg?branch=master - :target: https://coveralls.io/github/meherett/python-bip38?branch=master - -Python library for implementation of Bitcoin Improvement Proposal - 0038 / BIP38 protocol. It supports both `No EC-multiply `_ and `EC-multiply `_ modes. - -BIP38 is a cryptographic standard that defines a method for encrypting and securing private keys associated with Bitcoin addresses. It provides a way to create encrypted versions of private keys, which can then be decrypted using a passphrase. This adds an additional layer of security to the process of storing and transmitting private keys. - -By encrypting a private key with BIP38, users can protect their funds even if the encrypted private key is exposed. This is because an attacker would need to know the passphrase in order to decrypt the private key and gain access to the associated funds. BIP38 encryption is often used to create "paper wallets" or physical copies of Bitcoin private keys that can be stored offline for enhanced security. - -For more info see the `Passphrase-protected private key - BIP38 `_ specs. - -Installing BIP38 -================ - -The easiest way to install ``bip38`` is via pip: - -:: - - pip install bip38 - - -If you want to run the latest version of the code, you can install from git: - -:: - - pip install git+git://github.com/meherett/python-bip38.git - - -For the versions available, see the `tags on this repository `_. - -Quick Usage -=========== - -no EC multiply: -_______________ - -:: - - #!/usr/bin/env python3 - - from bip38 import ( - private_key_to_wif, bip38_encrypt, bip38_decrypt - ) - from typing import List - - import json - - # Private key - PRIVATE_KEY: str = "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5" - # Passphrase / password - PASSPHRASE: str = "meherett" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" - # To show detail - DETAIL: bool = True - # Wallet important format's - WIFs: List[str] = [ - private_key_to_wif(private_key=PRIVATE_KEY, wif_type="wif"), # No compression - private_key_to_wif(private_key=PRIVATE_KEY, wif_type="wif-compressed") # Compression - ] - - for WIF in WIFs: - - print("WIF:", WIF) - - encrypted_wif: str = bip38_encrypt( - wif=WIF, passphrase=PASSPHRASE - ) - print("BIP38 Encrypted WIF:", encrypted_wif) - - print("BIP38 Decrypted:", json.dumps(bip38_decrypt( - encrypted_wif=encrypted_wif, passphrase=PASSPHRASE, detail=DETAIL - ), indent=4)) - - print("-" * 125) - - -.. raw:: html - -
- Output - -.. code-block:: shell - - WFI: 5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR - BIP38 Encrypted WIF: 6PRVWUbkzNehVoPSCKYviigdnwsck69PLiMPpTVWGENzUAy7spnAZqnxit - BIP38 Decrypted: { - "wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", - "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", - "wif_type": "wif", - "public_key": "04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", - "public_key_type": "uncompressed", - "seed": null, - "address": "1Jq6MksXQVWzrznvZzxkV6oY57oWXD9TXB", - "lot": null, - "sequence": null - } - ----------------------------------------------------------------------------------------------------------------------------- - WFI: L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP - BIP38 Encrypted WIF: 6PYNKZ1EASfdDgcUgtxxRi7DkYPTXzwYUzEqzDxv2H8QbeKDV9D9wBWUA7 - BIP38 Decrypted: { - "wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", - "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", - "wif_type": "wif-compressed", - "public_key": "02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", - "public_key_type": "compressed", - "seed": null, - "address": "164MQi977u9GUteHr4EPH27VkkdxmfCvGW", - "lot": null, - "sequence": null - } - ----------------------------------------------------------------------------------------------------------------------------- - -.. raw:: html - -
- - -EC multiply: ------------- - -:: - - #!/usr/bin/env python3 - - from bip38 import ( - intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt - ) - from typing import List - - import json - import os - - # Passphrase / password - PASSPHRASE: str = "meherett" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" - # To show detail - DETAIL: bool = True - # List of samples with owner salt, seed, public key type, lot, and sequence - SAMPLES: List[dict] = [ - # Random owner salt & seed, No compression, No lot & sequence - {"owner_salt": os.urandom(8), "seed": os.urandom(24), "public_key_type": "uncompressed", "lot": None, "sequence": None}, - # Random owner salt & seed, No compression, With lot & sequence - {"owner_salt": os.urandom(8), "seed": os.urandom(24), "public_key_type": "uncompressed", "lot": 863741, "sequence": 1}, - # Random owner salt & seed, Compression, No lot & sequence - {"owner_salt": os.urandom(8), "seed": os.urandom(24), "public_key_type": "compressed", "lot": None, "sequence": None}, - # Random owner salt & seed, Compression, With lot & sequence - {"owner_salt": os.urandom(8), "seed": os.urandom(24), "public_key_type": "compressed", "lot": 863741, "sequence": 1}, - # With owner salt & seed, No compression, No lot & sequence - {"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "uncompressed", "lot": None, "sequence": None}, - # With owner salt & seed, No compression, With lot & sequence - {"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "uncompressed", "lot": 567885, "sequence": 1}, - # With owner salt & seed, Compression, No lot & sequence - {"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "compressed", "lot": None, "sequence": None}, - # With owner salt & seed, Compression, With lot & sequence - {"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "public_key_type": "compressed", "lot": 369861, "sequence": 1}, - ] - - for SAMPLE in SAMPLES: - - intermediate_passphrase: str = intermediate_code( - passphrase=PASSPHRASE, owner_salt=SAMPLE["owner_salt"], lot=SAMPLE["lot"], sequence=SAMPLE["sequence"] - ) - print("Intermediate Passphrase:", intermediate_passphrase) - - encrypted_wif: dict = create_new_encrypted_wif( - intermediate_passphrase=intermediate_passphrase, public_key_type=SAMPLE["public_key_type"], seed=SAMPLE["seed"] - ) - print("Encrypted WIF:", json.dumps(encrypted_wif, indent=4)) - - print("Confirm Code:", json.dumps(confirm_code( - passphrase=PASSPHRASE, confirmation_code=encrypted_wif["confirmation_code"], detail=DETAIL - ), indent=4)) - - print("BIP38 Decrypted:", json.dumps(bip38_decrypt( - encrypted_wif=encrypted_wif["encrypted_wif"], passphrase=PASSPHRASE, detail=DETAIL - ), indent=4)) - - print("-" * 125) - -.. raw:: html - -
- Output - -.. code-block:: shell - - Intermediate Passphrase: passphraseqtFiMLZSKYBJo6ZdivCqkPyMX3bnPFnedQRtEHWHmADXqEfSyJHE1CLuTbF6Wf - Encrypted WIF: { - "encrypted_wif": "6PfPd3hFPNjBMqirrvSSgEtDnErh9BzqK1NUdk6fiQCaN7LwdGFus4PhQV", - "confirmation_code": "cfrm38V5QE7EN2eF9SfWsesQCjJZSoSjc5YiqLDCgEJoqEDoV2D9f7NRXSqQHsWb3MKogaN8zAs", - "public_key": "0412bb1ec0a2fa1e7c90f4061578d8deeaa6984c9ec5c37717546fb0d127573a03f3050a9f7cb24f62e107c43470388531193fcd8b878618cf74e1d71698069e07", - "seed": "d010fe7f60a25982f3ee7e056e1bcd027f1c15bd26ddd221", - "public_key_type": "uncompressed", - "address": "1CHsGDzDbZJPVKiC9hUKe1hnAevwu5RTKi" - } - Confirm Code: { - "public_key": "0412bb1ec0a2fa1e7c90f4061578d8deeaa6984c9ec5c37717546fb0d127573a03f3050a9f7cb24f62e107c43470388531193fcd8b878618cf74e1d71698069e07", - "public_key_type": "uncompressed", - "address": "1CHsGDzDbZJPVKiC9hUKe1hnAevwu5RTKi", - "lot": null, - "sequence": null - } - BIP38 Decrypted: { - "wif": "5Jp53JGVEkX2dxXXJyb2UdJw3259yk3YjJCdhcHA3eXpJsr6PBB", - "private_key": "83348354ac6638ad7ea78505bd85ff96485e17edcffe85572df9a66f997e1324", - "wif_type": "wif", - "public_key": "0412bb1ec0a2fa1e7c90f4061578d8deeaa6984c9ec5c37717546fb0d127573a03f3050a9f7cb24f62e107c43470388531193fcd8b878618cf74e1d71698069e07", - "public_key_type": "uncompressed", - "seed": "d010fe7f60a25982f3ee7e056e1bcd027f1c15bd26ddd221", - "address": "1CHsGDzDbZJPVKiC9hUKe1hnAevwu5RTKi", - "lot": null, - "sequence": null - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphrasedcXyya37d7imwPshCWV77N6SdDCXCGkbUDQ8dgg39Xutzej2UoNTRXCWjcVSk3 - Encrypted WIF: { - "encrypted_wif": "6PgHqxpPU2tA4rqjL5gMMkqeahFRRDDe3g1jJy5mhQdNasT1WtwEkzGcdk", - "confirmation_code": "cfrm38V8LPy6dJTRpd7Qs74zLAdE26F3ZGqJ1Dmr5HheKY2miBwbJMdk1qY6VhZDjNJkitu5Di5", - "public_key": "049b3dcf56a38df3a2437055f2ad3aec950a54f7205bbcc9949d5299ee4e0215d0924a756dce3baf3356da8465341ebf1c580c4ee13e2602508df57ec49a15e981", - "seed": "8195ac15d84c139531faec482a9d312f86f79242acb728a7", - "public_key_type": "uncompressed", - "address": "17YeFTwCoxVhz5P8KiGHv4d8JwUEwPUbhj" - } - Confirm Code: { - "public_key": "049b3dcf56a38df3a2437055f2ad3aec950a54f7205bbcc9949d5299ee4e0215d0924a756dce3baf3356da8465341ebf1c580c4ee13e2602508df57ec49a15e981", - "public_key_type": "uncompressed", - "address": "17YeFTwCoxVhz5P8KiGHv4d8JwUEwPUbhj", - "lot": 863741, - "sequence": 1 - } - BIP38 Decrypted: { - "wif": "5KGpex1ZJaPoG2L6cHtzAU1nM9un8nw3uD8d6v8xGJs6M6q9qQj", - "private_key": "bff2e24adfd0323ecd0b969cb3768adba578a0ea503306fd647e6b11e8739d70", - "wif_type": "wif", - "public_key": "049b3dcf56a38df3a2437055f2ad3aec950a54f7205bbcc9949d5299ee4e0215d0924a756dce3baf3356da8465341ebf1c580c4ee13e2602508df57ec49a15e981", - "public_key_type": "uncompressed", - "seed": "8195ac15d84c139531faec482a9d312f86f79242acb728a7", - "address": "17YeFTwCoxVhz5P8KiGHv4d8JwUEwPUbhj", - "lot": 863741, - "sequence": 1 - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphraseoH4GEqnBR53ipb9gwLfbJM8nKMx4LnZPCzYbvgPyR2zYkF5DqKrW2gf8DZ8s7y - Encrypted WIF: { - "encrypted_wif": "6PnYW3V9jp8sKA4aMEWJjBvNTRtVYBCSRWb6Yja6xZqBhVVrDXWSnYz2at", - "confirmation_code": "cfrm38VUi8UMcgVUDQRSjjn1VxVLfHYQxphSRvAQYSU244oNwHoxt24UByEnUeqSbN6QatRVtaR", - "public_key": "022604144840ed73bc5055916e2e114efe2a706ee71033b48644e3e322a2c58dab", - "seed": "e0051112f4903c0bbe52dc698c031467bf4646040b6b12a3", - "public_key_type": "compressed", - "address": "1EVSAfcUHG8Ce2CF74QwW58wSr7WY4QBaH" - } - Confirm Code: { - "public_key": "022604144840ed73bc5055916e2e114efe2a706ee71033b48644e3e322a2c58dab", - "public_key_type": "compressed", - "address": "1EVSAfcUHG8Ce2CF74QwW58wSr7WY4QBaH", - "lot": null, - "sequence": null - } - BIP38 Decrypted: { - "wif": "Kz2v4F99WaPamvCC2LwGTwdr25TnUXUB991wKpVhHGxtJE6iAveq", - "private_key": "53f56bb7fc1a9e9682aa55be6e501776fc9ac2369654c6c85b00b87d41ab8229", - "wif_type": "wif-compressed", - "public_key": "022604144840ed73bc5055916e2e114efe2a706ee71033b48644e3e322a2c58dab", - "public_key_type": "compressed", - "seed": "e0051112f4903c0bbe52dc698c031467bf4646040b6b12a3", - "address": "1EVSAfcUHG8Ce2CF74QwW58wSr7WY4QBaH", - "lot": null, - "sequence": null - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphraseaWdkWraG6G7W9TCAhCtmoLXbFWdDYjrG8gtv2VPCY7mCvJgbFCoktRKm4ePsQU - Encrypted WIF: { - "encrypted_wif": "6PoHWWXXJTibxUGKcVmyts86N8rcTHXJpAoj5VeRf2FhJqj2oQgCsHheKg", - "confirmation_code": "cfrm38VX8GoZrei4jxLQKA6Mx2zSWkrQZPhxQW1FcCRjtizmQDoWoomm5SW63ESEAUuLkA8MFmc", - "public_key": "025f4476d9d8c093a04499fe9d7fbd34533dae14a498a2506a90d6cfdda66e99b3", - "seed": "1ac2513b9149124a0a0d697ae76cbb4583e85d4a652330a6", - "public_key_type": "compressed", - "address": "1ESHxrqxMLrdzwfif9nQbq4PTGhDGi1uq2" - } - Confirm Code: { - "public_key": "025f4476d9d8c093a04499fe9d7fbd34533dae14a498a2506a90d6cfdda66e99b3", - "public_key_type": "compressed", - "address": "1ESHxrqxMLrdzwfif9nQbq4PTGhDGi1uq2", - "lot": 863741, - "sequence": 1 - } - BIP38 Decrypted: { - "wif": "L2otjF2N8EpKvh541jw1n3MrXZLpnCfQ2GB4eiGZLFwoSj1UHprw", - "private_key": "a6c57a43bf2a8ecc153b6b1e8807ec2409033616d4fc98a4edae277c02312eb7", - "wif_type": "wif-compressed", - "public_key": "025f4476d9d8c093a04499fe9d7fbd34533dae14a498a2506a90d6cfdda66e99b3", - "public_key_type": "compressed", - "seed": "1ac2513b9149124a0a0d697ae76cbb4583e85d4a652330a6", - "address": "1ESHxrqxMLrdzwfif9nQbq4PTGhDGi1uq2", - "lot": 863741, - "sequence": 1 - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphraseondJwvQGEWFNrNJRPi4G5XAL5SU777GwTNtqmDXqA3CGP7HXfH6AdBxxc5WUKC - Encrypted WIF: { - "encrypted_wif": "6PfP7T3iQ5jLJLsH5DneySLLF5bhd879DHW87Pxzwtwvn2ggcncxsNKN5c", - "confirmation_code": "cfrm38V5NZfTZKRaRDTvFAMkNKqKAxTxdDjDdb5RpFfXrVRw7Nov5m2iP3K1Eg5QQRxs52kgapy", - "public_key": "04cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b09e25cb1d8628cd559c6c57c627fa486b8d452da89c1e9778ea967822188990a4", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "public_key_type": "uncompressed", - "address": "18VLTHgu95JPi1iLRtN2WwYroAHvHwE2Ws" - } - Confirm Code: { - "public_key": "04cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b09e25cb1d8628cd559c6c57c627fa486b8d452da89c1e9778ea967822188990a4", - "public_key_type": "uncompressed", - "address": "18VLTHgu95JPi1iLRtN2WwYroAHvHwE2Ws", - "lot": null, - "sequence": null - } - BIP38 Decrypted: { - "wif": "5Jh21edvnWUXFjRz8mDVN3CSPp1CyTuUSFBKZeWYU726R6MW3ux", - "private_key": "733134eb516f94aa56ab7ef0874a0d71daf38c5c009dec2a1261861a15889631", - "wif_type": "wif", - "public_key": "04cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b09e25cb1d8628cd559c6c57c627fa486b8d452da89c1e9778ea967822188990a4", - "public_key_type": "uncompressed", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "18VLTHgu95JPi1iLRtN2WwYroAHvHwE2Ws", - "lot": null, - "sequence": null - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphraseb7ruSNPsLdQF7t1gh7fs1xvWB4MKDssFQwL11EHkVr4njFX5PtsCUqQqwzh9rS - Encrypted WIF: { - "encrypted_wif": "6PgKxJUke6BcDc1XuvPDKCD9krZEebapef98SJ3YAjWQHtR3EVsaeK62ja", - "confirmation_code": "cfrm38V8TGcdd9WSGpaB56JaiW7cbvv1ZD89BHjBGu7S7yUFGcht8CqFQoexCHCoiCp4JzsH1Pk", - "public_key": "049afcaa528358eddf54634fee9505e90b9572f8733b94260c94d20b563a65a1c94c338d5c09d20c5895d89bd5a2ba39f96ae4b1cf637828714c432042172723b6", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "public_key_type": "uncompressed", - "address": "1DkQJuST62GkJP9kss68fHT8ftLf4SmLVT" - } - Confirm Code: { - "public_key": "049afcaa528358eddf54634fee9505e90b9572f8733b94260c94d20b563a65a1c94c338d5c09d20c5895d89bd5a2ba39f96ae4b1cf637828714c432042172723b6", - "public_key_type": "uncompressed", - "address": "1DkQJuST62GkJP9kss68fHT8ftLf4SmLVT", - "lot": 567885, - "sequence": 1 - } - BIP38 Decrypted: { - "wif": "5JGYLxWwyh9agrM6u63RadubRFjTxbDtvBcQ5EywZrHXBLpPrZW", - "private_key": "3b9d38cb7d1d97efad80b3934cb1928ae70179317ea4657aaffcdff029f43b90", - "wif_type": "wif", - "public_key": "049afcaa528358eddf54634fee9505e90b9572f8733b94260c94d20b563a65a1c94c338d5c09d20c5895d89bd5a2ba39f96ae4b1cf637828714c432042172723b6", - "public_key_type": "uncompressed", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "1DkQJuST62GkJP9kss68fHT8ftLf4SmLVT", - "lot": 567885, - "sequence": 1 - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphraseondJwvQGEWFNrNJRPi4G5XAL5SU777GwTNtqmDXqA3CGP7HXfH6AdBxxc5WUKC - Encrypted WIF: { - "encrypted_wif": "6PnUVPinrvPGwoYJK3GbGBNgFuqEXmfvagE4QiAxj7yrZp4i29p22MrY5r", - "confirmation_code": "cfrm38VUV4NK45caNN5aomS3dSQLT3FVHq556kehuZX1RNuPs8ArWjw18KCCjyTXktVCDBW65pZ", - "public_key": "02cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b0", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "public_key_type": "compressed", - "address": "1BPmkfRYzPAkeErMS6DLDYxPvQEEkoVRz1" - } - Confirm Code: { - "public_key": "02cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b0", - "public_key_type": "compressed", - "address": "1BPmkfRYzPAkeErMS6DLDYxPvQEEkoVRz1", - "lot": null, - "sequence": null - } - BIP38 Decrypted: { - "wif": "L15dTs7zPs6UY2HHBGA8BrhV5gTurDkc6RaYw6ZPtdZptsuPR7K3", - "private_key": "733134eb516f94aa56ab7ef0874a0d71daf38c5c009dec2a1261861a15889631", - "wif_type": "wif-compressed", - "public_key": "02cdcd8f846a73e75c8a845d1df19dc23031648c219d1efc6fe945cd089f3052b0", - "public_key_type": "compressed", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "1BPmkfRYzPAkeErMS6DLDYxPvQEEkoVRz1", - "lot": null, - "sequence": null - } - ----------------------------------------------------------------------------------------------------------------------------- - Intermediate Passphrase: passphraseb7ruSNDGP7cmnFHQpmos7TeAy26AFN4GyRTBqq6hiaFbQzQBvirD9oHsafQvzd - Encrypted WIF: { - "encrypted_wif": "6PoEPBnJjm8UAiSGWQEKKNq9V2GMHqKkTcUqUFzsaX7wgjpQWR2qWPdnpt", - "confirmation_code": "cfrm38VWx5xH1JFm5EVE3mzQvDPFkz7SqNiaFxhyUfp3Fjc2wdYmK7dGEWoW6irDPSrwoaxB5zS", - "public_key": "024c5175a177a0b6cf0a3d06065345e2e2d0529ea0191ace3d7b003f304353511b", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "public_key_type": "compressed", - "address": "1MQaLNgukYWRkNgtmc1dzJ13yFvJoW34u4" - } - Confirm Code: { - "public_key": "024c5175a177a0b6cf0a3d06065345e2e2d0529ea0191ace3d7b003f304353511b", - "public_key_type": "compressed", - "address": "1MQaLNgukYWRkNgtmc1dzJ13yFvJoW34u4", - "lot": 369861, - "sequence": 1 - } - BIP38 Decrypted: { - "wif": "KzFbTBirbEEtEPgWL3xhohUcrg6yUmJupAGrid7vBP9F2Vh8GTUB", - "private_key": "5a7b39eef5d02551b2d362384e57f9823a1c9bed48a260af920a8bb5d6ad971f", - "wif_type": "wif-compressed", - "public_key": "024c5175a177a0b6cf0a3d06065345e2e2d0529ea0191ace3d7b003f304353511b", - "public_key_type": "compressed", - "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", - "address": "1MQaLNgukYWRkNgtmc1dzJ13yFvJoW34u4", - "lot": 369861, - "sequence": 1 - } - ----------------------------------------------------------------------------------------------------------------------------- - - -.. raw:: html - -
- - -Development -=========== - -We welcome pull requests. To get started, just fork this `github repository `_, clone it locally, and run: - -:: - - pip install -e .[tests,docs] -r requirements.txt - - -Testing -======= - -You can run the tests with: - -:: - - pytest - - -Or use **tox** to run the complete suite against the full set of build targets, or pytest to run specific -tests against a specific version of Python. - - -Contributing -============ - -Feel free to open an `issue `_ if you find a problem, -or a pull request if you've solved an issue. And also any help in testing, development, -documentation and other tasks is highly appreciated and useful to the project. -There are tasks for contributors of all experience levels. - -For more information, see the `CONTRIBUTING.md `_ file. - -Donations -========= - -Buy me a coffee if You found this tool helpful: - -- **BTC** - 12uaGVdX1t86FXLQ4yYPrRQDCK7xGGu82r -- **BTC / ETH / USDT** - `hd.wallet `_ - -Thank you very much for your support. - - -License -======= - -Distributed under the `MIT `_ license. See **LICENSE** for more information. - diff --git a/docs/static/css/bip38.css b/docs/static/css/bip38.css deleted file mode 100644 index 6a94aac..0000000 --- a/docs/static/css/bip38.css +++ /dev/null @@ -1,3 +0,0 @@ -.rst-content dl:not(.docutils) code.descname { - color: #2980B9; -} \ No newline at end of file diff --git a/docs/toctree.rst b/docs/toctree.rst deleted file mode 100644 index 4a40134..0000000 --- a/docs/toctree.rst +++ /dev/null @@ -1,15 +0,0 @@ -======== -HDWallet -======== - -.. toctree:: - :maxdepth: 3 - - Overview - -.. toctree:: - :maxdepth: 3 - :caption: API's - - BIP38 - utils.rst diff --git a/docs/utils.rst b/docs/utils.rst deleted file mode 100644 index 848c325..0000000 --- a/docs/utils.rst +++ /dev/null @@ -1,8 +0,0 @@ -:orphan: - -===== -Utils -===== - -.. automodule:: bip38.utils - :members: diff --git a/examples/__init__.py b/examples/__init__.py index e5a0d9b..e796f0c 100644 --- a/examples/__init__.py +++ b/examples/__init__.py @@ -1 +1,34 @@ #!/usr/bin/env python3 + +from qtum_bip38 import ( + private_key_to_wif, bip38_encrypt, bip38_decrypt +) +from typing import List + +import json + +# Private key +PRIVATE_KEY: str = "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5" +# Passphrase / password +PASSPHRASE: str = "qtum123" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9" +# To show detail +DETAIL: bool = True +# Wallet important format's +WIFs: List[str] = [ + private_key_to_wif(private_key=PRIVATE_KEY, wif_type="wif"), # No compression + private_key_to_wif(private_key=PRIVATE_KEY, wif_type="wif-compressed") # Compression +] + +for WIF in WIFs: + print("WIF:", WIF) + + encrypted_wif: str = bip38_encrypt( + wif=WIF, passphrase=PASSPHRASE + ) + print("BIP38 Encrypted WIF:", encrypted_wif) + + print("BIP38 Decrypted:", json.dumps(bip38_decrypt( + encrypted_wif=encrypted_wif, passphrase=PASSPHRASE, detail=DETAIL + ), indent=4)) + + print("-" * 125) diff --git a/examples/ec-multiply, compression, lot-&-sequence.py b/examples/ec-multiply, compression, lot-&-sequence.py index d3fd94a..fa8f989 100644 --- a/examples/ec-multiply, compression, lot-&-sequence.py +++ b/examples/ec-multiply, compression, lot-&-sequence.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt ) from typing import ( @@ -11,7 +11,7 @@ import os # Passphrase / password -PASSPHRASE: str = "meherett" +PASSPHRASE: str = "qtum123" # Pick random owner salt / use your own salt OWNER_SALT: Union[str, bytes] = os.urandom(8) # "75ed1cdeb254cb38" # Pick random seed / use your own seed diff --git a/examples/ec-multiply, compression, no-lot-&-sequence.py b/examples/ec-multiply, compression, no-lot-&-sequence.py index ae92caa..9b4f0c8 100644 --- a/examples/ec-multiply, compression, no-lot-&-sequence.py +++ b/examples/ec-multiply, compression, no-lot-&-sequence.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt ) from typing import ( @@ -11,7 +11,7 @@ import os # Passphrase / password -PASSPHRASE: str = "meherett" +PASSPHRASE: str = "qtum123" # Pick random owner salt / use your own salt OWNER_SALT: Union[str, bytes] = os.urandom(8) # "75ed1cdeb254cb38" # Pick random seed / use your own seed diff --git a/examples/ec-multiply, no-compression, lot-&-sequence.py b/examples/ec-multiply, no-compression, lot-&-sequence.py index b98155c..102cc00 100644 --- a/examples/ec-multiply, no-compression, lot-&-sequence.py +++ b/examples/ec-multiply, no-compression, lot-&-sequence.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt ) from typing import ( @@ -11,7 +11,7 @@ import os # Passphrase / password -PASSPHRASE: str = "meherett" +PASSPHRASE: str = "qtum123" # Pick random owner salt / use your own salt OWNER_SALT: Union[str, bytes] = os.urandom(8) # "75ed1cdeb254cb38" # Pick random seed / use your own seed diff --git a/examples/ec-multiply, no-compression, no-lot-&-sequence.py b/examples/ec-multiply, no-compression, no-lot-&-sequence.py index 4e4eb7e..e215d28 100644 --- a/examples/ec-multiply, no-compression, no-lot-&-sequence.py +++ b/examples/ec-multiply, no-compression, no-lot-&-sequence.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( intermediate_code, create_new_encrypted_wif, confirm_code, bip38_decrypt ) from typing import ( @@ -11,7 +11,7 @@ import os # Passphrase / password -PASSPHRASE: str = "meherett" # "TestingOneTwoThree", "Satoshi" or u"\u03D2\u0301\u0000\U00010400\U0001F4A9" +PASSPHRASE: str = "qtum123" # "TestingOneTwoThree", "Satoshi" or u"\u03D2\u0301\u0000\U00010400\U0001F4A9" # Pick random owner salt / use your own salt OWNER_SALT: Union[str, bytes] = os.urandom(8) # "75ed1cdeb254cb38" # Pick random seed / use your own seed diff --git a/examples/no-ec-multiply, compression.py b/examples/no-ec-multiply, compression.py index 504989e..5dde74f 100644 --- a/examples/no-ec-multiply, compression.py +++ b/examples/no-ec-multiply, compression.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( bip38_encrypt, bip38_decrypt ) import json # Passphrase / password -PASSPHRASE: str = "meherett" +PASSPHRASE: str = "qtum123" # Wallet important format WIF: str = "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP" # To show detail diff --git a/examples/no-ec-multiply, no-compression.py b/examples/no-ec-multiply, no-compression.py index f3d4b5b..abc3f93 100644 --- a/examples/no-ec-multiply, no-compression.py +++ b/examples/no-ec-multiply, no-compression.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 -from bip38 import ( +from qtum_bip38 import ( bip38_encrypt, bip38_decrypt ) import json # Passphrase / password -PASSPHRASE: str = "meherett" +PASSPHRASE: str = "qtum123" # Wallet important format WIF: str = "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR" # To show detail diff --git a/pytest.ini b/pytest.ini index 18bfe00..48314c5 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] testpaths = tests/ python_files = test_*.py -addopts = -vv --cov=bip38/ +addopts = -vv --cov=qtum_bip38/ diff --git a/setup.py b/setup.py index 0808ee7..788bf32 100644 --- a/setup.py +++ b/setup.py @@ -6,8 +6,7 @@ # Project URL's project_urls: dict = { - "Tracker": "https://github.com/meherett/python-bip38/issues", - "Documentation": "https://bip38.readthedocs.io" + "Tracker": "https://github.com/qtumproject/qtum-bip38/issues" } # README.md @@ -19,18 +18,18 @@ requirements: list = list(map(str.strip, _requirements.read().split("\n"))) setup( - name="bip38", - version="v0.1.1", - description="Python library for implementation of Bitcoin Improvement Proposal - 0038 / BIP38 protocol.", + name="qtum_bip38", + version="v0.1.0", + description="Python library for implementation of BIP38 for Qtum.", long_description=long_description, long_description_content_type="text/markdown", license="MIT", author="Meheret Tesfaye Batu", - author_email="meherett.batu@gmail.com", - url="https://github.com/meherett/python-bip38", + author_email="meherett@qtum.info", + url="https://github.com/qtumproject/qtum-bip38", project_urls=project_urls, keywords=[ - "bip38", "bitcoin", "private-key", "pure-python", "encrypt", "decrypt", "passphrase", "wif", "bip-0038" + "qtum", "bip38", "private-key", "pure-python", "encrypt", "decrypt", "passphrase", "wif", "bip-0038" ], python_requires=">=3.9,<4", packages=find_packages(), @@ -39,10 +38,6 @@ "tests": [ "pytest>=7.4.0,<8", "pytest-cov>=4.1.0,<5" - ], - "docs": [ - "sphinx>=7.2.5,<8", - "sphinx-rtd-theme==1.3.0" ] }, classifiers=[ diff --git a/tests/test_bip38.py b/tests/test_bip38.py index ad7a14c..47391f5 100644 --- a/tests/test_bip38.py +++ b/tests/test_bip38.py @@ -3,7 +3,7 @@ import json import os -from bip38.bip38 import ( +from qtum_bip38.bip38 import ( bip38_encrypt, bip38_decrypt, intermediate_code, create_new_encrypted_wif, confirm_code, # Importing other functions for testing private_key_to_public_key, public_key_to_addresses, private_key_to_wif, diff --git a/tests/test_utils.py b/tests/test_utils.py index b89daf3..464ff35 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -3,7 +3,7 @@ import json import os -from bip38.utils import ( +from qtum_bip38.utils import ( get_bytes, bytes_reverse, bytes_to_string, bytes_to_integer, integer_to_bytes, ripemd160, sha256, double_sha256, hash160 ) diff --git a/tests/values.json b/tests/values.json index 61c7704..544fb0a 100644 --- a/tests/values.json +++ b/tests/values.json @@ -1,21 +1,15 @@ { "bip38": { "bip38_encrypt": [ - {"wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", "passphrase": "TestingOneTwoThree", "encrypted_wif": "6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg"}, - {"wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", "passphrase": "TestingOneTwoThree", "encrypted_wif": "6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo"} + {"wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", "passphrase": "TestingOneTwoThree", "encrypted_wif": "6PRP4FDk4TJm7fViXdbc6U4ZH3QvwuHajFHc8fCj3JrFxkXgMynGHHJm5u"}, + {"wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", "passphrase": "TestingOneTwoThree", "encrypted_wif": "6PYUYP8xxyeB1mgXyWzktgSNYvhky9meidrwrwr9AJhUUvdCkiZEaLqZd8"} ], "bip38_decrypt": [ - {"encrypted_wif": "6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg", "passphrase": "TestingOneTwoThree", "wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", "wif_type": "wif", "public_key": "04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", "public_key_type": "uncompressed", "seed": null, "address": "1Jq6MksXQVWzrznvZzxkV6oY57oWXD9TXB", "lot": null, "sequence": null}, - {"encrypted_wif": "6PRNFFkZc2NZ6dJqFfhRoFNMR9Lnyj7dYGrzdgXXVMXcxoKTePPX1dWByq", "passphrase": "Satoshi", "wif": "5HtasZ6ofTHP6HCwTqTkLDuLQisYPah7aUnSKfC7h4hMUVw2gi5", "private_key": "09c2686880095b1a4c249ee3ac4eea8a014f11e6f986d0b5025ac1f39afbd9ae", "wif_type": "wif", "public_key": "0463b600a0bb6a2f2bef7bb9648222c3593a6ef5f7c2d81433c5193bf84b9f862b940e55da162aeca6293cde138bcc18ba978fae399f14f258afa4f799ee61adcb", "public_key_type": "uncompressed", "seed": null, "address": "1AvKt49sui9zfzGeo8EyL8ypvAhtR2KwbL", "lot": null, "sequence": null}, - {"encrypted_wif": "6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo", "passphrase": "TestingOneTwoThree", "wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", "wif_type": "wif-compressed", "public_key": "02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", "public_key_type": "compressed", "seed": null, "address": "164MQi977u9GUteHr4EPH27VkkdxmfCvGW", "lot": null, "sequence": null}, - {"encrypted_wif": "6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7", "passphrase": "Satoshi", "wif": "KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7", "private_key": "09c2686880095b1a4c249ee3ac4eea8a014f11e6f986d0b5025ac1f39afbd9ae", "wif_type": "wif-compressed", "public_key": "0363b600a0bb6a2f2bef7bb9648222c3593a6ef5f7c2d81433c5193bf84b9f862b", "public_key_type": "compressed", "seed": null, "address": "1HmPbwsvG5qJ3KJfxzsZRZWhbm1xBMuS8B", "lot": null, "sequence": null}, - {"encrypted_wif": "6PfQu77ygVyJLZjfvMLyhLMQbYnu5uguoJJ4kMCLqWwPEdfpwANVS76gTX", "passphrase": "TestingOneTwoThree", "wif": "5K4caxezwjGCGfnoPTZ8tMcJBLB7Jvyjv4xxeacadhq8nLisLR2", "private_key": "a43a940577f4e97f5c4d39eb14ff083a98187c64ea7c99ef7ce460833959a519", "wif_type": "wif", "public_key": "04afb614bab3285fe4a9f618daa0720a1baf94f1c4e31c7983031e72051c52cadd6b10c647fd7e7f5612d40fbe909f834ee00a309333fa8d06fa5ea37a1a802919", "public_key_type": "uncompressed", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "address": "1PE6TQi6HTVNz5DLwB1LcpMBALubfuN2z2", "lot": null, "sequence": null}, - {"encrypted_wif": "6PfLGnQs6VZnrNpmVKfjotbnQuaJK4KZoPFrAjx1JMJUa1Ft8gnf5WxfKd", "passphrase": "Satoshi", "wif": "5KJ51SgxWaAYR13zd9ReMhJpwrcX47xTJh2D3fGPG9CM8vkv5sH", "private_key": "c2c8036df268f498099350718c4a3ef3984d2be84618c2650f5171dcc5eb660a", "wif_type": "wif", "public_key": "0411a2ee331b6dd3c906e5db7c308a1004b97853ce84ca4ffd6874d300fde7e857aaab17e3bfbb2da7a23fbb4053999baa413df0bf37c2a1b43041c6dc98abfe11", "public_key_type": "uncompressed", "seed": "49111e301d94eab339ff9f6822ee99d9f49606db3b47a497", "address": "1CqzrtZC6mXSAhoxtFwVjz8LtwLJjDYU3V", "lot": null, "sequence": null}, - {"encrypted_wif": "6PgNBNNzDkKdhkT6uJntUXwwzQV8Rr2tZcbkDcuC9DZRsS6AtHts4Ypo1j", "passphrase": "MOLON LABE", "wif": "5JLdxTtcTHcfYcmJsNVy1v2PMDx432JPoYcBTVVRHpPaxUrdtf8", "private_key": "44ea95afbf138356a05ea32110dfd627232d0f2991ad221187be356f19fa8190", "wif_type": "wif", "public_key": "04e20f3b812f630d0374eefe776e983549d5cdde87780be45cb9def7ee339dfed47dd64392855f31a7d1beb48b6a643e997e49168f883107ada1d321fed28c061b", "public_key_type": "uncompressed", "seed": "87a13b07858fa753cd3ab3f1c5eafb5f12579b6c33c9a53f", "address": "1Jscj8ALrYu2y9TD8NrpvDBugPedmbj4Yh", "lot": 263183, "sequence": 1}, - {"encrypted_wif": "6PgGWtx25kUg8QWvwuJAgorN6k9FbE25rv5dMRwu5SKMnfpfVe5mar2ngH", "passphrase": "ΜΟΛΩΝ ΛΑΒΕ", "wif": "5KMKKuUmAkiNbA3DazMQiLfDq47qs8MAEThm4yL8R2PhV1ov33D", "private_key": "ca2759aa4adb0f96c414f36abeb8db59342985be9fa50faac228c8e7d90e3006", "wif_type": "wif", "public_key": "0415fb4e4e62fcec936920dbda69e83facfe2cc5e152fafcf474c8fa0dcf5023f39392712103c03b3c79ae871134ba3cfeafd98787614e52e54c59888c23a3d1c4", "public_key_type": "uncompressed", "seed": "03b06a1ea7f9219ae364560d7b985ab1fa27025aaa7e427a", "address": "1Lurmih3KruL4xDB5FmHof38yawNtP9oGf", "lot": 806938, "sequence": 1}, + {"encrypted_wif": "6PRP4FDk4TJm7fViXdbc6U4ZH3QvwuHajFHc8fCj3JrFxkXgMynGHHJm5u", "passphrase": "TestingOneTwoThree", "wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", "wif_type": "wif", "public_key": "04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", "public_key_type": "uncompressed", "seed": null, "address": "QeS5U4AEaxPpJ8swzLHEcNbAaNkDfpWjQN", "lot": null, "sequence": null}, + {"encrypted_wif": "6PYUYP8xxyeB1mgXyWzktgSNYvhky9meidrwrwr9AJhUUvdCkiZEaLqZd8", "passphrase": "TestingOneTwoThree", "wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", "private_key": "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5", "wif_type": "wif-compressed", "public_key": "02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", "public_key_type": "compressed", "seed": null, "address": "QRfLX1RpJN25v2jKGPYsQHu8G1ag3sHJeL", "lot": null, "sequence": null}, - {"encrypted_wif": "6PnQDk5XngQugiy1Fi2kzzgKAQrxZrtQDGNFiQTMamjiJcjBT4LhXdnhNf", "passphrase": "MOLON LABE", "wif": "KwoUVBtaYkT7x3ypLfULUVowcYhSUY36KNw9qwCe5QBpoSTsifsK", "private_key": "115e909828274f860da87d5d92ed65e3a909e9ff64ee77e05341a25d71698930", "wif_type": "wif-compressed", "public_key": "0348ca8b4e7c0c75ecfd4b437535d186a12f3027be0c29d2125e9c0dec48677caa", "public_key_type": "compressed", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "address": "16uZsrjjENCVsXwJqw2kMWGwWbDKQ12a1h", "lot": null, "sequence": null}, - {"encrypted_wif": "6PgRAPfrPWjPXfC6x9XB139RHzUP8GFcVen5Ju3qJDhRP69Q4Vd8Wbct6B", "passphrase": "MOLON LABE", "wif": "5KPBrbGWGAmbRgS5qAKCHb1Hot6DoFsctGuBcXvjzsMZCqg4R1H", "private_key": "ce6708e8336b4051eeb2d4e3aa4cef2e73677d43f5a4ff75e91bcfbc5fd30bd7", "wif_type": "wif", "public_key": "04597967956e7f4c0e13ed7cd98baa9d7697a7f685d4347168e4a011c5fe6ba628e06ef89587c17afb55044336e44648dfa944ca85a4af0a7b28c29d4eefd0da92", "public_key_type": "uncompressed", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "address": "1KRg2YJxuHiNcqfp9gVpkgRFhcvALy1zgk", "lot": 100000, "sequence": 1} + {"encrypted_wif": "6PnVm3qTy2kE4KSEtowsXNWPVYzCYLaaNDXSAgBQJdY9ZUwiABgSqqNEd2", "passphrase": "MOLON LABE", "wif": "KwoUVBtaYkT7x3ypLfULUVowcYhSUY36KNw9qwCe5QBpoSTsifsK", "private_key": "115e909828274f860da87d5d92ed65e3a909e9ff64ee77e05341a25d71698930", "wif_type": "wif-compressed", "public_key": "0348ca8b4e7c0c75ecfd4b437535d186a12f3027be0c29d2125e9c0dec48677caa", "public_key_type": "compressed", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "address": "QSWYzA2SQq5KJg2LGGMEUn4a1rA2YuqNca", "lot": null, "sequence": null}, + {"encrypted_wif": "6PgHLa51Yxjpdy99RKMfMh1Hx9uRwVtAgrFvHodmu5UfTq976DNZaU2xzX", "passphrase": "MOLON LABE", "wif": "5KPBrbGWGAmbRgS5qAKCHb1Hot6DoFsctGuBcXvjzsMZCqg4R1H", "private_key": "ce6708e8336b4051eeb2d4e3aa4cef2e73677d43f5a4ff75e91bcfbc5fd30bd7", "wif_type": "wif", "public_key": "04597967956e7f4c0e13ed7cd98baa9d7697a7f685d4347168e4a011c5fe6ba628e06ef89587c17afb55044336e44648dfa944ca85a4af0a7b28c29d4eefd0da92", "public_key_type": "uncompressed", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "address": "Qf2f8qbg5kbC3ykqa1pJsxCtCsrsbDYWyw", "lot": 100000, "sequence": 1} ], "intermediate_code": [ {"passphrase": "MOLON LABE", "lot": null, "sequence": null, "owner_salt": "d7ebe42cf42a79f4", "intermediate_passphrase": "passphraserDFxboKK9cTkBQMb73vdzgsXB5L6cCMFCzTVoMTpMWYD8SJXv3jcKyHbRWBcza"}, @@ -23,12 +17,12 @@ {"passphrase": "MOLON LABE", "lot": 100000, "sequence": 1, "owner_salt": "d7ebe42c", "intermediate_passphrase": "passphrasedYVZ6EdRqSmcHHsYWmJ7wzWcWYuDQmf9EGH9Pnrv67eHy4qswaAGGc8Et3eeGp"} ], "create_new_encrypted_wif": [ - {"intermediate_passphrase": "passphraserDFxboKK9cTkBQMb73vdzgsXB5L6cCMFCzTVoMTpMWYD8SJXv3jcKyHbRWBcza", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "encrypted_wif": "6PnQDk5XngQugiy1Fi2kzzgKAQrxZrtQDGNFiQTMamjiJcjBT4LhXdnhNf", "confirmation_code": "cfrm38VUF9PjRxQojZERDySt9Q7Z9FSdhQkMP5RFsouS4y3Emf2YD2CXXMCypQvv94dJujaPTfq", "public_key": "0348ca8b4e7c0c75ecfd4b437535d186a12f3027be0c29d2125e9c0dec48677caa", "public_key_type": "compressed", "address": "16uZsrjjENCVsXwJqw2kMWGwWbDKQ12a1h"}, - {"intermediate_passphrase": "passphrasedYVZ6EdRqSmcHHsYWmJ7wzWcWYuDQmf9EGH9Pnrv67eHy4qswaAGGc8Et3eeGp", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "encrypted_wif": "6PgRAPfrPWjPXfC6x9XB139RHzUP8GFcVen5Ju3qJDhRP69Q4Vd8Wbct6B", "confirmation_code": "cfrm38V8kEzECGczWJmEoGuYfkoamcmVij3tHUhD6DEEquSRXp61HzhnT8jwQwBBZiKs9Jg4LXZ", "public_key": "04597967956e7f4c0e13ed7cd98baa9d7697a7f685d4347168e4a011c5fe6ba628e06ef89587c17afb55044336e44648dfa944ca85a4af0a7b28c29d4eefd0da92", "public_key_type": "uncompressed", "address": "1KRg2YJxuHiNcqfp9gVpkgRFhcvALy1zgk"} + {"intermediate_passphrase": "passphraserDFxboKK9cTkBQMb73vdzgsXB5L6cCMFCzTVoMTpMWYD8SJXv3jcKyHbRWBcza", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "encrypted_wif": "6PnVm3qTy2kE4KSEtowsXNWPVYzCYLaaNDXSAgBQJdY9ZUwiABgSqqNEd2", "confirmation_code": "cfrm38VUZCPC8HeAtHmuR7yuvgUwtwKJAbdaSGKeoRrnm21gsHJG3h6kA8Tve9Y3jSw1ywFW9i2", "public_key": "0348ca8b4e7c0c75ecfd4b437535d186a12f3027be0c29d2125e9c0dec48677caa", "public_key_type": "compressed", "address": "QSWYzA2SQq5KJg2LGGMEUn4a1rA2YuqNca"}, + {"intermediate_passphrase": "passphrasedYVZ6EdRqSmcHHsYWmJ7wzWcWYuDQmf9EGH9Pnrv67eHy4qswaAGGc8Et3eeGp", "seed": "9b6cad86daddae99ac3b76c1e47e61bc7f4665d02e10c290", "encrypted_wif": "6PgHLa51Yxjpdy99RKMfMh1Hx9uRwVtAgrFvHodmu5UfTq976DNZaU2xzX", "confirmation_code": "cfrm38V8JkC6j9123Qtqj7cmtAud88rAdXTKrKyktWYYmLFLqDvi4TXzvMiGB8eurhx4uwh1WvT", "public_key": "04597967956e7f4c0e13ed7cd98baa9d7697a7f685d4347168e4a011c5fe6ba628e06ef89587c17afb55044336e44648dfa944ca85a4af0a7b28c29d4eefd0da92", "public_key_type": "uncompressed", "address": "Qf2f8qbg5kbC3ykqa1pJsxCtCsrsbDYWyw"} ], "confirm_code": [ - {"passphrase": "MOLON LABE", "confirmation_code": "cfrm38VUF9PjRxQojZERDySt9Q7Z9FSdhQkMP5RFsouS4y3Emf2YD2CXXMCypQvv94dJujaPTfq", "public_key": "0348ca8b4e7c0c75ecfd4b437535d186a12f3027be0c29d2125e9c0dec48677caa", "public_key_type": "compressed", "address": "16uZsrjjENCVsXwJqw2kMWGwWbDKQ12a1h", "lot": null, "sequence": null}, - {"passphrase": "MOLON LABE", "confirmation_code": "cfrm38V8kEzECGczWJmEoGuYfkoamcmVij3tHUhD6DEEquSRXp61HzhnT8jwQwBBZiKs9Jg4LXZ", "public_key": "04597967956e7f4c0e13ed7cd98baa9d7697a7f685d4347168e4a011c5fe6ba628e06ef89587c17afb55044336e44648dfa944ca85a4af0a7b28c29d4eefd0da92", "public_key_type": "uncompressed", "address": "1KRg2YJxuHiNcqfp9gVpkgRFhcvALy1zgk", "lot": 100000, "sequence": 1} + {"passphrase": "MOLON LABE", "confirmation_code": "cfrm38VUZCPC8HeAtHmuR7yuvgUwtwKJAbdaSGKeoRrnm21gsHJG3h6kA8Tve9Y3jSw1ywFW9i2", "public_key": "0348ca8b4e7c0c75ecfd4b437535d186a12f3027be0c29d2125e9c0dec48677caa", "public_key_type": "compressed", "address": "QSWYzA2SQq5KJg2LGGMEUn4a1rA2YuqNca", "lot": null, "sequence": null}, + {"passphrase": "MOLON LABE", "confirmation_code": "cfrm38V8JkC6j9123Qtqj7cmtAud88rAdXTKrKyktWYYmLFLqDvi4TXzvMiGB8eurhx4uwh1WvT", "public_key": "04597967956e7f4c0e13ed7cd98baa9d7697a7f685d4347168e4a011c5fe6ba628e06ef89587c17afb55044336e44648dfa944ca85a4af0a7b28c29d4eefd0da92", "public_key_type": "uncompressed", "address": "Qf2f8qbg5kbC3ykqa1pJsxCtCsrsbDYWyw", "lot": 100000, "sequence": 1} ] }, "other": { @@ -36,7 +30,7 @@ "uncompressed": { "wif": "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR", "public_key": "04d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360ea7f23327b49ba7f10d17fad15f068b8807dbbc9e4ace5d4a0b40264eefaf31a4", - "address": "1Jq6MksXQVWzrznvZzxkV6oY57oWXD9TXB", + "address": "QeS5U4AEaxPpJ8swzLHEcNbAaNkDfpWjQN", "wif_checksum": "f0a25c0c", "public_key_type": "uncompressed", "wif_type": "wif" @@ -44,7 +38,7 @@ "compressed": { "wif": "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP", "public_key": "02d2ce831dd06e5c1f5b1121ef34c2af4bcb01b126e309234adbc3561b60c9360e", - "address": "164MQi977u9GUteHr4EPH27VkkdxmfCvGW", + "address": "QRfLX1RpJN25v2jKGPYsQHu8G1ag3sHJeL", "wif_checksum": "dc37f844", "public_key_type": "compressed", "wif_type": "wif-compressed" diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 0c83767..0000000 --- a/tox.ini +++ /dev/null @@ -1,29 +0,0 @@ -[tox] -envlist = python39,python310,python311 - -[travis] -python = - 3.9: python39 - 3.10: python310 - 3.11: python311 - -[testenv:python39] -install_command = - python -m pip install --upgrade pip {opts} {packages} - pip install -e . {opts} {packages} -extras = tests,docs -commands = python -m pytest - -[testenv:python310] -install_command = - python -m pip install --upgrade pip {opts} {packages} - pip install -e . {opts} {packages} -extras = tests,docs -commands = python -m pytest - -[testenv:python311] -install_command = - python -m pip install --upgrade pip {opts} {packages} - pip install -e . {opts} {packages} -extras = tests,docs -commands = python -m pytest