How to generate xPub Key from public key in java I am working on a Bitcoin Wallet, i have public key but can't figure out how can i genrate xPub key from this.
The extended public key, xPub, consists of both a chaincode and the public key itself. These are effectively distinct from each other, you cannot generate the chain code from the public key or vice-versa. Normally they are both generated at the same time from a seed, but without the seed you cannot generate the same chain code.