A Python library for implementation of Bitcoin Improvement Proposal - 0038 / BIP38 protocol.
Project description
Bitcoin Improvement Proposal - 0038 / BIP38
A Python library for the implementation of Bitcoin Improvement Proposal - 0038 / (BIP38) protocol. This library supports both No EC-multiply and EC-multiply modes and is compatible with over 150+ cryptocurrencies. It's specifically tailored for Pay-to-PubKey-Hash (P2PKH) address types.
For more info see the Passphrase-protected private key - BIP38 spec.
Installation
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 the git:
pip install git+git://github.com/meherett/python-bip38.git
Quick Usage
no EC multiply:
#!/usr/bin/env python3
from typing import List
import json
from bip38 import BIP38
from bip38.cryptocurrencies import Bitcoin as Cryptocurrency
from bip38.wif import private_key_to_wif
# Private key
PRIVATE_KEY: str = "cbf4b9f70470856bb4f40f80b87edb90865997ffee6df315ab166d713af433a5"
# Passphrase / password
PASSPHRASE: str = "meherett" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9"
# Network type
NETWORK:str = "mainnet"
# To show detail
DETAIL: bool = True
# Initialize BIP38 instance
bip38: BIP38 = BIP38(
cryptocurrency=Cryptocurrency, network=NETWORK
)
# Wallet Important Format's
WIFs: List[str] = [
private_key_to_wif(
private_key=PRIVATE_KEY, cryptocurrency=Cryptocurrency, network=NETWORK, wif_type="wif"
), # No compression
private_key_to_wif(
private_key=PRIVATE_KEY, cryptocurrency=Cryptocurrency, network=NETWORK, 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)
Output
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
}
-----------------------------------------------------------------------------------------------------------------------------
EC multiply:
#!/usr/bin/env python3
from typing import List
import json
import os
from bip38 import BIP38
from bip38.cryptocurrencies import Bitcoin as Cryptocurrency
# Passphrase / password
PASSPHRASE: str = "meherett" # u"\u03D2\u0301\u0000\U00010400\U0001F4A9"
# Network type
NETWORK: str = "mainnet"
# To show detail
DETAIL: bool = True
# Initialize BIP38 instance
bip38: BIP38 = BIP38(
cryptocurrency=Cryptocurrency, network=NETWORK
)
# List of owner salt, seed, public key type, lot, and sequence kwargs
KWARGS: 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 kwarg in KWARGS:
intermediate_passphrase: str = bip38.intermediate_code(
passphrase=PASSPHRASE, owner_salt=kwarg["owner_salt"], lot=kwarg["lot"], sequence=kwarg["sequence"]
)
print("Intermediate Passphrase:", intermediate_passphrase)
encrypted_wif: dict = bip38.create_new_encrypted_wif(
intermediate_passphrase=intermediate_passphrase, public_key_type=kwarg["public_key_type"], seed=kwarg["seed"],
)
print("Encrypted WIF:", json.dumps(encrypted_wif, indent=4))
print("Confirm Code:", json.dumps(bip38.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)
Output
Intermediate Passphrase: passphrasemPCQA1bnn4UUz4fKQyGxxmRh3aXjTQnFcqzHreFSkcpCRatZwwpphgbscdDCZu
Encrypted WIF: {
"encrypted_wif": "6PfWfN5oVWW7L4FwCfWNzwyjqRjV4N8VfYKmhW3FBKQ3Ye622bb5UuAHPS",
"confirmation_code": "cfrm38V5oAdNKq1FqxhoKmAdf1gNYxS2HKBwqS2W1D4zmgfpv8AZeLXJXbvTEkZoDaJ9TKKaMne",
"public_key": "0461b5e4a6fbfb6fda76a56cda81a8212c40a5dd7ae7a6ad4f949eb6754c78cc3586a8ccff2b3804d6c8b30cdf66a943466f61470f3e16421eeabea77af60c323c",
"seed": "ebda4e39aecc735594ebcdc09884eba498df3c029a18fc87",
"public_key_type": "uncompressed",
"address": "1Pyq2x2rAHLcwBohNRePsEDkF7W3S2n4Y8"
}
Confirm Code: {
"public_key": "0461b5e4a6fbfb6fda76a56cda81a8212c40a5dd7ae7a6ad4f949eb6754c78cc3586a8ccff2b3804d6c8b30cdf66a943466f61470f3e16421eeabea77af60c323c",
"public_key_type": "uncompressed",
"address": "1Pyq2x2rAHLcwBohNRePsEDkF7W3S2n4Y8",
"lot": null,
"sequence": null
}
BIP38 Decrypted: {
"wif": "5K4EF2MxNbvSc6Yhgv3oFDRRdjQjvMWE4x28BzeaW3RvxN6FkyU",
"private_key": "a35aa5ea84d0896c62bc3c4456a224800970d37f6f89ecc0bc27e52a114977e6",
"wif_type": "wif",
"public_key": "0461b5e4a6fbfb6fda76a56cda81a8212c40a5dd7ae7a6ad4f949eb6754c78cc3586a8ccff2b3804d6c8b30cdf66a943466f61470f3e16421eeabea77af60c323c",
"public_key_type": "uncompressed",
"seed": "ebda4e39aecc735594ebcdc09884eba498df3c029a18fc87",
"address": "1Pyq2x2rAHLcwBohNRePsEDkF7W3S2n4Y8",
"lot": null,
"sequence": null
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseYhgPNmgeMKW83mQbXW54e4mkkUnd2VRHmNdEq5p3RqRxycziF4f6SLdo4vhZGo
Encrypted WIF: {
"encrypted_wif": "6PgLWy958ySQGGGiK3SWPBfmhMdWndzuSiDMfBQiskmfzQjjJ7EA3LR1tQ",
"confirmation_code": "cfrm38V8V74UD2Ef4EmEqgAyiHFny8W8h99PjjHwabUcuFA24A56BFmHAB8T46H1XBsWidaBdQL",
"public_key": "04266c15371b6f3331d0f5f6487153a0ec3e50efeb112470fc43aa6ff2915b9f48b6676629fa1eba9fbb26d6d601e7041f8ef6cc3a6a0cbcfb668074a203aa7036",
"seed": "bfd386d285386b43f7e7cf467bb06cd4926f0b3d322fd578",
"public_key_type": "uncompressed",
"address": "1Q1MUMMEbGczofkLiXZZbGcZNGnFBb3zM8"
}
Confirm Code: {
"public_key": "04266c15371b6f3331d0f5f6487153a0ec3e50efeb112470fc43aa6ff2915b9f48b6676629fa1eba9fbb26d6d601e7041f8ef6cc3a6a0cbcfb668074a203aa7036",
"public_key_type": "uncompressed",
"address": "1Q1MUMMEbGczofkLiXZZbGcZNGnFBb3zM8",
"lot": 863741,
"sequence": 1
}
BIP38 Decrypted: {
"wif": "5K1X75CJR4vEBh3dGek94c4wta9f4PcGnXzSusP6fcBBrSivS2K",
"private_key": "9d33cfac10985552c46f4bef6e0a1b3be6934f89505f2c72fb369b9a707d002b",
"wif_type": "wif",
"public_key": "04266c15371b6f3331d0f5f6487153a0ec3e50efeb112470fc43aa6ff2915b9f48b6676629fa1eba9fbb26d6d601e7041f8ef6cc3a6a0cbcfb668074a203aa7036",
"public_key_type": "uncompressed",
"seed": "bfd386d285386b43f7e7cf467bb06cd4926f0b3d322fd578",
"address": "1Q1MUMMEbGczofkLiXZZbGcZNGnFBb3zM8",
"lot": 863741,
"sequence": 1
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphrasemJ3X3pNLKLC8crc2obQGDP8SbNSdRdLJq2gDAX5u7Lz4boYRRePo1poeHki7Fz
Encrypted WIF: {
"encrypted_wif": "6PnQA3hpiizx1AtX1gfx4CfmyxWNm8pnDN31efWntycsVhfLU6v6LYzCtQ",
"confirmation_code": "cfrm38VUEwMBdVAiTWS6VbAgHcLa7HMofzDcL4RsAfLpgPabqa5HcAApGV2YDJnmuFbcFjQ97ZC",
"public_key": "036dc1541e29df17ee74b483dd8fe5cadd88da1b3f1b24c1bbfcb7595aca3e1b67",
"seed": "975730a1a70bcc1681f28a53daa90164a67d1cba800b086f",
"public_key_type": "compressed",
"address": "14fLQxFW9PdvvrueWJKBcoCSKSEcUBFsVG"
}
Confirm Code: {
"public_key": "036dc1541e29df17ee74b483dd8fe5cadd88da1b3f1b24c1bbfcb7595aca3e1b67",
"public_key_type": "compressed",
"address": "14fLQxFW9PdvvrueWJKBcoCSKSEcUBFsVG",
"lot": null,
"sequence": null
}
BIP38 Decrypted: {
"wif": "L4TUrZr1NYbhrrkky6FQ7dsQSaGJv9GQQ4adPHysftByGWGwbCnR",
"private_key": "d7f21834c5deea162b6bd6fdb22c7155aea4d7467d8c3caa3f38e1873da3557c",
"wif_type": "wif-compressed",
"public_key": "036dc1541e29df17ee74b483dd8fe5cadd88da1b3f1b24c1bbfcb7595aca3e1b67",
"public_key_type": "compressed",
"seed": "975730a1a70bcc1681f28a53daa90164a67d1cba800b086f",
"address": "14fLQxFW9PdvvrueWJKBcoCSKSEcUBFsVG",
"lot": null,
"sequence": null
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseazADit3HysrPUxPQ5AT6uVku3baWtNnNvEhSLu8j7HsAfi1yXc2i8grdQ6c69m
Encrypted WIF: {
"encrypted_wif": "6PoJKygGkurVG7M5irdCZRw6uQ5g41SuJBsdxGnz7c3345cW8e5FRLU6oj",
"confirmation_code": "cfrm38VXAwUqLBKTncF2N3KQ8P7moHbEG8161X2XuNEi3H5hYQLZGeBUQKDFH36R9bTNAb1Nvt8",
"public_key": "0236efe6b2424ae586285c54fa85975253def57a346171f8099d05f1141d44c8b4",
"seed": "ca1799e4c398ec6c2e76d070977a38a7831db1c48bf3299a",
"public_key_type": "compressed",
"address": "15CBXmKhqjZsozC34qwogKAcTVzAfx7ExZ"
}
Confirm Code: {
"public_key": "0236efe6b2424ae586285c54fa85975253def57a346171f8099d05f1141d44c8b4",
"public_key_type": "compressed",
"address": "15CBXmKhqjZsozC34qwogKAcTVzAfx7ExZ",
"lot": 863741,
"sequence": 1
}
BIP38 Decrypted: {
"wif": "L22EnKuUvu2dSdbS2gV3VzMVYPzCsfo8z7VyMwKDhsTpjcSCYhB3",
"private_key": "8f48fd8acbe206d77fafa605fdc7356296074b543e43048123873dd9db7d1174",
"wif_type": "wif-compressed",
"public_key": "0236efe6b2424ae586285c54fa85975253def57a346171f8099d05f1141d44c8b4",
"public_key_type": "compressed",
"seed": "ca1799e4c398ec6c2e76d070977a38a7831db1c48bf3299a",
"address": "15CBXmKhqjZsozC34qwogKAcTVzAfx7ExZ",
"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
}
-----------------------------------------------------------------------------------------------------------------------------
Development
To get started, just fork this repo, clone it locally, and run:
pip install -e .[tests,docs]
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.
Supported Cryptocurrencies
This module supports more than 150+ cryptocurrencies, including the following:
Name | Network | WIF Prefix | Address Prefix |
---|---|---|---|
Adcoin | mainnet | 0xb0 | 0x17 |
Anon | mainnet | 0x80 | 0x582 |
Argoneum | mainnet | 0xbf | 0x32 |
Artax | mainnet | 0x97 | 0x17 |
Aryacoin | mainnet | 0x97 | 0x17 |
Asiacoin | mainnet | 0x97 | 0x17 |
Auroracoin | mainnet | 0x97 | 0x17 |
Avian | mainnet | 0x80 | 0x3c |
Axe | mainnet | 0xcc | 0x37 |
Bata | mainnet | 0xa4 | 0x19 |
BeetleCoin | mainnet | 0x99 | 0x1a |
BelaCoin | mainnet | 0x99 | 0x19 |
BitCloud | mainnet | 0x99 | 0x19 |
BitSend | mainnet | 0xcc | 0x66 |
Bitcoin | mainnet | 0x80 | 0x00 |
testnet | 0xef | 0x6f | |
regtest | 0xef | 0x6f | |
BitcoinAtom | mainnet | 0x80 | 0x17 |
BitcoinGold | mainnet | 0x80 | 0x26 |
BitcoinGreen | mainnet | 0x2e | 0x26 |
BitcoinPlus | mainnet | 0x99 | 0x19 |
BitcoinPrivate | mainnet | 0x80 | 0x1325 |
testnet | 0xef | 0x1957 | |
BitcoinSV | mainnet | 0x80 | 0x00 |
BitcoinZ | mainnet | 0x80 | 0x1cb8 |
Bitcore | mainnet | 0x80 | 0x03 |
Blackcoin | mainnet | 0x99 | 0x19 |
BlockStamp | mainnet | 0x80 | 0x00 |
Blocknode | mainnet | 0x4b | 0x19 |
testnet | 0x89 | 0x55 | |
Bolivarcoin | mainnet | 0xd5 | 0x55 |
BritCoin | mainnet | 0x99 | 0x19 |
CPUChain | mainnet | 0x80 | 0x1c |
CanadaeCoin | mainnet | 0x9c | 0x1c |
Cannacoin | mainnet | 0x9c | 0x1c |
Clams | mainnet | 0x85 | 0x89 |
ClubCoin | mainnet | 0x99 | 0x1c |
Compcoin | mainnet | 0x9c | 0x1c |
CranePay | mainnet | 0x7b | 0x1c |
Crave | mainnet | 0x99 | 0x46 |
Dash | mainnet | 0xcc | 0x4c |
testnet | 0xef | 0x8c | |
DeepOnion | mainnet | 0x9f | 0x1f |
Defcoin | mainnet | 0x9e | 0x1e |
Denarius | mainnet | 0x9e | 0x1e |
Diamond | mainnet | 0xda | 0x5a |
DigiByte | mainnet | 0x80 | 0x1e |
Digitalcoin | mainnet | 0x9e | 0x1e |
Divi | mainnet | 0xd4 | 0x1e |
testnet | 0xd4 | 0x1e | |
Dogecoin | mainnet | 0xf1 | 0x1e |
testnet | 0xf1 | 0x71 | |
EDRCoin | mainnet | 0xdd | 0x5d |
Ecoin | mainnet | 0xdc | 0x5c |
Einsteinium | mainnet | 0xa1 | 0x21 |
Elastos | mainnet | 0x80 | 0x21 |
Energi | mainnet | 0x6a | 0x21 |
EuropeCoin | mainnet | 0xa8 | 0x21 |
Evrmore | mainnet | 0x80 | 0x21 |
testnet | 0xef | 0x6f | |
ExclusiveCoin | mainnet | 0xa1 | 0x21 |
FIX | mainnet | 0x3c | 0x23 |
testnet | 0xed | 0x4c | |
Feathercoin | mainnet | 0x8e | 0x0e |
Firo | mainnet | 0xd2 | 0x52 |
Firstcoin | mainnet | 0xa3 | 0x23 |
Flashcoin | mainnet | 0xc4 | 0x44 |
Flux | mainnet | 0x80 | 0x1cb8 |
Foxdcoin | mainnet | 0x80 | 0x23 |
testnet | 0xef | 0x5f | |
FujiCoin | mainnet | 0xa4 | 0x24 |
GCRCoin | mainnet | 0x9a | 0x26 |
GameCredits | mainnet | 0xa6 | 0x26 |
GoByte | mainnet | 0xc6 | 0x26 |
Gridcoin | mainnet | 0xbe | 0x3e |
GroestlCoin | mainnet | 0x80 | 0x24 |
testnet | 0xef | 0x6f | |
Gulden | mainnet | 0x62 | 0x26 |
Helleniccoin | mainnet | 0xb0 | 0x30 |
Hempcoin | mainnet | 0xa8 | 0x28 |
Horizen | mainnet | 0x80 | 0x2089 |
Hush | mainnet | 0x80 | 0x1cb8 |
IXCoin | mainnet | 0x80 | 0x8a |
InsaneCoin | mainnet | 0x37 | 0x66 |
InternetOfPeople | mainnet | 0x31 | 0x75 |
Jumbucks | mainnet | 0xab | 0x2b |
Kobocoin | mainnet | 0xa3 | 0x23 |
Komodo | mainnet | 0xbc | 0x3c |
LBRYCredits | mainnet | 0x1c | 0x55 |
Landcoin | mainnet | 0xb0 | 0x30 |
Linx | mainnet | 0xcb | 0x4b |
Litecoin | mainnet | 0xb0 | 0x30 |
testnet | 0xef | 0x6f | |
LitecoinCash | mainnet | 0xb0 | 0x1c |
LitecoinZ | mainnet | 0x80 | 0xab3 |
Lkrcoin | mainnet | 0xb0 | 0x30 |
Lynx | mainnet | 0xad | 0x2d |
Mazacoin | mainnet | 0xe0 | 0x32 |
Megacoin | mainnet | 0xb2 | 0x32 |
Minexcoin | mainnet | 0x80 | 0x4b |
Monacoin | mainnet | 0xb0 | 0x32 |
Monk | mainnet | 0x37 | 0x33 |
Myriadcoin | mainnet | 0xb2 | 0x32 |
NIX | mainnet | 0x80 | 0x26 |
Namecoin | mainnet | 0x80 | 0x34 |
Navcoin | mainnet | 0x96 | 0x35 |
Neblio | mainnet | 0xb5 | 0x35 |
Neoscoin | mainnet | 0xb1 | 0x35 |
Neurocoin | mainnet | 0xb5 | 0x35 |
NewYorkCoin | mainnet | 0xbc | 0x3c |
Novacoin | mainnet | 0x88 | 0x08 |
NuBits | mainnet | 0x96 | 0x19 |
NuShares | mainnet | 0x95 | 0x3f |
OKCash | mainnet | 0x03 | 0x37 |
Omni | mainnet | 0x80 | 0x00 |
testnet | 0xef | 0x6f | |
Onix | mainnet | 0xcb | 0x4b |
Particl | mainnet | 0x6c | 0x38 |
Peercoin | mainnet | 0xb7 | 0x37 |
Pesobit | mainnet | 0xb7 | 0x37 |
Phore | mainnet | 0xd4 | 0x37 |
Pinkcoin | mainnet | 0x83 | 0x03 |
Pivx | mainnet | 0xd4 | 0x1e |
testnet | 0xef | 0x8b | |
PoSWCoin | mainnet | 0xb7 | 0x37 |
Potcoin | mainnet | 0xb7 | 0x37 |
ProjectCoin | mainnet | 0x75 | 0x37 |
Putincoin | mainnet | 0xb7 | 0x37 |
Qtum | mainnet | 0x80 | 0x3a |
testnet | 0xef | 0x78 | |
RSK | mainnet | 0x80 | 0x00 |
testnet | 0xef | 0x6f | |
Rapids | mainnet | 0x2e | 0x3d |
Ravencoin | mainnet | 0x80 | 0x3c |
testnet | 0x80 | 0x6f | |
Reddcoin | mainnet | 0xbd | 0x3d |
Ripple | mainnet | 0x80 | 0x00 |
Ritocoin | mainnet | 0x8b | 0x19 |
Rubycoin | mainnet | 0xbc | 0x3c |
Safecoin | mainnet | 0xbd | 0x3d |
Saluscoin | mainnet | 0xbf | 0x3f |
Scribe | mainnet | 0x6e | 0x3c |
ShadowCash | mainnet | 0xbf | 0x3f |
testnet | 0xff | 0x7f | |
Slimcoin | mainnet | 0x46 | 0x3f |
testnet | 0x57 | 0x6f | |
Smileycoin | mainnet | 0x05 | 0x19 |
Solarcoin | mainnet | 0x92 | 0x12 |
Stash | mainnet | 0xcc | 0x4c |
testnet | 0xef | 0x8c | |
Stratis | mainnet | 0xbf | 0x3f |
testnet | 0xbf | 0x41 | |
Sugarchain | mainnet | 0x80 | 0x3f |
testnet | 0xef | 0x42 | |
Syscoin | mainnet | 0x80 | 0x3f |
TOACoin | mainnet | 0xc1 | 0x41 |
TWINS | mainnet | 0x42 | 0x49 |
testnet | 0xed | 0x4c | |
ThoughtAI | mainnet | 0x7b | 0x07 |
UltimateSecureCash | mainnet | 0xbf | 0x44 |
Unobtanium | mainnet | 0xe0 | 0x82 |
Vcash | mainnet | 0xc7 | 0x47 |
Verge | mainnet | 0x9e | 0x1e |
Vertcoin | mainnet | 0x80 | 0x47 |
Viacoin | mainnet | 0xc7 | 0x47 |
testnet | 0xff | 0x7f | |
VirtualCash | mainnet | 0xc7 | 0x47 |
Vivo | mainnet | 0xc6 | 0x46 |
Voxels | mainnet | 0xc6 | 0x46 |
Wagerr | mainnet | 0xc7 | 0x49 |
Whitecoin | mainnet | 0xc9 | 0x49 |
Wincoin | mainnet | 0xc9 | 0x49 |
XUEZ | mainnet | 0xd4 | 0x4b |
Ycash | mainnet | 0x80 | 0x1c28 |
ZClassic | mainnet | 0x80 | 0x1cb8 |
Zcash | mainnet | 0x80 | 0x1cb8 |
testnet | 0xef | 0x1d25 | |
Zetacoin | mainnet | 0xe0 | 0x50 |
ZooBC | mainnet | 0x80 | 0x00 |
eGulden | mainnet | 0xb0 | 0x30 |
Donations
Buy me a coffee if You found this tool helpful:
- Bitcoin - 12uaGVdX1t86FXLQ4yYPrRQDCK7xGGu82r
- Ethereum / Tether - 0xCCAad7A87fd81553d0F93F743Fb4Fc6B213b228B
- Bitcoin / Ethereum / Tether - With Unstoppable hd.wallet
Thank you very much for your support.
License
Distributed under the MIT license. See LICENSE
for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.