Skip to content

Commit 55af7bb

Browse files
authored
Merge pull request #284 from KomodoPlatform/add/ibc_withdraw
2 parents 18f702b + 6e404b7 commit 55af7bb

File tree

8 files changed

+2072
-295
lines changed

8 files changed

+2072
-295
lines changed

filepathSlugs.json

+12
Original file line numberDiff line numberDiff line change
@@ -3142,6 +3142,7 @@
31423142
"response-success-6",
31433143
"withdraw-qrc-20-coins-with-gas-limit",
31443144
"withdraw-tendermint-coins-with-a-memo-and-custom-gas-fee",
3145+
"withdraw-tendermint-ibc-coins",
31453146
"error-responses",
31463147
"invalid-request-unknown-fee-type",
31473148
"invalid-request-wrong-parameter-type",
@@ -3925,6 +3926,17 @@
39253926
"src/pages/komodo-wallet/desktop/view-your-wallet-address/index.mdx": [
39263927
"viewing-your-wallet-address-in-komodo-wallet-desktop"
39273928
],
3929+
"src/pages/komodo-wallet/guides/how-to-find-the-right-ibc-channel-for-transfers/index.mdx": [
3930+
"how-to-find-the-right-ibc-channel-for-transfers-on-komodo-wallet",
3931+
"understanding-ibc-channels",
3932+
"sources-to-find-the-ibc-channel-information",
3933+
"example-transferring-from-iris-to-osmosis",
3934+
"verifying-transfers",
3935+
"staying-updated"
3936+
],
3937+
"src/pages/komodo-wallet/guides/index.mdx": [
3938+
"komodo-wallet-general-guides"
3939+
],
39283940
"src/pages/komodo-wallet/index.mdx": [
39293941
"komodo-wallet-guides"
39303942
],

postman/collections/komodo_defi.postman_collection.json

+1,902-283
Large diffs are not rendered by default.

src/data/sidebar.json

+13
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,19 @@
177177
"titleLink": "/komodo-wallet/",
178178
"links": []
179179
},
180+
{
181+
"title": "User Guides (General)",
182+
"links": [
183+
{
184+
"title": "Introduction",
185+
"href": "/komodo-wallet/guides/"
186+
},
187+
{
188+
"title": "Finding IBC Channels for Transfers",
189+
"href": "/komodo-wallet/guides/how-to-find-the-right-ibc-channel-for-transfers/"
190+
}
191+
]
192+
},
180193
{
181194
"title": "User Guides (Mobile)",
182195
"links": [
48 KB
Loading

src/pages/komodo-defi-framework/api/v20/withdraw/index.mdx

+78-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ This method generates a raw transaction which should then be broadcast using [se
99

1010
## Arguments
1111

12-
| Structure | Type | Description |
13-
| --------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
14-
| coin | string | The name of the coin the user desires to withdraw |
15-
| to | string | Coins are withdrawn to this address |
16-
| amount | string (numeric) | The amount the user desires to withdraw, ignored when `max=true` |
17-
| memo | string | Optional. Adds a transaction memo for compatible coins (e.g. Tendermint ecosystem). |
18-
| max | bool | Withdraw the maximum available amount |
19-
| fee | object | A standard [FeeInfo](/komodo-defi-framework/api/v20/#fee-info) object. |
20-
| from | object | HD wallets only. A standard [WithdrawFromInfo](/komodo-defi-framework/api/v20/#withdraw-from-info) object. |
12+
| Structure | Type | Description |
13+
| -------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
14+
| coin | string | The name of the coin the user desires to withdraw. |
15+
| to | string | Coins are withdrawn to this address. |
16+
| amount | string (numeric) | The amount the user desires to withdraw, ignored when `max=true`. |
17+
| memo | string | Optional. Adds a transaction memo for compatible coins (e.g. Tendermint ecosystem). |
18+
| max | bool | Optional. Withdraw the maximum available amount. |
19+
| fee | object | Optional. A standard [FeeInfo](/komodo-defi-framework/api/v20/#fee-info) object. |
20+
| from | object | HD wallets only. A standard [WithdrawFromInfo](/komodo-defi-framework/api/v20/#withdraw-from-info) object. |
21+
| ibc\_source\_channel | string | Tendermint IBC transfers only. The source channel for the [IBC](https://tutorials.cosmos.network/academy/3-ibc/1-what-is-ibc.html) transaction. |
2122

2223
### Response
2324

@@ -561,6 +562,74 @@ This method generates a raw transaction which should then be broadcast using [se
561562
You can see the memo is included on the [block explorer](https://irishub.iobscan.io/#/txs/E00982A2A8442D7140916A34E29E287A0B1CBB4B38940372D1966BA7ACDE5BD6)
562563
</CollapsibleSection>
563564

565+
##### Withdraw Tendermint IBC coins
566+
567+
Using the Cosmos [Ecosystem IBC protocol](https://everstake.one/blog/cosmos-ibc-breaking-down-the-walls-between-blockchains), you can withdraw coins from one chain to another. This example shows a withdrawal from Cosmos to Osmosis.
568+
569+
<CodeGroup title="Withdraw" tag="POST" label="withdraw" mm2MethodDecorate="true">
570+
```json
571+
{
572+
"mmrpc": "2.0",
573+
"userpass": "RPC_UserP@SSW0RD",
574+
"method": "withdraw",
575+
"params": {
576+
"coin": "ATOM",
577+
"to": "osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4",
578+
"amount": 0.1,
579+
"memo": "In the blackest of your moments, wait with no fear.",
580+
"ibc_source_channel": "channel-141",
581+
"fee": {
582+
"type": "CosmosGas",
583+
"gas_price": 0.05,
584+
"gas_limit": 150000
585+
}
586+
},
587+
"id": 0
588+
}
589+
```
590+
</CodeGroup>
591+
592+
<Note>
593+
The `ibc_source_channel` value above is for demonstration only. For more information regarding how to set a valid value, see our guide to [finding the right IBC channel](/komodo-wallet/guides/how-to-find-the-right-ibc-channel-for-transfers/).
594+
</Note>
595+
596+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
597+
```json
598+
{
599+
"mmrpc": "2.0",
600+
"result": {
601+
"tx_hex": "0af9010abc010a292f6962632e6170706c69636174696f6e732e7472616e736665722e76312e4d73675472616e73666572128e010a087472616e73666572120b6368616e6e656c2d3134311a0f0a057561746f6d1206313030303030222d636f736d6f733136647271766c33753873756b667375346c6d3371736b32386a72336661686a617377736163382a2b6f736d6f3136647271766c33753873756b667375346c6d3371736b32386a72336661686a6163347264773438a6c5b9a089f29efa171233496e2074686520626c61636b657374206f6620796f7572206d6f6d656e74732c20776169742077697468206e6f20666561722e188df8c70a12680a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc212040a020801180b12140a0e0a057561746f6d1205313733353910e0c65b1a40042c4fa45d77405ee94e737a000b146f5019137d5a2d3275849c9ad66dd8ef1d0f087fb584f34b1ebcf7989e41bc0675e96c83f0eec4ffe355e078b6615d7a72",
602+
"tx_hash": "06174E488B7BBC35180E841F2D170327BB7DE0A291CA69050D81F82A7CF103CB",
603+
"from": [
604+
"cosmos16drqvl3u8sukfsu4lm3qsk28jr3fahjaswsac8"
605+
],
606+
"to": [
607+
"osmo16drqvl3u8sukfsu4lm3qsk28jr3fahjac4rdw4"
608+
],
609+
"total_amount": "0.1173590000000000",
610+
"spent_by_me": "0.1173590000000000",
611+
"received_by_me": "0",
612+
"my_balance_change": "-0.1173590000000000",
613+
"block_height": 0,
614+
"timestamp": 0,
615+
"fee_details": {
616+
"type": "Tendermint",
617+
"coin": "ATOM",
618+
"amount": "0.017359",
619+
"gas_limit": 1500000
620+
},
621+
"coin": "ATOM",
622+
"internal_id": "06174e488b7bbc35180e841f2d170327bb7de0a291ca69050d81f82a7cf103cb",
623+
"transaction_type": "TendermintIBCTransfer",
624+
"memo": "In the blackest of your moments, wait with no fear."
625+
},
626+
"id": null
627+
}
628+
```
629+
630+
You can see the memo is included on the [block explorer](https://irishub.iobscan.io/#/txs/E00982A2A8442D7140916A34E29E287A0B1CBB4B38940372D1966BA7ACDE5BD6)
631+
</CollapsibleSection>
632+
564633
### Error Responses
565634

566635
#### InvalidRequest: Unknown fee type
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export const title = "How to find the right IBC channel for transfers on Komodo Wallet";
2+
export const description = "This guide describes how to activate coins in Komodo Wallet.";
3+
4+
import ibcChannels from "@/public/images/docs/api-images/ibc-channels.png";
5+
6+
# How to find the right IBC channel for transfers on Komodo Wallet
7+
8+
This guide will help you find the correct IBC channel for making transfers using Komodo Wallet.
9+
10+
<Note type="warning">
11+
IBC transfer is an advanced feature. Due to the possibility of expired clients
12+
or network changes, users should approach IBC transfers carefully and ensure
13+
they are using the most up-to-date channels.
14+
</Note>
15+
16+
## Understanding IBC Channels
17+
18+
### Sources to Find the IBC Channel information
19+
20+
* [https://ibc.iobscan.io/relayers](https://ibc.iobscan.io/relayers)
21+
* [https://www.mintscan.io/cosmos/relayers?sector=networks](https://www.mintscan.io/cosmos/relayers?sector=networks)
22+
23+
### Example: Transferring from IRIS to OSMOSIS
24+
25+
<OptimizedImage title="IBC channel information" src={ibcChannels} classNaming="w-full" alt="IBC channel information" />
26+
27+
1. In Komodo Wallet, select IRIS and open the withdraw form.
28+
2. Enter the amount and an OSMOSIS address as the destination.
29+
3. Toggle on the "Set IBC channel" option.
30+
4. Set the `ibc_source_channel` value to `channel-3` (the channel for IRIS in the above image alongside OSMOSIS).
31+
5. Send your funds.
32+
33+
<Note type="info">
34+
Channel IDs are specific to each chain pair and direction. The channel for
35+
sending from Chain A to Chain B may be different from the channel for sending
36+
from Chain B to Chain A.
37+
</Note>
38+
39+
## Verifying Transfers
40+
41+
After initiating a transfer:
42+
43+
1. Note the transaction hash provided by Komodo Wallet.
44+
2. Use a block explorer for either the sending or receiving chain to track the transaction status.
45+
3. Allow some time for the transfer to complete, as IBC transfers may take longer than on-chain transactions.
46+
47+
## Staying Updated
48+
49+
* Regularly check for updates to the Komodo Wallet application.
50+
* Join official [Komodo community channels](https://komodoplatform.com/discord) to stay informed about any changes to IBC functionality or recommended practices.
51+
52+
By following these steps, you can ensure you're using the correct IBC channel for your transfers on Komodo Wallet, minimizing the risk of failed transactions or lost funds.
53+
54+
To see the API method used behind the scenes for IBC transfers, refer to the [withdraw (v2)](/komodo-defi-framework/api/v20/withdraw/) method.
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const title = "Komodo Wallet General Guides";
2+
export const description =
3+
"This section contains tutorials to perform various tasks in the Komodo Wallet apps.";
4+
5+
# Komodo Wallet General Guides
6+
7+
This section contains tutorials to perform various tasks in the Komodo Wallet apps.
8+
9+
<TocForIndex />

src/pages/komodo-wallet/index.mdx

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const description = "This section of the documentation contains end user
55

66
This section of the documentation contains end user guides for the Komodo Wallet on all platforms:
77

8-
* (Mobile)\[/komodo-wallet/mobile/]
9-
* (Desktop)\[/komodo-wallet/desktop/]
10-
* (Web)\[/komodo-wallet/web/]
8+
* [General](/komodo-wallet/guides/)
9+
* [Mobile](/komodo-wallet/mobile/)
10+
* [Desktop](/komodo-wallet/desktop/)
11+
* [Web](/komodo-wallet/web/)

0 commit comments

Comments
 (0)