CCC provides a unified signing interface that works identically across all supported wallet types — CKB native wallets, EVM wallets (MetaMask, etc.), Bitcoin wallets, JoyID, Nostr, and Dogecoin wallets. You call the same methods regardless of which wallet the user connected.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ckb-devrel/ccc/llms.txt
Use this file to discover all available pages before exploring further.
The Signature type
signer.signMessage returns a Signature object defined in packages/core/src/signer/signer/index.ts:
signType field tells verifiers which cryptographic scheme was used, enabling scheme-specific verification without the caller needing to know the wallet type ahead of time.
SignerSignType enum
| Value | Wallet / scheme |
|---|---|
SignerSignType.CkbSecp256k1 | CKB native secp256k1 wallets |
SignerSignType.EvmPersonal | EVM wallets (MetaMask, OKX EVM, etc.) |
SignerSignType.BtcEcdsa | Bitcoin wallets (UniSat, OKX BTC, etc.) |
SignerSignType.JoyId | JoyID passkey wallet |
SignerSignType.NostrEvent | Nostr clients |
SignerSignType.DogeEcdsa | Dogecoin wallets |
SignerSignType.Unknown | Unknown / unsupported type |
Signing a message
signMessage accepts either a plain string or a BytesLike value, so you can sign raw bytes when needed.
Verifying a signature
Verification is a static method onSigner — you do not need a connected wallet to verify. CCC dispatches to the correct scheme automatically based on signature.signType:
Full example
This example is drawn frompackages/examples/src/sign.ts. It handles the playground’s default SignerCkbPublicKey (which cannot sign messages) by substituting a private-key signer for demonstration:
Instance-level verification
If you have a connected signer, you can also callverifyMessage on the instance. This additionally checks that the signature was produced by the same identity:
Signer.verifyMessage (static) verifies any Signature regardless of wallet type. The instance method signer.verifyMessage additionally enforces that signature.identity matches the current signer’s identity.Signing raw bytes
Pass aUint8Array or hex string to sign arbitrary binary data: