Post
Topic
Board Altcoin Discussion
Re: [Nxt] API of Nxt
by
hiksush2
on 14/01/2014, 18:35:29 UTC
Is there a way to get a list of all the accounts?

Thanks!

Yes, this can be done via blockchain scanning. Smiley

Let me know if u need a special API call for that.

I'd definitely like an API call that would return all accounts.  For blockchain scanning, what is the process to get all accounts?  A quick look at blocks.nxt (12MB) shows only ~300 unique generatorPublicKey's, and transactions.nxt (also 12MB) has about ~3500 unique accounts.  The blockchain explorer says "Accounts: 13919" and lists lots of new accounts being added though.

Get a unique list of the recipients of all transactions of all blocks.

That's what I figured, but a quick check shows only ~7000 unique recipients in transactions.nxt vs. 14,000 accounts in the blockchain explorer:

Code:
$ java -jar jdeserialize-1.2.jar nxt/transactions.nxt | grep -E "recipient: [0-9-]+" | awk '{ print $2 }' | sort | uniq | wc -l
7105