Fix libp2p-crypto imports

This commit is contained in:
Matija Petrunic
2020-04-09 11:09:00 +02:00
parent 17f8fb3140
commit 296c5dbe5b
3 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,8 @@
import * as crypto from 'libp2p-crypto';
import {keys} from 'libp2p-crypto';
import {KeyPair, PeerId} from "../src/@types/libp2p";
export async function generateEd25519Keys() {
return await crypto.keys.generateKeyPair('ed25519');
return await keys.generateKeyPair('ed25519');
}
export function getKeyPairFromPeerId(peerId: PeerId): KeyPair {