@aztec/protocol-contracts 3.0.3 → 3.9.9-nightly.20260312
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 +894 -1705
- package/artifacts/ContractClassRegistry.json +804 -5417
- package/artifacts/ContractInstanceRegistry.json +978 -1650
- package/artifacts/FeeJuice.json +1624 -2281
- package/artifacts/MultiCallEntrypoint.json +1141 -1116
- package/artifacts/PublicChecks.json +980 -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.js +1 -1
- package/dest/class-registry/contract_class_published_event.js +1 -1
- 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.js +1 -1
- package/dest/class-registry/private_function_broadcasted_event.d.ts +5 -1
- package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -1
- package/dest/class-registry/utility_function_broadcasted_event.d.ts +4 -1
- package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -1
- package/dest/fee-juice/index.d.ts +1 -1
- package/dest/fee-juice/index.d.ts.map +1 -1
- package/dest/fee-juice/index.js +3 -3
- package/dest/fee-juice/lazy.js +1 -1
- 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.js +1 -1
- 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.js +1 -1
- package/dest/protocol_contract_data.d.ts +15 -3
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +103 -17
- package/dest/provider/bundle.js +3 -3
- package/dest/provider/lazy.js +3 -3
- 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/{router → public-checks}/lazy.js +6 -6
- package/dest/scripts/generate_data.js +72 -23
- package/package.json +7 -7
- package/src/auth-registry/index.ts +3 -3
- package/src/auth-registry/lazy.ts +1 -1
- package/src/class-registry/contract_class_published_event.ts +1 -1
- package/src/class-registry/index.ts +3 -3
- package/src/class-registry/lazy.ts +1 -1
- package/src/fee-juice/index.ts +3 -3
- package/src/fee-juice/lazy.ts +1 -1
- package/src/instance-registry/index.ts +3 -3
- package/src/instance-registry/lazy.ts +1 -1
- package/src/make_protocol_contract.ts +37 -15
- package/src/multi-call-entrypoint/index.ts +3 -3
- package/src/multi-call-entrypoint/lazy.ts +1 -1
- package/src/protocol_contract_data.ts +80 -17
- 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/{router → public-checks}/lazy.ts +7 -7
- package/artifacts/Router.json +0 -959
- 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/artifacts/{Router.d.json.ts → PublicChecks.d.json.ts} +0 -0
package/src/provider/bundle.ts
CHANGED
|
@@ -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 {
|
|
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,11 +17,11 @@ export const ProtocolContractArtifact: Record<ProtocolContractName, ContractArti
|
|
|
17
17
|
ContractClassRegistry: ContractClassRegistryArtifact,
|
|
18
18
|
MultiCallEntrypoint: MultiCallEntrypointArtifact,
|
|
19
19
|
FeeJuice: FeeJuiceArtifact,
|
|
20
|
-
|
|
20
|
+
PublicChecks: PublicChecksArtifact,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export class BundledProtocolContractsProvider implements ProtocolContractsProvider {
|
|
24
24
|
getProtocolContractArtifact(name: ProtocolContractName): Promise<ProtocolContract> {
|
|
25
|
-
return makeProtocolContract(name, ProtocolContractArtifact[name]);
|
|
25
|
+
return Promise.resolve(makeProtocolContract(name, ProtocolContractArtifact[name]));
|
|
26
26
|
}
|
|
27
27
|
}
|
package/src/provider/lazy.ts
CHANGED
|
@@ -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 {
|
|
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 '
|
|
25
|
-
return
|
|
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
|
|
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
|
|
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
|
|
13
|
+
export function getCanonicalPublicChecks(): Promise<ProtocolContract> {
|
|
14
14
|
if (!protocolContract) {
|
|
15
|
-
protocolContract =
|
|
15
|
+
protocolContract = makeProtocolContract('PublicChecks', PublicChecksArtifact);
|
|
16
16
|
}
|
|
17
|
-
return protocolContract;
|
|
17
|
+
return Promise.resolve(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
|
|
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:
|
|
17
|
-
protocolContractArtifact = loadContractArtifact(
|
|
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
|
|
23
|
-
export async function
|
|
22
|
+
/** Returns the canonical deployment of the public checks contract. */
|
|
23
|
+
export async function getCanonicalPublicChecks(): Promise<ProtocolContract> {
|
|
24
24
|
if (!protocolContract) {
|
|
25
|
-
const
|
|
26
|
-
protocolContract =
|
|
25
|
+
const publicChecksArtifact = await getPublicChecksArtifact();
|
|
26
|
+
protocolContract = makeProtocolContract('PublicChecks', publicChecksArtifact);
|
|
27
27
|
}
|
|
28
28
|
return protocolContract;
|
|
29
29
|
}
|