GithubHelp home page GithubHelp logo

ginkosama / reddcoin-java-core-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 2.15 MB

A Reddcoin Java Core RPC API

Home Page: https://www.reddcoin.com/

License: GNU General Public License v3.0

Java 100.00%
reddcoin java rpc api

reddcoin-java-core-api's Introduction

A Reddcoin Java Core RPC API

Feel free to support me with some Reddcoins RDD: Ri7NauXZ26dn6adcGeERb8XpH7yNfu36bz

Import the jar file out/artifacts/Reddcoin_Java_Core_API_jar/Reddcoin-Java-Core-API.jar into your java project as a library to have a ready to use API including all dependencies

If you want to work from the source, the dependencies are the following (available in the lib folder):

  • retrofit >= 2.3
  • okio >= 1.11
  • okhttp >= 3.8
  • moshi >= 1.4
  • converter-moshi >= 2.3

Usage example :

Configuration conf = new Configuration("http://localhost:45443", "username", "password");
Wallet wallet = new Wallet(conf);
Call<String> call = wallet.getNewAddress("myNewAddressAcountLabel");

// use the call object either in blocking synchro way
Response res = call.execute();
if(res.code() == 200)
 System.out.println(res.body());
else System.out.println(res.errorBody());

// or in non blocking async way (usefull for android)
call.enqueue(new retrofit2.Callback<String>() {
    @Override
    public void onResponse(Call<String> call, retrofit2.Response<String> response) {
     if(response.isSuccessful())
      System.out.println(response.body());
     else
      System.out.println(response.errorBody());
    }

    @Override
    public void onFailure(Call<String> call, Throwable throwable) {
     throwable.printStackTrace();
    }
});

The following API object are available in com.reddcoin.core.API :

  • Blockchain
  • Environment
  • Mining
  • Network
  • Utilities
  • Wallet

They all take a Configuration object to construct, and exposes the differents possible endpoints with explicit parameters.

For more information on what is returned, the original API that was used to make this port is available here : https://github.com/Surfer058/Reddcoin-.NET-Core-API

reddcoin-java-core-api's People

Contributors

ginkosama avatar

Watchers

 avatar

Forkers

bkpawlowski

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.