From e1e20d8ce4d650ddda80b34dee519711d3dc2249 Mon Sep 17 00:00:00 2001 From: tyler-nguyen-4 Date: Tue, 1 Jul 2025 17:41:26 +0700 Subject: [PATCH] fix: remove Terra & Near and enable dead links detector --- .vitepress/config.ts | 26 +---- about/xdefi-technologies/how-to.md | 5 + about/xdefi-technologies/introduction.md | 2 +- .../xdefi-technologies/native-integration.md | 7 -- about/xdefi-technologies/products.md | 5 + about/xdefi-technologies/security.md | 5 + about/xdefi-token/buy-xdefi.md | 2 +- components/common.js | 10 +- developers/blockchains-integration.md | 3 +- developers/{near.md => cardano.md} | 6 +- developers/extension-cardano.md | 21 ++-- developers/extension-evms.md | 4 - developers/extension-near.md | 110 ------------------ developers/extension-terra.md | 3 - developers/extension-thorchain.md | 4 +- developers/extension-wallet.md | 2 - developers/introduction.md | 3 +- developers/mobile-wallet.md | 23 ++-- developers/other-blockchains.md | 2 - developers/terra.md | 24 ---- gas-tank/gas-fee.md | 9 -- gas-tank/gas-tank-platform.md | 2 +- index.md | 2 +- indexers/indexers-api.md | 1 - routing/endpoints.md | 1 - routing/routing-graph-ql-api.md | 2 +- 26 files changed, 57 insertions(+), 227 deletions(-) create mode 100644 about/xdefi-technologies/how-to.md create mode 100644 about/xdefi-technologies/products.md create mode 100644 about/xdefi-technologies/security.md rename developers/{near.md => cardano.md} (80%) delete mode 100644 developers/extension-near.md delete mode 100644 developers/extension-terra.md delete mode 100644 developers/terra.md diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 5253fd1b1..256cbb48b 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -12,7 +12,7 @@ export default { description: 'One Wallet for all your assets.', lastUpdated: true, cleanUrls: true, - ignoreDeadLinks: true, + ignoreDeadLinks: false, base: base, markdown: { math: true, @@ -358,18 +358,10 @@ export default { text: 'Litecoin', link: '/developers/extension-litecoin', }, - { - text: 'NEAR', - link: '/developers/extension-near', - }, { text: 'Solana', link: '/developers/extension-solana', }, - { - text: 'Terra', - link: '/developers/extension-terra', - }, { text: 'Thorchain', link: '/developers/extension-thorchain', @@ -393,10 +385,6 @@ export default { text: 'Bitcoin', link: '/developers/mobile-bitcoin', }, - { - text: 'Bitcoin Cash', - link: '/developers/mobile-bitcoin-cash', - }, { text: 'Cardano', link: '/developers/mobile-cardano', @@ -585,6 +573,10 @@ export default { text: 'BNB Beacon Chain (BNB)', link: '/developers/bnb-beacon-chain', }, + { + text: 'Cardano (ADA)', + link: '/developers/cardano', + }, { text: 'Dogecoin (DOGE)', link: '/developers/dogecoin', @@ -597,18 +589,10 @@ export default { text: 'Maya Protocol (MAYA)', link: '/developers/maya', }, - { - text: 'NEAR (NEAR)', - link: '/developers/near', - }, { text: 'Solana (SOL)', link: '/developers/solana', }, - { - text: 'Terra (LUNA)', - link: '/developers/terra', - }, { text: 'Thorchain (RUNE)', link: '/developers/thorchain', diff --git a/about/xdefi-technologies/how-to.md b/about/xdefi-technologies/how-to.md new file mode 100644 index 000000000..6071364cc --- /dev/null +++ b/about/xdefi-technologies/how-to.md @@ -0,0 +1,5 @@ +# How to tutorials + +## Summary + +## Introduction \ No newline at end of file diff --git a/about/xdefi-technologies/introduction.md b/about/xdefi-technologies/introduction.md index 44b46cb3d..b8201010b 100644 --- a/about/xdefi-technologies/introduction.md +++ b/about/xdefi-technologies/introduction.md @@ -29,4 +29,4 @@ The documentation will separate different subjects handled by Ctrl (fka XDEFI) t ## Ctrl Wallet -Ctrl Wallet is a multichain Wallet that allow users to interact with the [supported blockchains](./blockchains.md), manage their assets and [NFT's](./supported-nfts) and access dApps. +Ctrl Wallet is a multichain Wallet that allow users to interact with the [supported blockchains](./supported-blockchains.md), manage their assets and [NFT's](./supported-nfts) and access dApps. diff --git a/about/xdefi-technologies/native-integration.md b/about/xdefi-technologies/native-integration.md index 97adb2cee..cefa58c14 100644 --- a/about/xdefi-technologies/native-integration.md +++ b/about/xdefi-technologies/native-integration.md @@ -5,7 +5,6 @@ - [UTXO's](#utxo-s) - [EVM's](#evm-s) - [Cosmos chains](#cosmos-chains) -- [Near](#near) - [Solana](#solana) ## UTXO's @@ -67,12 +66,6 @@ You can request a Cosmos native integration by sending us an [email](mailto:inte _(Note that native integration requiere an upfront payment to start implementing it)_ -## Near - -- Near Protocol (NEAR) - -See more on [Building a Near dApp](/developers/near) with XDEFI documentation. - ## Solana - Solana (SOL) diff --git a/about/xdefi-technologies/products.md b/about/xdefi-technologies/products.md new file mode 100644 index 000000000..ffe57988c --- /dev/null +++ b/about/xdefi-technologies/products.md @@ -0,0 +1,5 @@ +# Products + +## Summary + +## Introduction \ No newline at end of file diff --git a/about/xdefi-technologies/security.md b/about/xdefi-technologies/security.md new file mode 100644 index 000000000..7f4f88841 --- /dev/null +++ b/about/xdefi-technologies/security.md @@ -0,0 +1,5 @@ +# Security + +## Summary + +## Introduction \ No newline at end of file diff --git a/about/xdefi-token/buy-xdefi.md b/about/xdefi-token/buy-xdefi.md index e5b95658a..eb4923826 100644 --- a/about/xdefi-token/buy-xdefi.md +++ b/about/xdefi-token/buy-xdefi.md @@ -7,7 +7,7 @@ - [Ctrl Wallet](https://chrome.google.com/webstore/detail/xdefi-wallet/hmeobnfnfcmdkdcmlblgagmfpfboieaf) - [Ctrl Web App](https://ctrl.xyz/) ::: info - You can implement our Routing API to easy swap any asset into **$XDEFI**. Follow [our documentation](/routing/widget) to implement it on any platform in few lines of code. + You can implement our Routing API to easy swap any asset into **$XDEFI**. Follow [our documentation](/swap-widget/widget-integration) to implement it on any platform in few lines of code. ::: ## DEX diff --git a/components/common.js b/components/common.js index d43f56af3..1eb763595 100644 --- a/components/common.js +++ b/components/common.js @@ -59,6 +59,11 @@ export const chainsSupported = [ baseChain: "EVM", exampleAddress: "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", }, + { + key: "cardano", + label: "Cardano", + exampleAddress: "addr1z84q0denmyep98ph3tmzwsmw0j7zau9ljmsqx6a4rvaau66j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq777e2a", + }, { key: "cosmos", label: "Cosmos Hub", @@ -123,11 +128,6 @@ export const chainsSupported = [ label: "Maya Protocol", exampleAddress: "maya1800h9r7yuhme285agzt7uyntfyva9n42azpcwy", }, - { - key: "near", - label: "NEAR", - exampleAddress: "relay.tg", - }, { key: "optimism", label: "Optimism", diff --git a/developers/blockchains-integration.md b/developers/blockchains-integration.md index deaaf5096..cc9d79431 100644 --- a/developers/blockchains-integration.md +++ b/developers/blockchains-integration.md @@ -43,13 +43,12 @@ Ctrl (fka XDEFI) is the largest multichain wallet that provides hundreds of bloc - [BNB Beacon Chain (BNB)](./bnb-beacon-chain) - [Bitcoin (BTC)](./bitcoin) - [Bitcoin Cash (BCH)](./bitcoin-cash) + - [Cardano (ADA)](./cardano) - [Cosmos (ATOM)](./cosmos) - [Dogecoin (DOGE)](./dogecoin) - [Litecoin (LTC)](./litecoin) - [Maya Protocol (MAYA)](./maya) - - [NEAR Protocol (NEAR)](./near) - [Solana (SOL)](./solana) - - [Terra (LUNA)](./terra) - [THORChain (RUNE)](./thorchain) - [Tron (TRX)](./tron) - More coming ... diff --git a/developers/near.md b/developers/cardano.md similarity index 80% rename from developers/near.md rename to developers/cardano.md index 2cad34b62..15a411993 100644 --- a/developers/near.md +++ b/developers/cardano.md @@ -1,6 +1,6 @@ -# NEAR (NEAR) +# Cardano (ADA) - And `near` is the `chainId` for NEAR Protocol. + And `cardano` is the `chainId` for Cardano.
@@ -18,7 +18,7 @@ const refConnectWallet = ref() onMounted(() => { const rootDetectWallet = createRoot(refDetectWallet.value) rootDetectWallet.render(createElement(DetectWallet, { - chainId: 'near', + chainId: 'cardano', }, null)) }) diff --git a/developers/extension-cardano.md b/developers/extension-cardano.md index 724ff2f5b..684e7370c 100644 --- a/developers/extension-cardano.md +++ b/developers/extension-cardano.md @@ -8,10 +8,6 @@ It injects a CIP-30 compatible provider in `window.cardano.ctrl` and follows the - [CIP-30: Cardano dApp-Wallet Web Bridge documentation](https://cips.cardano.org/cip/CIP-30) -### Example dApp - -- [Cardano Web3 example](https://github.com/XDeFi-tech/examples-dapps-sdk/tree/main/cardano) - ### How to detect XDEFI's Cardano provider As the official [CIP-30 guide](https://cips.cardano.org/cip/CIP-30) mentioned: @@ -30,11 +26,11 @@ window.onload = async () => { // You can get the balance using getBalance method const balance = await api.getBalance(); - + // Get all used addresses const usedAddresses = await api.getUsedAddresses(); - - console.log('Wallet connected successfully'); + + console.log("Wallet connected successfully"); } }; ``` @@ -57,21 +53,20 @@ You can use it with regular Cardano libraries such as cardano-serialization-lib. // Check if Ctrl (fka XDEFI) is available if (window.cardano && window.cardano.ctrl) { const cardanoWallet = window.cardano.ctrl; - + // Enable the wallet (request connection) try { const api = await cardanoWallet.enable(); - console.log('Connected to Ctrl wallet'); - + console.log("Connected to Ctrl wallet"); + // Now you can use the API methods const balance = await api.getBalance(); const addresses = await api.getUsedAddresses(); - } catch (error) { - console.error('Failed to connect:', error); + console.error("Failed to connect:", error); } } else { - console.log('Ctrl (fka XDEFI) is not installed'); + console.log("Ctrl (fka XDEFI) is not installed"); } ``` diff --git a/developers/extension-evms.md b/developers/extension-evms.md index 373648217..bea0cf206 100644 --- a/developers/extension-evms.md +++ b/developers/extension-evms.md @@ -7,10 +7,6 @@ Develop EVM based dApps - [web3.js introduction](https://web3js.readthedocs.io/en/v1.3.4/getting-started.html) - [ether.js introduction](https://docs.ethers.io/v5/getting-started/) -### Example dApp - -- [web3 vue example](https://github.com/XDeFi-tech/examples-dapps-sdk/tree/main/ethereum/web3/web3-example-vue) - ### Integrate Ethereum dApps with Ctrl (fka XDEFI) #### `window.xfi.ethereum` diff --git a/developers/extension-near.md b/developers/extension-near.md deleted file mode 100644 index 5e6ebf736..000000000 --- a/developers/extension-near.md +++ /dev/null @@ -1,110 +0,0 @@ -# Extension Wallet NEAR Integration - -Develop NEAR dApps - -### NEAR wallet-selector - -Ctrl (fka XDEFI) is a provider available in NEAR [wallet-selector](https://github.com/near/wallet-selector) project. This allows dApp developer to allow Ctrl Wallet users to connect to their dApp with a single click. - -### window.xfi.near object - -Ctrl Wallet provides a z object that dApp developers can use to interact with the Ctrl Wallet. The `window.xfi.near` object is available after the window.onLoad event is fired. - -It is recommended to use the NEAR wallet-selector project to integrate Ctrl Wallet with your dApp. The wallet-selector project will take care of the `window.xfi.near` object for you. - -#### window.xfi.near.request - -Here is a sample code to request Ctrl Wallet to connect to a dApp. - -```javascript -window.xfi.near.request({ - method: "connect", -}); -``` - -**Methods** - -There are 4 methods available in `window.xfi.near.request` object. - -**connect** - -Returns a promise that resolves to a `address[]` object. - -```javascript -const addresses = await window.xfi.near.request({ - method: "connect", -}); -``` - -**disconnect** - -Disconnects the dApp from Ctrl Wallet. - -```javascript -await window.xfi.near.request({ - method: "disconnect", -}); -``` - -**signAndSendTransaction** - -Signs and sends a transaction to the blockchain. Returns the transaction hash. - -```javascript -type Transaction = { - signerId: string; - publicKey: PublicKey; - nonce: BN; - receiverId: string; - actions: Action[]; - blockHash: Uint8Array; -}; - -const transaction : Transaction = {...}; - -const txHash: string = await window.xfi.near.request({ - method: 'signAndSendTransaction', - params: { - transaction - }, -}) -``` - -**signAndSendTransactions** - -Signs and sends multiple transactions to the blockchain. Returns the transaction hashes. - -```javascript -type Transaction = { - signerId: string; - publicKey: PublicKey; - nonce: BN; - receiverId: string; - actions: Action[]; - blockHash: Uint8Array; -}; - -const transactions: Transaction[] = [{...}]; - -const txHashes: string[] = await window.xfi.near.request({ - method: 'signAndSendTransactions', - params: { - transactions - }, -}) -``` - -**Other function signatures** - -The previous functions are the most commonly used functions. However, there are other functions available in `window.xfi.near` object. See below the full list of functions. - -```javascript -connect: (network?: NETWORKS) => Promise -disconnect: () => Promise -signAndSendTransaction: ( - transaction: NearTransaction -) => Promise -signAndSendTransactions: ( - transactions: Array -) => Promise> -``` diff --git a/developers/extension-terra.md b/developers/extension-terra.md deleted file mode 100644 index ff27973d6..000000000 --- a/developers/extension-terra.md +++ /dev/null @@ -1,3 +0,0 @@ -# Extension Wallet Terra Integration - -Deprecated for Terra since Summer 2024. Please consider using alternative solutions. diff --git a/developers/extension-thorchain.md b/developers/extension-thorchain.md index c9adf0a12..8c2c8d815 100644 --- a/developers/extension-thorchain.md +++ b/developers/extension-thorchain.md @@ -4,7 +4,7 @@ Develop Thorchain dApps ### Transfer request -- [Transfer request](/extension-detect-xdefi-providers#request-parameters-description) + ```javascript const { asset, from, recipient, amount, memo, gasLimit } = { @@ -45,7 +45,7 @@ window.xfi.thorchain.request( ### Deposit request -- [Parameters description](./extension-detect-xdefi-providers#request-parameters-description) + ​​ ```javascript diff --git a/developers/extension-wallet.md b/developers/extension-wallet.md index eac686e2d..083f62c34 100644 --- a/developers/extension-wallet.md +++ b/developers/extension-wallet.md @@ -17,9 +17,7 @@ Ctrl Wallet injects into the window object to dapps multiple wallet providers to - window.xfi.bitcoincash : [Bitcoin Cash provider](./extension-bitcoin-cash) - window.xfi.dogecoin: [Dogecoin provider](./extension-dogecoin) - window.xfi.litecoin : [Litecoin provider](./extension-litecoin) - - window.xfi.near : [NEAR provider](./extension-near) - window.xfi.solana : [Solana provider](./extension-solana) - - window.xfi.terra : [Terra provider](./extension-terra) - window.xfi.thorchain: [Thorchain provider](./extension-thorchain) - window.xfi.tron: [Tron provider](./extension-tron) - window.ethereum : [Ethereum provider](./extension-evms) diff --git a/developers/introduction.md b/developers/introduction.md index 1c77f9cd7..d63be9836 100644 --- a/developers/introduction.md +++ b/developers/introduction.md @@ -30,13 +30,12 @@ You can access a single ecosystem integration with his set of tutorial from here - BNB Smart Chain - Bitcoin - Bitcoin Cash +- Cardano - Cosmos - Dogecoin - Litecoin - Maya Protocol -- NEAR Protocol - Solana -- Terra - THORChain - Tron diff --git a/developers/mobile-wallet.md b/developers/mobile-wallet.md index 90b419c19..57b880f4b 100644 --- a/developers/mobile-wallet.md +++ b/developers/mobile-wallet.md @@ -12,21 +12,22 @@ next: This document provides details on integrating and interacting with the **Ctrl Mobile Wallet**, which supports multiple blockchain networks and decentralized applications (dApps) via Reown (aka WalletConnect). ## What is Reown? + Reown (aka WalletConnect) is an open protocol for connecting desktop DApps to mobile wallets using end-to-end encryption by scanning a QR code. It allows users to interact with any DApp without compromising their private keys. For more details, visit the [Reown documentation](https://reown.com/). ## Supported Chains with Dapp Connectors -| Chain | Extension Wallet | Mobile Wallet Dapp | -|------------------|:----------------:|:-----------------------------:| -| Bitcoin | ✅ | ✅ | -| Bitcoin Cash | ✅ | ❌ | -| Dogecoin | ✅ | ✅ | -| Litecoin | ✅ | ✅ | -| Ethereum (EVM's) | ✅ | ✅ | -| Solana | ✅ | ✅ | -| Cosmos | ✅ | ✅ | -| Tron | ✅ | ✅ | -| Cardano | ✅ | ✅ | +| Chain | Extension Wallet | Mobile Wallet Dapp | +| ---------------- | :--------------: | :----------------: | +| Bitcoin | ✅ | ✅ | +| Bitcoin Cash | ✅ | ❌ | +| Cardano | ✅ | ✅ | +| Cosmos | ✅ | ✅ | +| Dogecoin | ✅ | ✅ | +| Ethereum (EVM's) | ✅ | ✅ | +| Litecoin | ✅ | ✅ | +| Solana | ✅ | ✅ | +| Tron | ✅ | ✅ | ## Testing Wallet diff --git a/developers/other-blockchains.md b/developers/other-blockchains.md index e5724085f..16e3050f1 100644 --- a/developers/other-blockchains.md +++ b/developers/other-blockchains.md @@ -11,9 +11,7 @@ Native blockchains supported | Dogecoin | `dogecoin` | `window.xfi.dogecoin` | | Litecoin | `litecoin` | `window.xfi.litecoin` | | Maya Protocol | `mayachain` | `window.xfi.mayachain` | -| NEAR Protocol | `near` | `window.xfi.near` | | Solana | `solana` | `window.xfi.solana` | -| Terra | `terra` | `window.xfi.terra` | | THORChain | `thorchain` | `window.xfi.thorchain` | ### Detect Ctrl Wallet diff --git a/developers/terra.md b/developers/terra.md deleted file mode 100644 index 60755d29a..000000000 --- a/developers/terra.md +++ /dev/null @@ -1,24 +0,0 @@ -# Terra (LUNA) - - And `terra` is the `chainId` for Terra. - -
- - - - diff --git a/gas-tank/gas-fee.md b/gas-tank/gas-fee.md index 487e97021..7592030c9 100644 --- a/gas-tank/gas-fee.md +++ b/gas-tank/gas-fee.md @@ -107,14 +107,6 @@ UTXO-based chains use a different fee model where fees depend on the **size** of 2. Multiply it by the predefined **gas limit** for the specific Cosmos chain. 3. Convert the fee into the desired token. -##### **E. Near Protocol** -- Near’s gas fees are based on a **fixed gas unit model**. -- The base fee is calculated using **Tgas (teragas)**, where **1 Tgas = 0.0001 Ⓝ NEAR**. - -✅ **How We Calculate Fees:** -1. Multiply the gas price by **Near’s predefined gas limit** (e.g., **150 Tgas** for simple transactions). -2. Convert to the desired token. - ##### **F. Multi-Chain Protocols (ThorChain, MayaChain)** - These protocols have a **fixed native transaction fee**. - The fee amount is the same regardless of transaction complexity. @@ -156,7 +148,6 @@ Since fees are usually quoted in the blockchain’s native currency, they may ne | **Bitcoin, Litecoin, Dogecoin (UTXO)** | Fee per byte | `Transaction Size × Fee Rate` | | **Solana** | Fixed Fee | `Fixed amount per transaction` | | **Cosmos (Osmosis, Terra, etc.)** | Gas Limit × Gas Price | `Gas Used × Gas Price` | -| **Near Protocol** | Fixed Gas Units | `Gas Used × Gas Price (Tgas)` | | **Multi-Chain (ThorChain, MayaChain)** | Fixed Fee | `Fixed amount per transaction` | --- diff --git a/gas-tank/gas-tank-platform.md b/gas-tank/gas-tank-platform.md index f310e8bcc..4f058ba6c 100644 --- a/gas-tank/gas-tank-platform.md +++ b/gas-tank/gas-tank-platform.md @@ -86,7 +86,7 @@ Before withdrawing, users should understand: #### **Key Points** ✅ **Users can get native gas coins** to fund on-chain transactions. -✅ **Supports EVM, UTXO, Cosmos, Solana, Near, ThorChain, Tron, etc.** +✅ **Supports EVM, UTXO, Cosmos, Solana, ThorChain, Tron, etc.** ✅ **Transaction fees apply** (similar to withdrawals). #### **Consume Process** diff --git a/index.md b/index.md index 4d7eb4ecf..0377494f7 100644 --- a/index.md +++ b/index.md @@ -6,7 +6,7 @@ titleTemplate: ":title" hero: name: "Ctrl Wallet (ex-XDEFI)" text: "One wallet for all your assets" - tagline: Leverage Ctrl Technologies to securely store, swap, and send Crypto and NFTs across hundreds of blockchains (UTXO's, EVM's, Cosmos chains, Solana, Near) for your users benefits + tagline: Leverage Ctrl Technologies to securely store, swap, and send Crypto and NFTs across hundreds of blockchains (UTXO's, EVM's, Cosmos chains, Solana, Tron, Cardano) for your users benefits image: light: /img/Logo Ctrl.svg dark: /img/Logo Ctrl White.svg diff --git a/indexers/indexers-api.md b/indexers/indexers-api.md index a3ca7c3a0..7bd805d0b 100644 --- a/indexers/indexers-api.md +++ b/indexers/indexers-api.md @@ -32,7 +32,6 @@ The base URL for all API endpoints is: https://gql-router.xdefi.services/graphql | Kujira | `kujira` | CosmosChain | | Litecoin | `litecoin` | BitcoinChain | | Maya Protocol | `mayachain` | MayaChain | -| Near | `near` | NearChain | | Optimism | `optimism` | EVM | | Osmosis | `osmosis` | CosmosChain | | Polygon | `polygon` | EVM | diff --git a/routing/endpoints.md b/routing/endpoints.md index b8ef2054e..bfc2f8a6d 100644 --- a/routing/endpoints.md +++ b/routing/endpoints.md @@ -27,7 +27,6 @@ Returns a list of supported chains (i.e. chains you can swap assets within or ch "AVAX", "ARBITRUM", "AURORA", - "NEAR", "SOL", "COSMOS", "OSMOSIS" diff --git a/routing/routing-graph-ql-api.md b/routing/routing-graph-ql-api.md index 2f8fa1414..0d2faaaf4 100644 --- a/routing/routing-graph-ql-api.md +++ b/routing/routing-graph-ql-api.md @@ -133,4 +133,4 @@ onMounted(() => { }) -A comprehensive routing example, from requesting a route to getting transaction data, is shown in the [Overview](./overview) section. +A comprehensive routing example, from requesting a route to getting transaction data, is shown in the [Overview](./introduction) section.