Re: JSON-RPC を使用したサンプルアカウントシステムが必要

人物: RudeDude

このサイトに Python の JSON コードがあることも指摘しておく。 http://www.alloscomp.com/bitcoin/

具体的には、残高を確認して固定アドレスに送るこのコードだ。

#!/usr/bin/python
import jsonrpc
MyBCAddress = 'YOUR BITCOIN ADDRESS HERE'

b = jsonrpc.ServiceProxy("http://localhost:8332/")
bal = float(b.getbalance())

if bal > 0.01:
    print "We have a balance of {0:.2f}BC. Sending...".format(bal)
    b.sendtoaddress(MyBCAddress,bal)
else:
    print "No coins here."