@helios-lang/contract-utils 0.3.12 → 0.3.14
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 +1 -1
- package/src/artifacts/ArtifactWriter.js +2 -2
- package/src/artifacts/ChildArtifactWriter.js +6 -3
- package/src/artifacts/FunctionArtifact.js +9 -4
- package/src/artifacts/RootArtifact.js +1 -0
- package/src/artifacts/TypeArtifact.js +10 -2
- package/src/artifacts/ValidatorArtifact.js +192 -19
- package/types/artifacts/ArtifactWriter.d.ts +2 -2
- package/types/artifacts/ArtifactWriter.d.ts.map +1 -1
- package/types/artifacts/ChildArtifactWriter.d.ts.map +1 -1
- package/types/artifacts/RootArtifact.d.ts.map +1 -1
- package/types/artifacts/ValidatorArtifact.d.ts +2 -1
- package/types/artifacts/ValidatorArtifact.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -55,10 +55,10 @@ export class ArtifactWriter {
|
|
|
55
55
|
/**
|
|
56
56
|
* @param {string} name
|
|
57
57
|
* @param {string} from
|
|
58
|
-
* @param {boolean}
|
|
58
|
+
* @param {boolean} isType
|
|
59
59
|
* @returns {ArtifactWriter}
|
|
60
60
|
*/
|
|
61
|
-
addImport(name, from, isType
|
|
61
|
+
addImport(name, from, isType) {
|
|
62
62
|
this.imports.push([name, from, isType])
|
|
63
63
|
return this
|
|
64
64
|
}
|
|
@@ -60,7 +60,8 @@ export class ChildArtifactWriter extends ArtifactWriter {
|
|
|
60
60
|
if (includeDef) {
|
|
61
61
|
this.addImport(
|
|
62
62
|
"decodeUplcProgramV1FromCbor",
|
|
63
|
-
"@helios-lang/uplc"
|
|
63
|
+
"@helios-lang/uplc",
|
|
64
|
+
false
|
|
64
65
|
)
|
|
65
66
|
this.writeDefLine(
|
|
66
67
|
`export const ${name} = ${stringifyProgram("decodeUplcProgramV1FromCbor", program)}`
|
|
@@ -73,7 +74,8 @@ export class ChildArtifactWriter extends ArtifactWriter {
|
|
|
73
74
|
if (includeDef) {
|
|
74
75
|
this.addImport(
|
|
75
76
|
"decodeUplcProgramV2FromCbor",
|
|
76
|
-
"@helios-lang/uplc"
|
|
77
|
+
"@helios-lang/uplc",
|
|
78
|
+
false
|
|
77
79
|
)
|
|
78
80
|
this.writeDefLine(
|
|
79
81
|
`export const ${name} = ${stringifyProgram("decodeUplcProgramV2FromCbor", program)}`
|
|
@@ -86,7 +88,8 @@ export class ChildArtifactWriter extends ArtifactWriter {
|
|
|
86
88
|
if (includeDef) {
|
|
87
89
|
this.addImport(
|
|
88
90
|
"decodeUplcProgramV3FromCbor",
|
|
89
|
-
"@helios-lang/uplc"
|
|
91
|
+
"@helios-lang/uplc",
|
|
92
|
+
false
|
|
90
93
|
)
|
|
91
94
|
this.writeDefLine(
|
|
92
95
|
`export const ${name} = ${stringifyProgram("decodeUplcProgramV3FromCbor", program)}`
|
|
@@ -69,7 +69,7 @@ export const $props = ${JSON.stringify(props, undefined, 4)}`)
|
|
|
69
69
|
this.addImport("UplcData", "@helios-lang/uplc", true)
|
|
70
70
|
this.addImport("CekResult", "@helios-lang/uplc", true)
|
|
71
71
|
|
|
72
|
-
this.addImport("evalUserFunc", "@helios-lang/contract-utils")
|
|
72
|
+
this.addImport("evalUserFunc", "@helios-lang/contract-utils", false)
|
|
73
73
|
.writeDeclLine(
|
|
74
74
|
`export function $eval(args${isConst ? "?" : ""}: ${safeArgsType}, logOptions?: UplcLogger | undefined): ${retType}`
|
|
75
75
|
)
|
|
@@ -78,7 +78,11 @@ export const $props = ${JSON.stringify(props, undefined, 4)}`)
|
|
|
78
78
|
return evalUserFunc($program, $props, args, logOptions)
|
|
79
79
|
}`
|
|
80
80
|
)
|
|
81
|
-
.addImport(
|
|
81
|
+
.addImport(
|
|
82
|
+
"evalUserFuncUnsafe",
|
|
83
|
+
"@helios-lang/contract-utils",
|
|
84
|
+
false
|
|
85
|
+
)
|
|
82
86
|
.writeDeclLine(
|
|
83
87
|
`export function $evalUnsafe(args${isConst ? "?" : ""}: ${unsafeArgsType}, logOptions?: UplcLogger | undefined): ${unsafeRetType}`
|
|
84
88
|
)
|
|
@@ -87,7 +91,7 @@ export const $props = ${JSON.stringify(props, undefined, 4)}`)
|
|
|
87
91
|
return evalUserFuncUnsafe($program, $props, args, logOptions)
|
|
88
92
|
}`
|
|
89
93
|
)
|
|
90
|
-
.addImport("profileUserFunc", "@helios-lang/contract-utils")
|
|
94
|
+
.addImport("profileUserFunc", "@helios-lang/contract-utils", false)
|
|
91
95
|
.writeDeclLine(
|
|
92
96
|
`export function $profile(args${isConst ? "?" : ""}: ${unsafeArgsType}, logOptions?: UplcLogger | undefined): CekResult`
|
|
93
97
|
)
|
|
@@ -154,7 +158,8 @@ export const $props = ${JSON.stringify(props, undefined, 4)}`)
|
|
|
154
158
|
// fallback
|
|
155
159
|
this.addImport(
|
|
156
160
|
"convertFromUplcData",
|
|
157
|
-
"@helios-lang/contract-utils"
|
|
161
|
+
"@helios-lang/contract-utils",
|
|
162
|
+
false
|
|
158
163
|
)
|
|
159
164
|
.writeDefLine(`export const $constValue = /* @__PURE__ */ convertFromUplcData(${JSON.stringify(valueTypeSchema)}, $constData, {
|
|
160
165
|
isMainnet: ${this.isMainnet}
|
|
@@ -77,8 +77,16 @@ export const $schema = ${JSON.stringify(schema, undefined, 4)}`
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
writeConverters() {
|
|
80
|
-
this.addImport(
|
|
81
|
-
|
|
80
|
+
this.addImport(
|
|
81
|
+
"convertToUplcData",
|
|
82
|
+
"@helios-lang/contract-utils",
|
|
83
|
+
false
|
|
84
|
+
)
|
|
85
|
+
this.addImport(
|
|
86
|
+
"convertFromUplcData",
|
|
87
|
+
"@helios-lang/contract-utils",
|
|
88
|
+
false
|
|
89
|
+
)
|
|
82
90
|
this.addImport("UplcData", "@helios-lang/uplc", true)
|
|
83
91
|
|
|
84
92
|
this.writeDeclLine(
|
|
@@ -12,14 +12,15 @@ import { ModuleArtifact } from "./ModuleArtifact.js"
|
|
|
12
12
|
* @param {Artifact} parent
|
|
13
13
|
* @param {string} name
|
|
14
14
|
* @param {ScriptHash} hash
|
|
15
|
+
* @param {string} purpose
|
|
15
16
|
* @param {ModuleSymbols} symbols
|
|
16
17
|
*/
|
|
17
|
-
export function writeValidatorArtifact(parent, name, hash, symbols) {
|
|
18
|
+
export function writeValidatorArtifact(parent, name, hash, purpose, symbols) {
|
|
18
19
|
const artifact = new ValdiatorArtifact(parent, name)
|
|
19
20
|
|
|
20
21
|
artifact.writeSymbols(symbols)
|
|
21
22
|
|
|
22
|
-
artifact.writeHash(hash)
|
|
23
|
+
artifact.writeHash(hash, purpose)
|
|
23
24
|
|
|
24
25
|
artifact.save()
|
|
25
26
|
|
|
@@ -47,17 +48,154 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* @param {ScriptHash} hash
|
|
51
|
+
* @param {string} purpose
|
|
50
52
|
*/
|
|
51
|
-
writeHash(hash) {
|
|
53
|
+
writeHash(hash, purpose) {
|
|
52
54
|
this.writeDeclLine(`export const $hashHex: string`)
|
|
53
55
|
this.writeDefLine(`export const $hashHex = "${hash.toHex()}"`)
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
const isMixed =
|
|
58
|
+
purpose == "mixed" ||
|
|
59
|
+
/** @type {any} */ (hash.context)?.redeemer?.schema?.id ==
|
|
60
|
+
"__helios__mixedargs"
|
|
61
|
+
|
|
62
|
+
if (isMixed) {
|
|
63
|
+
this.addImport("ValidatorHash", "@helios-lang/ledger", true)
|
|
64
|
+
.addImport("makeValidatorHash", "@helios-lang/ledger", false)
|
|
65
|
+
.addImport("MintingPolicyHash", "@helios-lang/ledger", true)
|
|
66
|
+
.addImport(
|
|
67
|
+
"makeMintingPolicyHash",
|
|
68
|
+
"@helios-lang/ledger",
|
|
69
|
+
false
|
|
70
|
+
)
|
|
71
|
+
.addImport("StakingValidatorHash", "@helios-lang/ledger", true)
|
|
72
|
+
.addImport(
|
|
73
|
+
"makeStakingValidatorHash",
|
|
74
|
+
"@helios-lang/ledger",
|
|
75
|
+
false
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
if (!hash.context) {
|
|
79
|
+
this.writeDeclLine(`export const $validatorHash: ValidatorHash`)
|
|
80
|
+
.writeDefLine(
|
|
81
|
+
`export const $validatorHash = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
82
|
+
)
|
|
83
|
+
.writeDeclLine(
|
|
84
|
+
`export const $mintingPolicyHash: MintingPolicyHash`
|
|
85
|
+
)
|
|
86
|
+
.writeDefLine(
|
|
87
|
+
`export const $mintingPolicyHash = /* @__PURE__ */ makeMintingPolicyHash($hashHex)`
|
|
88
|
+
)
|
|
89
|
+
.writeDeclLine(
|
|
90
|
+
`export const $stakingValidatorHash: StakingValidatorHash`
|
|
91
|
+
)
|
|
92
|
+
.writeDefLine(
|
|
93
|
+
`export const $stakingValidatorHash = /* @__PURE__ */ makeStakingValidatorHash($hashHex)`
|
|
94
|
+
)
|
|
95
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
96
|
+
.writeDeclLine(
|
|
97
|
+
`export const $validatorAddress: ShelleyAddress`
|
|
98
|
+
)
|
|
99
|
+
.addImport(
|
|
100
|
+
"makeShelleyAddress",
|
|
101
|
+
"@helios-lang/ledger",
|
|
102
|
+
false
|
|
103
|
+
)
|
|
104
|
+
.writeDefLine(
|
|
105
|
+
`export const $validatorAddress = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $validatorHash)`
|
|
106
|
+
)
|
|
107
|
+
} else {
|
|
108
|
+
this.writeDeclLine(
|
|
109
|
+
`export const $validatorHashWithoutContext: ValidatorHash`
|
|
110
|
+
)
|
|
111
|
+
.writeDefLine(
|
|
112
|
+
`export const $validatorHashWithoutContext = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
113
|
+
)
|
|
114
|
+
.writeDeclLine(
|
|
115
|
+
`export const $mintingPolicyHashWithoutContext: MintingPolicyHash`
|
|
116
|
+
)
|
|
117
|
+
.writeDefLine(
|
|
118
|
+
`export const $mintingPolicyHashWithoutContext = /* @__PURE__ */ makeMintingPolicyHash($hashHex)`
|
|
119
|
+
)
|
|
120
|
+
.writeDeclLine(
|
|
121
|
+
`export const $stakingValidatorHashWithoutContext: StakingValidatorHash`
|
|
122
|
+
)
|
|
123
|
+
.writeDefLine(
|
|
124
|
+
`export const $stakingValidatorHashWithoutContext = /* @__PURE__ */ makeStakingValidatorHash($hashHex)`
|
|
125
|
+
)
|
|
126
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
127
|
+
.writeDeclLine(
|
|
128
|
+
`export const $addressWithoutContext: ShelleyAddress`
|
|
129
|
+
)
|
|
130
|
+
.addImport(
|
|
131
|
+
"makeShelleyAddress",
|
|
132
|
+
"@helios-lang/ledger",
|
|
133
|
+
false
|
|
134
|
+
)
|
|
135
|
+
.writeDefLine(
|
|
136
|
+
`export const $addressWithoutContext = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $validatorHashWithoutContext)`
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
140
|
+
this.addImport("SpendingContext", "@helios-lang/ledger", true)
|
|
141
|
+
|
|
142
|
+
const context =
|
|
143
|
+
/** @type {SpendingContext<unknown, unknown, unknown, unknown>} */ (
|
|
144
|
+
hash.context
|
|
145
|
+
)
|
|
146
|
+
const program = context.program
|
|
147
|
+
const datum = /** @type {Cast<unknown, unknown>} */ (
|
|
148
|
+
context.datum
|
|
149
|
+
)
|
|
150
|
+
const redeemer = /** @type {Cast<unknown, unknown>} */ (
|
|
151
|
+
context.redeemer
|
|
152
|
+
)
|
|
153
|
+
const dTypes = genTypes(datum.schema)
|
|
154
|
+
const rTypes = genTypes(redeemer.schema)
|
|
155
|
+
|
|
156
|
+
this.writeProgram("$program", program, !this.hasMainFunction)
|
|
157
|
+
|
|
158
|
+
this.writeDeclLine(
|
|
159
|
+
`export type $ContextType = SpendingContext<${dTypes[0]}, ${dTypes[1]}, ${rTypes[0]}, ${rTypes[1]}>`
|
|
160
|
+
)
|
|
161
|
+
.writeDeclLine(
|
|
162
|
+
`export const $validatorHash: ValidatorHash<$ContextType>`
|
|
163
|
+
)
|
|
164
|
+
.writeDefLine(
|
|
165
|
+
`const $context = {
|
|
166
|
+
program: $program,
|
|
167
|
+
datum: /* @__PURE__ */ makeCast(${JSON.stringify(datum.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}}),
|
|
168
|
+
redeemer: /* @__PURE__ */ makeCast(${JSON.stringify(redeemer.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}})
|
|
169
|
+
}`
|
|
170
|
+
)
|
|
171
|
+
.writeDefLine(
|
|
172
|
+
`export const $validatorHash = /* @__PURE__ */ makeValidatorHash($hashHex, $context)`
|
|
173
|
+
)
|
|
174
|
+
.writeDeclLine(
|
|
175
|
+
`export const $mintingPolicyHash: MintingPolicyHash<$ContextType>`
|
|
176
|
+
)
|
|
177
|
+
.writeDefLine(
|
|
178
|
+
`export const $mintingPolicyHash = /* @__PURE__ */ makeMintingPolicyHash($hashHex, $context)`
|
|
179
|
+
)
|
|
180
|
+
.writeDeclLine(
|
|
181
|
+
`export const $stakingValidatorHash: StakingValidatorHash<$ContextType>`
|
|
182
|
+
)
|
|
183
|
+
.writeDefLine(
|
|
184
|
+
`export const $stakingValidatorHash = /* @__PURE__ */ makeStakingValidatorHash($hashHex, $context)`
|
|
185
|
+
)
|
|
186
|
+
.writeDeclLine(
|
|
187
|
+
`export const $address: ShelleyAddress<ValidatorHash<$ContextType>>`
|
|
188
|
+
)
|
|
189
|
+
.writeDefLine(
|
|
190
|
+
`export const $address = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $validatorHash)`
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
} else if (hash.kind == "MintingPolicyHash") {
|
|
56
194
|
this.addImport(
|
|
57
195
|
"MintingPolicyHash",
|
|
58
196
|
"@helios-lang/ledger",
|
|
59
197
|
true
|
|
60
|
-
).addImport("makeMintingPolicyHash", "@helios-lang/ledger")
|
|
198
|
+
).addImport("makeMintingPolicyHash", "@helios-lang/ledger", false)
|
|
61
199
|
|
|
62
200
|
if (!hash.context) {
|
|
63
201
|
this.writeDeclLine(
|
|
@@ -72,7 +210,7 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
72
210
|
`export const $hashWithoutContext = /* @__PURE__ */ makeMintingPolicyHash($hashHex)`
|
|
73
211
|
)
|
|
74
212
|
|
|
75
|
-
this.addImport("makeCast", "@helios-lang/contract-utils")
|
|
213
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
76
214
|
this.addImport("MintingContext", "@helios-lang/ledger", true)
|
|
77
215
|
|
|
78
216
|
const context =
|
|
@@ -102,7 +240,11 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
102
240
|
"StakingValidatorHash",
|
|
103
241
|
"@helios-lang/ledger",
|
|
104
242
|
true
|
|
105
|
-
).addImport(
|
|
243
|
+
).addImport(
|
|
244
|
+
"makeStakingValidatorHash",
|
|
245
|
+
"@helios-lang/ledger",
|
|
246
|
+
false
|
|
247
|
+
)
|
|
106
248
|
|
|
107
249
|
if (!hash.context) {
|
|
108
250
|
this.writeDeclLine(
|
|
@@ -117,7 +259,7 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
117
259
|
`export const $hashWithoutContext = /* @__PURE__*/ makeStakingValidatorHash($hashHex)`
|
|
118
260
|
)
|
|
119
261
|
|
|
120
|
-
this.addImport("makeCast", "@helios-lang/contract-utils")
|
|
262
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
121
263
|
this.addImport("StakingContext", "@helios-lang/ledger", true)
|
|
122
264
|
|
|
123
265
|
const context =
|
|
@@ -147,22 +289,44 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
147
289
|
"ValidatorHash",
|
|
148
290
|
"@helios-lang/ledger",
|
|
149
291
|
true
|
|
150
|
-
).addImport("makeValidatorHash", "@helios-lang/ledger")
|
|
292
|
+
).addImport("makeValidatorHash", "@helios-lang/ledger", false)
|
|
151
293
|
|
|
152
294
|
if (!hash.context) {
|
|
153
|
-
this.writeDeclLine(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
295
|
+
this.writeDeclLine(`export const $hash: ValidatorHash`)
|
|
296
|
+
.writeDefLine(
|
|
297
|
+
`export const $hash = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
298
|
+
)
|
|
299
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
300
|
+
.writeDeclLine(`export const $address: ShelleyAddress`)
|
|
301
|
+
.addImport(
|
|
302
|
+
"makeShelleyAddress",
|
|
303
|
+
"@helios-lang/ledger",
|
|
304
|
+
false
|
|
305
|
+
)
|
|
306
|
+
.writeDefLine(
|
|
307
|
+
`export const $address = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $hash)`
|
|
308
|
+
)
|
|
158
309
|
} else {
|
|
159
310
|
this.writeDeclLine(
|
|
160
311
|
`export const $hashWithoutContext: ValidatorHash`
|
|
161
|
-
).writeDefLine(
|
|
162
|
-
`export const $hashWithoutContext = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
163
312
|
)
|
|
313
|
+
.writeDefLine(
|
|
314
|
+
`export const $hashWithoutContext = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
315
|
+
)
|
|
316
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
317
|
+
.writeDeclLine(
|
|
318
|
+
`export const $addressWithoutContext: ShelleyAddress`
|
|
319
|
+
)
|
|
320
|
+
.addImport(
|
|
321
|
+
"makeShelleyAddress",
|
|
322
|
+
"@helios-lang/ledger",
|
|
323
|
+
false
|
|
324
|
+
)
|
|
325
|
+
.writeDefLine(
|
|
326
|
+
`export const $addressWithoutContext = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $hashWithoutContext)`
|
|
327
|
+
)
|
|
164
328
|
|
|
165
|
-
this.addImport("makeCast", "@helios-lang/contract-utils")
|
|
329
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
166
330
|
this.addImport("SpendingContext", "@helios-lang/ledger", true)
|
|
167
331
|
|
|
168
332
|
const context =
|
|
@@ -188,11 +352,20 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
188
352
|
`export const $hash: ValidatorHash<$ContextType>`
|
|
189
353
|
)
|
|
190
354
|
.writeDefLine(
|
|
191
|
-
`
|
|
355
|
+
`const $context = {
|
|
192
356
|
program: $program,
|
|
193
357
|
datum: /* @__PURE__ */ makeCast(${JSON.stringify(datum.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}}),
|
|
194
358
|
redeemer: /* @__PURE__ */ makeCast(${JSON.stringify(redeemer.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}})
|
|
195
|
-
}
|
|
359
|
+
}`
|
|
360
|
+
)
|
|
361
|
+
.writeDefLine(
|
|
362
|
+
`export const $hash = /* @__PURE__ */ makeValidatorHash($hashHex, $context)`
|
|
363
|
+
)
|
|
364
|
+
.writeDeclLine(
|
|
365
|
+
`export const $address: ShelleyAddress<ValidatorHash<$ContextType>>`
|
|
366
|
+
)
|
|
367
|
+
.writeDefLine(
|
|
368
|
+
`export const $address = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $hash)`
|
|
196
369
|
)
|
|
197
370
|
}
|
|
198
371
|
}
|
|
@@ -37,10 +37,10 @@ export class ArtifactWriter {
|
|
|
37
37
|
/**
|
|
38
38
|
* @param {string} name
|
|
39
39
|
* @param {string} from
|
|
40
|
-
* @param {boolean}
|
|
40
|
+
* @param {boolean} isType
|
|
41
41
|
* @returns {ArtifactWriter}
|
|
42
42
|
*/
|
|
43
|
-
addImport(name: string, from: string, isType
|
|
43
|
+
addImport(name: string, from: string, isType: boolean): ArtifactWriter;
|
|
44
44
|
/**
|
|
45
45
|
* @param {TypeSchema} schema
|
|
46
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArtifactWriter.d.ts","sourceRoot":"","sources":["../../src/artifacts/ArtifactWriter.js"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;IA+BI;;;OAGG;IACH,gBAHW,UAAU,OACV,MAAM,EAShB;IAzCD;;;OAGG;IACH,aAFU,UAAU,CAElB;IAEF;;;OAGG;IACH,cAFU,MAAM,CAEb;IAEH;;;OAGG;IACH,aAAI;IAEJ;;;OAGG;IACH,YAAG;IAEH;;;OAGG;IACH,gBAAO;IAeP;;;;;OAKG;IACH,gBALW,MAAM,QACN,MAAM,
|
|
1
|
+
{"version":3,"file":"ArtifactWriter.d.ts","sourceRoot":"","sources":["../../src/artifacts/ArtifactWriter.js"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;IA+BI;;;OAGG;IACH,gBAHW,UAAU,OACV,MAAM,EAShB;IAzCD;;;OAGG;IACH,aAFU,UAAU,CAElB;IAEF;;;OAGG;IACH,cAFU,MAAM,CAEb;IAEH;;;OAGG;IACH,aAAI;IAEJ;;;OAGG;IACH,YAAG;IAEH;;;OAGG;IACH,gBAAO;IAeP;;;;;OAKG;IACH,gBALW,MAAM,QACN,MAAM,UACN,OAAO,GACL,cAAc,CAK1B;IAED;;OAEG;IACH,8BAFW,UAAU,QAQpB;IAED;;;OAGG;IACH,oBAHW,MAAM,GACJ,cAAc,CAK1B;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,cAAc,CAK1B;IAED;;;OAGG;IACH,2BAHW,MAAM,GACJ,cAAc,CAM1B;IAED;;OAEG;IACH,aA8DC;CACJ;gCAnK8B,aAAa;gCADb,yBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildArtifactWriter.d.ts","sourceRoot":"","sources":["../../src/artifacts/ChildArtifactWriter.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;IAaI;;;OAGG;IACH,oBAHW,QAAQ,QACR,MAAM,EAOhB;IArBD;;;OAGG;IACH,iBAFU,QAAQ,CAEZ;IAEN;;;OAGG;IACH,eAFU,MAAM,CAEZ;IAaJ;;OAEG;IACH,iBAFU,OAAO,CAIhB;IAED;;;;;OAKG;IACH,mBALW,MAAM,WACN,WAAW,cACX,OAAO,GACL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ChildArtifactWriter.d.ts","sourceRoot":"","sources":["../../src/artifacts/ChildArtifactWriter.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;IAaI;;;OAGG;IACH,oBAHW,QAAQ,QACR,MAAM,EAOhB;IArBD;;;OAGG;IACH,iBAFU,QAAQ,CAEZ;IAEN;;;OAGG;IACH,eAFU,MAAM,CAEZ;IAaJ;;OAEG;IACH,iBAFU,OAAO,CAIhB;IAED;;;;;OAKG;IACH,mBALW,MAAM,WACN,WAAW,cACX,OAAO,GACL,mBAAmB,CA0D/B;CACJ;+BArG8B,qBAAqB;8BAIvB,eAAe;iCADZ,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootArtifact.d.ts","sourceRoot":"","sources":["../../src/artifacts/RootArtifact.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;;;GAGG;AACH,uDAHW,GAAG,WACH,oCAAoC,
|
|
1
|
+
{"version":3,"file":"RootArtifact.d.ts","sourceRoot":"","sources":["../../src/artifacts/RootArtifact.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;;;GAGG;AACH,uDAHW,GAAG,WACH,oCAAoC,QAoC9C;0DA1CyJ,aAAa"}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @param {Artifact} parent
|
|
9
9
|
* @param {string} name
|
|
10
10
|
* @param {ScriptHash} hash
|
|
11
|
+
* @param {string} purpose
|
|
11
12
|
* @param {ModuleSymbols} symbols
|
|
12
13
|
*/
|
|
13
|
-
export function writeValidatorArtifact(parent: Artifact, name: string, hash: ScriptHash, symbols: ModuleSymbols): void;
|
|
14
|
+
export function writeValidatorArtifact(parent: Artifact, name: string, hash: ScriptHash, purpose: string, symbols: ModuleSymbols): void;
|
|
14
15
|
import type { Artifact } from "./Artifact.js";
|
|
15
16
|
import type { ScriptHash } from "@helios-lang/ledger";
|
|
16
17
|
import type { ModuleSymbols } from "./symbols.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatorArtifact.d.ts","sourceRoot":"","sources":["../../src/artifacts/ValidatorArtifact.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH
|
|
1
|
+
{"version":3,"file":"ValidatorArtifact.d.ts","sourceRoot":"","sources":["../../src/artifacts/ValidatorArtifact.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,+CANW,QAAQ,QACR,MAAM,QACN,UAAU,WACV,MAAM,WACN,aAAa,QAYvB;8BArB4B,eAAe;gCAFoC,qBAAqB;mCAGnE,cAAc"}
|