This repo inherits the package receptor-standardvc-sc and use VCVerifierBase abstract contract and implements it
- Require NodeJS version 20+
nvm install 20nvm use 20node -v
- Require Solidity compiler version 0.8.22
- Use
npm ito install the dependencies.
Ensure your project is configured to access GitHub Packages via authentication using a valid GitHub token. This can be done by exporting GITHUB_TOKEN or adding it in .npmrc file in your project directory.
- Use
npm run compilecommand
This script is used by verifier to deploy there own verifier contract:
Steps :-
-
Use node version 20 and make sure you have install the dependencies using
npm iand compile contracts usingnpx hardhat compile -
Have .env file in root level containing same variables as in .env.sample file and assign value to the variable
PRIVATE_KEYbe the private key of verifier who want to deploy the contract and also ensure that this priavte key account have funds and permission in testnet -
Now you can run the command:
npx hardhat run scripts/deploy.tsThis script is used by user to verify the OptimaV1Credential issued by IDP in verifier contract:
Steps :-
-
Use node version 20 and make sure you have install the dependencies using
npm iand compile contracts usingnpx hardhat compile -
Have .env file in root level containing same variables as in .env.sample file and assign value to the variable
PRIVATE_KEYbe the private key of user who want to verify the credential in verifier contract and also ensure that this priavte key account have funds and permission in testnet -
Add Verifier contract address for which you want to verify to variable
avererVerifierContractAddressin scriptverifyCredential.tsand also add theOptimaV1Credentialcredential issued by IDP to variableverifierCredentialin scriptverifyCredential.ts -
Now you can run the command:
npx hardhat run scripts/verifyCredential.ts