fix: use toRegistryEntry of CID
This commit is contained in:
parent
e30747945c
commit
841e453a8c
|
@ -9,7 +9,6 @@ import {
|
||||||
import { deriveBlakeChildKey, deriveBlakeChildKeyInt } from "#keys.js";
|
import { deriveBlakeChildKey, deriveBlakeChildKeyInt } from "#keys.js";
|
||||||
import { uploadObject } from "#upload.js";
|
import { uploadObject } from "#upload.js";
|
||||||
import { signRegistryEntry } from "@lumeweb/libs5/lib/service/registry.js";
|
import { signRegistryEntry } from "@lumeweb/libs5/lib/service/registry.js";
|
||||||
import { encodeRegistryValue } from "#cid.js";
|
|
||||||
import { downloadSmallObject } from "#download.js";
|
import { downloadSmallObject } from "#download.js";
|
||||||
import { readableStreamToUint8Array } from "binconv";
|
import { readableStreamToUint8Array } from "binconv";
|
||||||
import { utf8ToBytes } from "@noble/hashes/utils";
|
import { utf8ToBytes } from "@noble/hashes/utils";
|
||||||
|
@ -74,11 +73,10 @@ export default class AppDb {
|
||||||
const cid = await uploadObject(cipherText);
|
const cid = await uploadObject(cipherText);
|
||||||
const writeKey = deriveBlakeChildKeyInt(pathKey, writeKeyDerivationTweak);
|
const writeKey = deriveBlakeChildKeyInt(pathKey, writeKeyDerivationTweak);
|
||||||
const keyPair = createKeyPair(writeKey);
|
const keyPair = createKeyPair(writeKey);
|
||||||
const registryVal = encodeRegistryValue(cid);
|
|
||||||
|
|
||||||
const sre = await signRegistryEntry({
|
const sre = await signRegistryEntry({
|
||||||
kp: keyPair,
|
kp: keyPair,
|
||||||
data: registryVal,
|
data: cid.toRegistryEntry(),
|
||||||
revision,
|
revision,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue