Dev Mode
If you don't have a valid passport or national ID to test ZKPassport with, you can enable the dev mode in the mobile app and the SDK to generate and verify proofs with mock passports.
Mock passports are signed by the Zero Knowledge Republic (ZKR), a mock issuer we use to issue mock passports for the dev mode. The root certificates (CSCs) of the ZKR are included in our certificate registry on Ethereum Sepolia. However, they won't be included in mainnet versions of our registry. All mock passport proofs have 1 as unique identifier.
Enable Dev Mode in the Mobile App
If you've just installed the app and don't have any ID loaded yet, you'll land on the welcome screen. Enable dev mode from here by long pressing the empty area just above the Scan your ID button (highlighted below).
If you already have an ID loaded, open the Settings screen instead by tapping the gear icon in the top right corner of the main "Your IDs" screen, then tap Developer Options.
In Developer Options, toggle Enable Developer Mode on. This lets you skip the passport scanning step and use simulated data.
Once enabled, mock IDs issued by the Zero Knowledge Republic (with different data and configurations) will be loaded into your "Your IDs" screen, which you can swipe through and use to generate mock proofs.
Enable Dev Mode in the SDK
To enable dev mode, set devMode to true. Without it, proofs from mock passports are considered invalid. It's available under service on the @zkpassport/ui button and as an option on request() when using the SDK directly. When you verify the proofs on your server, pass devMode: true to verify() as well.
- React
- Vanilla JS
- SDK
import { VerifyWithZKPassport } from "@zkpassport/ui/react-button";
<VerifyWithZKPassport
purpose="Your Purpose"
// Enable dev mode here
service={{ scope: "your-scope", devMode: true }}
query={{ age: { min: 18 } }}
onSuccess={({ proofs, result }) => {
// Verify on your server with verify({ ..., devMode: true })
}}
/>;
import { VerifyWithZKPassport } from "@zkpassport/ui/button";
VerifyWithZKPassport.render("#zkpassport", {
purpose: "Your Purpose",
// Enable dev mode here
service: { scope: "your-scope", devMode: true },
query: { age: { min: 18 } },
onSuccess: ({ proofs, result }) => {
// Verify on your server with verify({ ..., devMode: true })
},
});
import { ZKPassport } from "@zkpassport/sdk";
const zkPassport = new ZKPassport("your-domain.com");
const queryBuilder = await zkPassport.request({
name: "Your App Name",
logo: "https://your-domain.com/logo.png",
purpose: "Your Purpose",
scope: "your-scope",
// Enable dev mode here
devMode: true,
});