renproject / send-crypto

A minimal JavaScript library / wallet for sending crypto assets
MIT License
53 stars 14 forks source link

How to get segwit address from this library? #50

Open devturi opened 2 years ago

devturi commented 2 years ago

I was using this code for sending btc transactions and it was working really good. I like the simplicity. However, when I imported my private key (mainnet BTC) and tried to see the wallet address, it was showing a legacy address. While, the wallet that I created was segwit. So, I am a bit confused here. Can some help me get the segwit address?

Steps to reproduce:

"1QAFzHidiMNVED9AfP*****" Starting with "1"

Whereas, it should output something like this,

"bc1qlc9jt4kx5x***" Starting with bc1

Can somebody please help out here?

MadhuraJoshi1 commented 1 year ago

@devturi any update ?