-
Notifications
You must be signed in to change notification settings - Fork 613
Expand file tree
/
Copy pathstats.ts
More file actions
53 lines (51 loc) · 1.88 KB
/
Copy pathstats.ts
File metadata and controls
53 lines (51 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
53
import type { CircuitName } from '@aztec/circuit-types/stats';
import { type ClientProtocolArtifact, type ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types';
export { mapPublicKernelToCircuitName } from '@aztec/circuit-types';
export function mapProtocolArtifactNameToCircuitName(
artifact: ServerProtocolArtifact | ClientProtocolArtifact,
): CircuitName {
switch (artifact) {
case 'BaseParityArtifact':
return 'base-parity';
case 'RootParityArtifact':
return 'root-parity';
case 'BaseRollupArtifact':
return 'base-rollup';
case 'MergeRollupArtifact':
return 'merge-rollup';
case 'RootRollupArtifact':
return 'root-rollup';
case 'PublicKernelSetupArtifact':
return 'public-kernel-setup';
case 'PublicKernelAppLogicArtifact':
return 'public-kernel-app-logic';
case 'PublicKernelTeardownArtifact':
return 'public-kernel-teardown';
case 'PublicKernelTailArtifact':
return 'public-kernel-tail';
case 'PrivateKernelInitArtifact':
return 'private-kernel-init';
case 'PrivateKernelInnerArtifact':
return 'private-kernel-inner';
case 'PrivateKernelTailArtifact':
return 'private-kernel-tail';
case 'PrivateKernelTailToPublicArtifact':
return 'private-kernel-tail-to-public';
case 'PrivateKernelResetFullArtifact':
return 'private-kernel-reset-full';
case 'PrivateKernelResetBigArtifact':
return 'private-kernel-reset-big';
case 'PrivateKernelResetMediumArtifact':
return 'private-kernel-reset-medium';
case 'PrivateKernelResetSmallArtifact':
return 'private-kernel-reset-small';
case 'EmptyNestedArtifact':
return 'empty-nested';
case 'PrivateKernelEmptyArtifact':
return 'private-kernel-empty';
default: {
const _foo: never = artifact;
throw new Error(`Unknown circuit type: ${artifact}`);
}
}
}