Skip to content
You are reading GoQuorum development version documentation and some displayed features may not be available in the stable release. You can switch to stable version using the version box at screen bottom.

account Plugins

account plugins can be used with GoQuorum or clef to provide additional account management.

We recommended reading the Plugins overview first to learn how to use plugins.

Available account plugins

Name Version Description
hashicorp-vault 0.0.1 Docs & Source Enables storage of Quorum account keys in a Hashicorp Vault kv v2 engine. Written in Go.

Using with GoQuorum & clef

geth --plugins file:///path/to/plugins.json ...
clef --plugins file:///path/to/plugins.json ...

Where the plugins settings file, plugins.json, defines an account provider:

{
    "providers": {
        "account": {
            "name": "quorum-account-plugin-<NAME>",
            "version": "<VERSION>",
            "config": "file:///path/to/plugin.json"
        }
    }
}

RPC API

A limited API allows users to interact directly with account plugins:

Info

GoQuorum must explicitly expose the API with --rpcapi plugin@account or --wsapi plugin@account

plugin@account_newAccount

Create a plugin-managed account with a new key:

Parameter Description
config Plugin-specific json configuration for creating an account. See the plugin’s documentation for more info on the json config required

Example

curl -X POST \
     -H "Content-Type:application/json" \
     -d '
        {
            "jsonrpc":"2.0",
            "method":"plugin@account_newAccount",
            "params":[{<config>}],
            "id":1
        }' \
     http://localhost:22000
plugin_account.newAccount({<config>})
echo '
    {
        "jsonrpc":"2.0",
        "method":"plugin@account_newAccount",
        "params":[{<config>}],
        "id":1
    }
' | nc -U /path/to/clef.ipc

plugin@account_importRawKey

Create a plugin-managed account from an existing private key:

Note

Although this API can be used to move plugin-managed accounts between nodes, the plugin may provide a more preferable alternative. See the plugin’s documentation for more info.

Parameter Description
rawkey Hex-encoded account private key (without 0x prefix)
config Plugin-specific json configuration for creating a new account. See the plugin’s documentation for more info on the json config required

Example

curl -X POST \
     -H "Content-Type:application/json" \
     -d '
         {
             "jsonrpc":"2.0",
             "method":"plugin@account_importRawKey",
             "params":["<rawkey>", {<config>}],
             "id":1
         }' \
     http://localhost:22000
plugin_account.importRawKey(<rawkey>, {<config>})
not supported - use CLI instead

CLI

A limited CLI allows users to interact directly with account plugins:

geth account plugin --help

Info

Use the --verbosity flag to hide log output, e.g. geth --verbosity 1 account plugin new ...

geth account plugin new

Create a plugin-managed account from an existing key:

Parameter Description
plugins.account.config Plugin-specific configuration for creating an account. Can be file:// or inline-json. See the plugin’s documentation for more info on the json config required.
geth account plugin new \
    --plugins file:///path/to/plugin-config.json \
    --plugins.account.config file:///path/to/new-acct-config.json
geth account plugin new \
    --plugins file:///path/to/plugin-config.json \
    --plugins.account.config '{<json>}'

geth account plugin import

Create a plugin-managed account from an existing private key:

Parameter Description
plugins.account.config Plugin-specific configuration for creating an account. Can be file:// or inline-json. See the plugin’s documentation for more info on the json config required
rawkey Path to file containing hex-encoded account private key (without 0x prefix) (e.g. /path/to/raw.key)
geth account plugin import \
    --plugins file:///path/to/plugin-config.json \
    --plugins.account.config file:///path/to/new-acct-config.json \
    /path/to/raw.key
geth account plugin import \
    --plugins file:///path/to/plugin-config.json \
    --plugins.account.config '{<json>}'
    /path/to/raw.key

geth account plugin list

List all plugin-managed accounts for a given config:

geth account plugin list \
    --plugins file:///path/to/plugin-config.json

Developers

See For Developers.

ConsenSys has acquired Quorum from J.P. Morgan. Please read the FAQ.
Questions or feedback? You can discuss issues and obtain free support on GoQuorum Slack channel.
For paid professional support by ConsenSys, contact us at quorum@consensys.net