Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are regtest addresses prefixed with 'R' instead of 'm' which is common in other btc node clients? #680

Closed
aquaflamingo opened this issue Jan 27, 2019 · 3 comments

Comments

@aquaflamingo
Copy link

aquaflamingo commented Jan 27, 2019

I noticed that regtest receiving addresses generated from bcoin have a prefix 'R' many other bitcoin node (bitcore,btcd,bitcoind) which use "m".

Wondering why this is? It kind of makes compatibility with other libraries like bitcoinjs-lib or key generators difficult .

I know the --network=testnet option creates m-prefixed addresses like normal but I don't really want to download the whole testnet chain.

e.g.

bwallet-cli --id='primary' account create --network=regtest
{
  ....
  "receiveAddress": "RXTmXYrK73ANyb8HYSTKJ6mr4SSy9QDXX3",
  "changeAddress": "RG8xSUFVaCuxq7p3JCzCY5KZLiHN8eR1yY",
  ...
  "balance": {
    "tx": 0,
    "coin": 0,
    "unconfirmed": 0,
    "confirmed": 0
  }
}
@aquaflamingo aquaflamingo changed the title Why are regtest addresses prefixed with 'R' as opposed to 'm' like every other btc node client? Why are regtest addresses prefixed with 'R' instead of 'm' which is common in other btc node clients? Jan 27, 2019
@pinheadmz
Copy link
Member

Yes, this is a FAQ for bcoin, see #468, #580, #579 and #676

The change was made back in 6643f0a

Until one of those PRs gets reviewed and merged, I recommend just changing the values yourself in lib/protocol/networks.js or perhaps using simnet which is specifically compatible with btcd.

@pinheadmz pinheadmz added the help wanted User has a question, not critical label Jan 27, 2019
@aquaflamingo
Copy link
Author

@pinheadmz sounds good, I'll give simnet a shot - thanks for considering the compatibility to other nodes, also sweet studio setup in your pic 😄

@pinheadmz
Copy link
Member

:-) That's Studio A at Different Fur in SF wish it was my own room!

@braydonf braydonf removed the help wanted User has a question, not critical label May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants