rpc

TestBitcoinEmulator.rpc

Wrapper class for JsonRPC, with default host 127.0.0.1 and port 8332 Contains pre-defined methods with pydoc for interacting with bitcoind compatible JsonRPC services including most coin daemons forked from Bitcoin, e.g. litecoind, dogecoind etc.

If a method is not defined, you can still use it! You just won’t get any IDE hints with the parameters.

Basic usage (by default, connects to http://127.0.0.1:8332):

>>>  j = BitcoinRPC(username='bitcoinrpc', password='somesecurepassword')
>>>  j.getbalance()
Decimal(0.2456337)