polkadot-js/ts

View on GitHub
types/libp2p-crypto/libp2p-crypto.ts

Summary

Maintainability
A
0 mins
Test Coverage
// @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);
});
});