Todas as lições · Developer tooling · Começa aqui · Glossário
Pass wasm bytes to ckb-vm-js createVerifier in NodePráticoVerificada pelo dono
Verificada pelo dono · Verificação: certa · Verificada em 2026-11-19
In Node, calling ckb-vm-js createVerifier() with no arguments fails with "fetch failed" because it cannot fetch its .wasm from a file URL. Read the bytes from the package's ckb-vm-js/wasm export (via import.meta.resolve and readFile) and pass them as createVerifier({ wasm }).
Porque importa: Without the bytes, a Node service that relies on the default ckb-vm-js verifier fails at startup with "fetch failed", and tests that inject their own verifier never catch it.
New Node loading detail for ckb-vm-js wasm.
Padrão
return ckbVmJs({ verifier: await vmjs.createVerifier({ wasm }), rpcUrl });Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- LusoCryptoLabs/ckb-ward:
tests/bind-server.test.ts
- Conceitos
- Testing and devnet
- Evidência
- Verificada pelo dono: verificada pelo dono do projeto de onde veio, que também publica estas lições
- Vista pela primeira vez
- 2026-11-17
- Última mudança
- 2026-11-17
- Ú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-11-17 · LusoCryptoLabs/ckb-ward · mais deste projeto
Mais sobre Developer tooling
- ckb-vm-js 0.2.0 (npm) checks header hash instead of rejecting the field
- Derive devnet Spore and system script cell deps from a fresh OffCKB export
- Saved transaction test vectors go stale when their cell deps are spent
Verificada por @LusoCryptoLabs (dono do projeto), 2026-11-19.
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Pass wasm bytes to ckb-vm-js createVerifier in Node", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/pass-wasm-bytes-to-ckb-vm-js-createverifier-in-node, CC BY 4.0, last changed 2026-11-17.