Project Overview
This proof-of-concept demonstrates how to integrate common Bitcoin browser wallets with the CKB (Nervos) blockchain, enabling users to receive and send CKB using their BTC addresses. The project currently supports two major Web3 wallets:
๐ UniSat Wallet
๐ OKX Wallet
Technical Architecture
The project consists of two main components:
- Web Interface (
./dapp)
A demo UI that facilitates asset transfers on CKB testnet using browser-based cryptocurrency wallets. - On-Chain Script (
./lock)
A deployed CKB smart contract script currently running on the testnet.
Wallet Integration Guide
UniSat Wallet Implementation
Setup Process
- Install the UniSat Wallet extension
Restore two test accounts using these mnemonic phrases:
cousin minimum crazy knock electric curve inflict acid neck gift castle slushsoup butter loud convince rabbit horn salute clump still amount immune sustain
- Select your preferred BTC address format (Native Segwit, Nested Segwit, Legacy, or Taproot)
Launch Commands
cd dapp && npm install && npm run uiWalletUnisat
OKX Wallet Implementation
Setup Process
- Install the OKX Wallet extension
- Restore the same test accounts using the provided mnemonic phrases
- Choose your address format preference
Launch Commands
cd dapp && npm install && npm run uiWalletOkx
Taproot Address Considerations
Important Note: Current Taproot (P2TR) address support has limitations:
- Addresses displayed on the web interface may differ from those shown in your wallet
- You can still spend CKB from Taproot addresses
- For receiving CKB, use the modified address displayed on the web interface rather than your wallet's Taproot address
Technical Deep Dive: Taproot Implementation Challenges
Our analysis revealed limitations in current wallet APIs regarding Schnorr signature support:
- Public Key Format
The obtained 33-byte public key (028d...53a) exceeds standard Schnorr requirements - Signature Verification
Generated 65-byte signatures suggest secp256k1 algorithm usage rather than pure Schnorr
The current workaround involves native Segwit address generation via:
pubkey = unisat.getPublicKey()
pubkey_hash = RIPEMD160(SHA256(pubkey))
address = bech32_encode(pubkey_hash)Frequently Asked Questions
Which wallets does this PoC currently support?
The demo supports UniSat and OKX wallets, with potential for future expansions to other Bitcoin-compatible wallets.
Why do Taproot addresses display differently?
This occurs because current wallet APIs don't fully support Schnorr signatures required for Taproot, necessitating a native Segwit workaround.
Can I use this on CKB mainnet?
Currently, the smart contract is only deployed on testnet for security and testing purposes.
How secure are the test accounts?
The provided mnemonic phrases are for demonstration only. Never use test credentials with real funds.
What's the project's roadmap?
Future development includes full Taproot support, additional wallet integrations, and mainnet deployment after thorough testing.
Key Terms: CKB integration, Bitcoin wallet compatibility, UniSat implementation, OKX wallet support, Taproot addresses, blockchain interoperability, proof-of-concept development