GithubHelp home page GithubHelp logo

tdas's Introduction

TDAS

Utilities for Timestamped Document Authenticity Seal (TDAS) research project

timestamp-utils.py

Prerequisites

  • OpenTimestamps Client: The client is necessary for both creating and verifying timestamps.

    • Install via PyPi:
    pip3 install opentimestamps-client
    
    • Or, if you prefer, install from source:
    python3 setup.py install
    
  • Bitcoin Core Node: Required only for verification. A pruned node is sufficient.

Setting Up Bitcoin Core Node

This is needed to use the verify method.

  1. Download Bitcoin Core from the official site.
  2. Configure your bitcoin core with the following settings in bitcoin.conf. You can prune if you like.
    server=1
    rpcuser=YOUR_USERNAME
    rpcpassword=YOUR_PASS
    
  3. Use the following command to start up the node.
    bitcoind -daemon
    
  4. Use the command to following command to stop the node.
    bitcoin-cli stop
    

Timestamping

  • The timestamp_signature function saves a signature to a file and creates a timestamp proof using the OpenTimestamps protocol. Please note, when you stamp it takes a few hours for the timestamp to get confirmed by the Bitcoin blockchain. Example usage:

    signature = "example signature content"
    output_path = "path/to/output/file.ots"
    ots_file = timestamp_signature(signature, output_path)
    
  • The verify_timestamp function verifies the timestamp of a signature file. You need a local Bitcoin Core node (a pruned node is fine). Example usage:

    ots_file_path = "path/to/timestamped/file.ots"
    verification_result = verify_timestamp(ots_file_path)
    

For more advanced configurations or troubleshooting, please see the OpenTimestamps documentation.

tdas's People

Contributors

ritcheydominic avatar bol0gna avatar zehuanli avatar

Watchers

 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.