fix: encodeRegistryValue needs to use type and hashType
This commit is contained in:
parent
1db8cb7427
commit
880a70f153
|
@ -114,7 +114,7 @@ export function encodeRegistryValue(
|
||||||
cid.hash,
|
cid.hash,
|
||||||
cid.size,
|
cid.size,
|
||||||
CID_TYPES.RESOLVER,
|
CID_TYPES.RESOLVER,
|
||||||
CID_HASH_TYPES.BLAKE3,
|
hashType,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -122,10 +122,7 @@ export function encodeRegistryValue(
|
||||||
return [new Uint8Array(), err];
|
return [new Uint8Array(), err];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [concatBytes(Uint8Array.from([type]), ret as Uint8Array), null];
|
||||||
concatBytes(Uint8Array.from([REGISTRY_TYPES.CID]), ret as Uint8Array),
|
|
||||||
null,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function decodeRegistryValue(hash: Uint8Array): ErrTuple<CID> {
|
export function decodeRegistryValue(hash: Uint8Array): ErrTuple<CID> {
|
||||||
|
|
Loading…
Reference in New Issue