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.jsonwith the following data
{
"knex": {
"connection": {
"password": "DATABASE_PASSWORD"
}
}
}- Update the database with
yarn migrate - Seed the database with
yarn seed
yarn startto start a serveryarn loadto load local keystore to databaseyarn lintto lint the entire source codeyarn fmtto apply formattersyarn migrateto migrate the databaseyarn rollbackto rollback the databaseyarn seedto 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