petertodd/python-bitcoinlib — pull request #31 by blakejakopovic (2014-11-27 01:05:42+00:00)
Title: Implemented getreceivedbyaddress RPC call

Implemented `getreceivedbyaddress` RPC call.

Tested using the code below, as currently the RPC doesn't have a test suite.

```python
from bitcoin.wallet import CBitcoinAddress
import bitcoin.rpc

rpc = bitcoin.rpc.Proxy()
addr = CBitcoinAddress('ADDRESS')

# NOTE: bitcoin address must be in the local wallet, or it will return zero.

# Without minconf (defaults to 1)
amount = rpc.getreceivedbyaddress(addr)
print(amount)

# With minconf
amount = rpc.getreceivedbyaddress(addr, 1000)
print(amount)
```