0.1.5 • Published 2 years ago

@cryptify/auth v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Cryptify - Wallet Integrations done easy

Now you can easily support multiple wallets such as Metamask, Rainbow, Trust, Argent & Coinbase in your Web3 App with a few lines of code.

No messy configurations & integrations, simple react code.

  1. Install the sdk via npm or yarn
npm install @cryptify/auth
yarn add @cryptify/auth 
  1. In your top level file -> App.js or index.js, wrap your main component with the following provider - DappProvider.
// In App.js or index.js

import { DappProvider } from '@cryptify/auth'

const App = () => {
	return(
		<DappProvider>
			<Main />
		</DappProvider>
	)
}
  1. In your component file where you want to integrate the wallets
import { ConnectButton as Web3Button, useWeb3 } from '@cryptify/auth' 

const YourComponent = () => {
	const wallets = ['metamask', 'coinbase', 'walletconnect']
	const { active, account } = useWeb3()
	return(
		<div>
			{/*  Your other components go here */}
			<Web3Button wallets={wallets}/>
		</div>
	)
}

export default YourComponent