fix: switch mkeyEd25519 to CID_HASH_TYPES
This commit is contained in:
parent
bb40e51eee
commit
87800422e3
|
@ -4,9 +4,9 @@ import {
|
||||||
createKeyPair,
|
createKeyPair,
|
||||||
createNode,
|
createNode,
|
||||||
NodeId,
|
NodeId,
|
||||||
|
CID_HASH_TYPES,
|
||||||
} from "@lumeweb/libs5";
|
} from "@lumeweb/libs5";
|
||||||
import HyperTransportPeer from "@lumeweb/libs5-transport-hyper";
|
import HyperTransportPeer from "@lumeweb/libs5-transport-hyper";
|
||||||
import { mkeyEd25519 } from "@lumeweb/libs5";
|
|
||||||
import { concatBytes } from "@noble/curves/abstract/utils";
|
import { concatBytes } from "@noble/curves/abstract/utils";
|
||||||
import { Level } from "level";
|
import { Level } from "level";
|
||||||
|
|
||||||
|
@ -49,7 +49,10 @@ const plugin = {
|
||||||
});
|
});
|
||||||
|
|
||||||
s5peer.id = new NodeId(
|
s5peer.id = new NodeId(
|
||||||
concatBytes(Uint8Array.from([mkeyEd25519]), peer.remotePublicKey),
|
concatBytes(
|
||||||
|
Uint8Array.from([CID_HASH_TYPES.ED25519]),
|
||||||
|
peer.remotePublicKey,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
await s5peer.init();
|
await s5peer.init();
|
||||||
|
|
Loading…
Reference in New Issue