Skip to main content
52 votes
Accepted

My raw transaction destroyed 0.0284377 BTC. What did I do wrong?

Addresses that start with 3... are P2SH addresses, and they've been around for almost 6 years now. Historically they saw limited use - used by multisig wallets like Copay and GreenAddress. The ...
Pieter Wuille's user avatar
22 votes
Accepted

How do virtual size, stripped size and raw size compare between legacy address formats and native segwit?

Segwit introduced a new limit for blocks, the blockweight limit, superseding the previous blocksize limit. Under the segwit rules, witness data is counted at a lower weighting than non-witness data ...
Murch's user avatar
  • 76k
16 votes
Accepted

Is it possible to convert an address from p2pkh to p2sh?

Is it possible to covert a p2pkh adrress to a p2sh adress? Don't. Addresses are determined by the wallet. It's the receiver's wallet saying "I will accept payment when it arrives at address X". ...
Pieter Wuille's user avatar
15 votes

What is the size of different Bitcoin transaction types?

There are a number of different address formats and other standard transaction types: Pay to Public Key (P2PK) outputs tie payments directly to the public key of the recipient instead of the derived ...
Murch's user avatar
  • 76k
11 votes
Accepted

Accidentally sent Bitcoin Cash to Bitcoin address held by a third party

You'll have to negotiate with your service provider whether they can help you. Whoever holds the private keys for your Bitcoin wallet should be theoretically able to generate a transaction that ...
Murch's user avatar
  • 76k
10 votes
Accepted

litecoin constants and prefixes

Here is what I've gathered so far regarding the different version bytes for each type of Litecoin public address: Mainnet: p2pkh L-address (LM2WMpR1Rp6j3Sa59cMXMs1SPzj9eXpGc1): 0x30 p2sh deprecated 3-...
thalisk's user avatar
  • 483
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
  • 17.1k
9 votes

P2WSH, witness_v0_scripthash: how to derive an address

It's a Segwit output and hence does not have the address associated with it. The locking script for a Segwit transaction includes the witness version (0 in this case) and the redeem script (which is ...
Ugam Kamat's user avatar
  • 7,427
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
  • 17.1k
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
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 to generate a testnet address?

Bitaddress.org itself allows you to create Testnet addresses (hat tip to Nick ODell). The generator for testnet addresses can be found by appending ?testnet=true to the URL. The site now appears to ...
Murch's user avatar
  • 76k
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,427
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 ...
Tailer's user avatar
  • 3,669
6 votes
Accepted

Qualities of "Pay to Nested Witness Key Hash"

Nested P2WPHK is just the normal P2WPKH embedded within a P2SH, to make it compatible with older wallets which don't recognize native witness addresses (bech32). Check out this for more info: https://...
meshcollider's user avatar
  • 11.9k
6 votes
Accepted

Why are segwit transactions cheaper than legacy transactions?

Why are segwit transactions cheaper? Segregated witness transactions are cheaper because they are designed to be. In legacy transactions, every byte has the same "cost"; they all count ...
Pieter Wuille's user avatar
5 votes
Accepted

Benefits of Bech32 addresses?

Native P2WPKH Unspent outputs save 23 bytes as their ScriptSigs are empty instead of 0x0014{20-byte-key-hash}. 2) Yes, there's already a checksum of the same length. The newer checksum algorithm is ...
MCCCS's user avatar
  • 10.2k
5 votes

How to generate a testnet address?

Assume your hexadecimal private key (256 bits in length) is 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff for demonstrative purposes. Use this table to specify interger version to ...
skaht's user avatar
  • 3,077
5 votes
Accepted

Are Bitcoin and Litecoin test addresses compatible?

Yes, they're interchangeable. The components of an address are a prefix byte, a 20-byte public key hash (160 bits), and a 4-byte checksum. Litecoin testnet uses the same prefix byte as Bitcoin ...
Nate Eldredge's user avatar
5 votes

Is there an address format for P2WPKH or P2WSH?

Is there an address format for P2WPKH or P2WSH? No. BIP142 would have provided an address format for these output scripts, but it is in "deferred" status and expected to remain that way. Wallet ...
David A. Harding's user avatar
5 votes
Accepted

Why did bech32 define a new base32 encoding scheme rather than use an existing one?

There are multiple aspects to the design of bech32. There is the choice of character set (i.e. which characters are included in the 32 options and which characters are excluded because they visually ...
Michael Folkson's user avatar
5 votes
Accepted

how do you tell P2WSH invoice addresses apart from P2SH?

P2PKH addresses are 33-34 characters long, use Base58Check encoding, and (on mainnet) start with "1". P2SH addresses are 34 characters long, use Base58Check encoding, and (on mainnet) start ...
Pieter Wuille's user avatar
4 votes

litecoin constants and prefixes

L - Legacy, Non-P2SH (Pay to script hash) address prefix 3 - P2SH prefix that's backwards compatible to the M prefix. When I say backwards compatible, I mean that there is a 3 address and an M ...
Cory Benjamin's user avatar
4 votes
Accepted

Dust threshold for Testnet

The dust threshold is defined as (output_weight+input_weight)×discard_feerate. The discard_feerate is defined as 3 s/vB. It follows that you need to know the input_weight to calculate an output's dust ...
Murch's user avatar
  • 76k
4 votes

Can one infer that a bc1 address is multisig?

No, you can only determine the output type, but not the encoded spending conditions from another user's address. Whether a *SH output is committing funds to a multisig script only becomes knowable ...
Murch's user avatar
  • 76k
3 votes

How do virtual size, stripped size and raw size compare between legacy address formats and native segwit?

I compared to the following 9 types of transaction's weight. And then I found that No9 (P2WPKH => P2WPKH) was the lightest. Transaction patterns // 1 transaction consists of 1 txin and 1 txout 1. (...
zono's user avatar
  • 1,945
3 votes

Why do bitcoin: URLs not use "//", breaking "clickability"?

The Bitcoin URI scheme is defined in BIP21: Bitcoin URIs follow the general format for URIs as set forth in RFC 3986. The path component consists of a bitcoin address, and the query component ...
pinhead's user avatar
  • 5,164
3 votes
Accepted

Are the characters 0, O, I, l really not allowed in address?

There are two different encodings being used for Bitcoin addresses. Native segwit addresses are encoded using the Bech32(m) encoding. Bech32 uses the 32 symbols 023456789acdefghjklmnpqrstuvwxyz to ...
Murch's user avatar
  • 76k
2 votes

P2WSH, witness_v0_scripthash: how to derive an address

Native segwit outputs (P2WSH and P2WPKH) do not currently have an address type, so there are no addresses for these outputs.
Ava Chow's user avatar
  • 71k
2 votes

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

In general spending from a segwit output (i.e. "sending from" a segwit address) will be cheaper than spending a non-segwit output (i.e. "sending from" a non-segwit address). So yes, if you "send from" ...
Ava Chow's user avatar
  • 71k

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