Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
1 change: 1 addition & 0 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,7 @@
"response-success-6",
"withdraw-qrc-20-coins-with-gas-limit",
"withdraw-tendermint-coins-with-a-memo-and-custom-gas-fee",
"withdraw-tendermint-ibc-coins",
"error-responses",
"invalid-request-unknown-fee-type",
"invalid-request-wrong-parameter-type",
Expand Down
50 changes: 41 additions & 9 deletions src/pages/komodo-defi-framework/api/v20/withdraw/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ This method generates a raw transaction which should then be broadcast using [se

## Arguments

| Structure | Type | Description |
| --------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
| coin | string | The name of the coin the user desires to withdraw |
| to | string | Coins are withdrawn to this address |
| amount | string (numeric) | The amount the user desires to withdraw, ignored when `max=true` |
| memo | string | Optional. Adds a transaction memo for compatible coins (e.g. Tendermint ecosystem). |
| max | bool | Withdraw the maximum available amount |
| fee | object | A standard [FeeInfo](/komodo-defi-framework/api/v20/#fee-info) object. |
| from | object | HD wallets only. A standard [WithdrawFromInfo](/komodo-defi-framework/api/v20/#withdraw-from-info) object. |
| Structure | Type | Description |
| -------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| coin | string | The name of the coin the user desires to withdraw |
| to | string | Coins are withdrawn to this address |
| amount | string (numeric) | The amount the user desires to withdraw, ignored when `max=true` |
| memo | string | Optional. Adds a transaction memo for compatible coins (e.g. Tendermint ecosystem). |
| max | bool | Withdraw the maximum available amount |
| fee | object | A standard [FeeInfo](/komodo-defi-framework/api/v20/#fee-info) object. |
Comment thread
smk762 marked this conversation as resolved.
Outdated
| from | object | HD wallets only. A standard [WithdrawFromInfo](/komodo-defi-framework/api/v20/#withdraw-from-info) object. |
| ibc\_source\_channel | string | Optional, [IBC](https://tutorials.cosmos.network/academy/3-ibc/1-what-is-ibc.html) coins only. The source channel for the IBC transaction. This is only required if the \['chain\_registry\_name`value](https://github.com/KomodoPlatform/coins/blob/14bfd0ab59118ea1048eaaffba14f3270b2ab17b/coins#L14654) is not present in your`coins\` file. |

### Response

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

##### Withdraw Tendermint IBC coins

<CodeGroup title="Withdraw" tag="POST" label="withdraw" mm2MethodDecorate="true">
```json
{
"mmrpc": "2.0",
"userpass": "RPC_UserP@SSW0RD",
"method": "withdraw",
"params": {
"coin": "ATOM-IBC_NUCLEUSTEST",
"to": "nuc16ggf7pmy0w0glzyrgd2x9mlw92csw6d9yj2qvg",
Comment thread
smk762 marked this conversation as resolved.
Outdated
"amount": 0.1,
"memo": "In the blackest of your moments, wait with no fear.",
"fee": {
"type": "CosmosGas",
"gas_price": 0.05,
"gas_limit": 150000
}
},
"id": 0
}
```
</CodeGroup>

<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
```json
```

You can see the memo is included on the [block explorer](https://irishub.iobscan.io/#/txs/E00982A2A8442D7140916A34E29E287A0B1CBB4B38940372D1966BA7ACDE5BD6)
</CollapsibleSection>

### Error Responses

#### InvalidRequest: Unknown fee type
Expand Down