Giter VIP home page Giter VIP logo

api's Introduction

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.

api's People

Contributors

gemzhang avatar polkadot-java avatar wangboy avatar

Watchers

 avatar  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.