# Gavin Andresen # 2010-09-30 13:57:17 # https://bitcointalk.org/index.php?topic=1319.msg14699#msg14699 @p{(link}This patch@p{link)} adds the following JSON-RPC commands to bitcoin/bitcoind: @p{par} @p{(li}@p{(bf}monitoraddress @p{lt}bitcoinaddress@s{gt} @p{lt}url@s{gt} [monitor=true]@p{bf)} @p{brk} When coins are sent to @p{lt}bitcoinaddress@s{gt} POST JSON transaction info to @p{lt}url@s{gt}. @p{brk} If @p{lt}bitcoinaddress@s{gt} is 'allwallet' then monitor coins sent to all of your addresses. @p{brk} Pass false as third param to stop monitoring.@p{li)} @p{(li}@p{(bf}monitorblocks @p{lt}url@s{gt} [monitor=true] [startblockcount=0]@p{bf)} @p{brk} POST block information to @p{lt}url@s{gt} as blocks are added to the block chain. @p{brk} [monitor] true will start monitoring, false will stop. @p{brk} Pass [startblockcount] to start monitoring at/after block with given blockcount.@p{li)} @p{(li}@p{(bf}listmonitored@p{bf)} @p{brk} Returns list describing where blocks and transactions are being POSTed.@p{li)} @p{(li}@p{(bf}getblock @p{lt}hash|number@s{gt}@p{bf)} @p{brk} Returns details of the block with @p{lt}hash@s{gt} (hexadecimal) or @p{lt}number@s{gt}.@p{li)} @p{(li}@p{(bf}gettransaction @p{lt}hash@s{gt}@p{bf)} @p{brk} Returns details of transaction with @p{lt}hash@s{gt} (hexadecimal).@p{li)} This patch also modifies the "sendtoaddress" function so it returns the transaction ID on a successful send (instead of the string "sent"). @p{par} @p{(bf}If you use the monitor* functionality@p{bf)} to POST information be sure to think through the security of your application. For example, if you use monitoraddress to get notified of customer payments you should think about whether or not a customer could fake a payment by POSTing bogus information to your web server. @p{par} Full source code is at: @s{(link)} @p{brk} As always, bug reports, suggestions for improvement and feedback is welcome. @p{brk} @p{hrule} @p{(it}Updated monitoraddress/getblock commands as discussed below@p{it)} @p{brk}