@aztec/stdlib 1.0.0-nightly.20250810 → 1.0.0-nightly.20250812
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.
|
@@ -2,7 +2,6 @@ import { type ZodFor } from '@aztec/foundation/schemas';
|
|
|
2
2
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { type ContractArtifact } from '../abi/abi.js';
|
|
5
|
-
import { AztecAddress } from '../aztec-address/index.js';
|
|
6
5
|
import { type ContractInstanceWithAddress } from '../contract/interfaces/contract_instance.js';
|
|
7
6
|
import type { GasUsed } from '../gas/gas_used.js';
|
|
8
7
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
@@ -16,14 +15,13 @@ export type ContractOverrides = Record<string, {
|
|
|
16
15
|
}>;
|
|
17
16
|
export declare class SimulationOverrides {
|
|
18
17
|
contracts?: ContractOverrides | undefined;
|
|
19
|
-
|
|
20
|
-
constructor(contracts?: ContractOverrides | undefined, msgSender?: AztecAddress | undefined);
|
|
18
|
+
constructor(contracts?: ContractOverrides | undefined);
|
|
21
19
|
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
22
20
|
contracts: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
23
21
|
instance: z.ZodIntersection<z.ZodObject<{
|
|
24
22
|
version: z.ZodLiteral<1>;
|
|
25
23
|
salt: ZodFor<import("@aztec/foundation/schemas").Fr>;
|
|
26
|
-
deployer: ZodFor<AztecAddress>;
|
|
24
|
+
deployer: ZodFor<import("../aztec-address/index.js").AztecAddress>;
|
|
27
25
|
currentContractClassId: ZodFor<import("@aztec/foundation/schemas").Fr>;
|
|
28
26
|
originalContractClassId: ZodFor<import("@aztec/foundation/schemas").Fr>;
|
|
29
27
|
initializationHash: ZodFor<import("@aztec/foundation/schemas").Fr>;
|
|
@@ -52,7 +50,7 @@ export declare class SimulationOverrides {
|
|
|
52
50
|
version: 1;
|
|
53
51
|
salt: import("@aztec/foundation/schemas").Fr;
|
|
54
52
|
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
55
|
-
deployer: AztecAddress;
|
|
53
|
+
deployer: import("../aztec-address/index.js").AztecAddress;
|
|
56
54
|
currentContractClassId: import("@aztec/foundation/schemas").Fr;
|
|
57
55
|
originalContractClassId: import("@aztec/foundation/schemas").Fr;
|
|
58
56
|
initializationHash: import("@aztec/foundation/schemas").Fr;
|
|
@@ -70,9 +68,9 @@ export declare class SimulationOverrides {
|
|
|
70
68
|
originalContractClassId?: any;
|
|
71
69
|
initializationHash?: any;
|
|
72
70
|
}>, z.ZodObject<{
|
|
73
|
-
address: ZodFor<AztecAddress>;
|
|
71
|
+
address: ZodFor<import("../aztec-address/index.js").AztecAddress>;
|
|
74
72
|
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
address: AztecAddress;
|
|
73
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
76
74
|
}, {
|
|
77
75
|
address?: any;
|
|
78
76
|
}>>;
|
|
@@ -82,12 +80,12 @@ export declare class SimulationOverrides {
|
|
|
82
80
|
version: 1;
|
|
83
81
|
salt: import("@aztec/foundation/schemas").Fr;
|
|
84
82
|
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
85
|
-
deployer: AztecAddress;
|
|
83
|
+
deployer: import("../aztec-address/index.js").AztecAddress;
|
|
86
84
|
currentContractClassId: import("@aztec/foundation/schemas").Fr;
|
|
87
85
|
originalContractClassId: import("@aztec/foundation/schemas").Fr;
|
|
88
86
|
initializationHash: import("@aztec/foundation/schemas").Fr;
|
|
89
87
|
} & {
|
|
90
|
-
address: AztecAddress;
|
|
88
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
91
89
|
};
|
|
92
90
|
artifact: ContractArtifact;
|
|
93
91
|
}, {
|
|
@@ -109,25 +107,22 @@ export declare class SimulationOverrides {
|
|
|
109
107
|
};
|
|
110
108
|
artifact?: any;
|
|
111
109
|
}>>>;
|
|
112
|
-
msgSender: import("@aztec/foundation/schemas").ZodNullableOptional<ZodFor<AztecAddress>>;
|
|
113
110
|
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
msgSender?: AztecAddress | undefined;
|
|
115
111
|
contracts?: Record<string, {
|
|
116
112
|
instance: {
|
|
117
113
|
version: 1;
|
|
118
114
|
salt: import("@aztec/foundation/schemas").Fr;
|
|
119
115
|
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
120
|
-
deployer: AztecAddress;
|
|
116
|
+
deployer: import("../aztec-address/index.js").AztecAddress;
|
|
121
117
|
currentContractClassId: import("@aztec/foundation/schemas").Fr;
|
|
122
118
|
originalContractClassId: import("@aztec/foundation/schemas").Fr;
|
|
123
119
|
initializationHash: import("@aztec/foundation/schemas").Fr;
|
|
124
120
|
} & {
|
|
125
|
-
address: AztecAddress;
|
|
121
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
126
122
|
};
|
|
127
123
|
artifact: ContractArtifact;
|
|
128
124
|
}> | undefined;
|
|
129
125
|
}, {
|
|
130
|
-
msgSender?: any;
|
|
131
126
|
contracts?: Record<string, {
|
|
132
127
|
instance: {
|
|
133
128
|
version: 1;
|
|
@@ -148,7 +143,6 @@ export declare class SimulationOverrides {
|
|
|
148
143
|
artifact?: any;
|
|
149
144
|
}> | undefined;
|
|
150
145
|
}>, SimulationOverrides, {
|
|
151
|
-
msgSender?: any;
|
|
152
146
|
contracts?: Record<string, {
|
|
153
147
|
instance: {
|
|
154
148
|
version: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulated_tx.d.ts","sourceRoot":"","sources":["../../src/tx/simulated_tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CA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;;;;;;;;;;OAahB;CACF;AAED,qBAAa,uBAAuB;IAEzB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;gBADlD,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC;IAG3D,sBAAsB;IAIhB,aAAa,IAAI,OAAO,CAAC,EAAE,CAAC;CAUnC;AAED,qBAAa,kBAAkB;IAEpB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;IAClD,YAAY,CAAC,EAAE,sBAAsB;IACrC,KAAK,CAAC,EAAE,eAAe;gBAHvB,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC,EAClD,YAAY,CAAC,EAAE,sBAAsB,YAAA,EACrC,KAAK,CAAC,EAAE,eAAe,YAAA;IAGhC,IAAI,OAAO,IAAI,OAAO,CASrB;IAED,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAS9C;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IASjE,MAAM,CAAC,0CAA0C,CAC/C,uBAAuB,EAAE,uBAAuB,EAChD,YAAY,CAAC,EAAE,sBAAsB,EACrC,KAAK,CAAC,EAAE,eAAe;WAUZ,MAAM;IAQnB,sBAAsB;IAItB,aAAa,IAAI,OAAO,CAAC,EAAE,CAAC;IAI5B,qBAAqB;CAGtB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,sBAAsB,GAAG,yBAAyB,CAWhH"}
|
package/dest/tx/simulated_tx.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { optional } from '@aztec/foundation/schemas';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ContractArtifactSchema } from '../abi/abi.js';
|
|
4
|
-
import { AztecAddress } from '../aztec-address/index.js';
|
|
5
4
|
import { ContractInstanceWithAddressSchema } from '../contract/interfaces/contract_instance.js';
|
|
6
5
|
import { Gas } from '../gas/gas.js';
|
|
7
6
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
@@ -15,20 +14,17 @@ import { Tx } from './tx.js';
|
|
|
15
14
|
* set, it *must* be run without the kernel circuits, or validations will fail
|
|
16
15
|
*/ export class SimulationOverrides {
|
|
17
16
|
contracts;
|
|
18
|
-
|
|
19
|
-
constructor(contracts, msgSender){
|
|
17
|
+
constructor(contracts){
|
|
20
18
|
this.contracts = contracts;
|
|
21
|
-
this.msgSender = msgSender;
|
|
22
19
|
}
|
|
23
20
|
static get schema() {
|
|
24
21
|
return z.object({
|
|
25
22
|
contracts: optional(z.record(z.string(), z.object({
|
|
26
23
|
instance: ContractInstanceWithAddressSchema,
|
|
27
24
|
artifact: ContractArtifactSchema
|
|
28
|
-
})))
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return new SimulationOverrides(contracts, msgSender);
|
|
25
|
+
})))
|
|
26
|
+
}).transform(({ contracts })=>{
|
|
27
|
+
return new SimulationOverrides(contracts);
|
|
32
28
|
});
|
|
33
29
|
}
|
|
34
30
|
}
|
|
@@ -68,7 +68,7 @@ import { TxRequest } from './tx_request.js';
|
|
|
68
68
|
}).transform(TxExecutionRequest.from);
|
|
69
69
|
}
|
|
70
70
|
toTxRequest() {
|
|
71
|
-
return new TxRequest(this.origin, this.firstCallArgsHash, this.txContext, // Entrypoints must be private as
|
|
71
|
+
return new TxRequest(this.origin, this.firstCallArgsHash, this.txContext, // Entrypoints must be private as defined by the protocol.
|
|
72
72
|
new FunctionData(this.functionSelector, true), this.salt);
|
|
73
73
|
}
|
|
74
74
|
static getFields(fields) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250812",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@aztec/bb.js": "1.0.0-nightly.
|
|
72
|
-
"@aztec/blob-lib": "1.0.0-nightly.
|
|
73
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
74
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
75
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
76
|
-
"@aztec/noir-noirc_abi": "1.0.0-nightly.
|
|
71
|
+
"@aztec/bb.js": "1.0.0-nightly.20250812",
|
|
72
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250812",
|
|
73
|
+
"@aztec/constants": "1.0.0-nightly.20250812",
|
|
74
|
+
"@aztec/ethereum": "1.0.0-nightly.20250812",
|
|
75
|
+
"@aztec/foundation": "1.0.0-nightly.20250812",
|
|
76
|
+
"@aztec/noir-noirc_abi": "1.0.0-nightly.20250812",
|
|
77
77
|
"@google-cloud/storage": "^7.15.0",
|
|
78
78
|
"axios": "^1.9.0",
|
|
79
79
|
"json-stringify-deterministic": "1.0.12",
|
package/src/tx/simulated_tx.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { FieldsOf } from '@aztec/foundation/types';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
import { type ContractArtifact, ContractArtifactSchema } from '../abi/abi.js';
|
|
7
|
-
import { AztecAddress } from '../aztec-address/index.js';
|
|
8
7
|
import {
|
|
9
8
|
type ContractInstanceWithAddress,
|
|
10
9
|
ContractInstanceWithAddressSchema,
|
|
@@ -37,10 +36,7 @@ export type ContractOverrides = Record<
|
|
|
37
36
|
* set, it *must* be run without the kernel circuits, or validations will fail
|
|
38
37
|
*/
|
|
39
38
|
export class SimulationOverrides {
|
|
40
|
-
constructor(
|
|
41
|
-
public contracts?: ContractOverrides,
|
|
42
|
-
public msgSender?: AztecAddress,
|
|
43
|
-
) {}
|
|
39
|
+
constructor(public contracts?: ContractOverrides) {}
|
|
44
40
|
|
|
45
41
|
static get schema() {
|
|
46
42
|
return z
|
|
@@ -51,10 +47,9 @@ export class SimulationOverrides {
|
|
|
51
47
|
z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
|
|
52
48
|
),
|
|
53
49
|
),
|
|
54
|
-
msgSender: optional(AztecAddress.schema),
|
|
55
50
|
})
|
|
56
|
-
.transform(({ contracts
|
|
57
|
-
return new SimulationOverrides(contracts
|
|
51
|
+
.transform(({ contracts }) => {
|
|
52
|
+
return new SimulationOverrides(contracts);
|
|
58
53
|
});
|
|
59
54
|
}
|
|
60
55
|
}
|
|
@@ -81,7 +81,7 @@ export class TxExecutionRequest {
|
|
|
81
81
|
this.origin,
|
|
82
82
|
this.firstCallArgsHash,
|
|
83
83
|
this.txContext,
|
|
84
|
-
// Entrypoints must be private as
|
|
84
|
+
// Entrypoints must be private as defined by the protocol.
|
|
85
85
|
new FunctionData(this.functionSelector, true /* isPrivate */),
|
|
86
86
|
this.salt,
|
|
87
87
|
);
|