lightclient source pure
1
3
type ClientImpl
funcClientImpl is the registered light client implementation for a client type. It mirrors Union's ClientRegistry value: Union stores a client contract address, while this Gno core stores a constructor function that instantiates the live light client for a submitted client state. Union references: https://github.com/unionlabs/union/blob/1bb07590230e7c4d071f32ad7185be021a1a1789/cosmwasm/core/src/contract.rs#L849-L865
type Interface
interface 1type Interface interface {
2 VerifyMembership(height uint64, key []byte, proof []byte, value []byte) error
3
4 VerifyNonMembership(height uint64, key []byte, proof []byte) error
5
6 GetTimestamp() types.Timestamp
7
8 // GetTimestampAtHeight returns the consensus timestamp recorded at a specific
9 // height. Packet timeout verification needs the counterparty timestamp at the
10 // proof height, not just the latest. Returns an error when no consensus state
11 // exists at the height.
12 GetTimestampAtHeight(height uint64) (types.Timestamp, error)
13
14 GetLatestHeight() uint64
15
16 GetCounterpartyChainID() string
17
18 Status() Status
19
20 VerifyHeader(caller address, header []byte, relayer address) (types.StateUpdate, error)
21
22 VerifyCreation(caller address, relayer address) (types.ClientCreationResult, error)
23
24 Misbehaviour(caller address, misbehaviour []byte, relayer address) ([]byte, error)
25}