Skip to content

A simple Jazzicon SVG Generator for Ethereum addresses.

License

Notifications You must be signed in to change notification settings

raugfer/jazzicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jazzicon SVG Generator

A simple Jazzicon SVG Generator for Ethereum addresses.

Installation

npm i @raugfer/jazzicon

Usage

import Jazzicon from '@raugfer/jazzicon';

// builds an image data url for embedding
function buildDataUrl(address: string): string {
  return 'data:image/svg+xml;base64,' + btoa(Jazzicon(address));
}

// sample code for react component
export default function JazziconImage({ address }: { address: string }) {
  const imageUrl = buildDataUrl(address);
  return (
    <img src={imageUrl} alt="Jazzicon" />
  );
}

About

A simple Jazzicon SVG Generator for Ethereum addresses.

Topics

Resources

License

Stars

Watchers

Forks