ethmultisig

package
v0.0.0-...-892f76a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEthmultisig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEthmultisig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEthmultisig = 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 ETHMultisig

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

func NewETHMultisig

func NewETHMultisig(cdc codec.ProtoCodecMarshaler, diversifier string, keys []*ecdsa.PrivateKey, prefix []byte) ETHMultisig

func (ETHMultisig) Addresses

func (m ETHMultisig) Addresses() []common.Address

func (ETHMultisig) GetCurrentTimestamp

func (m ETHMultisig) GetCurrentTimestamp() uint64

GetCurrentTimestamp returns current time

func (ETHMultisig) SignChannelState

func (m ETHMultisig) SignChannelState(height clienttypes.Height, portID, channelID string, channel chantypes.Channel) (*ethmultisigtypes.MultiSignature, []byte, error)

func (ETHMultisig) SignClientState

func (m ETHMultisig) SignClientState(height clienttypes.Height, clientID string, clientState exported.ClientState) (*ethmultisigtypes.MultiSignature, []byte, error)

func (ETHMultisig) SignConnectionState

func (m ETHMultisig) SignConnectionState(height clienttypes.Height, connectionID string, connection conntypes.ConnectionEnd) (*ethmultisigtypes.MultiSignature, []byte, error)

func (ETHMultisig) SignConsensusState

func (m ETHMultisig) SignConsensusState(height clienttypes.Height, clientID string, dstClientConsHeight ibcexported.Height, consensusState exported.ConsensusState) (*ethmultisigtypes.MultiSignature, []byte, error)

func (ETHMultisig) SignPacketAcknowledgementState

func (m ETHMultisig) SignPacketAcknowledgementState(height clienttypes.Height, portID, channelID string, sequence uint64, acknowledgementCommitment []byte) (*ethmultisigtypes.MultiSignature, []byte, error)

func (ETHMultisig) SignPacketState

func (m ETHMultisig) SignPacketState(height clienttypes.Height, portID, channelID string, sequence uint64, packetCommitment []byte) (*ethmultisigtypes.MultiSignature, []byte, error)

func (ETHMultisig) SignState

type HDWallet

type HDWallet struct {
	Mnemonic string `protobuf:"bytes,1,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"`
	HdwPath  string `protobuf:"bytes,2,opt,name=hdw_path,json=hdwPath,proto3" json:"hdw_path,omitempty"`
}

func (*HDWallet) Descriptor

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

func (*HDWallet) GetHdwPath

func (m *HDWallet) GetHdwPath() string

func (*HDWallet) GetMnemonic

func (m *HDWallet) GetMnemonic() string

func (*HDWallet) Marshal

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

func (*HDWallet) MarshalTo

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

func (*HDWallet) MarshalToSizedBuffer

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

func (*HDWallet) ProtoMessage

func (*HDWallet) ProtoMessage()

func (*HDWallet) Reset

func (m *HDWallet) Reset()

func (*HDWallet) Size

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

func (*HDWallet) String

func (m *HDWallet) String() string

func (*HDWallet) Unmarshal

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

func (*HDWallet) XXX_DiscardUnknown

func (m *HDWallet) XXX_DiscardUnknown()

func (*HDWallet) XXX_Marshal

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

func (*HDWallet) XXX_Merge

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

func (*HDWallet) XXX_Size

func (m *HDWallet) XXX_Size() int

func (*HDWallet) XXX_Unmarshal

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

type Module

type Module struct{}

func (Module) GetCmd

func (m Module) GetCmd(ctx *config.Context) *cobra.Command

GetCmd returns the command

func (Module) Name

func (m Module) Name() string

Name returns the name of the module

func (Module) RegisterInterfaces

func (m Module) RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the module interfaces to protobuf Any.

type Prover

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

func NewProver

func NewProver(pr ProverConfig, chain core.ChainI) (*Prover, error)

func (*Prover) CreateMsgCreateClient

func (pr *Prover) CreateMsgCreateClient(clientID string, dstHeader core.HeaderI, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error)

CreateMsgCreateClient creates a CreateClientMsg to this chain

func (*Prover) GetChainID

func (pr *Prover) GetChainID() string

GetChainID returns the chain ID

func (*Prover) GetHeight

func (pr *Prover) GetHeight() (clienttypes.Height, error)

func (*Prover) GetLatestLightHeight

func (pr *Prover) GetLatestLightHeight() (int64, error)

GetLatestLightHeight returns the latest height on the light client

func (*Prover) GetSequeunce

func (pr *Prover) GetSequeunce() (uint64, error)

TODO load a sequence value from the persisted storage

func (*Prover) Init

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

func (*Prover) QueryChannelWithProof

func (pr *Prover) QueryChannelWithProof(_ int64) (*chantypes.QueryChannelResponse, error)

QueryChannelWithProof returns the Channel and its proof

func (*Prover) QueryClientConsensusStateWithProof

func (pr *Prover) QueryClientConsensusStateWithProof(_ int64, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)

QueryClientConsensusState returns the ClientConsensusState and its proof

func (*Prover) QueryClientStateWithProof

func (pr *Prover) QueryClientStateWithProof(_ int64) (*clienttypes.QueryClientStateResponse, error)

QueryClientStateWithProof returns the ClientState and its proof

func (*Prover) QueryConnectionWithProof

func (pr *Prover) QueryConnectionWithProof(_ int64) (*conntypes.QueryConnectionResponse, error)

QueryConnectionWithProof returns the Connection and its proof

func (*Prover) QueryLatestHeader

func (pr *Prover) QueryLatestHeader() (out core.HeaderI, err error)

QueryLatestHeader returns the latest header from the chain

func (*Prover) QueryPacketAcknowledgementCommitmentWithProof

func (pr *Prover) QueryPacketAcknowledgementCommitmentWithProof(_ int64, seq uint64) (*chantypes.QueryPacketAcknowledgementResponse, error)

QueryPacketAcknowledgementCommitmentWithProof returns the packet acknowledgement commitment and its proof

func (*Prover) QueryPacketCommitmentWithProof

func (pr *Prover) QueryPacketCommitmentWithProof(_ int64, seq uint64) (comRes *chantypes.QueryPacketCommitmentResponse, err error)

QueryPacketCommitmentWithProof returns the packet commitment and its proof

func (*Prover) SetPath

func (pr *Prover) SetPath(p *core.PathEnd) error

SetPath sets a given path to the chain

func (*Prover) SetupForRelay

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

func (*Prover) SetupHeader

func (pr *Prover) SetupHeader(dst core.LightClientIBCQueryierI, baseSrcHeader core.HeaderI) (core.HeaderI, error)

SetupHeader creates a new header based on a given header

func (*Prover) SignAcknowledgementStateResponse

func (pr *Prover) SignAcknowledgementStateResponse(res *chantypes.QueryPacketAcknowledgementResponse, portID, channelID string, seq uint64) (*chantypes.QueryPacketAcknowledgementResponse, error)

func (*Prover) SignChannelStateResponse

func (pr *Prover) SignChannelStateResponse(res *chantypes.QueryChannelResponse, portID, channelID string) (*chantypes.QueryChannelResponse, error)

func (*Prover) SignClientStateResponse

func (pr *Prover) SignClientStateResponse(res *clienttypes.QueryClientStateResponse, clientID string) (*clienttypes.QueryClientStateResponse, error)

func (*Prover) SignConnectionStateResponse

func (pr *Prover) SignConnectionStateResponse(res *conntypes.QueryConnectionResponse, connectionID string) (*conntypes.QueryConnectionResponse, error)

func (*Prover) SignConsensusStateResponse

func (pr *Prover) SignConsensusStateResponse(res *clienttypes.QueryConsensusStateResponse, clientID string, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)

func (*Prover) SignPacketStateResponse

func (pr *Prover) SignPacketStateResponse(res *chantypes.QueryPacketCommitmentResponse, portID, channelID string, seq uint64) (*chantypes.QueryPacketCommitmentResponse, error)

func (*Prover) UpdateLightWithHeader

func (pr *Prover) UpdateLightWithHeader() (header core.HeaderI, provableHeight int64, queryableHeight int64, err error)

UpdateLightWithHeader updates a header on the light client and returns the header and height corresponding to the chain

type ProverConfig

type ProverConfig struct {
	Diversifier string      `protobuf:"bytes,1,opt,name=diversifier,proto3" json:"diversifier,omitempty"`
	Wallets     []*HDWallet `protobuf:"bytes,2,rep,name=wallets,proto3" json:"wallets,omitempty"`
	Prefix      string      `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"`
}

func (ProverConfig) Build

func (pr ProverConfig) Build(chain core.ChainI) (core.ProverI, error)

func (*ProverConfig) Descriptor

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

func (*ProverConfig) GetDiversifier

func (m *ProverConfig) GetDiversifier() string

func (*ProverConfig) GetPrefix

func (m *ProverConfig) GetPrefix() string

func (*ProverConfig) GetWallets

func (m *ProverConfig) GetWallets() []*HDWallet

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) 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

type ProxyChainProver

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

func NewProxyChainProver

func NewProxyChainProver(cfg *ProxyChainProverConfig, proxyChain proxy.ProxyChainI) (*ProxyChainProver, error)

func (*ProxyChainProver) CreateMsgCreateClient

func (pr *ProxyChainProver) CreateMsgCreateClient(clientID string, dstHeader core.HeaderI, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error)

func (*ProxyChainProver) QueryProxyChannelWithProof

func (pr *ProxyChainProver) QueryProxyChannelWithProof(height int64) (chanRes *channeltypes.QueryChannelResponse, err error)

func (*ProxyChainProver) QueryProxyClientConsensusStateWithProof

func (pr *ProxyChainProver) QueryProxyClientConsensusStateWithProof(height int64, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)

func (*ProxyChainProver) QueryProxyClientStateWithProof

func (pr *ProxyChainProver) QueryProxyClientStateWithProof(height int64) (*clienttypes.QueryClientStateResponse, error)

func (*ProxyChainProver) QueryProxyConnectionStateWithProof

func (pr *ProxyChainProver) QueryProxyConnectionStateWithProof(height int64) (*connectiontypes.QueryConnectionResponse, error)

func (*ProxyChainProver) QueryProxyPacketAcknowledgementCommitmentWithProof

func (pr *ProxyChainProver) QueryProxyPacketAcknowledgementCommitmentWithProof(height int64, seq uint64) (ackRes *channeltypes.QueryPacketAcknowledgementResponse, err error)

func (*ProxyChainProver) QueryProxyPacketCommitmentWithProof

func (pr *ProxyChainProver) QueryProxyPacketCommitmentWithProof(height int64, seq uint64) (comRes *channeltypes.QueryPacketCommitmentResponse, err error)

type ProxyChainProverConfig

type ProxyChainProverConfig struct {
	ProverConfig *ProverConfig `protobuf:"bytes,1,opt,name=prover_config,json=proverConfig,proto3" json:"prover_config,omitempty"`
}

func (*ProxyChainProverConfig) Build

func (*ProxyChainProverConfig) Descriptor

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

func (*ProxyChainProverConfig) GetProverConfig

func (m *ProxyChainProverConfig) GetProverConfig() *ProverConfig

func (*ProxyChainProverConfig) Marshal

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

func (*ProxyChainProverConfig) MarshalTo

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

func (*ProxyChainProverConfig) MarshalToSizedBuffer

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

func (*ProxyChainProverConfig) ProtoMessage

func (*ProxyChainProverConfig) ProtoMessage()

func (*ProxyChainProverConfig) Reset

func (m *ProxyChainProverConfig) Reset()

func (*ProxyChainProverConfig) Size

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

func (*ProxyChainProverConfig) String

func (m *ProxyChainProverConfig) String() string

func (*ProxyChainProverConfig) Unmarshal

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

func (*ProxyChainProverConfig) XXX_DiscardUnknown

func (m *ProxyChainProverConfig) XXX_DiscardUnknown()

func (*ProxyChainProverConfig) XXX_Marshal

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

func (*ProxyChainProverConfig) XXX_Merge

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

func (*ProxyChainProverConfig) XXX_Size

func (m *ProxyChainProverConfig) XXX_Size() int

func (*ProxyChainProverConfig) XXX_Unmarshal

func (m *ProxyChainProverConfig) 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