Skip to main content
31 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 ...
Pieter Wuille's user avatar
20 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 ...
G. Maxwell's user avatar
  • 7,727
16 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. ...
Mike D's user avatar
  • 3,569
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 ...
Pieter Wuille's user avatar
15 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 ...
Murch's user avatar
  • 75.5k
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 ...
Ava Chow's user avatar
  • 70.5k
13 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 ...
Chris Moore's user avatar
  • 14.8k
13 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 ...
jon.bray.eth's 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 ...
Murch's user avatar
  • 75.5k
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....
Pieter Wuille's 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 ...
meshcollider's user avatar
  • 11.8k
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 ...
Pieter Wuille's user avatar
10 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 ...
Pieter Wuille's 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'...
Pieter Wuille's user avatar
10 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 ...
Raghav Sood's 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.
Murch's user avatar
  • 75.5k
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 ...
Murch's user avatar
  • 75.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 ...
Jonathan Cross's 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 ...
Raghav Sood's user avatar
8 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 ...
kawthuldrok's user avatar
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 ...
Pieter Wuille's 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 ...
Ugam Kamat's user avatar
  • 7,408
8 votes

Convert bech32 Bitcoin address to legacy

As Anonymous says, you simply cannot. I'll try to highlight the important part of MCCCS's answer: In Bitcoin Cash, cashaddr ("bitcoincash:...", similar to, but not quite bech32) and legacy addresses ...
Pieter Wuille's user avatar
8 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 ...
Ava Chow's user avatar
  • 70.5k
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 ...
Michael Folkson's user avatar
8 votes
Accepted

Why doesn't signet use a unique bech32 prefix?

It used to, but we switched to using the testnet one to simplify things. It's a testnet so it doesn't really impact anyone if you screw it up (go to the faucet and get more if you lose them), and ...
Kalle's user avatar
  • 528
7 votes
Accepted

Is there an address format for P2WPKH or P2WSH?

Yes. The format used for encoding native version 0 Segwit scriptPubKeys (P2WPKH and P2WSH) is bech32, defined by BIP173. The format used for encoding Segwit scriptPubKeys version 1 and above is ...
Antoine Poinsot's 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 ...
Mason Ticehurst's user avatar
7 votes

What to do when a website says that my bc1... address is invalid?

The address that you are using starts with bc1 and is a bech32 address. Many online wallets still do not support this form of address, which is the reason you are getting the invalid Bitcoin address ...
Ugam Kamat's user avatar
  • 7,408
7 votes
Accepted

bech32 addresses beginning with "bcrt..." on regtest

Regtest and testnet are different networks. They are not compatible with each other. Regtest is a private local network which is used solely for testing. It is primarily used for the regression tests,...
Ava Chow's user avatar
  • 70.5k

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