libp2p-ts/types/libp2p-crypto/libp2p-crypto.ts
2018-06-25 17:01:36 +02:00

9 lines
221 B
TypeScript

// @ts-ignore
import crypto from 'libp2p-crypto';
crypto.keys.generateKeyPair('ed25519', 512, (error, privKey) => {
privKey.public.hash((error, digest) => {
// const peerId = new PeerId(digest, privKey);
});
});