mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-14 02:41:31 +00:00
Handshake payload refactor
This commit is contained in:
@ -1,11 +1,4 @@
|
||||
import protobuf from "protobufjs";
|
||||
import * as crypto from 'libp2p-crypto';
|
||||
import { ed25519 } from 'bcrypto';
|
||||
|
||||
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