About the Multichain API
The Multichain API is a scalable, generalized web3 wallet API that supports simultaneous interactions across multiple blockchain networks. When integrated with MetaMask Snaps, it enables developers to interact with both popular and emerging networks. Key benefits include:
-
Seamless network interactions - The Multichain API allows dapps to interact directly with multiple networks, without having to switch between single active networks. This enables smooth, integrated multichain user experience flows.
-
Scaling usage of non-EVM networks - The Multichain API integrates with interoperability Snaps, providing a standardized interface to encourage broader adoption of non-EVM networks.
-
Simplified integrations - The Multichain API reduces the complexity associated with navigating different wallet APIs and SDKs, making it easier for dapps to integrate with wallets, discover capabilities, and negotiate interfaces.
Get started using the Multichain API.
Technical overview
The Multichain API follows the CAIP-25
standard for dapps to interface with multichain wallets.
The API includes a method wallet_createSession
that dapps can call to create a multichain session with a wallet, with specified properties and
authorization scopes.
Dapps can update the session using the same method wallet_createSession
.
Dapps can use wallet_invokeMethod
to
call a subset of the Wallet JSON-RPC API methods on
a specified chain.
Dapps can use wallet_getSession
to get
the scopes and properties of the active session, and use
wallet_revokeSession
to revoke the session.
The API also supports the wallet_notify
and
wallet_sessionChanged
events,
allowing wallets to notify dapps of changes to the session.
See the Multichain API reference for full details.
Lifecycle diagram
The following sequence diagram illustrates the multichain session lifecycle.
Backwards compatibility
When using the Multichain API, your dapp can still interact with the existing Wallet Provider API. However, the Provider API is not optimized for multichain, and we recommend starting directly with the Multichain API if possible. The Multichain API is backwards compatible mainly to support dapps that use third-party libraries with dependencies on the legacy provider.
Get started
Get started with the Multichain API:
- Learn how to use the Multichain API.
- See the Multichain API reference for more details.