Documentation
¶
Index ¶
- Constants
- Variables
- func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte) ([]sdk.Msg, error)
- func GenerateAddress(moduleAccAddr sdk.AccAddress, portID string) sdk.AccAddress
- func GeneratePortID(owner, connectionID, counterpartyConnectionID string) (string, error)
- func KeyActiveChannel(portID string) []byte
- func KeyOwnerAccount(portID string) []byte
- func KeyPort(portID string) []byte
- func NewAppVersion(versionPrefix, accAddr string) string
- func ParseAddressFromVersion(version string) (string, error)
- func ParseControllerConnSequence(portID string) (uint64, error)
- func ParseHostConnSequence(portID string) (uint64, error)
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []sdk.Msg) (bz []byte, err error)
- func ValidateAccountAddress(addr string) error
- func ValidateVersion(version string) error
- type AccountKeeper
- type ActiveChannel
- func (*ActiveChannel) Descriptor() ([]byte, []int)
- func (m *ActiveChannel) GetChannelId() string
- func (m *ActiveChannel) GetPortId() string
- func (m *ActiveChannel) Marshal() (dAtA []byte, err error)
- func (m *ActiveChannel) MarshalTo(dAtA []byte) (int, error)
- func (m *ActiveChannel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ActiveChannel) ProtoMessage()
- func (m *ActiveChannel) Reset()
- func (m *ActiveChannel) Size() (n int)
- func (m *ActiveChannel) String() string
- func (m *ActiveChannel) Unmarshal(dAtA []byte) error
- func (m *ActiveChannel) XXX_DiscardUnknown()
- func (m *ActiveChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ActiveChannel) XXX_Merge(src proto.Message)
- func (m *ActiveChannel) XXX_Size() int
- func (m *ActiveChannel) XXX_Unmarshal(b []byte) error
- type ChannelKeeper
- type ControllerGenesisState
- func (*ControllerGenesisState) Descriptor() ([]byte, []int)
- func (m *ControllerGenesisState) GetActiveChannels() []ActiveChannel
- func (m *ControllerGenesisState) GetInterchainAccounts() []RegisteredInterchainAccount
- func (m *ControllerGenesisState) GetParams() types.Params
- func (m *ControllerGenesisState) GetPorts() []string
- func (m *ControllerGenesisState) Marshal() (dAtA []byte, err error)
- func (m *ControllerGenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *ControllerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ControllerGenesisState) ProtoMessage()
- func (m *ControllerGenesisState) Reset()
- func (m *ControllerGenesisState) Size() (n int)
- func (m *ControllerGenesisState) String() string
- func (m *ControllerGenesisState) Unmarshal(dAtA []byte) error
- func (gs ControllerGenesisState) Validate() error
- func (m *ControllerGenesisState) XXX_DiscardUnknown()
- func (m *ControllerGenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ControllerGenesisState) XXX_Merge(src proto.Message)
- func (m *ControllerGenesisState) XXX_Size() int
- func (m *ControllerGenesisState) XXX_Unmarshal(b []byte) error
- type CosmosTx
- func (*CosmosTx) Descriptor() ([]byte, []int)
- func (ct CosmosTx) GetBytes() []byte
- func (m *CosmosTx) GetMessages() []*types.Any
- func (m *CosmosTx) Marshal() (dAtA []byte, err error)
- func (m *CosmosTx) MarshalTo(dAtA []byte) (int, error)
- func (m *CosmosTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CosmosTx) ProtoMessage()
- func (m *CosmosTx) Reset()
- func (m *CosmosTx) Size() (n int)
- func (m *CosmosTx) String() string
- func (m *CosmosTx) Unmarshal(dAtA []byte) error
- func (ct CosmosTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (m *CosmosTx) XXX_DiscardUnknown()
- func (m *CosmosTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CosmosTx) XXX_Merge(src proto.Message)
- func (m *CosmosTx) XXX_Size() int
- func (m *CosmosTx) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetControllerGenesisState() ControllerGenesisState
- func (m *GenesisState) GetHostGenesisState() HostGenesisState
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type HostGenesisState
- func (*HostGenesisState) Descriptor() ([]byte, []int)
- func (m *HostGenesisState) GetActiveChannels() []ActiveChannel
- func (m *HostGenesisState) GetInterchainAccounts() []RegisteredInterchainAccount
- func (m *HostGenesisState) GetParams() types1.Params
- func (m *HostGenesisState) GetPort() string
- func (m *HostGenesisState) Marshal() (dAtA []byte, err error)
- func (m *HostGenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *HostGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HostGenesisState) ProtoMessage()
- func (m *HostGenesisState) Reset()
- func (m *HostGenesisState) Size() (n int)
- func (m *HostGenesisState) String() string
- func (m *HostGenesisState) Unmarshal(dAtA []byte) error
- func (gs HostGenesisState) Validate() error
- func (m *HostGenesisState) XXX_DiscardUnknown()
- func (m *HostGenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HostGenesisState) XXX_Merge(src proto.Message)
- func (m *HostGenesisState) XXX_Size() int
- func (m *HostGenesisState) XXX_Unmarshal(b []byte) error
- type ICS4Wrapper
- type InterchainAccount
- func (*InterchainAccount) Descriptor() ([]byte, []int)
- func (m *InterchainAccount) Marshal() (dAtA []byte, err error)
- func (ia InterchainAccount) MarshalJSON() ([]byte, error)
- func (m *InterchainAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *InterchainAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (ia InterchainAccount) MarshalYAML() ([]byte, error)
- func (*InterchainAccount) ProtoMessage()
- func (m *InterchainAccount) Reset()
- func (ia InterchainAccount) SetPubKey(pubKey crypto.PubKey) error
- func (ia InterchainAccount) SetSequence(seq uint64) error
- func (m *InterchainAccount) Size() (n int)
- func (ia InterchainAccount) String() string
- func (m *InterchainAccount) Unmarshal(dAtA []byte) error
- func (ia *InterchainAccount) UnmarshalJSON(bz []byte) error
- func (ia InterchainAccount) Validate() error
- func (m *InterchainAccount) XXX_DiscardUnknown()
- func (m *InterchainAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InterchainAccount) XXX_Merge(src proto.Message)
- func (m *InterchainAccount) XXX_Size() int
- func (m *InterchainAccount) XXX_Unmarshal(b []byte) error
- type InterchainAccountI
- type InterchainAccountPacketData
- func (*InterchainAccountPacketData) Descriptor() ([]byte, []int)
- func (iapd InterchainAccountPacketData) GetBytes() []byte
- func (m *InterchainAccountPacketData) GetData() []byte
- func (m *InterchainAccountPacketData) GetMemo() string
- func (m *InterchainAccountPacketData) GetType() Type
- func (m *InterchainAccountPacketData) Marshal() (dAtA []byte, err error)
- func (m *InterchainAccountPacketData) MarshalTo(dAtA []byte) (int, error)
- func (m *InterchainAccountPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InterchainAccountPacketData) ProtoMessage()
- func (m *InterchainAccountPacketData) Reset()
- func (m *InterchainAccountPacketData) Size() (n int)
- func (m *InterchainAccountPacketData) String() string
- func (m *InterchainAccountPacketData) Unmarshal(dAtA []byte) error
- func (iapd InterchainAccountPacketData) ValidateBasic() error
- func (m *InterchainAccountPacketData) XXX_DiscardUnknown()
- func (m *InterchainAccountPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InterchainAccountPacketData) XXX_Merge(src proto.Message)
- func (m *InterchainAccountPacketData) XXX_Size() int
- func (m *InterchainAccountPacketData) XXX_Unmarshal(b []byte) error
- type PortKeeper
- type RegisteredInterchainAccount
- func (*RegisteredInterchainAccount) Descriptor() ([]byte, []int)
- func (m *RegisteredInterchainAccount) GetAccountAddress() string
- func (m *RegisteredInterchainAccount) GetPortId() string
- func (m *RegisteredInterchainAccount) Marshal() (dAtA []byte, err error)
- func (m *RegisteredInterchainAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *RegisteredInterchainAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RegisteredInterchainAccount) ProtoMessage()
- func (m *RegisteredInterchainAccount) Reset()
- func (m *RegisteredInterchainAccount) Size() (n int)
- func (m *RegisteredInterchainAccount) String() string
- func (m *RegisteredInterchainAccount) Unmarshal(dAtA []byte) error
- func (m *RegisteredInterchainAccount) XXX_DiscardUnknown()
- func (m *RegisteredInterchainAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisteredInterchainAccount) XXX_Merge(src proto.Message)
- func (m *RegisteredInterchainAccount) XXX_Size() int
- func (m *RegisteredInterchainAccount) XXX_Unmarshal(b []byte) error
- type Type
Constants ¶
const ( // ModuleName defines the interchain accounts module name ModuleName = "interchainaccounts" // VersionPrefix defines the current version for interchain accounts VersionPrefix = "ics27-1" // PortID is the default port id that the interchain accounts module binds to PortID = "interchain-account" // StoreKey is the store key string for interchain accounts StoreKey = ModuleName // RouterKey is the message route for interchain accounts RouterKey = ModuleName // QuerierRoute is the querier route for interchain accounts QuerierRoute = ModuleName // Delimiter is the delimiter used for the interchain accounts version string Delimiter = "." )
const ( // ControllerPortFormat is the expected port identifier format to which controller chains must conform // See (TODO: Link to spec when updated) ControllerPortFormat = "<app-version>.<controller-conn-seq>.<host-conn-seq>.<owner>" )
const MaxMemoCharLength = 256
MaxMemoCharLength defines the maximum length for the InterchainAccountPacketData memo field
Variables ¶
var ( ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") )
var ( ErrUnknownDataType = sdkerrors.Register(ModuleName, 2, "unknown data type") ErrAccountAlreadyExist = sdkerrors.Register(ModuleName, 3, "account already exist") ErrPortAlreadyBound = sdkerrors.Register(ModuleName, 4, "port is already bound") ErrInvalidChannelFlow = sdkerrors.Register(ModuleName, 5, "invalid message sent to channel end") ErrInvalidOutgoingData = sdkerrors.Register(ModuleName, 6, "invalid outgoing data") ErrInvalidRoute = sdkerrors.Register(ModuleName, 7, "invalid route") ErrInterchainAccountNotFound = sdkerrors.Register(ModuleName, 8, "interchain account not found") ErrInterchainAccountAlreadySet = sdkerrors.Register(ModuleName, 9, "interchain account is already set") ErrActiveChannelNotFound = sdkerrors.Register(ModuleName, 10, "no active channel for this owner") ErrInvalidVersion = sdkerrors.Register(ModuleName, 11, "invalid interchain accounts version") ErrInvalidAccountAddress = sdkerrors.Register(ModuleName, 12, "invalid account address") ErrUnsupported = sdkerrors.Register(ModuleName, 13, "interchain account does not support this action") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // ActiveChannelKeyPrefix defines the key prefix used to store active channels ActiveChannelKeyPrefix = "activeChannel" // OwnerKeyPrefix defines the key prefix used to store interchain accounts OwnerKeyPrefix = "owner" // PortKeyPrefix defines the key prefix used to store ports PortKeyPrefix = "port" )
var ( ErrInvalidLengthPacket = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPacket = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group") )
var DefaultMaxAddrLength = 128
DefaultMaxAddrLength defines the default maximum character length used in validation of addresses
var IsValidAddr = regexp.MustCompile("^[a-zA-Z0-9]*$").MatchString
IsValidAddr defines a regular expression to check if the provided string consists of strictly alphanumeric characters
var ( // ModuleCdc references the global interchain accounts module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding. // // The actual codec used for serialization should be provided to interchain accounts and // defined at the application level. ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) )
var Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "TYPE_EXECUTE_TX",
}
var Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"TYPE_EXECUTE_TX": 1,
}
Functions ¶
func DeserializeCosmosTx ¶
DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes into a slice of sdk.Msg's.
func GenerateAddress ¶
func GenerateAddress(moduleAccAddr sdk.AccAddress, portID string) sdk.AccAddress
GenerateAddress returns an sdk.AccAddress derived using the provided module account address and port identifier. The sdk.AccAddress returned is a sub-address of the module account, using the controller chain's port identifier as the derivation key
func GeneratePortID ¶
GeneratePortID generates an interchain accounts controller port identifier for the provided owner in the following format:
'ics-27-<connectionSequence>-<counterpartyConnectionSequence>-<owner-address>' https://github.com/seantking/ibc/tree/sean/ics-27-updates/spec/app/ics-027-interchain-accounts#registering--controlling-flows TODO: update link to spec
func KeyActiveChannel ¶
KeyActiveChannel creates and returns a new key used for active channels store operations
func KeyOwnerAccount ¶
KeyOwnerAccount creates and returns a new key used for interchain account store operations
func NewAppVersion ¶
NewVersion returns a complete version string in the format: VersionPrefix + Delimter + AccAddress
func ParseAddressFromVersion ¶
ParseAddressFromVersion attempts to extract the associated account address from the provided version string
func ParseControllerConnSequence ¶
ParseControllerConnSequence attempts to parse the controller connection sequence from the provided port identifier The port identifier must match the controller chain format outlined in (TODO: link spec), otherwise an empty string is returned
func ParseHostConnSequence ¶
ParseHostConnSequence attempts to parse the host connection sequence from the provided port identifier The port identifier must match the controller chain format outlined in (TODO: link spec), otherwise an empty string is returned
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the concrete InterchainAccount implementation against the associated x/auth AccountI and GenesisAccount interfaces
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the account interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization
func SerializeCosmosTx ¶
SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx bytes are returned.
func ValidateAccountAddress ¶
ValidateAccountAddress performs basic validation of interchain account addresses, enforcing constraints on address length and character set
func ValidateVersion ¶
ValidateVersion performs basic validation of the provided ics27 version string. An ics27 version string may include an optional account address as per [TODO: Add spec when available] ValidateVersion first attempts to split the version string using the standard delimiter, then asserts a supported version prefix is included, followed by additional checks which enforce constraints on the account address.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { NewAccount(ctx sdk.Context, acc authtypes.AccountI) authtypes.AccountI GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI SetAccount(ctx sdk.Context, acc authtypes.AccountI) GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI GetModuleAddress(name string) sdk.AccAddress }
AccountKeeper defines the expected account keeper
type ActiveChannel ¶
type ActiveChannel struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` }
ActiveChannel contains a pairing of port ID and channel ID for an active interchain accounts channel
func (*ActiveChannel) Descriptor ¶
func (*ActiveChannel) Descriptor() ([]byte, []int)
func (*ActiveChannel) GetChannelId ¶
func (m *ActiveChannel) GetChannelId() string
func (*ActiveChannel) GetPortId ¶
func (m *ActiveChannel) GetPortId() string
func (*ActiveChannel) Marshal ¶
func (m *ActiveChannel) Marshal() (dAtA []byte, err error)
func (*ActiveChannel) MarshalToSizedBuffer ¶
func (m *ActiveChannel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ActiveChannel) ProtoMessage ¶
func (*ActiveChannel) ProtoMessage()
func (*ActiveChannel) Reset ¶
func (m *ActiveChannel) Reset()
func (*ActiveChannel) Size ¶
func (m *ActiveChannel) Size() (n int)
func (*ActiveChannel) String ¶
func (m *ActiveChannel) String() string
func (*ActiveChannel) Unmarshal ¶
func (m *ActiveChannel) Unmarshal(dAtA []byte) error
func (*ActiveChannel) XXX_DiscardUnknown ¶
func (m *ActiveChannel) XXX_DiscardUnknown()
func (*ActiveChannel) XXX_Marshal ¶
func (m *ActiveChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ActiveChannel) XXX_Merge ¶
func (m *ActiveChannel) XXX_Merge(src proto.Message)
func (*ActiveChannel) XXX_Size ¶
func (m *ActiveChannel) XXX_Size() int
func (*ActiveChannel) XXX_Unmarshal ¶
func (m *ActiveChannel) XXX_Unmarshal(b []byte) error
type ChannelKeeper ¶
type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) GetConnection(ctx sdk.Context, connectionID string) (ibcexported.ConnectionI, error) }
ChannelKeeper defines the expected IBC channel keeper
type ControllerGenesisState ¶
type ControllerGenesisState struct { ActiveChannels []ActiveChannel `protobuf:"bytes,1,rep,name=active_channels,json=activeChannels,proto3" json:"active_channels" yaml:"active_channels"` InterchainAccounts []RegisteredInterchainAccount `` /* 132-byte string literal not displayed */ Ports []string `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"` Params types.Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params"` }
ControllerGenesisState defines the interchain accounts controller genesis state
func DefaultControllerGenesis ¶
func DefaultControllerGenesis() ControllerGenesisState
DefaultControllerGenesis creates and returns the default interchain accounts ControllerGenesisState
func NewControllerGenesisState ¶
func NewControllerGenesisState(channels []ActiveChannel, accounts []RegisteredInterchainAccount, ports []string, controllerParams controllertypes.Params) ControllerGenesisState
NewControllerGenesisState creates a returns a new ControllerGenesisState instance
func (*ControllerGenesisState) Descriptor ¶
func (*ControllerGenesisState) Descriptor() ([]byte, []int)
func (*ControllerGenesisState) GetActiveChannels ¶
func (m *ControllerGenesisState) GetActiveChannels() []ActiveChannel
func (*ControllerGenesisState) GetInterchainAccounts ¶
func (m *ControllerGenesisState) GetInterchainAccounts() []RegisteredInterchainAccount
func (*ControllerGenesisState) GetParams ¶
func (m *ControllerGenesisState) GetParams() types.Params
func (*ControllerGenesisState) GetPorts ¶
func (m *ControllerGenesisState) GetPorts() []string
func (*ControllerGenesisState) Marshal ¶
func (m *ControllerGenesisState) Marshal() (dAtA []byte, err error)
func (*ControllerGenesisState) MarshalTo ¶
func (m *ControllerGenesisState) MarshalTo(dAtA []byte) (int, error)
func (*ControllerGenesisState) MarshalToSizedBuffer ¶
func (m *ControllerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ControllerGenesisState) ProtoMessage ¶
func (*ControllerGenesisState) ProtoMessage()
func (*ControllerGenesisState) Reset ¶
func (m *ControllerGenesisState) Reset()
func (*ControllerGenesisState) Size ¶
func (m *ControllerGenesisState) Size() (n int)
func (*ControllerGenesisState) String ¶
func (m *ControllerGenesisState) String() string
func (*ControllerGenesisState) Unmarshal ¶
func (m *ControllerGenesisState) Unmarshal(dAtA []byte) error
func (ControllerGenesisState) Validate ¶
func (gs ControllerGenesisState) Validate() error
Validate performs basic validation of the ControllerGenesisState
func (*ControllerGenesisState) XXX_DiscardUnknown ¶
func (m *ControllerGenesisState) XXX_DiscardUnknown()
func (*ControllerGenesisState) XXX_Marshal ¶
func (m *ControllerGenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ControllerGenesisState) XXX_Merge ¶
func (m *ControllerGenesisState) XXX_Merge(src proto.Message)
func (*ControllerGenesisState) XXX_Size ¶
func (m *ControllerGenesisState) XXX_Size() int
func (*ControllerGenesisState) XXX_Unmarshal ¶
func (m *ControllerGenesisState) XXX_Unmarshal(b []byte) error
type CosmosTx ¶
type CosmosTx struct {
Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
}
CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain.
func (*CosmosTx) Descriptor ¶
func (*CosmosTx) GetMessages ¶
func (*CosmosTx) MarshalToSizedBuffer ¶
func (*CosmosTx) ProtoMessage ¶
func (*CosmosTx) ProtoMessage()
func (CosmosTx) UnpackInterfaces ¶
func (ct CosmosTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*CosmosTx) XXX_DiscardUnknown ¶
func (m *CosmosTx) XXX_DiscardUnknown()
func (*CosmosTx) XXX_Marshal ¶
func (*CosmosTx) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct { ControllerGenesisState ControllerGenesisState `` /* 151-byte string literal not displayed */ HostGenesisState HostGenesisState `` /* 127-byte string literal not displayed */ }
GenesisState defines the interchain accounts genesis state
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis creates and returns the interchain accounts GenesisState
func NewGenesisState ¶
func NewGenesisState(controllerGenesisState ControllerGenesisState, hostGenesisState HostGenesisState) *GenesisState
NewGenesisState creates and returns a new GenesisState instance from the provided controller and host genesis state types
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetControllerGenesisState ¶
func (m *GenesisState) GetControllerGenesisState() ControllerGenesisState
func (*GenesisState) GetHostGenesisState ¶
func (m *GenesisState) GetHostGenesisState() HostGenesisState
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic validation of the interchain accounts GenesisState
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type HostGenesisState ¶
type HostGenesisState struct { ActiveChannels []ActiveChannel `protobuf:"bytes,1,rep,name=active_channels,json=activeChannels,proto3" json:"active_channels" yaml:"active_channels"` InterchainAccounts []RegisteredInterchainAccount `` /* 132-byte string literal not displayed */ Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` Params types1.Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params"` }
HostGenesisState defines the interchain accounts host genesis state
func DefaultHostGenesis ¶
func DefaultHostGenesis() HostGenesisState
DefaultHostGenesis creates and returns the default interchain accounts HostGenesisState
func NewHostGenesisState ¶
func NewHostGenesisState(channels []ActiveChannel, accounts []RegisteredInterchainAccount, port string, hostParams hosttypes.Params) HostGenesisState
NewHostGenesisState creates a returns a new HostGenesisState instance
func (*HostGenesisState) Descriptor ¶
func (*HostGenesisState) Descriptor() ([]byte, []int)
func (*HostGenesisState) GetActiveChannels ¶
func (m *HostGenesisState) GetActiveChannels() []ActiveChannel
func (*HostGenesisState) GetInterchainAccounts ¶
func (m *HostGenesisState) GetInterchainAccounts() []RegisteredInterchainAccount
func (*HostGenesisState) GetParams ¶
func (m *HostGenesisState) GetParams() types1.Params
func (*HostGenesisState) GetPort ¶
func (m *HostGenesisState) GetPort() string
func (*HostGenesisState) Marshal ¶
func (m *HostGenesisState) Marshal() (dAtA []byte, err error)
func (*HostGenesisState) MarshalToSizedBuffer ¶
func (m *HostGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HostGenesisState) ProtoMessage ¶
func (*HostGenesisState) ProtoMessage()
func (*HostGenesisState) Reset ¶
func (m *HostGenesisState) Reset()
func (*HostGenesisState) Size ¶
func (m *HostGenesisState) Size() (n int)
func (*HostGenesisState) String ¶
func (m *HostGenesisState) String() string
func (*HostGenesisState) Unmarshal ¶
func (m *HostGenesisState) Unmarshal(dAtA []byte) error
func (HostGenesisState) Validate ¶
func (gs HostGenesisState) Validate() error
Validate performs basic validation of the HostGenesisState
func (*HostGenesisState) XXX_DiscardUnknown ¶
func (m *HostGenesisState) XXX_DiscardUnknown()
func (*HostGenesisState) XXX_Marshal ¶
func (m *HostGenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HostGenesisState) XXX_Merge ¶
func (m *HostGenesisState) XXX_Merge(src proto.Message)
func (*HostGenesisState) XXX_Size ¶
func (m *HostGenesisState) XXX_Size() int
func (*HostGenesisState) XXX_Unmarshal ¶
func (m *HostGenesisState) XXX_Unmarshal(b []byte) error
type ICS4Wrapper ¶
type ICS4Wrapper interface {
SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error
}
ICS4Wrapper defines the expected ICS4Wrapper for middleware
type InterchainAccount ¶
type InterchainAccount struct { *types.BaseAccount `` /* 136-byte string literal not displayed */ AccountOwner string `protobuf:"bytes,2,opt,name=account_owner,json=accountOwner,proto3" json:"account_owner,omitempty" yaml:"account_owner"` }
An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain
func NewInterchainAccount ¶
func NewInterchainAccount(ba *authtypes.BaseAccount, accountOwner string) *InterchainAccount
NewInterchainAccount creates and returns a new InterchainAccount type
func (*InterchainAccount) Descriptor ¶
func (*InterchainAccount) Descriptor() ([]byte, []int)
func (*InterchainAccount) Marshal ¶
func (m *InterchainAccount) Marshal() (dAtA []byte, err error)
func (InterchainAccount) MarshalJSON ¶
func (ia InterchainAccount) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON representation of the InterchainAccount
func (*InterchainAccount) MarshalTo ¶
func (m *InterchainAccount) MarshalTo(dAtA []byte) (int, error)
func (*InterchainAccount) MarshalToSizedBuffer ¶
func (m *InterchainAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (InterchainAccount) MarshalYAML ¶
func (ia InterchainAccount) MarshalYAML() ([]byte, error)
MarshalYAML returns the YAML representation of the InterchainAccount
func (*InterchainAccount) ProtoMessage ¶
func (*InterchainAccount) ProtoMessage()
func (*InterchainAccount) Reset ¶
func (m *InterchainAccount) Reset()
func (InterchainAccount) SetPubKey ¶
func (ia InterchainAccount) SetPubKey(pubKey crypto.PubKey) error
SetPubKey implements the authtypes.AccountI interface
func (InterchainAccount) SetSequence ¶
func (ia InterchainAccount) SetSequence(seq uint64) error
SetSequence implements the authtypes.AccountI interface
func (*InterchainAccount) Size ¶
func (m *InterchainAccount) Size() (n int)
func (InterchainAccount) String ¶
func (ia InterchainAccount) String() string
String returns a string representation of the InterchainAccount
func (*InterchainAccount) Unmarshal ¶
func (m *InterchainAccount) Unmarshal(dAtA []byte) error
func (*InterchainAccount) UnmarshalJSON ¶
func (ia *InterchainAccount) UnmarshalJSON(bz []byte) error
UnmarshalJSON unmarshals raw JSON bytes into the InterchainAccount
func (InterchainAccount) Validate ¶
func (ia InterchainAccount) Validate() error
Validate implements basic validation of the InterchainAccount
func (*InterchainAccount) XXX_DiscardUnknown ¶
func (m *InterchainAccount) XXX_DiscardUnknown()
func (*InterchainAccount) XXX_Marshal ¶
func (m *InterchainAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InterchainAccount) XXX_Merge ¶
func (m *InterchainAccount) XXX_Merge(src proto.Message)
func (*InterchainAccount) XXX_Size ¶
func (m *InterchainAccount) XXX_Size() int
func (*InterchainAccount) XXX_Unmarshal ¶
func (m *InterchainAccount) XXX_Unmarshal(b []byte) error
type InterchainAccountI ¶
InterchainAccountI wraps the authtypes.AccountI interface
type InterchainAccountPacketData ¶
type InterchainAccountPacketData struct { Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=ibc.applications.interchain_accounts.v1.Type" json:"type,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` }
InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field.
func (*InterchainAccountPacketData) Descriptor ¶
func (*InterchainAccountPacketData) Descriptor() ([]byte, []int)
func (InterchainAccountPacketData) GetBytes ¶
func (iapd InterchainAccountPacketData) GetBytes() []byte
GetBytes returns the JSON marshalled interchain account packet data.
func (*InterchainAccountPacketData) GetData ¶
func (m *InterchainAccountPacketData) GetData() []byte
func (*InterchainAccountPacketData) GetMemo ¶
func (m *InterchainAccountPacketData) GetMemo() string
func (*InterchainAccountPacketData) GetType ¶
func (m *InterchainAccountPacketData) GetType() Type
func (*InterchainAccountPacketData) Marshal ¶
func (m *InterchainAccountPacketData) Marshal() (dAtA []byte, err error)
func (*InterchainAccountPacketData) MarshalTo ¶
func (m *InterchainAccountPacketData) MarshalTo(dAtA []byte) (int, error)
func (*InterchainAccountPacketData) MarshalToSizedBuffer ¶
func (m *InterchainAccountPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InterchainAccountPacketData) ProtoMessage ¶
func (*InterchainAccountPacketData) ProtoMessage()
func (*InterchainAccountPacketData) Reset ¶
func (m *InterchainAccountPacketData) Reset()
func (*InterchainAccountPacketData) Size ¶
func (m *InterchainAccountPacketData) Size() (n int)
func (*InterchainAccountPacketData) String ¶
func (m *InterchainAccountPacketData) String() string
func (*InterchainAccountPacketData) Unmarshal ¶
func (m *InterchainAccountPacketData) Unmarshal(dAtA []byte) error
func (InterchainAccountPacketData) ValidateBasic ¶
func (iapd InterchainAccountPacketData) ValidateBasic() error
ValidateBasic performs basic validation of the interchain account packet data. The memo may be empty.
func (*InterchainAccountPacketData) XXX_DiscardUnknown ¶
func (m *InterchainAccountPacketData) XXX_DiscardUnknown()
func (*InterchainAccountPacketData) XXX_Marshal ¶
func (m *InterchainAccountPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InterchainAccountPacketData) XXX_Merge ¶
func (m *InterchainAccountPacketData) XXX_Merge(src proto.Message)
func (*InterchainAccountPacketData) XXX_Size ¶
func (m *InterchainAccountPacketData) XXX_Size() int
func (*InterchainAccountPacketData) XXX_Unmarshal ¶
func (m *InterchainAccountPacketData) XXX_Unmarshal(b []byte) error
type PortKeeper ¶
type PortKeeper interface { BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability IsBound(ctx sdk.Context, portID string) bool }
PortKeeper defines the expected IBC port keeper
type RegisteredInterchainAccount ¶
type RegisteredInterchainAccount struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` AccountAddress string `` /* 126-byte string literal not displayed */ }
RegisteredInterchainAccount contains a pairing of controller port ID and associated interchain account address
func (*RegisteredInterchainAccount) Descriptor ¶
func (*RegisteredInterchainAccount) Descriptor() ([]byte, []int)
func (*RegisteredInterchainAccount) GetAccountAddress ¶
func (m *RegisteredInterchainAccount) GetAccountAddress() string
func (*RegisteredInterchainAccount) GetPortId ¶
func (m *RegisteredInterchainAccount) GetPortId() string
func (*RegisteredInterchainAccount) Marshal ¶
func (m *RegisteredInterchainAccount) Marshal() (dAtA []byte, err error)
func (*RegisteredInterchainAccount) MarshalTo ¶
func (m *RegisteredInterchainAccount) MarshalTo(dAtA []byte) (int, error)
func (*RegisteredInterchainAccount) MarshalToSizedBuffer ¶
func (m *RegisteredInterchainAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RegisteredInterchainAccount) ProtoMessage ¶
func (*RegisteredInterchainAccount) ProtoMessage()
func (*RegisteredInterchainAccount) Reset ¶
func (m *RegisteredInterchainAccount) Reset()
func (*RegisteredInterchainAccount) Size ¶
func (m *RegisteredInterchainAccount) Size() (n int)
func (*RegisteredInterchainAccount) String ¶
func (m *RegisteredInterchainAccount) String() string
func (*RegisteredInterchainAccount) Unmarshal ¶
func (m *RegisteredInterchainAccount) Unmarshal(dAtA []byte) error
func (*RegisteredInterchainAccount) XXX_DiscardUnknown ¶
func (m *RegisteredInterchainAccount) XXX_DiscardUnknown()
func (*RegisteredInterchainAccount) XXX_Marshal ¶
func (m *RegisteredInterchainAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisteredInterchainAccount) XXX_Merge ¶
func (m *RegisteredInterchainAccount) XXX_Merge(src proto.Message)
func (*RegisteredInterchainAccount) XXX_Size ¶
func (m *RegisteredInterchainAccount) XXX_Size() int
func (*RegisteredInterchainAccount) XXX_Unmarshal ¶
func (m *RegisteredInterchainAccount) XXX_Unmarshal(b []byte) error
type Type ¶
type Type int32
Type defines a classification of message issued from a controller chain to its associated interchain accounts host