From 95d42a82e2d90a4c2be854d4e75456bdd7769f97 Mon Sep 17 00:00:00 2001 From: LowKey <167090408+l0vvkey@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:29:03 +0800 Subject: [PATCH 1/4] add Gem Wallet to compatible-wallets.mdx Please add Gem Wallet for compatible wallet. Ankr validators are added as an option. --- pages/staking-extra/compatible-wallets.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/staking-extra/compatible-wallets.mdx b/pages/staking-extra/compatible-wallets.mdx index 3655c0f79..dd335a5ba 100755 --- a/pages/staking-extra/compatible-wallets.mdx +++ b/pages/staking-extra/compatible-wallets.mdx @@ -9,10 +9,11 @@ The following hot wallets are compatible with Ankr Staking: * [Metamask](https://metamask.io) * [OKX](https://www.okx.com/) (doesn't support Gnosis network) * [Trust Wallet](https://trustwallet.com/) +* [Gem Wallet](https://gemwallet.com/) * [WalletConnect](https://walletconnect.com/) The following cold wallets are compatible with Ankr Staking: * [Ledger Nano S, X, S plus](https://www.ledger.com/) (through MetaMask) Additionally, for some chains such you need to use a chain specific wallet such as in addition to an EVM compatible wallet: -* Polkadot — [Polkadot.js](https://polkadot.js.org/) \ No newline at end of file +* Polkadot — [Polkadot.js](https://polkadot.js.org/) From 7db2583abc7d6e026636e1e9ba41e18d5b709423 Mon Sep 17 00:00:00 2001 From: galleon8 Date: Wed, 11 Jun 2025 15:09:49 +0300 Subject: [PATCH 2/4] Sei unsupported methods --- pages/rpc-service/chains/chains-list.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pages/rpc-service/chains/chains-list.mdx b/pages/rpc-service/chains/chains-list.mdx index 11341fbcc..6c00280ce 100644 --- a/pages/rpc-service/chains/chains-list.mdx +++ b/pages/rpc-service/chains/chains-list.mdx @@ -9027,6 +9027,20 @@ This section contains a list of methods we don't support for _Premium_ service p If you require any of the methods from the list, contact our Sales (`sales@ankr.com`) about moving to the _Enterprise_ service plan that can provide the services tailored to your specific needs. +**EVM JSON-RPC**: + +**HTTPS**: + +`eth_newFilter`, `eth_getFilterChanges`, `eth_coinbase`, `eth_hashrate`, `eth_mining`, `eth_getWork`,`eth_submitWork`, `eth_submitHashrate`, `net_peerCount`, `eth_newBlockFilter`, `eth_newPendingTransactionFilter`, `eth_uninstallFilter`, `eth_getFilterLogs`, + +`debug_*` (exception: `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceTransaction`, `debug_traceCall`, `debug_traceBlock`), + +`personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*` + +**WSS**: + +`txpool_content`, `txpool_inspect`, `txpool_status`, `txpool_contentFrom` + **Tendermint (both for REST and JSON-RPC)**: `/health`, From ac0faebbda861e7038a7701474700bc7a98f0167 Mon Sep 17 00:00:00 2001 From: Dmitry Kovtunov Date: Fri, 26 Sep 2025 15:29:17 +0300 Subject: [PATCH 3/4] Merge pull request #1885 from Ankr-network/hotfix/MRPC-7093-auth-app-path fix: MRPC-7093 Fixed auth appPath for production --- src/components/Web3APIButton/utils/getURL.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Web3APIButton/utils/getURL.ts b/src/components/Web3APIButton/utils/getURL.ts index ab32aaac5..df1c85e48 100644 --- a/src/components/Web3APIButton/utils/getURL.ts +++ b/src/components/Web3APIButton/utils/getURL.ts @@ -8,7 +8,7 @@ export const getURL = (isSignedIn: boolean) => { const host = window.location.host; const appPath = host && !host.includes("localhost") - ? `${host}/rpc/auth/` + ? `${host.replace("www.", "")}/rpc/auth/` : process.env.NEXT_PUBLIC_WEB3_API_AUTH_APP_PATH!; return getSignInUrl({ From 1c6205ac0d4e5e41c9843170ecb0d7085f7bbc94 Mon Sep 17 00:00:00 2001 From: Aleksandr Ishchenko Date: Fri, 20 Mar 2026 14:13:14 +0300 Subject: [PATCH 4/4] feat: WEBSITE-787 Migrate from strapi.ankr.com to strapi.ankr.network (#1934) --- pages/delegated-staking/ankr/faq.mdx | 16 ++- pages/delegated-staking/gnosis/faq.mdx | 26 +++-- pages/liquid-staking/avax/faq.mdx | 24 +++-- pages/liquid-staking/bnb/faq.mdx | 50 +++++++--- pages/liquid-staking/dot/faq.mdx | 2 +- pages/liquid-staking/eth/faq.mdx | 26 +++-- pages/liquid-staking/flow/faq.mdx | 20 +++- pages/liquid-staking/ftm/faq.mdx | 42 +++++--- pages/liquid-staking/ksm/faq.mdx | 47 +++++++++ pages/liquid-staking/pol/faq.mdx | 50 +++++++--- pages/liquid-staking/ssv/faq.mdx | 63 ++++++++++++ pages/liquid-staking/sui/faq.mdx | 63 ++++++++++++ pages/liquid-staking/wnd/faq.mdx | 47 +++++++++ pages/liquid-staking/xdc/faq.mdx | 69 +++++++++++++ src/scripts/update-strapi-faq-files.js | 130 ++++++++++++++++++++----- 15 files changed, 579 insertions(+), 96 deletions(-) create mode 100644 pages/liquid-staking/ksm/faq.mdx create mode 100644 pages/liquid-staking/ssv/faq.mdx create mode 100644 pages/liquid-staking/sui/faq.mdx create mode 100644 pages/liquid-staking/wnd/faq.mdx create mode 100644 pages/liquid-staking/xdc/faq.mdx diff --git a/pages/delegated-staking/ankr/faq.mdx b/pages/delegated-staking/ankr/faq.mdx index 9b5babe18..93efc2e90 100644 --- a/pages/delegated-staking/ankr/faq.mdx +++ b/pages/delegated-staking/ankr/faq.mdx @@ -8,9 +8,9 @@ As of now, staking ANKR is only available on ERC-20. ### What is the minimum and maximum amount of ANKR I can stake? -* Minimum — 1000 ANKR. +- Minimum — 1000 ANKR. -* Maximum — unlimited. +- Maximum — unlimited. ### When can I unstake? @@ -20,6 +20,8 @@ After the locking period of 84–91 days, which begins after you stake, you’ll The unstaking process takes two steps: + + 1. Undelegate period that lasts one next epoch, which is one next week after your unstaking operation. So, it can taken take 7–14 days, e.g. 14 days if you unstake on Monday, 13 — on Tuesday, and so on. 2. Once the undelegate period has ended, you can claim your unstaked ANKR. @@ -34,7 +36,9 @@ Rewards accumulate on the weekly basis. ### When and how often can I claim or restake my rewards? -When you’ve staked, you can claim or restake your first rewards after the epoch following your stake, which translates into current + next epoch. An epoch is 7 days. If you staked at the beginning of an epoch, you can claim your first rewards after 14 days, whereas if you staked at the end of an epoch, you can claim them in 7 days. +When you’ve staked, you can claim or restake your first rewards after the epoch following your stake, which translates into current + next epoch. An epoch is 7 days. If you staked at the beginning of an epoch, you can claim your first rewards after 14 days, whereas if you staked at the end of an epoch, you can claim them in 7 days. + + Following this, you can claim or restake new chunks of your rewards each next epoch, which is each 7 days. @@ -60,7 +64,11 @@ Rewards must be claimed from the [Ankr website](https://www.ankr.com/staking/das ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). ### Where can I get more ANKR? diff --git a/pages/delegated-staking/gnosis/faq.mdx b/pages/delegated-staking/gnosis/faq.mdx index 3c645631c..153c7a684 100644 --- a/pages/delegated-staking/gnosis/faq.mdx +++ b/pages/delegated-staking/gnosis/faq.mdx @@ -4,7 +4,13 @@ The only risk for stakers is missing out on rewards during any time a validator ### Where can I get GNO? -Refer to the [GNO staking guide](https://www.ankr.com/docs/delegated-staking/gnosis/stake/#get-gno). You will need to: +Refer to the [GNO staking guide](https://www.ankr.com/docs/delegated-staking/gnosis/stake/#get-gno). + + + +You will need to: + + 1. Purchase GNO on Ethereum. @@ -12,15 +18,15 @@ Refer to the [GNO staking guide](https://www.ankr.com/docs/delegated-staking/gno ### What is the minimum and maximum amount of GNO I can stake? -* Minimum — 0.00001 GNO. +- Minimum — 0.00001 GNO. -* Maximum — limited by the specific Node Provider capacity (count of supported keys by the provider, each key allows to stake 1 GNO). +- Maximum — limited by the specific Node Provider capacity (count of supported keys by the provider, each key allows to stake 1 GNO). ### Is my GNO staked immediately? -Gnosis Protocol accepts stakes with a minimum of 1 GNO. To bypass this and accept your stake if it's lower than 1 GNO, we created a micropool that accumulates user stakes. Once it has 1 GNO, we stake it with Gnosis. +Gnosis Protocol accepts stakes with a minimum of 1 GNO. To bypass this and accept your stake if it's lower than 1 GNO, we created a micropool that accumulates user stakes. Once it has 1 GNO, we stake it with Gnosis. + - This is why your stake may have to wait a while until it's really staked with Gnosis. @@ -34,7 +40,9 @@ Rewards accumulate on the daily basis. ### How long does it take to unstake my GNO? -The unbond period is dynamic on the Gnosis Protocol and changes depending on the number of unstake requests in the unstake queue. +The unbond period is dynamic on the Gnosis Protocol and changes depending on the number of unstake requests in the unstake queue. + + After you unstake, it takes on average 3-4 days before the GNO is released to your wallet. @@ -52,4 +60,8 @@ Ankr takes a 30% technical service fee from the staking reward to cover the prov ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). diff --git a/pages/liquid-staking/avax/faq.mdx b/pages/liquid-staking/avax/faq.mdx index a95b5b8f3..b549f6704 100644 --- a/pages/liquid-staking/avax/faq.mdx +++ b/pages/liquid-staking/avax/faq.mdx @@ -20,9 +20,9 @@ You will receive your staked AVAX once the nearest validator completes its valid ### How do I receive rewards? -aAVAXb is not actively supported anymore. We recommend you [switch your aAVAXb for ankrAVAX (ex-aAVAXc)](https://www.ankr.com/staking/switch/?from=aAVAXb). +aAVAXb is not actively supported anymore. We recommend you [switch your aAVAXb for ankrAVAX (ex-aAVAXc)](https://www.ankr.com/staking/switch/?from=aAVAXb). + - ankrAVAX (ex-aAVAXc) is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to AVAX, so the redemption price of 1 ankrAVAX will grow over time because of reward accumulation. @@ -46,15 +46,21 @@ The only risk for stakers is missing out on rewards during any time a validator You can trade them in the listed liquidity pools on ANKR DeFi: -* [ankrAVAX (ex-aAVAXc)](https://www.ankr.com/staking/defi/?assets=ankrAVAX) + + +- [ankrAVAX (ex-aAVAXc)](https://www.ankr.com/staking/defi/?assets=ankrAVAX) + + You can also use your Liquid Staking tokens to: -* [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. -* [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. -* [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. +- [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. + +- [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. + +- [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. ### Can I get staking metrics for my integration? @@ -66,4 +72,8 @@ ankrAVAX (ex-aAVAXc) only changes in value, which is why the amount of ankrAVAX ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). diff --git a/pages/liquid-staking/bnb/faq.mdx b/pages/liquid-staking/bnb/faq.mdx index d733fc4b9..840b5d05d 100644 --- a/pages/liquid-staking/bnb/faq.mdx +++ b/pages/liquid-staking/bnb/faq.mdx @@ -10,23 +10,27 @@ Yes — there is a [user guide](https://www.ankr.com/docs/liquid-staking/bnb/sta You can stake from 0.1 BNB. You must also count in the gas fee on top for sending the transaction. -### Why do I get less ankrBNB (ex-aBNBc) for my 1 BNB? - -ankrBNB (ex-aBNBc) only changes in value, which is why the amount of ankrBNB you get when staking is calculated by the formula `stake * exchange_ratio`. The exchange ratio is calculated like this: `totals_supply_of_ankrbnb / (total_staked_bnb + total_rewards_for_staked_bnb - total_unstaked_ankrbnb)`. - ### Is there a maximum amount I can stake? You can stake at your discretion, unlimited. +### What is the minimum amount of BNB I can unstake? + +You can unstake from 0.5 BNB. Also, count in the gas fee for the unstaking transaction. + +### Why do I get less ankrBNB (ex-aBNBc) for my 1 BNB? + +ankrBNB (ex-aBNBc) only changes in value, which is why the amount of ankrBNB you get when staking is calculated by the formula `stake * exchange_ratio`. The exchange ratio is calculated like this: `totals_supply_of_ankrbnb / (total_staked_bnb + total_rewards_for_staked_bnb - total_unstaked_ankrbnb)`. + ### How long does it take to unstake my BNB? You receive the unstaked BNB after the unbonding period of up to 7–15 days. ### How do I receive rewards? -aBNBb is not actively supported anymore. If you have any aBNBb in your wallet, you should receive ankrBNB automatically via airdrop. +aBNBb is not actively supported anymore. If you have any aBNBb in your wallet, you should receive ankrBNB automatically via airdrop. + - ankrBNB (ex-aBNBc) is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to BNB, so the redemption price of 1 ankrBNB will grow over time because of reward accumulation. @@ -50,15 +54,21 @@ The only risk for stakers is missing out on rewards during any time a validator You can trade them in the listed liquidity pools on ANKR DeFi: -* [ankrBNB (ex-aBNBc)](https://www.ankr.com/staking/defi/?assets=ankrBNB) + + +- [ankrBNB (ex-aBNBc)](https://www.ankr.com/staking/defi/?assets=ankrBNB) + + You can also use your Liquid Staking tokens to: -* [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. -* [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. -* [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. +- [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. + +- [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. + +- [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. ### Can I get staking metrics for my integration? @@ -66,16 +76,26 @@ Yes, if you want to integrate Ankr Liquid Staking into your product, read [Liqui ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). ### How soon will I receive my funds when unstaked? It depends what method of unstaking you're using and how large is the unstaked amount: -* With flash unstake, you'll receive your funds instantly, but this unstake type is limited by the flash pool capacity. If the unstake amount surpasses the current pool capacity, you'll be offered to do a standard unstake. -* With standard unstake, the waiting time is 7–15 days. The sum may be split into several parts, but all the parts that constitute the unstaked amount will be released to your account within the 7–15 days period. -### What is the minimum amount of BNB I can unstake? +- With flash unstake, you'll receive your funds instantly, but this unstake type is limited by the flash pool capacity. If the unstake amount surpasses the current pool capacity, you'll be offered to do a standard unstake. + +- With standard unstake, the waiting time is 7–15 days. The sum may be split into several parts, but all the parts that constitute the unstaked amount will be released to your account within the 7–15 days period. + + + + + + + -You can unstake from 0.5 BNB. Also, count in the gas fee for the unstaking transaction. diff --git a/pages/liquid-staking/dot/faq.mdx b/pages/liquid-staking/dot/faq.mdx index b54f38c1f..a4e92fd62 100755 --- a/pages/liquid-staking/dot/faq.mdx +++ b/pages/liquid-staking/dot/faq.mdx @@ -16,7 +16,7 @@ aDOTb will increase with every rebase; rebasing occurs daily. ### Does Ankr charge for the service? -Ankr takes a 10% technical service fee from the staking reward to cover for the provided services and operations. +Ankr takes a 10% technical service fee from the staking reward to cover for the provided services and operations. ### What determines the amount of reward I receive each rebase of aDOTb? diff --git a/pages/liquid-staking/eth/faq.mdx b/pages/liquid-staking/eth/faq.mdx index 7943503c9..91cd1e20e 100644 --- a/pages/liquid-staking/eth/faq.mdx +++ b/pages/liquid-staking/eth/faq.mdx @@ -2,7 +2,7 @@ Yes — there is a [user guide](https://www.ankr.com/docs/liquid-staking/eth/stake/). -### What is the minimum amount of ETH I can stake? +### What is the minimum amount of ETH I can stake? There's no minimum amount, you can stake any. @@ -24,9 +24,9 @@ Unstake time on Ethereum is dynamic and depends on the unstaking queue. You can ### How do I receive rewards? -aETHb is not actively supported anymore. We recommend you [switch your aETHb for ankrETH (ex-aETHc)](https://www.ankr.com/staking/switch/?from=aETHb). +aETHb is not actively supported anymore. We recommend you [switch your aETHb for ankrETH (ex-aETHc)](https://www.ankr.com/staking/switch/?from=aETHb). + - ankrETH (ex-aETHc) is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to ETH, so the redemption price of 1 ankrETH will grow over time because of reward accumulation. @@ -46,15 +46,21 @@ The only risk for stakers is missing out on rewards during any time a validator You can trade them in the listed liquidity pools on ANKR DeFi: -* [ankrETH (ex-aETHc)](https://www.ankr.com/staking/defi/?assets=ankrETH) + + +- [ankrETH (ex-aETHc)](https://www.ankr.com/staking/defi/?assets=ankrETH) + + You can also use your Liquid Staking tokens to: -* [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. -* [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. -* [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. +- [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. + +- [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. + +- [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. ### Why do I get less ankrETH (ex-aETHc) for my 1 ETH? @@ -62,4 +68,8 @@ ankrETH (ex-aETHc) only changes in value, which is why the amount of ankrETH you ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). diff --git a/pages/liquid-staking/flow/faq.mdx b/pages/liquid-staking/flow/faq.mdx index c01625fe3..681bc450b 100644 --- a/pages/liquid-staking/flow/faq.mdx +++ b/pages/liquid-staking/flow/faq.mdx @@ -42,15 +42,21 @@ Your stake immediately **stops** accumulating rewards once you clicked **Unstake You can trade them in the listed liquidity pools on ANKR DeFi: -* [ankrFLOW ](https://www.ankr.com/staking/defi/?networks=flow) + + +- [ankrFLOW](https://www.ankr.com/staking/defi/?networks=flow) + + You can also use your Liquid Staking tokens to: -* [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. -* [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. -* [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. +- [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. + +- [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. + +- [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. ### Can I get staking metrics for my integration? @@ -58,7 +64,11 @@ Yes, if you want to integrate Ankr Liquid Staking into your product, read [Liqui ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). ### How soon will I receive my funds when unstaked? diff --git a/pages/liquid-staking/ftm/faq.mdx b/pages/liquid-staking/ftm/faq.mdx index f77ed1d6b..761a0178c 100644 --- a/pages/liquid-staking/ftm/faq.mdx +++ b/pages/liquid-staking/ftm/faq.mdx @@ -16,15 +16,17 @@ You can stake at your discretion, unlimited. ### How long does it take to unstake my FTM? -If you decide to unstake, it can take varying time, depending on the amount you want to unstake. +If you decide to unstake, it can take varying time, depending on the amount you want to unstake. + + The unstake logic is that each time a lock-up period ends, Ankr claims all rewards for all stakes from a validator. It means if you want to unstake a small amount like 1 FTM, your request will likely fit rewards claimed at the end of the current validator's lock-up period, and you'll receive your FTM in 1 to 35 days. However, if you want to unstake 10000 FTM, this amount is unlikely to fit the current claimed rewards and will have to wait until Ankr has enough funds to fulfill the unstake request. ### How do I receive rewards? -aFTMb is not actively supported anymore. We recommend you [switch your aFTMb for ankrFTM (ex-aFTMc)](https://www.ankr.com/staking/switch/?from=aFTMb). +aFTMb is not actively supported anymore. We recommend you [switch your aFTMb for ankrFTM (ex-aFTMc)](https://www.ankr.com/staking/switch/?from=aFTMb). + - ankrFTM (ex-aFTMc) is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to FTM, so the redemption price of 1 ankrFTM will grow over time because of reward accumulation. @@ -34,9 +36,11 @@ ankrFTM (ex-aFTMc) rewards are built into the token. Effectively, your rewards a ### Does Ankr charge for the service? -For Fantom Liquid Staking. Ankr charges a 15% technical service fee. The fee is deducted from the accumulated rewards. +For Fantom Liquid Staking. Ankr charges a 15% technical service fee. The fee is deducted from the accumulated rewards. + + - Also, remember that, when unstaking, the user pays a burn fee that depends on the current liquidity and unstaked amount. +Also, remember that, when unstaking, the user pays a burn fee that depends on the current liquidity and unstaked amount. ### If I click Unstake, does my stake immediately stop accumulating rewards? @@ -44,9 +48,9 @@ Your stake stops accumulating rewards when you've gone through the unstake proce ### Is there any risk from staking, like slashing or any penalties? -If a validator node acts maliciously, delegators will also be slashed as this is an essential part of the Fantom network’s security. +If a validator node acts maliciously, delegators will also be slashed as this is an essential part of the Fantom network’s security. + - Ankr only delegates to trusted and reputable validator nodes to avoid any validator that would act maliciously. @@ -54,15 +58,21 @@ Ankr only delegates to trusted and reputable validator nodes to avoid any valida You can trade them in the listed liquidity pools on ANKR DeFi: -* [ankrFTM (ex-aFTMс)](https://www.ankr.com/staking/defi/?assets=ankrFTM) + + +- [ankrFTM (ex-aFTMс)](https://www.ankr.com/staking/defi/?assets=ankrFTM) + + You can also use your Liquid Staking tokens to: -* [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. -* [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. -* [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. +- [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. + +- [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. + +- [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. ### Can I get staking metrics for my integration? @@ -74,4 +84,12 @@ ankrFTM (ex-aFTMc) only changes in value, which is why the amount of ankrFTM you ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). + + + + diff --git a/pages/liquid-staking/ksm/faq.mdx b/pages/liquid-staking/ksm/faq.mdx new file mode 100644 index 000000000..e4808f65c --- /dev/null +++ b/pages/liquid-staking/ksm/faq.mdx @@ -0,0 +1,47 @@ +### Which wallets are compatible with the aKSMb tokens? + +aKSMb is an ERC-20 token that is compatible with Ethereum-based wallets like MetaMask. + +### Are there any docs about the KSM staking and how I set up my wallet etc.? + +Yes — there is a [user guide](https://www.ankr.com/docs/liquid-staking/ksm/stake/). + +### What is the minimum amount of KSM I can stake? + +0.1 KSM. + +### Is there a maximum amount I can stake? + +No, you can stake at your discretion, unlimited. + +### How long does it take to unstake my KSM? + +You receive the unstaked KSM after the unbonding period of up to 7 days. + +### How do I receive rewards? + +aKSMb is a rebasing token. When holding aKSMb, your balance will increase in proportion to your KSM staking rewards. A rebase runs daily, and rewards occur each time this runs. So each day, you will see the quantity of your aKSMb increase by a small amount. + +### How soon after staking will I begin to receive rewards? + +aKSMb will increase with every rebase; rebasing occurs daily. + +### Does Ankr charge for the service? + +Ankr takes a 2% technical service fee from the staking reward to cover for the provided services and operations. + +### What determines the amount of reward I receive each rebase of aKSMb? + +Staking rewards depend mostly on the voting power of the validator node that your stake is delegated to. Ankr aims to spread delegations to only the most trustworthy and reliable nodes to increase staking rewards. + +### If I click Unstake, does my stake immediately stop accumulating rewards? + +Your stake immediately **stops** accumulating rewards once you clicked **Unstake**. + +### Is there any risk from staking, like slashing or any penalties? + +The only risk for stakers is missing out on rewards during any time a validator they staked with is slashed. Slashing is a protocol-level penalty associated with a validator failure if it validates an invalid transaction, attacks the network, or goes offline. The delegated staked KSM is not slashed — slashing impacts only the self-stake of the validator. Ankr only delegates to trusted and reputable validator nodes to avoid any validator that would act maliciously. + +### Can I get staking metrics for my integration? + +Yes, if you want to integrate Ankr Liquid Staking into your product, read [Liquid Staking Metrics](https://www.ankr.com/docs/staking-for-developers/restful-api/staking-metrics/). diff --git a/pages/liquid-staking/pol/faq.mdx b/pages/liquid-staking/pol/faq.mdx index b803082d5..966f3523c 100644 --- a/pages/liquid-staking/pol/faq.mdx +++ b/pages/liquid-staking/pol/faq.mdx @@ -6,29 +6,35 @@ Check the [Stake POL](https://www.ankr.com/docs/staking/liquid-staking/pol/stake Minimum amount: -* Staking POL on Ethereum, your minimum amount is 1 POL. -* Staking POL on Polygon, there is no minimum amount. + +- Staking POL on Ethereum, your minimum amount is 1 POL. + +- Staking POL on Polygon, there is no minimum amount. + + Maximum amount: -* Staking POL on Ethereum, there is no maximum amount. -* Staking POL on Polygon, your maximum amount is limited by the cross-chain staking pool capacity. You will see the capacity while staking. + +- Staking POL on Ethereum, there is no maximum amount. + +- Staking POL on Polygon, your maximum amount is limited by the cross-chain staking pool capacity. You will see the capacity while staking. ### What is the difference between POL staking on Ethereum and Polygon? -POL staking happens on Ethereum. You can stake/unstake any POL amount at once. Ethereum gas fee applies. Also, when unstaking, you receive your POL and rewards after the 3–4 days unbonding period. +POL staking happens on Ethereum. You can stake/unstake any POL amount at once. Ethereum gas fee applies. Also, when unstaking, you receive your POL and rewards after the 3–4 days unbonding period. + - POL cross-chain staking happens on Polygon. You may have to stake/unstake your POL in portions, as you’re doing it via a cross-chain staking pool, which may not have the amount you need at the moment. Also, an additional fee applies. However, there is no unbonding period, so when unstaking you receive your POL and rewards instantly. ### How long does it take to unstake my POL? -If you staked on Ethereum, you’ll receive your POL and rewards after the unbonding period of 80+ epochs; typically, it takes 3–4 days. +If you staked on Ethereum, you’ll receive your POL and rewards after the unbonding period of 80+ epochs; typically, it takes 3–4 days. + - If you staked on Polygon via the cross-chain staking pool, you’ll receive your POL and rewards instantly. @@ -42,9 +48,13 @@ ankrPOL rewards are built into the token. Effectively, your rewards accumulate d ### Does Ankr charge for the service? -Ankr takes a 5% technical service fee from the staking reward to cover for the provided services and operations. +Ankr takes a 5% technical service fee from the staking reward to cover for the provided services and operations. + + + +Remember that when staking on Ethereum, the user pays a gas fee (typically, 0.0005 ETH), and when staking on Polygon, the user may pay a small dynamic fee. + -Remember that when staking on Ethereum, the user pays a gas fee (typically, 0.0005 ETH), and when staking on Polygon, the user may pay a small dynamic fee. Also, remember that when unstaking on Polygon, the user pays a technical service fee of 0.5% from the unstaking amount. @@ -60,15 +70,21 @@ The only risk for stakers is missing out on rewards during any time a validator You can trade them in the listed liquidity pools on ANKR DeFi: -* [ankrPOL](https://www.ankr.com/staking/defi/?assets=ankrPOL) + + +- [ankrPOL](https://www.ankr.com/staking/defi/?assets=ankrPOL) + + You can also use your Liquid Staking tokens to: -* [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. -* [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. -* [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. +- [Add liquidity on DEXs](https://www.ankr.com/docs/defi/liquidity-pools/) and earn from commissions taken when users swap tokens, using the liquidity pool you're a part of. + +- [Yield farm](https://www.ankr.com/docs/defi/yield-farming/) and earn additional rewards in the form of liquidity pool tokens and further farm them. + +- [Put your tokens in a vault](https://www.ankr.com/docs/defi/vaults/) and automatically earn additional rewards in the form of one of both assets from the pair. ### Why do I get less ankrPOL for my 1 POL? @@ -76,7 +92,11 @@ ankrPOL only changes in value, which is why the amount of ankrPOL you get when s ### Can I use cold wallets for staking? -Yes, you can use Ledger Nano cold wallets through MetaMask. Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). ### Are there any docs about the POL staking and how I set up my wallet etc.? diff --git a/pages/liquid-staking/ssv/faq.mdx b/pages/liquid-staking/ssv/faq.mdx new file mode 100644 index 000000000..51844e0b7 --- /dev/null +++ b/pages/liquid-staking/ssv/faq.mdx @@ -0,0 +1,63 @@ +### Are there any docs about the ETH staking and how I set up my wallet etc.? + +The docs are under development and will soon be released. + +### Does Ankr charge for the service? + +ANKR does not charge any technical service fees for SSV Trustless Liquid Staking. However, validators charge a fee deducted from your rewards, representing an indirect cost for liquid staking token holders. + +### How do I receive rewards? + +asETHc is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to ETH, so the redemption price of 1 asETHc will grow over time because of reward accumulation. + + + +Mind that to pull out your rewards, you’ll need to sell asETHc, for example, on Ankr DeFi, as Ethereum hasn’t implemented the unstaking functionality yet. + +### How long does it take to unstake my ETH? + +Currently, there is no unbonding period, as there is no unstaking for ETH. This functionality is to be implemented by the Ethereum team in future updates. + +### Is SSV Trustless Liquid Staking available on Ethereum MainNet? + +No, currently SSV Trustless Liquid Staking is only available on Goerli Ethereum Testnet. + + + +A Mainnet release is coming later. + +### How soon after staking will I begin to receive rewards? + +asETHc will increase in value only, daily. asETHc rewards are built into the token. Effectively, your rewards accumulate daily as asETHc grows in value to ETH. + +### Is there a maximum amount I can stake? + +No, you can stake at your discretion, unlimited. You should know that currently staking starts once 32 ETH are accumulated, so if your stake is > 32 ETH, it’ll be divided into chunks and the rule will apply to each of them. + +### Is there any liquidity for my Liquid Staking tokens anywhere? + +So far as SSV Trustless Liquid is only available on Ethereum TestNet, there are limited liquidity for asETHc. + + + +The liquidity will raise when SSV releases a MainNet version. + +### Is there any risk from staking, like slashing or any penalties? + +The only risk for stakers is missing out on rewards during any time a validator they staked with is slashed. Slashing is a protocol-level penalty associated with a validator failure if it validates an invalid transaction or goes offline. The delegated staked ETH is not slashed — slashing impacts only the self-stake of the validator. + +### What determines the appreciation of asETHc? + +Staking rewards depend mostly on the voting power of the validator node that your stake is delegated to and how much ETH is validated on the network. The less ETH is staked, the higher the rewards to incentivize more ETH to come online, and vice versa. + +### What is the change interval to increase my stake? + +0.5 ETH. It means you can stake 0.5, 1.0, 1.5 ETH, but cannot stake, for example, 0.55, 1.1, 1.88 ETH. + +### Can I use cold wallets for staking? + +Yes, you can use Ledger Nano cold wallets through MetaMask. + + + +Visit the Ledger's [guide on connecting Ledger through MetaMask](https://www.ledger.com/academy/security/the-safest-way-to-use-metamask). diff --git a/pages/liquid-staking/sui/faq.mdx b/pages/liquid-staking/sui/faq.mdx new file mode 100644 index 000000000..14a319200 --- /dev/null +++ b/pages/liquid-staking/sui/faq.mdx @@ -0,0 +1,63 @@ +### How can I set up my wallet and stake SUI? + +A user guide is coming soon. + +### What is the minimum and maximum amount I can stake and unstake? + +SUI Liquid Staking supports staking and unstaking amounts up to 9th digits after the decimal point, within the limits explained below. + + + +- Minimum amount to stake — 0.1 SUI. + +- Minimum amount to unstake — 0.5 SUI. + +- Maximum amount to stake or unstake — unlimited. + +### How will I receive rewards? + +You start accumulating rewards after you have staked your SUI and received ankrSUI — a reward-bearing token. + + + +ankrSUI is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to SUI, so the redemption price of 1 ankrSUI will grow over time because of reward accumulation. + + + +Should you want to use your rewards, you need to unstake, i.e. redeem ankrSUI for SUI, or swap ankrSUI to another asset on DEXs. + +### How soon will I start receiving staking rewards? + +ankrSUI rewards are built into the token. Effectively, your rewards accumulate daily as ankrSUI grows in value to SUI and you auto-receive them as you're holding ankrSUI. + + + +You cannot use your rewards separately from the main stake, and if you wish to use them, you need to either unstake, receiving at once your SUI stake + accumulated rewards, in SUI. + +### Does Ankr charge for the service? + +Ankr takes a 10% technical service fee from the staking reward to cover for the provided services and operations. + +### How long does it take to unstake my SUI? + +It takes up to 1 day to unstake and receive SUI to your wallet. + +### Is there any risk from staking, like slashing or any penalties? + +The only risk for stakers is missing out on rewards if the validator they staked with is slashed. Slashing is a protocol-level penalty associated with a validator failure if it validates an invalid transaction or goes offline. The delegated staked SUI is not slashed — slashing impacts only the self-stake of the validator. Ankr only delegates to trusted and reputable validator nodes to avoid any validator that would act maliciously. + +### If I click Unstake, does my stake immediately stop accumulating rewards? + +Yes, your stake immediately **stops** accumulating rewards once you clicked **Unstake**. + +### Why do I receive less than 1 ankrSUI for my 1 SUI? + +ankrSUI is a rewards-bearing token, meaning it grows in value towards SUI over time. This is why you're getting less than 1 ankrSUI for 1 SUI when staking. The current amount of ankrSUI you're getting is calculated by the formula: `stake * exchange_ratio`. The exchange ratio itself is calculated by the formula: `totals_supply_of_ankrsui / (total_staked_sui + total_rewards_for_staked_sui - total_unstaked_ankrsui)`. + +### Is there any liquidity for my Liquid Staking tokens anywhere? + +Shorty after the release of SUI Liquid Staking, we are enabling our SUI staker to trade their ankrSUI in the listed liquidity pools on Ankr DeFi. + + + +We will list specific links once ankrSUI is added to Ankr DeFi. diff --git a/pages/liquid-staking/wnd/faq.mdx b/pages/liquid-staking/wnd/faq.mdx new file mode 100644 index 000000000..861904819 --- /dev/null +++ b/pages/liquid-staking/wnd/faq.mdx @@ -0,0 +1,47 @@ +### Which wallets are compatible with the aWNDb tokens? + +aWNDb is an ERC-20 token that is compatible with Ethereum-based wallets like MetaMask. + +### Are there any docs about the WND staking and how I set up my wallet etc.? + +Yes — there is a [user guide](https://www.ankr.com/docs/staking/liquid-staking/dot/stake/). + +### What is the minimum amount of WND I can stake? + +0.1 WND. + +### Is there a maximum amount I can stake? + +No, you can stake at your discretion, unlimited. + +### How long does it take to unstake my WND? + +You receive the unstaked WND after the unbonding period of up to 7 days. + +### How do I receive rewards? + +aWNDb is a rebasing token. When holding aWNDb, your balance will increase in proportion to your WND staking rewards. A rebase runs daily, and rewards occur each time this runs. So each day, you will see the quantity of your aWNDb increase by a small amount. + +### How soon after staking will I begin to receive rewards? + +aWNDb will increase with every rebase; rebasing occurs daily. + +### Does Ankr charge for the service? + +Ankr takes a 2% technical service fee from the staking reward to cover the provided services and operations. + +### What determines the amount of reward I receive each rebase of aWNDb? + +Staking rewards depend mostly on the voting power of the validator node that your stake is delegated to. Ankr aims to spread delegations to only the most trustworthy and reliable nodes to increase staking rewards. + +### If I click Unstake, does my stake immediately stop accumulating rewards? + +Your stake immediately **stops** accumulating rewards once you clicked **Unstake**. + +### Is there any risk from staking, like slashing or any penalties? + +The only risk for stakers is missing out on rewards during any time a validator they staked with is slashed. Slashing is a protocol-level penalty associated with a validator failure if it validates an invalid transaction, attacks the network, or goes offline. The delegated staked WND is not slashed — slashing impacts only the self-stake of the validator. Ankr only delegates to trusted and reputable validator nodes to avoid any validator that would act maliciously. + +### Can I get staking metrics for my integration? + +Yes, if you want to integrate Ankr Liquid Staking into your product, read [Liquid Staking Metrics](https://www.ankr.com/docs/staking/for-integrators/restful-api/staking-metrics/). diff --git a/pages/liquid-staking/xdc/faq.mdx b/pages/liquid-staking/xdc/faq.mdx new file mode 100644 index 000000000..1bea027ea --- /dev/null +++ b/pages/liquid-staking/xdc/faq.mdx @@ -0,0 +1,69 @@ +### How can I set up my wallet and stake XDC? + +A user guide is coming soon. + +### What is the minimum and maximum amount I can stake? + +Minimum amount — 10 XDC. + + + +This rule also applies when increasing your stake — you can increase it with an increment of 10 XDC. + + + +Maximum amount — unlimited. + +### How will I receive rewards? + +You start accumulating rewards after you have staked your XDC and received aXDCc — a reward-bearing token. + + + +aXDCc is a reward-bearing token, meaning its quantity stays the same from the moment of staking. Instead, it appreciates in value in relation to XDC, so the redemption price of 1 aXDCc will grow over time because of reward accumulation. + + + +Should you want to use your rewards, you need to unstake, i.e. redeem aXDCc for XDC, or swap aXDCc to another asset on DEXs. + +### How soon will I start receiving staking rewards? + +aXDCc rewards are built into the token. Effectively, your rewards accumulate daily as aXDCc grows in value to XDC and you auto-receive them as you're holding aXDCc. + + + +You cannot use your rewards separately from the main stake, and if you wish to use them, you need to either unstake, receiving at once your XDC stake + accumulated rewards, in XDC, or swap aXDCc on DEXs for another available asset. + +### Does Ankr charge for the service? + +Ankr doesn't take any technical service fee for the provided XDC Liquid Staking service. + +### How long does it take to unstake my XDC? + +It depends on the unstaking option you choose: + + + +- Regular unstake — it has an unbond period of 31–45 days before you receive your XDC, you pay no additional commission, and your unstake request is only limited by the amount of aXDCc you have. + +- Flash unstake — you receive your XDC instantly, but pay a commission for the urgency, and your unstake request is limited by the current capacity of the flash unstake pool. + +### Is there any risk from staking, like slashing or any penalties? + +The only risk for stakers is missing out on rewards if the validator they staked with is slashed. Slashing is a protocol-level penalty associated with a validator failure if it validates an invalid transaction or goes offline. The delegated staked XDC is not slashed — slashing impacts only the self-stake of the validator. Ankr only delegates to trusted and reputable validator nodes to avoid any validator that would act maliciously. + +### If I click Unstake, does my XDC stake immediately stop accumulating rewards? + +Yes, your stake immediately **stops** accumulating rewards once you clicked **Unstake**. + +### Why do I receive less than 1 aXDCc for my 1 XDC? + +aXDCc is a rewards-bearing token, meaning it grows in value towards XDC over time. This is why you're getting less than 1 aXDCc for 1 XDC when staking. The current amount of aXDCc you're getting is calculated by the formula: `stake * exchange_ratio`. The exchange ratio itself is calculated by the formula: `totals_supply_of_axdcc / (total_staked_xdc + total_rewards_for_staked_xdc - total_unstaked_axdcc)`. + +### Is there any liquidity for my Liquid Staking tokens anywhere? + +Shorty after the release of XDC Liquid Staking, we are enabling our XDC staker to trade their aXDCc in the listed liquidity pools on Ankr DeFi. + + + +We will list specific links once aXDCc is added to Ankr DeFi. diff --git a/src/scripts/update-strapi-faq-files.js b/src/scripts/update-strapi-faq-files.js index 60e278e5d..f4aa1b3e3 100644 --- a/src/scripts/update-strapi-faq-files.js +++ b/src/scripts/update-strapi-faq-files.js @@ -1,12 +1,11 @@ const axios = require("axios"); const fs = require("fs"); const json2md = require("json2md"); -const { NodeHtmlMarkdown } = require("node-html-markdown"); const { join } = require("path"); const FILES_ROOT_PATH = join(process.cwd(), "pages"); -const STRAPI_ROOT_URL = "https://strapi.ankr.com"; +const STRAPI_ROOT_URL = "https://strapi.ankr.network"; /** * @name filesMap @@ -18,52 +17,136 @@ const filesMap = [ { filePath: join(FILES_ROOT_PATH, "delegated-staking", "ankr", "faq.mdx"), name: "ankr", - urlPath: `${STRAPI_ROOT_URL}/faq-ankr-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-ankr?populate=*`, }, { filePath: join(FILES_ROOT_PATH, "delegated-staking", "gnosis", "faq.mdx"), name: "gnosis", - urlPath: `${STRAPI_ROOT_URL}/faq-m-gno-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-gno?populate=*`, }, // liquid-staking { filePath: join(FILES_ROOT_PATH, "liquid-staking", "avax", "faq.mdx"), name: "avax", - urlPath: `${STRAPI_ROOT_URL}/faq-avalanche-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-avax?populate=*`, }, { filePath: join(FILES_ROOT_PATH, "liquid-staking", "bnb", "faq.mdx"), name: "bnb", - urlPath: `${STRAPI_ROOT_URL}/faq-binance-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-bnb?populate=*`, }, { filePath: join(FILES_ROOT_PATH, "liquid-staking", "dot", "faq.mdx"), name: "dot", - urlPath: `${STRAPI_ROOT_URL}/faq-polkadot-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-dot?populate=*`, }, { filePath: join(FILES_ROOT_PATH, "liquid-staking", "eth", "faq.mdx"), name: "eth", - urlPath: `${STRAPI_ROOT_URL}/faq-ethereum-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-eth?populate=*`, + }, + { + filePath: join(FILES_ROOT_PATH, "liquid-staking", "flow", "faq.mdx"), + name: "flow", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-flow?populate=*`, }, { filePath: join(FILES_ROOT_PATH, "liquid-staking", "ftm", "faq.mdx"), name: "ftm", - urlPath: `${STRAPI_ROOT_URL}/faq-fantom-items`, + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-ftm?populate=*`, + }, + { + filePath: join(FILES_ROOT_PATH, "liquid-staking", "ksm", "faq.mdx"), + name: "ksm", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-ksm?populate=*`, }, { filePath: join(FILES_ROOT_PATH, "liquid-staking", "pol", "faq.mdx"), - name: "matic", - urlPath: `${STRAPI_ROOT_URL}/faq-polygon-items`, + name: "pol", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-pol?populate=*`, }, { - filePath: join(FILES_ROOT_PATH, "liquid-staking", "flow", "faq.mdx"), - name: "flow", - urlPath: `${STRAPI_ROOT_URL}/faq-flow-items`, + filePath: join(FILES_ROOT_PATH, "liquid-staking", "ssv", "faq.mdx"), + name: "ssv", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-ssv?populate=*`, + }, + { + filePath: join(FILES_ROOT_PATH, "liquid-staking", "sui", "faq.mdx"), + name: "sui", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-sui?populate=*`, + }, + { + filePath: join(FILES_ROOT_PATH, "liquid-staking", "wnd", "faq.mdx"), + name: "wnd", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-wnd?populate=*`, + }, + { + filePath: join(FILES_ROOT_PATH, "liquid-staking", "xdc", "faq.mdx"), + name: "xdc", + urlPath: `${STRAPI_ROOT_URL}/api/staking-faq-xdc?populate=*`, }, ]; +/** + * Converts a Strapi v5 rich text node to a markdown string. + * + * @param {object} node + * @returns {string} + */ +const richTextNodeToMarkdown = (node) => { + if (!node) return ""; + + if (node.type === "text") { + let text = node.text || ""; + if (node.bold) text = `**${text}**`; + if (node.italic) text = `_${text}_`; + if (node.code) text = `\`${text}\``; + return text; + } + + if (node.type === "link") { + const text = (node.children || []).map(richTextNodeToMarkdown).join(""); + return `[${text}](${node.url})`; + } + + const children = (node.children || []).map(richTextNodeToMarkdown); + + if (node.type === "paragraph") { + return children.join(""); + } + + if (node.type === "list") { + return children + .map((item, i) => + node.format === "ordered" ? `${i + 1}. ${item}` : `- ${item}` + ) + .join("\n"); + } + + if (node.type === "list-item") { + return children.join(""); + } + + if (node.type === "heading") { + const prefix = "#".repeat(node.level || 2); + return `${prefix} ${children.join("")}`; + } + + return children.join(""); +}; + +/** + * Converts a Strapi v5 rich text array to a markdown string. + * + * @param {Array} blocks + * @returns {string} + */ +const richTextToMarkdown = (blocks) => { + if (!Array.isArray(blocks)) return ""; + return blocks.map(richTextNodeToMarkdown).join("\n\n"); +}; + /** * @function generateFAQFile * @@ -75,19 +158,22 @@ const filesMap = [ const generateFAQFile = async (urlPath, filePath) => { const { data: rawData } = await axios.get(urlPath); - if (!Array.isArray(rawData)) { + const items = rawData?.data?.item; + + if (!Array.isArray(items)) { console.log(`Error with URL: ${urlPath}`); throw new Error("Invalid data"); } - const data = rawData - .sort((item1, item2) => item1.id - item2.id) - .map(({ answer, question }) => ({ - h3: question, - p: NodeHtmlMarkdown.translate(answer), - })); + const data = items + .sort((item1, item2) => item1.id - item2.id) + .map(({ question, answer }) => ({ + h3: question, + p: richTextToMarkdown(answer), + })); + fs.mkdirSync(filePath.replace(/\/[^/]+$/, ""), { recursive: true }); fs.writeFileSync(filePath, json2md(data)); console.log(`Updated: ${filePath}`); @@ -109,4 +195,4 @@ async function main() { /** * Script launching */ -main(); \ No newline at end of file +main();