def issue(address,assetName,qty,increment,issueMoreAllowed = False):
"""Issue an asset.
arguments:
address -- the address to which they quantity will be issue
assentName -- the name of the asset
qty -- the quantity to be issued
increment -- the increment for sends
Valid Range [0.00000001 - 1].
"""
response = None
if increment < 0.00000001 or increment > 1:
return False, "increment " + str(increment) + " not in range [0.00000001 - 1]"
options = {"open" : issueMoreAllowed }
# This works
try:
response = rpc_connection.issue(address,assetName,qty,increment)
except (JSONRPCException):
print "Unexpected error:", sys.exc_info()
# This does not work
try:
response = rpc_connection.issue(address,assetName,qty,increment,options)
except (JSONRPCException):
print "Unexpected error:", sys.exc_info()
# This does not work
try:
response = rpc_connection.issue(address,assetName,qty,increment,1.0,options)
except (JSONRPCException):
print "Unexpected error:", sys.exc_info()
return response
The first call works, but I can't issue more, the second and third calls don't work
Unexpected error: (<class 'bitcoinrpc.authproxy.JSONRPCException'>, <JSONRPCException '-8: Asset or stream with this name already exists'>, <traceback object at 0x7f8fbf1b7b90>)
Unexpected error: (<class 'bitcoinrpc.authproxy.JSONRPCException'>, <JSONRPCException '-1: value is type obj, expected real'>, <traceback object at 0x7f8fbf1b7f38>)
Unexpected error: (<class 'bitcoinrpc.authproxy.JSONRPCException'>, <JSONRPCException '-3: Invalid amount'>, <traceback object at 0x7f8fbf1b7638>)
None
http://www.multichain.com/developers/json-rpc-api/ Wasn't much help.
Thansk