Skip to content

πŸ’Ž command line utility for interacting with DPX API πŸ’Ž

License

Notifications You must be signed in to change notification settings

Developix-ir/DPXCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’Ž DPXCLI

command line utility for interacting with DPX API

✨ Examples

πŸ’  Help

Description: shows the help menu
Usage: dpxcli help

$ dpxcli help

πŸ’  Balance

Description: retrieves the balance of the wallet
Usage: dpxcli balance -w|--wallet <wallet>

$ dpxcli balance --wallet ADDRESS

πŸ’  Transfer

Description: transfers specified amount of DPX from departure wallet to destination wallet
Usage: dpxcli transfer -a|--amount <amount> -w|--wallet <wallet> -s|--secret <secret> -d|--destination <destination>

$ dpxcli transfer --amount 10.5 --wallet ADDRESS --secret SECRET --destination ADDRESS

πŸ’  Transactions

Description: retrieves transactions in descending order from specified offset (default is 0)
Usage: dpxcli transactions (-o|--offset <offset>)? (-w|--wallet <departure>)? (-d|--destination <destination>)?

$ dpxcli transactions // show latest 256 transactions
$ dpxcli transactions --offset 128 // show from offset 128
$ dpxcli transactions --wallet ADDRESS // filter transactions that are from this departure
$ dpxcli transactions --destination ADDRESS // filter transactions that are to this destination
$ dpxcli transactions -o 64 -w DEPARTURE -d DESTINATION // filter transactions that are from DEPARTURE to DESTINATION and show from offset 64

πŸ’  Transaction

Description: retrieves information of the given transaction id
Usage: dpxcli transaction -i|--id <transactionId>

$ dpxcli transaction --id transactionId

πŸ’  Revoke

Description: revokes the secret of the wallet and returns the new secret
Usage: dpxcli revoke -w|--wallet <wallet> -s|--secret <secret>

$ dpxcli revoke --wallet ADDRESS --secret SECRET

πŸ’  Verify

Description: verifies a wallet credentials
Usage: dpxcli verify -w|--wallet <wallet> -s|--secret <secret>

$ dpxcli verify --wallet ADDRESS --secret SECRET

βŒ›οΈ Install

🐧 Linux

It's quite easy to compile the C soruce with GCC:

gcc dpxcli.c -lcurl -ljson-c -o dpxcli

or even to make it easier, there is an script for compilation and installation:

sudo ./install-linux.sh

πŸͺŸ Windows

No instructions yet, though you are more than welcome to use Cygwin and compile with -lcurl and -ljson-c and help us complete the documentation.

βš™οΈ Prerequisites

Development library files of libcurl (e.g. libcurl4-openssl-dev or libcurl4-gnutls-dev) are needed for curl/curl.h, also the json-c library (e.g. libjson-c-dev) is needed for json-c/json.h, and that's all.

⚑ DPX API Documentation

You can read the documentation of the DPX API here.

βœ… TODO

  • Commentify the code for better readability
  • Create a MakeFile for build systems
  • Github actions build & test pipeline

🐍 Python DPXCLI

There is a very nice replica of this project that is made using python, with a better readability for the ones that are interested. You can see it in this repository.

πŸ–ŠοΈ Contribution

Your contribution to dpxcli development is very welcome!

You may contribute in the following ways:

  • Report issues and feedback
  • Submit fixes, features via Pull Request
  • Write/polish documentation

πŸ“ƒ License

GNU Affero General Public License v3.0 see https://www.gnu.org/licenses/agpl-3.0.en.html

About

πŸ’Ž command line utility for interacting with DPX API πŸ’Ž

Resources

License

Stars

Watchers

Forks