Edge CLI
This document is written for Edge CLI v1.5.3 and may not be up to date or necessarily complete. The output shown in examples may also change over time. The most accurate and up-to-date documentation is available as helptext within Edge CLI itself. Access helptext by adding --help
to any command, for example edge --help
or edge tx ls --help
All usage examples here refer to the edge
binary for continuity, but some examples actually use testnet data. Do not take information displayed in examples from this page as authoritative - it is for illustrative purposes only.
Global options
Edge CLI includes some global options that affect all commands. These can be provided before or after the sub-command.
Wallet option
The -w, --wallet <file>
option allows you to specify a different path to your wallet than the default. This may be useful if the default path is not usable or you want to use multiple wallets.
The wallet is stored in a single JSON file, so the <file>
should not be a directory.
Verbose option
The -v, --verbose
option toggles greater verbosity in output. For example, CLI by default truncates stake hashes for readability:
With greater verbosity, the full hash is shown:
Debug option
The --debug
option enables detailed output for complete visibility of CLI's behaviour. It also enables greater detail of any errors that may occur. This may be useful if you are having problems with CLI and you (or Edge support) need more information about what is happening.
The debug option effects _very_** noisy, sometimes abstruse output and its use is discouraged when not absolutely necessary.**
The debug option may be useful for understanding if you intend to contribute to the CLI codebase.
Other options
Other global options include disabling output colours with --no-color
and specifying Docker connectivity (for device
commands) with --docker-socket-path
. You can see all available global options by running edge --help
.
Global options are not displayed when viewing the helptext for specific commands, but are available to all commands nevertheless.
Wallet
Wallet commands enable you to manage the XE wallet used by CLI. You can use a single wallet across multiple devices, or different wallets, depending on your needs.
Create a Wallet
This command creates a new XE wallet. This is an interactive command that asks you for a passphrase and private key export preference. Example:
If you choose not to view or export your private key, you can still retrieve it later using the edge wallet info
command. See 'Display Information' below.
You can use this command non-interactively by providing all the options upfront. Example:
Run edge wallet create --help
for more information on options.
Restore a Wallet
This command restores an XE wallet. This is an interactive command that asks you for a private key and passphrase. Example:
Similarly to the create command, this command can be used non-interactively by providing all options upfront. Run edge wallet restore --help
for more information on options.
Display Information
This command displays XE wallet information. By default it will only display the wallet address:
If the -p, --passphrase
or -P, --passphrase-file
option is specified, the private key is also shown:
Display Balance
This command displays your current XE wallet balance.
Forget Wallet
This command forgets (deletes) your XE wallet. If no wallet is found, it has no effect.
Transaction
Transaction commands enable you to send XE to other wallets and display historic transactions to/from your wallet.
For ease of use, the command edge transaction ...
can be abbreviated to edge tx ...
as shown in usage examples.
Send a Transaction
This command sends a specified XE <amount>
to the given <wallet>
address. The amount can be specified in XE or mXE (0.000001 XE) by providing the unit e.g. 100xe
or 100mxe
. If no unit is given, XE is assumed.
You must provide your passphrase to sign the transaction.
An example of sending 10 XE to the testnet supply wallet:
This command can be used non-interactively by providing all options upfront. Run edge tx send --help
for more information on options.
List Transactions
This command lists historic transactions to/from your XE wallet, from most recent to oldest. You can paginate transactions with the -l, --limit
and -p, --page
options. If these are not set, it will fetch your 10 most recent transactions.
An example fetching one (the most recent) transaction:
List Pending Transactions
This command lists any pending transactions that have not yet been processed by the XE blockchain. There are no options for this command.
Stake
Stake commands enable you to manage your stakes on the XE blockchain. A stake is required for each device with which you intend to contribute computing power to the Edge network.
Display Staking Information
This is an informational command that displays current staking amounts, as configured on the XE blockchain.
Create a Stake
This command creates a stake which, once processed by the XE blockchain, allows you to run a device of the specified <type>
.
**The types available are Host host
, Gateway gateway
, and Stargate stargate
. At this time, only Host stakes are available to contributors. Access to create Gateway and Stargate stakes will be updated in future.
Your stake will be created via a blockchain transaction, signed using your private key. You will need to enter the passphrase for your XE wallet to decrypt your private key for this purpose.
An example of creating a Host:
This command can be used non-interactively by providing all options upfront. Run edge stake create --help
for more information on options.
List Stakes
This command displays all stakes associated with your wallet. For example, the stake that was created above:
Unlock a Stake
Unlocking a stake places the associated XE funds in a waiting period (currently 90 days) after which they can be released back to your XE wallet balance.
For ease of use, you can enter a truncated stake ID (minimum 3 characters).
For example, unlocking the stake created above:
This command can be used non-interactively by providing all options upfront. Run edge stake unlock --help
for more information on options.
Release a Stake
This command releases an unlocked stake, returning its funds to your XE wallet balance.
For ease of use, you can enter a truncated stake ID (minimum 3 characters).
To reclaim the full amount, your stake must have exited the unlock wait period (currently 90 days). Alternatively, you may use the -e, --express
option to immediately release the stake for a fee.
For example, express-releasing the stake created above:
This command can be used non-interactively by providing all options upfront. Run edge stake release --help
for more information on options.
Device
Device commands enable you to manage your device's participation in the Edge network.
Before using device commands, ensure the prerequisites are met:
Ensure your device meets the minimum specification (see Network Nodes)
Install Docker (v18.06+ required)
Device commands will not work if Docker is not running on your device.
If you are setting up a device for the first time, see Set up a Host for step-by-step guidance.
Add Device
This command adds your device to the Edge network. This works by associating your device's ID with a stake. You must have created a stake already, and you will need to enter your passphrase to sign the assignment transaction.
An example of adding a new device to the network:
Your device assignment may take a minute or two to be processed by the XE blockchain. Afterwards, the other edge device
commands will be usable.
This command can be used non-interactively by providing all options upfront. Run edge device add --help
for more information on options.
Display Information
This command displays information about your device and the stake to which it is associated. For example:
Start Device
This command starts the network node on your device. This is determined by the type of stake to which the device is assigned.
Display Device Status
This command displays the current operational status of the node on your device: namely, whether it is running or stopped.
Update Device
This command checks for an update to the node, downloading the update automatically if necessary.
If the node is running, it will be stopped and restarted to update to the new version.
Nodes are normally self-updating, so you should not normally need to use this command. However, it may be usefupl if you are troubleshooting or developing the node application.
Restart Device
This command restarts the node without checking for an update. If the node is not already running, this has no effect.
Stop Device
This command stops the node. If the node is not already running, this has no effect.
Note that stopping a node does not remove the device from the network - it merely makes it inoperational until it is started again.
Remove Device
This command removes the device from the Edge network. This consists of unassigning the device from the stake, stopping the node, and destroying the device's identity. (A new identity will be created if the device is added back to the network.)
An example of removing a device from Testnet:
This command can be used non-interactively by providing all options upfront. Run edge device remove --help
for more information on options.
It is possible to improperly remove a device from the network: by destroying Docker data (containing the device's identity), or through hardware failure that renders the device unusable. This does not render the stake irrecoverable. You can assign the stake to another device by running edge device add
there and selecting the same stake again, overwriting the device assignment.
About Edge
Some commands are purely informational and do not affect your device or wallet in any way.
Community Links
This command displays links to Edge communities and publications.
Last updated