Bitcoin addresses can be generated on this site https://www.bitaddress.org, but the test network needs m or n at the beginning of the address, where can those be generated?
-
2Use the testnet version. bitaddress.org/?testnet=true– Nick ODellCommented Jul 11, 2017 at 15:47
-
Pokes @NickODell: Please post answers as answers, not as comments! ;)– Murch ♦Commented Jul 12, 2017 at 5:41
-
@Murch Character limits, though.– Nick ODellCommented Jul 12, 2017 at 15:06
3 Answers
Bitaddress.org itself allows you to create Testnet addresses (hat tip to Nick ODell). The generator for testnet addresses can be found by appending ?testnet=true
to the URL. The site now appears to put the release version in the URL, so the link to generate a testnet address on bitaddress.org is https://www.bitaddress.org/bitaddress.org-v3.3.0-SHA256-dec17c07685e1870960903d8f58090475b25af946fe95a734f88408cef4aa194.html?testnet=true
Note that using an online website may be a convenient approach to generate a testnet address quickly. Do not use online websites to generate mainnet addresses, especially not if you intend to transact significant sums.
Alternatively, you could use a wallet that supports testnet, see e.g. Running Bitcoin Core in testnet mode.
-
it doesn't work (anymore at least).address it prints is mainnet Commented Jul 26, 2021 at 8:00
-
Thanks, @АлексейНеудачин. I updated the URL to the new location of the testnet generator.– Murch ♦Commented Jul 26, 2021 at 13:45
Assume your hexadecimal private key (256 bits in length) is 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff for demonstrative purposes.
Use this table to specify interger version to use the Bitcoin Explorer (bx) command to compute WIF private keys and addresses for numerous altcoins.
Compute associated Testnet compressed WIF key:
% echo 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff | sed 's/$/01/' | bx base58check-encode -v 239
cMahgGtgBvsRn7SZFuFCuKGnV8H8yxYLegVcaRsLL2LjD6WFLuAg
Compute associated Testnet compressed public address from secp256k1 elliptic curve using the same private key:
% echo 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff | bx ec-to-public | bx ec-to-address -v 111
n47QBape2PcisN2mkHR2YnhqoBr56iPhJh
It is worth examining the result of this example:
% echo cMahgGtgBvsRn7SZFuFCuKGnV8H8yxYLegVcaRsLL2LjD6WFLuAg | bx base58check-decode
{
checksum 3112764957
payload 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff01
version 239
}
You can use my step by step tutorial from create a wallet to push or broadcast a transaction in test net: step-by-step-create-and-broadcast-a-bitcoin-transaction-on-testnet