olalonde / proof-of-liabilities

Proof of Liabilities (PoL) is a scheme designed to let companies that accept monetary deposits from consumers (e.g. Bitcoin exchanges, gambling websites, online Bitcoin wallets, etc.) prove their total amount of deposits (their liabilities) without compromising the privacy of individual users.

Home Page:http://olalonde.github.io/proof-of-liabilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make web UI accept GET/POST parameters?

janx opened this issue · comments

So other websites could create a link for users to click. The link will redirect users to your web UI tool with user's root/partial_tree json filled and verified.

commented

Ok, I will implement this eventually but meanwhile, I have written an extension that verifies the proof automatically if you use the proper meta tags. See https://github.com/olalonde/solvency-verifier-extension

For testing: http://solvencydemo.syskall.com

It's a bit buggy at the moment.

commented

Hey @janx I have just implemented something like this but I didn't use GET/POST parameters because the site is hosted on Github and only static HTML pages are allowed. That being said, you can create a link that your users can use that way:

http://syskall.com/proof-of-liabilities/#verify?partial_tree=PARTIAL_TREE&expected_root=EXPECTED_ROOT

Where PARTIAL_TREE is a URI encoded partial tree and EXPECTED_ROOT is a URI encoded root. In Ruby: http://ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI/Escape.html

Example:

http://syskall.com/proof-of-liabilities/#verify?partial_tree=%7B%0A%20%20%22partial_tree%22%3A%20%7B%0A%20%20%20%20%22left%22%3A%20%7B%0A%20%20%20%20%20%20%22left%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22left%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22left%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22data%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sum%22%3A%20%22122%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22hash%22%3A%20%221b20a8c74bd75dc9106d8094f5e8d69fbe08cacec6e83fe771376c4dc8c477ef%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22right%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22data%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22user%22%3A%20%22olalonde%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22sum%22%3A%20%224045%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22nonce%22%3A%20%223cad6a0c7535b5954e6c134873564c5c%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22right%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22data%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22sum%22%3A%20%2216905%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22hash%22%3A%20%22441fbe940b0454ebdfee080b9f4f4b5b2151f07e642406db4530a3f87cffaf5e%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22right%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22data%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22sum%22%3A%20%223542%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22hash%22%3A%20%22aac60c8e73f8569b1069343c2e4e7d50ac2bfac0510f424ff2cb9f51fb818243%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22right%22%3A%20%7B%0A%20%20%20%20%20%20%22data%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22sum%22%3A%20%2213004%22%2C%0A%20%20%20%20%20%20%20%20%22hash%22%3A%20%223836d570f3cd2791866d33bb65f8e4fb6d39b854b8babf0385f91a34939543a0%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D&expected_root=%7B%22root%22%3A%7B%22sum%22%3A%2237618%22%2C%22hash%22%3A%2289959245684794d2599ed5009e6a3c5260ec7a98fac750c47cd5a039c49c0487%22%7D%7D

Works great, thanks! 🍺