mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-08 08:43:09 +00:00
11 lines
254 B
TypeScript
11 lines
254 B
TypeScript
import { bytesToHex } from "../utils";
|
|
|
|
import { NodeId } from "./types";
|
|
|
|
export function createNodeId(bytes: Uint8Array): NodeId {
|
|
if (bytes.length !== 32) {
|
|
throw new Error("NodeId must be 32 bytes in length");
|
|
}
|
|
return bytesToHex(bytes);
|
|
}
|