Skip to content

Commit

Permalink
Merge pull request #170 from 0xPolygonID/new-urls
Browse files Browse the repository at this point in the history
new URLs for the new brand
  • Loading branch information
0xpulkit authored Jul 3, 2024
2 parents 6eb24c9 + 638d1ec commit 5033b17
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 70 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p align="center">
<a href="https://github.com/0xPolygonID/docs/network/members"><img src="https://img.shields.io/github/forks/0xPolygonID/docs?style=social"></a>
<img src="https://img.shields.io/github/stars/0xPolygonID/docs?style=social">
<a href="https://x.com/Privado_ID"><img src="https://img.shields.io/twitter/follow/0xPolygonID.svg?style=social"></a>
<a href="https://x.com/PrivadoID"><img src="https://img.shields.io/twitter/follow/0xPolygonID.svg?style=social"></a>
<br>
<img src="https://img.shields.io/github/languages/count/0xPolygonID/docs">
<a href="https://github.com/0xPolygonID/docs/issues"><img src="https://img.shields.io/github/issues/0xPolygonID/docs"></a>
Expand Down
4 changes: 0 additions & 4 deletions docs/js-sdk/js-sdk-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,4 @@ On the Polygon ID JS SDK, you can build the following functionalities:

<br/>

:::note

As our JS SDK is still in the public beta stage, you might find a few functionalities missing or not fully updated.

:::
82 changes: 19 additions & 63 deletions docs/web-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ The tool still supports the verification of other credentials, which can be issu
- **On-Chain and Off-Chain Query Verification**: Supporting both on-chain and off-chain query verification, the Web Wallet offers flexibility to meet diverse verification needs.
- **Consistency and Accuracy**: With a standardized interface, the tool promotes uniformity across users and organizations, minimizing errors.

:::note
On-Chain Verification would be supported soon.
:::

## Getting Started

<!-- add yt video -->

You can experience a demo of the Web Wallet by visiting this [link](https://web-wallet-demo.internal-polygonid-prod.com/)
You can experience a demo of the Web Wallet by visiting this [link](https://web-wallet-demo.privado.id/)

## User Interface and Experience

Expand Down Expand Up @@ -94,6 +98,10 @@ The verification can be performed in two ways:
- [Off-Chain verification](./verifier/verification-library/verifier-library-intro)
- [On-Chain verification](./verifier/on-chain-verification/overview)

:::note
On-Chain Verification would be supported soon.
:::

:::note

The server setup for Off-Chain Verification and the Smart Contract setup for On-Chain Verification, as detailed in the provided links, remain unchanged. The only modification required is in the client side of the application. Previously, proof requests could only be shared via embedded QR codes. Now, verifiers have a new, more efficient method for requesting proofs from users by leveraging the Web Wallet.
Expand All @@ -111,18 +119,10 @@ In Case of Off-Chain Verification, once the user goes through the flow of verifi
Integrating the tool on the client side is straightforward. Simply redirect users from your application to the Web Wallet URL. This URL must include the verification request encoded in base64 in the fragment of the URL.

<Tabs>
<TabItem value="Polygon Amoy">

```bash
https://web-wallet-test.polygonid.me/#base64EncodedData
```

</TabItem>

<TabItem value="Polygon Main">
<TabItem value="Web Wallet URL">

```bash
https://web-wallet.polygonid.me/#base64EncodedData
https://wallet.privado.id/#base64EncodedData
```

</TabItem>
Expand Down Expand Up @@ -150,7 +150,7 @@ const verificationRequest = {
circuitId: "credentialAtomicQuerySigV2",
id: 1711399135,
query: {
allowedIssuers: ["*"],
allowedIssuers: ["did:iden3:privado:main:2ScrbEuw9jLXMapW3DELXBbDco5EURzJZRN1tYj7L7"],
context:
"https://raw.githubusercontent.com/anima-protocol/claims-polygonid/main/schemas/json-ld/pol-v1.json-ld",
type: "AnimaProofOfLife",
Expand All @@ -163,68 +163,24 @@ const verificationRequest = {
},
],
callbackUrl: "https://my-app.org/api/callback",
verifierDid: "did:polygonid:polygon:amoy:2qV9QXdhXXmN5sKjN1YueMjxgRbnJcEGK2kGpvk3cq",
verifierDid: "did:iden3:privado:main:28itzVLBHnMJV8sdjyffcAtWCx8HZ7btdKXxs7fJ6v",
};

// Encode the verification request to base64
const base64EncodedVerificationRequest = btoa(JSON.stringify(verificationRequest));

// Open the Polygon ID Verification Web Wallet with the encoded verification request
window.open(`https://web-wallet-test.polygonid.me/#${base64EncodedVerificationRequest}`);
```

</TabItem>

<TabItem value="On-Chain Verification">

```js
// Define the verification request
const verificationRequest = {
backUrl: "https://my-app.org/back",
finishUrl: "https://my-app.org/finish",
logoUrl: "https://my-app.org/logo.png",
name: "My app",
zkQueries: [
{
circuitId: "credentialAtomicQuerySigV2OnChain",
id: 1713976575,
query: {
allowedIssuers: ["*"],
context:
"https://raw.githubusercontent.com/anima-protocol/claims-polygonid/main/schemas/json-ld/pol-v1.json-ld",
type: "AnimaProofOfLife",
credentialSubject: {
human: {
$eq: true,
},
},
},
},
],
verifierDid: "did:polygonid:polygon:amoy:2qV9QXdhXXmN5sKjN1YueMjxgRbnJcEGK2kGpvk3cq",
transactionData: {
contractAddress: "0x62811c9e1C8b2397767779BC8ff5Ca48869a61Fc",
functionName: "submitZKPResponse",
methodId: "0xb68967e2",
chainId: 80002,
network: "polygon-amoy",
},
};
// Encode the verification request to base64
const base64EncodedVerificationRequest = btoa(JSON.stringify(verificationRequest));

// Open the Polygon ID Verification Web Wallet with the encoded verification request
window.open(`https://web-wallet-test.polygonid.me/#${base64EncodedVerificationRequest}`);
window.open(`https://wallet.privado.id/#${base64EncodedVerificationRequest}`);
```

</TabItem>
</Tabs>

:::warning "Allowed Issuers"
<!-- :::warning "Allowed Issuers"
When we use `*` in the "allowed issuers" segment (`allowedIssuers: ['*']`), we mean that we accept any entity that might have provided the credential. Even though this seems to be convenient for testing purposes, it may also be considered risky. Applying due diligence by **actually choosing trusted specific issuers** should be the best approach. Only in rare cases, a verifier would accept any issuer, so we advise not to use `*`.
:::
::: -->

`backUrl` represents the URL of your application where the user will be redirected when they click the ‘Back’ button

Expand All @@ -242,16 +198,16 @@ Currently, only one zk-query can be verified in a verification request. However,

`verifierDiD` represents the DiD of the verifier (your DID).

**For off-chain verifications only**:
<!-- **For off-chain verifications only**: -->

`callbackUrl` represents the URL of the API endpoint of your verifier backend server which handles the callback.

**For on-chain verifications only**:
<!-- **For on-chain verifications only**:
`transactionData` represents the details regarding the on-chain transaction that needs to be invoked by the Web Wallet to do the on-chain verification.
`contractAddress` represents the address of the smart contract where the zk-proof would be submitted.
`functionName` represents the name of the function that would be called on the smart contract mentioned above.
`chainID` and `network` represent the network details on which the on-chain verification would occur.
`chainID` and `network` represent the network details on which the on-chain verification would occur. -->
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ module.exports = {
"aria-label": "GitHub repository",
},
{
href: "https://x.com/Privado_ID",
href: "https://x.com/PrivadoID",
position: "right",
className: "header-twitter-link",
},
Expand Down
2 changes: 1 addition & 1 deletion src/theme/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function Footer() {

<div className="footer_sm-link-wrapper">
<a
href="https://x.com/Privado_ID"
href="https://x.com/PrivadoID"
target="_blank"
className="w-inline-block"
>
Expand Down

0 comments on commit 5033b17

Please sign in to comment.