mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-07 16:06:26 +00:00
Fix for legacy address generation
Hat tip to @vuf3d who pointed this out in PR #46.
This commit is contained in:
parent
16ffa1b33d
commit
218f3df42f
@ -8,11 +8,13 @@ You're now ready to start working with Bitcoin. To begin with, you'll need to cr
|
|||||||
|
|
||||||
The first thing you need to do is create an address for receiving payments. This is done with the `bitcoin-cli getnewaddress` command. Remember that if you want more information on this command, you should type `bitcoin-cli help getnewaddress`.
|
The first thing you need to do is create an address for receiving payments. This is done with the `bitcoin-cli getnewaddress` command. Remember that if you want more information on this command, you should type `bitcoin-cli help getnewaddress`.
|
||||||
```
|
```
|
||||||
$ bitcoin-cli getnewaddress
|
$ bitcoin-cli getnewaddress "" legacy
|
||||||
n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf
|
n4cqjJE6fqcmeWpftygwPoKMMDva6BpyHf
|
||||||
```
|
```
|
||||||
Note that this address begins with an "n" (or sometimes an "m"). This signifies that this is a testnet address.
|
Note that this address begins with an "n" (or sometimes an "m"). This signifies that this is a testnet address.
|
||||||
|
|
||||||
|
The "legacy" flag is necessary to generate a traditional address, rather than a p2sh-segwit or bech32 address. The legacy address is currently required from the command line to make sure that signing works correctly.
|
||||||
|
|
||||||
> **TESTNET vs MAINNET:** The equivalent mainnet address would start with a 1.
|
> **TESTNET vs MAINNET:** The equivalent mainnet address would start with a 1.
|
||||||
|
|
||||||
Take careful note of the address. You'll need to give it to whomever will be sending you funds.
|
Take careful note of the address. You'll need to give it to whomever will be sending you funds.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user