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)) |
1296
-
| servers.url | string | Electrum server URL |
1297
-
| servers.protocol | string (optional, defaults to `TCP`) | Transport protocol used by Komodo DeFi Framework API to connect to the electrum server (`TCP` or `SSL`) |
1298
-
| 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). Use at your own risk |
1299
-
| 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` |
1300
-
| 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 |
1301
-
| 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. |
1302
-
| 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. |
1303
-
| swap\_contract\_address | string (required for QRC20 only) | address of etomic swap smart contract |
1304
-
| fallback\_swap\_contract | string (required for QRC20 only) | address of backup etomic swap smart contract |
1305
-
| utxo\_merge\_params | object (optional) | If set, will consolidate excessive UTXOs (e.g. from mining) |
1306
-
| utxo\_merge\_params.merge\_at | integer | Number of UTXOs in wallet required before merging |
1307
-
| 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. |
1308
-
| 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. | |
1296
+
| 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` | |
1297
+
| min\_connected | integer | Optional, defaults to `1`. Minimum number of electrum servers to maintain an active connection to. | |
1298
+
| 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. | |
1299
+
| 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. | |
1300
+
| 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. | |
1309
1304
1310
1305
#### Response
1311
1306
@@ -1330,15 +1325,22 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
1330
1325
"method": "electrum",
1331
1326
"servers": [
1332
1327
{
1333
-
"url": "electrum1.cipig.net:10063"
1328
+
"url": "electrum1.cipig.net:10063",
1329
+
"protocol": "TCP"
1334
1330
},
1335
1331
{
1336
-
"url": "electrum2.cipig.net:10063"
1332
+
"url": "electrum2.cipig.net:20063",
1333
+
"protocol": "SSL",
1334
+
"disable_cert_verification": true
1337
1335
},
1338
1336
{
1339
-
"url": "electrum3.cipig.net:10063"
1337
+
"url": "electrum3.cipig.net:20063",
1338
+
"protocol": "SSL",
1339
+
"ws_url": "electrum3.cipig.net:30063"
1340
1340
}
1341
1341
],
1342
+
"min_connected": 1,
1343
+
"max_connected": 2,
1342
1344
"userpass": "RPC_UserP@SSW0RD"
1343
1345
}
1344
1346
```
@@ -1434,7 +1436,7 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
1434
1436
}
1435
1437
```
1436
1438
1437
-
#### Response (Error, `mm2` is not set)
1439
+
#### Error responses
1438
1440
1439
1441
If mm2 is not set in either the command or your `coins` file, you will see the following error:
1440
1442
@@ -1444,6 +1446,22 @@ If mm2 is not set in either the command or your `coins` file, you will see the f
1444
1446
}
1445
1447
```
1446
1448
1449
+
If min\_connected is \< 1, you will see the following error:
1450
+
1451
+
```json
1452
+
{
1453
+
"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"
1454
+
}
1455
+
```
1456
+
1457
+
If max\_connected is \< min\_connected, you will see the following error:
1458
+
1459
+
```json
1460
+
{
1461
+
"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)"
1462
+
}
1463
+
```
1464
+
1447
1465
## Enable Method
1448
1466
1449
1467
#### Arguments
@@ -1994,6 +2012,61 @@ The `disable_coin` method deactivates the previously enabled coin, and also canc
1994
2012
}
1995
2013
}
1996
2014
```
2015
+
export const title = "Komodo DeFi Framework Method: Get Peers Info";
2016
+
export const description = "The get_directly_connected_peers method returns an array of peers (with their multiaddresses) currently connected to the requesting node.";
2017
+
2018
+
# get\_directly\_connected\_peers
2019
+
2020
+
The `get_directly_connected_peers` method all connected peers with their multiaddresses. See [https://docs.libp2p.io/concepts/addressing/](https://docs.libp2p.io/concepts/addressing/) for more information.
export const title = "Komodo DeFi Framework Method: Get Enabled Coins";
1998
2071
export const description = "The get_enabled_coins method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node.";
1999
2072
@@ -2225,67 +2298,6 @@ The `get_my_peer_id` method returns your unique identifying Peer ID on the netwo
export const title = "Komodo DeFi Framework Method: Get Peers Info";
2229
-
export const description = "The get_peers_info method all connected peers with their multiaddresses.";
2230
-
2231
-
# get\_peers\_info
2232
-
2233
-
**get\_peers\_info**
2234
-
2235
-
The `get_peers_info` method all connected peers with their multiaddresses. See [https://docs.libp2p.io/concepts/addressing/](https://docs.libp2p.io/concepts/addressing/) for more information.
Copy file name to clipboardexpand all lines: data-for-gpts/komodefi-api/v20-api-content.txt
+101
Original file line number
Diff line number
Diff line change
@@ -2245,6 +2245,54 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
2245
2245
"id": null
2246
2246
}
2247
2247
```
2248
+
export const title = "Komodo DeFi Framework Method: Get Current MTP";
2249
+
export const description = "The get_current_mtp method returns the Median Time Past (MTP) from electrum servers for UTXO coins.";
2250
+
2251
+
# get\_current\_mtp
2252
+
2253
+
The `get_current_mtp` method returns the Median Time Past (MTP) from electrum servers for UTXO coins. This information is useful for debugging, specifically in cases where an electrum server has been misconfigured.
export const description = "The peer_connection_healthcheck method checks if a peer is connected to the KDF network.";
4701
+
4702
+
# peer\_connection\_healthcheck
4703
+
4704
+
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`.
0 commit comments