MyCrypto/shared/enclave
William O'Beirne 3074e50909 Allow PIN Entry for TREZOR One in App (#1971)
* Create popup window for TREZOR pin.

* Address PR feedback. Move pin template into its own file loaded via raw-loader.

* Fix PIN not unlocking

* Dont minify electron main code
2018-06-25 14:27:27 -05:00
..
client Refactor redux pattern from top-level to ducks (#1936) 2018-06-17 20:53:00 -05:00
server Allow PIN Entry for TREZOR One in App (#1971) 2018-06-25 14:27:27 -05:00
README.md Electron Ledger + Trezor Support (#1836) 2018-06-15 18:25:29 -05:00
preload.ts Electron Ledger + Trezor Support (#1836) 2018-06-15 18:25:29 -05:00
types.ts Electron Ledger + Trezor Support (#1836) 2018-06-15 18:25:29 -05:00
utils.ts Electron Ledger + Trezor Support (#1836) 2018-06-15 18:25:29 -05:00

README.md

ETH Enclave

Enclave is the communication layer between hardware wallets and the Electron web view. This layer is necessary if you've disabled node integration, and enabled context isolation on your webview (Which is something you should do.)

Enclave uses Electron's Protocol API to open up an HTTP-like communication layer between Electron and the web view. You can read more about this approach here.

Setup

// Electron main js
import { registerServer } from 'enclave/server';
registerServer(app);
// Electron preload js
import { registerProtocol } from 'enclave/preload';
registerProtocol();

Usage

import EnclaveAPI, { WalletTypes } from 'enclave/client';
EnclaveAPI.getChainCode({
  walletType: WalletTypes.LEDGER,
  dpath: "m/44'/60'/0'/0"
}).then(({ publicKey, chainCode }) => {
  // ...
});