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