Class LocalTransactionSigner
- All Implemented Interfaces:
TransactionSigner
TransactionSigner
implementation for signing inputs using keys from provided KeyBag
.
This signer doesn't create input scripts for tx inputs. Instead it expects inputs to contain scripts with empty sigs and replaces one of the empty sigs with calculated signature.
This signer is always implicitly added into every wallet and it is the first signer to be executed during tx
completion. As the first signer to create a signature, it stores derivation path of the signing key in a given
TransactionSigner.ProposedTransaction
object that will be also passed then to the next signer in chain. This allows other
signers to use correct signing key for P2SH inputs, because all the keys involved in a single P2SH address have
the same derivation path.
This signer always uses Transaction.SigHash.ALL
signing mode.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bitcoinj.signers.TransactionSigner
TransactionSigner.MissingSignatureException, TransactionSigner.ProposedTransaction
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isReady()
Returns true if this signer is ready to be used.boolean
signInputs
(TransactionSigner.ProposedTransaction propTx, KeyBag keyBag) Signs given transaction's inputs.
-
Constructor Details
-
LocalTransactionSigner
public LocalTransactionSigner()
-
-
Method Details
-
isReady
public boolean isReady()Description copied from interface:TransactionSigner
Returns true if this signer is ready to be used.- Specified by:
isReady
in interfaceTransactionSigner
-
signInputs
Description copied from interface:TransactionSigner
Signs given transaction's inputs. Returns true if signer is compatible with given transaction (can do something meaningful with it). Otherwise this method returns false- Specified by:
signInputs
in interfaceTransactionSigner
-