Skip to content

Commit fd8930d

Browse files
committed
Merge branch 'dev' into enabled_coins_v2
2 parents 9cff8be + 75c7103 commit fd8930d

File tree

169 files changed

+5168
-1897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+5168
-1897
lines changed

authors.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
6565
],
6666
"socials": {
67-
"twitter": "",
67+
"twitter": "_sotdev",
6868
"linkedin": ""
6969
},
7070
"id": 51881311,

data-for-gpts/all-content.txt

+327-263
Large diffs are not rendered by default.

data-for-gpts/komodefi-api/all-api-content.txt

+321-255
Large diffs are not rendered by default.

data-for-gpts/komodefi-api/legacy-api-content.txt

+94-82
Original file line numberDiff line numberDiff line change
@@ -1289,23 +1289,18 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
12891289

12901290
#### Arguments
12911291

1292-
| Structure | Type | Description |
1293-
| ---------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1294-
| coin | string | Ticker of coin to activate |
1295-
| 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. |
1292+
| Structure | Type | Description | |
1293+
| ------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
1294+
| coin | string | Ticker of coin to activate | |
1295+
| 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. | |
1301+
| swap\_contract\_address | string | QRC20 only. Address of etomic swap smart contract | |
1302+
| fallback\_swap\_contract | string | QRC20 only. Address of backup etomic swap smart contract | |
1303+
| 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. | |
13091304

13101305
#### Response
13111306

@@ -1330,15 +1325,22 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
13301325
"method": "electrum",
13311326
"servers": [
13321327
{
1333-
"url": "electrum1.cipig.net:10063"
1328+
"url": "electrum1.cipig.net:10063",
1329+
"protocol": "TCP"
13341330
},
13351331
{
1336-
"url": "electrum2.cipig.net:10063"
1332+
"url": "electrum2.cipig.net:20063",
1333+
"protocol": "SSL",
1334+
"disable_cert_verification": true
13371335
},
13381336
{
1339-
"url": "electrum3.cipig.net:10063"
1337+
"url": "electrum3.cipig.net:20063",
1338+
"protocol": "SSL",
1339+
"ws_url": "electrum3.cipig.net:30063"
13401340
}
13411341
],
1342+
"min_connected": 1,
1343+
"max_connected": 2,
13421344
"userpass": "RPC_UserP@SSW0RD"
13431345
}
13441346
```
@@ -1434,7 +1436,7 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
14341436
}
14351437
```
14361438

1437-
#### Response (Error, `mm2` is not set)
1439+
#### Error responses
14381440

14391441
If mm2 is not set in either the command or your `coins` file, you will see the following error:
14401442

@@ -1444,6 +1446,22 @@ If mm2 is not set in either the command or your `coins` file, you will see the f
14441446
}
14451447
```
14461448

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+
14471465
## Enable Method
14481466

14491467
#### Arguments
@@ -1994,6 +2012,61 @@ The `disable_coin` method deactivates the previously enabled coin, and also canc
19942012
}
19952013
}
19962014
```
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.
2021+
2022+
## Arguments
2023+
2024+
| Structure | Type | Description |
2025+
| --------- | ---- | ----------- |
2026+
| (none) | | |
2027+
2028+
#### Response
2029+
2030+
| Structure | Type | Description |
2031+
| --------------------- | ----- | ---------------------------------------------- |
2032+
| PeerID-Multiaddresses | Array | All connected peers with their multiaddresses. |
2033+
2034+
#### 📌 Example
2035+
2036+
```json
2037+
{
2038+
"userpass": "RPC_UserP@SSW0RD",
2039+
"method": "get_directly_connected_peers"
2040+
}
2041+
```
2042+
2043+
```json
2044+
{
2045+
"result": {
2046+
"12D3KooWM8BrDBXc1TVw2vswoqYcQVn7fFvpAvcCfaV2Uqg2L9jU": [
2047+
"/ip4/89.248.168.39/tcp/42845"
2048+
],
2049+
"12D3KooWJ3dEWK7ym1uwc5SmwbmfFSRmELrA9aPJYxFRrQCCNdwF": [
2050+
"/ip4/188.124.46.112/tcp/42845/p2p/12D3KooWJ3dEWK7ym1uwc5SmwbmfFSRmELrA9aPJYxFRrQCCNdwF"
2051+
],
2052+
"12D3KooWL6yrrNACb7t7RPyTEPxKmq8jtrcbkcNd6H5G2hK7bXaL": [
2053+
"/ip4/168.119.236.233/tcp/42845/p2p/12D3KooWL6yrrNACb7t7RPyTEPxKmq8jtrcbkcNd6H5G2hK7bXaL"
2054+
],
2055+
"12D3KooWPR2RoPi19vQtLugjCdvVmCcGLP2iXAzbDfP3tp81ZL4d": [
2056+
"/ip4/168.119.237.13/tcp/42845/p2p/12D3KooWPR2RoPi19vQtLugjCdvVmCcGLP2iXAzbDfP3tp81ZL4d"
2057+
],
2058+
"12D3KooWKxavLCJVrQ5Gk1kd9m6cohctGQBmiKPS9XQFoXEoyGmS": [
2059+
"/ip4/168.119.236.249/tcp/42845/p2p/12D3KooWKxavLCJVrQ5Gk1kd9m6cohctGQBmiKPS9XQFoXEoyGmS"
2060+
],
2061+
"12D3KooWDbBdifGp3viDR4dCECEFKepjhwhd2YwAqgNVdXpEeewu": [
2062+
"/ip4/80.82.76.214/tcp/42845"
2063+
],
2064+
"12D3KooWJDoV9vJdy6PnzwVETZ3fWGMhV41VhSbocR1h2geFqq9Y": [
2065+
"/ip4/89.248.173.231/tcp/42845"
2066+
]
2067+
}
2068+
}
2069+
```
19972070
export const title = "Komodo DeFi Framework Method: Get Enabled Coins";
19982071
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.";
19992072

@@ -2225,67 +2298,6 @@ The `get_my_peer_id` method returns your unique identifying Peer ID on the netwo
22252298
"result": "12D3KooWS9MeuFZhJCfQTntwbTVnXMAJpz9Tvd1XYFuURrGqnJVR"
22262299
}
22272300
```
2228-
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.
2236-
2237-
## Arguments
2238-
2239-
| Structure | Type | Description |
2240-
| --------- | ---- | ----------- |
2241-
| (none) | | |
2242-
2243-
#### Response
2244-
2245-
| Structure | Type | Description |
2246-
| --------------------- | ----- | ---------------------------------------------- |
2247-
| PeerID-Multiaddresses | Array | All connected peers with their multiaddresses. |
2248-
2249-
#### 📌 Examples
2250-
2251-
#### Command
2252-
2253-
```json
2254-
{
2255-
"userpass": "RPC_UserP@SSW0RD",
2256-
"method": "get_peers_info"
2257-
}
2258-
```
2259-
2260-
#### Response (success)
2261-
2262-
```json
2263-
{
2264-
"result": {
2265-
"12D3KooWM8BrDBXc1TVw2vswoqYcQVn7fFvpAvcCfaV2Uqg2L9jU": [
2266-
"/ip4/89.248.168.39/tcp/42845"
2267-
],
2268-
"12D3KooWJ3dEWK7ym1uwc5SmwbmfFSRmELrA9aPJYxFRrQCCNdwF": [
2269-
"/ip4/188.124.46.112/tcp/42845/p2p/12D3KooWJ3dEWK7ym1uwc5SmwbmfFSRmELrA9aPJYxFRrQCCNdwF"
2270-
],
2271-
"12D3KooWL6yrrNACb7t7RPyTEPxKmq8jtrcbkcNd6H5G2hK7bXaL": [
2272-
"/ip4/168.119.236.233/tcp/42845/p2p/12D3KooWL6yrrNACb7t7RPyTEPxKmq8jtrcbkcNd6H5G2hK7bXaL"
2273-
],
2274-
"12D3KooWPR2RoPi19vQtLugjCdvVmCcGLP2iXAzbDfP3tp81ZL4d": [
2275-
"/ip4/168.119.237.13/tcp/42845/p2p/12D3KooWPR2RoPi19vQtLugjCdvVmCcGLP2iXAzbDfP3tp81ZL4d"
2276-
],
2277-
"12D3KooWKxavLCJVrQ5Gk1kd9m6cohctGQBmiKPS9XQFoXEoyGmS": [
2278-
"/ip4/168.119.236.249/tcp/42845/p2p/12D3KooWKxavLCJVrQ5Gk1kd9m6cohctGQBmiKPS9XQFoXEoyGmS"
2279-
],
2280-
"12D3KooWDbBdifGp3viDR4dCECEFKepjhwhd2YwAqgNVdXpEeewu": [
2281-
"/ip4/80.82.76.214/tcp/42845"
2282-
],
2283-
"12D3KooWJDoV9vJdy6PnzwVETZ3fWGMhV41VhSbocR1h2geFqq9Y": [
2284-
"/ip4/89.248.173.231/tcp/42845"
2285-
]
2286-
}
2287-
}
2288-
```
22892301
export const title = "Komodo DeFi Framework Method: Get Relay Mesh";
22902302
export const description = "The get_relay_mesh method returns a list of peerIDs included in our local relay mesh.";
22912303

data-for-gpts/komodefi-api/v20-api-content.txt

+101
Original file line numberDiff line numberDiff line change
@@ -2245,6 +2245,54 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
22452245
"id": null
22462246
}
22472247
```
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.
2254+
2255+
## Arguments
2256+
2257+
| Parameter | Type | Description |
2258+
| --------- | ------- | --------------------------------------------------------------------------------------- |
2259+
| coin | string | A compatible (UTXO) coin's ticker |
2260+
| id | integer | Optional. Identifies a request to allow matching it with a response. Defaults to `null` |
2261+
2262+
#### Response
2263+
2264+
| Parameter | Type | Description |
2265+
| --------- | ------- | ------------------------------------------------------------------------------------------------------------- |
2266+
| mtp | integer | Unix timestamp |
2267+
| id | integer | Identifies a response to allow matching it with a request. Defaults to `null` if `id` not provided in request |
2268+
2269+
#### 📌 Examples
2270+
2271+
#### Command
2272+
2273+
```json
2274+
{
2275+
"method": "get_current_mtp",
2276+
"userpass": "RPC_UserP@SSW0RD",
2277+
"mmrpc": "2.0",
2278+
"id": 42,
2279+
"params": {
2280+
"coin": "DOC"
2281+
}
2282+
}
2283+
```
2284+
2285+
#### Response (success)
2286+
2287+
```json
2288+
{
2289+
"mmrpc": "2.0",
2290+
"result": {
2291+
"mtp": 1658746383
2292+
},
2293+
"id": 42
2294+
}
2295+
```
22482296
export const title = "Komodo DeFi Framework Method: Get Public Key";
22492297
export const description = "The get_public_key method returns the compressed secp256k1 pubkey corresponding to the user's seed phrase.";
22502298

@@ -4648,6 +4696,59 @@ The v2 `orderbook` method requests from the network the currently available orde
46484696
"id": 42
46494697
}
46504698
```
4699+
export const title = "Komodo DeFi Framework Method: Peer Connection Healthcheck";
4700+
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`.
4705+
4706+
## Arguments
4707+
4708+
| Structure | Type | Description |
4709+
| --------- | ---- | ----------- |
4710+
| (none) | | |
4711+
4712+
#### Response
4713+
4714+
| Structure | Type | Description |
4715+
| --------- | ------- | --------------------------------------- |
4716+
| result | boolean | True if peer found connected to network |
4717+
4718+
#### 📌 Examples
4719+
4720+
#### Command
4721+
4722+
```json
4723+
{
4724+
"userpass": "RPC_UserP@SSW0RD",
4725+
"method": "peer_connection_healthcheck",
4726+
"mmrpc": "2.0",
4727+
"params": {
4728+
"peer_address": "12D3KooWCcjBQ3kG3BzjVwuZqGDL2YxXik6SCDv2YAHj4E54NiAy"
4729+
}
4730+
}
4731+
```
4732+
4733+
#### Response (peer found)
4734+
4735+
```json
4736+
{
4737+
"mmrpc": "2.0",
4738+
"result": true,
4739+
"id": null
4740+
}
4741+
```
4742+
4743+
#### Response (peer not found)
4744+
4745+
```json
4746+
{
4747+
"mmrpc": "2.0",
4748+
"result": false,
4749+
"id": null
4750+
}
4751+
```
46514752
export const title = "Komodo DeFi Framework Method: Recreate Swap Data";
46524753
export const description = "The recreate_swap_data method helps recover lost swap data due to storage errors or hardware failure.";
46534754

0 commit comments

Comments
 (0)