-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Usage
To use Parity run parity
command and then head on to http://localhost:8080/ or another port specified by --dapps-port PORT
option. This will bring up the UI that can be used to monitor Ethereum blockchain syncing progress and to use Mist wallet or any other installed dapp. Once the syncing is complete, new transactions can be sent. Before relaying a transaction [Secure Transaction Signer](Secure Transaction Signer) has to be used to sign it.
You can also connect to the Morden testnet with parity --chain morden
.
You can override the normal boot nodes and connect to your own nodes by using parity --bootnodes ...
, e.g. you might run a local geth
node and sync from that by running parity --bootnodes enode://[email protected]:30303
. You need to check geth's output to figure out what node ID is.
Use parity --help
to find out about other available options.
Assuming you start with JSONRPC API enabled (default), then Ethereum's JSON-RPC can be used. e.g.:
> curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x0037a6b811ffeb6e072da21179d11b1406371c63", "latest"],"id":1}' http://127.0.0.1:8545
{"jsonrpc":"2.0","result":"0x0406c5a45045137507eb","id":1}
Ethereum has the web3 Javascript API for interacting with an Ethereum client.
Parity doesn't include a Javascript interpreter but if you want to use an interactive Javascript console, you can install node/NPM and use its console. Once you have node/NPM installed, you'll just need to install the latest web3 module:
$ npm install web3
From then on you just need to run node
and require the web3 module:
$ node
> Web3 = require("web3")
> web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
After this point, you'll be able to use the web3 API from with this environment, e.g.:
> web3.eth.blockNumber
743397
- [With Mist](Using parity with mist)
- For Mining
- [For Private Chains](Private Chains)
- [For PoA Chains](Proof of Authority Chains)
- [Coming from Geth](Importing a chain from Geth)
- Backing-up & Restoring
- Ethereum Classic