Documentation ¶
Index ¶
- Constants
- func GetCertifiedCheckpoint(h int, node client.Client, cert certifiers.Certifier) (empty lc.Checkpoint, err error)
- func GetCertifier(chainID string, trust certifiers.Provider, source certifiers.Provider) (*certifiers.InquiringCertifier, error)
- func GetKeyManager(rootDir string) keys.Manager
- func GetLocalProvider(dir string) certifiers.Provider
- func GetNode(url string) rpcclient.Client
- func GetRPCProvider(url string) certifiers.Provider
- func GetWithProof(key []byte, node client.Client, cert certifiers.Certifier) (val data.Bytes, height uint64, proof iavl.KeyProof, err error)
- func RPCRoutes(c rpcclient.Client) map[string]*rpc.RPCFunc
- func SecureClient(c rpcclient.Client, cert *certifiers.InquiringCertifier) rpcclient.Client
- func StartProxy(c rpcclient.Client, bind string, logger log.Logger) error
Constants ¶
const KeySubdir = "keys"
KeySubdir is the directory name under root where we store the keys
Variables ¶
This section is empty.
Functions ¶
func GetCertifiedCheckpoint ¶ added in v0.7.0
func GetCertifiedCheckpoint(h int, node client.Client, cert certifiers.Certifier) (empty lc.Checkpoint, err error)
GetCertifiedCheckpoint gets the signed header for a given height and certifies it. Returns error if unable to get a proven header.
func GetCertifier ¶ added in v0.7.0
func GetCertifier(chainID string, trust certifiers.Provider, source certifiers.Provider) (*certifiers.InquiringCertifier, error)
GetCertifier initializes an inquiring certifier given a fixed chainID and a local source of trusted data with at least one seed
func GetKeyManager ¶ added in v0.7.0
GetKeyManager initializes a key manager based on the configuration
func GetLocalProvider ¶ added in v0.7.0
func GetLocalProvider(dir string) certifiers.Provider
GetLocalProvider returns a reference to a file store of headers wrapped with an in-memory cache
func GetRPCProvider ¶ added in v0.7.0
func GetRPCProvider(url string) certifiers.Provider
GetRPCProvider retuns a certifier compatible data source using tendermint RPC
func GetWithProof ¶ added in v0.7.0
func GetWithProof(key []byte, node client.Client, cert certifiers.Certifier) ( val data.Bytes, height uint64, 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 RPCRoutes ¶ added in v0.7.0
RPCRoutes just routes everything to the given client, as if it were a tendermint fullnode.
if we want security, the client must implement it as a secure client
func SecureClient ¶ added in v0.7.0
func SecureClient(c rpcclient.Client, cert *certifiers.InquiringCertifier) rpcclient.Client
SecureClient uses a given certifier to wrap an connection to an untrusted host and return a cryptographically secure rpc client.
Types ¶
This section is empty.