Skip to main content

propose_shielding

Function propose_shielding 

Source
pub fn propose_shielding<DbT, ParamsT, InputsT, ChangeT, CommitmentTreeErrT>(
    wallet_db: &mut DbT,
    params: &ParamsT,
    input_selector: &InputsT,
    change_strategy: &ChangeT,
    shielding_threshold: Zatoshis,
    from_addrs: &[TransparentAddress],
    to_account: <DbT as InputSource>::AccountId,
    confirmations_policy: ConfirmationsPolicy,
    output_filter: CoinbaseFilter,
    lock_inputs: Option<LockRequest>,
) -> Result<Proposal<ChangeT::FeeRule, Infallible>, ProposeShieldingErrT<DbT, CommitmentTreeErrT, InputsT, ChangeT>>
where ParamsT: Parameters, DbT: WalletWrite + InputSource<Error = <DbT as WalletRead>::Error>, InputsT: ShieldingSelector<InputSource = DbT>, ChangeT: ChangeStrategy<MetaSource = DbT>,
Available on crate feature transparent-inputs only.
Expand description

Constructs a proposal to shield all of the funds belonging to the provided set of addresses.

The output_filter parameter controls which transparent outputs are eligible for inclusion in the proposal. See CoinbaseFilter for details.

When lock_inputs is Some(request), the inputs selected by the proposal are locked on behalf of the request’s owner until target_height + request.for_blocks() to prevent concurrent proposals from selecting them; when None, no locking is performed. See propose_transfer for the full semantics and concurrency behavior.