18 lines
550 B
Python
18 lines
550 B
Python
#!/usr/bin/python
|
|
|
|
import os
|
|
import xmlrpclib
|
|
|
|
api_user=os.getenv('BITMESSAGE_API_USER', 'bitmessage_api_user') ;
|
|
api_password=os.getenv('BITMESSAGE_API_PASSWORD', 'bitmessage_api_password') ;
|
|
api_port=os.getenv('BITMESSAGE_API_PORT', '8442') ;
|
|
addr_num=os.getenv('BITMESSAGE_SEED_ADDRESSES', '1') ;
|
|
addr_seed=os.getenv('BITMESSAGE_SEED_PHRASE') ;
|
|
|
|
api_link="http://{}:{}@127.0.0.1:{}/".format(api_user, api_password, api_port)
|
|
|
|
api = xmlrpclib.ServerProxy(api_link)
|
|
|
|
print api.createDeterministicAddresses(addr_seed.encode('base64'),int(addr_num))
|
|
|