1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Deterministic transaction compilation for Ethereum (EVM) and Tron.
//!
//! This crate converts `WalletSuite` canonical prepared transaction payloads
//! into signer-ready unsigned artifacts and human-reviewable representations.
//!
//! # Example
//!
//! ```
//! use walletsuite_tx_compiler::{compile, review, validate};
//!
//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let raw: serde_json::Value = serde_json::from_str(r#"{
//! "chain": "ethereum",
//! "chainId": 1,
//! "txType": "TRANSFER_NATIVE",
//! "from": "0x1111111111111111111111111111111111111111",
//! "to": "0x2222222222222222222222222222222222222222",
//! "valueWei": "1000000000000000000",
//! "nonce": "0",
//! "fee": {
//! "mode": "EIP1559",
//! "gasLimit": "21000",
//! "maxFeePerGas": "30000000000",
//! "maxPriorityFeePerGas": "1500000000"
//! }
//! }"#)?;
//!
//! let prepared = validate(&raw)?;
//! let _review = review(&prepared)?;
//! let result = compile(&prepared, Default::default())?;
//!
//! assert!(result.unsigned_tx.starts_with("0x02")); // EIP-1559 envelope
//! # Ok(())
//! # }
//! # example().unwrap();
//! ```
//!
//! # Determinism
//!
//! The compiler is byte-exact against the pinned canonical fixture set
//! in `tests/fixtures/canonical.json`. Any change that alters compiled
//! bytes must update that fixture and is treated as a hard-failing
//! regression by the CI determinism suite.
pub use cratecompile;
pub use crate;
pub use cratereview;
pub use cratetron_address_to_bytes;
pub use crate;
pub use cratevalidate;