⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

identity_verifyCredential

identity_verifyCredential validates a zkSBT proof against issuer schemas and revocation registries, returning a verdict that can be enforced inside off-chain policy engines.

Parameters

ParameterTypeRequiredDescription
proofstringYesBase64 or hex-encoded proof generated via zk_generateProof.
schemaIdstringYesIdentifier of the credential schema.
publicInputsarrayYesOrdered public inputs committed during proof generation.
proveKeyRefstringOptionalReference to the Prove Key expected by the verifier.
atstringOptionalBlock hash to verify state at a specific height.

Returns

FieldTypeDescription
validbooleantrue when the proof satisfies schema constraints and revocation checks.
reasonstringOptional error message when validation fails.
issuerstringDID of the issuing entity for auditing.
revocationStateobjectSnapshot of revocation data consulted during verification.

Request Example

{
"jsonrpc": "2.0",
"method": "identity_verifyCredential",
"params": [{
"proof": "0x8f4c...",
"schemaId": "zksbt:kyc-tier2",
"publicInputs": ["0x01", "0x6f36..."],
"proveKeyRef": "ipfs://bafkreihd...",
"at": "0x3b5dcb0d26f0a21cb88d5df4fe7e88f7a8e50a6b9c6e3a57306d98e010ce4081"
}],
"id": 42
}

Usage Patterns

  • Gate access to permissioned DeFi pools by requiring a valid KYC credential at execution time.
  • Enforce jurisdiction limits by embedding country codes inside schema public inputs.
  • Record audit logs whenever valid is true, including block hash and issuer DID for regulators.

Errors

CodeMeaningFix
-42001Proof invalidRegenerate the proof with the latest Prove Key artifacts.
-42002Credential revokedNotify the user to re-run KYC and mint a fresh zkSBT.
-32602Invalid paramsEnsure publicInputs order matches schema expectations.

Combine identity_verifyCredential with state_getStorage to build verifiable compliance reports per jurisdiction.