Skip to content
/ xrpl4j Public
forked from XRPLF/xrpl4j

A 100% Java implementation to interact with the XRP Ledger.

License

Notifications You must be signed in to change notification settings

xrpdevs/xrpl4j

 
 

Repository files navigation

xrpl4j: XRP Ledger Java SDK

codecov issues javadoc

A pure Java implementation of the core functionality necessary to interact with the XRP Ledger. While this library does not provide a network client, it does support the difficult tasks of XRPL serialization and transaction signing, and provides useful Java bindings for XRP Ledger objects and rippled request/response objects.

Project Structure

Xrpl4j is structured as a Maven multi-module project, with the following modules:

  • xrpl4j-binary-codec: javadoc
    • Serializes the JSON representation of XRPL Transactions to the canonical binary format of the XRP Ledger
  • xrpl4j-address-codec: javadoc
    • Converts seeds, addresses, and public keys from their byte representations to the XRPL Base58Check encoding format, and vice versa
    • Handles X-Address encoding and decoding
  • xrpl4j-keypairs: javadoc
    • Generates seeds and derives XRPL key pairs, and can be used to sign transactions and verify transaction signatures
    • Supports both secp256k1 and ed25519 key types and signing algorithms
  • xrpl4j-model: javadoc
    • Provides Java objects which model XRP Ledger objects, as well as request parameters and response results for the rippled websocket and JSON RPC APIs
    • Also provides a Jackson ObjectMapper and JSON bindings which can be used to serialize and deserialize to and from JSON
  • xrpl4j-crypto: javadoc
    • xrpl4j-crypto-core: Provides core primitives like public/private keys definitions, signature interafaces and more.
    • xrpl4j-crypto-bouncycastle: An implementation using BouncyCastle as the underlying library/provider.
  • xrpl4j-client: javadoc
    • Provides an example rippled JSON RPC client which can be used to communicate with a rippled node
  • xrpl4j-integration-tests:
    • Contains all of the project's integration tests, which serve as valuable xrpl4j usage examples for common XRPL flows

Documentation

Requirements

  • JDK 1.8 or higher
  • A Java project manager such as Maven or Gradle

Installation

You can use one or more xrpl4j modules in your Maven project by using the current BOM like this:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.xrpl4j</groupId>
            <artifactId>xrpl4j-bom</artifactId>
            <version>1.2.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Then you can add any of the xrpl4j modules found in the BOM to your pom.xml. For example, if you want to use the xrpl4j address codecs, add the following:

<dependency>
  <groupId>org.xrpl</groupId>
  <artifactId>xrpl4j-address-codec</artifactId>
</dependency>

Development

You can build and install the project locally using maven from the command line:

mvn clean install -DskipTests

To run unit tests, use the following command:

mvn clean install -DskipITs

To run the integration tests, you can either run

mvn clean install

which will run both the unit tests and integration tests, or to run only the integration tests, you can run the following commands:

cd xrpl4j-integration-tests
mvn clean install

About

A 100% Java implementation to interact with the XRP Ledger.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%