@helios-lang/contract-utils 0.3.12 → 0.3.13
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 +187 -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,149 @@ 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
|
-
if (
|
|
57
|
+
if (purpose == "mixed") {
|
|
58
|
+
this.addImport("ValidatorHash", "@helios-lang/ledger", true)
|
|
59
|
+
.addImport("makeValidatorHash", "@helios-lang/ledger", false)
|
|
60
|
+
.addImport("MintingPolicyHash", "@helios-lang/ledger", true)
|
|
61
|
+
.addImport(
|
|
62
|
+
"makeMintingPolicyHash",
|
|
63
|
+
"@helios-lang/ledger",
|
|
64
|
+
false
|
|
65
|
+
)
|
|
66
|
+
.addImport("StakingValidatorHash", "@helios-lang/ledger", true)
|
|
67
|
+
.addImport(
|
|
68
|
+
"makeStakingValidatorHash",
|
|
69
|
+
"@helios-lang/ledger",
|
|
70
|
+
false
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
if (!hash.context) {
|
|
74
|
+
this.writeDeclLine(`export const $validatorHash: ValidatorHash`)
|
|
75
|
+
.writeDefLine(
|
|
76
|
+
`export const $validatorHash = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
77
|
+
)
|
|
78
|
+
.writeDeclLine(
|
|
79
|
+
`export const $mintingPolicyHash: MintingPolicyHash`
|
|
80
|
+
)
|
|
81
|
+
.writeDefLine(
|
|
82
|
+
`export const $mintingPolicyHash = /* @__PURE__ */ makeMintingPolicyHash($hashHex)`
|
|
83
|
+
)
|
|
84
|
+
.writeDeclLine(
|
|
85
|
+
`export const $stakingValidatorHash: StakingValidatorHash`
|
|
86
|
+
)
|
|
87
|
+
.writeDefLine(
|
|
88
|
+
`export const $stakingValidatorHash = /* @__PURE__ */ makeStakingValidatorHash($hashHex)`
|
|
89
|
+
)
|
|
90
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
91
|
+
.writeDeclLine(
|
|
92
|
+
`export const $validatorAddress: ShelleyAddress`
|
|
93
|
+
)
|
|
94
|
+
.addImport(
|
|
95
|
+
"makeShelleyAddress",
|
|
96
|
+
"@helios-lang/ledger",
|
|
97
|
+
false
|
|
98
|
+
)
|
|
99
|
+
.writeDefLine(
|
|
100
|
+
`export const $validatorAddress = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $validatorHash)`
|
|
101
|
+
)
|
|
102
|
+
} else {
|
|
103
|
+
this.writeDeclLine(
|
|
104
|
+
`export const $validatorHashWithoutContext: ValidatorHash`
|
|
105
|
+
)
|
|
106
|
+
.writeDefLine(
|
|
107
|
+
`export const $validatorHashWithoutContext = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
108
|
+
)
|
|
109
|
+
.writeDeclLine(
|
|
110
|
+
`export const $mintingPolicyHashWithoutContext: MintingPolicyHash`
|
|
111
|
+
)
|
|
112
|
+
.writeDefLine(
|
|
113
|
+
`export const $mintingPolicyHashWithoutContext = /* @__PURE__ */ makeMintingPolicyHash($hashHex)`
|
|
114
|
+
)
|
|
115
|
+
.writeDeclLine(
|
|
116
|
+
`export const $stakingValidatorHashWithoutContext: StakingValidatorHash`
|
|
117
|
+
)
|
|
118
|
+
.writeDefLine(
|
|
119
|
+
`export const $stakingValidatorHashWithoutContext = /* @__PURE__ */ makeStakingValidatorHash($hashHex)`
|
|
120
|
+
)
|
|
121
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
122
|
+
.writeDeclLine(
|
|
123
|
+
`export const $addressWithoutContext: ShelleyAddress`
|
|
124
|
+
)
|
|
125
|
+
.addImport(
|
|
126
|
+
"makeShelleyAddress",
|
|
127
|
+
"@helios-lang/ledger",
|
|
128
|
+
false
|
|
129
|
+
)
|
|
130
|
+
.writeDefLine(
|
|
131
|
+
`export const $addressWithoutContext = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $validatorHashWithoutContext)`
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
135
|
+
this.addImport("SpendingContext", "@helios-lang/ledger", true)
|
|
136
|
+
|
|
137
|
+
const context =
|
|
138
|
+
/** @type {SpendingContext<unknown, unknown, unknown, unknown>} */ (
|
|
139
|
+
hash.context
|
|
140
|
+
)
|
|
141
|
+
const program = context.program
|
|
142
|
+
const datum = /** @type {Cast<unknown, unknown>} */ (
|
|
143
|
+
context.datum
|
|
144
|
+
)
|
|
145
|
+
const redeemer = /** @type {Cast<unknown, unknown>} */ (
|
|
146
|
+
context.redeemer
|
|
147
|
+
)
|
|
148
|
+
const dTypes = genTypes(datum.schema)
|
|
149
|
+
const rTypes = genTypes(redeemer.schema)
|
|
150
|
+
|
|
151
|
+
this.writeProgram("$program", program, !this.hasMainFunction)
|
|
152
|
+
|
|
153
|
+
this.writeDeclLine(
|
|
154
|
+
`export type $ContextType = SpendingContext<${dTypes[0]}, ${dTypes[1]}, ${rTypes[0]}, ${rTypes[1]}>`
|
|
155
|
+
)
|
|
156
|
+
.writeDeclLine(
|
|
157
|
+
`export const $validatorHash: ValidatorHash<$ContextType>`
|
|
158
|
+
)
|
|
159
|
+
.writeDefLine(
|
|
160
|
+
`const $context = {
|
|
161
|
+
program: $program,
|
|
162
|
+
datum: /* @__PURE__ */ makeCast(${JSON.stringify(datum.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}}),
|
|
163
|
+
redeemer: /* @__PURE__ */ makeCast(${JSON.stringify(redeemer.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}})
|
|
164
|
+
})`
|
|
165
|
+
)
|
|
166
|
+
.writeDefLine(
|
|
167
|
+
`export const $validatorHash = /* @__PURE__ */ makeValidatorHash($hashHex, $context)`
|
|
168
|
+
)
|
|
169
|
+
.writeDeclLine(
|
|
170
|
+
`export const $mintingPolicyHash: MintingPolicyHash<$ContextType>`
|
|
171
|
+
)
|
|
172
|
+
.writeDefLine(
|
|
173
|
+
`export const $mintingPolicyHash = /* @__PURE__ */ makeMintingPolicyHash($hashHex, $context)`
|
|
174
|
+
)
|
|
175
|
+
.writeDeclLine(
|
|
176
|
+
`export const $stakingValidatorHash: StakingValidatorHash<$ContextType>`
|
|
177
|
+
)
|
|
178
|
+
.writeDefLine(
|
|
179
|
+
`export const $stakingValidatorHash = /* @__PURE__ */ makeStakingValidatorHash($hashHex, $context)`
|
|
180
|
+
)
|
|
181
|
+
.writeDeclLine(
|
|
182
|
+
`export const $address: ShelleyAddress<ValidatorHash<$ContextType>>`
|
|
183
|
+
)
|
|
184
|
+
.writeDefLine(
|
|
185
|
+
`export const $address = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $validatorHash)`
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
} else if (hash.kind == "MintingPolicyHash") {
|
|
56
189
|
this.addImport(
|
|
57
190
|
"MintingPolicyHash",
|
|
58
191
|
"@helios-lang/ledger",
|
|
59
192
|
true
|
|
60
|
-
).addImport("makeMintingPolicyHash", "@helios-lang/ledger")
|
|
193
|
+
).addImport("makeMintingPolicyHash", "@helios-lang/ledger", false)
|
|
61
194
|
|
|
62
195
|
if (!hash.context) {
|
|
63
196
|
this.writeDeclLine(
|
|
@@ -72,7 +205,7 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
72
205
|
`export const $hashWithoutContext = /* @__PURE__ */ makeMintingPolicyHash($hashHex)`
|
|
73
206
|
)
|
|
74
207
|
|
|
75
|
-
this.addImport("makeCast", "@helios-lang/contract-utils")
|
|
208
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
76
209
|
this.addImport("MintingContext", "@helios-lang/ledger", true)
|
|
77
210
|
|
|
78
211
|
const context =
|
|
@@ -102,7 +235,11 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
102
235
|
"StakingValidatorHash",
|
|
103
236
|
"@helios-lang/ledger",
|
|
104
237
|
true
|
|
105
|
-
).addImport(
|
|
238
|
+
).addImport(
|
|
239
|
+
"makeStakingValidatorHash",
|
|
240
|
+
"@helios-lang/ledger",
|
|
241
|
+
false
|
|
242
|
+
)
|
|
106
243
|
|
|
107
244
|
if (!hash.context) {
|
|
108
245
|
this.writeDeclLine(
|
|
@@ -117,7 +254,7 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
117
254
|
`export const $hashWithoutContext = /* @__PURE__*/ makeStakingValidatorHash($hashHex)`
|
|
118
255
|
)
|
|
119
256
|
|
|
120
|
-
this.addImport("makeCast", "@helios-lang/contract-utils")
|
|
257
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
121
258
|
this.addImport("StakingContext", "@helios-lang/ledger", true)
|
|
122
259
|
|
|
123
260
|
const context =
|
|
@@ -147,22 +284,44 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
147
284
|
"ValidatorHash",
|
|
148
285
|
"@helios-lang/ledger",
|
|
149
286
|
true
|
|
150
|
-
).addImport("makeValidatorHash", "@helios-lang/ledger")
|
|
287
|
+
).addImport("makeValidatorHash", "@helios-lang/ledger", false)
|
|
151
288
|
|
|
152
289
|
if (!hash.context) {
|
|
153
|
-
this.writeDeclLine(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
290
|
+
this.writeDeclLine(`export const $hash: ValidatorHash`)
|
|
291
|
+
.writeDefLine(
|
|
292
|
+
`export const $hash = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
293
|
+
)
|
|
294
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
295
|
+
.writeDeclLine(`export const $address: ShelleyAddress`)
|
|
296
|
+
.addImport(
|
|
297
|
+
"makeShelleyAddress",
|
|
298
|
+
"@helios-lang/ledger",
|
|
299
|
+
false
|
|
300
|
+
)
|
|
301
|
+
.writeDefLine(
|
|
302
|
+
`export const $address = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $hash)`
|
|
303
|
+
)
|
|
158
304
|
} else {
|
|
159
305
|
this.writeDeclLine(
|
|
160
306
|
`export const $hashWithoutContext: ValidatorHash`
|
|
161
|
-
).writeDefLine(
|
|
162
|
-
`export const $hashWithoutContext = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
163
307
|
)
|
|
308
|
+
.writeDefLine(
|
|
309
|
+
`export const $hashWithoutContext = /* @__PURE__ */ makeValidatorHash($hashHex)`
|
|
310
|
+
)
|
|
311
|
+
.addImport("ShelleyAddress", "@helios-lang/ledger", true)
|
|
312
|
+
.writeDeclLine(
|
|
313
|
+
`export const $addressWithoutContext: ShelleyAddress`
|
|
314
|
+
)
|
|
315
|
+
.addImport(
|
|
316
|
+
"makeShelleyAddress",
|
|
317
|
+
"@helios-lang/ledger",
|
|
318
|
+
false
|
|
319
|
+
)
|
|
320
|
+
.writeDefLine(
|
|
321
|
+
`export const $addressWithoutContext = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $hashWithoutContext)`
|
|
322
|
+
)
|
|
164
323
|
|
|
165
|
-
this.addImport("makeCast", "@helios-lang/contract-utils")
|
|
324
|
+
this.addImport("makeCast", "@helios-lang/contract-utils", false)
|
|
166
325
|
this.addImport("SpendingContext", "@helios-lang/ledger", true)
|
|
167
326
|
|
|
168
327
|
const context =
|
|
@@ -188,11 +347,20 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
188
347
|
`export const $hash: ValidatorHash<$ContextType>`
|
|
189
348
|
)
|
|
190
349
|
.writeDefLine(
|
|
191
|
-
`
|
|
350
|
+
`const $context = {
|
|
192
351
|
program: $program,
|
|
193
352
|
datum: /* @__PURE__ */ makeCast(${JSON.stringify(datum.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}}),
|
|
194
353
|
redeemer: /* @__PURE__ */ makeCast(${JSON.stringify(redeemer.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}})
|
|
195
|
-
}
|
|
354
|
+
}`
|
|
355
|
+
)
|
|
356
|
+
.writeDefLine(
|
|
357
|
+
`export const $hash = /* @__PURE__ */ makeValidatorHash($hashHex, $context)`
|
|
358
|
+
)
|
|
359
|
+
.writeDeclLine(
|
|
360
|
+
`export const $address: ShelleyAddress<ValidatorHash<$ContextType>>`
|
|
361
|
+
)
|
|
362
|
+
.writeDefLine(
|
|
363
|
+
`export const $address = /* @__PURE__ */ makeShelleyAddress(${this.isMainnet}, $hash)`
|
|
196
364
|
)
|
|
197
365
|
}
|
|
198
366
|
}
|
|
@@ -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"}
|