1
0
Fork 0
forked from lthn/blockchain

added class drafts for plain wallet api for mobile app - added missing files

This commit is contained in:
cryptozoidberg 2020-01-14 23:27:49 +01:00
parent 41d4a9b0d3
commit dc215dacb4
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
4 changed files with 94 additions and 0 deletions

View file

@ -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)
{
}
}

View file

@ -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 <string>
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);
}

View file

@ -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
}
}

View file

@ -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 <string>
#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<tools::wallet2> m_wallet;
};
}