forked from lthn/blockchain
ionc swaps implementation: inital code
This commit is contained in:
parent
123e599202
commit
8f483db05e
3 changed files with 21 additions and 0 deletions
|
|
@ -914,6 +914,9 @@ namespace tools
|
|||
void redeem_htlc(const crypto::hash& htlc_tx_id, const std::string& origin, currency::transaction& result_tx);
|
||||
void redeem_htlc(const crypto::hash& htlc_tx_id, const std::string& origin);
|
||||
bool check_htlc_redeemed(const crypto::hash& htlc_tx_id, std::string& origin, crypto::hash& redeem_tx_id);
|
||||
|
||||
// ionic swaps:
|
||||
bool create_ionic_swap_proposal(uint64_t wallet_id, const view::ionic_swap_proposal_info& proposal);
|
||||
private:
|
||||
|
||||
// -------- t_transport_state_notifier ------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -854,6 +854,23 @@ std::string wallets_manager::get_fav_offers(const std::list<bc_services::offer_i
|
|||
#endif
|
||||
}
|
||||
|
||||
std::string wallets_manager::create_ionic_swap_proposal(uint64_t wallet_id, const view::ionic_swap_proposal_info& proposal)
|
||||
{
|
||||
GET_WALLET_OPT_BY_ID(wallet_id, wo);
|
||||
try {
|
||||
bool r = wo.w->get()->create_ionic_swap_proposal(proposal);
|
||||
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return API_RETURN_CODE_FAIL;
|
||||
}
|
||||
return API_RETURN_CODE_OK;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
std::string wallets_manager::get_my_offers(const bc_services::core_offers_filter& filter, std::list<bc_services::offer_details_ex>& offers)
|
||||
{
|
||||
if (m_remote_node_mode)
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ public:
|
|||
std::string backup_wallet(uint64_t wallet_id, const std::wstring& path);
|
||||
std::string reset_wallet_password(uint64_t wallet_id, const std::string& pass);
|
||||
std::string is_wallet_password_valid(uint64_t wallet_id, const std::string& pass);
|
||||
std::string create_ionic_swap_proposal(uint64_t wallet_id, const view::ionic_swap_proposal_info& proposal);
|
||||
std::string get_my_offers(const bc_services::core_offers_filter& filter, std::list<bc_services::offer_details_ex>& offers);
|
||||
std::string get_fav_offers(const std::list<bc_services::offer_id>& hashes, const bc_services::core_offers_filter& filter, std::list<bc_services::offer_details_ex>& offers);
|
||||
std::string get_tx_pool_info(currency::COMMAND_RPC_GET_POOL_INFO::response& res);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue