pub fn establish_merchant_issue_close_token<R: Rng, E: Engine>(csprng: &mut R, channel_state: &ChannelState<E>,
                                                                   com: &Commitment<E>, com_proof: &CommitmentProof<E>,
                                                                   channel_id: &E::Fr, init_cust_balance: i64, init_merch_balance: i64,
                                                                   merch_state: &MerchantState<E>) -> BoltResult<cl::Signature<E>> {
        // verifies proof of committed values and derives blind signature on the committed values to the customer's initial wallet
        match merch_state.verify_proof(csprng, channel_state, com, com_proof, channel_id, init_cust_balance, init_merch_balance) {
            Ok(n) => Ok(Some(n.0)), // just close token
            Err(err) => Err(String::from(err.to_string()))
        }
    }
///
/// establish_merchant_issue_close_token (Phase 1) - takes as input the channel state,
/// PoK of committed values from the customer. Generates close token (a blinded
/// signature) over the contents of the customer's wallet.
///
establish_merchant_issue_close_token (Phase 1) - takes as input the channel state,
PoK of committed values from the customer. Generates close token (a blinded
signature) over the contents of the customer's wallet.
establish_merchant_issue_close_token ( Phase 1 ) - takes as input the channel state PoK of committed values from the customer . Generates close token ( a blinded signature ) over the contents of the customer ' s wallet .
pub fn establish_merchant_issue_close_token<R: Rng, E: Engine>(csprng: &mut R, channel_state: &ChannelState<E>,
                                                                   com: &Commitment<E>, com_proof: &CommitmentProof<E>,
                                                                   channel_id: &E::Fr, init_cust_balance: i64, init_merch_balance: i64,
                                                                   merch_state: &MerchantState<E>) -> BoltResult<cl::Signature<E>> {
        // verifies proof of committed values and derives blind signature on the committed values to the customer's initial wallet
        match merch_state.verify_proof(csprng, channel_state, com, com_proof, channel_id, init_cust_balance, init_merch_balance) {
            Ok(n) => Ok(Some(n.0)), // just close token
            Err(err) => Err(String::from(err.to_string()))
        }
    }
pub fn establish_merchant_issue_close_token < R : Rng , E : Engine > ( csprng : & mut R , channel_state : & ChannelState < E > , com : & Commitment < E > , com_proof : & CommitmentProof < E > , channel_id : & E :: Fr , init_cust_balance : i64 , init_merch_balance : i64 , merch_state : & MerchantState < E > ) -> BoltResult < cl :: Signature < E > > { // verifies proof of committed values and derives blind signature on the committed values to the customer's initial wallet match merch_state . verify_proof ( csprng , channel_state , com , com_proof , channel_id , init_cust_balance , init_merch_balance ) { Ok ( n ) => Ok ( Some ( n . 0 ) ) , // just close token Err ( err ) => Err ( String :: from ( err . to_string ( ) ) ) } }
establish_merchant_issue_close_token (Phase 1) - takes as input the channel state,
PoK of committed values from the customer.
establish_merchant_issue_close_token ( Phase 1 ) - takes as input the channel state PoK of committed values from the customer .
csprng
&mut R
channel_state
&ChannelState<E>
com
&Commitment<E>
com_proof
&CommitmentProof<E>
channel_id
&E::Fr
init_cust_balance
i64
init_merch_balance
i64
merch_state
&MerchantState<E>
csprng
&mut R
channel_state
&ChannelState<E>
com
&Commitment<E>
com_proof
&CommitmentProof<E>
channel_id
&E::Fr
init_cust_balance
i64
init_merch_balance
i64
merch_state
&MerchantState<E>