Skip to content

Java implementation of the Nebulas protocol

License

Notifications You must be signed in to change notification settings

suxinsen/neb.java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nebulasj

The nebulasj library is a Java implementation of the Nebulas protocol, which allows it to maintain a wallet and send/receive transactions without needing a local copy of go-nebulas.

Add as dependency

Gradle

repositories {
    mavenCentral()
}

dependencies {
    compile "io.nebulas:nebulas:0.2"
}

Maven

<dependency>
    <groupId>io.nebulas</groupId>
    <artifactId>nebulas</artifactId>
    <version>0.2</version>
</dependency>

Building from source

Prerequisites

Components Version Description
Java >= 1.8.0_171 Java8
Gradle >= 4.6 Gradle is a dependency management tool for Java.

Build

it is best to have the latest JDK and Gradle installed. The HEAD of the master branch contains the latest development code and various production releases are provided on feature branches.

./gradlew clean build

Building from an IDE

Alternatively, just import the project using your IDE. IntelliJ has Gradle integration built-in and has a free Community Edition.

Documentation

Documents of NebulasJ is here: Public API documentation

http nebulasio-client

Http client is used to access the RPC API of Nebulas, such as mainnet and testnet.

We haven't written examples for http-client now, please refer to the test cases to learn how to use it.

    private NebulasClient nebulasClient = HttpNebulasClient.create("https://testnet.nebulas.io");

    @Test
    public void testGetNebState() {
        Response<NebState> response = nebulasClient.getNebState();
        System.out.println(response);
    }

    @Test
    public void testGetAccountState() {
        Response<AccountState> response = nebulasClient.getAccountState(new GetAccountStateRequest("n1Z6SbjLuAEXfhX1UJvXT6BB5osWYxVg3F3"));
        System.out.println(response);
    }

Wiki

Please check our Wiki to learn more about Nebulas.

Contribution

We are very glad that you are considering to help Nebulas Team or go-nebulas project, including but not limited to source code, documents or others.

If you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our slack channel to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.

Please refer to our contribution guideline for more information.

Thanks.

License

The go-nebulas project is licensed under the GNU Lesser General Public License Version 3.0 (“LGPL v3”).

For the more information about licensing, please refer to Licensing page.

About

Java implementation of the Nebulas protocol

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%