@smartledger/bsv 7.4.0 → 7.5.0
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/CHANGELOG.md +56 -0
- package/README.md +38 -38
- package/bsv-gdaf.min.js +6 -6
- package/bsv-ltp.min.js +6 -6
- package/bsv-smartcontract.min.js +1 -1
- package/bsv.bundle.js +6 -6
- package/bsv.d.ts +18 -5
- package/bsv.min.js +6 -6
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/lib/script/interpreter.js +47 -6
- package/package.json +1 -1
- package/test/ordinals/inscription.js +94 -0
- package/test/ordinals/ordlock.js +10 -20
- package/test/script/genesis_limits.js +44 -8
- package/test/smart_contract/covenants.js +2 -4
- package/test/smart_contract/dsl_debugger.js +2 -4
- package/test/smart_contract/ordinal_transfer.js +2 -4
- package/test/smart_contract/sighash_marketplace.js +2 -4
- package/test/smart_contract/token_generalized.js +2 -4
- package/version.js +1 -1
package/bsv.d.ts
CHANGED
|
@@ -344,20 +344,33 @@ declare module '@smartledger/bsv' {
|
|
|
344
344
|
namespace Interpreter {
|
|
345
345
|
const SCRIPT_ENABLE_SIGHASH_FORKID: any;
|
|
346
346
|
|
|
347
|
-
// Pre-Genesis consensus caps (defaults: 520 / 4 / 201).
|
|
347
|
+
// Pre-Genesis consensus caps (defaults: 520 / 4 / 201 / 10,000).
|
|
348
348
|
// Mutable: see useGenesisLimits() for a one-call opt-in.
|
|
349
349
|
let MAX_SCRIPT_ELEMENT_SIZE: number;
|
|
350
350
|
let MAXIMUM_ELEMENT_SIZE: number;
|
|
351
351
|
let MAX_OPS_PER_SCRIPT: number;
|
|
352
|
+
/** Total serialized script size. Anything larger fails SCRIPT_ERR_SCRIPT_SIZE. */
|
|
353
|
+
let MAX_SCRIPT_SIZE: number;
|
|
354
|
+
|
|
355
|
+
interface Limits {
|
|
356
|
+
maxScriptElementSize: number;
|
|
357
|
+
maximumElementSize: number;
|
|
358
|
+
maxOpsPerScript: number;
|
|
359
|
+
maxScriptSize: number;
|
|
360
|
+
}
|
|
352
361
|
|
|
353
362
|
/**
|
|
354
363
|
* Opt into post-Genesis BSV consensus limits (no caps on stack
|
|
355
|
-
* element size, script-number width,
|
|
356
|
-
* Interpreter-wide static state — call once at app
|
|
357
|
-
* Pass an explicit `max` (e.g. 64 KB) when verifying
|
|
358
|
-
* from untrusted sources.
|
|
364
|
+
* element size, script-number width, opcode count, or total script
|
|
365
|
+
* size). Mutates Interpreter-wide static state — call once at app
|
|
366
|
+
* startup. Pass an explicit `max` (e.g. 64 KB) when verifying
|
|
367
|
+
* scripts from untrusted sources.
|
|
359
368
|
*/
|
|
360
369
|
function useGenesisLimits(max?: number): typeof Interpreter;
|
|
370
|
+
/** Capture the four caps, for restoring with setLimits(). */
|
|
371
|
+
function getLimits(): Limits;
|
|
372
|
+
/** Restore caps captured by getLimits(). */
|
|
373
|
+
function setLimits(limits: Partial<Limits>): typeof Interpreter;
|
|
361
374
|
}
|
|
362
375
|
|
|
363
376
|
function Interpreter(): {
|