Merge pull request #6 from bitaps-com/temp

pubkey address generation
This commit is contained in:
Aleksey Karpov 2018-07-06 01:49:53 +04:00 committed by GitHub
commit 12094bf6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -9,7 +9,7 @@ Welcome to PYBTC
Python library for Bitcoin.
Current version is |release|.
Current version is 2.0.
.. _GitHub: https://github.com/bitaps-com/pybtc
@ -58,6 +58,7 @@ What's new in pybtc 2.0 ?
- Hierarchical Deterministic Wallets (BIP32)
- Wallet class implemented acording BIP44
- Imporved transaction deserialization perfomance
- Multisig transacton signing regardless of sequence

View File

@ -171,11 +171,11 @@ class Address():
#: flag for testnet network address (boolean)
self.type = address_type
if address_type in ("P2WPKH"):
if address_type == "PUBKEY":
self.pubkey_script = b"%s%s" % (op_push_data(self.public_key.key), OP_CHECKSIG)
self.pubkey_script_hex = self.pubkey_script.hex()
#: version of witness program for SEGWIT address (string)
self.witness_version = 0
else:
self.witness_version = None
self.witness_version = 0 if address_type == "P2WPKH" else None
self.compressed = compressed
if address_type == "P2SH_P2WPKH":
#: flag for script hash address (boolean)