@helios-lang/contract-utils 0.2.31 → 0.2.32

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.2.31",
3
+ "version": "0.2.32",
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",
@@ -1,15 +1,18 @@
1
1
  import { expectSome, isLeft } from "@helios-lang/type-utils"
2
2
  import { ConstrData, UplcDataValue, UplcProgramV2 } from "@helios-lang/uplc"
3
+ import { Cast } from "./Cast.js"
3
4
 
4
5
  /**
5
6
  * @typedef {import("@helios-lang/type-utils").TypeSchema} TypeSchema
6
7
  * @typedef {import("@helios-lang/uplc").UplcData} UplcData
7
8
  * @typedef {import("@helios-lang/uplc").UplcProgram} UplcProgram
8
9
  * @typedef {import("@helios-lang/uplc").UplcValue} UplcValue
10
+ * @typedef {import("./Cast.js").CastConfig} CastConfig
9
11
  */
10
12
 
11
13
  /**
12
14
  * @typedef {{
15
+ * name: string
13
16
  * requiresScriptContext: boolean
14
17
  * requiresCurrentScript: boolean
15
18
  * arguments: {
@@ -19,11 +22,18 @@ import { ConstrData, UplcDataValue, UplcProgramV2 } from "@helios-lang/uplc"
19
22
  * }[]
20
23
  * returns: TypeSchema
21
24
  * validatorIndices?: Record<string, number>
25
+ * castConfig: CastConfig
22
26
  * }} UserFuncProps
23
27
  */
24
28
 
25
29
  /**
26
- * @template T
30
+ * @template ArgsT
31
+ * @typedef {{[K in keyof ArgsT]: K extends "$currentScript" ? string : UplcData}} UnsafeArgsT
32
+ */
33
+
34
+ /**
35
+ * @template {{[argName: string]: any}} ArgsT
36
+ * @template RetT
27
37
  */
28
38
  export class UserFunc {
29
39
  /**
@@ -50,78 +60,104 @@ export class UserFunc {
50
60
  }
51
61
 
52
62
  /**
53
- * @type {T}
63
+ * @param {ArgsT} namedArgs
64
+ * @returns {RetT}
54
65
  */
55
- get evalUnsafe() {
56
- return /** @type {any} */ (
57
- (namedArgs) => {
58
- /**
59
- * @type {UplcData[]}
60
- */
61
- const args = this.props.arguments.map(
62
- ({ name, type, isOptional }) => {
63
- if (isOptional) {
64
- if (name in namedArgs) {
65
- return new ConstrData(0, [namedArgs[name]])
66
- } else {
67
- return new ConstrData(1, [])
68
- }
69
- } else {
70
- const rawArg = expectSome(namedArgs[name])
71
-
72
- // TODO: apply type conversion
73
- return rawArg
74
- }
75
- }
66
+ eval(namedArgs) {
67
+ /**
68
+ * @type {{[argName: string]: any}}
69
+ */
70
+ const unsafeNamedArgs = {}
71
+
72
+ Object.entries(namedArgs).forEach(([argName, argValue]) => {
73
+ const argDetails = this.props.arguments.find(
74
+ (a) => a.name == argName
75
+ )
76
+
77
+ if (argDetails) {
78
+ const typeSchema = argDetails.type
79
+
80
+ unsafeNamedArgs[argName] = new Cast(
81
+ typeSchema,
82
+ this.props.castConfig
83
+ ).toUplcData(argValue)
84
+ } else {
85
+ console.error(
86
+ `invalid arg '${argName}' for user function ${this.props.name}`
76
87
  )
88
+ }
89
+ })
77
90
 
78
- if (this.props.requiresScriptContext) {
79
- args.push(expectSome(namedArgs["$scriptContext"]))
80
- }
91
+ const result = this.evalUnsafe(
92
+ /** @type {UnsafeArgsT<ArgsT>} */ (unsafeNamedArgs)
93
+ )
94
+
95
+ return new Cast(this.props.returns, this.props.castConfig).fromUplcData(
96
+ result
97
+ )
98
+ }
81
99
 
82
- if (this.props.requiresCurrentScript) {
83
- const currentScriptName = expectSome(
84
- namedArgs["$currentScript"]
85
- )
86
-
87
- const index = expectSome(
88
- expectSome(this.props.validatorIndices)[
89
- currentScriptName
90
- ]
91
- )
92
- args.push(new ConstrData(index, []))
100
+ /**
101
+ * @param {UnsafeArgsT<ArgsT>} namedArgs
102
+ * @returns {UplcData}
103
+ */
104
+ evalUnsafe(namedArgs) {
105
+ /**
106
+ * @type {UplcData[]}
107
+ */
108
+ const args = this.props.arguments.map(({ name, type, isOptional }) => {
109
+ if (isOptional) {
110
+ if (name in namedArgs && namedArgs[name]) {
111
+ return new ConstrData(0, [namedArgs[name]])
112
+ } else {
113
+ return new ConstrData(1, [])
93
114
  }
115
+ } else {
116
+ const rawArg = expectSome(namedArgs[name])
117
+
118
+ // TODO: apply type conversion
119
+ return rawArg
120
+ }
121
+ })
94
122
 
95
- const argValues = args.map((a) => new UplcDataValue(a))
123
+ if (this.props.requiresScriptContext) {
124
+ args.push(expectSome(namedArgs["$scriptContext"]))
125
+ }
96
126
 
97
- const result = this.uplc.eval(argValues).result
127
+ if (this.props.requiresCurrentScript) {
128
+ const currentScriptName = expectSome(
129
+ /** @type {any} */ (namedArgs)["$currentScript"]
130
+ )
98
131
 
99
- if (
100
- "alt" in this.uplc &&
101
- this.uplc.alt instanceof UplcProgramV2
102
- ) {
103
- const resultUnoptim = this.uplc.alt.eval(argValues).result
104
- const resultUnoptimStr = evalResultToString(resultUnoptim)
105
- const resultStr = evalResultToString(result)
132
+ const index = expectSome(
133
+ expectSome(this.props.validatorIndices)[currentScriptName]
134
+ )
135
+ args.push(new ConstrData(index, []))
136
+ }
106
137
 
107
- if (resultStr != resultUnoptimStr) {
108
- throw new Error(
109
- `Critical error: contact Helios maintainers, expected ${resultUnoptimStr}, got ${resultStr}`
110
- )
111
- }
112
- }
138
+ const argValues = args.map((a) => new UplcDataValue(a))
113
139
 
114
- if (isLeft(result)) {
115
- throw new Error(result.left.error)
116
- } else if (result.right instanceof UplcDataValue) {
117
- return result.right.value
118
- } else {
119
- throw new Error(
120
- `${result.right.toString()} isn't a UplcDataValue`
121
- )
122
- }
140
+ const result = this.uplc.eval(argValues).result
141
+
142
+ if ("alt" in this.uplc && this.uplc.alt instanceof UplcProgramV2) {
143
+ const resultUnoptim = this.uplc.alt.eval(argValues).result
144
+ const resultUnoptimStr = evalResultToString(resultUnoptim)
145
+ const resultStr = evalResultToString(result)
146
+
147
+ if (resultStr != resultUnoptimStr) {
148
+ throw new Error(
149
+ `Critical error: contact Helios maintainers, expected ${resultUnoptimStr}, got ${resultStr}`
150
+ )
123
151
  }
124
- )
152
+ }
153
+
154
+ if (isLeft(result)) {
155
+ throw new Error(result.left.error)
156
+ } else if (result.right instanceof UplcDataValue) {
157
+ return result.right.value
158
+ } else {
159
+ throw new Error(`${result.right.toString()} isn't a UplcDataValue`)
160
+ }
125
161
  }
126
162
  }
127
163
 
@@ -2,6 +2,7 @@ import { UserFunc } from "../cast/UserFunc.js"
2
2
 
3
3
  /**
4
4
  * @typedef {import("@helios-lang/uplc").UplcProgram} UplcProgram
5
+ * @typedef {import("../cast/Cast.js").CastConfig} CastConfig
5
6
  */
6
7
 
7
8
  /**
@@ -17,6 +18,6 @@ import { UserFunc } from "../cast/UserFunc.js"
17
18
  * $sourceCode: string
18
19
  * $dependencies: ReadonlyArray<LoadedModule>
19
20
  * $types: {[name: string]: CastLike<any, any>}
20
- * $functions: {[name: string]: (uplc: UplcProgram) => UserFunc<any>}
21
+ * $functions: {[name: string]: (uplc: UplcProgram, config: CastConfig) => UserFunc<any>}
21
22
  * }} LoadedModule
22
23
  */
@@ -201,6 +201,7 @@ export class LoadedScriptsWriter {
201
201
  )
202
202
  this.writeImportType("@helios-lang/ledger", "TimeLike")
203
203
  this.writeImportType("@helios-lang/ledger", "UplcData")
204
+ this.writeImportType("@helios-lang/uplc", "UplcProgram")
204
205
  }
205
206
 
206
207
  /**
@@ -241,21 +242,18 @@ export class LoadedScriptsWriter {
241
242
 
242
243
  for (let key in functions) {
243
244
  const fn = functions[key]
244
- const t = genFuncType(fn)
245
+ const [argsType, retType] = genFuncType(fn)
245
246
 
246
- let propsStr = JSON.stringify(fn)
247
- if (fn.requiresCurrentScript) {
248
- propsStr = `{...(${propsStr}), validatorIndices: __validatorIndices}`
249
- }
247
+ const propsStr = `{...(${JSON.stringify(fn)}), castConfig: config, validatorIndices: __validatorIndices}`
250
248
 
251
249
  this.definition.write(
252
- ` "${key}": (uplc) => /** @type {UserFunc<${t}>} */ (new UserFunc(uplc, ${propsStr})),\n`
250
+ ` "${key}": (uplc, config) => /** @type {UserFunc<${argsType}, ${retType}>} */ (new UserFunc(uplc, ${propsStr})),\n`
253
251
  )
254
252
  this.declaration.write(
255
- ` "${key}": (uplc) => UserFunc<${t}>,\n`
253
+ ` "${key}": (uplc: UplcProgram, config: CastConfig) => UserFunc<${argsType}, ${retType}>,\n`
256
254
  )
257
255
  this.combined.write(
258
- ` "${key}": (uplc) => new UserFunc<${t}>(uplc, ${propsStr}),\n`
256
+ ` "${key}": (uplc: UplcProgram, config: CastConfig) => new UserFunc<${argsType}, ${retType}>(uplc, ${propsStr}),\n`
259
257
  )
260
258
  }
261
259
 
@@ -387,7 +385,7 @@ ${datumTypes ? ` $Datum: (config: CastConfig) => new Cast<${datumTypes[0]}, $
387
385
 
388
386
  /**
389
387
  * @param {TypeCheckedUserFunc} fn
390
- * @returns {string}
388
+ * @returns {[string, string]}
391
389
  */
392
390
  function genFuncType(fn) {
393
391
  /**
@@ -403,9 +401,12 @@ function genFuncType(fn) {
403
401
  fields.push("$currentScript: string")
404
402
  }
405
403
 
406
- fn.arguments.forEach(({ name, type: _type, isOptional }, i) => {
407
- fields.push(`${name}${isOptional ? "?" : ""}: UplcData`)
404
+ fn.arguments.forEach(({ name, type, isOptional }, i) => {
405
+ fields.push(`${name}${isOptional ? "?" : ""}: ${genTypes(type)[1]}`)
408
406
  })
409
407
 
410
- return `(args: {${fields.join(", ")}}) => UplcData`
408
+ const argsTypeStr = `{${fields.join(", ")}}`
409
+ const retTypeStr = genTypes(fn.returns)[0]
410
+
411
+ return [argsTypeStr, retTypeStr]
411
412
  }
@@ -8,6 +8,7 @@ import { UserFunc } from "../cast/UserFunc.js"
8
8
 
9
9
  /**
10
10
  * @typedef {import("@helios-lang/uplc").UplcProgram} UplcProgram
11
+ * @typedef {import("../cast/Cast.js").CastConfig} CastConfig
11
12
  * @typedef {import("./LoadedModule.js").LoadedModule} LoadedModule
12
13
  */
13
14
 
@@ -21,7 +22,7 @@ import { UserFunc } from "../cast/UserFunc.js"
21
22
  * $currentScriptIndex?: number
22
23
  * $dependsOnOwnHash: boolean
23
24
  * $types: {[name: string]: CastLike<any, any>}
24
- * $functions: {[name: string]: (uplc: UplcProgram) => UserFunc<any>}
25
+ * $functions: {[name: string]: (uplc: UplcProgram, config: CastConfig) => UserFunc<any>}
25
26
  * $Redeemer: CastLike<any, any>
26
27
  * } & (
27
28
  * {
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * TODO: handle recursive data structures
7
7
  * @param {TypeSchema} schema
8
- * @returns {[string, string]} - the first entry is the canonical type, the second is the permissive type
8
+ * @returns {[string, string]} - the first entry is the strict canonical type, the second is the permissive type
9
9
  */
10
10
  export function genTypes(schema) {
11
11
  const kind = schema.kind
@@ -8,6 +8,7 @@ import { Cast, UserFunc } from "../cast/index.js"
8
8
 
9
9
  /**
10
10
  * @typedef {import("@helios-lang/uplc").UplcProgram} UplcProgram
11
+ * @typedef {import("../cast/Cast.js").CastConfig} CastConfig
11
12
  * @typedef {import("../codegen/index.js").LoadedModule} LoadedModule
12
13
  * @typedef {import("../codegen/index.js").LoadedValidator} LoadedValidator
13
14
  */
@@ -112,7 +113,7 @@ import { Cast, UserFunc } from "../cast/index.js"
112
113
  */
113
114
 
114
115
  /**
115
- * @template {{[funcName: string]: (uplc: UplcProgram) => UserFunc<any>}} T
116
+ * @template {{[funcName: string]: (uplc: UplcProgram, config: CastConfig) => UserFunc<any>}} T
116
117
  * @typedef {{
117
118
  * [K in keyof T]: ReturnType<T[K]>
118
119
  * }} ContractUserFuncsContext
@@ -128,6 +128,7 @@ export class ContractContextBuilder {
128
128
  props.expectedHashes
129
129
  )
130
130
 
131
+ // TODO: adapt to use generic cache interface
131
132
  contractContextCache.push(compiled)
132
133
 
133
134
  if (props.dumpHashes) {
@@ -158,7 +159,8 @@ export class ContractContextBuilder {
158
159
  userFunc(
159
160
  expectSome(
160
161
  compiled.userFuncs[`${name}::${funcKey}`]
161
- )
162
+ ),
163
+ castConfig
162
164
  )
163
165
  ]
164
166
  )
@@ -185,7 +187,8 @@ export class ContractContextBuilder {
185
187
  userFunc(
186
188
  expectSome(
187
189
  compiled.userFuncs[`${name}::${funcKey}`]
188
- )
190
+ ),
191
+ castConfig
189
192
  )
190
193
  ]
191
194
  )
@@ -3,9 +3,11 @@
3
3
  * @typedef {import("@helios-lang/uplc").UplcData} UplcData
4
4
  * @typedef {import("@helios-lang/uplc").UplcProgram} UplcProgram
5
5
  * @typedef {import("@helios-lang/uplc").UplcValue} UplcValue
6
+ * @typedef {import("./Cast.js").CastConfig} CastConfig
6
7
  */
7
8
  /**
8
9
  * @typedef {{
10
+ * name: string
9
11
  * requiresScriptContext: boolean
10
12
  * requiresCurrentScript: boolean
11
13
  * arguments: {
@@ -15,12 +17,20 @@
15
17
  * }[]
16
18
  * returns: TypeSchema
17
19
  * validatorIndices?: Record<string, number>
20
+ * castConfig: CastConfig
18
21
  * }} UserFuncProps
19
22
  */
20
23
  /**
21
- * @template T
24
+ * @template ArgsT
25
+ * @typedef {{[K in keyof ArgsT]: K extends "$currentScript" ? string : UplcData}} UnsafeArgsT
22
26
  */
23
- export class UserFunc<T> {
27
+ /**
28
+ * @template {{[argName: string]: any}} ArgsT
29
+ * @template RetT
30
+ */
31
+ export class UserFunc<ArgsT extends {
32
+ [argName: string]: any;
33
+ }, RetT> {
24
34
  /**
25
35
  * @param {UplcProgram} uplc
26
36
  * @param {UserFuncProps} props
@@ -39,15 +49,23 @@ export class UserFunc<T> {
39
49
  */
40
50
  private readonly props;
41
51
  /**
42
- * @type {T}
52
+ * @param {ArgsT} namedArgs
53
+ * @returns {RetT}
54
+ */
55
+ eval(namedArgs: ArgsT): RetT;
56
+ /**
57
+ * @param {UnsafeArgsT<ArgsT>} namedArgs
58
+ * @returns {UplcData}
43
59
  */
44
- get evalUnsafe(): T;
60
+ evalUnsafe(namedArgs: UnsafeArgsT<ArgsT>): UplcData;
45
61
  }
46
62
  export type TypeSchema = import("@helios-lang/type-utils").TypeSchema;
47
63
  export type UplcData = import("@helios-lang/uplc").UplcData;
48
64
  export type UplcProgram = import("@helios-lang/uplc").UplcProgram;
49
65
  export type UplcValue = import("@helios-lang/uplc").UplcValue;
66
+ export type CastConfig = import("./Cast.js").CastConfig;
50
67
  export type UserFuncProps = {
68
+ name: string;
51
69
  requiresScriptContext: boolean;
52
70
  requiresCurrentScript: boolean;
53
71
  arguments: {
@@ -57,5 +75,7 @@ export type UserFuncProps = {
57
75
  }[];
58
76
  returns: TypeSchema;
59
77
  validatorIndices?: Record<string, number>;
78
+ castConfig: CastConfig;
60
79
  };
80
+ export type UnsafeArgsT<ArgsT> = { [K in keyof ArgsT]: K extends "$currentScript" ? string : import("@helios-lang/uplc").UplcData; };
61
81
  //# sourceMappingURL=UserFunc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserFunc.d.ts","sourceRoot":"","sources":["../../src/cast/UserFunc.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH;IAeI;;;OAGG;IACH,kBAHW,WAAW,SACX,aAAa,EAKvB;IArBD;;;;OAIG;IACH,sBAAI;IAEJ;;;;OAIG;IACH,uBAAK;IAWL;;OAEG;IACH,oBAsEC;CACJ;yBAzHY,OAAO,yBAAyB,EAAE,UAAU;uBAC5C,OAAO,mBAAmB,EAAE,QAAQ;0BACpC,OAAO,mBAAmB,EAAE,WAAW;wBACvC,OAAO,mBAAmB,EAAE,SAAS;4BAIrC;IACZ,qBAAyB,EAAE,OAAO,CAAA;IAClC,qBAAyB,EAAE,OAAO,CAAA;IAClC,SAAa,EAAE;QACf,MAAY,MAAM,CAAA;QAClB,IAAU,EAAE,UAAU,CAAA;QACtB,UAAgB,EAAE,OAAO,CAAA;KACpB,EAAE,CAAA;IACP,OAAW,EAAE,UAAU,CAAA;IACvB,gBAAoB,CAAC,EAAE,OAAO,MAAM,EAAE,MAAM,CAAC,CAAA;CAC1C"}
1
+ {"version":3,"file":"UserFunc.d.ts","sourceRoot":"","sources":["../../src/cast/UserFunc.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AAEH;;;GAGG;AACH;;;IAeI;;;OAGG;IACH,kBAHW,WAAW,SACX,aAAa,EAKvB;IArBD;;;;OAIG;IACH,sBAAI;IAEJ;;;;OAIG;IACH,uBAAK;IAWL;;;OAGG;IACH,gBAHW,KAAK,GACH,IAAI,CAkChB;IAED;;;OAGG;IACH,sBAHW,YAAY,KAAK,CAAC,GAChB,QAAQ,CA2DpB;CACJ;yBA5JY,OAAO,yBAAyB,EAAE,UAAU;uBAC5C,OAAO,mBAAmB,EAAE,QAAQ;0BACpC,OAAO,mBAAmB,EAAE,WAAW;wBACvC,OAAO,mBAAmB,EAAE,SAAS;yBACrC,OAAO,WAAW,EAAE,UAAU;4BAI9B;IACZ,MAAU,MAAM,CAAA;IAChB,qBAAyB,EAAE,OAAO,CAAA;IAClC,qBAAyB,EAAE,OAAO,CAAA;IAClC,SAAa,EAAE;QACf,MAAY,MAAM,CAAA;QAClB,IAAU,EAAE,UAAU,CAAA;QACtB,UAAgB,EAAE,OAAO,CAAA;KACpB,EAAE,CAAA;IACP,OAAW,EAAE,UAAU,CAAA;IACvB,gBAAoB,CAAC,EAAE,OAAO,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,UAAc,EAAE,UAAU,CAAA;CACvB"}
@@ -1,4 +1,5 @@
1
1
  export type UplcProgram = import("@helios-lang/uplc").UplcProgram;
2
+ export type CastConfig = import("../cast/Cast.js").CastConfig;
2
3
  export type CastLike<TStrict, TPermissive> = import("../cast/Cast.js").CastLike<TStrict, TPermissive>;
3
4
  export type LoadedModule = {
4
5
  $name: string;
@@ -9,7 +10,7 @@ export type LoadedModule = {
9
10
  [name: string]: CastLike<any, any>;
10
11
  };
11
12
  $functions: {
12
- [name: string]: (uplc: UplcProgram) => UserFunc<any>;
13
+ [name: string]: (uplc: UplcProgram, config: CastConfig) => UserFunc<any, any>;
13
14
  };
14
15
  };
15
16
  import { UserFunc } from "../cast/UserFunc.js";
@@ -1 +1 @@
1
- {"version":3,"file":"LoadedModule.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedModule.js"],"names":[],"mappings":"0BAGa,OAAO,mBAAmB,EAAE,WAAW;6CAMvC,OAAO,iBAAiB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;;WAKzD,MAAM;cACH,QAAQ;iBACL,MAAM;mBACJ,cAAc,YAAY,CAAC;;;;;+BAEN,WAAW,KAAK,SAAS,GAAG,CAAC;;;yBAnB7C,qBAAqB"}
1
+ {"version":3,"file":"LoadedModule.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedModule.js"],"names":[],"mappings":"0BAGa,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,iBAAiB,EAAE,UAAU;6CAMpC,OAAO,iBAAiB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;;WAKzD,MAAM;cACH,QAAQ;iBACL,MAAM;mBACJ,cAAc,YAAY,CAAC;;;;;+BAEN,WAAW,UAAU,UAAU;;;yBApB/C,qBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"LoadedScriptsWriter.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedScriptsWriter.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH;IAUI;;;OAGG;IACH,gBAFa,mBAAmB,CAQ/B;IAfG,yBAAoC;IACpC,0BAAqC;IACrC,uBAAkC;IAetC;;;OAGG;IACH;;QAFa,mBAAmB,CAgC/B;IAED;;;OAGG;IACH;;QAFa,mBAAmB,CAoC/B;IAED;;OAEG;IACH,YAFa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAQpC;IAED;;;;;OAKG;IACH,cAKC;IAED;;;;;OAKG;IACH,sBALW,MAAM,YACN,MAAM,eACN,MAAM,EAAE,GACN,mBAAmB,CAmB/B;IAED;;;;OAIG;IACH,kBAJW,MAAM,kBACN,MAAM,EAAE,GACN,mBAAmB,CAQ/B;IAED;;OAEG;IACH,qBA6BC;IAED;;OAEG;IACH,kBAFW,OAAO,MAAM,EAAE,UAAU,CAAC,QAyBpC;IAED;;OAEG;IACH,0BAFW,OAAO,MAAM,EAAE,mBAAmB,CAAC,QA8B7C;IAED;;;OAGG;IACH,oBA6BC;IAED;;;OAGG;IACH,uBAqDC;IAED;;OAEG;IACH,kCAFW,OAAO,MAAM,EAAE,oBAAoB,CAAC,QAuB9C;CACJ;gCA5XY,OAAO,wBAAwB,EAAE,iBAAiB;kCAClD,OAAO,wBAAwB,EAAE,mBAAmB;mCACpD,OAAO,2BAA2B,EAAE,oBAAoB;yBACxD,OAAO,iBAAiB,EAAE,UAAU;6BARpB,0BAA0B"}
1
+ {"version":3,"file":"LoadedScriptsWriter.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedScriptsWriter.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH;IAUI;;;OAGG;IACH,gBAFa,mBAAmB,CAQ/B;IAfG,yBAAoC;IACpC,0BAAqC;IACrC,uBAAkC;IAetC;;;OAGG;IACH;;QAFa,mBAAmB,CAgC/B;IAED;;;OAGG;IACH;;QAFa,mBAAmB,CAoC/B;IAED;;OAEG;IACH,YAFa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAQpC;IAED;;;;;OAKG;IACH,cAKC;IAED;;;;;OAKG;IACH,sBALW,MAAM,YACN,MAAM,eACN,MAAM,EAAE,GACN,mBAAmB,CAmB/B;IAED;;;;OAIG;IACH,kBAJW,MAAM,kBACN,MAAM,EAAE,GACN,mBAAmB,CAQ/B;IAED;;OAEG;IACH,qBA8BC;IAED;;OAEG;IACH,kBAFW,OAAO,MAAM,EAAE,UAAU,CAAC,QAyBpC;IAED;;OAEG;IACH,0BAFW,OAAO,MAAM,EAAE,mBAAmB,CAAC,QA2B7C;IAED;;;OAGG;IACH,oBA6BC;IAED;;;OAGG;IACH,uBAqDC;IAED;;OAEG;IACH,kCAFW,OAAO,MAAM,EAAE,oBAAoB,CAAC,QAuB9C;CACJ;gCA1XY,OAAO,wBAAwB,EAAE,iBAAiB;kCAClD,OAAO,wBAAwB,EAAE,mBAAmB;mCACpD,OAAO,2BAA2B,EAAE,oBAAoB;yBACxD,OAAO,iBAAiB,EAAE,UAAU;6BARpB,0BAA0B"}
@@ -1,5 +1,6 @@
1
1
  export type CastLike<TStrict, TPermissive> = import("../cast/Cast.js").CastLike<TStrict, TPermissive>;
2
2
  export type UplcProgram = import("@helios-lang/uplc").UplcProgram;
3
+ export type CastConfig = import("../cast/Cast.js").CastConfig;
3
4
  export type LoadedModule = import("./LoadedModule.js").LoadedModule;
4
5
  /**
5
6
  * * Note: `$hashDependencies` doesn't contain the indirect dependencies! It must be kept to a minimum in order to inform in which order the validators must be compiled
@@ -15,7 +16,7 @@ export type LoadedValidator = {
15
16
  [name: string]: CastLike<any, any>;
16
17
  };
17
18
  $functions: {
18
- [name: string]: (uplc: UplcProgram) => UserFunc<any>;
19
+ [name: string]: (uplc: UplcProgram, config: CastConfig) => UserFunc<any, any>;
19
20
  };
20
21
  $Redeemer: CastLike<any, any>;
21
22
  } & ({
@@ -1 +1 @@
1
- {"version":3,"file":"LoadedValidator.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedValidator.js"],"names":[],"mappings":"6CAKa,OAAO,iBAAiB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;0BAIxD,OAAO,mBAAmB,EAAE,WAAW;2BACvC,OAAO,mBAAmB,EAAE,YAAY;;;;;WAMzC,MAAM;iBACA,MAAM;mBACJ,cAAc,YAAY,CAAC;uBACvB,cAAc,eAAe,CAAC;;uBAE9B,OAAO;;;;;+BAEU,WAAW,KAAK,SAAS,GAAG,CAAC;;eACtD,SAAS,GAAG,EAAE,GAAG,CAAC;;cAGjB,UAAU,GAAG,OAAO;YACtB,SAAS,GAAG,EAAE,GAAG,CAAC;;cAEhB,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS;;;WAM7C,MAAM;;;;;WAOQ,MAAM;;;;6DAM7B,0BAA0B,CAAC,CAAC,eAAe,CAAC,CAAC;yBAjDjC,qBAAqB"}
1
+ {"version":3,"file":"LoadedValidator.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedValidator.js"],"names":[],"mappings":"6CAKa,OAAO,iBAAiB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;0BAIxD,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,iBAAiB,EAAE,UAAU;2BACpC,OAAO,mBAAmB,EAAE,YAAY;;;;;WAMzC,MAAM;iBACA,MAAM;mBACJ,cAAc,YAAY,CAAC;uBACvB,cAAc,eAAe,CAAC;;uBAE9B,OAAO;;;;;+BAEU,WAAW,UAAU,UAAU;;eACxD,SAAS,GAAG,EAAE,GAAG,CAAC;;cAGjB,UAAU,GAAG,OAAO;YACtB,SAAS,GAAG,EAAE,GAAG,CAAC;;cAEhB,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS;;;WAM7C,MAAM;;;;;WAOQ,MAAM;;;;6DAM7B,0BAA0B,CAAC,CAAC,eAAe,CAAC,CAAC;yBAlDjC,qBAAqB"}
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * TODO: handle recursive data structures
6
6
  * @param {TypeSchema} schema
7
- * @returns {[string, string]} - the first entry is the canonical type, the second is the permissive type
7
+ * @returns {[string, string]} - the first entry is the strict canonical type, the second is the permissive type
8
8
  */
9
9
  export function genTypes(schema: TypeSchema): [string, string];
10
10
  export type TypeSchema = import("@helios-lang/type-utils").TypeSchema;
@@ -1,4 +1,5 @@
1
1
  export type UplcProgram = import("@helios-lang/uplc").UplcProgram;
2
+ export type CastConfig = import("../cast/Cast.js").CastConfig;
2
3
  export type LoadedModule = import("../codegen/index.js").LoadedModule;
3
4
  export type LoadedValidator = import("../codegen/index.js").LoadedValidator;
4
5
  export type MintingContext<TRedeemerStrict, TRedeemerPermissive> = import("@helios-lang/ledger").MintingContext<TRedeemerStrict, TRedeemerPermissive>;
@@ -36,7 +37,7 @@ export type ContractTypesContext<T extends {
36
37
  [typeName: string]: CastLike<any, any>;
37
38
  }> = { [K in keyof T]: Cast<import("../cast/StrictType.js").StrictType<T[K]>, import("../cast/PermissiveType.js").PermissiveType<T[K]>>; };
38
39
  export type ContractUserFuncsContext<T extends {
39
- [funcName: string]: (uplc: UplcProgram) => UserFunc<any>;
40
+ [funcName: string]: (uplc: UplcProgram, config: CastConfig) => UserFunc<any, any>;
40
41
  }> = { [K in keyof T]: ReturnType<T[K]>; };
41
42
  export type ContractContext<Vs extends {
42
43
  [name: string]: import("../codegen/LoadedValidator.js").LoadedValidator;
@@ -1 +1 @@
1
- {"version":3,"file":"ContractContext.d.ts","sourceRoot":"","sources":["../../src/context/ContractContext.js"],"names":[],"mappings":"0BASa,OAAO,mBAAmB,EAAE,WAAW;2BACvC,OAAO,qBAAqB,EAAE,YAAY;8BAC1C,OAAO,qBAAqB,EAAE,eAAe;mEAM7C,OAAO,qBAAqB,EAAE,cAAc,CAAC,eAAe,EAAE,mBAAmB,CAAC;oGAQlF,OAAO,qBAAqB,EAAE,eAAe,CAAC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAC;mEAMnH,OAAO,qBAAqB,EAAE,cAAc,CAAC,eAAe,EAAE,mBAAmB,CAAC;6CAMlF,OAAO,kBAAkB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;2DAKzD,OAAO,kBAAkB,EAAE,cAAc,CAAC,CAAC,CAAC;uDAK5C,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;0CAIxC,CACZ,cAAkB,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,GACtD,kBAAsB,eAAe,GAAG,EAAE,GAAG,CAAC,CAAC,GAC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G;IACH,gBAFa,uBAAuB,EAAE,EAAE,EAAE,CAAC,CAI1C;IAfD;;;;OAIG;IACH,sBAGC;IArBD;;;;OAIG;IACH,4BAAU;IAEV;;;OAGG;IACH,kBAFU,EAAE,CAEL;IAmBP;;;;;;;OAOG;IACH,8JAaC;IAED;;;;;;;OAOG;IACH,sIAQC;IAED;;;OAGG;IACH,aAHW,yBAAyB,GACvB,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAsFnC;CACJ;yBA/LY,OAAO,kBAAkB,EAAE,UAAU;2BACrC,OAAO,4BAA4B,EAAE,YAAY;8BACjD,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;wFAK1C,OAAO,+BAA+B,EAAE,mBAAmB,CAAC,CAAC,CAAC;;;;;KAM9D,OAAO,sBAAsB,EAAE,eAAe,CAAC,EAAE,EAAE,EAAE,CAAC;;eAKnD,OAAO"}
1
+ {"version":3,"file":"ContractContextBuilder.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextBuilder.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;;;GAOG;AAEH;;;GAGG;AACH;;;;;IAwBI;;OAEG;IACH,gBAFa,uBAAuB,EAAE,EAAE,EAAE,CAAC,CAI1C;IAfD;;;;OAIG;IACH,sBAGC;IArBD;;;;OAIG;IACH,4BAAU;IAEV;;;OAGG;IACH,kBAFU,EAAE,CAEL;IAmBP;;;;;;;OAOG;IACH,8JAaC;IAED;;;;;;;OAOG;IACH,sIAQC;IAED;;;OAGG;IACH,aAHW,yBAAyB,GACvB,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAyFnC;CACJ;yBAlMY,OAAO,kBAAkB,EAAE,UAAU;2BACrC,OAAO,4BAA4B,EAAE,YAAY;8BACjD,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;wFAK1C,OAAO,+BAA+B,EAAE,mBAAmB,CAAC,CAAC,CAAC;;;;;KAM9D,OAAO,sBAAsB,EAAE,eAAe,CAAC,EAAE,EAAE,EAAE,CAAC;;eAKnD,OAAO"}
@@ -49,7 +49,7 @@ export class DagCompiler {
49
49
  * @type {{[name: string]: UplcProgram}}
50
50
  */
51
51
  private readonly cachedUserFuncs;
52
- castConfig: import("../cast/Cast.js").CastConfig;
52
+ castConfig: import("./ContractContext.js").CastConfig;
53
53
  /**
54
54
  * @param {LoadedValidator[]} validators
55
55
  * @param {Record<string, any>} parameters
@@ -1 +1 @@
1
- {"version":3,"file":"DagCompiler.d.ts","sourceRoot":"","sources":["../../src/context/DagCompiler.js"],"names":[],"mappings":"AAuUA;;;GAGG;AACH,iDAHW,eAAe,GACb,MAAM,EAAE,CAsBpB;AApVD;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;GAEG;AACH;IA6BI;;;OAGG;IACH,iBAHW,WAAW,cACX,UAAU,EAOpB;IArCD;;;;OAIG;IACH,qBAAG;IAEH;;;;OAIG;IACH,wBAAM;IAEN;;;;OAIG;IACH,kCAAgB;IAEhB;;;;OAIG;IACH,iCAAe;IAQX,iDAA4B;IAKhC;;;;;;OAMG;IACH,kBANW,eAAe,EAAE,cACjB,OAAO,MAAM,EAAE,GAAG,CAAC,aACnB,OAAO;;SAEL,iBAAiB,CAuH7B;IAED;;;;;OAKG;IACH,4BAsCC;IAED;;;;;OAKG;IACH,yBA0BC;IAED;;;;;OAKG;IACH,qBAoBC;IAED;;;;;OAKG;IACH,4BAeC;CACJ;0BAzTY,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,kBAAkB,EAAE,UAAU;8BACrC,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;0CAC1C,OAAO,sBAAsB,EAAE,2BAA2B"}
1
+ {"version":3,"file":"DagCompiler.d.ts","sourceRoot":"","sources":["../../src/context/DagCompiler.js"],"names":[],"mappings":"AAuUA;;;GAGG;AACH,iDAHW,eAAe,GACb,MAAM,EAAE,CAsBpB;AApVD;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;GAEG;AACH;IA6BI;;;OAGG;IACH,iBAHW,WAAW,cACX,UAAU,EAOpB;IArCD;;;;OAIG;IACH,qBAAG;IAEH;;;;OAIG;IACH,wBAAM;IAEN;;;;OAIG;IACH,kCAAgB;IAEhB;;;;OAIG;IACH,iCAAe;IAQX,sDAA4B;IAKhC;;;;;;OAMG;IACH,kBANW,eAAe,EAAE,cACjB,OAAO,MAAM,EAAE,GAAG,CAAC,aACnB,OAAO;;SAEL,iBAAiB,CAuH7B;IAED;;;;;OAKG;IACH,4BAsCC;IAED;;;;;OAKG;IACH,yBA0BC;IAED;;;;;OAKG;IACH,qBAoBC;IAED;;;;;OAKG;IACH,4BAeC;CACJ;0BAzTY,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,kBAAkB,EAAE,UAAU;8BACrC,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;0CAC1C,OAAO,sBAAsB,EAAE,2BAA2B"}