@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/CHANGELOG.md +137 -0
- package/README.md +248 -205
- package/bsv-covenant.min.js +8 -8
- package/bsv-gdaf.min.js +9 -9
- package/bsv-ltp.min.js +9 -9
- package/bsv-smartcontract.min.js +9 -9
- package/bsv.bundle.js +9 -9
- package/bsv.d.ts +15 -0
- package/bsv.min.js +8 -8
- package/docs/COVENANT_DEVELOPMENT_RESOLVED.md +2 -2
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +25 -25
- 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 +41 -7
- package/lib/smart_contract/covenant_helpers.js +118 -0
- package/lib/smart_contract/index.js +30 -1
- package/lib/smart_contract/locks.js +101 -0
- package/lib/smart_contract/pels.js +62 -0
- package/lib/smart_contract/pushtx.js +138 -0
- package/lib/smart_contract/token.js +95 -0
- package/package.json +1 -1
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(): {
|