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.

21 lines
494 B

  1. ## dvote Tree
  2. Implementation of dvote tree structure. Currently based on iden3 merkle tree.
  3. Example of usage:
  4. ```
  5. T := tree.Tree
  6. if T.Init() != nil { fmt.Println("Cannot create tree database") }
  7. err := T.AddClaim([]byte("Hello you!"))
  8. if err != nil {
  9. fmt.Println("Claim already exist")
  10. }
  11. mpHex, err := T.GenProof([]byte("Hello you!"))
  12. fmt.Println(mpHex)
  13. fmt.Println(T.CheckProof([]byte("Hello you!"), mpHex))
  14. T.Close()
  15. ```
  16. #### To-Do
  17. Avoid duplicates on dump/snapshot