1. Install the SDK
2. Enable cross-origin isolation
Fiber runs a multithreaded WASM node in the browser. A Next.js application must send these headers:next.config.ts
window.crossOriginIsolated must be true.
3. Add the provider
RenderKeyWayProvider in a client component above every component that uses KeyWay.
app/providers.tsx
app/layout.tsx
4. Add login and wallet state
app/wallet.tsx
autoConnect defaults to true. After OTP verification, the provider recovers the wallet, starts the Fiber node, connects testnet relays, and then sets connection.
5. Open the application
Select Log in, enter an email address, and submit the six-digit code. The same email recovers the same CKB account.Next: activate Fiber payments
Open a channel and make the account ready to send and receive.