Create a new ZK identity
Provider identifier (e.g., "github:12345", "discord:67890")
Optionalsecret: stringOptional secret (will be generated if not provided)
WARNING: Keep the secret secure! Store it encrypted in local storage. If lost, you cannot create attestations for this commitment.
Create an anonymous attestation transaction
This proves you have a valid identity commitment in the Merkle tree without revealing which one. Uses ZK-SNARKs for privacy.
Node RPC URL
Context string for this attestation (e.g., "dao_vote_123")
Attestation transaction payload
NOTE: Each context can only be used once per identity (nullifier prevents reuse)
Create a commitment transaction to submit to the node
This adds your commitment to the global Merkle tree. You must submit this transaction before you can create attestations.
Node RPC URL
Commitment transaction payload
StaticgenerateGenerate a fresh identity with random secret
Provider identifier
New ZKIdentity instance
StaticimportImport identity from backup
Exported identity data
New ZKIdentity instance
StaticverifyVerify an attestation locally (optional - for testing)
Attestation payload to verify
True if valid
NOTE: Node will verify proofs server-side, this is mainly for debugging
ZKIdentity class for privacy-preserving identity attestations
Example