Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme to reflect argument convention change #9

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,76 @@ Simple CLI PeerAssets client.
Implemented using `pypeerassets` Python library, this command line program is useful as companion utility during PeerAssets development and testing.
It is built for headless (CLI) usage via intuitive and easy to learn set of commands.
All deck id's are shortened by taking only 20 first characters of full sha256 deck id, this is to allow easier user interaction
and use less screen space. You can always get full deck id by calling `pacli -info` command as shown bellow.
and use less screen space. You can always get full deck id by calling `pacli --info` command as shown bellow.
When querying for deck you can use short deck id, full deck id and deck name.
Using short or full deck id is advised as decks can have a same name.


Examples:

> pacli -h
> pacli --h
show all commands

> pacli -status
> pacli --status
show current network, all subscribed decks and their card balances

> pacli -newaddress
> pacli --newaddress
generate a new address and load it into wallet

> pacli -addressbalance <deck> <address>
> pacli --addressbalance <deck> <address>
show card balance of the address

> pacli deck -search "My little pony"
> pacli deck --search "My little pony"
search for deck called "My little pony"

> pacli deck -list all
> pacli deck --list all
list all decks on the network

> pacli deck -info *deck_id*
> pacli deck --info *deck_id*
show detail deck information,
use this command if you need full deck ID hash and not shortened id.

> pacli deck -subscribe *deck_id*
> pacli deck --subscribe *deck_id*
subscribe to this deck to enable balances and card listing for this deck

> pacli deck -balance *deck_id*
> pacli deck --balance *deck_id*
show balances of all addresses involved with this deck

Complex operations take JSON-like sturucture as argument, mimicking peercoind JSON-RPC interface.
* amount variable is always a list
* receiver variable is always a list

> pacli deck -new '{"name": "My own asset", "number_of_decimals": 1, "issue_mode": "ONCE"}'
> pacli deck --new '{"name": "My own asset", "number_of_decimals": 1, "issue_mode": "ONCE"}'
issue a new asset named "My own asset".

> pacli card -list *deck_id*
> pacli card --list *deck_id*
list all card transfers related to this deck

> pacli deck -checksum *deck_id*
> pacli deck --checksum *deck_id*
verify deck checksum, checksum is difference between issued cards and balances of all the addresses.
If it is not zero, something is wrong with deck balances. This function will return True if all is fine.

> pacli card -burn '{"deck": "d460651e1d9147770ec9d4c254bcc68ff5d203a86b97c09d00955fb3f714cab3", "amounts": [11]}'
> pacli card --burn '{"deck": "d460651e1d9147770ec9d4c254bcc68ff5d203a86b97c09d00955fb3f714cab3", "amounts": [11]}'
burn 11 of card on this deck, this transaction will be denied if you have no cards on this deck.

> pacli card -issue '{"deck": "hopium_v2", "receiver": ["n29g3XjvxqWLKgEkyg4Z1BmgrJLccqiH3x"], "amount": [110]}'
> pacli card --issue '{"deck": "hopium_v2", "receiver": ["n29g3XjvxqWLKgEkyg4Z1BmgrJLccqiH3x"], "amount": [110]}'
issue 110 cards to n29g3XjvxqWLKgEkyg4Z1BmgrJLccqiH3x, this transaction will be declined if you do not own deck issuing address.

> pacli card -transfer '{"deck": "08c1928ce84d9066f120", "receiver": ["n1GqTk2NFvSCX3h78rkEA3DoiJW8QxT3Mm", "mv8J47BV8ahpKq7dNXut3kXPgQQCQea5FR",
> pacli card --transfer '{"deck": "08c1928ce84d9066f120", "receiver": ["n1GqTk2NFvSCX3h78rkEA3DoiJW8QxT3Mm", "mv8J47BV8ahpKq7dNXut3kXPgQQCQea5FR",
"myeFFDLXvpGUh8gBPZdCNEsLQ7ZPZkH7d8"], "amount": [1, 9.98, 200.1]}'

transfer cards of "08c1928ce84d9066f120" deck (queried by short id, it is clementines deck) to three different addresses.
Expand Down