Create Proof¶
Important
Before you create proof please ensure you have set revealed indexes.
Create a proof from the VC's signature, revealing only the requested messages for selective disclosure.
const nonce = Buffer.from("nonce", "utf8"); // setting up a random nonce
const nonceUint = Uint8Array.from(nonce);
const proof = await blsCreateProof({
signature,
publicKey: publicKey,
messages: vcmessages,
nonce: nonceUint,
revealed: revealedIndexes,
});