{"id":35277192,"url":"https://github.com/fbsobreira/gotron-sdk","last_synced_at":"2026-04-01T23:31:02.742Z","repository":{"id":38392810,"uuid":"248742971","full_name":"fbsobreira/gotron-sdk","owner":"fbsobreira","description":"Go SDK \u0026 CLI for TRON blockchain — build wallets, exchanges, bots \u0026 backend services. gRPC client, HD wallets, Ledger support, TRC20/TRC10, multi-sig, staking.","archived":false,"fork":false,"pushed_at":"2026-03-18T00:47:34.000Z","size":60474,"stargazers_count":420,"open_issues_count":0,"forks_count":238,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-03-18T00:59:00.066Z","etag":null,"topics":["blockchain","cli","cryptocurrency","defi","exchange","go","golang","grpc","hd-wallet","ledger","sdk","staking","trc10","trc20","tron","tron-protocol","tron-sdk","trx","wallet","web3"],"latest_commit_sha":null,"homepage":"https://gotron.sh","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fbsobreira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-20T11:51:27.000Z","updated_at":"2026-03-18T00:32:05.000Z","dependencies_parsed_at":"2026-03-17T12:01:16.993Z","dependency_job_id":null,"html_url":"https://github.com/fbsobreira/gotron-sdk","commit_stats":null,"previous_names":["fbsobreira/gotron"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/fbsobreira/gotron-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsobreira%2Fgotron-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsobreira%2Fgotron-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsobreira%2Fgotron-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsobreira%2Fgotron-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fbsobreira","download_url":"https://codeload.github.com/fbsobreira/gotron-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbsobreira%2Fgotron-sdk/sbom","scorecard":{"id":394350,"data":{"date":"2025-08-11","repo":{"name":"github.com/fbsobreira/gotron-sdk","commit":"4ec2d936cbaa27f16a3215f5dd70bdc147ae3f07"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"3 commit(s) and 13 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":6,"reason":"Found 19/30 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Warn: no topLevel permission defined: .github/workflows/format.yaml:1","Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/format.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/format.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/format.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/format.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/fbsobreira/gotron-sdk/test.yaml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/format.yaml:25","Warn: goCommand not pinned by hash: .github/workflows/format.yaml:44","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: non-200 OK status code: 502 Bad Gateway body: \"\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e502 Bad Gateway\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e502 Bad Gateway\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n\"","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T18:36:30.548Z","repository_id":38392810,"created_at":"2025-08-18T18:36:30.548Z","updated_at":"2025-08-18T18:36:30.548Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["blockchain","cli","cryptocurrency","defi","exchange","go","golang","grpc","hd-wallet","ledger","sdk","staking","trc10","trc20","tron","tron-protocol","tron-sdk","trx","wallet","web3"],"created_at":"2025-12-30T14:01:53.551Z","updated_at":"2026-04-01T23:31:02.723Z","avatar_url":"https://github.com/fbsobreira.png","language":"Go","readme":"# GoTRON SDK\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/fbsobreira/gotron-sdk.svg)](https://pkg.go.dev/github.com/fbsobreira/gotron-sdk)\n[![Go Report Card](https://goreportcard.com/badge/github.com/fbsobreira/gotron-sdk)](https://goreportcard.com/report/github.com/fbsobreira/gotron-sdk)\n[![codecov](https://codecov.io/gh/fbsobreira/gotron-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/fbsobreira/gotron-sdk)\n[![License](https://img.shields.io/github/license/fbsobreira/gotron-sdk)](LICENSE)\n\nGoTRON SDK is a comprehensive Go SDK and CLI tool for interacting with the TRON blockchain. It provides both a command-line interface (`tronctl`) and Go libraries for TRON blockchain operations.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/demo.gif\" alt=\"tronctl demo\" width=\"800\"\u003e\n\u003c/p\u003e\n\n## Built For\n\n- **Exchanges** — deposit/withdrawal engines, hot wallet management\n- **Wallets** — HD wallet derivation, hardware signing, multi-sig\n- **Trading Bots** — fast gRPC client, typed responses, batch operations\n- **Staking Services** — freeze/delegate resources, vote for SRs\n- **Infrastructure** — CLI scripting, monitoring, automation\n\n## Why GoTRON?\n\nGoTRON SDK is built for **backend and infrastructure** teams that need performance, reliability, and operational tooling.\n\n| | GoTRON SDK | [tronweb] (JS/TS) | [tron-api-python] |\n|--|-----------|-----------------|-----------------|\n| **Transport** | gRPC (binary, streaming) | HTTP/JSON | HTTP/JSON |\n| **Deployment** | Single static binary | Node.js runtime | Python runtime |\n| **Hardware Signing** | Built-in Ledger support | Separate adapter | No |\n| **CLI Tooling** | `tronctl` included | None | Yes (CLI framework) |\n| **Concurrency** | Goroutines (native) | Event loop | GIL-limited |\n| **HD Wallets** | Yes (BIP39/44) | Yes (BIP39/44) | No |\n| **Multi-sig** | Yes | Yes | Not documented |\n| **Type Safety** | Full (compiled) | Full (TypeScript) | Not documented |\n\n\u003e Comparison as of 2026-03-16. Verify claims against each project's README.\n\n[tronweb]: https://github.com/tronprotocol/tronweb\n[tron-api-python]: https://github.com/iexbase/tron-api-python\n\n## Features\n\n- 🔧 **Complete CLI Tool**: Manage accounts, send transactions, interact with smart contracts\n- 📚 **Go SDK**: Build TRON applications with a clean, idiomatic Go API\n- 🔐 **Secure Key Management**: Hardware wallet support, encrypted keystores\n- 🚀 **High Performance**: Native gRPC communication with TRON nodes\n- 🛠️ **Developer Friendly**: Comprehensive examples and documentation\n- 🤖 **AI-Ready**: [MCP server](https://github.com/fbsobreira/gotron-mcp) lets AI agents interact with TRON blockchain\n\n## MCP Server\n\nConnect AI agents to TRON via the [GoTRON MCP Server](https://github.com/fbsobreira/gotron-mcp). Zero install — hosted at [mcp.gotron.sh](https://mcp.gotron.sh).\n\n**Claude Code:**\n\n```bash\nclaude mcp add gotron --scope user --transport http https://mcp.gotron.sh/mcp\n```\n\n**Claude Desktop:** Add via Settings \u003e Connectors using URL `https://mcp.gotron.sh/mcp`\n\nIncludes read-only blockchain queries, unsigned transaction builders, and full SDK documentation for AI-assisted development. See the [gotron-mcp repo](https://github.com/fbsobreira/gotron-mcp) for local mode with signing support.\n\n## Quick Start\n\n### Installation\n\n#### Quick Install\n```bash\ncurl -fsSL gotron.sh/install | sh\n```\n\n#### Install with Go\n```bash\ngo install github.com/fbsobreira/gotron-sdk/cmd/tronctl@latest\n```\n\n#### Install with Homebrew\n```bash\nbrew install fbsobreira/tap/tronctl\n```\n\n#### Install from source\n```bash\ngit clone https://github.com/fbsobreira/gotron-sdk.git\ncd gotron-sdk\nmake install\n```\n\n#### Use as a Go library\n```bash\ngo get -u github.com/fbsobreira/gotron-sdk\n```\n\n### Basic Usage\n\n#### CLI Usage\n```bash\n# Create a new account\ntronctl keys add \u003caccount-name\u003e\n\n# Check balance\ntronctl account balance \u003caddress\u003e\n\n# Send TRX\ntronctl account send \u003cto-address\u003e \u003camount\u003e --signer \u003csigner-name\u003e\n```\n\n#### 30-Second Quickstart (SDK)\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/fbsobreira/gotron-sdk/pkg/client\"\n)\n\nfunc main() {\n\tc := client.NewGrpcClient(\"grpc.trongrid.io:50051\")\n\tif err := c.Start(client.GRPCInsecure()); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer c.Stop()\n\n\taccount, err := c.GetAccount(\"TUEZSdKsoDHQMeZwihtdoBiN46zxhGWYdH\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"Balance: %d SUN\\n\", account.Balance)\n}\n```\n\n## Documentation\n\n- [Installation Guide](docs/installation.md) - Detailed installation instructions\n- [CLI Usage Guide](docs/cli-usage.md) - Complete CLI command reference\n- [SDK Usage Guide](docs/sdk-usage.md) - Go SDK examples and patterns\n- [API Reference](docs/api-reference.md) - Detailed API documentation\n- [Examples](docs/examples.md) - Common use cases and examples\n- [More Examples](https://github.com/fbsobreira/gotron-examples) - Detailed protocol-specific examples\n\n## Supported Features\n\n### Account Management\n- Create and import accounts\n- Hardware wallet support (Ledger)\n- Keystore management\n- Multi-signature support\n\n### Transactions\n- TRX transfers\n- TRC10 token operations\n- TRC20 token operations\n- Smart contract interactions\n- Transaction signing and broadcasting\n\n### Smart Contracts\n- Contract deployment\n- Contract calls and triggers\n- ABI encoding/decoding\n- Event monitoring\n\n### Blockchain Queries\n- Block information\n- Transaction details\n- Account resources\n- Witness/SR information\n- Proposal management\n\n## Configuration\n\n### Environment Variables\n```bash\n# Set custom node\nexport TRON_NODE=\"grpc.trongrid.io:50051\"\n\n# Enable TLS\nexport TRON_NODE_TLS=\"true\"\n\n# Set Trongrid API key\nexport TRONGRID_APIKEY=\"your-api-key\"\n\n# Enable debug mode\nexport GOTRON_SDK_DEBUG=\"true\"\n```\n\n### Configuration File\nCreate `~/.tronctl/config.yaml`:\n```yaml\nnode: grpc.trongrid.io:50051\nnetwork: mainnet\ntimeout: 60s\ntls: true\napiKey: your-api-key\n```\n\n### Transfer JSON Format\nFor batch transfers, use a JSON file with the following format:\n\n| Key                 | Value-type | Value-description|\n| :------------------:|:----------:| :----------------|\n| `from`              | string     | [**Required**] Sender's address, must have key in keystore |\n| `to`                | string     | [**Required**] Receiver's address |\n| `amount`            | string     | [**Required**] Amount to send in TRX |\n| `passphrase-file`   | string     | [*Optional*] File path containing passphrase |\n| `passphrase-string` | string     | [*Optional*] Passphrase as string |\n| `stop-on-error`     | boolean    | [*Optional*] Stop on error (default: false) |\n\nExample:\n```json\n[\n  {\n    \"from\": \"TUEZSdKsoDHQMeZwihtdoBiN46zxhGWYdH\",\n    \"to\": \"TKSXDA8HfE9E1y39RczVQ1ZascUEtaSToF\",\n    \"amount\": \"100\",\n    \"passphrase-string\": \"\",\n    \"stop-on-error\": true\n  }\n]\n```\n\n## Shell Completion\n\nAdd to your `.bashrc` or `.zshrc`:\n```bash\n# Bash\nsource \u003c(tronctl completion bash)\n\n# Zsh\nsource \u003c(tronctl completion zsh)\n```\n\n## Development\n\n### Requirements\n- Go 1.24 or higher\n- Make (for building)\n- Protocol Buffers compiler (for regenerating protos)\n\n### Building\n```bash\n# Build binary\nmake build\n\n# Cross-compile for Windows\nmake build-windows\n\n# Run tests\nmake test\n\n# Run linter\nmake lint\n\n# Generate protobuf files\n./gen-proto.sh\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Version History\n\n### Note on Versions\nThe v2.x.x releases were incorrectly tagged without proper Go module versioning. These versions have been retracted. Please use v1.x.x versions or later.\n\n## Projects Using GoTRON\n\n\u003e Using GoTRON SDK in your project? [Open an issue](https://github.com/fbsobreira/gotron-sdk/issues/new?title=Add+my+project+to+README\u0026labels=documentation) to add it here!\n\n## License\n\nThis project is licensed under the LGPL-3.0 License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- 📖 [Documentation](https://github.com/fbsobreira/gotron-sdk/tree/master/docs)\n- 🐛 [Issue Tracker](https://github.com/fbsobreira/gotron-sdk/issues)\n- 💬 [Discussions](https://github.com/fbsobreira/gotron-sdk/discussions)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbsobreira%2Fgotron-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbsobreira%2Fgotron-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbsobreira%2Fgotron-sdk/lists"}