Private Key is a 32 bytes data
Apply ECDSA or Elliptic Curve Digital Signature Algorithm to the private key.
The above step dervies the public key,.
(Legacy)Now append 0x04 to the start of the public key.
(Current Practise) Take X from derived public key. Now add byte 0x03 if the last byte of Y is odd or 0x02 if the last byte is even.
Now, apply SHA-256 to ...