@aztec/protocol-contracts 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2
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 +325 -325
- package/artifacts/ContractClassRegisterer.json +334 -334
- package/artifacts/ContractInstanceDeployer.json +154 -154
- package/artifacts/FeeJuice.json +3253 -3253
- package/artifacts/MultiCallEntrypoint.json +35 -35
- package/artifacts/Router.json +355 -355
- package/dest/auth-registry/index.js +4 -4
- package/dest/build_protocol_contract_tree.js +6 -4
- package/dest/bundle/index.js +10 -7
- package/dest/class-registerer/contract_class_registered_event.js +11 -8
- package/dest/class-registerer/index.js +4 -4
- package/dest/class-registerer/private_function_broadcasted_event.js +19 -19
- package/dest/class-registerer/unconstrained_function_broadcasted_event.js +15 -16
- package/dest/fee-juice/index.js +4 -4
- package/dest/index.js +0 -1
- package/dest/instance-deployer/contract_instance_deployed_event.js +10 -5
- package/dest/instance-deployer/index.js +4 -4
- package/dest/make_protocol_contract.js +9 -6
- package/dest/multi-call-entrypoint/index.js +4 -4
- package/dest/protocol_contract.js +1 -2
- package/dest/protocol_contract_data.js +10 -11
- package/dest/protocol_contract_tree.js +5 -6
- package/dest/router/index.js +4 -4
- package/dest/scripts/cleanup_artifacts.js +16 -0
- package/dest/scripts/generate_data.js +157 -0
- package/dest/tests/fixtures.js +0 -1
- package/package.json +7 -7
- package/src/protocol_contract_data.ts +61 -57
- package/dest/auth-registry/index.d.ts +0 -5
- package/dest/auth-registry/index.d.ts.map +0 -1
- package/dest/build_protocol_contract_tree.d.ts +0 -6
- package/dest/build_protocol_contract_tree.d.ts.map +0 -1
- package/dest/bundle/index.d.ts +0 -7
- package/dest/bundle/index.d.ts.map +0 -1
- package/dest/class-registerer/contract_class_registered_event.d.ts +0 -17
- package/dest/class-registerer/contract_class_registered_event.d.ts.map +0 -1
- package/dest/class-registerer/index.d.ts +0 -8
- package/dest/class-registerer/index.d.ts.map +0 -1
- package/dest/class-registerer/private_function_broadcasted_event.d.ts +0 -43
- package/dest/class-registerer/private_function_broadcasted_event.d.ts.map +0 -1
- package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts +0 -37
- package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts.map +0 -1
- package/dest/fee-juice/index.d.ts +0 -5
- package/dest/fee-juice/index.d.ts.map +0 -1
- package/dest/index.d.ts +0 -4
- package/dest/index.d.ts.map +0 -1
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts +0 -18
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts.map +0 -1
- package/dest/instance-deployer/index.d.ts +0 -6
- package/dest/instance-deployer/index.d.ts.map +0 -1
- package/dest/make_protocol_contract.d.ts +0 -9
- package/dest/make_protocol_contract.d.ts.map +0 -1
- package/dest/multi-call-entrypoint/index.d.ts +0 -5
- package/dest/multi-call-entrypoint/index.d.ts.map +0 -1
- package/dest/protocol_contract.d.ts +0 -15
- package/dest/protocol_contract.d.ts.map +0 -1
- package/dest/protocol_contract_data.d.ts +0 -19
- package/dest/protocol_contract_data.d.ts.map +0 -1
- package/dest/protocol_contract_tree.d.ts +0 -3
- package/dest/protocol_contract_tree.d.ts.map +0 -1
- package/dest/router/index.d.ts +0 -5
- package/dest/router/index.d.ts.map +0 -1
- package/dest/tests/fixtures.d.ts +0 -8
- package/dest/tests/fixtures.d.ts.map +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { AztecAddress, CANONICAL_AUTH_REGISTRY_ADDRESS, DEPLOYER_CONTRACT_ADDRESS, DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE, FEE_JUICE_ADDRESS, Fr, MULTI_CALL_ENTRYPOINT_ADDRESS, REGISTERER_CONTRACT_ADDRESS, REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE, REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE, REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_MAGIC_VALUE, ROUTER_ADDRESS, getContractInstanceFromDeployParams } from '@aztec/circuits.js';
|
|
2
|
+
import { poseidon2Hash } from '@aztec/foundation/crypto';
|
|
3
|
+
import { createConsoleLogger } from '@aztec/foundation/log';
|
|
4
|
+
import { loadContractArtifact } from '@aztec/types/abi';
|
|
5
|
+
import { promises as fs } from 'fs';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { buildProtocolContractTree } from '../build_protocol_contract_tree.js';
|
|
8
|
+
const log = createConsoleLogger('autogenerate');
|
|
9
|
+
const noirContractsRoot = '../../noir-projects/noir-contracts';
|
|
10
|
+
const srcPath = path.join(noirContractsRoot, './target');
|
|
11
|
+
const destArtifactsDir = './artifacts';
|
|
12
|
+
const outputFilePath = './src/protocol_contract_data.ts';
|
|
13
|
+
const salt = new Fr(1);
|
|
14
|
+
const contractAddressMapping = {
|
|
15
|
+
AuthRegistry: CANONICAL_AUTH_REGISTRY_ADDRESS,
|
|
16
|
+
ContractInstanceDeployer: DEPLOYER_CONTRACT_ADDRESS,
|
|
17
|
+
ContractClassRegisterer: REGISTERER_CONTRACT_ADDRESS,
|
|
18
|
+
MultiCallEntrypoint: MULTI_CALL_ENTRYPOINT_ADDRESS,
|
|
19
|
+
FeeJuice: FEE_JUICE_ADDRESS,
|
|
20
|
+
Router: ROUTER_ADDRESS
|
|
21
|
+
};
|
|
22
|
+
async function clearDestDir() {
|
|
23
|
+
try {
|
|
24
|
+
await fs.access(destArtifactsDir);
|
|
25
|
+
// If the directory exists, remove it recursively.
|
|
26
|
+
await fs.rm(destArtifactsDir, {
|
|
27
|
+
recursive: true,
|
|
28
|
+
force: true
|
|
29
|
+
});
|
|
30
|
+
} catch (err) {
|
|
31
|
+
if (err.code === 'ENOENT') {
|
|
32
|
+
// If the directory does not exist, do nothing.
|
|
33
|
+
} else {
|
|
34
|
+
log(`Error removing dest directory: ${err}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
await fs.mkdir(destArtifactsDir, {
|
|
38
|
+
recursive: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async function copyArtifact(srcName, destName) {
|
|
42
|
+
const src = path.join(srcPath, `${srcName}.json`);
|
|
43
|
+
const artifact = JSON.parse(await fs.readFile(src, 'utf8'));
|
|
44
|
+
const dest = path.join(destArtifactsDir, `${destName}.json`);
|
|
45
|
+
await fs.copyFile(src, dest);
|
|
46
|
+
return artifact;
|
|
47
|
+
}
|
|
48
|
+
async function computeContractLeaf(artifact) {
|
|
49
|
+
const instance = await getContractInstanceFromDeployParams(loadContractArtifact(artifact), {
|
|
50
|
+
salt
|
|
51
|
+
});
|
|
52
|
+
return instance.address;
|
|
53
|
+
}
|
|
54
|
+
async function computeRoot(names, leaves) {
|
|
55
|
+
const data = names.map((name, i)=>({
|
|
56
|
+
address: new AztecAddress(new Fr(contractAddressMapping[name])),
|
|
57
|
+
leaf: leaves[i]
|
|
58
|
+
}));
|
|
59
|
+
const tree = await buildProtocolContractTree(data);
|
|
60
|
+
return Fr.fromBuffer(tree.root);
|
|
61
|
+
}
|
|
62
|
+
async function generateDeclarationFile(destName) {
|
|
63
|
+
const content = `
|
|
64
|
+
import { type NoirCompiledContract } from '@aztec/types/noir';
|
|
65
|
+
const circuit: NoirCompiledContract;
|
|
66
|
+
export = circuit;
|
|
67
|
+
`;
|
|
68
|
+
await fs.writeFile(path.join(destArtifactsDir, `${destName}.d.json.ts`), content);
|
|
69
|
+
}
|
|
70
|
+
function generateNames(names) {
|
|
71
|
+
return `
|
|
72
|
+
export const protocolContractNames = [
|
|
73
|
+
${names.map((name)=>`'${name}'`).join(',\n')}
|
|
74
|
+
] as const;
|
|
75
|
+
|
|
76
|
+
export type ProtocolContractName = typeof protocolContractNames[number];
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
function generateSalts(names) {
|
|
80
|
+
return `
|
|
81
|
+
export const ProtocolContractSalt: Record<ProtocolContractName, Fr> = {
|
|
82
|
+
${names.map((name)=>`${name}: new Fr(${salt.toNumber()})`).join(',\n')}
|
|
83
|
+
};
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
function generateContractAddresses(names) {
|
|
87
|
+
const addresses = names.map((name)=>`${name}: AztecAddress.fromBigInt(${contractAddressMapping[name]}n)`).join(',\n');
|
|
88
|
+
return `
|
|
89
|
+
export const ProtocolContractAddress: Record<ProtocolContractName, AztecAddress> = {
|
|
90
|
+
${addresses}
|
|
91
|
+
};
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
function generateContractLeaves(names, leaves) {
|
|
95
|
+
return `
|
|
96
|
+
export const ProtocolContractLeaf = {
|
|
97
|
+
${leaves.map((leaf, i)=>`${names[i]}: Fr.fromHexString('${leaf.toString()}')`).join(',\n')}
|
|
98
|
+
};
|
|
99
|
+
`;
|
|
100
|
+
}
|
|
101
|
+
async function generateRoot(names, leaves) {
|
|
102
|
+
const root = await computeRoot(names, leaves);
|
|
103
|
+
return `
|
|
104
|
+
export const protocolContractTreeRoot = Fr.fromHexString('${root.toString()}');
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
107
|
+
async function generateLogTags() {
|
|
108
|
+
return `
|
|
109
|
+
export const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG = new Fr(${REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE}n);
|
|
110
|
+
export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = new Fr(${REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE}n);
|
|
111
|
+
export const REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG = new Fr(${REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_MAGIC_VALUE}n);
|
|
112
|
+
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
113
|
+
DEPLOYER_CONTRACT_ADDRESS,
|
|
114
|
+
DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE
|
|
115
|
+
])}');
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
async function generateOutputFile(names, leaves) {
|
|
119
|
+
const content = `
|
|
120
|
+
// GENERATED FILE - DO NOT EDIT. RUN \`yarn generate\` or \`yarn generate:data\`
|
|
121
|
+
import { AztecAddress, Fr } from '@aztec/circuits.js';
|
|
122
|
+
|
|
123
|
+
${generateNames(names)}
|
|
124
|
+
|
|
125
|
+
${generateSalts(names)}
|
|
126
|
+
|
|
127
|
+
${generateContractAddresses(names)}
|
|
128
|
+
|
|
129
|
+
${generateContractLeaves(names, leaves)}
|
|
130
|
+
|
|
131
|
+
${await generateRoot(names, leaves)}
|
|
132
|
+
|
|
133
|
+
${await generateLogTags()}
|
|
134
|
+
`;
|
|
135
|
+
await fs.writeFile(outputFilePath, content);
|
|
136
|
+
}
|
|
137
|
+
async function main() {
|
|
138
|
+
await clearDestDir();
|
|
139
|
+
const srcNames = JSON.parse(await fs.readFile(path.join(noirContractsRoot, 'protocol_contracts.json'), 'utf8'));
|
|
140
|
+
const leaves = [];
|
|
141
|
+
const destNames = srcNames.map((n)=>n.split('-')[1]);
|
|
142
|
+
for(let i = 0; i < srcNames.length; i++){
|
|
143
|
+
const srcName = srcNames[i];
|
|
144
|
+
const destName = destNames[i];
|
|
145
|
+
const artifact = await copyArtifact(srcName, destName);
|
|
146
|
+
await generateDeclarationFile(destName);
|
|
147
|
+
const contractLeaf = await computeContractLeaf(artifact);
|
|
148
|
+
leaves.push(contractLeaf.toField());
|
|
149
|
+
}
|
|
150
|
+
await generateOutputFile(destNames, leaves);
|
|
151
|
+
}
|
|
152
|
+
try {
|
|
153
|
+
await main();
|
|
154
|
+
} catch (err) {
|
|
155
|
+
log(`Error copying protocol contract artifacts: ${err}`);
|
|
156
|
+
process.exit(1);
|
|
157
|
+
}
|
package/dest/tests/fixtures.js
CHANGED
|
@@ -24,4 +24,3 @@ export function getSampleContractInstanceDeployedEventPayload() {
|
|
|
24
24
|
export function getPathToFixture(name) {
|
|
25
25
|
return resolve(dirname(fileURLToPath(import.meta.url)), `../../fixtures/${name}`);
|
|
26
26
|
}
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4dHVyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGVzdHMvZml4dHVyZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLElBQUksQ0FBQztBQUNsQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN4QyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBRXBDLHdIQUF3SDtBQUN4SCxNQUFNLFVBQVUsNENBQTRDO0lBQzFELE1BQU0sSUFBSSxHQUFHLGdCQUFnQixDQUFDLHNDQUFzQyxDQUFDLENBQUM7SUFDdEUsT0FBTyxNQUFNLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUMzRCxDQUFDO0FBRUQsd0hBQXdIO0FBQ3hILE1BQU0sVUFBVSwrQ0FBK0M7SUFDN0QsTUFBTSxJQUFJLEdBQUcsZ0JBQWdCLENBQUMseUNBQXlDLENBQUMsQ0FBQztJQUN6RSxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxDQUFDLFFBQVEsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQzNELENBQUM7QUFFRCx3SEFBd0g7QUFDeEgsTUFBTSxVQUFVLHFEQUFxRDtJQUNuRSxNQUFNLElBQUksR0FBRyxnQkFBZ0IsQ0FBQywrQ0FBK0MsQ0FBQyxDQUFDO0lBQy9FLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLENBQUMsUUFBUSxFQUFFLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDM0QsQ0FBQztBQUVELHdIQUF3SDtBQUN4SCxNQUFNLFVBQVUsNkNBQTZDO0lBQzNELE1BQU0sSUFBSSxHQUFHLGdCQUFnQixDQUFDLHVDQUF1QyxDQUFDLENBQUM7SUFDdkUsT0FBTyxNQUFNLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUMzRCxDQUFDO0FBRUQsTUFBTSxVQUFVLGdCQUFnQixDQUFDLElBQVk7SUFDM0MsT0FBTyxPQUFPLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUUsa0JBQWtCLElBQUksRUFBRSxDQUFDLENBQUM7QUFDcEYsQ0FBQyJ9
|
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.
|
|
5
|
+
"version": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dest/index.js",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"build": "yarn clean && yarn generate && yarn generate:cleanup-artifacts && tsc -b",
|
|
23
23
|
"build:keep-debug-symbols": "yarn clean && yarn generate && tsc -b",
|
|
24
24
|
"generate": "yarn generate:data",
|
|
25
|
-
"generate:cleanup-artifacts": "node --no-warnings --loader
|
|
26
|
-
"generate:data": "node --no-warnings --loader
|
|
25
|
+
"generate:cleanup-artifacts": "node --no-warnings --loader @swc-node/register/esm src/scripts/cleanup_artifacts.ts",
|
|
26
|
+
"generate:data": "node --no-warnings --loader @swc-node/register/esm src/scripts/generate_data.ts",
|
|
27
27
|
"build:dev": "tsc -b --watch",
|
|
28
28
|
"build:ts": "tsc -b",
|
|
29
29
|
"clean": "rm -rf ./dest .tsbuildinfo ./artifacts",
|
|
30
30
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
|
|
31
31
|
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
|
|
32
|
-
"test": "
|
|
32
|
+
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
33
33
|
},
|
|
34
34
|
"inherits": [
|
|
35
35
|
"../package.common.json",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/circuits.js": "0.
|
|
73
|
-
"@aztec/foundation": "0.
|
|
74
|
-
"@aztec/types": "0.
|
|
72
|
+
"@aztec/circuits.js": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
|
|
73
|
+
"@aztec/foundation": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
|
|
74
|
+
"@aztec/types": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
|
|
75
75
|
"lodash.chunk": "^4.2.0",
|
|
76
76
|
"lodash.omit": "^4.5.0",
|
|
77
77
|
"tslib": "^2.4.0"
|
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
);
|
|
1
|
+
|
|
2
|
+
// GENERATED FILE - DO NOT EDIT. RUN `yarn generate` or `yarn generate:data`
|
|
3
|
+
import { AztecAddress, Fr } from '@aztec/circuits.js';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const protocolContractNames = [
|
|
7
|
+
'AuthRegistry',
|
|
8
|
+
'ContractInstanceDeployer',
|
|
9
|
+
'ContractClassRegisterer',
|
|
10
|
+
'MultiCallEntrypoint',
|
|
11
|
+
'FeeJuice',
|
|
12
|
+
'Router'
|
|
13
|
+
] as const;
|
|
14
|
+
|
|
15
|
+
export type ProtocolContractName = typeof protocolContractNames[number];
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export const ProtocolContractSalt: Record<ProtocolContractName, Fr> = {
|
|
20
|
+
AuthRegistry: new Fr(1),
|
|
21
|
+
ContractInstanceDeployer: new Fr(1),
|
|
22
|
+
ContractClassRegisterer: new Fr(1),
|
|
23
|
+
MultiCallEntrypoint: new Fr(1),
|
|
24
|
+
FeeJuice: new Fr(1),
|
|
25
|
+
Router: new Fr(1)
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export const ProtocolContractAddress: Record<ProtocolContractName, AztecAddress> = {
|
|
31
|
+
AuthRegistry: AztecAddress.fromBigInt(1n),
|
|
32
|
+
ContractInstanceDeployer: AztecAddress.fromBigInt(2n),
|
|
33
|
+
ContractClassRegisterer: AztecAddress.fromBigInt(3n),
|
|
34
|
+
MultiCallEntrypoint: AztecAddress.fromBigInt(4n),
|
|
35
|
+
FeeJuice: AztecAddress.fromBigInt(5n),
|
|
36
|
+
Router: AztecAddress.fromBigInt(6n)
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
export const ProtocolContractLeaf = {
|
|
42
|
+
AuthRegistry: Fr.fromHexString('0x201c850dedc42fce3a3b21643a576749faced7416d6596bc67c8698c39f632ef'),
|
|
43
|
+
ContractInstanceDeployer: Fr.fromHexString('0x0cb48d40036c52d8871eb0702e89c2eae4e9fd6e22aeff97339613aedf7ad1b3'),
|
|
44
|
+
ContractClassRegisterer: Fr.fromHexString('0x20ba518f194f175b4d4aaeafb612b6ede29fddbb3a825a912caf9ba247be565f'),
|
|
45
|
+
MultiCallEntrypoint: Fr.fromHexString('0x07935de08f0d1151559980b0fb2b53c7fdd87f7a81da975c43ce38183cc3b1a0'),
|
|
46
|
+
FeeJuice: Fr.fromHexString('0x2e52c28298a428169cd04083df8eed1217e92d0e0afb7694d2937da4655feaa7'),
|
|
47
|
+
Router: Fr.fromHexString('0x010803e687047aeafce98a4929c00576314b4f55540e14cad36b1e7a468e66c5')
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x2a22cd0a794cac972cdb72767be4c8375625d1de577ffdde150b685809f19423');
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
export const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG = new Fr(11121068431693264234253912047066709627593769337094408533543930778360n);
|
|
57
|
+
export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = new Fr(2889881020989534926461066592611988634597302675057895885580456197069n);
|
|
58
|
+
export const REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG = new Fr(24399338136397901754495080759185489776044879232766421623673792970137n);
|
|
59
|
+
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('0x2ec28b91a5f838506d6042915005ff55cf7a0a5f889a83b11faed33a31b486f2');
|
|
60
|
+
|
|
61
|
+
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type ProtocolContract } from '../protocol_contract.js';
|
|
2
|
-
export declare const AuthRegistryArtifact: import("@aztec/foundation/abi").ContractArtifact;
|
|
3
|
-
/** Returns the canonical deployment of the auth registry. */
|
|
4
|
-
export declare function getCanonicalAuthRegistry(): Promise<ProtocolContract>;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth-registry/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAO,MAAM,oBAAoB,kDAAiE,CAAC;AAEnG,6DAA6D;AAC7D,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAK1E"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type AztecAddress, type Fr, type MerkleTree } from '@aztec/circuits.js';
|
|
2
|
-
export declare function buildProtocolContractTree(contracts: {
|
|
3
|
-
address: AztecAddress;
|
|
4
|
-
leaf: Fr;
|
|
5
|
-
}[]): Promise<MerkleTree>;
|
|
6
|
-
//# sourceMappingURL=build_protocol_contract_tree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build_protocol_contract_tree.d.ts","sourceRoot":"","sources":["../src/build_protocol_contract_tree.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,EAAE,EACP,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAG5B,wBAAsB,yBAAyB,CAAC,SAAS,EAAE;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,EAAE,CAAA;CAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAarH"}
|
package/dest/bundle/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ContractArtifact } from '@aztec/foundation/abi';
|
|
2
|
-
import { type ProtocolContract } from '../protocol_contract.js';
|
|
3
|
-
import { type ProtocolContractName } from '../protocol_contract_data.js';
|
|
4
|
-
/** Returns the canonical deployment a given artifact. */
|
|
5
|
-
export declare function getCanonicalProtocolContract(name: ProtocolContractName): Promise<ProtocolContract>;
|
|
6
|
-
export declare const ProtocolContractArtifact: Record<ProtocolContractName, ContractArtifact>;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundle/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAA2B,KAAK,oBAAoB,EAAwB,MAAM,8BAA8B,CAAC;AAGxH,yDAAyD;AACzD,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAaxG;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAOnF,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { type ContractClassPublic } from '@aztec/circuits.js';
|
|
4
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
/** Event emitted from the ContractClassRegisterer. */
|
|
6
|
-
export declare class ContractClassRegisteredEvent {
|
|
7
|
-
readonly contractClassId: Fr;
|
|
8
|
-
readonly version: number;
|
|
9
|
-
readonly artifactHash: Fr;
|
|
10
|
-
readonly privateFunctionsRoot: Fr;
|
|
11
|
-
readonly packedPublicBytecode: Buffer;
|
|
12
|
-
constructor(contractClassId: Fr, version: number, artifactHash: Fr, privateFunctionsRoot: Fr, packedPublicBytecode: Buffer);
|
|
13
|
-
static isContractClassRegisteredEvent(log: Buffer): boolean;
|
|
14
|
-
static fromLog(log: Buffer): ContractClassRegisteredEvent;
|
|
15
|
-
toContractClassPublic(): Promise<ContractClassPublic>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=contract_class_registered_event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract_class_registered_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/contract_class_registered_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAO9C,sDAAsD;AACtD,qBAAa,4BAA4B;aAErB,eAAe,EAAE,EAAE;aACnB,OAAO,EAAE,MAAM;aACf,YAAY,EAAE,EAAE;aAChB,oBAAoB,EAAE,EAAE;aACxB,oBAAoB,EAAE,MAAM;gBAJ5B,eAAe,EAAE,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,oBAAoB,EAAE,MAAM;IAG9C,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,MAAM;IAIjD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM;IAmBpB,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAqC5D"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ProtocolContract } from '../protocol_contract.js';
|
|
2
|
-
export * from './contract_class_registered_event.js';
|
|
3
|
-
export * from './private_function_broadcasted_event.js';
|
|
4
|
-
export * from './unconstrained_function_broadcasted_event.js';
|
|
5
|
-
export declare const ContractClassRegistererArtifact: import("@aztec/foundation/abi").ContractArtifact;
|
|
6
|
-
/** Returns the canonical deployment of the contract. */
|
|
7
|
-
export declare function getCanonicalClassRegisterer(): Promise<ProtocolContract>;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/class-registerer/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAE9D,eAAO,MAAM,+BAA+B,kDAE3C,CAAC;AAIF,wDAAwD;AACxD,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM7E"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, type ExecutablePrivateFunctionWithMembershipProof, FUNCTION_TREE_HEIGHT, type PrivateFunction } from '@aztec/circuits.js';
|
|
4
|
-
import { FunctionSelector } from '@aztec/foundation/abi';
|
|
5
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
6
|
-
import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
|
|
7
|
-
/** Event emitted from the ContractClassRegisterer. */
|
|
8
|
-
export declare class PrivateFunctionBroadcastedEvent {
|
|
9
|
-
readonly contractClassId: Fr;
|
|
10
|
-
readonly artifactMetadataHash: Fr;
|
|
11
|
-
readonly unconstrainedFunctionsArtifactTreeRoot: Fr;
|
|
12
|
-
readonly privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>;
|
|
13
|
-
readonly privateFunctionTreeLeafIndex: number;
|
|
14
|
-
readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>;
|
|
15
|
-
readonly artifactFunctionTreeLeafIndex: number;
|
|
16
|
-
readonly privateFunction: BroadcastedPrivateFunction;
|
|
17
|
-
constructor(contractClassId: Fr, artifactMetadataHash: Fr, unconstrainedFunctionsArtifactTreeRoot: Fr, privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>, privateFunctionTreeLeafIndex: number, artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>, artifactFunctionTreeLeafIndex: number, privateFunction: BroadcastedPrivateFunction);
|
|
18
|
-
static isPrivateFunctionBroadcastedEvent(log: Buffer): boolean;
|
|
19
|
-
static fromLog(log: Buffer): PrivateFunctionBroadcastedEvent;
|
|
20
|
-
static fromBuffer(buffer: Buffer | BufferReader): PrivateFunctionBroadcastedEvent;
|
|
21
|
-
toFunctionWithMembershipProof(): ExecutablePrivateFunctionWithMembershipProof;
|
|
22
|
-
}
|
|
23
|
-
export declare class BroadcastedPrivateFunction implements PrivateFunction {
|
|
24
|
-
/** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
|
|
25
|
-
readonly selector: FunctionSelector;
|
|
26
|
-
/** Artifact metadata hash */
|
|
27
|
-
readonly metadataHash: Fr;
|
|
28
|
-
/** Hash of the verification key associated to this private function. */
|
|
29
|
-
readonly vkHash: Fr;
|
|
30
|
-
/** ACIR and Brillig bytecode */
|
|
31
|
-
readonly bytecode: Buffer;
|
|
32
|
-
constructor(
|
|
33
|
-
/** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
|
|
34
|
-
selector: FunctionSelector,
|
|
35
|
-
/** Artifact metadata hash */
|
|
36
|
-
metadataHash: Fr,
|
|
37
|
-
/** Hash of the verification key associated to this private function. */
|
|
38
|
-
vkHash: Fr,
|
|
39
|
-
/** ACIR and Brillig bytecode */
|
|
40
|
-
bytecode: Buffer);
|
|
41
|
-
static fromBuffer(buffer: Buffer | BufferReader): BroadcastedPrivateFunction;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=private_function_broadcasted_event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"private_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/private_function_broadcasted_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,iCAAiC,EACjC,KAAK,4CAA4C,EACjD,oBAAoB,EAEpB,KAAK,eAAe,EAErB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAMvE,sDAAsD;AACtD,qBAAa,+BAA+B;aAExB,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,EAAE;aACxB,sCAAsC,EAAE,EAAE;aAC1C,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,oBAAoB,CAAC;aACtE,4BAA4B,EAAE,MAAM;aACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC;aACpF,6BAA6B,EAAE,MAAM;aACrC,eAAe,EAAE,0BAA0B;gBAP3C,eAAe,EAAE,EAAE,EACnB,oBAAoB,EAAE,EAAE,EACxB,sCAAsC,EAAE,EAAE,EAC1C,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,oBAAoB,CAAC,EACtE,4BAA4B,EAAE,MAAM,EACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC,EACpF,6BAA6B,EAAE,MAAM,EACrC,eAAe,EAAE,0BAA0B;IAG7D,MAAM,CAAC,iCAAiC,CAAC,GAAG,EAAE,MAAM;IAIpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM;IAsB1B,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAuB/C,6BAA6B,IAAI,4CAA4C;CAa9E;AAED,qBAAa,0BAA2B,YAAW,eAAe;IAE9D,qJAAqJ;aACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;aACb,YAAY,EAAE,EAAE;IAChC,wEAAwE;aACxD,MAAM,EAAE,EAAE;IAC1B,gCAAgC;aAChB,QAAQ,EAAE,MAAM;;IAPhC,qJAAqJ;IACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;IACb,YAAY,EAAE,EAAE;IAChC,wEAAwE;IACxD,MAAM,EAAE,EAAE;IAC1B,gCAAgC;IAChB,QAAQ,EAAE,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;CAShD"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, type UnconstrainedFunction, type UnconstrainedFunctionWithMembershipProof } from '@aztec/circuits.js';
|
|
4
|
-
import { FunctionSelector } from '@aztec/foundation/abi';
|
|
5
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
6
|
-
import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
|
|
7
|
-
/** Event emitted from the ContractClassRegisterer. */
|
|
8
|
-
export declare class UnconstrainedFunctionBroadcastedEvent {
|
|
9
|
-
readonly contractClassId: Fr;
|
|
10
|
-
readonly artifactMetadataHash: Fr;
|
|
11
|
-
readonly privateFunctionsArtifactTreeRoot: Fr;
|
|
12
|
-
readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>;
|
|
13
|
-
readonly artifactFunctionTreeLeafIndex: number;
|
|
14
|
-
readonly unconstrainedFunction: BroadcastedUnconstrainedFunction;
|
|
15
|
-
constructor(contractClassId: Fr, artifactMetadataHash: Fr, privateFunctionsArtifactTreeRoot: Fr, artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>, artifactFunctionTreeLeafIndex: number, unconstrainedFunction: BroadcastedUnconstrainedFunction);
|
|
16
|
-
static isUnconstrainedFunctionBroadcastedEvent(log: Buffer): boolean;
|
|
17
|
-
static fromLog(log: Buffer): UnconstrainedFunctionBroadcastedEvent;
|
|
18
|
-
static fromBuffer(buffer: Buffer | BufferReader): UnconstrainedFunctionBroadcastedEvent;
|
|
19
|
-
toFunctionWithMembershipProof(): UnconstrainedFunctionWithMembershipProof;
|
|
20
|
-
}
|
|
21
|
-
export declare class BroadcastedUnconstrainedFunction implements UnconstrainedFunction {
|
|
22
|
-
/** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
|
|
23
|
-
readonly selector: FunctionSelector;
|
|
24
|
-
/** Artifact metadata hash */
|
|
25
|
-
readonly metadataHash: Fr;
|
|
26
|
-
/** Brillig bytecode */
|
|
27
|
-
readonly bytecode: Buffer;
|
|
28
|
-
constructor(
|
|
29
|
-
/** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
|
|
30
|
-
selector: FunctionSelector,
|
|
31
|
-
/** Artifact metadata hash */
|
|
32
|
-
metadataHash: Fr,
|
|
33
|
-
/** Brillig bytecode */
|
|
34
|
-
bytecode: Buffer);
|
|
35
|
-
static fromBuffer(buffer: Buffer | BufferReader): BroadcastedUnconstrainedFunction;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=unconstrained_function_broadcasted_event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unconstrained_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/unconstrained_function_broadcasted_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,iCAAiC,EAGjC,KAAK,qBAAqB,EAC1B,KAAK,wCAAwC,EAC9C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAE3E,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAMvE,sDAAsD;AACtD,qBAAa,qCAAqC;aAE9B,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,EAAE;aACxB,gCAAgC,EAAE,EAAE;aACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC;aACpF,6BAA6B,EAAE,MAAM;aACrC,qBAAqB,EAAE,gCAAgC;gBALvD,eAAe,EAAE,EAAE,EACnB,oBAAoB,EAAE,EAAE,EACxB,gCAAgC,EAAE,EAAE,EACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC,EACpF,6BAA6B,EAAE,MAAM,EACrC,qBAAqB,EAAE,gCAAgC;IAGzE,MAAM,CAAC,uCAAuC,CAAC,GAAG,EAAE,MAAM;IAI1D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM;IAsB1B,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAmB/C,6BAA6B,IAAI,wCAAwC;CAgB1E;AAED,qBAAa,gCAAiC,YAAW,qBAAqB;IAE1E,qJAAqJ;aACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;aACb,YAAY,EAAE,EAAE;IAChC,uBAAuB;aACP,QAAQ,EAAE,MAAM;;IALhC,qJAAqJ;IACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;IACb,YAAY,EAAE,EAAE;IAChC,uBAAuB;IACP,QAAQ,EAAE,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;CAQhD"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type ProtocolContract } from '../protocol_contract.js';
|
|
2
|
-
export declare const FeeJuiceArtifact: import("@aztec/foundation/abi").ContractArtifact;
|
|
3
|
-
/** Returns the canonical deployment of the contract. */
|
|
4
|
-
export declare function getCanonicalFeeJuice(): Promise<ProtocolContract>;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fee-juice/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,eAAO,MAAM,gBAAgB,kDAA6D,CAAC;AAI3F,wDAAwD;AACxD,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAKtE"}
|
package/dest/index.d.ts
DELETED
package/dest/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type ContractInstanceWithAddress, type PrivateLog, PublicKeys } from '@aztec/circuits.js';
|
|
2
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
/** Event emitted from the ContractInstanceDeployer. */
|
|
5
|
-
export declare class ContractInstanceDeployedEvent {
|
|
6
|
-
readonly address: AztecAddress;
|
|
7
|
-
readonly version: number;
|
|
8
|
-
readonly salt: Fr;
|
|
9
|
-
readonly contractClassId: Fr;
|
|
10
|
-
readonly initializationHash: Fr;
|
|
11
|
-
readonly publicKeys: PublicKeys;
|
|
12
|
-
readonly deployer: AztecAddress;
|
|
13
|
-
constructor(address: AztecAddress, version: number, salt: Fr, contractClassId: Fr, initializationHash: Fr, publicKeys: PublicKeys, deployer: AztecAddress);
|
|
14
|
-
static isContractInstanceDeployedEvent(log: PrivateLog): boolean;
|
|
15
|
-
static fromLog(log: PrivateLog): ContractInstanceDeployedEvent;
|
|
16
|
-
toContractInstance(): ContractInstanceWithAddress;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=contract_instance_deployed_event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract_instance_deployed_event.d.ts","sourceRoot":"","sources":["../../src/instance-deployer/contract_instance_deployed_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,2BAA2B,EAAE,KAAK,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAK9C,uDAAuD;AACvD,qBAAa,6BAA6B;aAEtB,OAAO,EAAE,YAAY;aACrB,OAAO,EAAE,MAAM;aACf,IAAI,EAAE,EAAE;aACR,eAAe,EAAE,EAAE;aACnB,kBAAkB,EAAE,EAAE;aACtB,UAAU,EAAE,UAAU;aACtB,QAAQ,EAAE,YAAY;gBANtB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,EAAE,EACR,eAAe,EAAE,EAAE,EACnB,kBAAkB,EAAE,EAAE,EACtB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,YAAY;IAGxC,MAAM,CAAC,+BAA+B,CAAC,GAAG,EAAE,UAAU;IAItD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU;IAsB9B,kBAAkB,IAAI,2BAA2B;CAelD"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ProtocolContract } from '../protocol_contract.js';
|
|
2
|
-
export * from './contract_instance_deployed_event.js';
|
|
3
|
-
export declare const ContractInstanceDeployerArtifact: import("@aztec/foundation/abi").ContractArtifact;
|
|
4
|
-
/** Returns the canonical deployment of the contract. */
|
|
5
|
-
export declare function getCanonicalInstanceDeployer(): Promise<ProtocolContract>;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/instance-deployer/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,uCAAuC,CAAC;AAEtD,eAAO,MAAM,gCAAgC,kDAE5C,CAAC;AAIF,wDAAwD;AACxD,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAK9E"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ContractArtifact } from '@aztec/foundation/abi';
|
|
2
|
-
import { type ProtocolContract } from './protocol_contract.js';
|
|
3
|
-
import { type ProtocolContractName } from './protocol_contract_data.js';
|
|
4
|
-
/**
|
|
5
|
-
* Returns the canonical deployment given its name and artifact.
|
|
6
|
-
* To be used internally within the protocol-contracts package.
|
|
7
|
-
*/
|
|
8
|
-
export declare function makeProtocolContract(name: ProtocolContractName, artifact: ContractArtifact): Promise<ProtocolContract>;
|
|
9
|
-
//# sourceMappingURL=make_protocol_contract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"make_protocol_contract.d.ts","sourceRoot":"","sources":["../src/make_protocol_contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAA2B,KAAK,oBAAoB,EAAwB,MAAM,6BAA6B,CAAC;AAEvH;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,oBAAoB,EAC1B,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAY3B"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type ProtocolContract } from '../protocol_contract.js';
|
|
2
|
-
export declare const MultiCallEntrypointArtifact: import("@aztec/foundation/abi").ContractArtifact;
|
|
3
|
-
/** Returns the canonical deployment of the contract. */
|
|
4
|
-
export declare function getCanonicalMultiCallEntrypoint(): Promise<ProtocolContract>;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/multi-call-entrypoint/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,eAAO,MAAM,2BAA2B,kDAAwE,CAAC;AAIjH,wDAAwD;AACxD,wBAAsB,+BAA+B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAKjF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type AztecAddress, type ContractClassIdPreimage, type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/circuits.js';
|
|
2
|
-
import { type ContractArtifact } from '@aztec/foundation/abi';
|
|
3
|
-
/** Represents a canonical contract in the protocol. */
|
|
4
|
-
export interface ProtocolContract {
|
|
5
|
-
/** Canonical deployed instance. */
|
|
6
|
-
instance: ContractInstanceWithAddress;
|
|
7
|
-
/** Contract class of this contract. */
|
|
8
|
-
contractClass: ContractClassWithId & ContractClassIdPreimage;
|
|
9
|
-
/** Complete contract artifact. */
|
|
10
|
-
artifact: ContractArtifact;
|
|
11
|
-
/** Deployment address for the canonical instance. */
|
|
12
|
-
address: AztecAddress;
|
|
13
|
-
}
|
|
14
|
-
export declare function isProtocolContract(address: AztecAddress): boolean;
|
|
15
|
-
//# sourceMappingURL=protocol_contract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protocol_contract.d.ts","sourceRoot":"","sources":["../src/protocol_contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EACjC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,QAAQ,EAAE,2BAA2B,CAAC;IACtC,uCAAuC;IACvC,aAAa,EAAE,mBAAmB,GAAG,uBAAuB,CAAC;IAC7D,kCAAkC;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,sDAAsD;IACtD,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,WAEvD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AztecAddress, Fr } from '@aztec/circuits.js';
|
|
2
|
-
export declare const protocolContractNames: readonly ["AuthRegistry", "ContractInstanceDeployer", "ContractClassRegisterer", "MultiCallEntrypoint", "FeeJuice", "Router"];
|
|
3
|
-
export type ProtocolContractName = (typeof protocolContractNames)[number];
|
|
4
|
-
export declare const ProtocolContractSalt: Record<ProtocolContractName, Fr>;
|
|
5
|
-
export declare const ProtocolContractAddress: Record<ProtocolContractName, AztecAddress>;
|
|
6
|
-
export declare const ProtocolContractLeaf: {
|
|
7
|
-
AuthRegistry: Fr;
|
|
8
|
-
ContractInstanceDeployer: Fr;
|
|
9
|
-
ContractClassRegisterer: Fr;
|
|
10
|
-
MultiCallEntrypoint: Fr;
|
|
11
|
-
FeeJuice: Fr;
|
|
12
|
-
Router: Fr;
|
|
13
|
-
};
|
|
14
|
-
export declare const protocolContractTreeRoot: Fr;
|
|
15
|
-
export declare const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG: Fr;
|
|
16
|
-
export declare const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG: Fr;
|
|
17
|
-
export declare const REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG: Fr;
|
|
18
|
-
export declare const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG: Fr;
|
|
19
|
-
//# sourceMappingURL=protocol_contract_data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protocol_contract_data.d.ts","sourceRoot":"","sources":["../src/protocol_contract_data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,qBAAqB,+HAOxB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAOjE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAO9E,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;CAOhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,IAEpC,CAAC;AAEF,eAAO,MAAM,wCAAwC,IAEpD,CAAC;AACF,eAAO,MAAM,2CAA2C,IAEvD,CAAC;AACF,eAAO,MAAM,iDAAiD,IAE7D,CAAC;AACF,eAAO,MAAM,uCAAuC,IAEnD,CAAC"}
|