proving raw tx added

master
moneroexamples 7 years ago
parent db04742f56
commit bacd5d3937

@ -342,14 +342,18 @@ main(int ac, const char* av[])
"tx hash not provided"); "tx hash not provided");
} }
string tx_hash = post_body["txhash"];; string tx_hash = post_body["txhash"];
string tx_prv_key = post_body["txprvkey"];; string tx_prv_key = post_body["txprvkey"];
string xmr_address = post_body["xmraddress"];; 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); string domain = get_domain(req);
return xmrblocks.show_prove(tx_hash, xmr_address, 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); string domain = get_domain(req);
return xmrblocks.show_prove(tx_hash, xmr_address, return xmrblocks.show_prove(tx_hash, xmr_address,
tx_prv_key, domain); tx_prv_key, string {}, domain);
}); });
if (enable_pusher) if (enable_pusher)

@ -2191,9 +2191,9 @@ namespace xmreg
show_prove(string tx_hash_str, show_prove(string tx_hash_str,
string xmr_address_str, string xmr_address_str,
string tx_prv_key_str, string tx_prv_key_str,
string const& raw_tx_data,
string domain) 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, return show_my_outputs(tx_hash_str, xmr_address_str,
tx_prv_key_str, raw_tx_data, tx_prv_key_str, raw_tx_data,

@ -9,6 +9,7 @@
#include "monero_headers.h" #include "monero_headers.h"
#include <mutex> #include <mutex>
#include <utility>
@ -23,7 +24,7 @@ struct has_destructor
{ {
// has destructor // has destructor
template <typename A> 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(); return std::true_type();
} }

@ -113,6 +113,8 @@
<form action="/prove" method="post" style="width:100%;margin-top:2px" class="style-1"> <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="hidden" name="txhash" value="{{tx_hash}}"><br/>
<input type="text" name="txprvkey" size="90" placeholder="Tx private key"><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="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"> <input type="submit" value="Prove sending" style="margin-top:5px">
</form> </form>

Loading…
Cancel
Save