
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@metamask/sdk
Advanced tools
The MetaMask SDK enables developers to easily connect their dapps with a MetaMask wallet (Extension or Mobile) no matter the dapp environment or platform.
The MetaMask SDK is a library that can be installed by developers on their projects and will automatically guide their users to easily connect with a MetaMask wallet client. For instance, for dapps running on a desktop browser, the SDK will check if Extension is installed and if not it will prompt the user to install it or to connect via QR code with their MetaMask Mobile wallet. Another example, for native mobile applications, the SDK will automatically deeplink into MetaMask Mobile wallet to make the connection.
The MetaMask SDK instance returns a provider, this provider is the ethereum object that developers are already used to which is here. This provider will now be available for:
The following code examplifies importing the SDK into a javascript-based app. For other languages, check the sections bellow.
Install the SDK:
yarn add @metamask/sdk
or
npm i @metamask/sdk
Import the SDK (for possible parameters check this):
import MetaMaskSDK from '@metamask/sdk'
const ethereum = new MetaMaskSDK({})
Use the SDK:
ethereum.request({method: 'eth_requestAccounts', params: []})
The MetaMask SDK provides different bundles optimized for various environments:
@metamask/sdk/browserimport MetaMaskSDK from '@metamask/sdk/browser';
@metamask/sdk/react-nativeimport MetaMaskSDK from '@metamask/sdk/react-native';
@metamask/sdk/node// ESM
import MetaMaskSDK from '@metamask/sdk/node';
// CommonJS
const MetaMaskSDK = require('@metamask/sdk/node');
The SDK will automatically select the appropriate bundle based on your environment, but you can explicitly choose a specific bundle using the paths above.
Please access this to read the MetaMask SDK full documentation
Contact the MetaMask SDK team for a complimentary design optimization workshop here
web3 is a comprehensive library for interacting with the Ethereum blockchain. It provides functionalities for sending transactions, interacting with smart contracts, and more. Compared to @metamask/sdk, web3 offers a broader range of blockchain interactions but requires more setup for MetaMask-specific functionalities.
ethers is a lightweight library for interacting with the Ethereum blockchain. It provides utilities for managing keys, interacting with smart contracts, and sending transactions. Similar to web3, ethers is more general-purpose and requires additional setup for MetaMask-specific interactions.
web3modal is a library that provides a simple way to connect to various wallet providers, including MetaMask. It offers a user-friendly modal for selecting and connecting to wallets. Compared to @metamask/sdk, web3modal focuses on providing a seamless wallet connection experience across multiple providers.
FAQs
Unknown package
The npm package @metamask/sdk receives a total of 189,510 weekly downloads. As such, @metamask/sdk popularity was classified as popular.
We found that @metamask/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.