Todas as lições · CCC (TypeScript SDK) · Começa aqui · Glossário
Building a remote CCC signer by extending SignerCkbPublicKeyPráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 2026-11-19
To expose a remote secp256k1 key as a CCC signer, extend ccc.SignerCkbPublicKey(client, publicKey) and override signOnlyTransaction and signMessageRaw to call the backend. The address and lock come from the public key, and signMessageRaw must sign in the "Nervos Message:" format so signMessage and verifyMessage keep working. SignerCkbPublicKey also reports anyone-can-pay addresses of the key, whose cells a backend that only signs the secp256k1 lock cannot spend, so override getAddressObjs to return only the lock you can sign (ckb-keyway had to do this later).
Porque importa: If signMessageRaw signs in any other format, signatures from the remote signer fail CCC's verifyMessage even though the key is correct.
- Conceitos
- Witnesses and signatures
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-12
- Última mudança
- 2026-10-12
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (1)
- 2026-10-12 · officialcmg/ckb-keyway · mais deste projeto
Mais sobre CCC (TypeScript SDK)
- Re-zero the witness lock before recomputing the sign message with getSignHashInfo
- Reserve co-signer witness space before completeFeeBy in multi-signer CCC transactions
- Adding a wallet missing from CCC's connector via a SignersController subclass
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Building a remote CCC signer by extending SignerCkbPublicKey", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/building-a-remote-ccc-signer-by-extending-signerckbpublickey, CC BY 4.0, last changed 2026-10-12.