return'API Error: the specified passphrase is blank.'
return'API Error 0001: the specified passphrase is blank.'
ifaddressVersionNumber==0:#0 means "just use the proper addressVersionNumber"
addressVersionNumber==2
ifaddressVersionNumber!=2:
return'API Error: the address version number currently must be 2 (or 0 which means auto-select). Others aren\'t supported.'
return'API Error 0002: the address version number currently must be 2 (or 0 which means auto-select). Others aren\'t supported.'
ifstreamNumber==0:#0 means "just use the most available stream"
streamNumber=1
ifstreamNumber!=1:
return'API Error: the stream number must be 1 (or 0 which means auto-select). Others aren\'t supported.'
return'API Error 0003: the stream number must be 1 (or 0 which means auto-select). Others aren\'t supported.'
ifnumberOfAddresses==0:
return'API Error: Why would you ask me to generate 0 addresses for you?'
return'API Error 0004: Why would you ask me to generate 0 addresses for you?'
ifnumberOfAddresses>9999:
return'API Error: You have (accidentially?) specified too many addresses to make. Maximum 9999. This check only exists to prevent mischief; if you really want to create more addresses than this, contact the Bitmessage developers and we can modify the check or you can do it yourself by searching the source code for this message.'
return'API Error 0005: You have (accidentially?) specified too many addresses to make. Maximum 9999. This check only exists to prevent mischief; if you really want to create more addresses than this, contact the Bitmessage developers and we can modify the check or you can do it yourself by searching the source code for this message.'
apiAddressGeneratorReturnQueue.queue.clear()
print'about to send numberOfAddresses',numberOfAddresses
@ -3412,6 +3412,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
data+=']}'
returndata
elifmethod=='trashMessage':
iflen(params)==0:
return'API Error 0000: I need parameters!'
msgid=params[0].decode('hex')
t=(msgid,)
sqlLock.acquire()
@ -3422,53 +3424,55 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
apiSignalQueue.put(('updateStatusBar','Per API: Trashed message (assuming message existed). UI not updated.'))
return'Trashed message (assuming message existed). UI not updated. To double check, run getAllInboxMessages to see that the message disappeared, or restart Bitmessage and look in the normal Bitmessage GUI.'