@helios-lang/contract-utils 0.3.8 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helios-lang/contract-utils",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Convenience and type-safety utilities for using Helios validators from within Typescript",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
@@ -51,7 +51,7 @@ export class ChildArtifactWriter extends ArtifactWriter {
51
51
  this.writeDeclLine(
52
52
  `export const ${name}: UplcProgramV1`
53
53
  ).writeDefLine(
54
- `export const ${name} = /* @__PURE__ */ ${stringifyProgram("decodeUplcProgramV1FromCbor", program)}`
54
+ `export const ${name} = ${stringifyProgram("decodeUplcProgramV1FromCbor", program)}`
55
55
  )
56
56
  } else if (program.plutusVersion == "PlutusScriptV2") {
57
57
  this.addImport("UplcProgramV2", "@helios-lang/uplc", true)
@@ -60,7 +60,7 @@ export class ChildArtifactWriter extends ArtifactWriter {
60
60
  this.writeDeclLine(
61
61
  `export const ${name}: UplcProgramV2`
62
62
  ).writeDefLine(
63
- `export const ${name} = /* @__PURE__ */ ${stringifyProgram("decodeUplcProgramV2FromCbor", program)}`
63
+ `export const ${name} = ${stringifyProgram("decodeUplcProgramV2FromCbor", program)}`
64
64
  )
65
65
  } else if (program.plutusVersion == "PlutusScriptV3") {
66
66
  this.addImport("UplcProgramV3", "@helios-lang/uplc", true)
@@ -69,7 +69,7 @@ export class ChildArtifactWriter extends ArtifactWriter {
69
69
  this.writeDeclLine(
70
70
  `export const ${name}: UplcProgramV3`
71
71
  ).writeDefLine(
72
- `export const ${name} = /* @__PURE__ */ ${stringifyProgram("decodeUplcProgramV3FromCbor", program)}`
72
+ `export const ${name} = ${stringifyProgram("decodeUplcProgramV3FromCbor", program)}`
73
73
  )
74
74
  } else {
75
75
  throw new Error("unhandled Plutus version")
@@ -88,7 +88,7 @@ export class ChildArtifactWriter extends ArtifactWriter {
88
88
  function stringifyProgram(decoderName, program) {
89
89
  const sourceMap = makeUplcSourceMap({ term: program.root })
90
90
 
91
- return `${decoderName}(
91
+ return `/* @__PURE__ */ ${decoderName}(
92
92
  "${bytesToHex(program.toCbor())}",
93
93
  {${stringifyAlt("decodeUplcProgramV2FromCbor", program.alt)}
94
94
  sourceMap: ${JSON.stringify(sourceMap.toJsonSafe(), undefined, 4).split("\n").join("\n ")}
@@ -109,7 +109,7 @@ function stringifyAlt(decoderName, alt) {
109
109
  const sourceMap = makeUplcSourceMap({ term: alt.root })
110
110
 
111
111
  return `
112
- alt: ${decoderName}(
112
+ alt: /* @__PURE__ */ ${decoderName}(
113
113
  "${bytesToHex(alt.toCbor())}",
114
114
  {
115
115
  sourceMap: ${JSON.stringify(sourceMap.toJsonSafe(), undefined, 4).split("\n").join("\n ")}