Skip to content
Logo

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 tronz

Or add it to your Cargo.toml directly:

[dependencies]
tronz = "0.3"

tronz is async-first and built on tokio, so you will also want the runtime:

cargo add tokio --features full

Features

The tronz meta-crate exposes additional functionality behind feature flags so you only compile what you use. full is currently an alias for the default feature set; mnemonic, keystore, and AWS support remain opt-in:

FeatureEnables
fullThe default feature set: TLS gRPC transport, contracts, and local signer
provider-grpc-tlsThe provider and gRPC transport with TLS support
provider-grpcThe provider and gRPC transport without enabling TLS
contractTRC20 / TRC721 bindings and tron_sol!
signer-localLocalSigner (included in the default feature set)
signer-mnemonicBIP-39 mnemonic and BIP-44 HD key derivation
signer-keystoreWeb3 Secret Storage V3 keystore support
signer-awsAWS 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.85. 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,             // endpoints
};

Specialized types live in their respective modules — for example tronz::primitives::ResourceCode, tronz::providers::*, and tronz::contract::Trc20Ext.