mock

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConfig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the module interfaces to protobuf Any.

Types

type Prover

type Prover struct {
	// contains filtered or unexported fields
}

func NewProver

func NewProver(chain core.Chain, config ProverConfig) *Prover

func (*Prover) CheckRefreshRequired added in v0.4.15

func (pr *Prover) CheckRefreshRequired(dst core.ChainInfoICS02Querier) (bool, error)

CheckRefreshRequired always returns false because mock clients don't need refresh.

func (*Prover) CreateInitialLightClientState added in v0.4.19

func (pr *Prover) CreateInitialLightClientState(height exported.Height) (exported.ClientState, exported.ConsensusState, error)

CreateInitialLightClientState creates a pair of ClientState and ConsensusState for building MsgCreateClient submitted to the counterparty chain

func (*Prover) GetLatestFinalizedHeader added in v0.3.1

func (pr *Prover) GetLatestFinalizedHeader() (core.Header, error)

GetLatestFinalizedHeader returns the latest finalized header

func (*Prover) Init added in v0.1.2

func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, debug bool) error

func (*Prover) ProveHostConsensusState added in v0.4.21

func (pr *Prover) ProveHostConsensusState(ctx core.QueryContext, height exported.Height, consensusState exported.ConsensusState) ([]byte, error)

ProveHostConsensusState returns the proof of the consensus state at `height`

func (*Prover) ProveState added in v0.4.2

func (pr *Prover) ProveState(ctx core.QueryContext, path string, value []byte) ([]byte, clienttypes.Height, error)

ProveState returns the proof of an IBC state specified by `path` and `value`

func (*Prover) SetRelayInfo added in v0.1.2

func (pr *Prover) SetRelayInfo(_ *core.PathEnd, _ *core.ProvableChain, _ *core.PathEnd) error

SetRelayInfo sets source's path and counterparty's info to the chain

func (*Prover) SetupForRelay added in v0.1.2

func (pr *Prover) SetupForRelay(ctx context.Context) error

func (*Prover) SetupHeadersForUpdate added in v0.3.1

func (pr *Prover) SetupHeadersForUpdate(_ core.FinalityAwareChain, latestFinalizedHeader core.Header) ([]core.Header, error)

SetupHeadersForUpdate returns the finalized header and any intermediate headers needed to apply it to the client on the counterpaty chain

type ProverConfig

type ProverConfig struct {
	FinalityDelay uint64 `protobuf:"varint,1,opt,name=finality_delay,json=finalityDelay,proto3" json:"finality_delay,omitempty"`
}

func (ProverConfig) Build

func (c ProverConfig) Build(chain core.Chain) (core.Prover, error)

func (*ProverConfig) Descriptor

func (*ProverConfig) Descriptor() ([]byte, []int)

func (*ProverConfig) Marshal

func (m *ProverConfig) Marshal() (dAtA []byte, err error)

func (*ProverConfig) MarshalTo

func (m *ProverConfig) MarshalTo(dAtA []byte) (int, error)

func (*ProverConfig) MarshalToSizedBuffer

func (m *ProverConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProverConfig) ProtoMessage

func (*ProverConfig) ProtoMessage()

func (*ProverConfig) Reset

func (m *ProverConfig) Reset()

func (*ProverConfig) Size

func (m *ProverConfig) Size() (n int)

func (*ProverConfig) String

func (m *ProverConfig) String() string

func (*ProverConfig) Unmarshal

func (m *ProverConfig) Unmarshal(dAtA []byte) error

func (ProverConfig) Validate added in v0.4.12

func (c ProverConfig) Validate() error

func (*ProverConfig) XXX_DiscardUnknown

func (m *ProverConfig) XXX_DiscardUnknown()

func (*ProverConfig) XXX_Marshal

func (m *ProverConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProverConfig) XXX_Merge

func (m *ProverConfig) XXX_Merge(src proto.Message)

func (*ProverConfig) XXX_Size

func (m *ProverConfig) XXX_Size() int

func (*ProverConfig) XXX_Unmarshal

func (m *ProverConfig) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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