From c0b92827666279407a7b5d2341cc7b869584ceaf Mon Sep 17 00:00:00 2001 From: Muneeb Ali Date: Thu, 21 Jan 2016 22:38:13 -0500 Subject: [PATCH] Added instruction for new cli interface --- README.md | 67 +++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 0211278c0..2c41697ba 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,7 @@ registries on the blockchain. The easiest way to get the stable version of blockstore-client is: -> pip install blockstore - -Note: This will change to "pip install blockstore-client" once -[#20](https://github.com/blockstack/blockstore-client/issues/20) is resolved. +> pip install blockstore-client This will give you both the cli and the client library. @@ -22,41 +19,43 @@ This will give you both the cli and the client library. The client is under heavy development and you might want to install the latest version: -> pip install git+https://github.com/blockstack/blockstore-client.git +> pip install git+https://github.com/blockstack/blockstore-client.git@develop ## Usage -For the cli: +For the cli, typing: -> blockstore-cli +> blockstore will give you a complete list of supported commands along with -usage instructions, these include: - -* delete_immutable -* delete_mutable -* get_immutable -* get_mutable -* get_name_cost -* get_name_import_cost -* get_namespace_cost -* getindex -* getinfo -* lookup -* name_import -* namespace_begin -* namespace_define -* namespace_preorder -* ping -* preorder -* put_immutable -* put_mutable -* register -* renew -* transfer -* update - -For the client library here is some example code to get you started: +usage instructions. +``` + server display server:port | update using --server --port + advanced check advanced mode | turn --mode=off or --mode=on + consensus | get consensus hash at given block + cost | get the cost of a name + getinfo get basic info from the blockstored server + lookup | get name record for a particular name + ping check if the blockstored server is up + preorder | preorder a name + register | register/claim a name + transfer
| transfer a name + update | update a name record +``` + +You can try out commands like: +``` +$ blockstore ping +$ blockstore lookup fredwilson.id +$ blockstore consensus +$ blockstore cost newname.id +$ blockstore server --server=localhost +$ blockstore advanced --mode=on +``` + +# Client Library + +You can also import the blockstore client and write your own programs. Here is some example code to get you started: ``` from blockstore_client import client @@ -69,4 +68,4 @@ client.session(server_host=BLOCKSTORED_SERVER, server_port=BLOCKSTORED_PORT) resp = client.ping() pprint(resp) -``` \ No newline at end of file +```