Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Geth ¶ added in v0.2.1
type Geth struct {
// contains filtered or unexported fields
}
Geth is a structure for holding a Geth based WRKChain client
func NewGethClient ¶ added in v0.2.1
NewGethClient returns a new Geth struct
func (Geth) GetBlockAtHeight ¶ added in v0.2.1
func (g Geth) GetBlockAtHeight(height uint64) (types.WrkChainBlockHeader, error)
GetBlockAtHeight is used to get the block headers for a given height from a geth based WRKChain
type Tendermint ¶ added in v0.2.1
type Tendermint struct {
// contains filtered or unexported fields
}
Tendermint is a structure for holding a Tendermint based WRKChain client
func NewTendermintClient ¶ added in v0.2.1
func NewTendermintClient(log log.Logger) *Tendermint
NewTendermintClient returns a new Tendermint struct
func (Tendermint) GetBlockAtHeight ¶ added in v0.2.1
func (t Tendermint) GetBlockAtHeight(height uint64) (types.WrkChainBlockHeader, error)
GetBlockAtHeight is used to get the block headers for a given height from a tendermint based WRKChain
type WrkChain ¶ added in v0.2.1
type WrkChain struct {
// contains filtered or unexported fields
}
WrkChain is a top level struct to hold WRKChain data
func NewWrkChain ¶ added in v0.2.1
NewWrkChain returns a new initialised WrkChain
func (WrkChain) GetLatestBlock ¶ added in v0.2.1
func (w WrkChain) GetLatestBlock() (types.WrkChainBlockHeader, error)
GetLatestBlock is a top level function to query any WRKChain type for the latest block header
func (WrkChain) GetWrkChainBlock ¶ added in v0.2.1
func (w WrkChain) GetWrkChainBlock(height uint64) (types.WrkChainBlockHeader, error)
GetWrkChainBlock is a top level function to query any WRKChain type for the block header at a given height
type WrkChainClient ¶ added in v0.2.1
type WrkChainClient interface {
GetBlockAtHeight(height uint64) (types.WrkChainBlockHeader, error)
}
WrkChainClient is a generic interface for all WRKChain clients. New WRKChain client modules should implement this interface