Diem Client SDK

The official Diem Client SDK for the Java programming language.

License

License

Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

com.diem
ArtifactId

ArtifactId

client-sdk-java
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

Diem Client SDK
The official Diem Client SDK for the Java programming language.
Project URL

Project URL

https://github.com/diem/client-sdk-java
Source Code Management

Source Code Management

https://github.com/diem/client-sdk-java

Download client-sdk-java

Dependencies

runtime (9)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.8.6
org.bouncycastle : bcprov-jdk15on jar 1.66
org.bitcoinj : bitcoinj-core jar 0.15.8
design.contract : libbech32 jar 1.0.0
org.apache.httpcomponents : httpclient jar 4.5.10
org.apache.commons : commons-lang3 jar 3.11
com.google.protobuf : protobuf-java jar 3.13.0
com.google.protobuf : protobuf-java-util jar 3.13.0
com.google.guava : guava jar 29.0-jre

Project Modules

There are no modules declared in this project.

client-sdk-java

Java CI with Gradle Server API Reference Apache V2 License javadoc

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

Overview of SDK's Packages

com.diem

SPEC = specification DIP-X = Diem Improvement Protocol

  • jsonrpc: diem JSON-RPC APIs client. SPEC
  • stdlib: generated code, move stdlib script utils for constructing transaction script playload.
  • types: generated code, diem 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 diem Account Identifier and Intent URL. DIP-5
  • DiemClient: interface of JSON-RPC client.
  • DiemException: 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. DIP-4
  • Constants: static data and JSON-RPC response enum type values.

Examples

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

Download

Gradle

implementation 'com.diem:client-sdk-java:1.0.5'

Maven

<dependency>
  <groupId>com.diem</groupId>
  <artifactId>client-sdk-java</artifactId>
  <version>1.0.5</version>
</dependency>

Download Jars on Maven

Development

System Requirements

Build

gradle build

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

Test

gradle test

Upgrade to latest diem release

// checkout diem submodule
git submodule update diem


// reset diem submodule to diem release revision
cd diem
git fetch/checkout/pull origin <revision/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

com.diem

Diem

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.1.0