api

package
v0.2300.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package api provides a light CometBFT consensus backend API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	consensus.LightClient

	// GetVerifiedLightBlock returns a verified light block.
	GetVerifiedLightBlock(ctx context.Context, height int64) (*cmttypes.LightBlock, error)

	// GetVerifiedParameters returns verified consensus parameters.
	GetVerifiedParameters(ctx context.Context, height int64) (*cmtproto.ConsensusParams, error)
}

Client is a CometBFT consensus light client that talks with remote oasis-nodes that are using the CometBFT consensus backend and verifies responses.

type ClientConfig

type ClientConfig struct {
	// GenesisDocument is the CometBFT genesis document.
	GenesisDocument *cmttypes.GenesisDoc

	// TrustOptions are CometBFT light client trust options.
	TrustOptions cmtlight.TrustOptions
}

ClientConfig is the configuration for the light client.

type ClientService

type ClientService interface {
	consensus.LightService

	Client
}

ClientService is a CometBFT consensus light client service.

type Provider

type Provider interface {
	cmtlightprovider.Provider
	consensus.LightClient

	// Initialized returns a channel that is closed when the provider is initialized.
	Initialized() <-chan struct{}

	// PeerID returns the identifier of the peer backing the provider.
	PeerID() string
}

Provider is a CometBFT light client provider.

Jump to

Keyboard shortcuts

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