use winterwallet_common::{WINTERWALLET_ADVANCE, WINTERWALLET_INITIALIZE};
pub fn initialize_preimage() -> [&'static [u8]; 1] {
[WINTERWALLET_INITIALIZE]
}
pub fn advance_preimage<'a>(
id: &'a [u8; 32],
current_root: &'a [u8; 32],
new_root: &'a [u8; 32],
account_addresses: &'a [[u8; 32]],
payload: &'a [u8],
) -> Vec<&'a [u8]> {
let mut parts = Vec::with_capacity(5 + account_addresses.len());
parts.push(WINTERWALLET_ADVANCE as &[u8]);
parts.push(id.as_slice());
parts.push(current_root.as_slice());
parts.push(new_root.as_slice());
for addr in account_addresses {
parts.push(addr.as_slice());
}
parts.push(payload);
parts
}