rpc

package
v1.0.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCouldntReachSpecifiedHeight = errors.New("couldn't reach specified height")

Functions

This section is empty.

Types

type AppQuerier

type AppQuerier struct {
	Logger tmlog.Logger
	EncCfg encoding.Config
	// contains filtered or unexported fields
}

AppQuerier queries the application for attestations and unbonding periods.

func NewAppQuerier

func NewAppQuerier(logger tmlog.Logger, blobStreamRPC string, encCft encoding.Config) *AppQuerier

func (*AppQuerier) QueryAttestationByNonce

func (aq *AppQuerier) QueryAttestationByNonce(ctx context.Context, nonce uint64) (celestiatypes.AttestationRequestI, error)

QueryAttestationByNonce query an attestation by nonce from the state machine.

func (*AppQuerier) QueryDataCommitmentByNonce

func (aq *AppQuerier) QueryDataCommitmentByNonce(ctx context.Context, nonce uint64) (*celestiatypes.DataCommitment, error)

QueryDataCommitmentByNonce query a data commitment by its nonce.

func (*AppQuerier) QueryDataCommitmentForHeight

func (aq *AppQuerier) QueryDataCommitmentForHeight(ctx context.Context, height uint64) (*celestiatypes.DataCommitment, error)

QueryDataCommitmentForHeight query a data commitment by one of the heights that it commits to.

func (*AppQuerier) QueryEarliestAttestationNonce

func (aq *AppQuerier) QueryEarliestAttestationNonce(ctx context.Context) (int64, error)

QueryEarliestAttestationNonce query the earliest attestation nonce from state machine.

func (*AppQuerier) QueryLastUnbondingHeight

func (aq *AppQuerier) QueryLastUnbondingHeight(ctx context.Context) (int64, error)

QueryLastUnbondingHeight query the last unbonding height from state machine.

func (*AppQuerier) QueryLastValsetBeforeNonce

func (aq *AppQuerier) QueryLastValsetBeforeNonce(ctx context.Context, nonce uint64) (*celestiatypes.Valset, error)

QueryLastValsetBeforeNonce returns the last valset before nonce. This will be needed when signing to know the validator set at that particular nonce. the provided `nonce` can be a valset, but this will return the valset before it. If nonce is 1, it will return an error. Because, there is no valset before nonce 1.

func (*AppQuerier) QueryLatestAttestationNonce

func (aq *AppQuerier) QueryLatestAttestationNonce(ctx context.Context) (uint64, error)

QueryLatestAttestationNonce query the latest attestation nonce from the state machine.

func (*AppQuerier) QueryLatestDataCommitment

func (aq *AppQuerier) QueryLatestDataCommitment(ctx context.Context) (*celestiatypes.DataCommitment, error)

QueryLatestDataCommitment query the latest data commitment in Blobstream state machine.

func (*AppQuerier) QueryLatestValset

func (aq *AppQuerier) QueryLatestValset(ctx context.Context) (*celestiatypes.Valset, error)

QueryLatestValset query the latest recorded valset in the state machine.

func (*AppQuerier) QueryValsetByNonce

func (aq *AppQuerier) QueryValsetByNonce(ctx context.Context, nonce uint64) (*celestiatypes.Valset, error)

QueryValsetByNonce query a valset by nonce.

func (*AppQuerier) Start

func (aq *AppQuerier) Start() error

func (*AppQuerier) Stop

func (aq *AppQuerier) Stop() error

type TmQuerier

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

TmQuerier queries tendermint for commitments and events.

func NewTmQuerier

func NewTmQuerier(
	tendermintRPC string,
	logger tmlog.Logger,
) *TmQuerier

func (*TmQuerier) IsRunning

func (tq *TmQuerier) IsRunning(ctx context.Context) bool

func (*TmQuerier) QueryCommitment

func (tq *TmQuerier) QueryCommitment(ctx context.Context, beginBlock uint64, endBlock uint64) (bytes.HexBytes, error)

func (*TmQuerier) QueryHeight

func (tq *TmQuerier) QueryHeight(ctx context.Context) (int64, error)

func (*TmQuerier) Reconnect

func (tq *TmQuerier) Reconnect() error

func (*TmQuerier) Start

func (tq *TmQuerier) Start() error

func (*TmQuerier) Stop

func (tq *TmQuerier) Stop() error

func (*TmQuerier) SubscribeEvents

func (tq *TmQuerier) SubscribeEvents(ctx context.Context, subscriptionName string, query string) (<-chan coretypes.ResultEvent, error)

func (*TmQuerier) UnsubscribeEvents

func (tq *TmQuerier) UnsubscribeEvents(ctx context.Context, subscriptionName string, query string) error

func (*TmQuerier) WaitForHeight

func (tq *TmQuerier) WaitForHeight(ctx context.Context, height int64) error

func (*TmQuerier) WithClientConn

func (tq *TmQuerier) WithClientConn(trpc client.Client)

Jump to

Keyboard shortcuts

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