How to register an Ethereum account
Use the Orchestrate Gateway API to register Ethereum accounts. Orchestrate allows you to securely create new Ethereum accounts (storing the corresponding private key in a secure Vault technology connected to Quorum Key Manager service).
Accounts serve multiple purposes on Orchestrate and can be used to:
- Send transactions
- Sign any type of data
Check the REST API Reference or the JS SDK Reference for a detailed description of all endpoints.
Register an Ethereum account
Register an account using the Orchestrate Gateway API by sending a POST
request to the /accounts
endpoint.
- REST Request
- JavaScript (SDK)
- JSON response
{
"alias": "account_1",
"attributes": {
"myAttribute1": "attribute",
"myAttribute2": "attribute"
},
"chain": "mainnet"
}
const account = await client.createAccount({
alias: "account_1",
attributes: {
myAttribute1: "attribute",
myAttribute2: "attribute",
},
chain: "mainnet",
});
{
"address": "0xf17f52151EbEF6C7334FAD080c5704D77216b732",
"alias": "account_1",
"attributes": {
"myAttribute1": "attribute",
"myAttribute2": "attribute"
},
"compressedPublicKey": "048e66b3e5...",
"publicKey": "048e66b3e549818ea2c...",
"tenantID": "foo",
"createdAt": "2020-07-09T12:35:42.115395Z",
"updatedAt": "2020-07-09T12:35:42.115395Z"
}
alias
(optional) - Alias of the account.attributes
(optional) - List of attributes of the account.chain
(optional) - Name of the chain on which to automatically fund the account using a registered faucet
Accounts can be automatically funded at the moment of their creation. To know more about Faucets check here.
Import an existing Ethereum account
Import an existing account using the Orchestrate Gateway API by sending a POST
request to the /accounts/import
endpoint.
- REST Request
- JavaScript (SDK)
- JSON response
{
"privateKey": "f368b15ea01bafd199d4d39daee2b1d281bf78193c590ef79c233016b3b43f81"
}
const account = await client.importAccount({
privateKey:
"f368b15ea01bafd199d4d39daee2b1d281bf78193c590ef79c233016b3b43f81",
});
{
"address": "0xf17f52151EbEF6C7334FAD080c5704D77216b732",
"compressedPublicKey": "048e66b3e5...",
"publicKey": "048e66b3e549818ea2c...",
"tenantID": "foo",
"createdAt": "2020-07-09T12:35:42.115395Z",
"updatedAt": "2020-07-09T12:35:42.115395Z"
}
privateKey
- Private key of the account to import.
Quorum Key Manager store
Orchestrate connects to a Quorum Key Manager(QKM) instance to perform every account operation. The private keys linked to the Orchestrate accounts are located in a specific QKM Ethereum store.
By default, Orchestrate uses the store defined in the QKM settings, but a different store can be defined on every HTTP request, as follow:
{
"alias": "account_2",
"storeID": "my-qkm-store"
"attributes": {
"myAttribute1": "attribute",
"myAttribute2": "attribute"
},
"chain": "mainnet"
}