Start here · Glossary · Test yourself · Feed
ILE-Labs/ckb-msig ✕
Lessons from ILE-Labs/ckb-msig
github.com/ILE-Labs/ckb-msig
Do you maintain this project? Confirm its lessons in one issue
5 lessons found. All lessons
ccc.Transaction.from reads only camelCase keys, so a snake_case JSON-RPC transaction (such as the ones ckb-cli writes, with cell_deps, outputs_data and similar) has to be converted with cccA.JsonRpcTransformers.transactionTo from @ckb-ccc/core/advanced. Passing that JSON directly to Transaction.from does not read those fields.
#Data encoding (molecule, hex, bigints) #Transaction building and fees · Sources (1) · 2026-11-08
A `ckb-cli deploy` info file is JSON with snake_case JSON-RPC transactions `cell_tx` and `dep_group_tx` (either may be null), `used_input_txs` (previous transactions by hash, so inputs resolve offline), signature maps `cell_tx_signatures` and `dep_group_tx_signatures` (lock args to a list of 65-byte signatures), and `deployment.multisig_config` with `sighash_addresses`, `require_first_n`, `threshold` and `lock_code_hash`. Each member address is a full-format sighash address whose args are the member's key hash; the list can be empty when the default config is used, so check for that before building the multisig script.
#Transaction building and fees #Witnesses and signatures · Sources (1) · 2026-11-08
`ckb-cli deploy sign-txs` prints two maps, `cell_tx_signatures` and `dep_group_tx_signatures`, for the deploy info file's `cell_tx` and `dep_group_tx`. Each map goes from lock args (20 bytes, or 28 for multisig args with a since) to one 65 byte signature. It prints YAML-style text by default and a JSON object with `--output-format json`, and the YAML writer prints an empty map inline as `cell_tx_signatures: {}`, so a parser collecting multisig signatures must accept both shapes and the inline empty header.
#Witnesses and signatures #Data encoding (molecule, hex, bigints) · Sources (1) · 2026-11-08
When computing the signing message for a secp256k1_blake160_multisig_all input, set the first witness's WitnessArgs.lock to the multisig script bytes followed by threshold × 65 zero bytes (a single key sighash lock uses just 65 zero bytes), and keep the inputType and outputType fields, before calling CCC's tx.getSignHashInfo(script, client). The same placeholder length must be used here as in the signed witness, otherwise the message differs from what the lock script hashes on chain.
#Witnesses and signatures #Transaction building and fees · Sources (2) · 2026-11-08
The system multisig lock (secp256k1_blake160_multisig_all) expects the witness to carry exactly M signatures (threshold), uses each member key at most once, and requires all of the first R keys (require_first_n) to be among them. A tool collecting partial signatures should dedupe per member key and check the first R are present before finalizing, since any M valid distinct signers that include the first R form a complete set.
#Witnesses and signatures · Sources (1) · 2026-11-08
Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. JSON · Want a lesson changed or removed? Open an issue.