Documentation ¶
Index ¶
- func NewAuthInfoFromSdkAuthInfo(cdc codec.Codec, authInfo *tx.AuthInfo) *types.AuthInfo
- func NewFeeFromSdkFee(fee *tx.Fee) *types.Fee
- func NewSignerInfoFromSdkSignerInfo(cdc codec.Codec, signerInfo *tx.SignerInfo) *types.SignerInfo
- func NewTxBodyFromSdkTxBody(cdc codec.Codec, body *tx.TxBody) *types.TxBody
- func NewTxFromSdkTx(cdc codec.Codec, tx *tx.Tx) *types.Tx
- func NewTxResponseFromSdkTxResponse(txResponse *sdk.TxResponse, tx *types.Tx) *types.TxResponse
- 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.Transaction, error)
- func (cp *Node) TxSearch(query string, pagePtr *int, perPagePtr *int, orderBy string) (*tmctypes.ResultTxSearch, error)
- func (cp *Node) Txs(block *tmctypes.ResultBlock) ([]*types.Transaction, 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 NewAuthInfoFromSdkAuthInfo ¶
NewAuthInfoFromSdkAuthInfo allows to build a new AuthInfo instance from the given tx.AuthInfo
func NewFeeFromSdkFee ¶
NewFeeFromSdkFee allows to build a new Fee instance from the given tx.Fee
func NewSignerInfoFromSdkSignerInfo ¶
func NewSignerInfoFromSdkSignerInfo(cdc codec.Codec, signerInfo *tx.SignerInfo) *types.SignerInfo
NewSignerInfoFromSdkSignerInfo allows to build a new SignerInfo instance from the given tx.SignerInfo
func NewTxBodyFromSdkTxBody ¶
NewTxBodyFromSdkTxBody allows to build a new TxBody instance from the given tx.TxBody
func NewTxFromSdkTx ¶
NewTxFromSdkTx allows to build a new Tx instance from the given tx.Tx
func NewTxResponseFromSdkTxResponse ¶
func NewTxResponseFromSdkTxResponse(txResponse *sdk.TxResponse, tx *types.Tx) *types.TxResponse
NewTxResponseFromSdkTxResponse allows to build a new TxResponse instance from the given sdk.TxResponse
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) Tx ¶
func (cp *Node) Tx(hash string) (*types.Transaction, error)
Tx 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) Txs ¶
func (cp *Node) Txs(block *tmctypes.ResultBlock) ([]*types.Transaction, error)
Txs 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 dbm.DB Codec codec.Codec BlockStore *tmstore.BlockStore Logger log.Logger Cms store.CommitMultiStore }
Source represents the Source interface implementation that reads the data from a local node
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"