mirror of
https://github.com/status-im/js-waku.git
synced 2025-02-22 18:08:14 +00:00
Remove unused code
This commit is contained in:
parent
17c8335d6f
commit
5e1cd78288
@ -32,16 +32,9 @@ export function verify(
|
||||
}
|
||||
}
|
||||
|
||||
function createNodeId(bytes: Uint8Array): NodeId {
|
||||
if (bytes.length !== 32) {
|
||||
throw new Error("NodeId must be 32 bytes in length");
|
||||
}
|
||||
return bytesToHex(bytes);
|
||||
}
|
||||
|
||||
export function nodeId(pubKey: Uint8Array): NodeId {
|
||||
const publicKey = secp.Point.fromHex(pubKey);
|
||||
const uncompressedPubkey = publicKey.toRawBytes(false);
|
||||
|
||||
return createNodeId(keccak256(uncompressedPubkey.slice(1)));
|
||||
return bytesToHex(keccak256(uncompressedPubkey.slice(1)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user