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:
Parameter | Type | Description |
---|---|---|
$config | \Bloock\ConfigData|null |
sendRecords
Sends records to the Bloock Integrity service for certification.
public sendRecords(array $records): array
Parameters:
Parameter | Type | Description |
---|---|---|
$records | array |
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:
Parameter | Type | Description |
---|---|---|
$id | int | |
$timeout | int |
Throws:
getAnchor
Waits for the completion of an anchor on the Bloock Integrity service.
public getAnchor(int $id): \Bloock\Entity\Integrity\Anchor
Parameters:
Parameter | Type | Description |
---|---|---|
$id | int |
Throws:
getProof
Gets a proof for a set of records from the Bloock Integrity service.
public getProof(array $records): \Bloock\Entity\Integrity\Proof
Parameters:
Parameter | Type | Description |
---|---|---|
$records | array |
Throws:
verifyProof
Verifies the integrity of a proof.
public verifyProof(\Bloock\Entity\Integrity\Proof $proof): string
Parameters:
Parameter | Type | Description |
---|---|---|
$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:
Parameter | Type | Description |
---|---|---|
$records | array | |
$network | string|null |
Throws:
validateRoot
Validates the integrity of a merkle root proof on blockchain.
public validateRoot(string $root, string $network): int
Parameters:
Parameter | Type | Description |
---|---|---|
$root | string | |
$network | string |
Throws:
Automatically generated on 2024-04-02