account
plugins¶
You can use account
plugins with GoQuorum or clef
to provide additional account management.
See the account
plugin reference for more information.
Available account plugins¶
Name | Version | Description |
---|---|---|
hashicorp-vault | 0.0.1 | Enables storage of GoQuorum account keys in a HashiCorp Vault KV v2 engine. Written in Go. |
Using GoQuorum and clef
¶
Run an account
plugin using GoQuorum or clef
:
plugins.json
is the plugins configuration file that 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.
Important
GoQuorum must expose the API using the --http.api [email protected]
or --ws.api [email protected]
command line options.
[email protected]_newAccount
¶
Creates a plugin-managed account with a new key.
Parameters¶
config
: object - Plugin-specific JSON configuration for creating an account. See the plugin’s documentation for more information on the JSON configuration required.
Example
curl -X POST \
-H "Content-Type:application/json" \
-d '
{
"jsonrpc":"2.0",
"method":"[email protected]_newAccount",
"params":[{<config>}],
"id":1
}' \
http://localhost:22000
echo '
{
"jsonrpc":"2.0",
"method":"[email protected]_newAccount",
"params":[{<config>}],
"id":1
}
' | nc -U /path/to/clef.ipc
[email protected]_importRawKey
¶
Creates a plugin-managed account from an existing private key.
Note
Although you can use this API to move plugin-managed accounts between nodes, the plugin may provide a preferable alternative. See the plugin’s documentation for more information.
Parameters¶
rawkey
: string - Hex-encoded account private key (without the0x
prefix).config
: object - Plugin-specific JSON configuration for creating a new account. See the plugin’s documentation for more information on the JSON configuration required.
Example
curl -X POST \
-H "Content-Type:application/json" \
-d '
{
"jsonrpc":"2.0",
"method":"[email protected]_importRawKey",
"params":["<rawkey>", {<config>}],
"id":1
}' \
http://localhost:22000
Not supported, use CLI instead
Command line interface¶
A limited command line interface allows users to interact directly with account
plugins. Run the following command to view all geth account plugin
subcommands and options:
Info
Use the --verbosity
option to hide log output. For example, geth --verbosity 1 account plugin new ...
.
geth account plugin new
¶
Creates a plugin-managed account from an existing key.
Parameters¶
plugins.account.config
: Plugin-specific configuration for creating an account. The value can be file://...
or inline JSON. See the plugin’s documentation for more information on the JSON configuration required.
geth account plugin import
¶
Creates a plugin-managed account from an existing private key.
Parameters¶
plugins.account.config
: Plugin-specific configuration for creating an account. The value can befile://...
or inline JSON. See the plugin’s documentation for more information on the JSON configuration required.rawkey
: Path to the file containing a hex-encoded account private key (without the0x
prefix) (for example/path/to/raw.key
).
geth account plugin list
¶
Lists all the plugin-managed accounts for a given configuration.