Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codechain-io/codechain-keystore-server
A private key management server for CodeChain
https://github.com/codechain-io/codechain-keystore-server
codechain keystore server
Last synced: about 2 months ago
JSON representation
A private key management server for CodeChain
- Host: GitHub
- URL: https://github.com/codechain-io/codechain-keystore-server
- Owner: CodeChain-io
- License: apache-2.0
- Created: 2018-08-22T04:32:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T01:47:47.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T04:16:26.044Z (almost 2 years ago)
- Topics: codechain, keystore, server
- Language: TypeScript
- Size: 1.23 MB
- Stars: 13
- Watchers: 6
- Forks: 5
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CodeChain keystore server [![Build Status](https://travis-ci.org/CodeChain-io/codechain-keystore-server.svg?branch=master)](https://travis-ci.org/CodeChain-io/codechain-keystore-server)
==========================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.
## Installation
### Prerequisite
1. Install PostgreSQL
### Initial Configuration
1. Install dependencies with `yarn install`
1. Execute the following SQL queries
```sql
CREATE DATABASE "codechain-keystore";
CREATE USER "codechain" WITH ENCRYPTED PASSWORD 'DATABASE_PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE "codechain-keystore" TO "codechain";
```
1. Create `config/local.json` with the following data
```json
{
"knex": {
"connection": {
"password": "DATABASE_PASSWORD"
}
}
}
```
1. Update the database with `yarn migrate`
1. Seed the database with `yarn seed`## Usage
- `yarn start` to start a server
- `yarn load` to load local keystore to database
- `yarn lint` to lint the entire source code
- `yarn fmt` to apply formatters
- `yarn migrate` to migrate the database
- `yarn rollback` to rollback the database
- `yarn seed` to reset and seed the database### Check if the server is alive
You can send a ping to the server to check if it's up and running.
```
curl http://localhost:7007/ping
```