diff --git a/.github/workflows/deployment_new_aws_account.yml b/.github/workflows/deployment_new_aws_account.yml index d30a3ddd..9b8fa4c3 100644 --- a/.github/workflows/deployment_new_aws_account.yml +++ b/.github/workflows/deployment_new_aws_account.yml @@ -10,7 +10,6 @@ env: AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }} ECR_REPOSITORY: devs-ecr ECS_SERVICE: devs-ecs-service - ECS_CLUSTER: jobs: deploy_prod: diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec1..00000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 36af2198..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx lint-staged diff --git a/docs/faqs/content/issuer-node-error-creating-identity-while-publishing-state-to-rhs.md b/docs/faqs/content/issuer-node-error-creating-identity-while-publishing-state-to-rhs.md index d56e1904..8514ff63 100644 --- a/docs/faqs/content/issuer-node-error-creating-identity-while-publishing-state-to-rhs.md +++ b/docs/faqs/content/issuer-node-error-creating-identity-while-publishing-state-to-rhs.md @@ -14,7 +14,7 @@ keywords: ## Question -Why do I encounter an error stating "unexpected status code: 404" when trying to create an identity, specifically while publishing the state to the Reverse Hash Service? +Why do I encounter an error stating "unexpected status code: 404" when trying to create an identity, specifically while publishing the state to the RHS? ## Answer @@ -22,10 +22,9 @@ The error you're experiencing is typically due to an incorrect configuration of To resolve this issue, check your `.env-issuer` file for the `ISSUER_CREDENTIAL_STATUS_RHS_MODE` value. If it is set to `OffChain`, you must specify a valid Reverse Hash Service Endpoint in `ISSUER_CREDENTIAL_STATUS_RHS_URL`. For example, you could use our staging RHS: `https://rhs-staging.polygonid.me/`. -If your `ISSUER_CREDENTIAL_STATUS_RHS_MODE` is configured for on-chain operation, ensure you have the correct smart contract information for your network, such as Mumbai: - -- `ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT`=0x76EB7216F2400aC18C842D8C76739F3B8E619DB9 -- `ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID`=8001 +If your `ISSUER_CREDENTIAL_STATUS_RHS_MODE` is configured for on-chain operation, ensure you have the correct smart contract information for your network, such as Amoy: +- `ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT`=0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb +- `ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID`=80002 Choosing `ISSUER_CREDENTIAL_STATUS_RHS_URL=None` indicates that the issuer node will handle revocation credential status resolution internally, and no further RHS setup is required. @@ -35,5 +34,4 @@ For a comprehensive understanding and configuration guidance, please review the Wrong answer: Simply replace the RHS URL with the Issuer Node URL or remove the `ISSUER_CREDENTIAL_STATUS_RHS_URL` from your .env-issuer file without adjusting the `ISSUER_CREDENTIAL_STATUS_RHS_MODE` setting or ensuring the RHS endpoint's validity. - diff --git a/docs/faqs/content/issuer-node-error-no-identity-by-did-no-rows-in-result-set.md b/docs/faqs/content/issuer-node-error-no-identity-by-did-no-rows-in-result-set.md index 3a2fb50c..32d20dc1 100644 --- a/docs/faqs/content/issuer-node-error-no-identity-by-did-no-rows-in-result-set.md +++ b/docs/faqs/content/issuer-node-error-no-identity-by-did-no-rows-in-result-set.md @@ -15,8 +15,8 @@ keywords: What steps should I take if an error message says there's no identity found for a given DID? ```bash -time=2023-11-27T12:29:51.334Z level=ERROR msg="error getting identity by DID" err="no rows in result set" did=did:polygonid:polygon:mumbai:2qHm5f6GZsJdLxpmGNCnn6TckCJWzhGmUUWebpFy5c -time=2023-11-27T12:29:51.334Z level=ERROR msg="issuer DID must exist" did="{Method:polygonid ID:polygon:mumbai:2qHm5f6GZsJdLxpmGNCnn6TckCJWzhGmUUWebpFy5c IDStrings:[polygon mumbai 2qHm5f6GZsJdLxpmGNCnn6TckCJWzhGmUUWebpFy5c] Params:[] Path: PathSegments:[] Query: Fragment:}" +time=2023-11-27T12:29:51.334Z level=ERROR msg="error getting identity by DID" err="no rows in result set" did=did:polygonid:polygon:amoy:2qHm5f6GZsJdLxpmGNCnn6TckCJWzhGmUUWebpFy5c +time=2023-11-27T12:29:51.334Z level=ERROR msg="issuer DID must exist" did="{Method:polygonid ID:polygon:amoy:2qHm5f6GZsJdLxpmGNCnn6TckCJWzhGmUUWebpFy5c IDStrings:[polygon amoy 2qHm5f6GZsJdLxpmGNCnn6TckCJWzhGmUUWebpFy5c] Params:[] Path: PathSegments:[] Query: Fragment:}" ``` ## Answer diff --git a/docs/faqs/content/issuer-node-how-to-use-issuer-node-on-mainnet.md b/docs/faqs/content/issuer-node-how-to-use-issuer-node-on-mainnet.md index c792954e..b0858091 100644 --- a/docs/faqs/content/issuer-node-how-to-use-issuer-node-on-mainnet.md +++ b/docs/faqs/content/issuer-node-how-to-use-issuer-node-on-mainnet.md @@ -16,7 +16,7 @@ How can I configure and use the Issuer Node on the Polygon mainnet? ## Answer -The Issuer Node is designed to operate on EVM-compatible networks, supporting both testnets and mainnet environments. It comes pre-configured for use on the Polygon/Mumbai networks, with contracts readily available for those networks. For deployment on other blockchains, you will need to manually deploy the necessary contracts. +The Issuer Node is designed to operate on EVM-compatible networks, supporting both testnets and mainnet environments. It comes pre-configured for use on the Polygon/Amoy networks, with contracts readily available for those networks. For deployment on other blockchains, you will need to manually deploy the necessary contracts. To configure the Issuer Node for mainnet operation, adjust the following environment variables within your `.env-issuer` file: diff --git a/docs/faqs/content/issuer-node-reusing-issuer-did.md b/docs/faqs/content/issuer-node-reusing-issuer-did.md index 02233582..66520769 100644 --- a/docs/faqs/content/issuer-node-reusing-issuer-did.md +++ b/docs/faqs/content/issuer-node-reusing-issuer-did.md @@ -22,5 +22,4 @@ If you **have not deleted the database** and wish to reuse a previously configur Wrong answer: If you want to reuse a previously used DID, it's sufficient to manually edit the database entries to reflect the old DID, bypassing the need to update environment files or restart any services. This direct database manipulation ensures immediate reuse of the DID without considering system synchronization or security implications. - diff --git a/docs/faqs/content/verifier-credential-verification-cross-environment.md b/docs/faqs/content/verifier-credential-verification-cross-environment.md index 415564e1..3d4a49d4 100644 --- a/docs/faqs/content/verifier-credential-verification-cross-environment.md +++ b/docs/faqs/content/verifier-credential-verification-cross-environment.md @@ -23,7 +23,7 @@ Yes, credentials issued in any environment—on-chain or off-chain—can be veri Regarding cross-chain verification, while a universal, out-of-the-box solution for state validation across chains does not yet exist, leveraging existing bridging technologies offers a viable pathway. These technologies facilitate the transfer of issuer identity states and GIST roots between networks, enabling credentials issued on one blockchain to be verified on another. This approach significantly enhances the interoperability and flexibility of the credential verification process, making it possible to verify credentials across different blockchain ecosystems. -Additionally, off-chain cross verification is also supported. At the SDK level, it is possible to configure connections to any EVM-based blockchain RPC and implement a custom wallet. Within the Polygon ID app, both Polygon mainnet and Mumbai testnet networks are directly supported, allowing for versatile off-chain verification configurations that accommodate various blockchain environments. +Additionally, off-chain cross verification is also supported. At the SDK level, it is possible to configure connections to any EVM-based blockchain RPC and implement a custom wallet. Within the Polygon ID app, both Polygon mainnet and Amoy testnet networks are directly supported, allowing for versatile off-chain verification configurations that accommodate various blockchain environments. The capability for cross-environment and cross-chain verification greatly expands the utility of digital credentials. It encourages a more interconnected and adaptable framework for the issuance and verification of credentials, supporting a wide range of use cases and applications in a decentralized digital world. diff --git a/docs/issuer-node/install-gcm.md b/docs/issuer-node/install-gcm.md index d2bb5415..6bf33054 100644 --- a/docs/issuer-node/install-gcm.md +++ b/docs/issuer-node/install-gcm.md @@ -23,7 +23,7 @@ To install the issuer node through the [Google Cloud Marketplace](https://consol :::note -In the following examples, you will see a checkbox labeled "Issuer Network Main Net". If this checkbox is selected, the issuer node will be configured for the **Polygon Main network**, and in the Ethereum URL field, you should enter the RPC URL for that network. If you do not select this checkbox, the issuer node will be deployed on the Mumbai network, and the Ethereum URL field should contain the RPC URL for the **Polygon Mumbai network**. +In the following examples, you will see a checkbox labeled "Issuer Network Main Net". If this checkbox is selected, the issuer node will be configured for the **Polygon Main network**, and in the Ethereum URL field, you should enter the RPC URL for that network. If you do not select this checkbox, the issuer node will be deployed on the Amoy network, and the Ethereum URL field should contain the RPC URL for the **Polygon Amoy network**. ::: diff --git a/docs/issuer-node/install-kubernetes.md b/docs/issuer-node/install-kubernetes.md index 925d5282..352135ea 100644 --- a/docs/issuer-node/install-kubernetes.md +++ b/docs/issuer-node/install-kubernetes.md @@ -65,7 +65,7 @@ export ISSUERNAME="My Issuer" export ISSUER_ETHERUM_URL="https://polygon-network.XXXX" export INGRESS_ENABLED=true export VAULT_PWD=password -export RHS_MODE=None +export RHS_MODE=None export RHS_URL="https://reverse-hash-service.com" ``` @@ -142,7 +142,7 @@ export ISSUERNAME="My Issuer" export ISSUER_ETHERUM_URL="https://polygon-network.XXXX" export INGRESS_ENABLED=false export VAULT_PWD=password -export RHS_MODE=None +export RHS_MODE=None export RHS_URL="https://reverse-hash-service.com" ``` diff --git a/docs/issuer-node/issue-credential-cli.md b/docs/issuer-node/issue-credential-cli.md index 2797076b..6227ac8b 100644 --- a/docs/issuer-node/issue-credential-cli.md +++ b/docs/issuer-node/issue-credential-cli.md @@ -42,12 +42,12 @@ curl --location 'http://localhost:3001/v1/identities' \ "didMetadata":{ "method": "polygonid", "blockchain":"polygon", - "network": "mumbai" + "network": "amoy" } }'; # Expected Output: -# {"identifier":"did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","state":{"claimsTreeRoot":"eb3d346d16f849b3cc2be69bfc58091dfaf6d90574be26bb40222aea67e08505","createdAt":"2023-03-22T22:49:02.782896Z","modifiedAt":"2023-03-22T22:49:02.782896Z","state":"b25cf54e7e648a263658416194c41ef6ae2dec101c50dfb2febc5e96eaa87110","status":"confirmed"}} +# {"identifier":"did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","state":{"claimsTreeRoot":"eb3d346d16f849b3cc2be69bfc58091dfaf6d90574be26bb40222aea67e08505","createdAt":"2023-03-22T22:49:02.782896Z","modifiedAt":"2023-03-22T22:49:02.782896Z","state":"b25cf54e7e648a263658416194c41ef6ae2dec101c50dfb2febc5e96eaa87110","status":"confirmed"}} ``` ### (Optional) View Existing DIDs (connections) @@ -72,12 +72,12 @@ curl --location --request GET 'http://localhost:3001/v1/identities' \ "did_metadata":{ "method": "polygonid", "blockchain":"polygon", - "network": "mumbai" + "network": "amoy" } }'; # Expected Output (Results may vary based on number of DIDs created): -# ["did:polygonid:polygon:mumbai:2qMd3PtcVbzDNQZBiSDctaigbQtYW9KTqrLFoUm4Ur","did:polygonid:polygon:mumbai:2qMeNWv9xSSvWyBpn5tDojzQ8sga4VtrfuAkV65zQa","did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","did:polygonid:polygon:mumbai:2qLR2qA22RemPeQDsQwdrrMU3SM9CNLnRBhmQtzo5v","did:polygonid:polygon:mumbai:2qHYtws8GQN3RniHLjPf5GuZUZtcD37o1MUgUmw287"] +# ["did:polygonid:polygon:amoy:2qMd3PtcVbzDNQZBiSDctaigbQtYW9KTqrLFoUm4Ur","did:polygonid:polygon:amoy:2qMeNWv9xSSvWyBpn5tDojzQ8sga4VtrfuAkV65zQa","did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","did:polygonid:polygon:amoy:2qLR2qA22RemPeQDsQwdrrMU3SM9CNLnRBhmQtzo5v","did:polygonid:polygon:amoy:2qHYtws8GQN3RniHLjPf5GuZUZtcD37o1MUgUmw287"] ``` ### Creating Credentials @@ -103,14 +103,14 @@ The issuer node DID can be retrieved by looking at `.env-api` for `ISSUER_API_UI ::: ```bash -curl --location 'http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims' \ +curl --location 'http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims' \ --header 'Authorization: Basic dXNlci1pc3N1ZXI6cGFzc3dvcmQtaXNzdWVy' \ --header 'Content-Type: application/json' \ --data '{ "credentialSchema":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json", "type": "KYCAgeCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq", + "id": "did:polygonid:polygon:amoy:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq", "birthday": 19960424, "documentType": 2 } @@ -133,11 +133,11 @@ You can always check the created credentials on the Issuer Node UI. Using the previously generated credential ID from [Creating Credentials](#creating-credentials). ```bash -curl --location --request GET 'http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005' \ +curl --location --request GET 'http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005' \ --header 'Authorization: Basic dXNlci1pc3N1ZXI6cGFzc3dvcmQtaXNzdWVy'; # Expected Output: -# {"@context":["https://www.w3.org/2018/credentials/v1","https://schema.iden3.io/core/jsonld/iden3proofs.jsonld","https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld"],"credentialSchema":{"id":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json","type":"JsonSchemaValidator2018"},"credentialStatus":{"id":"https://unique-forwaring-or-public-url.ngrok-free.app/v1/did%3Apolygonid%3Apolygon%3Amumbai%3A2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahUQ/claims/revocation/status/2512063162","revocationNonce":2512063162,"type":"SparseMerkleTreeProof"},"credentialSubject":{"birthday":19960424,"documentType":2,"id":"did:polygonid:polygon:mumbai:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq","type":"KYCAgeCredential"},"id":"http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005","issuanceDate":"2023-04-19T11:16:56.433871253Z","issuer":"did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","proof":[{"type":"BJJSignature2021","issuerData":{"id":"did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","state":{"claimsTreeRoot":"78b7651adb5d063553f7fdc11d279a3e307880aef6dec2b347abf0df53a11d27","value":".... +# {"@context":["https://www.w3.org/2018/credentials/v1","https://schema.iden3.io/core/jsonld/iden3proofs.jsonld","https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld"],"credentialSchema":{"id":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json","type":"JsonSchemaValidator2018"},"credentialStatus":{"id":"https://unique-forwaring-or-public-url.ngrok-free.app/v1/did%3Apolygonid%3Apolygon%3Aamoy%3A2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahUQ/claims/revocation/status/2512063162","revocationNonce":2512063162,"type":"SparseMerkleTreeProof"},"credentialSubject":{"birthday":19960424,"documentType":2,"id":"did:polygonid:polygon:amoy:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq","type":"KYCAgeCredential"},"id":"http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005","issuanceDate":"2023-04-19T11:16:56.433871253Z","issuer":"did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","proof":[{"type":"BJJSignature2021","issuerData":{"id":"did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","state":{"claimsTreeRoot":"78b7651adb5d063553f7fdc11d279a3e307880aef6dec2b347abf0df53a11d27","value":".... ``` ### Issuing Credential To Polygon ID Wallet User @@ -155,11 +155,11 @@ To learn how to issue credentials to a Polygon ID Wallet User, please refer to t In order to get the credential on the Polygon ID App, the credential QR Code payload is needed. ```bash -curl --location 'http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005/qrcode' \ +curl --location 'http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005/qrcode' \ --header 'Authorization: Basic dXNlci1pc3N1ZXI6cGFzc3dvcmQtaXNzdWVy'; # Expected Output: -# {"body":{"credentials":[{"description":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCAgeCredential","id":"b1eab5be-dea3-11ed-8f7d-0242ac1e0005"}],"url":"http://localhost:3001/v1/agent"},"from":"did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","id":"c01b66f1-d10b-4591-9dd6-8a94db1c112a","thid":"c01b66f1-d10b-4591-9dd6-8a94db1c112a","to":"did:polygonid:polygon:mumbai:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq","typ":"application/iden3comm-plain-json","type":"https://iden3-communication.io/credentials/1.0/offer"} +# {"body":{"credentials":[{"description":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCAgeCredential","id":"b1eab5be-dea3-11ed-8f7d-0242ac1e0005"}],"url":"http://localhost:3001/v1/agent"},"from":"did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE","id":"c01b66f1-d10b-4591-9dd6-8a94db1c112a","thid":"c01b66f1-d10b-4591-9dd6-8a94db1c112a","to":"did:polygonid:polygon:amoy:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq","typ":"application/iden3comm-plain-json","type":"https://iden3-communication.io/credentials/1.0/offer"} ``` Take this JSON data, copy, and paste into [https://qr.io](https://qr.io). @@ -170,7 +170,7 @@ With the Polygon ID app, open it up and scan the QR code. !["Polygon ID App Adding Credential"](/img/polygonid-app-claim.png) -### Verifying Credential + --- diff --git a/docs/issuer-node/issuer-node-api/agent/apis.md b/docs/issuer-node/issuer-node-api/agent/apis.md index e5062be6..f80857ae 100644 --- a/docs/issuer-node/issuer-node-api/agent/apis.md +++ b/docs/issuer-node/issuer-node-api/agent/apis.md @@ -45,7 +45,7 @@ A typical response looks like this: { "body": { "credential": { - "id": "https://ce98-2a0c-5a84-3403-bb00-e0d9-c19e-2ab1-2a2b.eu.ngrok.io/issuer/v1/did:polygonid:polygon:mumbai:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA/claims/ec81d686-a6e4-11ed-a1f4-debe37e1cbd5", + "id": "https://ce98-2a0c-5a84-3403-bb00-e0d9-c19e-2ab1-2a2b.eu.ngrok.io/issuer/v1/did:polygonid:polygon:amoy:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA/claims/ec81d686-a6e4-11ed-a1f4-debe37e1cbd5", "@context": [ "https://www.w3.org/2018/credentials/v1", "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/iden3credential-v2.json-ld", @@ -57,15 +57,15 @@ A typical response looks like this: "credentialSubject": { "birthday": 19960424, "documentType": 782222, - "id": "did:polygonid:polygon:mumbai:2qG9d1nUyeTVU63vU1gH3jcD6Y8z4ANPSdFdQHPY4t", + "id": "did:polygonid:polygon:amoy:2qG9d1nUyeTVU63vU1gH3jcD6Y8z4ANPSdFdQHPY4t", "type": "KYCAgeCredential" }, "credentialStatus": { - "id": "https://ce98-2a0c-5a84-3403-bb00-e0d9-c19e-2ab1-2a2b.eu.ngrok.io/issuer/v1/did%3Apolygonid%3Apolygon%3Amumbai%3A2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA/claims/revocation/status/4144415042", + "id": "https://ce98-2a0c-5a84-3403-bb00-e0d9-c19e-2ab1-2a2b.eu.ngrok.io/issuer/v1/did%3Apolygonid%3Apolygon%3Aamoy%3A2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA/claims/revocation/status/4144415042", "revocationNonce": 4144415042, "type": "SparseMerkleTreeProof" }, - "issuer": "did:polygonid:polygon:mumbai:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA", + "issuer": "did:polygonid:polygon:amoy:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA", "credentialSchema": { "id": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json", "type": "JsonSchemaValidator2018" @@ -74,7 +74,7 @@ A typical response looks like this: { "type": "BJJSignature2021", "issuerData": { - "id": "did:polygonid:polygon:mumbai:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA", + "id": "did:polygonid:polygon:amoy:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA", "state": { "claimsTreeRoot": "c244e9c4a42a1fb6aace041c08ecdc9532170194dd03ae99ffd5a035a4423f04", "value": "f92376a5ec15d599f877504d55a3c703d8e40aebb9e9e60802fc217a86693a02" @@ -85,7 +85,7 @@ A typical response looks like this: "siblings": [] }, "credentialStatus": { - "id": "https://ce98-2a0c-5a84-3403-bb00-e0d9-c19e-2ab1-2a2b.eu.ngrok.io/issuer/v1/did%3Apolygonid%3Apolygon%3Amumbai%3A2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA/claims/revocation/status/0", + "id": "https://ce98-2a0c-5a84-3403-bb00-e0d9-c19e-2ab1-2a2b.eu.ngrok.io/issuer/v1/did%3Apolygonid%3Apolygon%3Aamoy%3A2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA/claims/revocation/status/0", "revocationNonce": 0, "type": "SparseMerkleTreeProof" } @@ -96,10 +96,10 @@ A typical response looks like this: ] } }, - "from": "did:polygonid:polygon:mumbai:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA", + "from": "did:polygonid:polygon:amoy:2qDTZaJRKmLk9AiGkqwJePy2SWm1PtffGRF5CjTeZA", "id": "558984b4-b074-42a7-b60f-c2b5290d1a32", "threadID": "4ccb5b86-bf30-47a4-b7e1-e0e2e4edec8b", - "to": "did:polygonid:polygon:mumbai:2qG9d1nUyeTVU63vU1gH3jcD6Y8z4ANPSdFdQHPY4t", + "to": "did:polygonid:polygon:amoy:2qG9d1nUyeTVU63vU1gH3jcD6Y8z4ANPSdFdQHPY4t", "typ": "application/iden3comm-plain-json", "type": "https://iden3-communication.io/credentials/1.0/issuance-response" } diff --git a/docs/issuer-node/issuer-node-api/claim/apis.md b/docs/issuer-node/issuer-node-api/claim/apis.md index eed320f0..0244b003 100644 --- a/docs/issuer-node/issuer-node-api/claim/apis.md +++ b/docs/issuer-node/issuer-node-api/claim/apis.md @@ -101,7 +101,7 @@ You can retrieve a set of credentials based on different filters or criteria. Th - `schemaHash` _String_: hash of the schema. For example, c9b2370371b7fa8b3dab2a5ba81b6838. -- `subject` _String_: identifier of the Subject for which credentials are to be retrieved. For example, did:polygonid:polygon:mumbai:2qE1BZ7gcmEoP2KppvFPCZqyzyb5tK9T6Gec5HFANQ. +- `subject` _String_: identifier of the Subject for which credentials are to be retrieved. For example, did:polygonid:polygon:amoy:2qE1BZ7gcmEoP2KppvFPCZqyzyb5tK9T6Gec5HFANQ. - `revoked` _Boolean_: if the credential is revoked or not. It can be "true" or "false". diff --git a/docs/issuer-node/issuer-node-api/identity/apis.md b/docs/issuer-node/issuer-node-api/identity/apis.md index 0f95bb52..1446cb30 100644 --- a/docs/issuer-node/issuer-node-api/identity/apis.md +++ b/docs/issuer-node/issuer-node-api/identity/apis.md @@ -43,7 +43,7 @@ An example of a `didMetaData` passed in the request body of the `Create Identity "didMetadata":{ "method": "polygonid", "blockchain":"polygon", - "network": "mumbai", + "network": "amoy", "type": "BJJ" } } @@ -64,8 +64,7 @@ A few variations of the metadata can be: - network: - "main" - - "mumbai" - - "goerli" + - "amoy" - "unknown" - type: @@ -83,7 +82,7 @@ Read more about Identity types on [Iden3 Docs](https://docs.iden3.io/gettin The Issuer Node responds by sending a response message that contains: -- `identifier`: Identifier of the Issuer in the standard DID format. For example: `did:polygonid:polygon:mumbai:2qNBWSAsyvaGBpqQVHk3E4cgChaN6ogaZnYCQUyoRQ` +- `identifier`: Identifier of the Issuer in the standard DID format. For example: `did:polygonid:polygon:amoy:2qNBWSAsyvaGBpqQVHk3E4cgChaN6ogaZnYCQUyoRQ` - `identity state`: It is the state of the identity and contains fields that include `claimsTreeRoot` (Verifiable Credentials are added to the Claims Tree and its root is calculated), `state` (state of identity), and `status` (whether the status of the identity state is confirmed or pending). `identity state` also contains the timestamp when the identity was created (`createdAt`) or updated(`modifiedAt`). @@ -101,7 +100,7 @@ The Issuer Node responds by sending a response message that contains: - `identifier`: Identifier of the Issuer in the standard DID format. For example: -`did:polygonid:polygon:mumbai:2qNBWSAsyvaGBpqQVHk3E4cgChaN6ogaZnYCQUyoRQ` +`did:polygonid:polygon:amoy:2qNBWSAsyvaGBpqQVHk3E4cgChaN6ogaZnYCQUyoRQ` API Reference diff --git a/docs/issuer/features.md b/docs/issuer/features.md index 874d60c3..8ecf54ba 100644 --- a/docs/issuer/features.md +++ b/docs/issuer/features.md @@ -20,7 +20,7 @@ Currently available only on the [Issuer Node Core API](/docs/issuer/issuer-core. The representation of the DID for this case follows the same canonical form, where the identifier `2qCU58EJgrELSJT6EzT27Rw9DhvwamAdbMLpePztYq` actually originates from the Ethereum address: ``` -did:polygonid:polygon:mumbai:2qCU58EJgrELSJT6EzT27Rw9DhvwamAdbMLpePztYq +did:polygonid:polygon:amoy:2qCU58EJgrELSJT6EzT27Rw9DhvwamAdbMLpePztYq ``` :::note diff --git a/docs/issuer/issuer-configuration.md b/docs/issuer/issuer-configuration.md index ebf4e83e..2786b352 100644 --- a/docs/issuer/issuer-configuration.md +++ b/docs/issuer/issuer-configuration.md @@ -16,7 +16,11 @@ import TabItem from '@theme/TabItem'; # Advanced Issuer Node configuration -This guide will show you how to confgure your Issuer Node. +This guide will show you how to configure your Issuer Node. + +:::caution +*Polygon Mumbai testnet has been deprecated +::: ## Revocation Status @@ -85,20 +89,21 @@ ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID=80002 - + + ```bash -ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT=0x76EB7216F2400aC18C842D8C76739F3B8E619DB9 -ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID=80001 +ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT=0xbEeB6bB53504E8C872023451fd0D23BeF01d320B +ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID=137 ``` - + ```bash -ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT=0x80667fdB4CC6bBa3EDaE419f6BFBc129e78d2fC9 -ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID=137 +ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT=0x16A1ae4c460C0a42f0a87e69c526c61599B28BC9 +ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID=80001 ``` @@ -127,16 +132,6 @@ ISSUER_ETHEREUM_URL={Replace with a Polygon Amoy RPC} - - -```bash -ISSUER_ETHEREUM_CONTRACT_ADDRESS=0x134B1BE34911E39A8397ec6289782989729807a4 -ISSUER_ETHEREUM_RESOLVER_PREFIX=polygon:mumbai -ISSUER_ETHEREUM_URL={Replace with a Polygon Mumbai RPC} -``` - - - ```bash @@ -178,21 +173,22 @@ ISSUER_API_IDENTITY_METHOD={polygonid | custom method} - + + ```bash ISSUER_API_IDENTITY_BLOCKCHAIN=polygon -ISSUER_API_IDENTITY_NETWORK=mumbai +ISSUER_API_IDENTITY_NETWORK=main ISSUER_API_IDENTITY_METHOD={polygonid | custom method} ``` - + ```bash ISSUER_API_IDENTITY_BLOCKCHAIN=polygon -ISSUER_API_IDENTITY_NETWORK=main +ISSUER_API_IDENTITY_NETWORK=mumbai ISSUER_API_IDENTITY_METHOD={polygonid | custom method} ``` @@ -222,7 +218,7 @@ The Core API provides the `/v1/identities` endpoint in order to create an identi The property _type_ can have two possible values: - `BJJ`: BJJ keys based identity. -- `ETH`: Ethreum based identity. +- `ETH`: Ethereum based identity. Create Identity Payload example: @@ -241,14 +237,15 @@ Create Identity Payload example: - + + ```json { "didMetadata": { "method": "polygonid", "blockchain": "polygon", - "network": "mumbai", + "network": "main", "type": "BJJ" } } @@ -256,14 +253,15 @@ Create Identity Payload example: - + + ```json { "didMetadata": { "method": "polygonid", "blockchain": "polygon", - "network": "main", + "network": "mumbai", "type": "BJJ" } } diff --git a/docs/issuer/on-chain-issuer/on-chain-tutorial.md b/docs/issuer/on-chain-issuer/on-chain-tutorial.md index d097cc10..ed799225 100644 --- a/docs/issuer/on-chain-issuer/on-chain-tutorial.md +++ b/docs/issuer/on-chain-issuer/on-chain-tutorial.md @@ -61,9 +61,9 @@ There are two main components in this application: Deploy Identity Example contract: ```bash - export MUMBAI_PRIVATE_KEY={private_key} && \ - export MUMBAI_RPC_URL={rpc_url} && \ - npx hardhat run scripts/deployIdentityExample.ts --network mumbai + export AMOY_PRIVATE_KEY={private_key} && \ + export AMOY_RPC_URL={rpc_url} && \ + npx hardhat run scripts/deployIdentityExample.ts --network amoy ``` @@ -94,13 +94,14 @@ You can find more information on how to deploy a smart contract using Hardhat [< 1. Fill the .env config file with the proper variables: - + + ```bash - SUPPORTED_RPC="80001=" + SUPPORTED_RPC="80002=" ISSUERS_PRIVATE_KEY="=" EXTERNAL_HOST="" - SUPPORTED_STATE_CONTRACTS="80001=0x134B1BE34911E39A8397ec6289782989729807a4" + SUPPORTED_STATE_CONTRACTS="80002=0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124" ``` @@ -162,15 +163,21 @@ Don't forget to download and install the Polygon ID wallet app before you go the 6. The account balance will be shown in gwei together with some other information about the claim.
- +
-7. Clicking on **Get Claim** will finally lead to the QR Code used to fetch the credential with MTP proof. Here we are making a request to the on-chain issuer node. This node then saves this claim in a contract address. Scan it with the Polygon ID wallet and the credential should be added to the mobile app. +7. Clicking on **Get Claim** will finally lead to the QR Code used to fetch the credential with MTP proof. Here we are making a request to the on-chain issuer node. This node then saves this claim in a contract address. Scan it with the Polygon ID wallet.
+8. Clicking on **Accept** should add the credential to the mobile app. + +
+ +
+ Here is the credential on the mobile app:
@@ -183,32 +190,35 @@ You can use already deployed demo: https://onchain-merklized-issuer-demo.polygon ## How to verify the balance claim -1. Go to the [Verifier website](https://verifier-demo.polygonid.me/). -1. Choose `custom` from the dropdown menu. - -
- -
+1. Visit the [Query builder website](https://schema-builder.polygonid.me/query-builder/). -1. Fill up the form. +2. You now need to define the query. - - **Circuit Id**: Credential Atomic Query MTP; - **URL**: https://gist.githubusercontent.com/ilya-korotya/b06baa37453ed9aedfcb79100b84d51f/raw/balance-v1.jsonld - - **Type**: BalanceCredential - - **Field**: balance - - **Operator**: all the operators work for the claim. [More information here](https://0xpolygonid.github.io/tutorials/verifier/verification-library/zk-query-language/) - - **Value**: set the value that you want to verify. + - **Schema type**: BalanceCredential + - **Attribute field**: balance Here is an example:
- + +
-1. Press submit. +3. Click **Create Query**. Now select the Network as Polygon Amoy (testnet) and click **Test query** which should result with a QR code. Scan and follow the instructions on the mobile app. + +
+ +
-1. Use the mobile application to scan the QR code and complete the verification process. The verifier will check the revocation status and additional information and the proof will be sent to the verifier. The Verifier website will present then the proof information. + +4. Click on Approve. After which, the process of generating the proof is starts:
- +
+ +5.Finally, the proof is generated. The verifier will check the revocation status and some additional information. The proof is then sent and validated by the verifier. You will receive the following response on the Query builder website +
+ +
\ No newline at end of file diff --git a/docs/issuer/refresh-service/customization.md b/docs/issuer/refresh-service/customization.md index 4169fada..25e33684 100644 --- a/docs/issuer/refresh-service/customization.md +++ b/docs/issuer/refresh-service/customization.md @@ -20,7 +20,6 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; Extend customization by incorporating custom providers and integrating them into the refresh flow. This is the easiest way to add custom business logic to retrieve data from a data provider. Go to [setup guide](/docs/issuer/refresh-service/setup-guide/#setup-with-custom-data-provider) for more information - ## 2. Flexible HTTP package Utilize the [flexible HTTP package](https://github.com/0xPolygonID/refresh-service/blob/main/providers/flexiblehttp/http.go) to configure HTTP requests to a data provider. Refer to the [configuration guide](https://github.com/0xPolygonID/refresh-service/blob/main/README.md) for instructions on how to set this up. diff --git a/docs/issuer/refresh-service/setup-guide.md b/docs/issuer/refresh-service/setup-guide.md index bf8d28bb..3ed247a3 100644 --- a/docs/issuer/refresh-service/setup-guide.md +++ b/docs/issuer/refresh-service/setup-guide.md @@ -17,165 +17,146 @@ keywords: import useBaseUrl from '@docusaurus/useBaseUrl'; > **NOTE: Current implementation of [refresh service](https://github.com/0xPolygonID/refresh-service) works only with [issuer-node](https://github.com/0xPolygonID/issuer-node/).** +> ## Preparation - 1. Run the issuer-node locally by following the [quick-start installation guide](https://github.com/0xPolygonID/issuer-node/#quick-start-installation). 1. Clone the refresh service using the command `git clone git@github.com:0xPolygonID/refresh-service.git`. 1. Build JSON and JSONLD schemas, utilizing the provided examples: -- [JSON](https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/non-zero-balance.json) -- [JSONLD](https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/non-zero-balance.jsonld) + - [JSON](https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/non-zero-balance.json) + - [JSONLD](https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/non-zero-balance.jsonld) -Generate custom schemas through the [schema builder](https://schema-builder.polygonid.me/builder). Additional details can be found in the [schema builder documentation](/docs/issuer/schema-builder/). + Generate custom schemas through the [schema builder](https://schema-builder.polygonid.me/builder). Additional details can be found in the [schema builder documentation](/docs/issuer/schema-builder/). ## Setup with custom data provider - Consider an example of integrating [polygon scan](https://polygonscan.com/) as a data provider for the refresh service. 1. Integrate the custom data provider into the [data provider module](https://github.com/0xPolygonID/refresh-service/tree/main/providers): + ```go + const polygonBalanceURL = "https://api.polygonscan.com/api?module=account&action=balance&address=%s&apikey=%s" -```go -const polygonBalanceURL = "https://api.polygonscan.com/api?module=account&action=balance&address=%s&apikey=%s" - -type BalanceResponse struct { - Status string `json:"status"` - Result string `json:"result"` - Message string `json:"message"` -} - -func GetBalanceByAddress(address string) (map[string]any, error) { - resp, err := http.Get( - fmt.Sprintf(polygonBalanceURL, address, ""), - ) - if err != nil { - return nil, - fmt.Errorf("failed to get balance: %w", err) + type BalanceResponse struct { + Status string `json:"status"` + Result string `json:"result"` + Message string `json:"message"` } - balanceResp := &BalanceResponse{} - if err = json.NewDecoder(resp.Body).Decode(balanceResp); err != nil { - return nil, - fmt.Errorf("failed to decode balance response: %w", err) + func GetBalanceByAddress(address string) (map[string]any, error) { + resp, err := http.Get( + fmt.Sprintf(polygonBalanceURL, address, ""), + ) + if err != nil { + return nil, + fmt.Errorf("failed to get balance: %w", err) + } + + balanceResp := &BalanceResponse{} + if err = json.NewDecoder(resp.Body).Decode(balanceResp); err != nil { + return nil, + fmt.Errorf("failed to decode balance response: %w", err) + } + defer resp.Body.Close() + + if balanceResp.Status != "1" { + return nil, + fmt.Errorf("invalid status in balance response: %s", balanceResp.Message) + } + + // convert to credential subject format + // ensure that these fields align with the attributes specified in the JSONLD schema. + return map[string]any{ + "balance": balanceResp.Result, + "address": address, + }, nil } - defer resp.Body.Close() - - if balanceResp.Status != "1" { - return nil, - fmt.Errorf("invalid status in balance response: %s", balanceResp.Message) - } - - // convert to credential subject format - // ensure that these fields align with the attributes specified in the JSONLD schema. - return map[string]any{ - "balance": balanceResp.Result, - "address": address, - }, nil -} -``` - + ``` 1. Use the custom data provider within the refresh service: - - 1. Remove the default data provider: - - ```go - flexibleHTTP, err := rs.providers.ProduceFlexibleHTTP(credentialType) - if err != nil { - return nil, - errors.Wrapf(ErrCredentialNotUpdatable, - "for credential '%s' not possible to find a data provider: %v", credential.ID, err) - - } - updatedFields, err := flexibleHTTP.Provide(credential.CredentialSubject) - if err != nil { - return nil, err - } - ``` - - 1. Use the new polygon scan data provider: - - ```go - // confirm the credentialType matches a supported type in the refresh service, - // and its urn:uuid aligns with the id in the JSONLD schema - if credentialType != "urn:uuid:f50cfcf6-ded4-470e-83be-2d6820a66998" { - return nil, errors.New("unknow credentialType") - } - - updatedFields, err := polygonscan.GetBalanceByAddress(credential.CredentialSubject["address"].(string)) - if err != nil { - return nil, err - } - ``` - + 1. Remove the default data provider: + ```go + flexibleHTTP, err := rs.providers.ProduceFlexibleHTTP(credentialType) + if err != nil { + return nil, + errors.Wrapf(ErrCredentialNotUpdatable, + "for credential '%s' not possible to find a data provider: %v", credential.ID, err) + + } + updatedFields, err := flexibleHTTP.Provide(credential.CredentialSubject) + if err != nil { + return nil, err + } + ``` + 1. Use the new polygon scan data provider: + ```go + // confirm the credentialType matches a supported type in the refresh service, + // and its urn:uuid aligns with the id in the JSONLD schema + if credentialType != "urn:uuid:f50cfcf6-ded4-470e-83be-2d6820a66998" { + return nil, errors.New("unknow credentialType") + } + + updatedFields, err := polygonscan.GetBalanceByAddress(credential.CredentialSubject["address"].(string)) + if err != nil { + return nil, err + } + ``` 1. Populate the .env variables: - ``` - export IPFS_URL="https://infure..." - export SUPPORTED_RPC="137=https://infura..." - export SUPPORTED_STATE_CONTRACTS="137=0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D" - export SUPPORTED_ISSUERS="*=https://my-issuer-node.com" - export ISSUERS_BASIC_AUTH="*=myuser:mypassword" - ``` + ``` + export IPFS_GATEWAY_URL="https://infura..." + export SUPPORTED_RPC="137=https://infura..." + export SUPPORTED_STATE_CONTRACTS="137=0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D" + export SUPPORTED_ISSUERS="*=https://my-issuer-node.com" + export ISSUERS_BASIC_AUTH="*=myuser:mypassword" + ``` 1. Generate a blank config.yaml file: - -```bash -touch config.yaml -``` - + ```bash + touch config.yaml + ``` 1. Run the refresh service: - -```bash -source .env -go run . -``` + ```bash + source .env + go run . + ``` ## Setup with default provider - To integrate [polygon scan](https://polygonscan.com/) data provider with the default data provider, follow these general steps: - 1. Create a `config.yaml` file with the following content: - -```yaml -urn:uuid:f50cfcf6-ded4-470e-83be-2d6820a66998: - settings: - timeExpiration: 5m - provider: - url: https://api.polygonscan.com/api - method: GET - requestSchema: - params: - module: account - action: balance - address: "{{ credentialSubject.address }}" # this value will be substituted from the credentialSubject.address field - apikey: - headers: - Content-Type: application/json - responseSchema: - type: json - properties: - result: - type: string - match: credentialSubject.balance -``` - + ```yaml + urn:uuid:f50cfcf6-ded4-470e-83be-2d6820a66998: + settings: + timeExpiration: 5m + provider: + url: https://api.polygonscan.com/api + method: GET + requestSchema: + params: + module: account + action: balance + address: "{{ credentialSubject.address }}" # this value will be substituted from the credentialSubject.address field + apikey: + headers: + Content-Type: application/json + responseSchema: + type: json + properties: + result: + type: string + match: credentialSubject.balance + ``` 2. Populate the .env variables: - -``` -export IPFS_URL="https://infura..." -export SUPPORTED_RPC="137=https://infura..." -export SUPPORTED_STATE_CONTRACTS="137=0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D" -export SUPPORTED_ISSUERS="*=https://my-issuer-node.com" -export ISSUERS_BASIC_AUTH="*=myuser:mypassword" -``` - + ``` + export IPFS_GATEWAY_URL="https://infura..." + export SUPPORTED_RPC="137=https://infura..." + export SUPPORTED_STATE_CONTRACTS="137=0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D" + export SUPPORTED_ISSUERS="*=https://my-issuer-node.com" + export ISSUERS_BASIC_AUTH="*=myuser:mypassword" + ``` 3. Run the service: - -```bash -source .env -go run . -``` + ```bash + source .env + go run . + ``` ## Testing - 1. Go to the issuer-node UI and generate a credential with refresh service section:
@@ -219,4 +200,4 @@ go run .
-
+ \ No newline at end of file diff --git a/docs/issuer/schema-exs.md b/docs/issuer/schema-exs.md index 03f1d724..438442a5 100644 --- a/docs/issuer/schema-exs.md +++ b/docs/issuer/schema-exs.md @@ -30,7 +30,7 @@ Here are some schemas with different data types. "credentialSchema": "https://raw.githubusercontent.com/0xPolygonID/sh-id-platform/adding-schema-examples/docs/examples/schemas/json/exampleBoolean.json", "type": "CodingExperienceCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", + "id": "did:polygonid:polygon:amoy:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", "codingExperience": true }, "expiration": "2025-04-05T08:34:07.117Z", @@ -52,7 +52,7 @@ Here are some schemas with different data types. "credentialSchema": "https://raw.githubusercontent.com/0xPolygonID/sh-id-platform/adding-schema-examples/docs/examples/schemas/json/exampleDate.json", "type": "HireDateCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", + "id": "did:polygonid:polygon:amoy:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", "hireDate": "2020-12-12" }, "expiration": "2025-04-05T08:34:07.117Z", @@ -74,7 +74,7 @@ Here are some schemas with different data types. "credentialSchema": "https://raw.githubusercontent.com/0xPolygonID/sh-id-platform/adding-schema-examples/docs/examples/schemas/json/exampleInteger.json", "type": "BirthdayCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", + "id": "did:polygonid:polygon:amoy:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", "birthday": 20201012 }, "expiration": "2025-04-05T08:34:07.117Z", @@ -96,7 +96,7 @@ Here are some schemas with different data types. "credentialSchema": "https://raw.githubusercontent.com/0xPolygonID/sh-id-platform/adding-schema-examples/docs/examples/schemas/json/exampleNumber.json", "type": "SalaryCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", + "id": "did:polygonid:polygon:amoy:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", "salary": 1000.0 }, "expiration": "2025-04-05T08:34:07.117Z", @@ -118,7 +118,7 @@ Here are some schemas with different data types. "credentialSchema": "https://raw.githubusercontent.com/0xPolygonID/sh-id-platform/adding-schema-examples/docs/examples/schemas/json/exampleString.json", "type": "RoleCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", + "id": "did:polygonid:polygon:amoy:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", "role": "developer" }, "expiration": "2025-04-05T08:34:07.117Z", @@ -140,7 +140,7 @@ Here are some schemas with different data types. "credentialSchema": "https://raw.githubusercontent.com/0xPolygonID/sh-id-platform/adding-schema-examples/docs/examples/schemas/json/exampleEmployee.json", "type": "EmployeeCredential", "credentialSubject": { - "id": "did:polygonid:polygon:mumbai:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", + "id": "did:polygonid:polygon:amoy:2qLPX9XnujT2xhuiPMHrqXTUD96UCV87CtThRUZFQm", "role": "developer", "hireDate": "2022-10-10", "birthday": 19901204, diff --git a/docs/js-sdk/js-sdk-example.md b/docs/js-sdk/js-sdk-example.md index 81520d2a..f9bfe924 100644 --- a/docs/js-sdk/js-sdk-example.md +++ b/docs/js-sdk/js-sdk-example.md @@ -43,9 +43,9 @@ We have created a [JS SDK Example repository](https://github.com/0xPolygonID/js- ```bash export WALLET_KEY="...key in hex format with matic balance" - export RPC_URL="...url to polygon mumbai network rpc node" + export RPC_URL="...url to polygon amoy network rpc node" export RHS_URL="..reverse hash service url" - export CONTRACT_ADDRESS="..state v2 contract address in the mumbai network" + export CONTRACT_ADDRESS="..state v2 contract address in the amoy network" export CIRCUITS_PATH="..path to the circuits folder" ``` @@ -125,7 +125,7 @@ const seedPhrase: Uint8Array = byteEncoder.encode("seedseedseedseedseedseedseeds const { did, credential } = await wallet.createIdentity({ method: DidMethod.Iden3, blockchain: Blockchain.Polygon, - networkId: NetworkId.Mumbai, + networkId: NetworkId.Amoy, seed: seedPhrase, revocationOpts: { type: CredentialStatusType.Iden3ReverseSparseMerkleTreeProof, @@ -184,7 +184,7 @@ If we do not use `rhsUrl` within createIdentity() method, we get a `credentialSt const { did: issuerDID, credential: issuerAuthCredential } = await wallet.createIdentity({ method: DidMethod.Iden3, blockchain: Blockchain.Polygon, - networkId: NetworkId.Mumbai, + networkId: NetworkId.Amoy, seed: seedPhraseIssuer, revocationOpts: { type: CredentialStatusType.Iden3ReverseSparseMerkleTreeProof, @@ -200,7 +200,7 @@ If we do not use `rhsUrl` within createIdentity() method, we get a `credentialSt const { did: userDID, credential: authBJJCredentialUser } = await identityWallet.createIdentity({ method: DidMethod.Iden3, blockchain: Blockchain.Polygon, - networkId: NetworkId.Mumbai, + networkId: NetworkId.Amoy, seed: seedPhraseUser, revocationOpts: { type: CredentialStatusType.Iden3ReverseSparseMerkleTreeProof, @@ -244,12 +244,12 @@ If we do not use `rhsUrl` within createIdentity() method, we get a `credentialSt "expirationDate": "2361-03-21T19:14:48.000Z", "issuanceDate": "2023-04-26T18:54:26.210Z", "credentialSubject": { - "id": "did:iden3:polygon:mumbai:wzwAyDLHL6Nhtj3TnFfUnP7osASXb9hS8BTfa2zeo", + "id": "did:iden3:polygon:amoy:wzwAyDLHL6Nhtj3TnFfUnP7osASXb9hS8BTfa2zeo", "birthday": 19960424, "documentType": 99, "type": "KYCAgeCredential" }, - "issuer": "did:iden3:polygon:mumbai:wzokvZ6kMoocKJuSbftdZxTD6qvayGpJb3m4FVXth", + "issuer": "did:iden3:polygon:amoy:wzokvZ6kMoocKJuSbftdZxTD6qvayGpJb3m4FVXth", "credentialSchema": { "id": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v2.json", "type": "JsonSchemaValidator2018" @@ -263,7 +263,7 @@ If we do not use `rhsUrl` within createIdentity() method, we get a `credentialSt { "type": "BJJSignature2021", "issuerData": { - "id": "did:iden3:polygon:mumbai:wzokvZ6kMoocKJuSbftdZxTD6qvayGpJb3m4FVXth", + "id": "did:iden3:polygon:amoy:wzokvZ6kMoocKJuSbftdZxTD6qvayGpJb3m4FVXth", "state": { "rootOfRoots": "0000000000000000000000000000000000000000000000000000000000000000", "revocationTreeRoot": "0000000000000000000000000000000000000000000000000000000000000000", diff --git a/docs/mumbai-to-amoy-migration.md b/docs/mumbai-to-amoy-migration.md new file mode 100644 index 00000000..f6040ffe --- /dev/null +++ b/docs/mumbai-to-amoy-migration.md @@ -0,0 +1,63 @@ +--- +id: mumbai-to-amoy-migration +title: Guide for Amoy testnet migration from Mumbai testnet +sidebar_label: Introduction 2 +keywords: + - polygon id + - amoy + - migration +--- + +Welcome to the guide for migrating your projects and solutions built using PolygonID from the Mumbai testnet to the new Amoy testnet which is the new Sepolia-anchored testnet for Polygon PoS. With the deprecation of Goerli and Mumbai testnets, it's crucial to transition to Amoy for seamless development and testing. This guide aims to assist developers in understanding the changes required for integrating and using PolygonID on the Amoy testnet, ensuring a smooth transition. + +:::note +These changes would only affect your project or solution on the testnet. Things on the Mainnet stay as it is. Most providers will shut down the Mumbai testnet RPC Nodes, so we request you to migrate to Amoy testnet for your solution to work as expected. +::: + +## Issuer + +To migrate to the Amoy testnet, developers must set up a new Issuer node configured for Amoy. The migration involves two steps: + +1. Setting up a new Issuer node using the latest configuration guidelines. + + - To set up a new issuer node, please refer to [this installation guide](https://github.com/0xPolygonID/issuer-node/tree/develop). It includes the latest configuration for the Amoy testnet. + - An Issuer will need to create a new identity for Amoy, through the core API specifying the proper "network": "amoy". If you do it with the make generate-issuer-did command, then the program will ge the variables from the .env files that must be properly filled. (.env-samples are available at [Issuer Node GitHub repository](https://github.com/0xPolygonID/issuer-node/tree/main)). + - Here you can find more details about issuer configuration ([advanced Issuer Node configuration](https://devs.polygonid.com/docs/issuer/issuer-configuration)). + +2. Deprecating and shutting down existing Issuer nodes configured for the Mumbai testnet. + +:::note +The identities and the states won’t be migrated from Mumbai to Amoy. +::: + +:::note +Latest Issuer Node version: https://github.com/0xPolygonID/issuer-node/releases/tag/v2.5.0 +::: + +## Verifier + +To ensure compatibility with the Amoy testnet, you need to install the latest version of Verifier SDK. For instances where the Verifier SDK is already integrated into existing systems, you should proceed by updating it to the latest version. Tools: + +- JS-SDK ([v1.10.0](https://github.com/0xPolygonID/js-sdk/releases/tag/v1.10.0) or greater) is updated and compatible with the Amoy testnet. +- [Query Builder](https://schema-builder.polygonid.me/query-builder) is updated and compatible with the Amoy testnet. + +## Wallet + +Integrating with the Amoy testnet requires installing and updating to the latest version of the Wallet (2.3.4). This version provides support for Amoy testnet. + +## Smart contracts + +The Polygon ID smart contracts have been deployed to Amoy testnet. You can find the address of the contracts [here](https://devs.polygonid.com/docs/smart-contracts) and use them accordingly. + +## Affected tools status + +Here is the status for all the Tools with respect to support for the Amoy testnet: + +- [Smart Contracts](https://devs.polygonid.com/docs/smart-contracts): Deployed on Amoy ✅ +- [Query Builder](https://schema-builder.polygonid.me/query-builder): Updated and compatible with the Amoy testnet ✅ +- [Issuer Node Demo](https://issuer-ui.polygonid.me): Updated and compatible with the Amoy testnet (for testing purposes only) ✅ +- Mobile apps: Updated and compatible with the Amoy testnet ✅ + - [iOS latest](https://apps.apple.com/in/app/polygon-id/id1629870183) (version 2.3.4) + - [Android latest](https://play.google.com/store/apps/details?id=com.polygonid.wallet&hl=en&gl=US) (version 2.3.4) + +--- diff --git a/docs/quick-start-demo.md b/docs/quick-start-demo.md index 36fa2053..55da6d70 100644 --- a/docs/quick-start-demo.md +++ b/docs/quick-start-demo.md @@ -51,7 +51,6 @@ Polygon ID wallet is an implementation of the Wallet SDK, as a way of showcasing The process from downloading to creating an identity on the Polygon ID Wallet is just as it is shown below. You need to download the app, create a wallet, set up a PIN number and the wallet is ready to be used. -"Mumbai" is selected instead of "Polygon Main".
@@ -59,10 +58,10 @@ The process from downloading to creating an identity on the Polygon ID Wallet is :::caution -This demo is using Polygon's Mumbai testnet. Go to the gear icon at the top right and ensure "Polygon Mumbai" is selected instead of "Polygon Main". +This demo is using Polygon Amoy testnet. Go to the gear icon at the top right and ensure "Polygon Amoy network" is selected instead of "Polygon Main network".
- +
::: @@ -123,7 +122,7 @@ With the new schema in hand, the issuer should now be able to generate a credent 4. After you click on **Create Credential Link**, you can also click on **View Link** on the next screen to check the generated QR code.
- +
## Fetch the newly created credential @@ -131,13 +130,13 @@ With the new schema in hand, the issuer should now be able to generate a credent Now we are back to the ID Holder role. They will use their mobile application to authenticate themselves by scanning the QR code generated by the issuer in the last step.
- +
Connect to the issuer:
- +
This will instantly trigger a notification on the mobile which will look like this: @@ -149,13 +148,13 @@ This will instantly trigger a notification on the mobile which will look like th Accept the credential:
- +
The ID Holder successfully retrieved the credential and it is visible on the app:
- +
## Verify the ID holder credential @@ -164,31 +163,42 @@ Here comes the third role in this tutorial: the verifier. This could be represen Here are the steps to verify the credential: -1. Visit the [Verifier website](https://verifier-demo.polygonid.me/). As we are using a newly-created credential type, you need to choose **Custom** on the dropdown menu. Click on **Sign In**. +1. Visit the [Query builder website](https://schema-builder.polygonid.me/query-builder/). The [Query Builder](/docs/verifier/query-builder/) is an awesome tool designed to simplify the creation of verification queries.
- +
-2. Now you will again make use of the JSON-LD URL we have also provided: `ipfs://QmdH1Vu79p2NcZLFbHxzJnLuUHJiMZnBeT7SNpLaqK7k9X`. Here is how the query should look like: +2. You now need to define the query. You will again make use of the JSON-LD URL which we have also provided: `ipfs://QmdH1Vu79p2NcZLFbHxzJnLuUHJiMZnBeT7SNpLaqK7k9X`. Here is how the query should look like:
- + +
-3. After clicking on **Submit**, you should scan the resulting QR code and follow the instructions on the mobile app. +3. Click **Create Query**. Now select the Network as Polygon Amoy (testnet)
- + +
+ + +4. After clicking on **Test query**, you should scan the resulting QR code and follow the instructions on the mobile app. + +
+
-4. The process of generating the proof is then started: +5. Click on Approve. After which, the process of generating the proof starts:
- +
-5. And finally, the proof will be validated by the Verifier. +6. And finally, the proof is generated. The verifier will check the revocation status and some additional information. The proof is then sent and validated by the verifier. You will receive the following response on the Query builder website: +
+ +
:::info diff --git a/docs/smart-contracts.md b/docs/smart-contracts.md index 513157f5..3daf4560 100644 --- a/docs/smart-contracts.md +++ b/docs/smart-contracts.md @@ -12,41 +12,92 @@ keywords: Polygon ID Smart Contracts - Github -## Blockchain addresses +:::caution +*Polygon Mumbai testnet has been deprecated +::: + +## State Contract addresses For situations where one needs to publish data on the blockchain, such as creating an MTP-type credential, generating on-chain proofs and making credential revocations effective, it is important to have the following Smart Contracts addresses: -- Testnet(mumbai) -> `0x134B1BE34911E39A8397ec6289782989729807a4` +- Testnet(amoy) -> `0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124` - Mainnet -> `0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D` +- Testnet(mumbai)***** -> `0x134B1BE34911E39A8397ec6289782989729807a4` + :::info Check a contract codebase and algorithms of work [docs](https://docs.iden3.io/contracts/state/), [repository](https://github.com/iden3/contracts/tree/master/contracts/state). ::: +## IdentityTreeStore contract (On-chain RHS) + +| Network | Address | +|:--------------------------:|:------------------------------------------:| +| **Polygon Mainnet** | 0xbEeB6bB53504E8C872023451fd0D23BeF01d320B | +| **Polygon Amoy testnet** | 0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb | +| Polygon Mumbai testnet* | 0x16A1ae4c460C0a42f0a87e69c526c61599B28BC9 | + + ## Validator addresses -Current addresses on Polygon Mumbai testnet. (V1.0.1) +Current addresses on **Polygon Mainnet** (V2.0.1 V2 validators): -| | Sig | MTP | -| :---------------: | :---------------------------------------------------------: | :---------------------------------------------------------: | -| **Verifier** | 0x8024014f73BcCAEe048784d835A36c49e96F2806 | 0xF71d97Fc0262bB2e5B20912a6861da0B617a07Aa | -| **Validators** | 0x1E4a22540E293C0e5E8c33DAfd6f523889cFd878 | 0x0682fbaA2E4C478aD5d24d992069dba409766121 | -| **ERC20 example** | 0xD75638D319B1aE2a9491DC61f87a800AD362D168 (request id = 1) | 0xD75638D319B1aE2a9491DC61f87a800AD362D168 (request id = 2) | -Current addresses on Polygon Main (V1.0.1) -| | Sig | MTP | -| :---------------: | :---------------------------------------------------------------: | :--------------------------------------------------------------: | -| **Verifier** | 0xaf48CC9C2Ef728b7c4A903c9f5472498f8AED5E1 | 0x1008De1794be8fAba4fc33db6dff59B1d1Ac3a64 | -| **Validators** | 0x35178273C828E08298EcB0C6F1b97B3aFf14C4cb | 0x8c99F13dc5083b1E4c16f269735EaD4cFbc4970d | -| **ERC20 example** | 0xa5f08979370AF7095cDeDb2B83425367316FAD0B (request id = 1 (sig)) | 0xa5f08979370AF7095cDeDb2B83425367316FAD0B (request id = 2 (mtp) | +| | Sig | MTP | +|:-----------------:|:-----------------------------------------------------------------:|:-----------------------------------------------------------------:| +| **Verifier** | 0xa0495df44ABBDbfCD1da30638869A3307BF21532 | 0x068b3dDE10b55643b55aA4820c7a977dEEEc3c07 | +| **Validators** | 0xEF8540a5e0F4f53B436e7C3A273dCAe1C05d764D | 0x03Ee09635E9946165dd9538e9414f0ACE57e42e1 | +| **ERC20 example** | 0xB9Ac8e785f854f9B76bBF6d495213d58226DE813 (request id = 1 (sig)) | 0xB9Ac8e785f854f9B76bBF6d495213d58226DE813 (request id = 2 (mtp) | -:::note -The Smart Contracts above are updated and the legacy mumbai/main contracts should not be used anymore. However, if needed, support is still provided: v.1.1.1. +Current addresses on **Polygon Amoy** testnet. (V2.0.1 V2 validators) + +| | Sig | MTP | +|:-----------------:|:-----------------------------------------------------------:|:------------------------------------------------------------:| +| **Verifier** | 0x35178273C828E08298EcB0C6F1b97B3aFf14C4cb | 0x789D95794973034BFeDed6D4693e7cc3Eb253B3a | +| **Validators** | 0x8c99F13dc5083b1E4c16f269735EaD4cFbc4970d | 0xEEd5068AD8Fecf0b9a91aF730195Fef9faB00356 | +| **ERC20 example** | 0x2b23e5cF70D133fFaA7D8ba61E1bAC4637253880 (request id = 1) | 0x2b23e5cF70D133fFaA7D8ba61E1bAC4637253880 (request id = 2) | + + + + +Current addresses on **Polygon Mumbai** testnet*****. (V2.0.1 V2 validators): + +| | Sig | MTP | +|:-----------------:|:-----------------------------------------------------------:|:------------------------------------------------------------:| +| **Verifier** | 0x81ef49013627F363570a1C60B0D2215E23651B01 | 0xe5DB0489979C5671D9785cF1cBA9D9028041c9Bf | +| **Validators** | 0x59f2a6D94D0d02F3a2F527a8B6175dc511935624 | 0xb9b51F7E8C83C90FE48e0aBd815ef0418685CcF6 | +| **ERC20 example** | 0x3a4d4E47bFfF6bD0EF3cd46580D9e36F3367da03 (request id = 1) | 0x3a4d4E47bFfF6bD0EF3cd46580D9e36F3367da03 (request id = 2) | + + +Current addresses for V3 beta circuit on **Polygon Amoy** testnet. (2.0.1-beta.1 V3 validator): + +| | V3 validator 2.0.1-beta.1 | +|:--------------------:|:-----------------------------------------------------------------------------------------------------------:| +| **Verifier** | 0x07Bbd95505c44B65D7FA3B08dF6F5859373Fa1DC | +| **Validators** | 0xa5f08979370AF7095cDeDb2B83425367316FAD0B | +| **ERC20 SD example** | 0xc5Cd536cb9Cc3BD24829502A39BE593354986dc4 (request id = 3) | +| **ERC20 example** | 0xc5Cd536cb9Cc3BD24829502A39BE593354986dc4 (request id = 100 - 1100 merklized / 10000 - 65000 nonmerklized | + + +Current addresses for V3 beta circuit on **Polygon Mumbai** testnet*****. (2.0.1-beta.1 V3 validator): + +| | V3 validator 2.0.1-beta.1 | +|:--------------------:|:-----------------------------------------------------------------------------------------------------------:| +| **Verifier** | 0xDE27fc243Bf4eDAaB72E1008c9828C480582f672 | +| **Validators** | 0x3412AB64acFf5d94Da4914F176A43aCbDdC7Fc4a | +| **ERC20 SD example** | 0x36eB0E70a456c310D8d8d15ae01F6D5A7C15309A (request id = 3) | +| **ERC20 example** | 0x36eB0E70a456c310D8d8d15ae01F6D5A7C15309A (request id = 100 - 1100 merklized / 10000 - 65000 nonmerklized | + +:::note +More about [v3 circuit](./verifier/v3-circuit). + +Check the examples of deployment for [ v3 validator](https://github.com/0xPolygonID/contracts/blob/main/scripts/deployV3Validator.ts) ::: + ## CredentialAtomicQuerySigValidator CredentialAtomicQuerySigValidator.sol - Github @@ -70,28 +121,5 @@ Performs the same set of verifications of the CredentialAtomicQuerySigValidator > Further protocol related contracts can be found at Iden3 - Smart Contracts -## CredentialAtomicQueryV3 Validator - -Also now there deployed v3 validator on mumbai network. -It is base on CredentialAtomicQueryV3 circuit. -Features of v3 validator: -- both mtp and sig proof verification -- ethereum controlled identities support -- selective disclosure support - -Current addresses for V3 beta circuit on Polygon Mumbai testnet. (1.0.0-beta.0 V3 validator) - -| | V3 validator 1.0.0-beta.0 | -| :------------------: | :------------------------------------------------------------------------------------------------------------------------------: | -| **Verifier** | 0x3dE74ffCf9Fc0AA6c9fD73b511342a0E653B4129 | -| **Validators** | 0xCBde9B14fcF5d56B709234528C44798B4ea64761 | -| **ERC20 SD example** | 0xD0Fd3E9fDF448e5B86Cc0f73E5Ee7D2F284884c0 (request id = 3) | -| **ERC20 ** | 0xD0Fd3E9fDF448e5B86Cc0f73E5Ee7D2F284884c0 (request id = 100 - 650 merklized (step 50) / 10000 - 65000 nonmerklized (step 5000)) | - -:::note -More about [v3 circuit](./verifier/v3-circuit). - -Check the examples of deployment for [ v3 validator](https://github.com/0xPolygonID/contracts/blob/main/scripts/deployV3Validator.ts) -::: diff --git a/docs/verifier/demo-verifier.md b/docs/verifier/demo-verifier.md deleted file mode 100644 index a47432e1..00000000 --- a/docs/verifier/demo-verifier.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -id: demo-verifier -title: Verifier -sidebar_label: Demo Verifier -description: Quick start for demo verification. -keywords: - - docs - - polygon id - - ID holder - - verifier - - demo - - query ---- - -import useBaseUrl from '@docusaurus/useBaseUrl'; - -# Demo Verifier - -The [Demo Verifier](https://verifier-demo.polygonid.me/) is a playground that allows you to create queries based on a specific credential, generate a QR code based on that query and let the user scan the QR code to generate a zero-knowledge proof with which the query should be satisfied. - -## Prerequisites - -Download the Polygon ID Wallet App and create an Identity. - -- For Android: Polygon ID on Google Play -- For iOS: Polygon ID on the App Store -- Have the queried credential inside your wallet. For the tutorial, we are using the `ProofOfDaoLongevity` that can be created via the Issuer Node UI testing environment. - -## Quick Start - -1. On the Demo Verifier website click on the drop-down menu and then **Custom** - -
- -
-

- - Click on **Sign In**. - -2. Create the query via the editor. - - The editor allows you to design the query that the user will have to satisfy. The query is created by selecting the credential type and the attribute that you want to query. More info on how to design a query is described via the [ZK Query Language](./verification-library/zk-query-language.md). - - In this example, we are querying the date of entry of the user inside a DAO. In particular, we want to make sure that the user joined the DAO before a specific date. - This query is based on the `ProofOfDaoLongevity` credential type described by this [JSON-LD Context](https://github.com/0xPolygonID/tutorial-examples/blob/main/credential-schema/proof-of-dao-longevity.jsonld). - -
- -
-

- - Then click **Submit**. - -3. The query is then converted into a QR code that can be scanned by the user. - -
- -
-

- - Once scanning the QR code with the Polygon ID app, the user will be prompted to generate a zero-knowledge proof that attests that the query is satisfied without revealing any further information about the credential. For example, the user's entry date to the DAO is never revealed to the verifier. diff --git a/docs/verifier/on-chain-verification/overview.md b/docs/verifier/on-chain-verification/overview.md index 8256d094..442f630d 100644 --- a/docs/verifier/on-chain-verification/overview.md +++ b/docs/verifier/on-chain-verification/overview.md @@ -73,24 +73,38 @@ The ERC20Verifier is an ERC20 standard contract with a few other features. The e The ERC20Verifier contract must define at least a single `TRANSFER_REQUEST_ID`. This is the Identifier of the request that the contract is making to the user. ```solidity -pragma solidity ^0.8.16; +pragma solidity 0.8.20; -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {ERC20Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol'; import {PrimitiveTypeUtils} from "@iden3/contracts/lib/PrimitiveTypeUtils.sol"; import {ICircuitValidator} from "@iden3/contracts/interfaces/ICircuitValidator.sol"; import {ZKPVerifier} from "@iden3/contracts/verifiers/ZKPVerifier.sol"; -contract ERC20Verifier is ERC20, ZKPVerifier { +contract ERC20Verifier is ERC20Upgradeable, ZKPVerifier { uint64 public constant TRANSFER_REQUEST_ID = 1; - // define the amount of token to be airdropped per user - uint256 public TOKEN_AMOUNT_FOR_AIRDROP_PER_ID = 5 * 10**uint(decimals()); + mapping(uint256 => address) public idToAddress; + mapping(address => uint256) public addressToId; - constructor( - string memory name_, - string memory symbol_ - ) ERC20(name_, symbol_) {} + uint256 public TOKEN_AMOUNT_FOR_AIRDROP_PER_ID; + + modifier beforeTransfer(address to) { + MainStorage storage s = _getMainStorage(); + require( + s.proofs[to][TRANSFER_REQUEST_ID] == true, + "only identities who provided proof are allowed to receive tokens" + ); + _; + } + function initialize( + string memory name, + string memory symbol + ) public initializer { + super.__ERC20_init(name, symbol); + super.__ZKPVerifier_init(_msgSender()); + TOKEN_AMOUNT_FOR_AIRDROP_PER_ID = 5 * 10 ** uint256(decimals()); + } } ``` @@ -103,19 +117,31 @@ In this specific case, it must be checked that the sender of the proof matches t The airdrop logic must be added inside `_afterProofSubmit`. The contract must execute the airdrop once the proof is correctly verified. ```solidity {4, 5, 13, 14, 15, 16, 17, 28, 29, 30, 31, 32} -contract ERC20Verifier is ERC20, ZKPVerifier { +contract ERC20Verifier is ERC20Upgradeable, ZKPVerifier { uint64 public constant TRANSFER_REQUEST_ID = 1; mapping(uint256 => address) public idToAddress; mapping(address => uint256) public addressToId; - uint256 public TOKEN_AMOUNT_FOR_AIRDROP_PER_ID = - 5 * 10 ** uint256(decimals()); + uint256 public TOKEN_AMOUNT_FOR_AIRDROP_PER_ID; - constructor( - string memory name_, - string memory symbol_ - ) ERC20(name_, symbol_) {} + modifier beforeTransfer(address to) { + MainStorage storage s = _getMainStorage(); + require( + s.proofs[to][TRANSFER_REQUEST_ID] == true, + "only identities who provided proof are allowed to receive tokens" + ); + _; + } + + function initialize( + string memory name, + string memory symbol + ) public initializer { + super.__ERC20_init(name, symbol); + super.__ZKPVerifier_init(_msgSender()); + TOKEN_AMOUNT_FOR_AIRDROP_PER_ID = 5 * 10 ** uint256(decimals()); + } function _beforeProofSubmit( uint64 /* requestId */, @@ -123,7 +149,7 @@ contract ERC20Verifier is ERC20, ZKPVerifier { ICircuitValidator validator ) internal view override { // check that challenge input is address of sender - address addr = PrimitiveTypeUtils.int256ToAddress( + address addr = PrimitiveTypeUtils.uint256LEToAddress( inputs[validator.inputIndexOf("challenge")] ); // this is linking between msg.sender and @@ -156,30 +182,50 @@ contract ERC20Verifier is ERC20, ZKPVerifier { } ``` -Finally, we can add a further element of security inside the Smart Contract: prevent any type of token transfer (even after the airdrop) unless users passed the proof verification. This last condition is added by overriding the ERC20 `_beforeTokenTransfer` function and checking that the receiver address `to` of the transfer is included inside the +Finally, we can add a further element of security inside the Smart Contract: prevent any type of token transfer (even after the airdrop) unless users passed the proof verification. This last condition is added by overriding the ERC20 `_update` function and checking that the receiver address `to` of the transfer is included inside the `proofs` mapping. ```solidity {29, 30, 31, 32, 33} -contract ERC20Verifier is ERC20, ZKPVerifier { +contract ERC20Verifier is ERC20Upgradeable, ZKPVerifier { uint64 public constant TRANSFER_REQUEST_ID = 1; mapping(uint256 => address) public idToAddress; mapping(address => uint256) public addressToId; - uint256 public TOKEN_AMOUNT_FOR_AIRDROP_PER_ID = - 5 * 10 ** uint256(decimals()); + uint256 public TOKEN_AMOUNT_FOR_AIRDROP_PER_ID; + + modifier beforeTransfer(address to) { + MainStorage storage s = _getMainStorage(); + require( + s.proofs[to][TRANSFER_REQUEST_ID] == true, + "only identities who provided proof are allowed to receive tokens" + ); + _; + } - constructor( - string memory name_, - string memory symbol_ - ) ERC20(name_, symbol_) {} + function initialize( + string memory name, + string memory symbol + ) public initializer { + super.__ERC20_init(name, symbol); + super.__ZKPVerifier_init(_msgSender()); + TOKEN_AMOUNT_FOR_AIRDROP_PER_ID = 5 * 10 ** uint256(decimals()); + } function _beforeProofSubmit( uint64 /* requestId */, uint256[] memory inputs, ICircuitValidator validator ) internal view override { - ... + // check that challenge input is address of sender + address addr = PrimitiveTypeUtils.uint256LEToAddress( + inputs[validator.inputIndexOf("challenge")] + ); + // this is linking between msg.sender and + require( + _msgSender() == addr, + "address in proof is not a sender address" + ); } function _afterProofSubmit( @@ -187,19 +233,29 @@ contract ERC20Verifier is ERC20, ZKPVerifier { uint256[] memory inputs, ICircuitValidator validator ) internal override { - ... + require( + requestId == TRANSFER_REQUEST_ID && addressToId[_msgSender()] == 0, + "proof can not be submitted more than once" + ); + + // get user id + uint256 id = inputs[1]; + // additional check didn't get airdrop tokens before + if (idToAddress[id] == address(0) && addressToId[_msgSender()] == 0) { + super._mint(_msgSender(), TOKEN_AMOUNT_FOR_AIRDROP_PER_ID); + addressToId[_msgSender()] = id; + idToAddress[id] = _msgSender(); + } } - function _beforeTokenTransfer( - address /* from */, + function _update( + address from /* from */, address to, - uint256 /* amount */ - ) internal view override { - require( - proofs[to][TRANSFER_REQUEST_ID] == true, - "only identities who provided proof are allowed to receive tokens" - ); + uint256 amount /* amount */ + ) internal override beforeTransfer(to) { + super._update(from, to, amount); } + } ``` @@ -222,7 +278,10 @@ async function main() { const verifierSymbol = "zkERC20"; const ERC20Verifier = await ethers.getContractFactory(verifierContract); - const erc20Verifier = await ERC20Verifier.deploy(verifierName, verifierSymbol); + const erc20Verifier = await upgrades.deployProxy( + ERC20Verifier, + [verifierName, verifierSymbol] + ); await erc20Verifier.deployed(); console.log(verifierName, " contract address:", erc20Verifier.address); @@ -389,7 +448,7 @@ function coreSchemaFromStr(schemaIntString) { return SchemaHash.newSchemaHashFromInt(schemaInt); } -function calculateQueryHash(values, schema, slotIndex, operator, claimPathKey, claimPathNotExists) { +function calculateQueryHashV2(values, schema, slotIndex, operator, claimPathKey, claimPathNotExists) { const expValue = prepareCircuitArrayValues(values, 64); const valueHash = poseidon.spongeHashX(expValue, 6); const schemaHash = coreSchemaFromStr(schema); @@ -429,7 +488,7 @@ async function main() { claimPathNotExists: 0, }; - query.queryHash = calculateQueryHash( + query.queryHash = calculateQueryHashV2( query.value, query.schema, query.slotIndex, @@ -580,5 +639,5 @@ Now that you have been able to create your first on-chain ZK-based application, Another possibility to customize your Smart Contract involves setting different ZK requests. First of all, multiple `REQUEST_ID` must be defined inside the main Smart Contract. Therefore, the contract deployer can set a different query for each request ID and create different outcomes inside `_afterProofSubmit` according to the type of proof received. For example, an airdrop contract can verify the role of a user inside a DAO and distribute a different amount of tokens based on the role. ## Estimated Gas Costs for On-Chain Verifier - While it is clear that gas cost is highly dependent on the complexity of the logic that you add to the `_afterProofSubmit` and `_beforeProofSubmit` functions, the sample code for the on-chain verifier in this tutorial costs approximately 700k gas to execute on-chain. The zk proof verification function specifically costs approximately 520k gas. The above estimates are accurate as of January 2024. + diff --git a/docs/verifier/query-builder.md b/docs/verifier/query-builder.md index c90649a1..c74f03a4 100644 --- a/docs/verifier/query-builder.md +++ b/docs/verifier/query-builder.md @@ -128,24 +128,31 @@ Providing a nullifier session ID ensures the query's integrity and uniqueness, c ### Query Type -The protocol allows selection between two query types: +The protocol allows selection between three query types: 1. **Condition:** This type allows the prover to demonstrate that a specific condition is met without revealing the underlying data. It maintains data privacy by cryptographically verifying the condition. An example is proving legal age for entry into a venue without disclosing the actual age. 2. **Selective disclosure:** Use this when you need the prover to reveal specific data stored in their credential. This option discloses the actual value of an attribute to the verifier. For instance, instead of just requesting proof proving legal age, it would disclose the prover's actual age to the verifier. -Choose "Condition" for privacy-preserving verification, or "Selective disclosure" for cases where revealing specific information is necessary. +3. **Credential issued:** Use this when you need the prove that credential with a specific type has been issued, but not to reveal any information. + +Choose "Condition" for privacy-preserving verification, "Selective disclosure" for cases where revealing specific information is necessary, "Credential issued" when you need to ensure the fact of credential issuance. ### Operator In conditional queries, the "Operator" input defines the logical operation to be applied. The supported operators are: -- **Equal:** Checks if the value is equal to the specified value. -- **Not Equal:** Verifies if the value is not equal to the specified value. -- **Less Than:** Assesses that the value is less than the given value. -- **Greater Than:** Evaluates if the value is greater than the specified value. +- **Is equal to:** Checks if the value is equal to the specified value. +- **Is not equal to:** Verifies if the value is not equal to the specified value. - **Matches one of the values:** Determines if the value is within a given set of values. - **Matches none of the values:** Checks if the value is not within a specified set. +- **Is less than:** Assesses that the value is less than the given value. +- **Is greater than:** Evaluates if the value is greater than the specified value. +- **Is less than or equal to:** Assesses that the value is less than the given value or equal to it. +- **Is greater than or equal to:** Assesses that the value is greater than the given value or equal to it. +- **Falls within the range:** Checks if the value is in the specified range, including corner values. +- **Falls outside the range:** Checks if the value is not in the specified range, including corner values. +- **Exists:** Checks if the specific field is included or not in the Verifiable Credential (for optional attributes). Choose the appropriate operator based on the condition you want to validate. @@ -206,7 +213,7 @@ For a detailed walkthrough, refer to the provided video illustrating the complet On-chain verification enables smart contracts to execute logic based on query results. To set this up: -1. **Select the Network:** Choose either Polygon Mainnet or Polygon Mumbai. +1. **Select the Network:** Choose either Polygon Mainnet or Polygon Amoy. 2. **Set a Request Id:** This unique ID acts as a key in the contract's state map. It's essential to choose a distinct ID for each request. 3. **Smart Contract Address:** Input the address of the contract responsible for proof validation and logic execution on the selected network. 4. **Click the Set Request Button:** This action sends a `Set ZKP Request` transaction. diff --git a/docs/verifier/v3-circuit.md b/docs/verifier/v3-circuit.md index 60772553..f76938ab 100644 --- a/docs/verifier/v3-circuit.md +++ b/docs/verifier/v3-circuit.md @@ -18,10 +18,27 @@ We want to introduce new circuits - СredentialAtomicQueryV3 and CredentialAtomi :::warning Circuits are in the beta version. Trusted setup will be performed in the next release. - Current Circuit id is `СredentialAtomicQueryV3-beta.0` + Newest version is СredentialAtomicQueryV3-beta.1 + +
Changelog from beta.0 to beta.1 + + + 1. ValueArrSize input is introduced, which fixes behaviour for IN / NIN operations. + 2. Exists / Noop / Less Than Or Equal / Greater Than or Equal / Not between / Between operators support. + 3. Query hash calculation algorithm changes. + 4. Constraints and security optimizations. + +
+ ::: +More about new supported operators [here](./verification-library/zk-query-language.md#exists---operator-11). + +Link to latest sdk circuit wrappers: [js](https://github.com/0xPolygonID/js-sdk/pull/181) / [go](https://github.com/iden3/go-circuits/releases/tag/v2.1.0) + + + In general it's an improved version of V2 circuits with several important key features: 1. SIG and MTP checks are united in single circuit. Now you can use only one circuit without sig/mtp suffixes. Proof will be taken from user wallet and authorization response will contain information about verifiable credential proof type which has been used. It is possible to request the needed proof from user by using `proofType` property in the authorization request message. Possible values are `Iden3SparseMerkleTreeProof` and `BJJSignature2021`. If `proofType` is not provided - available proof will be used. In case there are two proofs available - MTP will be used as more prior. @@ -31,7 +48,7 @@ In general it's an improved version of V2 circuits with several important key fe "scope": [ { "id": 1, - "circuitId": "credentialAtomicQueryV3-beta.0", + "circuitId": "credentialAtomicQueryV3-beta.1", "query": { ... "proofType": "BJJSignature2021 | Iden3SparseMerkleTreeProof" @@ -50,7 +67,7 @@ In general it's an improved version of V2 circuits with several important key fe "scope": [ { "id": 1, - "circuitId": "credentialAtomicQueryV3-beta.0", + "circuitId": "credentialAtomicQueryV3-beta.1", "params": { "nullifierSessionId" : "123443290439234342342423423423423" }, @@ -84,7 +101,7 @@ Beta Validator is also deployed: [Repository](https://github.com/0xPolygonID/con "scope": [ { "id": 1, - "circuitId": "credentialAtomicQueryV3-beta.0", + "circuitId": "credentialAtomicQueryV3-beta.1", "query": { "groupId": 1 ... @@ -117,7 +134,7 @@ Example of complex request with v3 circuit proof request: "typ": "application/iden3comm-plain-json", "type": "https://iden3-communication.io/authorization/1.1/request", "thid": "f8aee09d-f592-4fcc-8d2a-8938aa26676c", - "from": "did:polygonid:polygon:mumbai:2qFroxB5kwgCxgVrNGUM6EW3khJgCdHHnKTr3VnTcp", + "from": "did:polygonid:polygon:amoy:2qFroxB5kwgCxgVrNGUM6EW3khJgCdHHnKTr3VnTcp", "body": { "callbackUrl": "https://test.com/callback", "reason": "age verification", @@ -125,7 +142,7 @@ Example of complex request with v3 circuit proof request: "scope": [ { "id": 1, - "circuitId": "credentialAtomicQueryV3-beta.0", + "circuitId": "credentialAtomicQueryV3-beta.1", "params": { "nullifierSessionId": "123443290439234342342423423423423" }, @@ -144,7 +161,7 @@ Example of complex request with v3 circuit proof request: }, { "id": 2, - "circuitId": "credentialAtomicQueryV3-beta.0", + "circuitId": "credentialAtomicQueryV3-beta.1", "query": { "allowedIssuers": ["*"], "groupId": 1, diff --git a/docs/verifier/verification-library/verification-api-guide.md b/docs/verifier/verification-library/verification-api-guide.md index a4b62aab..8c04d546 100644 --- a/docs/verifier/verification-library/verification-api-guide.md +++ b/docs/verifier/verification-library/verification-api-guide.md @@ -83,7 +83,7 @@ const ethStateResolver = new resolver.EthStateResolver( ); const resolvers: resolver.Resolvers = { - ['polygon:mumbai']: ethStateResolver, + ['polygon:amoy']: ethStateResolver, }; const verifier = await Verifier.newVerifier( @@ -104,9 +104,9 @@ Eventually, it returns an instance of a Verifier. To set up a verifier, differen - `circuitsDir` is the path where the public verification keys for Iden3 circuits are located (such as `"./circuits"`). If no folder is set, './circuits' folder is used. The verification key folder can be found here. Path to the circuit file is constructed from `${circuitsDir}/${circuitId}/verification_key.json`, - hierarchical structure for files in circuits folder is mandatory, e.g. --circuits -----circuitId ---------file -- `ethURL` is the URL of your RPC node provider such as `"https://polygon-testnet-rpc.allthatnode.com:8545"` for Polygon Mumbai. -- `contractAddress` is the address of the identity state Smart Contract. On Polygon Mumbai, it is 0x134B1BE34911E39A8397ec6289782989729807a4. -- `resolverPrefix` is the prefix of the resolver. For Polygon Mumbai it is `"polygon:mumbai"`. +- `ethURL` is the URL of your RPC node provider. +- `contractAddress` is the address of the identity state Smart Contract. On Polygon Amoy, it is 0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124. +- `resolverPrefix` is the prefix of the resolver. For Polygon Amoy it is `"polygon:amoy"`. - `ipfsGatewayURL` can be your IPFS gateway or public one. You can path your loader or IPFS node also. ## Execute the verification diff --git a/docs/verifier/verification-library/verifier-set-up.md b/docs/verifier/verification-library/verifier-set-up.md index 7e9d4660..ad713d8b 100644 --- a/docs/verifier/verification-library/verifier-set-up.md +++ b/docs/verifier/verification-library/verifier-set-up.md @@ -79,21 +79,35 @@ import( "io" "log" "net/http" + "os" "strconv" "time" "github.com/ethereum/go-ethereum/common" - "github.com/iden3/go-circuits/v2" + circuits "github.com/iden3/go-circuits/v2" auth "github.com/iden3/go-iden3-auth/v2" - "github.com/iden3/go-iden3-auth/v2/loaders" "github.com/iden3/go-iden3-auth/v2/pubsignals" "github.com/iden3/go-iden3-auth/v2/state" "github.com/iden3/iden3comm/v2/protocol" ) +const VerificationKeyPath = "verification_key.json" + +type KeyLoader struct { + Dir string +} + +// Load keys from embedded FS +func (m KeyLoader) Load(id circuits.CircuitID) ([]byte, error) { + return os.ReadFile(fmt.Sprintf("%s/%v/%s", m.Dir, id, VerificationKeyPath)) +} + func main() { http.HandleFunc("/api/sign-in", GetAuthRequest) http.HandleFunc("/api/callback", Callback) - http.ListenAndServe(":8080", nil) + log.Println("Starting server at port 8080") + if err := http.ListenAndServe(":8080", nil); err != nil { + log.Fatal(err) + } } // Create a map to store the auth requests and their session IDs @@ -149,7 +163,7 @@ func GetAuthRequest(w http.ResponseWriter, r *http.Request) { rURL := "NGROK URL" sessionID := 1 CallbackURL := "/api/callback" -Audience := "did:polygonid:polygon:mumbai:2qDyy1kEo2AYcP3RT4XGea7BtxsY285szg6yP9SPrs" +Audience := "did:polygonid:polygon:amoy:2qQ68JkRcf3xrHPQPWZei3YeVzHPP58wYNxx2mEouR" uri := fmt.Sprintf("%s%s?sessionId=%s", rURL, CallbackURL, strconv.Itoa(sessionID)) @@ -199,7 +213,7 @@ async function GetAuthRequest(req, res) { const hostUrl = ""; const sessionId = 1; const callbackURL = "/api/callback"; - const audience = "did:polygonid:polygon:mumbai:2qDyy1kEo2AYcP3RT4XGea7BtxsY285szg6yP9SPrs"; + const audience = "did:polygonid:polygon:amoy:2qQ68JkRcf3xrHPQPWZei3YeVzHPP58wYNxx2mEouR"; const uri = `${hostUrl}${callbackURL}?sessionId=${sessionId}`; @@ -255,7 +269,7 @@ The highlighted lines are to be added only if the authentication needs to design The request generated in the previous endpoint already contains the `CallBackURL` so that the response generated by the wallet will be automatically forwarded to the server callback function. The callback post endpoint receives the proof generated by the identity wallet. The role of the callback endpoint is to execute the [Verification](verification-api-guide.md) on the proof. :::info "Testnet / Mainnet" -The code samples on this page are using Polygon's Testnet Mumbai, including the smart contract address and the RPC endpoint in the `ethURL` variable. If you want to use the Mainnet, you need to add a resolver for it. +The code samples on this page are using Polygon's Amoy testnet, including the smart contract address and the RPC endpoint in the `ethURL` variable. If you want to use the Mainnet, you need to add a resolver for it. Mainnet contract address: `0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D` @@ -272,6 +286,7 @@ const mainStateResolver = new resolver.EthStateResolver( const resolvers = { ['polygon:mumbai']: ethStateResolver, + ['polygon:amoy']: amoyStateResolver, ['polygon:main']: mainStateResolver, }; ``` @@ -292,23 +307,26 @@ The public verification keys for Iden3 circuits generated after the trusted setu ```go // Callback works with sign-in callbacks func Callback(w http.ResponseWriter, r *http.Request) { - + fmt.Println("callback") // Get session ID from request sessionID := r.URL.Query().Get("sessionId") // get JWZ token params from the post request - tokenBytes, _ := io.ReadAll(r.Body) - - // Add Polygon Mumbai RPC node endpoint - needed to read on-chain state - ethURL := "https://polygon-testnet-rpc.allthatnode.com:8545" + tokenBytes, err := io.ReadAll(r.Body) + if err != nil { + log.Println(err) + return + } + // Add Polygon AMOY RPC node endpoint - needed to read on-chain state + ethURL := "https://polygon-amoy.infura.io/v3/" // Add IPFS url - needed to load schemas from IPFS ipfsURL := "https://ipfs.io" // Add identity state contract address - contractAddress := "0x134B1BE34911E39A8397ec6289782989729807a4" + contractAddress := "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124" - resolverPrefix := "polygon:mumbai" + resolverPrefix := "polygon:amoy" // Locate the directory that contains circuit's verification keys keyDIR := "../keys" @@ -317,10 +335,10 @@ func Callback(w http.ResponseWriter, r *http.Request) { authRequest := requestMap[sessionID] // print authRequest - fmt.Println(authRequest) + log.Println(authRequest) // load the verifcation key - var verificationKeyloader = &loaders.FSKeyLoader{Dir: keyDIR} + var verificationKeyLoader = &KeyLoader{Dir: keyDIR} resolver := state.ETHResolver{ RPCUrl: ethURL, ContractAddress: common.HexToAddress(contractAddress), @@ -331,7 +349,7 @@ func Callback(w http.ResponseWriter, r *http.Request) { } // EXECUTE VERIFICATION - verifier, err := auth.NewVerifier(verificationKeyloader, resolvers, auth.WithIPFSGateway(ipfsURL)) + verifier, err := auth.NewVerifier(verificationKeyLoader, resolvers, auth.WithIPFSGateway(ipfsURL)) if err != nil { log.Println(err.Error()) http.Error(w, err.Error(), http.StatusInternalServerError) @@ -348,15 +366,18 @@ func Callback(w http.ResponseWriter, r *http.Request) { return } - userID := authResponse.From - - messageBytes := []byte("User with ID " + userID + " Successfully authenticated") + //marshal auth resp + messageBytes, err := json.Marshal(authResponse) + if err != nil { + log.Println(err.Error()) + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } w.WriteHeader(http.StatusOK) w.Header().Set("Content-Type", "application/json") w.Write(messageBytes) - - return + log.Println("verification passed") } ``` @@ -364,22 +385,23 @@ func Callback(w http.ResponseWriter, r *http.Request) { ```js -async function Callback(req, res) { +async function callback(req, res) { // Get session ID from request const sessionId = req.query.sessionId; // get JWZ token params from the post request const raw = await getRawBody(req); const tokenStr = raw.toString().trim(); + console.log(tokenStr); - const ethURL = ""; - const contractAddress = "0x134B1BE34911E39A8397ec6289782989729807a4"; + const ethURL = ""; + const contractAddress = "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"; const keyDIR = "../keys"; const ethStateResolver = new resolver.EthStateResolver(ethURL, contractAddress); const resolvers = { - ["polygon:mumbai"]: ethStateResolver, + ["polygon:amoy"]: ethStateResolver, }; // fetch authRequest from sessionID @@ -403,7 +425,7 @@ async function Callback(req, res) { return res .status(200) .set("Content-Type", "application/json") - .send("user with ID: " + authResponse.from + "Succesfully authenticated"); + .send(authResponse); } ``` diff --git a/docs/verifier/verification-library/zk-query-language.md b/docs/verifier/verification-library/zk-query-language.md index e63c6cb7..3463b40f 100644 --- a/docs/verifier/verification-library/zk-query-language.md +++ b/docs/verifier/verification-library/zk-query-language.md @@ -25,10 +25,18 @@ The Query Language sits on top of these circuits to provide a simple way for dev - Must be a verified human to vote for a DAO specific proposal - `equals` (operator 1). - Must have been born before 2000-01-01 to access a specific website - `less-than` (operator 2). - Must have a monthly salary greater than $1000 to get a loan - `greater-than` (operator 3). -- Must be an admin or a hacker of a DAO to enter a platform - `ìn` (operator 4). +- Must be an admin or a hacker of a DAO to enter a platform - `in` (operator 4). - Must not be a resident of a country in the list of blacklisted countries to operate on an exchange - `not-in` (operator 5). - Must not be a resident of a specific country - `not-equal` (operator 6). +The Atomic Query Signature V3 Circuit circuit is designed to support more operators: + +- Must have been born before or exactly at 2000-01-01 to access a specific website - `less-than-equal` (operator 7). +- Must have a monthly salary greater than or equal $1000 to get a loan - `greater-than-equal` (operator 8). +- Must be in range - `between` (operator 9). +- Must not be in range - `non between` (operator 10). +- Field must or must not exist in the credential - `exists` (operator 11). + The query is designed by the Verifier and presented to the user via a QR Code (or deep-linking). Starting from the proof generated by the user as a response to the query, the Verifier is easily able to check if the query is satisfied or not. The Query Language follows the same rules whether the verification is implemented on-chain or off-chain, while the syntax to define these is a bit different. For each of the queries presented above, both the on-chain and off-chain way of designing will now be defined. @@ -56,7 +64,7 @@ You can create customized schemas, check out this [tutorial](/docs/is When presented with this query, the user must prove that he/she is a Person. - + ```ts const proofRequest: protocol.ZKPRequest = { @@ -69,22 +77,20 @@ const proofRequest: protocol.ZKPRequest = { "https://raw.githubusercontent.com/0xPolygonID/tutorial-examples/main/credential-schema/schemas-examples/proof-of-humanity/proof-of-humanity.jsonld", credentialSubject: { isHuman: { - $eq: 1, - }, - }, - }, + $eq: 1 + } + } + } }; ``` - - + + + Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain - - - -**Corresponding QR Code** +Corresponding QR Code ```json { @@ -97,8 +103,8 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "transaction_data": { "contract address": "", // replace with your contract address "method_id": "b68967e2", - "chain_id": 80001, - "network": "polygon-mumbai" + "chain_id": 80002, + "network": "polygon-amoy" }, "scope": [ { @@ -120,6 +126,9 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver } ``` + + + ## Less-than - Operator 2 **Credential Schema** @@ -144,10 +153,10 @@ const proofRequest: protocol.ZKPRequest = { "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", credentialSubject: { birthday: { - $lt: 20010101, - }, - }, - }, + $lt: 20010101 + } + } + } }; ``` @@ -156,10 +165,7 @@ const proofRequest: protocol.ZKPRequest = { Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain - - - -**Corresponding QR Code** +Corresponding QR Code ```json { @@ -172,8 +178,8 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "transaction_data": { "contract address": "", "method_id": "b68967e2", - "chain_id": 80001, - "network": "polygon-mumbai" + "chain_id": 80002, + "network": "polygon-amoy" }, "scope": [ { @@ -195,6 +201,9 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver } ``` + + + ## Greater-than - Operator 3 **Credential Schema** @@ -219,10 +228,10 @@ const proofRequest: protocol.ZKPRequest = { "https://raw.githubusercontent.com/0xPolygonID/tutorial-examples/main/credential-schema/schemas-examples/employee-data/employee-data.jsonld", credentialSubject: { monthlySalary: { - $gt: 1000, - }, - }, - }, + $gt: 1000 + } + } + } }; ``` @@ -231,10 +240,7 @@ const proofRequest: protocol.ZKPRequest = { Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain - - - -**Corresponding QR Code** +Corresponding QR Code\*\* ```json { @@ -247,8 +253,8 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "transaction_data": { "contract address": "", "method_id": "b68967e2", - "chain_id": 80001, - "network": "polygon-mumbai" + "chain_id": 80002, + "network": "polygon-amoy" }, "scope": [ { @@ -270,6 +276,9 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver } ``` + + + ## In - Operator 4 **Credential Schema** @@ -296,10 +305,10 @@ const proofRequest: protocol.ZKPRequest = { "https://raw.githubusercontent.com/0xPolygonID/tutorial-examples/main/credential-schema/schemas-examples/proof-of-dao-role/proof-of-dao-role.jsonld", credentialSubject: { role: { - $in: [4, 5], - }, - }, - }, + $in: [4, 5] + } + } + } }; ``` @@ -308,10 +317,7 @@ const proofRequest: protocol.ZKPRequest = { Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain - - - -**Corresponding QR Code** +Corresponding QR Code ```json { @@ -324,8 +330,8 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "transaction_data": { "contract address": "", "method_id": "b68967e2", - "chain_id": 80001, - "network": "polygon-mumbai" + "chain_id": 80002, + "network": "polygon-amoy" }, "scope": [ { @@ -347,6 +353,9 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver } ``` + + + ## Not-in - Operator 5 **Credential Schema** @@ -371,9 +380,9 @@ const proofRequest: protocol.ZKPRequest = { credentialSubject: { countryCode: { $nin: [840, 120, 340, 509], - }, - }, - }, + } + } + } }; ``` @@ -382,10 +391,7 @@ const proofRequest: protocol.ZKPRequest = { Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain - - - -**Corresponding QR Code** +Corresponding QR Code ```json { @@ -398,8 +404,8 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "transaction_data": { "contract address": "", "method_id": "b68967e2", - "chain_id": 80001, - "network": "polygon-mumbai" + "chain_id": 80002, + "network": "polygon-amoy" }, "scope": [ { @@ -420,6 +426,10 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver } } ``` + + + + ## Not-equal - Operator 6 @@ -445,10 +455,10 @@ const proofRequest: protocol.ZKPRequest = { "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", credentialSubject: { countryCode: { - $ne: 840, - }, - }, - }, + $ne: 840 + } + } + } }; ``` @@ -457,10 +467,167 @@ const proofRequest: protocol.ZKPRequest = { Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain +Corresponding QR Code + +```json +{ + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/proofs/1.0/contract-invoke-request", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "body": { + "reason": "airdrop participation", + "transaction_data": { + "contract address": "", + "method_id": "b68967e2", + "chain_id": 80002, + "network": "polygon-amoy" + }, + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQuerySigV2OnChain", + "query": { + "allowedIssuers": ["*"], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + "credentialSubject": { + "countryCode": { + "$ne": 840 + } + }, + "type": "KYCCountryOfResidenceCredential" + } + } + ] + } +} +``` + + + + + +:::info + +Operators 7-11 are supported only by [V3 circuit](../v3-circuit.md) +::: + + +## Less-than-equal - Operator 7 + +**Credential Schema** + +The `KYCCountryOfResidenceCredential` Schema encodes the countryCode of residence of the credential subject according to the [ISO Standard](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). Here's the [JSON-LD Context](https://github.com/iden3/claim-schema-vocab/blob/main/schemas/json-ld/kyc-v4.jsonld) of the Schema Type. + +**Query** + +When presented with this query, the user must prove that he/she has been born before or including 2001/01/01 + + + + +```ts +const proofRequest: protocol.ZKPRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCCountryOfResidenceCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + credentialSubject: { + birthday: { + $lte: 20010101 + } + } + } +}; +``` + + + + +Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain + + +Corresponding QR Code + +```json +{ + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/proofs/1.0/contract-invoke-request", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "body": { + "reason": "airdrop participation", + "transaction_data": { + "contract address": "", + "method_id": "b68967e2", + "chain_id": 80002, + "network": "polygon-amoy" + }, + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQuerySigV2OnChain", + "query": { + "allowedIssuers": ["*"], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + "credentialSubject": { + "birthday": { + "$lte": 20010101 + } + }, + "type": "KYCCountryOfResidenceCredential" + } + } + ] + } +} +``` + -**Corresponding QR Code** + +## Greater-than-equal - Operator 8 + +**Credential Schema** + +The `KYCCountryOfResidenceCredential` Schema encodes the countryCode of residence of the credential subject according to the [ISO Standard](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). Here's the [JSON-LD Context](https://github.com/iden3/claim-schema-vocab/blob/main/schemas/json-ld/kyc-v4.jsonld) of the Schema Type. + +**Query** + +When presented with this query, the user must prove that he/she has been born after or including 2001/01/01 + + + + +```ts +const proofRequest: protocol.ZKPRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCCountryOfResidenceCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + credentialSubject: { + birthday: { + $gte: 20010101 + } + } + } +}; +``` + + + + +Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain + + +Corresponding QR Code ```json { @@ -473,8 +640,240 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "transaction_data": { "contract address": "", "method_id": "b68967e2", - "chain_id": 80001, - "network": "polygon-mumbai" + "chain_id": 80002, + "network": "polygon-amoy" + }, + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQuerySigV2OnChain", + "query": { + "allowedIssuers": ["*"], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + "credentialSubject": { + "birthday": { + "$gte": 20010101 + } + }, + "type": "KYCCountryOfResidenceCredential" + } + } + ] + } +} +``` + + + + + +## Between - Operator 9 + +**Credential Schema** + +The `KYCCountryOfResidenceCredential` Schema encodes the countryCode of residence of the credential subject according to the [ISO Standard](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). Here's the [JSON-LD Context](https://github.com/iden3/claim-schema-vocab/blob/main/schemas/json-ld/kyc-v4.jsonld) of the Schema Type. + +**Query** + +When presented with this query, the user must prove that he/she has been born before 2001/01/01, but after 1996/01/01 + + + + +```ts +const proofRequest: protocol.ZKPRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCCountryOfResidenceCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + credentialSubject: { + birthday: { + $between: [19960101, 20010101] + } + } + } +}; +``` + + + + +Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain + + +Corresponding QR Code + +```json +{ + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/proofs/1.0/contract-invoke-request", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "body": { + "reason": "airdrop participation", + "transaction_data": { + "contract address": "", + "method_id": "b68967e2", + "chain_id": 80002, + "network": "polygon-amoy" + }, + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQuerySigV2OnChain", + "query": { + "allowedIssuers": ["*"], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + "credentialSubject": { + "birthday": { + "$between": [19960101, 20010101] + } + }, + "type": "KYCCountryOfResidenceCredential" + } + } + ] + } +} +``` + + + + + +## Non-between - Operator 10 + +**Credential Schema** + +The `KYCCountryOfResidenceCredential` Schema encodes the countryCode of residence of the credential subject according to the [ISO Standard](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). Here's the [JSON-LD Context](https://github.com/iden3/claim-schema-vocab/blob/main/schemas/json-ld/kyc-v4.jsonld) of the Schema Type. + +**Query** + +When presented with this query, the user must prove that he/she has been born not after 1996/01/01 and and not till 2001/01/01 + + + + +```ts +const proofRequest: protocol.ZKPRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCCountryOfResidenceCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + credentialSubject: { + birthday: { + $nonbetween: [19960101, 20010101] + } + } + } +}; +``` + + + + +Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain + + +Corresponding QR Code + +```json +{ + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/proofs/1.0/contract-invoke-request", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "body": { + "reason": "airdrop participation", + "transaction_data": { + "contract address": "", + "method_id": "b68967e2", + "chain_id": 80002, + "network": "polygon-amoy" + }, + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQuerySigV2OnChain", + "query": { + "allowedIssuers": ["*"], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + "credentialSubject": { + "birthday": { + "$nonbetween": [19960101, 20010101] + } + }, + "type": "KYCCountryOfResidenceCredential" + } + } + ] + } +} +``` + + + + + +## Exists - Operator 11 + +**Credential Schema** + +Credential schema can have optional fields, so W3C Verifiable Credential can / can not have a specific field. + +**Query** + +When presented with this query, the user must prove that document field exists / does not exists in the credential. +Possible values for `$exists` operator are `true` and `false`. + + + + +```ts +const proofRequest: protocol.ZKPRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCCountryOfResidenceCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + credentialSubject: { + countryCode: { + $exists: true + } + } + } +}; +``` + + + + +Please, check out our [Onchain verification tutorial to build a query](/docs/verifier/on-chain-verification/overview.md) to learn more how to set zk request for onchain + + +Corresponding QR Code + +```json +{ + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/proofs/1.0/contract-invoke-request", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "body": { + "reason": "airdrop participation", + "transaction_data": { + "contract address": "", + "method_id": "b68967e2", + "chain_id": 80002, + "network": "polygon-amoy" }, "scope": [ { @@ -485,7 +884,7 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", "credentialSubject": { "countryCode": { - "$ne": 840 + "$exists": true } }, "type": "KYCCountryOfResidenceCredential" @@ -495,6 +894,32 @@ Please, check out our [Onchain verification tutorial to build a query](/docs/ver } } ``` + + + + + +## Proof of credential issuance ($noop) + +By not including the credentialSubject in the query, a verifier requests proof of the presence of a credential in the user's wallet without requiring any condition to be met or revealing any specific detail about the credential. + +**Query** + +In the example below, the verifier doesn't include credential subject. + +```ts "Off-chain" +const proofRequest: protocol.ZKPRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCCountryOfResidenceCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld" + } +}; +``` + ## Selective Disclosure @@ -514,11 +939,11 @@ const proofRequest: protocol.ZKPRequest = { context: "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", credentialSubject: { - countryCode: {}, - }, - }, + countryCode: {} + } + } }; -``` +```` ## Multi query @@ -530,7 +955,7 @@ In the example below, the verifier requests two different proof queries in the s "typ": "application/iden3comm-plain-json", "type": "https://iden3-communication.io/authorization/1.0/request", "thid": "f8aee09d-f592-4fcc-8d2a-8938aa26676c", - "from": "did:polygonid:polygon:mumbai:2qFroxB5kwgCxgVrNGUM6EW3khJgCdHHnKTr3VnTcp", + "from": "did:polygonid:polygon:amoy:2qFroxB5kwgCxgVrNGUM6EW3khJgCdHHnKTr3VnTcp", "body": { "callbackUrl": "https://test.com/callback", "reason": "age verification", diff --git a/docs/verifier/verifier-backend.md b/docs/verifier/verifier-backend.md index 567583a7..0286fdd8 100644 --- a/docs/verifier/verifier-backend.md +++ b/docs/verifier/verifier-backend.md @@ -3,7 +3,7 @@ id: verifier-backend title: Verifier Backend API sidebar_label: Verifier Backend API description: Verifier Backend API. -keywords: +keywords: - docs - polygon id - ID holder @@ -16,38 +16,33 @@ The [Verifier Backend](https://github.com/0xPolygonID/verifier-backend) project It is built using libraries developed by the iden3 protocol team. Below, we'll explain how to install it using Docker and how it can be used to perform zero knowledge proofs. -You can try our [Verifier Backend API](https://verifier-backend.polygonid.me/) running. +You can try our [Verifier Backend API](https://verifier-backend.polygonid.me/) running. ## Local Installation - To run the verifier backend with Docker, after cloning the code from the repository, simply follow these steps: -1. Create a file named `resolvers_settings.yaml`, using the `resolvers_settings_samples.yaml` file as a base. In this file, configure only your RPC for the Polygon Mumbai and Main networks, i.e., the two variables named `networkURL`. - +1. Create a file named `resolvers_settings.yaml`, using the `resolvers_settings_samples.yaml` file as a base. In this file, configure only your RPC for the Polygon Amoy and Main networks, i.e., the two variables named `networkURL`. ```yaml polygon: - mumbai: - contractAddress: 0x134B1BE34911E39A8397ec6289782989729807a4 - networkURL: https://polygon-mumbai.g.alchemy.com/v2/xa + amoy: + contractAddress: 0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124 + networkURL: https://polygon-amoy.g.alchemy.com/v2/ main: contractAddress: 0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D networkURL: https://polygon-mainnet.g.alchemy.com/v2/X2 ``` 2. Create a .env file (you can use the .env-sample file as a base). - ```shell VERIFIER_BACKEND_HOST=https://your-public-ip VERIFIER_BACKEND_PORT=3010 VERIFIER_BACKEND_KEY_DIR=./keys VERIFIER_IPFS_URL=https://gateway.pinata.cloud -VERIFIER_BACKEND_MUMBAI_SENDER_DID=did:polygonid:polygon:mumbai:2qH7TstpRRJHXNN4o49Fu9H2Qismku8hQeUxDVrjqT +VERIFIER_BACKEN_AMOY_SENDER_DID=did:polygonid:polygon:amoy:2qH7TstpRRJHXNN4o49Fu9H2Qismku8hQeUxDVrjqT VERIFIER_BACKEND_MAIN_SENDER_DID=did:polygonid:polygon:main:2q4Q7F7tM1xpwUTgWivb6TgKX3vWirsE3mqymuYjVv VERIFIER_BACKEND_RESOLVER_SETTINGS_PATH=./resolvers_settings.yaml ``` - From this file, it's important and necessary to modify the following variable: - ```shell VERIFIER_BACKEND_HOST: must be the public IP of the machine where the verifier backend is running. ``` @@ -56,118 +51,124 @@ VERIFIER_BACKEND_HOST: must be the public IP of the machine where the verifier b If everything went well, you will be able to see the API documentation at: `https://your-public-ip/` -### Alternative 1 +### Alternative 1 The following image shows the simplest flow to generate a QR code to request a ZK Proof as a verifier:
+ The endpoint `/sign-in` allows creating that QR code and configuring the backend to later validate the proof. A possible body for this endpoint could be the following: ```json { "chainID": "80001", "circuitID": "credentialAtomicQuerySigV2", - "skipClaimRevocationCheck": false, + "skipClaimRevocationCheck": false, "query": { "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld", "allowedIssuers": ["*"], "type": "KYCAgeCredential", "credentialSubject": { - "birthday": { - "$eq": 19960424 - } + "birthday": { + "$eq": 19960424 + } } } } ``` - Keep in mind that: -- the `chainID` field can be 80001 for Mumbai or 137 for the Mainnet. +- the `chainID` field can be 80002 for Amoy or 137 for the Mainnet. - the `circuitID` field can be `credentialAtomicQuerySigV2` (for signature proofs) or `credentialAtomicQueryMTPV2` (for MTP proofs). This endpoint will respond with a similar response to the following: ```json { - "qrCode": { - "body": { - "callbackUrl": "https://your-public-ip/callback?sessionID=975903", - "reason": "test flow", - "scope": [ - { - "circuitId": "credentialAtomicQuerySigV2", - "id": 1, - "query": { - "allowedIssuers": ["*"], - "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld", - "credentialSubject": { - "birthday": { - "$eq": 19960424 - } - }, - "skipClaimRevocationCheck": false, - "type": "KYCAgeCredential" - } - } - ] + "qrCode": { + "body": { + "callbackUrl": "https://your-public-ip/callback?sessionID=975903", + "reason": "test flow", + "scope": [ + { + "circuitId": "credentialAtomicQuerySigV2", + "id": 1, + "query": { + "allowedIssuers": [ + "*" + ], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld", + "credentialSubject": { + "birthday": { + "$eq": 19960424 + } + }, + "skipClaimRevocationCheck": false, + "type": "KYCAgeCredential" + } + } + ] + }, + "from": "did:polygonid:polygon:amoy:2qH7TstpRRJHXNN4o49Fu9H2Qismku8hQeUxDVrjqT", + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/authorization/1.0/request" }, - "from": "did:polygonid:polygon:mumbai:2qH7TstpRRJHXNN4o49Fu9H2Qismku8hQeUxDVrjqT", - "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", - "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", - "typ": "application/iden3comm-plain-json", - "type": "https://iden3-communication.io/authorization/1.0/request" - }, - "sessionID": 975903 + "sessionID": 975903 } ``` + The value of the `qrCode` field is the one that should be displayed as a QR code to be scanned by the Polygon ID wallet. The `sessionID` should be used to check the status of the proof. To query the status of the proof, i.e., whether it was valid or not, you should call the endpoint `/status?sessionID=975903`. ### Alternative 2 - QR Store - Flow 2 allows the generation of QR codes that are sometimes more comfortable to read for certain mobile phones. +
+ In this case, after calling the '/sign-in' endpoint, you should call the '/qr-store' endpoint using as a body the response obtained from the '/sign-in' endpoint in the 'qrCode' field. For example, ```json { - "body": { - "callbackUrl": "https://your-public-ip/callback?sessionID=975903", - "reason": "test flow", - "scope": [ - { - "circuitId": "credentialAtomicQuerySigV2", - "id": 1, - "query": { - "allowedIssuers": ["*"], - "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld", - "credentialSubject": { - "birthday": { - "$eq": 19791109 + "body": { + "callbackUrl": "https://your-public-ip/callback?sessionID=975903", + "reason": "test flow", + "scope": [ + { + "circuitId": "credentialAtomicQuerySigV2", + "id": 1, + "query": { + "allowedIssuers": [ + "*" + ], + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld", + "credentialSubject": { + "birthday": { + "$eq": 19791109 + } + }, + "type": "KYCAgeCredential" + } } - }, - "type": "KYCAgeCredential" - } - } - ] - }, - "from": "did:polygonid:polygon:mumbai:2qH7TstpRRJHXNN4o49Fu9H2Qismku8hQeUxDVrjqT", - "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", - "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", - "typ": "application/iden3comm-plain-json", - "type": "https://iden3-communication.io/authorization/1.0/request" + ] + }, + "from": "did:polygonid:polygon:amoy:2qH7TstpRRJHXNN4o49Fu9H2Qismku8hQeUxDVrjqT", + "id": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", + "typ": "application/iden3comm-plain-json", + "type": "https://iden3-communication.io/authorization/1.0/request" } ``` @@ -179,6 +180,6 @@ iden3comm://?request_uri=https://your-public-ip/qr-store?id=9d5beb41-3108-4341-a This response is the one you should then display as a QR code. -### Some extra commands -To stop the verifier backend, you can execute `make stop`. The preceding command halts the Docker container. If you want to restart the verifier backend, for instance, if you updated the code, you can execute `make restart`. +### Some extra commands +To stop the verifier backend, you can execute `make stop`. The preceding command halts the Docker container. If you want to restart the verifier backend, for instance, if you updated the code, you can execute `make restart`. \ No newline at end of file diff --git a/docs/verifier/verifier-overview.md b/docs/verifier/verifier-overview.md index 549ffdd7..bcceaaa0 100644 --- a/docs/verifier/verifier-overview.md +++ b/docs/verifier/verifier-overview.md @@ -43,7 +43,7 @@ The process of verifying user information based on their credentials can happen You can quickly try out the Verification experience by following the steps below: - Download the Polygon ID Wallet App and create an Identity. - > - For Android: Polygon ID on Google Play - > - For iOS: Polygon ID on the App Store + - For Android: Polygon ID on Google Play + - For iOS: Polygon ID on the App Store - Fetch a credential from the Issuer Node UI testing environment. - Verify it on the [Demo Verifier](https://verifier-demo.polygonid.me/). diff --git a/docs/wallet/push-notification.md b/docs/wallet/push-notification.md index 0dd764ab..59ba6a11 100644 --- a/docs/wallet/push-notification.md +++ b/docs/wallet/push-notification.md @@ -50,7 +50,7 @@ Current notification flow: ```json { "@context": ["https://www.w3.org/ns/did/v1"], - "id": "did:polygonid:polygon:mumbai:2qDj9EDytmvtQP1or3FxykXGEaqSA1ss479MYHDMJc" + "id": "did:polygonid:polygon:amoy:2qDj9EDytmvtQP1or3FxykXGEaqSA1ss479MYHDMJc" } ``` @@ -75,9 +75,9 @@ You can add information about keys / authentication info optionally. Follow [thi "https://www.w3.org/ns/did/v1", "https://schema.iden3.io/core/jsonld/auth.jsonld" ], - "id": "did:polygonid:polygon:mumbai:2qDj9EDytmvtQP1or3FxykXGEaqSA1ss479MYHDMJc", + "id": "did:polygonid:polygon:amoy:2qDj9EDytmvtQP1or3FxykXGEaqSA1ss479MYHDMJc", "service": { - "id": "did:polygonid:polygon:mumbai:2qDj9EDytmvtQP1or3FxykXGEaqSA1ss479MYHDMJc#push", + "id": "did:polygonid:polygon:amoy:2qDj9EDytmvtQP1or3FxykXGEaqSA1ss479MYHDMJc#push", "type": "push-notification", "serviceEndpoint": "https://push-staging.polygonid.com/api/v1", "metadata": { diff --git a/docs/wallet/wallet-sdk/android-sdk/example-app.md b/docs/wallet/wallet-sdk/android-sdk/example-app.md index a7840a8b..9f94f400 100644 --- a/docs/wallet/wallet-sdk/android-sdk/example-app.md +++ b/docs/wallet/wallet-sdk/android-sdk/example-app.md @@ -59,11 +59,11 @@ PolygonIdSdk.init( context = context, env = EnvEntity( blockchain = "polygon", - network = "mumbai", - web3Url = "https://polygon-mumbai.infura.io/v3/", - web3RdpUrl = "wss://polygon-mumbai.infura.io/v3/", + network = "amoy", + web3Url = "https://polygon-amoy.infura.io/v3/", + web3RdpUrl = "wss://polygon-amoy.infura.io/v3/", web3ApiKey = "theApiKey", - idStateContract = "0x134B1BE34911E39A8397ec6289782989729807a4", + idStateContract = "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124", pushUrl = "https://push-staging.polygonid.com/api/v1" ), ) diff --git a/docs/wallet/wallet-sdk/android-sdk/install-android-sdk.md b/docs/wallet/wallet-sdk/android-sdk/install-android-sdk.md index 98a0cda1..37cc14e6 100644 --- a/docs/wallet/wallet-sdk/android-sdk/install-android-sdk.md +++ b/docs/wallet/wallet-sdk/android-sdk/install-android-sdk.md @@ -28,11 +28,11 @@ PolygonIdSdk.init( context = context, env = EnvEntity( blockchain = "polygon", - network = "mumbai", - web3Url = "https://polygon-mumbai.infura.io/v3/", - web3RdpUrl = "wss://polygon-mumbai.infura.io/v3/", + network = "amoy", + web3Url = "https://polygon-amoy.infura.io/v3/", + web3RdpUrl = "wss://polygon-amoy.infura.io/v3/", web3ApiKey = "theApiKey", - idStateContract = "0x134B1BE34911E39A8397ec6289782989729807a4", + idStateContract = "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124", pushUrl = "https://push-staging.polygonid.com/api/v1" ) ) diff --git a/docs/wallet/wallet-sdk/polygonid-sdk/credential/get-credential-by-id.md b/docs/wallet/wallet-sdk/polygonid-sdk/credential/get-credential-by-id.md index 994db1af..c020aed3 100644 --- a/docs/wallet/wallet-sdk/polygonid-sdk/credential/get-credential-by-id.md +++ b/docs/wallet/wallet-sdk/polygonid-sdk/credential/get-credential-by-id.md @@ -33,4 +33,4 @@ where: This method is essential for retrieving credentials based on their unique identifiers, allowing for specific operations on individual credentials within the SDK. -::: +::: \ No newline at end of file diff --git a/docs/wallet/wallet-sdk/polygonid-sdk/iden3comm/jwz.md b/docs/wallet/wallet-sdk/polygonid-sdk/iden3comm/jwz.md index 0f47a081..44465703 100644 --- a/docs/wallet/wallet-sdk/polygonid-sdk/iden3comm/jwz.md +++ b/docs/wallet/wallet-sdk/polygonid-sdk/iden3comm/jwz.md @@ -69,15 +69,15 @@ In this example, the message is the proof related to the query analysed previous "typ": "application/iden3comm-plain-json", "type": "https://iden3-communication.io/authorization/1.0/response", "thid": "7f38a193-0918-4a48-9fac-36adfdb8b542", - "from": "did:polygonid:polygon:mumbai:2qMY7xymaXWdFDt74xR1z8mYrzSYBC1VeSWw6ZhcSP", - "to": "did:polygonid:polygon:mumbai:2qDyy1kEo2AYcP3RT4XGea7BtxsY285szg6yP9SPrs", + "from": "did:polygonid:polygon:amoy:2qMY7xymaXWdFDt74xR1z8mYrzSYBC1VeSWw6ZhcSP", + "to": "did:polygonid:polygon:amoy:2qDyy1kEo2AYcP3RT4XGea7BtxsY285szg6yP9SPrs", "body": { "did_doc": { "@context": ["https://www.w3.org/ns/did/v1"], - "id": "did:polygonid:polygon:mumbai:2qMY7xymaXWdFDt74xR1z8mYrzSYBC1VeSWw6ZhcSP", + "id": "did:polygonid:polygon:amoy:2qMY7xymaXWdFDt74xR1z8mYrzSYBC1VeSWw6ZhcSP", "service": [ { - "id": "did:polygonid:polygon:mumbai:2qMY7xymaXWdFDt74xR1z8mYrzSYBC1VeSWw6ZhcSP#push", + "id": "did:polygonid:polygon:amoy:2qMY7xymaXWdFDt74xR1z8mYrzSYBC1VeSWw6ZhcSP#push", "type": "push-notification", "serviceEndpoint": "https://push-staging.polygonid.com/api/v1", "metadata": { diff --git a/docs/wallet/wallet-sdk/polygonid-sdk/proof/init-circuits-download-and-get-info-stream.md b/docs/wallet/wallet-sdk/polygonid-sdk/proof/init-circuits-download-and-get-info-stream.md index b07a8f17..8c9c8cf6 100644 --- a/docs/wallet/wallet-sdk/polygonid-sdk/proof/init-circuits-download-and-get-info-stream.md +++ b/docs/wallet/wallet-sdk/polygonid-sdk/proof/init-circuits-download-and-get-info-stream.md @@ -35,4 +35,4 @@ so far. This method is used to download the necessary circuits for proof generation. The download progress can be monitored by listening to the returned stream. -::: +::: \ No newline at end of file diff --git a/docs/wallet/wallet-sdk/polygonid-sdk/proof/is-already-downloaded-circuits-from-server.md b/docs/wallet/wallet-sdk/polygonid-sdk/proof/is-already-downloaded-circuits-from-server.md index e8255688..f3c78a5c 100644 --- a/docs/wallet/wallet-sdk/polygonid-sdk/proof/is-already-downloaded-circuits-from-server.md +++ b/docs/wallet/wallet-sdk/polygonid-sdk/proof/is-already-downloaded-circuits-from-server.md @@ -33,4 +33,4 @@ returns `true`, otherwise, it returns `false`. This method is used to avoid unnecessary downloads of the circuits for proof generation. It checks if the circuits file already exists in the local storage. -::: +::: \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 37300375..fc0a5b82 100755 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -32,7 +32,7 @@ module.exports = { announcementBar: { id: "learn_more", content: - 'New Release: First-ever implementation of Dynamic Credentials! Learn more', + 'Polygon Mumbai support ended! Please, migrate to Amoy Learn more', backgroundColor: "#20232a", textColor: "#fff", isCloseable: false, @@ -86,21 +86,25 @@ module.exports = { label: "Build", items: [ { - href: "/docs/issuer/issuer-node-ui", - label: "Issuer API+UI", + href: "/docs/issuer/issuer-overview/", + label: "Issuer", }, { href: "/docs/verifier/verifier-overview/", - label: "Verifier SDK", + label: "Verifier", }, { href: "/docs/wallet/wallet-overview/", - label: "Wallet SDK", + label: "Wallet", }, { href: "/docs/js-sdk/js-sdk-overview/", label: "JS-SDK", }, + { + href: "/docs/smart-contracts/", + label: "Smart Contracts", + } ], }, { diff --git a/main-taskdef.json b/main-taskdef.json new file mode 100644 index 00000000..56823c36 --- /dev/null +++ b/main-taskdef.json @@ -0,0 +1,89 @@ +{ + "containerDefinitions": [ + { + "name": "log_router", + "image": "grafana/fluent-bit-plugin-loki:2.9.1", + "cpu": 0, + "memoryReservation": 50, + "portMappings": [], + "essential": true, + "environment": [], + "mountPoints": [], + "volumesFrom": [], + "user": "0", + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-create-group": "true", + "awslogs-group": "firelens-container", + "awslogs-region": "eu-west-1", + "awslogs-stream-prefix": "firelens" + } + }, + "systemControls": [], + "firelensConfiguration": { + "type": "fluentbit", + "options": { + "enable-ecs-log-metadata": "true" + } + } + }, + { + "name": "tooling-prod-devs-app", + "image": "905418075675.dkr.ecr.eu-west-1.amazonaws.com/devs-ecr", + "cpu": 0, + "portMappings": [ + { + "containerPort": 80, + "hostPort": 80, + "protocol": "tcp" + } + ], + "essential": true, + "command": null, + "environment": [ + { + "name": "ENVIRONMENT", + "value": "prod" + } + ], + "mountPoints": [], + "volumesFrom": [], + "logConfiguration": { + "logDriver": "awsfirelens", + "options": { + "LabelKeys": "container_name,ecs_task_definition,source,ecs_cluster", + "Labels": "{job=\"firelens\"}", + "LineFormat": "key_value", + "Name": "grafana-loki", + "RemoveKeys": "container_id,ecs_task_arn", + "TenantID": "prod", + "Url": "http://52.31.211.156:3100/loki/api/v1/push" + } + }, + "systemControls": [] + } + ], + "requiresCompatibilities": [ + "FARGATE" + ], + "compatibilities": [ + "EC2", + "FARGATE" + ], + "inferenceAccelerators": [], + "volumes": [], + "networkMode": "awsvpc", + "memory": "2048", + "cpu": "1024", + "executionRoleArn": "arn:aws:iam::905418075675:role/tooling-prod-task-execution-role", + "family": "devs", + "taskRoleArn": "arn:aws:iam::905418075675:role/tooling-prod-task-execution-role", + "runtimePlatform": { + "operatingSystemFamily": "LINUX" + }, + "tags": [{ + "key": "Environment", + "value": "prod" + }] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 178090b4..1486906d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "classnames": "^2.3.2", "dotenv": "^16.4.4", "katex": "^0.16.9", + "prettier": "^3.2.4", "react": "^16.14.0", "react-dev-utils": "12.0.1", "react-dom": "^16.14.0", @@ -21,11 +22,6 @@ "rehype-katex": "^5.0.0", "remark-math": "^3.0.0" }, - "devDependencies": { - "husky": "^9.0.11", - "lint-staged": "^15.2.2", - "prettier": "^3.2.5" - }, "engines": { "node": ">=20", "npm": ">=10" @@ -3949,33 +3945,6 @@ "node": ">=8" } }, - "node_modules/ansi-escapes": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", - "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", - "dev": true, - "dependencies": { - "type-fest": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -4640,21 +4609,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "dev": true, - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -4687,72 +4641,6 @@ "node": ">=8" } }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dev": true, - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -5174,33 +5062,6 @@ } } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -5553,6 +5414,19 @@ "node": ">= 10" } }, + "node_modules/default-gateway/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/default-gateway/node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -5608,6 +5482,47 @@ "node": ">=8" } }, + "node_modules/default-gateway/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/default-gateway/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/default-gateway/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/default-gateway/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -6106,89 +6021,6 @@ "node": ">=0.8.x" } }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/execa/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/execa/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/express": { "version": "4.18.2", "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", @@ -6662,18 +6494,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-intrinsic": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", @@ -6693,18 +6513,6 @@ "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/github-slugger": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", @@ -7309,21 +7117,6 @@ "node": ">=10.17.0" } }, - "node_modules/husky": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", - "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", - "dev": true, - "bin": { - "husky": "bin.mjs" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -7695,18 +7488,6 @@ "node": ">=6" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -7980,204 +7761,36 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, - "node_modules/lint-staged": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", - "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", - "dev": true, - "dependencies": { - "chalk": "5.3.0", - "commander": "11.1.0", - "debug": "4.3.4", - "execa": "8.0.1", - "lilconfig": "3.0.0", - "listr2": "8.0.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.4" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" + "node": ">=6.11.5" } }, - "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "dev": true, "engines": { - "node": ">=16" + "node": ">=8.9.0" } }, - "node_modules/lint-staged/node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", - "dev": true, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, "engines": { - "node": ">=14" - } - }, - "node_modules/lint-staged/node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, - "node_modules/listr2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", - "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", - "dev": true, - "dependencies": { - "cli-truncate": "^4.0.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^6.0.0", - "rfdc": "^1.3.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/listr2/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/listr2/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/listr2/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/listr2/node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", - "dev": true - }, - "node_modules/listr2/node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dev": true, - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/listr2/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" + "node": ">=8" } }, "node_modules/lodash": { @@ -8210,135 +7823,6 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, - "node_modules/log-update": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", - "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", - "dev": true, - "dependencies": { - "ansi-escapes": "^6.2.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^7.0.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", - "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", - "dev": true, - "dependencies": { - "get-east-asian-width": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", - "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dev": true, - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -8773,33 +8257,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npm-run-path": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", - "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/nprogress": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", @@ -9247,14 +8704,6 @@ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==" }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -9289,18 +8738,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -9957,10 +9394,9 @@ } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", + "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -10244,6 +9680,19 @@ "node": ">=14" } }, + "node_modules/react-dev-utils/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/react-dev-utils/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -10309,6 +9758,47 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/react-dev-utils/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/react-dev-utils/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/react-dom": { "version": "16.14.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", @@ -11044,22 +10534,6 @@ "lowercase-keys": "^1.0.0" } }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -11077,12 +10551,6 @@ "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", - "dev": true - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -11578,25 +11046,6 @@ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, "node_modules/shell-quote": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", @@ -11688,46 +11137,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -11886,15 +11295,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", diff --git a/package.json b/package.json index 86082b14..ed791127 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "serve": "docusaurus serve", "start": "docusaurus start", "swizzle": "docusaurus swizzle", - "write-translations": "docusaurus write-translations", - "prepare": "husky install" + "write-translations": "docusaurus write-translations" }, "dependencies": { "@docusaurus/core": "^2.4.3", @@ -20,6 +19,7 @@ "classnames": "^2.3.2", "dotenv": "^16.4.4", "katex": "^0.16.9", + "prettier": "^3.2.4", "react": "^16.14.0", "react-dev-utils": "12.0.1", "react-dom": "^16.14.0", @@ -42,13 +42,5 @@ "engines": { "node": ">=20", "npm": ">=10" - }, - "devDependencies": { - "husky": "^9.0.11", - "lint-staged": "^15.2.2", - "prettier": "^3.2.5" - }, - "lint-staged": { - "*.{js,css,md}": "prettier --write" } } diff --git a/sidebars.js b/sidebars.js index 5354eec0..6b2419c2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -128,7 +128,6 @@ module.exports = { collapsed: true, items: [ "verifier/verifier-overview", - "verifier/demo-verifier", "verifier/features", { type: "category", diff --git a/src/data/content-data.js b/src/data/content-data.js index 314f5c47..21c0d380 100644 --- a/src/data/content-data.js +++ b/src/data/content-data.js @@ -13,6 +13,7 @@ export const contentData = { target: "", type: "secondary", }, + ], headVideoLink: "https://www.youtube.com/embed/i3exuUa65sE?autoplay=1&controls=0&cc_load_policy=0&showinfo=0&rel=0&modestbranding=1", @@ -30,10 +31,6 @@ export const contentData = { "Off-chain and on-chain verification.", ], tutorialsInfo: [ - { - title: "Demo Verifier", - link: "/docs/verifier/demo-verifier", - }, { title: "Verify data off-chain with Verifier SDK", link: "/docs/category/off-chain-verification", @@ -289,7 +286,7 @@ export const contentData = { { title: "How to get Test MATIC to test Polygon ID?", content: - "Go to https://faucet.polygon.technology/, select 'Mumbai', add your wallet address, and press 'Submit'.", + "Go to https://faucet.polygon.technology/, select 'AMOY', add your wallet address, and press 'Submit'.", }, ], }, diff --git a/static/img/gcm/no-domain-name.png b/static/img/gcm/no-domain-name.png index aaa0046e..bde9f313 100644 Binary files a/static/img/gcm/no-domain-name.png and b/static/img/gcm/no-domain-name.png differ diff --git a/static/img/gcm/with-domain-name.png b/static/img/gcm/with-domain-name.png index d6ddc505..39aabe98 100644 Binary files a/static/img/gcm/with-domain-name.png and b/static/img/gcm/with-domain-name.png differ diff --git a/static/img/issue-credential-6.png b/static/img/issue-credential-6.png index b6a0672f..f516f9ff 100644 Binary files a/static/img/issue-credential-6.png and b/static/img/issue-credential-6.png differ diff --git a/static/img/onchain-issuer-11.jpg b/static/img/onchain-issuer-11.jpg new file mode 100644 index 00000000..b84da690 Binary files /dev/null and b/static/img/onchain-issuer-11.jpg differ diff --git a/static/img/onchain-issuer-12.jpg b/static/img/onchain-issuer-12.jpg new file mode 100644 index 00000000..0aeb5ede Binary files /dev/null and b/static/img/onchain-issuer-12.jpg differ diff --git a/static/img/onchain-issuer-13.jpg b/static/img/onchain-issuer-13.jpg new file mode 100644 index 00000000..60124ab4 Binary files /dev/null and b/static/img/onchain-issuer-13.jpg differ diff --git a/static/img/onchain-issuer-14.png b/static/img/onchain-issuer-14.png new file mode 100644 index 00000000..b14547d9 Binary files /dev/null and b/static/img/onchain-issuer-14.png differ diff --git a/static/img/onchain-issuer-3.png b/static/img/onchain-issuer-3.png index 860ab334..41302c63 100644 Binary files a/static/img/onchain-issuer-3.png and b/static/img/onchain-issuer-3.png differ diff --git a/static/img/onchain-issuer-5.png b/static/img/onchain-issuer-5.png index 621e411c..5fd137ce 100644 Binary files a/static/img/onchain-issuer-5.png and b/static/img/onchain-issuer-5.png differ diff --git a/static/img/onchain-issuer-8.png b/static/img/onchain-issuer-8.png index b6c7f0ac..ee009d7d 100644 Binary files a/static/img/onchain-issuer-8.png and b/static/img/onchain-issuer-8.png differ diff --git a/static/img/onchain-issuer-9.png b/static/img/onchain-issuer-9.png index e94b291a..4834df94 100644 Binary files a/static/img/onchain-issuer-9.png and b/static/img/onchain-issuer-9.png differ diff --git a/static/img/query-builder.png b/static/img/query-builder.png index e98395e9..e15b8d93 100644 Binary files a/static/img/query-builder.png and b/static/img/query-builder.png differ diff --git a/static/img/quick-start-demo/qr-code.png b/static/img/quick-start-demo/qr-code.png deleted file mode 100644 index 486faab6..00000000 Binary files a/static/img/quick-start-demo/qr-code.png and /dev/null differ diff --git a/static/img/quick-start-demo/qr.png b/static/img/quick-start-demo/qr.png new file mode 100644 index 00000000..c849cea3 Binary files /dev/null and b/static/img/quick-start-demo/qr.png differ diff --git a/static/img/quick-start-demo/quick-fetch-1.jpeg b/static/img/quick-start-demo/quick-fetch-1.jpeg deleted file mode 100644 index e6b665e3..00000000 Binary files a/static/img/quick-start-demo/quick-fetch-1.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/quick-fetch-1.jpg b/static/img/quick-start-demo/quick-fetch-1.jpg new file mode 100644 index 00000000..7a4abe2c Binary files /dev/null and b/static/img/quick-start-demo/quick-fetch-1.jpg differ diff --git a/static/img/quick-start-demo/quick-fetch-2.jpeg b/static/img/quick-start-demo/quick-fetch-2.jpeg deleted file mode 100644 index ff472ba1..00000000 Binary files a/static/img/quick-start-demo/quick-fetch-2.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/quick-fetch-2.jpg b/static/img/quick-start-demo/quick-fetch-2.jpg new file mode 100644 index 00000000..7ace2bec Binary files /dev/null and b/static/img/quick-start-demo/quick-fetch-2.jpg differ diff --git a/static/img/quick-start-demo/quick-fetch-4.jpeg b/static/img/quick-start-demo/quick-fetch-4.jpeg deleted file mode 100644 index 17263a33..00000000 Binary files a/static/img/quick-start-demo/quick-fetch-4.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/quick-fetch-4.jpg b/static/img/quick-start-demo/quick-fetch-4.jpg new file mode 100644 index 00000000..4602f540 Binary files /dev/null and b/static/img/quick-start-demo/quick-fetch-4.jpg differ diff --git a/static/img/quick-start-demo/quick-fetch-6.jpeg b/static/img/quick-start-demo/quick-fetch-6.jpeg deleted file mode 100644 index c7b3a666..00000000 Binary files a/static/img/quick-start-demo/quick-fetch-6.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/quick-fetch-6.jpg b/static/img/quick-start-demo/quick-fetch-6.jpg new file mode 100644 index 00000000..03881a31 Binary files /dev/null and b/static/img/quick-start-demo/quick-fetch-6.jpg differ diff --git a/static/img/quick-start-demo/settings-amoy.jpg b/static/img/quick-start-demo/settings-amoy.jpg new file mode 100644 index 00000000..3e949346 Binary files /dev/null and b/static/img/quick-start-demo/settings-amoy.jpg differ diff --git a/static/img/quick-start-demo/settings-mumbai.jpeg b/static/img/quick-start-demo/settings-mumbai.jpeg deleted file mode 100644 index a3268e3f..00000000 Binary files a/static/img/quick-start-demo/settings-mumbai.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/verifier-home.png b/static/img/quick-start-demo/verifier-home.png new file mode 100644 index 00000000..6d272563 Binary files /dev/null and b/static/img/quick-start-demo/verifier-home.png differ diff --git a/static/img/quick-start-demo/verifier-lp.png b/static/img/quick-start-demo/verifier-lp.png deleted file mode 100644 index b2cd78f6..00000000 Binary files a/static/img/quick-start-demo/verifier-lp.png and /dev/null differ diff --git a/static/img/quick-start-demo/verifier-proof.jpeg b/static/img/quick-start-demo/verifier-proof.jpeg deleted file mode 100644 index 444f943c..00000000 Binary files a/static/img/quick-start-demo/verifier-proof.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/verifier-proof.jpg b/static/img/quick-start-demo/verifier-proof.jpg new file mode 100644 index 00000000..8a042bde Binary files /dev/null and b/static/img/quick-start-demo/verifier-proof.jpg differ diff --git a/static/img/quick-start-demo/verifier-query-1.png b/static/img/quick-start-demo/verifier-query-1.png new file mode 100644 index 00000000..93b8a6a3 Binary files /dev/null and b/static/img/quick-start-demo/verifier-query-1.png differ diff --git a/static/img/quick-start-demo/verifier-query-2.png b/static/img/quick-start-demo/verifier-query-2.png new file mode 100644 index 00000000..50e2ea3d Binary files /dev/null and b/static/img/quick-start-demo/verifier-query-2.png differ diff --git a/static/img/quick-start-demo/verifier-query-3.png b/static/img/quick-start-demo/verifier-query-3.png new file mode 100644 index 00000000..8ba67bcb Binary files /dev/null and b/static/img/quick-start-demo/verifier-query-3.png differ diff --git a/static/img/quick-start-demo/verifier-query.png b/static/img/quick-start-demo/verifier-query.png deleted file mode 100644 index 80227566..00000000 Binary files a/static/img/quick-start-demo/verifier-query.png and /dev/null differ diff --git a/static/img/quick-start-demo/verifier-request.jpeg b/static/img/quick-start-demo/verifier-request.jpeg deleted file mode 100644 index 54006340..00000000 Binary files a/static/img/quick-start-demo/verifier-request.jpeg and /dev/null differ diff --git a/static/img/quick-start-demo/verifier-request.jpg b/static/img/quick-start-demo/verifier-request.jpg new file mode 100644 index 00000000..04451e00 Binary files /dev/null and b/static/img/quick-start-demo/verifier-request.jpg differ diff --git a/static/img/quick-start-demo/verifier-validation.png b/static/img/quick-start-demo/verifier-validation.png new file mode 100644 index 00000000..95fab454 Binary files /dev/null and b/static/img/quick-start-demo/verifier-validation.png differ