-
Notifications
You must be signed in to change notification settings - Fork 488
API Documentation
Core
- code-runner
- console
- core
- engine
- i18n
- logger
- reset
- utils
Stack
- api
- authenticator
- blockchain-client
- blockchain
- communication
- compiler
- contracts-manager
- deployment
- embarkjs
- library-manager
- namesystem
- pipeline
- process-logs-api-manager
- proxy
- storage
- test-runner
- watcher
- webserver
Plugins
- accounts-manager
- basic-pipeline
- coverage
- debugger
- deploy-tracker
- ens
- ethereum-blockchain-client
- ganache
- geth
- graph
- ipfs
- mocha-tests
- parity
- plugin-cmd
- profiler
- rpc-manager
- scaffolding
- snark
- solc
- solidity-tests
- solidity
- specialconfigs
- swarm
- transaction-logger
- transaction-tracker
- vyper
- web3
- whisper-geth
- whisper-parity
EmbarkJS
- embarkjs
- embarkjs-ens
- embarkjs-ipfs
- embarkjs-swarm
- embarkjs-web3
- embarkjs-whisper
Cockpit
- api-client
- ui
module type: plugin
- generates wallet from accounts configuration
- fund accounts according to the accounts configuration
- signs transactions for accounts present in its wallet
- if it's a node account it just ignores it (since it will be processed at the node)
- overrides eth_getAccounts to return the correct list of accounts
actions used
-
blockchain:proxy:request
- to sign the transactions -
blockchain:proxy:response
- to modify accounts list
module type: stack
name: proxy:endpoint
arguments: no arguments
returns the endpoint (string)
name: blockchain:proxy:request
params: {reqData: }
description: actions run when a request is made to the blockchain node. In case the plugin hangs (5 seconds), the action continues.
name: blockchain:proxy:response
params: {respData: , reqData: }
description: actions run when a response is returned from the blockchain node. In case the plugin hangs (5 seconds), the action continues.
name: compiler:url
description: Returns API URL.
params:
- callback -
(url) => {}
- a callback function with access to the API url
name: logs:api:enable
description: Enables api server log output
params: -
name: logs:api:disable
description: Disables api server log output
params:
module type: stack component
name: blockchain:node:register
arguments:
- clientName {string} - name of the client (e.g 'geth')
- startCb {function} - function that starts the node
registers a client and the function that starts it
name: blockchain:node:start
arguments:
- blockchainConfig {object} - blockchain config (taken from dapp config/blockchain.js)
- doneCb {function} - function that is fired once the blockchain node has started
starts a blockchain name according to the config given. will start one of the nodes previously registered with blockchain:node:register
actions used
-
pipeline:generateAll:before
- to generate blockchain.json config artifact
*events emited
-
blockchain:started
- emitted when blockchain node starts
module type: stack component
name: blockchain:client:register
(not being used should be removed)
name: blockchain:client:provider
arguments:
- clientName {string} - name of blockchain technology (e.g "ethereum")
- cb {function(err, provider)} - callback that returns the blockchain provider
Returns a provider object that allows libraries to connect to the embark's blockchain node
module type: stack component
name: communication:node:register
arguments:
- clientName {string} - name of the client (e.g 'ipfs')
- startCb {function} - function that starts the node
registers a node and the function that starts it
name: communication:node:start
arguments:
- communicationConfig {object} - communication config (taken from dapp config/communication.js)
- doneCb {function} - function that is fired once the blockchain node has started
starts a communication node according to the config given. will start one of the nodes previously registered with communication:node:register
actions used
-
pipeline:generateAll:before
- to generate communication.json config artifact
*events emited
-
communication:started
- emitted when communication node starts
module type: plugin
- whitelists embarkjs & embarkjs-whisper packages in the vm
- generates whisper artifacts
- makes whisper work in the console
- registers api endpoints
actions used
-
pipeline:generateAll:after
- to register whisper artifact
events used
-
blockchain:started
- to connect embarkjs whisper to node in the console
module type: ???
name: compiler:contracts:compile
description: Compiles Smart Contracts given a list of Smart Contract files and returns the compilation data.
params:
-
{ contractsFiles: any[], cb: function }
module type: ???
name: compiler:contracts:compile
description: Compiles Smart Contracts given a list of Smart Contract files and returns the compilation data.
params:
{ contractsFiles: any[], cb: function }
module type: stack component
name: tests:run
arguments:
- options - {object}
- doneCb - {function} called when tests are done
run tests with given options
name: tests:runner:register
arguments:
- name - {string} pluginName
- matchFn - {function(filepath)} function that returns boolean true if file being matched can be run by the plugin
- addFn - {function(filepath)} function that adds the file to the plugin runlist, throws exception if file doesn't match supported by plugin (should run matchFn first)
- runFn - {function(options, reporter)} function that runs the plugin
registers a test runner plugin
module type: plugin component
- runs test suites written in solidity using remix-tests
- ensures existence of the Assert (remix_tests.sol) library
- ensures test files include the Assert (remix_tests.sol) import statement and injects that statement to files that don't have it
- compiles & deploys contracts that have been added to this test runner, and then runs tests
module type: plugin component
- runs test suites written in javascript using mocha
- defines
config
function that gets exported and exposed in the mocha tests - builds, compiles & deploys contracts with the config given
- instantiates contracts in vanilla web3
- overrides require to return specified contracts
- defines
module type: stack component
name: deployment:contracts:deploy
arguments:
-
contractsList
- Array - array of Contract objects -
contractDependencies
-<object(string:[string])>
of dependencies key=contractName, value=`
deploys a list of contracts in the order of their dependencies
name: deployment:contract:deploy
arguments:
-
contract
-Contract
deploy contract
name: deployment:deployer:register
arguments:
-
blockchainType
- name of the blockchain tech (e.g "ethereum") -
deployerCb
-(contract, doneCb(err))
function that deploys specifiedcontract
then on finish callsdoneCb
register a deployer for blockchainType
for example register an ethereum contract deployer
name: deployment:deployContracts:beforeAll
description: actions to run before deploying contracts
name: deployment:deployContracts:afterAll
description: actions to run after contracts are deployed
name: deployment:contract:beforeDeploy
params: {contract: }
description: actions to run before deploying a contract
name: deployment:contract:deployed
params: {contract: }
description: actions to run after a contract has been deployed
name: deployment:contract:shouldDeploy
params: {contract: , shouldDeploy: boolean}
description: actions to run before deploying a contract, can change the shouldDeploy
flag