@aztec/builder 4.0.0-nightly.20260113 → 4.0.0-nightly.20260114
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/dest/contract-interface-gen/index.d.ts +2 -0
- package/dest/contract-interface-gen/index.d.ts.map +1 -0
- package/dest/contract-interface-gen/index.js +1 -0
- package/dest/contract-interface-gen/typescript.d.ts +1 -1
- package/dest/contract-interface-gen/typescript.d.ts.map +1 -1
- package/dest/contract-interface-gen/typescript.js +6 -1
- package/package.json +5 -4
- package/src/contract-interface-gen/index.ts +1 -0
- package/src/contract-interface-gen/typescript.ts +6 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { generateTypescriptContractInterface } from './typescript.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdC1pbnRlcmZhY2UtZ2VuL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxtQ0FBbUMsRUFBRSxNQUFNLGlCQUFpQixDQUFDIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract-interface-gen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateTypescriptContractInterface } from './typescript.js';
|
|
@@ -6,4 +6,4 @@ import { type ContractArtifact } from '@aztec/stdlib/abi';
|
|
|
6
6
|
* @returns The corresponding ts code.
|
|
7
7
|
*/
|
|
8
8
|
export declare function generateTypescriptContractInterface(input: ContractArtifact, artifactImportPath?: string): Promise<string>;
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXNjcmlwdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0LWludGVyZmFjZS1nZW4vdHlwZXNjcmlwdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBR0wsS0FBSyxnQkFBZ0IsRUFZdEIsTUFBTSxtQkFBbUIsQ0FBQztBQTRRM0I7Ozs7O0dBS0c7QUFDSCx3QkFBc0IsbUNBQW1DLENBQUMsS0FBSyxFQUFFLGdCQUFnQixFQUFFLGtCQUFrQixDQUFDLEVBQUUsTUFBTSxtQkFrRDdHIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/contract-interface-gen/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/contract-interface-gen/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EAYtB,MAAM,mBAAmB,CAAC;AA4Q3B;;;;;GAKG;AACH,wBAAsB,mCAAmC,CAAC,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,EAAE,MAAM,mBAkD7G"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventSelector, decodeFunctionSignature, getAllFunctionAbis, getDefaultInitializer, isAztecAddressStruct, isBoundedVecStruct, isEthAddressStruct, isFunctionSelectorStruct, isWrappedFieldStruct } from '@aztec/stdlib/abi';
|
|
1
|
+
import { EventSelector, decodeFunctionSignature, getAllFunctionAbis, getDefaultInitializer, isAztecAddressStruct, isBoundedVecStruct, isEthAddressStruct, isFunctionSelectorStruct, isPublicKeysStruct, isWrappedFieldStruct } from '@aztec/stdlib/abi';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the corresponding typescript type for a given Noir type.
|
|
4
4
|
* @param type - The input Noir type.
|
|
@@ -28,6 +28,11 @@ import { EventSelector, decodeFunctionSignature, getAllFunctionAbis, getDefaultI
|
|
|
28
28
|
if (isWrappedFieldStruct(type)) {
|
|
29
29
|
return 'WrappedFieldLike';
|
|
30
30
|
}
|
|
31
|
+
if (isPublicKeysStruct(type)) {
|
|
32
|
+
// PublicKeys are special cased due to them being part of the preimage of contract addresses.
|
|
33
|
+
// The proper type is expected by the TS code that deals with the ContractInstanceRegistry protocol contract.
|
|
34
|
+
return 'PublicKeys';
|
|
35
|
+
}
|
|
31
36
|
if (isBoundedVecStruct(type)) {
|
|
32
37
|
// To make BoundedVec easier to work with, we expect a simple array on the input and then we encode it
|
|
33
38
|
// as a BoundedVec in the ArgumentsEncoder.
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/builder",
|
|
3
|
-
"version": "4.0.0-nightly.
|
|
3
|
+
"version": "4.0.0-nightly.20260114",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
7
|
-
"./cli": "./dest/bin/cli.js"
|
|
7
|
+
"./cli": "./dest/bin/cli.js",
|
|
8
|
+
"./codegen": "./dest/contract-interface-gen/index.js"
|
|
8
9
|
},
|
|
9
10
|
"typedocOptions": {
|
|
10
11
|
"entryPoints": [
|
|
@@ -69,8 +70,8 @@
|
|
|
69
70
|
]
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|
|
72
|
-
"@aztec/foundation": "4.0.0-nightly.
|
|
73
|
-
"@aztec/stdlib": "4.0.0-nightly.
|
|
73
|
+
"@aztec/foundation": "4.0.0-nightly.20260114",
|
|
74
|
+
"@aztec/stdlib": "4.0.0-nightly.20260114",
|
|
74
75
|
"commander": "^12.1.0"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateTypescriptContractInterface } from './typescript.js';
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
isBoundedVecStruct,
|
|
12
12
|
isEthAddressStruct,
|
|
13
13
|
isFunctionSelectorStruct,
|
|
14
|
+
isPublicKeysStruct,
|
|
14
15
|
isWrappedFieldStruct,
|
|
15
16
|
} from '@aztec/stdlib/abi';
|
|
16
17
|
|
|
@@ -44,6 +45,11 @@ function abiTypeToTypescript(type: ABIParameter['type']): string {
|
|
|
44
45
|
if (isWrappedFieldStruct(type)) {
|
|
45
46
|
return 'WrappedFieldLike';
|
|
46
47
|
}
|
|
48
|
+
if (isPublicKeysStruct(type)) {
|
|
49
|
+
// PublicKeys are special cased due to them being part of the preimage of contract addresses.
|
|
50
|
+
// The proper type is expected by the TS code that deals with the ContractInstanceRegistry protocol contract.
|
|
51
|
+
return 'PublicKeys';
|
|
52
|
+
}
|
|
47
53
|
if (isBoundedVecStruct(type)) {
|
|
48
54
|
// To make BoundedVec easier to work with, we expect a simple array on the input and then we encode it
|
|
49
55
|
// as a BoundedVec in the ArgumentsEncoder.
|