use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct BatchOutputAssignment {
pub intent_id: Uuid,
pub vout: u32,
pub fee_contribution_sat: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum SendBatchState {
Built {
psbt_bytes: Vec<u8>,
intent_ids: Vec<Uuid>,
},
Signed {
tx_bytes: Vec<u8>,
assignments: Vec<BatchOutputAssignment>,
fee_sat: u64,
},
Broadcast {
txid: String,
tx_bytes: Vec<u8>,
assignments: Vec<BatchOutputAssignment>,
fee_sat: u64,
},
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SendBatchRecord {
pub batch_id: Uuid,
pub state: SendBatchState,
}