Skip to main content

@bloock/sdk / IntegrityClient

Class: IntegrityClient

Provides functionality to interact with the Bloock Integrity service.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new IntegrityClient(configData?): IntegrityClient

Creates a new IntegrityClient with default configuration.

Parameters

NameType
configData?ConfigData

Returns

IntegrityClient

Defined in

client/integrity.ts:29

Properties

bridge

Private bridge: BloockBridge

Defined in

client/integrity.ts:22


configData

Private configData: undefined | ConfigData

Defined in

client/integrity.ts:23

Methods

getAnchor

getAnchor(anchorId): Promise<Anchor>

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

Parameters

NameType
anchorIdnumber

Returns

Promise<Anchor>

Defined in

client/integrity.ts:61


getProof

getProof(records): Promise<Proof>

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

Parameters

NameType
recordsRecord[]

Returns

Promise<Proof>

Defined in

client/integrity.ts:107


sendRecords

sendRecords(records): Promise<RecordReceipt[]>

Sends records to the Bloock Integrity service for certification.

Parameters

NameType
recordsRecord[]

Returns

Promise<RecordReceipt[]>

Defined in

client/integrity.ts:39


validateRoot

validateRoot(root, network): Promise<number>

Validates the integrity of a merkle root proof on blockchain.

Parameters

NameType
rootstring
networkNetwork

Returns

Promise<number>

Defined in

client/integrity.ts:130


verifyProof

verifyProof(proof): Promise<string>

Verifies the integrity of a proof.

Parameters

NameType
proofProof

Returns

Promise<string>

Defined in

client/integrity.ts:153


verifyRecords

verifyRecords(records, network?): Promise<number>

Verifies the integrity of a set of records.

Parameters

NameType
recordsRecord[]
network?Network

Returns

Promise<number>

Defined in

client/integrity.ts:176


waitAnchor

waitAnchor(anchorId, timeout?): Promise<Anchor>

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

Parameters

NameType
anchorIdnumber
timeout?number

Returns

Promise<Anchor>

Defined in

client/integrity.ts:84