proving raw tx added

master
moneroexamples 7 years ago
parent 4e68bcf8c6
commit 432db7e6da

@ -342,14 +342,18 @@ main(int ac, const char* av[])
"tx hash not provided");
}
string tx_hash = post_body["txhash"];;
string tx_prv_key = post_body["txprvkey"];;
string xmr_address = post_body["xmraddress"];;
string tx_hash = post_body["txhash"];
string tx_prv_key = post_body["txprvkey"];
string xmr_address = post_body["xmraddress"];
// this will be only not empty when checking raw tx data
// using tx pusher
string raw_tx_data = post_body["raw_tx_data"];
string domain = get_domain(req);
return xmrblocks.show_prove(tx_hash, xmr_address,
tx_prv_key, domain);
tx_prv_key, raw_tx_data, domain);
});
@ -360,7 +364,7 @@ main(int ac, const char* av[])
string domain = get_domain(req);
return xmrblocks.show_prove(tx_hash, xmr_address,
tx_prv_key, domain);
tx_prv_key, string {}, domain);
});
if (enable_pusher)

@ -2191,9 +2191,9 @@ namespace xmreg
show_prove(string tx_hash_str,
string xmr_address_str,
string tx_prv_key_str,
string const& raw_tx_data,
string domain)
{
string raw_tx_data {""}; // not using it in prove tx. only for outputs
return show_my_outputs(tx_hash_str, xmr_address_str,
tx_prv_key_str, raw_tx_data,

@ -9,6 +9,7 @@
#include "monero_headers.h"
#include <mutex>
#include <utility>
@ -23,7 +24,7 @@ struct has_destructor
{
// has destructor
template <typename A>
static std::true_type test(decltype(declval<A>().~A()) *)
static std::true_type test(decltype(std::declval<A>().~A()) *)
{
return std::true_type();
}

@ -113,6 +113,8 @@
<form action="/prove" method="post" style="width:100%;margin-top:2px" class="style-1">
<input type="hidden" name="txhash" value="{{tx_hash}}"><br/>
<input type="text" name="txprvkey" size="90" placeholder="Tx private key"><br/>
<input type="hidden" name="raw_tx_data" value="{{raw_tx_data}}">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher-->
<input type="text" name="xmraddress" size="90" placeholder="Recipient's monero address/subaddress" style="margin-top:5px"><br/>
<input type="submit" value="Prove sending" style="margin-top:5px">
</form>

Loading…
Cancel
Save