zkPass credentials
Wallet Users
Request zkPass credential
Example code
const did = "..."; // Verida Did
// Get message object from verida context
const messaging = await context.getMessaging();
// setup a callback to show the response
await messaging.onMessage((data) => {
// This callback should be called once user shares credential
console.log('Received credentials: ', data);
});
const messageType = "inbox/type/dataRequest";
const config = {
did,
recipientContextName: "Verida: Vault",
};
const dataToSend = {
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 to
const requestFromDID = did;
const messageSubject = "Please select your verifiable credential to verify",
const res = await messaging.send(
requestFromDID,
messageType,
dataToSend,
msg.messageSubject,
config
);
console.log("Request sent");
Issuing a zkPass credential
Available zkPass schemas
Example code


Verifying a zkPass credential

Example code
Last updated
Was this helpful?