Laser Beam CLI User Guide
Laser Beam is a direct link (or "channel") between two Beam wallets that allows instant payments. Laser Beam is not available on Desktop or Mobile wallets.
To perform an instant transaction, both parties must submit Beam coins to an open Laser Channel. The coins will remain locked while the channel is open, only committing the channel's last state to the blockchain when Laser Channel is closed, thus, completing the payment.
Create a Laser Channel
Thelaser_fee
for both parties is 100 Groth's.
Both the Sender and Receiver must agree on thelocked_amount
to perform an instant payment.
Opening a Laser Channel between two wallets
Using Alice and Bob as an example, let's go over setting up a direct channel between two wallets.
To create a channel, Alice enters the following command:
The output will generate a channel address that Alice can send to Bob, it should be similar to the following:
Using the channel address he received from Alice, Bob will insert the channel address right after laser_address
, entering the following command:
If Bob incorrectly entered the values previous command, then Alice will receive an “Incoming connection with incorrect…” message on her wallet.
How it will look in Alice's wallet
Open Laser Channel
How it will look in Bob's wallet
Open Laser Channel
Sending Beam
Now that Alice and Bob have established a Laser Channel between their wallets, they can send direct payments
Establish Laser Channel connection
Using laser_listen
, Bob will confirm that the channel ID is open by entering the following command:
Send a direct payment
To send her Beam coins to Bob, Alice will enter the following command:
After sending the payment, Alice will receive a message about changing her channel balance.
How it will look in Alice's wallet
Sending Bob Beam coins
Payment Sent and changing channel balance
How it will look in Bob's wallet
Verifying Channel ID
Payment received
View open Laser Channels
To print out a list of all open Laser Channels and channel details, enter the following command:
The ouput should be similar to following:
Closing and deleting a Channel
While both users must be online when first creating a Laser Channel, users have multiple options for closing an open channel.
Continuing with our examples of Bob and Alice, we will go over closing a Laser Beam Channel.
Closing a channel when both parties online
Usinglaser_listen
Bob will check the channel ID's current state. Bob enters the following command:
To close the channel, Alice will enter the following command:
Closing a channel when only one party is online
Bob and Alice have agreed to close the open Laser Beam Channel but Bob's internet connection can be unreliable, and is often offline fordays at a time.
Alice can close the open channel without Bob by entering following command:
laser_close
andlaser_drop
commands only closes the connection between the two Beam wallets.
Laser Beam Channels with "Closed" status are deletable after 24 hours or 1440 blocks.
Channels with "Waiting" or "OpenFailed" status are ready for immediate deletion. To delete the Laser Beam Channel, follow the steps below:
Delete closed Laser Beam Channel
To delete a channel from your wallet database, enter the following command:
Alice deletes the Laser Beam Channel from herwallet.db
file by entering:
Last updated