Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.86 KB

GenericObjectTimestamp.md

File metadata and controls

56 lines (34 loc) · 1.86 KB

GenericObjectTimestamp

Current Version: 0.2.0

Changelog

0.2.0

  • Draft of GenericObjectTimestamp

Goal

This type of object should be interpreted as a fallback if no other type matches your goals.

Creating the hash

The hash that is put into the blockchain is generated by hashing a JSON object containing properties and attributes. Currently, the hashing algorithm used is SHA-256.

{
  "type": "GenericObjectTimestamp",
  "version": "0.2.0",
  "contentHash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
  "contentUrl": "https://test.com/Generic",
  "date": "2019-07-08T08:38:23+0000"
}

The SHA-256 hash of the minified JSON example is e5ec8b25723bedbc90e3d415912e46f1efbdde76fa2ab3bed7230d871db3e74f. This hash needs to be posted to the blockchain. The transaction id of the transaction that is included in the blockchain, which contains this hash, needs to be saved together with the used properties and attributes.

Properties

Properties are required fields for every GenericObjectTimestamp.

type - String, The type used

version - String, The version of the type used

contentHash - String, Text, SHA256 hash of the object

date - String, ISO 8601

Attributes

Attributes can be included, but are optional. Only items included in the standard can be added to the JSON object, in alphabetical order, after the last property. If the value of an attribute is empty, it should not be included in the object.

contentUrl - String, Text

encodingFormat - String, Text, MIME

Including to blockchain

The implementation will differ per blockchain. Please include the following fields.

hash - String, SHA-256 hash of the article previousTransactionId - Optional, String - Blockchain Transaction Id with hash of the previous revision.

Optionally you can include a memo including an url to enhance the user experience.