@helios-lang/uplc
Advanced tools
Comparing version 0.1.32 to 0.1.33
{ | ||
"name": "@helios-lang/uplc", | ||
"version": "0.1.32", | ||
"version": "0.1.33", | ||
"description": "Cardano Untyped Plutus Core utility library", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -45,2 +45,7 @@ import { None } from "@helios-lang/type-utils" | ||
/** | ||
* @type {Option<number[]>} | ||
*/ | ||
#cachedHash | ||
/** | ||
* @param {UplcTerm} expr | ||
@@ -52,2 +57,3 @@ * @param {Option<UplcProgramV1>} alt | ||
this.alt = alt | ||
this.#cachedHash = None | ||
} | ||
@@ -138,3 +144,7 @@ | ||
hash() { | ||
return hashProgram(this) | ||
if (!this.#cachedHash) { | ||
this.#cachedHash = hashProgram(this) | ||
} | ||
return this.#cachedHash | ||
} | ||
@@ -141,0 +151,0 @@ |
@@ -44,2 +44,7 @@ import { None } from "@helios-lang/type-utils" | ||
/** | ||
* @type {Option<number[]>} | ||
*/ | ||
#cachedHash | ||
/** | ||
* @param {UplcTerm} expr | ||
@@ -51,2 +56,3 @@ * @param {Option<UplcProgramV2>} alt | ||
this.alt = alt | ||
this.#cachedHash = None | ||
} | ||
@@ -128,3 +134,7 @@ | ||
hash() { | ||
return hashProgram(this) | ||
if (!this.#cachedHash) { | ||
this.#cachedHash = hashProgram(this) | ||
} | ||
return this.#cachedHash | ||
} | ||
@@ -131,0 +141,0 @@ |
@@ -91,2 +91,3 @@ /** | ||
withAlt(alt: UplcProgramV1): UplcProgramV1; | ||
#private; | ||
} | ||
@@ -93,0 +94,0 @@ export type ByteArrayLike = import("@helios-lang/codec-utils").ByteArrayLike; |
@@ -87,6 +87,3 @@ /** | ||
"cekForceCost-exBudgetMemory": number; | ||
"cekLamCost-exBudgetCPU": number; /** | ||
* @param {ByteArrayLike} bytes | ||
* @returns {UplcProgramV2} | ||
*/ | ||
"cekLamCost-exBudgetCPU": number; | ||
"cekLamCost-exBudgetMemory": number; | ||
@@ -96,6 +93,3 @@ "cekStartupCost-exBudgetCPU": number; | ||
"cekVarCost-exBudgetCPU": number; | ||
"cekVarCost-exBudgetMemory": number; /** | ||
* @param {string} src | ||
* @returns {UplcProgramV2} | ||
*/ | ||
"cekVarCost-exBudgetMemory": number; | ||
"chooseData-cpu-arguments": number; | ||
@@ -144,3 +138,5 @@ "chooseData-memory-arguments": number; | ||
"headList-cpu-arguments": number; | ||
"headList-memory-arguments": number; | ||
"headList-memory-arguments": number; /** | ||
* @returns {string} | ||
*/ | ||
"iData-cpu-arguments": number; | ||
@@ -267,2 +263,3 @@ "iData-memory-arguments": number; | ||
withAlt(alt: UplcProgramV2): UplcProgramV2; | ||
#private; | ||
} | ||
@@ -269,0 +266,0 @@ export type ByteArrayLike = import("@helios-lang/codec-utils").ByteArrayLike; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
433018
12216