Versions in this module Expand all Collapse all v0 v0.1.0 Jan 19, 2024 Changes in this version + var DefaultTrustLevel = tmmath.Fraction + func HeaderExpired(h *types.SignedHeader, trustingPeriod time.Duration, now time.Time) bool + func IBCVerify(chainID string, trustedHeader *types.SignedHeader, ...) error + func IBCVerifyAdjacent(chainID string, trustedHeader *types.SignedHeader, ...) error + func IBCVerifyNonAdjacent(chainID string, trustedHeader *types.SignedHeader, ...) error + func ValidateTrustLevel(lvl tmmath.Fraction) error + func Verify(chainID string, trustedHeader *types.SignedHeader, ...) error + func VerifyAdjacent(chainID string, trustedHeader *types.SignedHeader, ...) error + func VerifyBackwards(chainID string, untrustedHeader, trustedHeader *types.SignedHeader) error + func VerifyNonAdjacent(chainID string, trustedHeader *types.SignedHeader, ...) error + type Client struct + func NewClient(chainID string, trustOptions TrustOptions, primary provider.Provider, ...) (*Client, error) + func NewClientFromTrustedStore(chainID string, trustingPeriod time.Duration, primary provider.Provider, ...) (*Client, error) + func NewHTTPClient(chainID string, trustOptions TrustOptions, primaryAddress string, ...) (*Client, error) + func NewHTTPClientFromTrustedStore(chainID string, trustingPeriod time.Duration, primaryAddress string, ...) (*Client, error) + func (c *Client) ChainID() string + func (c *Client) Cleanup() error + func (c *Client) FirstTrustedHeight() (int64, error) + func (c *Client) LastTrustedHeight() (int64, error) + func (c *Client) Primary() provider.Provider + func (c *Client) TrustedHeader(height int64) (*types.SignedHeader, error) + func (c *Client) TrustedValidatorSet(height int64) (valSet *types.ValidatorSet, heightUsed int64, err error) + func (c *Client) Update(now time.Time) (*types.SignedHeader, error) + func (c *Client) VerifyHeader(newHeader *types.SignedHeader, newVals *types.ValidatorSet, now time.Time) error + func (c *Client) VerifyHeaderAtHeight(height int64, now time.Time) (*types.SignedHeader, error) + func (c *Client) Witnesses() []provider.Provider + type ErrInvalidHeader struct + Reason error + func (e ErrInvalidHeader) Error() string + type ErrNewValSetCantBeTrusted struct + Reason types.ErrNotEnoughVotingPowerSigned + func (e ErrNewValSetCantBeTrusted) Error() string + type ErrOldHeaderExpired struct + At time.Time + Now time.Time + func (e ErrOldHeaderExpired) Error() string + type Option func(*Client) + func ConfirmationFunction(fn func(action string) bool) Option + func Logger(l log.Logger) Option + func MaxClockDrift(d time.Duration) Option + func MaxRetryAttempts(max uint16) Option + func PruningSize(h uint16) Option + func SequentialVerification() Option + func SkippingVerification(trustLevel tmmath.Fraction) Option + type TrustOptions struct + Hash []byte + Height int64 + Period time.Duration + func (opts TrustOptions) ValidateBasic() error