Skip to content

Moralis-Filecoin Hackathon - NFT Handwritten Signatures and Verification System

Notifications You must be signed in to change notification settings

hueyl77/moralis-legitimize

Repository files navigation

Legitimize.io

Legitimize.io is a handwritten-signature NFT validation system, allowing users to create NFTs from their human signatures and link them to social profiles for proof of identity. Legitimate signatures can be used to sign documents and assets for authentication and legality purposes.

Note: Please use the testnet POLYGON MUMBAI when testing. You can use the faucet at https://faucet.polygon.technology/ to request some test MATIC. Thank you.

Moralis-Filecoin Hackathon

Demo Video: https://www.youtube.com/watch?v=vPHsGa3Wus4

This web application leverage the ease of web3 functionalities using the Moralis API and IPFS's data storage system. The Pinata pinning service is used to upload and pin files to IPFS.

Two custom ERC721 contracts, LegitSignature and LegitNFT, provide the core functionalities of NFT creation and verification. The contracts are deployed to the Polygon chain (the Mumbai testnet), and uses MATIC for transaction fees.

The intuitive UI is built using NextJS and a handful of APIs and libraries. Check out the technologies used section below.

Hackathon Tracks:

  • Cloning Web2
  • Doing Good

Team Member(s):

Huey Ly - (Designer and coder) - [email protected]

Github: https://github.com/hueyl77

Twitter: https://twitter.com/hueyly

LinkedIn: https://www.linkedin.com/in/huey-ly-488ba713b


Technologies Used

Currently, this web application uses Moralis's API to authenticate and connect to the user's wallet. On the roadmap are plans to create a managed wallet system that allows non-web3 users (without wallets) to manage their funds and NFTs.

References:

The Pinata pinning service is used to upload and pin the signature NFTs and signed documents and assets to IPFS.

References:

The Hardhat development environment is used to develop, test, and deploy the smart contracts to Polygon Mumbai.

References:

How It Works

Note: Please use the testnet POLYGON MUMBAI when testing. You can use the faucet at https://faucet.polygon.technology/ to request some test MATIC. Thank you.

  1. The user utilizes the intuitive UI to create an NFT of their handwritten signature. The SignatureNFT token is stored with the following metadata:
  • name: the name of the person is also the name of the NFT
  • description: an optional description of the NFT
  • socialAuth: a json of linked social profiles (e.g. Twitter, Facebook, LinkedIn)
  • image: the image url (on IPFS) of the signature
  • external_url: the external image url

Creating a handwritten-signature NFT

The SignatureNFT contract also has custom functions to:

  • link another NFT's address and IPFS content ID to a LegitSignature token
  • retrieve the signatures linked to an NFT given its address and content ID.

  1. To create a signed NFT, the user uploads the file to the Legitimize interface and selects a signature from their connected wallet. Legitimize will mint a new NFT linked to the signature with the following metadata:
  • name: the name of the NFT
  • description: an optional description of the NFT
  • image: the preview image of the NFT with the signature overlayed,
  • originalFile: the original file without a signature overlay, this can be any file type
  • origFileType: the MIME type of the original file
  • origFileCid: the IPFS content ID of the original file
  • legalTerms: any embedded legal text associated with the file

Signing an NFT

  1. Metadata such as the NFT's address and IPFS Content ID are stored as EXIF data in the preview image of the signed NFT. To verify the linked signatures of an NFT, extract the EXIF data and call the smart contract function LegitSignature.getNFTSignatures().

Verify a signed NFT

  1. With their NFTs signed and stored on IPFS, users can easily sell their creations in marketplaces such as OpenSea and Rarible while assuring that the NFTs are their legitimate creations. In addition, legal contracts can be drafted and signed as NFTs to be stored safely and permanently on a blockchain, providing ease of verification in judicial systems worldwide.

Local Setup

  • Clone this repo to your local environment:
[email protected]:hueyl77/moralis-legitimize.git
  • In the project's directory install node dependencies
npm install
  • Create a .env.local file to store local environment variables, see env.local.example

Runnning the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

Run type-check before committing:

npm run type-check

Solidity Dev

cd _ethereum
npx hardhat test
npx hardhat deploy-dev

CSS and Style Guide

APIs and Packages

About

Moralis-Filecoin Hackathon - NFT Handwritten Signatures and Verification System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published