pub fn make_sec_to_pub_transfer_data<C: Curve, R: Rng>(
ctx: &GlobalContext<C>,
sk: &SecretKey<C>,
input_amount: &AggregatedDecryptedAmount<C>,
to_transfer: Amount,
csprng: &mut R
) -> Option<SecToPubAmountTransferData<C>>
Expand description
Produce the payload of an secret to public amount transaction.
The arguments are
- global context with parameters for generating proofs, and generators for encrypting amounts.
- secret key of the sender (who is also the receiver)
- input amount from which to send
- amount to send
The return value is going to be None
if a transfer could not be produced.
This could be because the to_transfer
is too large, or because of some
other data inconsistency that means a proof could not be produced.