You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 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. |
| 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. ||
| 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. ||
83
78
84
79
#### Response
85
80
@@ -105,15 +100,22 @@ Komodo DeFi Framework is a true cross chain, cross protocol Decentralized Exchan
105
100
"method": "electrum",
106
101
"servers": [
107
102
{
108
-
"url": "electrum1.cipig.net:10063"
103
+
"url": "electrum1.cipig.net:10063",
104
+
"protocol": "TCP"
109
105
},
110
106
{
111
-
"url": "electrum2.cipig.net:10063"
107
+
"url": "electrum2.cipig.net:20063",
108
+
"protocol": "SSL",
109
+
"disable_cert_verification": true
112
110
},
113
111
{
114
-
"url": "electrum3.cipig.net:10063"
112
+
"url": "electrum3.cipig.net:20063",
113
+
"protocol": "SSL",
114
+
"ws_url": "electrum3.cipig.net:30063"
115
115
}
116
116
],
117
+
"min_connected": 1,
118
+
"max_connected": 2,
117
119
"userpass": "RPC_UserP@SSW0RD"
118
120
}
119
121
```
@@ -218,17 +220,33 @@ Komodo DeFi Framework is a true cross chain, cross protocol Decentralized Exchan
218
220
"result": "success"
219
221
}
220
222
```
223
+
</CollapsibleSection>
221
224
222
-
#### Response (Error, `mm2` is not set)
225
+
#### Error responses
223
226
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:
225
228
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)"
exportconst title ="Komodo DeFi Framework Method: Peer Connection Healthcheck";
2
+
exportconst description ="The peer_connection_healthcheck method checks if a peer is connected to the KDF network.";
3
+
4
+
# peer\_connection\_healthcheck
5
+
6
+
The `peer_connection_healthcheck` method checks if a peer is connected to the KDF network using the [currently configured](/komodo-defi-framework/setup/configure-mm2-json/)`netid`.
Copy file name to clipboardexpand all lines: src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx
+6-6
Original file line number
Diff line number
Diff line change
@@ -78,15 +78,15 @@ When running the Komodo DeFi API via commandline with the `mm2` binary, some bas
78
78
79
79
#### Example for HD Wallets:
80
80
81
-
If you are using HD wallets, you will need to add the `hd_account_id` value to your `MM2.json` file. This value will be used in the derivation path for all coins, and will take the place of the `COIN_ID` value in the following path: `m/44'/COIN_ID'/<hd_account_id>'/CHAIN/ADDRESS_ID`.
81
+
If you are using HD wallets, you will need to set `enable_hd` to `true` in to your `MM2.json` file.
82
82
83
83
<Note>
84
-
Using the same seed phrase with / without setting the `hd_account_id` value
84
+
Using the same seed phrase with / without setting `enable_hd` to `true`
85
85
will result in different addresses being generated. For example, when using
86
-
the seed phrase `february soldier message acid member jump shadow walk novel impose puppy tornado`: - If the `hd_account_id` value is set to `0` in
86
+
the seed phrase `february soldier message acid member jump shadow walk novel impose puppy tornado`: - If `enable_hd`is `true` in your
87
87
MM2.json, the first address in the wallet returns the address
88
-
`0x26cE5D1cD4CC673a1b0b980371C7c862B9503452` for ETH - If the `hd_account_id`
89
-
value is not set, the wallet will return the address
88
+
`0x26cE5D1cD4CC673a1b0b980371C7c862B9503452` for ETH - If the `enable_hd`
89
+
is `false` (or not set), the wallet will return the address
90
90
`0x8c40a6E127c7a13e26ce95deA88354C3fb134580` for ETH
91
91
</Note>
92
92
@@ -98,7 +98,7 @@ If you are using HD wallets, you will need to add the `hd_account_id` value to y
0 commit comments