@aztec/protocol-contracts 0.0.1-commit.24de95ac → 0.0.1-commit.2e2504e2

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 (69) hide show
  1. package/artifacts/AuthRegistry.json +1044 -1801
  2. package/artifacts/ContractClassRegistry.json +2679 -4900
  3. package/artifacts/ContractInstanceRegistry.json +778 -1412
  4. package/artifacts/FeeJuice.json +1950 -2478
  5. package/artifacts/MultiCallEntrypoint.json +1158 -1080
  6. package/artifacts/PublicChecks.json +980 -0
  7. package/dest/auth-registry/index.d.ts +1 -1
  8. package/dest/auth-registry/lazy.d.ts +1 -1
  9. package/dest/class-registry/contract_class_published_event.d.ts +3 -2
  10. package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
  11. package/dest/class-registry/contract_class_published_event.js +4 -1
  12. package/dest/class-registry/index.d.ts +1 -1
  13. package/dest/class-registry/lazy.d.ts +1 -1
  14. package/dest/class-registry/private_function_broadcasted_event.d.ts +2 -2
  15. package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -1
  16. package/dest/class-registry/utility_function_broadcasted_event.d.ts +2 -2
  17. package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -1
  18. package/dest/class-registry/utility_function_broadcasted_event.js +1 -1
  19. package/dest/fee-juice/index.d.ts +2 -2
  20. package/dest/fee-juice/index.d.ts.map +1 -1
  21. package/dest/fee-juice/lazy.d.ts +1 -1
  22. package/dest/index.d.ts +1 -1
  23. package/dest/instance-registry/contract_instance_published_event.d.ts +3 -2
  24. package/dest/instance-registry/contract_instance_published_event.d.ts.map +1 -1
  25. package/dest/instance-registry/contract_instance_published_event.js +4 -1
  26. package/dest/instance-registry/contract_instance_updated_event.d.ts +2 -2
  27. package/dest/instance-registry/contract_instance_updated_event.d.ts.map +1 -1
  28. package/dest/instance-registry/index.d.ts +1 -1
  29. package/dest/instance-registry/lazy.d.ts +1 -1
  30. package/dest/make_protocol_contract.d.ts +1 -1
  31. package/dest/multi-call-entrypoint/index.d.ts +1 -1
  32. package/dest/multi-call-entrypoint/lazy.d.ts +1 -1
  33. package/dest/protocol_contract.d.ts +1 -1
  34. package/dest/protocol_contract_data.d.ts +4 -4
  35. package/dest/protocol_contract_data.d.ts.map +1 -1
  36. package/dest/protocol_contract_data.js +18 -18
  37. package/dest/provider/bundle.d.ts +1 -1
  38. package/dest/provider/bundle.d.ts.map +1 -1
  39. package/dest/provider/bundle.js +2 -2
  40. package/dest/provider/lazy.d.ts +1 -1
  41. package/dest/provider/lazy.d.ts.map +1 -1
  42. package/dest/provider/lazy.js +3 -3
  43. package/dest/provider/protocol_contracts_provider.d.ts +1 -1
  44. package/dest/public-checks/index.d.ts +5 -0
  45. package/dest/public-checks/index.d.ts.map +1 -0
  46. package/dest/{router → public-checks}/index.js +4 -4
  47. package/dest/public-checks/lazy.d.ts +6 -0
  48. package/dest/public-checks/lazy.d.ts.map +1 -0
  49. package/dest/{router → public-checks}/lazy.js +6 -6
  50. package/dest/scripts/generate_data.js +7 -7
  51. package/dest/tests/fixtures.d.ts +1 -1
  52. package/package.json +9 -8
  53. package/src/class-registry/contract_class_published_event.ts +8 -2
  54. package/src/class-registry/private_function_broadcasted_event.ts +1 -1
  55. package/src/class-registry/utility_function_broadcasted_event.ts +1 -1
  56. package/src/fee-juice/index.ts +1 -1
  57. package/src/instance-registry/contract_instance_published_event.ts +7 -1
  58. package/src/instance-registry/contract_instance_updated_event.ts +1 -1
  59. package/src/protocol_contract_data.ts +18 -18
  60. package/src/provider/bundle.ts +2 -2
  61. package/src/provider/lazy.ts +3 -3
  62. package/src/{router → public-checks}/index.ts +4 -4
  63. package/src/{router → public-checks}/lazy.ts +7 -7
  64. package/artifacts/Router.json +0 -976
  65. package/dest/router/index.d.ts +0 -5
  66. package/dest/router/index.d.ts.map +0 -1
  67. package/dest/router/lazy.d.ts +0 -6
  68. package/dest/router/lazy.d.ts.map +0 -1
  69. /package/artifacts/{Router.d.json.ts → PublicChecks.d.json.ts} +0 -0
@@ -3,4 +3,4 @@ export declare function getSamplePrivateFunctionBroadcastedEventPayload(): Buffe
3
3
  export declare function getSampleUtilityFunctionBroadcastedEventPayload(): Buffer;
4
4
  export declare function getSampleContractInstancePublishedEventPayload(): Buffer;
5
5
  export declare function getPathToFixture(name: string): string;
6
- //# sourceMappingURL=fixtures.d.ts.map
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4dHVyZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0cy9maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSx3QkFBZ0IsMkNBQTJDLElBQUksTUFBTSxDQUdwRTtBQUdELHdCQUFnQiwrQ0FBK0MsSUFBSSxNQUFNLENBR3hFO0FBR0Qsd0JBQWdCLCtDQUErQyxJQUFJLE1BQU0sQ0FHeEU7QUFHRCx3QkFBZ0IsOENBQThDLElBQUksTUFBTSxDQUd2RTtBQUVELHdCQUFnQixnQkFBZ0IsQ0FBQyxJQUFJLEVBQUUsTUFBTSxVQUU1QyJ9
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aztec/protocol-contracts",
3
3
  "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/protocol-contracts",
4
4
  "description": "Canonical Noir contracts for the Aztec Network",
5
- "version": "0.0.1-commit.24de95ac",
5
+ "version": "0.0.1-commit.2e2504e2",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./dest/index.js",
@@ -21,13 +21,13 @@
21
21
  "tsconfig": "./tsconfig.json"
22
22
  },
23
23
  "scripts": {
24
- "build": "yarn clean && yarn generate && yarn generate:cleanup-artifacts && tsc -b",
25
- "build:keep-debug-symbols": "yarn clean && yarn generate && tsc -b",
24
+ "build": "yarn clean && yarn generate && yarn generate:cleanup-artifacts && ../scripts/tsc.sh",
25
+ "build:keep-debug-symbols": "yarn clean && yarn generate && ../scripts/tsc.sh",
26
26
  "generate": "yarn generate:data",
27
27
  "generate:cleanup-artifacts": "node --no-warnings --loader @swc-node/register/esm src/scripts/cleanup_artifacts.ts",
28
28
  "generate:data": "node --no-warnings --loader @swc-node/register/esm src/scripts/generate_data.ts",
29
- "build:dev": "tsc -b --watch",
30
- "build:ts": "tsc -b",
29
+ "build:dev": "../scripts/tsc.sh --watch",
30
+ "build:ts": "../scripts/tsc.sh",
31
31
  "clean": "rm -rf ./dest .tsbuildinfo ./artifacts",
32
32
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
33
33
  },
@@ -73,9 +73,9 @@
73
73
  ]
74
74
  },
75
75
  "dependencies": {
76
- "@aztec/constants": "0.0.1-commit.24de95ac",
77
- "@aztec/foundation": "0.0.1-commit.24de95ac",
78
- "@aztec/stdlib": "0.0.1-commit.24de95ac",
76
+ "@aztec/constants": "0.0.1-commit.2e2504e2",
77
+ "@aztec/foundation": "0.0.1-commit.2e2504e2",
78
+ "@aztec/stdlib": "0.0.1-commit.2e2504e2",
79
79
  "lodash.chunk": "^4.2.0",
80
80
  "lodash.omit": "^4.5.0",
81
81
  "tslib": "^2.4.0"
@@ -86,6 +86,7 @@
86
86
  "@types/lodash.chunk": "^4.2.9",
87
87
  "@types/lodash.omit": "^4.5.9",
88
88
  "@types/node": "^22.15.17",
89
+ "@typescript/native-preview": "7.0.0-dev.20260113.1",
89
90
  "jest": "^30.0.0",
90
91
  "jest-mock-extended": "^4.0.0",
91
92
  "ts-loader": "^9.5.4",
@@ -1,5 +1,5 @@
1
1
  import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { FieldReader } from '@aztec/foundation/serialize';
4
4
  import { bufferFromFields } from '@aztec/stdlib/abi';
5
5
  import {
@@ -29,7 +29,7 @@ export class ContractClassPublishedEvent {
29
29
  }
30
30
 
31
31
  static fromLog(log: ContractClassLog) {
32
- // See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry/src/events/class_published.nr`.
32
+ // See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
33
33
  const fieldsWithoutTag = log.fields.fields.slice(1);
34
34
  const reader = new FieldReader(fieldsWithoutTag);
35
35
  const contractClassId = reader.readField();
@@ -74,4 +74,10 @@ export class ContractClassPublishedEvent {
74
74
  utilityFunctions: [],
75
75
  };
76
76
  }
77
+
78
+ public static extractContractClassEvents(logs: ContractClassLog[]): ContractClassPublishedEvent[] {
79
+ return logs
80
+ .filter((log: ContractClassLog) => ContractClassPublishedEvent.isContractClassPublishedEvent(log))
81
+ .map((log: ContractClassLog) => ContractClassPublishedEvent.fromLog(log));
82
+ }
77
83
  }
@@ -4,7 +4,7 @@ import {
4
4
  FUNCTION_TREE_HEIGHT,
5
5
  MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS,
6
6
  } from '@aztec/constants';
7
- import { Fr } from '@aztec/foundation/fields';
7
+ import { Fr } from '@aztec/foundation/curves/bn254';
8
8
  import type { Tuple } from '@aztec/foundation/serialize';
9
9
  import { FieldReader } from '@aztec/foundation/serialize';
10
10
  import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
@@ -4,7 +4,7 @@ import {
4
4
  MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS,
5
5
  } from '@aztec/constants';
6
6
  import { removeArrayPaddingEnd } from '@aztec/foundation/collection';
7
- import { Fr } from '@aztec/foundation/fields';
7
+ import { Fr } from '@aztec/foundation/curves/bn254';
8
8
  import type { Tuple } from '@aztec/foundation/serialize';
9
9
  import { FieldReader } from '@aztec/foundation/serialize';
10
10
  import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
@@ -1,4 +1,4 @@
1
- import type { Fr } from '@aztec/foundation/fields';
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { loadContractArtifact } from '@aztec/stdlib/abi';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import { computePublicDataTreeLeafSlot, deriveStorageSlotInMap } from '@aztec/stdlib/hash';
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { BufferReader } from '@aztec/foundation/serialize';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
@@ -61,4 +61,10 @@ export class ContractInstancePublishedEvent {
61
61
  deployer: this.deployer,
62
62
  };
63
63
  }
64
+
65
+ public static extractContractInstanceEvents(logs: PrivateLog[]): ContractInstancePublishedEvent[] {
66
+ return logs
67
+ .filter(log => ContractInstancePublishedEvent.isContractInstancePublishedEvent(log))
68
+ .map(log => ContractInstancePublishedEvent.fromLog(log));
69
+ }
64
70
  }
@@ -1,5 +1,5 @@
1
1
  import { CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { FieldReader } from '@aztec/foundation/serialize';
4
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { ContractInstanceUpdateWithAddress } from '@aztec/stdlib/contract';
@@ -1,6 +1,6 @@
1
1
 
2
2
  // GENERATED FILE - DO NOT EDIT. RUN `yarn generate` or `yarn generate:data`
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import { ProtocolContracts } from '@aztec/stdlib/tx';
6
6
 
@@ -11,7 +11,7 @@
11
11
  'ContractClassRegistry',
12
12
  'MultiCallEntrypoint',
13
13
  'FeeJuice',
14
- 'Router'
14
+ 'PublicChecks'
15
15
  ] as const;
16
16
 
17
17
  export type ProtocolContractName = typeof protocolContractNames[number];
@@ -24,7 +24,7 @@ ContractInstanceRegistry: new Fr(1),
24
24
  ContractClassRegistry: new Fr(1),
25
25
  MultiCallEntrypoint: new Fr(1),
26
26
  FeeJuice: new Fr(1),
27
- Router: new Fr(1)
27
+ PublicChecks: new Fr(1)
28
28
  };
29
29
 
30
30
 
@@ -35,29 +35,29 @@ ContractInstanceRegistry: AztecAddress.fromBigInt(2n),
35
35
  ContractClassRegistry: AztecAddress.fromBigInt(3n),
36
36
  MultiCallEntrypoint: AztecAddress.fromBigInt(4n),
37
37
  FeeJuice: AztecAddress.fromBigInt(5n),
38
- Router: AztecAddress.fromBigInt(6n)
38
+ PublicChecks: AztecAddress.fromBigInt(6n)
39
39
  };
40
40
 
41
41
 
42
42
 
43
43
  export const ProtocolContractDerivedAddress = {
44
- AuthRegistry: AztecAddress.fromString('0x2e35b6e1a89ac2f901f3513f505249b9a485513ac7dd57f29f1183c0862473f2'),
45
- ContractInstanceRegistry: AztecAddress.fromString('0x136eade704b136bae7c5282cf8f4e1ccc51835db840123034cfefbad76215c91'),
46
- ContractClassRegistry: AztecAddress.fromString('0x2b9543f587c4d7976627ed8dfe0345f9e2efa846f618dea97372c1be7240994b'),
47
- MultiCallEntrypoint: AztecAddress.fromString('0x191a929597d30fafe8d5708533b89bd4022c8d3194c8fcf37d04ac51a2f804eb'),
48
- FeeJuice: AztecAddress.fromString('0x2f3ffae9d3b40e8f162fc2dabbd8dba5deaf112191dfa7be263a55073e16d082'),
49
- Router: AztecAddress.fromString('0x00943dfa60dc08d7fb79f30220fdab942c0ba3364e45b69777015613983bab58')
44
+ AuthRegistry: AztecAddress.fromString('0x26bfad9c83bed5d1fd497c3d8cb458ee842e37bb6abe00b9140de5c43cec0b0b'),
45
+ ContractInstanceRegistry: AztecAddress.fromString('0x2c01bc5927318e54794740530f3443b42cd8f4d152eecf3b538e2c3001dc0ec8'),
46
+ ContractClassRegistry: AztecAddress.fromString('0x05dadbc602c4b7e51f9e6f2d05fc2f3ac28ba14d2b76d002e9c8d15fff92d68d'),
47
+ MultiCallEntrypoint: AztecAddress.fromString('0x29ccc84319864d75b7d5eda10c66a736f59e12e7b567d596c6797ff2645b7d12'),
48
+ FeeJuice: AztecAddress.fromString('0x21c9a1a59fa165f5a9741e573e204881fb491e31a41a7bd5c5e5238b4878cce6'),
49
+ PublicChecks: AztecAddress.fromString('0x2efe5b65d304620168f6234c84c495cb43cb2ea2d3c8d26711566502a6f3eca4')
50
50
  };
51
51
 
52
52
 
53
53
 
54
54
  export const ProtocolContractsList = new ProtocolContracts([
55
- AztecAddress.fromString('0x2e35b6e1a89ac2f901f3513f505249b9a485513ac7dd57f29f1183c0862473f2'),
56
- AztecAddress.fromString('0x136eade704b136bae7c5282cf8f4e1ccc51835db840123034cfefbad76215c91'),
57
- AztecAddress.fromString('0x2b9543f587c4d7976627ed8dfe0345f9e2efa846f618dea97372c1be7240994b'),
58
- AztecAddress.fromString('0x191a929597d30fafe8d5708533b89bd4022c8d3194c8fcf37d04ac51a2f804eb'),
59
- AztecAddress.fromString('0x2f3ffae9d3b40e8f162fc2dabbd8dba5deaf112191dfa7be263a55073e16d082'),
60
- AztecAddress.fromString('0x00943dfa60dc08d7fb79f30220fdab942c0ba3364e45b69777015613983bab58'),
55
+ AztecAddress.fromString('0x26bfad9c83bed5d1fd497c3d8cb458ee842e37bb6abe00b9140de5c43cec0b0b'),
56
+ AztecAddress.fromString('0x2c01bc5927318e54794740530f3443b42cd8f4d152eecf3b538e2c3001dc0ec8'),
57
+ AztecAddress.fromString('0x05dadbc602c4b7e51f9e6f2d05fc2f3ac28ba14d2b76d002e9c8d15fff92d68d'),
58
+ AztecAddress.fromString('0x29ccc84319864d75b7d5eda10c66a736f59e12e7b567d596c6797ff2645b7d12'),
59
+ AztecAddress.fromString('0x21c9a1a59fa165f5a9741e573e204881fb491e31a41a7bd5c5e5238b4878cce6'),
60
+ AztecAddress.fromString('0x2efe5b65d304620168f6234c84c495cb43cb2ea2d3c8d26711566502a6f3eca4'),
61
61
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
62
62
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
63
63
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
@@ -65,10 +65,10 @@ AztecAddress.fromString('0x00000000000000000000000000000000000000000000000000000
65
65
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
66
66
  ]);
67
67
 
68
- export const protocolContractsHash = Fr.fromString('0x1114ed602f51159e3e07a19f1b0ad7acbd7dee60fbf342ea0e46d9013f744679');
68
+ export const protocolContractsHash = Fr.fromString('0x0dad97daca6147301dc989641346cf7bae5572d9fde3fc452659c83fc806beeb');
69
69
 
70
70
 
71
71
 
72
- export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x28da3fc471387d4e20b646b77abc8cdfc02a339a7507285a73d84f9b97b13486');
72
+ export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x1fac4c16bff9365b079923d46d85c86b4fcbb5c67c5c65febe8596599412b0ee');
73
73
 
74
74
 
@@ -8,7 +8,7 @@ import { makeProtocolContract } from '../make_protocol_contract.js';
8
8
  import { MultiCallEntrypointArtifact } from '../multi-call-entrypoint/index.js';
9
9
  import type { ProtocolContract } from '../protocol_contract.js';
10
10
  import type { ProtocolContractName } from '../protocol_contract_data.js';
11
- import { RouterArtifact } from '../router/index.js';
11
+ import { PublicChecksArtifact } from '../public-checks/index.js';
12
12
  import type { ProtocolContractsProvider } from './protocol_contracts_provider.js';
13
13
 
14
14
  export const ProtocolContractArtifact: Record<ProtocolContractName, ContractArtifact> = {
@@ -17,7 +17,7 @@ export const ProtocolContractArtifact: Record<ProtocolContractName, ContractArti
17
17
  ContractClassRegistry: ContractClassRegistryArtifact,
18
18
  MultiCallEntrypoint: MultiCallEntrypointArtifact,
19
19
  FeeJuice: FeeJuiceArtifact,
20
- Router: RouterArtifact,
20
+ PublicChecks: PublicChecksArtifact,
21
21
  };
22
22
 
23
23
  export class BundledProtocolContractsProvider implements ProtocolContractsProvider {
@@ -5,7 +5,7 @@ import { getCanonicalInstanceRegistry } from '../instance-registry/lazy.js';
5
5
  import { getCanonicalMultiCallEntrypoint } from '../multi-call-entrypoint/lazy.js';
6
6
  import type { ProtocolContract } from '../protocol_contract.js';
7
7
  import type { ProtocolContractName } from '../protocol_contract_data.js';
8
- import { getCanonicalRouter } from '../router/lazy.js';
8
+ import { getCanonicalPublicChecks } from '../public-checks/lazy.js';
9
9
  import type { ProtocolContractsProvider } from './protocol_contracts_provider.js';
10
10
 
11
11
  export class LazyProtocolContractsProvider implements ProtocolContractsProvider {
@@ -21,8 +21,8 @@ export class LazyProtocolContractsProvider implements ProtocolContractsProvider
21
21
  return getCanonicalMultiCallEntrypoint();
22
22
  case 'FeeJuice':
23
23
  return getCanonicalFeeJuice();
24
- case 'Router':
25
- return getCanonicalRouter();
24
+ case 'PublicChecks':
25
+ return getCanonicalPublicChecks();
26
26
  default:
27
27
  throw new Error(`Unknown protocol contract name: ${name}`);
28
28
  }
@@ -1,18 +1,18 @@
1
1
  import { loadContractArtifact } from '@aztec/stdlib/abi';
2
2
  import type { NoirCompiledContract } from '@aztec/stdlib/noir';
3
3
 
4
- import RouterJson from '../../artifacts/Router.json' with { type: 'json' };
4
+ import PublicChecksJson from '../../artifacts/PublicChecks.json' with { type: 'json' };
5
5
  import { makeProtocolContract } from '../make_protocol_contract.js';
6
6
  import type { ProtocolContract } from '../protocol_contract.js';
7
7
 
8
- export const RouterArtifact = loadContractArtifact(RouterJson as NoirCompiledContract);
8
+ export const PublicChecksArtifact = loadContractArtifact(PublicChecksJson as NoirCompiledContract);
9
9
 
10
10
  let protocolContract: ProtocolContract;
11
11
 
12
12
  /** Returns the canonical deployment of the contract. */
13
- export async function getCanonicalRouter(): Promise<ProtocolContract> {
13
+ export async function getCanonicalPublicChecks(): Promise<ProtocolContract> {
14
14
  if (!protocolContract) {
15
- protocolContract = await makeProtocolContract('Router', RouterArtifact);
15
+ protocolContract = await makeProtocolContract('PublicChecks', PublicChecksArtifact);
16
16
  }
17
17
  return protocolContract;
18
18
  }
@@ -6,24 +6,24 @@ import type { ProtocolContract } from '../protocol_contract.js';
6
6
  let protocolContract: ProtocolContract;
7
7
  let protocolContractArtifact: ContractArtifact;
8
8
 
9
- export async function getRouterArtifact(): Promise<ContractArtifact> {
9
+ export async function getPublicChecksArtifact(): Promise<ContractArtifact> {
10
10
  if (!protocolContractArtifact) {
11
11
  // Cannot assert this import as it's incompatible with bundlers like vite
12
12
  // https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
13
13
  // Even if now supported by al major browsers, the MIME type is replaced with
14
14
  // "text/javascript"
15
15
  // In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
16
- const { default: routerJson } = await import('../../artifacts/Router.json');
17
- protocolContractArtifact = loadContractArtifact(routerJson);
16
+ const { default: publicChecksJson } = await import('../../artifacts/PublicChecks.json');
17
+ protocolContractArtifact = loadContractArtifact(publicChecksJson);
18
18
  }
19
19
  return protocolContractArtifact;
20
20
  }
21
21
 
22
- /** Returns the canonical deployment of the auth registry. */
23
- export async function getCanonicalRouter(): Promise<ProtocolContract> {
22
+ /** Returns the canonical deployment of the public checks contract. */
23
+ export async function getCanonicalPublicChecks(): Promise<ProtocolContract> {
24
24
  if (!protocolContract) {
25
- const routerArtifact = await getRouterArtifact();
26
- protocolContract = await makeProtocolContract('Router', routerArtifact);
25
+ const publicChecksArtifact = await getPublicChecksArtifact();
26
+ protocolContract = await makeProtocolContract('PublicChecks', publicChecksArtifact);
27
27
  }
28
28
  return protocolContract;
29
29
  }