client

package
v0.1.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrNoData

func ErrNoData() error

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

func GetLocalProvider(dir string) lite.Provider

GetLocalProvider returns a reference to a file store of headers wrapped with an in-memory cache

func GetNode

func GetNode(url string) rpcclient.Client

GetNode prepares a simple rpc.Client for the given endpoint

func GetRPCProvider

func GetRPCProvider(url string) lite.Provider

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

func IsNoDataErr(err error) bool

IsNoDataErr checks whether an error is due to a query returning empty data

Types

This section is empty.

Directories

Path Synopsis
Package commands contains any general setup/helpers valid for all subcommands
Package commands contains any general setup/helpers valid for all subcommands

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL