pub fn init_customer<'a, R: Rng, E: Engine>(csprng: &mut R, channel_token: &mut ChannelToken<E>,
                                                b0_cust: i64, b0_merch: i64, name: &'a str) -> CustomerState<E>
        where <E as pairing::Engine>::G1: serde::Serialize,
              <E as pairing::Engine>::G2: serde::Serialize,
              <E as ff::ScalarEngine>::Fr: serde::Serialize
    {
        assert!(b0_cust >= 0);
        assert!(b0_merch >= 0);

        let cust_name = String::from(name);
        return CustomerState::<E>::new(csprng, channel_token, b0_cust, b0_merch, cust_name);
    }
///
/// init_customer - takes as input the public params, channel state, commitment params, keypair,
/// and initial balance for customer and merchant. Generate initial customer channel token,
/// and wallet commitment.
///
takes as input the public params, channel state, commitment params, keypair,
and initial balance for customer and merchant. Generate initial customer channel token,
and wallet commitment.
takes as input the public params channel state commitment params keypair and initial balance for customer and merchant . Generate initial customer channel token and wallet commitment .
pub fn init_customer<'a, R: Rng, E: Engine>(csprng: &mut R, channel_token: &mut ChannelToken<E>,
                                                b0_cust: i64, b0_merch: i64, name: &'a str) -> CustomerState<E>
        where <E as pairing::Engine>::G1: serde::Serialize,
              <E as pairing::Engine>::G2: serde::Serialize,
              <E as ff::ScalarEngine>::Fr: serde::Serialize
    {
        assert!(b0_cust >= 0);
        assert!(b0_merch >= 0);
        let cust_name = String::from(name);
        return CustomerState::<E>::new(csprng, channel_token, b0_cust, b0_merch, cust_name);
    }
pub fn init_customer < ' a , R : Rng , E : Engine > ( csprng : & mut R , channel_token : & mut ChannelToken < E > , b0_cust : i64 , b0_merch : i64 , name : & ' a str ) -> CustomerState < E > where < E as pairing :: Engine > :: G1 : serde :: Serialize , < E as pairing :: Engine > :: G2 : serde :: Serialize , < E as ff :: ScalarEngine > :: Fr : serde :: Serialize { assert ! ( b0_cust 0 ) ; assert ! ( b0_merch 0 ) ; let cust_name = String :: from ( name ) ; return CustomerState :: < E > :: new ( csprng , channel_token , b0_cust , b0_merch , cust_name ) ; }
init_customer - takes as input the public params, channel state, commitment params, keypair,
and initial balance for customer and merchant.
init_customer - takes as input the public params channel state commitment params keypair and initial balance for customer and merchant .
csprng
&mut R
channel_token
&mut ChannelToken<E>
b0_cust
i64
b0_merch
i64
name
&'a str
csprng
&mut R
channel_token
&mut ChannelToken<E>
b0_cust
i64
b0_merch
i64
name
&'a str