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 - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

index.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

3.0.0 / 2015-08-18
------------------
- refactored module into generic [`base-x`](https://github.com/cryptocoinjs/base-x).
2.0.1 / 2014-12-23

@@ -2,0 +6,0 @@ ------------------

27

package.json
{
"name": "bs58",
"version": "2.0.1",
"version": "3.0.0",
"description": "Base 58 encoding / decoding",

@@ -16,9 +16,7 @@ "keywords": [

],
"license": "MIT",
"devDependencies": {
"coveralls": "^2.11.2",
"istanbul": "^0.2.10",
"jshint": "2.5.1",
"mocha": "^1.21.4",
"mocha-lcov-reporter": "0.0.1",
"mochify": "^2.1.0"
"mocha": "^2.0.0",
"mochify": "^2.1.0",
"standard": "^5.1.0"
},

@@ -29,11 +27,12 @@ "repository": {

},
"main": "./lib/bs58.js",
"main": "index.js",
"scripts": {
"browser-test": "./node_modules/.bin/mochify --wd -R spec",
"coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",
"coveralls": "npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info",
"jshint": "./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",
"test": "npm run-script unit",
"unit": "./node_modules/.bin/mocha"
"browser-test": "mochify --wd -R spec",
"standard": "standard",
"test": "npm run standard && npm run unit",
"unit": "mocha"
},
"dependencies": {
"base-x": "^1.0.1"
}
}

@@ -0,15 +1,60 @@

bs58
====
[![build status](https://secure.travis-ci.org/cryptocoinjs/bs58.png)](http://travis-ci.org/cryptocoinjs/bs58)
[![Coverage Status](https://img.shields.io/coveralls/cryptocoinjs/bs58.svg)](https://coveralls.io/r/cryptocoinjs/bs58)
bs58
====
JavaScript component to compute base 58 encoding. This encoding is typically used for crypto currencies such as Bitcoin.
### Documentation
http://cryptocoinjs.com/modules/misc/bs58/
Install
-------
npm i --save bs58
API
---
### encode(input)
`input` must be a [Buffer](http://nodejs.org/api/buffer.html) or an `Array`. It returns a `string`.
**example**:
```js
var bs58 = require('bs58')
var unencodedData = "003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187"
var out = bs58.encode(new Buffer(unencodedData, 'hex'))
console.log(out) // => 16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS
```
### decode(input)
`input` must be a base 58 encoded string. Returns an `Array`.
**example**:
```js
var bs58 = require('bs58')
var address = "16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS"
var out = bs58.decode(address)
console.log(out.toString())
// => 0,60,23,110,101,155,234,15,41,163,233,191,120,128,193,18,177,179,27,77,200,38,38,129,135
// if using Node.js or browserify
console.log(new Buffer(out).toString('hex'))
// => 003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187
```
Hack / Test
-----------
Uses JavaScript standard style. Read more:
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
Credits

@@ -22,1 +67,7 @@ -------

- [Jared Deckard](https://github.com/deckar01) for killing `bigi` as a dependency
License
-------
MIT
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