diff --git a/src/bundle.rs b/src/bundle.rs index bca6bca91..5eb7bd75e 100644 --- a/src/bundle.rs +++ b/src/bundle.rs @@ -24,6 +24,7 @@ use crate::{ note::{AssetBase, Note}, note_encryption::{OrchardDomain, OrchardDomainCommon}, orchard_flavor::OrchardFlavor, + orchard_flavor::OrchardZSA, primitives::redpallas::{self, Binding, SpendAuth}, tree::Anchor, value::{NoteValue, ValueCommitTrapdoor, ValueCommitment, ValueSum}, @@ -456,6 +457,21 @@ impl Bundle { } } +/// A swap bundle to be applied to the ledger. +#[derive(Clone, Debug)] +pub struct SwapBundle { + /// The list of action groups that make up this swap bundle. + action_groups: Vec>, + /// Orchard-specific transaction-level flags for this swap. + flags: Flags, + /// The net value moved out of this swap. + /// + /// This is the sum of Orchard spends minus the sum of Orchard outputs. + value_balance: V, + /// The binding signature for this swap. + binding_signature: redpallas::Signature, +} + pub(crate) fn derive_bvk<'a, A: 'a, V: Clone + Into, FL: 'a + OrchardFlavor>( actions: impl IntoIterator>, value_balance: V,