Skip to main content

Record

Represents a record with payload, hash, and configuration data.

  • Full name: \Bloock\Entity\Record\Record

Properties

payload

private string $payload

hash

private string $hash

configData

private \Bloock\ConfigData $configData

Methods

__construct

Constructs a Record object with the specified parameters.

public __construct(string $payload, string $hash, \Bloock\ConfigData $configData): mixed

Parameters:

ParameterTypeDescription
$payloadstring
$hashstring
$configData\Bloock\ConfigData

fromProto

public static fromProto(\Bloock\Record $record, \Bloock\ConfigData $configData): \Bloock\Entity\Record\Record
  • This method is static.

Parameters:

ParameterTypeDescription
$record\Bloock\Record
$configData\Bloock\ConfigData

getHash

Retrieves the hash of the record.

public getHash(): string

Throws:


getPayload

Retrieves the payload of the record.

public getPayload(): array

Throws:


toProto

public toProto(): \Bloock\Record

retrieve

Returns the payload of the record.

public retrieve(): array

setProof

Sets the proof for a record.

public setProof(\Bloock\Entity\Integrity\Proof $proof): void

Parameters:

ParameterTypeDescription
$proof\Bloock\Entity\Integrity\Proof

Throws:



Automatically generated on 2024-04-02