diff --git a/docusaurus.config.js b/docusaurus.config.js index 27716636646..e6e5c909603 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -113,6 +113,17 @@ const config = { }, }, ], + [ + "@docusaurus/plugin-content-docs", + { + id: "sdk", + path: "sdk", + routeBasePath: "sdk", + editUrl: "https://github.com/MetaMask/metamask-docs/edit/main/", + sidebarPath: require.resolve("./sdk-sidebar.js"), + breadcrumbs: false, + }, + ], [ "@docusaurus/plugin-content-docs", { @@ -172,6 +183,10 @@ const config = { width: 150, }, items: [ + { + to: "sdk", + label: "SDK", + }, { to: "wallet", label: "Wallet", @@ -229,6 +244,10 @@ const config = { { title: "Documentation", items: [ + { + label: "SDK", + to: "/sdk", + }, { label: "Wallet", to: "/wallet", diff --git a/sdk-sidebar.js b/sdk-sidebar.js new file mode 100644 index 00000000000..527f6bf61c7 --- /dev/null +++ b/sdk-sidebar.js @@ -0,0 +1,58 @@ +/** + * Creating a sidebar enables you to: + - create an ordered group of docs + - render a sidebar for each doc of that group + - provide next/previous navigation + The sidebars can be generated from the filesystem, or explicitly defined here. + Create as many sidebars as you want. + */ + +// @ts-check + +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebar = { + // By default, Docusaurus generates a sidebar from the docs folder structure + // snapsSidebar: [{type: 'autogenerated', dirName: '.'}], + + // But you can create a sidebar manually + sdkSidebar: [ + "index", + { + type: "category", + label: "Get started", + link: { type: "generated-index", slug: "/get-started" }, + collapsed: false, + items: [{ type: "autogenerated", dirName: "get-started" }], + }, + { + type: "category", + label: "How to", + link: { type: "generated-index", slug: "/how-to" }, + collapsed: false, + items: [{ type: "autogenerated", dirName: "how-to" }], + }, + { + type: "category", + label: "Concepts", + link: { type: "generated-index", slug: "/concepts" }, + collapsed: false, + items: [{ type: "autogenerated", dirName: "concepts" }], + }, + { + type: "category", + label: "Tutorials", + link: { type: "generated-index", slug: "/tutorials" }, + collapsed: false, + items: [{ type: "autogenerated", dirName: "tutorials" }], + }, + { + type: "category", + label: "Reference", + link: { type: "generated-index", slug: "/reference" }, + collapsed: false, + items: [{ type: "autogenerated", dirName: "reference" }], + }, + ], +}; + +module.exports = sidebar; diff --git a/wallet/assets/contract-abi-converter-dialog.png b/sdk/assets/contract-abi-converter-dialog.png similarity index 100% rename from wallet/assets/contract-abi-converter-dialog.png rename to sdk/assets/contract-abi-converter-dialog.png diff --git a/wallet/assets/custom-modal.gif b/sdk/assets/custom-modal.gif similarity index 100% rename from wallet/assets/custom-modal.gif rename to sdk/assets/custom-modal.gif diff --git a/wallet/assets/sdk-android-architecture.png b/sdk/assets/sdk-android-architecture.png similarity index 100% rename from wallet/assets/sdk-android-architecture.png rename to sdk/assets/sdk-android-architecture.png diff --git a/wallet/assets/sdk-android-communication.png b/sdk/assets/sdk-android-communication.png similarity index 100% rename from wallet/assets/sdk-android-communication.png rename to sdk/assets/sdk-android-communication.png diff --git a/wallet/assets/sdk-clear-connections.png b/sdk/assets/sdk-clear-connections.png similarity index 100% rename from wallet/assets/sdk-clear-connections.png rename to sdk/assets/sdk-clear-connections.png diff --git a/wallet/assets/unity-empty-template.png b/sdk/assets/unity-empty-template.png similarity index 100% rename from wallet/assets/unity-empty-template.png rename to sdk/assets/unity-empty-template.png diff --git a/wallet/assets/unity-example-template.png b/sdk/assets/unity-example-template.png similarity index 100% rename from wallet/assets/unity-example-template.png rename to sdk/assets/unity-example-template.png diff --git a/wallet/assets/unity-infura.png b/sdk/assets/unity-infura.png similarity index 100% rename from wallet/assets/unity-infura.png rename to sdk/assets/unity-infura.png diff --git a/wallet/assets/wagmi-errors.png b/sdk/assets/wagmi-errors.png similarity index 100% rename from wallet/assets/wagmi-errors.png rename to sdk/assets/wagmi-errors.png diff --git a/wallet/concepts/sdk/index.md b/sdk/concepts/about-sdk.md similarity index 98% rename from wallet/concepts/sdk/index.md rename to sdk/concepts/about-sdk.md index 4222d2fcba0..063dac0c376 100644 --- a/wallet/concepts/sdk/index.md +++ b/sdk/concepts/about-sdk.md @@ -1,11 +1,6 @@ --- description: Learn about MetaMask SDK. -sidebar_position: 3 -tags: - - JavaScript SDK - - iOS SDK - - Android SDK - - Unity SDK +sidebar_position: 1 --- import Tabs from "@theme/Tabs"; diff --git a/wallet/concepts/sdk/android.md b/sdk/concepts/android.md similarity index 92% rename from wallet/concepts/sdk/android.md rename to sdk/concepts/android.md index 022adbd8e90..5ba87b9011c 100644 --- a/wallet/concepts/sdk/android.md +++ b/sdk/concepts/android.md @@ -1,8 +1,6 @@ --- -sidebar_position: 2 +sidebar_position: 3 description: Learn about the Android SDK architecture. -tags: - - Android SDK --- # Android SDK architecture @@ -23,7 +21,7 @@ the Android SDK differs from the other SDK platforms. The following diagram outlines the high-level architecture of the Android SDK: -![Android SDK architecture diagram](../../assets/sdk-android-architecture.png) +![Android SDK architecture diagram](../assets/sdk-android-architecture.png) The MetaMask Android SDK consists of two components: @@ -48,7 +46,7 @@ in Kotlin) using different mechanisms depending on the direction of communicatio The following diagram outlines the communication flow between the Android client SDK and server SDK: -![Android SDK communication diagram](../../assets/sdk-android-communication.png) +![Android SDK communication diagram](../assets/sdk-android-communication.png) The flow is as follows: diff --git a/wallet/concepts/sdk/connections.md b/sdk/concepts/connections.md similarity index 98% rename from wallet/concepts/sdk/connections.md rename to sdk/concepts/connections.md index 5367e5faac0..893d67e64ae 100644 --- a/wallet/concepts/sdk/connections.md +++ b/sdk/concepts/connections.md @@ -1,12 +1,7 @@ --- -sidebar_position: 1 +sidebar_position: 2 sidebar_label: SDK connections description: Learn about how a dapp with the SDK installed connects to MetaMask. -tags: - - JavaScript SDK - - iOS SDK - - Android SDK - - Unity SDK --- # MetaMask SDK connections diff --git a/wallet/how-to/use-sdk/3rd-party-libraries/index.md b/sdk/get-started/3rd-party-libraries/index.md similarity index 59% rename from wallet/how-to/use-sdk/3rd-party-libraries/index.md rename to sdk/get-started/3rd-party-libraries/index.md index 3717ce6faea..d5fed36bc09 100644 --- a/wallet/how-to/use-sdk/3rd-party-libraries/index.md +++ b/sdk/get-started/3rd-party-libraries/index.md @@ -1,14 +1,12 @@ --- sidebar_label: Third-party libraries -sidebar_position: 4 +sidebar_position: 1 description: Set up the SDK using third-party libraries. -tags: - - JavaScript SDK --- # Use MetaMask SDK with third-party libraries -Use [MetaMask SDK](../../../concepts/sdk/index.md) with the following third-party libraries: +Use [MetaMask SDK](../../concepts/about-sdk.md) with the following third-party libraries: - [Web3-Onboard](web3-onboard.md) - [Wagmi](wagmi.md) diff --git a/wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md b/sdk/get-started/3rd-party-libraries/wagmi.md similarity index 98% rename from wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md rename to sdk/get-started/3rd-party-libraries/wagmi.md index 9446a81a5de..9088671e9f8 100644 --- a/wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md +++ b/sdk/get-started/3rd-party-libraries/wagmi.md @@ -1,9 +1,7 @@ --- description: Integrate MetaMask SDK with Wagmi in your JavaScript dapp. -sidebar_position: 2 +sidebar_position: 1 sidebar_label: Wagmi -tags: - - JavaScript SDK --- # Use Wagmi with MetaMask SDK @@ -118,7 +116,7 @@ Mobile dapps can lose their continuous connection with MetaMask, causing read-on These are some errors that might occur in mobile environments: -![Wagmi errors](../../../assets/wagmi-errors.png) +![Wagmi errors](../../assets/wagmi-errors.png) To overcome this limitation in mobile dapps that rely on a continuous connection with MetaMask, use the Infura API to make read-only requests. diff --git a/wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md b/sdk/get-started/3rd-party-libraries/web3-onboard.md similarity index 97% rename from wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md rename to sdk/get-started/3rd-party-libraries/web3-onboard.md index fec5a61065c..495baa01d16 100644 --- a/wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md +++ b/sdk/get-started/3rd-party-libraries/web3-onboard.md @@ -1,9 +1,7 @@ --- description: Integrate MetaMask SDK with Web3-Onboard in your JavaScript dapp. -sidebar_position: 1 +sidebar_position: 2 sidebar_label: Web3-Onboard -tags: - - JavaScript SDK --- # Use Web3-Onboard with MetaMask SDK diff --git a/wallet/how-to/use-sdk/gaming/index.md b/sdk/get-started/gaming/index.md similarity index 51% rename from wallet/how-to/use-sdk/gaming/index.md rename to sdk/get-started/gaming/index.md index cd5955959af..91b51605b49 100644 --- a/wallet/how-to/use-sdk/gaming/index.md +++ b/sdk/get-started/gaming/index.md @@ -1,16 +1,14 @@ --- sidebar_label: Gaming -sidebar_position: 2 +sidebar_position: 4 description: Set up the SDK in your gaming dapp. -tags: - - Unity SDK --- # Use MetaMask SDK with gaming dapps -Import [MetaMask SDK](../../../concepts/sdk/index.md) into your gaming dapp to enable your users +Import [MetaMask SDK](../../concepts/about-sdk.md) into your gaming dapp to enable your users to easily connect with their MetaMask Mobile wallet. See the instructions for the following gaming platforms: -- [Unity](unity/index.md) -- [Unreal Engine](unreal-engine.md) (coming soon) +- [Unity](unity.md) +- Unreal Engine (coming soon) diff --git a/wallet/how-to/use-sdk/gaming/unity/index.md b/sdk/get-started/gaming/unity.md similarity index 99% rename from wallet/how-to/use-sdk/gaming/unity/index.md rename to sdk/get-started/gaming/unity.md index 105ab1b2774..450032b7290 100644 --- a/wallet/how-to/use-sdk/gaming/unity/index.md +++ b/sdk/get-started/gaming/unity.md @@ -2,8 +2,6 @@ sidebar_label: Unity sidebar_position: 1 description: Set up the SDK in your Unity game. -tags: - - Unity SDK --- import YoutubeEmbed from '@site/src/components/YoutubeEmbed'; diff --git a/wallet/how-to/use-sdk/javascript/electron.md b/sdk/get-started/javascript/electron.md similarity index 96% rename from wallet/how-to/use-sdk/javascript/electron.md rename to sdk/get-started/javascript/electron.md index d8e70d7bf8a..4a2dea30520 100644 --- a/wallet/how-to/use-sdk/javascript/electron.md +++ b/sdk/get-started/javascript/electron.md @@ -2,8 +2,6 @@ sidebar_label: Electron sidebar_position: 6 description: Set up the SDK in your Electron dapp. -tags: - - JavaScript SDK --- # Use MetaMask SDK with Electron diff --git a/wallet/how-to/use-sdk/javascript/index.md b/sdk/get-started/javascript/index.md similarity index 98% rename from wallet/how-to/use-sdk/javascript/index.md rename to sdk/get-started/javascript/index.md index 100f2a6466d..6bfc2d3cf2b 100644 --- a/wallet/how-to/use-sdk/javascript/index.md +++ b/sdk/get-started/javascript/index.md @@ -1,9 +1,7 @@ --- sidebar_label: JavaScript -sidebar_position: 1 +sidebar_position: 2 description: Set up the SDK in your JavaScript dapp. -tags: - - JavaScript SDK --- # Use MetaMask SDK with JavaScript diff --git a/wallet/how-to/use-sdk/javascript/nodejs.md b/sdk/get-started/javascript/nodejs.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/nodejs.md rename to sdk/get-started/javascript/nodejs.md index 6cde07e5852..ef3f1bc99c1 100644 --- a/wallet/how-to/use-sdk/javascript/nodejs.md +++ b/sdk/get-started/javascript/nodejs.md @@ -2,8 +2,6 @@ sidebar_label: Node.js sidebar_position: 5 description: Set up the SDK in your Node.js dapp. -tags: - - JavaScript SDK --- # Use MetaMask SDK with Node.js diff --git a/wallet/how-to/use-sdk/javascript/other-web-frameworks.md b/sdk/get-started/javascript/other-web-frameworks.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/other-web-frameworks.md rename to sdk/get-started/javascript/other-web-frameworks.md index 2f5c54dcea4..988a3a57e37 100644 --- a/wallet/how-to/use-sdk/javascript/other-web-frameworks.md +++ b/sdk/get-started/javascript/other-web-frameworks.md @@ -2,8 +2,6 @@ sidebar_label: Other web frameworks sidebar_position: 3 description: Set up the SDK in other web frameworks. -tags: - - JavaScript SDK --- # Use MetaMask SDK with other web frameworks diff --git a/wallet/how-to/use-sdk/javascript/pure-js.md b/sdk/get-started/javascript/pure-js.md similarity index 98% rename from wallet/how-to/use-sdk/javascript/pure-js.md rename to sdk/get-started/javascript/pure-js.md index caf89a1f18c..351fcd1221f 100644 --- a/wallet/how-to/use-sdk/javascript/pure-js.md +++ b/sdk/get-started/javascript/pure-js.md @@ -2,8 +2,6 @@ sidebar_label: Pure JavaScript sidebar_position: 2 description: Set up the SDK in your Pure JavaScript dapp. -tags: - - JavaScript SDK --- # Use MetaMask SDK with pure JavaScript diff --git a/wallet/how-to/use-sdk/javascript/react-native.md b/sdk/get-started/javascript/react-native.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/react-native.md rename to sdk/get-started/javascript/react-native.md index 795ecc51f0b..0a406919df7 100644 --- a/wallet/how-to/use-sdk/javascript/react-native.md +++ b/sdk/get-started/javascript/react-native.md @@ -2,8 +2,6 @@ sidebar_label: React Native and Expo sidebar_position: 4 description: Set up the SDK in your React Native dapp. -tags: - - JavaScript SDK --- import Tabs from "@theme/Tabs"; diff --git a/wallet/how-to/use-sdk/javascript/react/index.md b/sdk/get-started/javascript/react/index.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/react/index.md rename to sdk/get-started/javascript/react/index.md index 715650c1681..556efd7eb43 100644 --- a/wallet/how-to/use-sdk/javascript/react/index.md +++ b/sdk/get-started/javascript/react/index.md @@ -2,8 +2,6 @@ sidebar_label: React sidebar_position: 1 description: Set up the SDK in your React dapp. -tags: - - JavaScript SDK --- import Tabs from "@theme/Tabs"; diff --git a/wallet/how-to/use-sdk/javascript/react/react-ui.md b/sdk/get-started/javascript/react/react-ui.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/react/react-ui.md rename to sdk/get-started/javascript/react/react-ui.md index 5baab2357d6..2d94fda8ac1 100644 --- a/wallet/how-to/use-sdk/javascript/react/react-ui.md +++ b/sdk/get-started/javascript/react/react-ui.md @@ -2,8 +2,6 @@ sidebar_label: React UI sidebar_position: 1 description: Set up the SDK in your React dapp using the React UI package. -tags: - - JavaScript SDK --- import Tabs from "@theme/Tabs"; diff --git a/wallet/how-to/use-sdk/mobile/android.md b/sdk/get-started/mobile/android.md similarity index 99% rename from wallet/how-to/use-sdk/mobile/android.md rename to sdk/get-started/mobile/android.md index 7c603e33c2e..186e807d3b2 100644 --- a/wallet/how-to/use-sdk/mobile/android.md +++ b/sdk/get-started/mobile/android.md @@ -3,8 +3,6 @@ sidebar_label: Android sidebar_position: 2 toc_max_heading_level: 4 description: Set up the SDK in your Android dapp. -tags: - - Android SDK --- # Use MetaMask SDK with Android diff --git a/wallet/how-to/use-sdk/mobile/index.md b/sdk/get-started/mobile/index.md similarity index 72% rename from wallet/how-to/use-sdk/mobile/index.md rename to sdk/get-started/mobile/index.md index 8ee0bff2ecf..b02f03dde43 100644 --- a/wallet/how-to/use-sdk/mobile/index.md +++ b/sdk/get-started/mobile/index.md @@ -2,14 +2,11 @@ sidebar_label: Mobile sidebar_position: 3 description: Set up the SDK in your mobile dapp. -tags: - - iOS SDK - - Android SDK --- # Use MetaMask SDK with mobile dapps -Import [MetaMask SDK](../../../concepts/sdk/index.md) into your mobile dapp to enable your users +Import [MetaMask SDK](../../concepts/about-sdk.md) into your mobile dapp to enable your users to easily connect with their MetaMask Mobile wallet. See the instructions for the following mobile platforms: diff --git a/wallet/how-to/use-sdk/mobile/ios.md b/sdk/get-started/mobile/ios.md similarity index 99% rename from wallet/how-to/use-sdk/mobile/ios.md rename to sdk/get-started/mobile/ios.md index 7d57c21e5c3..c6ad90f8fbd 100644 --- a/wallet/how-to/use-sdk/mobile/ios.md +++ b/sdk/get-started/mobile/ios.md @@ -3,8 +3,6 @@ sidebar_label: iOS sidebar_position: 1 toc_max_heading_level: 4 description: Set up the SDK in your iOS dapp. -tags: - - iOS SDK --- import Tabs from "@theme/Tabs"; diff --git a/sdk/how-to/gaming/_category_.json b/sdk/how-to/gaming/_category_.json new file mode 100644 index 00000000000..a6a1a17152a --- /dev/null +++ b/sdk/how-to/gaming/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Gaming", + "position": 3, + "link": { + "type": "generated-index", + "slug": "how-to/gaming" + } +} diff --git a/sdk/how-to/gaming/unity/_category_.json b/sdk/how-to/gaming/unity/_category_.json new file mode 100644 index 00000000000..115bc271b94 --- /dev/null +++ b/sdk/how-to/gaming/unity/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Unity", + "position": 1, + "link": { + "type": "generated-index", + "slug": "how-to/gaming/unity" + } +} diff --git a/wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md b/sdk/how-to/gaming/unity/connect-and-sign.md similarity index 98% rename from wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md rename to sdk/how-to/gaming/unity/connect-and-sign.md index e2e5633abcb..c784e9ac996 100644 --- a/wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md +++ b/sdk/how-to/gaming/unity/connect-and-sign.md @@ -1,8 +1,6 @@ --- sidebar_position: 1 sidebar_label: Connect and sign -tags: - - Unity SDK --- # Connect and sign in Unity diff --git a/wallet/how-to/use-sdk/gaming/unity/dweb.md b/sdk/how-to/gaming/unity/dweb.md similarity index 99% rename from wallet/how-to/use-sdk/gaming/unity/dweb.md rename to sdk/how-to/gaming/unity/dweb.md index 2f95a91c9dd..f66d205de64 100644 --- a/wallet/how-to/use-sdk/gaming/unity/dweb.md +++ b/sdk/how-to/gaming/unity/dweb.md @@ -2,8 +2,6 @@ sidebar_position: 4 sidebar_label: Enable human-readable addresses description: Integrate Decentraweb into your Unity game to enable human-readable addresses. -tags: - - Unity SDK --- import Tabs from "@theme/Tabs"; diff --git a/wallet/how-to/use-sdk/gaming/unity/infura.md b/sdk/how-to/gaming/unity/infura.md similarity index 95% rename from wallet/how-to/use-sdk/gaming/unity/infura.md rename to sdk/how-to/gaming/unity/infura.md index f6ad72663a6..9f886917b98 100644 --- a/wallet/how-to/use-sdk/gaming/unity/infura.md +++ b/sdk/how-to/gaming/unity/infura.md @@ -2,8 +2,6 @@ description: Set up MetaMask SDK with Infura in your Unity game. sidebar_position: 2 sidebar_label: Set up Infura -tags: - - Unity SDK --- # Set up Infura in Unity @@ -47,7 +45,7 @@ your Unity game.

-![MetaMask Unity script](../../../../assets/unity-infura.png) +![MetaMask Unity script](../../../assets/unity-infura.png)

diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-factory.md b/sdk/how-to/gaming/unity/smart-contracts/contract-factory.md similarity index 99% rename from wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-factory.md rename to sdk/how-to/gaming/unity/smart-contracts/contract-factory.md index c928d1c6742..c177862d2ce 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-factory.md +++ b/sdk/how-to/gaming/unity/smart-contracts/contract-factory.md @@ -1,8 +1,6 @@ --- sidebar_position: 2 description: Learn about the contract factory in Unity. -tags: - - Unity SDK --- # Contract factory diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md b/sdk/how-to/gaming/unity/smart-contracts/contract-interface.md similarity index 99% rename from wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md rename to sdk/how-to/gaming/unity/smart-contracts/contract-interface.md index 2a7dc02c2a7..d21ba3af10f 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md +++ b/sdk/how-to/gaming/unity/smart-contracts/contract-interface.md @@ -1,8 +1,6 @@ --- sidebar_position: 1 description: Learn about the contract interface in Unity. -tags: - - Unity SDK --- # Contract interface diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-provider.md b/sdk/how-to/gaming/unity/smart-contracts/contract-provider.md similarity index 99% rename from wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-provider.md rename to sdk/how-to/gaming/unity/smart-contracts/contract-provider.md index 4172750e54f..dcd4b2e1004 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-provider.md +++ b/sdk/how-to/gaming/unity/smart-contracts/contract-provider.md @@ -1,8 +1,6 @@ --- sidebar_position: 4 description: Learn about the contract provider in Unity. -tags: - - Unity SDK --- # Contract provider diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md b/sdk/how-to/gaming/unity/smart-contracts/contract-proxy-class.md similarity index 98% rename from wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md rename to sdk/how-to/gaming/unity/smart-contracts/contract-proxy-class.md index aafa9fe280a..f7448caa885 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md +++ b/sdk/how-to/gaming/unity/smart-contracts/contract-proxy-class.md @@ -1,8 +1,6 @@ --- sidebar_position: 3 description: Learn about the contract proxy class in Unity. -tags: - - Unity SDK --- # Contract proxy class diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md b/sdk/how-to/gaming/unity/smart-contracts/index.md similarity index 94% rename from wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md rename to sdk/how-to/gaming/unity/smart-contracts/index.md index c70649b04e3..e5987b99626 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md +++ b/sdk/how-to/gaming/unity/smart-contracts/index.md @@ -2,8 +2,6 @@ sidebar_position: 3 sidebar_label: Interact with smart contracts description: Interact with smart contracts in your Unity game. -tags: - - Unity SDK --- # Interact with smart contracts in Unity @@ -29,7 +27,7 @@ A new dialog box opens:

-![dialog](../../../../../assets/contract-abi-converter-dialog.png) +![dialog](../../../../assets/contract-abi-converter-dialog.png)

@@ -99,7 +97,7 @@ Before using the contract template, configure the contract address to use for ea

-![empty template](../../../../../assets/unity-empty-template.png) +![empty template](../../../../assets/unity-empty-template.png)

@@ -109,7 +107,7 @@ When adding a new address, if you don't see your desired blockchain listed, you

-![full template](../../../../../assets/unity-example-template.png) +![full template](../../../../assets/unity-example-template.png)

diff --git a/sdk/how-to/javascript/_category_.json b/sdk/how-to/javascript/_category_.json new file mode 100644 index 00000000000..e1d1938fad9 --- /dev/null +++ b/sdk/how-to/javascript/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "JavaScript", + "position": 1, + "link": { + "type": "generated-index", + "slug": "how-to/javascript" + } +} diff --git a/wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md b/sdk/how-to/javascript/batch-json-rpc-requests.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md rename to sdk/how-to/javascript/batch-json-rpc-requests.md index 14c770714fd..d1f5b18f507 100644 --- a/wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md +++ b/sdk/how-to/javascript/batch-json-rpc-requests.md @@ -1,8 +1,6 @@ --- description: Batch multiple JSON-RPC requests using MetaMask SDK. -sidebar_position: 9 -tags: - - JavaScript SDK +sidebar_position: 3 --- # Batch JSON-RPC requests diff --git a/wallet/how-to/use-sdk/javascript/connect-and-sign.md b/sdk/how-to/javascript/connect-and-sign.md similarity index 98% rename from wallet/how-to/use-sdk/javascript/connect-and-sign.md rename to sdk/how-to/javascript/connect-and-sign.md index 99732ab2e28..e78e7e244d0 100644 --- a/wallet/how-to/use-sdk/javascript/connect-and-sign.md +++ b/sdk/how-to/javascript/connect-and-sign.md @@ -1,9 +1,6 @@ --- description: Use MetaMask SDK to connect and sign in a single interaction. -sidebar_position: 7 -tags: - - JavaScript SDK - - iOS SDK +sidebar_position: 1 --- # Connect and sign diff --git a/wallet/how-to/use-sdk/javascript/display-custom-modals.md b/sdk/how-to/javascript/display-custom-modals.md similarity index 96% rename from wallet/how-to/use-sdk/javascript/display-custom-modals.md rename to sdk/how-to/javascript/display-custom-modals.md index ee09ce8484a..553a29db048 100644 --- a/wallet/how-to/use-sdk/javascript/display-custom-modals.md +++ b/sdk/how-to/javascript/display-custom-modals.md @@ -1,8 +1,6 @@ --- description: Display custom modals using the JavaScript SDK. -sidebar_position: 10 -tags: - - JavaScript SDK +sidebar_position: 4 --- # Display custom modals @@ -97,7 +95,7 @@ MetaMask isn't installed.

-![Custom modal gif](../../../assets/custom-modal.gif) +![Custom modal gif](../../assets/custom-modal.gif)

diff --git a/wallet/how-to/use-sdk/javascript/make-read-only-requests.md b/sdk/how-to/javascript/make-read-only-requests.md similarity index 99% rename from wallet/how-to/use-sdk/javascript/make-read-only-requests.md rename to sdk/how-to/javascript/make-read-only-requests.md index 85691279fc8..d115a683471 100644 --- a/wallet/how-to/use-sdk/javascript/make-read-only-requests.md +++ b/sdk/how-to/javascript/make-read-only-requests.md @@ -1,8 +1,6 @@ --- -sidebar_position: 8 +sidebar_position: 2 description: Use Infura and custom nodes to make direct, read-only requests in your JavaScript dapp. -tags: - - JavaScript SDK --- # Make read-only requests diff --git a/sdk/how-to/mobile/_category_.json b/sdk/how-to/mobile/_category_.json new file mode 100644 index 00000000000..16b15205aed --- /dev/null +++ b/sdk/how-to/mobile/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Mobile", + "position": 2, + "link": { + "type": "generated-index", + "slug": "how-to/mobile" + } +} diff --git a/sdk/how-to/mobile/android/_category_.json b/sdk/how-to/mobile/android/_category_.json new file mode 100644 index 00000000000..b37056ed425 --- /dev/null +++ b/sdk/how-to/mobile/android/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Android", + "position": 2, + "link": { + "type": "generated-index", + "slug": "how-to/mobile/android" + } +} diff --git a/sdk/how-to/mobile/android/connect-and-sign.md b/sdk/how-to/mobile/android/connect-and-sign.md new file mode 100644 index 00000000000..91d3a16cb78 --- /dev/null +++ b/sdk/how-to/mobile/android/connect-and-sign.md @@ -0,0 +1,2 @@ + +# Connect and sign \ No newline at end of file diff --git a/sdk/how-to/mobile/ios/_category_.json b/sdk/how-to/mobile/ios/_category_.json new file mode 100644 index 00000000000..e302e640248 --- /dev/null +++ b/sdk/how-to/mobile/ios/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "iOS", + "position": 1, + "link": { + "type": "generated-index", + "slug": "how-to/mobile/ios" + } +} diff --git a/sdk/how-to/mobile/ios/connect-and-sign.md b/sdk/how-to/mobile/ios/connect-and-sign.md new file mode 100644 index 00000000000..b0b2043e6c8 --- /dev/null +++ b/sdk/how-to/mobile/ios/connect-and-sign.md @@ -0,0 +1 @@ +# Connect and sign \ No newline at end of file diff --git a/sdk/index.md b/sdk/index.md new file mode 100644 index 00000000000..5363fd1e064 --- /dev/null +++ b/sdk/index.md @@ -0,0 +1,73 @@ +--- +sidebar_label: Introduction +description: Use the SDK in your dapp. +--- + +# MetaMask SDK documentation + +[MetaMask SDK](concepts/about-sdk.md) is a library that provides a reliable, secure, and seamless +connection from your dapp to the MetaMask browser extension and MetaMask Mobile. +By integrating your dapp using the SDK, millions of MetaMask Mobile users can connect to their +preferred MetaMask client. +The SDK supports the following dapp platforms: + +
+
+
+

💻 JavaScript

+
+ +
+
+
+

📱 Mobile

+
+
+ +
+
+
+
+

🎮 Gaming

+
+
+
    +
  • Unity
  • +
  • Unreal Engine (coming soon)
  • +
+
+
+
+
+
+

↔️ Third-party libraries

+
+
+ +
+
+ +## Questions? + +If you have questions about integrating your dapp with MetaMask using the SDK, you can ask on the +**mm-sdk** channel on [Consensys Discord](https://discord.gg/consensys). + +:::info MetaMask user support +If you need MetaMask user support, visit the [MetaMask Help Center](https://support.metamask.io/). +::: diff --git a/sdk/reference/json-rpc-api.md b/sdk/reference/json-rpc-api.md new file mode 100644 index 00000000000..6bc7a93776f --- /dev/null +++ b/sdk/reference/json-rpc-api.md @@ -0,0 +1,5 @@ +--- +sidebar_position: 3 +--- + +# JSON-RPC API \ No newline at end of file diff --git a/wallet/reference/sdk-js-options.md b/sdk/reference/sdk-js-options.md similarity index 99% rename from wallet/reference/sdk-js-options.md rename to sdk/reference/sdk-js-options.md index ea41c197743..e3f1b713f2a 100644 --- a/wallet/reference/sdk-js-options.md +++ b/sdk/reference/sdk-js-options.md @@ -1,8 +1,6 @@ --- description: See the JavaScript SDK options reference. sidebar_position: 1 -tags: - - JavaScript SDK --- import Tabs from "@theme/Tabs"; diff --git a/wallet/reference/sdk-unity-api.md b/sdk/reference/sdk-unity-api.md similarity index 99% rename from wallet/reference/sdk-unity-api.md rename to sdk/reference/sdk-unity-api.md index f5288c97da6..f27a429eebc 100644 --- a/wallet/reference/sdk-unity-api.md +++ b/sdk/reference/sdk-unity-api.md @@ -2,8 +2,6 @@ description: See the Unity SDK API reference. sidebar_position: 2 toc_max_heading_level: 4 -tags: - - Unity SDK --- # Unity SDK API diff --git a/sdk/tutorials/create-react-dapp.md b/sdk/tutorials/create-react-dapp.md new file mode 100644 index 00000000000..62776225429 --- /dev/null +++ b/sdk/tutorials/create-react-dapp.md @@ -0,0 +1 @@ +# Create a React dapp \ No newline at end of file diff --git a/src/components/CardSection.tsx b/src/components/CardSection.tsx index 179a6edfbe9..b0ea79ee2d0 100644 --- a/src/components/CardSection.tsx +++ b/src/components/CardSection.tsx @@ -2,13 +2,23 @@ import React from "react"; import Card, { type CardItem } from "@site/src/components/Card"; const CardList: CardItem[] = [ + { + title: "SDK", + link: "/sdk", + description: ( + <> + Integrate your dapp with MetaMask using MetaMask SDK. You can interact + with your users' Ethereum accounts from multiple dapp platforms. + + ), + }, { title: "Wallet", link: "/wallet", description: ( <> - Integrate your dapp with MetaMask using the Wallet API. You can interact - with your users' Ethereum accounts from multiple dapp platforms. + Integrate your dapp with MetaMask using the Wallet API. You can request + signatures from users, send transactions, display tokens, and more. ), }, diff --git a/vercel.json b/vercel.json index 3a4b3624c0d..569a3888fad 100644 --- a/vercel.json +++ b/vercel.json @@ -158,10 +158,6 @@ "source": "/wallet/how-to/integrate-with-mobile", "destination": "/wallet/how-to/use-sdk" }, - { - "source": "/sdk", - "destination": "/wallet/how-to/use-sdk" - }, { "source": "/wallet/how-to/sign-data/connect-and-sign", "destination": "/wallet/how-to/use-sdk/javascript/connect-and-sign" diff --git a/wallet-sidebar.js b/wallet-sidebar.js index d4cf51e5fbe..a972098eca8 100644 --- a/wallet-sidebar.js +++ b/wallet-sidebar.js @@ -28,14 +28,6 @@ const sidebar = { label: "Reference", link: { type: "generated-index", slug: "/reference" }, items: [ - { - type: "doc", - id: "reference/sdk-js-options", - }, - { - type: "doc", - id: "reference/sdk-unity-api", - }, { type: "doc", id: "reference/provider-api", diff --git a/wallet/how-to/use-sdk/gaming/unreal-engine.md b/wallet/how-to/use-sdk/gaming/unreal-engine.md deleted file mode 100644 index 8d965fd2c09..00000000000 --- a/wallet/how-to/use-sdk/gaming/unreal-engine.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -sidebar_label: Unreal Engine (coming soon) -sidebar_position: 2 ---- - -# Use MetaMask SDK with Unreal Engine - -[MetaMask SDK](../../../concepts/sdk/index.md) support for Unreal Engine games is coming soon. -The SDK currently supports [Unity](unity/index.md) gaming dapps, -[JavaScript-based](../javascript/index.md) dapps, and [mobile](../mobile/index.md) dapps. diff --git a/wallet/how-to/use-sdk/index.md b/wallet/how-to/use-sdk/index.md deleted file mode 100644 index 831d51b0035..00000000000 --- a/wallet/how-to/use-sdk/index.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -sidebar_position: 7 -description: Use the SDK in your dapp. -tags: - - JavaScript SDK - - iOS SDK - - Android SDK - - Unity SDK ---- - -# Use MetaMask SDK - -[MetaMask SDK](../../concepts/sdk/index.md) is a library that provides a reliable, secure, and seamless -connection from your dapp to the MetaMask browser extension and MetaMask Mobile. -By integrating your dapp using the SDK, millions of MetaMask Mobile users can connect to their -preferred MetaMask client. -The SDK supports the following dapp platforms: - -
-
-
-

💻 JavaScript

-
- -
-
-
-

📱 Mobile

-
-
- -
-
-
-
-

🎮 Gaming

-
-
- -
-
-
-
-
-

↔️ Third-party libraries

-
-
- -
-
diff --git a/wallet/index.mdx b/wallet/index.mdx index 0e1878e5574..6986489627a 100644 --- a/wallet/index.mdx +++ b/wallet/index.mdx @@ -76,8 +76,8 @@ If you're new to integrating dapps with MetaMask, check out the following topics ## Questions? -If you have questions about integrating your dapp with MetaMask, you can interact with the MetaMask -team and community on the MetaMask channels on [Consensys Discord](https://discord.gg/consensys). +If you have questions about integrating your dapp with MetaMask using the Wallet API, you can ask on +the **mm-wallet-api** channel on [Consensys Discord](https://discord.gg/consensys). :::info MetaMask user support If you need MetaMask user support, visit the [MetaMask Help Center](https://support.metamask.io/).