You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/designing-products/wallet-interoperability.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Below are areas within your Bitcoin application where interoperability should be
54
54
layout = "float-right-desktop"
55
55
%}
56
56
57
-
You should ensure your application is interoperable with the various techniques for sending and receiving Bitcoin payments. For base-layer, this means supporting various [address formats](/guide/glossary/address/), such as legacy addresses (P2PKH), compatibility addresses (P2SH), and Segwit addresses (Bech32). For Lightning payments, your application should be able to read and generate invoices according to the [BOLT 11](/guide/glossary/#bolt---basis-of-lightning-technology) standard.
57
+
You should ensure your application is interoperable with the various techniques for sending and receiving Bitcoin payments. For base-layer, this means supporting various [address formats](/guide/glossary/address/), such as legacy (P2PKH), compatibility (P2SH), Segwit (Bech32), and Taproot (P2TR). For Lightning payments, your application should be able to read and generate invoices according to the [BOLT 11](/guide/glossary/#bolt---basis-of-lightning-technology) standard.
58
58
59
59
You may want to also support more experimental Lightning payment options such as [Lightning addresses](https://lightningaddress.com/), [BOLT 12 offers](https://bolt12.org/), [Keysend](https://lightning.readthedocs.io/lightning-keysend.7.html), and [LNURL](https://github.com/fiatjaf/lnurl-rfc). If your application does not support these, you should be sure to include a human-readable failure state.
caption = 'Paint texture by [Geordanna Cordero](https://unsplash.com/@adrienolichon){:target="_blank" rel="nofollow"} on [Unsplash](https://unsplash.com){:target="_blank" rel="nofollow"}'
28
+
width = 1600
29
+
height = 700
30
+
layout = "full-width"
31
+
%}
32
+
11
33
# Address
12
-
A Bitcoin address is an identifier of 26-35 alphanumeric characters that is used to receive bitcoin. There are [several address formats](https://en.bitcoin.it/wiki/List_of_address_prefixes) based on different specifications. Users need to know this information during backup for future recovery so applications should inform users which format it uses as support varies across applications.
34
+
A Bitcoin address is an 26-35 alphanumeric character identifier that is used to receive bitcoin. There are [several address formats](https://en.bitcoin.it/wiki/Invoice_address) based on different specifications.
35
+
36
+
When users enter an address, these formats have specific prefixes so it is possible to determine which format is being used.
13
37
14
-
When users enter an address, these formats have specific prefixes so it is possible to instantly determine which format is being used.
Stands for pay-to-pubkey-hash, i.e pay to a hash of the recipient’s public key. This was the original address format for bitcoin and is often called *legacy address*.
42
+
A pay-to-pubkey-hash (P2PKH), or legacy address, is the oldest and original Bitcoin address format. This address format is not widely used today as transaction costs are higher using this format. However, support for this in applications is still encouraged as to be compatible with older legacy wallets that have not upgraded to new address formats.
20
43
21
-
*Legacy addresses* begin with the number 1, can contain upper and lowercase characters, and are case sensitive. <br/>
22
-
For example: `1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2`
44
+
Legacy addresses begin with the number 1, can contain upper and lowercase characters, and are case sensitive.
A script address can have code attached to enable additional rules and functionality. P2SH stands for pay-to-script-hash, and was defined in [BIP13](https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki). Script addresses are most commonly used for multi-sig addresses which can specify, for example, that signatures from several keys are required to authorize the transaction.
46
+
Example: `1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2`
26
47
27
-
*Script addresses* start with the number 3, can contain upper and lowercase characters, and are case sensitive. <br/>
The *SegWit* address format (for segregated witness) was introduced in an update to the Bitcoin protocol that made changes to the transaction format. The technical name of this address format is Bech32, and is specified in [BIP173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki). SegWit addresses are supported by the majority of software and hardware wallets, but a minority of exchanges. SegWit address adoption by applications and exchanges is tracked on [this page](https://en.bitcoin.it/wiki/Bech32_adoption). Any new bitcoin-application should support the use of SegWit addresses.
50
+
A pay-to-script-hash (P2SH), or script address, can have additional rules and functionality attached to the address. Script addresses are commonly used for multi-sig addresses which can specify that signatures from several keys are required to authorize the transaction.
32
51
33
-
The benefits of SegWit addresses include more resistance to input errors (as they are case insensitive and use error-correcting codes), and lower transaction fees. The fee saving will depend on the type of transaction but for a common transfer of funds it can be in the 30-40% range.
52
+
Script addresses start with the number 3, can contain upper and lowercase characters, and are case sensitive.
34
53
35
-
*SegWit addresses* start with `bc1` and are case insensitive. <br/>
36
-
For example: `bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq`
54
+
Example: `3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy`
37
55
38
-
**Change address**<br/>
39
-
When the output of a transaction is used as the input of another transaction, it must be spent in its entirety. Sometimes the value of the output is higher than what the user wishes to pay. In this case, the bitcoin client generates a new Bitcoin address, and sends the difference back to this address. This is known as *change address*.
Since "legacy" addresses are still in use[^1], and some older applications have yet to upgrade. Script addresses can be used to resolve incompatibility issues that can arise when the sender's application does not recognize the SegWit address provided by the receiver.
58
+
A pay-to-witness-public-key-hash (P2WPKH), also known as native SegWit or Bech32 address, is a modern more efficient address format. SegWit addresses are opt-in so not every application supports them but the majority do, and should, today. SegWit adoption can be tracked on [here](https://en.bitcoin.it/wiki/Bech32_adoption).
59
+
60
+
Benefits of SegWit addresses include more resistance to input errors (as they are case insensitive and use error-correcting codes), and lower transaction fees. The fee saving will depend on the type of transaction but for a common transfer of funds it can be 30-40%.
61
+
62
+
SegWit addresses start with `bc1q` and are case insensitive.
A pay-to-taproot (P2TR), also known as a Taproot or Bech32m address, is the most recent and advanced Bitcoin address format. Taproot introduces more advanced security, privacy, flexibility and scaling to Bitcoin. Like SegWit, Taproot addresses are opt-in and they are not currently widely supported. Taproot adoption can be tracked [here](https://en.bitcoin.it/wiki/Bech32_adoption).
69
+
70
+
Benefits of Taproot include the ability to use Schnorr Signatures offering better security, lower fees, and more flexible [multi-key]({{ '/guide/private-key-management/multi-key/' | relative_url }}) transactions. Multi-key addresses using P2TR look the same as single-key addresses giving users of multi-key increased privacy. Taproot also enables more advanced scripting which enables more complex smart contracts to be built on Bitcoin.
71
+
72
+
Taproot addresses start with `bc1p` and are case insensitive.
When the output of a transaction is used as the input of another transaction, it must be spent entirely. Sometimes the value of the output is higher than what the user wishes to pay. In this case, the bitcoin client generates a new Bitcoin address, and sends the difference back to this address. This is known as *change address*. The change address format used will usually be the default format used by the wallet application.
79
+
80
+
## Address compatibility
81
+
82
+
Since "legacy" addresses are still in use, some older applications have yet to upgrade. Script addresses can be used to resolve incompatibility issues that can arise when the sender's application does not recognize the SegWit address provided by the receiver.
43
83
44
84
To illustrate the problem, suppose the sender is using a legacy wallet and paying to the receiver's SegWit address. In this case, the sender's wallet may incorrectly warn them that the address is invalid or not supported. This can confuse the sender’s end, leading them to think that the receiver provided an incorrect address.
45
85
@@ -67,4 +107,13 @@ The receiver should then have the ability to switch to a Script address that doe
0 commit comments