Gathering detailed insights and metrics for @interop/base58-universal
Gathering detailed insights and metrics for @interop/base58-universal
Gathering detailed insights and metrics for @interop/base58-universal
Gathering detailed insights and metrics for @interop/base58-universal
Isomorphic JS encode/decode library using the Base58 (Bitcoin) encoding scheme (for Node.js and browsers).
npm install @interop/base58-universal
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (83.15%)
JavaScript (14.73%)
Shell (2.13%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
1 Stars
7 Commits
1 Watchers
1 Branches
2 Contributors
Updated on Apr 16, 2022
Latest Version
1.0.0
Package Id
@interop/base58-universal@1.0.0
Unpacked Size
25.27 kB
Size
7.49 kB
File Count
16
NPM Version
6.14.12
Node Version
14.16.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
27
Isomorphic JS encode/decode library using the Base58 (Bitcoin) encoding scheme (for Node.js and browsers).
(Converted to TypeScript from Digital Bazaar's base58-universal
repository.)
This library provides a TypeScript and JS encoder/decoder functions for the Base58 (Bitcoin) encoding scheme using an alphabet popularized by Bitcoin. It works in both Node.js and in Web browsers with no dependencies.
TBD
To install via NPM:
npm install @interop/base58-universal
To install locally (for development):
git clone https://github.com/interop-alliance/base58-universal.git
cd base58-universal
npm install
The library can be loaded with ESM or CommonJS:
1import * as base58btc from '@interop/base58-universal'
1const base58btc = require('@interop/base58-universal')
encode(input: Uint8Array): string
1const input1 = Uint8Array([1, 2, 3, 4]) 2const encoded1 = base58btc.encode(input1) 3// > 2VfUX 4 5const input2 = Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) 6const encoded2 = base58btc.encode(input2) 7// > 4HUtbHhN2TkpR
decode(input: string): Uint8Array
input
: string
- string to decodeUint8Array
with the decoded bytes.1const input3 = '2VfUX' 2const decoded3 = base58btc.decode(input3) 3// > Uint8Array [ 1, 2, 3, 4 ] 4 5const input4 = '4HUtbHhN2TkpR' 6const decoded4 = base58btc.decode(input4) 7// > Uint8Array [ 8// 1, 2, 3, 4, 5, 9// 6, 7, 8, 9, 10 10// ]
This library uses Uint8Array for encoder input and decoder output. Conversion to and from strings can be done with a variety of tools.
1const input5 = new TextEncoder().encode('abc') 2const encoded5 = base58btc.encode(input5) 3// > ZiCa 4 5const decoded6 = base58btc.decode(encoded5) 6const output6 = new TextDecoder().decode(decoded6) 7// > abc
from
and toString
with encoding options.1// Using TextEncoder/TextDecoder (included in Node.js since v12) 2const input7 = new TextEncoder().encode('abc') 3const encoded7 = base58btc.encode(input7) 4// > ZiCa 5 6const decoded8 = base58btc.decode(encoded7) 7const output8 = new TextDecoder().decode(decoded8) 8// > abc 9 10// Using Buffer (which is a Uint8Array) 11const input9 = Buffer.from('616263', 'hex') 12const encoded9 = base58btc.encode(input9) 13const decoded9 = base58btc.decode(encoded9) 14Buffer.from(decoded9).toString() 15// > abc 16Buffer.from(decoded9).toString('hex') 17// > 616263
PRs accepted.
TypeScript conversion: MIT License © 2021 Interop Alliance and Dmitri Zagidulin.
Isomorphic JS implementation from Digital Bazaar/base58-universal
under the New BSD License (3-clause).
Encoder/decoder original implementation from base-x under the MIT License.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More