Sub-accounts
This page covers various Metalo CLI commands related to sub-account management.
Use sub-account
command to access various options for sub-account management.
USAGE:
metalo sub-account command [command options] [arguments...]
COMMANDS:
new create new sub-account
ls list sub-accounts
get get sub-account
rm remove a sub-account
key options for sub-account access key management
help, h Shows a list of commands or help for one command
Create New Sub-Account
Use the new
command to create a new sub-account for the provided account.
Options
--new-key create new access key (default: false)
--name value Account name
--help, -h show help (default: false)
Examples
# create new sub-account
METAPASS=<password> metalo --user <email> sub-account new
# create new sub-account with an access key
METAPASS=<password> metalo --user <email> sub-account new --new-key
Sample Output
{
"account": {
"id": "did:piprate:3VNbmDEE9ojZBuc9LSrMfN",
"type": "Account",
"version": 4,
"email": "",
"encryptedPassword": "",
"master": "did:piprate:3f4enT91RVexWMVnneoWaJ",
"parent": "did:piprate:3f4enT91RVexWMVnneoWaJ",
"state": "active",
"registeredAt": "2022-11-24T12:18:47.245239Z",
"name": "Sub-Account #4259541671",
"level": 3,
"defaultVault": "local",
"managedSecretStore": {
"level": 2,
"encryptedPayload": "BGZFj4OP...EH5q7ok7i3Y5LNG"
},
"hostedSecretStore": {
"level": 3,
"encryptedPayload": "to0McDlW...A1+qGJaLyGxj5El"
},
"derivationIndex": 4259541671
}
}
With an access key:
{
"account": {
"id": "did:piprate:8BCf5GFxCxffResXfKnHa1",
"type": "Account",
"version": 4,
"email": "",
"encryptedPassword": "",
"master": "did:piprate:3f4enT91RVexWMVnneoWaJ",
"parent": "did:piprate:3f4enT91RVexWMVnneoWaJ",
"state": "active",
"registeredAt": "2022-11-24T12:22:46.169695Z",
"name": "Sub-Account #2783152775",
"level": 3,
"defaultVault": "local",
"managedSecretStore": {
"level": 2,
"encryptedPayload": "hyKj+AvZasAfoLq8Y65tKIky9eAuBvPe8HCsbp5i/43NYwqAq8Pk8n8pftQVRTRjPOiTCNBnHuZXHJLUd3nnkQx+zEoCXf6dXUbeQu2PSJBPcIiEh+igEbZlkg1cCHCRpTsxmvUmm1LuVmrFNEuMGNys9VSKp45HBYjWul/MaKBoHWiSsYeGwNa7LCUwr0NKGCaoljk8383ZCeBb5nhdE5W31lQdAFKBMehRmTvJiLs8CIBlvOj/dr9G2HeDW/xVuBMvUKUXH/hXvTsInr4Swih4ujc2RqQbwl5VRxc1gGx/4mumVUkyuvQE6d58rsjGXNblbGdM9Mtb/EJ4JsiiRp44shb3LX+xAV5YrdBVAgFy/3gmjx3rhg8C"
},
"hostedSecretStore": {
"level": 3,
"encryptedPayload": "kRBGX3dQRszwCuNxnx9g2hMGwwS0co/y73b/CMI4k9gOSTIxrdo1/qtR5/zIsCHo9agXW1mYr1qQ0XuZX3v12ylMMFSmjhGugq63zsb+esQytSsrytS0Nmt+jEa1c3qPUFLzMZMgkC/xsUsec1RpjJ8+BTQ/pYmlIhgqWn1vE1kGlCW4IAc74B2eiDo4p06h4PSFeBXF9BKeLCOP9sfRHtF0uQPRdNntqrooKYNZZiC10jxkmb/9T7pu5qsoe1ux1ahIA8eoMOYsB27Y4+Cb6lTU+jGdSsStH/PV7LgnIiwUFYdY8zwPCSEIt41DKX+LY7QHymltxot3iHF5suHZxBj01wfP5e6zzRlhC1Xnt7o1EhKgMqm6MVF7D7K96AEfTNdLvbhRbtpRsf92wGarxQ6HYxkUcIq93WxDJlFAHC9vfgrIFIzgU/epxr6A80TZTPXkyrBgcArjVVKdRo52qQeqbAO0dpMM4FpY6VzM6D04HHMJcEIAUqzcRxu6qMvhPITscVvvqfE47oksOe5TmA=="
},
"derivationIndex": 2783152775
},
"key": {
"id": "F3yX8cq12zxvRcoLrSb6FA",
"secret": "gdv323TbZ4F9juRapErawRYrBak0fOHxNsg05+LiO1VcFiersTTOydE1rGbSg1scq753ADZB4VOfUsgx9ZNGYw==.atztCvZjdKxFh/QjKxRtFLHoj9a3cW2uDKsUspLEZGGyIh8x6pgX3D9M0cAIx9HSSCncczs8tLfqGi3qAY3vuQ=="
}
}
List Sub-Accounts
Use the ls
command to list all available sub-accounts for the given account.
METAPASS=<password> metalo --user <email> sub-account ls
Sample Output
| SUB-ACCOUNT ID | NAME | REGISTERED AT |
|------------------------------------|-------------------------|---------------------------|
| did:piprate:3VNbmDEE9ojZBuc9LSrMfN | Sub-Account #4259541671 | 2022-11-24 12:18:47+00:00 |
Get Sub-Account
Use the get
command to get sub-account definition with the given ID.
METAPASS=<password> metalo --user <email> sub-account get <sub-account-id>
This command with return JSON in Account format.
Delete Sub-Account
THIS COMMAND IS NOT SUPPORTED YET.
Use the rm
command to delete the sub-account with the given ID.
METAPASS=<password> metalo --user <email> sub-account rm <sub-account-id>
Manage Sub-Account Keys
Use sub-account
command to access various options for sub-account management.
USAGE:
metalo sub-account key command [command options] [arguments...]
COMMANDS:
new generate new access key
ls list access keys
get get access key
rm delete access key
help, h Shows a list of commands or help for one command
Create New Access Key
Use the new
command to generate a new access key.
METAPASS=<password> metalo --user <email> sub-account key new <sub-account-id>
Sample Output
{
"id": "PZFzEgkJDzMfVeRL51pEEZ",
"secret": "wqQGMdKxJ54De...1evB/mTYQ4Lg=="
}
List Access Keys
Use the ls
command to list all available access keys for the given account.
METAPASS=<password> metalo --user <email> sub-account key ls <sub-account-id>
Sample Output
| ID |
|------------------------|
| F3yX8cq12zxvRcoLrSb6FA |
Get Access Key
Use the get
command to the read access key definition with the given ID.
METAPASS=<password> metalo --user <email> sub-account key get <sub-account-id> <access-key-id>
The command returns Access Key JSON.
Delete Access Key
Use the rm
command to delete the access key with the given ID.
METAPASS=<password> metalo --user <email> sub-account key rm <sub-account-id> <access-key-id>