Skip to content

Commit 592fa76

Browse files
authored
Merge pull request #153 from 0xPolygonID/sync-develop-and-main
Sync develop and main
2 parents 6baeea5 + 15f844a commit 592fa76

File tree

81 files changed

+1389
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1389
-1359
lines changed

.github/workflows/deployment_new_aws_account.yml

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ env:
1010
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
1111
ECR_REPOSITORY: devs-ecr
1212
ECS_SERVICE: devs-ecs-service
13-
ECS_CLUSTER:
1413

1514
jobs:
1615
deploy_prod:

.husky/.gitignore

-1
This file was deleted.

.husky/pre-commit

-4
This file was deleted.

docs/faqs/content/issuer-node-error-creating-identity-while-publishing-state-to-rhs.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@ keywords:
1414

1515
## Question
1616

17-
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?
17+
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?
1818

1919
## Answer
2020

2121
The error you're experiencing is typically due to an incorrect configuration of `ISSUER_CREDENTIAL_STATUS_RHS_MODE` and an invalid `ISSUER_CREDENTIAL_STATUS_RHS_URL`. This occurs when `ISSUER_CREDENTIAL_STATUS_RHS_MODE` is set to `OffChain`, but the provided RHS URL is not a valid endpoint.
2222

2323
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/`.
2424

25-
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:
26-
27-
- `ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT`=0x76EB7216F2400aC18C842D8C76739F3B8E619DB9
28-
- `ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID`=8001
25+
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:
26+
- `ISSUER_CREDENTIAL_STATUS_ONCHAIN_TREE_STORE_SUPPORTED_CONTRACT`=0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb
27+
- `ISSUER_CREDENTIAL_STATUS_RHS_CHAIN_ID`=80002
2928

3029
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.
3130

@@ -35,5 +34,4 @@ For a comprehensive understanding and configuration guidance, please review the
3534
Wrong answer:
3635

3736
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.
38-
3937
</div>

docs/faqs/content/issuer-node-error-no-identity-by-did-no-rows-in-result-set.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ keywords:
1515
What steps should I take if an error message says there's no identity found for a given DID?
1616

1717
```bash
18-
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
19-
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:}"
18+
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
19+
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:}"
2020
```
2121

2222
## Answer

docs/faqs/content/issuer-node-how-to-use-issuer-node-on-mainnet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ How can I configure and use the Issuer Node on the Polygon mainnet?
1616

1717
## Answer
1818

19-
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.
19+
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.
2020

2121
To configure the Issuer Node for mainnet operation, adjust the following environment variables within your `.env-issuer` file:
2222

docs/faqs/content/issuer-node-reusing-issuer-did.md

-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ If you **have not deleted the database** and wish to reuse a previously configur
2222
Wrong answer:
2323

2424
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.
25-
2625
</div>

docs/faqs/content/verifier-credential-verification-cross-environment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Yes, credentials issued in any environment—on-chain or off-chain—can be veri
2323

2424
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.
2525

26-
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.
26+
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.
2727

2828
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.
2929

docs/issuer-node/install-gcm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To install the issuer node through the [Google Cloud Marketplace](https://consol
2323

2424
:::note
2525

26-
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**.
26+
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**.
2727

2828
:::
2929

docs/issuer-node/install-kubernetes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export ISSUERNAME="My Issuer"
6565
export ISSUER_ETHERUM_URL="https://polygon-network.XXXX"
6666
export INGRESS_ENABLED=true
6767
export VAULT_PWD=password
68-
export RHS_MODE=None
68+
export RHS_MODE=None
6969
export RHS_URL="https://reverse-hash-service.com"
7070
```
7171

@@ -142,7 +142,7 @@ export ISSUERNAME="My Issuer"
142142
export ISSUER_ETHERUM_URL="https://polygon-network.XXXX"
143143
export INGRESS_ENABLED=false
144144
export VAULT_PWD=password
145-
export RHS_MODE=None
145+
export RHS_MODE=None
146146
export RHS_URL="https://reverse-hash-service.com"
147147
```
148148

docs/issuer-node/issue-credential-cli.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ curl --location 'http://localhost:3001/v1/identities' \
4242
"didMetadata":{
4343
"method": "polygonid",
4444
"blockchain":"polygon",
45-
"network": "mumbai"
45+
"network": "amoy"
4646
}
4747
}';
4848

4949
# Expected Output:
50-
# {"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"}}
50+
# {"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"}}
5151
```
5252

5353
### (Optional) View Existing DIDs (connections)
@@ -72,12 +72,12 @@ curl --location --request GET 'http://localhost:3001/v1/identities' \
7272
"did_metadata":{
7373
"method": "polygonid",
7474
"blockchain":"polygon",
75-
"network": "mumbai"
75+
"network": "amoy"
7676
}
7777
}';
7878

7979
# Expected Output (Results may vary based on number of DIDs created):
80-
# ["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"]
80+
# ["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"]
8181
```
8282

8383
### Creating Credentials
@@ -103,14 +103,14 @@ The issuer node DID can be retrieved by looking at `.env-api` for `ISSUER_API_UI
103103
:::
104104

105105
```bash
106-
curl --location 'http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims' \
106+
curl --location 'http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims' \
107107
--header 'Authorization: Basic dXNlci1pc3N1ZXI6cGFzc3dvcmQtaXNzdWVy' \
108108
--header 'Content-Type: application/json' \
109109
--data '{
110110
"credentialSchema":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json",
111111
"type": "KYCAgeCredential",
112112
"credentialSubject": {
113-
"id": "did:polygonid:polygon:mumbai:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq",
113+
"id": "did:polygonid:polygon:amoy:2qEsg1AeTohAq6Euc3hBaDapfLVfQiWS7DUfvutYEq",
114114
"birthday": 19960424,
115115
"documentType": 2
116116
}
@@ -133,11 +133,11 @@ You can always check the created credentials on the Issuer Node UI.
133133
Using the previously generated credential ID from [Creating Credentials](#creating-credentials).
134134

135135
```bash
136-
curl --location --request GET 'http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005' \
136+
curl --location --request GET 'http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005' \
137137
--header 'Authorization: Basic dXNlci1pc3N1ZXI6cGFzc3dvcmQtaXNzdWVy';
138138

139139
# Expected Output:
140-
# {"@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":"....
140+
# {"@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":"....
141141
```
142142

143143
### 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
155155
In order to get the credential on the Polygon ID App, the credential QR Code payload is needed.
156156

157157
```bash
158-
curl --location 'http://localhost:3001/v1/did:polygonid:polygon:mumbai:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005/qrcode' \
158+
curl --location 'http://localhost:3001/v1/did:polygonid:polygon:amoy:2qPdb2hNczpXhkTDXfrNmmt9fGMzfDHewUnqGLahYE/claims/b1eab5be-dea3-11ed-8f7d-0242ac1e0005/qrcode' \
159159
--header 'Authorization: Basic dXNlci1pc3N1ZXI6cGFzc3dvcmQtaXNzdWVy';
160160

161161
# Expected Output:
162-
# {"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"}
162+
# {"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"}
163163
```
164164

165165
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.
170170

171171
!["Polygon ID App Adding Credential"](/img/polygonid-app-claim.png)
172172

173-
### Verifying Credential
173+
<!-- ### Verifying Credential
174174
175175
:::note
176176
@@ -186,6 +186,6 @@ A quick way to validate this KYCAge Claim is to use [https://verifier-demo.polyg
186186
187187
!["Polygon ID App Generating Proof"](/img/polygonid-app-proof.png)
188188
189-
!["Verifier Proof Verified"](/img/verifier-success-verified.png)
189+
!["Verifier Proof Verified"](/img/verifier-success-verified.png) -->
190190

191191
---

0 commit comments

Comments
 (0)