Documentation ¶
Index ¶
- type NodeService
- func (s *NodeService) GetBlock(ctx context.Context, height *int64) (*core_types.ResultBlock, error)
- func (s *NodeService) GetTx(ctx context.Context, hash []byte, proof bool) (types.BaseTx, *tmtypes.TxProof, error)
- func (s *NodeService) IsSyncing(ctx context.Context) (bool, error)
- func (s *NodeService) NetInfo(ctx context.Context) (*core_types.ResultNetInfo, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeService ¶
type NodeService struct {
// contains filtered or unexported fields
}
NodeService implements types.Service. It provides node specific operations that can be used by the JS module, RPC APIs etc
func New ¶
func New(rpcAddr string) *NodeService
New creates an instance of NodeService. The function panics if rpcAddr is an invalid address.
func (*NodeService) GetBlock ¶
func (s *NodeService) GetBlock(ctx context.Context, height *int64) (*core_types.ResultBlock, error)
GetBlock fetches a block at the given height
func (*NodeService) GetTx ¶
func (s *NodeService) GetTx(ctx context.Context, hash []byte, proof bool) (types.BaseTx, *tmtypes.TxProof, error)
GetTx gets a transaction by hash
func (*NodeService) IsSyncing ¶
func (s *NodeService) IsSyncing(ctx context.Context) (bool, error)
IsSyncing checks whether the node has caught up with the network
func (*NodeService) NetInfo ¶
func (s *NodeService) NetInfo(ctx context.Context) (*core_types.ResultNetInfo, error)
NetInfo returns network information
type Service ¶
type Service interface { GetBlock(ctx context.Context, height *int64) (*core_types.ResultBlock, error) IsSyncing(ctx context.Context) (bool, error) NetInfo(ctx context.Context) (*core_types.ResultNetInfo, error) GetTx(ctx context.Context, hash []byte, proof bool) (types.BaseTx, *tmtypes.TxProof, error) }
Service provides operation that access external logic not directly offered by any of the packages of the project. For instance, access to tendermint RPC is provided.
Click to show internal directories.
Click to hide internal directories.