@@ -6,13 +6,19 @@ import type { SELDiagnostic } from "@seljs/checker";
66 * Contains statistics and block information from the execution run.
77 */
88export interface ExecutionMeta {
9- /** Number of rounds executed (topological depth) */
9+ /**
10+ * Number of rounds executed (topological depth)
11+ */
1012 roundsExecuted : number ;
1113
12- /** Total number of contract calls executed */
14+ /**
15+ * Total number of contract calls executed
16+ */
1317 totalCalls : number ;
1418
15- /** Block number at which calls were executed */
19+ /**
20+ * Block number at which calls were executed
21+ */
1622 blockNumber : bigint ;
1723}
1824
@@ -21,10 +27,14 @@ export interface ExecutionMeta {
2127 * Maps call IDs to their decoded results.
2228 */
2329export interface ExecutionResult {
24- /** Map of callId to decoded result value */
30+ /**
31+ * Map of callId to decoded result value
32+ */
2533 results : Map < string , unknown > ;
2634
27- /** Execution metadata */
35+ /**
36+ * Execution metadata
37+ */
2838 meta : ExecutionMeta ;
2939}
3040
@@ -33,18 +43,24 @@ export interface ExecutionResult {
3343 * Contains the block number and variable bindings.
3444 */
3545export interface ExecutionContext {
36- /** Block number for consistent reads across all calls */
46+ /**
47+ * Block number for consistent reads across all calls
48+ */
3749 blockNumber : bigint ;
3850
39- /** Variable name to value mapping from evaluate() context */
51+ /**
52+ * Variable name to value mapping from evaluate() context
53+ */
4054 variables : Record < string , unknown > ;
4155}
4256
4357/**
4458 * Options for the evaluate() call.
4559 */
4660export interface EvaluateOptions {
47- /** Override client for this evaluation */
61+ /**
62+ * Override client for this evaluation
63+ */
4864 client ?: SELClient ;
4965}
5066
@@ -55,12 +71,23 @@ export interface EvaluateOptions {
5571 * contract calls were executed, absent for pure CEL expressions.
5672 */
5773export interface EvaluateResult < T = unknown > {
58- /** The evaluated result value */
74+ /**
75+ * The evaluated result value
76+ */
5977 value : T ;
6078
61- /** Execution metadata, present when contract calls were executed */
79+ /**
80+ * The inferred type of the expression, when available
81+ */
82+ type ?: string ;
83+
84+ /**
85+ * Execution metadata, present when contract calls were executed
86+ */
6287 meta ?: ExecutionMeta ;
6388
64- /** Advisory diagnostics (warnings/info) from lint rules, when non-empty */
89+ /**
90+ * Advisory diagnostics (warnings/info) from lint rules, when non-empty
91+ */
6592 diagnostics ?: SELDiagnostic [ ] ;
6693}
0 commit comments