Deprecation Notice
This document is deprecated and will be removed in future releases. The controller submodule keeper exposes two legacy functions that allow respectively for custom authentication modules to register interchain accounts and send packets to the interchain account.RegisterInterchainAccount
The authentication module can begin registering interchain accounts by calling RegisterInterchainAccount
:
version
argument is used to support ICS-29 fee middleware for relayer incentivization of ICS-27 packets. Consumers of the RegisterInterchainAccount
are expected to build the appropriate JSON encoded version string themselves and pass it accordingly. If an empty string is passed in the version
argument, then the version will be initialized to a default value in the OnChanOpenInit
callback of the controller’s handler, so that channel handshake can proceed.
The following code snippet illustrates how to construct an appropriate interchain accounts Metadata
and encode it as a JSON bytestring:
Metadata
type:
Since ibc-go v7.5.0 the default ordering of new ICA channels created when invokingRegisterInterchainAccount
has changed fromORDERED
toUNORDERED
. If this default behaviour does not meet your use case, please use the functionRegisterInterchainAccountWithOrdering
(available since ibc-go v7.5.0), which takes an extra parameter that can be used to specify the ordering of the channel.
SendTx
The authentication module can attempt to send a packet by calling SendTx
:
InterchainAccountPacketData
must be serialized using a format supported by the host chain.
If the host chain is using the ibc-go host chain submodule, SerializeCosmosTx
should be used. If the InterchainAccountPacketData.Data
is serialized using a format not supported by the host chain, the packet will not be successfully received.