# Functions
ConfirmationFunction option can be used to prompt to confirm an action.
HeaderExpired return true if the given header expired.
No description provided by the author
No description provided by the author
No description provided by the author
Logger option can be used to set a logger for the client.
MaxClockDrift defines how much new (untrusted) header's Time can drift into the future.
MaxRetryAttempts option can be used to set max attempts before replacing primary with a witness.
NewClient returns a new light client.
NewClientFromTrustedStore initializes existing client from the trusted store.
NewHTTPClient initiates an instance of a lite client using HTTP addresses for both the primary provider and witnesses of the lite client.
NewHTTPClientFromTrustedStore initiates an instance of a lite client using HTTP addresses for both the primary provider and witnesses and uses a trusted store as the root of trust.
PruningSize option sets the maximum amount of headers & validator set pairs that the light client stores.
SequentialVerification option configures the light client to sequentially check the headers (every header, in ascending height order).
SkippingVerification option configures the light client to skip headers as long as {trustLevel} of the old validator set signed the new header.
ValidateTrustLevel checks that trustLevel is within the allowed range [1/3, 1].
Verify combines both VerifyAdjacent and VerifyNonAdjacent functions.
VerifyAdjacent verifies directly adjacent untrustedHeader against trustedHeader.
VerifyBackwards verifies an untrusted header with a height one less than that of an adjacent trusted header.
VerifyNonAdjacent verifies non-adjacent untrustedHeader against trustedHeader.
# Variables
DefaultTrustLevel - new header can be trusted if at least one correct validator signed it.
# Structs
Client represents a light client, connected to a single chain, which gets headers from a primary provider, verifies them either sequentially or by skipping some and stores them in a trusted store (usually, a local FS).
ErrInvalidHeader means the header either failed the basic validation or commit is not signed by 2/3+.
ErrNewValSetCantBeTrusted means the new validator set cannot be trusted because < 1/3rd (+trustLevel+) of the old validator set has signed.
ErrOldHeaderExpired means the old (trusted) header has expired according to the given trustingPeriod and current time.
TrustOptions are the trust parameters needed when a new light client connects to the network or when an existing light client that has been offline for longer than the trusting period connects to the network.
# Type aliases
Option sets a parameter for the light client.