diff --git a/src/Makefile.am b/src/Makefile.am index 7a8e53cc34..a7fa283cf7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -238,6 +238,7 @@ BITCOIN_CORE_H = \ script/sign.h \ script/signingprovider.h \ script/standard.h \ + sequentia/rpc/rawtransaction.cpp \ shutdown.h \ signet.h \ streams.h \ diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 1881bb12f7..a71d02633e 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -3,6 +3,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#define __SEQUENTIA__ 1 +#ifdef __SEQUENTIA__ +#include +#endif + #include #include #include @@ -457,7 +462,7 @@ static RPCHelpMan verifytxoutproof() }; } -static RPCHelpMan createrawtransaction() +[[maybe_unused]] static RPCHelpMan createrawtransaction() { return RPCHelpMan{"createrawtransaction", "\nCreate a transaction spending the given inputs and creating new outputs.\n" @@ -3375,6 +3380,47 @@ static RPCHelpMan updatepsbtpegin() // END ELEMENTS // +#ifdef __SEQUENTIA__ +void RegisterRawTransactionRPCCommands(CRPCTable &t) +{ +// clang-format off +static const CRPCCommand commands[] = +{ // category actor (function) argNames + // --------------------- ------------------------ ----------------------- ---------- + { "rawtransactions", &getrawtransaction, }, + { "rawtransactions", &sequentia::createrawtransaction, }, + { "rawtransactions", &decoderawtransaction, }, + { "rawtransactions", &decodescript, }, + { "rawtransactions", &sendrawtransaction, }, + { "rawtransactions", &combinerawtransaction, }, + { "rawtransactions", &signrawtransactionwithkey, }, + { "rawtransactions", &testmempoolaccept, }, + { "rawtransactions", &decodepsbt, }, + { "rawtransactions", &combinepsbt, }, + { "rawtransactions", &finalizepsbt, }, + { "rawtransactions", &createpsbt, }, + { "rawtransactions", &converttopsbt, }, + { "rawtransactions", &utxoupdatepsbt, }, + { "rawtransactions", &parsepsbt, }, +#if 0 + { "rawtransactions", &joinpsbts, }, +#endif + { "rawtransactions", &analyzepsbt, }, + + { "blockchain", &gettxoutproof, }, + { "blockchain", &verifytxoutproof, }, + { "rawtransactions", &rawissueasset, }, + { "rawtransactions", &rawreissueasset, }, + { "rawtransactions", &rawblindrawtransaction, }, + { "rawtransactions", &calculateasset, }, + { "rawtransactions", &updatepsbtpegin, }, +}; +// clang-format on + for (const auto& c : commands) { + t.appendCommand(c.name, &c); + } +} +#else void RegisterRawTransactionRPCCommands(CRPCTable &t) { // clang-format off @@ -3414,3 +3460,4 @@ static const CRPCCommand commands[] = t.appendCommand(c.name, &c); } } +#endif diff --git a/src/sequentia/rpc/rawtransaction.cpp b/src/sequentia/rpc/rawtransaction.cpp new file mode 100644 index 0000000000..bd717e5957 --- /dev/null +++ b/src/sequentia/rpc/rawtransaction.cpp @@ -0,0 +1,115 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2009-2021 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include +#include +#include +#include +#include +#include