Manage Accounts

Learn how to create new accounts and authenticate in Smart Vault.

Create a new account

Every node needs an account for deploying the ACL smart contracts permissions and controlling the node.
You can create one via the /user/signup route:
curl --request POST 'http://localhost:9091/user/signup' \
--header 'Content-Type: application/json' \
--data-raw '{
"password": "YOUR_NODE_1_ACC_PWD"
> { "account": "0xEB8791298Efd4Ce428fc20435085834C0882853C" }
The returned account is an Ethereum compatible blockchain account in a hex format. The account's Private Key is encrypted on disk inside your node's directory.
ls -la ~/.lightstreams_1/sirius/database/keystore/
> UTC--2020-03-31T15-22-38.810127000Z--EB8791298Efd4Ce428fc20435085834C0882853C
Make sure to back-up the account's keystore file because it contains your Private Key. If you loose your Private Key, you loose all your funds.

Authenticate via a token

Your account is represented in Smart Vault by a token it generates and signs. This token is then used for accessing files, if sufficient permissions were granted to it, as you learned in the Getting Started -> Share a Private File section.
You can generate your token by logging-in into your node via the /user/signin route:
curl --request POST 'http://localhost:9091/user/signin' \
--header 'Content-Type: application/json' \
--data-raw '{
"account": "YOUR_NODE_1_ACC",
"password": "YOUR_NODE_1_ACC_PWD"
> { "token": "eyJibG9ja2N...jMdbRfTUnDuBwVvg9XrQuK9gIhs" }
The token expires after 1000 blocks.
Make sure to keep your account's token secret and always transmit it over a secure connection (SSL) between your node and the application.