Installation
tronz is published as a meta-crate that re-exports its sub-crates. Its default feature set includes the TLS gRPC provider, contract support, and the local signer:
cargo add tronzOr add it to your Cargo.toml directly:
[dependencies]
tronz = "0.5"tronz is async-first and built on tokio, so you will also want the runtime:
cargo add tokio --features fullCrates
| Crate | Description |
|---|---|
tronz | Meta-crate re-exporting all sub-crates |
tronz-primitives | Address, Trx, ResourceCode, signatures |
tronz-signer | TronSigner trait and LocalSigner |
tronz-signer-aws | AWS KMS-backed AwsSigner (optional) |
tronz-provider | Transport, provider, fillers, and domain types |
tronz-contract | TRC20 / TRC721 bindings and the tron_sol! macro |
Depending on tronz is the recommended path; the sub-crates are published
separately for cases where you need only a subset.
Features
The tronz meta-crate exposes additional functionality behind feature flags so
you only compile what you use. default covers the common network, contract,
and local-signing path. full also enables mnemonic, keystore, and TIP-712
support; AWS KMS remains opt-in:
| Feature | Enables |
|---|---|
default | TLS gRPC transport, contracts, and local signer |
full | default plus mnemonic, keystore, and TIP-712 support |
provider-grpc-tls | The provider and gRPC transport with TLS support |
provider-grpc | The provider and gRPC transport without enabling TLS |
contract | TRC20 / TRC721 bindings and tron_sol! |
signer-local | LocalSigner (included in the default feature set) |
signer-mnemonic | BIP-39 mnemonic and BIP-44 HD key derivation |
signer-keystore | Web3 Secret Storage V3 keystore support |
signer-tip712 | TIP-712 typed-data signing |
signer-aws | AWS KMS-backed AwsSigner |
For a complete and up-to-date list, see the
tronz crate's Cargo.toml.
Supported Rust versions (MSRV)
The minimum supported Rust version is 1.91.1. tronz uses the Rust 2024 edition.
Importing types
The most common types are re-exported at the crate root:
use tronz::{
Address, Trx, U256, // primitives
LocalSigner, TronSigner, // signers
ProviderBuilder, TronProvider, // providers
TRONGRID_MAINNET, TRONGRID_NILE, // FullNode endpoints
TRONGRID_MAINNET_SOLIDITY, TRONGRID_NILE_SOLIDITY,
};Specialized types live in their respective modules — for example
tronz::primitives::ResourceCode, tronz::providers::*, and
tronz::contract::Trc20Ext.
