
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A Python library for implementation of Bitcoin Improvement Proposal - 0038 / BIP38 protocol.
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.
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+ssh://github.com/hdwallet-io/python-bip38.git
#!/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 = "bip38" # 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 Import 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)
WIF: 5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR
BIP38 Encrypted WIF: 6PRVWUbm1BX3fNUTgZoCYj9VLAQzxB9daqVfr4TgbhxegTKoSz9jRDks9a
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
}
-----------------------------------------------------------------------------------------------------------------------------
WIF: L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP
BIP38 Encrypted WIF: 6PYNKZ1EBitZbP8ctdXG5xkpsFAtgd7c9JQdLCXqbhBRbANSnuUK6PgQdV
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
}
-----------------------------------------------------------------------------------------------------------------------------
#!/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 = "bip38" # 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), "wif_type": "wif", "lot": None, "sequence": None},
# Random owner salt & seed, No compression, With lot & sequence
{"owner_salt": os.urandom(8), "seed": os.urandom(24), "wif_type": "wif", "lot": 863741, "sequence": 1},
# Random owner salt & seed, Compression, No lot & sequence
{"owner_salt": os.urandom(8), "seed": os.urandom(24), "wif_type": "wif-compressed", "lot": None, "sequence": None},
# Random owner salt & seed, Compression, With lot & sequence
{"owner_salt": os.urandom(8), "seed": os.urandom(24), "wif_type": "wif-compressed", "lot": 863741, "sequence": 1},
# With owner salt & seed, No compression, No lot & sequence
{"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "wif_type": "wif", "lot": None, "sequence": None},
# With owner salt & seed, No compression, With lot & sequence
{"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "wif_type": "wif", "lot": 567885, "sequence": 1},
# With owner salt & seed, Compression, No lot & sequence
{"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "wif_type": "wif-compressed", "lot": None, "sequence": None},
# With owner salt & seed, Compression, With lot & sequence
{"owner_salt": "75ed1cdeb254cb38", "seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c", "wif_type": "wif-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, wif_type=kwarg["wif_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)
Intermediate Passphrase: passphrasemG6Ae7PYWEuso54V4dMKFK7mpFPz4t1T1BhywtvNVt7E4xDM8Vq8xo68K1DdW9
Encrypted WIF: {
"encrypted_wif": "6PfQma2dv1Hov8kSobbZapHKA69g96oGWA8rwfcDP4ZKs4ncqPeJP23qnL",
"confirmation_code": "cfrm38V5Txsng8kFerZPprMH9LjHnDTv22JzroUqHwZN1B9xxoB6PU3UtC5o12wZspe21Uec33W",
"public_key": "049a25850934fd16bc108046a60794a18cf27ec32f1ad5de75d6571aecc889ff7f30135195c69931115a9f2bf4262ee1dba707021dacd4e0bf68da195f60727643",
"seed": "d937267be638947d6dc7971f9781ce61076847b490b2dd06",
"public_key_type": "uncompressed",
"address": "1QAWVYDpESZ2afxFnbWS5G64EQfzo2imNR"
}
Confirm Code: {
"public_key": "049a25850934fd16bc108046a60794a18cf27ec32f1ad5de75d6571aecc889ff7f30135195c69931115a9f2bf4262ee1dba707021dacd4e0bf68da195f60727643",
"public_key_type": "uncompressed",
"address": "1QAWVYDpESZ2afxFnbWS5G64EQfzo2imNR",
"lot": null,
"sequence": null
}
BIP38 Decrypted: {
"wif": "5KXXTS7ULYo1kxgirDgRfzviTEocKGLtTV9SUHHbRb7z2AEVYVB",
"private_key": "e155b57cb4d94ef4d2b5c32879ffaad851da0b20a10deb392c31404cc29637a4",
"wif_type": "wif",
"public_key": "049a25850934fd16bc108046a60794a18cf27ec32f1ad5de75d6571aecc889ff7f30135195c69931115a9f2bf4262ee1dba707021dacd4e0bf68da195f60727643",
"public_key_type": "uncompressed",
"seed": "d937267be638947d6dc7971f9781ce61076847b490b2dd06",
"address": "1QAWVYDpESZ2afxFnbWS5G64EQfzo2imNR",
"lot": null,
"sequence": null
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseeX6YjBj1AXhiw28iQfnn1d5N6Lsf3crrsmxQMaHco4Kpzoymah46hP5bbQqRva
Encrypted WIF: {
"encrypted_wif": "6PgRJMfKzjt6puxjobszrdtDa4KeRT5dRNwSaqj8BtQAvsUJLz7XifLqxf",
"confirmation_code": "cfrm38V8kgweU6FKDGY1pMtucLfBTp5bD3QMd64GmRJtVR8ifZaynoLDW8kHY9rACq3Xvrdpe2R",
"public_key": "040bf1d82b01b2691aaf143991dbaf3cea58cafd74b4377536a1f4da684151151c44118b137652df3bc328c7bb07b9aefa94a6194e8a1b9034265100df99740819",
"seed": "73123c97834cc52fe937e29d33b86a12085a241e347dffc5",
"public_key_type": "uncompressed",
"address": "1Pd8Scd8KfhzLSzyLgMgLKc58tk9f3dnD5"
}
Confirm Code: {
"public_key": "040bf1d82b01b2691aaf143991dbaf3cea58cafd74b4377536a1f4da684151151c44118b137652df3bc328c7bb07b9aefa94a6194e8a1b9034265100df99740819",
"public_key_type": "uncompressed",
"address": "1Pd8Scd8KfhzLSzyLgMgLKc58tk9f3dnD5",
"lot": 863741,
"sequence": 1
}
BIP38 Decrypted: {
"wif": "5J3W72BqJ7YFEkJR8KuGmHRXdr8AJUnKT1oKp6hQAtx8bKVgmqU",
"private_key": "1e0223706880eebc96470b0629262e31a828992e0f531c6e4793cfee9d30a694",
"wif_type": "wif",
"public_key": "040bf1d82b01b2691aaf143991dbaf3cea58cafd74b4377536a1f4da684151151c44118b137652df3bc328c7bb07b9aefa94a6194e8a1b9034265100df99740819",
"public_key_type": "uncompressed",
"seed": "73123c97834cc52fe937e29d33b86a12085a241e347dffc5",
"address": "1Pd8Scd8KfhzLSzyLgMgLKc58tk9f3dnD5",
"lot": 863741,
"sequence": 1
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseoCyP3atnoAxv9o8Nhfi7S6fsucu46s9wpDxS4cBGeVPhNQxSBrps3yR4P4Z7Mk
Encrypted WIF: {
"encrypted_wif": "6PnR1W6XPrx6RK4mgGCjwx3c24zs6peuyBiiKoYfwGpWoJw8A9HeiGz1wf",
"confirmation_code": "cfrm38VUHiVy4jMqxJHqQdsuaLkMN3LxdseumiHcQQMCnnYaRtkZ5oQEtfWdhnbGCjV1hXU7zqc",
"public_key": "02b12e27280a74e55d979d23eb2dc4c107028236512bdbdbed3ba0d3c139500522",
"seed": "ab0ed77af04c331801afcf61a27c787e7e27de179230d41e",
"public_key_type": "compressed",
"address": "17vbPdAUMftcA5qHXTVS6KiAWh3psHq8Kn"
}
Confirm Code: {
"public_key": "02b12e27280a74e55d979d23eb2dc4c107028236512bdbdbed3ba0d3c139500522",
"public_key_type": "compressed",
"address": "17vbPdAUMftcA5qHXTVS6KiAWh3psHq8Kn",
"lot": null,
"sequence": null
}
BIP38 Decrypted: {
"wif": "L4bxdGanNrHTkDHzQWAwn7y8KhVzAsuuXUzqK8Ah6822MbTy9HMt",
"private_key": "dc4eb85c52ad9d82152a0ecd9542202a164556eb1f444a59da5936269527278e",
"wif_type": "wif-compressed",
"public_key": "02b12e27280a74e55d979d23eb2dc4c107028236512bdbdbed3ba0d3c139500522",
"public_key_type": "compressed",
"seed": "ab0ed77af04c331801afcf61a27c787e7e27de179230d41e",
"address": "17vbPdAUMftcA5qHXTVS6KiAWh3psHq8Kn",
"lot": null,
"sequence": null
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphrasedCiMgYvgiaHcR6kGF5SLANuCte7ggrupYpsLbe9kNtmqx4XQF2LGBiPZSbwGWk
Encrypted WIF: {
"encrypted_wif": "6PoNSsfzTSpKZreygc8DVCMTjFXVwMNw6ddpXSCkgYYWw3uHNXs2BRkx8M",
"confirmation_code": "cfrm38VXQMwDqnPHg3NB2G35qxgadVCfoC5SjntbhaBxAe5VX9sasVHqQHKV44XLLpJqy2z4iu6",
"public_key": "033c0c467652bb0f8227c014551af8cc3cd4c4f0984f712ddc94dc49723370b8e7",
"seed": "bad4ce4f6e1a6aa226cd89602d92c636d4ab23891808cc6e",
"public_key_type": "compressed",
"address": "1JkLXpEAwGBcViwwVDXfiURfd4dg8A4Qos"
}
Confirm Code: {
"public_key": "033c0c467652bb0f8227c014551af8cc3cd4c4f0984f712ddc94dc49723370b8e7",
"public_key_type": "compressed",
"address": "1JkLXpEAwGBcViwwVDXfiURfd4dg8A4Qos",
"lot": 863741,
"sequence": 1
}
BIP38 Decrypted: {
"wif": "L4KTQ9h5uUWy6r4tXC1wDCfGJbB31nX4Wmfz6FKHAjGxncnBLoh4",
"private_key": "d3d13893951d6256e5633f6a003936214c4b0e9f1211682af1df858464d9ea52",
"wif_type": "wif-compressed",
"public_key": "033c0c467652bb0f8227c014551af8cc3cd4c4f0984f712ddc94dc49723370b8e7",
"public_key_type": "compressed",
"seed": "bad4ce4f6e1a6aa226cd89602d92c636d4ab23891808cc6e",
"address": "1JkLXpEAwGBcViwwVDXfiURfd4dg8A4Qos",
"lot": 863741,
"sequence": 1
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseondJwvQGEWFNrMBiUhdVNwLNdPDHBRrVZkVuH3dVubC4JcuxLnKWFep8uGwhth
Encrypted WIF: {
"encrypted_wif": "6PfXN4Up17PgFdoxEBVwAxRuaQ1UderDKQ2q6nGCrhLVPD7GS3awBfKtox",
"confirmation_code": "cfrm38V5qTEpyzqDDgry1mEmRPEn4xaXC74tKbH9jfSpHkfiud3SW9dRSmhZHuTwvW78eVUWwjx",
"public_key": "04bc2b0adc1106e45fa86a3507cbec5bc834c33780c7ae774b885ac50c8489fc481ae5198457e5733e3f91e2b68df10ba55fa0408a918e4f37e475591cfa41d31d",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"public_key_type": "uncompressed",
"address": "12NzK7AbrtY5evVfDb7nnM5DNtbjGKBB6g"
}
Confirm Code: {
"public_key": "04bc2b0adc1106e45fa86a3507cbec5bc834c33780c7ae774b885ac50c8489fc481ae5198457e5733e3f91e2b68df10ba55fa0408a918e4f37e475591cfa41d31d",
"public_key_type": "uncompressed",
"address": "12NzK7AbrtY5evVfDb7nnM5DNtbjGKBB6g",
"lot": null,
"sequence": null
}
BIP38 Decrypted: {
"wif": "5KZ2wb3ANziUbxcxLDq6nK854r6wF3qnxvk6rBVnKhdrRS3YcHb",
"private_key": "e4c27e23f2b243ca0cea2695362a48aaefba35951bcbaad9ebab1d7ab2a1b8e9",
"wif_type": "wif",
"public_key": "04bc2b0adc1106e45fa86a3507cbec5bc834c33780c7ae774b885ac50c8489fc481ae5198457e5733e3f91e2b68df10ba55fa0408a918e4f37e475591cfa41d31d",
"public_key_type": "uncompressed",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"address": "12NzK7AbrtY5evVfDb7nnM5DNtbjGKBB6g",
"lot": null,
"sequence": null
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseb7ruSNPsLdQF6TuHGftP9MBJM9mzUFqEpr37Quzua67SzYyhXtgGg32Ukkif4w
Encrypted WIF: {
"encrypted_wif": "6PgD5Q4BChU5kScKdbcbmdUtkEu9fBTDkB6EHmErH4kRyzveKRodpHzimL",
"confirmation_code": "cfrm38V84rmYgaHJLLMVTcRmZwnBF7Jj9gShJpWMfsM16r7DS1paysBseVo7WhJ7BwZUfh9ts8a",
"public_key": "0433f3d09ee3059b559194833063993626c6ce1bb25c3d3ee4e9b2d02ff7c3c6206d526a30d072c167176af1c45bf7331057c2ebc6701e3aebb74acdb3c2b9a5e5",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"public_key_type": "uncompressed",
"address": "1NwyXJShcScbkpB9dUwPqR3fv39Krt9xqH"
}
Confirm Code: {
"public_key": "0433f3d09ee3059b559194833063993626c6ce1bb25c3d3ee4e9b2d02ff7c3c6206d526a30d072c167176af1c45bf7331057c2ebc6701e3aebb74acdb3c2b9a5e5",
"public_key_type": "uncompressed",
"address": "1NwyXJShcScbkpB9dUwPqR3fv39Krt9xqH",
"lot": 567885,
"sequence": 1
}
BIP38 Decrypted: {
"wif": "5JdgMq9wsmqtMJ7YD5vahf89vgHQgeAqJieAP2h664vUqxhMriv",
"private_key": "6b9c6a32ae3b9d5fc2050f69e9f9825fece3276e3c979ae16e20c12f971de115",
"wif_type": "wif",
"public_key": "0433f3d09ee3059b559194833063993626c6ce1bb25c3d3ee4e9b2d02ff7c3c6206d526a30d072c167176af1c45bf7331057c2ebc6701e3aebb74acdb3c2b9a5e5",
"public_key_type": "uncompressed",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"address": "1NwyXJShcScbkpB9dUwPqR3fv39Krt9xqH",
"lot": 567885,
"sequence": 1
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseondJwvQGEWFNrMBiUhdVNwLNdPDHBRrVZkVuH3dVubC4JcuxLnKWFep8uGwhth
Encrypted WIF: {
"encrypted_wif": "6PnYeWbwUScx6DctoFqiJW2vDmsWCT6cVfwmjQXu8aTKLQ2aZfmin6RH6R",
"confirmation_code": "cfrm38VUic4gbBuLjvrDaXgwMeK42YR5zGLjpgNDF6p7Ro4EVAe9HkeDhzNZxJU9PCJ7PsbHy5s",
"public_key": "03bc2b0adc1106e45fa86a3507cbec5bc834c33780c7ae774b885ac50c8489fc48",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"public_key_type": "compressed",
"address": "1AUJ4rSiyRd7CmHo6K6n12QPpa1vKW2LaG"
}
Confirm Code: {
"public_key": "03bc2b0adc1106e45fa86a3507cbec5bc834c33780c7ae774b885ac50c8489fc48",
"public_key_type": "compressed",
"address": "1AUJ4rSiyRd7CmHo6K6n12QPpa1vKW2LaG",
"lot": null,
"sequence": null
}
BIP38 Decrypted: {
"wif": "L4tPZwEYQ5k4qJVhDqdJWzzCwyjCR1YMsrDEp5L33YMf8eKHmk5o",
"private_key": "e4c27e23f2b243ca0cea2695362a48aaefba35951bcbaad9ebab1d7ab2a1b8e9",
"wif_type": "wif-compressed",
"public_key": "03bc2b0adc1106e45fa86a3507cbec5bc834c33780c7ae774b885ac50c8489fc48",
"public_key_type": "compressed",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"address": "1AUJ4rSiyRd7CmHo6K6n12QPpa1vKW2LaG",
"lot": null,
"sequence": null
}
-----------------------------------------------------------------------------------------------------------------------------
Intermediate Passphrase: passphraseb7ruSNDGP7cmpocKZC2U6hDfT4dFEPB2dpdr9UNjwwUW2tSYkKukFv4JNYnXAs
Encrypted WIF: {
"encrypted_wif": "6PoG6xLK7sgeZP8gPzNmFvmp4serw1MTprunK29YwbwnxsnU7Jmb6EpHqs",
"confirmation_code": "cfrm38VX3h421KiP57NBU3ohrBh1bAgBbMvqntvcqw6wfgq9EaBmDJxLx3Mq6hTmRxBnLzQa8kR",
"public_key": "03bf9c150cef682e643e4745a4bba70fd183bf1726e3dd45d76fef599b39a3e1fc",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"public_key_type": "compressed",
"address": "15u9QmfwXC5Hi9mK9qwHCuCdGCw1rPwmug"
}
Confirm Code: {
"public_key": "03bf9c150cef682e643e4745a4bba70fd183bf1726e3dd45d76fef599b39a3e1fc",
"public_key_type": "compressed",
"address": "15u9QmfwXC5Hi9mK9qwHCuCdGCw1rPwmug",
"lot": 369861,
"sequence": 1
}
BIP38 Decrypted: {
"wif": "L1HftYcdEQ3D7Vn6f1psXumjY5PLdtGLx781C2bLnzZcPFTM7gDQ",
"private_key": "7963113c7ec95bedb41d415e393ea07edcdb2fe9ab080faededd38b210b320ff",
"wif_type": "wif-compressed",
"public_key": "03bf9c150cef682e643e4745a4bba70fd183bf1726e3dd45d76fef599b39a3e1fc",
"public_key_type": "compressed",
"seed": "99241d58245c883896f80843d2846672d7312e6195ca1a6c",
"address": "15u9QmfwXC5Hi9mK9qwHCuCdGCw1rPwmug",
"lot": 369861,
"sequence": 1
}
-----------------------------------------------------------------------------------------------------------------------------
To get started, just fork this repo, clone it locally, and run:
pip install -e .[tests,docs]
You can run the tests with:
coverage run -m pytest
To see the coverage:
coverage report
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.
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.
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 |
If this tool was helpful, support its development with a donation or a ⭐!
47xYi7dw4VchWhbhacY6RZHDmmcxZdzPE9tLk84c7hE72bw6aLSMVFWPXxGMEEYofkjNjxoWfnLSHejS6yzRGnPqEtxfgZi
0xD3cbCB0B6F82A03C715D665b72dC44CEf54e6D9B
| meherett.eth
16c7ajUwHEMaafrceuYSrd35SDjmfVdjoS
[!TIP] We accept a wide range of cryptocurrencies! If you'd like to donate using another coin, generate an address using the following ECC public keys at https://hdwallet.online:
- SLIP10-Secp256k1: 029890465120fb6c4efecdfcfd149f8333b0929b98976722a28ee39f5344d29eee
- SLIP10-Ed25519: 007ff5643c73e46e6c6a0dfd702894610505423e145dc8a93df19ff44eb011323b
- Kholaw-Ed25519: 005a49188ccd3d841dd877d7c00078da5c90452cbd69d4cef7a959f679fcc0e0e3
- SLIP10-Ed25519-Blake2b: 0051e8b29f7d0214dc96843cdbdcc071dc65397016ea6f7381f81bf42d76c7357c
- SLIP10-Nist256p1: 039ee4e2aadd6f4e7938d164b646c4b424114b8dd57252287151398ba0baf25780
Distributed under the MIT license. See LICENSE
for more information.
FAQs
A Python library for implementation of Bitcoin Improvement Proposal - 0038 / BIP38 protocol.
We found that bip38 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.