@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
Name | Type |
---|---|
payload | Uint8Array |
hash | string |
configData | ConfigData |
Returns
Defined in
Properties
configData
• configData: ConfigData
Defined in
hash
• hash: string
Defined in
payload
• payload: Uint8Array
Defined in
Methods
getHash
▸ getHash(): Promise
<string
>
Retrieves the hash of the record.
Returns
Promise
<string
>
Defined in
getPayload
▸ getPayload(): Promise
<Uint8Array
>
Retrieves the payload of the record.
Returns
Promise
<Uint8Array
>
Defined in
retrieve
▸ retrieve(): Uint8Array
Returns the payload of the record.
Returns
Uint8Array
Defined in
setProof
▸ setProof(proof
): Promise
<void
>
Sets the proof for a record.
Parameters
Name | Type |
---|---|
proof | Proof |
Returns
Promise
<void
>
Defined in
toProto
▸ toProto(): Record
Returns
Record
Defined in
fromProto
▸ fromProto(r
, configData
): Record
Parameters
Name | Type |
---|---|
r | Record |
configData | ConfigData |