Add an example to query keys for a point
This commit is contained in:
parent
53be2a87c4
commit
2d0b4c47a7
60
README.md
60
README.md
@ -2,19 +2,71 @@
|
||||
|
||||
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:
|
||||
|
||||
- [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
|
||||
|
||||
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 {
|
||||
value0
|
||||
value1
|
||||
value2
|
||||
value3
|
||||
}
|
||||
}
|
||||
}"
|
||||
}' | jq
|
||||
|
||||
# contractAddress: Azimuth contract address
|
||||
# blockHash: block hash at which you want to query the contract state
|
||||
|
||||
# Response
|
||||
# {
|
||||
# "data": {
|
||||
# "azimuthGetKeys": {
|
||||
# "value": {
|
||||
# "value0": "0xc248f759474b16192bd8bdca0bff1b8bff555cd3d118022095331d6d98690c6d",
|
||||
# "value1": "0x21188bac08542730e1c4697636d6fa25968f404470ccf917756f05e28c69045a",
|
||||
# "value2": "1",
|
||||
# "value3": "1"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
```
|
||||
|
||||
* API params:
|
||||
* `contractAddress`: Azimuth contract address
|
||||
* `blockHash`: block hash at which you want to query the contract state
|
||||
|
||||
* Response:
|
||||
* `value0`: encryptionKey
|
||||
* `value1`: authenticationKey
|
||||
* `value2`: cryptoSuiteVersion
|
||||
* `value3`: keyRevisionNumber
|
||||
|
||||
* Example GQL queries:
|
||||
|
||||
```gql
|
||||
{
|
||||
azimuthIsActive(
|
||||
blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9"
|
||||
|
Loading…
Reference in New Issue
Block a user