Bitcoin ABC  0.22.13
P2P Digital Currency
rawtransaction_util.h
Go to the documentation of this file.
1 // Copyright (c) 2017 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 #include <string>
10 
12 class CChainParams;
13 
15 class Coin;
16 class COutPoint;
17 class SigningProvider;
18 class UniValue;
19 
29 void SignTransaction(CMutableTransaction &mtx, const SigningProvider *keystore,
30  const std::map<COutPoint, Coin> &coins,
31  const UniValue &hashType, UniValue &result);
32 void SignTransactionResultToJSON(CMutableTransaction &mtx, bool complete,
33  const std::map<COutPoint, Coin> &coins,
34  std::map<int, std::string> &input_errors,
35  UniValue &result);
36 
46 void ParsePrevouts(const UniValue &prevTxsUnival,
47  FillableSigningProvider *keystore,
48  std::map<COutPoint, Coin> &coins);
49 
52  const UniValue &inputs_in,
53  const UniValue &outputs_in,
54  const UniValue &locktime);
55 
56 #endif // BITCOIN_RPC_RAWTRANSACTION_UTIL_H
A UTXO entry.
Definition: coins.h:27
CMutableTransaction ConstructTransaction(const CChainParams &params, const UniValue &inputs_in, const UniValue &outputs_in, const UniValue &locktime)
Create a transaction from univalue parameters.
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system...
Definition: chainparams.h:47
void SignTransactionResultToJSON(CMutableTransaction &mtx, bool complete, const std::map< COutPoint, Coin > &coins, std::map< int, std::string > &input_errors, UniValue &result)
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:22
An interface to be implemented by keystores that support signing.
A mutable version of CTransaction.
Definition: transaction.h:295
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.