diff --git a/README.md b/README.md index 18b2d25..64eba30 100644 --- a/README.md +++ b/README.md @@ -2,81 +2,109 @@ 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 ## Usage -Here are some example queries: +* Query public keys for a point: -``` -{ - azimuthIsActive( - blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" - contractAddress: "0x223c067F8CF28ae173EE5CafEa60cA44C335fecB" - _point: 1 - ) { - value + ```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( + blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" + contractAddress: "0x223c067F8CF28ae173EE5CafEa60cA44C335fecB" + _point: 1 + ) { + value + } + censuresGetCensuredByCount( + blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" + contractAddress: "0x325f68d32BdEe6Ed86E7235ff2480e2A433D6189" + _who: 6054 + ) { + value + } + claimsFindClaim( + blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" + contractAddress: "0xe7e7f69b34D7d9Bd8d61Fb22C33b22708947971A" + _whose: 1967913144 + _protocol: "text" + _claim: "Shrek is NOT Drek!" + ) { + value + } + linearStarReleaseVerifyBalance( + blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" + contractAddress: "0x86cd9cd0992F04231751E3761De45cEceA5d1801" + _participant: "0xbD396c580d868FBbE4a115DD667E756079880801" + ) { + value + } + conditionalStarReleaseWithdrawLimit( + blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" + contractAddress: "0x8C241098C3D3498Fe1261421633FD57986D74AeA" + _participant: "0x7F0584938E649061e80e45cF88E6d8dDDb22f2aB" + _batch: 2 + ) { + value + } + pollsGetUpgradeProposalCount( + blockHash: "0xeaf611fabbe604932d36b97c89955c091e9582e292b741ebf144962b9ff5c271" + contractAddress: "0x7fEcaB617c868Bb5996d99D95200D2Fa708218e4" + ) { + value + } + eclipticBalanceOf( + blockHash: "0x5e82abbe6474caf7b5325022db1d1287ce352488b303685493289770484f54f4" + contractAddress: "0x33EeCbf908478C10614626A9D304bfe18B78DD73" + _owner: "0x4b5E239C1bbb98d44ea23BC9f8eC7584F54096E8" + ) { + value + } + delegatedSendingCanSend( + blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" + contractAddress: "0xf6b461fE1aD4bd2ce25B23Fe0aff2ac19B3dFA76" + _as: 1 + _point: 1 + ) { + value + } } - censuresGetCensuredByCount( - blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" - contractAddress: "0x325f68d32BdEe6Ed86E7235ff2480e2A433D6189" - _who: 6054 - ) { - value - } - claimsFindClaim( - blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" - contractAddress: "0xe7e7f69b34D7d9Bd8d61Fb22C33b22708947971A" - _whose: 1967913144 - _protocol: "text" - _claim: "Shrek is NOT Drek!" - ) { - value - } - linearStarReleaseVerifyBalance( - blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" - contractAddress: "0x86cd9cd0992F04231751E3761De45cEceA5d1801" - _participant: "0xbD396c580d868FBbE4a115DD667E756079880801" - ) { - value - } - conditionalStarReleaseWithdrawLimit( - blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" - contractAddress: "0x8C241098C3D3498Fe1261421633FD57986D74AeA" - _participant: "0x7F0584938E649061e80e45cF88E6d8dDDb22f2aB" - _batch: 2 - ) { - value - } - pollsGetUpgradeProposalCount( - blockHash: "0xeaf611fabbe604932d36b97c89955c091e9582e292b741ebf144962b9ff5c271" - contractAddress: "0x7fEcaB617c868Bb5996d99D95200D2Fa708218e4" - ) { - value - } - eclipticBalanceOf( - blockHash: "0x5e82abbe6474caf7b5325022db1d1287ce352488b303685493289770484f54f4" - contractAddress: "0x33EeCbf908478C10614626A9D304bfe18B78DD73" - _owner: "0x4b5E239C1bbb98d44ea23BC9f8eC7584F54096E8" - ) { - value - } - delegatedSendingCanSend( - blockHash: "0x2461e78f075e618173c524b5ab4309111001517bb50cfd1b3505aed5433cf5f9" - contractAddress: "0xf6b461fE1aD4bd2ce25B23Fe0aff2ac19B3dFA76" - _as: 1 - _point: 1 - ) { - value - } -} -``` + ``` ## Generate Watchers diff --git a/lerna.json b/lerna.json index a512d11..d9a660c 100644 --- a/lerna.json +++ b/lerna.json @@ -3,6 +3,6 @@ "packages/*" ], "useWorkspaces": true, - "version": "0.1.8", + "version": "0.1.9", "npmClient": "yarn" } diff --git a/packages/azimuth-watcher/package.json b/packages/azimuth-watcher/package.json index 9f88591..bb34df7 100644 --- a/packages/azimuth-watcher/package.json +++ b/packages/azimuth-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/azimuth-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "azimuth-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/censures-watcher/package.json b/packages/censures-watcher/package.json index 4271407..cb24c46 100644 --- a/packages/censures-watcher/package.json +++ b/packages/censures-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/censures-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "censures-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/claims-watcher/package.json b/packages/claims-watcher/package.json index 1692887..ca53830 100644 --- a/packages/claims-watcher/package.json +++ b/packages/claims-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/claims-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "claims-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/conditional-star-release-watcher/package.json b/packages/conditional-star-release-watcher/package.json index 2bddae2..b4a239f 100644 --- a/packages/conditional-star-release-watcher/package.json +++ b/packages/conditional-star-release-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/conditional-star-release-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "conditional-star-release-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/delegated-sending-watcher/package.json b/packages/delegated-sending-watcher/package.json index ca10da2..1be32f1 100644 --- a/packages/delegated-sending-watcher/package.json +++ b/packages/delegated-sending-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/delegated-sending-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "delegated-sending-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/ecliptic-watcher/package.json b/packages/ecliptic-watcher/package.json index 09462b9..8dfd4d3 100644 --- a/packages/ecliptic-watcher/package.json +++ b/packages/ecliptic-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/ecliptic-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "ecliptic-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/gateway-server/package.json b/packages/gateway-server/package.json index d80841c..474f009 100644 --- a/packages/gateway-server/package.json +++ b/packages/gateway-server/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/gateway-server", - "version": "0.1.8", + "version": "0.1.9", "main": "index.js", "license": "AGPL-3.0", "private": true, diff --git a/packages/linear-star-release-watcher/package.json b/packages/linear-star-release-watcher/package.json index c9909ba..eff7b7c 100644 --- a/packages/linear-star-release-watcher/package.json +++ b/packages/linear-star-release-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/linear-star-release-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "linear-star-release-watcher", "private": true, "main": "dist/index.js", diff --git a/packages/polls-watcher/package.json b/packages/polls-watcher/package.json index f38e02b..9d62877 100644 --- a/packages/polls-watcher/package.json +++ b/packages/polls-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/polls-watcher", - "version": "0.1.8", + "version": "0.1.9", "description": "polls-watcher", "private": true, "main": "dist/index.js",