Java Substrate Client Library

Java Polkadot API, this is a clone of https://github.com/polkadot-java/api

License

License

Categories

Categories

Java Languages Net
GroupId

GroupId

net.cloudburo
ArtifactId

ArtifactId

polkadot-java
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

zip
Description

Description

Java Substrate Client Library
Java Polkadot API, this is a clone of https://github.com/polkadot-java/api
Project URL

Project URL

https://cloudburo.net
Source Code Management

Source Code Management

https://github.com/cloudburo/api

Download polkadot-java

Dependencies

compile (19)

Group / Artifact Type Version
io.reactivex.rxjava2 : rxjava jar 2.2.8
com.github.briandilley.jsonrpc4j : jsonrpc4j jar 1.5.3
org.java-websocket : Java-WebSocket jar 1.4.0
com.alibaba : fastjson jar 1.2.48
org.apache.commons : commons-lang3 jar 3.8
com.google.guava : guava jar 27.1-jre
org.apache.commons : commons-collections4 jar 4.2
com.onehilltech.promises » promises-jvm jar 0.10.3
org.jooq : joou-java-6 jar 0.9.4
org.jooq : jool-java-8 jar 0.9.14
org.jooq : joor-java-8 jar 0.9.11
net.i2p.crypto : eddsa jar 0.3.0
org.apache.logging.log4j : log4j-slf4j-impl jar 2.11.1
org.apache.logging.log4j : log4j-core jar 2.11.1
org.apache.logging.log4j : log4j-api jar 2.11.1
org.apache.commons : commons-text jar 1.6
org.bitcoinj : bitcoinj-core jar 0.15.2
org.apache.httpcomponents : httpclient jar 4.5.6
org.apache.httpcomponents : httpcore jar 4.4.8

runtime (1)

Group / Artifact Type Version
org.lz4 : lz4-java jar 1.5.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Polkadot/Substrate Java Api

This library provides a Java wrapper around all the methods exposed by a Polkadot/Subtrate network client and defines all the types exposed by a node.

JDK

Java 1.8

Based JS code version

The Java version is based on JS commit ff25a85ac20687de241a84e0f3ebab4c2920df7e.

Substrate version

The working substrate version is 1.0.0-41ccb19c-x86_64-macos. Newer substrate may be not supported.

overview

The API is split up into a number of internal packages

Document

  • See the generated JavaDoc in /doc folder. Or visit the document site
  • To generate JavaDoc by yourself, reference gendoc.sh in the root folder
  • To understand how the system works, you may reference Substrate and Polkadot Network

Integrate the API into your projects

The project uses Gradle as build tool. You need to install Gradle.

Build the library with Gradle then link to the JAR

  1. git clone https://github.com/polkadot-java/api.git
  2. cd api
  3. gradle build
  4. Get the JARs in folder build/libs/
  5. Add the JARs into your projects.

Link to the source code directly,

  1. git clone https://github.com/polkadot-java/api.git
  2. Import the gradle project in folder api/packages to your workspace.
  3. Add links or dependencies in the IDE. This is different in different IDEs, please reference to your IDE document.

How to build and use sr25591 JNI

  1. See polkadot-java/sr25519/readme.md to compile sr25591 library (Rust and C++).
  2. See polkadot-java/sr25519/cpp/compile.sh how to compile the JNI shared library.
  3. See polkadot-java/sr25519/libs/readme.md how to use the JNI in the Java API.

How to run examples

  1. Install substrate local node:
    https://github.com/paritytech/substrate

  2. Running the samples:
    There are several runnable samples. To run the samples, go to folder examples_runnable/LastestDate (such as examples_runnable/20190525), then run each shell script.

  3. To change the Substrate address, change the endPoint variable in each demo main file.

net.cloudburo

Cloudburo

Versions

Version
0.1