Sui MetaMask Snap
  • Sui MetaMask Snap
    • FAQ
    • Knowledge Base
    • Snap integration (developers)
Powered by GitBook
On this page
  • Enable the Snap in your app
  • Source code
  1. Sui MetaMask Snap

Snap integration (developers)

PreviousKnowledge Base

Last updated 1 year ago

Gain access to 30M+ MetaMask users by enabling the Sui Snap wallet connection with one line of code.

Enable the Snap in your app

Since MetaMask Snaps don't support the wallet standard, the Sui Snap wallet needs to be registered manually. You can do this by installing the @kunalabs-io/sui-snap-wallet package and calling the registerSuiSnapWallet function in the initialization of your app (e.g., in main.tsx):

pnpm install @kunalabs-io/sui-snap-wallet
import { registerSuiSnapWallet } from "@kunalabs-io/sui-snap-wallet";

registerSuiSnapWallet();

Make sure you're calling the registration method only once during app initialization.

The Sui MetaMask Snap will appear as any regular wallet standard wallet.

Source code

The Snap and wallet adapter source code can be found here .

https://github.com/kunalabs-io/sui-snap