embark/packages/core/utils/src
emizzle c7ec49a38f feat(@embark/embark-rpc-manager): Add support for `eth_signTypedData_v3`
This PR adds support for EIP-712 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md), by allowing the signing of typed data transactions using the `eth_signTypeData_v3` or `eth_signTypedData` request.

Add a module called `embark-rpc-manager` to handle all RPC transaction modifications.

The internal events management module extracted to `embark-core`. This allows other modules (ie plugins) to use a private instance of Embark’s event API.

Remove transaction modifications in `embark-accounts-manager` and leave only the functionality in this module that handle account management (ie funding of accounts). Other functionality was moved to `embark-rpc-manager`.

- Transactions should now reflect when a new node account is added via `personal_newAccount` or via the node itself (and once `eth_accounts` is requested).
- In the proxy, errors are handled for all cases and are now JSON-RPC spec-compliant.
- Always register `eth_signTypedData` RPC response and display error message if account cannot be found.

NOTE: Updated yarn.lock due to conflict after rebase.

Avoid race condition with rpc modifications

Refactor proxy to make request handling asynchronous, and to allow circumvention of forwarding requests to the node in cases where it is not needed.

Move loading of plugins to after core and stack components (in cmd_controller).

We should load custom plugins LAST (ie after all core and stack components, and after all Embark plugins). To do this, we disable automatic loading of plugins in the config, and allow them to be loading explicitly in cmd_controller.

Create a system that allows registration of custom plugins. Each plugin is generated in EmbarkJS by instantiating the registered class. For example, we can register a Plasma plugin and it will be generated in to EmbarkJS.Plasma with an instantiation of `embarkjs-plasma`. The DApp itself can then do what it wants with `EmbarkJS.Plasma` (ie call `EmbarkJS.Plasma.init()`.

NOTE: loading of custom plugins needs to be applied to all other commands in `cmd_controller`. This PR only loads custom plugins for the `run` command.

NOTE: This PR is based on branch fix/ws-eth-subscribe (#1850). I will rebase this PR when (and if) #1850 is merged.
2019-11-18 13:36:37 -06:00
..
solidity move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
accountParser.js feat(@embark/embark-rpc-manager): Add support for `eth_signTypedData_v3` 2019-11-18 13:36:37 -06:00
addressUtils.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
collections.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
constants.ts move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
env.js build(deps): move deps needed by embark-basic-pipeline from packages/embark 2019-10-25 11:13:49 -05:00
file.ts chore(@embark/utils): improve error handling for downloading file contents 2019-11-14 15:36:18 +01:00
host.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
index.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
log-utils.js move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
logHandler.js refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
longRunningProcessTimer.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
monorepo.js feat(@embark/utils): "inside monorepo" APIs 2019-09-24 10:51:27 -05:00
network.ts move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
pathUtils.js move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
toposort.js move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
transactionUtils.ts move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
web3Utils.ts move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00