The Sismo Hub is the repository for integrations on Sismo:
- Create your Badge (define the group of eligible accounts, define Badge metadata and picture)
- Create your integration flows directly in Sismo app (define the minting process in sismo app)
This repository offers a local environment of the entire Sismo stack so you can test your integration before opening a PR:
- Sismo app on local
- Sismo Badge metadata local server
- Protocol deployed on local chain
Once you have tested your integration on local, you can open a PR to add your badge to the rinkeby testnet, polygon-playground or polygon environment!
A tutorial is available on how to use this repo to create your ZK Badge.
The Sismo Hub is powered by an off-chain infrastructure which:
- Manages Badges metadata
- Manages Groups: The infrastructure periodically generates off-chain Groups that aim to be reusable and sent on-chain for attesters like the HydraS1SimpleAttester. A Group of accounts bundles accounts that share some reputational or historical characteristics. Anyone can propose a new group to Sismo.
- Creates Badges from a Group: The infrastructure will send the groups on-chain to the right attester so your generated group becomes the eligible group for a specific badge.
The Sismo Hub aims at offering to developers a coding experience in a local environment that is as closed as possible to a testing and production environment. This aims at reducing the friction between learning in a safe local environment and deploying a working product for your users.
Here is the three folders you want to look at for contributing:
-
group-generators/
: it contains all the Group Generators used to quickly generate specific groups with well-known providers like Subgraph, Snapshot or Lens. The providers used by Group Generators can be found here. -
attestation-collections/
: it contains all the logic for computing the Groups previously generated in order to send on the blockchain the merkle root of those groups. By doing this, you make your groups available to attesters. Your users are now able to mint a badge and receive an attestation. -
flows/
: A flow is all the data associated with the minting experience of a badge, it contains the frontend path, the blockchain network (local, testnet, polygon), the attester used, the badge used etc. You can see the polygon flows here.
You can learn how to create a ZK badge in 15 minutes with this tutorial. After this tutorial, you will be able to submit a PR in order to see your customized minting flow lived on playground.sismo.io.
yarn
docker compose up
yarn generate-group local-group
Add your address to the group
yarn generate-group local-group --additional-data 0x123...def
yarn send-to-attester hydra-s1-local
yarn api:watch
Mint on your local frontend : http://localhost:3000/
In a first terminal, launch the dynamo DB infrastructure in local
docker compose -f docker-compose.test.yaml up
In a second terminal, launch the tests with jest
yarn test
Distributed under the MIT License.
Please, feel free to open issues, PRs or simply provide feedback!