Package org.bitcoinj.signers
Class CustomTransactionSigner
java.lang.Object
org.bitcoinj.signers.CustomTransactionSigner
- All Implemented Interfaces:
TransactionSigner
This signer may be used as a template for creating custom multisig transaction signers.
Concrete implementations have to implement getSignature(Sha256Hash, List)
method returning a signature and a public key of the keypair used to created that signature.
It's up to custom implementation where to locate signatures: it may be a network connection,
some local API or something else.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bitcoinj.signers.TransactionSigner
TransactionSigner.MissingSignatureException, TransactionSigner.ProposedTransaction
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CustomTransactionSigner.SignatureAndKey
getSignature
(Sha256Hash sighash, List<ChildNumber> derivationPath) boolean
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
-
CustomTransactionSigner
public CustomTransactionSigner()
-
-
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
-
getSignature
protected abstract CustomTransactionSigner.SignatureAndKey getSignature(Sha256Hash sighash, List<ChildNumber> derivationPath)
-