From ce47696d907513e6b5a78f3c71407e12b90fb952 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 11 Dec 2023 23:46:41 -0500 Subject: [PATCH] fix: use base64urlpad --- src/methods/registry.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/methods/registry.ts b/src/methods/registry.ts index ff8a772..2220d34 100644 --- a/src/methods/registry.ts +++ b/src/methods/registry.ts @@ -18,7 +18,7 @@ import { } from "@lumeweb/libs5/lib/service/registry.js"; import { Buffer } from "buffer"; import { throwValidationError } from "../utils/validation.js"; -import { base64url } from "multiformats/bases/base64"; +import { base64urlpad } from "multiformats/bases/base64"; export const DEFAULT_GET_ENTRY_OPTIONS = { ...DEFAULT_BASE_OPTIONS, endpointGetEntry: "/s5/registry", @@ -115,10 +115,10 @@ export async function publishEntry( endpointPath: opts.endpointPublishEntry, method: "post", data: { - pk: base64url.encode(signedEntry.pk), + pk: base64urlpad.encode(signedEntry.pk), revision: signedEntry.revision, - data: base64url.encode(signedEntry.data), - signature: base64url.encode(signedEntry.signature), + data: base64urlpad.encode(signedEntry.data), + signature: base64urlpad.encode(signedEntry.signature), }, }); }