diff --git a/filepathSlugs.json b/filepathSlugs.json index a6cc9349..84340ff0 100644 --- a/filepathSlugs.json +++ b/filepathSlugs.json @@ -2826,6 +2826,14 @@ "command", "response-success" ], + "src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx": [ + "get-enabled-coins", + "parameters", + "response", + "examples", + "command", + "response-2" + ], "src/pages/komodo-defi-framework/api/v20/get_public_key/index.mdx": [ "get-public-key", "arguments", diff --git a/src/data/sidebar.json b/src/data/sidebar.json index 168e7fd4..dd63f252 100644 --- a/src/data/sidebar.json +++ b/src/data/sidebar.json @@ -475,6 +475,10 @@ { "title": "Wallet", "links": [ + { + "title": "get_enabled_coins", + "href": "/komodo-defi-framework/api/v20/get_enabled_coins/" + }, { "title": "get_public_key", "href": "/komodo-defi-framework/api/v20/get_public_key/" diff --git a/src/pages/komodo-defi-framework/api/index.mdx b/src/pages/komodo-defi-framework/api/index.mdx index 742f3c10..70f7c428 100644 --- a/src/pages/komodo-defi-framework/api/index.mdx +++ b/src/pages/komodo-defi-framework/api/index.mdx @@ -39,7 +39,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods: | | | [get\_claimable\_balances](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-claimable-balances) | | | [get\_current\_mtp](/komodo-defi-framework/api/v20/get_current_mtp/#get-current-mtp) | | | [get\_directly\_connected\_peers](/komodo-defi-framework/api/legacy/get_directly_connected_peers/#get-directly-connected-peers) | | | -| [get\_enabled\_coins](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins) | | | +| [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) | | | [get\_gossip\_mesh](/komodo-defi-framework/api/legacy/get_gossip_mesh/#get-gossip-mesh) | | | | [get\_gossip\_peer\_topics](/komodo-defi-framework/api/legacy/get_gossip_peer_topics/#get-gossip-peer-topics) | | | | [get\_gossip\_topic\_peers](/komodo-defi-framework/api/legacy/get_gossip_topic_peers/#get-gossip-topic-peers) | | | diff --git a/src/pages/komodo-defi-framework/api/legacy/get_enabled_coins/index.mdx b/src/pages/komodo-defi-framework/api/legacy/get_enabled_coins/index.mdx index acc6add0..5fb1d5ef 100644 --- a/src/pages/komodo-defi-framework/api/legacy/get_enabled_coins/index.mdx +++ b/src/pages/komodo-defi-framework/api/legacy/get_enabled_coins/index.mdx @@ -7,6 +7,11 @@ export const description = "The get_enabled_coins method returns data of coins t The `get_enabled_coins` method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node. + + 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. + 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. + + ## Arguments | Structure | Type | Description | diff --git a/src/pages/komodo-defi-framework/api/v20-dev/hd_wallets_overview/index.mdx b/src/pages/komodo-defi-framework/api/v20-dev/hd_wallets_overview/index.mdx index 51ba6e50..f69aee11 100644 --- a/src/pages/komodo-defi-framework/api/v20-dev/hd_wallets_overview/index.mdx +++ b/src/pages/komodo-defi-framework/api/v20-dev/hd_wallets_overview/index.mdx @@ -16,7 +16,7 @@ HD wallets offer several advantages over traditional wallets: * 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. - To use HD wallet functionality with the Komodo DeFi Framework API, you must include `"enable_hd":true` in your `MM2.json` file. + 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/). Hardware wallets like [Trezor](https://trezor.io/) are always in HD mode, and this parameter **must** to be set to `true`. diff --git a/src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx b/src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx new file mode 100644 index 00000000..b748e900 --- /dev/null +++ b/src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx @@ -0,0 +1,85 @@ +export const title = "Komodo DeFi Framework Method: Get Enabled Coins"; +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."; + +# get\_enabled\_coins + +The `get_enabled_coins` method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node. + +## Parameters + +| Structure | Type | Description | +| --------- | ---- | ----------- | +| (none) | | | + +#### Response + +| Structure | Type | Description | +| ------------ | ---------------- | ----------------------------------------------- | +| coins | array of objects | A list of key value pairs for activated tickers | +| coins.ticker | string | the ticker of an activated coin | + + + The \[get\_enabled\_coins v2.0] method does not return addresses, as it was designed for HD wallets, which generate addresses on the fly. + 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). + + +#### 📌 Examples + +#### Command + + + ```json + { + "userpass": "RPC_UserP@SSW0RD", + "mmrpc": "2.0", + "method": "get_enabled_coins", + "params": {}, + "id": 0 + } + ``` + + + + #### Response + + ```json + { + "mmrpc": "2.0", + "result": { + "coins": [ + { + "ticker": "ETH" + }, + { + "ticker": "PGX-PLG20" + }, + { + "ticker": "ATOM-IBC_IRIS" + }, + { + "ticker": "NFT_ETH" + }, + { + "ticker": "KMD" + }, + { + "ticker": "IRIS" + }, + { + "ticker": "AAVE-PLG20" + }, + { + "ticker": "MINDS-ERC20" + }, + { + "ticker": "NFT_MATIC" + }, + { + "ticker": "MATIC" + } + ] + }, + "id": 0 + } + ``` + diff --git a/src/pages/komodo-defi-framework/changelog/index.mdx b/src/pages/komodo-defi-framework/changelog/index.mdx index ef9f500e..e5f6d3dc 100644 --- a/src/pages/komodo-defi-framework/changelog/index.mdx +++ b/src/pages/komodo-defi-framework/changelog/index.mdx @@ -29,7 +29,7 @@ This release introduces a range of significant features designed to enhance the * **HD Wallet:** - * 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. + * 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. * 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. diff --git a/src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx b/src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx index 7fdbfb56..060c63cb 100644 --- a/src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx +++ b/src/pages/komodo-defi-framework/setup/configure-mm2-json/index.mdx @@ -78,7 +78,7 @@ When running the Komodo DeFi API via commandline with the `mm2` binary, some bas #### Example for HD Wallets: -If you are using HD wallets, you will need to set `enable_hd` to `true` in to your `MM2.json` file. +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/). Using the same seed phrase with / without setting `enable_hd` to `true`