credentials
library
Functions
-
-
buildPlaintextCredential(dynamic credential, String? holderDid, {bool addHashAlg = true})
→ String
-
Builds a json-Object where every Attribute gets a value and salt from json-Object
credential
.
-
buildPresentation(List? credentials, WalletStore wallet, String challenge, {String? holder, String? domain, List<String>? additionalDids, List? disclosedCredentials, dynamic loadDocumentFunction(Uri url, LoadDocumentOptions? options) = loadDocumentStrict})
→ Future<String>
-
Builds a presentation for
credentials
.
-
buildPresentationDefinitionForCredential(dynamic credential)
→ PresentationDefinition
-
Build a Presentation definition to e.g. propose the given
credential
for presentation.
-
buildProofOptions({required SignatureType type, required String verificationMethod, String? domain, String? challenge})
→ String
-
-
buildW3cCredentialwithHashes(dynamic credential, String? issuerDid, {dynamic type, dynamic context, dynamic issuerInformation, DateTime? validUntil, String? revocationRegistryAddress})
→ String
-
Builds a credential conform to W3C-Standard, which includes all hashes a
plaintext-credential
credential
contains.
-
checkForRevocation(dynamic credential, {Erc1056? erc1056, RevocationRegistry? revocationRegistry})
→ Future<bool>
-
-
compareW3cCredentialAndPlaintext(dynamic w3cCred, dynamic plaintext)
→ bool
-
Checks weather a W3C-Credential containing all attribute hashes belongs to a Plaintext Credential or not.
-
discloseValues(dynamic plaintextCredential, List<String> valuesToDisclose)
→ String
-
Discloses all values in
valuesToDisclose
of plaintextCredential
.
-
getAllJsonPathsOfCredential(dynamic w3cCredential)
→ List<String>
-
Returns all json-paths of the relevant keys used in the credentialSubject-part of a
w3cCredential
.
-
getDidFromSignature(String jws, {String? toSign, Erc1056? erc1056})
→ Future<String>
-
Extracts the did used for signing
jws
.
-
getHolderDidFromCredential(dynamic credential)
→ String
-
Collects the did of the Holder of
credential
.
-
getIssuerDidFromCredential(dynamic credential)
→ String
-
Collects the did of the issuer of a
credential
.
-
loadDocumentFast(Uri url, LoadDocumentOptions? options)
→ Future<RemoteDocument>
-
-
loadDocumentStrict(Uri url, LoadDocumentOptions? options)
→ RemoteDocument
-
-
mergeSdJwt(String sdJwt)
→ Map<String, dynamic>
-
-
searchCredentialsForPresentationDefinition(List credentials, PresentationDefinition presentationDefinition)
→ List<FilterResult>
-
-
signCredential(WalletStore wallet, dynamic credentialToSign, {String? challenge, Signer? signer, dynamic loadDocumentFunction(Uri url, LoadDocumentOptions? options) = loadDocumentStrict})
→ Future<String>
-
Signs a W3C-Standard conform
credentialToSign
with the private key for issuer-did in the credential using linked data proof.
-
signStringOrJson({WalletStore? wallet, String? didToSignWith, Map<String, dynamic>? jwk, required dynamic toSign, Signer? signer, bool detached = false, })
→ Future<String>
-
Signs the given String (normal or Json-Object) or Json-Object (Dart Map<String, dynamic>)
toSign
with key-pair of didToSignWith
.
-
verifyCredential(dynamic credential, {Erc1056? erc1056, RevocationRegistry? revocationRegistry, String? expectedChallenge, Signer signerSelector(String typeMatch, dynamic loadDocumentFunction(Uri url, LoadDocumentOptions? options)) = _determineSignerForType, dynamic loadDocumentFunction(Uri url, LoadDocumentOptions? options) = loadDocumentStrict, Map<String, dynamic>? issuerJwk})
→ Future<bool>
-
Verifies the signature for the given
credential
.
-
verifyPresentation(dynamic presentation, String challenge, {Erc1056? erc1056, RevocationRegistry? revocationRegistry, Signer? signer, Signer signerSelector(String typeMatch, dynamic loadDocumentFunction(Uri url, LoadDocumentOptions? options)) = _determineSignerForType, dynamic loadDocumentFunction(Uri url, LoadDocumentOptions? options) = loadDocumentStrict, Future<DidDocument> didResolver(String) = resolveDidDocument, Map<String, Map<String, dynamic>>? issuerJwks})
→ Future<bool>
-
Verifies the
presentation
.
-
verifyStringSignature(String jws, {String? expectedDid, Map<String, dynamic>? jwk, dynamic toSign, Erc1056? erc1056})
→ Future<bool>
-
Verifies the signature in
jws
.