0

can i customize my address start through getnewaddress?

for example instead the address start with 1asdjIOAWJRA

i write getnewaddress 1xxxx then it continues as it wish

also what's the difference between addresses starting with 1 and addresses starting with 3?

can i choose from bitcoin-cli to get my address starting with 1 or it must be random and can be started by 3 while i dont wish that?

the reason of the need to customized addresses to make sure that it really creates this offline addresses instantly and is not in a hidden database installed while installing the bitcoin-cli

1

That is called a vanity address, and Bitcoin Core does not support generating vanity addresses. In order to do that, you would have to find a vanity address generator (separate piece of software). But then, you have to audit the code to make sure it is not doing anything funny with your private key. Bitcoin Core is open source, so you can audit the code that generates the keys if you want.

The address prefix denotes the type of script the address encodes. A bitcoin address that starts with a 1 is a Pay-to-Pubkey-Hash address, and a 3 is a Pay-to-Script-Hash. See Address Prefixes

You can change the type of address the cli generates by passing an optional argument to getnewaddress see RPC Docs - getnewaddress:

bitcoin-cli getnewaddress "label" "address_type"

address_type options are "legacy", "p2sh-segwit", and "bech32"

  • if my address starts with 1 is it preferred to send transactions to addresses starts with 1 also ? as both are different in some way may face any issues in the future sending 1 to 3 or from 3 to 1? that make coins get lost – BTC involver Aug 26 at 17:20
  • can you also check that for vanity for btccore? bitcointalk.org/index.php?topic=1387.0 – BTC involver Aug 26 at 17:21
  • It doesn't matter which address you send to and from as long as the wallet software knows how to spend it. Bitcoin Core wallet can spend from any address it generates. I don't understand your second comment. – JBaczuk Aug 26 at 17:35
  • the second comment is a guy who created customized address through 'getnewaddress' the link from his bitcointalk.org post – BTC involver Aug 26 at 17:37
  • sorry I can't comment on that, i don't see the attachment, but the thread looks pretty old – JBaczuk Aug 26 at 17:52
1

can i customize my address start through getnewaddress?

No, getnewaddress will return a new address each time, and the address string will be random. To create an address that begins with a specific string of characters, you will need to use some software to iterate through many random addresses, before an address with your desired string is found. This type of address is called a ‘vanity address’. If you search for that term you will find more info.

also what's the difference between addresses starting with 1 and addresses starting with 3?

An address starting with a 1 is a ‘pay to public key hash’ (P2PKH) address, whereas an address starting with a 3 is a ‘pay to script hash’ (P2SH) address. If you search for those two terms, you’ll find lots of additional info on this site about the differences between the two.

the reason of the need to customized addresses to make sure that it really creates this offline addresses instantly and is not in a hidden database installed while installing the bitcoin-cli

If you build bitcoin-core from source, then you can audit the code yourself ensure that no pre-derived/hardcoded addresses are being presented to you. Alternatively, you can trust the open-source process that involves countless developers that have audited the code to ensure no backdoors like this exist.

But if you really must verify the legitimacy of the presented addresses in this way, you’ll need to write a program to generate new addresses repeatedly, and then check the returned address to see if it matches your desired string. You may be able to find a ‘vanitygen’ style of software that can do this more efficiently, which is desirable for finding longer specific strings. Each additional specific character you desire will make the search 58x more difficult (since the address format is in base 58).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.