The Verida Wallet supports zkPass verifiable credentials. This allows users to receive and store zkPass credentials as well as reply to proof requests in a privacy-preserving way thanks to zkPass technology.
Users can install the Verida Wallet to receive verifiable credentials from Issuers using the Zero Knowledge technology. These credentials are stored in your Vault (your private and secured storage space on the Verida Network) and therefore shown in the Verida Wallet alongside other credentials.
Verifiers can also send you zkPass proof requests. The Verida Wallet will automatically generate the Zero-Knowledge proof (ZKP) for you and send it to the Verifier. The Zero-Knowledge proof means no data is actually shared with the Verifier, only the fact that you have a valid credential satisfying the request.
constdid="..."; // Verida Did// Get message object from verida contextconstmessaging=awaitcontext.getMessaging();// setup a callback to show the responseawaitmessaging.onMessage((data) => {// This callback should be called once user shares credentialconsole.log('Received credentials: ', data); });constmessageType="inbox/type/dataRequest";constconfig= { did, recipientContextName:"Verida: Vault", };constdataToSend= { requestSchema:"https://common.schemas.verida.io/credential/base/v0.2.0/schema.json", filter: { $or: [ { credentialSchema:"https://common.schemas.verida.io/credential/zkpass/v0.1.0/schema.json" } ] }, userSelect:true, };// This is the DID the message will go toconstrequestFromDID= did;constmessageSubject="Please select your verifiable credential to verify",const res =awaitmessaging.send( requestFromDID, messageType, dataToSend,msg.messageSubject, config );console.log("Request sent");
If you don't have credentials in your Verida Wallet, you can issue zkPass credential through the proof-connector. You need to provide veridaDid where generated credential will go to in the url. For example, the url can be like this:
import TransgateConnect from"@zkpass/transgate-js-sdk";// You can create your own app in zkPass dashboard.constZKPASS_APP_ID="bced693b-bedc-464c-8250-566743ff5855";// The schema Id for Uber account ownership verificationconstschemaId="ef39adb26c88439591279e25e7856b61";// Create the connector instanceconstconnector=newTransgateConnect(ZKPASS_APP_ID);// Check if the TransGate extension is installed// If it returns false, please prompt to install it from chrome web storeconstisAvailable=awaitconnector.isTransgateAvailable();if (isAvailable) {constres=awaitconnector.launch(schemaId);return res;} else {thrownewError("You need to install zkPass extension");}
It will redirect you to the platform (For example: Binance) and once you click Start button in TransGate extension, the the process should start.
The proof-connector can verify a zero-knowledge proof generated from a zkPass credential stored in the user's Verida Wallet. More information is available in the zkPass Verification documentation.