Post
Topic
Board Development & Technical Discussion
Re: Extracting currency names from wallets or using RPC
by
ZeWaren
on 22/05/2014, 15:22:35 UTC
Seemingly everyone here has forgotten about the version byte used in addresses!

Create a new address over RPC, decode the base58 into hex, and the first byte will indicate what network you are on. https://en.bitcoin.it/wiki/List_of_address_prefixes If the item isn't on this list, just follow this procedure with your whatevercoin, and you'll get the address byte.
Clever.

I think I missed an important information: I'd like the process to be done automatically in a script.

The ideal think would be that if I add a new coin wallet in my wallet directory, the script would be able to extract the wallet amount and its unit.

For example, if I create a Darkcoin wallet there and mine some coins, I would get from the script something like: "234.56 QRK".