Documentation ¶
Index ¶
- func ErrNoData() error
- func GetCertifiedCommit(h int64, node rpcclient.Client, cert lite.Certifier) (empty lite.Commit, err error)
- func GetLocalProvider(dir string) lite.Provider
- func GetNode(url string) rpcclient.Client
- func GetRPCProvider(url string) lite.Provider
- func GetWithProof(key []byte, reqHeight int64, node rpcclient.Client, cert lite.Certifier) (val []byte, height int64, proof iavl.KeyProof, err error)
- func GetWithProofOptions(path string, key []byte, opts rpcclient.ABCIQueryOptions, ...) (*ctypes.ResultABCIQuery, iavl.KeyProof, error)
- func IsNoDataErr(err error) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertifiedCommit ¶
func GetCertifiedCommit(h int64, node rpcclient.Client, cert lite.Certifier) (empty lite.Commit, err error)
GetCertifiedCommit gets the signed header for a given height and certifies it. Returns error if unable to get a proven header.
func GetLocalProvider ¶
GetLocalProvider returns a reference to a file store of headers wrapped with an in-memory cache
func GetRPCProvider ¶
GetRPCProvider retuns a certifier compatible data source using tendermint RPC
func GetWithProof ¶
func GetWithProof(key []byte, reqHeight int64, node rpcclient.Client, cert lite.Certifier) ( val []byte, height int64, proof iavl.KeyProof, err error)
GetWithProof will query the key on the given node, and verify it has a valid proof, as defined by the certifier.
If there is any error in checking, returns an error. If val is non-empty, proof should be KeyExistsProof If val is empty, proof should be KeyMissingProof
func GetWithProofOptions ¶
func GetWithProofOptions(path string, key []byte, opts rpcclient.ABCIQueryOptions, node rpcclient.Client, cert lite.Certifier) ( *ctypes.ResultABCIQuery, iavl.KeyProof, error)
GetWithProofOptions is useful if you want full access to the ABCIQueryOptions
func IsNoDataErr ¶
IsNoDataErr checks whether an error is due to a query returning empty data
Types ¶
This section is empty.