@darkwolf/base58
Advanced tools
Comparing version 6.6.7 to 13.21.69
{ | ||
"name": "@darkwolf/base58", | ||
"version": "6.6.7", | ||
"version": "13.21.69", | ||
"description": "Base58", | ||
"main": "src/index.js", | ||
"main": "index.js", | ||
"scripts": { | ||
@@ -25,5 +25,4 @@ "test": "echo \"Error: no test specified\" && exit 1" | ||
"dependencies": { | ||
"@darkwolf/code-error": "^6.6.6", | ||
"@darkwolf/validator": "^6.7.0" | ||
"@darkwolf/code-error": "^13.21.69" | ||
} | ||
} |
@@ -11,14 +11,30 @@ # Base58 | ||
// encode ASCII string | ||
const encoded = base58.encode('Ave, Darkwolf!') | ||
const decoded = base58.decode(encoded) | ||
// encode safe integer | ||
const encodedInt = base58.encodeInt(100000001) | ||
const decodedInt = base58.decodeInt(encodedInt) | ||
// custom alphabet | ||
const { | ||
DARKWOLF_ALPHABET, | ||
BITCOIN_ALPHABET, | ||
RIPPLE_ALPHABET, | ||
FLICKR_ALPHABET | ||
} = require('@darkwolf/base58/constants') | ||
const btc58 = base58.withAlphabet(BITCOIN_ALPHABET) | ||
const encodedBtc = btc58.encode('Ave, Bitcoin!') | ||
const decodedBtc = btc58.decode(encodedBtc) | ||
``` | ||
## Init | ||
### new Base58(alphabet) | ||
## Methods | ||
### encode(input) | ||
### decode(input) | ||
### encodeInt(input) | ||
### decodeInt(input) | ||
### withAlphabet(alphabet) | ||
### encode(string) | ||
### decode(base58) | ||
### encodeInt(integer) | ||
### decodeInt(base58) | ||
## Error Codes | ||
#### invalid-alphabet | ||
#### invalid-input |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
1
9
40
5385
83
1
+ Added@darkwolf/code-error@13.21.69(transitive)
- Removed@darkwolf/validator@^6.7.0
- Removed@darkwolf/code-error@6.6.6(transitive)
- Removed@darkwolf/validator@6.7.3(transitive)