Information: Python bitcoin private key
Python bitcoin private key | |
Python bitcoin private key | 998 |
BITCOIN USAGE GRAPH | 886 |
bitcoinaddress 0.1.5
Bitcoin Wallet Address Generator
This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3. It generates a Private Key in different formats (hex, wif and compressed wif) and corresponding Public Addresses, raw, P2WPKH addresses starting with prefix 1, P2SH addresses starting with prefix 3 as part of Segwit soft fork and Bech32 addresses with prefix bc1 P2WPKH and P2WSH.
Installation
Usage
Example 1 - Mainnet
frombitcoinaddressimportWalletwallet=Wallet()print(wallet)Output:
Example 2 - Testnet
frombitcoinaddressimportWalletwallet=Wallet(testnet=True)print(wallet)Output:
Example 3 - Import Private Key
frombitcoinaddressimportWalletwallet=Wallet('5HqrbgkWPqBy6dvCE7FoUiMuiCfFPRdtRsyi6NuCM2np8qBZxq5')print(wallet)Output:
Example 4 - Check attributes
frombitcoinaddressimportWalletwallet=Wallet()print(wallet.key.__dict__)print(wallet.key.__dict__['mainnet'].__dict__)print(wallet.key.__dict__['testnet'].__dict__)print(wallet.address.__dict__)print(wallet.address.__dict__['mainnet'].__dict__)print(wallet.address.__dict__['testnet'].__dict__)License and other
This software is distributed under the terms of the MIT License. See the file 'LICENSE' in the root directory of the present distribution, or http://opensource.org/licenses/MIT.
Bech32 address scripts source from https://github.com/sipa/bech32/tree/master/ref/python

-
-