wrkchains

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

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

func NewGethClient(log log.Logger) *Geth

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

func NewWrkChain(wrkchainMeta types.WrkChainMeta, log log.Logger) (*WrkChain, error)

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

Jump to

Keyboard shortcuts

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