Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olegfomenko/go-treap-merkle
Proof of concept for dynamic Merkle tree
https://github.com/olegfomenko/go-treap-merkle
merkle-tree treap
Last synced: 9 days ago
JSON representation
Proof of concept for dynamic Merkle tree
- Host: GitHub
- URL: https://github.com/olegfomenko/go-treap-merkle
- Owner: olegfomenko
- License: mit
- Created: 2023-08-04T11:08:43.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-12T14:48:20.000Z (7 months ago)
- Last Synced: 2024-06-19T04:26:27.341Z (5 months ago)
- Topics: merkle-tree, treap
- Language: Go
- Homepage:
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Treap-based dynamic Merkle tree
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Proof of concept for dynamic Merkle tree.
Treap as primary data structure used to achieve logarithmic inserting/removing.## Usage
```go
package mainimport (
"math/rand"
merkle "github.com/olegfomenko/go-treap-merkle"
)func main() {
tree := merkle.New()
// Insert
tree.Insert([]byte("hash"), rand.Uint64())
// Merkle path
path := tree.MerklePath([]byte("hash"))
// Merkle Root
root := tree.MerkleRoot()// Remove
tree.Remove([]byte("hash"))
}
```## Related docs
Treap description: ""
Merkle tree description: ""