Skip to main content

@bloock/sdk / IdentityClient

Class: IdentityClient

Represents a client for interacting with the Bloock Identity service.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new IdentityClient(configData?): IdentityClient

Creates a new instance of the IdentityClient with default configuration.

Parameters

NameType
configData?ConfigData

Returns

IdentityClient

Defined in

client/identity.ts:44

Properties

bridge

Private bridge: BloockBridge

Defined in

client/identity.ts:37


configData

Private configData: ConfigData

Defined in

client/identity.ts:38

Methods

buildCredential

buildCredential(issuer, schemaId, holderDid, expiration, version): CredentialBuilder

Creates a new credential builder for defining a credential on the Bloock Identity service.

Parameters

NameType
issuerIssuer
schemaIdstring
holderDidstring
expirationnumber
versionnumber

Returns

CredentialBuilder

Defined in

client/identity.ts:196


buildSchema

buildSchema(displayName, schemaType, version, description): SchemaBuilder

Creates a new schema builder for defining a schema on the Bloock Identity service.

Parameters

NameType
displayNamestring
schemaTypestring
versionstring
descriptionstring

Returns

SchemaBuilder

Defined in

client/identity.ts:150


createHolder

createHolder(holderKey, didMethod): Promise<Holder>

Creates a new holder identity.

Parameters

NameType
holderKeyKey
didMethodDidMethod

Returns

Promise<Holder>

Defined in

client/identity.ts:55


createIssuer

createIssuer(issuerKey, publishInterval, didMethod, name?, description?, image?): Promise<Issuer>

Creates a new issuer on the Bloock Identity service.

Parameters

NameType
issuerKeyKey
publishIntervalPublishIntervalParams
didMethodDidMethod
name?string
description?string
image?string

Returns

Promise<Issuer>

Defined in

client/identity.ts:86


createVerification

createVerification(proofRequest): Promise<VerificationReceipt>

Creates a new verification session on the identity managed API provided.

Parameters

NameType
proofRequeststring

Returns

Promise<VerificationReceipt>

Defined in

client/identity.ts:344


forcePublishIssuerState

forcePublishIssuerState(issuer): Promise<IssuerStateReceipt>

Publishes the state of an issuer on the Bloock Identity service.

Parameters

NameType
issuerIssuer

Returns

Promise<IssuerStateReceipt>

Defined in

client/identity.ts:265


getCredential

getCredential(credentialId): Promise<Credential>

Retrieves the Verifiable Credential entity based on the credential ID (UUID). (ex: 1bf0c79e-55e6-4f14-aa9d-fb55619ba0cf)

Parameters

NameType
credentialIdstring

Returns

Promise<Credential>

Defined in

client/identity.ts:218


getCredentialOffer

getCredentialOffer(issuer, credentialId): Promise<string>

Retrieves the json raw offer based on the credential ID (UUID). (ex: 1bf0c79e-55e6-4f14-aa9d-fb55619ba0cf)

Parameters

NameType
issuerIssuer
credentialIdstring

Returns

Promise<string>

Defined in

client/identity.ts:241


getCredentialProof

getCredentialProof(issuerDid, credentialId): Promise<CredentialProof>

Gets the proof of a credential on the Bloock Identity service.

Parameters

NameType
issuerDidstring
credentialIdstring

Returns

Promise<CredentialProof>

Defined in

client/identity.ts:291


getSchema

getSchema(id): Promise<Schema>

Gets a schema from the Bloock Identity service based on the schema ID (ex: Qma1t4uzbnB93E4rasNdu5UWMDh5qg3wMkPm68cnEyfnoM).

Parameters

NameType
idstring

Returns

Promise<Schema>

Defined in

client/identity.ts:170


getVerificationStatus

getVerificationStatus(sessionID): Promise<boolean>

Gets the status of a verification session on the identity managed API provided.

Parameters

NameType
sessionIDnumber

Returns

Promise<boolean>

Defined in

client/identity.ts:395


importIssuer

importIssuer(issuerKey, didMethod): Promise<Issuer>

Gets the issuer based on the issuer key and DID method.

Parameters

NameType
issuerKeyKey
didMethodDidMethod

Returns

Promise<Issuer>

Defined in

client/identity.ts:121


revokeCredential

revokeCredential(credential, issuer): Promise<boolean>

Revokes a credential on the Bloock Identity service.

Parameters

NameType
credentialCredential
issuerIssuer

Returns

Promise<boolean>

Defined in

client/identity.ts:318


waitVerification

waitVerification(sessionID, timeout?): Promise<boolean>

Waits for the completion of a verification session on the identity managed API provided.

Parameters

NameType
sessionIDnumber
timeout?number

Returns

Promise<boolean>

Defined in

client/identity.ts:369