Skip to content

Fetch credential

Important

Before the implementing Verifier please ensure you have Verifiable Credential with BbsBlsSignature2020 from the Holder.

Add Verifiable Credential (VC) and Selective Disclosure Keys

Add the selective disclosure Verifiable Credential (VC) and the specific selective disclosure keys to your codebase.

/*
Example VC :
{
  "id": "urn:262e62b7-a7cc-4429-a562-2b34b73ad37e",
  "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://schema.iden3.io/core/jsonld/iden3proofs.jsonld",
      "https://redbellynetwork.github.io/did-schema/driversLicence/credential/v1.jsonld"
  ],
  "type": [
      "VerifiableCredential",
      "DriversLicenceCredential"
  ],
  "credentialSubject": {
      "birthDate": 19530101,
      "stateOfIssuance": "QLD"
  },
  "issuer": "did:iden3:polygon:mumbai:x3LXBvzJR4vwV4kHvwSrkBP9PRNYpiLwwTisVEKrZ",
  "issuanceDate": "2023-12-26T06:11:03.426Z",
  "credentialSchema": {
      "id": "https://redbellynetwork.github.io/did-schema/driversLicence/credential/DriversLicenceCredential-v1.json",
      "type": "JsonSchema2023"
  },
  "credentialStatus": {
      "id": "https://rhs.staging.redbelly.network/node?state=b957baed869cfc9abaf2c2db5048b63778dd147a5d44d8ef6007c87f76f0940d",
      "type": "Iden3ReverseSparseMerkleTreeProof",
      "revocationNonce": 3848
  },
  "proof": {
      "type": "BbsBlsSignature2020",
      "created": "2020-04-26T04:21:07Z",
      "verificationMethod": "isN5XEv3IZRq/jYMHMrhfM44VN2pvQQnmmrank/TUaPoOlz0YugEzS4EIgVWXJXrFnZJZVtOFPdSObztbIvJajnjcVI78XYCrmnaLSWYj/U0rZr7nbq/rzrt5T5DK8K6",
      "proofPurpose": "assertionMethod",
      "proofValue": "ABAAgn+plDj/lunE7B4HF7MKf3LP4xhRA/LWwXrqVkKlk1yC7wGmZ/rP3C1JTIrRu7GBPV6GacikeDPZNa8fEwpLKeV0X8RCuhfqjEDmP7KhuzSyXaV06xz9m3jZb8Eln/xikzONqLk5tckzQIiVTyHcOXm2RYdLznCvTcWOde6x2ejMio3RuMPP/Mfd/3vC+0YughAAAAB0kTUOsiRO+5Urp1Z+2QmektCt1u4nYziE/eVV3lTQmkmhQV0frJ1k6NMIAZ00v3FtAAAAAk6A+SWRKOcHUYRZXDsYBmfRyGH3gm26rAWDFmLN5HN4Afr6NRP8fHWjNOVfDa7Q16K9yQyPKDU86LOianxTuIuIrhs1jiLV1t+vV9znH6W1IR1GTMtbztydjRH9nQ7YE2PyDPzr+FAcKZHUVmKL21EAAAAJYvcMZn0EBOfJfH22AJsptb5sZC78jigbZSeZnjOZW9UOakTB3imOR6D2aA/zQotlzndT/LfJbd+BYX+Kh/VEKB3o467CNR/CvxDN/QOGDBxyZaPwPTNGYnwpM8K+t/fjYgf5h4y1MneW0Csc02vqvOWbfRe6IW+Y4HHpjo9NYIcFXcOW9T7Zu7304FA7kQT2EgYKNSf0wTic2sozX4Y0+0fooru6ajZmv7zHMmnTPJf0UtrIwJcTNd7dNIh6lC1FH4K2kAYFYVZAzPiHNwPo+SfPTeZx9pxyt7Edm5xuBRNxVOpaalCWY13fE3BJDuvDAkT3DaAp25tOZhaKso49KRZfET9zHSHZueQ/P8wX5HUFsxqkwAAOawfHrB81qcj1",
      "nonce": "bm9uY2U="
  }
}

Example for selectiveDisclosureKeys:

["birthDate", "stateOfIssuance"];

*/
The Verifiable Credential (VC) contains information such as the credential schema, issuer details, credential status, and proof. The selectiveDisclosureKeys array specifies the attributes from the credential subject that need to be selectively disclosed in the subsequent steps.


Next Up: Create message array →