tendermint

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDispatchError

func CheckDispatchError(err error) error

CheckDispatchError ignores errors we don't care about.

func NewDispatcher

func NewDispatcher(router routing.Router, self map[string]DispatcherClient) execute.Dispatcher

NewDispatcher creates a new dispatcher. NewDispatcher will panic if self does not include a client for the directory network.

func WalkPeers

func WalkPeers(ctx context.Context, client WalkClient, visit func(context.Context, coretypes.Peer) (WalkClient, bool))

WalkPeers walks a Tendermint network, using the nodes' peer lists. WalkPeers calls visit for each (unique) discovered peer. If visit returns false, WalkPeers will return immediately; otherwise it will return once every peer has been visited.

Types

type DeferredClient

type DeferredClient ioc.PromisedOf[client.Client]

func NewDeferredClient

func NewDeferredClient() *DeferredClient

func (*DeferredClient) ABCIInfo

func (*DeferredClient) ABCIQuery

func (*DeferredClient) ABCIQueryWithOptions

func (*DeferredClient) Block added in v1.4.0

func (*DeferredClient) BlockByHash added in v1.4.0

func (d *DeferredClient) BlockByHash(a0 context.Context, a1 []uint8) (*coretypes.ResultBlock, error)

func (*DeferredClient) BlockResults added in v1.4.0

func (d *DeferredClient) BlockResults(a0 context.Context, a1 *int64) (*coretypes.ResultBlockResults, error)

func (*DeferredClient) BlockSearch added in v1.4.0

func (d *DeferredClient) BlockSearch(a0 context.Context, a1 string, a2 *int, a3 *int, a4 string) (*coretypes.ResultBlockSearch, error)

func (*DeferredClient) BlockchainInfo added in v1.4.0

func (d *DeferredClient) BlockchainInfo(a0 context.Context, a1 int64, a2 int64) (*coretypes.ResultBlockchainInfo, error)

func (*DeferredClient) BroadcastEvidence added in v1.4.0

func (*DeferredClient) BroadcastTxAsync

func (d *DeferredClient) BroadcastTxAsync(a0 context.Context, a1 types.Tx) (*coretypes.ResultBroadcastTx, error)

func (*DeferredClient) BroadcastTxCommit

func (d *DeferredClient) BroadcastTxCommit(a0 context.Context, a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error)

func (*DeferredClient) BroadcastTxSync

func (d *DeferredClient) BroadcastTxSync(a0 context.Context, a1 types.Tx) (*coretypes.ResultBroadcastTx, error)

func (*DeferredClient) CheckTx

func (*DeferredClient) Commit added in v1.4.0

func (*DeferredClient) ConsensusParams

func (d *DeferredClient) ConsensusParams(a0 context.Context, a1 *int64) (*coretypes.ResultConsensusParams, error)

func (*DeferredClient) ConsensusState

func (*DeferredClient) DumpConsensusState

func (d *DeferredClient) DumpConsensusState(a0 context.Context) (*coretypes.ResultDumpConsensusState, error)

func (*DeferredClient) Genesis added in v1.4.0

func (*DeferredClient) GenesisChunked added in v1.4.0

func (d *DeferredClient) GenesisChunked(a0 context.Context, a1 uint) (*coretypes.ResultGenesisChunk, error)

func (*DeferredClient) Header added in v1.4.0

func (*DeferredClient) HeaderByHash added in v1.4.0

func (*DeferredClient) Health

func (*DeferredClient) IsRunning added in v1.4.0

func (d *DeferredClient) IsRunning() bool

func (*DeferredClient) NetInfo

func (*DeferredClient) NumUnconfirmedTxs

func (d *DeferredClient) NumUnconfirmedTxs(a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error)

func (*DeferredClient) OnReset added in v1.4.0

func (d *DeferredClient) OnReset() error

func (*DeferredClient) OnStart added in v1.4.0

func (d *DeferredClient) OnStart() error

func (*DeferredClient) OnStop added in v1.4.0

func (d *DeferredClient) OnStop()

func (*DeferredClient) Quit added in v1.4.0

func (d *DeferredClient) Quit() <-chan struct{}

func (*DeferredClient) Reset added in v1.4.0

func (d *DeferredClient) Reset() error

func (*DeferredClient) Resolve added in v1.4.0

func (d *DeferredClient) Resolve(v any) error

func (*DeferredClient) SetLogger added in v1.4.0

func (d *DeferredClient) SetLogger(a0 log.Logger)

func (*DeferredClient) Start added in v1.4.0

func (d *DeferredClient) Start() error

func (*DeferredClient) Status

func (*DeferredClient) Stop added in v1.4.0

func (d *DeferredClient) Stop() error

func (*DeferredClient) String added in v1.4.0

func (d *DeferredClient) String() string

func (*DeferredClient) Subscribe added in v1.4.0

func (d *DeferredClient) Subscribe(a0 context.Context, a1 string, a2 string, a3 ...int) (<-chan coretypes.ResultEvent, error)

func (*DeferredClient) Tx added in v1.4.0

func (d *DeferredClient) Tx(a0 context.Context, a1 []uint8, a2 bool) (*coretypes.ResultTx, error)

func (*DeferredClient) TxSearch added in v1.4.0

func (d *DeferredClient) TxSearch(a0 context.Context, a1 string, a2 bool, a3 *int, a4 *int, a5 string) (*coretypes.ResultTxSearch, error)

func (*DeferredClient) UnconfirmedTxs

func (d *DeferredClient) UnconfirmedTxs(a0 context.Context, a1 *int) (*coretypes.ResultUnconfirmedTxs, error)

func (*DeferredClient) Unsubscribe added in v1.4.0

func (d *DeferredClient) Unsubscribe(a0 context.Context, a1 string, a2 string) error

func (*DeferredClient) UnsubscribeAll added in v1.4.0

func (d *DeferredClient) UnsubscribeAll(a0 context.Context, a1 string) error

func (*DeferredClient) Validators added in v1.4.0

func (d *DeferredClient) Validators(a0 context.Context, a1 *int64, a2 *int, a3 *int) (*coretypes.ResultValidators, error)

type DispatcherClient

type DispatcherClient interface {
	tm.SubmitClient
	rpc.NetworkClient
}

type HTTPClient added in v1.4.0

type HTTPClient struct {
	// contains filtered or unexported fields
}

func NewHTTPClient

func NewHTTPClient(addr string) (*HTTPClient, error)

func NewHTTPClientForPeer added in v1.4.0

func NewHTTPClientForPeer(peer coretypes.Peer, offset config.PortOffset) (*HTTPClient, error)

NewHTTPClientForPeer creates a new Tendermint RPC HTTP client for the given peer.

func (*HTTPClient) ABCIInfo added in v1.4.0

func (c *HTTPClient) ABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)

func (*HTTPClient) ABCIQuery added in v1.4.0

func (c *HTTPClient) ABCIQuery(
	ctx context.Context,
	path string,
	data bytes.HexBytes,
) (*ctypes.ResultABCIQuery, error)

func (*HTTPClient) ABCIQueryWithOptions added in v1.4.0

func (c *HTTPClient) ABCIQueryWithOptions(
	ctx context.Context,
	path string,
	data bytes.HexBytes,
	opts rpcclient.ABCIQueryOptions,
) (*ctypes.ResultABCIQuery, error)

func (*HTTPClient) Block added in v1.4.0

func (c *HTTPClient) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error)

func (*HTTPClient) BlockByHash added in v1.4.0

func (c *HTTPClient) BlockByHash(ctx context.Context, hash []byte) (*ctypes.ResultBlock, error)

func (*HTTPClient) BlockResults added in v1.4.0

func (c *HTTPClient) BlockResults(
	ctx context.Context,
	height *int64,
) (*ctypes.ResultBlockResults, error)

func (*HTTPClient) BlockSearch added in v1.4.0

func (c *HTTPClient) BlockSearch(
	ctx context.Context,
	query string,
	page, perPage *int,
	orderBy string,
) (*ctypes.ResultBlockSearch, error)

func (*HTTPClient) BlockchainInfo added in v1.4.0

func (c *HTTPClient) BlockchainInfo(
	ctx context.Context,
	minHeight,
	maxHeight int64,
) (*ctypes.ResultBlockchainInfo, error)

func (*HTTPClient) BroadcastEvidence added in v1.4.0

func (c *HTTPClient) BroadcastEvidence(
	ctx context.Context,
	ev types.Evidence,
) (*ctypes.ResultBroadcastEvidence, error)

func (*HTTPClient) BroadcastTxAsync added in v1.4.0

func (c *HTTPClient) BroadcastTxAsync(
	ctx context.Context,
	tx types.Tx,
) (*ctypes.ResultBroadcastTx, error)

func (*HTTPClient) BroadcastTxCommit added in v1.4.0

func (c *HTTPClient) BroadcastTxCommit(
	ctx context.Context,
	tx types.Tx,
) (*ctypes.ResultBroadcastTxCommit, error)

func (*HTTPClient) BroadcastTxSync added in v1.4.0

func (c *HTTPClient) BroadcastTxSync(
	ctx context.Context,
	tx types.Tx,
) (*ctypes.ResultBroadcastTx, error)

func (*HTTPClient) CheckTx added in v1.4.0

func (c *HTTPClient) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)

func (*HTTPClient) Commit added in v1.4.0

func (c *HTTPClient) Commit(ctx context.Context, height *int64) (*ctypes.ResultCommit, error)

func (*HTTPClient) ConsensusParams added in v1.4.0

func (c *HTTPClient) ConsensusParams(
	ctx context.Context,
	height *int64,
) (*ctypes.ResultConsensusParams, error)

func (*HTTPClient) ConsensusState added in v1.4.0

func (c *HTTPClient) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusState, error)

func (*HTTPClient) DumpConsensusState added in v1.4.0

func (c *HTTPClient) DumpConsensusState(ctx context.Context) (*ctypes.ResultDumpConsensusState, error)

func (*HTTPClient) Genesis added in v1.4.0

func (c *HTTPClient) Genesis(ctx context.Context) (*ctypes.ResultGenesis, error)

func (*HTTPClient) GenesisChunked added in v1.4.0

func (c *HTTPClient) GenesisChunked(ctx context.Context, id uint) (*ctypes.ResultGenesisChunk, error)

func (*HTTPClient) Header added in v1.4.0

func (c *HTTPClient) Header(ctx context.Context, height *int64) (*ctypes.ResultHeader, error)

func (*HTTPClient) HeaderByHash added in v1.4.0

func (c *HTTPClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*ctypes.ResultHeader, error)

func (*HTTPClient) Health added in v1.4.0

func (c *HTTPClient) Health(ctx context.Context) (*ctypes.ResultHealth, error)

func (*HTTPClient) NetInfo added in v1.4.0

func (c *HTTPClient) NetInfo(ctx context.Context) (*ctypes.ResultNetInfo, error)

func (*HTTPClient) NumUnconfirmedTxs added in v1.4.0

func (c *HTTPClient) NumUnconfirmedTxs(ctx context.Context) (*ctypes.ResultUnconfirmedTxs, error)

func (*HTTPClient) Status added in v1.4.0

func (c *HTTPClient) Status(ctx context.Context) (*ctypes.ResultStatus, error)

func (*HTTPClient) Tx added in v1.4.0

func (c *HTTPClient) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)

func (*HTTPClient) TxSearch added in v1.4.0

func (c *HTTPClient) TxSearch(
	ctx context.Context,
	query string,
	prove bool,
	page,
	perPage *int,
	orderBy string,
) (*ctypes.ResultTxSearch, error)

func (*HTTPClient) UnconfirmedTxs added in v1.4.0

func (c *HTTPClient) UnconfirmedTxs(
	ctx context.Context,
	limit *int,
) (*ctypes.ResultUnconfirmedTxs, error)

func (*HTTPClient) Validators added in v1.4.0

func (c *HTTPClient) Validators(
	ctx context.Context,
	height *int64,
	page,
	perPage *int,
) (*ctypes.ResultValidators, error)

type WalkClient added in v1.2.13

type WalkClient interface {
	NetInfo(context.Context) (*coretypes.ResultNetInfo, error)
}

WalkClient is the subset of client.NetworkClient needed for WalkPeers.

Jump to

Keyboard shortcuts

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