Skip to main content

IdentityClient

Represents a client for interacting with the Bloock Identity service.

  • Full name: \Bloock\Client\IdentityClient

Properties

bridge

private $bridge

config

private $config

Methods

__construct

Creates a new instance of the IdentityClient with the provided configuration.

public __construct(\Bloock\ConfigData|null $config = null): mixed

Parameters:

ParameterTypeDescription
$config\Bloock\ConfigData|null

createHolder

Creates a new holder identity.

public createHolder(\Bloock\Entity\Key\Key $holderKey, string $didMethod): \Bloock\Entity\Identity\Holder

Parameters:

ParameterTypeDescription
$holderKey\Bloock\Entity\Key\Key
$didMethodstring

Throws:


createIssuer

Creates a new issuer on the Bloock Identity service.

public createIssuer(\Bloock\Entity\Key\Key $issuerKey, int $publishInterval, string $didMethod, string|null $name = null, string|null $description = null, string|null $image = null): \Bloock\Entity\Identity\Issuer

Parameters:

ParameterTypeDescription
$issuerKey\Bloock\Entity\Key\Key
$publishIntervalint
$didMethodstring
$namestring|null
$descriptionstring|null
$imagestring|null

Throws:


importIssuer

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

public importIssuer(\Bloock\Entity\Key\Key $issuerKey, string $didMethod): \Bloock\Entity\Identity\Issuer

Parameters:

ParameterTypeDescription
$issuerKey\Bloock\Entity\Key\Key
$didMethodstring

Throws:


buildSchema

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

public buildSchema(string $displayName, string $schemaType, string $version, string $description): \Bloock\Entity\Identity\SchemaBuilder

Parameters:

ParameterTypeDescription
$displayNamestring
$schemaTypestring
$versionstring
$descriptionstring

getSchema

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

public getSchema(string $id): \Bloock\Entity\Identity\Schema

Parameters:

ParameterTypeDescription
$idstring

Throws:


buildCredential

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

public buildCredential(\Bloock\Entity\Identity\Issuer $issuer, string $schemaId, string $holderDid, int $expiration, int $version): \Bloock\Entity\Identity\CredentialBuilder

Parameters:

ParameterTypeDescription
$issuer\Bloock\Entity\Identity\Issuer
$schemaIdstring
$holderDidstring
$expirationint
$versionint

getCredential

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

public getCredential(string $credentialId): \Bloock\Entity\Identity\Credential

Parameters:

ParameterTypeDescription
$credentialIdstring

getCredentialOffer

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

public getCredentialOffer(\Bloock\Entity\Identity\Issuer $issuer, string $credentialId): string

Parameters:

ParameterTypeDescription
$issuer\Bloock\Entity\Identity\Issuer
$credentialIdstring

forcePublishIssuerState

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

public forcePublishIssuerState(\Bloock\Entity\Identity\Issuer $issuer): \Bloock\Entity\Identity\IssuerStateReceipt

Parameters:

ParameterTypeDescription
$issuer\Bloock\Entity\Identity\Issuer

Throws:


getCredentialProof

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

public getCredentialProof(string $issuerDid, string $credentialId): \Bloock\Entity\Identity\CredentialProof

Parameters:

ParameterTypeDescription
$issuerDidstring
$credentialIdstring

Throws:


revokeCredential

Revokes a credential on the Bloock Identity service.

public revokeCredential(\Bloock\Entity\Identity\Credential $credential, \Bloock\Entity\Identity\Issuer $issuer): bool

Parameters:

ParameterTypeDescription
$credential\Bloock\Entity\Identity\Credential
$issuer\Bloock\Entity\Identity\Issuer

Throws:


createVerification

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

public createVerification(string $proofRequest): \Bloock\Entity\Identity\VerificationReceipt

Parameters:

ParameterTypeDescription
$proofRequeststring

Throws:


waitVerification

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

public waitVerification(int $sessionID, int $timeout = 120000): bool

Parameters:

ParameterTypeDescription
$sessionIDint
$timeoutint

Throws:


getVerificationStatus

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

public getVerificationStatus(int $sessionID): bool

Parameters:

ParameterTypeDescription
$sessionIDint

Throws:



Automatically generated on 2024-04-02