Bitcoin RPC Client
Reason this release was yanked:
dep
Project description
Bitcoin RPC Client
RPC client for Bitcoin Daemons
Install
pip install bitcoin-rpc-client
Usage
Prerequesites:
Run a Bitcoin daemon/node
bitcoind -server -rpcuser=user -rpcpassword=pass
Sync
from bitcoin_rpc_client import RPCClient
with RPCClient('http://127.0.0.1:18443', 'user', 'pass') as rpc:
blocks = rpc.generate(101)
tx = rpc.sendtoaddress(address, 20)
# or
rpc = RPCClient('http://127.0.0.1:18443', 'user', 'pass')
blocks = rpc.generate(101)
tx = rpc.sendtoaddress(address, 20)
rpc.close()
Async
from bitcoin_rpc_client import RPCClientAsync
with RPCClientAsync('http://127.0.0.1:18443', 'user', 'pass') as rpc:
blocks = await rpc.generate(101)
tx = await rpc.sendtoaddress(address, 20)
# or
rpc = RPCClientAsync('http://127.0.0.1:18443', 'user', 'pass')
blocks = await rpc.generate(101)
tx = await rpc.sendtoaddress(address, 20)
await rpc.aclose()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for bitcoin_rpc_client-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97f60d3595be82db1b34ffea6cace5152821cfbc3a688d65fe417590b49756e8 |
|
MD5 | 2e40366689c136f2d578fb78df73e9d4 |
|
BLAKE2b-256 | 0f8464d9c8f3bdd679d8cb534e7b90323ab442eb6f93f09d09a12e30686f4893 |