diff --git a/docs.json b/docs.json index 9b368fe..05c93c4 100644 --- a/docs.json +++ b/docs.json @@ -181,9 +181,7 @@ "pages": [ "mini-apps/sharing/quick-actions", "mini-apps/sharing/add-money-qa", - "mini-apps/sharing/uno-qa", "mini-apps/sharing/swap-qa", - "mini-apps/sharing/holdstation-buy-qa", "mini-apps/sharing/earn-wld-qa", "mini-apps/sharing/dna-qa", "mini-apps/sharing/sage-qa", diff --git a/mini-apps/ecosystem/ecosystem.mdx b/mini-apps/ecosystem/ecosystem.mdx index be26c8c..e84eeae 100644 --- a/mini-apps/ecosystem/ecosystem.mdx +++ b/mini-apps/ecosystem/ecosystem.mdx @@ -7,15 +7,15 @@ title: "Ecosystem Tools" Ecosystem tools and integrations for builders on World Chain and Mini Apps. - - Integrate token functionality into your dApps: token lists and balances, - transaction history, send tokens, swaps, and prebuilt widgets (connect - wallet, token selector, transaction modals). - + {/* + // Integrate token functionality into your dApps: token lists and balances, + // transaction history, send tokens, swaps, and prebuilt widgets (connect + // wallet, token selector, transaction modals). + */} -
- - The token address the user wants to buy. - - - The token address the user will use to pay (payment token). - - - The dollar amount the user wants to buy. - - - The unique ID for the Holdstation mini app. - - - URL-encoded path to the buy token screen with parameters. - -
-
- Buy WLD Screen -
- - -## Helper function - -```tsx -const HOLDSTATION_APP_ID = "app_0d4b759921490adc1f2bd569fda9b53a"; - -function getHoldstationDeeplinkUrl({ - address, - from, - amount, -}: { - address: string; - from: string; - amount: string; -}) { - const path = `/token/buy?address=${address}&from=${from}&amount=${amount}`; - const encodedPath = encodeURIComponent(path); - return `https://worldcoin.org/mini-app?app_id=${HOLDSTATION_APP_ID}&path=${encodedPath}`; -} - -// Buy $1 worth of WLD using USDC -console.log( - getHoldstationDeeplinkUrl({ - address: "0x2cFc85d8E48F8EAB294be644d9E25C3030863003", // WLD token address - from: "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1", // USDC token address - amount: "1", - }) -); -``` - -### Example output link : Buy $1 worth of WLD using USDC - -``` -https://worldcoin.org/mini-app?app_id=app_0d4b759921490adc1f2bd569fda9b53a&path=%2Ftoken%2Fbuy%3Faddress%3D0x2cFc85d8E48F8EAB294be644d9E25C3030863003%26from%3D0x79A02482A880bCE3F13e09Da970dC34db4CD24d1%26amount%3D1 -``` diff --git a/mini-apps/sharing/puf-qa.mdx b/mini-apps/sharing/puf-qa.mdx deleted file mode 100644 index d6e53fa..0000000 --- a/mini-apps/sharing/puf-qa.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "PUF" -"og:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png" -"twitter:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png" ---- - -Create & Trade coins on World Chain - -PUF enables users to create and launch their own memecoins on World Chain, powered by World's Proof of Unique Human. This Quick Action provides direct links to token information or creation screens. - -
-
-

Parameters

- - The path to navigate to within PUF. Format: "app/token/(tokenAddress)" - where tokenAddress is the contract address of a memecoin. - -
-
- PUF Token Screen -
-
- -Url follows the schema below. Navigate there to use this Quick Action. - -``` -https://worldcoin.org/mini-app?app_id=app_15daccf5b7d4ec9b7dbba044a8fdeab5&path=app/token/0x57268aFa4E496684611aAFB1E20D2116283C487e -``` diff --git a/mini-apps/sharing/uno-qa.mdx b/mini-apps/sharing/uno-qa.mdx deleted file mode 100644 index a8bfe50..0000000 --- a/mini-apps/sharing/uno-qa.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: "UNO Swap" -"og:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png" -"twitter:image": "https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png" ---- - -[UNO](https://worldcoin.org/ecosystem/app_a4f7f3e62c1de0b9490a5260cb390b56) is your simple, secure token wallet. -View your token balances and check prices all in one place. Buy, Sell, Swap, or Send tokens in a fun and simple interface. - -Uno now supports a Quick Action to deeplink directly to the swap tab, with a specific swap ready to be executed. - -
-
-

Parameters

- - - Currently only supports "swap"; this allows deep linking to the swap tab. - - - - Token address for the from token. - - - - Base units amount of the from token. - - - - Token address for the to token. - - - - World Miniapp App id of the referring World Miniapp. When provided, a "Go - Back" deeplink button will appear in the top left of the header that takes - the user back to the referring Miniapp. - - - - Deeplink path for referring World Miniapp Quick Actions. When provided, - this path will be added to the "Go Back" deeplink button so that the - referring Miniapp can execute a Quick Action when the user taps "Go Back" - in Uno. - - -
-
- Swap Screen -
-
- -## Helper function - -```tsx -const UNO_APP_ID = "app_a4f7f3e62c1de0b9490a5260cb390b56"; - -function getUnoDeeplinkUrl({ - fromToken, - toToken, - amount, - referrerAppId, - referrerDeeplinkPath, -}: { - fromToken?: string; - toToken?: string; - amount?: string; - referrerAppId?: string; - referrerDeeplinkPath?: string; -}) { - let path = `?tab=swap`; - if (fromToken) { - path += `&fromToken=${fromToken}`; - if (amount) { - path += `&amount=${amount}`; - } - } - if (toToken) { - path += `&toToken=${toToken}`; - } - if (referrerAppId) { - path += `&referrerAppId=${referrerAppId}`; - } - if (referrerDeeplinkPath) { - path += `&referrerDeeplinkPath=${encodeURIComponent(referrerDeeplinkPath)}`; - } - const encodedPath = encodeURIComponent(path); - return `https://worldcoin.org/mini-app?app_id=${UNO_APP_ID}&path=${encodedPath}`; -} - -// create a trade for 1.2345 USDC to WETH -console.log( - getUnoDeeplinkUrl({ - fromToken: "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1", - amount: "1234500", - toToken: "0x4200000000000000000000000000000000000006", - }) -); -``` - -### Example output link - -``` -https://worldcoin.org/mini-app?app_id=app_a4f7f3e62c1de0b9490a5260cb390b56&path=%3Ftab%3Dswap%26fromToken%3D0x79A02482A880bCE3F13e09Da970dC34db4CD24d1%26amount%3D1234500%26toToken%3D0x4200000000000000000000000000000000000006 -``` - -### Appendix - -**Terminology** - -- **fromToken** - token that is being swapped away for another token. Other names for this parameter are "sell token", or "input token". -- **toToken** - token that is being swapped into for another token. Other names for this parameter are "buy token", or "output token". -- **referrer** - In the cases that the UNO Quick Action link is used from a different Miniapp, the referrer is the Miniapp where that link was used. - Specifying the referrerAppId allows UNO to provide a "Go back" to the Miniapp that provided the link to the UNO Quick Action. - -**Caveats/Warnings** Swap will not work if not taken into consideration. - -- If the user does not have the fromToken (sell token). -- Amount should be in the base units of the fromToken.