diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp new file mode 100644 index 00000000..c73cf54c --- /dev/null +++ b/src/wallet/plain_wallet_api.cpp @@ -0,0 +1,39 @@ +// Copyright (c) 2014-2020 Zano Project +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + + +#include "plain_wallet_api.h" +#include "plain_wallet_api_impl.h" + +namespace wallet +{ + hwallet create_instance(const std::string port, const std::string ip) + { + + } + void destroy_instance(hwallet) + { + + } + std::string open(const std::string& path, const std::string password) + { + + } + void start_sync_thread(hwallet) + { + + } + std::string get_sync_status(hwallet) + { + + } + std::string sync(hwallet) + { + + } + std::string invoke(hwallet h, const std::string& params) + { + + } +} \ No newline at end of file diff --git a/src/wallet/plain_wallet_api.h b/src/wallet/plain_wallet_api.h new file mode 100644 index 00000000..3540856b --- /dev/null +++ b/src/wallet/plain_wallet_api.h @@ -0,0 +1,20 @@ +// Copyright (c) 2014-2020 Zano Project +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + + +#pragma once + +#include + +namespace wallet +{ + typedef void* hwallet; + hwallet create_instance(const std::string port, const std::string ip); + void destroy_instance(hwallet); + std::string open(const std::string& path, const std::string password); + void start_sync_thread(hwallet); + std::string get_sync_status(hwallet); + std::string sync(hwallet); + std::string invoke(hwallet h, const std::string& params); +} \ No newline at end of file diff --git a/src/wallet/plain_wallet_api_impl.cpp b/src/wallet/plain_wallet_api_impl.cpp new file mode 100644 index 00000000..bc430f3b --- /dev/null +++ b/src/wallet/plain_wallet_api_impl.cpp @@ -0,0 +1,13 @@ +// Copyright (c) 2014-2018 Zano Project +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "plain_wallet_api_impl.h" + +namespace wallet +{ + bool plain_wallet_api_impl::init(const std::string ip, const std::string port) + { + return true;//TODO + } +} \ No newline at end of file diff --git a/src/wallet/plain_wallet_api_impl.h b/src/wallet/plain_wallet_api_impl.h new file mode 100644 index 00000000..3ebe2437 --- /dev/null +++ b/src/wallet/plain_wallet_api_impl.h @@ -0,0 +1,22 @@ +// Copyright (c) 2014-2020 Zano Project +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + + +#pragma once + +#include +#include "wallet2.h" + + +namespace wallet +{ + class plain_wallet_api_impl + { + public: + bool init(const std::string ip, const std::string port); + private: + std::shared_ptr m_wallet; + }; + +} \ No newline at end of file