![]() 'Failed to start API listener on port %s', port) """A SimpleXMLRPCServer that honours state.shutdown"""ĭef serve_forever( self, poll_interval = None): FIXME not found a better solution.Ĭlass StoppableRPCServer( RPCServerBase): 'jsonrpclib not available, failing back to XML-RPC') 'bitmessagesettings', 'apivariant') = 'json':įrom jsonrpclib. :class:`jsonrpclib.SimpleJSONRPCServer` is created and started here ![]() The instance of `SimpleXMLRPCServer.SimpleXMLRPCServer` or get( 'bitmessagesettings', 'apiinterface'),Ĭonfig. # This thread, of which there is only one, runs the API. # beware: the formatting is adjusted for list-table Cannot send.',ġ6: 'You are already subscribed to that address.',ġ9: 'The length of hash should be 32 bytes (encoded in hex'Ģ5: 'Specified address is not a chan address.'ĭef _new_( mcs, name, bases, namespace): Others aren \'t supported.'ġ3: 'Could not find this address in your keys.dat file.',ġ4: 'Your fromAddress is disabled. Check the address.',ġ2: 'The stream number must be 1. ' the check or you can do it yourself by searching the source'ġ0: 'Address version number too high (or zero)',ġ1: 'The address version number currently must be 2, 3 or 4.' ' this, contact the Bitmessage developers and we can modify' ' mischief if you really want to create more addresses than' Others aren \'t supported.',Ĥ: 'Why would you ask me to generate 0 addresses for you?',ĥ: 'You have (accidentally?) specified too many addresses to' """Metaclass for :class:`APIError` documenting error codes."""Ģ: 'The address version number currently must be 3, 4, or 0'ģ: 'The stream number must be 1 (or 0 which means' 'defusedxml not available, only use API on a secure, closed network.') Try: # TODO: write tests for XML vulnerabilitiesįrom defusedxml. ![]() Helper_startup.loadConfig() # find and load local config fileĬonf.safeGet('bitmessagesettings', 'apiusername'),Ĭonf.safeGet('bitmessagesettings', 'apipassword')įor further examples please reference `.tests.test_api`.įrom SimpleXMLRPCServer import SimpleXMLRPCRequestHandler, SimpleXMLRPCServerįrom helper_sql import SqlBulkExecute, sqlExecute, sqlQuery, sqlStoredProcedure, sql_readyįrom network. To use the API concider such simple example:įrom pybitmessage import bmconfigparser, helper_startup not really the API setting, this sets a path for the executable to be ran current default for backward compatibility, 'json' is recommended ![]() the API listens apiinterface:apiport if apiport is not used, list-table:: All config settings related to API: Special value ``apivariant=legacy`` is to mimic the old pre 0.6.3īehaviour when any results are returned as strings of json. It's selected according to 'apivariant' setting in config file. The PyBitmessage API is provided either as This is not what you run to start the Bitmessage API. # Copyright (c) 2012-2022 The Bitmessage developers # Copyright (c) 2012-2016 Jonathan Warren ErrorCodes Class _new_ Function APIError Class _str_ Function singleAPI Class stopThread Function run Function StoppableRPCServer Class serve_forever Function CommandHandler Class _new_ Function testmode Class _init_ Function _call_ Function command Class _init_ Function _call_ Function wrapper Function BMXMLRPCRequestHandler Class do_POST Function APIAuthenticateClient Function BMRPCDispatcher Class _decode Function _verifyAddress Function _dump_inbox_message Function _dump_sent_message Function HandleDecodeAddress Function HandleListAddresses Function HandleListAddressBookEntries Function HandleAddAddressBookEntry Function HandleDeleteAddressBookEntry Function HandleCreateRandomAddress Function HandleCreateDeterministicAddresses Function HandleGetDeterministicAddress Function HandleCreateChan Function HandleJoinChan Function HandleLeaveChan Function HandleDeleteAddress Function HandleEnableAddress Function HandleGetAllInboxMessages Function HandleGetAllInboxMessageIds Function HandleGetInboxMessageById Function HandleGetAllSentMessages Function HandleGetAllSentMessageIds Function HandleInboxMessagesByReceiver Function HandleGetSentMessageById Function HandleGetSentMessagesByAddress Function HandleGetSentMessagesByAckData Function HandleTrashMessage Function HandleTrashInboxMessage Function HandleTrashSentMessage Function HandleSendMessage Function HandleSendBroadcast Function HandleGetStatus Function HandleAddSubscription Function HandleDeleteSubscription Function ListSubscriptions Function HandleDisseminatePreEncryptedMsg Function HandleTrashSentMessageByAckDAta Function HandleDissimatePubKey Function HandleGetMessageDataByDestinationHash Function HandleClientStatus Function HandleHelloWorld Function HandleAdd Function HandleclearUISignalQueue Function HandleStatusBar Function HandleGetStatusBar Function HandleUndeleteMessage Function HandleDeleteAndVacuum Function HandleShutdown Function _handle_request Function _dispatch Function _listMethods Function _methodHelp Function ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |