Skip to content

Commit ca203e5

Browse files
committed
sync dev
2 parents fc9f85b + 20a038d commit ca203e5

File tree

8 files changed

+464
-56
lines changed

8 files changed

+464
-56
lines changed

filepathSlugs.json

+18-9
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,7 @@
22612261
"response-success-2",
22622262
"qtum-qrc-20-coin-activation",
22632263
"response-success-3",
2264-
"response-error-mm2-is-not-set",
2264+
"error-responses",
22652265
"enable-method",
22662266
"arguments-2",
22672267
"response-2",
@@ -2816,6 +2816,14 @@
28162816
"token-protocol-parse-error-error",
28172817
"unexpected-token-protocol-error"
28182818
],
2819+
"src/pages/komodo-defi-framework/api/v20/get_current_mtp/index.mdx": [
2820+
"get-current-mtp",
2821+
"arguments",
2822+
"response",
2823+
"examples",
2824+
"command",
2825+
"response-success"
2826+
],
28192827
"src/pages/komodo-defi-framework/api/v20/get_public_key/index.mdx": [
28202828
"get-public-key",
28212829
"arguments",
@@ -2979,6 +2987,15 @@
29792987
"command",
29802988
"response-2"
29812989
],
2990+
"src/pages/komodo-defi-framework/api/v20/peer_connection_healthcheck/index.mdx": [
2991+
"peer-connection-healthcheck",
2992+
"arguments",
2993+
"response",
2994+
"examples",
2995+
"command",
2996+
"response-peer-found",
2997+
"response-peer-not-found"
2998+
],
29822999
"src/pages/komodo-defi-framework/api/v20/recreate_swap_data/index.mdx": [
29833000
"recreate-swap-data",
29843001
"arguments",
@@ -3120,14 +3137,6 @@
31203137
"invalid-request-wrong-parameter-type",
31213138
"invalid-fee-policy-attempt-to-use-eth-gas-for-utxo-coin"
31223139
],
3123-
"src/pages/komodo-defi-framework/api/v20-dev/get_current_mtp/index.mdx": [
3124-
"get-current-mtp",
3125-
"arguments",
3126-
"response",
3127-
"examples",
3128-
"command",
3129-
"response-success"
3130-
],
31313140
"src/pages/komodo-defi-framework/api/v20-dev/get_locked_amount/index.mdx": [
31323141
"get-locked-amount",
31333142
"arguments",

postman/collections/komodo_defi.postman_collection.json

+322-3
Large diffs are not rendered by default.

src/data/sidebar.json

+13-9
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,19 @@
504504
"href": "/komodo-defi-framework/api/v20/withdraw/"
505505
}
506506
]
507+
},
508+
{
509+
"title": "Utility",
510+
"links": [
511+
{
512+
"title": "peer_connection_healthcheck",
513+
"href": "/komodo-defi-framework/api/v20/peer_connection_healthcheck/"
514+
},
515+
{
516+
"title": "get_current_mtp",
517+
"href": "/komodo-defi-framework/api/v20/get_current_mtp/"
518+
}
519+
]
507520
}
508521
]
509522
},
@@ -514,15 +527,6 @@
514527
"titleLink": "/komodo-defi-framework/api/v20-dev/",
515528
"links": []
516529
},
517-
{
518-
"title": "Utility",
519-
"links": [
520-
{
521-
"title": "get_current_mtp",
522-
"href": "/komodo-defi-framework/api/v20-dev/get_current_mtp/"
523-
}
524-
]
525-
},
526530
{
527531
"title": "HD Wallet Tasks",
528532
"links": [

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
3737
| | [enable\_tendermint\_with\_assets](/komodo-defi-framework/api/v20/enable_tendermint_with_assets/#enable-tendermint-with-assets) | |
3838
| | | [get\_channel\_details](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-channel-details) |
3939
| | | [get\_claimable\_balances](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-claimable-balances) |
40-
| | | [get\_current\_mtp](/komodo-defi-framework/api/v20-dev/get_current_mtp/#get-current-mtp) |
40+
| | [get\_current\_mtp](/komodo-defi-framework/api/v20/get_current_mtp/#get-current-mtp) | |
4141
| [get\_enabled\_coins](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins) | | |
4242
| [get\_gossip\_mesh](/komodo-defi-framework/api/legacy/get_gossip_mesh/#get-gossip-mesh) | | |
4343
| [get\_gossip\_peer\_topics](/komodo-defi-framework/api/legacy/get_gossip_peer_topics/#get-gossip-peer-topics) | | |
@@ -83,6 +83,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
8383
| [orderbook](/komodo-defi-framework/api/legacy/orderbook/#orderbook) | [orderbook](/komodo-defi-framework/api/v20/orderbook/#orderbook) | |
8484
| [orderbook\_depth](/komodo-defi-framework/api/legacy/orderbook_depth/#orderbook-depth) | | |
8585
| [orders\_history\_by\_filter](/komodo-defi-framework/api/legacy/orders_history_by_filter/#orders-history-by-filter) | | |
86+
| | [peer\_connection\_healthcheck](/komodo-defi-framework/api/v20/peer_connection_healthcheck/#peer-connection-healthcheck) | |
8687
| [recover\_funds\_of\_swap](/komodo-defi-framework/api/legacy/recover_funds_of_swap/#recover-funds-of-swap) | | |
8788
| | [recreate\_swap\_data](/komodo-defi-framework/api/v20/recreate_swap_data/#recreate-swap-data) | |
8889
| | | [refresh\_nft\_metadata](/komodo-defi-framework/api/v20-dev/non_fungible_tokens/refresh_nft_metadata/#refresh-nft-metadata) |

src/pages/komodo-defi-framework/api/legacy/coin_activation/index.mdx

+46-28
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,18 @@ Komodo DeFi Framework is a true cross chain, cross protocol Decentralized Exchan
6363

6464
#### Arguments
6565

66-
| Structure | Type | Description |
67-
| ---------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
68-
| coin | string | Ticker of coin to activate |
69-
| servers | array of objects | List of \[Electrum servers] ([https://github.com/KomodoPlatform/coins/tree/master/electrums](https://github.com/KomodoPlatform/coins/tree/master/electrums)) |
70-
| servers.url | string | Electrum server URL |
71-
| servers.protocol | string (optional, defaults to `TCP`) | Transport protocol used by Komodo DeFi Framework API to connect to the electrum server (`TCP` or `SSL`) |
72-
| servers.disable\_cert\_verification | bool (optional, defaults to `false`.) | If `true`, this disables server SSL/TLS certificate verification (e.g. to use self-signed certificate). <b>Use at your own risk</b> |
73-
| 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` |
74-
| tx\_history | bool | If `true` the Komodo DeFi Framework API will preload trasaction 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 |
75-
| required\_confirmations | integer (optional, defaults to `3`) | Number of confirmations for the Komodo DeFi Framework API to wait during the transaction steps of an atomic swap. |
76-
| requires\_notarization | boolean (optional, defaults to `false`) | If `true`, coins protected by [Komodo Platform's dPoW security](https://satindergrewal.medium.com/delayed-proof-of-work-explained-9a74250dbb86) will wait for a notarization before progressing to the next atomic swap transactions step. |
77-
| swap\_contract\_address | string (required for QRC20 only) | address of etomic swap smart contract |
78-
| fallback\_swap\_contract | string (required for QRC20 only) | address of backup etomic swap smart contract |
79-
| utxo\_merge\_params | object (optional) | If set, will consolidate excessive UTXOs (e.g. from mining) |
80-
| utxo\_merge\_params.merge\_at | integer | Number of UTXOs in wallet required before merging |
81-
| utxo\_merge\_params.check\_every | integer | How often to check the UTXO count, in seconds. Ideally should be at least 3x the coins block time. |
82-
| utxo\_merge\_params.max\_merge\_at\_once | integer | Maximum number of UTXOs to merge in each consolidation transaction. Should be less that `merge_at` value, but will fail if so high the transaction becomes too large. Suggested maximum is 250. |
66+
| Structure | Type | Description | |
67+
| ------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
68+
| coin | string | Ticker of coin to activate | |
69+
| servers | list of objects | A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | |
70+
| 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` | |
71+
| min\_connected | integer | Optional, defaults to `1`. Minimum number of electrum servers to maintain an active connection to. | |
72+
| max\_connected | integer | Optional. Maximum number of electrum servers to maintain an active connection to. If not set, defaults to all servers in activation request. | |
73+
| required\_confirmations | integer | Optional, defaults to `3`. Number of confirmations for the Komodo DeFi Framework API to wait during the transaction steps of an atomic swap. | |
74+
| requires\_notarization | boolean | Optional, defaults to `false`. If `true`, coins protected by [Komodo Platform's dPoW security](https://satindergrewal.medium.com/delayed-proof-of-work-explained-9a74250dbb86) will wait for a notarization before progressing to the next atomic swap transactions step. | |
75+
| swap\_contract\_address | string | QRC20 only. Address of etomic swap smart contract | |
76+
| fallback\_swap\_contract | string | QRC20 only. Address of backup etomic swap smart contract | |
77+
| utxo\_merge\_params | object | A standard [UtxoMergeParams](/komodo-defi-framework/api/common_structures/activation/#utxo-merge-params) object. Used to reduce a wallet's UTXO count in cases where it is causing significantly slower RPC responses. | |
8378

8479
#### Response
8580

@@ -105,15 +100,22 @@ Komodo DeFi Framework is a true cross chain, cross protocol Decentralized Exchan
105100
"method": "electrum",
106101
"servers": [
107102
{
108-
"url": "electrum1.cipig.net:10063"
103+
"url": "electrum1.cipig.net:10063",
104+
"protocol": "TCP"
109105
},
110106
{
111-
"url": "electrum2.cipig.net:10063"
107+
"url": "electrum2.cipig.net:20063",
108+
"protocol": "SSL",
109+
"disable_cert_verification": true
112110
},
113111
{
114-
"url": "electrum3.cipig.net:10063"
112+
"url": "electrum3.cipig.net:20063",
113+
"protocol": "SSL",
114+
"ws_url": "electrum3.cipig.net:30063"
115115
}
116116
],
117+
"min_connected": 1,
118+
"max_connected": 2,
117119
"userpass": "RPC_UserP@SSW0RD"
118120
}
119121
```
@@ -218,17 +220,33 @@ Komodo DeFi Framework is a true cross chain, cross protocol Decentralized Exchan
218220
"result": "success"
219221
}
220222
```
223+
</CollapsibleSection>
221224

222-
#### Response (Error, `mm2` is not set)
225+
#### Error responses
223226

224-
If mm2 is not set in either the command or your `coins` file, you will see the following error:
227+
If mm2 is not set in either the command or your `coins` file, you will see the following error:
225228

226-
```json
227-
{
228-
"error": "lp_coins:943] lp_coins:693] mm2 param is not set neither in coins config nor enable request, assuming that coin is not supported"
229-
}
230-
```
231-
</CollapsibleSection>
229+
```json
230+
{
231+
"error": "lp_coins:943] lp_coins:693] mm2 param is not set neither in coins config nor enable request, assuming that coin is not supported"
232+
}
233+
```
234+
235+
If min\_connected is \< 1, you will see the following error:
236+
237+
```json
238+
{
239+
"error":"rpc:184] dispatcher_legacy:141] lp_commands_legacy:141] lp_coins:4462] utxo_standard:73] utxo_coin_builder:616] Internal error: manager:129] min_connected should be greater than 0"
240+
}
241+
```
242+
243+
If max\_connected is \< min\_connected, you will see the following error:
244+
245+
```json
246+
{
247+
"error": "rpc:184] dispatcher_legacy:141] lp_commands_legacy:141] lp_coins:4462] utxo_standard:73] utxo_coin_builder:616] Internal error: manager:132] min_connected (2) must be <= max_connected (1)"
248+
}
249+
```
232250

233251
## Enable Method
234252

0 commit comments

Comments
 (0)