I'm trying to Generate unused receiving Addresses for a Segwit P2SH wallet in my Ledger. I tried https://pypi.org/project/bitcoinlib/ but without success, the addresses weren't right.

This is from my Ledger:

  "xpub": "xpub...",
  "index": 0,
  "freshAddressPath": "49'/0'/0'/0/6",
  "id": "js:2:bitcoin:xpub...:segwit",
  "blockHeight": 753361

Thanks in Advance.

1 Answer 1


Ledger is using incorrect version prefix. Most libraries/wallets/online tools use ypub format for P2SH address

To make this work you can use any of the following tools to convert you xpub to ypub:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.