fix: use toRegistryEntry of CID

This commit is contained in:
Derrick Hammer 2023-09-08 06:59:05 -04:00
parent e30747945c
commit 841e453a8c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 3 deletions

View File

@ -9,7 +9,6 @@ import {
import { deriveBlakeChildKey, deriveBlakeChildKeyInt } from "#keys.js";
import { uploadObject } from "#upload.js";
import { signRegistryEntry } from "@lumeweb/libs5/lib/service/registry.js";
import { encodeRegistryValue } from "#cid.js";
import { downloadSmallObject } from "#download.js";
import { readableStreamToUint8Array } from "binconv";
import { utf8ToBytes } from "@noble/hashes/utils";
@ -74,11 +73,10 @@ export default class AppDb {
const cid = await uploadObject(cipherText);
const writeKey = deriveBlakeChildKeyInt(pathKey, writeKeyDerivationTweak);
const keyPair = createKeyPair(writeKey);
const registryVal = encodeRegistryValue(cid);
const sre = await signRegistryEntry({
kp: keyPair,
data: registryVal,
data: cid.toRegistryEntry(),
revision,
});