From 41ab96c47d458a00e8dd93fea4cb9ad75baa4875 Mon Sep 17 00:00:00 2001 From: acolytec3 <17355484+acolytec3@users.noreply.github.com> Date: Wed, 6 Jan 2021 09:13:25 -0500 Subject: [PATCH] docs: correct case for RSA keyType (#136) * docs: correct case for RSA keyType correct case of rsa keytype in docs/examples to match keyType exported from libp2p-crypto Co-authored-by: Vasco Santos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df06b43..96ea07d 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ The public key is a base64 encoded string of a protobuf containing an RSA DER bu ```JavaScript const PeerId = require('peer-id') -const id = await PeerId.create({ bits: 1024, keyType: 'rsa' }) +const id = await PeerId.create({ bits: 1024, keyType: 'RSA' }) console.log(JSON.stringify(id.toJSON(), null, 2)) ``` @@ -149,7 +149,7 @@ The key format is detailed in [libp2p-crypto](https://github.com/libp2p/js-libp2 Generates a new Peer ID, complete with public/private keypair. - `opts.bits: number` - The size of the key. Default: `2048` -- `opts.keyType: string` - The key type, one of: `['rsa', 'ed25519', 'secp256k1']`. Default: `rsa` +- `opts.keyType: string` - The key type, one of: `['RSA', 'Ed25519', 'secp256k1']`. Default: `RSA` Returns `Promise`.