2020-05-23 17:13:45 +00:00
# Console
2023-03-22 19:32:08 +00:00
Laconic console application.
2020-05-23 17:13:45 +00:00
2023-01-03 14:24:15 +00:00
User interface for submitting and reading records registered on Laconic.
2023-01-04 11:19:44 +00:00
## Development
* Clone the required repos:
2024-03-18 13:23:29 +00:00
* [laconic2d ](https://git.vdb.to/cerc-io/laconic2d )
2023-01-04 11:19:44 +00:00
```bash
2024-03-18 13:23:29 +00:00
git clone git@git.vdb.to:cerc-io/laconic2d.git
2023-01-04 11:19:44 +00:00
```
2024-03-18 13:23:29 +00:00
* Run the `laconic2d` chain:
* In [laconic2d ](https://git.vdb.to/cerc-io/laconic2d ) repo, start the chain
2023-01-04 11:19:44 +00:00
```bash
./init.sh
```
2023-03-22 12:24:17 +00:00
* For auction functionality enabled, add this environment variable:
```bash
TEST_AUCTION_ENABLED=true ./init.sh
```
2023-01-04 11:19:44 +00:00
* Run the laconic-console app
2023-03-22 12:24:17 +00:00
* From the root of this repo, run:
2023-01-04 11:19:44 +00:00
```bash
yarn
```
2023-01-11 08:27:07 +00:00
*NOTE* : There is a warning containing error while installing dependencies
```bash
warning Error running install script for optional dependency: ".../laconic-console/node_modules/sodium-native: Command failed.
Exit code: 1
...
Error: ./configure exited with 127
```
This can be ignored as it is an error for installing optional dependency
2023-03-22 12:24:17 +00:00
* Start the app:
2023-01-04 11:19:44 +00:00
2024-03-18 13:23:29 +00:00
```bash
2023-01-04 11:19:44 +00:00
CONFIG_FILE=config-local.yml yarn start
```
2023-03-22 12:24:17 +00:00
* Open console at < http: // localhost:8080 >
2023-01-04 11:19:44 +00:00
2024-03-18 13:23:29 +00:00
* To view records in the console, the test suite in registry-sdk can be run
2023-01-04 11:19:44 +00:00
2024-03-18 13:23:29 +00:00
* Clone the [registry-sdk ](https://git.vdb.to/cerc-io/registry-sdk ) repo:
2023-01-04 11:19:44 +00:00
```bash
2024-03-18 13:23:29 +00:00
git clone git@git.vdb.to:cerc-io/registry-sdk.git
2023-01-04 11:19:44 +00:00
```
2024-03-18 13:23:29 +00:00
* In [registry-sdk ](https://git.vdb.to/cerc-io/registry-sdk ) repo, copy [.env.example ](https://git.vdb.to/cerc-io/registry-sdk/blob/main/.env.example ) file and create a `.env` file
2023-01-04 11:19:44 +00:00
```bash
cp .env.example .env
```
* Export the private key using:
```bash
2024-03-18 13:23:29 +00:00
laconic2d keys export mykey --unarmored-hex --unsafe
2023-01-04 11:19:44 +00:00
```
* Copy the private key exported above and assign it to variable `PRIVATE_KEY` in the `.env` file.
* Install dependencies
```bash
yarn
```
2024-03-18 13:23:29 +00:00
* Run the tests in registry-sdk repo:
2023-01-04 11:19:44 +00:00
```bash
yarn test
```
2024-03-18 13:23:29 +00:00
*NOTE* : One test from [util.test.ts ](https://git.vdb.to/cerc-io/registry-sdk/blob/main/src/util.test.ts ) fails as mentioned in the [PR ](https://git.vdb.to/cerc-io/registry-sdk/pull/5#issuecomment-1299572012 )
2023-01-04 11:19:44 +00:00
2023-03-22 12:24:17 +00:00
* Open console at < http: // localhost:8080 > to view the records.