Class LocalTransactionSigner
- java.lang.Object
-
- org.bitcoinj.signers.LocalTransactionSigner
-
- All Implemented Interfaces:
TransactionSigner
public class LocalTransactionSigner extends java.lang.Object implements TransactionSigner
TransactionSigner
implementation for signing inputs using keys from providedKeyBag
.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
Constructors Constructor Description LocalTransactionSigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isReady()
Returns true if this signer is ready to be used.boolean
signInputs(TransactionSigner.ProposedTransaction propTx, KeyBag keyBag)
Signs given transaction's inputs.
-
-
-
Method Detail
-
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
public boolean signInputs(TransactionSigner.ProposedTransaction propTx, KeyBag keyBag)
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
-
-