Simple CLI PeerAssets client.
Project description
pacli
This simple PeerAssets client is implemented using the pypeerassets Python library. This command line program is useful as companion utility during PeerAssets development and testing. It is built for console usage via intuitive and easy to learn set of commands. It stores the privkey in OS's native keystore, which is automatically unlocked upon logging into active user session. It handles only one key for now, until HD key support is implemented.
Installation
Gnu/Linux
pacli is meant for desktop environment (Gnome/KDE), if you want to run it headless see this: https://github.com/jaraco/keyring#using-keyring-on-headless-linux-systems
python3 setup.py install --user
To access it from the command line, place the following in $HOME/.bashrc:
export PATH=$PATH:$HOME/.local/bin
source ~/.bashrc
Main config file is located in $HOME/.config/pacli
.
Windows
Python 3.5 or greater is needed. Refer to this guide for step by step introduction.
python -m pip install pacli
Next you can add pacli
to environment to have it accessible as a CLI command.
Main config file is located in C:\Users\USERNAME\AppData\Local/pacli
.
examples:
pacli -- --help
show all commands
pacli config default
revert the settings to default
pacli config set $OPTION
for example:
pacli config set network ppc
set the network to "ppc" (Peercoin).
pacli address show [--privkey, --pubkey, --wif]
show current address, or it's privkey, pubkey or wif
pacli address balance
show balance of the current address
pacli address derive STRING
derive a new address from STRING, useful for P2TH experimentations
pacli deck search $KEY
search for deck by key, can be deck_id, name, issuer, issue_mode or else
pacli deck info $DECK_ID
show full deck details
pacli deck list all
list all decks on the network
pacli deck my
show decks issued by the address I control
pacli deck spawn --name "My own asset" --number_of_decimals 1 issue_mode 4
issue a new asset named "My own asset", it will return a hexlified raw transaction.
pacli deck decode $HEX
decode protobuf message and display it as json, usable when debbuging decks
pacli deck encode --name "My own asset" --number_of_decimals 1 issue_mode 4
encode the deck information into hex to be inserted in OP_RETURN, usable when creating decks using something like cointoolkit
pacli deck spawn --name "My own asset" --number_of_decimals 1 issue_mode 4 --verify
--verify flag presents a link to external tool cointoolkit
which can be used to preview or debug the deck spawn transaction.
pacli deck issue_mode --list
list all supported issue modes and their values
pacli card list deck_id
list all card transfers related to this deck
pacli card balance deck_id
show balances of addresses on this deck
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 deck --issue-mode-combo 1,4,8
calculate issue mode combo, returns integer
pacli card new --deckid $DECKID --receiver [address, address2] --amount [200]
fabricate a new CardTransfer object.
pacli card transfer --deckid 078f41c257642a89ade91e52fd484c141b11eda068435c0e34569a5dfcce7915 --receiver [n12h8P5LrVXozfhEQEqg8SFUmVKtphBetj] --amount [200] --verify
farbricate a new CardTransfer, and link to external tool cointoolkit
to verify the transaction.
pacli card encode --deckid 078f41c257642a89ade91e52fd484c141b11eda068435c0e34569a5dfcce7915 --receiver [n12h8P5LrVXozfhEQEqg8SFUmVKtphBetj] --amount [200]
encode the deck information into hex to be inserted in OP_RETURN, usable when creating decks using something like cointoolkit
pacli card decode $HEX
decode protobuf message and display it as json, usable when debbuging cards
pacli card burn --deckid 078f41c257642a89ade91e52fd484c141b11eda068435c0e34569a5dfcce7915 --receiver [$DECK_ISSUE_ADDRESS] --amount [11] --verify
burn 11 of card on this deck.
pacli card issue --deckid 078f41c257642a89ade91e52fd484c141b11eda068435c0e34569a5dfcce7915 --receiver [n29g3XjvxqWLKgEkyg4Z1BmgrJLccqiH3x] --amount [110] --verify
issue 110 cards to n29g3XjvxqWLKgEkyg4Z1BmgrJLccqiH3x.
pacli card export filename
export the card transactions to .csv file
pacli card parse --deckid 98694bb54fafe315051d2a8f1f5ea4c0050947741ced184a5f33bf4a0081a0bb --cardid e04fb602bd9d9c33d1d1af8bb680108057c2ae37ea987cc15295cc6fc4fd8d97
decode and display a single card.
bash completion (on *nix platforms)
Create file .bash_completion
with content:
for bcfile in ~/.bash_completion.d/* ; do
. $bcfile
done
Create directory: mkdir ~/.bash_completion.d
Export completion file:
pacli -- --completion >> .bash_completion.d/pacli
Activate:
. ~/.bash_completion
Tab away.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pacli-0.4.7.2.tar.gz
.
File metadata
- Download URL: pacli-0.4.7.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525815724479d45cf7b89750ded5297085c21cd52b3682184a77c83069e57bee |
|
MD5 | 1f9f62984e657ec279256e2b606c7b47 |
|
BLAKE2b-256 | e8ccc1a139bf97d159c9589795e9cea6e37ad91c669e69ab63e5c6c60d8b9f2d |