@cardanowall/poe-standard 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/validator.cjs +6 -6
- package/dist/validator.cjs.map +1 -1
- package/dist/validator.js +6 -6
- package/dist/validator.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3689,13 +3689,13 @@ function readVarint(bytes, start) {
|
|
|
3689
3689
|
function decodeMultibase(prefix, body) {
|
|
3690
3690
|
switch (prefix) {
|
|
3691
3691
|
case "b":
|
|
3692
|
-
return decodeBase32(body
|
|
3692
|
+
return decodeBase32(body, "rfc4648-lower");
|
|
3693
3693
|
case "B":
|
|
3694
|
-
return decodeBase32(body
|
|
3694
|
+
return decodeBase32(body, "rfc4648-upper");
|
|
3695
3695
|
case "f":
|
|
3696
|
-
return decodeBase16(body
|
|
3696
|
+
return decodeBase16(body, "lower");
|
|
3697
3697
|
case "F":
|
|
3698
|
-
return decodeBase16(body
|
|
3698
|
+
return decodeBase16(body, "upper");
|
|
3699
3699
|
case "z":
|
|
3700
3700
|
return decodeBase58btc(body);
|
|
3701
3701
|
default:
|
|
@@ -3704,10 +3704,10 @@ function decodeMultibase(prefix, body) {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
var BASE16_LOWER = "0123456789abcdef";
|
|
3706
3706
|
var BASE16_UPPER = "0123456789ABCDEF";
|
|
3707
|
-
function decodeBase16(s3) {
|
|
3707
|
+
function decodeBase16(s3, variant) {
|
|
3708
3708
|
if (s3.length % 2 !== 0) throw new Error("base16: odd-length");
|
|
3709
|
+
const alphabet = variant === "lower" ? BASE16_LOWER : BASE16_UPPER;
|
|
3709
3710
|
const out = new Uint8Array(s3.length / 2);
|
|
3710
|
-
const alphabet = s3 === s3.toLowerCase() ? BASE16_LOWER : BASE16_UPPER;
|
|
3711
3711
|
for (let i = 0; i < out.length; i++) {
|
|
3712
3712
|
const hi = alphabet.indexOf(s3[i * 2]);
|
|
3713
3713
|
const lo = alphabet.indexOf(s3[i * 2 + 1]);
|