Basic informations

This document describes a basic way of integrating metapro plugin into your web app.

Getting the plugin

First, you'll need to add our plugin to your project.

If you use npm or yarn, run:

npm install @metapro/connector

Provider and packages requirements

circle-exclamation
circle-info

Our plugin uses Material UIarrow-up-right, to properly display our plugin you need to install desired dependencies

"@emotion/react"
"@emotion/styled"
"@mui/material"

npm install @mui/material @emotion/react @emotion/styled

-----------------------------------------------------------------------------------------------------

circle-exclamation

-----------------------------------------------------------------------------------------------------

Metapro Hook explained ( useMetapro() )

circle-info

useMetapro()

A hook that returns an object with the following properties:

chevron-rightuseAccount hashtag

Hook for accessing wallet address data.

chevron-rightuseChainIdhashtag

Hook for accessing network data, such as current connected chain.

chevron-rightuseENSNamehashtag

Hook for fetching ENS name for address.

chevron-rightuseIsActivehashtag

Hook for check if wallet address is connected and active.

chevron-rightuseProviderhashtag

Hook for accessing Client ethers Provider.

After setup our plugin

circle-info

A detailed guide about our metapro wallet Download & set up

When the plugin is already implemented in your application just a couple of simple steps to get started :

  • After using a {login} from useMetapro() hook you should see a modal popup

  • Click here to scan QR code

  • Allow your application to connect with the plugin

Your plugin is successfully connected! Β πŸŽ‰

-----------------------------------------------------------------------------------------------------

Last updated