@aztec/protocol-contracts 0.0.1-fake-ceab37513c → 0.0.6-commit.a2d1860fe9

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 (110) hide show
  1. package/artifacts/AuthRegistry.json +1625 -1630
  2. package/artifacts/ContractClassRegistry.json +897 -7230
  3. package/artifacts/ContractInstanceRegistry.json +1105 -1772
  4. package/artifacts/FeeJuice.json +2884 -1598
  5. package/artifacts/MultiCallEntrypoint.json +1190 -1129
  6. package/artifacts/PublicChecks.json +988 -0
  7. package/dest/auth-registry/index.d.ts +1 -1
  8. package/dest/auth-registry/index.d.ts.map +1 -1
  9. package/dest/auth-registry/index.js +3 -3
  10. package/dest/auth-registry/lazy.d.ts +1 -1
  11. package/dest/auth-registry/lazy.js +5 -5
  12. package/dest/class-registry/contract_class_published_event.d.ts +3 -2
  13. package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
  14. package/dest/class-registry/contract_class_published_event.js +4 -0
  15. package/dest/class-registry/index.d.ts +1 -1
  16. package/dest/class-registry/index.d.ts.map +1 -1
  17. package/dest/class-registry/index.js +3 -3
  18. package/dest/class-registry/lazy.d.ts +1 -1
  19. package/dest/class-registry/lazy.js +5 -5
  20. package/dest/class-registry/private_function_broadcasted_event.d.ts +2 -2
  21. package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -1
  22. package/dest/class-registry/utility_function_broadcasted_event.d.ts +2 -2
  23. package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -1
  24. package/dest/class-registry/utility_function_broadcasted_event.js +1 -1
  25. package/dest/fee-juice/index.d.ts +2 -2
  26. package/dest/fee-juice/index.d.ts.map +1 -1
  27. package/dest/fee-juice/index.js +3 -3
  28. package/dest/fee-juice/lazy.d.ts +1 -1
  29. package/dest/fee-juice/lazy.js +5 -5
  30. package/dest/index.d.ts +1 -2
  31. package/dest/index.d.ts.map +1 -1
  32. package/dest/index.js +0 -1
  33. package/dest/instance-registry/contract_instance_published_event.d.ts +3 -2
  34. package/dest/instance-registry/contract_instance_published_event.d.ts.map +1 -1
  35. package/dest/instance-registry/contract_instance_published_event.js +4 -1
  36. package/dest/instance-registry/contract_instance_updated_event.d.ts +2 -2
  37. package/dest/instance-registry/contract_instance_updated_event.d.ts.map +1 -1
  38. package/dest/instance-registry/contract_instance_updated_event.js +5 -7
  39. package/dest/instance-registry/index.d.ts +1 -1
  40. package/dest/instance-registry/index.d.ts.map +1 -1
  41. package/dest/instance-registry/index.js +3 -3
  42. package/dest/instance-registry/lazy.d.ts +1 -1
  43. package/dest/instance-registry/lazy.js +5 -5
  44. package/dest/make_protocol_contract.d.ts +4 -4
  45. package/dest/make_protocol_contract.d.ts.map +1 -1
  46. package/dest/make_protocol_contract.js +28 -14
  47. package/dest/multi-call-entrypoint/index.d.ts +1 -1
  48. package/dest/multi-call-entrypoint/index.d.ts.map +1 -1
  49. package/dest/multi-call-entrypoint/index.js +3 -3
  50. package/dest/multi-call-entrypoint/lazy.d.ts +1 -1
  51. package/dest/multi-call-entrypoint/lazy.js +5 -5
  52. package/dest/protocol_contract.d.ts +1 -1
  53. package/dest/protocol_contract_data.d.ts +25 -11
  54. package/dest/protocol_contract_data.d.ts.map +1 -1
  55. package/dest/protocol_contract_data.js +113 -13
  56. package/dest/provider/bundle.d.ts +1 -1
  57. package/dest/provider/bundle.d.ts.map +1 -1
  58. package/dest/provider/bundle.js +3 -3
  59. package/dest/provider/lazy.d.ts +1 -1
  60. package/dest/provider/lazy.d.ts.map +1 -1
  61. package/dest/provider/lazy.js +3 -3
  62. package/dest/provider/protocol_contracts_provider.d.ts +1 -1
  63. package/dest/public-checks/index.d.ts +5 -0
  64. package/dest/public-checks/index.d.ts.map +1 -0
  65. package/dest/public-checks/index.js +13 -0
  66. package/dest/public-checks/lazy.d.ts +6 -0
  67. package/dest/public-checks/lazy.d.ts.map +1 -0
  68. package/dest/public-checks/lazy.js +23 -0
  69. package/dest/scripts/generate_data.js +88 -37
  70. package/dest/tests/fixtures.d.ts +1 -1
  71. package/package.json +9 -8
  72. package/src/auth-registry/index.ts +3 -3
  73. package/src/auth-registry/lazy.ts +5 -5
  74. package/src/class-registry/contract_class_published_event.ts +8 -1
  75. package/src/class-registry/index.ts +3 -3
  76. package/src/class-registry/lazy.ts +5 -5
  77. package/src/class-registry/private_function_broadcasted_event.ts +1 -1
  78. package/src/class-registry/utility_function_broadcasted_event.ts +1 -1
  79. package/src/fee-juice/index.ts +4 -4
  80. package/src/fee-juice/lazy.ts +5 -5
  81. package/src/index.ts +0 -1
  82. package/src/instance-registry/contract_instance_published_event.ts +7 -1
  83. package/src/instance-registry/contract_instance_updated_event.ts +6 -8
  84. package/src/instance-registry/index.ts +3 -3
  85. package/src/instance-registry/lazy.ts +5 -5
  86. package/src/make_protocol_contract.ts +37 -15
  87. package/src/multi-call-entrypoint/index.ts +3 -3
  88. package/src/multi-call-entrypoint/lazy.ts +5 -5
  89. package/src/protocol_contract_data.ts +91 -13
  90. package/src/provider/bundle.ts +3 -3
  91. package/src/provider/lazy.ts +3 -3
  92. package/src/{router → public-checks}/index.ts +5 -5
  93. package/src/public-checks/lazy.ts +29 -0
  94. package/artifacts/Router.json +0 -4629
  95. package/dest/build_protocol_contract_tree.d.ts +0 -10
  96. package/dest/build_protocol_contract_tree.d.ts.map +0 -1
  97. package/dest/build_protocol_contract_tree.js +0 -20
  98. package/dest/protocol_contract_tree.d.ts +0 -7
  99. package/dest/protocol_contract_tree.d.ts.map +0 -1
  100. package/dest/protocol_contract_tree.js +0 -34
  101. package/dest/router/index.d.ts +0 -5
  102. package/dest/router/index.d.ts.map +0 -1
  103. package/dest/router/index.js +0 -13
  104. package/dest/router/lazy.d.ts +0 -6
  105. package/dest/router/lazy.d.ts.map +0 -1
  106. package/dest/router/lazy.js +0 -23
  107. package/src/build_protocol_contract_tree.ts +0 -29
  108. package/src/protocol_contract_tree.ts +0 -44
  109. package/src/router/lazy.ts +0 -29
  110. /package/artifacts/{Router.d.json.ts → PublicChecks.d.json.ts} +0 -0
@@ -0,0 +1,29 @@
1
+ import { type ContractArtifact, loadContractArtifact } from '@aztec/stdlib/abi';
2
+
3
+ import { makeProtocolContract } from '../make_protocol_contract.js';
4
+ import type { ProtocolContract } from '../protocol_contract.js';
5
+
6
+ let protocolContract: ProtocolContract;
7
+ let protocolContractArtifact: ContractArtifact;
8
+
9
+ export async function getPublicChecksArtifact(): Promise<ContractArtifact> {
10
+ if (!protocolContractArtifact) {
11
+ // Cannot assert this import as it's incompatible with bundlers like vite
12
+ // https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
13
+ // Even if now supported by al major browsers, the MIME type is replaced with
14
+ // "text/javascript"
15
+ // In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
16
+ const { default: publicChecksJson } = await import('../../artifacts/PublicChecks.json');
17
+ protocolContractArtifact = loadContractArtifact(publicChecksJson);
18
+ }
19
+ return protocolContractArtifact;
20
+ }
21
+
22
+ /** Returns the canonical deployment of the public checks contract. */
23
+ export async function getCanonicalPublicChecks(): Promise<ProtocolContract> {
24
+ if (!protocolContract) {
25
+ const publicChecksArtifact = await getPublicChecksArtifact();
26
+ protocolContract = makeProtocolContract('PublicChecks', publicChecksArtifact);
27
+ }
28
+ return protocolContract;
29
+ }