mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-14 05:01:31 +00:00
Address PR comments
This commit is contained in:
11
test/utils.ts
Normal file
11
test/utils.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import protobuf from "protobufjs";
|
||||
import * as crypto from 'libp2p-crypto';
|
||||
|
||||
export async function loadPayloadProto () {
|
||||
const payloadProtoBuf = await protobuf.load("protos/payload.proto");
|
||||
return payloadProtoBuf.lookupType("pb.NoiseHandshakePayload");
|
||||
}
|
||||
|
||||
export async function generateEd25519Keys() {
|
||||
return await crypto.keys.generateKeyPair('ed25519');
|
||||
}
|
Reference in New Issue
Block a user