Chain Sign
Chainlink powered e-Document verification and signing using smart contracts, IPFS and chainlink APIs
Built with:
Inspiration
Chainsign adds signing and verifying e-contract and document function to the blockchain. This solves legal issues involved with documents through use of chainlink and smart contracts
With blockchain, documents are embedded in digital code and stored in transparent, shared databases, where they’re protected from deletion, tampering and revision. Every agreement, every task, and every payment would have a digital record and signature that could be identified, validated, stored, and shared. Intermediaries like lawyers, brokers and institutions might no longer be necessary. Individuals and organizations would freely transact and interact with one another with little friction. This is the immense potential of blockchain.
What it does
Document upload flow
Certificates are issued by an authority, such as an education institute, legal institution stored oncentralized document management server, or on a distributed file system like IPFS and signed with a cryptographic function. The content hash and certificate’s metadata hash are then stored on the blockchain digital ledger and attached to the user’s digital identity as a smart contract address that stores this information This represents a sort of unique authenticity token, which identifies the document in a non-questionable way.
- Signer has to LogIn
- After LogIn has been successful you can upload a document.
- You can sign uploaded document.
- DocumentHash / Meta data hash is generated. DocumentHash should be stored on Blockchain. Signed document is stored on IPFS.
Document verification flow
Users who need to verify their certificates with a third party do so by sharing the authenticity token (that is, the file contract address), which contains all the necessary information to verify that the document exists and is authentic and not counterfeited.
The user retrieves the certificate to verify from its location and initiates a new transaction on the blockchain network, transferring the authenticity token to the verification authority. The authority obtains the signed content and metadata of the certificate being verified and then compares them with the equivalent hash values from the off-chain copy. If the values match, the document is verified
Challenges we ran into
- It was challenging to generate the metadata hash for the files and then use distributed file storage.
- Limited documentation on various KYC APIs (driving license DMV, Aadhar API etc)
Accomplishments that we're proud of
- I was get to get basic document upload and verification flow involving chainlink, IFPS and oracle contracts. The entire dapp is hosted on heroku. Basic API integeration with KYC providers (driving licence) works and more such KYC apis can be integerated in the future.
What's next for ChainSign -Chainlink based e-Document verification & signing
- Integeration with various document storage solutions such as dropbox
- Integerations with existing e-signing solutions such as hellosign, docusign etc to establish signers' accountability publicly with blockchain-based timestamping.
Code Specs
Requirements
In order to use the frontend portion of the demo application you will need
- A crypto wallet such as Metamask or Coinbase Wallet
- Test $LINK for the relevant testnet. You can get some at the Chainlink Faucets page.
- Test $ETH to pay for gas costs. You can get some at the Chainlink Faucets page.
Quick Start
Clone the repo and install all dependencies:
yarn install
Start up the local Hardhat network and deploy all contracts:
yarn chain
In a second terminal start up the local development server run the front-end app:
yarn dev
Deploy Contracts
This will run the deploy scripts to a local Hardhat network:
yarn deploy
To deploy on a public network:
yarn deploy --network kovan
Auto-Funding
The Hardhat project will attempt to auto-fund any newly deployed contract that uses Any-API or VRF, which otherwise has to be done manually.
The amount in LINK to send as part of this process can be modified in this Hardhat Config, and are configurable per network.
Parameter | Description | Default Value |
---|---|---|
fundAmount | Amount of LINK to transfer when funding contracts | 1 LINK |
If you wish to deploy the smart contracts without performing the auto-funding, run the following command when doing your deployment:
yarn deploy --tags main
References
Built With
- chainlink
- chakraui
- dapp
- ether
- hardhat
- heroku
- kovan
- metamask
- moralis
- nextjs
- solidity
- typechain
- typescript
Log in or sign up for Devpost to join the conversation.