Extract details
Important
Before you extracting details to implement selective disclosure, ensure that you have added your Verifiable Credential issued (link).
Public Key and Signature¶
Extract the public key and signature from the VC proof to prepare for later verification and selective disclosure steps. This involves converting the base64-encoded public key and signature into buffers for subsequent cryptographic operations.
const vcProof = vc.proof;
const publicKey = Buffer.from(vcProof?.verificationMethod, "base64");
const signature = Buffer.from(vcProof?.proofValue, "base64");
delete vc.proof;