Alias keys in response

This commit is contained in:
Prathamesh Musale 2025-06-02 16:54:13 +05:30
parent 2d0b4c47a7
commit 66a12aa3fc

View File

@ -17,23 +17,9 @@ It is also hosted at <https://azimuth.dev.vdb.to/graphql>
```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
-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
# contractAddress: Azimuth contract address
# blockHash: block hash at which you want to query the contract state
@ -43,27 +29,20 @@ It is also hosted at <https://azimuth.dev.vdb.to/graphql>
# "data": {
# "azimuthGetKeys": {
# "value": {
# "value0": "0xc248f759474b16192bd8bdca0bff1b8bff555cd3d118022095331d6d98690c6d",
# "value1": "0x21188bac08542730e1c4697636d6fa25968f404470ccf917756f05e28c69045a",
# "value2": "1",
# "value3": "1"
# "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
* Response:
* `value0`: encryptionKey
* `value1`: authenticationKey
* `value2`: cryptoSuiteVersion
* `value3`: keyRevisionNumber
* Example GQL queries:
```gql