graymauser / btcposbal2csv

List all bitcoin addresses with positive balance.
BSD 3-Clause "New" or "Revised" License
268 stars 201 forks source link

Litecoin support #4

Closed ghost closed 5 years ago

ghost commented 6 years ago

what are the Vs for litecoin so i can edit ? im trying to make it work as arg --network litecoin

if out['out_type'] == 0:
                if out['out_type'] not in types:
                    continue
                add = hash_160_to_btc_address(out['data'], 0)
                yield add, out['amount'], value['height']
            elif out['out_type'] == 1:
                if out['out_type'] not in types:
                    continue
                add = hash_160_to_btc_address(out['data'], 5)
                yield add, out['amount'], value['height']
            elif out['out_type'] in (2, 3, 4, 5):
                if out['out_type'] not in types:
continue
graymauser commented 6 years ago

Hello, I'm not sure that it would be so easy. It depends on implementation details of Litecoin and if it uses some kind of database of UTXO stored on disk. I'm not familiar with Litecoin enough to give you any details. And also I'm currently not planning on expanding this script to other coins.

If Litecoin internals uses same db and internal organization, then it would not be that hard. I recomend that you compare internal workings of btc and ltc first. Espetialy transaction types, codes, and how they are stored - If they are similar, then it should be straightforward to adjust the code.

Salmen2 commented 6 years ago

Yup, working fine for other cryptocurrencies; i guess it would not work for Ethereum or its fork. Please keep in mind to have a good CPU and enough free RAM to handle big blockchains.