Package org.consensusj.bitcoinj.service
Interface SignTransactionService
- All Superinterfaces:
TransactionSigner
- All Known Implementing Classes:
WalletSigningService
A wallet-level service that can complete and sign transactions.
-
Method Summary
Modifier and TypeMethodDescriptioncreateBitcoinSigningRequest
(List<TransactionInputData> inputUtxos, List<TransactionOutputData> outputs, org.bitcoinj.base.Address changeAddress) Create a signing request, given a list of inputs, a list of outputs and a change address.CompletableFuture
<org.bitcoinj.core.Transaction> signSendToAddress
(org.bitcoinj.base.Address toAddress, org.bitcoinj.base.Coin amount) Create and sign a transaction to send coins to the specified address.Methods inherited from interface org.consensusj.bitcoinj.signing.TransactionSigner
signTransaction
-
Method Details
-
signSendToAddress
CompletableFuture<org.bitcoinj.core.Transaction> signSendToAddress(org.bitcoinj.base.Address toAddress, org.bitcoinj.base.Coin amount) throws IOException, org.bitcoinj.core.InsufficientMoneyException Create and sign a transaction to send coins to the specified address. Implements the transaction-building and signing portion ofsendtoaddress
RPC.- Parameters:
toAddress
- destination addressamount
- amount to send- Returns:
- a future signed transaction
- Throws:
IOException
org.bitcoinj.core.InsufficientMoneyException
-
createBitcoinSigningRequest
SigningRequest createBitcoinSigningRequest(List<TransactionInputData> inputUtxos, List<TransactionOutputData> outputs, org.bitcoinj.base.Address changeAddress) throws org.bitcoinj.core.InsufficientMoneyException Create a signing request, given a list of inputs, a list of outputs and a change address. Calculates the fee, adds a change output, and returns a completed signing request.- Parameters:
inputUtxos
- list of available UTXOsoutputs
- Outputs to send tochangeAddress
- address that will receive change- Returns:
- a completed transaction signing request
- Throws:
org.bitcoinj.core.InsufficientMoneyException
-