pub fn generate_payment_proof<R: Rng, E: Engine>(csprng: &mut R, channel_state: &ChannelState<E>, cust_state: &CustomerState<E>, amount: i64) -> (Payment<E>, CustomerState<E>) {
        let tx_fee = channel_state.get_channel_fee();
        let payment_amount = match tx_fee > 0 {
            true => amount + tx_fee,
            false => amount
        };
        let (proof, com, wpk, new_cust_state) = cust_state.generate_payment(csprng, &channel_state, payment_amount);
        let payment = Payment { proof, com, wpk, amount };
        return (payment, new_cust_state);
    }
///
/// generate_payment_proof (phase 1) - takes as input the public params, channel state, channel token,
/// merchant public keys, old wallet and balance increment. Generate a new wallet commitment
/// PoK of the committed values in new wallet and PoK of old wallet. Return new channel token,
/// new wallet (minus blind signature and refund token) and payment proof.
///
generate_payment_proof (phase 1) - takes as input the public params, channel state, channel token,
merchant public keys, old wallet and balance increment. Generate a new wallet commitment
PoK of the committed values in new wallet and PoK of old wallet. Return new channel token,
new wallet (minus blind signature and refund token) and payment proof.
generate_payment_proof ( phase 1 ) - takes as input the public params channel state channel token merchant public keys old wallet and balance increment . Generate a new wallet commitment PoK of the committed values in new wallet and PoK of old wallet . Return new channel token new wallet ( minus blind signature and refund token ) and payment proof .
pub fn generate_payment_proof<R: Rng, E: Engine>(csprng: &mut R, channel_state: &ChannelState<E>, cust_state: &CustomerState<E>, amount: i64) -> (Payment<E>, CustomerState<E>) {
        let tx_fee = channel_state.get_channel_fee();
        let payment_amount = match tx_fee > 0 {
            true => amount + tx_fee,
            false => amount
        };
        let (proof, com, wpk, new_cust_state) = cust_state.generate_payment(csprng, &channel_state, payment_amount);
        let payment = Payment { proof, com, wpk, amount };
        return (payment, new_cust_state);
    }
pub fn generate_payment_proof < R : Rng , E : Engine > ( csprng : & mut R , channel_state : & ChannelState < E > , cust_state : & CustomerState < E > , amount : i64 ) -> ( Payment < E > , CustomerState < E > ) { let tx_fee = channel_state . get_channel_fee ( ) ; let payment_amount = match tx_fee > 0 { true => amount + tx_fee , false => amount } ; let ( proof , com , wpk , new_cust_state ) = cust_state . generate_payment ( csprng , & channel_state , payment_amount ) ; let payment = Payment { proof , com , wpk , amount } ; return ( payment , new_cust_state ) ; }
generate_payment_proof (phase 1) - takes as input the public params, channel state, channel token,
merchant public keys, old wallet and balance increment.
generate_payment_proof ( phase 1 ) - takes as input the public params channel state channel token merchant public keys old wallet and balance increment .
csprng
&mut R
channel_state
&ChannelState<E>
cust_state
&CustomerState<E>
amount
i64
csprng
&mut R
channel_state
&ChannelState<E>
cust_state
&CustomerState<E>
amount
i64