add wallet.is_segwit
This commit is contained in:
@@ -217,6 +217,8 @@ class Deterministic_KeyStore(Software_KeyStore):
|
||||
def get_passphrase(self, password):
|
||||
return pw_decode(self.passphrase, password) if self.passphrase else ''
|
||||
|
||||
def is_segwit(self):
|
||||
return False
|
||||
|
||||
|
||||
class Xpub:
|
||||
@@ -333,6 +335,8 @@ class BIP32_KeyStore(Deterministic_KeyStore, Xpub):
|
||||
pk = bip32_private_key(sequence, k, c)
|
||||
return pk
|
||||
|
||||
def is_segwit(self):
|
||||
return bool(deserialize_xpub(self.xpub)[0])
|
||||
|
||||
|
||||
class Old_KeyStore(Deterministic_KeyStore):
|
||||
|
||||
Reference in New Issue
Block a user