drive/state_transition_action/shielded/shielded_withdrawal/v0/mod.rs
1mod transformer;
2
3use crate::state_transition_action::shielded::ShieldedActionNote;
4use dpp::document::Document;
5use dpp::fee::Credits;
6use dpp::identity::core_script::CoreScript;
7use dpp::withdrawal::Pooling;
8
9/// Shielded withdrawal transition action v0
10#[derive(Debug, Clone)]
11pub struct ShieldedWithdrawalTransitionActionV0 {
12 /// Withdrawal amount in credits
13 pub amount: Credits,
14 /// Notes from the orchard bundle actions
15 pub notes: Vec<ShieldedActionNote>,
16 /// Merkle root used for spends
17 pub anchor: [u8; 32],
18 /// Core transaction fee rate
19 pub core_fee_per_byte: u32,
20 /// Withdrawal pooling strategy
21 pub pooling: Pooling,
22 /// Core address receiving funds
23 pub output_script: CoreScript,
24 /// Shielded fee paid to proposers, carved out of `amount` (the net amount
25 /// withdrawn to Core is `amount - fee_amount`). Equals `compute_shielded_withdrawal_fee`
26 /// (the base shielded minimum fee plus the flat Core withdrawal-document storage cost).
27 pub fee_amount: Credits,
28 /// Current total balance of the shielded pool
29 pub current_total_balance: Credits,
30 /// Pre-built withdrawal document (status: QUEUED)
31 pub prepared_withdrawal_document: Document,
32}