@aztec/aztec.js 3.0.0-nightly.20251119 → 3.0.0-nightly.20251121
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/api/tx.d.ts +1 -1
- package/dest/api/tx.d.ts.map +1 -1
- package/dest/api/tx.js +1 -1
- package/dest/api/wallet.d.ts +1 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +1 -1
- package/dest/contract/batch_call.js +1 -2
- package/dest/wallet/base_wallet.d.ts +1 -1
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +2 -2
- package/dest/wallet/wallet.d.ts +55 -851
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +6 -27
- package/package.json +8 -8
- package/src/api/tx.ts +1 -0
- package/src/api/wallet.ts +0 -2
- package/src/contract/batch_call.ts +1 -1
- package/src/wallet/base_wallet.ts +2 -6
- package/src/wallet/wallet.ts +5 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqB9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIE,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;oBA7Gb,CAAC;;;;;;;;;;;;;;;;;;;oBAQ2C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAD,CAAC;;;;;EAyG9B,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAgD7C,CAAC"}
|
package/dest/wallet/wallet.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import { AbiTypeSchema, ContractArtifactSchema,
|
|
1
|
+
import { AbiTypeSchema, ContractArtifactSchema, FunctionType } from '@aztec/stdlib/abi';
|
|
2
2
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
3
|
import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
|
|
4
4
|
import { Gas } from '@aztec/stdlib/gas';
|
|
5
|
-
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
6
5
|
import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
|
|
7
6
|
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
8
7
|
import { z } from 'zod';
|
|
9
|
-
export const ContractInstantiationDataSchema = z.object({
|
|
10
|
-
constructorArtifact: optional(z.union([
|
|
11
|
-
FunctionAbiSchema,
|
|
12
|
-
z.string()
|
|
13
|
-
])),
|
|
14
|
-
constructorArgs: optional(z.array(z.any())),
|
|
15
|
-
skipArgsDecoding: optional(z.boolean()),
|
|
16
|
-
salt: schemas.Fr,
|
|
17
|
-
publicKeys: optional(PublicKeys.schema),
|
|
18
|
-
deployer: optional(schemas.AztecAddress)
|
|
19
|
-
});
|
|
20
8
|
export const FunctionCallSchema = z.object({
|
|
21
9
|
name: z.string(),
|
|
22
10
|
to: schemas.AztecAddress,
|
|
@@ -31,7 +19,8 @@ export const ExecutionPayloadSchema = z.object({
|
|
|
31
19
|
calls: z.array(FunctionCallSchema),
|
|
32
20
|
authWitnesses: z.array(AuthWitness.schema),
|
|
33
21
|
capsules: z.array(Capsule.schema),
|
|
34
|
-
extraHashedArgs: z.array(HashedValues.schema)
|
|
22
|
+
extraHashedArgs: z.array(HashedValues.schema),
|
|
23
|
+
feePayer: optional(schemas.AztecAddress)
|
|
35
24
|
});
|
|
36
25
|
export const GasSettingsOptionSchema = z.object({
|
|
37
26
|
gasSettings: optional(z.object({
|
|
@@ -74,15 +63,6 @@ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
|
|
|
74
63
|
]),
|
|
75
64
|
skipProofGeneration: optional(z.boolean())
|
|
76
65
|
});
|
|
77
|
-
export const InstanceDataSchema = z.union([
|
|
78
|
-
schemas.AztecAddress,
|
|
79
|
-
ContractInstanceWithAddressSchema,
|
|
80
|
-
ContractInstantiationDataSchema,
|
|
81
|
-
z.object({
|
|
82
|
-
instance: ContractInstanceWithAddressSchema,
|
|
83
|
-
artifact: ContractArtifactSchema
|
|
84
|
-
})
|
|
85
|
-
]);
|
|
86
66
|
export const MessageHashOrIntentSchema = z.union([
|
|
87
67
|
schemas.Fr,
|
|
88
68
|
z.object({
|
|
@@ -105,7 +85,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
105
85
|
z.object({
|
|
106
86
|
name: z.literal('registerContract'),
|
|
107
87
|
args: z.tuple([
|
|
108
|
-
|
|
88
|
+
ContractInstanceWithAddressSchema,
|
|
109
89
|
optional(ContractArtifactSchema),
|
|
110
90
|
optional(schemas.Fr)
|
|
111
91
|
])
|
|
@@ -121,8 +101,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
121
101
|
name: z.literal('simulateUtility'),
|
|
122
102
|
args: z.tuple([
|
|
123
103
|
FunctionCallSchema,
|
|
124
|
-
optional(z.array(AuthWitness.schema))
|
|
125
|
-
optional(z.array(schemas.AztecAddress))
|
|
104
|
+
optional(z.array(AuthWitness.schema))
|
|
126
105
|
])
|
|
127
106
|
}),
|
|
128
107
|
z.object({
|
|
@@ -177,7 +156,7 @@ export const WalletSchema = {
|
|
|
177
156
|
}))),
|
|
178
157
|
registerContract: z.function().args(ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
|
|
179
158
|
simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
|
|
180
|
-
simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))
|
|
159
|
+
simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
|
|
181
160
|
profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
|
|
182
161
|
sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
|
|
183
162
|
createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec.js",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js",
|
|
4
|
-
"version": "3.0.0-nightly.
|
|
4
|
+
"version": "3.0.0-nightly.20251121",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./abi": "./dest/api/abi.js",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
88
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
89
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
90
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
91
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
92
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
93
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
87
|
+
"@aztec/constants": "3.0.0-nightly.20251121",
|
|
88
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251121",
|
|
89
|
+
"@aztec/ethereum": "3.0.0-nightly.20251121",
|
|
90
|
+
"@aztec/foundation": "3.0.0-nightly.20251121",
|
|
91
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251121",
|
|
92
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251121",
|
|
93
|
+
"@aztec/stdlib": "3.0.0-nightly.20251121",
|
|
94
94
|
"axios": "^1.12.0",
|
|
95
95
|
"tslib": "^2.4.0",
|
|
96
96
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
|
package/src/api/tx.ts
CHANGED
package/src/api/wallet.ts
CHANGED
|
@@ -9,7 +9,6 @@ export {
|
|
|
9
9
|
type BatchedMethodResultWrapper,
|
|
10
10
|
type BatchResults,
|
|
11
11
|
type Wallet,
|
|
12
|
-
ContractInstantiationDataSchema,
|
|
13
12
|
FunctionCallSchema,
|
|
14
13
|
ExecutionPayloadSchema,
|
|
15
14
|
GasSettingsOptionSchema,
|
|
@@ -17,7 +16,6 @@ export {
|
|
|
17
16
|
SendOptionsSchema,
|
|
18
17
|
SimulateOptionsSchema,
|
|
19
18
|
ProfileOptionsSchema,
|
|
20
|
-
InstanceDataSchema,
|
|
21
19
|
MessageHashOrIntentSchema,
|
|
22
20
|
BatchedMethodSchema,
|
|
23
21
|
ContractMetadataSchema,
|
|
@@ -80,7 +80,7 @@ export class BatchCall extends BaseContractInteraction {
|
|
|
80
80
|
for (const [call] of utility) {
|
|
81
81
|
batchRequests.push({
|
|
82
82
|
name: 'simulateUtility' as const,
|
|
83
|
-
args: [call, options?.authWitnesses
|
|
83
|
+
args: [call, options?.authWitnesses] as const,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -311,12 +311,8 @@ export abstract class BaseWallet implements Wallet {
|
|
|
311
311
|
return err;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
simulateUtility(
|
|
315
|
-
call
|
|
316
|
-
authwits?: AuthWitness[],
|
|
317
|
-
scopes?: AztecAddress[],
|
|
318
|
-
): Promise<UtilitySimulationResult> {
|
|
319
|
-
return this.pxe.simulateUtility(call, authwits, scopes);
|
|
314
|
+
simulateUtility(call: FunctionCall, authwits?: AuthWitness[]): Promise<UtilitySimulationResult> {
|
|
315
|
+
return this.pxe.simulateUtility(call, authwits);
|
|
320
316
|
}
|
|
321
317
|
|
|
322
318
|
getContractClassMetadata(id: Fr, includeArtifact: boolean = false): Promise<ContractClassMetadata> {
|
package/src/wallet/wallet.ts
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
type ContractArtifact,
|
|
6
6
|
ContractArtifactSchema,
|
|
7
7
|
type EventMetadataDefinition,
|
|
8
|
-
FunctionAbiSchema,
|
|
9
8
|
type FunctionCall,
|
|
10
9
|
FunctionType,
|
|
11
10
|
} from '@aztec/stdlib/abi';
|
|
@@ -19,7 +18,6 @@ import {
|
|
|
19
18
|
type ContractMetadata,
|
|
20
19
|
} from '@aztec/stdlib/contract';
|
|
21
20
|
import { Gas } from '@aztec/stdlib/gas';
|
|
22
|
-
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
23
21
|
import { AbiDecodedSchema, type ApiSchemaFor, type ZodFor, optional, schemas } from '@aztec/stdlib/schemas';
|
|
24
22
|
import {
|
|
25
23
|
Capsule,
|
|
@@ -155,26 +153,13 @@ export type Wallet = {
|
|
|
155
153
|
secretKey?: Fr,
|
|
156
154
|
): Promise<ContractInstanceWithAddress>;
|
|
157
155
|
simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
|
|
158
|
-
simulateUtility(
|
|
159
|
-
call: FunctionCall,
|
|
160
|
-
authwits?: AuthWitness[],
|
|
161
|
-
scopes?: AztecAddress[],
|
|
162
|
-
): Promise<UtilitySimulationResult>;
|
|
156
|
+
simulateUtility(call: FunctionCall, authwits?: AuthWitness[]): Promise<UtilitySimulationResult>;
|
|
163
157
|
profileTx(exec: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
|
|
164
158
|
sendTx(exec: ExecutionPayload, opts: SendOptions): Promise<TxHash>;
|
|
165
159
|
createAuthWit(from: AztecAddress, messageHashOrIntent: Fr | IntentInnerHash | CallIntent): Promise<AuthWitness>;
|
|
166
160
|
batch<const T extends readonly BatchedMethod<keyof BatchableMethods>[]>(methods: T): Promise<BatchResults<T>>;
|
|
167
161
|
};
|
|
168
162
|
|
|
169
|
-
export const ContractInstantiationDataSchema = z.object({
|
|
170
|
-
constructorArtifact: optional(z.union([FunctionAbiSchema, z.string()])),
|
|
171
|
-
constructorArgs: optional(z.array(z.any())),
|
|
172
|
-
skipArgsDecoding: optional(z.boolean()),
|
|
173
|
-
salt: schemas.Fr,
|
|
174
|
-
publicKeys: optional(PublicKeys.schema),
|
|
175
|
-
deployer: optional(schemas.AztecAddress),
|
|
176
|
-
});
|
|
177
|
-
|
|
178
163
|
export const FunctionCallSchema = z.object({
|
|
179
164
|
name: z.string(),
|
|
180
165
|
to: schemas.AztecAddress,
|
|
@@ -191,6 +176,7 @@ export const ExecutionPayloadSchema = z.object({
|
|
|
191
176
|
authWitnesses: z.array(AuthWitness.schema),
|
|
192
177
|
capsules: z.array(Capsule.schema),
|
|
193
178
|
extraHashedArgs: z.array(HashedValues.schema),
|
|
179
|
+
feePayer: optional(schemas.AztecAddress),
|
|
194
180
|
});
|
|
195
181
|
|
|
196
182
|
export const GasSettingsOptionSchema = z.object({
|
|
@@ -231,13 +217,6 @@ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
|
|
|
231
217
|
skipProofGeneration: optional(z.boolean()),
|
|
232
218
|
});
|
|
233
219
|
|
|
234
|
-
export const InstanceDataSchema = z.union([
|
|
235
|
-
schemas.AztecAddress,
|
|
236
|
-
ContractInstanceWithAddressSchema,
|
|
237
|
-
ContractInstantiationDataSchema,
|
|
238
|
-
z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
|
|
239
|
-
]);
|
|
240
|
-
|
|
241
220
|
export const MessageHashOrIntentSchema = z.union([
|
|
242
221
|
schemas.Fr,
|
|
243
222
|
z.object({ consumer: schemas.AztecAddress, innerHash: schemas.Fr }),
|
|
@@ -254,7 +233,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
254
233
|
}),
|
|
255
234
|
z.object({
|
|
256
235
|
name: z.literal('registerContract'),
|
|
257
|
-
args: z.tuple([
|
|
236
|
+
args: z.tuple([ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr)]),
|
|
258
237
|
}),
|
|
259
238
|
z.object({
|
|
260
239
|
name: z.literal('sendTx'),
|
|
@@ -262,7 +241,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
262
241
|
}),
|
|
263
242
|
z.object({
|
|
264
243
|
name: z.literal('simulateUtility'),
|
|
265
|
-
args: z.tuple([FunctionCallSchema, optional(z.array(AuthWitness.schema))
|
|
244
|
+
args: z.tuple([FunctionCallSchema, optional(z.array(AuthWitness.schema))]),
|
|
266
245
|
}),
|
|
267
246
|
z.object({
|
|
268
247
|
name: z.literal('simulateTx'),
|
|
@@ -316,7 +295,7 @@ export const WalletSchema: ApiSchemaFor<Wallet> = {
|
|
|
316
295
|
simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
|
|
317
296
|
simulateUtility: z
|
|
318
297
|
.function()
|
|
319
|
-
.args(FunctionCallSchema, optional(z.array(AuthWitness.schema))
|
|
298
|
+
.args(FunctionCallSchema, optional(z.array(AuthWitness.schema)))
|
|
320
299
|
.returns(UtilitySimulationResult.schema),
|
|
321
300
|
profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
|
|
322
301
|
sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
|