Whiteflag is a fully neutral and secure communciations protocol based on blockchain technology. It enables near real-time communication in armed conflicts and disasters to exchange early warning and status information to create shared situational awareness.
The Whiteflag Protocol specification is an open standard.
The Whiteflag Java Library (WFJL) is an implementation of the Whiteflag Protocol in Java to support the development of Whiteflag-enabled applications. The WFJL is to include all Whiteflag protocol features, but with minimal dependencies. Therefore, the library is independent from any specific blockchain, database solution, user interface, etc.
Version 1 of the WFJL corresponds with version 1 of the protocol, and more
specifically with v1-draft.6
of the standard. The planned WFJL functionality
and corresponding 1.x
subversions are defined as milestones.
To use the WFJL, its GitHub package should be added to your project as a dependency using the following "group:artifact:version" information, with the most recently published version:
org.whiteflagprotocol.java:whiteflag-java:1.1.0
For example, when using Gradle, the following should be
included in your build.gradle
file:
dependencies {
implementation 'org.whiteflagprotocol.java:whiteflag-java:1.1.0'
}
or in your pom.xml
when using Maven:
<dependency>
<groupId>org.whiteflagprotocol.java</groupId>
<artifactId>whiteflag-java</artifactId>
<version>1.1.0</version>
</dependency>
Note that you also need to add the GitHub WFJL package repository URL https://maven.pkg.github.com/whiteflagprotocol/whiteflag-java
to your project. Please see the GitHub documentation for detailed information
about installing packages from the GitHub repository with either
Maven
or Gradle.
After adding the dependency to your project, the WFJL classes can be used in your Java code. Your code may look like this:
import org.whiteflagprotocol.java.WfMessage;
import org.whiteflagprotocol.java.WfException;
public class Example {
/* Properties */
private WfMessage message;
/* Methods */
public WfMessage createMessage(String messageType) throws WfException {
message = WfMessage.type(messageType);
return message;
}
}
All detailed documentation of the WFJL programming interface is available at
java.whiteflagprotocol.org. The
documentation is also found in this repository in the docs/
directory.
The repository structure and development guidelines for the source code are
described in CONTRIBUTING.md
.
The WFJL software is dedicated to the public domain under the
Creative Commons CC0-1.0 Universal Public Domain Dedication
statement. See LICENSE.md
for details.
The library may require third party software packages, which are not part of this distribution and may be licenced differently. The third party software dependencies of the WFJL are:
- the JUnit test framework for testing the software
- the Bouncycastle Crypto API used as the cryptographic provider for the Whiteflag Elliptic Curve Diffie-Hellman implementation
- the Jackson JSON library for reading and creating JSON formatted Whiteflag messages