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.5"

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

cargo add tokio --features full

Crates

CrateDescription
tronzMeta-crate re-exporting all sub-crates
tronz-primitivesAddress, Trx, ResourceCode, signatures
tronz-signerTronSigner trait and LocalSigner
tronz-signer-awsAWS KMS-backed AwsSigner (optional)
tronz-providerTransport, provider, fillers, and domain types
tronz-contractTRC20 / 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:

FeatureEnables
defaultTLS gRPC transport, contracts, and local signer
fulldefault plus mnemonic, keystore, and TIP-712 support
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-tip712TIP-712 typed-data signing
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.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.