Generates Ethereum blockies in PNG format
Switch branches/tags
Nothing to show
Clone or download
#2 Compare This branch is 13 commits ahead, 15 commits behind ethereum:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add .gitignore and .npmignore Jul 28, 2017
.npmignore
README.md
index.d.ts
index.js
package.json Bump version Jul 29, 2017
sample.png
yarn.lock

README.md

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