mirror of
https://github.com/anonklub/anonklub.github.io.git
synced 2026-01-09 19:07:54 -05:00
docs: add architecture details
This commit is contained in:
@@ -113,3 +113,49 @@ style valid fill:#67D6F9,stroke:#67D6F9,color:white
|
||||
|
||||
style ebd fill:white, stroke:white, color:#f9f9f9
|
||||
```
|
||||
|
||||
## [Query API](https://github.com/anonklub/anonklub/tree/main/query-api)
|
||||
|
||||
The query API is a [`NextJS`](https://nestjs.com) application that serves _anonsets_[^anonset] by integrating with several providers of indexed ethereum blockchain data.
|
||||
|
||||
### Data Providers
|
||||
|
||||
> See [queries](https://github.com/anonklub/anonklub/tree/main/queries)
|
||||
|
||||
- Google [`bigquery-public-data.crypto_ethereum`](https://console.cloud.google.com/marketplace/product/ethereum/crypto-ethereum-blockchain) is used to aggregate addresses that own at least a minimum amount of ETH.
|
||||
- [Dune](https://dune.com) is used to aggregate addresses that:
|
||||
- deposited into the Ethereum Beacon contract.
|
||||
- own an NFT of a given collection.
|
||||
- own a minimum amount of an ERC20.
|
||||
- [The Graph](thegraph.com) is used to aggregate addresses that voted on a given ENS proposal
|
||||
|
||||
### [API](./apis?id=query)
|
||||
|
||||
## [Web Application](https://github.com/anonklub/anonklub/tree/main/ui)
|
||||
|
||||
The web application is a [NextJS]() application made of:
|
||||
|
||||
- a client ([anonklub.xyz](https://anonklub.xyz)) provides users with a graphical interface to fetch _anonsets_[^anonset] by integrating with the [query API](#query-api), and to generate anonymous ethereum membership proofs from it after signing a message. Upon successful verification, a binary file result can be downloaded.
|
||||
|
||||
- a POST `/api/verify` endpoint that accepts a binary proof file and responds with a boolean verification result.
|
||||
|
||||
### [Dependencies](https://github.com/anonklub/anonklub/tree/main/packages)
|
||||
|
||||
> Applies to the spartan version of the application
|
||||
|
||||
The [circuits](./circuits-design?id=spartan-ecdsa) are initially rust crates[^crates], from which we generate webassembly with [`wasm-pack`](https://rustwasm.github.io/docs/wasm-pack) in order to integrate them in our web browser UI.\
|
||||
The generated wasm npm packages[^npm-wasm], are wrapped in worker packages[^npm-worker] for convenience.
|
||||
|
||||
## [Discord Bot](https://github.com/anonklub/anonklub/tree/main/discord-bot)
|
||||
|
||||
A discord bot allows users to use a custom `/verify` command that will:
|
||||
|
||||
1. Open a private channel with the user.
|
||||
2. Wait for the user to upload a binary proof file previously generated with the web client application.
|
||||
3. Forward that binary file to the `/api/verify` endpoint of the web application.
|
||||
4. Grant the user with a `verified` role upon successful verification.
|
||||
|
||||
[^anonset]: Anonymity Set, a list of ethereum addresses matching a given set of criterias that can be aggregated by querying onchain public data.\
|
||||
[^crates]: [merkle-tree-wasm](https://github.com/anonklub/anonklub/tree/main/pkgs/merkle-tree-wasm), [spartan-ecdsa-wasm](https://github.com/anonklub/anonklub/tree/main/pkgs/spartan-ecdsa-wasm)\
|
||||
[^npm-wasm]: [@anonklub/merkle-tree-wasm](https://www.npmjs.com/package/@anonklub/merkle-tree-wasm), [@anonklub/spartan-ecdsa-wasm](https://www.npmjs.com/package/@anonklub/spartan-ecdsa-wasm)\
|
||||
[^npm-worker]: [@anonklub/merkle-tree-worker](https://www.npmjs.com/package/@anonklub/merkle-tree-worker), [@anonklub/spartan-ecdsa-worker](https://www.npmjs.com/package/@anonklub/spartan-ecdsa-worker)
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
<script
|
||||
src="//unpkg.com/docsify-mermaid@2.0.1/dist/docsify-mermaid.js"
|
||||
></script>
|
||||
<script
|
||||
src="//cdn.jsdelivr.net/npm/@sy-records/docsify-footnotes/lib/index.min.js"
|
||||
></script>
|
||||
<style>
|
||||
body {
|
||||
color: #f9f9f9;
|
||||
|
||||
Reference in New Issue
Block a user