A Peek Behind the Tech Curtain: Developing the Arianee Digital Passport
Since 2019, several of our member brands including Breitling, Ba&sh, and Satoshi Studio have gone live with uses of the Arianee digital passport. These passports provide a private and unique digital record that is securely linked to their products through blockchain technology — providing traceability, transparency, and tradeability while allowing for reliable peer-to-peer transactions.
So, how does this blockchain-powered passport work? Before looking under the hood, allow me to introduce myself. I am Stéphane Delecroix, Lead Developer at Arianee. I have been involved with the project for over two years, co-leading the development of the ArianeeJS library, which helps users to seamlessly interact with the Arianee Protocol.
My most recent assignment was the exciting challenge of spearheading the deployment of the Arianee Passport to our member brands. I thought you might like to see what an Arianee Passport looks like from a technical point of view.
What is the Arianee Protocol?
Arianee is an open-source and open-access blockchain-based Protocol. It is the underlying infrastructure that makes an Arianee Passport both unfalsifiable and decentralized. This means that an Arianee passport cannot be counterfeited yet is easily transferred from one owner to the next completely peer-to-peer. Just as you would hand over a paper certificate, there is no need to involve a third party. The only difference here is that these documents are digital.
How does it work?
Arianee’s Protocol is based on the Ethereum blockchain. It’s a set of smart contracts managing all of the different functionalities within the passport.
Since the Arianee Protocol is open source, you can take a peek at our code:
Or delve into detailed explanations in our documentation:
Arianee Project · Arianee Docs
If you’d like to take a deep dive into these smart contracts, please ask in the comments!
Creating an Arianee Passport
If you’d like to get a brief overview of how a passport is created, take a look at this video. We will then go deep into how it works technically!
Using our array of smart contracts, you can create an Arianee Passport for each of your products. The passports have numerous properties and are all required for one to function properly. In order to send the information necessary to generate your NFT, you need to use hydrateToken method of the arianeeStore smart contract (Don’t worry! We’ve made an open-source library to facilitate integration. I’ll talk about that shortly).
hydrateToken(_tokenId: number | string,_imprint: string | number[],_uri: string,_encryptedInitialKey: string,_tokenRecoveryTimestamp: number | string,_initialKeyIsRequestKey: boolean,_providerBrand: string);
In order to focus on what’s at stake here, we’ll only talk about _tokenId and _imprint.
_tokenId aka ArianeeId
A tokenId is an integer and THE unique ID identifying this certificate on the blockchain. It is uneditable and will remain the same forever.
_imprint
This part is the “hash” of a passport’s content, meaning that it’s a short piece of code used to index and retrieve information stored in longer sections of code. A passport content is how your product can be described, including model and serial number. The text can be translated and linked to external content such as Facebook, Instagram, company website,…etc.
Here is the beginning of a sample Arianee Passport’s content:
Certificate content
{“$schema”: “https://cert.arianee.org/version1/ArianeeAsset.json",“name”: “The Rond Watch”,“serialnumber”: [{“type”: “serialnumber”,“value”: “2653514”}],“brand”: “Arianee”,“model”: “Model 60827”,“description”: “Rond d’Arianee watch, small model, quartz movement. Case in 18k pink gold, beaded crown in 18k pink gold set with a synthetic cabochon-shaped spine…”,“type”: “SmartAsset”,“brandLogoHeader”: “https://arianee.com/pub/-Lp3_NvmhZy2p6mSpGP6",“picture”: “https://arianee.com/pub/-Lp3_E5P5srm09nZvM6s",“socialmedia”: {“facebook”: “208072396631649”,“instagram”: “arianee_project”,“twitter”: “arianeeproject”},“externalContents”: [{“title”: “My account”,“url”: “https://services.arianee.com/my-account"},{{…[rest of json]
What’s stored on the blockchain is not the actual content of the passport but rather the hash that it will use to prove authenticity when retrieving the content.
What algorithm do we use? It is hashed using 0xcert Asset Certification Module.
This is a complex algorithm using a Merkle tree and a $schema. It allows for a user to send part of their certificate content to someone, while the receiver is still able to check the imprint, and therefore the authenticity of this partial content, which represents the whole.
In our example above imprint is:
0xeae5c23fcc4ed5c162583163eacb0397ba04b162ce837b7a0c66e99c3a695a88
The schema used for this Arianee Passport is available here.
In Arianee Wallet, our mobile app, the Arianee Passport for your watch is displayed like this:
The pair [arianeeId, imprint] is stored in the blockchain and its contents can be accessed in two ways. There is the _uri field in hydrateToken method, made accessible by an http get request. By knowing the hash method, content authenticity can also be checked easily.
if ( hash(content) === imprint stored in blockchain) ⇒ authentic content
At Arianee, one of our core values is privacy. Utilizing a public URI where anyone can access certificate content is not exactly the most private. For those companies who may not wish for the whole world to know which products they’ve sold, we created a blockchain authenticated content gateway called Arianee Privacy Gateway.
Arianee Privacy Gateway · Arianee Docs
This is a public server where only blockchain-authorized users are able to access the content. Authorization is achieved without a central auth server.
Please let me know in the comments if you have any questions about the Arianee Privacy Gateway.
Technically, you can simply use ArianeeJS
Use of the Arianee Protocol doesn’t require direct interaction with smart contracts. Arianee’s open-source library, arianeeJS removes all the pain points and hurdles when working with the blockchain.
The arianeeJS GitHub repository is here:
For a live demo, you can also create your own (test) certificate:
If you’d like more information or technical details, feel free to ask in a comment! We will be glad to answer!