Skip to main content

@bloock/sdk / Record

Class: Record

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

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Record(payload, hash, configData): Record

Constructs a Record object with the specified parameters.

Parameters

NameType
payloadUint8Array
hashstring
configDataConfigData

Returns

Record

Defined in

entity/record/record.ts:25

Properties

configData

configData: ConfigData

Defined in

entity/record/record.ts:17


hash

hash: string

Defined in

entity/record/record.ts:16


payload

payload: Uint8Array

Defined in

entity/record/record.ts:15

Methods

getHash

getHash(): Promise<string>

Retrieves the hash of the record.

Returns

Promise<string>

Defined in

entity/record/record.ts:47


getPayload

getPayload(): Promise<Uint8Array>

Retrieves the payload of the record.

Returns

Promise<Uint8Array>

Defined in

entity/record/record.ts:69


retrieve

retrieve(): Uint8Array

Returns the payload of the record.

Returns

Uint8Array

Defined in

entity/record/record.ts:91


setProof

setProof(proof): Promise<void>

Sets the proof for a record.

Parameters

NameType
proofProof

Returns

Promise<void>

Defined in

entity/record/record.ts:100


toProto

toProto(): Record

Returns

Record

Defined in

entity/record/record.ts:35


fromProto

fromProto(r, configData): Record

Parameters

NameType
rRecord
configDataConfigData

Returns

Record

Defined in

entity/record/record.ts:31