Channel
List/open/close channels (including force-close).
Channels are Lightning payment channels. Most L2 payments (BTC or RGB) require at least one usable channel.
List channels
rgbldk channel lsLook at these columns:
Ready/Usable(must be true before you can reliably pay)User Channel ID(you will paste this into close/force-close)
Open a channel
You need:
- the peer is connected (
rgbldk peer connect ...) - the counterparty
node_idand P2P address - enough on-chain BTC in the wallet to fund the channel
rgbldk channel open \
--node-id <NODE_ID> \
--addr <P2P_HOST_PORT> \
--amount-sats 60000 \
--push-msat 0 \
--privateCopy the user_channel_id from the output:
{ "user_channel_id": "a2f103359c5bf4987caa028878118345" }Then mine blocks / wait for confirmations until channel ls shows Usable=true.
Close a channel (cooperative)
rgbldk channel close --user-channel-id <USER_CHANNEL_ID> --counterparty-node-id <NODE_ID>Force-close (destructive)
Force-close is destructive and usually requires confirmations before funds become spendable.
rgbldk --yes channel force-close --user-channel-id <USER_CHANNEL_ID> --counterparty-node-id <NODE_ID>