bs58

WebJar for bs58

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

bs58
Last Version

Last Version

4.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

bs58
WebJar for bs58
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/cryptocoinjs/bs58

Download bs58

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/bs58/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>bs58</artifactId>
    <version>4.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/bs58/
implementation 'org.webjars.npm:bs58:4.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/bs58/
implementation ("org.webjars.npm:bs58:4.0.1")
'org.webjars.npm:bs58:jar:4.0.1'
<dependency org="org.webjars.npm" name="bs58" rev="4.0.1">
  <artifact name="bs58" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='bs58', version='4.0.1')
)
libraryDependencies += "org.webjars.npm" % "bs58" % "4.0.1"
[org.webjars.npm/bs58 "4.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : base-x jar [3.0.2,4)

Project Modules

There are no modules declared in this project.

bs58

build status

JavaScript component to compute base 58 encoding. This encoding is typically used for crypto currencies such as Bitcoin.

Note: If you're looking for base 58 check encoding, see: https://github.com/bitcoinjs/bs58check, which depends upon this library.

Install

npm i --save bs58

API

encode(input)

input must be a Buffer or an Array. It returns a string.

example:

const bs58 = require('bs58')

const bytes = Buffer.from('003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', 'hex')
const address = bs58.encode(bytes)
console.log(address)
// => 16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS

decode(input)

input must be a base 58 encoded string. Returns a Buffer.

example:

const bs58 = require('bs58')

const address = '16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS'
const bytes = bs58.decode(address)
console.log(bytes.toString('hex'))
// => 003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187

Browser

You can use this module in the browser. Install Browserify:

npm install -g browserify

then run:

browserify node_modules/bs58/index.js -o bs58.bundle.js --standalone bs58

Hack / Test

Uses JavaScript standard style. Read more:

js-standard-style

Credits

License

MIT

org.webjars.npm

Versions

Version
4.0.1