aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction_util.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-04-02 16:51:32 -0400
committerJohn Newbery <john@johnnewbery.com>2019-04-09 17:53:08 -0400
commit0509465542d63a5bbe7296f283f44dd491e74f78 (patch)
tree142c4a2249c49d0060cd9e64d89f63b77e6e3445 /src/rpc/rawtransaction_util.h
parent1acc61f8746bc6efb905e121a9f607c4f5982b35 (diff)
[build] Move rpc rawtransaction util functions to rpc/rawtransaction_util.cpp
rpc/rawtransaction.cpp moves to libbitcoin_server since it should not be accessed by non-node libraries. The utility following utility methods move to their own unit rpc/rawtransaction_util since they need to be accessed by non-node libraries: - `ConstructTransaction` - `TxInErrorToJSON` - `SignTransaction`
Diffstat (limited to 'src/rpc/rawtransaction_util.h')
-rw-r--r--src/rpc/rawtransaction_util.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction_util.h b/src/rpc/rawtransaction_util.h
new file mode 100644
index 0000000000..5529dedbd4
--- /dev/null
+++ b/src/rpc/rawtransaction_util.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2017-2018 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
+
+class CBasicKeyStore;
+class UniValue;
+struct CMutableTransaction;
+
+namespace interfaces {
+class Chain;
+} // namespace interfaces
+
+/** Sign a transaction with the given keystore and previous transactions */
+UniValue SignTransaction(interfaces::Chain& chain, CMutableTransaction& mtx, const UniValue& prevTxs, CBasicKeyStore *keystore, bool tempKeystore, const UniValue& hashType);
+
+/** Create a transaction from univalue parameters */
+CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime, const UniValue& rbf);
+
+#endif // BITCOIN_RPC_RAWTRANSACTION_UTIL_H