Documentation ¶
Index ¶
- Constants
- type Ledger
- func (l *Ledger) Done() <-chan struct{}
- func (l *Ledger) Get(query *ledger.Query) (values []ledger.Value, err error)
- func (l *Ledger) InitialState() ledger.State
- func (l *Ledger) Prove(query *ledger.Query) (proof ledger.Proof, err error)
- func (l *Ledger) Ready() <-chan struct{}
- func (l *Ledger) Set(update *ledger.Update) (newState ledger.State, trieUpdate *ledger.TrieUpdate, err error)
Constants ¶
const DefaultPathFinderVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
Ledger implements the ledger functionality for a limited subset of keys (partial ledger). Partial ledgers are designed to be constructed and verified by a collection of proofs from a complete ledger. The partial ledger uses a partial binary Merkle trie which holds intermediate hash value for the pruned branched and prevents updates to keys that were not part of proofs.
func (*Ledger) Done ¶
func (l *Ledger) Done() <-chan struct{}
Done implements interface module.ReadyDoneAware
func (*Ledger) Get ¶
Get read the values of the given keys at the given state it returns the values in the same order as given registerIDs and errors (if any)
func (*Ledger) InitialState ¶ added in v0.10.0
InitialState returns the initial state of the ledger
func (*Ledger) Prove ¶
Prove provides proofs for a ledger query and errors (if any) TODO implement this by iterating over initial proofs to find the ones for the query