@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
| Name | Type |
|---|---|
configData? | ConfigData |
Returns
Defined in
Properties
bridge
• Private bridge: BloockBridge
Defined in
configData
• Private configData: undefined | ConfigData
Defined in
Methods
getAnchor
▸ getAnchor(anchorId): Promise<Anchor>
Gets an anchor by its ID from the Bloock Integrity service.
Parameters
| Name | Type |
|---|---|
anchorId | number |
Returns
Promise<Anchor>
Defined in
getProof
▸ getProof(records): Promise<Proof>
Gets a proof for a set of records from the Bloock Integrity service.
Parameters
| Name | Type |
|---|---|
records | Record[] |
Returns
Promise<Proof>
Defined in
sendRecords
▸ sendRecords(records): Promise<RecordReceipt[]>
Sends records to the Bloock Integrity service for certification.
Parameters
| Name | Type |
|---|---|
records | Record[] |
Returns
Promise<RecordReceipt[]>
Defined in
validateRoot
▸ validateRoot(root, network): Promise<number>
Validates the integrity of a merkle root proof on blockchain.
Parameters
| Name | Type |
|---|---|
root | string |
network | Network |
Returns
Promise<number>
Defined in
verifyProof
▸ verifyProof(proof): Promise<string>
Verifies the integrity of a proof.
Parameters
| Name | Type |
|---|---|
proof | Proof |
Returns
Promise<string>
Defined in
verifyRecords
▸ verifyRecords(records, network?): Promise<number>
Verifies the integrity of a set of records.
Parameters
| Name | Type |
|---|---|
records | Record[] |
network? | Network |
Returns
Promise<number>
Defined in
waitAnchor
▸ waitAnchor(anchorId, timeout?): Promise<Anchor>
Waits for the completion of an anchor on the Bloock Integrity service.
Parameters
| Name | Type |
|---|---|
anchorId | number |
timeout? | number |
Returns
Promise<Anchor>