Documentation ¶
Overview ¶
Package provider implements the cchain.Provider interface.
Index ¶
- type ABCIClient
- type Provider
- func (p Provider) AttestationsFrom(ctx context.Context, sourceChainID uint64, sourceHeight uint64) ([]xchain.Attestation, error)
- func (p Provider) LatestAttestation(ctx context.Context, sourceChainID uint64) (xchain.Attestation, bool, error)
- func (p Provider) Subscribe(in context.Context, srcChainID uint64, height uint64, workerName string, ...)
- func (p Provider) ValidatorSet(ctx context.Context, valSetID uint64) ([]cchain.Validator, bool, error)
- func (p Provider) WindowCompare(ctx context.Context, sourceChainID uint64, height uint64) (int, error)
- func (p Provider) XBlock(ctx context.Context, height uint64, latest bool) (xchain.Block, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABCIClient ¶ added in v0.1.2
type ABCIClient interface { rpcclient.ABCIClient rpcclient.SignClient }
ABCIClient abstracts the cometBFT RPC client consisting of only the required methods.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements cchain.Provider.
func NewABCIProvider ¶
func NewProviderForT ¶
func NewProviderForT(_ *testing.T, fetch fetchFunc, latest latestFunc, window windowFunc, backoffFunc func(context.Context) (func(), func()), ) Provider
NewProviderForT creates a new provider for testing.
func (Provider) AttestationsFrom ¶
func (Provider) LatestAttestation ¶
func (Provider) Subscribe ¶ added in v0.1.0
func (p Provider) Subscribe(in context.Context, srcChainID uint64, height uint64, workerName string, callback cchain.ProviderCallback, )
Subscribe implements cchain.Provider.
func (Provider) ValidatorSet ¶ added in v0.1.2
func (Provider) WindowCompare ¶
Click to show internal directories.
Click to hide internal directories.