-
Notifications
You must be signed in to change notification settings - Fork 31
Home
Welcome to the SecuringArt-using-Blockchain-DigitalCertificates wiki!
Securing Art using Blockchain Digital Certificates
This demonstrates a sample auction Node.js based application that stores base64 encoded and encrypted images on a Blockchain ledger and enables retrieving the same. This application launches Hyperledger Fabric network and then starts the application as a REST API server built on top of NodeSDK APIs.
Emerging Tech (Blockchain + FinTech + IoT)
It was reported in the news recently that a multi-million dollar painting from Andy Warhol was tokenized and sold on Blockchain. This was a first of its kind. So the notion of this pattern becoming a reality is no longer outside the realm of possibilities. We have finally democratized the Art market! This approach creates accessibility to non-traditional art collectors and enables art sellers to enter new markets – on a global scale. This app instantiates a local Blockchain network to store artwork images in digital format on the ledger.
- Mohan Venkataraman
- Sandeep Pulluru
- Ratnakar Asara
https://github.com/IBM/SecuringArt-using-Blockchain-DigitalCertificates
This code pattern is a sample auction Node.js based application that demonstrates storing and retrieving a base64 encoded and encrypted images on and from a Hyperledger Blockchain ledger. This application launches Hyperledger Fabric network and then starts the application as a REST API server built on top of NodeSDK APIs. The main goal of this application is to demonstrate leveraging encoding and encryption on a blockchain. The use case to demonstrate this entails storing images of artwork on a blockchain for an art auction. This model can be applied to other types of assets such as forms and videos. There are several approaches to storing the images:
- using IPFS (use paid version) or STORJ
- creating a Hash of image and storing the file on s3 (use this if your use case is validating the non
- converting the image to a Base64 string and store the string in a composer model
The third option was used in this pattern. The Base64 command can be done on the command line or as part of a script. The command is available by default in OS X. The syntax is:
$ base64 –i -o
One can also cat
the input from a file.
By default, blockchain supports encryption, security and immutability. These are characteristics that fundamental for the art auction use case. When the developer has completed this code pattern, he or she will understand how to: • Set up a Blockchain network • Generate a base64 encrypted image and store it encrypted on the blockchain ledger • Query the chaincode to retrieve an image and store it in a public folder
We challenge you to try using this with other types of assets!
- Teardown any existing networks, remove any existing containers or images lying around
- Launch the Hyperledger Fabric network
- Launch the Node.js application (Rest Server wrapper of top of the NodeSDK API)
- Create the channel myChannel
- Install and instantiate the auction chaincode
- Invoke a transaction where the Node.js app transforms a base 64 encrypted image into a string format
- Store the encrypted image image on the Blockchain ledger
- Query ledger to get the image data by its imageID and save the image as a Thumbnail in a public folder
- Hyperledger Composer v0.19.4 Hyperledger Composer is an extensive, open development toolset and framework to make developing blockchain applications easier
- Hyperledger Fabric v1.1 Hyperledger Fabric is a platform for distributed ledger solutions, underpinned by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility and scalability.
- Hyperledger Node.js SDK
- jq: a lightweight and flexible command-line JSON processor
- Docker: 17.09.x or higher
- Docker Compose: 1.16.1 or higher
- Node.js: v8.9.0 or higher
Storing Images in Hyperledger Fabric (Blockchain)
James Worthington https://www.linkedin.com/in/james-worthington-0730337/
https://belltane.wordpress.com/2017/03/27/storing-images-in-hyperledger-fabric-blockchain/