pybitmessage.bitmessagecli module

Created by Adam Melton (.dok) referenceing https://bitmessage.org/wiki/API_Reference for API documentation Distributed under the MIT/X11 software license. See http://www.opensource.org/licenses/mit-license.php.

This is an example of a daemon client for PyBitmessage 0.6.2, by .dok (Version 0.3.1) , modified

TODO: fix the following (currently ignored) violations:

userInput(message)[source]

Checks input for exit or quit. Also formats for input, etc

restartBmNotify()[source]

Prompt the user to restart Bitmessage

lookupAppdataFolder()[source]

gets the appropriate folders for the .dat files depending on the OS. Taken from bitmessagemain.py

configInit()[source]

Initialised the configuration

apiInit(apiEnabled)[source]

Initialise the API

apiData()[source]

TBC

apiTest()[source]

Tests the API connection to bitmessage. Returns true if it is connected.

bmSettings()[source]

Allows the viewing and modification of keys.dat settings.

validAddress(address)[source]

Predicate to test address validity

getAddress(passphrase, vNumber, sNumber)[source]

Get a deterministic address

subscribe()[source]

Subscribe to an address

unsubscribe()[source]

Unsusbcribe from an address

listSubscriptions()[source]

List subscriptions

createChan()[source]

Create a channel

joinChan()[source]

Join a channel

leaveChan()[source]

Leave a channel

listAdd()[source]

List all of the addresses and their info

genAdd(lbl, deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe)[source]

Generate address

saveFile(fileName, fileData)[source]

Allows attachments and messages/broadcats to be saved

attachment()[source]

Allows users to attach a file to their message or broadcast

sendMsg(toAddress, fromAddress, subject, message)[source]

With no arguments sent, sendMsg fills in the blanks. subject and message must be encoded before they are passed.

sendBrd(fromAddress, subject, message)[source]

Send a broadcast

inbox(unreadOnly=False)[source]

Lists the messages by: Message Number, To Address Label, From Address Label, Subject, Received Time)

outbox()[source]

TBC

readSentMsg(msgNum)[source]

Opens a sent message for reading

readMsg(msgNum)[source]

Open a message for reading

replyMsg(msgNum, forwardORreply)[source]

Allows you to reply to the message you are currently on. Saves typing in the addresses and subject.

delMsg(msgNum)[source]

Deletes a specified message from the inbox

delSentMsg(msgNum)[source]

Deletes a specified message from the outbox

getLabelForAddress(address)[source]

Get label for an address

buildKnownAddresses()[source]

Build known addresses

listAddressBookEntries()[source]

List addressbook entries

addAddressToAddressBook(address, label)[source]

Add an address to an addressbook

deleteAddressFromAddressBook(address)[source]

Delete an address from an addressbook

getAPIErrorCode(response)[source]

Get API error code

markMessageRead(messageID)[source]

Mark a message as read

markMessageUnread(messageID)[source]

Mark a mesasge as unread

markAllMessagesRead()[source]

Mark all messages as read

markAllMessagesUnread()[source]

Mark all messages as unread

clientStatus()[source]

Print (the client status

shutdown()[source]

Shutdown the API

UI(usrInput)[source]

Main user menu

main()[source]

Entrypoint for the CLI app