Documentation ¶
Index ¶
- Variables
- func NewETHClient(endpoint string) (*ethclient.Client, error)
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- type Chain
- func (chain *Chain) CallOpts(ctx context.Context, height int64) *bind.CallOpts
- func (c *Chain) ChainID() string
- func (c *Chain) Codec() codec.ProtoCodecMarshaler
- func (c *Chain) ErrCantSetPath(err error) error
- func (c *Chain) GetAddress() (sdk.AccAddress, error)
- func (c *Chain) GetLatestHeight() (int64, error)
- func (c *Chain) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, ...) error
- func (c *Chain) Path() *core.PathEnd
- func (c *Chain) QueryBalance(address sdk.AccAddress) (sdk.Coins, error)
- func (c *Chain) QueryChannel(height int64) (chanRes *chantypes.QueryChannelResponse, err error)
- func (c *Chain) QueryClientConsensusState(height int64, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)
- func (c *Chain) QueryClientState(height int64) (*clienttypes.QueryClientStateResponse, error)
- func (c *Chain) QueryConnection(height int64) (*conntypes.QueryConnectionResponse, error)
- func (c *Chain) QueryDenomTraces(offset uint64, limit uint64, height int64) (*transfertypes.QueryDenomTracesResponse, error)
- func (c *Chain) QueryPacket(height int64, sequence uint64) (*chantypes.Packet, error)
- func (c *Chain) QueryPacketAcknowledgement(height int64, sequence uint64) ([]byte, error)
- func (c *Chain) QueryPacketAcknowledgementCommitment(height int64, seq uint64) (ackRes *chantypes.QueryPacketAcknowledgementResponse, err error)
- func (c *Chain) QueryPacketAcknowledgementCommitments(offset uint64, limit uint64, height int64) (comRes *chantypes.QueryPacketAcknowledgementsResponse, err error)
- func (c *Chain) QueryPacketCommitment(height int64, seq uint64) (comRes *chantypes.QueryPacketCommitmentResponse, err error)
- func (c *Chain) QueryPacketCommitments(offset uint64, limit uint64, height int64) (comRes *chantypes.QueryPacketCommitmentsResponse, err error)
- func (c *Chain) QueryUnrecievedAcknowledgements(height int64, seqs []uint64) ([]uint64, error)
- func (c *Chain) QueryUnrecievedPackets(height int64, seqs []uint64) ([]uint64, error)
- func (c *Chain) RegisterMsgEventListener(listener core.MsgEventListener)
- func (c *Chain) Send(msgs []sdk.Msg) bool
- func (c *Chain) SendMsgs(msgs []sdk.Msg) ([]byte, error)
- func (c *Chain) SetRelayInfo(p *core.PathEnd, _ *core.ProvableChain, _ *core.PathEnd) error
- func (c *Chain) SetupForRelay(ctx context.Context) error
- func (c *Chain) TxAcknowledgement(opts *bind.TransactOpts, msg *chantypes.MsgAcknowledgement) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenAck(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenAck) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenConfirm(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenConfirm) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenInit(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenInit) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenTry(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenTry) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenAck(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenAck) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenConfirm(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenConfirm) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenInit(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenInit) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenTry(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenTry) (*gethtypes.Transaction, error)
- func (c *Chain) TxCreateClient(opts *bind.TransactOpts, msg *clienttypes.MsgCreateClient) (*gethtypes.Transaction, error)
- func (chain *Chain) TxOpts(ctx context.Context) *bind.TransactOpts
- func (c *Chain) TxRecvPacket(opts *bind.TransactOpts, msg *chantypes.MsgRecvPacket) (*gethtypes.Transaction, error)
- func (chain *Chain) TxSync(ctx context.Context, tx *gethtypes.Transaction) error
- func (chain *Chain) TxSyncIfNoError(ctx context.Context) func(tx *gethtypes.Transaction, err error) error
- func (c *Chain) TxUpdateClient(opts *bind.TransactOpts, msg *clienttypes.MsgUpdateClient) (*gethtypes.Transaction, error)
- type ChainConfig
- func (c ChainConfig) Build() (core.ChainI, error)
- func (*ChainConfig) Descriptor() ([]byte, []int)
- func (c ChainConfig) IBCHandlerAddress() common.Address
- func (c ChainConfig) IBCHostAddress() common.Address
- func (m *ChainConfig) Marshal() (dAtA []byte, err error)
- func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ChainConfig) ProtoMessage()
- func (m *ChainConfig) Reset()
- func (m *ChainConfig) Size() (n int)
- func (m *ChainConfig) String() string
- func (m *ChainConfig) Unmarshal(dAtA []byte) error
- func (m *ChainConfig) XXX_DiscardUnknown()
- func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChainConfig) XXX_Merge(src proto.Message)
- func (m *ChainConfig) XXX_Size() int
- func (m *ChainConfig) XXX_Unmarshal(b []byte) error
- type PacketAcknowledgement
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the module interfaces to protobuf Any.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func NewChain ¶
func NewChain(config ChainConfig) (*Chain, error)
func (*Chain) Codec ¶
func (c *Chain) Codec() codec.ProtoCodecMarshaler
Marshaler returns the marshaler
func (*Chain) ErrCantSetPath ¶
ErrCantSetPath returns an error if the path doesn't set properly
func (*Chain) GetAddress ¶
func (c *Chain) GetAddress() (sdk.AccAddress, error)
GetAddress returns the address of relayer
func (*Chain) GetLatestHeight ¶
GetLatestHeight gets the chain for the latest height and returns it
func (*Chain) Init ¶
func (c *Chain) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, debug bool) error
Init ...
func (*Chain) QueryBalance ¶
QueryBalance returns the amount of coins in the relayer account
func (*Chain) QueryChannel ¶
func (c *Chain) QueryChannel(height int64) (chanRes *chantypes.QueryChannelResponse, err error)
QueryChannel returns the channel associated with a channelID
func (*Chain) QueryClientConsensusState ¶
func (c *Chain) QueryClientConsensusState(height int64, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)
QueryClientConsensusState retrevies the latest consensus state for a client in state at a given height
func (*Chain) QueryClientState ¶
func (c *Chain) QueryClientState(height int64) (*clienttypes.QueryClientStateResponse, error)
QueryClientState returns the client state of dst chain height represents the height of dst chain
func (*Chain) QueryConnection ¶
func (c *Chain) QueryConnection(height int64) (*conntypes.QueryConnectionResponse, error)
QueryConnection returns the remote end of a given connection
func (*Chain) QueryDenomTraces ¶
func (c *Chain) QueryDenomTraces(offset uint64, limit uint64, height int64) (*transfertypes.QueryDenomTracesResponse, error)
QueryDenomTraces returns all the denom traces from a given chain
func (*Chain) QueryPacket ¶
QueryPacket returns the packet corresponding to a sequence
func (*Chain) QueryPacketAcknowledgement ¶
QueryPacketAcknowledgement returns the acknowledgement corresponding to a sequence
func (*Chain) QueryPacketAcknowledgementCommitment ¶
func (c *Chain) QueryPacketAcknowledgementCommitment(height int64, seq uint64) (ackRes *chantypes.QueryPacketAcknowledgementResponse, err error)
QueryPacketAcknowledgementCommitment returns the acknowledgement corresponding to a given sequence
func (*Chain) QueryPacketAcknowledgementCommitments ¶
func (c *Chain) QueryPacketAcknowledgementCommitments(offset uint64, limit uint64, height int64) (comRes *chantypes.QueryPacketAcknowledgementsResponse, err error)
QueryPacketAcknowledgementCommitments returns an array of packet acks
func (*Chain) QueryPacketCommitment ¶
func (c *Chain) QueryPacketCommitment(height int64, seq uint64) (comRes *chantypes.QueryPacketCommitmentResponse, err error)
QueryPacketCommitment returns the packet commitment corresponding to a given sequence
func (*Chain) QueryPacketCommitments ¶
func (c *Chain) QueryPacketCommitments(offset uint64, limit uint64, height int64) (comRes *chantypes.QueryPacketCommitmentsResponse, err error)
NOTE: The current implementation returns all packets, including those for that acknowledgement has already received. QueryPacketCommitments returns an array of packet commitments
func (*Chain) QueryUnrecievedAcknowledgements ¶
QueryUnrecievedAcknowledgements returns a list of unrelayed packet acks
func (*Chain) QueryUnrecievedPackets ¶
QueryUnrecievedPackets returns a list of unrelayed packet commitments
func (*Chain) RegisterMsgEventListener ¶
func (c *Chain) RegisterMsgEventListener(listener core.MsgEventListener)
RegisterMsgEventListener registers a given EventListener to the chain
func (*Chain) Send ¶
Send sends msgs to the chain and logging a result of it It returns a boolean value whether the result is success
func (*Chain) SetRelayInfo ¶
SetRelayInfo sets source's path and counterparty's info to the chain
func (*Chain) SetupForRelay ¶
SetupForRelay ...
func (*Chain) TxAcknowledgement ¶
func (c *Chain) TxAcknowledgement(opts *bind.TransactOpts, msg *chantypes.MsgAcknowledgement) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenAck ¶
func (c *Chain) TxChannelOpenAck(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenAck) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenConfirm ¶
func (c *Chain) TxChannelOpenConfirm(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenConfirm) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenInit ¶
func (c *Chain) TxChannelOpenInit(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenInit) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenTry ¶
func (c *Chain) TxChannelOpenTry(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenTry) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenAck ¶
func (c *Chain) TxConnectionOpenAck(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenAck) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenConfirm ¶
func (c *Chain) TxConnectionOpenConfirm(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenConfirm) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenInit ¶
func (c *Chain) TxConnectionOpenInit(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenInit) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenTry ¶
func (c *Chain) TxConnectionOpenTry(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenTry) (*gethtypes.Transaction, error)
func (*Chain) TxCreateClient ¶
func (c *Chain) TxCreateClient(opts *bind.TransactOpts, msg *clienttypes.MsgCreateClient) (*gethtypes.Transaction, error)
func (*Chain) TxRecvPacket ¶
func (c *Chain) TxRecvPacket(opts *bind.TransactOpts, msg *chantypes.MsgRecvPacket) (*gethtypes.Transaction, error)
func (*Chain) TxSyncIfNoError ¶
func (*Chain) TxUpdateClient ¶
func (c *Chain) TxUpdateClient(opts *bind.TransactOpts, msg *clienttypes.MsgUpdateClient) (*gethtypes.Transaction, error)
type ChainConfig ¶
type ChainConfig struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` EthChainId int64 `protobuf:"varint,2,opt,name=eth_chain_id,json=ethChainId,proto3" json:"eth_chain_id,omitempty"` RpcAddr string `protobuf:"bytes,3,opt,name=rpc_addr,json=rpcAddr,proto3" json:"rpc_addr,omitempty"` // use for relayer HdwMnemonic string `protobuf:"bytes,4,opt,name=hdw_mnemonic,json=hdwMnemonic,proto3" json:"hdw_mnemonic,omitempty"` HdwPath string `protobuf:"bytes,5,opt,name=hdw_path,json=hdwPath,proto3" json:"hdw_path,omitempty"` IbcHostAddress string `protobuf:"bytes,6,opt,name=ibc_host_address,json=ibcHostAddress,proto3" json:"ibc_host_address,omitempty"` IbcHandlerAddress string `protobuf:"bytes,7,opt,name=ibc_handler_address,json=ibcHandlerAddress,proto3" json:"ibc_handler_address,omitempty"` }
func (*ChainConfig) Descriptor ¶
func (*ChainConfig) Descriptor() ([]byte, []int)
func (ChainConfig) IBCHandlerAddress ¶
func (c ChainConfig) IBCHandlerAddress() common.Address
func (ChainConfig) IBCHostAddress ¶
func (c ChainConfig) IBCHostAddress() common.Address
func (*ChainConfig) Marshal ¶
func (m *ChainConfig) Marshal() (dAtA []byte, err error)
func (*ChainConfig) MarshalToSizedBuffer ¶
func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ChainConfig) ProtoMessage ¶
func (*ChainConfig) ProtoMessage()
func (*ChainConfig) Reset ¶
func (m *ChainConfig) Reset()
func (*ChainConfig) Size ¶
func (m *ChainConfig) Size() (n int)
func (*ChainConfig) String ¶
func (m *ChainConfig) String() string
func (*ChainConfig) Unmarshal ¶
func (m *ChainConfig) Unmarshal(dAtA []byte) error
func (*ChainConfig) XXX_DiscardUnknown ¶
func (m *ChainConfig) XXX_DiscardUnknown()
func (*ChainConfig) XXX_Marshal ¶
func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChainConfig) XXX_Merge ¶
func (m *ChainConfig) XXX_Merge(src proto.Message)
func (*ChainConfig) XXX_Size ¶
func (m *ChainConfig) XXX_Size() int
func (*ChainConfig) XXX_Unmarshal ¶
func (m *ChainConfig) XXX_Unmarshal(b []byte) error