@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.
- package/artifacts/AuthRegistry.json +1625 -1630
- package/artifacts/ContractClassRegistry.json +897 -7230
- package/artifacts/ContractInstanceRegistry.json +1105 -1772
- package/artifacts/FeeJuice.json +2884 -1598
- package/artifacts/MultiCallEntrypoint.json +1190 -1129
- package/artifacts/PublicChecks.json +988 -0
- package/dest/auth-registry/index.d.ts +1 -1
- package/dest/auth-registry/index.d.ts.map +1 -1
- package/dest/auth-registry/index.js +3 -3
- package/dest/auth-registry/lazy.d.ts +1 -1
- package/dest/auth-registry/lazy.js +5 -5
- package/dest/class-registry/contract_class_published_event.d.ts +3 -2
- package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
- package/dest/class-registry/contract_class_published_event.js +4 -0
- package/dest/class-registry/index.d.ts +1 -1
- package/dest/class-registry/index.d.ts.map +1 -1
- package/dest/class-registry/index.js +3 -3
- package/dest/class-registry/lazy.d.ts +1 -1
- package/dest/class-registry/lazy.js +5 -5
- package/dest/class-registry/private_function_broadcasted_event.d.ts +2 -2
- package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -1
- package/dest/class-registry/utility_function_broadcasted_event.d.ts +2 -2
- package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -1
- package/dest/class-registry/utility_function_broadcasted_event.js +1 -1
- package/dest/fee-juice/index.d.ts +2 -2
- package/dest/fee-juice/index.d.ts.map +1 -1
- package/dest/fee-juice/index.js +3 -3
- package/dest/fee-juice/lazy.d.ts +1 -1
- package/dest/fee-juice/lazy.js +5 -5
- package/dest/index.d.ts +1 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +0 -1
- package/dest/instance-registry/contract_instance_published_event.d.ts +3 -2
- package/dest/instance-registry/contract_instance_published_event.d.ts.map +1 -1
- package/dest/instance-registry/contract_instance_published_event.js +4 -1
- package/dest/instance-registry/contract_instance_updated_event.d.ts +2 -2
- package/dest/instance-registry/contract_instance_updated_event.d.ts.map +1 -1
- package/dest/instance-registry/contract_instance_updated_event.js +5 -7
- package/dest/instance-registry/index.d.ts +1 -1
- package/dest/instance-registry/index.d.ts.map +1 -1
- package/dest/instance-registry/index.js +3 -3
- package/dest/instance-registry/lazy.d.ts +1 -1
- package/dest/instance-registry/lazy.js +5 -5
- package/dest/make_protocol_contract.d.ts +4 -4
- package/dest/make_protocol_contract.d.ts.map +1 -1
- package/dest/make_protocol_contract.js +28 -14
- package/dest/multi-call-entrypoint/index.d.ts +1 -1
- package/dest/multi-call-entrypoint/index.d.ts.map +1 -1
- package/dest/multi-call-entrypoint/index.js +3 -3
- package/dest/multi-call-entrypoint/lazy.d.ts +1 -1
- package/dest/multi-call-entrypoint/lazy.js +5 -5
- package/dest/protocol_contract.d.ts +1 -1
- package/dest/protocol_contract_data.d.ts +25 -11
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +113 -13
- package/dest/provider/bundle.d.ts +1 -1
- package/dest/provider/bundle.d.ts.map +1 -1
- package/dest/provider/bundle.js +3 -3
- package/dest/provider/lazy.d.ts +1 -1
- package/dest/provider/lazy.d.ts.map +1 -1
- package/dest/provider/lazy.js +3 -3
- package/dest/provider/protocol_contracts_provider.d.ts +1 -1
- package/dest/public-checks/index.d.ts +5 -0
- package/dest/public-checks/index.d.ts.map +1 -0
- package/dest/public-checks/index.js +13 -0
- package/dest/public-checks/lazy.d.ts +6 -0
- package/dest/public-checks/lazy.d.ts.map +1 -0
- package/dest/public-checks/lazy.js +23 -0
- package/dest/scripts/generate_data.js +88 -37
- package/dest/tests/fixtures.d.ts +1 -1
- package/package.json +9 -8
- package/src/auth-registry/index.ts +3 -3
- package/src/auth-registry/lazy.ts +5 -5
- package/src/class-registry/contract_class_published_event.ts +8 -1
- package/src/class-registry/index.ts +3 -3
- package/src/class-registry/lazy.ts +5 -5
- package/src/class-registry/private_function_broadcasted_event.ts +1 -1
- package/src/class-registry/utility_function_broadcasted_event.ts +1 -1
- package/src/fee-juice/index.ts +4 -4
- package/src/fee-juice/lazy.ts +5 -5
- package/src/index.ts +0 -1
- package/src/instance-registry/contract_instance_published_event.ts +7 -1
- package/src/instance-registry/contract_instance_updated_event.ts +6 -8
- package/src/instance-registry/index.ts +3 -3
- package/src/instance-registry/lazy.ts +5 -5
- package/src/make_protocol_contract.ts +37 -15
- package/src/multi-call-entrypoint/index.ts +3 -3
- package/src/multi-call-entrypoint/lazy.ts +5 -5
- package/src/protocol_contract_data.ts +91 -13
- package/src/provider/bundle.ts +3 -3
- package/src/provider/lazy.ts +3 -3
- package/src/{router → public-checks}/index.ts +5 -5
- package/src/public-checks/lazy.ts +29 -0
- package/artifacts/Router.json +0 -4629
- package/dest/build_protocol_contract_tree.d.ts +0 -10
- package/dest/build_protocol_contract_tree.d.ts.map +0 -1
- package/dest/build_protocol_contract_tree.js +0 -20
- package/dest/protocol_contract_tree.d.ts +0 -7
- package/dest/protocol_contract_tree.d.ts.map +0 -1
- package/dest/protocol_contract_tree.js +0 -34
- package/dest/router/index.d.ts +0 -5
- package/dest/router/index.d.ts.map +0 -1
- package/dest/router/index.js +0 -13
- package/dest/router/lazy.d.ts +0 -6
- package/dest/router/lazy.d.ts.map +0 -1
- package/dest/router/lazy.js +0 -23
- package/src/build_protocol_contract_tree.ts +0 -29
- package/src/protocol_contract_tree.ts +0 -44
- package/src/router/lazy.ts +0 -29
- /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
|
+
}
|