@aztec/noir-protocol-circuits-types 0.24.0

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.
Files changed (77) hide show
  1. package/README.md +1 -0
  2. package/dest/index.d.ts +69 -0
  3. package/dest/index.d.ts.map +1 -0
  4. package/dest/index.js +268 -0
  5. package/dest/scripts/generate_ts_from_abi.d.ts +2 -0
  6. package/dest/scripts/generate_ts_from_abi.d.ts.map +1 -0
  7. package/dest/scripts/generate_ts_from_abi.js +180 -0
  8. package/dest/target/private_kernel_init.json +1 -0
  9. package/dest/target/private_kernel_init_simulated.json +1 -0
  10. package/dest/target/private_kernel_inner.json +1 -0
  11. package/dest/target/private_kernel_inner_simulated.json +1 -0
  12. package/dest/target/private_kernel_tail.json +1 -0
  13. package/dest/target/private_kernel_tail_simulated.json +1 -0
  14. package/dest/target/public_kernel_app_logic.json +1 -0
  15. package/dest/target/public_kernel_app_logic_simulated.json +1 -0
  16. package/dest/target/public_kernel_setup.json +1 -0
  17. package/dest/target/public_kernel_setup_simulated.json +1 -0
  18. package/dest/target/rollup_base.json +1 -0
  19. package/dest/target/rollup_base_simulated.json +1 -0
  20. package/dest/target/rollup_merge.json +1 -0
  21. package/dest/target/rollup_root.json +1 -0
  22. package/dest/type_conversion.d.ts +574 -0
  23. package/dest/type_conversion.d.ts.map +1 -0
  24. package/dest/type_conversion.js +1115 -0
  25. package/dest/types/private_kernel_init_types.d.ts +232 -0
  26. package/dest/types/private_kernel_init_types.d.ts.map +1 -0
  27. package/dest/types/private_kernel_init_types.js +3 -0
  28. package/dest/types/private_kernel_inner_types.d.ts +233 -0
  29. package/dest/types/private_kernel_inner_types.d.ts.map +1 -0
  30. package/dest/types/private_kernel_inner_types.js +3 -0
  31. package/dest/types/private_kernel_tail_types.d.ts +182 -0
  32. package/dest/types/private_kernel_tail_types.d.ts.map +1 -0
  33. package/dest/types/private_kernel_tail_types.js +3 -0
  34. package/dest/types/public_kernel_app_logic_types.d.ts +212 -0
  35. package/dest/types/public_kernel_app_logic_types.d.ts.map +1 -0
  36. package/dest/types/public_kernel_app_logic_types.js +3 -0
  37. package/dest/types/public_kernel_setup_types.d.ts +212 -0
  38. package/dest/types/public_kernel_setup_types.d.ts.map +1 -0
  39. package/dest/types/public_kernel_setup_types.js +3 -0
  40. package/dest/types/rollup_base_types.d.ts +220 -0
  41. package/dest/types/rollup_base_types.d.ts.map +1 -0
  42. package/dest/types/rollup_base_types.js +3 -0
  43. package/dest/types/rollup_merge_types.d.ts +71 -0
  44. package/dest/types/rollup_merge_types.d.ts.map +1 -0
  45. package/dest/types/rollup_merge_types.js +3 -0
  46. package/dest/types/rollup_root_types.d.ts +92 -0
  47. package/dest/types/rollup_root_types.d.ts.map +1 -0
  48. package/dest/types/rollup_root_types.js +3 -0
  49. package/package.json +60 -0
  50. package/src/fixtures/nested-call-private-kernel-init.hex +1 -0
  51. package/src/fixtures/nested-call-private-kernel-inner.hex +1 -0
  52. package/src/fixtures/nested-call-private-kernel-ordering.hex +1 -0
  53. package/src/index.ts +438 -0
  54. package/src/scripts/generate_ts_from_abi.ts +233 -0
  55. package/src/target/private_kernel_init.json +1 -0
  56. package/src/target/private_kernel_init_simulated.json +1 -0
  57. package/src/target/private_kernel_inner.json +1 -0
  58. package/src/target/private_kernel_inner_simulated.json +1 -0
  59. package/src/target/private_kernel_tail.json +1 -0
  60. package/src/target/private_kernel_tail_simulated.json +1 -0
  61. package/src/target/public_kernel_app_logic.json +1 -0
  62. package/src/target/public_kernel_app_logic_simulated.json +1 -0
  63. package/src/target/public_kernel_setup.json +1 -0
  64. package/src/target/public_kernel_setup_simulated.json +1 -0
  65. package/src/target/rollup_base.json +1 -0
  66. package/src/target/rollup_base_simulated.json +1 -0
  67. package/src/target/rollup_merge.json +1 -0
  68. package/src/target/rollup_root.json +1 -0
  69. package/src/type_conversion.ts +1673 -0
  70. package/src/types/private_kernel_init_types.ts +272 -0
  71. package/src/types/private_kernel_inner_types.ts +273 -0
  72. package/src/types/private_kernel_tail_types.ts +214 -0
  73. package/src/types/public_kernel_app_logic_types.ts +250 -0
  74. package/src/types/public_kernel_setup_types.ts +250 -0
  75. package/src/types/rollup_base_types.ts +259 -0
  76. package/src/types/rollup_merge_types.ts +85 -0
  77. package/src/types/rollup_root_types.ts +109 -0
@@ -0,0 +1,214 @@
1
+ /* Autogenerated file, do not edit! */
2
+
3
+ /* eslint-disable */
4
+
5
+ export type FixedLengthArray<T, L extends number> = L extends 0 ? never[] : T[] & { length: L };
6
+
7
+ export type Field = string;
8
+ export type u32 = string;
9
+
10
+ export interface AggregationObject {}
11
+
12
+ export interface SideEffect {
13
+ value: Field;
14
+ counter: u32;
15
+ }
16
+
17
+ export interface GrumpkinPoint {
18
+ x: Field;
19
+ y: Field;
20
+ }
21
+
22
+ export interface GrumpkinPrivateKey {
23
+ high: Field;
24
+ low: Field;
25
+ }
26
+
27
+ export interface AztecAddress {
28
+ inner: Field;
29
+ }
30
+
31
+ export interface NullifierKeyValidationRequestContext {
32
+ public_key: GrumpkinPoint;
33
+ secret_key: GrumpkinPrivateKey;
34
+ contract_address: AztecAddress;
35
+ }
36
+
37
+ export interface SideEffectLinkedToNoteHash {
38
+ value: Field;
39
+ note_hash: Field;
40
+ counter: u32;
41
+ }
42
+
43
+ export interface CallerContext {
44
+ msg_sender: AztecAddress;
45
+ storage_contract_address: AztecAddress;
46
+ }
47
+
48
+ export interface CallRequest {
49
+ hash: Field;
50
+ caller_contract_address: AztecAddress;
51
+ caller_context: CallerContext;
52
+ start_side_effect_counter: u32;
53
+ end_side_effect_counter: u32;
54
+ }
55
+
56
+ export interface EthAddress {
57
+ inner: Field;
58
+ }
59
+
60
+ export interface ContractClassId {
61
+ inner: Field;
62
+ }
63
+
64
+ export interface NewContractData {
65
+ contract_address: AztecAddress;
66
+ portal_contract_address: EthAddress;
67
+ contract_class_id: ContractClassId;
68
+ }
69
+
70
+ export interface PublicDataUpdateRequest {
71
+ leaf_slot: Field;
72
+ new_value: Field;
73
+ }
74
+
75
+ export interface PublicDataRead {
76
+ leaf_slot: Field;
77
+ value: Field;
78
+ }
79
+
80
+ export interface CombinedAccumulatedData {
81
+ read_requests: FixedLengthArray<SideEffect, 128>;
82
+ nullifier_key_validation_requests: FixedLengthArray<NullifierKeyValidationRequestContext, 4>;
83
+ new_commitments: FixedLengthArray<SideEffect, 64>;
84
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 64>;
85
+ private_call_stack: FixedLengthArray<CallRequest, 8>;
86
+ public_call_stack: FixedLengthArray<CallRequest, 8>;
87
+ new_l2_to_l1_msgs: FixedLengthArray<Field, 2>;
88
+ encrypted_logs_hash: FixedLengthArray<Field, 2>;
89
+ unencrypted_logs_hash: FixedLengthArray<Field, 2>;
90
+ encrypted_log_preimages_length: Field;
91
+ unencrypted_log_preimages_length: Field;
92
+ new_contracts: FixedLengthArray<NewContractData, 1>;
93
+ public_data_update_requests: FixedLengthArray<PublicDataUpdateRequest, 16>;
94
+ public_data_reads: FixedLengthArray<PublicDataRead, 16>;
95
+ }
96
+
97
+ export interface AppendOnlyTreeSnapshot {
98
+ root: Field;
99
+ next_available_leaf_index: u32;
100
+ }
101
+
102
+ export interface PartialStateReference {
103
+ note_hash_tree: AppendOnlyTreeSnapshot;
104
+ nullifier_tree: AppendOnlyTreeSnapshot;
105
+ contract_tree: AppendOnlyTreeSnapshot;
106
+ public_data_tree: AppendOnlyTreeSnapshot;
107
+ }
108
+
109
+ export interface StateReference {
110
+ l1_to_l2_message_tree: AppendOnlyTreeSnapshot;
111
+ partial: PartialStateReference;
112
+ }
113
+
114
+ export interface GlobalVariables {
115
+ chain_id: Field;
116
+ version: Field;
117
+ block_number: Field;
118
+ timestamp: Field;
119
+ coinbase: EthAddress;
120
+ fee_recipient: AztecAddress;
121
+ }
122
+
123
+ export interface Header {
124
+ last_archive: AppendOnlyTreeSnapshot;
125
+ body_hash: FixedLengthArray<Field, 2>;
126
+ state: StateReference;
127
+ global_variables: GlobalVariables;
128
+ }
129
+
130
+ export interface ContractDeploymentData {
131
+ public_key: GrumpkinPoint;
132
+ initialization_hash: Field;
133
+ contract_class_id: ContractClassId;
134
+ contract_address_salt: Field;
135
+ portal_contract_address: EthAddress;
136
+ }
137
+
138
+ export interface TxContext {
139
+ is_fee_payment_tx: boolean;
140
+ is_rebate_payment_tx: boolean;
141
+ is_contract_deployment_tx: boolean;
142
+ contract_deployment_data: ContractDeploymentData;
143
+ chain_id: Field;
144
+ version: Field;
145
+ }
146
+
147
+ export interface CombinedConstantData {
148
+ historical_header: Header;
149
+ tx_context: TxContext;
150
+ }
151
+
152
+ export interface PrivateKernelInnerCircuitPublicInputs {
153
+ aggregation_object: AggregationObject;
154
+ max_non_revertible_side_effect_counter: u32;
155
+ end: CombinedAccumulatedData;
156
+ constants: CombinedConstantData;
157
+ is_private: boolean;
158
+ }
159
+
160
+ export interface Proof {}
161
+
162
+ export interface VerificationKey {}
163
+
164
+ export interface PrivateKernelInnerData {
165
+ public_inputs: PrivateKernelInnerCircuitPublicInputs;
166
+ proof: Proof;
167
+ vk: VerificationKey;
168
+ vk_index: u32;
169
+ vk_path: FixedLengthArray<Field, 3>;
170
+ }
171
+
172
+ export interface PrivateKernelTailCircuitPrivateInputs {
173
+ previous_kernel: PrivateKernelInnerData;
174
+ sorted_new_commitments: FixedLengthArray<SideEffect, 64>;
175
+ sorted_new_commitments_indexes: FixedLengthArray<u32, 64>;
176
+ read_commitment_hints: FixedLengthArray<Field, 128>;
177
+ sorted_new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 64>;
178
+ sorted_new_nullifiers_indexes: FixedLengthArray<u32, 64>;
179
+ nullifier_commitment_hints: FixedLengthArray<Field, 64>;
180
+ master_nullifier_secret_keys: FixedLengthArray<GrumpkinPrivateKey, 4>;
181
+ }
182
+
183
+ export interface AccumulatedNonRevertibleData {
184
+ new_commitments: FixedLengthArray<SideEffect, 8>;
185
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 8>;
186
+ public_call_stack: FixedLengthArray<CallRequest, 2>;
187
+ }
188
+
189
+ export interface FinalAccumulatedData {
190
+ new_commitments: FixedLengthArray<SideEffect, 64>;
191
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 64>;
192
+ private_call_stack: FixedLengthArray<CallRequest, 8>;
193
+ public_call_stack: FixedLengthArray<CallRequest, 8>;
194
+ new_l2_to_l1_msgs: FixedLengthArray<Field, 2>;
195
+ encrypted_logs_hash: FixedLengthArray<Field, 2>;
196
+ unencrypted_logs_hash: FixedLengthArray<Field, 2>;
197
+ encrypted_log_preimages_length: Field;
198
+ unencrypted_log_preimages_length: Field;
199
+ new_contracts: FixedLengthArray<NewContractData, 1>;
200
+ }
201
+
202
+ export interface PrivateKernelTailCircuitPublicInputs {
203
+ aggregation_object: AggregationObject;
204
+ end_non_revertible: AccumulatedNonRevertibleData;
205
+ end: FinalAccumulatedData;
206
+ constants: CombinedConstantData;
207
+ is_private: boolean;
208
+ }
209
+
210
+ export type ReturnType = PrivateKernelTailCircuitPublicInputs;
211
+
212
+ export interface InputType {
213
+ input: PrivateKernelTailCircuitPrivateInputs;
214
+ }
@@ -0,0 +1,250 @@
1
+ /* Autogenerated file, do not edit! */
2
+
3
+ /* eslint-disable */
4
+
5
+ export type FixedLengthArray<T, L extends number> = L extends 0 ? never[] : T[] & { length: L };
6
+
7
+ export type Field = string;
8
+ export type u32 = string;
9
+
10
+ export interface AggregationObject {}
11
+
12
+ export interface SideEffect {
13
+ value: Field;
14
+ counter: u32;
15
+ }
16
+
17
+ export interface SideEffectLinkedToNoteHash {
18
+ value: Field;
19
+ note_hash: Field;
20
+ counter: u32;
21
+ }
22
+
23
+ export interface AztecAddress {
24
+ inner: Field;
25
+ }
26
+
27
+ export interface CallerContext {
28
+ msg_sender: AztecAddress;
29
+ storage_contract_address: AztecAddress;
30
+ }
31
+
32
+ export interface CallRequest {
33
+ hash: Field;
34
+ caller_contract_address: AztecAddress;
35
+ caller_context: CallerContext;
36
+ start_side_effect_counter: u32;
37
+ end_side_effect_counter: u32;
38
+ }
39
+
40
+ export interface AccumulatedNonRevertibleData {
41
+ new_commitments: FixedLengthArray<SideEffect, 8>;
42
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 8>;
43
+ public_call_stack: FixedLengthArray<CallRequest, 2>;
44
+ }
45
+
46
+ export interface GrumpkinPoint {
47
+ x: Field;
48
+ y: Field;
49
+ }
50
+
51
+ export interface GrumpkinPrivateKey {
52
+ high: Field;
53
+ low: Field;
54
+ }
55
+
56
+ export interface NullifierKeyValidationRequestContext {
57
+ public_key: GrumpkinPoint;
58
+ secret_key: GrumpkinPrivateKey;
59
+ contract_address: AztecAddress;
60
+ }
61
+
62
+ export interface EthAddress {
63
+ inner: Field;
64
+ }
65
+
66
+ export interface ContractClassId {
67
+ inner: Field;
68
+ }
69
+
70
+ export interface NewContractData {
71
+ contract_address: AztecAddress;
72
+ portal_contract_address: EthAddress;
73
+ contract_class_id: ContractClassId;
74
+ }
75
+
76
+ export interface PublicDataUpdateRequest {
77
+ leaf_slot: Field;
78
+ new_value: Field;
79
+ }
80
+
81
+ export interface PublicDataRead {
82
+ leaf_slot: Field;
83
+ value: Field;
84
+ }
85
+
86
+ export interface CombinedAccumulatedData {
87
+ read_requests: FixedLengthArray<SideEffect, 128>;
88
+ nullifier_key_validation_requests: FixedLengthArray<NullifierKeyValidationRequestContext, 4>;
89
+ new_commitments: FixedLengthArray<SideEffect, 64>;
90
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 64>;
91
+ private_call_stack: FixedLengthArray<CallRequest, 8>;
92
+ public_call_stack: FixedLengthArray<CallRequest, 8>;
93
+ new_l2_to_l1_msgs: FixedLengthArray<Field, 2>;
94
+ encrypted_logs_hash: FixedLengthArray<Field, 2>;
95
+ unencrypted_logs_hash: FixedLengthArray<Field, 2>;
96
+ encrypted_log_preimages_length: Field;
97
+ unencrypted_log_preimages_length: Field;
98
+ new_contracts: FixedLengthArray<NewContractData, 1>;
99
+ public_data_update_requests: FixedLengthArray<PublicDataUpdateRequest, 16>;
100
+ public_data_reads: FixedLengthArray<PublicDataRead, 16>;
101
+ }
102
+
103
+ export interface AppendOnlyTreeSnapshot {
104
+ root: Field;
105
+ next_available_leaf_index: u32;
106
+ }
107
+
108
+ export interface PartialStateReference {
109
+ note_hash_tree: AppendOnlyTreeSnapshot;
110
+ nullifier_tree: AppendOnlyTreeSnapshot;
111
+ contract_tree: AppendOnlyTreeSnapshot;
112
+ public_data_tree: AppendOnlyTreeSnapshot;
113
+ }
114
+
115
+ export interface StateReference {
116
+ l1_to_l2_message_tree: AppendOnlyTreeSnapshot;
117
+ partial: PartialStateReference;
118
+ }
119
+
120
+ export interface GlobalVariables {
121
+ chain_id: Field;
122
+ version: Field;
123
+ block_number: Field;
124
+ timestamp: Field;
125
+ coinbase: EthAddress;
126
+ fee_recipient: AztecAddress;
127
+ }
128
+
129
+ export interface Header {
130
+ last_archive: AppendOnlyTreeSnapshot;
131
+ body_hash: FixedLengthArray<Field, 2>;
132
+ state: StateReference;
133
+ global_variables: GlobalVariables;
134
+ }
135
+
136
+ export interface ContractDeploymentData {
137
+ public_key: GrumpkinPoint;
138
+ initialization_hash: Field;
139
+ contract_class_id: ContractClassId;
140
+ contract_address_salt: Field;
141
+ portal_contract_address: EthAddress;
142
+ }
143
+
144
+ export interface TxContext {
145
+ is_fee_payment_tx: boolean;
146
+ is_rebate_payment_tx: boolean;
147
+ is_contract_deployment_tx: boolean;
148
+ contract_deployment_data: ContractDeploymentData;
149
+ chain_id: Field;
150
+ version: Field;
151
+ }
152
+
153
+ export interface CombinedConstantData {
154
+ historical_header: Header;
155
+ tx_context: TxContext;
156
+ }
157
+
158
+ export interface PublicKernelCircuitPublicInputs {
159
+ aggregation_object: AggregationObject;
160
+ end_non_revertible: AccumulatedNonRevertibleData;
161
+ end: CombinedAccumulatedData;
162
+ constants: CombinedConstantData;
163
+ is_private: boolean;
164
+ }
165
+
166
+ export interface Proof {}
167
+
168
+ export interface VerificationKey {}
169
+
170
+ export interface PublicKernelData {
171
+ public_inputs: PublicKernelCircuitPublicInputs;
172
+ proof: Proof;
173
+ vk: VerificationKey;
174
+ vk_index: u32;
175
+ vk_path: FixedLengthArray<Field, 3>;
176
+ }
177
+
178
+ export interface FunctionSelector {
179
+ inner: u32;
180
+ }
181
+
182
+ export interface CallContext {
183
+ msg_sender: AztecAddress;
184
+ storage_contract_address: AztecAddress;
185
+ portal_contract_address: EthAddress;
186
+ function_selector: FunctionSelector;
187
+ is_delegate_call: boolean;
188
+ is_static_call: boolean;
189
+ is_contract_deployment: boolean;
190
+ start_side_effect_counter: u32;
191
+ }
192
+
193
+ export interface StorageUpdateRequest {
194
+ storage_slot: Field;
195
+ new_value: Field;
196
+ }
197
+
198
+ export interface StorageRead {
199
+ storage_slot: Field;
200
+ current_value: Field;
201
+ }
202
+
203
+ export interface PublicCircuitPublicInputs {
204
+ call_context: CallContext;
205
+ args_hash: Field;
206
+ return_values: FixedLengthArray<Field, 4>;
207
+ contract_storage_update_requests: FixedLengthArray<StorageUpdateRequest, 16>;
208
+ contract_storage_reads: FixedLengthArray<StorageRead, 16>;
209
+ public_call_stack_hashes: FixedLengthArray<Field, 4>;
210
+ new_commitments: FixedLengthArray<SideEffect, 16>;
211
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 16>;
212
+ new_l2_to_l1_msgs: FixedLengthArray<Field, 2>;
213
+ unencrypted_logs_hash: FixedLengthArray<Field, 2>;
214
+ unencrypted_log_preimages_length: Field;
215
+ historical_header: Header;
216
+ prover_address: AztecAddress;
217
+ }
218
+
219
+ export interface FunctionData {
220
+ selector: FunctionSelector;
221
+ is_internal: boolean;
222
+ is_private: boolean;
223
+ is_constructor: boolean;
224
+ }
225
+
226
+ export interface PublicCallStackItem {
227
+ contract_address: AztecAddress;
228
+ public_inputs: PublicCircuitPublicInputs;
229
+ function_data: FunctionData;
230
+ is_execution_request: boolean;
231
+ }
232
+
233
+ export interface PublicCallData {
234
+ call_stack_item: PublicCallStackItem;
235
+ public_call_stack: FixedLengthArray<CallRequest, 4>;
236
+ proof: Proof;
237
+ portal_contract_address: EthAddress;
238
+ bytecode_hash: Field;
239
+ }
240
+
241
+ export interface PublicKernelAppLogicCircuitPrivateInputs {
242
+ previous_kernel: PublicKernelData;
243
+ public_call: PublicCallData;
244
+ }
245
+
246
+ export type ReturnType = PublicKernelCircuitPublicInputs;
247
+
248
+ export interface InputType {
249
+ input: PublicKernelAppLogicCircuitPrivateInputs;
250
+ }
@@ -0,0 +1,250 @@
1
+ /* Autogenerated file, do not edit! */
2
+
3
+ /* eslint-disable */
4
+
5
+ export type FixedLengthArray<T, L extends number> = L extends 0 ? never[] : T[] & { length: L };
6
+
7
+ export type Field = string;
8
+ export type u32 = string;
9
+
10
+ export interface AggregationObject {}
11
+
12
+ export interface SideEffect {
13
+ value: Field;
14
+ counter: u32;
15
+ }
16
+
17
+ export interface SideEffectLinkedToNoteHash {
18
+ value: Field;
19
+ note_hash: Field;
20
+ counter: u32;
21
+ }
22
+
23
+ export interface AztecAddress {
24
+ inner: Field;
25
+ }
26
+
27
+ export interface CallerContext {
28
+ msg_sender: AztecAddress;
29
+ storage_contract_address: AztecAddress;
30
+ }
31
+
32
+ export interface CallRequest {
33
+ hash: Field;
34
+ caller_contract_address: AztecAddress;
35
+ caller_context: CallerContext;
36
+ start_side_effect_counter: u32;
37
+ end_side_effect_counter: u32;
38
+ }
39
+
40
+ export interface AccumulatedNonRevertibleData {
41
+ new_commitments: FixedLengthArray<SideEffect, 8>;
42
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 8>;
43
+ public_call_stack: FixedLengthArray<CallRequest, 2>;
44
+ }
45
+
46
+ export interface GrumpkinPoint {
47
+ x: Field;
48
+ y: Field;
49
+ }
50
+
51
+ export interface GrumpkinPrivateKey {
52
+ high: Field;
53
+ low: Field;
54
+ }
55
+
56
+ export interface NullifierKeyValidationRequestContext {
57
+ public_key: GrumpkinPoint;
58
+ secret_key: GrumpkinPrivateKey;
59
+ contract_address: AztecAddress;
60
+ }
61
+
62
+ export interface EthAddress {
63
+ inner: Field;
64
+ }
65
+
66
+ export interface ContractClassId {
67
+ inner: Field;
68
+ }
69
+
70
+ export interface NewContractData {
71
+ contract_address: AztecAddress;
72
+ portal_contract_address: EthAddress;
73
+ contract_class_id: ContractClassId;
74
+ }
75
+
76
+ export interface PublicDataUpdateRequest {
77
+ leaf_slot: Field;
78
+ new_value: Field;
79
+ }
80
+
81
+ export interface PublicDataRead {
82
+ leaf_slot: Field;
83
+ value: Field;
84
+ }
85
+
86
+ export interface CombinedAccumulatedData {
87
+ read_requests: FixedLengthArray<SideEffect, 128>;
88
+ nullifier_key_validation_requests: FixedLengthArray<NullifierKeyValidationRequestContext, 4>;
89
+ new_commitments: FixedLengthArray<SideEffect, 64>;
90
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 64>;
91
+ private_call_stack: FixedLengthArray<CallRequest, 8>;
92
+ public_call_stack: FixedLengthArray<CallRequest, 8>;
93
+ new_l2_to_l1_msgs: FixedLengthArray<Field, 2>;
94
+ encrypted_logs_hash: FixedLengthArray<Field, 2>;
95
+ unencrypted_logs_hash: FixedLengthArray<Field, 2>;
96
+ encrypted_log_preimages_length: Field;
97
+ unencrypted_log_preimages_length: Field;
98
+ new_contracts: FixedLengthArray<NewContractData, 1>;
99
+ public_data_update_requests: FixedLengthArray<PublicDataUpdateRequest, 16>;
100
+ public_data_reads: FixedLengthArray<PublicDataRead, 16>;
101
+ }
102
+
103
+ export interface AppendOnlyTreeSnapshot {
104
+ root: Field;
105
+ next_available_leaf_index: u32;
106
+ }
107
+
108
+ export interface PartialStateReference {
109
+ note_hash_tree: AppendOnlyTreeSnapshot;
110
+ nullifier_tree: AppendOnlyTreeSnapshot;
111
+ contract_tree: AppendOnlyTreeSnapshot;
112
+ public_data_tree: AppendOnlyTreeSnapshot;
113
+ }
114
+
115
+ export interface StateReference {
116
+ l1_to_l2_message_tree: AppendOnlyTreeSnapshot;
117
+ partial: PartialStateReference;
118
+ }
119
+
120
+ export interface GlobalVariables {
121
+ chain_id: Field;
122
+ version: Field;
123
+ block_number: Field;
124
+ timestamp: Field;
125
+ coinbase: EthAddress;
126
+ fee_recipient: AztecAddress;
127
+ }
128
+
129
+ export interface Header {
130
+ last_archive: AppendOnlyTreeSnapshot;
131
+ body_hash: FixedLengthArray<Field, 2>;
132
+ state: StateReference;
133
+ global_variables: GlobalVariables;
134
+ }
135
+
136
+ export interface ContractDeploymentData {
137
+ public_key: GrumpkinPoint;
138
+ initialization_hash: Field;
139
+ contract_class_id: ContractClassId;
140
+ contract_address_salt: Field;
141
+ portal_contract_address: EthAddress;
142
+ }
143
+
144
+ export interface TxContext {
145
+ is_fee_payment_tx: boolean;
146
+ is_rebate_payment_tx: boolean;
147
+ is_contract_deployment_tx: boolean;
148
+ contract_deployment_data: ContractDeploymentData;
149
+ chain_id: Field;
150
+ version: Field;
151
+ }
152
+
153
+ export interface CombinedConstantData {
154
+ historical_header: Header;
155
+ tx_context: TxContext;
156
+ }
157
+
158
+ export interface PublicKernelCircuitPublicInputs {
159
+ aggregation_object: AggregationObject;
160
+ end_non_revertible: AccumulatedNonRevertibleData;
161
+ end: CombinedAccumulatedData;
162
+ constants: CombinedConstantData;
163
+ is_private: boolean;
164
+ }
165
+
166
+ export interface Proof {}
167
+
168
+ export interface VerificationKey {}
169
+
170
+ export interface PublicKernelData {
171
+ public_inputs: PublicKernelCircuitPublicInputs;
172
+ proof: Proof;
173
+ vk: VerificationKey;
174
+ vk_index: u32;
175
+ vk_path: FixedLengthArray<Field, 3>;
176
+ }
177
+
178
+ export interface FunctionSelector {
179
+ inner: u32;
180
+ }
181
+
182
+ export interface CallContext {
183
+ msg_sender: AztecAddress;
184
+ storage_contract_address: AztecAddress;
185
+ portal_contract_address: EthAddress;
186
+ function_selector: FunctionSelector;
187
+ is_delegate_call: boolean;
188
+ is_static_call: boolean;
189
+ is_contract_deployment: boolean;
190
+ start_side_effect_counter: u32;
191
+ }
192
+
193
+ export interface StorageUpdateRequest {
194
+ storage_slot: Field;
195
+ new_value: Field;
196
+ }
197
+
198
+ export interface StorageRead {
199
+ storage_slot: Field;
200
+ current_value: Field;
201
+ }
202
+
203
+ export interface PublicCircuitPublicInputs {
204
+ call_context: CallContext;
205
+ args_hash: Field;
206
+ return_values: FixedLengthArray<Field, 4>;
207
+ contract_storage_update_requests: FixedLengthArray<StorageUpdateRequest, 16>;
208
+ contract_storage_reads: FixedLengthArray<StorageRead, 16>;
209
+ public_call_stack_hashes: FixedLengthArray<Field, 4>;
210
+ new_commitments: FixedLengthArray<SideEffect, 16>;
211
+ new_nullifiers: FixedLengthArray<SideEffectLinkedToNoteHash, 16>;
212
+ new_l2_to_l1_msgs: FixedLengthArray<Field, 2>;
213
+ unencrypted_logs_hash: FixedLengthArray<Field, 2>;
214
+ unencrypted_log_preimages_length: Field;
215
+ historical_header: Header;
216
+ prover_address: AztecAddress;
217
+ }
218
+
219
+ export interface FunctionData {
220
+ selector: FunctionSelector;
221
+ is_internal: boolean;
222
+ is_private: boolean;
223
+ is_constructor: boolean;
224
+ }
225
+
226
+ export interface PublicCallStackItem {
227
+ contract_address: AztecAddress;
228
+ public_inputs: PublicCircuitPublicInputs;
229
+ function_data: FunctionData;
230
+ is_execution_request: boolean;
231
+ }
232
+
233
+ export interface PublicCallData {
234
+ call_stack_item: PublicCallStackItem;
235
+ public_call_stack: FixedLengthArray<CallRequest, 4>;
236
+ proof: Proof;
237
+ portal_contract_address: EthAddress;
238
+ bytecode_hash: Field;
239
+ }
240
+
241
+ export interface PublicKernelSetupCircuitPrivateInputs {
242
+ previous_kernel: PublicKernelData;
243
+ public_call: PublicCallData;
244
+ }
245
+
246
+ export type ReturnType = PublicKernelCircuitPublicInputs;
247
+
248
+ export interface InputType {
249
+ input: PublicKernelSetupCircuitPrivateInputs;
250
+ }