Skip to main content

tronz_primitives/
lib.rs

1#![doc = include_str!("../README.md")]
2#![forbid(unsafe_code)]
3#![warn(missing_docs)]
4#![cfg_attr(not(test), warn(unused_crate_dependencies))]
5#![cfg_attr(docsrs, feature(doc_cfg))]
6
7mod address;
8mod amount;
9mod error;
10mod resource;
11mod signature;
12
13pub use address::{ADDRESS_LEN, ADDRESS_PREFIX, Address, EVM_ADDRESS_LEN};
14/// Types re-used directly from `alloy-primitives`.
15pub use alloy_primitives::{B256, Bytes, U256, keccak256};
16pub use amount::{SUN_PER_TRX, Trx};
17pub use error::{AddressError, AmountError, SignatureError};
18pub use resource::ResourceCode;
19pub use signature::{RecoverableSignature, SIGNATURE_LEN};
20
21/// A transaction id: `sha256` of the protobuf-encoded raw transaction.
22///
23/// Defined here so it can appear in both signer and provider signatures
24/// without a dependency cycle.
25pub type TxId = B256;