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