Skip to main content
@ckb-ccc/lumos-patches bridges Lumos and CCC. If you already use Lumos to compose CKB transactions but want your users to sign with JoyID, Nostr, or Portal wallets, apply these patches before using any Lumos APIs.
You do not need this package if you are building a new application. Use @ckb-ccc/connector-react or @ckb-ccc/shell instead for full CCC support.

Who needs it

Install @ckb-ccc/lumos-patches if you have an existing Lumos-based codebase and want to:
  • Sign transactions with JoyID (no @ckb-lumos/joyid required).
  • Sign transactions with Nostr wallets.
  • Sign transactions with Portal wallet.

Installation

Applying the patches

Call generateDefaultScriptInfos() and pass the result to Lumos’ registerCustomLockScriptInfos before you use any Lumos transaction-building functions.
Call registerCustomLockScriptInfos before your first Lumos transaction. Registering after transaction building has started may cause scripts to be missing from the cell deps.

generateDefaultScriptInfos

Returns an array of LockScriptInfo objects that teach Lumos how to collect cells and prepare witnesses for JoyID, Nostr, and PWLock scripts on both mainnet and testnet.
The returned array includes script infos for: Each script info covers both mainnet and testnet code hashes, so the same call works for both networks.

generateScriptInfo

If you need to patch in a custom lock script beyond the defaults, use the lower-level generateScriptInfo function:

Full example