@smartledger/bsv 4.0.1 → 4.2.1

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/bsv.d.ts CHANGED
@@ -327,6 +327,21 @@ declare module '@smartledger/bsv' {
327
327
  function empty(): Script;
328
328
  namespace Interpreter {
329
329
  const SCRIPT_ENABLE_SIGHASH_FORKID: any;
330
+
331
+ // Pre-Genesis consensus caps (defaults: 520 / 4 / 201).
332
+ // Mutable: see useGenesisLimits() for a one-call opt-in.
333
+ let MAX_SCRIPT_ELEMENT_SIZE: number;
334
+ let MAXIMUM_ELEMENT_SIZE: number;
335
+ let MAX_OPS_PER_SCRIPT: number;
336
+
337
+ /**
338
+ * Opt into post-Genesis BSV consensus limits (no caps on stack
339
+ * element size, script-number width, or opcode count). Mutates
340
+ * Interpreter-wide static state — call once at app startup.
341
+ * Pass an explicit `max` (e.g. 64 KB) when verifying scripts
342
+ * from untrusted sources.
343
+ */
344
+ function useGenesisLimits(max?: number): typeof Interpreter;
330
345
  }
331
346
 
332
347
  function Interpreter(): {