Management APIsΒΆ

In addition to implementing the standard JSON-RPC API, Ethereum clients, such as Geth and Parity provide additional management via JSON-RPC.

One of the key common pieces of functionality that they provide is the ability to create & unlock Ethereum accounts for transacting on the network. In Geth and Parity, this is implemented in their Personal modules, details of which are available below:

Support for the personal modules is available in web3j. Both clients have further admin commands available, they will be incorporated into web3j over time if there is sufficient demand.

As Parity provides a superset of the personal admin commands offered by Geth, you can initialise a new web3j connector using the Parity factory method:

Parity parity = Parity.build(new HttpService());  // defaults to http://localhost:8545/
PersonalUnlockAccount personalUnlockAccount = parity.personalUnlockAccount("0x000...", "a password").sendAsync().get();
if (personalUnlockAccount.accountUnlocked()) {
    // send a transaction, or use parity.personalSignAndSendTransaction() to do it all in one
}

Refer to the integration test ParityIT for further implementation details.