Statements | Branches | Functions | Lines |
---|
| | | |
@cfx-kit/wallet-avatar
🤡 A library for generate MetaMask avatars based on account address
Overview 🧐
The @cfx-kit/wallet-avatar
library is a collection of functions that can help you generate the same avatar as metamask. Install it and look at its definition and you'll be up and running in no time.
Installation 📦
npm
npm install @cfx-kit/wallet-avatar
yarn
yarn add @cfx-kit/wallet-avatar
Demo
For React codesandbox/@cfx-kit/wallet-avatar
Usage 📚
import { generateAvatarURL } from '@cfx-kit/wallet-avatar';
const img = document.createElement('img')
img.src = generateAvatarURL('0x368d31aeB0aBc22E4a020B1ceba386089fc3aCc6')
document.body.appendChild(img)