fn sign_fee(time: [u8; 32]) -> (Vec<u8>, secp256k1::Signature) {
    let fee_collector_srv_priv_key =
        bitcoin::PrivateKey::from_wif("cPNAjBG689Yj71yRwybLvF1uUDVWA9gB2CwDynoUq5CQRNciBa77")
            .unwrap();
    let mut eng = SigHash::engine();
    //  code for get actual time. Format goes here
    let fee = calc_fee_repr(100); // do the encoding stuff properly here
    eng.input(&time);
    eng.input(&fee);
    let msg = secp256k1::Message::from_slice(&SigHash::from_engine(eng)).unwrap();
    let secp = Secp256k1::signing_only();
    (fee, secp.sign(&msg, &fee_collector_srv_priv_key.key))
}
// Pad a 32 byte blob with timestamp(32 byte) and
// Assumes some encoding of timestamp as 32 bytes
// creates a sig on (time || msg_32)
Pad a 32 byte blob with timestamp(32 byte) and
Assumes some encoding of timestamp as 32 bytes
creates a sig on (time || msg_32)
Pad a 32 byte blob with timestamp ( 32 byte ) and Assumes some encoding of timestamp as 32 bytes creates a sig on ( time || msg_32 )
fn sign_fee(time: [u8; 32]) -> (Vec<u8>, secp256k1::Signature) {
    let fee_collector_srv_priv_key =
        bitcoin::PrivateKey::from_wif("cPNAjBG689Yj71yRwybLvF1uUDVWA9gB2CwDynoUq5CQRNciBa77")
            .unwrap();
    let mut eng = SigHash::engine();
    //  code for get actual time. Format goes here
    let fee = calc_fee_repr(100); // do the encoding stuff properly here
    eng.input(&time);
    eng.input(&fee);
    let msg = secp256k1::Message::from_slice(&SigHash::from_engine(eng)).unwrap();
    let secp = Secp256k1::signing_only();
    (fee, secp.sign(&msg, &fee_collector_srv_priv_key.key))
}
fn sign_fee ( time : [ u8 ; 32 ] ) -> ( Vec < u8 > , secp256k1 :: Signature ) { let fee_collector_srv_priv_key = bitcoin :: PrivateKey :: from_wif ( " " ) . unwrap ( ) ; let mut eng = SigHash :: engine ( ) ; //  code for get actual time. Format goes here let fee = calc_fee_repr ( 100 ) ; // do the encoding stuff properly here eng . input ( & time ) ; eng . input ( & fee ) ; let msg = secp256k1 :: Message :: from_slice ( & SigHash :: from_engine ( eng ) ) . unwrap ( ) ; let secp = Secp256k1 :: signing_only ( ) ; ( fee , secp . sign ( & msg , & fee_collector_srv_priv_key . key ) ) }
Pad a 32 byte blob with timestamp(32 byte) and
Assumes some encoding of timestamp as 32 bytes
creates a sig on (time || msg_32)
Pad a 32 byte blob with timestamp ( 32 byte ) and Assumes some encoding of timestamp as 32 bytes creates a sig on ( time || msg_32 )
time
[u8; 32]
time
[u8; 32]