Skip to content

Commit 6269b85

Browse files
committed
update links, filenames, etc
1 parent e44d361 commit 6269b85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+230
-239
lines changed

sdk-sidebar.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,21 @@ const sidebar = {
2222
label: "Get started",
2323
link: {
2424
type: "generated-index",
25-
slug: "/get-started", },
25+
slug: "/get-started",
26+
description: "You can get started with MetaMask SDK using the following platforms:",
27+
},
2628
collapsed: false,
2729
items: [{ type: "autogenerated", dirName: "get-started" }],
2830
},
2931
{
3032
type: "category",
3133
label: "How to",
32-
link: { type: "generated-index", slug: "/how-to" },
34+
link: {
35+
type: "generated-index",
36+
slug: "/how-to",
37+
title: "How-to guides",
38+
description: "See how-to guides for the following MetaMask SDK platforms:",
39+
},
3340
collapsed: false,
3441
items: [{ type: "autogenerated", dirName: "how-to" }],
3542
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"label": "Third-party libraries",
3+
"position": 1,
4+
"link": {
5+
"type": "generated-index",
6+
"slug": "get-started/3rd-party-libraries",
7+
"title": "Get started using third-party libraries",
8+
"description": "You can get started with MetaMask SDK using the following third-party libraries:"
9+
}
10+
}

sdk/get-started/3rd-party-libraries/index.md

-12
This file was deleted.

sdk/get-started/3rd-party-libraries/wagmi.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
2-
description: Integrate MetaMask SDK with Wagmi in your JavaScript dapp.
2+
description: Get started with MetaMask SDK using Wagmi.
33
sidebar_position: 1
44
sidebar_label: Wagmi
55
---
66

7-
# Use Wagmi with MetaMask SDK
7+
# Get started using Wagmi
88

99
[Wagmi](https://wagmi.sh/) is a powerful and efficient React Hooks library designed to streamline
1010
dapp development by simplifying Ethereum interactions.
1111

12-
You can integrate [MetaMask SDK](../../../concepts/sdk/index.md) into your dapp alongside Wagmi,
12+
You can integrate MetaMask SDK into your dapp alongside Wagmi,
1313
using the MetaMask connector with Wagmi, to enable your users to seamlessly and securely connect to
1414
the MetaMask browser extension and MetaMask Mobile.
1515

1616
## Prerequisites
1717

1818
- Ensure you have a basic understanding of Ethereum smart contracts and React Hooks.
1919
- Set up a project with [Wagmi](https://wagmi.sh/react/getting-started).
20-
- Create an Infura API key and allowlist to [make read-only requests](../javascript/make-read-only-requests.md).
20+
- Create an Infura API key and allowlist to [make read-only requests](../../how-to/javascript/make-read-only-requests.md).
2121

2222
## Steps
2323

2424
### 1. Configure MetaMask SDK
2525

26-
In your Wagmi project, configure MetaMask SDK with the proper [SDK options](../../../reference/sdk-js-options.md).
26+
In your Wagmi project, configure MetaMask SDK with the proper [SDK options](../../reference/js-options.md).
2727

2828
```javascript
2929
const MetaMaskOptions = {
@@ -37,20 +37,20 @@ const MetaMaskOptions = {
3737

3838
#### Dapp metadata
3939

40-
Specify the [`dappMetadata`](../../../reference/sdk-js-options.md#dappmetadata) option to help
40+
Specify the [`dappMetadata`](../../reference/js-options.md#dappmetadata) option to help
4141
identify your dapp within the MetaMask ecosystem.
4242
This option is required when configuring the MetaMask connector with Wagmi.
4343

4444
#### Infura API key
4545

46-
We recommend specifying the [`infuraAPIKey`](../../../reference/sdk-js-options.md#infuraapikey)
47-
option to [make read-only requests](../javascript/make-read-only-requests.md) using the Infura API.
46+
We recommend specifying the [`infuraAPIKey`](../../reference/js-options.md#infuraapikey)
47+
option to [make read-only requests](../../how-to/javascript/make-read-only-requests.md) using the Infura API.
4848
Read more about the [benefits of using the Infura API with Wagmi](#benefits-of-using-the-infura-api-with-wagmi).
4949

5050
#### Universal links
5151

5252
We recommend using universal links instead of deeplinks to avoid issues on iOS.
53-
Thus, do not enable the [`useDeeplink`](../../../reference/sdk-js-options.md#usedeeplink) option.
53+
Thus, do not enable the [`useDeeplink`](../../reference/js-options.md#usedeeplink) option.
5454
Using universal links ensures a smoother transition for users accessing your dapp from mobile
5555
devices, providing a better user experience compared to traditional deeplinking methods.
5656

@@ -120,7 +120,7 @@ These are some errors that might occur in mobile environments:
120120

121121
To overcome this limitation in mobile dapps that rely on a continuous connection with MetaMask,
122122
use the Infura API to make read-only requests.
123-
You can do this by [configuring the SDK with an Infura API key](#2-configure-the-sdk).
123+
You can do this by [configuring the SDK with an Infura API key](#1-configure-metamask-sdk).
124124
This approach offloads the read operations to Infura's nodes, reducing the load on your own
125125
infrastructure and ensuring high availability and reliability, independent of the user's wallet connection.
126126

sdk/get-started/3rd-party-libraries/web3-onboard.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
description: Integrate MetaMask SDK with Web3-Onboard in your JavaScript dapp.
2+
description: Get started with MetaMask SDK using Web3-Onboard.
33
sidebar_position: 2
44
sidebar_label: Web3-Onboard
55
---
66

7-
# Use Web3-Onboard with MetaMask SDK
7+
# Get started using Web3-Onboard
88

99
[Web3-Onboard](https://onboard.blocknative.com/) is a JavaScript library that simplifies the process
1010
of onboarding users into dapps.
1111
It provides a smooth user interface, a variety of wallet integrations, and is highly customizable to
1212
meet the needs of your dapp.
1313

14-
You can integrate [MetaMask SDK](../../../concepts/sdk/index.md) into your dapp alongside Web3-Onboard,
14+
You can integrate MetaMask SDK into your dapp alongside Web3-Onboard,
1515
using the Web3-Onboard MetaMask module, to enable your users to seamlessly and securely connect to
1616
the MetaMask browser extension and MetaMask Mobile.
1717

@@ -39,8 +39,8 @@ import metamaskSDK from "@web3-onboard/metamask"
3939

4040
### 3. Instantiate the module
4141

42-
Instantiate the module using any [JavaScript SDK options](../../../reference/sdk-js-options.md), for
43-
example, [`dappMetadata`](../../../reference/sdk-js-options.md#dappmetadata):
42+
Instantiate the module using any [JavaScript SDK options](../../reference/js-options.md), for
43+
example, [`dappMetadata`](../../reference/js-options.md#dappmetadata):
4444

4545
```javascript
4646
const metamaskSDKWallet = metamaskSDK({
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"label": "Gaming ",
3+
"position": 5,
4+
"link": {
5+
"type": "generated-index",
6+
"slug": "get-started/gaming",
7+
"title": "Get started using gaming platforms",
8+
"description": "You can get started with MetaMask SDK using the following gaming platforms:"
9+
}
10+
}

sdk/get-started/gaming/index.md

-14
This file was deleted.

sdk/get-started/gaming/unity.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
sidebar_label: Unity
33
sidebar_position: 1
4-
description: Set up the SDK in your Unity game.
4+
description: Get started with MetaMask SDK using Unity.
55
---
66

77
import YoutubeEmbed from '@site/src/components/YoutubeEmbed';
88

9-
# Use MetaMask SDK with Unity
9+
# Get started using Unity
1010

11-
Import [MetaMask SDK](../../../../concepts/sdk/index.md) into your
11+
Import MetaMask SDK into your
1212
[Unity](https://assetstore.unity.com/packages/decentralization/infrastructure/metamask-246786) game
1313
to enable users to easily connect to their MetaMask Mobile wallet.
1414
The MetaMask Unity SDK supports macOS, Windows, Linux, iOS, Android, and WebGL.
@@ -95,7 +95,7 @@ You first must initialize by doing one of the following:
9595
- Check **Initialize On Start** on the component within the editor.
9696

9797
This initializes the wallet instance, making it accessible from `MetaMaskUnity.Instance.Wallet`.
98-
You can now make calls to the user's wallet using [provider API methods](../../../../reference/provider-api.md).
98+
You can now make calls to the user's wallet using [provider API methods](/wallet/reference/provider-api).
9999

100100
### 4. Connect to MetaMask
101101

@@ -137,7 +137,7 @@ The transport field is also required if you want to use it isolated from the can
137137
by the transport, then it generates the QR code for you.
138138

139139
:::info Connect and sign
140-
You can also [use the `connectAndSign` method](connect-and-sign.md) to
140+
You can also [use the `connectAndSign` method](../../how-to/gaming/unity/connect-and-sign.md) to
141141
connect to MetaMask and sign data in a single interaction.
142142
:::
143143

@@ -176,7 +176,7 @@ await wallet.Request(request);
176176
```
177177

178178
:::note
179-
See the [Unity SDK API reference](../../../../reference/sdk-unity-api.md) for an overview of the
179+
See the [Unity SDK API reference](../../reference/unity-api.md) for an overview of the
180180
API methods from the most important classes.
181181
:::
182182

@@ -215,7 +215,7 @@ Package Manager or Asset Store.
215215

216216
<summary>I can't find the SDK installation option.</summary>
217217

218-
If you don't see the option to [install the SDK](#2-install-the-sdk-for-unity) in your Unity menu,
218+
If you don't see the option to [install the SDK](#2-install-the-unity-sdk) in your Unity menu,
219219
ensure you're on the latest Unity version and that you have no red errors printed in your console.
220220
This option not appearing is typically due to incorrect editor initialization, which you can
221221
usually resolve by restarting the editor or updating your Unity version.
@@ -261,7 +261,7 @@ The SDK is filled with precompiled libraries to save on runtime compilation.
261261

262262
Once you have the MetaMask Unity SDK set up, you can:
263263

264-
- [Connect and sign in Unity.](connect-and-sign.md)
265-
- [Set up Infura in Unity.](infura.md)
266-
- [Interact with smart contracts in Unity.](smart-contracts/index.md)
267-
- [Enable human-readable addresses in Unity using Decentraweb.](dweb.md)
264+
- [Connect and sign in Unity.](../../how-to/gaming/unity/connect-and-sign.md)
265+
- [Set up Infura in Unity.](../../how-to/gaming/unity/infura.md)
266+
- [Interact with smart contracts in Unity.](../../how-to/gaming/unity/smart-contracts/index.md)
267+
- [Enable human-readable addresses in Unity using Decentraweb.](../../how-to/gaming/unity/dweb.md)

sdk/get-started/javascript/electron.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
sidebar_label: Electron
33
sidebar_position: 6
4-
description: Set up the SDK in your Electron dapp.
4+
description: Get started with MetaMask SDK using Electron.
55
---
66

7-
# Use MetaMask SDK with Electron
7+
# Get started using Electron
88

9-
Import [MetaMask SDK](../../../concepts/sdk/index.md) into your Electron dapp to enable your users
9+
Import MetaMask SDK into your Electron dapp to enable your users
1010
to easily connect to the MetaMask browser extension and MetaMask Mobile.
1111

1212
On the frontend, see the instructions to [use the SDK with React](react/index.md).

sdk/get-started/javascript/index.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
sidebar_label: JavaScript
33
sidebar_position: 3
4-
description: Set up the SDK in your JavaScript dapp.
4+
description: Get started with MetaMask SDK using JavaScript.
55
---
66

7-
# Use MetaMask SDK with JavaScript
7+
# Get started using JavaScript
88

9-
Import [MetaMask SDK](../../../concepts/sdk/index.md) into your JavaScript dapp to enable your
9+
Import MetaMask SDK into your JavaScript dapp to enable your
1010
users to easily connect to the MetaMask browser extension and MetaMask Mobile.
1111
The following instructions work for web dapps based on standard JavaScript.
1212
You can also see instructions for the following JavaScript-based platforms:
@@ -15,7 +15,6 @@ You can also see instructions for the following JavaScript-based platforms:
1515
- [React UI](react/react-ui.md)
1616
- [Pure JavaScript](pure-js.md)
1717
- [Other web frameworks](other-web-frameworks.md)
18-
- [React Native](react-native.md)
1918
- [Node.js](nodejs.md)
2019
- [Electron](electron.md)
2120

@@ -52,7 +51,7 @@ import { MetaMaskSDK } from "@metamask/sdk"
5251

5352
### 3. Instantiate the SDK
5453

55-
Instantiate the SDK using any [options](../../../reference/sdk-js-options.md):
54+
Instantiate the SDK using any [options](../../reference/js-options.md):
5655

5756
```javascript title="index.js"
5857
const MMSDK = new MetaMaskSDK({
@@ -68,26 +67,26 @@ const MMSDK = new MetaMaskSDK({
6867
const ethereum = MMSDK.getProvider()
6968
```
7069

71-
- Use [`dappMetadata`](../../../reference/sdk-js-options.md#dappmetadata) to display information
70+
- Use [`dappMetadata`](../../reference/js-options.md#dappmetadata) to display information
7271
about your dapp in the MetaMask connection modal.
73-
- Use [`infuraAPIKey`](../../../reference/sdk-js-options.md#infuraapikey) to
74-
[make read-only RPC requests](make-read-only-requests.md) from your dapp.
75-
- Use [`modals`](../../../reference/sdk-js-options.md#modals) to [customize the logic and UI of
76-
the displayed modals](display-custom-modals.md).
72+
- Use [`infuraAPIKey`](../../reference/js-options.md#infuraapikey) to
73+
[make read-only RPC requests](../../how-to/javascript/make-read-only-requests.md) from your dapp.
74+
- Use [`modals`](../../reference/js-options.md#modals) to [customize the logic and UI of
75+
the displayed modals](../../how-to/javascript/display-custom-modals.md).
7776

7877
### 4. Use the SDK
7978

80-
Use the SDK by calling any [provider API methods](../../../reference/provider-api.md).
79+
Use the SDK by calling any [provider API methods](/wallet/reference/provider-api).
8180
Always call [`eth_requestAccounts`](/wallet/reference/eth_requestaccounts) using
82-
[`request()`](../../../reference/provider-api.md#request) first, since it
81+
[`request()`](/wallet/reference/provider-api/#request) first, since it
8382
prompts the installation or connection popup to appear.
8483

8584
```javascript
8685
ethereum.request({ method: "eth_requestAccounts", params: [] })
8786
```
8887

89-
You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and
90-
[batch multiple JSON-RPC requests](batch-json-rpc-requests.md) using the `metamask_batch` method.
88+
You can also call the SDK's [`connectAndSign`](../../how-to/javascript/connect-and-sign.md) method, and
89+
[batch multiple JSON-RPC requests](../../how-to/javascript/batch-json-rpc-requests.md) using the `metamask_batch` method.
9190

9291
## Example
9392

sdk/get-started/javascript/nodejs.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
sidebar_label: Node.js
33
sidebar_position: 5
4-
description: Set up the SDK in your Node.js dapp.
4+
description: Get started with MetaMask SDK using Node.js.
55
---
66

7-
# Use MetaMask SDK with Node.js
7+
# Get started using Node.js
88

9-
Import [MetaMask SDK](../../../concepts/sdk/index.md) into your Node.js dapp to enable your users
9+
Import MetaMask SDK into your Node.js dapp to enable your users
1010
to easily connect to the MetaMask browser extension and MetaMask Mobile.
1111
The SDK for Node.js has the [same prerequisites](index.md#prerequisites) as for standard JavaScript.
1212

@@ -36,7 +36,7 @@ import { MetaMaskSDK } from "@metamask/sdk"
3636

3737
### 3. Instantiate the SDK
3838

39-
Instantiate the SDK using any [options](../../../reference/sdk-js-options.md):
39+
Instantiate the SDK using any [options](../../reference/js-options.md):
4040

4141
```javascript title="index.js"
4242
const MMSDK = new MetaMaskSDK({
@@ -52,26 +52,26 @@ const MMSDK = new MetaMaskSDK({
5252
const ethereum = MMSDK.getProvider()
5353
```
5454

55-
- Use [`dappMetadata`](../../../reference/sdk-js-options.md#dappmetadata) to display information
55+
- Use [`dappMetadata`](../../reference/js-options.md#dappmetadata) to display information
5656
about your dapp in the MetaMask connection modal.
57-
- Use [`infuraAPIKey`](../../../reference/sdk-js-options.md#infuraapikey) to
58-
[make read-only RPC requests](make-read-only-requests.md) from your dapp.
59-
- Use [`modals`](../../../reference/sdk-js-options.md#modals) to [customize the logic and UI of
60-
the displayed modals](display-custom-modals.md).
57+
- Use [`infuraAPIKey`](../../reference/js-options.md#infuraapikey) to
58+
[make read-only RPC requests](../../how-to/javascript/make-read-only-requests.md) from your dapp.
59+
- Use [`modals`](../../reference/js-options.md#modals) to [customize the logic and UI of
60+
the displayed modals](../../how-to/javascript/display-custom-modals.md).
6161

6262
### 4. Use the SDK
6363

64-
Use the SDK by calling any [provider API methods](../../../reference/provider-api.md).
64+
Use the SDK by calling any [provider API methods](/wallet/reference/provider-api.md).
6565
Always call [`eth_requestAccounts`](/wallet/reference/eth_requestaccounts) using
66-
[`request()`](../../../reference/provider-api.md#request) first, since it
66+
[`request()`](/wallet/reference/provider-api/#request) first, since it
6767
prompts the installation or connection popup to appear.
6868

6969
```javascript
7070
ethereum.request({ method: "eth_requestAccounts", params: [] })
7171
```
7272

73-
You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and
74-
[batch multiple JSON-RPC requests](batch-json-rpc-requests.md) using the `metamask_batch` method.
73+
You can also call the SDK's [`connectAndSign`](../../how-to/javascript/connect-and-sign.md) method, and
74+
[batch multiple JSON-RPC requests](../../how-to/javascript/batch-json-rpc-requests.md) using the `metamask_batch` method.
7575

7676
## Example
7777

0 commit comments

Comments
 (0)