mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-23 04:21:33 +00:00
fix automatic lint
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
import {keys} from 'libp2p-crypto';
|
||||
import {KeyPair} from "../src/@types/libp2p";
|
||||
import PeerId from "peer-id";
|
||||
import { keys } from 'libp2p-crypto'
|
||||
import { KeyPair } from '../src/@types/libp2p'
|
||||
import PeerId from 'peer-id'
|
||||
|
||||
export async function generateEd25519Keys() {
|
||||
return await keys.generateKeyPair('ed25519');
|
||||
export async function generateEd25519Keys () {
|
||||
return await keys.generateKeyPair('ed25519')
|
||||
}
|
||||
|
||||
export function getKeyPairFromPeerId(peerId: PeerId): KeyPair {
|
||||
export function getKeyPairFromPeerId (peerId: PeerId): KeyPair {
|
||||
return {
|
||||
privateKey: peerId.privKey.marshal().slice(0, 32),
|
||||
publicKey: peerId.marshalPubKey(),
|
||||
publicKey: peerId.marshalPubKey()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user