npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@blockchainhub/blo

v1.2.7

Published

blo is a small and fast library to generate Blockchain identicons.

Readme

blo - Blockchain Identicons Generator

blo is a small and fast library to generate Blockchain identicons.

npm License: CORE Bundle Size TypeScript GitHub Sponsors

Features

  • 🐥 Small: Bundle Size gzipped, distributed as minified ES modules.
  • 🔍 Optimized: Leverages SVG to generate compact and sharp images at any size.
  • 💆 Simple: Covering all blockchain networks, focusing on uniformity.
  • 🗂 Typed: Ships with types included.
  • 👫 Works everywhere: browsers, Bun, Node.js.
  • ☁️ Zero dependencies.

Library Comparison

Library | Renders/sec[^1] | Size[^2] | Types | Environment[^3] | Rendering --------|---------------:|------|--------|----------------|----------: @blockchainhub/blo | 520 | Bundle Size | Types support | Environment support | SVG blockies-react-svg | 580 | Bundle size | Types support | Environment support | SVG ethereum-blockies-base64 | 450 | Bundle Size | Types support | Environment support | PNG @download/blockies | 370 | Bundle size | Types support | Environment support | Canvas blockies-ts | 370 | Bundle size | Types support | Environment support | Canvas react-blockies | 700 | Bundle size | Types support | Environment support | Canvas

[^1]: The number of renders per second. It was measured on Chromium Engine 131, MacOS with an Apple M2 Max. See ./benchmark for the methodology. [^2]: Minizipped bundle size. Good to be < 1 KiB. [^3]: The term "all" refers to libraries that are framework agnostic and that run in browsers, Bun and Node.js.

Getting Started

npm i -S @blockchainhub/blo
pnpm add @blockchainhub/blo
yarn add @blockchainhub/blo
import { blo } from "@blockchainhub/blo";

img.src = blo("cb7147879011ea207df5b35a24ca6f0859dcfb145999");

React / Vue / Others

blo is fast enough to not require memoization or async rendering for common use cases.

function AddressIcon(address: string) {
  return (
    <img
      alt={address}
      src={blo(address)}
    />
  );
}

API

blo(address: Address, options?: BloOptions): string

Get a data URI string representing the identicon as an SVG image.

import { blo } from "@blockchainhub/blo";

// Default usage (64px)
img.src = blo("0x123...");

// With options
img.src = blo("0x123...", {
  size: 32,         // Custom size (default: 64)
  seed: "custom"    // Custom seed (default: undefined)
});

bloSvg(address: Address, options?: BloOptions): string

Same as blo() but returns SVG code instead of a data URI.

const svg = bloSvg("0x123...", {
  size: 32,
  seed: "custom"
});

bloImage(address: Address, options?: BloOptions): BloImage

Get a BloImage data structure that can be used to render the image in different formats.

const [imageData, palette] = bloImage("0x123...", {
  seed: "custom"
});

Options

interface BloOptions {
  // Size in pixels (default: 64)
  size?: number;

  // Custom seed for generation (default: undefined)
  // If undefined, uses the address as seed
  seed?: string;
}

Types

The library ships with TypeScript types included:

export type Address = string;
export type BloImage = [BloImageData, Palette];
export type BloImageData = Uint8Array;

export interface BloOptions {
  size?: number;
  seed?: string;
}

export type Palette = {
  background: Hsl;
  primary: Hsl;
  accent: Hsl;
};

export type Hsl = Uint16Array;

Address Case Handling

By default, blo displays addresses in lowercase. You have three options for case handling:

  • Lowercase (default): Set uppercase to false or omit it
  • Uppercase: Set uppercase to true
  • Preserve original case: Set uppercase to null

Example:

import { blo } from "@blockchainhub/blo";

const address = "cb7147879011ea207df5b35a24ca6f0859dcfb145999";

// Default behavior (lowercase)
const identicon1 = blo(address);

// Force uppercase
const identicon2 = blo(address, true);

// Preserve original case
const identicon3 = blo(address, null);

Note: The case of the address only affects its visual representation. Internally, the identicon generation algorithm always uses lowercase for consistency.

Acknowledgements

FAQ

Does it work with CNS, ENS names?

Yes. You can use the ENS name directly as the address parameter.

Can blo render other formats than SVG?

You can render to any format you want by using the bloImage() function, which returns a data structure (see API above). Check out the Bun and Node demos for examples of rendering an identicon in the terminal.

Can it be used to generate other types of identicons?

blo focuses on the blockchain algorithm but you can use it with any data.

Why is it named blo?

blo is short for blockies, which is the name of the original library it is based on.

License

CORE

Contributing

See CONTRIBUTING.md for details.

Sponsor BlockchainHub

BlockchainHub is a platform for building Open Source applications.

Sponsor us to support our work.

Current GitHub Sponsors: GitHub Sponsors