{"id":15567622,"url":"https://github.com/purehyperbole/merkletree","last_synced_at":"2025-03-29T05:35:51.869Z","repository":{"id":37857188,"uuid":"502649429","full_name":"purehyperbole/merkletree","owner":"purehyperbole","description":"A merkle tree for golang","archived":false,"fork":false,"pushed_at":"2022-06-15T14:21:52.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T15:56:10.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purehyperbole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-12T15:10:37.000Z","updated_at":"2022-06-15T14:21:53.000Z","dependencies_parsed_at":"2022-08-19T09:13:07.538Z","dependency_job_id":null,"html_url":"https://github.com/purehyperbole/merkletree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purehyperbole%2Fmerkletree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purehyperbole%2Fmerkletree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purehyperbole%2Fmerkletree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purehyperbole%2Fmerkletree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purehyperbole","download_url":"https://codeload.github.com/purehyperbole/merkletree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145017,"owners_count":20730494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T17:12:03.777Z","updated_at":"2025-03-29T05:35:51.851Z","avatar_url":"https://github.com/purehyperbole.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# merkletree\nA thread safe merkle tree for golang\n\n# Usage\n\n```go\npackage main\n\nimport (\n    \"crypto/sha256\"\n    \"fmt\"\n\n    \"github.com/purehyperbole/merkletree\"\n)\n\nfunc main() {\n    m := merkletree.New(1024, func() hash.Hash {\n        return sha256.New()\n    })\n\n    // insert the hashes of some values into the tree\n    // the hash of the value will be returned\n    h1 := m.Insert([]byte(\"my data 1\"))\n    h2 := m.Insert([]byte(\"my data 2\"))\n    h3 := m.Insert([]byte(\"my data 3\"))\n\n    // generate the merkle root hash. Note, this can only be called once\n    mrh := m.Root()\n\n    // generate a proof for 'my data 2' from the generated merkle tree\n    proof, err := m.Proof(h2)\n    if err != nil {\n        panic(err)\n    }\n\n    // validate the proof against the hash of the value and merkle root\n    err = merkletree.Validate(sha256.New(), h2, mrh, proof)\n    if err != nil {\n        panic(err)\n    }\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurehyperbole%2Fmerkletree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurehyperbole%2Fmerkletree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurehyperbole%2Fmerkletree/lists"}