Add a builder API to the Monero library

Enables more composable construction flows.
This commit is contained in:
Luke Parker
2022-12-01 11:35:05 -05:00
parent 3f503d92fb
commit f0957c8d52
4 changed files with 163 additions and 3 deletions

View File

@@ -28,6 +28,9 @@ use crate::{
},
};
mod builder;
pub use builder::SignableTransactionBuilder;
#[cfg(feature = "multisig")]
mod multisig;
#[cfg(feature = "multisig")]
@@ -156,7 +159,7 @@ async fn prepare_inputs<R: RngCore + CryptoRng>(
}
/// Fee struct, defined as a per-unit cost and a mask for rounding purposes.
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize)]
pub struct Fee {
pub per_weight: u64,
pub mask: u64,