Trident - TRON Java SDK
Overview
Trident is a lightweight Java SDK for interacting with the TRON blockchain. It provides a simple and efficient way to integrate TRON functionality into your Java applications.
Trident includes three main modules:
| Module | Description |
|---|---|
| core | Wrapping functions for easily interacting with TRON system and smart contracts |
| abi | Datatypes and ABI encoders/decoders |
| utils | Tools including encryption, conversion, etc. |
Features
- Complete implementation of TRON's gRPC interfaces, with TLS support
- Wallet key management and address utilities
- Transaction building, signing and multi-sign
- Smart contract deployment and interaction
- ABI v2 support: structs, nested arrays and packed encoding
- TRC10/TRC20/TRC721 token support
Install
Trident can be built with JDK 1.8 or JDK17 on Gradle 8.5. The latest version (built with JDK 1.8) can be found on Maven Central.
Upgrading to 1.0.0
Version 1.0.0 includes behavioral and dependency changes β see the 1.0.0 release notes before upgrading.
Version 0.9.2 and Later
Gradle
Maven
<dependency>
<groupId>io.github.tronprotocol</groupId>
<artifactId>trident</artifactId>
<version>1.0.0</version>
</dependency>
Previous Versions (< 0.9.2)
For versions before 0.9.2, you'll need to build from source:
- Clone the repository from GitHub
- Build the project with required versions:
- Java: 1.8.0_231
- Gradle: 5.6.4
- Configure your project dependencies:
dependencies {
// protobuf & grpc
implementation 'com.google.protobuf:protobuf-java:3.11.0'
implementation 'io.grpc:grpc-netty-shaded:1.31.0'
implementation 'io.grpc:grpc-netty:1.31.0'
implementation 'io.grpc:grpc-protobuf:1.31.0'
implementation 'io.grpc:grpc-stub:1.31.0'
implementation "org.bouncycastle:bcprov-jdk15on:1.68"
implementation fileTree(dir:'../core')
implementation fileTree(dir:'../utils')
implementation fileTree(dir:'../abi')
//if you are using the *.jar files, ues the following line
implementation fileTree(dir:'your path', include: '*.jar')
implementation 'com.google.guava:guava:28.0-jre'
}
Version Notice
We strongly recommend using version 0.9.2 or later, as newer versions are more stable and feature-rich, with all modules combined into a single package.
Integrity Check
Starting from version 0.9.2, releases are published to Maven repository and signed with the GPG key:
Tip
For security verification of the package, please refer to our Security Guide.
π Start Building with Trident
Ready to explore Trident? Check out our Quick Start Guide to begin building on TRON blockchain! Letβs go!