StatusList2021Credential constructor

StatusList2021Credential({
  1. String? subjectId,
  2. required BitString revocationList,
  3. required CredentialStatus2021Purpose statusPurpose,
  4. required String id,
  5. required DateTime issuanceDate,
  6. dynamic issuer,
  7. required DateTime expirationDate,
})

Implementation

StatusList2021Credential(
    {String? subjectId,
    required BitString revocationList,
    required this.statusPurpose,
    required super.id,
    required super.issuanceDate,
    super.issuer,
    required super.expirationDate})
    : super(
          subjectId: subjectId,
          revocationList: revocationList) {
  type = ["VerifiableCredential", "StatusList2021Credential"];
  context = [credentialsV1Iri, statusList2021ContextIri];
  credentialSubject = {
    'type': 'StatusList2021',
    'statusPurpose': statusPurpose.value,
    'encodedList': revocationList.toEncodedString()
  };
  if (subjectId != null) {
    credentialSubject['id'] = subjectId;
  }
}