update and transfer via the rpc backend

This commit is contained in:
Jude Nelson
2016-04-24 22:03:08 -04:00
parent 74a3d9e884
commit a6360bd431

View File

@@ -446,7 +446,7 @@ def blockstack_rpc_register( name, password ):
def blockstack_rpc_update( name, zonefile_json, password ):
"""
Update a name's value hash
Update a name's value hash to point to the new zonefile
"""
test_proxy = make_proxy()
blockstack_client.set_default_proxy( test_proxy )
@@ -459,6 +459,33 @@ def blockstack_rpc_update( name, zonefile_json, password ):
return resp
def blockstack_rpc_transfer( name, new_owner_address, password ):
"""
transfer a name to a new address
"""
test_proxy = make_proxy()
blockstack_client.set_default_proxy( test_proxy )
args = CLIArgs()
args.name = name
args.address = new_owner_address
resp = cli_transfer( args, config_path=test_proxy.config_path, password=password )
return resp
def blockstack_rpc_names():
"""
Get the list of nams owned by the local wallet
"""
test_proxy = make_proxy()
blockstack_client.set_default_proxy( test_proxy )
args = CLIArgs()
resp = cli_names( args, config_path=test_proxy.config_path )
return resp
def blockstack_get_zonefile( zonefile_hash ):
"""
Get a zonefile from the RPC endpoint