Skip to content

Commit

Permalink
[Bot] File and author data updated, validated and updated internal li…
Browse files Browse the repository at this point in the history
…nks, formatted md content, checked presence of file and dirs based on sidebar, checked presence of h1 in every file, update Komodo DeFi Framework methods table, adds/updates preview images when base is main
  • Loading branch information
gcharang authored Oct 31, 2024
1 parent 20a038d commit 850e071
Show file tree
Hide file tree
Showing 234 changed files with 629 additions and 326 deletions.
2 changes: 1 addition & 1 deletion authors.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"samiodev@icloud.com"
],
"socials": {
"twitter": "",
"twitter": "_sotdev",
"linkedin": ""
},
"id": 51881311,
Expand Down
226 changes: 148 additions & 78 deletions data-for-gpts/all-content.txt

Large diffs are not rendered by default.

212 changes: 142 additions & 70 deletions data-for-gpts/komodefi-api/all-api-content.txt

Large diffs are not rendered by default.

60 changes: 39 additions & 21 deletions data-for-gpts/komodefi-api/legacy-api-content.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1289,23 +1289,18 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.

#### Arguments

| Structure | Type | Description |
| ---------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| coin | string | Ticker of coin to activate |
| servers | array of objects | List of \[Electrum servers] ([https://github.com/KomodoPlatform/coins/tree/master/electrums](https://github.com/KomodoPlatform/coins/tree/master/electrums)) |
| servers.url | string | Electrum server URL |
| servers.protocol | string (optional, defaults to `TCP`) | Transport protocol used by Komodo DeFi Framework API to connect to the electrum server (`TCP` or `SSL`) |
| 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 |
| 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` |
| 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 |
| 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. |
| 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. |
| swap\_contract\_address | string (required for QRC20 only) | address of etomic swap smart contract |
| fallback\_swap\_contract | string (required for QRC20 only) | address of backup etomic swap smart contract |
| utxo\_merge\_params | object (optional) | If set, will consolidate excessive UTXOs (e.g. from mining) |
| utxo\_merge\_params.merge\_at | integer | Number of UTXOs in wallet required before merging |
| 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. |
| 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. |
| Structure | Type | Description | |
| ------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| coin | string | Ticker of coin to activate | |
| servers | list of objects | A list of standard [ActivationServers](/komodo-defi-framework/api/common_structures/activation/#activation-servers) objects. | |
| 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` | |
| min\_connected | integer | Optional, defaults to `1`. Minimum number of electrum servers to maintain an active connection to. | |
| 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. | |
| 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. | |
| 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. | |
| swap\_contract\_address | string | QRC20 only. Address of etomic swap smart contract | |
| fallback\_swap\_contract | string | QRC20 only. Address of backup etomic swap smart contract | |
| 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. | |

#### Response

Expand All @@ -1330,15 +1325,22 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
"method": "electrum",
"servers": [
{
"url": "electrum1.cipig.net:10063"
"url": "electrum1.cipig.net:10063",
"protocol": "TCP"
},
{
"url": "electrum2.cipig.net:10063"
"url": "electrum2.cipig.net:20063",
"protocol": "SSL",
"disable_cert_verification": true
},
{
"url": "electrum3.cipig.net:10063"
"url": "electrum3.cipig.net:20063",
"protocol": "SSL",
"ws_url": "electrum3.cipig.net:30063"
}
],
"min_connected": 1,
"max_connected": 2,
"userpass": "RPC_UserP@SSW0RD"
}
```
Expand Down Expand Up @@ -1434,7 +1436,7 @@ Electrum mode is only available for UTXO based coins and QTUM/QRC20 tokens.
}
```

#### Response (Error, `mm2` is not set)
#### Error responses

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

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

If min\_connected is \< 1, you will see the following error:

```json
{
"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"
}
```

If max\_connected is \< min\_connected, you will see the following error:

```json
{
"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)"
}
```

## Enable Method

#### Arguments
Expand Down
101 changes: 101 additions & 0 deletions data-for-gpts/komodefi-api/v20-api-content.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,54 @@ Use this method to activate Tendermint coins (COSMOS/IRIS/OSMOSIS) and IBC asset
"id": null
}
```
export const title = "Komodo DeFi Framework Method: Get Current MTP";
export const description = "The get_current_mtp method returns the Median Time Past (MTP) from electrum servers for UTXO coins.";

# get\_current\_mtp

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.

## Arguments

| Parameter | Type | Description |
| --------- | ------- | --------------------------------------------------------------------------------------- |
| coin | string | A compatible (UTXO) coin's ticker |
| id | integer | Optional. Identifies a request to allow matching it with a response. Defaults to `null` |

#### Response

| Parameter | Type | Description |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| mtp | integer | Unix timestamp |
| id | integer | Identifies a response to allow matching it with a request. Defaults to `null` if `id` not provided in request |

#### 📌 Examples

#### Command

```json
{
"method": "get_current_mtp",
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"id": 42,
"params": {
"coin": "DOC"
}
}
```

#### Response (success)

```json
{
"mmrpc": "2.0",
"result": {
"mtp": 1658746383
},
"id": 42
}
```
export const title = "Komodo DeFi Framework Method: Get Public Key";
export const description = "The get_public_key method returns the compressed secp256k1 pubkey corresponding to the user's seed phrase.";

Expand Down Expand Up @@ -4648,6 +4696,59 @@ The v2 `orderbook` method requests from the network the currently available orde
"id": 42
}
```
export const title = "Komodo DeFi Framework Method: Peer Connection Healthcheck";
export const description = "The peer_connection_healthcheck method checks if a peer is connected to the KDF network.";

# peer\_connection\_healthcheck

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`.

## Arguments

| Structure | Type | Description |
| --------- | ---- | ----------- |
| (none) | | |

#### Response

| Structure | Type | Description |
| --------- | ------- | --------------------------------------- |
| result | boolean | True if peer found connected to network |

#### 📌 Examples

#### Command

```json
{
"userpass": "RPC_UserP@SSW0RD",
"method": "peer_connection_healthcheck",
"mmrpc": "2.0",
"params": {
"peer_address": "12D3KooWCcjBQ3kG3BzjVwuZqGDL2YxXik6SCDv2YAHj4E54NiAy"
}
}
```

#### Response (peer found)

```json
{
"mmrpc": "2.0",
"result": true,
"id": null
}
```

#### Response (peer not found)

```json
{
"mmrpc": "2.0",
"result": false,
"id": null
}
```
export const title = "Komodo DeFi Framework Method: Recreate Swap Data";
export const description = "The recreate_swap_data method helps recover lost swap data due to storage errors or hardware failure.";

Expand Down
48 changes: 0 additions & 48 deletions data-for-gpts/komodefi-api/v20-dev-api-content.txt
Original file line number Diff line number Diff line change
@@ -1,51 +1,3 @@
export const title = "Komodo DeFi Framework Method: Get Current MTP";
export const description = "The get_current_mtp method returns the Median Time Past (MTP) from electrum servers for UTXO coins.";

# get\_current\_mtp

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.

## Arguments

| Parameter | Type | Description |
| --------- | ------- | --------------------------------------------------------------------------------------- |
| coin | string | A compatible (UTXO) coin's ticker |
| id | integer | Optional. Identifies a request to allow matching it with a response. Defaults to `null` |

#### Response

| Parameter | Type | Description |
| --------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| mtp | integer | Unix timestamp |
| id | integer | Identifies a response to allow matching it with a request. Defaults to `null` if `id` not provided in request |

#### 📌 Examples

#### Command

```json
{
"method": "get_current_mtp",
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"id": 42,
"params": {
"coin": "DOC"
}
}
```

#### Response (success)

```json
{
"mmrpc": "2.0",
"result": {
"mtp": 1658746383
},
"id": 42
}
```
export const title = "Komodo DeFi Framework Method: Get Locked Amount";
export const description = "The get_locked_amount method returns the amount of a coin which is currently locked by a swap which is in progress.";

Expand Down
Loading

0 comments on commit 850e071

Please sign in to comment.