{"id":18966874,"url":"https://github.com/tronprotocol/trident","last_synced_at":"2025-05-16T15:08:57.017Z","repository":{"id":42395707,"uuid":"345914473","full_name":"tronprotocol/trident","owner":"tronprotocol","description":"A lightweight Java SDK for interacting with the TRON blockchain.","archived":false,"fork":false,"pushed_at":"2025-03-26T11:30:56.000Z","size":2701,"stargazers_count":167,"open_issues_count":7,"forks_count":127,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-12T14:55:43.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tronprotocol.github.io/trident/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tronprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-09T07:07:27.000Z","updated_at":"2025-04-12T12:17:11.000Z","dependencies_parsed_at":"2024-11-08T14:41:00.488Z","dependency_job_id":"f8290d2a-e9ec-44e5-846e-b68f5a279876","html_url":"https://github.com/tronprotocol/trident","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Ftrident","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Ftrident/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Ftrident/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tronprotocol%2Ftrident/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tronprotocol","download_url":"https://codeload.github.com/tronprotocol/trident/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553958,"owners_count":22090417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T14:38:53.908Z","updated_at":"2025-05-16T15:08:51.998Z","avatar_url":"https://github.com/tronprotocol.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trident - TRON Java SDK\n\n## Overview\n\nTrident 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.\n\n## Features\n\n- Complete implementation of TRON's gRPC interfaces\n- Smart contract deployment and interaction\n- Wallet key management and address utilities\n- Transaction building and signing\n- TRC10/TRC20/TRC721 token support\n\n## Adding Trident to your build\n\nTrident-java is compiled with java version 1.8 and gradle 7.6.\n\n### Gradle\n\n```groovy\nimplementation(\"io.github.tronprotocol:trident:0.9.2\")\n```\n\n### Maven\n\nAdd repo setting:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.tronprotocol\u003c/groupId\u003e\n  \u003cartifactId\u003etrident\u003c/artifactId\u003e\n  \u003cversion\u003e0.9.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Using local build\n\nYou can use locally built packages by follow steps:\n\n1. Copy the compiled jar file to your project's `libs` directory\n2. Add the following to your project's `build.gradle`:\n```groovy\ndependencies {\n    implementation files('libs/trident-0.9.2.jar')\n    implementation \"com.google.guava:guava:33.0.0-jre\"\n    implementation \"io.grpc:grpc-netty-shaded:1.60.0\"\n    implementation \"io.grpc:grpc-netty:1.60.0\"\n    implementation \"io.grpc:grpc-okhttp:1.60.0\"\n    implementation \"io.grpc:grpc-protobuf:1.60.0\"\n    implementation \"io.grpc:grpc-stub:1.60.0\"\n    implementation \"com.google.protobuf:protobuf-java-util:3.25.5\"\n    implementation \"org.bouncycastle:bcprov-jdk18on:1.78.1\"\n    implementation \"io.vertx:vertx-core:4.5.10\"\n    implementation \"io.netty:netty-all:4.1.118.Final\"\n    implementation \"com.alibaba.fastjson2:fastjson2:2.0.55\"\n}\n```\n\n## Quick Start\n\n**Initialize client**\n```java\n// Initialize with TronGrid mainnet \nApiWrapper client = ApiWrapper.ofMainnet(\"private_key\", \"api_key\"); //api_key from TronGrid\n\n//Or Shasta test net \nApiWrapper client = ApiWrapper.ofShasta(\"private key\");\n\n// Or nile testnet\nApiWrapper client = ApiWrapper.ofNile(\"private_key\");\n\n//Initialize with special grpc endpoint\nApiWrapper client = new ApiWrapper(\"grpc endpoint\", \"solidity grpc endpoint\", \"private_key\");\n\n// Send TRX\nTransactionExtention transactionExtention = client.transfer(\"fromAddress\", \"toAddress\", 100_000_000L); //100TRX\n// Sign\nTransaction signedTxn = client.signTransaction(transactionExtention);\n// Broadcast\nString txId = client.broadcastTransaction(signedTxn);\nSystem.out.println(\"txId is \" + txId);\n```\n\n## Documentation\n\n- [Official Documentation](https://developers.tron.network/docs/trident-java)\n\n\n## Build instructions\nTrident includes integration tests for running on the Nile testnet. If you want to run test cases involving write operations on the blockchain, such as transfer or deploy contract and so on, please follow the steps:\n\n1. Uncomment the Disabled function in the unit test cases.\n```\n   //@Disabled(\"add private key to enable this case\")\n```\n2. Set the tron.private-key and tron.tokenId in the test configuration file in the core directory [here](trident-java/core/src/test/resources/application-test.properties).\n\n\n``` \ntron.private-key=xxx\ntron.tokenId=1000587\n```\n\n**Note:** The account should have at least 1000 TRX, 100 USDT, and 1000 TRC10 token on the Nile testnet. you can get testCoin from [nileex.io](https://nileex.io/join/getJoinPage).\n\n## Contribution\n\nWe're very glad and appreciate to have contributions from the community.\n\nRefer to our [contributing guide ](CONTRIBUTING.md)for more information.\n\n## Integrity Check\n\nStarting from version 0.9.2, releases are published to Maven repository and signed with the gpg key:\n\n```\npub: 3149 FCA5 6377 2D11 2624 9C36 CC3F 8CEA 7B0C 74D6\nuid: buildtrident@tron.network\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftronprotocol%2Ftrident","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftronprotocol%2Ftrident","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftronprotocol%2Ftrident/lists"}