Task: Tendermint Activation
API-v2task::enable_tendermint::init
Use this method for task managed activation of Tendermint coins & tokens. Refer to the task managed activation overview for activation of other coin types.
| Parameter | Type | Description |
|---|---|---|
| ticker | string | Ticker of the platform protocol coin. Options: ATOM, IRIS, OSMOSIS |
| mm2 | integer | Required if not set in coins file. Informs the Komodo DeFi Framework API whether or not the coin is expected to function. Accepted values are 0 or 1 |
| tokens_params | array of objects | A list of standard TokensRequest objects. |
| nodes | array of objects | A list of CoinNode objects. |
| priv_key_policy | string | Optional, defaults to ContextPrivKey. value can be ContextPrivKey,Trezor when Komodo DeFi Framework is built for native platforms. value can be ContextPrivKey, Trezor, Metamask when the Komodo DeFi Framework is built targeting wasm |
| tx_history | boolean | Optional, defaults to false. If true the Komodo DeFi Framework API will preload transaction history as a background process. Must be set to true to use the my_tx_history method |
| required_confirmations | integer | Optional, defaults to 3. When the platform coin is involved, the number of confirmations for the Komodo DeFi Framework API to wait during the transaction steps of an atomic swap |
| requires_notarization | boolean | Optional, defaults to false. If true, coins protected by Komodo Platform's dPoW security will wait for a notarization before progressing to the next atomic swap transactions step. |
| get_balances | boolean | Optional, defaults to true. If false, coin and token balances will not be returned in the response, and the response will be returned more quickly. |
| Parameter | Type | Description |
|---|---|---|
| task_id | integer | An identifying number which is used to query task status. |
task::enable_tendermint::init
POST
task::enable_tendermint::init{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "task::enable_tendermint::init",
"params": {
"ticker": "IRIS",
"tokens_params": [
{
"ticker": "ATOM-IBC_IRIS"
}
],
"nodes": [
{
"url": "https://iris-rpc.alpha.komodo.earth/",
"api_url": "https://iris-api.alpha.komodo.earth/",
"grpc_url": "https://iris-grpc.alpha.komodo.earth/",
"ws_url": "wss://iris-rpc.alpha.komodo.earth/websocket"
},
{
"url": "https://rpc.irishub-1.irisnet.org",
"komodo_proxy": false
}
]
}
}
API-v2task::enable_tendermint::status
After running the task::enable_tendermint::init method, we can query the status of activation to check its progress.
The response will return the following:
- Result of the task (success or error)
- Progress status (what state the task is in)
- Required user action (what user should do before the task can continue)
| Parameter | Type | Description |
|---|---|---|
| task_id | integer | The identifying number returned when initiating the initialisation process. |
| forget_if_finished | boolean | If false, will return final response for completed tasks. Optional, defaults to true. |
task::enable_tendermint::status
POST
task::enable_tendermint::status{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "task::enable_tendermint::status",
"params": {
"task_id": 0,
"forget_if_finished": false
}
}
| Parameter | Type | Description |
|---|---|---|
| current_block | integer | Block height of the coin being activated |
| ticker | string | Ticker of the platform protocol coin, as input in the request. |
| address | string | An address for the activated coin |
| balance | object | Only returned when get_balances is true. A standard BalanceInfos object. |
| tokens_balances | array of objects | Only returned when get_balances is true. A list of standard AddressInfo objects, one for each token. |
| tokens_tickers | array | Only returned when get_balances is false. A list of each token which was activated. |
| Parameter | Type | Description |
|---|---|---|
| status | string | Will return InProgress if task is not yet comepleted |
| details | string | An indication of the current step of the activation process |
API-v2task::enable_tendermint::user_action
If the task::enable_tendermint::status returns UserActionRequired, we need to use the task::enable_tendermint::user_action method to enter our PIN
| Parameter | Type | Description |
|---|---|---|
| task_id | integer | The identifying number returned when initiating the initialisation process. |
| user_action | object | Object containing the params below |
| user_action.action_type | string | Will be TrezorPin for this method |
| user_action.pin | string (number) | When the Trezor device is displaying a grid of numbers for PIN entry, this param will contain your Trezor pin, as mapped through your keyboard numpad. See the image below for more information. |
| Parameter | Type | Description |
|---|---|---|
| result | string | The outcome of the request. |
task::enable_tendermint::user_action
POST
task::enable_tendermint::user_action{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "task::enable_tendermint::user_action",
"params": {
"task_id": 0,
"user_action": {
"action_type": "TrezorPin",
"pin": "862743"
}
}
}
API-v2task::enable_tendermint::cancel
If you want to cancel the enabling process before it has completed, you can use this method.
| Structure | Type | Description |
|---|---|---|
| task_id | integer | The identifying number returned when initiating the enabling process. |
| Structure | Type | Description |
|---|---|---|
| result | string | Indicates task cancellation was succesful. |
| error | string | An error message to explain what went wrong. |
| error_path | string | An indicator of the class or function which reurned the error. |
| error_trace | string | An indicator of where in the source code the error was thrown. |
| error_type | string | An enumerated value for the returned error. |
| error_data | string | The input task ID which resulted in the error. |
task::enable_tendermint::cancel
POST
task::enable_tendermint::cancel{
"userpass": "RPC_UserP@SSW0RD",
"method": "task::enable_tendermint::cancel",
"mmrpc": "2.0",
"params": {
"task_id": 3
}
}