Use MetaMask SDK
MetaMask SDK provides a reliable, secure, and seamless connection from your dapp to a MetaMask wallet client. It supports the following dapp platforms:
- React Native
- Native iOS
- Native Android (coming soon)
- Unity
- Unreal Engine (coming soon)
MetaMask SDK uses the Ethereum provider that developers are already used to, so existing dapps work out of the box with the SDK.
How it works
The following are examples of how a user experiences a dapp with the SDK installed, on various platforms.
- Desktop
- Mobile
- Node.js
When a user accesses your web dapp on a desktop browser that doesn't have the MetaMask extension installed, a popup appears that prompts the user to either install the MetaMask extension or connect to MetaMask Mobile using a QR code.
You can try the
hosted test dapp with the SDK installed.
You can also download the
React project example.
Install the example using yarn
and run it using yarn start
.
When a user accesses your mobile dapp, or web dapp on a mobile browser, the SDK automatically deeplinks to MetaMask Mobile (or if the user doesn't already have it, prompts them to install it). After the user accepts the connection, they're automatically redirected back to your dapp. This happens for all actions that need user approval.
You can try the
hosted test dapp with the SDK installed.
You can also download the
React project example.
Install the example using yarn
and run it using yarn start
.
When a user accesses your Node.js dapp, the SDK renders a QR code on the console which users can scan with their MetaMask Mobile app.
You can download the
Node.js example.
Install the example using yarn
and run it using node .
.