Documentation ¶
Index ¶
- Variables
- func DefaultEncoding() testutil.TestEncodingConfig
- func NewCosmosChain(t *testing.T, ctx context.Context, environment string, ...) (chains.Chain, error)
- func NewCosmosLocalnet(testName string, log *zap.Logger, chainConfig ibc.ChainConfig, ...) (chains.Chain, error)
- func RlpEncodeRequest(request CallServiceMessageRequest, callType CallServiceMessageType) ([]byte, error)
- type Acknowledgement
- func (*Acknowledgement) Descriptor() ([]byte, []int)
- func (m *Acknowledgement) GetError() string
- func (m *Acknowledgement) GetResponse() isAcknowledgement_Response
- func (m *Acknowledgement) GetResult() []byte
- func (m *Acknowledgement) Marshal() (dAtA []byte, err error)
- func (m *Acknowledgement) MarshalTo(dAtA []byte) (int, error)
- func (m *Acknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Acknowledgement) ProtoMessage()
- func (m *Acknowledgement) Reset()
- func (m *Acknowledgement) Size() (n int)
- func (m *Acknowledgement) String() string
- func (m *Acknowledgement) Unmarshal(dAtA []byte) error
- func (m *Acknowledgement) XXX_DiscardUnknown()
- func (m *Acknowledgement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Acknowledgement) XXX_Merge(src proto.Message)
- func (*Acknowledgement) XXX_OneofWrappers() []interface{}
- func (m *Acknowledgement) XXX_Size() int
- func (m *Acknowledgement) XXX_Unmarshal(b []byte) error
- type Acknowledgement_Error
- type Acknowledgement_Result
- type CSMessageResponseType
- type CallServiceMessage
- type CallServiceMessageRequest
- type CallServiceMessageResponse
- type CallServiceMessageType
- type Channel
- func (*Channel) Descriptor() ([]byte, []int)
- func (m *Channel) Marshal() (dAtA []byte, err error)
- func (m *Channel) MarshalTo(dAtA []byte) (int, error)
- func (m *Channel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Channel) ProtoMessage()
- func (m *Channel) Reset()
- func (m *Channel) Size() (n int)
- func (m *Channel) String() string
- func (m *Channel) Unmarshal(dAtA []byte) error
- func (m *Channel) XXX_DiscardUnknown()
- func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Channel) XXX_Merge(src proto.Message)
- func (m *Channel) XXX_Size() int
- func (m *Channel) XXX_Unmarshal(b []byte) error
- type CosmosLocalnet
- func (c *CosmosLocalnet) BackupConfig() ([]byte, error)
- func (c *CosmosLocalnet) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error)
- func (c *CosmosLocalnet) BuildWallets(ctx context.Context, keyName string) (ibc.Wallet, error)
- func (c *CosmosLocalnet) CheckForTimeout(ctx context.Context, target chains.Chain, params map[string]interface{}, ...) (context.Context, error)
- func (c *CosmosLocalnet) Config() ibc.ChainConfig
- func (c *CosmosLocalnet) ConfigureBaseConnection(ctx context.Context, connection chains.XCallConnection) (context.Context, error)
- func (c *CosmosLocalnet) DeployContract(ctx context.Context, keyName string) (context.Context, error)
- func (c *CosmosLocalnet) DeployXCallMockApp(ctx context.Context, connection chains.XCallConnection) error
- func (c *CosmosLocalnet) EOAXCall(ctx context.Context, targetChain chains.Chain, keyName, _to string, ...) (string, string, string, error)
- func (c *CosmosLocalnet) ExecuteCall(ctx context.Context, reqId, data string) (context.Context, error)
- func (c *CosmosLocalnet) ExecuteContract(ctx context.Context, contractAddress, keyName, methodName string, ...) (context.Context, error)
- func (c *CosmosLocalnet) ExecuteRollback(ctx context.Context, sn string) (context.Context, error)
- func (c *CosmosLocalnet) FindCallMessage(ctx context.Context, startHeight uint64, from, to, sn string) (string, string, error)
- func (c *CosmosLocalnet) FindCallResponse(ctx context.Context, startHeight uint64, sn string) (string, error)
- func (c *CosmosLocalnet) FindEvent(ctx context.Context, startHeight uint64, contract, index string) (*ctypes.ResultEvent, error)
- func (c *CosmosLocalnet) FindTargetXCallMessage(ctx context.Context, target chains.Chain, height uint64, to string) (*chains.XCallResponse, error)
- func (c *CosmosLocalnet) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, error)
- func (c *CosmosLocalnet) GetAndFundTestUser(ctx context.Context, keyNamePrefix string, mnemonic string, amount int64) (ibc.Wallet, error)
- func (c *CosmosLocalnet) GetBlockByHeight(ctx context.Context) (context.Context, error)
- func (c *CosmosLocalnet) GetChannel(ctx context.Context, connectionPrefix int, portID string) (*chantypes.Channel, error)
- func (c *CosmosLocalnet) GetClientName(suffix int) string
- func (c *CosmosLocalnet) GetClientState(ctx context.Context, clientSuffix int) (any, error)
- func (c *CosmosLocalnet) GetClientsCount(ctx context.Context) (int, error)
- func (c *CosmosLocalnet) GetCommonArgs() []string
- func (c *CosmosLocalnet) GetConnectionState(ctx context.Context, connectionPrefix int) (*conntypes.ConnectionEnd, error)
- func (c *CosmosLocalnet) GetIBCAddress(key string) string
- func (c *CosmosLocalnet) GetLastBlock(ctx context.Context) (context.Context, error)
- func (c *CosmosLocalnet) GetNextChannelSequence(ctx context.Context) (int, error)
- func (c *CosmosLocalnet) GetNextConnectionSequence(ctx context.Context) (int, error)
- func (c *CosmosLocalnet) GetQueryParam(method string, params map[string]interface{}) Query
- func (c *CosmosLocalnet) InitEventListener(ctx context.Context, contract string) chains.EventListener
- func (c *CosmosLocalnet) IsPacketReceived(ctx context.Context, params map[string]interface{}, order ibc.Order) bool
- func (c *CosmosLocalnet) OverrideConfig(key string, value any)
- func (c *CosmosLocalnet) PauseNode(ctx context.Context) error
- func (c *CosmosLocalnet) PreGenesis() error
- func (c *CosmosLocalnet) QueryContract(ctx context.Context, contractAddress, methodName string, ...) (context.Context, error)
- func (c *CosmosLocalnet) RestoreConfig(backup []byte) error
- func (c *CosmosLocalnet) SendPacketMockDApp(ctx context.Context, targetChain chains.Chain, keyName string, ...) (chains.PacketTransferResponse, error)
- func (c *CosmosLocalnet) SendPacketXCall(ctx context.Context, keyName, _to string, data, rollback []byte) (context.Context, error)
- func (c *CosmosLocalnet) SetAdminParams(ctx context.Context, keyName string) (context.Context, string, error)
- func (c *CosmosLocalnet) SetupIBC(ctx context.Context, keyName string) (context.Context, error)
- func (c *CosmosLocalnet) SetupXCall(ctx context.Context, portId string, keyName string) error
- func (c *CosmosLocalnet) UnpauseNode(ctx context.Context) error
- func (c *CosmosLocalnet) UpdateAdminParams(ctx context.Context, keyName string) (context.Context, string, error)
- func (c *CosmosLocalnet) XCall(ctx context.Context, targetChain chains.Chain, keyName, to string, ...) (*chains.XCallResponse, error)
- type CosmosTestnet
- type Counterparty
- func (*Counterparty) Descriptor() ([]byte, []int)
- func (m *Counterparty) Marshal() (dAtA []byte, err error)
- func (m *Counterparty) MarshalTo(dAtA []byte) (int, error)
- func (m *Counterparty) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Counterparty) ProtoMessage()
- func (m *Counterparty) Reset()
- func (m *Counterparty) Size() (n int)
- func (m *Counterparty) String() string
- func (m *Counterparty) Unmarshal(dAtA []byte) error
- func (m *Counterparty) XXX_DiscardUnknown()
- func (m *Counterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Counterparty) XXX_Merge(src proto.Message)
- func (m *Counterparty) XXX_Size() int
- func (m *Counterparty) XXX_Unmarshal(b []byte) error
- type DappInit
- type GetAdmin
- type GetProtocolFee
- type IdentifiedChannel
- func (*IdentifiedChannel) Descriptor() ([]byte, []int)
- func (m *IdentifiedChannel) Marshal() (dAtA []byte, err error)
- func (m *IdentifiedChannel) MarshalTo(dAtA []byte) (int, error)
- func (m *IdentifiedChannel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*IdentifiedChannel) ProtoMessage()
- func (m *IdentifiedChannel) Reset()
- func (m *IdentifiedChannel) Size() (n int)
- func (m *IdentifiedChannel) String() string
- func (m *IdentifiedChannel) Unmarshal(dAtA []byte) error
- func (m *IdentifiedChannel) XXX_DiscardUnknown()
- func (m *IdentifiedChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IdentifiedChannel) XXX_Merge(src proto.Message)
- func (m *IdentifiedChannel) XXX_Size() int
- func (m *IdentifiedChannel) XXX_Unmarshal(b []byte) error
- type MockAppInit
- type Order
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)
- func (m *Packet) Marshal() (dAtA []byte, err error)
- func (m *Packet) MarshalTo(dAtA []byte) (int, error)
- func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Packet) ProtoMessage()
- func (m *Packet) Reset()
- func (m *Packet) Size() (n int)
- func (m *Packet) String() string
- func (m *Packet) Unmarshal(dAtA []byte) error
- func (m *Packet) XXX_DiscardUnknown()
- func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Packet) XXX_Merge(src proto.Message)
- func (m *Packet) XXX_Size() int
- func (m *Packet) XXX_Unmarshal(b []byte) error
- type PacketId
- func (*PacketId) Descriptor() ([]byte, []int)
- func (m *PacketId) Marshal() (dAtA []byte, err error)
- func (m *PacketId) MarshalTo(dAtA []byte) (int, error)
- func (m *PacketId) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PacketId) ProtoMessage()
- func (m *PacketId) Reset()
- func (m *PacketId) Size() (n int)
- func (m *PacketId) String() string
- func (m *PacketId) Unmarshal(dAtA []byte) error
- func (m *PacketId) XXX_DiscardUnknown()
- func (m *PacketId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PacketId) XXX_Merge(src proto.Message)
- func (m *PacketId) XXX_Size() int
- func (m *PacketId) XXX_Unmarshal(b []byte) error
- type PacketState
- func (*PacketState) Descriptor() ([]byte, []int)
- func (m *PacketState) Marshal() (dAtA []byte, err error)
- func (m *PacketState) MarshalTo(dAtA []byte) (int, error)
- func (m *PacketState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PacketState) ProtoMessage()
- func (m *PacketState) Reset()
- func (m *PacketState) Size() (n int)
- func (m *PacketState) String() string
- func (m *PacketState) Unmarshal(dAtA []byte) error
- func (m *PacketState) XXX_DiscardUnknown()
- func (m *PacketState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PacketState) XXX_Merge(src proto.Message)
- func (m *PacketState) XXX_Size() int
- func (m *PacketState) XXX_Unmarshal(b []byte) error
- type Query
- type Result
- type SetAdmin
- type State
- type TxResul
- type UpdateAdmin
- type WebSocketListener
- type XcallInit
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthChannel = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowChannel = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupChannel = fmt.Errorf("proto: unexpected end of group") )
var Order_name = map[int32]string{
0: "ORDER_NONE_UNSPECIFIED",
1: "ORDER_UNORDERED",
2: "ORDER_ORDERED",
}
var Order_value = map[string]int32{
"ORDER_NONE_UNSPECIFIED": 0,
"ORDER_UNORDERED": 1,
"ORDER_ORDERED": 2,
}
var State_name = map[int32]string{
0: "STATE_UNINITIALIZED_UNSPECIFIED",
1: "STATE_INIT",
2: "STATE_TRYOPEN",
3: "STATE_OPEN",
4: "STATE_CLOSED",
}
var State_value = map[string]int32{
"STATE_UNINITIALIZED_UNSPECIFIED": 0,
"STATE_INIT": 1,
"STATE_TRYOPEN": 2,
"STATE_OPEN": 3,
"STATE_CLOSED": 4,
}
Functions ¶
func DefaultEncoding ¶
func DefaultEncoding() testutil.TestEncodingConfig
func NewCosmosChain ¶
func NewCosmosLocalnet ¶
func RlpEncodeRequest ¶
func RlpEncodeRequest(request CallServiceMessageRequest, callType CallServiceMessageType) ([]byte, error)
Types ¶
type Acknowledgement ¶
type Acknowledgement struct { // response contains either a result or an error and must be non-empty // // Types that are valid to be assigned to Response: // *Acknowledgement_Result // *Acknowledgement_Error Response isAcknowledgement_Response `protobuf_oneof:"response"` }
Acknowledgement is the recommended acknowledgement format to be used by app-specific protocols. NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental conflicts with other protobuf message formats used for acknowledgements. The first byte of any message with this format will be the non-ASCII values `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope
func (*Acknowledgement) Descriptor ¶
func (*Acknowledgement) Descriptor() ([]byte, []int)
func (*Acknowledgement) GetError ¶
func (m *Acknowledgement) GetError() string
func (*Acknowledgement) GetResponse ¶
func (m *Acknowledgement) GetResponse() isAcknowledgement_Response
func (*Acknowledgement) GetResult ¶
func (m *Acknowledgement) GetResult() []byte
func (*Acknowledgement) Marshal ¶
func (m *Acknowledgement) Marshal() (dAtA []byte, err error)
func (*Acknowledgement) MarshalToSizedBuffer ¶
func (m *Acknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Acknowledgement) ProtoMessage ¶
func (*Acknowledgement) ProtoMessage()
func (*Acknowledgement) Reset ¶
func (m *Acknowledgement) Reset()
func (*Acknowledgement) Size ¶
func (m *Acknowledgement) Size() (n int)
func (*Acknowledgement) String ¶
func (m *Acknowledgement) String() string
func (*Acknowledgement) Unmarshal ¶
func (m *Acknowledgement) Unmarshal(dAtA []byte) error
func (*Acknowledgement) XXX_DiscardUnknown ¶
func (m *Acknowledgement) XXX_DiscardUnknown()
func (*Acknowledgement) XXX_Marshal ¶
func (m *Acknowledgement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Acknowledgement) XXX_Merge ¶
func (m *Acknowledgement) XXX_Merge(src proto.Message)
func (*Acknowledgement) XXX_OneofWrappers ¶
func (*Acknowledgement) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Acknowledgement) XXX_Size ¶
func (m *Acknowledgement) XXX_Size() int
func (*Acknowledgement) XXX_Unmarshal ¶
func (m *Acknowledgement) XXX_Unmarshal(b []byte) error
type Acknowledgement_Error ¶
type Acknowledgement_Error struct {
Error string `protobuf:"bytes,22,opt,name=error,proto3,oneof" json:"error,omitempty"`
}
func (*Acknowledgement_Error) MarshalTo ¶
func (m *Acknowledgement_Error) MarshalTo(dAtA []byte) (int, error)
func (*Acknowledgement_Error) MarshalToSizedBuffer ¶
func (m *Acknowledgement_Error) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Acknowledgement_Error) Size ¶
func (m *Acknowledgement_Error) Size() (n int)
type Acknowledgement_Result ¶
type Acknowledgement_Result struct {
Result []byte `protobuf:"bytes,21,opt,name=result,proto3,oneof" json:"result,omitempty"`
}
func (*Acknowledgement_Result) MarshalTo ¶
func (m *Acknowledgement_Result) MarshalTo(dAtA []byte) (int, error)
func (*Acknowledgement_Result) MarshalToSizedBuffer ¶
func (m *Acknowledgement_Result) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Acknowledgement_Result) Size ¶
func (m *Acknowledgement_Result) Size() (n int)
type CSMessageResponseType ¶
type CSMessageResponseType int64
const ( SUCCESS CSMessageResponseType = 0 FAILURE CSMessageResponseType = -1 IBC_ERROR CSMessageResponseType = -2 )
type CallServiceMessage ¶
type CallServiceMessage struct { MessageType CallServiceMessageType Payload []byte }
func RlpDecode ¶
func RlpDecode(raw_data []byte) (CallServiceMessage, error)
type CallServiceMessageRequest ¶
type CallServiceMessageRequest struct { From string `json:"from"` To string `json:"to"` SequenceNo uint64 `json:"sequence_no"` Rollback bool `json:"rollback"` Data []byte `json:"data"` }
func (*CallServiceMessageRequest) RlpEncode ¶
func (cr *CallServiceMessageRequest) RlpEncode() ([]byte, error)
type CallServiceMessageResponse ¶
type CallServiceMessageResponse struct { SequenceNo uint64 Code CSMessageResponseType Msg string }
func (*CallServiceMessageResponse) RlpEncode ¶
func (csr *CallServiceMessageResponse) RlpEncode() ([]byte, error)
type CallServiceMessageType ¶
type CallServiceMessageType int64
const ( CallServiceRequest CallServiceMessageType = 0 CallServiceResponse CallServiceMessageType = 1 )
type Channel ¶
type Channel struct { // current state of the channel end State State `protobuf:"varint,1,opt,name=state,proto3,enum=ibc.core.channel.v1.State" json:"state,omitempty"` // whether the channel is ordered or unordered Ordering Order `protobuf:"varint,2,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"` // counterparty channel end Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"` // list of connection identifiers, in order, along which packets sent on // this channel will travel ConnectionHops []string `protobuf:"bytes,4,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"` // opaque channel version, which is agreed upon during the handshake Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` }
Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets.
func (*Channel) Descriptor ¶
func (*Channel) MarshalToSizedBuffer ¶
func (*Channel) ProtoMessage ¶
func (*Channel) ProtoMessage()
func (*Channel) XXX_DiscardUnknown ¶
func (m *Channel) XXX_DiscardUnknown()
func (*Channel) XXX_Marshal ¶
func (*Channel) XXX_Unmarshal ¶
type CosmosLocalnet ¶
type CosmosLocalnet struct { *cosmos.CosmosChain IBCAddresses map[string]string `json:"addresses"` Wallets map[string]ibc.Wallet `json:"wallets"` // contains filtered or unexported fields }
func (*CosmosLocalnet) BackupConfig ¶
func (c *CosmosLocalnet) BackupConfig() ([]byte, error)
func (*CosmosLocalnet) BuildWallet ¶
func (*CosmosLocalnet) BuildWallets ¶
func (*CosmosLocalnet) CheckForTimeout ¶
func (*CosmosLocalnet) Config ¶
func (c *CosmosLocalnet) Config() ibc.ChainConfig
func (*CosmosLocalnet) ConfigureBaseConnection ¶
func (c *CosmosLocalnet) ConfigureBaseConnection(ctx context.Context, connection chains.XCallConnection) (context.Context, error)
func (*CosmosLocalnet) DeployContract ¶
func (*CosmosLocalnet) DeployXCallMockApp ¶
func (c *CosmosLocalnet) DeployXCallMockApp(ctx context.Context, connection chains.XCallConnection) error
func (*CosmosLocalnet) ExecuteCall ¶
func (*CosmosLocalnet) ExecuteContract ¶
func (*CosmosLocalnet) ExecuteRollback ¶
func (*CosmosLocalnet) FindCallMessage ¶
func (*CosmosLocalnet) FindCallResponse ¶
func (*CosmosLocalnet) FindEvent ¶
func (c *CosmosLocalnet) FindEvent(ctx context.Context, startHeight uint64, contract, index string) (*ctypes.ResultEvent, error)
func (*CosmosLocalnet) FindTargetXCallMessage ¶
func (c *CosmosLocalnet) FindTargetXCallMessage(ctx context.Context, target chains.Chain, height uint64, to string) (*chains.XCallResponse, error)
FindTargetXCallMessage returns the request id and the data of the message sent to the target chain
func (*CosmosLocalnet) GetAndFundTestUser ¶
func (*CosmosLocalnet) GetBlockByHeight ¶
func (*CosmosLocalnet) GetChannel ¶
func (c *CosmosLocalnet) GetChannel(ctx context.Context, connectionPrefix int, portID string) (*chantypes.Channel, error)
GetChannel returns the next sequence number for the client
func (*CosmosLocalnet) GetClientName ¶
func (c *CosmosLocalnet) GetClientName(suffix int) string
func (*CosmosLocalnet) GetClientState ¶
func (*CosmosLocalnet) GetClientsCount ¶
func (c *CosmosLocalnet) GetClientsCount(ctx context.Context) (int, error)
GetClientsCount returns the next sequence number for the client
func (*CosmosLocalnet) GetCommonArgs ¶
func (c *CosmosLocalnet) GetCommonArgs() []string
func (*CosmosLocalnet) GetConnectionState ¶
func (c *CosmosLocalnet) GetConnectionState(ctx context.Context, connectionPrefix int) (*conntypes.ConnectionEnd, error)
GetConnectionState returns the next sequence number for the client
func (*CosmosLocalnet) GetIBCAddress ¶
func (c *CosmosLocalnet) GetIBCAddress(key string) string
func (*CosmosLocalnet) GetLastBlock ¶
func (*CosmosLocalnet) GetNextChannelSequence ¶
func (c *CosmosLocalnet) GetNextChannelSequence(ctx context.Context) (int, error)
GetNextChannelSequence returns the next sequence number for the client
func (*CosmosLocalnet) GetNextConnectionSequence ¶
func (c *CosmosLocalnet) GetNextConnectionSequence(ctx context.Context) (int, error)
GetNextConnectionSequence returns the next sequence number for the client
func (*CosmosLocalnet) GetQueryParam ¶
func (c *CosmosLocalnet) GetQueryParam(method string, params map[string]interface{}) Query
func (*CosmosLocalnet) InitEventListener ¶
func (c *CosmosLocalnet) InitEventListener(ctx context.Context, contract string) chains.EventListener
func (*CosmosLocalnet) IsPacketReceived ¶
func (c *CosmosLocalnet) IsPacketReceived(ctx context.Context, params map[string]interface{}, order ibc.Order) bool
IsPacketReceived returns the receipt of the packet sent to the target chain
func (*CosmosLocalnet) OverrideConfig ¶
func (c *CosmosLocalnet) OverrideConfig(key string, value any)
func (*CosmosLocalnet) PauseNode ¶
func (c *CosmosLocalnet) PauseNode(ctx context.Context) error
PauseNode halts a node
func (*CosmosLocalnet) PreGenesis ¶
func (c *CosmosLocalnet) PreGenesis() error
func (*CosmosLocalnet) QueryContract ¶
func (*CosmosLocalnet) RestoreConfig ¶
func (c *CosmosLocalnet) RestoreConfig(backup []byte) error
func (*CosmosLocalnet) SendPacketMockDApp ¶
func (c *CosmosLocalnet) SendPacketMockDApp(ctx context.Context, targetChain chains.Chain, keyName string, params map[string]interface{}) (chains.PacketTransferResponse, error)
func (*CosmosLocalnet) SendPacketXCall ¶
func (*CosmosLocalnet) SetAdminParams ¶
func (*CosmosLocalnet) SetupXCall ¶
func (*CosmosLocalnet) UnpauseNode ¶
func (c *CosmosLocalnet) UnpauseNode(ctx context.Context) error
UnpauseNode restarts a node
func (*CosmosLocalnet) UpdateAdminParams ¶
type CosmosTestnet ¶
type CosmosTestnet struct { Client rpcclient.Client ChainID string // contains filtered or unexported fields }
func (*CosmosTestnet) DeployXCallMockApp ¶
func (it *CosmosTestnet) DeployXCallMockApp(ctx context.Context, connection chains.XCallConnection) error
func (*CosmosTestnet) GetIBCAddress ¶
func (c *CosmosTestnet) GetIBCAddress(key string) string
func (*CosmosTestnet) SetupXCall ¶
func (c *CosmosTestnet) SetupXCall(ctx context.Context, portId, keyName string) error
type Counterparty ¶
type Counterparty struct { // port on the counterparty chain which owns the other end of the channel. PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` // channel end on the counterparty chain ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` }
Counterparty defines a channel end counterparty
func (*Counterparty) Descriptor ¶
func (*Counterparty) Descriptor() ([]byte, []int)
func (*Counterparty) Marshal ¶
func (m *Counterparty) Marshal() (dAtA []byte, err error)
func (*Counterparty) MarshalToSizedBuffer ¶
func (m *Counterparty) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Counterparty) ProtoMessage ¶
func (*Counterparty) ProtoMessage()
func (*Counterparty) Reset ¶
func (m *Counterparty) Reset()
func (*Counterparty) Size ¶
func (m *Counterparty) Size() (n int)
func (*Counterparty) String ¶
func (m *Counterparty) String() string
func (*Counterparty) Unmarshal ¶
func (m *Counterparty) Unmarshal(dAtA []byte) error
func (*Counterparty) XXX_DiscardUnknown ¶
func (m *Counterparty) XXX_DiscardUnknown()
func (*Counterparty) XXX_Marshal ¶
func (m *Counterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Counterparty) XXX_Merge ¶
func (m *Counterparty) XXX_Merge(src proto.Message)
func (*Counterparty) XXX_Size ¶
func (m *Counterparty) XXX_Size() int
func (*Counterparty) XXX_Unmarshal ¶
func (m *Counterparty) XXX_Unmarshal(b []byte) error
type GetProtocolFee ¶
type GetProtocolFee struct{}
type IdentifiedChannel ¶
type IdentifiedChannel struct { // current state of the channel end State State `protobuf:"varint,1,opt,name=state,proto3,enum=ibc.core.channel.v1.State" json:"state,omitempty"` // whether the channel is ordered or unordered Ordering Order `protobuf:"varint,2,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"` // counterparty channel end Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"` // list of connection identifiers, in order, along which packets sent on // this channel will travel ConnectionHops []string `protobuf:"bytes,4,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"` // opaque channel version, which is agreed upon during the handshake Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` // port identifier PortId string `protobuf:"bytes,6,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` // channel identifier ChannelId string `protobuf:"bytes,7,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` }
IdentifiedChannel defines a channel with additional port and channel identifier fields.
func (*IdentifiedChannel) Descriptor ¶
func (*IdentifiedChannel) Descriptor() ([]byte, []int)
func (*IdentifiedChannel) Marshal ¶
func (m *IdentifiedChannel) Marshal() (dAtA []byte, err error)
func (*IdentifiedChannel) MarshalTo ¶
func (m *IdentifiedChannel) MarshalTo(dAtA []byte) (int, error)
func (*IdentifiedChannel) MarshalToSizedBuffer ¶
func (m *IdentifiedChannel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*IdentifiedChannel) ProtoMessage ¶
func (*IdentifiedChannel) ProtoMessage()
func (*IdentifiedChannel) Reset ¶
func (m *IdentifiedChannel) Reset()
func (*IdentifiedChannel) Size ¶
func (m *IdentifiedChannel) Size() (n int)
func (*IdentifiedChannel) String ¶
func (m *IdentifiedChannel) String() string
func (*IdentifiedChannel) Unmarshal ¶
func (m *IdentifiedChannel) Unmarshal(dAtA []byte) error
func (*IdentifiedChannel) XXX_DiscardUnknown ¶
func (m *IdentifiedChannel) XXX_DiscardUnknown()
func (*IdentifiedChannel) XXX_Marshal ¶
func (m *IdentifiedChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IdentifiedChannel) XXX_Merge ¶
func (m *IdentifiedChannel) XXX_Merge(src proto.Message)
func (*IdentifiedChannel) XXX_Size ¶
func (m *IdentifiedChannel) XXX_Size() int
func (*IdentifiedChannel) XXX_Unmarshal ¶
func (m *IdentifiedChannel) XXX_Unmarshal(b []byte) error
type MockAppInit ¶
type Order ¶
type Order int32
Order defines if a channel is ORDERED or UNORDERED
func (Order) EnumDescriptor ¶
type Packet ¶
type Packet struct { // number corresponds to the order of sends and receives, where a Packet // with an earlier sequence number must be sent and received before a Packet // with a later sequence number. Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` // identifies the port on the sending chain. SourcePort string `protobuf:"bytes,2,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` // identifies the channel end on the sending chain. SourceChannel string `protobuf:"bytes,3,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"` // identifies the port on the receiving chain. DestinationPort string `protobuf:"bytes,4,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` // identifies the channel end on the receiving chain. DestinationChannel string `protobuf:"bytes,5,opt,name=destination_channel,json=destinationChannel,proto3" json:"destination_channel,omitempty"` // actual opaque bytes transferred directly to the application module Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // block height after which the packet times out TimeoutHeight types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height"` // block timestamp (in nanoseconds) after which the packet times out TimeoutTimestamp uint64 `protobuf:"varint,8,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` }
Packet defines a type that carries data across different chains through IBC
func (*Packet) Descriptor ¶
func (*Packet) MarshalToSizedBuffer ¶
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) XXX_DiscardUnknown ¶
func (m *Packet) XXX_DiscardUnknown()
func (*Packet) XXX_Marshal ¶
func (*Packet) XXX_Unmarshal ¶
type PacketId ¶
type PacketId struct { // channel port identifier PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` // channel unique identifier ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // packet sequence Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` }
PacketId is an identifer for a unique Packet Source chains refer to packets by source port/channel Destination chains refer to packets by destination port/channel
func (*PacketId) Descriptor ¶
func (*PacketId) MarshalToSizedBuffer ¶
func (*PacketId) ProtoMessage ¶
func (*PacketId) ProtoMessage()
func (*PacketId) XXX_DiscardUnknown ¶
func (m *PacketId) XXX_DiscardUnknown()
func (*PacketId) XXX_Marshal ¶
func (*PacketId) XXX_Unmarshal ¶
type PacketState ¶
type PacketState struct { // channel port identifier. PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` // channel unique identifier. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // packet sequence. Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` // embedded data that represents packet state. Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` }
PacketState defines the generic type necessary to retrieve and store packet commitments, acknowledgements, and receipts. Caller is responsible for knowing the context necessary to interpret this state as a commitment, acknowledgement, or a receipt.
func (*PacketState) Descriptor ¶
func (*PacketState) Descriptor() ([]byte, []int)
func (*PacketState) Marshal ¶
func (m *PacketState) Marshal() (dAtA []byte, err error)
func (*PacketState) MarshalToSizedBuffer ¶
func (m *PacketState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PacketState) ProtoMessage ¶
func (*PacketState) ProtoMessage()
func (*PacketState) Reset ¶
func (m *PacketState) Reset()
func (*PacketState) Size ¶
func (m *PacketState) Size() (n int)
func (*PacketState) String ¶
func (m *PacketState) String() string
func (*PacketState) Unmarshal ¶
func (m *PacketState) Unmarshal(dAtA []byte) error
func (*PacketState) XXX_DiscardUnknown ¶
func (m *PacketState) XXX_DiscardUnknown()
func (*PacketState) XXX_Marshal ¶
func (m *PacketState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PacketState) XXX_Merge ¶
func (m *PacketState) XXX_Merge(src proto.Message)
func (*PacketState) XXX_Size ¶
func (m *PacketState) XXX_Size() int
func (*PacketState) XXX_Unmarshal ¶
func (m *PacketState) XXX_Unmarshal(b []byte) error
type Query ¶
type Query struct { GetClientState *map[string]interface{} `json:"get_client_state,omitempty"` GetAdmin *GetAdmin `json:"get_admin,omitempty"` GetProtocolFee *GetProtocolFee `json:"get_protocol_fee,omitempty"` GetNextClientSequence *map[string]interface{} `json:"get_next_client_sequence,omitempty"` HasPacketReceipt *map[string]interface{} `json:"has_packet_receipt,omitempty"` GetNextSequenceReceive *map[string]interface{} `json:"get_next_sequence_receive,omitempty"` GetConnection *map[string]interface{} `json:"get_connection,omitempty"` GetChannel *map[string]interface{} `json:"get_channel,omitempty"` GetNextConnectionSequence *map[string]interface{} `json:"get_next_connection_sequence,omitempty"` GetNextChannelSequence *map[string]interface{} `json:"get_next_channel_sequence,omitempty"` }
type Result ¶
type Result struct { NodeInfo struct { ProtocolVersion struct { P2P string `json:"p2p"` Block string `json:"block"` App string `json:"app"` } `json:"protocol_version"` ID string `json:"id"` ListenAddr string `json:"listen_addr"` Network string `json:"network"` Version string `json:"version"` Channels string `json:"channels"` Moniker string `json:"moniker"` Other struct { TxIndex string `json:"tx_index"` RPCAddress string `json:"rpc_address"` } `json:"other"` } `json:"NodeInfo"` SyncInfo struct { LatestBlockHash string `json:"latest_block_hash"` LatestAppHash string `json:"latest_app_hash"` LatestBlockHeight string `json:"latest_block_height"` LatestBlockTime time.Time `json:"latest_block_time"` EarliestBlockHash string `json:"earliest_block_hash"` EarliestAppHash string `json:"earliest_app_hash"` EarliestBlockHeight string `json:"earliest_block_height"` EarliestBlockTime time.Time `json:"earliest_block_time"` CatchingUp bool `json:"catching_up"` } `json:"SyncInfo"` ValidatorInfo struct { Address string `json:"Address"` PubKey struct { Type string `json:"type"` Value string `json:"value"` } `json:"PubKey"` VotingPower string `json:"VotingPower"` } `json:"ValidatorInfo"` }
type SetAdmin ¶
type SetAdmin struct { SetAdmin struct { Address string `json:"address"` } `json:"set_admin"` }
type State ¶
type State int32
State defines if a channel is in one of the following states: CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED.
const ( // Default State UNINITIALIZED State = 0 // A channel has just started the opening handshake. INIT State = 1 // A channel has acknowledged the handshake step on the counterparty chain. TRYOPEN State = 2 // A channel has completed the handshake. Open channels are // ready to send and receive packets. OPEN State = 3 // A channel has been closed and can no longer be used to send or receive // packets. CLOSED State = 4 )
func (State) EnumDescriptor ¶
type TxResul ¶
type TxResul struct { Height string `json:"height"` Txhash string `json:"txhash"` Codespace string `json:"codespace"` Code int `json:"code"` Data string `json:"data"` RawLog string `json:"raw_log"` Logs []interface{} `json:"logs"` Info string `json:"info"` GasWanted string `json:"gas_wanted"` GasUsed string `json:"gas_used"` Tx interface{} `json:"tx"` Timestamp string `json:"timestamp"` Events []struct { Type string `json:"type"` Attributes []struct { Key string `json:"key"` Value string `json:"value"` Index bool `json:"index"` } `json:"attributes"` } `json:"events"` }
type UpdateAdmin ¶
type UpdateAdmin struct { UpdateAdmin struct { Address string `json:"address"` } `json:"update_admin"` }
type WebSocketListener ¶
type WebSocketListener struct { Shutdown chan struct{} Events []map[string][]string // contains filtered or unexported fields }
func NewCosmosEventListener ¶
func NewCosmosEventListener(c *CosmosLocalnet, contract string, timeout time.Duration) *WebSocketListener
func (*WebSocketListener) Start ¶
func (w *WebSocketListener) Start()
func (*WebSocketListener) Stop ¶
func (w *WebSocketListener) Stop()