@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.
@@ -1979,8 +1979,13 @@ var NeuraiScriptsBundle = (function (exports) {
1979
1979
  function appendExpirationGate(b, expiration) {
1980
1980
  if (!expiration)
1981
1981
  return;
1982
+ // Selectors 1 (HEIGHT) and 2 (MTP) must be pushed as OP_1 / OP_2 so the
1983
+ // resulting script is consensus-minimal (MINIMALDATA). `pushBytes(0x01 N)`
1984
+ // would emit `01 0N`, which the consensus rule rejects for N in 1..16.
1985
+ // Parser side stays lenient (`readPushUint8` accepts both forms) so old
1986
+ // covenants in the raw `01 0N` form keep round-tripping.
1982
1987
  b.pushInt(expiration.value)
1983
- .pushBytes(Uint8Array.of(selectorForMode(expiration.mode)))
1988
+ .pushInt(selectorForMode(expiration.mode))
1984
1989
  .op(OP_CHAINCONTEXT, OP_GREATERTHAN, OP_VERIFY);
1985
1990
  }
1986
1991
  function readOptionalExpirationGate(c, nextOpcodeWithoutGate, label) {