Last active
December 18, 2015 10:19
-
-
Save reite/5767455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parseAddresses :: Object -> Parser [[String]] | |
| parseAddresses v = v .: "vout" >>= mapM (.: "scriptPubKey") >>= mapM (.: "addresses") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input:
{"vout" : [ { "value" : 4.24329986, "n" : 0, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 1eb03b02fa6c8e291f07b6843effbf77c3b50f91 OP_EQUALVERIFY OP_CHECKSIG", "hex" : "76a9141eb03b02fa6c8e291f07b6843effbf77c3b50f9188ac", "reqSigs" : 1, "type" : "pubkeyhash", "addresses" : [ "13oGPU1dF1pEyYuhhJviMBJM4uPdssszfh" ] } }, { "value" : 23.32108861, "n" : 1, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 f5576c35be76f147ccf864fbb7ca77fd1c34e493 OP_EQUALVERIFY OP_CHECKSIG", "hex" : "76a914f5576c35be76f147ccf864fbb7ca77fd1c34e49388ac", "reqSigs" : 1, "type" : "pubkeyhash", "addresses" : [ "1PNFHEZV9MY3t2dLuhhXJKp7Lcat1XGv2a" ] } } ]}