mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
move sign_transaction
This commit is contained in:
parent
d471d4b905
commit
1d1da0e1dc
1 changed files with 9 additions and 9 deletions
|
@ -70,6 +70,15 @@ class Software_KeyStore(KeyStore):
|
|||
decrypted = ec.decrypt_message(message)
|
||||
return decrypted
|
||||
|
||||
def sign_transaction(self, tx, password):
|
||||
# Raise if password is not correct.
|
||||
self.check_password(password)
|
||||
# Add private keys
|
||||
keypairs = self.get_keypairs_for_sig(tx, password)
|
||||
# Sign
|
||||
if keypairs:
|
||||
tx.sign(keypairs)
|
||||
|
||||
|
||||
class Imported_KeyStore(Software_KeyStore):
|
||||
# keystore for imported private keys
|
||||
|
@ -290,15 +299,6 @@ class BIP32_KeyStore(Deterministic_KeyStore, Xpub):
|
|||
|
||||
return keypairs
|
||||
|
||||
def sign_transaction(self, tx, password):
|
||||
# Raise if password is not correct.
|
||||
self.check_password(password)
|
||||
# Add private keys
|
||||
keypairs = self.get_keypairs_for_sig(tx, password)
|
||||
# Sign
|
||||
if keypairs:
|
||||
tx.sign(keypairs)
|
||||
|
||||
def get_mnemonic(self, password):
|
||||
return self.get_seed(password)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue