mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
d5d3490a95
99e88a372 rpc: Remove dependency on interfaces::Chain in SignTransaction (Antoine Riard) Pull request description: Assuming wallet RPCs and node RPCs will go into different processes, signrawtransactionwithkey doesn't need to access Coins via interfaces::Chain, it may use directly utility in node/coins.cpp Obviously will need rebase after #15638 Tree-SHA512: 42ee8fcbcd38643bbd82210db6f68249bed5ee036a4c930a1db534d0469a133e287b8869c977bf0cc79a7296dde04f72adb74d24e1cd20f4a280f4c2b7fceb74
33 lines
1.4 KiB
C++
33 lines
1.4 KiB
C++
// Copyright (c) 2017 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_RPC_RAWTRANSACTION_UTIL_H
|
|
#define BITCOIN_RPC_RAWTRANSACTION_UTIL_H
|
|
|
|
#include <map>
|
|
|
|
class CBasicKeyStore;
|
|
class UniValue;
|
|
struct CMutableTransaction;
|
|
class Coin;
|
|
class COutPoint;
|
|
|
|
/**
|
|
* Sign a transaction with the given keystore and previous transactions
|
|
*
|
|
* @param mtx The transaction to-be-signed
|
|
* @param prevTxs Array of previous txns outputs that tx depends on but may not yet be in the block chain
|
|
* @param keystore Temporary keystore containing signing keys
|
|
* @param coins Map of unspent outputs - coins in mempool and current chain UTXO set, may be extended by previous txns outputs after call
|
|
* @param tempKeystore Whether to use temporary keystore
|
|
* @param hashType The signature hash type
|
|
* @returns JSON object with details of signed transaction
|
|
*/
|
|
UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxs, CBasicKeyStore* keystore, std::map<COutPoint, Coin>& coins, bool tempKeystore, const UniValue& hashType);
|
|
|
|
/** Create a transaction from univalue parameters */
|
|
CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime);
|
|
|
|
#endif // BITCOIN_RPC_RAWTRANSACTION_UTIL_H
|