Skip to content

Commit 18f702b

Browse files
authored
Merge pull request #354 from KomodoPlatform/enabled_coins_v2
2 parents b741054 + fd8930d commit 18f702b

File tree

8 files changed

+106
-4
lines changed

8 files changed

+106
-4
lines changed

filepathSlugs.json

+8
Original file line numberDiff line numberDiff line change
@@ -2826,6 +2826,14 @@
28262826
"command",
28272827
"response-success"
28282828
],
2829+
"src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx": [
2830+
"get-enabled-coins",
2831+
"parameters",
2832+
"response",
2833+
"examples",
2834+
"command",
2835+
"response-2"
2836+
],
28292837
"src/pages/komodo-defi-framework/api/v20/get_public_key/index.mdx": [
28302838
"get-public-key",
28312839
"arguments",

src/data/sidebar.json

+4
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,10 @@
475475
{
476476
"title": "Wallet",
477477
"links": [
478+
{
479+
"title": "get_enabled_coins",
480+
"href": "/komodo-defi-framework/api/v20/get_enabled_coins/"
481+
},
478482
{
479483
"title": "get_public_key",
480484
"href": "/komodo-defi-framework/api/v20/get_public_key/"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
3939
| | | [get\_claimable\_balances](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-claimable-balances) |
4040
| | [get\_current\_mtp](/komodo-defi-framework/api/v20/get_current_mtp/#get-current-mtp) | |
4141
| [get\_directly\_connected\_peers](/komodo-defi-framework/api/legacy/get_directly_connected_peers/#get-directly-connected-peers) | | |
42-
| [get\_enabled\_coins](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins) | | |
42+
| [get\_enabled\_coins](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins) | [get\_enabled\_coins](/komodo-defi-framework/api/v20/get_enabled_coins/#get-enabled-coins) | |
4343
| [get\_gossip\_mesh](/komodo-defi-framework/api/legacy/get_gossip_mesh/#get-gossip-mesh) | | |
4444
| [get\_gossip\_peer\_topics](/komodo-defi-framework/api/legacy/get_gossip_peer_topics/#get-gossip-peer-topics) | | |
4545
| [get\_gossip\_topic\_peers](/komodo-defi-framework/api/legacy/get_gossip_topic_peers/#get-gossip-topic-peers) | | |

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

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export const description = "The get_enabled_coins method returns data of coins t
77

88
The `get_enabled_coins` method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node.
99

10+
<Note>
11+
This function has been deprecated by [get\_enabled\_coins v2.0](/komodo-defi-framework/api/v20/get_enabled_coins/). The v2 method does not return addresses, as it was designed for HD wallets, which generate addresses on the fly.
12+
If you need to get the addresses for coins and have not set `enable_hd` in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/), use the v1 method.
13+
</Note>
14+
1015
## Arguments
1116

1217
| Structure | Type | Description |

src/pages/komodo-defi-framework/api/v20-dev/hd_wallets_overview/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ HD wallets offer several advantages over traditional wallets:
1616
* Access Control: A user who controls the root seed can create new addresses & keypairs which can be shared with a 3rd party, providing limited or regulated access to funds held under specific pairs.
1717

1818
<Note type="info">
19-
To use HD wallet functionality with the Komodo DeFi Framework API, you must include `"enable_hd":true` in your `MM2.json` file.
19+
To use HD wallet functionality with the Komodo DeFi Framework API, you must include `"enable_hd":true` in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/).
2020
Hardware wallets like [Trezor](https://trezor.io/) are always in HD mode, and this parameter **must** to be set to `true`.
2121
</Note>
2222

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
export const title = "Komodo DeFi Framework Method: Get Enabled Coins";
2+
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.";
3+
4+
# get\_enabled\_coins
5+
6+
The `get_enabled_coins` method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node.
7+
8+
## Parameters
9+
10+
| Structure | Type | Description |
11+
| --------- | ---- | ----------- |
12+
| (none) | | |
13+
14+
#### Response
15+
16+
| Structure | Type | Description |
17+
| ------------ | ---------------- | ----------------------------------------------- |
18+
| coins | array of objects | A list of key value pairs for activated tickers |
19+
| coins.ticker | string | the ticker of an activated coin |
20+
21+
<Note>
22+
The \[get\_enabled\_coins v2.0] method does not return addresses, as it was designed for HD wallets, which generate addresses on the fly.
23+
If you need to get the addresses for coins and have not set `enable_hd` in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/), use the [v1 method](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins).
24+
</Note>
25+
26+
#### 📌 Examples
27+
28+
#### Command
29+
30+
<CodeGroup title="" tag="POST" label="get_enabled_coins" mm2MethodDecorate="true">
31+
```json
32+
{
33+
"userpass": "RPC_UserP@SSW0RD",
34+
"mmrpc": "2.0",
35+
"method": "get_enabled_coins",
36+
"params": {},
37+
"id": 0
38+
}
39+
```
40+
</CodeGroup>
41+
42+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
43+
#### Response
44+
45+
```json
46+
{
47+
"mmrpc": "2.0",
48+
"result": {
49+
"coins": [
50+
{
51+
"ticker": "ETH"
52+
},
53+
{
54+
"ticker": "PGX-PLG20"
55+
},
56+
{
57+
"ticker": "ATOM-IBC_IRIS"
58+
},
59+
{
60+
"ticker": "NFT_ETH"
61+
},
62+
{
63+
"ticker": "KMD"
64+
},
65+
{
66+
"ticker": "IRIS"
67+
},
68+
{
69+
"ticker": "AAVE-PLG20"
70+
},
71+
{
72+
"ticker": "MINDS-ERC20"
73+
},
74+
{
75+
"ticker": "NFT_MATIC"
76+
},
77+
{
78+
"ticker": "MATIC"
79+
}
80+
]
81+
},
82+
"id": 0
83+
}
84+
```
85+
</CollapsibleSection>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This release introduces a range of significant features designed to enhance the
2929

3030
* **HD Wallet:**
3131

32-
* HD wallet functionalities were fully implemented by @shamardy for UTXO and EVM coins, allowing users to enable the feature with `"enable_hd": true`. For Tendermint and Pirate coins, only a single address is supported, following the BIP32/39/44 standards.
32+
* HD wallet functionalities were fully implemented by @shamardy for UTXO and EVM coins, allowing users to enable the feature with `"enable_hd": true` in the [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/). For Tendermint and Pirate coins, only a single address is supported, following the BIP32/39/44 standards.
3333

3434
* This implementation simplifies the process of importing mnemonics from other wallets into the Komodo DeFi Framework (KDF), enabling users to retain their balances, transaction history, and more.
3535

src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ When running the Komodo DeFi API via commandline with the `mm2` binary, some bas
7878

7979
#### Example for HD Wallets:
8080

81-
If you are using HD wallets, you will need to set `enable_hd` to `true` in to your `MM2.json` file.
81+
If you are using HD wallets, you will need to set `enable_hd` to `true` in to your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/).
8282

8383
<Note>
8484
Using the same seed phrase with / without setting `enable_hd` to `true`

0 commit comments

Comments
 (0)