Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bs58

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs58

Base 58 encoding / decoding

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7M
decreased by-29.52%
Maintainers
4
Weekly downloads
 
Created

What is bs58?

The bs58 npm package is a utility for encoding and decoding data in Base58, which is a binary-to-text encoding scheme. It is commonly used in cryptocurrency applications, particularly Bitcoin, for encoding addresses and other data in a compact, human-readable format.

What are bs58's main functionalities?

Encoding a Buffer to Base58

This feature allows you to encode a buffer of binary data into a Base58 string. The code sample demonstrates encoding the UTF-8 string 'Hello World' into Base58.

"use strict"; const bs58 = require('bs58'); const bytes = Buffer.from('Hello World', 'utf8'); const encoded = bs58.encode(bytes); console.log(encoded);

Decoding a Base58 String to a Buffer

This feature allows you to decode a Base58 string back into its original binary form, represented as a Buffer. The code sample demonstrates decoding a Base58 string back into the original UTF-8 string.

"use strict"; const bs58 = require('bs58'); const encoded = 'JxF12TrwUP45BMd'; const bytes = bs58.decode(encoded); console.log(bytes.toString('utf8'));

Other packages similar to bs58

Keywords

FAQs

Package last updated on 01 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc