diff options
| author | reemuru <rimuru@hiahatf.org> | 2022-01-18 16:10:56 -0500 |
|---|---|---|
| committer | reemuru <rimuru@hiahatf.org> | 2022-01-20 20:21:11 -0500 |
| commit | 0f67580e8fc1d98a67298ecc1d70ef926521657a (patch) | |
| tree | 713879567b1f4be71318b66ab66c557dd25680b5 /js | |
| parent | a959919b8ad798d1384f83c5bf3ed7a2d16dc8aa (diff) | |
| download | monzero-gui-0f67580e8fc1d98a67298ecc1d70ef926521657a.tar.gz monzero-gui-0f67580e8fc1d98a67298ecc1d70ef926521657a.tar.xz monzero-gui-0f67580e8fc1d98a67298ecc1d70ef926521657a.zip | |
Advanced: ReserveProof: Add support for reserve proof
This change adds the ability to prove and check a reserve proof
to this existing "Prove/check" advanced menu. If the amount line has
a valid amount less than that of the current account index this input
will drive the logic for generating a reserve proof. Checking a reserve
proof is accomplished by validating the address and verifying that
signature.indexOf("ReserveProofV") === 0. The result displays the total
and spent amount of the proof.
Diffstat (limited to 'js')
| -rw-r--r-- | js/TxUtils.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/TxUtils.js b/js/TxUtils.js index 63405338..de79b625 100644 --- a/js/TxUtils.js +++ b/js/TxUtils.js @@ -61,6 +61,10 @@ function checkSignature(signature) { if ((signature.length - 12) % 88 != 0) return false; return check256(signature, signature.length); + } else if (signature.indexOf("ReserveProofV") === 0) { + if ((signature.length - 14) % 447 != 0) + return false; + return check256(signature, signature.length); } return false; } |
