@helios-lang/contract-utils 0.2.36 → 0.2.38
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.
|
|
3
|
+
"version": "0.2.38",
|
|
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",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"prettify": "npx prettier . --write",
|
|
16
16
|
"test": "npm run test:pretty && npm run test:types && npm run test:suite",
|
|
17
17
|
"test:pretty": "npx prettier . --check",
|
|
18
|
-
"test:suite": "node --test
|
|
18
|
+
"test:suite": "node --test",
|
|
19
19
|
"test:types": "npm run build:types"
|
|
20
20
|
},
|
|
21
21
|
"author": "Christian Schmitz",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@helios-lang/cli-utils": "^0.1.6",
|
|
39
39
|
"@helios-lang/codec-utils": "^0.1.30",
|
|
40
40
|
"@helios-lang/compiler-utils": "^0.1.25",
|
|
41
|
-
"@helios-lang/ledger": "^0.
|
|
41
|
+
"@helios-lang/ledger": "^0.4.3",
|
|
42
42
|
"@helios-lang/type-utils": "^0.1.21",
|
|
43
43
|
"@helios-lang/uplc": "^0.1.37"
|
|
44
44
|
}
|
package/src/cast/UserFunc.js
CHANGED
|
@@ -38,7 +38,6 @@ import { Cast } from "./Cast.js"
|
|
|
38
38
|
*/
|
|
39
39
|
export class UserFunc {
|
|
40
40
|
/**
|
|
41
|
-
* @private
|
|
42
41
|
* @readonly
|
|
43
42
|
* @type {UplcProgram}
|
|
44
43
|
*/
|
|
@@ -82,6 +81,8 @@ export class UserFunc {
|
|
|
82
81
|
typeSchema,
|
|
83
82
|
this.props.castConfig
|
|
84
83
|
).toUplcData(argValue)
|
|
84
|
+
} else if (["$currentScript", "$scriptContext"].includes(argName)) {
|
|
85
|
+
unsafeNamedArgs[argName] = argValue
|
|
85
86
|
} else {
|
|
86
87
|
console.error(
|
|
87
88
|
`invalid arg '${argName}' for user function ${this.props.name}`
|
package/types/cast/UserFunc.d.ts
CHANGED
|
@@ -38,11 +38,10 @@ export class UserFunc<ArgsT extends {
|
|
|
38
38
|
*/
|
|
39
39
|
constructor(uplc: UplcProgram, props: UserFuncProps);
|
|
40
40
|
/**
|
|
41
|
-
* @private
|
|
42
41
|
* @readonly
|
|
43
42
|
* @type {UplcProgram}
|
|
44
43
|
*/
|
|
45
|
-
|
|
44
|
+
readonly uplc: UplcProgram;
|
|
46
45
|
/**
|
|
47
46
|
* @private
|
|
48
47
|
* @readonly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserFunc.d.ts","sourceRoot":"","sources":["../../src/cast/UserFunc.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AAEH;;;GAGG;AACH;;;
|
|
1
|
+
{"version":3,"file":"UserFunc.d.ts","sourceRoot":"","sources":["../../src/cast/UserFunc.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AAEH;;;GAGG;AACH;;;IAcI;;;OAGG;IACH,kBAHW,WAAW,SACX,aAAa,EAKvB;IApBD;;;OAGG;IACH,eAFU,WAAW,CAEjB;IAEJ;;;;OAIG;IACH,uBAAK;IAWL;;;OAGG;IACH,gBAHW,KAAK,GACH,IAAI,CAoChB;IAED;;;OAGG;IACH,sBAHW,YAAY,KAAK,CAAC,GAChB,QAAQ,CAYpB;IAED;;;OAGG;IACH,mBAHW,YAAY,KAAK,CAAC,GAChB,SAAS,CA0ErB;CACJ;yBA7LY,OAAO,yBAAyB,EAAE,UAAU;wBAC5C,OAAO,mBAAmB,EAAE,SAAS;uBACrC,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"}
|