aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcsigner.cpp
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2019-02-15 12:54:29 +0100
committerSjors Provoost <sjors@sprovoost.nl>2021-02-23 14:34:30 +0100
commit07b7c940a7da138d55a484ef83fee19ebf58a867 (patch)
treef46128f68c0f12d15b267768092352ff02724432 /src/wallet/rpcsigner.cpp
parent8ce7767071779a0170364e6426bd393ed71bf281 (diff)
downloadbitcoin-07b7c940a7da138d55a484ef83fee19ebf58a867.tar.xz
rpc: add external signer RPC files
Diffstat (limited to 'src/wallet/rpcsigner.cpp')
-rw-r--r--src/wallet/rpcsigner.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/wallet/rpcsigner.cpp b/src/wallet/rpcsigner.cpp
new file mode 100644
index 0000000000..d2478908df
--- /dev/null
+++ b/src/wallet/rpcsigner.cpp
@@ -0,0 +1,41 @@
+// Copyright (c) 2018-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 <rpc/server.h>
+#include <util/strencodings.h>
+#include <wallet/rpcsigner.h>
+#include <wallet/wallet.h>
+
+#ifdef ENABLE_EXTERNAL_SIGNER
+
+// CRPCCommand table won't compile with an empty array
+static RPCHelpMan dummy()
+{
+ return RPCHelpMan{"dummy",
+ "\nDoes nothing.\n"
+ "",
+ {},
+ RPCResult{RPCResult::Type::NONE, "", ""},
+ RPCExamples{""},
+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
+{
+ return NullUniValue;
+},
+ };
+}
+
+Span<const CRPCCommand> GetSignerRPCCommands()
+{
+// clang-format off
+static const CRPCCommand commands[] =
+{ // category actor (function)
+ // --------------------- ------------------------
+ { "signer", &dummy, },
+};
+// clang-format on
+ return MakeSpan(commands);
+}
+
+
+#endif // ENABLE_EXTERNAL_SIGNER