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

Add tendermint activation to postman collection #318

Merged
merged 20 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b1d62f8
add tendermint activation to postman collection
smk762 Sep 6, 2024
0900f28
Add note and examples of tendermint activation breaking change
smk762 Sep 11, 2024
aa224eb
linting
smk762 Sep 11, 2024
b758181
rm duplicated common structure object
smk762 Sep 11, 2024
7a5a302
add note about `gui_auth` -> `komodo_auth`
smk762 Sep 11, 2024
843b8f2
linting
smk762 Sep 11, 2024
5820224
add missing `rpc_urls` param, duplicate EmvNode -> TendermintNode to …
smk762 Sep 13, 2024
2f139e9
[Bot] File and author data updated, validated and updated internal li…
smk762 Sep 13, 2024
1ca7a9d
Merge pull request #332 from KomodoPlatform/lint-fix-patches/postman/…
gcharang Sep 24, 2024
96a77d7
Merge branch 'dev' into postman/tendermint
smk762 Oct 30, 2024
fbc6a19
`gui_auth` -> `komodo_auth`
smk762 Oct 30, 2024
760d438
update postman collection `rpc_urls` -> `nodes`
smk762 Oct 30, 2024
5ff14c6
[Bot] File and author data updated, validated and updated internal li…
smk762 Oct 30, 2024
ee261a5
Merge pull request #363 from KomodoPlatform/lint-fix-patches/postman/…
gcharang Oct 31, 2024
837d9c0
Merge branch 'dev' into postman/tendermint
smk762 Nov 1, 2024
5a0dd73
proxy, not auth
smk762 Nov 1, 2024
7a1b9e3
update postman
smk762 Nov 1, 2024
fe3192d
update description with link to repo
smk762 Nov 9, 2024
51a98c2
[Bot] File and author data updated, validated and updated internal li…
smk762 Nov 9, 2024
fabd3c5
Merge pull request #370 from KomodoPlatform/lint-fix-patches/postman/…
gcharang Nov 17, 2024
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
10 changes: 8 additions & 2 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,11 @@
"coin-protocol",
"coin-protocol-data",
"evm-node",
"v2-1-0-current-release",
"v2-2-0",
"tendermint-node",
"v2-1-0-current-release-2",
"v2-2-0-2",
"tokens-request",
"utxo-merge-params"
],
Expand Down Expand Up @@ -2801,10 +2806,12 @@
"request-parameters",
"response-parameters",
"examples",
"request-default-optional-values",
"request-using-rpc-urls-parameter-kdf-version-2-2-0",
"response",
"request-with-get-balances-set-to-false",
"response-2",
"request-using-nodes-parameter-kdf-version-2-2-0",
"response-3",
"error-types",
"platform-config-is-not-found-error",
"platform-is-already-activated-error",
Expand Down Expand Up @@ -2891,7 +2898,6 @@
"example-without-balances",
"balance-info",
"derivation-method",
"evm-node",
"coin-protocol",
"coin-protocol-data",
"confirmation-targets",
Expand Down
316 changes: 285 additions & 31 deletions postman/collections/komodo_defi.postman_collection.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,68 @@ Contains information electrum servers for coins being used in `Electrum` or `Lig

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

| Parameter | Type | Description |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| url | string | URL of an RPC node |
| gui\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run officially by the Komodo Platform team |
| Parameter | Type | Description |
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------- |
| url | string | URL of an RPC node |
| komodo\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run officially by the Komodo Platform team |

#### v2.1.0 (current release)

<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
```json
{
"url": "http://eth1.cipig.net:8555",
"gui_auth": false
"komodo_proxy": false
}
```
</CollapsibleSection>

<Note>
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.
</Note>

#### v2.2.0+

<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
```json
{
"url": "https://nucleus-rpc.alpha.komodo.earth",
"komodo_proxy": true
}
```
</CollapsibleSection>

### TendermintNode

The `TendermintNode` object includes the following items for a given coin or token:

| Parameter | Type | Description |
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| url | string | URL of an RPC node |
| 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) |

#### v2.1.0 (current release)

<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
```json
{
"url": "http://eth1.cipig.net:8555",
"komodo_proxy": false
}
```
</CollapsibleSection>

<Note>
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.
</Note>

#### v2.2.0+

<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
```json
{
"url": "https://nucleus-rpc.alpha.komodo.earth",
"komodo_proxy": true
}
```
</CollapsibleSection>
Expand Down
1 change: 1 addition & 0 deletions src/pages/komodo-defi-framework/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
| [get\_relay\_mesh](/komodo-defi-framework/api/legacy/get_relay_mesh/#get-relay-mesh) | | |
| | [get\_staking\_infos](/komodo-defi-framework/api/v20/get_staking_infos/#get-staking-infos) | |
| [get\_trade\_fee](/komodo-defi-framework/api/legacy/get_trade_fee/#get-trade-fee) | | |
| | [get\_wallet\_names](/komodo-defi-framework/api/v20/get_wallet_names/#get-wallet-names) | |
| [import\_swaps](/komodo-defi-framework/api/legacy/import_swaps/#import-swaps) | | |
| [kmd\_rewards\_info](/komodo-defi-framework/api/legacy/kmd_rewards_info/#kmd-rewards-info) | | |
| | | [lightning::nodes::add\_trusted\_node](/komodo-defi-framework/api/v20-dev/lightning/nodes/#add-trusted-node) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ Additionally, it supports ERC20 tokens on the ETH chain and associated ERC20 lik
"nodes": [
{
"url": "http://eth1.cipig.net:18555",
"gui_auth": false
"komodo_proxy": false
},
{
"url": "https://node.komodo.earth:8080/ethereum",
"gui_auth": true
"komodo_proxy": true
}
],
"rpc_mode": "Http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
| 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](/komodo-defi-framework/api/common_structures/activation/#tokens-request) objects. |
| rpc\_urls | array of strings | **v2.1.0 and earlier only.** A list of RPC urls for Tendermint full node servers. |
| nodes | array of objects | **v2.2.0+ only.** A list of [TendermintNode objects](/komodo-defi-framework/api/common_structures/activation/#tendermint-node). |
| 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](/komodo-defi-framework/api/legacy/my_tx_history/#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 |
Expand All @@ -29,14 +31,19 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
| 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. |
| tokens\_tickers | array | Only returned when `get_balances` is `false`. A list of each token which was activated. |

<Note>
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).
</Note>

### 📌 Examples

#### Request default optional values
#### Request using `rpc_urls` parameter (kdf version \< 2.2.0)

<CodeGroup title="" tag="POST" label="enable_tendermint_with_assets" mm2MethodDecorate="true">
```json
{
"method": "enable_tendermint_with_assets",
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"params": {
"ticker": "IRIS",
Expand All @@ -49,8 +56,7 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
"https://iris.komodo.earth/",
"https://rpc.irishub-1.irisnet.org"
]
},
"userpass": "RPC_UserP@SSW0RD"
}
}
```
</CodeGroup>
Expand Down Expand Up @@ -87,6 +93,7 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
```json
{
"method": "enable_tendermint_with_assets",
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"params": {
"ticker": "IRIS",
Expand All @@ -95,14 +102,21 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
"ticker": "ATOM-IBC_IRIS"
}
],
"rpc_urls": [
"https://iris.komodo.earth/",
"https://rpc.irishub-1.irisnet.org"
"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
}
],
"tx_history": true,
"get_balances": false
},
"userpass": "RPC_UserP@SSW0RD"
}
}
```
</CodeGroup>
Expand All @@ -124,6 +138,64 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
```
</CollapsibleSection>

#### Request using `nodes` parameter (kdf version 2.2.0+)

<CodeGroup title="" tag="POST" label="enable_tendermint_with_assets" mm2MethodDecorate="true">
```json
{
"method": "enable_tendermint_with_assets",
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"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
}
]
}
}
```
</CodeGroup>

<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
#### Response

```json
{
"mmrpc": "2.0",
"result": {
"ticker": "IRIS",
"address": "iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k",
"current_block": 19769638,
"balance": {
"spendable": "44.147264",
"unspendable": "0"
},
"tokens_balances": {
"ATOM-IBC_IRIS": {
"spendable": "0.028306",
"unspendable": "0"
}
}
},
"id": null
}
```
</CollapsibleSection>

<CollapsibleSection expandedText="Hide Errors" collapsedText="Show Errors">
### Error Types

Expand Down
18 changes: 0 additions & 18 deletions src/pages/komodo-defi-framework/api/v20/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -383,24 +383,6 @@ Where the value indicates:
```
</CollapsibleSection>

### EvmNode

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

| Parameter | Type | Description |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| url | string | URL of an RPC node |
| gui\_auth | boolean | Optional, defaults to `false`. Must be set to `true` to access RPC nodes run officially by the Komodo Platform team |

<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
```json
{
"url": "http://eth1.cipig.net:8555",
"gui_auth": false
}
```
</CollapsibleSection>

### CoinProtocol

| Parameter | Type | Description |
Expand Down
Loading