bitcoin address from xpub key I want to create bitcoin address from extended public key, without exposing private key but did not get any success till now. Do someone know how to do it? I am using bitcore-lib package
According to BIP32 you're trying to generate a non-hardened child address, see BIP32 - Public parent key → public child key.

Using bitcore-lib, to derive a non-hardened child public key and a P2PKH address:

var bitcore = require('bitcore-lib');
var Address = bitcore.Address;
var PublicKey = bitcore.PublicKey;
var Networks = bitcore.Networks;

var hdPublickey = new bitcore.HDPublicKey('tpubD6NzVbkrYhZ4XLMmry7XriYJ6Xgx1vQqoUZHLUXQPDB32n7pQYaWSMpRttm2sHzYjsQqrsAZYyJCmoEJB51oSdqZxq7epGjP4vHriCYz7Tp');
var orderPublickey = hdPublickey.deriveChild("m/44/145/0/0");
var pubkey = new PublicKey(orderPublickey.publicKey);
var address = Address.fromPublicKey(pubkey, Networks.testnet);
console.log("address", address);


Returns:
address &lt;Address: mkVBk6gZ7rBLYXvpdcKwTEq6SjHvSeLwZ8, type: pubkeyhash, network: testnet&gt;