From a11eb7502d2a6c0eb8e00c663e9c779627e55d96 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Fri, 6 Jul 2018 01:48:51 +0400 Subject: [PATCH] added PUBKEY address generation --- pybtc/address.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pybtc/address.py b/pybtc/address.py index 1487342..ee8354d 100644 --- a/pybtc/address.py +++ b/pybtc/address.py @@ -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)