Exemplo n.º 1
0
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======

if rpcpass == "":
    access = ServiceProxy("http://127.0.0.1:5888")
else:
    access = ServiceProxy("http://" + rpcuser + ":" + rpcpass +
                          "@127.0.0.1:4047")
cmd = sys.argv[1].lower()

if cmd == "backupwallet":
    try:
        path = raw_input("Enter destination path/filename: ")
        print access.backupwallet(path)
    except:
        print "\n---An error occurred---\n"

elif cmd == "getaccount":
    try:
        addr = raw_input("Enter a Lyrabar address: ")
        print access.getaccount(addr)
    except:
        print "\n---An error occurred---\n"

elif cmd == "getaccountaddress":
    try:
        acct = raw_input("Enter an account name: ")
        print access.getaccountaddress(acct)
    except:
Exemplo n.º 2
0
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======


if rpcpass == "":
	access = ServiceProxy("http://127.0.0.1:29376")
else:
	access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:29376")
cmd = sys.argv[1].lower()

if cmd == "backupwallet":
	try:
		path = raw_input("Enter destination path/filename: ")
		print access.backupwallet(path)
	except:
		print "\n---An error occurred---\n"

elif cmd == "getaccount":
	try:
		addr = raw_input("Enter a Memetic address: ")
		print access.getaccount(addr)
	except:
		print "\n---An error occurred---\n"

elif cmd == "getaccountaddress":
	try:
		acct = raw_input("Enter an account name: ")
		print access.getaccountaddress(acct)
	except:
Exemplo n.º 3
0
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======


if rpcpass == "":
	access = ServiceProxy("http://127.0.0.1:8332")
else:
	access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8332")
cmd = sys.argv[1].lower()

if cmd == "backupwallet":
	try:
		path = raw_input("Enter destination path/filename: ")
		print(access.backupwallet(path))
	except:
		print("\n---An error occurred---\n")

elif cmd == "getaccount":
	try:
		addr = raw_input("Enter a Bitcoin address: ")
		print(access.getaccount(addr))
	except:
		print("\n---An error occurred---\n")

elif cmd == "getaccountaddress":
	try:
		acct = raw_input("Enter an account name: ")
		print(access.getaccountaddress(acct))
	except: