Skip to content
Factom Java Library integrates Java (JEE & Spring) with the Factom blockchain
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
docs
factom-client-api/src/main
factom-client-impl/src/main
factom-client-offline-signing/src/main/java/org/blockchain_innovation/factom/client
factom-client-tests/src/test
frameworks
gradle/wrapper
quality/config
service-providers
.gitignore
CHANGELOG.adoc
CODE_OF_CONDUCT.md
Jenkinsfile
LICENSE
NOTICE
README.adoc
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.adoc

Factom Java

A Factom Java enterprise client to interact with Factom. Please see the docs module for documentation.

Currently the client implements all factomd and factom-walletd lowlevel API calls both synchronously and asynchronously. Higher level functions are being worked on.

The client consists of several modules to support the following use cases:

  • Java Standard Edition >= 1.8

  • Java Enterprise Edition (JEE)

    • Dependency Injection

    • Managed Threads

    • JSON processing using javax.json and jsonb

  • Spring (boot)

    • Dependency Injection

    • Managed Threads

    • Configuration

JSON plugins (SPI)

To minimize dependencies and allow the implementor to choose, it has plugable JSON (de)serialization support. This is handled as an SPI. That means you need to have one of the json-providers below on the classpath!

  • GSON

  • JEE (javax.json)

  • Jackson (not implemented yet)

Whenever one of the JSON plugins is on the classpath it will use that plugin to do the (de)serialization. Please note that at least one plugin is needed for this library to function.

Logging plugins (SPI)

There is pluggable support for logging as well. We will enhance that support in the future. Currently it needs the SLF4J SPI on the classpath. Without it, the library will not function. That will be fixed in future releases.

Offline signing

Instead of using walletd to sign transactions and commits it is also possible to do that offline using private keys directly. To enable this you will need to include the offline signing client on the classpath. This module also has an external dependency on an encryption library.

Android support

Since this project has no external dependencies besides a JSON library and optional logging, it is fully compatible with Android 7 and up. An example project can be found at Github.

Maven installation

This is a gradle project but maven snapshots and releases are distributed on the Nexus installation of Sphereon at http://nexus.qa.sphereon.com/repository/bif/

You need at least the following dependencies in your application

<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>factom-client-impl</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>
<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>logger-slf4j</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>

<!-- At least one of the following dependencies -->
<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>json-converter-jee</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>
<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>json-converter-gson</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>

<!-- Offline signing support -->
<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>factom-client-offline-signing</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>


<!-- Optional JEE support (only in JEE environment) -->
<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>jee-support</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>

<!-- Optional Spring Boot support (only in Spring Boot environment) -->
<dependency>
    groupId>org.blockchain-innovation.factom.client</groupId>
    <artifactId>spring-boot-support</artifactId>
    <version>0.2.1</version>
    <scope>compile</scope>
</dependency>

Active Development

Important
This software still is in early development stage. As such you should expect breaking changes in APIs, we expect to keep that to a minimum though.
You can’t perform that action at this time.