Skip to content

Latest commit

 

History

History
67 lines (40 loc) · 2.38 KB

File metadata and controls

67 lines (40 loc) · 2.38 KB

InvoiceTimestamp

Current Version: 0.2.0

Changelog

0.2.0

  • Draft of InvoiceTimestamp

Goal

This kind of object is inspired by schema.org Invoice and UBL.

Content

We recommend content behind the hash of this Object to be minified UBL, JSON-LD, microdata or RDFa. You can read here how to build documents based on schema.org.. Alternatively, PDF can be used as a fallback.

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": "InvoiceTimestamp",
  "version": "0.2.0",
  "contentHash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
  "contentUrl": "https://test.com/invoice.xml",
  "encodingFormat": "application/xml",
  "date": "2019-07-08T08:38:23+0000"
}

The SHA-256 hash of the minified JSON example is cec7128c6b76f219a8afe667deadbb8442d00f87830963152a7e9edba3027f22. 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 InvoiceTimestamp.

type - String, The type used

version - String, The version of the type used

contentHash - String, Text, SHA256 hash of the media object

encodingFormat - String, Text, MIME

date - String, ISO 8601, the last date of the item being modified in the source before timestamping it

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

debtor - String, text

creditor - String, text

identifier - String, text

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.