Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:blockstack/blockstore-client int…
Browse files Browse the repository at this point in the history
…o develop
  • Loading branch information
muneeb-ali committed Jan 22, 2016
2 parents 24538b0 + c0b9282 commit c1a257a
Showing 1 changed file with 33 additions and 34 deletions.
67 changes: 33 additions & 34 deletions README.md
Expand Up @@ -11,52 +11,51 @@ 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.

#### Latest version

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 <block height> | get consensus hash at given block
cost <name> | get the cost of a name
getinfo get basic info from the blockstored server
lookup <name> | get name record for a particular name
ping check if the blockstored server is up
preorder <name> <private_key> | preorder a name
register <name> <private_key> <addr> | register/claim a name
transfer <name> <address> <private_key> | transfer a name
update <name> <data> <private_key> | 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
Expand All @@ -69,4 +68,4 @@ client.session(server_host=BLOCKSTORED_SERVER, server_port=BLOCKSTORED_PORT)
resp = client.ping()
pprint(resp)
```
```

0 comments on commit c1a257a

Please sign in to comment.