Bitcoin Core  0.19.99
P2P Digital Currency
rawtransaction_util.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2019 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_RPC_RAWTRANSACTION_UTIL_H
6 #define BITCOIN_RPC_RAWTRANSACTION_UTIL_H
7 
8 #include <map>
9 
11 class UniValue;
12 struct CMutableTransaction;
13 class Coin;
14 class COutPoint;
15 class SigningProvider;
16 
26 void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore, const std::map<COutPoint, Coin>& coins, const UniValue& hashType, UniValue& result);
27 
35 void ParsePrevouts(const UniValue& prevTxsUnival, FillableSigningProvider* keystore, std::map<COutPoint, Coin>& coins);
36 
38 CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime, bool rbf);
39 
40 #endif // BITCOIN_RPC_RAWTRANSACTION_UTIL_H
A UTXO entry.
Definition: coins.h:30
Fillable signing provider that keeps keys in an address->secret map.
void ParsePrevouts(const UniValue &prevTxsUnival, FillableSigningProvider *keystore, std::map< COutPoint, Coin > &coins)
Parse a prevtxs UniValue array and get the map of coins from it.
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:18
CMutableTransaction ConstructTransaction(const UniValue &inputs_in, const UniValue &outputs_in, const UniValue &locktime, bool rbf)
Create a transaction from univalue parameters.
An interface to be implemented by keystores that support signing.
A mutable version of CTransaction.
Definition: transaction.h:366
void SignTransaction(CMutableTransaction &mtx, const SigningProvider *keystore, const std::map< COutPoint, Coin > &coins, const UniValue &hashType, UniValue &result)
Sign a transaction with the given keystore and previous transactions.