1
0

getpubkeys command

This commit is contained in:
ThomasV
2013-10-03 13:31:59 +02:00
parent 2f66cdf908
commit 6f2471b69b
4 changed files with 29 additions and 20 deletions

View File

@@ -42,6 +42,8 @@ class Account(object):
def get_address(self, for_change, n):
pass
def get_pubkeys(self, sequence):
return [ self.get_pubkey( *sequence )]
@@ -182,6 +184,8 @@ class BIP32_Account_2of2(BIP32_Account):
address = hash_160_to_bc_address(hash_160(self.redeem_script((for_change, n)).decode('hex')), 5)
return address
def get_pubkeys(self, sequence):
return [ self.get_pubkey( *sequence ), self.get_pubkey2( *sequence )]
class BIP32_Account_2of3(BIP32_Account_2of2):
@@ -212,4 +216,8 @@ class BIP32_Account_2of3(BIP32_Account_2of2):
pubkey3 = self.get_pubkey3(chain, i)
return Transaction.multisig_script([pubkey1, pubkey2, pubkey3], 3)
def get_pubkeys(self, sequence):
return [ self.get_pubkey( *sequence ), self.get_pubkey2( *sequence ), self.get_pubkey3( *sequence )]