@darkwolf/base58
Advanced tools
Comparing version 21.13.1 to 21.13.2
{ | ||
"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" |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7556
10
131
30