@cardanowall/poe-standard 0.5.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.cjs
CHANGED
|
@@ -3691,13 +3691,13 @@ function readVarint(bytes, start) {
|
|
|
3691
3691
|
function decodeMultibase(prefix, body) {
|
|
3692
3692
|
switch (prefix) {
|
|
3693
3693
|
case "b":
|
|
3694
|
-
return decodeBase32(body
|
|
3694
|
+
return decodeBase32(body, "rfc4648-lower");
|
|
3695
3695
|
case "B":
|
|
3696
|
-
return decodeBase32(body
|
|
3696
|
+
return decodeBase32(body, "rfc4648-upper");
|
|
3697
3697
|
case "f":
|
|
3698
|
-
return decodeBase16(body
|
|
3698
|
+
return decodeBase16(body, "lower");
|
|
3699
3699
|
case "F":
|
|
3700
|
-
return decodeBase16(body
|
|
3700
|
+
return decodeBase16(body, "upper");
|
|
3701
3701
|
case "z":
|
|
3702
3702
|
return decodeBase58btc(body);
|
|
3703
3703
|
default:
|
|
@@ -3706,10 +3706,10 @@ function decodeMultibase(prefix, body) {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
var BASE16_LOWER = "0123456789abcdef";
|
|
3708
3708
|
var BASE16_UPPER = "0123456789ABCDEF";
|
|
3709
|
-
function decodeBase16(s3) {
|
|
3709
|
+
function decodeBase16(s3, variant) {
|
|
3710
3710
|
if (s3.length % 2 !== 0) throw new Error("base16: odd-length");
|
|
3711
|
+
const alphabet = variant === "lower" ? BASE16_LOWER : BASE16_UPPER;
|
|
3711
3712
|
const out = new Uint8Array(s3.length / 2);
|
|
3712
|
-
const alphabet = s3 === s3.toLowerCase() ? BASE16_LOWER : BASE16_UPPER;
|
|
3713
3713
|
for (let i = 0; i < out.length; i++) {
|
|
3714
3714
|
const hi = alphabet.indexOf(s3[i * 2]);
|
|
3715
3715
|
const lo = alphabet.indexOf(s3[i * 2 + 1]);
|