RevocationList2020Credential constructor

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

Implementation

RevocationList2020Credential(
    {this.subjectId,
    required this.revocationList,
    required String super.id,
    required super.issuanceDate,
    super.issuer,
    required DateTime super.expirationDate})
    : super(
          context: [credentialsV1Iri, revocationList202ContextIri],
          type: ["VerifiableCredential", "RevocationList2020Credential"],
          credentialSubject: {}) {
  credentialSubject = {
    'type': 'RevocationList2020',
    'encodedList': revocationList.toEncodedString()
  };
  if (subjectId != null) {
    credentialSubject['id'] = subjectId;
  }
}