@cardanowall/sdk-ts 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/client/index.cjs +9 -3
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +8 -4
- package/dist/client/index.d.ts +8 -4
- package/dist/client/index.js +9 -3
- package/dist/client/index.js.map +1 -1
- package/dist/conformance/cli.cjs +6 -6
- package/dist/conformance/cli.cjs.map +1 -1
- package/dist/conformance/cli.js +6 -6
- package/dist/conformance/cli.js.map +1 -1
- package/dist/identity/index.cjs.map +1 -1
- package/dist/identity/index.d.cts +1 -1
- package/dist/identity/index.d.ts +1 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/index.cjs +15 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/{types-Dp4wUSFI.d.cts → types-DNu_IrWZ.d.cts} +16 -6
- package/dist/{types-Dp4wUSFI.d.ts → types-DNu_IrWZ.d.ts} +16 -6
- package/dist/verifier/index.cjs +6 -6
- package/dist/verifier/index.cjs.map +1 -1
- package/dist/verifier/index.js +6 -6
- package/dist/verifier/index.js.map +1 -1
- package/package.json +3 -3
package/dist/conformance/cli.cjs
CHANGED
|
@@ -4685,13 +4685,13 @@ function readVarint(bytes, start) {
|
|
|
4685
4685
|
function decodeMultibase(prefix, body) {
|
|
4686
4686
|
switch (prefix) {
|
|
4687
4687
|
case "b":
|
|
4688
|
-
return decodeBase32(body
|
|
4688
|
+
return decodeBase32(body, "rfc4648-lower");
|
|
4689
4689
|
case "B":
|
|
4690
|
-
return decodeBase32(body
|
|
4690
|
+
return decodeBase32(body, "rfc4648-upper");
|
|
4691
4691
|
case "f":
|
|
4692
|
-
return decodeBase16(body
|
|
4692
|
+
return decodeBase16(body, "lower");
|
|
4693
4693
|
case "F":
|
|
4694
|
-
return decodeBase16(body
|
|
4694
|
+
return decodeBase16(body, "upper");
|
|
4695
4695
|
case "z":
|
|
4696
4696
|
return decodeBase58btc(body);
|
|
4697
4697
|
default:
|
|
@@ -4700,10 +4700,10 @@ function decodeMultibase(prefix, body) {
|
|
|
4700
4700
|
}
|
|
4701
4701
|
var BASE16_LOWER = "0123456789abcdef";
|
|
4702
4702
|
var BASE16_UPPER = "0123456789ABCDEF";
|
|
4703
|
-
function decodeBase16(s) {
|
|
4703
|
+
function decodeBase16(s, variant) {
|
|
4704
4704
|
if (s.length % 2 !== 0) throw new Error("base16: odd-length");
|
|
4705
|
+
const alphabet = variant === "lower" ? BASE16_LOWER : BASE16_UPPER;
|
|
4705
4706
|
const out = new Uint8Array(s.length / 2);
|
|
4706
|
-
const alphabet = s === s.toLowerCase() ? BASE16_LOWER : BASE16_UPPER;
|
|
4707
4707
|
for (let i = 0; i < out.length; i++) {
|
|
4708
4708
|
const hi = alphabet.indexOf(s[i * 2]);
|
|
4709
4709
|
const lo = alphabet.indexOf(s[i * 2 + 1]);
|