pub fn ckd_pub<C: secp256k1::Verification>(
        &self,
        secp: &Secp256k1<C>,
        i: ChildNumber,
    ) -> Result<ExtendedPubKey, Error> {
        let (sk, chain_code) = self.ckd_pub_tweak(i)?;
        let mut pk = self.public_key.clone();
        pk.key.add_exp_assign(secp, &sk[..]).map_err(Error::Ecdsa)?;

        Ok(ExtendedPubKey {
            network: self.network,
            depth: self.depth + 1,
            parent_fingerprint: self.fingerprint(),
            child_number: i,
            public_key: pk,
            chain_code: chain_code
        })
    }
/// Public->Public child key derivation
Public->Public child key derivation
Public - > Public child key derivation
pub fn ckd_pub<C: secp256k1::Verification>(
        &self,
        secp: &Secp256k1<C>,
        i: ChildNumber,
    ) -> Result<ExtendedPubKey, Error> {
        let (sk, chain_code) = self.ckd_pub_tweak(i)?;
        let mut pk = self.public_key.clone();
        pk.key.add_exp_assign(secp, &sk[..]).map_err(Error::Ecdsa)?;
        Ok(ExtendedPubKey {
            network: self.network,
            depth: self.depth + 1,
            parent_fingerprint: self.fingerprint(),
            child_number: i,
            public_key: pk,
            chain_code: chain_code
        })
    }
pub fn ckd_pub < C : secp256k1 :: Verification > ( & self , secp : & Secp256k1 < C > , i : ChildNumber , ) -> Result < ExtendedPubKey , Error > { let ( sk , chain_code ) = self . ckd_pub_tweak ( i ) ? ; let mut pk = self . public_key . clone ( ) ; pk . key . add_exp_assign ( secp , & sk [ .. ] ) . map_err ( Error :: Ecdsa ) ? ; Ok ( ExtendedPubKey { network : self . network , depth : self . depth + 1 , parent_fingerprint : self . fingerprint ( ) , child_number : i , public_key : pk , chain_code : chain_code } ) }
Public->Public child key derivation
Public - > Public child key derivation
&self
secp
&Secp256k1<C>
i
ChildNumber
&self
secp
&Secp256k1<C>
i
ChildNumber