From 6bd53479676c9eb845793f084baf3bf79eeef7b9 Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 17 Oct 2024 01:25:47 +0800 Subject: [PATCH] add v2 get_enabled_coins method --- filepathSlugs.json | 8 ++ src/data/sidebar.json | 4 + src/pages/komodo-defi-framework/api/index.mdx | 2 +- .../api/legacy/get_enabled_coins/index.mdx | 4 + .../api/v20/get_enabled_coins/index.mdx | 82 +++++++++++++++++++ 5 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx diff --git a/filepathSlugs.json b/filepathSlugs.json index 3a7c3340..9fdc6706 100644 --- a/filepathSlugs.json +++ b/filepathSlugs.json @@ -2816,6 +2816,14 @@ "token-protocol-parse-error-error", "unexpected-token-protocol-error" ], + "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 9bdda563..352a2508 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 724fb7ce..31a88ab7 100644 --- a/src/pages/komodo-defi-framework/api/index.mdx +++ b/src/pages/komodo-defi-framework/api/index.mdx @@ -38,7 +38,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods: | | | [get\_channel\_details](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-channel-details) | | | | [get\_claimable\_balances](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-claimable-balances) | | | | [get\_current\_mtp](/komodo-defi-framework/api/v20-dev/get_current_mtp/#get-current-mtp) | -| [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..4dda815c 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,10 @@ 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 is deprecated. Please consider using [get\_enabled\_coins v2.0](/komodo-defi-framework/api/v20/get_enabled_coins/) instead. + + ## Arguments | Structure | Type | Description | 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..5e9f4030 --- /dev/null +++ b/src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx @@ -0,0 +1,82 @@ +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 + +**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 | +| ticker | string | the ticker of an activated coin | + +#### 📌 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 + } + ``` +