I have a number of wallets. Is it possible to detect the type of (alternative) coin it contains?
Here's one way I found.
pywallet (https://github.com/jackjack-jj/pywallet) and run
python pywallet.py --dumpwallet --wallet=/foo/bar/wallet.dat
Look in the output for a field called
names. This will contain a list of addresses in the coin's own format, and by looking at the first character you can try to identify the coin by its version byte. See here for a list of some common ones. For example,
1 is Bitcoin,
L is Litecoin, etc.
Note that you will see a number of other fields named
addr, etc. These will appear to be in Bitcoin address format (starting with
1), no matter what the actual coin is. The reason is that for these keys, the
wallet.dat file only contains the private key, and
pywallet has to do the conversion to the public key and address. In particular,
pywallet has to fill in the version byte, and it always picks the Bitcoin version byte unless told otherwise on the command line. So you always get a Bitcoin-style address in these fields, so for purposes of identifying the coin, you should ignore them.
look at the 'name' field mentioned by nate, here is a list of what addresses of several alt coins look like:
example address version coin 17DxjJ9Uf3nqMPAtcBMcs2wUdoUBnJit1V 00 bitcoin 9ZKdQaQXZqXEXV6i7zMK3fezrPszj9zErr 15 catcoin XguoZYoNcm1RWKmUU4fqiZdGU93skcxKkn 4c darkcoin DBN4GZ67xTh7tPMVLmMBQo75WwCV7ppTgD 1e dogecoin LRSuzWTJji2tcBs3nKLv941Er1qTq9jMnW 30 litecoin 4KvncAXnLVVqtrHaoY2Ak37mfqXjPDzfCP 08 novacoin PEp8tGYKhyH2LDqexFg9XvukFYe4ty6DMu 37 ppcoin AMzqNo16zCSzAMNtAq1x1vCa7QPt8metCh 17 primecoin mmjv2METU5E68VeWKkKzgx9oVo4thkSw5x 6f btccoin testnet mmjv2METU5E68VeWKkKzgx9oVo4thkSw5x 6f litecoin testnet
version is the version byte prepended to the hash before base58 encoding it.