Skip to content

Commit

Permalink
Update README (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas authored Nov 28, 2018
1 parent bf05bc9 commit 4387782
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
[![Circle CI](https://img.shields.io/circleci/project/kigawas/eciesjs/master.svg)](https://circleci.com/gh/kigawas/eciesjs)
[![Codecov](https://img.shields.io/codecov/c/github/kigawas/eciesjs.svg)](https://codecov.io/gh/kigawas/eciesjs)

Elliptic Curve Integrated Encryption Scheme for secp256k1
Elliptic Curve Integrated Encryption Scheme for secp256k1, written in TypeScript with minimal dependencies.

This is the JavaScript version of [eciespy](https://github.com/kigawas/eciespy), please go to there for detailed mechanism documentation.
This is the JavaScript/TypeScript version of [eciespy](https://github.com/kigawas/eciespy), you may go there for documentation about detailed mechanism.

## Install

Install with `npm install eciesjs` (only [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node) is the dependency).
Install with `npm install eciesjs` ([`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node) is the only dependency).

## Quick Start

Expand Down Expand Up @@ -51,23 +51,37 @@ Returns: **Buffer**

### `PrivateKey`

- Methods

```typescript
static fromHex(hex: string): PrivateKey;
constructor(secret?: Buffer);
toHex(): string;
ecdh(pub: PublicKey): Buffer;
equals(other: PrivateKey): boolean;
```

- Properties

```typescript
static fromHex(hex: string): PrivateKey;
readonly secret: Buffer;
readonly publicKey: PublicKey;
constructor(secret?: Buffer);
toHex(): string;
ecdh(pub: PublicKey): Buffer;
equals(other: PrivateKey): boolean;
readonly secret: Buffer;
readonly publicKey: PublicKey;
```

### `PublicKey`

- Methods

```typescript
static fromHex(hex: string): PublicKey;
constructor(buffer: Buffer);
toHex(compressed?: boolean): string;
equals(other: PublicKey): boolean;
```

- Properties

```typescript
static fromHex(hex: string): PublicKey;
readonly uncompressed: Buffer;
readonly compressed: Buffer;
constructor(buffer: Buffer);
toHex(compressed?: boolean): string;
equals(other: PublicKey): boolean;
readonly uncompressed: Buffer;
readonly compressed: Buffer;
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"type": "git",
"url": "https://github.com/kigawas/eciesjs.git"
},
"version": "0.1.0",
"version": "0.1.1",
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.5",
Expand Down

0 comments on commit 4387782

Please sign in to comment.