MCPcopy Index your code
hub / github.com/MetaMask/metamask-sdk

github.com/MetaMask/metamask-sdk @v117.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v117.0.0 ↗ · + Follow
2,273 symbols 6,630 edges 1,281 files 64 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MetaMask SDK (Deprecated)

⚠️ DEPRECATED

This repository is deprecated and no longer actively maintained. MetaMask SDK has been superseded by MetaMask Connect, a ground-up rewrite with a streamlined API, direct wallet communication (no relay server), and multichain support out of the box.

Migrate to:

Migration guide & docs: https://docs.metamask.io/metamask-connect

New repo: https://github.com/MetaMask/connect-monorepo


codecov

MetaMask SDK enables developers to seamlessly connect their dapps to the MetaMask extension and mobile app.

You can use the SDK via the following platforms and libraries:

See the MetaMask SDK documentation for more information.

Features

  • Session persistence
  • Multi MetaMask provider (let user choose between browser extension and mobile wallet)
  • Batch RPC calls (send multiple requests to your wallet at once)
  • Read-only RPC calls and Infura integration
  • Wagmi hook integration (alpha)
  • i18n
  • Full modal UI customization
  • Smart contract library (coming soon)

Get started

Install the SDK:

yarn add @metamask/sdk

or

npm i @metamask/sdk

SDK options

See the full list of JavaScript SDK options.

Contributing

To contribute to MetaMask SDK, see the contribution guidelines.

Contacts

Fill out this form for a complimentary design optimization workshop.

Extension points exported contracts — how you extend this code

StorageManager (Interface)
(no doc) [7 implementers]
packages/sdk-communication-layer/src/types/StorageManager.ts
BaseToastVariants (Interface)
* Common toast option shared between all other options.
packages/sdk-ui/src/design-system/components/Toast/Toast.types.ts
PostMessageStream (Interface)
(no doc) [2 implementers]
packages/sdk/src/PostMessageStream/PostMessageStream.ts
I18nInstance (Interface)
(no doc) [1 implementers]
packages/sdk-install-modal-web/src/components/misc/simple-i18n.ts
I18nInstance (Interface)
(no doc) [1 implementers]
packages/sdk-multichain-ui/src/components/misc/simple-i18n.ts
EventHandlerProps (Interface)
(no doc)
packages/sdk-react/src/MetaMaskProvider.tsx
Account (Interface)
(no doc)
packages/sdk-react-ui/src/MetaMaskButton/MetaMaskButton.tsx
AccountInfo (Interface)
(no doc)
packages/playground-next/src/app/page.tsx

Core symbols most depended-on inside this repo

request
called by 139
packages/sdk-multichain/src/multichain/transports/mwp/index.ts
by
called by 133
e2e/src/util/selectors.ts
emit
called by 111
packages/sdk-multichain/src/multichain/index.ts
handler
called by 108
packages/sdk-multichain/src/domain/platform/index.ts
create
called by 86
packages/sdk-multichain/src/multichain/index.ts
getSelectorForPlatform
called by 81
e2e/src/util/utils.ts
toString
called by 75
packages/sdk-communication-layer/src/ECIES.ts
xpath
called by 73
e2e/src/util/selectors.ts

Shape

Function 1,111
Method 692
Class 211
Interface 211
Enum 48

Languages

TypeScript97%
Java2%
Kotlin1%

Modules by API surface

packages/sdk/src/sdk.ts39 symbols
packages/sdk-communication-layer/src/RemoteCommunication.ts39 symbols
packages/sdk-socket-server-next/src/metrics.ts32 symbols
packages/sdk-multichain/src/multichain/index.ts27 symbols
packages/sdk-ui/src/utils/device.ts25 symbols
packages/devnext/src/pages/demo.tsx25 symbols
packages/sdk-ui/src/utils/blockies.ts24 symbols
packages/sdk-communication-layer/src/SocketService.ts21 symbols
packages/examples/nextjs-demo/src/app/SDKContainer.tsx21 symbols
packages/sdk-install-modal-web/src/components.d.ts20 symbols
packages/sdk-communication-layer/src/KeyExchange.ts20 symbols
packages/examples/wagmi-demo/src/app/page.tsx19 symbols

For agents

$ claude mcp add metamask-sdk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact