Skip to main content

IntegrityClient

Provides functionality to interact with the Bloock Integrity service.

  • Full name: \Bloock\Client\IntegrityClient

Properties

bridge

private $bridge

config

private $config

Methods

__construct

Creates a new IntegrityClient with the given configuration.

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

Parameters:

ParameterTypeDescription
$config\Bloock\ConfigData|null

sendRecords

Sends records to the Bloock Integrity service for certification.

public sendRecords(array $records): array

Parameters:

ParameterTypeDescription
$recordsarray

Throws:


waitAnchor

Gets an anchor by its ID from the Bloock Integrity service.

public waitAnchor(int $id, int $timeout = 120000): \Bloock\Entity\Integrity\Anchor

Parameters:

ParameterTypeDescription
$idint
$timeoutint

Throws:


getAnchor

Waits for the completion of an anchor on the Bloock Integrity service.

public getAnchor(int $id): \Bloock\Entity\Integrity\Anchor

Parameters:

ParameterTypeDescription
$idint

Throws:


getProof

Gets a proof for a set of records from the Bloock Integrity service.

public getProof(array $records): \Bloock\Entity\Integrity\Proof

Parameters:

ParameterTypeDescription
$recordsarray

Throws:


verifyProof

Verifies the integrity of a proof.

public verifyProof(\Bloock\Entity\Integrity\Proof $proof): string

Parameters:

ParameterTypeDescription
$proof\Bloock\Entity\Integrity\Proof

Throws:


verifyRecords

Verifies the integrity of a set of records.

public verifyRecords(array $records, string|null $network = null): int

Parameters:

ParameterTypeDescription
$recordsarray
$networkstring|null

Throws:


validateRoot

Validates the integrity of a merkle root proof on blockchain.

public validateRoot(string $root, string $network): int

Parameters:

ParameterTypeDescription
$rootstring
$networkstring

Throws:



Automatically generated on 2024-04-02