Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docs
  • Loading branch information
amaury1093 committed Sep 7, 2018
commit a1c568bea75c78488767531665048835a96ec55b
22 changes: 12 additions & 10 deletions packages/electron/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Control the Parity Ethereum client from electron.

[![Build Status](https://travis-ci.org/paritytech/js-libs.svg?branch=master)](https://travis-ci.org/paritytech/js-libs) [![npm (scoped)](https://img.shields.io/npm/v/@parity/electron.svg)](https://www.npmjs.com/package/@parity/electron) [![npm](https://img.shields.io/npm/dw/@parity/electron.svg)](https://www.npmjs.com/package/@parity/electron) [![dependencies Status](https://david-dm.org/paritytech/js-libs/status.svg?path=packages/electron)](https://david-dm.org/paritytech/js-libs?path=packages/electron)

Description
-----------

Expand Down Expand Up @@ -68,7 +70,7 @@ isParityRunning()

▸ **checkClockSync**(): `Promise`<[CheckClockSyncResult](interfaces/checkclocksyncresult.md)>

*Defined in [checkClockSync.ts:21](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/checkClockSync.ts#L21)*
*Defined in [checkClockSync.ts:21](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/checkClockSync.ts#L21)*

Use SNTP to check if the local clock is synchronized; return the time drift.

Expand All @@ -81,7 +83,7 @@ ___

▸ **defaultParityPath**(): `Promise`<`string`>

*Defined in [getParityPath.ts:23](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/getParityPath.ts#L23)*
*Defined in [getParityPath.ts:23](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/getParityPath.ts#L23)*

The default path to install parity, in case there's no other instance found on the machine.

Expand All @@ -94,7 +96,7 @@ ___

▸ **deleteParity**(): `Promise`<`void`>

*Defined in [fetchParity.ts:84](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/fetchParity.ts#L84)*
*Defined in [fetchParity.ts:84](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/fetchParity.ts#L84)*

Remove parity binary or partial binary in the userData folder, if it exists.

Expand All @@ -107,7 +109,7 @@ ___

▸ **fetchParity**(mainWindow: *`BrowserWindow`*, options?: *[FetchParityOptions](interfaces/fetchparityoptions.md)*): `Promise`<`string`>

*Defined in [fetchParity.ts:106](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/fetchParity.ts#L106)*
*Defined in [fetchParity.ts:106](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/fetchParity.ts#L106)*

Downloads Parity, saves it to Electron's `userData` folder, and returns the path to the downloaded binary once finished.

Expand All @@ -127,7 +129,7 @@ ___

▸ **getParityPath**(): `Promise`<`string`>

*Defined in [getParityPath.ts:119](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/getParityPath.ts#L119)*
*Defined in [getParityPath.ts:119](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/getParityPath.ts#L119)*

Returns the path to Parity, or throws if parity is not found.

Expand All @@ -140,7 +142,7 @@ ___

▸ **isParityRunning**(options?: *[IsParityRunningOptions](interfaces/isparityrunningoptions.md)*): `Promise`<`boolean`>

*Defined in [isParityRunning.ts:20](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/isParityRunning.ts#L20)*
*Defined in [isParityRunning.ts:20](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/isParityRunning.ts#L20)*

Detect if another instance of parity is already running or not. To achieve that, we just ping on the common hosts.

Expand All @@ -159,7 +161,7 @@ ___

▸ **killParity**(): `Promise`<`void`>

*Defined in [runParity.ts:112](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/runParity.ts#L112)*
*Defined in [runParity.ts:112](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/runParity.ts#L112)*

If a Parity process has been spawned with runParity, then it kills this process. However, there's no guarantee that Parity has been cleanly killed, and the Promise resolves instantly.

Expand All @@ -172,7 +174,7 @@ ___

▸ **parityElectron**(options?: *[ParityElectronOptions](interfaces/parityelectronoptions.md)*): `void`

*Defined in [index.ts:25](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/index.ts#L25)*
*Defined in [index.ts:25](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/index.ts#L25)*

Set default options for @parity/electron. Can be skipped if we don't want to override default options.

Expand All @@ -191,7 +193,7 @@ ___

▸ **runParity**(options?: *[RunParityOptions](interfaces/runparityoptions.md)*): `Promise`<`void`>

*Defined in [runParity.ts:44](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/runParity.ts#L44)*
*Defined in [runParity.ts:44](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/runParity.ts#L44)*

Spawns a child process to run Parity.

Expand All @@ -210,7 +212,7 @@ ___

▸ **signerNewToken**(): `Promise`<`string`>

*Defined in [signerNewToken.ts:16](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/signerNewToken.ts#L16)*
*Defined in [signerNewToken.ts:16](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/signerNewToken.ts#L16)*

Runs parity signer new-token and resolves with a new secure token to be used in a dapp. Rejects if no token could be extracted.

Expand Down
4 changes: 2 additions & 2 deletions packages/electron/docs/interfaces/checkclocksyncresult.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**● isClockSync**: *`boolean`*

*Defined in [checkClockSync.ts:9](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/checkClockSync.ts#L9)*
*Defined in [checkClockSync.ts:9](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/checkClockSync.ts#L9)*

___
<a id="timedrift"></a>
Expand All @@ -32,7 +32,7 @@ ___

**● timeDrift**: *`number`*

*Defined in [checkClockSync.ts:10](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/checkClockSync.ts#L10)*
*Defined in [checkClockSync.ts:10](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/checkClockSync.ts#L10)*

___

4 changes: 2 additions & 2 deletions packages/electron/docs/interfaces/fetchparityoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**● onProgress**: *`function`*

*Defined in [fetchParity.ts:18](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/fetchParity.ts#L18)*
*Defined in [fetchParity.ts:18](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/fetchParity.ts#L18)*

#### Type declaration
▸(progress: *`number`*): `void`
Expand All @@ -43,7 +43,7 @@ ___

**● parityChannel**: *`string`*

*Defined in [fetchParity.ts:19](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/fetchParity.ts#L19)*
*Defined in [fetchParity.ts:19](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/fetchParity.ts#L19)*

___

4 changes: 2 additions & 2 deletions packages/electron/docs/interfaces/isparityrunningoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**● wsInterface**: *`string`*

*Defined in [isParityRunning.ts:12](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/isParityRunning.ts#L12)*
*Defined in [isParityRunning.ts:12](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/isParityRunning.ts#L12)*

___
<a id="wsport"></a>
Expand All @@ -33,7 +33,7 @@ ___
**● wsPort**: * `number` &#124; `string`
*

*Defined in [isParityRunning.ts:13](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/isParityRunning.ts#L13)*
*Defined in [isParityRunning.ts:13](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/isParityRunning.ts#L13)*

___

2 changes: 1 addition & 1 deletion packages/electron/docs/interfaces/parityelectronoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

**● logger**: *`LoggerFunction`*

*Defined in [index.ts:18](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/index.ts#L18)*
*Defined in [index.ts:18](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/index.ts#L18)*

___

4 changes: 2 additions & 2 deletions packages/electron/docs/interfaces/runparityoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**● flags**: *`string`[]*

*Defined in [runParity.ts:15](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/runParity.ts#L15)*
*Defined in [runParity.ts:15](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/runParity.ts#L15)*

___
<a id="onparityerror"></a>
Expand All @@ -32,7 +32,7 @@ ___

**● onParityError**: *`function`*

*Defined in [runParity.ts:16](https://github.com/paritytech/js-libs/blob/5bb5fa4/packages/electron/src/runParity.ts#L16)*
*Defined in [runParity.ts:16](https://github.com/paritytech/js-libs/blob/f3c5e36/packages/electron/src/runParity.ts#L16)*

#### Type declaration
▸(error: *`Error`*): `void`
Expand Down
5 changes: 5 additions & 0 deletions packages/electron/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Control the Parity Ethereum client from electron.

[![Build Status](https://travis-ci.org/paritytech/js-libs.svg?branch=master)](https://travis-ci.org/paritytech/js-libs)
[![npm (scoped)](https://img.shields.io/npm/v/@parity/electron.svg)](https://www.npmjs.com/package/@parity/electron)
[![npm](https://img.shields.io/npm/dw/@parity/electron.svg)](https://www.npmjs.com/package/@parity/electron)
[![dependencies Status](https://david-dm.org/paritytech/js-libs/status.svg?path=packages/electron)](https://david-dm.org/paritytech/js-libs?path=packages/electron)

## Description

With this library, you will be able, from Electron, to:
Expand Down