Todas as lições · Wallets and signing · Começa aqui · Glossário
JoyID lock witness outputType may carry a subkey proof, so type script data must move elsewherePráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
When the funding wallet uses the JoyID lock, its WitnessArgs outputType may carry a subkey unlock proof, so do not put your own type script data in that witness's outputType. Place the type script action in another witness index and align the related output index with it. Size the fee estimate's signature placeholder for JoyID's larger witness (openswap uses 1000 bytes) instead of the 65 byte secp256k1 size.
Porque importa: A JoyID subkey proof and the type script action would collide in the same outputType field, and a 65 byte placeholder underestimates the fee for the much larger JoyID witness.
Padrão
const stateIndex=wallet.witness?.kind==='joyid'?1n:0n;Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/openswap:
frontend/test/activity.spec.ts,frontend/test/app.spec.ts,frontend/test/book.spec.ts,frontend/test/fixtures.ts,pool-model/test/model.test.ts
- Conceitos
- Witnesses and signatures, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-22
- Última mudança
- 2026-10-22
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-10-22 · toastmanAu/openswap · mais deste projeto
Mais sobre Wallets and signing
- JoyID signer prices fees with a 1,000 byte signature placeholder
- Multisig sighash placeholder lock: script plus M zeroed signatures
- One placeholder witness per input when all inputs share one lock
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "JoyID lock witness outputType may carry a subkey proof, so type script data must move elsewhere", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/joyid-lock-witness-outputtype-may-carry-a-subkey-proof-so-ty, CC BY 4.0, last changed 2026-10-22.