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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gibme/base58

v22.0.0

Published

Base58 Library

Readme

@gibme/base58

A lightweight TypeScript Base58 encoding/decoding library with support for both standard Base58 and CryptoNote Base58 formats.

Installation

yarn add @gibme/base58

or

npm install @gibme/base58

Requires Node.js >= 22

Documentation

Full API documentation is available at https://gibme-npm.github.io/base58/

Usage

Standard Base58

import Base58 from '@gibme/base58';

// Encode from hex string
const encoded = Base58.encode('02c0ded2bc1f1305fb0faac5e6c03ee3a1924234985427b6167ca569d13df435cfeb05f9d2');
console.log(encoded);
// => 6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

// Encode from Buffer or Uint8Array
const encodedFromBuffer = Base58.encode(Buffer.from('deadbeef', 'hex'));
console.log(encodedFromBuffer);

// Decode back to Buffer
const decoded = Base58.decode(encoded);
console.log(decoded.toString('hex'));

CryptoNote Base58

CryptoNote Base58 is a variant used by CryptoNote-based cryptocurrencies that encodes data in fixed-size blocks.

import Base58 from '@gibme/base58';

const encoded = Base58.cn_encode(
    '9df6ee01c179d13e2a0c52edd8b821e2d53d707e47ddcaaf696644a45563564c2934bd50' +
    'a8faca00a94c5a4dcc3cf070898c2db6ff5990556d08f5a09c8787900dcecab3b77173c1');
console.log(encoded);
// => TRTLv2RUL7X82vLeXnFmF7cfhKJ6UeiJzJdWQf556DEb7tkVqDAs7FVVKQVqkZqY47Q1PFwne2jZNKEn1gEeTWrb3JxG7HaMU4Q

const decoded = Base58.cn_decode(encoded);
console.log(decoded.toString('hex'));

API

Base58.encode(data: string | Uint8Array | Buffer): string

Encodes the given data into a standard Base58 string. String input is treated as hex-encoded.

Base58.decode(encoded: string): Buffer

Decodes a standard Base58 string back into a Buffer.

Base58.cn_encode(data: string | Uint8Array | Buffer): string

Encodes the given data into a CryptoNote Base58 string. String input is treated as hex-encoded.

Base58.cn_decode(encoded: string): Buffer

Decodes a CryptoNote Base58 string back into a Buffer.

License

MIT - See LICENSE for details.