OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
atomizer_client.hpp
Go to the documentation of this file.
1// Copyright (c) 2021 MIT Digital Currency Initiative,
2// Federal Reserve Bank of Boston
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#ifndef OPENCBDC_TX_SRC_CLIENT_ATOMIZER_CLIENT_H_
7#define OPENCBDC_TX_SRC_CLIENT_ATOMIZER_CLIENT_H_
8
9#include "client.hpp"
11
12namespace cbdc {
14 class atomizer_client : public client {
15 public:
24 const std::shared_ptr<logging::log>& logger,
25 const std::string& wallet_file,
26 const std::string& client_file);
27
28 ~atomizer_client() override;
29
30 atomizer_client() = delete;
32 auto operator=(const atomizer_client&) -> atomizer_client& = delete;
35
43 auto sync() -> bool override;
44
45 protected:
53 auto init_derived() -> bool override;
54
58 auto send_mint_tx(const transaction::full_tx& mint_tx)
59 -> bool override;
60
61 private:
62 cbdc::network::connection_manager m_atomizer_network;
64 std::shared_ptr<logging::log> m_logger;
66
67 std::unique_ptr<secp256k1_context,
68 decltype(&secp256k1_context_destroy)>
69 m_secp{secp256k1_context_create(SECP256K1_CONTEXT_SIGN),
70 &secp256k1_context_destroy};
71 };
72}
73
74#endif
Client for interacting with the atomizer architecture.
auto operator=(const atomizer_client &) -> atomizer_client &=delete
auto operator=(atomizer_client &&) -> atomizer_client &=delete
auto init_derived() -> bool override
Initializes the atomizer client.
atomizer_client(atomizer_client &&)=delete
auto sync() -> bool override
Update the client with the latest state from the watchtower.
atomizer_client(const atomizer_client &)=delete
auto send_mint_tx(const transaction::full_tx &mint_tx) -> bool override
Sends the given transaction directly to the atomizer cluster.
External client for sending new transactions to the system.
Client to synchronously request information from the watchtower.
struct secp256k1_context_struct secp256k1_context
Definition keys.hpp:14
Project-wide configuration options.
Definition config.hpp:132
A complete transaction.
Client helpers for interfacing with a watchtower server.