diff --git a/smite/src/bolt.rs b/smite/src/bolt.rs index dcb9d29..8ecea4b 100644 --- a/smite/src/bolt.rs +++ b/smite/src/bolt.rs @@ -7,9 +7,7 @@ mod accept_channel; mod accept_channel2; mod attribution_data; mod channel_ready; -mod commitment; mod error; -mod funding; mod funding_created; mod funding_signed; mod gossip_timestamp_filter; @@ -39,12 +37,7 @@ pub use accept_channel::{AcceptChannel, AcceptChannelTlvs}; pub use accept_channel2::{AcceptChannel2, AcceptChannel2Tlvs}; pub use attribution_data::{AttributionData, TruncatedHmac}; pub use channel_ready::{ChannelReady, ChannelReadyTlvs}; -pub use commitment::{ - ChannelConfig, ChannelPartyConfig, CommitmentError, CommitmentPartyState, CommitmentState, - HolderIdentity, Side, -}; pub use error::Error; -pub use funding::{FundingTransaction, InsufficientFunds, build_funding_transaction}; pub use funding_created::FundingCreated; pub use funding_signed::FundingSigned; pub use gossip_timestamp_filter::GossipTimestampFilter; diff --git a/smite/src/channel_tx.rs b/smite/src/channel_tx.rs new file mode 100644 index 0000000..2755ba9 --- /dev/null +++ b/smite/src/channel_tx.rs @@ -0,0 +1,13 @@ +//! BOLT 3 channel transaction construction. +//! +//! This module builds Lightning channel on-chain transactions: the funding +//! transaction and the commitment transaction. + +mod commitment; +mod funding; + +pub use commitment::{ + ChannelConfig, ChannelPartyConfig, CommitmentError, CommitmentPartyState, CommitmentState, + HolderIdentity, Side, +}; +pub use funding::{FundingTransaction, InsufficientFunds, build_funding_transaction}; diff --git a/smite/src/bolt/commitment.rs b/smite/src/channel_tx/commitment.rs similarity index 100% rename from smite/src/bolt/commitment.rs rename to smite/src/channel_tx/commitment.rs diff --git a/smite/src/bolt/funding.rs b/smite/src/channel_tx/funding.rs similarity index 100% rename from smite/src/bolt/funding.rs rename to smite/src/channel_tx/funding.rs diff --git a/smite/src/lib.rs b/smite/src/lib.rs index b0e85b1..f211d57 100644 --- a/smite/src/lib.rs +++ b/smite/src/lib.rs @@ -8,6 +8,7 @@ //! # Modules //! - [`bitcoin`] - Utilities for interacting with `bitcoind` instances via `bitcoin-cli`. //! - [`bolt`] - BOLT message encoding and decoding. +//! - [`channel_tx`] - BOLT 3 channel transaction construction (funding and commitment). //! - [`noise`] - BOLT 8 `Noise_XK` encrypted transport. //! - [`oracles`] - Post-scenario invariant checks. //! - [`process`] - Managed subprocess utilities. @@ -16,6 +17,7 @@ pub mod bitcoin; pub mod bolt; +pub mod channel_tx; pub mod noise; pub mod oracles; pub mod process;