hi,
i've been trying to create a new asset with custom fields using this code.
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import simplejson as json
rpc_user = 'rpc_user'
rpc_password = 'password'
rpc_connection = AuthServiceProxy("http://%s:%s@172.168.40.345:9876"%(rpc_user, rpc_password))
issue = rpc_connection.listpermissions("issue")
assetaddress = issue[0]['address']
assetname = 'wabbit'
assetquantity = 10000
assetunit = 1
assetnativeamt = 10
assetcustomfield = [{"type":"bugs","weight":250}]
asset = rpc_connection.issue(assetaddress, assetname, assetquantity, assetunit, assetcustomfield)
and this
asset = rpc_connection.issue(assetaddress, assetname, assetquantity, assetunit, json.dumps(assetcustomfield))
and get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 116, in __call__
raise JSONRPCException(response['error'])
bitcoinrpc.authproxy.JSONRPCException
i know i've overlooking something really obvious.
any ideas?