All Projects → hashgraph → Hedera Sdk Java

hashgraph / Hedera Sdk Java

Licence: apache-2.0
Hedera™ Hashgraph SDK for Java

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Hedera Sdk Java

Sdk Php
Mercado Pago's Official PHP SDK
Stars: ✭ 126 (-11.89%)
Mutual labels:  sdk
Cloudinary ios
Cloudinary iOS SDK
Stars: ✭ 133 (-6.99%)
Mutual labels:  sdk
Onfido Sdk Ui
The Onfido SDK for Front-end JavaScript
Stars: ✭ 139 (-2.8%)
Mutual labels:  sdk
Hanzo.js
🚀 Hanzo JavaScript SDK. Develop cutting-edge decentralized applications.
Stars: ✭ 128 (-10.49%)
Mutual labels:  sdk
Cordova Plugin Googlemaps
Google Maps plugin for Cordova
Stars: ✭ 1,647 (+1051.75%)
Mutual labels:  sdk
Oss.clients.sns
社交网站sdk(标准库),微信公众号(订阅号,服务号,小程序)接口sdk-包含消息回复(明文和安全模式),Oauth2.0授权等
Stars: ✭ 136 (-4.9%)
Mutual labels:  sdk
Fosite
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Stars: ✭ 1,738 (+1115.38%)
Mutual labels:  sdk
Xmind Sdk Js
The XMind SDK for javascript in browser and Node.js.
Stars: ✭ 143 (+0%)
Mutual labels:  sdk
Contentful.swift
A delightful Swift interface to Contentful's content delivery API.
Stars: ✭ 132 (-7.69%)
Mutual labels:  sdk
Cityengine Sdk
CityEngine is a 3D city modeling software for urban design, visual effects, and VR/AR production. With its C++ SDK you can create plugins and standalone apps capable to execute CityEngine CGA procedural modeling rules.
Stars: ✭ 137 (-4.2%)
Mutual labels:  sdk
Fit
A Go package for decoding and encoding Garmin FIT files
Stars: ✭ 128 (-10.49%)
Mutual labels:  sdk
Amplitude Android
Native Android SDK for Amplitude
Stars: ✭ 129 (-9.79%)
Mutual labels:  sdk
Kube Aws Iam Controller
Distribute different AWS IAM credentials to different pods in Kubernetes via secrets.
Stars: ✭ 137 (-4.2%)
Mutual labels:  sdk
Webqqwechat
webQQ和web微信相关协议的.net实现
Stars: ✭ 127 (-11.19%)
Mutual labels:  sdk
Facebook Js Ads Sdk
[DEPRECATED] OFFICIAL FACEBOOK SDK: https://github.com/facebook/facebook-nodejs-ads-sdk
Stars: ✭ 140 (-2.1%)
Mutual labels:  sdk
Sdk Dotnet
.Net SDK for Authorize.Net API
Stars: ✭ 124 (-13.29%)
Mutual labels:  sdk
Thinkphp5 Wechat
微信 SDK for thinkphp5, 基于 overtrue/wechat
Stars: ✭ 133 (-6.99%)
Mutual labels:  sdk
Gochat
🔥 微信 Go SDK 🚀🚀🚀
Stars: ✭ 141 (-1.4%)
Mutual labels:  sdk
Filestack Android
Official Android SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
Stars: ✭ 140 (-2.1%)
Mutual labels:  sdk
Alan Sdk Reactnative
Alan React Native SDK adds a voice assistant or chatbot to your app.
Stars: ✭ 138 (-3.5%)
Mutual labels:  sdk

Hedera™ Hashgraph Java SDK

The Java SDK for interacting with Hedera Hashgraph: the official distributed consensus platform built using the hashgraph consensus algorithm for fast, fair and secure transactions. Hedera enables and empowers developers to build an entirely new class of decentralized applications.

Install

Gradle

Select one of the following depending on your target platform.

// Android, Corda DJVM, Java 7+
implementation 'com.hedera.hashgraph:sdk-jdk7:2.0.4'

// Java 9+, Kotlin
implementation 'com.hedera.hashgraph:sdk:2.0.4'

Select one of the following to provide the gRPC implementation.

// netty transport (for high throughput applications)
implementation 'io.grpc:grpc-netty-shaded:1.35.0'

// netty transport, unshaded (if you have a matching Netty dependency already)
implementation 'io.grpc:grpc-netty:1.35.0'

// okhttp transport (for lighter-weight applications or Android)
implementation 'io.grpc:grpc-okhttp:1.35.0'

Maven

Select one of the following depending on your target platform.

<!-- Android, Corda DJVM, Java 7+ -->
<dependency>
  <groupId>com.hedera.hashgraph</groupId>
  <artifactId>sdk-jdk7</artifactId>
  <version>2.0.4</version>
</dependency>

<!-- Java 9+, Kotlin -->
<dependency>
  <groupId>com.hedera.hashgraph</groupId>
  <artifactId>sdk</artifactId>
  <version>2.0.4</version>
</dependency>

Select one of the following to provide the gRPC implementation.

<!-- netty transport (for server or desktop applications) -->
<dependency>
  <groupId>io.grpc</groupId>
  <artifactId>grpc-netty-shaded</artifactId>
  <version>1.35.0</version>
</dependency>

<!-- netty transport, unshaded (if you have a matching Netty dependency already) -->
<dependency>
  <groupId>io.grpc</groupId>
  <artifactId>grpc-netty</artifactId>
  <version>1.35.0</version>
</dependency>

<!-- okhttp transport (for lighter-weight applications or Android) -->
<dependency>
  <groupId>io.grpc</groupId>
  <artifactId>grpc-okhttp</artifactId>
  <version>1.35.0</version>
</dependency>

Usage

Examples of several potential use cases and workflows are available within the repository in examples/.

Development

Dependencies

Compile

$ ./gradlew compileJava

Unit Test

$ ./gradlew test

Integration Test

The easiest way to run integration tests is by providing network and operator information in a configuration file. This configuration file is passed into system properties.

$ ./gradlew integrationTest -PCONFIG_FILE="<ConfigurationFilePath>"

An example configuration file can be found in the repo here:

sdk/src/test/resources/client-config-with-operator.json

The format of the configuration file should be as follows:

{
    "network": {
        "<NodeAddress>": "<NodeAccountId>",
        ...
    },
    "operator": {
        "accountId": "<shard.realm.num>",
        "privateKey": "<PrivateKey>"
    }
}

If a configuration file is not provided, OPERATOR_ID and OPERATOR_KEY must be passed into system properties and integration tests will run against the Hedera test network.

$ ./gradlew integrationTest -POPERATOR_ID="<shard.realm.num>" -POPERATOR_KEY="<PrivateKey>"

HEDERA_NETWORK can optionally be used to use previewnet. This System Property can only be set to previewnet.

$ ./gradlew integrationTest -POPERATOR_ID="<shard.realm.num>" -POPERATOR_KEY="<PrivateKey>" -PHEDERA_NETWORK="previewnet"

Note: It is also possible to use a custom network in a configuration file and pass OPERATOR_ID and OPERATOR_KEY into system properties.

An example configuration file containing only network information can be found in the repo here:

sdk/src/test/resources/client-config.json

Examples

Requires OPERATOR_ID and OPERATOR_KEY to be in a .env file in the examples directory. Many examples run against the Hedera test network.

$ ./gradlew -q example:run<NameOfExample>
$ ./gradlew -q example:runGenerateKey

Contributing to this Project

We welcome participation from all developers! For instructions on how to contribute to this repo, please review the Contributing Guide.

License Information

Licensed under Apache License, Version 2.0 – see LICENSE in this repo or apache.org/licenses/LICENSE-2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].