2

I'm working on a bitcoin project, and understand the differences between the wallet address which start with 1, 3, or bc1. I am looking to generate a wallet address that starts with 1.

I have seen the answers posted here, this is more or less the same info I have read elsewhere. However, when I create a legacy address via this method, it starts with an 'm'. When I create a wallet address that is not legacy, it starts with a 2.

  1. Am I missing, or not understanding something? Why are my addresses starting with an 'm' or 2, instead of 1, 3, or 'bc1'?
  2. How do I create a wallet address with a '1' prefix it Bitcoin Core

Thanks in advance!

3
  • 1
    You're probably using a test network. The equivalent of P2PKH addresses (1... on mainnet) is m... there. The equivalent of P2SH addresses (3... on mainnet) is 2... there. The equivalent of P2WSH and P2WPKH addresses (bc1q... on mainnet) is tb1q... there May 13 at 15:44
  • Ahhhh, I AM using the test network! Let me see if this resolves the issue. If so, I.ll mark you as the answer.
    – Jeff
    May 13 at 15:46
  • Confirming this worked, thanks @Pieter Wuille! If you submit this as an answer, I'll mark it as such.
    – Jeff
    May 13 at 15:54
4

Different networks use different address prefixes.

In Bitcoin mainnet:

  • P2PKH addresses: 1...
  • P2SH addresses 3...
  • P2WSH and P2WPKH addresses: bc1q...
  • P2TR addresses: bc1p... (see BIP 341)

In Bitcoin testnet and signet (see BIP 325):

  • P2PKH addresses: m... or n...
  • P2SH addresses: 2...
  • P2WSH and P2WPKH addresses: tb1q...
  • P2TR addresses: tb1p...

Bitcoin Core's regtest network:

  • P2PKH addresses: m... or n...
  • P2SH addresses: 2...
  • P2WSH and P2WPKH addresses: bcrt1q...
  • P2TR addresses: bcrt1p...

See also https://en.bitcoin.it/wiki/List_of_address_prefixes

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.