Base58check
Base58Check encoding / decoding
Install / Use
/learn @wzbg/Base58checkREADME
base58check
JavaScript component to compute base 58 check encoding. This encoding is typically used for crypto currencies such as Bitcoin.
Install
npm i --save base58check
API
string encode(data, prefix = '00', encoding = 'hex')
data must be a Buffer or a string. It returns a string.
example:
const base58check = require('base58check')
const data = '086eaa677895f92d4a6c5ef740c168932b5e3f44'
console.log(base58check.encode(data)) // => 1mayif3H2JDC62S4N3rLNtBNRAiUUP99k
{ prefix, data } decode(string[, encoding])
string must be a base 58 check encoded string. Returns a Object for prefix & data.
example:
const base58check = require('base58check')
const address = '1mayif3H2JDC62S4N3rLNtBNRAiUUP99k'
console.log(base58check.decode(address))
// => { prefix: <Buffer 00>, data: <Buffer 08 6e aa 67 78 95 f9 2d 4a 6c 5e f7 40 c1 68 93 2b 5e 3f 44> }
// if using encoding
console.log(base58check.decode(address, 'hex'))
// => { prefix: '00', data: '086eaa677895f92d4a6c5ef740c168932b5e3f44' }
Hack / Test
Uses JavaScript standard style. Read more:
Credits
- unrealce for original JavaScript implementation
Related
bs58- JavaScript component to compute base 58 encoding. This encoding is typically used for crypto currencies such as Bitcoin.
License
The MIT License (MIT)
Copyright (c) 2016
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

