Documentation
¶
Index ¶
- func GetArguments(req hexutil.Bytes) (map[string]interface{}, error)
- func ToHex(v interface{}) (hexutil.Bytes, error)
- type DagDB
- func (db *DagDB) Close() error
- func (db *DagDB) Delete(key []byte) error
- func (db *DagDB) DeleteSync(key []byte) error
- func (db *DagDB) Get(key []byte) ([]byte, error)
- func (db *DagDB) Has(key []byte) (bool, error)
- func (db *DagDB) Iterator(start, end []byte) (dbm.Iterator, error)
- func (db *DagDB) IteratorNoMtx(start, end []byte) (dbm.Iterator, error)
- func (db *DagDB) NewBatch() dbm.Batch
- func (db *DagDB) Print() error
- func (db *DagDB) ReverseIterator(start, end []byte) (dbm.Iterator, error)
- func (db *DagDB) ReverseIteratorNoMtx(start, end []byte) (dbm.Iterator, error)
- func (db *DagDB) Set(key []byte, value []byte) error
- func (db *DagDB) SetSync(key []byte, value []byte) error
- func (db *DagDB) Stats() map[string]string
- type IavlProofAPI
- type IavlProofService
- func (s *IavlProofService) Get(key []byte) (hexutil.Bytes, error)
- func (s *IavlProofService) GetByIndex(index int64) (hexutil.Bytes, error)
- func (s *IavlProofService) GetVersioned(version int64, key []byte) (hexutil.Bytes, error)
- func (s *IavlProofService) GetWithProof(key []byte) (hexutil.Bytes, error)
- func (s *IavlProofService) Has(key []byte) (hexutil.Bytes, error)
- func (s *IavlProofService) HasVersioned(version int64) (hexutil.Bytes, error)
- func (s *IavlProofService) Hash(_ *empty.Empty) (hexutil.Bytes, error)
- func (s *IavlProofService) Set(key []byte, value []byte) (hexutil.Bytes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DagDB ¶
type DagDB struct {
// contains filtered or unexported fields
}
DagDB is an in-memory database backend using a B-tree for storage.
For performance reasons, all given and returned keys and values are pointers to the in-memory database, so modifying them will cause the stored values to be modified as well. All DB methods already specify that keys and values should be considered read-only, but this is especially important with DagDB.
func (*DagDB) Iterator ¶
dbm.Iterator implements DB. Takes out a read-lock on the database until the iterator is closed.
func (*DagDB) IteratorNoMtx ¶
IteratorNoMtx makes an iterator with no mutex.
func (*DagDB) ReverseIterator ¶
ReverseIterator implements DB. Takes out a read-lock on the database until the iterator is closed.
func (*DagDB) ReverseIteratorNoMtx ¶
ReverseIteratorNoMtx makes an iterator with no mutex.
type IavlProofAPI ¶
type IavlProofAPI struct {
Namespace string
Version string
Service *IavlProofService
Public bool
}
func NewIavlAPI ¶
func NewIavlAPI(dagStore anconsync.Storage, dagExchange graphsync.GraphExchange, db dbm.DB, cacheSize, version int64) (*IavlProofAPI, error)
type IavlProofService ¶
type IavlProofService struct {
// contains filtered or unexported fields
}
func (*IavlProofService) Get ¶
func (s *IavlProofService) Get(key []byte) (hexutil.Bytes, error)
Get returns a result containing the index and value for a given key based on the current state (version) of the tree. If the key does not exist, Get returns the index of the next value.
func (*IavlProofService) GetByIndex ¶
func (s *IavlProofService) GetByIndex(index int64) (hexutil.Bytes, error)
GetByIndex returns a result containing the key and value for a given index based on the current state (version) of the tree.
func (*IavlProofService) GetVersioned ¶
GetVersioned returns a result containing the IAVL tree version and value for a given key at a specific tree version.
func (*IavlProofService) GetWithProof ¶
func (s *IavlProofService) GetWithProof(key []byte) (hexutil.Bytes, error)
GetWithProof returns a result containing the IAVL tree version and value for a given key based on the current state (version) of the tree including a verifiable Merkle proof.
func (*IavlProofService) Has ¶
func (s *IavlProofService) Has(key []byte) (hexutil.Bytes, error)
Has returns a result containing a boolean on whether or not the IAVL tree has a given key in the current version
func (*IavlProofService) HasVersioned ¶
func (s *IavlProofService) HasVersioned(version int64) (hexutil.Bytes, error)
HasVersioned returns a result containing a boolean on whether or not the IAVL tree has a given key at a specific tree version.