<ccc.Provider> wrapper.
Supported wallets
MetaMask
EVM-based signing via MetaMask and other EVM-compatible wallets.
JoyID
Passkey-based CKB wallet — no seed phrase required.
UniSat
BTC wallet with CKB support via the UniSat extension.
OKX
OKX wallet supporting BTC, EVM, and CKB signers.
UTXO Global
UTXO-based multi-chain wallet with CKB integration.
Nostr
Sign with a Nostr key pair for decentralized identity.
Steps
Wrap your app in the Provider
Import
ccc from the connector package and wrap your application root with <ccc.Provider>. The Provider injects the connector UI and context that all child components can access.app.tsx
Provider props
| Prop | Type | Description |
|---|---|---|
name | string | App name shown in the wallet picker. |
icon | string | App icon URL shown in the wallet picker. |
defaultClient | ccc.Client | Override the default CKB client (defaults to testnet). |
clientOptions | { name, icon, client }[] | List of network options for the user to switch between. |
preferredNetworks | ccc.NetworkPreference[] | Networks to prefer for each signer type; the connector prompts the wallet to switch if it is on a different network. |
signerFilter | (signerInfo, wallet) => Promise<boolean> | Filter which signers appear in the picker. |
app.tsx
Read wallet state with useCcc()
Call
useCcc() inside any component that is a descendant of <ccc.Provider>. It returns the current connection state and actions.wallet-button.tsx
Return values
| Value | Type | Description |
|---|---|---|
open | () => void | Opens the wallet picker modal. |
close | () => void | Closes the wallet picker modal. |
disconnect | () => void | Disconnects the current wallet. |
wallet | ccc.Wallet | undefined | The currently connected wallet (name and icon). |
signerInfo | ccc.SignerInfo | undefined | The active signer with name and signer instance. |
client | ccc.Client | The active CKB client. |
isOpen | boolean | Whether the wallet picker modal is open. |
setClient | (client: ccc.Client) => void | Switch the active client programmatically. |
Filter signers
UsesignerFilter to restrict which wallets appear in the picker. The function receives a ccc.SignerInfo and the parent ccc.Wallet, and must return a promise that resolves to true to include the signer or false to hide it.
app.tsx
Next steps
Send CKB
Build and broadcast a CKB transfer with the signer you just connected.
Sign Message
Request a signed message from the connected wallet.