Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add potential use cases documentation for ica #2594

Merged
merged 4 commits into from
Nov 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/apps/interchain-accounts/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
order: 6
-->

# Development use cases

The initial version of interchain accounts allowed for the controller module to be extended by providing it with an underlying application which would handle all packet callbacks.
That functionality is now being deprecated in favor of alternative approaches.
This document will outline potential use cases and redirect each use case to the appropriate documentation.

## Custom authentication

Interchain accounts may be associated with alternative types of authentication relative to the traditional public/private key signing.
If you wish to develop or use interchain accounts with a custom authentication module, we recommend you use ibc-go v6 or greater.

The custom authentication module should interact with the controller module via the [MsgServer](https://ibc.cosmos.network/main/apps/interchain-accounts/messages.html).

## Redirection to a smart contract

It may be desirable to allow smart contracts to control an interchain account.
To faciliate such an action, the controller module may be provided an underlying application which redirects to smart contract callers.
An improved design has been suggested in [ADR 008](https://github.com/cosmos/ibc-go/pull/1976) which performs this action via middleware.

Implementors of this use case are recommended to follow the ADR 008 approach.
The underlying application may continue to be used as a short term solution for ADR 008 and the [legacy API](https://ibc.cosmos.network/main/apps/interchain-accounts/auth-modules.html#registerinterchainaccount) should continue to be utilized in such situations.

## Packet callbacks

If a developer requires access to packet callbacks for their use case, then they having the following options:

1. Write a smart contract which is connected via an ADR 008 or equivalent IBC application (recommended).
2. Use the controller's underlying application to implement packet callback logic.

If the first case, the smart contract should use the [MsgServer](https://ibc.cosmos.network/main/apps/interchain-accounts/messages.html).

In the second case, the underlying application should use the [legacy API](https://ibc.cosmos.network/main/apps/interchain-accounts/auth-modules.html#registerinterchainaccount).