You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. ## dvot-process http service
  2. #### start http server
  3. ```
  4. processHttp.T.namespace = "vocdoni"
  5. T.Init()
  6. processHttp.Listen(1500, "http")
  7. ```
  8. #### add claims
  9. ```
  10. curl -d '{"processID":"GoT_Favorite","claimData":"Jon Snow"}' http://localhost:1500/addClaim
  11. {"error":false,"response":""}
  12. ```
  13. ```
  14. curl -d '{"processID":"GoT_Favorite","claimData":"Tyrion"}' http://localhost:1500/addClaim
  15. {"error":false,"response":""}
  16. ```
  17. #### generate proof
  18. ```
  19. curl -d '{"processID":"GoT_Favorite","claimData":"Jon Snow"}' http://localhost:1500/genProof
  20. {"error":false,"response":"0x000000000000000000000000000000000000000000000000000000000000000352f3ca2aaf635ec2ae4452f6a65be7bca72678287a8bb08ad4babfcccd76c2fef1aac7675261bf6d12c746fb7907beea6d1f1635af93ba931eec0c6a747ecc37"}
  21. ```
  22. #### check proof
  23. ```
  24. curl -d '{"processID":"GoT_Favorite","claimData":"Jon Snow", "proofData": "0x0000000000000000000000000000000000000000000000000000000000000000000123"}' http://localhost:1500/checkProof
  25. {"error":false,"response":"invalid"}
  26. ```
  27. ```
  28. curl -d '{"processID":"GoT_Favorite","claimData":"Jon Snow", "proofData": "0x000000000000000000000000000000000000000000000000000000000000000352f3ca2aaf635ec2ae4452f6a65be7bca72678287a8bb08ad4babfcccd76c2fef1aac7675261bf6d12c746fb7907beea6d1f1635af93ba931eec0c6a747ecc37"}' http://localhost:1500/checkProof
  29. {"error":false,"response":"valid"}
  30. ```