From 595283851d8fe3e18553fdb2ad6e773e1a9c1a22 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 9 Jan 2019 20:16:46 +0100 Subject: [PATCH] [rpc] util: add deriveaddresses method --- doc/release-notes-14667.md | 4 ++ src/rpc/client.cpp | 2 + src/rpc/misc.cpp | 91 ++++++++++++++++++++++++++ test/functional/rpc_deriveaddresses.py | 50 ++++++++++++++ test/functional/test_runner.py | 2 + 5 files changed, 149 insertions(+) create mode 100644 doc/release-notes-14667.md create mode 100755 test/functional/rpc_deriveaddresses.py diff --git a/doc/release-notes-14667.md b/doc/release-notes-14667.md new file mode 100644 index 000000000..5cb1d0aee --- /dev/null +++ b/doc/release-notes-14667.md @@ -0,0 +1,4 @@ +New RPC methods +------------ + +- `deriveaddresses` returns one or more addresses corresponding to an [output descriptor](/doc/descriptors.md). diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index 6f1bfb03d..3d0a16512 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -68,6 +68,8 @@ static const CRPCConvertParam vRPCConvertParams[] = { "sendmany", 4, "subtractfeefrom" }, { "sendmany", 5 , "replaceable" }, { "sendmany", 6 , "conf_target" }, + { "deriveaddresses", 1, "begin" }, + { "deriveaddresses", 2, "end" }, { "scantxoutset", 1, "scanobjects" }, { "addmultisigaddress", 0, "nrequired" }, { "addmultisigaddress", 1, "keys" }, diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index dc3745858..70cc96c40 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -16,6 +16,7 @@ #include #include #include +#include