Skip to content

@smartledger/scriptmin 0.1.2

Choose a tag to compare

@codenlighten codenlighten released this 17 Sep 16:31
· 5 commits to main since this release

Fixes

  • --no-chronicle results are tested under the rules before and after Chronicle. Interpreter tests used to run under current consensus flags only, so a change that broke a script only under the older rules could pass them. The OP_VERIF dead-block bug fixed in 0.1.1 was one. differential() accepts a list of flag sets, and eraFlags({ chronicle }) gives them. (#3)
  • ASM output reads back as the same script, or is refused. --asm -o wrote <tail N bytes> in place of the data after OP_RETURN, and OP_PUSHDATA1:<hex> for pushes of 76 bytes or more, and neither reads back. Output now uses the ASM that @smartledger/bsv reads, with the OP_RETURN data included, and is checked by reading it back. When ASM cannot hold the script exactly, the CLI exits with the reason and suggests hex. Those cases are a non-minimal or truncated push kept verbatim, or data pushes alone. exactAsm() is exported. (#3)
  • Unnamed opcodes (0xba–0xfc) are written in ASM as 0xba, which @smartledger/bsv 9.11.1 and later reads back. With an older version such scripts are refused. (#4)
  • Tested against @smartledger/bsv 9.11.2, which writes empty pushes in text form correctly. OP_RETURN data such as buildDataOut('') now round-trips through ASM. (#5)

Install

npm install @smartledger/scriptmin @smartledger/bsv