Skip to content

Mezo Passport Setup Guide

Mezo Passport is a package built on top of RainbowKit and provides additional wallet connection options specifically tailored for Bitcoin wallets and Mezo. With this package, developers can integrate Bitcoin wallet support alongside Ethereum-compatible (EVM) wallets to create a more versatile connection experience for users. Passport integrates with viem and wagmi libraries for streamlined wallet management across Bitcoin and EVM ecosystems.

Get the @mezo-org/passport NPM Package

If you cannot use Mezo Passport for your dApp, the configuration steps in the Configure your Environment guide are sufficient for traditional EVM development.

See the Getting Started Guide for canonical installation instructions.

See the Getting Started Guide for canonical configuration examples.

To connect to the Mezo Passport wallet, use the standard Wagmi or RainbowKit components.

import { useChainId, useConnect } from "wagmi";
export const YourApp = () => {
const chainId = useChainId();
const { connectors, connect } = useConnect();
return (
<div>
{connectors.map((connector) => (
<button
type="button"
onClick={() => {
connect({ connector, chainId });
}}
key={connector.id}
>
{connector.name}
</button>
))}
</div>
);
};
import { ConnectButton } from "@rainbow-me/rainbowkit"
export const YourApp = () => {
return <ConnectButton label="Connect wallet"/>;
};

You can find additional examples in the Mezo Passport Readme.