xdbfoundation-identicon-js

1.0.0 • Public • Published

DigitalBits Identicon Generator (Javascript)

Tool to generate identicons for DigitalBits wallets - unique icons, generated based on the wallet public key.

Here's a set of identicons generated for random DigitalBits accounts:

image

With the default settings, both will produce the same identicon image for any DigitalBits account address.

Usage

import createDigitalBitsIdenticon from 'digitalbits-identicon-js';

const canvas = createDigitalBitsIdenticon('GBIDGDSVQXAHGZNOETS7ADUMWCDSQJU4R53EZRK6ONP3BA42UJL5PAHR');
const renderedIcon = canvas.toDataURL() // create  data URI containing a generated icon in PNG format

Demo

  • Install npm dependecies
npm install
  • Build library
npm run build

And open the demo/index.html in the browser to see the usage example.

Web API

Let's say your DigitalBits address is: GBIDGDSVQXAHGZNOETS7ADUMWCDSQJU4R53EZRK6ONP3BA42UJL5PAHR

Identicons are served as 210x210 square images in PNG format, <1KB in size, which should work for most usecases.

/xdbfoundation-identicon-js/

    Package Sidebar

    Install

    npm i xdbfoundation-identicon-js

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    29 kB

    Total Files

    9

    Last publish

    Collaborators

    • xdbfoundation