Skip to main content

@bloock/sdk / CredentialCoreBuilder

Class: CredentialCoreBuilder

Helps construct credentials by specifying various attributes.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new CredentialCoreBuilder(issuer, schemaId, holderDid, expiration, version, configData): CredentialCoreBuilder

Creates a new CredentialCoreBuilder instance with the specified parameters.

Parameters

NameType
issuerIssuer
schemaIdstring
holderDidstring
expirationnumber
versionnumber
configDataConfigData

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:50

Properties

booleanAttributes

booleanAttributes: BooleanAttribute[]

Defined in

entity/identity/credential_core_builder.ts:37


configData

configData: ConfigData

Defined in

entity/identity/credential_core_builder.ts:32


dateAttributes

dateAttributes: DateAttribute[]

Defined in

entity/identity/credential_core_builder.ts:38


dateTimeAttributes

dateTimeAttributes: DateTimeAttribute[]

Defined in

entity/identity/credential_core_builder.ts:39


decimalAttributes

decimalAttributes: DecimalAttribute[]

Defined in

entity/identity/credential_core_builder.ts:36


expiration

expiration: number

Defined in

entity/identity/credential_core_builder.ts:29


holderDid

holderDid: string

Defined in

entity/identity/credential_core_builder.ts:28


integerAttributes

integerAttributes: IntegerAttribute[]

Defined in

entity/identity/credential_core_builder.ts:35


issuerDid

issuerDid: string

Defined in

entity/identity/credential_core_builder.ts:27


key

Optional key: Key

Defined in

entity/identity/credential_core_builder.ts:31


schemaId

schemaId: string

Defined in

entity/identity/credential_core_builder.ts:26


stringAttributes

stringAttributes: StringAttribute[]

Defined in

entity/identity/credential_core_builder.ts:34


version

version: number

Defined in

entity/identity/credential_core_builder.ts:30

Methods

build

build(): Promise<CredentialReceipt>

Creates and returns a Credential using the specified attributes.

Returns

Promise<CredentialReceipt>

Defined in

entity/identity/credential_core_builder.ts:159


withBooleanAttribute

withBooleanAttribute(key, value): CredentialCoreBuilder

Adds a boolean attribute to the CredentialCoreBuilder.

Parameters

NameType
keystring
valueboolean

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:122


withDateAttribute

withDateAttribute(key, value): CredentialCoreBuilder

Adds a date attribute to the CredentialCoreBuilder.

Parameters

NameType
keystring
valueDate

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:136


withDateTimeAttribute

withDateTimeAttribute(key, value): CredentialCoreBuilder

Adds a datetime attribute to the CredentialCoreBuilder.

Parameters

NameType
keystring
valueDate

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:147


withDecimalAttribute

withDecimalAttribute(key, value): CredentialCoreBuilder

Adds a decimal attribute to the CredentialCoreBuilder.

Parameters

NameType
keystring
valuenumber

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:108


withIntegerAttribute

withIntegerAttribute(key, value): CredentialCoreBuilder

Adds an integer attribute to the CredentialCoreBuilder.

Parameters

NameType
keystring
valuenumber

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:94


withStringAttribute

withStringAttribute(key, value): CredentialCoreBuilder

Adds a string attribute to the CredentialCoreBuilder.

Parameters

NameType
keystring
valuestring

Returns

CredentialCoreBuilder

Defined in

entity/identity/credential_core_builder.ts:80