@aztec-labs/pxe 6.0.0-rc.1 → 6.0.0-rc.2

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 (65) hide show
  1. package/dest/contract_function_simulator/contract_function_simulator.d.ts +1 -1
  2. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  3. package/dest/contract_function_simulator/contract_function_simulator.js +7 -1
  4. package/dest/contract_function_simulator/index.d.ts +3 -1
  5. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  6. package/dest/contract_function_simulator/noir-structs/note_origin.d.ts +10 -0
  7. package/dest/contract_function_simulator/noir-structs/note_origin.d.ts.map +1 -0
  8. package/dest/contract_function_simulator/noir-structs/note_origin.js +1 -0
  9. package/dest/contract_function_simulator/noir-structs/nullifier_status.d.ts +9 -0
  10. package/dest/contract_function_simulator/noir-structs/nullifier_status.d.ts.map +1 -0
  11. package/dest/contract_function_simulator/noir-structs/nullifier_status.js +1 -0
  12. package/dest/contract_function_simulator/oracle/acir_callback.d.ts +5 -2
  13. package/dest/contract_function_simulator/oracle/acir_callback.d.ts.map +1 -1
  14. package/dest/contract_function_simulator/oracle/acir_callback.js +10 -10
  15. package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +4 -3
  16. package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -1
  17. package/dest/contract_function_simulator/oracle/oracle_registry.js +23 -6
  18. package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +7 -3
  19. package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts.map +1 -1
  20. package/dest/contract_function_simulator/oracle/oracle_type_mappings.js +21 -1
  21. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +3 -2
  22. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  23. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +16 -8
  24. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +17 -9
  25. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  26. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +44 -13
  27. package/dest/operation_queue.d.ts +6 -1
  28. package/dest/operation_queue.d.ts.map +1 -1
  29. package/dest/operation_queue.js +33 -3
  30. package/dest/oracle_version.d.ts +3 -3
  31. package/dest/oracle_version.js +3 -3
  32. package/dest/storage/fact_store/fact_service.d.ts +3 -3
  33. package/dest/storage/fact_store/fact_service.d.ts.map +1 -1
  34. package/dest/storage/fact_store/fact_store.d.ts +3 -3
  35. package/dest/storage/fact_store/fact_store.d.ts.map +1 -1
  36. package/dest/storage/fact_store/fact_store_keys.d.ts +3 -5
  37. package/dest/storage/fact_store/fact_store_keys.d.ts.map +1 -1
  38. package/dest/storage/fact_store/index.d.ts +2 -2
  39. package/dest/storage/fact_store/index.d.ts.map +1 -1
  40. package/dest/storage/fact_store/origin_state.d.ts +3 -3
  41. package/dest/storage/fact_store/origin_state.d.ts.map +1 -1
  42. package/dest/storage/fact_store/stored_fact.d.ts +5 -5
  43. package/dest/storage/fact_store/stored_fact.d.ts.map +1 -1
  44. package/package.json +18 -18
  45. package/src/contract_function_simulator/contract_function_simulator.ts +6 -1
  46. package/src/contract_function_simulator/index.ts +2 -0
  47. package/src/contract_function_simulator/noir-structs/note_origin.ts +11 -0
  48. package/src/contract_function_simulator/noir-structs/nullifier_status.ts +9 -0
  49. package/src/contract_function_simulator/oracle/acir_callback.ts +25 -14
  50. package/src/contract_function_simulator/oracle/oracle_registry.ts +16 -5
  51. package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +14 -2
  52. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +13 -10
  53. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +65 -15
  54. package/src/operation_queue.ts +36 -5
  55. package/src/oracle_version.ts +3 -3
  56. package/src/storage/fact_store/fact_service.ts +2 -2
  57. package/src/storage/fact_store/fact_store.ts +2 -2
  58. package/src/storage/fact_store/fact_store_keys.ts +2 -4
  59. package/src/storage/fact_store/index.ts +1 -1
  60. package/src/storage/fact_store/origin_state.ts +2 -2
  61. package/src/storage/fact_store/stored_fact.ts +3 -3
  62. package/dest/contract_function_simulator/noir-structs/origin_block.d.ts +0 -11
  63. package/dest/contract_function_simulator/noir-structs/origin_block.d.ts.map +0 -1
  64. package/dest/contract_function_simulator/noir-structs/origin_block.js +0 -5
  65. package/src/contract_function_simulator/noir-structs/origin_block.ts +0 -8
@@ -5,7 +5,7 @@ import type { AztecAsyncKVStore, AztecAsyncMap, AztecAsyncMultiMap } from '@azte
5
5
 
6
6
  import { BaseStagingStore, type ReadonlyDb } from '../base_staging_store.js';
7
7
  import type { ChangeSetId } from '../staged_write_coordinator.js';
8
- import { FactCollectionKey, type FactCollectionTypeKey, type OriginBlock } from './fact_store_keys.js';
8
+ import { type BlockReference, FactCollectionKey, type FactCollectionTypeKey } from './fact_store_keys.js';
9
9
  import { type Fact, StoredFact, factKeyStrOf } from './stored_fact.js';
10
10
 
11
11
  type BlockNum = number;
@@ -82,7 +82,7 @@ export class FactStore extends BaseStagingStore<FactStoreChangeSet, FactStoreDb>
82
82
  factCollectionKey: FactCollectionKey,
83
83
  factTypeId: Fr,
84
84
  payload: Fr[],
85
- originBlock: OriginBlock | undefined,
85
+ originBlock: BlockReference | undefined,
86
86
  changeSetId: ChangeSetId,
87
87
  ): Promise<void> {
88
88
  return this.withChangeSet(changeSetId, changeSet => {
@@ -2,10 +2,8 @@ import { Fr } from '@aztec-labs/foundation/curves/bn254';
2
2
  import type { FieldsOf } from '@aztec-labs/foundation/types';
3
3
  import { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
4
4
 
5
- /**
6
- * The block a retractable fact originates from.
7
- */
8
- export type OriginBlock = { blockNumber: number; blockHash: Fr };
5
+ /** A block, identified by its number and hash. */
6
+ export type BlockReference = { blockNumber: number; blockHash: Fr };
9
7
 
10
8
  /** Facts are always tied to a real scope; the zero address is not a valid fact scope. */
11
9
  function assertNonZeroScope(scope: AztecAddress): void {
@@ -1,6 +1,6 @@
1
1
  export { FactStore, type FactCollection } from './fact_store.js';
2
2
  export { FactService } from './fact_service.js';
3
- export { FactCollectionKey, FactCollectionTypeKey, type OriginBlock } from './fact_store_keys.js';
3
+ export { FactCollectionKey, FactCollectionTypeKey, type BlockReference } from './fact_store_keys.js';
4
4
  export type { Fact } from './stored_fact.js';
5
5
  export {
6
6
  OriginBlockState,
@@ -1,7 +1,7 @@
1
1
  import type { Fr } from '@aztec-labs/foundation/curves/bn254';
2
2
  import type { L2Tips } from '@aztec-labs/stdlib/block';
3
3
 
4
- import type { FactCollectionKey, OriginBlock } from './fact_store_keys.js';
4
+ import type { BlockReference, FactCollectionKey } from './fact_store_keys.js';
5
5
  import type { Fact } from './stored_fact.js';
6
6
 
7
7
  /**
@@ -49,7 +49,7 @@ export function anchoredTipBlockNumbers(tips: L2Tips, anchorBlockNumber: number)
49
49
  }
50
50
 
51
51
  /** A retractable fact's origin block annotated with that block's current chain state. */
52
- export type RetractableFactOrigin = OriginBlock & { blockState: OriginBlockState };
52
+ export type RetractableFactOrigin = BlockReference & { blockState: OriginBlockState };
53
53
 
54
54
  /** A fact enriched with origin-block state. `originBlock` is undefined for a non-retractable fact. */
55
55
  export type FactWithOriginState = { factTypeId: Fr; payload: Fr[]; originBlock: RetractableFactOrigin | undefined };
@@ -3,10 +3,10 @@ import { Fr } from '@aztec-labs/foundation/curves/bn254';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec-labs/foundation/serialize';
4
4
  import { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
5
5
 
6
- import { FactCollectionKey, type OriginBlock } from './fact_store_keys.js';
6
+ import { type BlockReference, FactCollectionKey } from './fact_store_keys.js';
7
7
 
8
8
  /** A fact as returned by the fact store. */
9
- export type Fact = { factTypeId: Fr; payload: Fr[]; originBlock: OriginBlock | undefined };
9
+ export type Fact = { factTypeId: Fr; payload: Fr[]; originBlock: BlockReference | undefined };
10
10
 
11
11
  /**
12
12
  * A single immutable fact belonging to a fact collection.
@@ -16,7 +16,7 @@ export class StoredFact {
16
16
  public readonly factCollectionKey: FactCollectionKey,
17
17
  public readonly factTypeId: Fr,
18
18
  public readonly payload: Fr[],
19
- public readonly originBlock: OriginBlock | undefined,
19
+ public readonly originBlock: BlockReference | undefined,
20
20
  ) {}
21
21
 
22
22
  /** Whether this fact is deleted on block pruning (true) or survives reorgs (false). */
@@ -1,11 +0,0 @@
1
- import type { Fr } from '@aztec-labs/foundation/curves/bn254';
2
- /**
3
- * The block a retractable fact originates from.
4
- *
5
- * A TS version of the `OriginBlock` struct in `facts/mod.nr`.
6
- */
7
- export type OriginBlock = {
8
- blockNumber: number;
9
- blockHash: Fr;
10
- };
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JpZ2luX2Jsb2NrLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9vcmlnaW5fYmxvY2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFFOUQ7Ozs7R0FJRztBQUNILE1BQU0sTUFBTSxXQUFXLEdBQUc7SUFBRSxXQUFXLEVBQUUsTUFBTSxDQUFDO0lBQUMsU0FBUyxFQUFFLEVBQUUsQ0FBQTtDQUFFLENBQUMifQ==
@@ -1 +0,0 @@
1
- {"version":3,"file":"origin_block.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/origin_block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,EAAE,CAAA;CAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * The block a retractable fact originates from.
3
- *
4
- * A TS version of the `OriginBlock` struct in `facts/mod.nr`.
5
- */ export { };
@@ -1,8 +0,0 @@
1
- import type { Fr } from '@aztec-labs/foundation/curves/bn254';
2
-
3
- /**
4
- * The block a retractable fact originates from.
5
- *
6
- * A TS version of the `OriginBlock` struct in `facts/mod.nr`.
7
- */
8
- export type OriginBlock = { blockNumber: number; blockHash: Fr };