Update instructions

This commit is contained in:
Prathamesh Musale 2024-05-08 12:36:24 +05:30
parent 4aba3d0168
commit f32a0d1cf1

View File

@ -1,6 +1,32 @@
# Records Demo
* Create and populate `config.yml`
* Run the laconicd chain:
```bash
# In laconcid
make install
./scripts/init.sh clean
```
* Create and populate `config.yml` following [config.example.yml](./config.example.yml):
```bash
# Get user key
laconicd keys export alice --unarmored-hex --unsafe --keyring-backend test --home ~/.laconicd
# Create a bond
laconicd tx bond create 100000000000photon --fees 100photon --from alice
# Get the bond id
laconicd query bond list
```
* Install the CLI:
```bash
yarn && yarn build
yarn global add file:$PWD
```
* Publish watcher records from [`records/watcher`](./records/watcher):
@ -9,6 +35,27 @@
yarn ts-node src/publish-endponit-records.ts -c config.yml -r records/watcher
```
## Example
* Query for `ajna-watcher` deployment:
* Find the `WatcherRecord` for `ajna-watcher`:
```bash
WATCHER_RECORD_ID=$(laconic registry record list --all --type WatcherRecord --name ajna-watcher | jq -r '.[].id')
```
* Find corresponding deployment(s):
```bash
laconic registry record list --all --type WatcherDeploymentRecord watcher $WATCHER_RECORD_ID
# Get the deployment URL(s)
laconic registry record list --all --type WatcherDeploymentRecord watcher $WATCHER_RECORD_ID | jq -r '.[].attributes.url'
```
## Query GQL
* View the records at laconicd GQL endpoint <http://localhost:9473>:
```gql