How to Run and Use the Cli-Wallet¶
The Cli-Wallet is used to interact with the blockchain. Everything that adds new data to the blockchain requires a signature from a private key. These signed transactions can be produced by the cli-wallet.
Download and Install the Witness Node¶
We first need to download, (compile) and install the cli-wallet. All that is needed is described here:
To reduce compilation time, you can tell the compile infrastructure to only compile the witness node by running.
$ make cli-wallet
Executing the cli-wallet¶
All it takes for the cli-wallet to run is a trusted public API server to interface with the blockchain. These public API servers are run by businesses and individuals. In this example, we use the public API node of OpenLedger and connect via secured websocket connection:
./programs/cli_wallet/cli_wallet -s wss://bitshares.openledger.info/ws
This will open the cli-wallet and unless you already have a local
wallet, will ask you to provide a passphrase for your local wallet.
Once a wallet has been created (default wallet file is
it will prompt with
The wallet can be unlocked by providing the passphrase:
The passphrase is given in clear text and is echoed by the wallet!
locked >>> unlock "supersecretpassphrase" null unlocked >>>
You can get more detailed information either by pressing Tab, twice,
or by issuing
Detailed explanations for most calls are available via
unlocked >> gethelp <command>
Many calls have a obligatory
broadcast-flag as last
argument. If this flag is
False, the wallet will construct
and sign, but not broadcast the transaction. This can be
very useful for a cold storage setup or to verify
Opening RPC port¶
The cli-wallet can open a RPC port so that you can interface your application with it. You have the choices of
- websocket RPC via the
- HTTP RPC via the
./programs/cli_wallet/cli_wallet -s wss://bitshares.openledger.info/ws -H 127.0.0.1:8092 -r 127.0.0.1:8093