libra-client-sdk-java
is the official Libra Client SDK for the Java programming language.
SPEC = specification LIP-X = Libra Improvement Protocol
jsonrpc
: libra JSON-RPC APIs client. SPECjsonrpctypes
: 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-5LibraClient
: 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
You can find all of the example code under the src/test/java/org/libra/examples
directory:
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>
gradle build
Jar file location: build/libs/libra-client-sdk-java.jar
gradle test
// 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