Documentation ¶
Index ¶
- Constants
- func WitnessesToHashes(w []Witness) [][]byte
- type Accumulator
- func (a *Accumulator) AddData(d []byte) []Witness
- func (a *Accumulator) AddHash(h []byte) []Witness
- func (a *Accumulator) AddNode(n Node) []Witness
- func (a *Accumulator) Flush() error
- func (a *Accumulator) Len() int64
- func (a *Accumulator) Recover() error
- func (a *Accumulator) String() string
- func (a *Accumulator) Verify(ws []Witness, h []byte) error
- func (a *Accumulator) WitnessFor(idx int64) ([]Witness, error)
- type Direction
- type Node
- type State
- type Witness
Constants ¶
View Source
const (
HashSize = 32
)
Variables ¶
This section is empty.
Functions ¶
func WitnessesToHashes ¶
Types ¶
type Accumulator ¶
type Accumulator struct { KeyForState []byte // key to recover state Bucket db.Bucket // bucket to store all state data // contains filtered or unexported fields }
func (*Accumulator) AddData ¶
func (a *Accumulator) AddData(d []byte) []Witness
func (*Accumulator) AddHash ¶
func (a *Accumulator) AddHash(h []byte) []Witness
func (*Accumulator) AddNode ¶
func (a *Accumulator) AddNode(n Node) []Witness
func (*Accumulator) Flush ¶
func (a *Accumulator) Flush() error
func (*Accumulator) Len ¶
func (a *Accumulator) Len() int64
func (*Accumulator) Recover ¶
func (a *Accumulator) Recover() error
func (*Accumulator) String ¶
func (a *Accumulator) String() string
func (*Accumulator) WitnessFor ¶
func (a *Accumulator) WitnessFor(idx int64) ([]Witness, error)
Click to show internal directories.
Click to hide internal directories.