fix: ts and lint errors

This commit is contained in:
Hugo Dias
2021-01-26 21:39:37 +00:00
parent 2df5f9546e
commit ead151471e
22 changed files with 168 additions and 161 deletions

View File

@ -8,7 +8,7 @@ export async function generateEd25519Keys (): Promise<PrivateKey> {
export function getKeyPairFromPeerId (peerId: PeerId): KeyPair {
return {
privateKey: peerId.privKey.marshal().slice(0, 32),
publicKey: peerId.marshalPubKey()
privateKey: Buffer.from(peerId.privKey.marshal().slice(0, 32)),
publicKey: Buffer.from(peerId.marshalPubKey())
}
}