Skip to content

Commit d9e6903

Browse files
authored
Merge pull request #318 from KomodoPlatform/postman/tendermint
2 parents 55af7bb + fabd3c5 commit d9e6903

File tree

5 files changed

+147
-35
lines changed

5 files changed

+147
-35
lines changed

filepathSlugs.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,11 @@
20152015
"coin-protocol",
20162016
"coin-protocol-data",
20172017
"evm-node",
2018+
"v2-1-0-current-release",
2019+
"v2-2-0",
2020+
"tendermint-node",
2021+
"v2-1-0-current-release-2",
2022+
"v2-2-0-2",
20182023
"tokens-request",
20192024
"utxo-merge-params"
20202025
],
@@ -2805,10 +2810,12 @@
28052810
"request-parameters",
28062811
"response-parameters",
28072812
"examples",
2808-
"request-default-optional-values",
2813+
"request-using-rpc-urls-parameter-kdf-version-2-2-0",
28092814
"response",
28102815
"request-with-get-balances-set-to-false",
28112816
"response-2",
2817+
"request-using-nodes-parameter-kdf-version-2-2-0",
2818+
"response-3",
28122819
"error-types",
28132820
"platform-config-is-not-found-error",
28142821
"platform-is-already-activated-error",
@@ -2903,7 +2910,6 @@
29032910
"example-without-balances",
29042911
"balance-info",
29052912
"derivation-method",
2906-
"evm-node",
29072913
"coin-protocol",
29082914
"coin-protocol-data",
29092915
"confirmation-targets",

src/pages/komodo-defi-framework/api/common_structures/activation/index.mdx

+57-5
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,68 @@ Contains information electrum servers for coins being used in `Electrum` or `Lig
144144

145145
The `EvmNode` object includes the following items for a given coin or token:
146146

147-
| Parameter | Type | Description |
148-
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
149-
| url | string | URL of an RPC node |
150-
| gui\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run officially by the Komodo Platform team |
147+
| Parameter | Type | Description |
148+
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------- |
149+
| url | string | URL of an RPC node |
150+
| komodo\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run officially by the Komodo Platform team |
151+
152+
#### v2.1.0 (current release)
151153

152154
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
153155
```json
154156
{
155157
"url": "http://eth1.cipig.net:8555",
156-
"gui_auth": false
158+
"komodo_proxy": false
159+
}
160+
```
161+
</CollapsibleSection>
162+
163+
<Note>
164+
Prior to the v2.2.0 release, the `gui_auth` field was used to access RPC nodes run officially by the Komodo Platform team. This field was replaced with the `komodo_proxy` field in the v2.2.0 release.
165+
</Note>
166+
167+
#### v2.2.0+
168+
169+
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
170+
```json
171+
{
172+
"url": "https://nucleus-rpc.alpha.komodo.earth",
173+
"komodo_proxy": true
174+
}
175+
```
176+
</CollapsibleSection>
177+
178+
### TendermintNode
179+
180+
The `TendermintNode` object includes the following items for a given coin or token:
181+
182+
| Parameter | Type | Description |
183+
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
184+
| url | string | URL of an RPC node |
185+
| komodo\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run behind [komodo-defi-proxy](https://github.com/KomodoPlatform/komodo-defi-proxy) |
186+
187+
#### v2.1.0 (current release)
188+
189+
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
190+
```json
191+
{
192+
"url": "http://eth1.cipig.net:8555",
193+
"komodo_proxy": false
194+
}
195+
```
196+
</CollapsibleSection>
197+
198+
<Note>
199+
Prior to the v2.2.0 release, the `gui_auth` field was used to access RPC nodes run officially by the Komodo Platform team. This field was replaced with the `komodo_proxy` field in the v2.2.0 release.
200+
</Note>
201+
202+
#### v2.2.0+
203+
204+
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
205+
```json
206+
{
207+
"url": "https://nucleus-rpc.alpha.komodo.earth",
208+
"komodo_proxy": true
157209
}
158210
```
159211
</CollapsibleSection>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ Additionally, it supports ERC20 tokens on the ETH chain and associated ERC20 lik
6060
"nodes": [
6161
{
6262
"url": "http://eth1.cipig.net:18555",
63-
"gui_auth": false
63+
"komodo_proxy": false
6464
},
6565
{
6666
"url": "https://node.komodo.earth:8080/ethereum",
67-
"gui_auth": true
67+
"komodo_proxy": true
6868
}
6969
],
7070
"rpc_mode": "Http",

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

+80-8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
1212
| ticker | string | Ticker of the platform protocol coin. Options: `ATOM`, `IRIS`, `OSMOSIS` |
1313
| 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` |
1414
| tokens\_params | array of objects | A list of standard [TokensRequest](/komodo-defi-framework/api/common_structures/activation/#tokens-request) objects. |
15+
| rpc\_urls | array of strings | **v2.1.0 and earlier only.** A list of RPC urls for Tendermint full node servers. |
16+
| nodes | array of objects | **v2.2.0+ only.** A list of [TendermintNode objects](/komodo-defi-framework/api/common_structures/activation/#tendermint-node). |
1517
| 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` |
1618
| 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](/komodo-defi-framework/api/legacy/my_tx_history/#my-tx-history) method |
1719
| 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 |
@@ -29,14 +31,19 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
2931
| tokens\_balances | array of objects | Only returned when `get_balances` is `true`. A list of standard [AddressInfo](/komodo-defi-framework/api/common_structures/#address-info) objects, one for each token. |
3032
| tokens\_tickers | array | Only returned when `get_balances` is `false`. A list of each token which was activated. |
3133

34+
<Note>
35+
The `rpc_urls` parameter will be replaced with the `nodes` parameter in the kdf version 2.2.0 release. Instead of a list of url strings, the `nodes` parameter will be a list of [TendermintNode objects](/komodo-defi-framework/api/common_structures/activation/#tendermint-node).
36+
</Note>
37+
3238
### 📌 Examples
3339

34-
#### Request default optional values
40+
#### Request using `rpc_urls` parameter (kdf version \< 2.2.0)
3541

3642
<CodeGroup title="" tag="POST" label="enable_tendermint_with_assets" mm2MethodDecorate="true">
3743
```json
3844
{
3945
"method": "enable_tendermint_with_assets",
46+
"userpass": "RPC_UserP@SSW0RD",
4047
"mmrpc": "2.0",
4148
"params": {
4249
"ticker": "IRIS",
@@ -49,8 +56,7 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
4956
"https://iris.komodo.earth/",
5057
"https://rpc.irishub-1.irisnet.org"
5158
]
52-
},
53-
"userpass": "RPC_UserP@SSW0RD"
59+
}
5460
}
5561
```
5662
</CodeGroup>
@@ -87,6 +93,7 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
8793
```json
8894
{
8995
"method": "enable_tendermint_with_assets",
96+
"userpass": "RPC_UserP@SSW0RD",
9097
"mmrpc": "2.0",
9198
"params": {
9299
"ticker": "IRIS",
@@ -95,14 +102,21 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
95102
"ticker": "ATOM-IBC_IRIS"
96103
}
97104
],
98-
"rpc_urls": [
99-
"https://iris.komodo.earth/",
100-
"https://rpc.irishub-1.irisnet.org"
105+
"nodes": [
106+
{
107+
"url": "https://iris-rpc.alpha.komodo.earth/",
108+
"api_url": "https://iris-api.alpha.komodo.earth/",
109+
"grpc_url": "https://iris-grpc.alpha.komodo.earth/",
110+
"ws_url": "wss://iris-rpc.alpha.komodo.earth/websocket"
111+
},
112+
{
113+
"url": "https://rpc.irishub-1.irisnet.org",
114+
"komodo_proxy": false
115+
}
101116
],
102117
"tx_history": true,
103118
"get_balances": false
104-
},
105-
"userpass": "RPC_UserP@SSW0RD"
119+
}
106120
}
107121
```
108122
</CodeGroup>
@@ -124,6 +138,64 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
124138
```
125139
</CollapsibleSection>
126140

141+
#### Request using `nodes` parameter (kdf version 2.2.0+)
142+
143+
<CodeGroup title="" tag="POST" label="enable_tendermint_with_assets" mm2MethodDecorate="true">
144+
```json
145+
{
146+
"method": "enable_tendermint_with_assets",
147+
"userpass": "RPC_UserP@SSW0RD",
148+
"mmrpc": "2.0",
149+
"params": {
150+
"ticker": "IRIS",
151+
"tokens_params": [
152+
{
153+
"ticker": "ATOM-IBC_IRIS"
154+
}
155+
],
156+
"nodes": [
157+
{
158+
"url": "https://iris-rpc.alpha.komodo.earth/",
159+
"api_url": "https://iris-api.alpha.komodo.earth/",
160+
"grpc_url": "https://iris-grpc.alpha.komodo.earth/",
161+
"ws_url": "wss://iris-rpc.alpha.komodo.earth/websocket"
162+
},
163+
{
164+
"url": "https://rpc.irishub-1.irisnet.org",
165+
"komodo_proxy": false
166+
}
167+
]
168+
}
169+
}
170+
```
171+
</CodeGroup>
172+
173+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
174+
#### Response
175+
176+
```json
177+
{
178+
"mmrpc": "2.0",
179+
"result": {
180+
"ticker": "IRIS",
181+
"address": "iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k",
182+
"current_block": 19769638,
183+
"balance": {
184+
"spendable": "44.147264",
185+
"unspendable": "0"
186+
},
187+
"tokens_balances": {
188+
"ATOM-IBC_IRIS": {
189+
"spendable": "0.028306",
190+
"unspendable": "0"
191+
}
192+
}
193+
},
194+
"id": null
195+
}
196+
```
197+
</CollapsibleSection>
198+
127199
<CollapsibleSection expandedText="Hide Errors" collapsedText="Show Errors">
128200
### Error Types
129201

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

-18
Original file line numberDiff line numberDiff line change
@@ -383,24 +383,6 @@ Where the value indicates:
383383
```
384384
</CollapsibleSection>
385385

386-
### EvmNode
387-
388-
The `EvmNode` object includes the following items for a given coin or token:
389-
390-
| Parameter | Type | Description |
391-
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
392-
| url | string | URL of an RPC node |
393-
| gui\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run officially by the Komodo Platform team |
394-
395-
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
396-
```json
397-
{
398-
"url": "http://eth1.cipig.net:8555",
399-
"gui_auth": false
400-
}
401-
```
402-
</CollapsibleSection>
403-
404386
### CoinProtocol
405387

406388
| Parameter | Type | Description |

0 commit comments

Comments
 (0)