Socket
Socket
Sign inDemoInstall

@darkwolf/base58.mjs

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @darkwolf/base58.mjs

Base58


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
12.6 kB
Created
Weekly downloads
 

Readme

Source

Base58

Install

ECMAScript (Node.js v12.x LTS or higher)

npm i --save @darkwolf/base58.mjs

CommonJS (Node.js v10.x LTS or higher)

npm i --save @darkwolf/base58.cjs

Using

// ECMAScript
import Base58, { Alphabet } from '@darkwolf/base58.mjs'

// CommonJS
const Base58 = require('@darkwolf/base58.cjs')
const { Alphabet } = Base58

const encoded = Base58.encode('Ave, Darkwolf!') // 'HDmiyDYm3PDiZ4kmjkb'
Base58.decode(encoded) // 'Ave, Darkwolf!'
const encodedInteger = Base58.encodeInteger(10000) // 'eyH'
Base58.decodeInteger(encodedInteger) // 10000
// Custom alphabet
const base58 = new Base58(Alphabet.BITCOIN)
const encodedBtc = base58.encode('Ave, Darkwolf!') // 'R4qoy4gqDX4ohE7qp7i'
base58.decode(encodedBtc) // 'Ave, Darkwolf!'
const encodedBtcInteger = base58.encodeInteger(10000) // '3yR'
base58.decodeInteger(encodedBtcInteger) // 10000

API Documentation

Contact Me

GitHub: @PavelWolfDark
Telegram: @PavelWolfDark
Email: PavelWolfDark@gmail.com

Keywords

FAQs

Last updated on 18 Oct 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc