Skip to main content

cardano_tx_lite/
lib.rs

1//! Simplified Cardano (Conway-era) transaction types, optimized for JSON I/O over web APIs.
2//!
3//! ## Design
4//! - **Addresses** are bech32 strings (`addr1…`, `stake1…`). No on-chain bytes parsing here.
5//! - **Hashes / key-hashes / asset names** are hex-encoded strings (no `0x` prefix).
6//! - **Amounts** (lovelace, native-token quantities, mint quantities) are serialized as JSON
7//!   strings to avoid 2^53 precision loss in JS clients.
8//! - **PlutusData** serializes to CSL's *DetailedSchema*, so the JSON can be fed directly to
9//!   `cardano-serialization-lib`'s `PlutusData::from_json(_, DetailedSchema)` (or whisky's
10//!   `WData::JSON(...).to_cbor()`).
11//! - **Field naming** is `camelCase` throughout.
12//!
13//! ## Scope
14//! Types only — no CBOR, no signing, no balancing. Designed to be the on-the-wire shape
15//! that a frontend / API exchanges with a builder backend.
16
17pub mod address;
18pub mod cert;
19pub mod plutus;
20pub mod primitives;
21pub mod script;
22pub mod tx;
23pub mod value;
24
25pub use address::*;
26pub use cert::*;
27pub use plutus::*;
28pub use primitives::*;
29pub use script::*;
30pub use tx::*;
31pub use value::*;