TrustedTwin Homepage

Articles

Figure 1. Doc on the Trusted Twin platform.

Document storage concept

Summary

This article describes the concept for storing account’s Docs (files of any format e.g., PDF, DOC) attached to Twins on the Trusted Twin platform. 

The purpose of this article is to provide system architects and developers with conceptual knowledge required to design solutions on the Trusted Twin platform. For developer resources, please consult the Trusted Twin docs website.

5 min read.

Concept

On the Trusted Twin platform, Docs are files of any size and format meant to store large amounts of static data attached to Twins. Docs, once uploaded on the platform, remain unchanged. In contrast, Ledgers are designed for storing the state of a Twin. Therefore, they can be dynamically changed. Trusted Twin Ledger concept

Doc URLs

Working with Docs is based on upload and download URLs. The URLs are generated by users when they need to upload or download a Doc.

Upload URL

Upload URLs are temporary URLs used for uploading the Doc on the Trusted Twin platform. 

The Doc upload process consists of the following steps:

1. The Doc is uploaded to a document cache associated with the given upload URL. 

2. The cached Doc is copied and attached to a given Twin.

A Doc can be attached to multiple Twins. Files stored in the cache location are removed automatically.

Figure 2. Doc upload process. The process of attaching a Doc to a Twin consists of two steps. First, the Doc is uploaded to document cache through an upload URL. Next, the copy of the Doc is created and attached to the Twin.

Upload URL creation requires standard authentication and authorization. Uploading of a Doc does not require additional authentication and is based only on the upload URL.

Download URL

Download URLs are temporary URLs used for downloading a given Doc stored on the platform. They are time-constrained. 

Download URL creation requires standard authentication and authorization. Downloading the Doc associated with the URL does not require additional authentication and is based only on the download URL.

Figure 3. Doc with a download URL.

Notarization

Docs uploaded on the Trusted Twin platform can be notarized to allow for future verification of their consistency, immutability, and irrefutability. 

Basic notarization

Basic notarization is based on Doc hash calculation. The expected hash provided by the user during Doc upload is compared to the hash calculated based on the Doc content. The Doc can be attached to the Twin only if the hashes match. The hash is stored as Doc metadata on the Trusted Twin platform and can be verified at any time.

Advanced notarization

Advanced notarization is based on a mechanism similar to basic notarization. On top of that, the hash is protected by blockchain technology, and additional data related to a blockchain transaction is stored on the Trusted Twin platform as Doc metadata.

Tips & tricks

  • Temporary download URLs (i.e. with TTL set) can be used to exchange Docs between users on the Trusted Twin platform.

Up next/ Next step

Related articles

For more information about how to use the Trusted Twin platform in your application’s architecture or technology stack, please contact hello@trustedtwin.com

ON THIS PAGE