keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.91k stars 1.23k forks source link

Allow Bitcoin Segwit addresses #10074

Open Richard87 opened 6 years ago

Richard87 commented 6 years ago

I can't publish a bitcoin segwit address..

dabura667 commented 6 years ago

bech32 native segwit addresses are definitely a must.

dabura667 commented 6 years ago

https://github.com/sipa/bech32/blob/master/ref/go/src/bech32/bech32.go

@maxtaco Here's a bech32 implementation in Go that will decode and check bech32 segwit addresses.

SegwitAddrDecode("bc", "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej")
// This will throw an error if the first string doesn't match the string portion all the way up to the last "1" character.
// bc is for bitcoin mainnet
dabura667 commented 6 years ago

also, bech32 is case insensitive... so I would recommend taking the user input and converting to lower case so you only have to check for "bc" and not "bC" "Bc" and "BC"

rex4539 commented 6 years ago

One more vote for Bech32 support.

waleedtee commented 5 years ago

my segwit address is still not accepted

xthursdayx commented 5 years ago

Was wondering if there had been any progress on this? @dabura667 's post seemed promising, but it was posted more than a year ago.

junderw commented 5 years ago

They have an active pull request now.

Should be done in a few weeks.

junderw commented 5 years ago

16764

merged 6 days ago.

should be any day now.