Skip to content

Genobank/genobankioj

Repository files navigation

Blockchain Lab Results Certification

This project demonstrates how to notarize one lab result certification on the blockchain with GenoBank.io. This is written in Java and is portable to Apache Tomcat, command line and other web environments.

sequenceDiagram
    Java->>+api.genobank.io: {"claim":..., "signature":..., "permitteeSerial":...}
    api.genobank.io->>+Java: {"txHash":..., "timestamp":..., "genobankSignature":...}
Loading

Prerequisites

  1. Supported operating systems are macOS, Linux and Windows
  2. Install Java (version 11 or later supported version) and Apache Maven
    • On macOS
      1. Do not use the official installer from Oracle, that approach is painful, nobody uses it
      2. Install Homebrew
      3. brew install java
      4. brew install maven
      5. brew install openjdk

Downloading

Get the latest source code from GitHub

cd ~
mkdir -p Developer
cd Developer
git clone https://github.com/Genobank/genobankj.git
cd genobankj

Building and testing

Prepare your Maven project build state

./mvnw initialize

Build the product

./mvnw clean compile assembly:single

A build which passes all tests will be indicated by:

[INFO] BUILD SUCCESS

at the bottom of your build.

After you have made any changes, run the build command above.

Run the product without arguments to see instructions

java -jar target/*.jar --test

Or include all required parameters to notarize a certificate

java -jar target/*.jar --test 'wrong outside clever wagon father insane boy junk punch duck drift cupboard' 41 'Bob' '1234' '1' 'N' '' 1614069145429

(Test account at https://github.com/Genobank/genobank.io/wiki/Test-Accounts-and-Certificates)

Overview

  • LaboratoryProcedure, LaboratoryProcedureResult, Network are simple records.
  • PermitteeRepresentations stores everything that the permittee (laboratory) will attest to.
  • PermitteeSigner performs cryptographic signing on behalf of the permittee.
  • Platform notarizes the certificate onto the blockchain using GenoBank.io.
  • NotarizedCertificate is the notarized artifact.
  • Main is the program entry point.

Extending

You are welcome to extend the functionality of this example, for example to connect to an ERP system or add additional information (like birthday) into the name field.

References

Maintenance

  • Periodically update to the most recent version, to obtain the latest bug fixes and new features:

    ./mvnw versions:use-latest-versions -Dincludes="org.checkerframework:*"

License

This project is assigned copyright to GenoBank.io. All rights reserved.

About

Java implementation of GenoBank.io platform

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages