29 votes
Accepted

Is it possible to convert a taproot address into a native segwit address?

I am afraid the sent coins are irrevocably burned. The reason is that P2TR addresses encode a (tweaked) public key, while P2WSH addresses encode a script hash. If someone would take a P2TR address so ...
user avatar
21 votes
Accepted

Bitcoin automatically diverted to bech32 address

I'm sorry to be the bearer of bad news: It looks like your funds are gone and the security of your computer is compromised. A quick google suggests that is one of the electrum phishing destination ...
user avatar
  • 7,479
16 votes
Accepted

Will a Schnorr soft-fork introduce a new address format (i.e. not bech32)

They will be distinguishable, but they will still be bech32 addresses. The introduction of Schnorr signatures requires a new type of output. Segwit was designed with such extensibility in mind, and it ...
user avatar
14 votes
Accepted

How to create a Bech32 address from a public key?

Ok, I figured out how to do it. You need 3 pieces of information to construct the bech32 address. hrp: the human-readable part. This is bc for mainnet and tb for testnet witver: the witness version. ...
user avatar
  • 3,185
14 votes
Accepted

Why does Taproot require a new address format?

Background P2TR addresses will be encoded using Bech32, although likely an amended version. In anticipation of Taproot getting merged, some proponents tested the behavior of various wallets and ...
user avatar
  • 63.3k
13 votes
Accepted

Bech32 conversion to legacy P2PKH?

Is it safe to receive funds at this 1FJJd... address? Kind of. Your wallet knows the private key that corresponds to that address as it is the same private key for the bech32 address. However it does ...
user avatar
  • 61.3k
12 votes
Accepted

How do bech32 addresses compare to P2SH addresses in transaction size?

bech32 produces smaller transactions than P2SH segwit transactions. one extra byte per output to create P2SH outputs than to create bech32 utxos (P2SH uses OP_HASH160 and OP_EQUAL in addition to a 20 ...
user avatar
  • 14.7k
12 votes
Accepted

Are all three Bitcoin address types interoperable (legacy, segwit, native segwit)?

Absolutely! Each address type handles transaction generation slightly differently but they all are interoperable with each other on the protocol level. If you run into an issue where one address type ...
user avatar
12 votes
Accepted

What is the difference between "native segwit" and "bech32"?

TL;DR: Native segwit refers to segwit outputs without P2SH-wrapper. Bech32 is the address format used to represent native segwit-v0 locking scripts. Wrapped segwit vs native segwit When segwit ...
user avatar
  • 63.3k
11 votes
Accepted

Can I mix P2PKH and P2WPKH inputs in the same transaction?

Is it acceptable to mix P2PKH and P2WPKH inputs in the same transaction as described above? Yes, absolutely. In the same way that you can mix multisig and P2SH and P2PK inputs in the same transaction....
user avatar
10 votes
Accepted

Why bech32 address always starts with bc1q?

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 ...
user avatar
  • 11.3k
10 votes
Accepted

Which wallet libraries officially intend to use Bech32 addresses, and will the addresses generated by them be compatible?

Bech32 is an address format that was only recently proposed. While its design had input from multiple wallet authors, it is way too early to say anything about adoption. It is important to realize ...
user avatar
10 votes
Accepted

How does the bech32 length-extension mutation weakness work?

I'm going to provide a more algebraic explanation of the issue. Every valid (and invalid) Bech32 string can be seen as a polynomial in the variable x, where the coefficients are elements of GF(32). I'...
user avatar
9 votes
Accepted

Which block explorers recognize bech32 addresses?

Blockchair announced support for Bech32 addresses last month. This page about Bech32 adoption on bitcoin.it wiki page is tracking blockexplorers that support Bech32 addresses.
user avatar
  • 63.3k
9 votes
Accepted

How is Public Key extracted from (message, digital signature, address)

An algorithm called Public Key Recovery exists for ECDSA, which lets you construct the public keys for which a given pair of message and signature would be valid. To explain the algorithm, remember ...
user avatar
9 votes

Are all three Bitcoin address types interoperable (legacy, segwit, native segwit)?

There are no restrictions on sending from any type of outputs to any address type in the Bitcoin protocol, but some older wallets might not support sending to newer address types. Let's take a better ...
user avatar
  • 63.3k
9 votes

Are Bitcoin addresses case sensitive?

Segwit addresses like the one you posted are case insensitive. Assuming your wallet is up to the spec, it should be able to send the BTC just fine. If you have a transaction ID, look it up on an ...
user avatar
  • 16.5k
8 votes
Accepted

How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?

Transfer from Legacy ⟶ SegWit: pay full fee (doesn't benefit from SegWit discount) Transfer from SegWit ⟶ Legacy or SegWit: discounted. Note: SegWit addresses can be Bech32 bc1... or they can be ...
user avatar
8 votes

What the difference between old segwit (3) and new segwit address (bc)?

The difference lies in the encoding and the underlying representation in the transaction data stored on the blockchain. The 3-segwit addresses are known as P2SH-P2WPKH or P2SH-P2WSH. This stands for ...
user avatar
  • 16.5k
8 votes
Accepted

Why does the decode function of the segwit bech32 encoder/decoder take a hrp (human readable part) as input?

The HRP is part of the bech32 encoded string, and in the bech32 decoding API, it is returned along with the payload by the decoder, after checking the checksum. We still want to compare it with the ...
user avatar
8 votes
Accepted

Most efficient way to store Segwit Address in a database

Is there a way to get to the hash160 address from bc1q34aq5drpuwy3wgl9lhup9892qp6svr8ldzyy7c Yes, you could use the reference implementations in various languages to encode and decode a bech32 ...
user avatar
  • 6,908
8 votes
Accepted

Can you break down what data is encoded into a bech32 address?

Bech32 addresses are defined in BIP 173. This slide is taken from Pieter Wuille's presentation on bech32 at SF Bitcoin Devs in March 2017. Different prefixes A list of address prefixes on the Bitcoin ...
user avatar
7 votes
Accepted

How do I Derive Bech32 Address from P2WPKH Output Script?

Okay so I think I've figured it out for anyone else wondering what exactly you have to do to derive an address from this type. In the case of the already mentioned transaction, (coinbase of block ...
user avatar
  • 963
7 votes
Accepted

In simple terms, what are the major differences between P2WPKH and P2WSH bech32 addresses?

P2WPKH - This stands for "Pay To Witness Public Key Hash" and the scriptPubkey is OP_0 0x14 {20-byte-hash}, where OP_0 is the version, byte 0x14 is the size of the data, and the {20-byte-hash} is a ...
user avatar
7 votes
Accepted

How to generate legacy receiving address in Bitcoin core 0.19.x.x

From within the GUI, no, and this is intentional. There is no reason to use P2PKH addresses anymore. If you need backwards compatibility, then that's what the P2SH checkbox is for. But if you really ...
user avatar
  • 61.3k
7 votes

Are all three Bitcoin address types interoperable (legacy, segwit, native segwit)?

At a protocol level, they are all compatible. Transactions can spend any of them, and send to any of them. Wallet software may of course have restrictions, but these are usually not about ...
user avatar
6 votes

understanding bech32 Addresses / BIP173 question

how to interprete script handling? What you're missing is that BIP173 is not a way to encode public keys or scripts. It is a way to encode segwit transaction outputs. What those outputs are and mean ...
user avatar
6 votes
Accepted

What the difference between old segwit (3) and new segwit address (bc)?

There's no big difference for users between the two. The fee is lower while using native Segwit address (bech32), and the address format differs. Let's look at the motivations of bech32 address ...
user avatar
  • 3,569
6 votes

Constructing a P2WSH address from the BIP173 spec

First of all, what are you trying to do? Why do you need a P2WSH address? A P2WSH address (and P2SH addresses earlier) send coins to a script, which requires satisfying that script to decode. A ...
user avatar
6 votes
Accepted

Are "1" , "3" and "Bech" Addresses (BTC) forward and backward compatible?

All current addresses are cross compatible. At a technical level, the chain has no concept of an address, only of locking scripts, which are fragments of a bitcoin script program. You send coins by ...
user avatar
  • 16.5k

Only top scored, non community-wiki answers of a minimum length are eligible