CodeChain keystore server is a private key management server. It saves CodeChain's asset transfer address safely in a database. You should use this keystore server to save your private key safely in CodeChain SDK.
- Install PostgreSQL
- Install dependencies with
yarn install
- Execute the following SQL queries
CREATE DATABASE "codechain-keystore";
CREATE USER "codechain" WITH ENCRYPTED PASSWORD 'DATABASE_PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE "codechain-keystore" TO "codechain";
- Create
config/local.json
with the following data
{
"knex": {
"connection": {
"password": "DATABASE_PASSWORD"
}
}
}
- Update the database with
yarn migrate
- Seed the database with
yarn seed
yarn start
to start a serveryarn load
to load local keystore to databaseyarn lint
to lint the entire source codeyarn fmt
to apply formattersyarn migrate
to migrate the databaseyarn rollback
to rollback the databaseyarn seed
to reset and seed the database
You can send a ping to the server to check if it's up and running.
curl http://localhost:7007/ping