user66391: I am working on a Bitcoin Wallet, i have public key but can't figure out how can i genrate xPub key from this.

user51948: 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.

66391: <p>I am working on a Bitcoin Wallet, i have public key but can't figure out how can i genrate xPub key from this.</p>
 51948: <p>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.</p>
