- Part-1 : Polygon-ID Core Concepts
- Part-2 : Creating and Issuance of Claims
- Part-3 : On chain verification by Verifier
-
Download the Polygon ID mobile app on the Google Play or Apple app store
-
Open the app and set a pin for security
-
Follow the Issue a Polygon ID claim doc to issue yourself a Credential.
-
Create a .env file in the root of this repo. Copy in .env.sample to add keys
touch .env
-
Install dependencies
npm i
-
Compile smart contracts
npx hardhat compile
-
Deploy smart contracts
npx hardhat run --network mumbai scripts/deploy.js
-
Update the
ERC20VerifierAddress
variable in scripts/set-request.js with your deployed contract address -
Run set-request to send the zk request to the smart contract
npx hardhat run --network mumbai scripts/set-request.js
- Successful tx means the age query has been set up: Check on PolygonScan.
-
Design a proof request: Query Based Requests
- Update the
contract_address
field to your deployed contract address
- Update the
-
Create a frontend with a QR code to the proof request. A user can scan the QR code from the Polygon ID app and trustlessly prove that they are old enough to claim the ERC20 token without revealing their actual date.