Bitcoin ABC 0.32.5
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 <rpc/util.h>
9
10#include <map>
11#include <string>
12#include <vector>
13
15class CChainParams;
16
18class Coin;
19class COutPoint;
20class SigningProvider;
21class UniValue;
22
32void SignTransaction(CMutableTransaction &mtx, const SigningProvider *keystore,
33 const std::map<COutPoint, Coin> &coins,
34 const UniValue &hashType, UniValue &result);
36 const std::map<COutPoint, Coin> &coins,
37 const std::map<int, std::string> &input_errors,
38 UniValue &result);
39
49void ParsePrevouts(const UniValue &prevTxsUnival,
51 std::map<COutPoint, Coin> &coins);
52
55 const UniValue &inputs_in,
56 const UniValue &outputs_in,
57 const UniValue &locktime);
58
63std::vector<RPCResult> DecodeTxDoc(const std::string &txid_field_doc,
64 bool wallet);
65
66#endif // BITCOIN_RPC_RAWTRANSACTION_UTIL_H
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Definition: chainparams.h:86
A mutable version of CTransaction.
Definition: transaction.h:274
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:20
A UTXO entry.
Definition: coins.h:29
Fillable signing provider that keeps keys in an address->secret map.
An interface to be implemented by keystores that support signing.
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.
void SignTransactionResultToJSON(CMutableTransaction &mtx, bool complete, const std::map< COutPoint, Coin > &coins, const std::map< int, std::string > &input_errors, UniValue &result)
CMutableTransaction ConstructTransaction(const CChainParams &params, const UniValue &inputs_in, const UniValue &outputs_in, const UniValue &locktime)
Create a transaction from univalue parameters.
std::vector< RPCResult > DecodeTxDoc(const std::string &txid_field_doc, bool wallet)
Explain the UniValue "decoded" transaction object, may include extra fields if processed by wallet.
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.