Previous topic

Solidity Contrat

Next topic

Ethereum

This Page

Records

class hashchain.records.Record(content, previous_hash=None)[source]
get_content()[source]

Get the original content of the record

Return type

dict

Returns

dict

get_hash()[source]

Get the hex hash of the record

Return type

str

Returns

hex string

get_previous_hash()[source]

Get the previous hash

Return type

str

Returns

hex string

hex()[source]

Get the hex hash of the record

Return type

str

Returns

hex string

to_dict()[source]

Return a dict of the complete record along with the hex string of the record’s hash and the previous hash

Return type

dict

Returns

dict

update(new_content)[source]

Updates the record and recalculated the hash

Parameters

new_content (dict) – new record’s content

Returns

None

hashchain.records.verify(records_dicts)[source]

Verifies a given list of records dicts

Parameters

records_dicts (list) – list of Records objects

Return type

bool

Returns

returns True if the list is valid. Raise ValueError if not valid.