Skip to content

Timestamping service over Bitcoin blockchain and prove of ownership by ERC-721 standard and Ethereum database implementation

Notifications You must be signed in to change notification settings

JMariadlcs/Indeliable-Evidences

Repository files navigation

GitHub language count GitHub last commit Contributions welcome donations

A timestamping service over Bitcoin blockchain and a parallel process for proving ownership by ERC-721 standar and token generation developed on a Ethereum database implementation.

The code include in this repository is part of the final degree thesis from my Telecommunications Engineering degree.

Features

  • Tweet timestamping over Bitcoin blockchain.
  • Incorruptible database generation due to hashing implementation.
  • Smart contracts usage for Ethereum database development.
  • ERC-721 dynamic on chain token generation for proving timestamping ownership.

Tech

Indeliable Evidences uses a number of open source projects to work properly:

  • opentimestamps - for the timestamping service over bitcoin blockchain
  • node.js - evented I/O for the backend
  • hardhat - for the blockchain management part
  • ethers.js - librarie for interacting with Ethereum blockchain
  • nomic labs - for Ethereum database development
  • alchemy - for Rinkeby network set up
  • open zeppelin - auxiliar smart contract providers
  • tweepy - for twitter API management

Indeliable Evidences is also an open source project with a public repository on Github.

Usage

All the required dependencies and libraries needed for the execution of the project are included in requirements.txt

Indeliable Evidence is formed by two parallel processes, the Bitcoin timestamping process and the Ethereum database + ERC721 token generation one.

Both processes form a whole timestamping and verification project whose prototype is detailed below.

BITCOIN TIMESTAMPING AND VERFICIATION

Bitcoin Timestamping

For using the Bitcoin timestamping service, user must:

Adding tweet to database

python3 add_tweet_to_database.py

You will be ask to introduce a tweet URL as input of the program. If the input is wrong format you will be asked to repeat the action. If the input is correctly introduced you will receive a hash for the introduced tweet. You should keep this hash in a safe place because this will be the key used for the verification process. You will also notice that a .csv file is created containing all the tweet metadata and the previously metioned hash.

Database timestamping

python3 database_timestamping.py

You will notice that a .txt file inside timestamped_hashed directory has been generated and that the Opentimestamp ots stamp command is being executed.

After following the previously steps your database should be in process of being timestamped, you just need to wait until the OpenTimestamp protocol has finished doing its job.

Timestamping verification

Make sure you are inside the bitcoin_timestamping directory.

Timestamping verification

python3 verify_tweet.py

You will be asked to introduce a tweet hash. The hash you must introduced is one genereated for your input tweet when you executed the timestamping process. Once you have introduced the corresponding hash, if the tweet is included in the database you will receive the timestamping proof from the OpenTimestamp protocol because of the ots verify command and a .json object will be generated inside the verified_tweets_info directory containing all the metadata from your tweet.

ETHEREUM DATABASE + ERC-721 TOKEN GENEATION

For using the Ethereum datatabase and ERC-721 token geneartion service, user must:

  • Have an Ethereum account.
  • Have Rinkeby Network configured.
  • Have funds (eth) inside the wallet: funds can be request from a faucet.
  • For interacting with the smart contracts, the user must create a .env file.
  • Node.js must be installed

Inside the file the following variables must be declared:

  • STAGING_ALCHEMY_KEY: Alchemy key can be generated here.
  • PRIVATE_KEY: Ethereum private key.

For executing the process make sure you are inside App directory.

Process execution

node --experimental-json-modules App.mjs

After that you will be asked for choosing between:

  • Store an evidence in database (type: '1')
  • Store an evidence in database + mint EvidenceNFT (type: '2')
  • Show all stored evidences (type: '3')

If you choose the first and second options you will need to introduce a tweet URL and it will be stored on the database and in the second case a ERC-721 standard token (NFT) will be generated containing the tweet url + timestamp in the image and description.

After some minutes you can have a look to your NFT using Opensea Rinkeby.

Contributing

Contributions are welcome!⭐

Please take a look at the contributing guidelines if you are willing to help!

Licence

Indeliable Evidences is an open-source project.

Donations

Donations are always helpfull for open-source project developers🤠

→ Ethereum (ERC-20) address: 0x0aEbeBee37D530961e05FF525409801Ab97341dE

→ Polygon address: 0x0aEbeBee37D530961e05FF525409801Ab97341dE

About

Timestamping service over Bitcoin blockchain and prove of ownership by ERC-721 standard and Ethereum database implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published