Script, Blockchain, API, Internet Access
Recently a horrible hack event happens with Binance the exchange. Over 7000 BTC was hacked and transferred away. As a bitcoin enthusiast, you're super interested to find out where those money went.
Given a BTC address
source. Can you write a program to find out a list of addresses, that historically, there's BTC coming out of
source and going into these addresses. Sort them by the total amount of BTC, and only output top 10, and their corresponding outgoing number of BTC value in satoshi.
Given a BTC address, find all the outgoing transactions from that address. Count the number of BTCs going into those output address, and sort them by the total number of BTCs. Output top 10 with the BTC amount in satoshi, as a JSON array.
Note that, you don't have to worry about any of the following:
When running your program, we'll feed in one BTC address per line, and the program should output the top 10 as a JSON array, in a single line.
Note, we provide the input through stdin and not args. You'll need to loop through stdin for multiple inputs.
$ ./your-prog 3NK9pxgHedLTsrgq1Wkwvx61h9hPt8VrNP [["3Ercgcpbyyrxy7TAVzhoPbeFAGN9tJ8Q4x", 998156], ["3JCVow7NNhAfMFEGLSaEKEUqJPA2AMV2Gf", 12000]] 157Bb1npdTvuzth7e4z6mBqzPANKd7QZHB 
Let us know if this example doesn't work anymore, since a lot is happening in the BTC world!
Submit to see your result!
Nobody here yet, solve it now to get on the board!