This repository has been deprecated, please visit the Pocket Core repository for the latest on Pocket development.
An Ethereum Plugin for the Pocket Node app.
To install the plugin, first install Pocket Node and then run the following command:
pocket-node install pnp-eth
To configure your plugin run the following command:
pocket-node configure ETH /path/to/file.json
The following object describes the format of the JSON file you need to use to configure this plugin.
Notes:
- Each key in the configuration object must be a valid subnetwork ID (
1for mainnet,4for rinkeby and so on). - The
eth_nodeattribute must be a HTTP or HTTPS url. - The default value for
eth_nodeishttp://127.0.0.1:8545and foreth_network_idis5777
{
"5777": {
"eth_node": "http://127.0.0.1:8545",
"eth_network_id": "5777"
},
"4": {
"eth_node": "http://127.0.0.1:8546",
"eth_network_id": "4"
}
}
Before diving into the specifications on how to submit requests to the Ethereum network with this plugin, please review the Pocket Node Client Developer documentation found here.
Transactions must be signed with the account private key and submitted in the serialized_tx param of the /transactions endpoint. The tx_metadata param can be left blank.
To execute a query, please specify an object like the following as your query param in the request to the /queries endpoint of the Node:
Notes:
- The
rpc_methodfound below comes from the Ethereum JSON RPC Specification, please refer to it in order to craft your requests. - The
rpc_methodwill accept any RPC method, exceptsendTransactionandsendRawTransaction
{
rpc_method: 'eth_getBalance',
rpc_params: [<array with params>]
}