@helios-lang/ledger
Advanced tools
Comparing version 0.6.5 to 0.6.6
{ | ||
"name": "@helios-lang/ledger", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"description": "Latest ledger types (eg. for building transactions)", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -172,2 +172,13 @@ import { | ||
/** | ||
* Returns all the non-native scripts (includes the reference scripts) | ||
* @type {(UplcProgramV1 | UplcProgramV2)[]} | ||
*/ | ||
get allNonNativeScripts() { | ||
return /** @type {(UplcProgramV1 | UplcProgramV2)[]} */ ([]) | ||
.concat(this.v1Scripts) | ||
.concat(this.v2Scripts) | ||
.concat(this.v2RefScripts) | ||
} | ||
/** | ||
* Used to calculate the correct min fee | ||
@@ -280,6 +291,7 @@ * @param {number} n - number of dummy signatures to add | ||
/** | ||
* Used to determine of Tx needs collateral | ||
* @returns {boolean} | ||
*/ | ||
isSmart() { | ||
return this.allScripts.length > 0 | ||
return this.allNonNativeScripts.length > 0 | ||
} | ||
@@ -286,0 +298,0 @@ |
516536
15182