ethereum-blockies-png
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Ethereum Blockies PNG

npm version Downloads

A tiny library for generating Ethereum-variant of blocky identicons, in PNG format.

Sample blockies image

Use

const blockies = require('ethereum-blockies-png')
const fs = require('fs')
 
// Generate a PNG binary
const buffer = blockies.createBuffer({ // All options are optional
  seed: '0x00d1f07af5501156a3dc81ed93f9eebd81d3e472', // ethereum address
  scale: 4  // width/height of each block in pixels, default: 4
})
fs.writeFileSync('out.png', b)
 
// or generate a Data URL:
const dataURL = blockies.createDataURL({ seed: '0x00d1f07af5501156a3dc81ed93f9eebd81d3e472' })
// => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgC..."

License

WTFPL

Readme

Keywords

none

Package Sidebar

Install

npm i ethereum-blockies-png

Weekly Downloads

572

Version

0.1.3

License

MIT

Unpacked Size

6.2 kB

Total Files

5

Last publish

Collaborators

  • petejkim