Add /validate endpoint to admin REST api (#81)

This commit is contained in:
Lee *!* Clagett
2023-09-27 16:50:12 -04:00
committed by Lee *!* Clagett
parent 3b35ce2845
commit 10dc4801d7
4 changed files with 122 additions and 1 deletions

View File

@@ -70,6 +70,14 @@ namespace rpc
};
void read_bytes(wire::reader&, rescan_req&);
struct validate_req
{
std::string spend_public_hex;
std::string view_public_hex;
std::string view_key_hex;
};
void read_bytes(wire::reader&, validate_req&);
struct webhook_add_req
{
std::string url;
@@ -147,6 +155,13 @@ namespace rpc
};
constexpr const rescan_ rescan{};
struct validate_
{
using request = validate_req;
expect<void> operator()(wire::writer& dest, const db::storage&, const request& req) const;
};
constexpr const validate_ validate{};
struct webhook_add_
{
using request = webhook_add_req;
@@ -177,5 +192,4 @@ namespace rpc
{ return (*this)(dest, std::move(disk)); }
};
constexpr const webhook_list_ webhook_list{};
}} // lws // rpc