CredentialWallet class
Wallet instance is a wrapper of CRUD logic for W3C credentials, also it allows to fetch revocation statuses.
CredentialWallet implements ICredentialWallet interface
Signature:
export declare class CredentialWallet implements ICredentialWallet
Implements: ICredentialWallet
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(_storage, _credentialStatusResolverRegistry) | Creates an instance of CredentialWallet. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
createCredential | (issuer: DID, request: CredentialRequest, schema: JSONSchema) => W3CCredential | Creates a W3C verifiable Credential object |
Methods
Method | Modifiers | Description |
---|---|---|
filterByCredentialSubject(credentials, subject) | Filters given credentials with given credential subject | |
findByContextType(context, type) | Finds credentials by JSON-LD schema and type | |
findById(id) | Finds the credential by its id | |
findByQuery(query) | Find credential using iden3 query language | |
findNonRevokedCredential(creds) | ||
getAuthBJJCredential(did) | Finds Auth BJJ credential for given user | |
getRevocationStatus(credStatus, credentialStatusResolveOptions) | Fetches Revocation status depended on type | |
getRevocationStatusFromCredential(cred) | Fetches or Builds a revocation status for a given credential Supported types for credentialStatus field: SparseMerkleTreeProof, Iden3ReverseSparseMerkleTreeProof | |
list() | List of W3C Credential | |
remove(id) | removes W3C credentials from data storage | |
save(credential) | saves W3C credential (upsert) | |
saveAll(credentials) | saves the batch of W3C credentials (upsert) |