Documentation ¶
Index ¶
- func ParseConfig() (*cfg.Config, error)
- type Details
- type Node
- func (cp *Node) Block(height int64) (*tmctypes.ResultBlock, error)
- func (cp *Node) BlockResults(height int64) (*tmctypes.ResultBlockResults, error)
- func (cp *Node) ChainID() (string, error)
- func (cp *Node) ConsensusState() (*constypes.RoundStateSimple, error)
- func (cp *Node) Genesis() (*tmctypes.ResultGenesis, error)
- func (cp *Node) LatestHeight() (int64, error)
- func (cp *Node) Stop()
- func (cp *Node) SubscribeEvents(subscriber, query string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
- func (cp *Node) SubscribeNewBlocks(subscriber string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
- func (cp *Node) Tx(hash string) (*types.Tx, error)
- func (cp *Node) TxSearch(query string, pagePtr *int, perPagePtr *int, orderBy string) (*tmctypes.ResultTxSearch, error)
- func (cp *Node) Txs(block *tmctypes.ResultBlock) ([]*types.Tx, error)
- func (cp *Node) Validators(height int64) (*tmctypes.ResultValidators, error)
- type Source
- func (k Source) InitStores() error
- func (k Source) LoadHeight(height int64) (sdk.Context, error)
- func (k Source) MountKVStores(app interface{}, fieldName string) error
- func (k Source) MountMemoryStores(app interface{}, fieldName string) error
- func (k Source) MountTransientStores(app interface{}, fieldName string) error
- func (k Source) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfig ¶
Types ¶
type Details ¶
type Details struct {
Home string `yaml:"home"`
}
Details represents the nodeconfig.Details implementation for a local node
func DefaultDetails ¶
func DefaultDetails() *Details
func NewDetails ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents the node implementation that uses a local node
func (*Node) Block ¶
func (cp *Node) Block(height int64) (*tmctypes.ResultBlock, error)
Block implements node.Node
func (*Node) BlockResults ¶
func (cp *Node) BlockResults(height int64) (*tmctypes.ResultBlockResults, error)
BlockResults implements node.Node
func (*Node) ConsensusState ¶
func (cp *Node) ConsensusState() (*constypes.RoundStateSimple, error)
ConsensusState implements node.Node
func (*Node) Genesis ¶
func (cp *Node) Genesis() (*tmctypes.ResultGenesis, error)
Genesis implements node.Node
func (*Node) LatestHeight ¶
LatestHeight implements node.Node
func (*Node) SubscribeEvents ¶
func (cp *Node) SubscribeEvents(subscriber, query string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
SubscribeEvents implements node.Node
func (*Node) SubscribeNewBlocks ¶
func (cp *Node) SubscribeNewBlocks(subscriber string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
SubscribeNewBlocks implements node.Node
func (*Node) TxSearch ¶
func (cp *Node) TxSearch(query string, pagePtr *int, perPagePtr *int, orderBy string) (*tmctypes.ResultTxSearch, error)
TxSearch implements node.Node
func (*Node) Validators ¶
func (cp *Node) Validators(height int64) (*tmctypes.ResultValidators, error)
Validators implements node.Node
type Source ¶
type Source struct { Initialized bool StoreDB db.DB Codec codec.Codec LegacyAmino *codec.LegacyAmino BlockStore *tmstore.BlockStore Logger log.Logger Cms sdk.CommitMultiStore }
Source represents the Source interface implementation that reads the data from a local node
func NewSource ¶
func NewSource(home string, encodingConfig params.EncodingConfig) (*Source, error)
NewSource returns a new Source instance
func (Source) InitStores ¶
InitStores initializes the stores by mounting the various keys that have been specified. This method MUST be called before using any method that relies on the local storage somehow.
func (Source) LoadHeight ¶
LoadHeight loads the given height from the store. It returns a new Context that can be used to query the data, or an error if something wrong happens.
func (Source) MountKVStores ¶
MountKVStores allows to register the KV stores using the same KVStoreKey instances that are used inside the given app. To do so, this method uses the reflection to access the field with the specified name inside the given app. Such field must be of type map[string]*sdk.KVStoreKey and is commonly named something similar to "keys"
func (Source) MountMemoryStores ¶
MountMemoryStores allows to register the Memory stores using the same MemoryStoreKey instances that are used inside the given app. To do so, this method uses the reflection to access the field with the specified name inside the given app. Such field must be of type map[string]*sdk.MemoryStoreKey and is commonly named something similar to "memkeys"
func (Source) MountTransientStores ¶
MountTransientStores allows to register the Transient stores using the same TransientStoreKey instances that are used inside the given app. To do so, this method uses the reflection to access the field with the specified name inside the given app. Such field must be of type map[string]*sdk.TransientStoreKey and is commonly named something similar to "tkeys"