Why bech32 address always starts with bc1q?

3

I understand that it starts bc1.

But 'q' is not what I understand. Can someone explain to me?

bitcoinlearner

Posted 2018-02-26T16:46:19.397

Reputation: 167

Answers

6

q is the Bech32 encoding of the number 0. For a segwit address, as defined in BIP 173, the number immediately following the separator is the witness version. In this case, bc1q, the q means it is a witness v0 address, which is the only type currently used but allows for easy future addition of new versions

MeshCollider

Posted 2018-02-26T16:46:19.397

Reputation: 8 735

3

Immediately following the human readable part and separator of a bech32 address is the witness version number. For current bech32 addresses, that version number is 0. According to the encoding table here, the value for a 0 byte is q. Thus addresses will begin with bc1q.

Andrew Chow

Posted 2018-02-26T16:46:19.397

Reputation: 40 910

2

There is of corse BIP173, which explains bc1 for better readability.

More interesting is a thread in bitcointalk, where Greg Maxwell explains details. Searching the forum here and bitcointalk for bech32 reveals lots of interesting facts :-)

pebwindkraft

Posted 2018-02-26T16:46:19.397

Reputation: 4 568