fix: need to strip off multiformats prefix
This commit is contained in:
parent
c358fa3acc
commit
502c8fb079
|
@ -90,6 +90,8 @@ export async function subscribeToEntry(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const base64urlEncode = (d: Uint8Array) => base64url.encode(d).substring(1);
|
||||||
|
|
||||||
export async function publishEntry(
|
export async function publishEntry(
|
||||||
this: S5Client,
|
this: S5Client,
|
||||||
signedEntry: SignedRegistryEntry,
|
signedEntry: SignedRegistryEntry,
|
||||||
|
@ -115,10 +117,10 @@ export async function publishEntry(
|
||||||
endpointPath: opts.endpointPublishEntry,
|
endpointPath: opts.endpointPublishEntry,
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {
|
data: {
|
||||||
pk: base64url.encode(signedEntry.pk),
|
pk: base64urlEncode(signedEntry.pk),
|
||||||
revision: signedEntry.revision,
|
revision: signedEntry.revision,
|
||||||
data: base64url.encode(signedEntry.data),
|
data: base64urlEncode(signedEntry.data),
|
||||||
signature: base64url.encode(signedEntry.signature),
|
signature: base64urlEncode(signedEntry.signature),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue