From 19426b7fdb05517c437f7bfb7aa78876647fa470 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 18 Nov 2023 07:55:10 -0500 Subject: [PATCH] fix: use base64urlpad --- src/multibase.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/multibase.ts b/src/multibase.ts index f12513e..95cacac 100644 --- a/src/multibase.ts +++ b/src/multibase.ts @@ -1,7 +1,7 @@ import { base58btc } from "multiformats/bases/base58"; import { bytesToHex, hexToBytes, utf8ToBytes } from "@noble/hashes/utils"; import { base32 } from "multiformats/bases/base32"; -import { base64, base64url } from "multiformats/bases/base64"; +import { base64, base64urlpad } from "multiformats/bases/base64"; export default abstract class Multibase { abstract toBytes(): Uint8Array; @@ -23,7 +23,7 @@ export default abstract class Multibase { while (str.length % 4 !== 0) { str += "="; } - bytes = base64url.decode(str); + bytes = base64urlpad.decode(str); } else if (data[0] === ":") { bytes = utf8ToBytes(data); } else {