pub fn sign(&self, bip32ec_keypair: &Bip32ECKeyPair, chain_id: u8) -> Vec<u8> {
        let hash = self.tx_hash(chain_id);
        let sig = ecdsa_sign(&hash, bip32ec_keypair, chain_id);
        let mut tx = RlpStream::new();
        tx.begin_unbounded_list();
        self.encode(&mut tx);
        tx.append(&sig.v);
        tx.append(&sig.r.to_vec());
        tx.append(&sig.s.to_vec());
        tx.complete_unbounded_list();
        tx.out()
    }
/// Signs and returns the RLP-encoded transaction
Signs and returns the RLP-encoded transaction
Signs and returns the RLP - encoded transaction
pub fn sign(&self, bip32ec_keypair: &Bip32ECKeyPair, chain_id: u8) -> Vec<u8> {
        let hash = self.tx_hash(chain_id);
        let sig = ecdsa_sign(&hash, bip32ec_keypair, chain_id);
        let mut tx = RlpStream::new();
        tx.begin_unbounded_list();
        self.encode(&mut tx);
        tx.append(&sig.v);
        tx.append(&sig.r.to_vec());
        tx.append(&sig.s.to_vec());
        tx.complete_unbounded_list();
        tx.out()
    }
pub fn sign ( & self , bip32ec_keypair : & Bip32ECKeyPair , chain_id : u8 ) -> Vec < u8 > { let hash = self . tx_hash ( chain_id ) ; let sig = ecdsa_sign ( & hash , bip32ec_keypair , chain_id ) ; let mut tx = RlpStream :: new ( ) ; tx . begin_unbounded_list ( ) ; self . encode ( & mut tx ) ; tx . append ( & sig . v ) ; tx . append ( & sig . r . to_vec ( ) ) ; tx . append ( & sig . s . to_vec ( ) ) ; tx . complete_unbounded_list ( ) ; tx . out ( ) }
Signs and returns the RLP-encoded transaction
Signs and returns the RLP - encoded transaction
&self
bip32ec_keypair
&Bip32ECKeyPair
chain_id
u8
&self
bip32ec_keypair
&Bip32ECKeyPair
chain_id
u8