@aztec-labs/pxe 6.0.0-rc.3 → 6.0.0-rc.4
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/dest/config/index.d.ts +1 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +2 -1
- package/dest/contract_function_simulator/index.d.ts +2 -2
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -1
- package/dest/contract_function_simulator/noir-structs/fact_collection.d.ts +6 -12
- package/dest/contract_function_simulator/noir-structs/fact_collection.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/fact_collection.js +1 -15
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +5 -5
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_registry.js +5 -5
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +3 -2
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.js +16 -2
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +1 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +6 -6
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +3 -2
- package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +1 -0
- package/dest/entrypoints/server/circuit_recording/simulator_recorder_wrapper.d.ts +1 -1
- package/dest/entrypoints/server/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -1
- package/dest/entrypoints/server/circuit_recording/simulator_recorder_wrapper.js +1 -0
- package/dest/entrypoints/server/utils.d.ts +1 -1
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +3 -1
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.js +3 -3
- package/dest/private_kernel/batch_planner.d.ts +1 -1
- package/dest/private_kernel/batch_planner.d.ts.map +1 -1
- package/dest/private_kernel/batch_planner.js +1 -0
- package/dest/private_kernel/hints/test_utils.d.ts +1 -1
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -1
- package/dest/private_kernel/hints/test_utils.js +1 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +1 -0
- package/dest/pxe.d.ts +27 -2
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +201 -128
- package/dest/storage/address_store/address_store.d.ts +1 -1
- package/dest/storage/address_store/address_store.d.ts.map +1 -1
- package/dest/storage/address_store/address_store.js +1 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts +1 -1
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts.map +1 -1
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.js +1 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts +1 -1
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts.map +1 -1
- package/dest/storage/backwards_compatibility_tests/schema_tests.js +23 -1
- package/dest/storage/contract_store/contract_store.d.ts +2 -1
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +1 -0
- package/dest/storage/fact_store/fact_scope.d.ts +19 -0
- package/dest/storage/fact_store/fact_scope.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_scope.js +37 -0
- package/dest/storage/fact_store/fact_service.d.ts +2 -2
- package/dest/storage/fact_store/fact_service.d.ts.map +1 -1
- package/dest/storage/fact_store/fact_service.js +19 -5
- package/dest/storage/fact_store/fact_store_keys.d.ts +6 -5
- package/dest/storage/fact_store/fact_store_keys.d.ts.map +1 -1
- package/dest/storage/fact_store/fact_store_keys.js +24 -8
- package/dest/storage/fact_store/index.d.ts +2 -1
- package/dest/storage/fact_store/index.d.ts.map +1 -1
- package/dest/storage/fact_store/index.js +1 -0
- package/dest/storage/fact_store/stored_fact.d.ts +9 -3
- package/dest/storage/fact_store/stored_fact.d.ts.map +1 -1
- package/dest/storage/fact_store/stored_fact.js +45 -3
- package/dest/storage/store_identity.d.ts +1 -1
- package/dest/storage/store_identity.d.ts.map +1 -1
- package/dest/storage/store_identity.js +1 -0
- package/package.json +21 -20
- package/src/config/index.ts +2 -1
- package/src/contract_function_simulator/index.ts +1 -0
- package/src/contract_function_simulator/noir-structs/fact_collection.ts +6 -22
- package/src/contract_function_simulator/oracle/oracle_registry.ts +5 -4
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +15 -1
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -0
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +8 -7
- package/src/contract_function_simulator/pick_notes.ts +1 -0
- package/src/entrypoints/server/circuit_recording/simulator_recorder_wrapper.ts +1 -0
- package/src/entrypoints/server/utils.ts +4 -2
- package/src/oracle_version.ts +3 -3
- package/src/private_kernel/batch_planner.ts +1 -0
- package/src/private_kernel/hints/test_utils.ts +1 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +1 -0
- package/src/pxe.ts +291 -189
- package/src/storage/address_store/address_store.ts +1 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/FactStore.json +20 -0
- package/src/storage/backwards_compatibility_tests/kv_store_snapshot.ts +1 -0
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +18 -1
- package/src/storage/contract_store/contract_store.ts +1 -0
- package/src/storage/fact_store/fact_scope.ts +39 -0
- package/src/storage/fact_store/fact_service.ts +20 -5
- package/src/storage/fact_store/fact_store_keys.ts +28 -15
- package/src/storage/fact_store/index.ts +1 -0
- package/src/storage/fact_store/stored_fact.ts +50 -14
- package/src/storage/store_identity.ts +1 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
2
|
+
import { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The scope a fact collection belongs to.
|
|
6
|
+
*
|
|
7
|
+
* - `account`: only executions where `account` is in scope can access the collection.
|
|
8
|
+
* - `public`: shared by all accounts, so any execution of the owning contract can access the collection.
|
|
9
|
+
*/
|
|
10
|
+
export type FactScope = { type: 'account'; account: AztecAddress } | { type: 'public' };
|
|
11
|
+
|
|
12
|
+
// Noir decodes these discriminants, so their values are part of the oracle interface.
|
|
13
|
+
const ACCOUNT = 1;
|
|
14
|
+
const PUBLIC = 2;
|
|
15
|
+
|
|
16
|
+
/** Serializes a {@link FactScope} to its Noir `[kind, account]` field layout. */
|
|
17
|
+
export function factScopeToFields(scope: FactScope): Fr[] {
|
|
18
|
+
switch (scope.type) {
|
|
19
|
+
case 'account':
|
|
20
|
+
return [new Fr(ACCOUNT), scope.account.toField()];
|
|
21
|
+
case 'public':
|
|
22
|
+
return [new Fr(PUBLIC), Fr.ZERO];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Deserializes a {@link FactScope}, rejecting malformed values. */
|
|
27
|
+
export function factScopeFromFields(kind: number, account: Fr): FactScope {
|
|
28
|
+
switch (kind) {
|
|
29
|
+
case ACCOUNT:
|
|
30
|
+
return { type: 'account', account: AztecAddress.fromFieldUnsafe(account) };
|
|
31
|
+
case PUBLIC:
|
|
32
|
+
if (!account.isZero()) {
|
|
33
|
+
throw new Error(`Public fact scope must not name an account, got ${account}`);
|
|
34
|
+
}
|
|
35
|
+
return { type: 'public' };
|
|
36
|
+
default:
|
|
37
|
+
throw new Error(`Unrecognized fact scope kind: ${kind}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
|
|
|
3
3
|
|
|
4
4
|
import { assertAllowedScope } from '../allowed_scopes.js';
|
|
5
5
|
import type { ChangeSetId } from '../staged_write_coordinator.js';
|
|
6
|
+
import type { FactScope } from './fact_scope.js';
|
|
6
7
|
import type { FactStore } from './fact_store.js';
|
|
7
8
|
import type { BlockReference, FactCollectionKey, FactCollectionTypeKey } from './fact_store_keys.js';
|
|
8
9
|
import {
|
|
@@ -17,7 +18,7 @@ import type { Fact } from './stored_fact.js';
|
|
|
17
18
|
* Wraps a {@link FactStore} with scope-based access control.
|
|
18
19
|
*
|
|
19
20
|
* Each method asserts scope validity before delegating to FactStore, gating which accounts a contract may record facts
|
|
20
|
-
* under or read facts from.
|
|
21
|
+
* under or read facts from. The public scope belongs to no account, so it is always allowed.
|
|
21
22
|
*/
|
|
22
23
|
export class FactService {
|
|
23
24
|
constructor(
|
|
@@ -32,12 +33,12 @@ export class FactService {
|
|
|
32
33
|
originBlock: BlockReference | undefined,
|
|
33
34
|
changeSetId: ChangeSetId,
|
|
34
35
|
): Promise<void> {
|
|
35
|
-
|
|
36
|
+
this.#assertAllowedFactScope(factCollectionKey.scope);
|
|
36
37
|
return this.factStore.recordFact(factCollectionKey, factTypeId, payload, originBlock, changeSetId);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
deleteFactCollection(factCollectionKey: FactCollectionKey, changeSetId: ChangeSetId): Promise<void> {
|
|
40
|
-
|
|
41
|
+
this.#assertAllowedFactScope(factCollectionKey.scope);
|
|
41
42
|
return this.factStore.deleteFactCollection(factCollectionKey, changeSetId);
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -46,7 +47,7 @@ export class FactService {
|
|
|
46
47
|
tips: TipBlockNumbers,
|
|
47
48
|
changeSetId: ChangeSetId,
|
|
48
49
|
): Promise<FactCollectionWithOriginState | undefined> {
|
|
49
|
-
|
|
50
|
+
this.#assertAllowedFactScope(factCollectionKey.scope);
|
|
50
51
|
const collection = await this.factStore.getFactCollection(factCollectionKey, changeSetId);
|
|
51
52
|
if (!collection) {
|
|
52
53
|
return undefined;
|
|
@@ -59,11 +60,25 @@ export class FactService {
|
|
|
59
60
|
tips: TipBlockNumbers,
|
|
60
61
|
changeSetId: ChangeSetId,
|
|
61
62
|
): Promise<FactCollectionWithOriginState[]> {
|
|
62
|
-
|
|
63
|
+
this.#assertAllowedFactScope(factCollectionTypeKey.scope);
|
|
63
64
|
const collections = await this.factStore.getFactCollectionsByType(factCollectionTypeKey, changeSetId);
|
|
64
65
|
return collections.map(collection => ({ key: collection.key, facts: this.#annotate(collection.facts, tips) }));
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
#assertAllowedFactScope(scope: FactScope): void {
|
|
69
|
+
switch (scope.type) {
|
|
70
|
+
case 'account':
|
|
71
|
+
assertAllowedScope(scope.account, this.allowedScopes);
|
|
72
|
+
break;
|
|
73
|
+
case 'public':
|
|
74
|
+
break;
|
|
75
|
+
default: {
|
|
76
|
+
const _exhaustive: never = scope;
|
|
77
|
+
throw new Error(`Unhandled fact scope type: ${JSON.stringify(_exhaustive)}`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
#annotate(facts: Fact[], tips: TipBlockNumbers): FactWithOriginState[] {
|
|
68
83
|
return facts.map(fact => toFactWithOriginState(fact, tips));
|
|
69
84
|
}
|
|
@@ -2,32 +2,47 @@ 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
|
+
import type { FactScope } from './fact_scope.js';
|
|
6
|
+
|
|
5
7
|
/** A block, identified by its number and hash. */
|
|
6
8
|
export type BlockReference = { blockNumber: number; blockHash: Fr };
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// Account scopes are keyed by their hex address, which can never equal this token.
|
|
11
|
+
const PUBLIC_SCOPE_KEY_PART = 'public';
|
|
12
|
+
|
|
13
|
+
function scopeToKeyPart(scope: FactScope): string {
|
|
14
|
+
switch (scope.type) {
|
|
15
|
+
case 'account':
|
|
16
|
+
return scope.account.toString();
|
|
17
|
+
case 'public':
|
|
18
|
+
return PUBLIC_SCOPE_KEY_PART;
|
|
19
|
+
default: {
|
|
20
|
+
const _exhaustive: never = scope;
|
|
21
|
+
throw new Error(`Unhandled fact scope type: ${JSON.stringify(_exhaustive)}`);
|
|
22
|
+
}
|
|
12
23
|
}
|
|
13
24
|
}
|
|
14
25
|
|
|
26
|
+
function scopeFromKeyPart(part: string): FactScope {
|
|
27
|
+
return part === PUBLIC_SCOPE_KEY_PART
|
|
28
|
+
? { type: 'public' }
|
|
29
|
+
: { type: 'account', account: AztecAddress.fromStringUnsafe(part) };
|
|
30
|
+
}
|
|
31
|
+
|
|
15
32
|
/** Identifies all fact collections of one type within a contract, for one scope. */
|
|
16
33
|
export class FactCollectionTypeKey {
|
|
17
34
|
constructor(
|
|
18
35
|
public readonly contractAddress: AztecAddress,
|
|
19
|
-
public readonly scope:
|
|
36
|
+
public readonly scope: FactScope,
|
|
20
37
|
public readonly factCollectionTypeId: Fr,
|
|
21
|
-
) {
|
|
22
|
-
assertNonZeroScope(scope);
|
|
23
|
-
}
|
|
38
|
+
) {}
|
|
24
39
|
|
|
25
40
|
static from(fields: FieldsOf<FactCollectionTypeKey>): FactCollectionTypeKey {
|
|
26
41
|
return new FactCollectionTypeKey(fields.contractAddress, fields.scope, fields.factCollectionTypeId);
|
|
27
42
|
}
|
|
28
43
|
|
|
29
44
|
toString(): string {
|
|
30
|
-
return `${this.contractAddress}:${this.scope}:${this.factCollectionTypeId}`;
|
|
45
|
+
return `${this.contractAddress}:${scopeToKeyPart(this.scope)}:${this.factCollectionTypeId}`;
|
|
31
46
|
}
|
|
32
47
|
}
|
|
33
48
|
|
|
@@ -35,12 +50,10 @@ export class FactCollectionTypeKey {
|
|
|
35
50
|
export class FactCollectionKey {
|
|
36
51
|
constructor(
|
|
37
52
|
public readonly contractAddress: AztecAddress,
|
|
38
|
-
public readonly scope:
|
|
53
|
+
public readonly scope: FactScope,
|
|
39
54
|
public readonly factCollectionTypeId: Fr,
|
|
40
55
|
public readonly factCollectionId: Fr,
|
|
41
|
-
) {
|
|
42
|
-
assertNonZeroScope(scope);
|
|
43
|
-
}
|
|
56
|
+
) {}
|
|
44
57
|
|
|
45
58
|
static from(fields: FieldsOf<FactCollectionKey>): FactCollectionKey {
|
|
46
59
|
return new FactCollectionKey(
|
|
@@ -56,7 +69,7 @@ export class FactCollectionKey {
|
|
|
56
69
|
const [contractAddress, scope, factCollectionTypeId, factCollectionId] = str.split(':');
|
|
57
70
|
return new FactCollectionKey(
|
|
58
71
|
AztecAddress.fromStringUnsafe(contractAddress),
|
|
59
|
-
|
|
72
|
+
scopeFromKeyPart(scope),
|
|
60
73
|
Fr.fromString(factCollectionTypeId),
|
|
61
74
|
Fr.fromString(factCollectionId),
|
|
62
75
|
);
|
|
@@ -68,6 +81,6 @@ export class FactCollectionKey {
|
|
|
68
81
|
}
|
|
69
82
|
|
|
70
83
|
toString(): string {
|
|
71
|
-
return `${this.contractAddress}:${this.scope}:${this.factCollectionTypeId}:${this.factCollectionId}`;
|
|
84
|
+
return `${this.contractAddress}:${scopeToKeyPart(this.scope)}:${this.factCollectionTypeId}:${this.factCollectionId}`;
|
|
72
85
|
}
|
|
73
86
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { FactStore, type FactCollection } from './fact_store.js';
|
|
2
2
|
export { FactService } from './fact_service.js';
|
|
3
|
+
export { type FactScope, factScopeFromFields, factScopeToFields } from './fact_scope.js';
|
|
3
4
|
export { FactCollectionKey, FactCollectionTypeKey, type BlockReference } from './fact_store_keys.js';
|
|
4
5
|
export type { Fact } from './stored_fact.js';
|
|
5
6
|
export {
|
|
@@ -2,7 +2,9 @@ import { sha256ToField } from '@aztec-labs/foundation/crypto/sha256';
|
|
|
2
2
|
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
|
+
import { Buffer } from 'buffer';
|
|
5
6
|
|
|
7
|
+
import type { FactScope } from './fact_scope.js';
|
|
6
8
|
import { type BlockReference, FactCollectionKey } from './fact_store_keys.js';
|
|
7
9
|
|
|
8
10
|
/** A fact as returned by the fact store. */
|
|
@@ -35,24 +37,44 @@ export class StoredFact {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
toBuffer(): Buffer {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
const { scope } = this.factCollectionKey;
|
|
41
|
+
const record = (scopeAccount: AztecAddress) =>
|
|
42
|
+
serializeToBuffer(
|
|
43
|
+
this.factCollectionKey.contractAddress,
|
|
44
|
+
scopeAccount,
|
|
45
|
+
this.factCollectionKey.factCollectionTypeId,
|
|
46
|
+
this.factCollectionKey.factCollectionId,
|
|
47
|
+
this.factTypeId,
|
|
48
|
+
this.payload.length,
|
|
49
|
+
...this.payload,
|
|
50
|
+
this.originBlock !== undefined,
|
|
51
|
+
this.originBlock ? this.originBlock.blockNumber : 0,
|
|
52
|
+
this.originBlock ? this.originBlock.blockHash : Fr.ZERO,
|
|
53
|
+
);
|
|
54
|
+
// For DB schema compatibility, account records use the schema's record layout unchanged, and public records extend
|
|
55
|
+
// it with a trailing marker instead of adding a scope kind field.
|
|
56
|
+
switch (scope.type) {
|
|
57
|
+
case 'account':
|
|
58
|
+
return record(scope.account);
|
|
59
|
+
case 'public':
|
|
60
|
+
return Buffer.concat([record(AztecAddress.ZERO), serializeToBuffer(true)]);
|
|
61
|
+
default: {
|
|
62
|
+
const _exhaustive: never = scope;
|
|
63
|
+
throw new Error(`Unhandled fact scope type: ${JSON.stringify(_exhaustive)}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
50
66
|
}
|
|
51
67
|
|
|
52
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Inverse of {@link toBuffer}.
|
|
70
|
+
*
|
|
71
|
+
* `buffer` must end where the record does, since any bytes after an account record are read as the public scope
|
|
72
|
+
* marker.
|
|
73
|
+
*/
|
|
74
|
+
static fromBuffer(buffer: Buffer): StoredFact {
|
|
53
75
|
const reader = BufferReader.asReader(buffer);
|
|
54
76
|
const contractAddress = reader.readObject(AztecAddress);
|
|
55
|
-
const
|
|
77
|
+
const scopeAccount = reader.readObject(AztecAddress);
|
|
56
78
|
const factCollectionTypeId = reader.readObject(Fr);
|
|
57
79
|
const factCollectionId = reader.readObject(Fr);
|
|
58
80
|
const factTypeId = reader.readObject(Fr);
|
|
@@ -62,6 +84,20 @@ export class StoredFact {
|
|
|
62
84
|
const blockNumber = reader.readNumber();
|
|
63
85
|
const blockHash = reader.readObject(Fr);
|
|
64
86
|
const originBlock = hasOriginBlock ? { blockNumber, blockHash } : undefined;
|
|
87
|
+
let scope: FactScope = { type: 'account', account: scopeAccount };
|
|
88
|
+
if (!reader.isEmpty()) {
|
|
89
|
+
const malformed = `Malformed public scope marker in stored fact of contract ${contractAddress}`;
|
|
90
|
+
if (!reader.readBoolean()) {
|
|
91
|
+
throw new Error(`${malformed}: marker is false`);
|
|
92
|
+
}
|
|
93
|
+
if (!reader.isEmpty()) {
|
|
94
|
+
throw new Error(`${malformed}: trailing bytes after the marker`);
|
|
95
|
+
}
|
|
96
|
+
if (!scopeAccount.isZero()) {
|
|
97
|
+
throw new Error(`${malformed}: record names account ${scopeAccount}`);
|
|
98
|
+
}
|
|
99
|
+
scope = { type: 'public' };
|
|
100
|
+
}
|
|
65
101
|
return new StoredFact(
|
|
66
102
|
new FactCollectionKey(contractAddress, scope, factCollectionTypeId, factCollectionId),
|
|
67
103
|
factTypeId,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
2
2
|
import type { AztecAsyncKVStore } from '@aztec-labs/kv-store';
|
|
3
3
|
import { DatabaseVersion } from '@aztec-labs/stdlib/database-version/version';
|
|
4
|
+
import { Buffer } from 'buffer';
|
|
4
5
|
|
|
5
6
|
/** The triple that determine which physical store a logical store name maps to. */
|
|
6
7
|
export type StoreIdentity = {
|