Skip to content

Class: CacheClient

modules/cache-client.CacheClient

Implements

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new CacheClient(_signerService)

Parameters

Name Type
_signerService SignerService

Accessors

http

get http(): AxiosInstance

Returns

AxiosInstance

Methods

addDIDToWatchList

addDIDToWatchList(did): Promise<void>

Parameters

Name Type
did string

Returns

Promise<void>

Implementation of

ICacheClient.addDIDToWatchList


addStatusToCredential

addStatusToCredential(credential): Promise<Credential<RoleCredentialSubject> & { credentialStatus: StatusList2021Entry }>

Sets location of the credential status

Parameters

Name Type Description
credential Credential<RoleCredentialSubject> unsigned credential

Returns

Promise<Credential<RoleCredentialSubject> & { credentialStatus: StatusList2021Entry }>

credential with reference to status location


authenticate

authenticate(): Promise<void>

Returns

Promise<void>


deleteClaim

deleteClaim(id): Promise<void>

Parameters

Name Type
id string

Returns

Promise<void>

Implementation of

ICacheClient.deleteClaim


getAllowedRolesByIssuer

getAllowedRolesByIssuer(did): Promise<IRole[]>

Parameters

Name Type
did string

Returns

Promise<IRole[]>


getAppDefinition

getAppDefinition(namespace): Promise<IAppDefinition>

Parameters

Name Type
namespace string

Returns

Promise<IAppDefinition>

Implementation of

ICacheClient.getAppDefinition


getApplicationRoles

getApplicationRoles(namespace): Promise<IRole[]>

Parameters

Name Type
namespace string

Returns

Promise<IRole[]>

Implementation of

ICacheClient.getApplicationRoles


getApplicationsByOrganization

getApplicationsByOrganization(namespace): Promise<IApp[]>

Parameters

Name Type
namespace string

Returns

Promise<IApp[]>

Implementation of

ICacheClient.getApplicationsByOrganization


getApplicationsByOwner

getApplicationsByOwner(owner, withRelations?): Promise<IApp[]>

Parameters

Name Type Default value
owner string undefined
withRelations boolean true

Returns

Promise<IApp[]>

Implementation of

ICacheClient.getApplicationsByOwner


getAssetById

getAssetById(id): Promise<Asset>

Parameters

Name Type
id string

Returns

Promise<Asset>

Implementation of

ICacheClient.getAssetById


getAssetHistory

getAssetHistory(id, «destructured»?): Promise<AssetHistory[]>

Parameters

Name Type
id string
«destructured» AssetsFilter

Returns

Promise<AssetHistory[]>

Implementation of

ICacheClient.getAssetHistory


getClaimById

getClaimById(claimId): Promise<undefined | Claim>

Parameters

Name Type
claimId string

Returns

Promise<undefined | Claim>

Implementation of

ICacheClient.getClaimById


getClaimsByIssuer

getClaimsByIssuer(issuer, «destructured»?): Promise<Claim[]>

Parameters

Name Type
issuer string
«destructured» ClaimsFilter

Returns

Promise<Claim[]>

Implementation of

ICacheClient.getClaimsByIssuer


getClaimsByRequester

getClaimsByRequester(requester, «destructured»?): Promise<Claim[]>

Parameters

Name Type
requester string
«destructured» ClaimsFilter

Returns

Promise<Claim[]>

Implementation of

ICacheClient.getClaimsByRequester


getClaimsByRevoker

getClaimsByRevoker(revoker, «destructured»?): Promise<Claim[]>

Parameters

Name Type
revoker string
«destructured» ClaimsFilter

Returns

Promise<Claim[]>

Implementation of

ICacheClient.getClaimsByRevoker


getClaimsBySubject

getClaimsBySubject(subject, «destructured»?): Promise<Claim[]>

Parameters

Name Type
subject string
«destructured» ClaimsFilter

Returns

Promise<Claim[]>

Implementation of

ICacheClient.getClaimsBySubject


getClaimsBySubjects

getClaimsBySubjects(subjects): Promise<Claim[]>

Parameters

Name Type
subjects string[]

Returns

Promise<Claim[]>

Implementation of

ICacheClient.getClaimsBySubjects


getDIDsForRole

getDIDsForRole(namespace): Promise<string[]>

Parameters

Name Type
namespace string

Returns

Promise<string[]>

Implementation of

ICacheClient.getDIDsForRole


getDidDocument

getDidDocument(did, includeClaims?): Promise<IDIDDocument>

Parameters

Name Type
did string
includeClaims? boolean

Returns

Promise<IDIDDocument>

Implementation of

ICacheClient.getDidDocument


getNamespaceBySearchPhrase

getNamespaceBySearchPhrase(search, types?): Promise<(IRole | IOrganization | IApp)[]>

Parameters

Name Type
search string
types? SearchType[]

Returns

Promise<(IRole | IOrganization | IApp)[]>

Implementation of

ICacheClient.getNamespaceBySearchPhrase


getOfferedAssets

getOfferedAssets(did): Promise<Asset[]>

Parameters

Name Type
did string

Returns

Promise<Asset[]>

Implementation of

ICacheClient.getOfferedAssets


getOrgDefinition

getOrgDefinition(namespace): Promise<IOrganizationDefinition>

Parameters

Name Type
namespace string

Returns

Promise<IOrganizationDefinition>

Implementation of

ICacheClient.getOrgDefinition


getOrgHierarchy

getOrgHierarchy(namespace): Promise<IOrganization>

Parameters

Name Type
namespace string

Returns

Promise<IOrganization>

Implementation of

ICacheClient.getOrgHierarchy


getOrganizationRoles

getOrganizationRoles(namespace): Promise<IRole[]>

Parameters

Name Type
namespace string

Returns

Promise<IRole[]>

Implementation of

ICacheClient.getOrganizationRoles


getOrganizationsByOwner

getOrganizationsByOwner(owner, withRelations?): Promise<IOrganization[]>

Parameters

Name Type Default value
owner string undefined
withRelations boolean true

Returns

Promise<IOrganization[]>

Implementation of

ICacheClient.getOrganizationsByOwner


getOwnedAssets

getOwnedAssets(did): Promise<Asset[]>

Parameters

Name Type
did string

Returns

Promise<Asset[]>

Implementation of

ICacheClient.getOwnedAssets


getPreviouslyOwnedAssets

getPreviouslyOwnedAssets(owner): Promise<Asset[]>

Parameters

Name Type
owner string

Returns

Promise<Asset[]>

Implementation of

ICacheClient.getPreviouslyOwnedAssets


getRoleDefinition

getRoleDefinition(namespace): Promise<IRoleDefinition | IRoleDefinitionV2>

Parameters

Name Type
namespace string

Returns

Promise<IRoleDefinition | IRoleDefinitionV2>

Implementation of

ICacheClient.getRoleDefinition


getRolesByOwner

getRolesByOwner(owner): Promise<IRole[]>

Parameters

Name Type
owner string

Returns

Promise<IRole[]>

Implementation of

ICacheClient.getRolesByOwner


getRolesByRevoker

getRolesByRevoker(revoker): Promise<IRole[]>

Parameters

Name Type
revoker string

Returns

Promise<IRole[]>

Implementation of

ICacheClient.getRolesByRevoker


getRolesDefinition

getRolesDefinition(namespaces): Promise<Record<string, IRoleDefinition>>

Parameters

Name Type
namespaces string[]

Returns

Promise<Record<string, IRoleDefinition>>

Implementation of

ICacheClient.getRolesDefinition


getStatusListCredential

getStatusListCredential(credential): Promise<null | StatusList2021Credential>

Fetch the StatusList2021Credential object from storage.

Parameters

Name Type Description
credential VerifiableCredential<RoleCredentialSubject> verifiable credential with status list 2021

Returns

Promise<null | StatusList2021Credential>

status list credential if found


getSubOrganizationsByOrganization

getSubOrganizationsByOrganization(namespace): Promise<IOrganization[]>

Parameters

Name Type
namespace string

Returns

Promise<IOrganization[]>

Implementation of

ICacheClient.getSubOrganizationsByOrganization


init

init(): Promise<void>

Returns

Promise<void>


initiateCredentialStatusUpdate

initiateCredentialStatusUpdate(verifiableCredential): Promise<StatusList2021UnsignedCredential>

Get the StatusList2021Credential object to be signed

Parameters

Name Type Description
verifiableCredential VerifiableCredential<RoleCredentialSubject> verifiable credential to be revoked

Returns

Promise<StatusList2021UnsignedCredential>

unsigned status list credential


isAuthEnabled

isAuthEnabled(): boolean

Returns

boolean


isAuthenticated

isAuthenticated(): Promise<boolean>

Returns

Promise<boolean>


issueClaim

issueClaim(issuer, message): Promise<void>

Parameters

Name Type
issuer string
message IClaimIssuance

Returns

Promise<void>

Implementation of

ICacheClient.issueClaim


login

login(): Promise<void>

Returns

Promise<void>


persistCredentialStatusUpdate

persistCredentialStatusUpdate(statusListCredential): Promise<StatusList2021Credential>

Persist signed StatusList2021Credential object in storage.

Parameters

Name Type Description
statusListCredential StatusList2021Credential signed status list

Returns

Promise<StatusList2021Credential>

status list credential


rejectClaim

rejectClaim(issuer, message): Promise<void>

Parameters

Name Type
issuer string
message IClaimRejection

Returns

Promise<void>

Implementation of

ICacheClient.rejectClaim


requestClaim

requestClaim(message): Promise<void>

Parameters

Name Type
message IClaimRequest

Returns

Promise<void>

Implementation of

ICacheClient.requestClaim