mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-10 22:51:26 +00:00
Switch to dotted syntax
This commit is contained in:
@ -49,7 +49,7 @@ export class Noise implements INoiseConnection {
|
||||
this.useNoisePipes = false;
|
||||
|
||||
if (staticNoiseKey) {
|
||||
const publicKey = Buffer.from(box.keyPair.fromSecretKey(staticNoiseKey)['publicKey']);
|
||||
const publicKey = Buffer.from(box.keyPair.fromSecretKey(staticNoiseKey).publicKey);
|
||||
this.staticKeys = {
|
||||
privateKey: staticNoiseKey,
|
||||
publicKey,
|
||||
|
@ -12,8 +12,8 @@ const NoiseHandshakePayloadProto = pb.NoiseHandshakePayload;
|
||||
|
||||
export function generateKeypair(): KeyPair {
|
||||
const keyPair = box.keyPair();
|
||||
const publicKey = Buffer.from(keyPair['publicKey']);
|
||||
const privateKey = Buffer.from(keyPair['secretKey']);
|
||||
const publicKey = Buffer.from(keyPair.publicKey);
|
||||
const privateKey = Buffer.from(keyPair.secretKey);
|
||||
|
||||
return {
|
||||
publicKey,
|
||||
|
Reference in New Issue
Block a user