oleganza / CoreBitcoin

Awesome Bitcoin toolkit for ObjC and Swift
Do What The F*ck You Want To Public License
719 stars 255 forks source link

Get a Segwit address from Public Key #104

Closed Fonta1n3 closed 6 years ago

Fonta1n3 commented 6 years ago

Has anyone successfully created a segwit address from a compressed public key? I have been trying like crazy but not been able to get it to work. I can create the segwit address but when i test it on segwitaddress.org with the WIF private key the segwit addresses do not match... Please any advice would be greatly appreciated.

Fonta1n3 commented 6 years ago

I got it to work, by using this https://github.com/0xDEADP00L/Bech32/blob/master/Sources/Bech32.swift

AlleniCode commented 6 years ago

How to use Bech32.swift to generate a segwit address? THX!

AlleniCode commented 6 years ago

@FontaineDenton How to sig for a transaction with P2SH script UTXOs? Thx!