Payment Proof export + validation (#289)

* add payment proof struct and deser

* rustfmt

* adding proof export functions

* rustfmt

* add payment proof validation function

* rustfmt

* add RPC version of retrieve_payment_proof + doctest

* rustfmt

* add verify_proof rpc function and documentation for new functions

* rustfmt

* add export and verify commands

* rustfmt

* test + test framework fixes

* rustfmt

* check whether addresses belong to this wallet, output such when checking

* rustfmt

* remove raw pubkey address and replace with ov3 address in user-facing contexts

* merge from master and rustfmt

* doctests
This commit is contained in:
Yeastplume
2020-01-22 13:16:24 +00:00
committed by GitHub
parent 08a76c04ff
commit f09c91f626
14 changed files with 769 additions and 66 deletions
+9 -1
View File
@@ -353,7 +353,15 @@ where
let max = split[2].parse::<u64>().unwrap();
let commit_bytes = util::from_hex(excess).unwrap();
let commit = pedersen::Commitment::from_vec(commit_bytes);
let k = super::get_kernel_local(self.chain.clone(), &commit, Some(min), Some(max));
let min = match min {
0 => None,
m => Some(m),
};
let max = match max {
0 => None,
m => Some(m),
};
let k = super::get_kernel_local(self.chain.clone(), &commit, min, max);
Ok(WalletProxyMessage {
sender_id: "node".to_owned(),
dest: m.sender_id,