public class LocalTransactionSigner extends StatelessTransactionSigner
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
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.
TransactionSigner.MissingSignatureException, TransactionSigner.ProposedTransaction
Constructor and Description |
---|
LocalTransactionSigner() |
Modifier and Type | Method and 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.
|
deserialize, serialize
public boolean isReady()
TransactionSigner
public boolean signInputs(TransactionSigner.ProposedTransaction propTx, KeyBag keyBag)
TransactionSigner
Copyright © 2016. All rights reserved.