penumbra_sdk_transaction/
lib.rs

1//! Data modeling for Penumbra transactions.
2//!
3//! This crate defines data structures that provide modeling of shielded
4//! transactions through their entire lifecycle:
5//!
6//! * the [`TransactionPlan`](TransactionPlan) type completely describes a
7//! planned transaction before it is created;
8//!
9//! * the [`Transaction`] type represents the shielded transaction itself;
10//!
11//! * the [`TransactionView`] type represents a view from a particular
12//! [`TransactionPerspective`] (e.g., the sender or receiver) of the cleartext
13//! contents of a shielded transaction after it has been created.
14
15#![deny(clippy::unwrap_used)]
16#![allow(clippy::clone_on_copy)]
17// Requires nightly.
18#![cfg_attr(docsrs, feature(doc_auto_cfg))]
19
20mod auth_data;
21mod detection_data;
22mod error;
23mod is_action;
24mod parameters;
25mod transaction;
26mod witness_data;
27
28pub mod action;
29pub mod action_list;
30pub mod gas;
31pub mod memo;
32pub mod plan;
33pub mod view;
34
35pub use action::Action;
36pub use action_list::ActionList;
37pub use auth_data::AuthorizationData;
38pub use detection_data::DetectionData;
39pub use error::Error;
40pub use is_action::IsAction;
41pub use parameters::TransactionParameters;
42pub use penumbra_sdk_txhash as txhash;
43pub use plan::{ActionPlan, TransactionPlan};
44pub use transaction::{Transaction, TransactionBody, TransactionSummary};
45pub use view::{ActionView, MemoPlaintextView, MemoView, TransactionPerspective, TransactionView};
46pub use witness_data::WitnessData;
47
48/// A compatibility wrapper for trait implementations that are temporarily duplicated
49/// in multiple crates as an orphan rule work around until we finish splitting crates (#2288).
50pub struct Compat<'a, T>(pub &'a T);