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, ADDRESS_LEN, ADDRESS_PREFIX, EVM_ADDRESS_LEN};
14pub use amount::{Trx, SUN_PER_TRX};
15pub use error::{AddressError, AmountError, SignatureError};
16pub use resource::ResourceCode;
17pub use signature::{RecoverableSignature, SIGNATURE_LEN};
18
19/// Types re-used directly from `alloy-primitives`.
20pub use alloy_primitives::{keccak256, Bytes, B256, U256};
21
22/// A transaction id: `sha256` of the protobuf-encoded raw transaction.
23///
24/// Defined here so it can appear in both signer and provider signatures
25/// without a dependency cycle.
26pub type TxId = B256;