@neuraiproject/neurai-scripts 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1978,8 +1978,13 @@ function assertExpiration(expiration) {
1978
1978
  function appendExpirationGate(b, expiration) {
1979
1979
  if (!expiration)
1980
1980
  return;
1981
+ // Selectors 1 (HEIGHT) and 2 (MTP) must be pushed as OP_1 / OP_2 so the
1982
+ // resulting script is consensus-minimal (MINIMALDATA). `pushBytes(0x01 N)`
1983
+ // would emit `01 0N`, which the consensus rule rejects for N in 1..16.
1984
+ // Parser side stays lenient (`readPushUint8` accepts both forms) so old
1985
+ // covenants in the raw `01 0N` form keep round-tripping.
1981
1986
  b.pushInt(expiration.value)
1982
- .pushBytes(Uint8Array.of(selectorForMode(expiration.mode)))
1987
+ .pushInt(selectorForMode(expiration.mode))
1983
1988
  .op(OP_CHAINCONTEXT, OP_GREATERTHAN, OP_VERIFY);
1984
1989
  }
1985
1990
  function readOptionalExpirationGate(c, nextOpcodeWithoutGate, label) {