types

package
v3.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EventTypePacket = "ics27_packet"

	AttributeKeyAckError      = "error"
	AttributeKeyHostChannelID = "host_channel_id"
	AttributeKeyAckSuccess    = "success"
)

ICS27 Interchain Accounts events

View Source
const (
	// ModuleName defines the interchain accounts module name
	ModuleName = "interchainaccounts"

	// PortID is the default port id that the interchain accounts host submodule binds to
	PortID = "icahost"

	// PortPrefix is the default port prefix that the interchain accounts controller submodule binds to
	PortPrefix = "icacontroller-"

	// Version defines the current version for interchain accounts
	Version = "ics27-1"

	// 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
)
View Source
const (
	// EncodingProtobuf defines the protocol buffers proto3 encoding format
	EncodingProtobuf = "proto3"

	// TxTypeSDKMultiMsg defines the multi message transaction type supported by the Cosmos SDK
	TxTypeSDKMultiMsg = "sdk_multi_msg"
)
View Source
const MaxMemoCharLength = 256

MaxMemoCharLength defines the maximum length for the InterchainAccountPacketData memo field

Variables

View Source
var (
	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)
View Source
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")
	ErrActiveChannelAlreadySet     = sdkerrors.Register(ModuleName, 10, "active channel already set for this owner")
	ErrActiveChannelNotFound       = sdkerrors.Register(ModuleName, 11, "no active channel for this owner")
	ErrInvalidVersion              = sdkerrors.Register(ModuleName, 12, "invalid interchain accounts version")
	ErrInvalidAccountAddress       = sdkerrors.Register(ModuleName, 13, "invalid account address")
	ErrUnsupported                 = sdkerrors.Register(ModuleName, 14, "interchain account does not support this action")
	ErrInvalidControllerPort       = sdkerrors.Register(ModuleName, 15, "invalid controller port")
	ErrInvalidHostPort             = sdkerrors.Register(ModuleName, 16, "invalid host port")
	ErrInvalidTimeoutTimestamp     = sdkerrors.Register(ModuleName, 17, "timeout timestamp must be in the future")
	ErrInvalidCodec                = sdkerrors.Register(ModuleName, 18, "codec is not supported")
	ErrInvalidAccountReopening     = sdkerrors.Register(ModuleName, 19, "invalid account reopening")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
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"
)
View Source
var (
	ErrInvalidLengthMetadata        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetadata          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetadata = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPacket        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPacket          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DefaultMaxAddrLength = 128

DefaultMaxAddrLength defines the default maximum character length used in validation of addresses

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.

View Source
var Type_name = map[int32]string{
	0: "TYPE_UNSPECIFIED",
	1: "TYPE_EXECUTE_TX",
}
View Source
var Type_value = map[string]int32{
	"TYPE_UNSPECIFIED": 0,
	"TYPE_EXECUTE_TX":  1,
}

Functions

func DeserializeCosmosTx

func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte) ([]sdk.Msg, error)

DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes into a slice of sdk.Msg's. Only the ProtoCodec is supported for message deserialization.

func GenerateAddress

func GenerateAddress(moduleAccAddr sdk.AccAddress, connectionID, portID string) sdk.AccAddress

GenerateAddress returns an sdk.AccAddress derived using the provided module account address and connection and port identifiers. The sdk.AccAddress returned is a sub-address of the module account, using the host chain connection ID and controller chain's port ID as the derivation key Deprecated: this function is deprecated! Please use GenerateUniqueAddress in favour of GenerateAddress

func GenerateUniqueAddress

func GenerateUniqueAddress(ctx sdk.Context, connectionID, portID string) sdk.AccAddress

GenerateUniqueAddress returns an sdk.AccAddress derived using a host module account address, host connection ID, the controller portID, the current block app hash, and the current block data hash. The sdk.AccAddress returned is a sub-address of the host module account.

func IsPreviousMetadataEqual

func IsPreviousMetadataEqual(previousVersion string, metadata Metadata) bool

IsPreviousMetadataEqual compares a metadata to a previous version string set in a channel struct. It ensures all fields are equal except the Address string

func KeyActiveChannel

func KeyActiveChannel(portID, connectionID string) []byte

KeyActiveChannel creates and returns a new key used for active channels store operations

func KeyOwnerAccount

func KeyOwnerAccount(portID, connectionID string) []byte

KeyOwnerAccount creates and returns a new key used for interchain account store operations

func KeyPort

func KeyPort(portID string) []byte

KeyPort creates and returns a new key used for port store operations

func NewControllerPortID

func NewControllerPortID(owner string) (string, error)

NewControllerPortID creates and returns a new prefixed controller port identifier using the provided owner string

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the concrete InterchainAccount implementation against the associated x/auth AccountI and GenesisAccount interfaces

func SerializeCosmosTx

func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []sdk.Msg) (bz []byte, err error)

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. Only the ProtoCodec is supported for serializing messages.

func ValidateAccountAddress

func ValidateAccountAddress(addr string) error

ValidateAccountAddress performs basic validation of interchain account addresses, enforcing constraints on address length and character set

func ValidateControllerMetadata

func ValidateControllerMetadata(ctx sdk.Context, channelKeeper ChannelKeeper, connectionHops []string, metadata Metadata) error

ValidateControllerMetadata performs validation of the provided ICS27 controller metadata parameters

func ValidateHostMetadata

func ValidateHostMetadata(ctx sdk.Context, channelKeeper ChannelKeeper, connectionHops []string, metadata Metadata) error

ValidateHostMetadata performs validation of the provided ICS27 host metadata parameters

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 {
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	PortId       string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelId    string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
}

ActiveChannel contains a connection ID, port ID and associated active channel ID

func (*ActiveChannel) Descriptor

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

func (*ActiveChannel) GetChannelId

func (m *ActiveChannel) GetChannelId() string

func (*ActiveChannel) GetConnectionId

func (m *ActiveChannel) GetConnectionId() string

func (*ActiveChannel) GetPortId

func (m *ActiveChannel) GetPortId() string

func (*ActiveChannel) Marshal

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

func (*ActiveChannel) MarshalTo

func (m *ActiveChannel) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (CosmosTx) GetBytes

func (ct CosmosTx) GetBytes() []byte

GetBytes returns the JSON marshalled interchain account CosmosTx.

func (*CosmosTx) GetMessages

func (m *CosmosTx) GetMessages() []*types.Any

func (*CosmosTx) Marshal

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

func (*CosmosTx) MarshalTo

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

func (*CosmosTx) MarshalToSizedBuffer

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

func (*CosmosTx) ProtoMessage

func (*CosmosTx) ProtoMessage()

func (*CosmosTx) Reset

func (m *CosmosTx) Reset()

func (*CosmosTx) Size

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

func (*CosmosTx) String

func (m *CosmosTx) String() string

func (*CosmosTx) Unmarshal

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

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 (m *CosmosTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CosmosTx) XXX_Merge

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

func (*CosmosTx) XXX_Size

func (m *CosmosTx) XXX_Size() int

func (*CosmosTx) XXX_Unmarshal

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

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

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *HostGenesisState) MarshalTo(dAtA []byte) (int, 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

type InterchainAccountI interface {
	authtypes.AccountI
}

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 Metadata

type Metadata struct {
	// version defines the ICS27 protocol version
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// controller_connection_id is the connection identifier associated with the controller chain
	ControllerConnectionId string `` /* 161-byte string literal not displayed */
	// host_connection_id is the connection identifier associated with the host chain
	HostConnectionId string `` /* 137-byte string literal not displayed */
	// address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step
	// NOTE: the address field is empty on the OnChanOpenInit handshake step
	Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	// encoding defines the supported codec format
	Encoding string `protobuf:"bytes,5,opt,name=encoding,proto3" json:"encoding,omitempty"`
	// tx_type defines the type of transactions the interchain account can execute
	TxType string `protobuf:"bytes,6,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"`
}

Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning

func NewMetadata

func NewMetadata(version, controllerConnectionID, hostConnectionID, accAddress, encoding, txType string) Metadata

NewMetadata creates and returns a new ICS27 Metadata instance

func (*Metadata) Descriptor

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

func (*Metadata) GetAddress

func (m *Metadata) GetAddress() string

func (*Metadata) GetControllerConnectionId

func (m *Metadata) GetControllerConnectionId() string

func (*Metadata) GetEncoding

func (m *Metadata) GetEncoding() string

func (*Metadata) GetHostConnectionId

func (m *Metadata) GetHostConnectionId() string

func (*Metadata) GetTxType

func (m *Metadata) GetTxType() string

func (*Metadata) GetVersion

func (m *Metadata) GetVersion() string

func (*Metadata) Marshal

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

func (*Metadata) MarshalTo

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

func (*Metadata) MarshalToSizedBuffer

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

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) Size

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

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) Unmarshal

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

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

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

func (*Metadata) XXX_Merge

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

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) 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 {
	ConnectionId   string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	PortId         string `protobuf:"bytes,2,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 connection ID, 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) GetConnectionId

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

const (
	// Default zero value enumeration
	UNSPECIFIED Type = 0
	// Execute a transaction on an interchain accounts host chain
	EXECUTE_TX Type = 1
)

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

Jump to

Keyboard shortcuts

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