MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / subscribe

Function subscribe

src/bitmessagecli.py:391–410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389 return api.getDeterministicAddress(passphrase,vNumber,sNumber)
390
391def subscribe():
392 global usrPrompt
393
394 while True:
395 address = userInput("What address would you like to subscribe to?")
396
397 if (address == "c"):
398 usrPrompt = 1
399 print ' '
400 main()
401 elif (validAddress(address)== False):
402 print '\n Invalid. "c" to cancel. Please try again.\n'
403 else:
404 break
405
406 label = userInput("Enter a label for this address.")
407 label = label.encode('base64')
408
409 api.addSubscription(address,label)
410 print ('\n You are now subscribed to: ' + address + '\n')
411
412def unsubscribe():
413 global usrPrompt

Callers 1

UIFunction · 0.85

Calls 5

userInputFunction · 0.85
validAddressFunction · 0.85
addSubscriptionMethod · 0.80
mainFunction · 0.70
encodeMethod · 0.45

Tested by

no test coverage detected