Skip to content

sausagee/libra-client-sdk-java

 
 

libra-client-sdk-java

Java CI with Gradle API Reference Apache V2 License javadoc

libra-client-sdk-java is the official Libra Client SDK for the Java programming language.

Overview of SDK's Packages

SPEC = specification LIP-X = Libra Improvement Protocol

  • jsonrpc: libra JSON-RPC APIs client. SPEC
  • jsonrpctypes: generated code, JSON-RPC API response data object classes generated from protobuf definition.
  • stdlib: generated code, move stdlib script utils for constructing transaction script playload.
  • types: generated code, Libra on-chain data structure types. Mostly generated code with small extension code for attaching handy functions to generated types.
  • utils: utility functions, account address utils, currency code, hashing, hex encoding / decoding, transaction utils.
  • AccountIdentifier & IntentIdentifier: encoding & decoding Libra Account Identifier and Intent URL. LIP-5
  • LibraClient: interface of JSON-RPC client.
  • LibraException: root exception of all checked exceptions defined in SDK.
  • PrivateKey: abstraction for hiding private key details, implement this interface for plugin your customized private key signing logic.
  • Signer: sign transaction logic.
  • Testnet: Testnet utility, minting coins, create Testnet client, chain id, Testnet JSON-RPC URL.
  • TransactionMetadata: utils for creating peer to peer transaction metadata. LIP-4

Examples

You can find all of the example code under the src/test/java/org/libra/examples directory:

Download

Gradle

implementation 'org.libra:libra-client-sdk-java:0.1.0'

Maven

<dependency>
  <groupId>org.libra</groupId>
  <artifactId>libra-client-sdk-java</artifactId>
  <version>0.1.0</version>
</dependency>

Download Jars on Maven

Development

System Requirements

Build

gradle build

Jar file location: build/libs/libra-client-sdk-java.jar

Test

gradle test

Upgrade to latest libra testnet release

// reset libra submodule to testnet branch, re-generate stdlib and lcs type classes
gradle gen

// generate jsonrpc types from protobuf definition
gradle generateProto

// confirm everything works
gradle test

License

Apache License V2

Contributing

CONTRIBUTING

Features, Roadmap and Development Plan

CHECKLIST

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%