@aztec/stdlib 4.0.0-rc.7 → 4.0.0-rc.8

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 (45) hide show
  1. package/dest/avm/revert_code.d.ts +16 -1
  2. package/dest/avm/revert_code.d.ts.map +1 -1
  3. package/dest/avm/revert_code.js +15 -5
  4. package/dest/logs/debug_log_store.d.ts +30 -0
  5. package/dest/logs/debug_log_store.d.ts.map +1 -0
  6. package/dest/logs/debug_log_store.js +30 -0
  7. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  8. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  9. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +23 -15
  10. package/dest/logs/index.d.ts +3 -2
  11. package/dest/logs/index.d.ts.map +1 -1
  12. package/dest/logs/index.js +2 -1
  13. package/dest/logs/pre_tag.d.ts +16 -11
  14. package/dest/logs/pre_tag.d.ts.map +1 -1
  15. package/dest/logs/pre_tag.js +2 -2
  16. package/dest/logs/siloed_tag.d.ts +5 -3
  17. package/dest/logs/siloed_tag.d.ts.map +1 -1
  18. package/dest/logs/siloed_tag.js +6 -1
  19. package/dest/logs/tag.js +1 -1
  20. package/dest/tests/factories.d.ts +3 -1
  21. package/dest/tests/factories.d.ts.map +1 -1
  22. package/dest/tests/factories.js +8 -0
  23. package/dest/tx/profiling.d.ts +4 -4
  24. package/dest/tx/profiling.d.ts.map +1 -1
  25. package/dest/tx/profiling.js +3 -3
  26. package/dest/tx/public_simulation_output.d.ts +4 -2
  27. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  28. package/dest/tx/public_simulation_output.js +7 -3
  29. package/dest/tx/tx_receipt.d.ts +16 -2
  30. package/dest/tx/tx_receipt.d.ts.map +1 -1
  31. package/dest/tx/tx_receipt.js +11 -3
  32. package/package.json +9 -9
  33. package/src/avm/revert_code.ts +15 -0
  34. package/src/logs/debug_log_store.ts +54 -0
  35. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +24 -16
  36. package/src/logs/index.ts +2 -1
  37. package/src/logs/pre_tag.ts +5 -5
  38. package/src/logs/siloed_tag.ts +8 -2
  39. package/src/logs/tag.ts +1 -1
  40. package/src/tests/factories.ts +9 -0
  41. package/src/tx/profiling.ts +5 -5
  42. package/src/tx/public_simulation_output.ts +4 -0
  43. package/src/tx/tx_receipt.ts +10 -0
  44. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  45. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
@@ -4,6 +4,7 @@ import { z } from 'zod';
4
4
 
5
5
  import { RevertCode } from '../avm/revert_code.js';
6
6
  import { BlockHash } from '../block/block_hash.js';
7
+ import { DebugLog } from '../logs/debug_log.js';
7
8
  import { type ZodFor, schemas } from '../schemas/schemas.js';
8
9
  import { TxHash } from './tx_hash.js';
9
10
 
@@ -57,6 +58,12 @@ export class TxReceipt {
57
58
  public blockHash?: BlockHash,
58
59
  /** The block number in which the transaction was included. */
59
60
  public blockNumber?: BlockNumber,
61
+ /**
62
+ * Debug logs collected during public function execution. Served only when the node is in test mode and placed on
63
+ * the receipt only because it's a convenient place for it (the logs are printed out by the wallet when a mined
64
+ * tx receipt is obtained).
65
+ */
66
+ public debugLogs?: DebugLog[],
60
67
  ) {}
61
68
 
62
69
  /** Returns true if the transaction was executed successfully. */
@@ -103,6 +110,7 @@ export class TxReceipt {
103
110
  blockHash: BlockHash.schema.optional(),
104
111
  blockNumber: BlockNumberSchema.optional(),
105
112
  transactionFee: schemas.BigInt.optional(),
113
+ debugLogs: z.array(DebugLog.schema).optional(),
106
114
  })
107
115
  .transform(fields => TxReceipt.from(fields));
108
116
  }
@@ -115,6 +123,7 @@ export class TxReceipt {
115
123
  transactionFee?: bigint;
116
124
  blockHash?: BlockHash;
117
125
  blockNumber?: BlockNumber;
126
+ debugLogs?: DebugLog[];
118
127
  }) {
119
128
  return new TxReceipt(
120
129
  fields.txHash,
@@ -124,6 +133,7 @@ export class TxReceipt {
124
133
  fields.transactionFee,
125
134
  fields.blockHash,
126
135
  fields.blockNumber,
136
+ fields.debugLogs,
127
137
  );
128
138
  }
129
139
 
@@ -1,40 +0,0 @@
1
- import { type Fq, Fr } from '@aztec/foundation/curves/bn254';
2
- import { z } from 'zod';
3
- import type { AztecAddress } from '../aztec-address/index.js';
4
- import type { CompleteAddress } from '../contract/complete_address.js';
5
- /**
6
- * Directional application tagging secret used for log tagging.
7
- *
8
- * "Directional" because the derived secret is bound to the recipient
9
- * address: A→B differs from B→A even with the same participants and app.
10
- *
11
- * Note: It's a bit unfortunate that this type resides in `stdlib` as the rest of the tagging functionality resides
12
- * in `pxe/src/tagging`. We need to use this type in `PreTag` that in turn is used by other types
13
- * in stdlib hence there doesn't seem to be a good way around this.
14
- */
15
- export declare class DirectionalAppTaggingSecret {
16
- readonly value: Fr;
17
- private constructor();
18
- /**
19
- * Derives shared tagging secret and from that, the app address and recipient derives the directional app tagging
20
- * secret.
21
- *
22
- * @param localAddress - The complete address of entity A in the shared tagging secret derivation scheme
23
- * @param localIvsk - The incoming viewing secret key of entity A
24
- * @param externalAddress - The address of entity B in the shared tagging secret derivation scheme
25
- * @param app - Contract address to silo the secret to
26
- * @param recipient - Recipient of the log. Defines the "direction of the secret".
27
- * @returns The secret that can be used along with an index to compute a tag to be included in a log.
28
- */
29
- static compute(localAddress: CompleteAddress, localIvsk: Fq, externalAddress: AztecAddress, app: AztecAddress, recipient: AztecAddress): Promise<DirectionalAppTaggingSecret>;
30
- toString(): string;
31
- static fromString(str: string): DirectionalAppTaggingSecret;
32
- }
33
- export declare const DirectionalAppTaggingSecretSchema: z.ZodObject<{
34
- value: z.ZodType<Fr, any, string>;
35
- }, "strip", z.ZodTypeAny, {
36
- value: Fr;
37
- }, {
38
- value: string;
39
- }>;
40
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aW9uYWxfYXBwX3RhZ2dpbmdfc2VjcmV0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbG9ncy9kaXJlY3Rpb25hbF9hcHBfdGFnZ2luZ19zZWNyZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLEtBQUssRUFBRSxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRzdELE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEIsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDOUQsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFHdkU7Ozs7Ozs7OztHQVNHO0FBQ0gscUJBQWEsMkJBQTJCO2FBQ0YsS0FBSyxFQUFFLEVBQUU7SUFBN0MsT0FBTyxlQUEwQztJQUVqRDs7Ozs7Ozs7OztPQVVHO0lBQ0gsT0FBYSxPQUFPLENBQ2xCLFlBQVksRUFBRSxlQUFlLEVBQzdCLFNBQVMsRUFBRSxFQUFFLEVBQ2IsZUFBZSxFQUFFLFlBQVksRUFDN0IsR0FBRyxFQUFFLFlBQVksRUFDakIsU0FBUyxFQUFFLFlBQVksR0FDdEIsT0FBTyxDQUFDLDJCQUEyQixDQUFDLENBTXRDO0lBRUQsUUFBUSxJQUFJLE1BQU0sQ0FFakI7SUFFRCxNQUFNLENBQUMsVUFBVSxDQUFDLEdBQUcsRUFBRSxNQUFNLEdBQUcsMkJBQTJCLENBRTFEO0NBQ0Y7QUFvQkQsZUFBTyxNQUFNLGlDQUFpQzs7Ozs7O0VBRTVDLENBQUMifQ==
@@ -1 +0,0 @@
1
- {"version":3,"file":"directional_app_tagging_secret.d.ts","sourceRoot":"","sources":["../../src/logs/directional_app_tagging_secret.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE;;;;;;;;;GASG;AACH,qBAAa,2BAA2B;aACF,KAAK,EAAE,EAAE;IAA7C,OAAO,eAA0C;IAEjD;;;;;;;;;;OAUG;IACH,OAAa,OAAO,CAClB,YAAY,EAAE,eAAe,EAC7B,SAAS,EAAE,EAAE,EACb,eAAe,EAAE,YAAY,EAC7B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,2BAA2B,CAAC,CAMtC;IAED,QAAQ,IAAI,MAAM,CAEjB;IAED,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,2BAA2B,CAE1D;CACF;AAoBD,eAAO,MAAM,iCAAiC;;;;;;EAE5C,CAAC"}