@aztec/stdlib 3.0.0-nightly.20251014 → 3.0.0-nightly.20251015

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 (48) hide show
  1. package/dest/abi/abi.d.ts +8 -8
  2. package/dest/abi/abi.js +1 -1
  3. package/dest/abi/function_call.d.ts +7 -2
  4. package/dest/abi/function_call.d.ts.map +1 -1
  5. package/dest/abi/function_call.js +6 -2
  6. package/dest/avm/avm.d.ts +54 -54
  7. package/dest/avm/avm_proving_request.d.ts +30 -30
  8. package/dest/contract/interfaces/contract_instance.d.ts +2 -2
  9. package/dest/interfaces/proving-job.d.ts +30 -30
  10. package/dest/kernel/private_circuit_public_inputs.d.ts +1 -1
  11. package/dest/kernel/private_to_public_accumulated_data.d.ts +1 -1
  12. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +1 -1
  13. package/dest/keys/derivation.d.ts +0 -2
  14. package/dest/keys/derivation.d.ts.map +1 -1
  15. package/dest/keys/derivation.js +1 -21
  16. package/dest/logs/directional_app_tagging_secret.d.ts +40 -0
  17. package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -0
  18. package/dest/logs/directional_app_tagging_secret.js +64 -0
  19. package/dest/logs/index.d.ts +1 -0
  20. package/dest/logs/index.d.ts.map +1 -1
  21. package/dest/logs/index.js +1 -0
  22. package/dest/logs/indexed_tagging_secret.d.ts +32 -26
  23. package/dest/logs/indexed_tagging_secret.d.ts.map +1 -1
  24. package/dest/logs/indexed_tagging_secret.js +7 -50
  25. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +1 -0
  26. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  27. package/dest/rollup/checkpoint_rollup_public_inputs.js +3 -0
  28. package/dest/tests/factories.d.ts +2 -1
  29. package/dest/tests/factories.d.ts.map +1 -1
  30. package/dest/tests/factories.js +15 -9
  31. package/dest/tests/mocks.d.ts +3 -1
  32. package/dest/tests/mocks.d.ts.map +1 -1
  33. package/dest/tests/mocks.js +4 -2
  34. package/dest/tx/private_execution_result.d.ts +5 -0
  35. package/dest/tx/private_execution_result.d.ts.map +1 -1
  36. package/dest/tx/private_execution_result.js +7 -3
  37. package/dest/tx/simulated_tx.d.ts +3 -3
  38. package/package.json +8 -8
  39. package/src/abi/abi.ts +1 -1
  40. package/src/abi/function_call.ts +5 -1
  41. package/src/keys/derivation.ts +1 -26
  42. package/src/logs/directional_app_tagging_secret.ts +78 -0
  43. package/src/logs/index.ts +1 -0
  44. package/src/logs/indexed_tagging_secret.ts +21 -44
  45. package/src/rollup/checkpoint_rollup_public_inputs.ts +4 -0
  46. package/src/tests/factories.ts +11 -4
  47. package/src/tests/mocks.ts +5 -0
  48. package/src/tx/private_execution_result.ts +6 -0
@@ -14,6 +14,7 @@ import { computeContractAddressFromInstance } from '../contract/contract_address
14
14
  import { getContractClassFromArtifact } from '../contract/contract_class.js';
15
15
  import { SerializableContractInstance } from '../contract/contract_instance.js';
16
16
  import type { ContractInstanceWithAddress } from '../contract/index.js';
17
+ import { Gas } from '../gas/gas.js';
17
18
  import { GasFees } from '../gas/gas_fees.js';
18
19
  import { GasSettings } from '../gas/gas_settings.js';
19
20
  import { Nullifier } from '../kernel/nullifier.js';
@@ -84,6 +85,7 @@ export const mockTx = async (
84
85
  feePayer,
85
86
  clientIvcProof = ClientIvcProof.random(),
86
87
  maxPriorityFeesPerGas,
88
+ gasUsed = Gas.empty(),
87
89
  chainId = Fr.ZERO,
88
90
  version = Fr.ZERO,
89
91
  vkTreeRoot = Fr.ZERO,
@@ -97,6 +99,7 @@ export const mockTx = async (
97
99
  feePayer?: AztecAddress;
98
100
  clientIvcProof?: ClientIvcProof;
99
101
  maxPriorityFeesPerGas?: GasFees;
102
+ gasUsed?: Gas;
100
103
  chainId?: Fr;
101
104
  version?: Fr;
102
105
  vkTreeRoot?: Fr;
@@ -115,6 +118,7 @@ export const mockTx = async (
115
118
  maxPriorityFeesPerGas,
116
119
  });
117
120
  data.feePayer = feePayer ?? (await AztecAddress.random());
121
+ data.gasUsed = gasUsed;
118
122
  data.constants.txContext.chainId = chainId;
119
123
  data.constants.txContext.version = version;
120
124
  data.constants.vkTreeRoot = vkTreeRoot;
@@ -184,6 +188,7 @@ const emptyPrivateCallExecutionResult = () =>
184
188
  [],
185
189
  [],
186
190
  [],
191
+ [],
187
192
  );
188
193
 
189
194
  const emptyPrivateExecutionResult = () => new PrivateExecutionResult(emptyPrivateCallExecutionResult(), Fr.zero(), []);
@@ -10,6 +10,7 @@ import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inp
10
10
  import type { IsEmpty } from '../kernel/utils/interfaces.js';
11
11
  import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
12
12
  import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
13
+ import { type IndexedTaggingSecret, IndexedTaggingSecretSchema } from '../logs/indexed_tagging_secret.js';
13
14
  import { Note } from '../note/note.js';
14
15
  import { type ZodFor, mapSchema, schemas } from '../schemas/index.js';
15
16
  import type { UInt32 } from '../types/index.js';
@@ -135,6 +136,8 @@ export class PrivateCallExecutionResult {
135
136
  public returnValues: Fr[],
136
137
  /** The offchain effects emitted during execution of this function call via the `emit_offchain_effect` oracle. */
137
138
  public offchainEffects: { data: Fr[] }[],
139
+ /** The tagging indexes incremented by this execution along with the directional app tagging secrets. */
140
+ public indexedTaggingSecrets: IndexedTaggingSecret[],
138
141
  /** The nested executions. */
139
142
  public nestedExecutionResults: PrivateCallExecutionResult[],
140
143
  /**
@@ -158,6 +161,7 @@ export class PrivateCallExecutionResult {
158
161
  noteHashNullifierCounterMap: mapSchema(z.coerce.number(), z.number()),
159
162
  returnValues: z.array(schemas.Fr),
160
163
  offchainEffects: z.array(z.object({ data: z.array(schemas.Fr) })),
164
+ indexedTaggingSecrets: z.array(IndexedTaggingSecretSchema),
161
165
  nestedExecutionResults: z.array(z.lazy(() => PrivateCallExecutionResult.schema)),
162
166
  contractClassLogs: z.array(CountedContractClassLog.schema),
163
167
  })
@@ -175,6 +179,7 @@ export class PrivateCallExecutionResult {
175
179
  fields.noteHashNullifierCounterMap,
176
180
  fields.returnValues,
177
181
  fields.offchainEffects,
182
+ fields.indexedTaggingSecrets,
178
183
  fields.nestedExecutionResults,
179
184
  fields.contractClassLogs,
180
185
  );
@@ -195,6 +200,7 @@ export class PrivateCallExecutionResult {
195
200
  data: [Fr.random()],
196
201
  },
197
202
  ],
203
+ [],
198
204
  await timesParallel(nested, () => PrivateCallExecutionResult.random(0)),
199
205
  [new CountedContractClassLog(await ContractClassLog.random(), randomInt(10))],
200
206
  );