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

Function genAdd

src/bitmessagecli.py:538–561  ·  view source on GitHub ↗
(lbl,deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe)

Source from the content-addressed store, hash-verified

536 print ' --------------------------------------------------------------------------\n'
537
538def genAdd(lbl,deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe): #Generate address
539 global usrPrompt
540 if deterministic == False: #Generates a new address with the user defined label. non-deterministic
541 addressLabel = lbl.encode('base64')
542 try:
543 generatedAddress = api.createRandomAddress(addressLabel)
544 except:
545 print '\n Connection Error\n'
546 usrPrompt = 0
547 main()
548
549 return generatedAddress
550
551 elif deterministic == True: #Generates a new deterministic address with the user inputs.
552 passphrase = passphrase.encode('base64')
553 try:
554 generatedAddress = api.createDeterministicAddresses(passphrase, numOfAdd, addVNum, streamNum, ripe)
555 except:
556 print '\n Connection Error\n'
557 usrPrompt = 0
558 main()
559 return generatedAddress
560 else:
561 return 'Entry Error'
562
563def delMilAddr(): #Generate address
564 global usrPrompt

Callers 1

UIFunction · 0.85

Calls 2

mainFunction · 0.70
encodeMethod · 0.45

Tested by

no test coverage detected