Skip to main content

Credential

Represents a verifiable credential with its associated information. Verifiable Credentials Data Model v2.0.

  • Full name: \Bloock\Entity\Identity\Credential

Properties​

context​

private \Google\Protobuf\Internal\RepeatedField $context

id​

private string $id

type​

private \Google\Protobuf\Internal\RepeatedField $type

issuanceDate​

private string $issuanceDate

expiration​

private string $expiration

credentialSubject​

private $credentialSubject

credentialStatus​

private \Bloock\Entity\Identity\CredentialStatus $credentialStatus

issuer​

private string $issuer

credentialSchema​

private \Bloock\Entity\Identity\CredentialSchema $credentialSchema

credentialProof​

private \Bloock\Entity\Identity\CredentialProof $credentialProof

Methods​

__construct​

Creates a new Credential instance with the provided details.

public __construct(\Google\Protobuf\Internal\RepeatedField $context, string $id, \Google\Protobuf\Internal\RepeatedField $type, string $issuanceDate, string $expiration,  $credentialSubject, \Bloock\Entity\Identity\CredentialStatus $credentialStatus, string $issuer, \Bloock\Entity\Identity\CredentialSchema $credentialSchema, \Bloock\Entity\Identity\CredentialProof $credentialProof): mixed

Parameters:

ParameterTypeDescription
$context\Google\Protobuf\Internal\RepeatedField
$idstring
$type\Google\Protobuf\Internal\RepeatedField
$issuanceDatestring
$expirationstring
$credentialSubject****
$credentialStatus\Bloock\Entity\Identity\CredentialStatus
$issuerstring
$credentialSchema\Bloock\Entity\Identity\CredentialSchema
$credentialProof\Bloock\Entity\Identity\CredentialProof

fromProto​

public static fromProto(\Bloock\Credential $res): \Bloock\Entity\Identity\Credential
  • This method is static.

Parameters:

ParameterTypeDescription
$res\Bloock\Credential

fromJson​

Creates a Credential instance from a JSON string representation.

public static fromJson(string $json): \Bloock\Entity\Identity\Credential
  • This method is static.

Parameters:

ParameterTypeDescription
$jsonstring

Throws:


toJson​

Converts the Credential instance to its JSON string representation.

public toJson(): string

Throws:


getContext​

Gets the context associated with the credential.

public getContext(): \Google\Protobuf\Internal\RepeatedField

getId​

Gets the ID associated with the credential.

public getId(): string

getType​

Gets the types associated with the credential.

public getType(): \Google\Protobuf\Internal\RepeatedField

getIssuanceDate​

Gets the issuance date of the credential.

public getIssuanceDate(): string

getExpiration​

Gets the expiration date of the credential.

public getExpiration(): string

getCredentialSubject​

Gets the subject of the credential.

public getCredentialSubject(): mixed

getCredentialStatus​

Gets the status of the credential.

public getCredentialStatus(): \Bloock\Entity\Identity\CredentialStatus

getIssuer​

Gets the issuer of the credential.

public getIssuer(): string

getCredentialSchema​

Gets the schema associated with the credential.

public getCredentialSchema(): \Bloock\Entity\Identity\CredentialSchema

getCredentialProof​

Gets the proof associated with the credential.

public getCredentialProof(): \Bloock\Entity\Identity\CredentialProof

toProto​

public toProto(): \Bloock\Credential


Automatically generated on 2024-04-17