dev.jlibra:jlibra-grpc

A Java library for interacting with the Libra blockchain

License

License

Categories

Categories

gRPC Net Networking
GroupId

GroupId

dev.jlibra
ArtifactId

ArtifactId

jlibra-grpc
Last Version

Last Version

0.8.0
Release Date

Release Date

Type

Type

jar
Description

Description

A Java library for interacting with the Libra blockchain

Download jlibra-grpc

How to add to project

<!-- https://jarcasting.com/artifacts/dev.jlibra/jlibra-grpc/ -->
<dependency>
    <groupId>dev.jlibra</groupId>
    <artifactId>jlibra-grpc</artifactId>
    <version>0.8.0</version>
</dependency>
// https://jarcasting.com/artifacts/dev.jlibra/jlibra-grpc/
implementation 'dev.jlibra:jlibra-grpc:0.8.0'
// https://jarcasting.com/artifacts/dev.jlibra/jlibra-grpc/
implementation ("dev.jlibra:jlibra-grpc:0.8.0")
'dev.jlibra:jlibra-grpc:jar:0.8.0'
<dependency org="dev.jlibra" name="jlibra-grpc" rev="0.8.0">
  <artifact name="jlibra-grpc" type="jar" />
</dependency>
@Grapes(
@Grab(group='dev.jlibra', module='jlibra-grpc', version='0.8.0')
)
libraryDependencies += "dev.jlibra" % "jlibra-grpc" % "0.8.0"
[dev.jlibra/jlibra-grpc "0.8.0"]

Dependencies

compile (4)

Group / Artifact Type Version
io.grpc : grpc-netty jar 1.26.0
io.grpc : grpc-protobuf jar 1.26.0
io.grpc : grpc-stub jar 1.26.0
javax.annotation : javax.annotation-api jar 1.3.2

Project Modules

There are no modules declared in this project.

JLibra

GitHub Actions - Build Codacy Badge Known Vulnerabilities Maven Central javadoc

A Java library for building applications on Diem

The project previously know as Libra has been renamed to Diem. Read more about it from here: Announcing the name Diem. JLibra is still in the process of renaming all the references to the old name but all the features are functional despite the old naming in some places.

The API for creating transactions and querying the database of Diem uses json-rpc - a simple remote procedure call protocol utilizing JSON for encoding data. Sending new transactions to the Diem network requires also another type of serialization - the Object Canonical Serialization. JLibra implements both of these and provides a simple api for Java applications to integrate to Diem.

JLibra simplifies integration to Diem but does not hide any features of the Diem api, this makes it possible to implement anything supported by Diem with Java.

Prerequisites

  • JDK 11+
  • Maven 3+

Setup

  • Clone this repo
  • Build project with mvn install (this is important because the project contains classes that will be created during the Maven build and simply checking the project out is not enough)

Try the examples

Start sample Main classes in dev.jlibra.example package for examples (for a complete example with creating accounts to moving coins between them check the how to)

BatchRequestExample

CreateChildVaspAccountExample

DualAttestationExample

GenerateKeysExample

GetAccountStateExample

GetAccountTransactionsExample

GetAccountTransactionBySequenceNumberExample

GetEventsByEventKeyExample

GetStateProofExample

GetTransactionsExample

ImportAccountMnemonicExample

KeyRotationExample

MintExample

TransferExample

TransferMultisigExample

Use JLibra in your project

Versions of JLibra are deployed to the Central Maven repository, you can add JLibra as a dependency to your project:

Maven:

<dependency>
  <groupId>dev.jlibra</groupId>
  <artifactId>jlibra-core</artifactId>
  <version>0.15.0</version>
</dependency>

Gradle:

compile("dev.jlibra:jlibra-core:0.15.0")

How-Tos & Step-by-Step Guides

How-Tos and Step-by-Step Guides are gathered in a separate document.

Known Issues

Transaction is not executed, but without errors (no events, no transaction in librabrowser.io)

  1. You might have specified too few gas.
  • Try increasing maxGasAmount.

Contributors

Projects using JLibra

Versions

Version
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.2
0.0.1