base58-js
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

base58 logo

base58-js

NPM Package CI status License: MIT

A light weight (~560 byte) universal JavaScript base58 encoder and decoder.

Installation

For Node.js, to install base58-js run:

npm install base58-js

Requirements

Supported runtime environments:

Examples

Convert base58 to binary

import { base58_to_binary } from "base58-js";

const bin = base58_to_binary("6MRy");
console.log(bin);

Logged output will be Uint8Array(3) [15, 239, 64].

Convert binary to base58

import { binary_to_base58 } from "base58-js";

const str = binary_to_base58([15, 239, 64]);
console.log(str);

The logged output was Thequickbrownfoxjumpedoverthea1zydog.

Exports

Deep imports from the ECMAScript modules are exported via the package.json field exports:

IntelliSense via TypeScript JSDoc.

Package Sidebar

Install

npm i base58-js

Weekly Downloads

17,178

Version

3.0.2

License

MIT

Unpacked Size

8.76 kB

Total Files

11

Last publish

Collaborators

  • pur3miish