Merkle proofs!

This commit is contained in:
Jae Kwon
2015-05-24 14:19:46 -07:00
parent b5df5f6642
commit fdf0e720bc
9 changed files with 371 additions and 78 deletions

View File

@@ -1,14 +1,14 @@
package merkle
type Tree interface {
Size() (size uint64)
Size() (size uint)
Height() (height uint8)
Has(key interface{}) (has bool)
Get(key interface{}) (index uint64, value interface{})
GetByIndex(index uint64) (key interface{}, value interface{})
Get(key interface{}) (index uint, value interface{})
GetByIndex(index uint) (key interface{}, value interface{})
Set(key interface{}, value interface{}) (updated bool)
Remove(key interface{}) (value interface{}, removed bool)
HashWithCount() (hash []byte, count uint64)
HashWithCount() (hash []byte, count uint)
Hash() (hash []byte)
Save() (hash []byte)
Load(hash []byte)