fix automatic lint

This commit is contained in:
Marin Petrunić
2020-06-19 12:49:40 +02:00
parent 9b11560183
commit 8327a60356
26 changed files with 1457 additions and 1509 deletions

View File

@ -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()
}
}