connection.keyway. Wait for connection before calling them.
Activate a channel
A Fiber channel locks CKB on-chain and makes that capacity available for off-chain payments. Amounts use shannons:1 CKB = 100,000,000 shannons.
Confirm the funding transaction
confirmFunding is an optional KeyWayProvider callback for approving the on-chain transaction that opens a Fiber channel:
true to approve signing or false to abort.
Most applications should omit this prop. KeyWay will display its styled funding confirmation modal, showing the channel amount, network fee, and testnet network. It uses the same rounded panel, theme, typography, and backdrop as the email login modal.
Supply confirmFunding only when the application needs to render its own confirmation interface:
confirmFunding only approves channel-opening transactions on CKB. Ordinary Fiber invoice payments use the application’s payment confirmation flow instead.Read channels and balances
local_balance is the spendable capacity on the user’s side. remote_balance is capacity on the peer’s side. Their sum is the channel’s total capacity.
Create an invoice
Pay an invoice
Preflight the exact invoice and fee limit before showing a confirmation:A newly opened public channel may need time to propagate through Fiber gossip before other nodes can route through it.
Disconnect the client
Calldisconnect() from useKeyWay to disconnect the SDK client. In browser mode it also stops the local node. The managed native node stays online. Neither operation closes or settles channels on-chain; use closeChannel() for that.