added PUBKEY address generation
This commit is contained in:
parent
f9eae689ad
commit
a11eb7502d
@ -171,11 +171,11 @@ class Address():
|
|||||||
#: flag for testnet network address (boolean)
|
#: flag for testnet network address (boolean)
|
||||||
self.type = address_type
|
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)
|
#: version of witness program for SEGWIT address (string)
|
||||||
self.witness_version = 0
|
self.witness_version = 0 if address_type == "P2WPKH" else None
|
||||||
else:
|
|
||||||
self.witness_version = None
|
|
||||||
self.compressed = compressed
|
self.compressed = compressed
|
||||||
if address_type == "P2SH_P2WPKH":
|
if address_type == "P2SH_P2WPKH":
|
||||||
#: flag for script hash address (boolean)
|
#: flag for script hash address (boolean)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user