Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@darkwolf/base58

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darkwolf/base58 - npm Package Compare versions

Comparing version 21.13.1 to 21.13.2

src/constants/Alphabet.mjs

15

package.json
{
"name": "@darkwolf/base58",
"version": "21.13.1",
"version": "21.13.2",
"description": "Base58",

@@ -9,5 +9,16 @@ "type": "module",

"./errors": "./src/errors/index.mjs",
"./constants": "./src/constants.mjs",
"./errors/": "./src/errors/",
"./errors/Base58Error": "./src/errors/Base58Error.mjs",
"./errors/InvalidAlphabetError": "./src/errors/InvalidAlphabetError.mjs",
"./Base58Error": "./src/errors/Base58Error.mjs",
"./InvalidAlphabetError": "./src/errors/InvalidAlphabetError.mjs",
"./constants": "./src/constants/index.mjs",
"./constants/": "./src/constants/",
"./constants/Alphabet": "./src/constants/Alphabet.mjs",
"./Alphabet": "./src/constants/Alphabet.mjs",
"./package.json": "./package.json"
},
"engines": {
"node": ">=12.18.3"
},
"scripts": {

@@ -14,0 +25,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

18

README.md

@@ -5,14 +5,12 @@ # Base58

## Using
#### ⚠️ Requires Node.js v12.x LTS or higher to use!
```javascript
import base58, {
errors,
constants
} from '@darkwolf/base58'
import Base58, { Alphabet } from '@darkwolf/base58'
const encoded = base58.encode('Ave, Darkwolf!') // HDmiyDYm3PDiZ4kmjkb
base58.decode(encoded) // 'Ave, Darkwolf!'
const encodedInteger = base58.encodeInteger(10000) // eyH
base58.decodeInteger(encodedInteger) // 10000
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 btc = base58.withAlphabet(constants.Alphabet.BITCOIN)
const btc = new Base58(Alphabet.BITCOIN)
const encodedBtc = btc.encode('Ave, Darkwolf!') // R4qoy4gqDX4ohE7qp7i

@@ -25,3 +23,3 @@ btc.decode(encodedBtc) // 'Ave, Darkwolf!'

## Donate
#### You can contribute to the development of open source projects by making your donation
#### You can contribute to the development of open source projects by making your donation 🐺
#### Bitcoin (BTC): `15sjjAUtJdB1ncsxKK7KtyJPtF46UhXWo4`

@@ -28,0 +26,0 @@ #### Ethereum (ETH): `0xF02F68eb33E9eC73b8E9c3c0953E6782E2376867`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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