func DerivePublicKey(pubKeyBytes []byte, chainCode []byte, index uint32) ([]byte, []byte) {
	data := []byte{}
	data = append(data, pubKeyBytes...)
	data = append(data, uint32ToBytes(index)...)
	data2, chainCode2 := I64(chainCode, data)
	data2p := PubKeyBytesFromPrivKeyBytes(data2, true)
	return addPoints(pubKeyBytes, data2p), chainCode2
}
func DerivePublicKey(pubKeyBytes []byte, chainCode []byte, index uint32) ([]byte, []byte) {
	data := []byte{}
	data = append(data, pubKeyBytes...)
	data = append(data, uint32ToBytes(index)...)
	data2, chainCode2 := I64(chainCode, data)
	data2p := PubKeyBytesFromPrivKeyBytes(data2, true)
	return addPoints(pubKeyBytes, data2p), chainCode2
}
func DerivePublicKey ( pubKeyBytes [ ] byte , chainCode [ ] byte , index uint32 ) ( [ ] byte , [ ] byte ) { data := [ ] byte { } data = append ( data , pubKeyBytes ... ) data = append ( data , uint32ToBytes ( index ) ... ) data2 , chainCode2 := I64 ( chainCode , data ) data2p := PubKeyBytesFromPrivKeyBytes ( data2 , true ) return addPoints ( pubKeyBytes , data2p ) , chainCode2 }
// DerivePublicKey derives the public key with index and chainCode.
// It returns the new public key and new chain code.
DerivePublicKey derives the public key with index and chainCode . It returns the new public key and new chain code .