Skip to content

Commit

Permalink
chore: freshen readme (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain authored Jul 15, 2024
1 parent 4f6bd57 commit d6347ef
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @ChainSafe/bls-keystore

![npm](https://img.shields.io/npm/v/@ChainSafe/bls-keystore)
![npm](https://img.shields.io/npm/v/@chainsafe/bls-keystore)
![Discord](https://img.shields.io/discord/593655374469660673?color=blue&label=Discord&logo=discord)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![es-version](https://img.shields.io/badge/ES-2015-yellow)
Expand All @@ -12,7 +12,6 @@

Functional interface
```typescript
import {Buffer} from "buffer";
import {
IKeystore,
create,
Expand All @@ -35,7 +34,7 @@ const keystore: IKeystore = await create(password, privateKey, publicKey, path);
await verifyPassword(keystore, password); //true | false

// decrypt
const decryptedPrivateKey: Buffer = await decrypt(keystore, password);
const decryptedPrivateKey: Uint8Array = await decrypt(keystore, password);

// convert to string
JSON.stringify(keystore); //string
Expand All @@ -49,7 +48,6 @@ validateKeystore(data); // throws if invalid

Class-based interface
```typescript
import {Buffer} from "buffer";
import {
Keystore,
} from "@chainsafe/bls-keystore";
Expand All @@ -67,7 +65,7 @@ const keystore: Keystore = await Keystore.create(password, privateKey, publicKey
await keystore.verifyPassword(password); //true | false

// decrypt
const decryptedPrivateKey: Buffer = await keystore.decrypt(password);
const decryptedPrivateKey: Uint8Array = await keystore.decrypt(password);

// convert to string
keystore.stringify(); //string
Expand Down

0 comments on commit d6347ef

Please sign in to comment.