hsw-cli (with examples)

hsw-cli (with examples)

1: Unlock the current wallet (timeout in seconds)

hsw-cli unlock passphrase timeout

This command is used to unlock the current wallet by providing the passphrase (password) and the timeout duration in seconds. After the timeout period, the wallet will automatically lock again.

Example:

hsw-cli unlock mypassphrase 60

In this example, the wallet is unlocked using the passphrase “mypassphrase” for a timeout period of 60 seconds.

2: Lock the current wallet

hsw-cli lock

This command is used to lock the current wallet, preventing any further transactions or actions until it is unlocked again.

Example:

hsw-cli lock

After executing this command, the wallet will be locked and require authentication before performing any actions.

3: View the current wallet’s details

hsw-cli get

This command is used to view the details of the current wallet, including the wallet address, balance, and other relevant information.

Example:

hsw-cli get

Executing this command will display the details of the current wallet, such as the wallet address, balance, and other relevant information.

4: View the current wallet’s balance

hsw-cli balance

This command is used to view the current balance of the wallet, i.e., the amount of Handshake coins (HNS) available in the wallet.

Example:

hsw-cli balance

Running this command will display the current balance of the wallet, which will be shown in the output.

5: View the current wallet’s transaction history

hsw-cli history

This command is used to view the transaction history of the current wallet, showing a list of all past transactions.

Example:

hsw-cli history

Executing this command will display the transaction history of the current wallet, including details such as the transaction ID, the sender/receiver addresses, and the amount of HNS transferred.

6: Send a transaction with the specified coin amount to an address

hsw-cli send address amount

This command is used to send a transaction with the specified coin amount to the given address. The “address” argument represents the recipient’s wallet address, and the “amount” argument represents the amount of HNS to be transferred.

Example:

hsw-cli send abcdefg12345 1.05

In this example, a transaction is sent with 1.05 HNS to the wallet address “abcdefg12345”.

7: View the current wallet’s pending transactions

hsw-cli pending

This command is used to view the pending transactions of the current wallet, showing any transactions that have been sent but are still awaiting confirmation.

Example:

hsw-cli pending

Running this command will display any pending transactions of the current wallet, including details such as the transaction ID, the sender/receiver addresses, and the amount of HNS involved.

8: View details about a transaction

hsw-cli tx transaction_hash

This command is used to view detailed information about a specific transaction based on its transaction hash. The “transaction_hash” argument represents the unique identifier of the transaction.

Example:

hsw-cli tx 1234567890abcdef

In this example, details about the transaction with the hash “1234567890abcdef” will be displayed, including information such as the sender/receiver addresses, the amount of HNS transferred, and the transaction status.

By using the examples provided for each use case, users can effectively interact with their Handshake wallet through the hsw-cli command-line tool. The commands allow users to perform essential wallet operations such as unlocking the wallet, viewing the wallet details, checking the balance, sending transactions, and more.

Related Posts

How to use the command 'hexo' (with examples)

How to use the command 'hexo' (with examples)

Hexo is a fast, simple, and powerful blog framework that allows users to generate static websites with ease.

Read More
How to convert an XML document to PYX format (with examples)

How to convert an XML document to PYX format (with examples)

This article will guide you on how to use the xml pyx command to convert an XML document to PYX (ESIS - ISO 8879) format.

Read More
Managing BetterDiscord with betterdiscordctl (with examples)

Managing BetterDiscord with betterdiscordctl (with examples)

BetterDiscord is a popular customization tool for the Discord chat platform, allowing users to enhance their experience with custom themes and plugins.

Read More