Add an example to query keys for a point #1

Merged
nabarun merged 3 commits from pm-add-example into main 2025-06-02 11:31:35 +00:00
11 changed files with 104 additions and 76 deletions

View File

@ -2,20 +2,48 @@
Watcher for the Azimuth PKI on Ethereum, used in Urbit identities. Read more about Azimuth: Watcher for the Azimuth PKI on Ethereum, used in Urbit identities. Read more about Azimuth:
- [https://developers.urbit.org/reference/azimuth/azimuth](https://developers.urbit.org/reference/azimuth/azimuth) * [https://developers.urbit.org/reference/azimuth/azimuth](https://developers.urbit.org/reference/azimuth/azimuth)
This app can be run using Stack Orchestrator: This app can be run using Stack Orchestrator:
- [Azimuth stack](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/app/data/stacks/azimuth) * [Azimuth stack](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/app/data/stacks/azimuth)
It is also hosted [here](https://azimuth.dev.vdb.to/graphql) It is also hosted at <https://azimuth.dev.vdb.to/graphql>
## Usage ## Usage
Here are some example queries: * Query public keys for a point:
``` ```bash
{ # Example
curl 'https://azimuth.dev.vdb.to/graphql' \
-H 'Content-Type: application/json' \
--data-raw '{"query":"{ azimuthGetKeys(blockHash: \"latest\", contractAddress: \"0x223c067F8CF28ae173EE5CafEa60cA44C335fecB\", _point: 58213) { value { encryptionKey: value0 authenticationKey: value1 cryptoSuiteVersion: value2 keyRevisionNumber: value3 } } }"}' \
| jq
# Response
# {
# "data": {
# "azimuthGetKeys": {
# "value": {
# "encryptionKey": "0xc248f759474b16192bd8bdca0bff1b8bff555cd3d118022095331d6d98690c6d",
# "authenticationKey": "0x21188bac08542730e1c4697636d6fa25968f404470ccf917756f05e28c69045a",
# "cryptoSuiteVersion": "1",
# "keyRevisionNumber": "1"
# }
# }
# }
# }
```
* API params:
* `contractAddress`: Azimuth contract address
* `blockHash`: block hash at which you want to query the contract state
* Example GQL queries:
```gql
{
azimuthIsActive( azimuthIsActive(
blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9"
contractAddress: "0x223c067F8CF28ae173EE5CafEa60cA44C335fecB" contractAddress: "0x223c067F8CF28ae173EE5CafEa60cA44C335fecB"
@ -75,8 +103,8 @@ Here are some example queries:
) { ) {
value value
} }
} }
``` ```
## Generate Watchers ## Generate Watchers

View File

@ -3,6 +3,6 @@
"packages/*" "packages/*"
], ],
"useWorkspaces": true, "useWorkspaces": true,
"version": "0.1.8", "version": "0.1.9",
"npmClient": "yarn" "npmClient": "yarn"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/azimuth-watcher", "name": "@cerc-io/azimuth-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "azimuth-watcher", "description": "azimuth-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/censures-watcher", "name": "@cerc-io/censures-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "censures-watcher", "description": "censures-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/claims-watcher", "name": "@cerc-io/claims-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "claims-watcher", "description": "claims-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/conditional-star-release-watcher", "name": "@cerc-io/conditional-star-release-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "conditional-star-release-watcher", "description": "conditional-star-release-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/delegated-sending-watcher", "name": "@cerc-io/delegated-sending-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "delegated-sending-watcher", "description": "delegated-sending-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/ecliptic-watcher", "name": "@cerc-io/ecliptic-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "ecliptic-watcher", "description": "ecliptic-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/gateway-server", "name": "@cerc-io/gateway-server",
"version": "0.1.8", "version": "0.1.9",
"main": "index.js", "main": "index.js",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true, "private": true,

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/linear-star-release-watcher", "name": "@cerc-io/linear-star-release-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "linear-star-release-watcher", "description": "linear-star-release-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/polls-watcher", "name": "@cerc-io/polls-watcher",
"version": "0.1.8", "version": "0.1.9",
"description": "polls-watcher", "description": "polls-watcher",
"private": true, "private": true,
"main": "dist/index.js", "main": "dist/index.js",