MutableVcDataModelV2 class

Represents a Verifiable Credential (VC) according to the W3C VC Data Model v1.1.

A Verifiable Credential (VC) is a digitally signed statement, issued by issuer

This class supports JSON serialization and deserialization for interoperability. Example:

MutableVcDataModelV2(
 context: [
   'https://www.w3.org/2018/credentials/v1',
   'https://schema.affinidi.com/UserProfileV1-0.jsonld'
 ],
 id: Uri.parse('uuid:123456abcd'),
 type: {'VerifiableCredential', 'UserProfile'},
 credentialSubject: [
   MutableCredentialSubject({
     'Fname': 'Fname',
     'Lname': 'Lame',
     'Age': '22',
     'Address': 'Eihhornstr'
   })
  ],
 holder: MutableHolder.uri('did:example:1'),
 credentialSchema: [
   MutableCredentialSchema(
       id: Uri.parse('https://schema.affinidi.com/UserProfileV1-0.json'),
       type: 'JsonSchemaValidator2018')
 ],
 issuanceDate: DateTime.now(),
 issuer: Issuer.uri(signer.did),
);

Constructors

MutableVcDataModelV2({MutableJsonLdContext? context, Uri? id, List<MutableCredentialSchema>? credentialSchema, List<MutableCredentialSubject>? credentialSubject, MutableIssuer? issuer, Set<String>? type, DateTime? validFrom, DateTime? validUntil, List<EmbeddedProof>? proof, List<MutableCredentialStatusV2>? credentialStatus, List<MutableRefreshServiceV2>? refreshService, List<MutableTermsOfUse>? termsOfUse, List<MutableEvidence>? evidence})
Creates a MutableVcDataModelV2 instance.
MutableVcDataModelV2.fromJson(dynamic input)
Constructs a MutableVcDataModelV2 instance from a JSON object.
factory

Properties

context MutableJsonLdContext?
The JSON-LD context for this presentation.
getter/setter pair
credentialSchema List<MutableCredentialSchema>
The schema(s) used to define the structure of the credential.
getter/setter pair
credentialStatus List<MutableCredentialStatusV2>
Credential status object to validate credentials revocation or suspension
getter/setter pair
credentialSubject List<MutableCredentialSubject>
The subject data contained in this credential.
getter/setter pair
evidence List<MutableEvidence>
Evidence supporting the claims in the credential.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id Uri?
The optional identifier for the Verifiable Credential.
getter/setter pair
issuer MutableIssuer?
The entity that issued this credential.
getter/setter pair
proof List<EmbeddedProof>
The cryptographic proof(s) created by the issuer.
getter/setter pair
refreshService List<MutableRefreshServiceV2>
service(s) for how the credential can be refreshed.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
termsOfUse List<MutableTermsOfUse>
The terms of use for the Verifiable Credential.
getter/setter pair
type Set<String>
The type definitions for this presentation.
getter/setter pair
validFrom DateTime?
The date and time at which the credential becomes effective.
getter/setter pair
validUntil DateTime?
The date and time at which the credential becomes invalid.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the MutableVcDataModelV2 instance to a JSON representation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited