Coder Social home page Coder Social logo

jmariadlcs / indeliable-evidences Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 7.28 MB

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

JavaScript 35.51% Solidity 27.02% Python 37.47%
timestamping bitcoin ethereum erc-721 opentimestamps indeliable-evidences solidity python javascript

indeliable-evidences's Introduction

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

indeliable-evidences's People

Contributors

jmariadlcs avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.