pub fn init_merchant<'a, R: Rng, E: Engine>(csprng: &mut R, channel_state: &mut ChannelState<E>, name: &'a str) -> (ChannelToken<E>, MerchantState<E>, ChannelState<E>) {
        // create new merchant state
        let merch_name = String::from(name);
        let (mut merch_state, mut channel_state) = MerchantState::<E>::new(csprng, channel_state, merch_name);
        // initialize the merchant state
        let channel_token = merch_state.init(&mut channel_state);

        return (channel_token, merch_state, channel_state.clone());
    }
///
/// init_merchant - takes as input the public params, merchant balance and keypair.
/// Generates merchant data which consists of channel token and merchant state.
///
takes as input the public params, merchant balance and keypair.
Generates merchant data which consists of channel token and merchant state.
takes as input the public params merchant balance and keypair . Generates merchant data which consists of channel token and merchant state .
pub fn init_merchant<'a, R: Rng, E: Engine>(csprng: &mut R, channel_state: &mut ChannelState<E>, name: &'a str) -> (ChannelToken<E>, MerchantState<E>, ChannelState<E>) {
        // create new merchant state
        let merch_name = String::from(name);
        let (mut merch_state, mut channel_state) = MerchantState::<E>::new(csprng, channel_state, merch_name);
        // initialize the merchant state
        let channel_token = merch_state.init(&mut channel_state);
        return (channel_token, merch_state, channel_state.clone());
    }
pub fn init_merchant < ' a , R : Rng , E : Engine > ( csprng : & mut R , channel_state : & mut ChannelState < E > , name : & ' a str ) -> ( ChannelToken < E > , MerchantState < E > , ChannelState < E > ) { // create new merchant state let merch_name = String :: from ( name ) ; let ( mut merch_state , mut channel_state ) = MerchantState :: < E > :: new ( csprng , channel_state , merch_name ) ; // initialize the merchant state let channel_token = merch_state . init ( & mut channel_state ) ; return ( channel_token , merch_state , channel_state . clone ( ) ) ; }
init_merchant - takes as input the public params, merchant balance and keypair.
init_merchant - takes as input the public params merchant balance and keypair .
csprng
&mut R
channel_state
&mut ChannelState<E>
name
&'a str
csprng
&mut R
channel_state
&mut ChannelState<E>
name
&'a str