@izi-noir/sdk 0.1.10 → 0.1.11
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/dist/{IProvingSystem-D0X9Rp3W.d.ts → IProvingSystem-BKgFRl27.d.ts} +97 -2
- package/dist/{IProvingSystem-BpI0rmve.d.cts → IProvingSystem-SfzgcbqH.d.cts} +97 -2
- package/dist/index.cjs +434 -34
- package/dist/index.d.cts +111 -85
- package/dist/index.d.ts +111 -85
- package/dist/index.js +433 -34
- package/dist/providers/arkworks.cjs +431 -34
- package/dist/providers/arkworks.d.cts +7 -4
- package/dist/providers/arkworks.d.ts +7 -4
- package/dist/providers/arkworks.js +431 -34
- package/dist/providers/barretenberg.cjs +431 -34
- package/dist/providers/barretenberg.d.cts +4 -4
- package/dist/providers/barretenberg.d.ts +4 -4
- package/dist/providers/barretenberg.js +431 -34
- package/dist/providers/sunspot.d.cts +2 -2
- package/dist/providers/sunspot.d.ts +2 -2
- package/dist/{wasmInit-oOZwkgo_.d.ts → wasmInit-D3RyRKIC.d.ts} +7 -3
- package/dist/{wasmInit-D615cpte.d.cts → wasmInit-Wyynuk6r.d.cts} +7 -3
- package/package.json +1 -1
|
@@ -123,8 +123,103 @@ interface IziNoirConfig {
|
|
|
123
123
|
circuitPaths?: CircuitPaths;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
interface CircuitParam {
|
|
127
|
+
name: string;
|
|
128
|
+
index: number;
|
|
129
|
+
}
|
|
130
|
+
interface BinaryExpr {
|
|
131
|
+
kind: 'binary';
|
|
132
|
+
left: Expr;
|
|
133
|
+
operator: BinaryOperator;
|
|
134
|
+
right: Expr;
|
|
135
|
+
}
|
|
136
|
+
interface IdentifierExpr {
|
|
137
|
+
kind: 'identifier';
|
|
138
|
+
name: string;
|
|
139
|
+
}
|
|
140
|
+
interface LiteralExpr {
|
|
141
|
+
kind: 'literal';
|
|
142
|
+
value: number | string | bigint;
|
|
143
|
+
}
|
|
144
|
+
interface MemberExpr {
|
|
145
|
+
kind: 'member';
|
|
146
|
+
object: Expr;
|
|
147
|
+
index: Expr;
|
|
148
|
+
}
|
|
149
|
+
interface ArrayLiteralExpr {
|
|
150
|
+
kind: 'array_literal';
|
|
151
|
+
elements: Expr[];
|
|
152
|
+
}
|
|
153
|
+
interface CallExpr {
|
|
154
|
+
kind: 'call';
|
|
155
|
+
callee: Expr;
|
|
156
|
+
method?: string;
|
|
157
|
+
args: Expr[];
|
|
158
|
+
}
|
|
159
|
+
type BinaryOperator = '==' | '!=' | '+' | '-' | '*' | '/' | '%' | '<' | '>' | '<=' | '>=' | '&' | '|';
|
|
160
|
+
type UnaryOperator = '!' | '-';
|
|
161
|
+
interface UnaryExpr {
|
|
162
|
+
kind: 'unary';
|
|
163
|
+
operator: UnaryOperator;
|
|
164
|
+
operand: Expr;
|
|
165
|
+
}
|
|
166
|
+
interface IfExpr {
|
|
167
|
+
kind: 'if_expr';
|
|
168
|
+
condition: Expr;
|
|
169
|
+
consequent: Expr;
|
|
170
|
+
alternate: Expr;
|
|
171
|
+
}
|
|
172
|
+
type Expr = BinaryExpr | UnaryExpr | IdentifierExpr | LiteralExpr | MemberExpr | ArrayLiteralExpr | CallExpr | IfExpr;
|
|
173
|
+
interface AssertStatement {
|
|
174
|
+
kind: 'assert';
|
|
175
|
+
condition: Expr;
|
|
176
|
+
message?: string;
|
|
177
|
+
}
|
|
178
|
+
interface VariableDeclaration {
|
|
179
|
+
kind: 'variable_declaration';
|
|
180
|
+
name: string;
|
|
181
|
+
mutable: boolean;
|
|
182
|
+
initializer: Expr;
|
|
183
|
+
}
|
|
184
|
+
interface AssignmentStatement {
|
|
185
|
+
kind: 'assignment';
|
|
186
|
+
target: string;
|
|
187
|
+
value: Expr;
|
|
188
|
+
}
|
|
189
|
+
interface IfStatement {
|
|
190
|
+
kind: 'if_statement';
|
|
191
|
+
condition: Expr;
|
|
192
|
+
consequent: Statement[];
|
|
193
|
+
alternate?: Statement[];
|
|
194
|
+
}
|
|
195
|
+
interface ForStatement {
|
|
196
|
+
kind: 'for_statement';
|
|
197
|
+
variable: string;
|
|
198
|
+
start: Expr;
|
|
199
|
+
end: Expr;
|
|
200
|
+
inclusive: boolean;
|
|
201
|
+
body: Statement[];
|
|
202
|
+
}
|
|
203
|
+
type Statement = AssertStatement | VariableDeclaration | AssignmentStatement | IfStatement | ForStatement;
|
|
204
|
+
interface ParsedCircuit {
|
|
205
|
+
publicParams: CircuitParam[];
|
|
206
|
+
privateParams: CircuitParam[];
|
|
207
|
+
statements: Statement[];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Options for circuit compilation
|
|
212
|
+
*/
|
|
213
|
+
interface CompileOptions {
|
|
214
|
+
/**
|
|
215
|
+
* The parsed circuit from JS source.
|
|
216
|
+
* When provided, enables dynamic R1CS generation based on the actual circuit logic.
|
|
217
|
+
* Without this, the proving system may use hardcoded R1CS patterns.
|
|
218
|
+
*/
|
|
219
|
+
parsedCircuit?: ParsedCircuit;
|
|
220
|
+
}
|
|
126
221
|
interface ICompiler {
|
|
127
|
-
compile(noirCode: string): Promise<CompiledCircuit>;
|
|
222
|
+
compile(noirCode: string, options?: CompileOptions): Promise<CompiledCircuit>;
|
|
128
223
|
}
|
|
129
224
|
|
|
130
225
|
/**
|
|
@@ -167,4 +262,4 @@ interface IVerifier {
|
|
|
167
262
|
interface IProvingSystem extends ICompiler, IProver, IVerifier {
|
|
168
263
|
}
|
|
169
264
|
|
|
170
|
-
export { type CircuitPaths as C, type EthereumChainMetadata as E, type IProvingSystem as I, Network as N, Provider as P, type SolanaChainMetadata as S, type IziNoirConfig as a, type ChainId as b, type CircuitMetadata as c, type ChainMetadataFor as d, Chain as e, type
|
|
265
|
+
export { type AssertStatement as A, type BinaryExpr as B, type CircuitPaths as C, type EthereumChainMetadata as E, type IProvingSystem as I, type LiteralExpr as L, type MemberExpr as M, Network as N, Provider as P, type SolanaChainMetadata as S, type IziNoirConfig as a, type ChainId as b, type CircuitMetadata as c, type ChainMetadataFor as d, Chain as e, type CompileOptions as f, type ParsedCircuit as g, type ChainMetadata as h, type ICompiler as i, type IProver as j, type IVerifier as k, type CircuitParam as l, type Expr as m, type IdentifierExpr as n, type BinaryOperator as o, type Statement as p, NETWORK_CONFIG as q, getExplorerTxUrl as r, getExplorerAccountUrl as s, type NetworkConfig as t };
|
|
@@ -123,8 +123,103 @@ interface IziNoirConfig {
|
|
|
123
123
|
circuitPaths?: CircuitPaths;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
interface CircuitParam {
|
|
127
|
+
name: string;
|
|
128
|
+
index: number;
|
|
129
|
+
}
|
|
130
|
+
interface BinaryExpr {
|
|
131
|
+
kind: 'binary';
|
|
132
|
+
left: Expr;
|
|
133
|
+
operator: BinaryOperator;
|
|
134
|
+
right: Expr;
|
|
135
|
+
}
|
|
136
|
+
interface IdentifierExpr {
|
|
137
|
+
kind: 'identifier';
|
|
138
|
+
name: string;
|
|
139
|
+
}
|
|
140
|
+
interface LiteralExpr {
|
|
141
|
+
kind: 'literal';
|
|
142
|
+
value: number | string | bigint;
|
|
143
|
+
}
|
|
144
|
+
interface MemberExpr {
|
|
145
|
+
kind: 'member';
|
|
146
|
+
object: Expr;
|
|
147
|
+
index: Expr;
|
|
148
|
+
}
|
|
149
|
+
interface ArrayLiteralExpr {
|
|
150
|
+
kind: 'array_literal';
|
|
151
|
+
elements: Expr[];
|
|
152
|
+
}
|
|
153
|
+
interface CallExpr {
|
|
154
|
+
kind: 'call';
|
|
155
|
+
callee: Expr;
|
|
156
|
+
method?: string;
|
|
157
|
+
args: Expr[];
|
|
158
|
+
}
|
|
159
|
+
type BinaryOperator = '==' | '!=' | '+' | '-' | '*' | '/' | '%' | '<' | '>' | '<=' | '>=' | '&' | '|';
|
|
160
|
+
type UnaryOperator = '!' | '-';
|
|
161
|
+
interface UnaryExpr {
|
|
162
|
+
kind: 'unary';
|
|
163
|
+
operator: UnaryOperator;
|
|
164
|
+
operand: Expr;
|
|
165
|
+
}
|
|
166
|
+
interface IfExpr {
|
|
167
|
+
kind: 'if_expr';
|
|
168
|
+
condition: Expr;
|
|
169
|
+
consequent: Expr;
|
|
170
|
+
alternate: Expr;
|
|
171
|
+
}
|
|
172
|
+
type Expr = BinaryExpr | UnaryExpr | IdentifierExpr | LiteralExpr | MemberExpr | ArrayLiteralExpr | CallExpr | IfExpr;
|
|
173
|
+
interface AssertStatement {
|
|
174
|
+
kind: 'assert';
|
|
175
|
+
condition: Expr;
|
|
176
|
+
message?: string;
|
|
177
|
+
}
|
|
178
|
+
interface VariableDeclaration {
|
|
179
|
+
kind: 'variable_declaration';
|
|
180
|
+
name: string;
|
|
181
|
+
mutable: boolean;
|
|
182
|
+
initializer: Expr;
|
|
183
|
+
}
|
|
184
|
+
interface AssignmentStatement {
|
|
185
|
+
kind: 'assignment';
|
|
186
|
+
target: string;
|
|
187
|
+
value: Expr;
|
|
188
|
+
}
|
|
189
|
+
interface IfStatement {
|
|
190
|
+
kind: 'if_statement';
|
|
191
|
+
condition: Expr;
|
|
192
|
+
consequent: Statement[];
|
|
193
|
+
alternate?: Statement[];
|
|
194
|
+
}
|
|
195
|
+
interface ForStatement {
|
|
196
|
+
kind: 'for_statement';
|
|
197
|
+
variable: string;
|
|
198
|
+
start: Expr;
|
|
199
|
+
end: Expr;
|
|
200
|
+
inclusive: boolean;
|
|
201
|
+
body: Statement[];
|
|
202
|
+
}
|
|
203
|
+
type Statement = AssertStatement | VariableDeclaration | AssignmentStatement | IfStatement | ForStatement;
|
|
204
|
+
interface ParsedCircuit {
|
|
205
|
+
publicParams: CircuitParam[];
|
|
206
|
+
privateParams: CircuitParam[];
|
|
207
|
+
statements: Statement[];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Options for circuit compilation
|
|
212
|
+
*/
|
|
213
|
+
interface CompileOptions {
|
|
214
|
+
/**
|
|
215
|
+
* The parsed circuit from JS source.
|
|
216
|
+
* When provided, enables dynamic R1CS generation based on the actual circuit logic.
|
|
217
|
+
* Without this, the proving system may use hardcoded R1CS patterns.
|
|
218
|
+
*/
|
|
219
|
+
parsedCircuit?: ParsedCircuit;
|
|
220
|
+
}
|
|
126
221
|
interface ICompiler {
|
|
127
|
-
compile(noirCode: string): Promise<CompiledCircuit>;
|
|
222
|
+
compile(noirCode: string, options?: CompileOptions): Promise<CompiledCircuit>;
|
|
128
223
|
}
|
|
129
224
|
|
|
130
225
|
/**
|
|
@@ -167,4 +262,4 @@ interface IVerifier {
|
|
|
167
262
|
interface IProvingSystem extends ICompiler, IProver, IVerifier {
|
|
168
263
|
}
|
|
169
264
|
|
|
170
|
-
export { type CircuitPaths as C, type EthereumChainMetadata as E, type IProvingSystem as I, Network as N, Provider as P, type SolanaChainMetadata as S, type IziNoirConfig as a, type ChainId as b, type CircuitMetadata as c, type ChainMetadataFor as d, Chain as e, type
|
|
265
|
+
export { type AssertStatement as A, type BinaryExpr as B, type CircuitPaths as C, type EthereumChainMetadata as E, type IProvingSystem as I, type LiteralExpr as L, type MemberExpr as M, Network as N, Provider as P, type SolanaChainMetadata as S, type IziNoirConfig as a, type ChainId as b, type CircuitMetadata as c, type ChainMetadataFor as d, Chain as e, type CompileOptions as f, type ParsedCircuit as g, type ChainMetadata as h, type ICompiler as i, type IProver as j, type IVerifier as k, type CircuitParam as l, type Expr as m, type IdentifierExpr as n, type BinaryOperator as o, type Statement as p, NETWORK_CONFIG as q, getExplorerTxUrl as r, getExplorerAccountUrl as s, type NetworkConfig as t };
|