@aztec/aztec.js 3.0.0-nightly.20251022 → 3.0.0-nightly.20251024
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/account/account.d.ts +2 -2
- package/dest/account/account_contract.d.ts +1 -1
- package/dest/account/account_contract.d.ts.map +1 -1
- package/dest/api/abi.d.ts +1 -0
- package/dest/api/abi.d.ts.map +1 -1
- package/dest/api/addresses.d.ts +1 -0
- package/dest/api/addresses.d.ts.map +1 -1
- package/dest/api/addresses.js +1 -0
- package/dest/api/block.d.ts +3 -0
- package/dest/api/block.d.ts.map +1 -0
- package/dest/api/block.js +2 -0
- package/dest/api/contract.d.ts +2 -4
- package/dest/api/contract.d.ts.map +1 -1
- package/dest/api/contract.js +1 -2
- package/dest/api/crypto.d.ts +2 -0
- package/dest/api/crypto.d.ts.map +1 -0
- package/dest/api/crypto.js +1 -0
- package/dest/api/keys.d.ts +4 -0
- package/dest/api/keys.d.ts.map +1 -0
- package/dest/api/keys.js +3 -0
- package/dest/api/log.d.ts +1 -0
- package/dest/api/log.d.ts.map +1 -1
- package/dest/api/log.js +1 -0
- package/dest/api/messaging.d.ts +3 -0
- package/dest/api/messaging.d.ts.map +1 -0
- package/dest/api/messaging.js +2 -0
- package/dest/api/node.d.ts +21 -0
- package/dest/api/node.d.ts.map +1 -0
- package/dest/api/node.js +18 -0
- package/dest/api/note.d.ts +2 -0
- package/dest/api/note.d.ts.map +1 -0
- package/dest/api/note.js +1 -0
- package/dest/api/protocol.d.ts +3 -0
- package/dest/api/protocol.d.ts.map +1 -0
- package/dest/api/protocol.js +2 -0
- package/dest/api/trees.d.ts +3 -0
- package/dest/api/trees.d.ts.map +1 -0
- package/dest/api/trees.js +2 -0
- package/dest/api/tx.d.ts +2 -0
- package/dest/api/tx.d.ts.map +1 -0
- package/dest/api/tx.js +1 -0
- package/dest/api/utils.d.ts +10 -4
- package/dest/api/utils.d.ts.map +1 -1
- package/dest/api/utils.js +10 -3
- package/dest/api/wallet.d.ts +3 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +3 -1
- package/dest/contract/base_contract_interaction.d.ts +3 -18
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +5 -26
- package/dest/contract/contract_base.d.ts +1 -1
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/deploy_method.d.ts +2 -10
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +4 -16
- package/dest/contract/wait_for_proven.d.ts +1 -1
- package/dest/contract/wait_for_proven.d.ts.map +1 -1
- package/dest/utils/authwit.d.ts +0 -7
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +0 -11
- package/dest/wallet/account_manager.d.ts +1 -1
- package/dest/wallet/account_manager.d.ts.map +1 -1
- package/dest/wallet/base_wallet.d.ts +11 -5
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +18 -9
- package/dest/wallet/wallet.d.ts +20 -10
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +17 -9
- package/package.json +21 -17
- package/src/api/abi.ts +11 -0
- package/src/api/addresses.ts +1 -0
- package/src/api/block.ts +2 -0
- package/src/api/contract.ts +9 -3
- package/src/api/crypto.ts +1 -0
- package/src/api/keys.ts +8 -0
- package/src/api/log.ts +1 -0
- package/src/api/messaging.ts +2 -0
- package/src/api/node.ts +20 -0
- package/src/api/note.ts +1 -0
- package/src/api/protocol.ts +2 -0
- package/src/api/trees.ts +2 -0
- package/src/api/tx.ts +11 -0
- package/src/api/utils.ts +12 -12
- package/src/api/wallet.ts +28 -7
- package/src/contract/base_contract_interaction.ts +6 -36
- package/src/contract/deploy_method.ts +6 -27
- package/src/contract/wait_for_proven.ts +1 -1
- package/src/utils/authwit.ts +0 -10
- package/src/wallet/base_wallet.ts +16 -12
- package/src/wallet/wallet.ts +29 -13
- package/dest/api/interfaces.d.ts +0 -2
- package/dest/api/interfaces.d.ts.map +0 -1
- package/dest/api/interfaces.js +0 -1
- package/dest/api/log_id.d.ts +0 -2
- package/dest/api/log_id.d.ts.map +0 -1
- package/dest/api/log_id.js +0 -1
- package/dest/api/tx_hash.d.ts +0 -2
- package/dest/api/tx_hash.d.ts.map +0 -1
- package/dest/api/tx_hash.js +0 -1
- package/dest/contract/deploy_proven_tx.d.ts +0 -21
- package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
- package/dest/contract/deploy_proven_tx.js +0 -21
- package/dest/contract/proven_tx.d.ts +0 -21
- package/dest/contract/proven_tx.d.ts.map +0 -1
- package/dest/contract/proven_tx.js +0 -23
- package/dest/index.d.ts +0 -58
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -61
- package/src/api/interfaces.ts +0 -1
- package/src/api/log_id.ts +0 -1
- package/src/api/tx_hash.ts +0 -1
- package/src/contract/deploy_proven_tx.ts +0 -45
- package/src/contract/proven_tx.ts +0 -36
- package/src/index.ts +0 -84
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authwit.d.ts","sourceRoot":"","sources":["../../src/utils/authwit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAiD,KAAK,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AACnH,OAAO,EAAE,WAAW,EAAoD,MAAM,4BAA4B,CAAC;AAC3G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,oCAAoC,CA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,QAAQ,CAAC,CAAC,SAAS,0BAA0B,EAC3D,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAQlD;;;;;OAKG;IACa,OAAO,CACrB,OAAO,GAAE,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAA4B,GAC1E,OAAO,CAAC,eAAe,CAAC;IAI3B;;;;;OAKG;IACa,IAAI,CAAC,OAAO,GAAE,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAM,GAAG,MAAM;IAIhF,OAAO,CAAC,MAAM,CAAC,mBAAmB;CAuBnC"}
|
package/dest/utils/authwit.js
CHANGED
|
@@ -199,17 +199,6 @@ import { ContractFunctionInteraction } from '../contract/contract_function_inter
|
|
|
199
199
|
const messageHash = await getMessageHashFromIntent(messageHashOrIntent, chainInfo);
|
|
200
200
|
return new SetPublicAuthwitContractInteraction(wallet, from, messageHash, authorized);
|
|
201
201
|
}
|
|
202
|
-
/**
|
|
203
|
-
* Overrides the proveInternal method, adding the sender of the authwit (authorizer) as from
|
|
204
|
-
* and preventing misuse
|
|
205
|
-
* @param options - An optional object containing additional configuration for the transaction.
|
|
206
|
-
* @returns The result of the transaction as returned by the contract function.
|
|
207
|
-
*/ proveInternal(options) {
|
|
208
|
-
return super.proveInternal({
|
|
209
|
-
...options,
|
|
210
|
-
from: this.from
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
202
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
214
203
|
simulate(options = {}) {
|
|
215
204
|
return super.simulate({
|
|
@@ -38,7 +38,7 @@ export declare class AccountManager {
|
|
|
38
38
|
* Returns the secret key used to derive the rest of the privacy keys for this contract
|
|
39
39
|
*/
|
|
40
40
|
getSecretKey(): Fr;
|
|
41
|
-
get address(): import("../
|
|
41
|
+
get address(): import("../api/addresses.js").AztecAddress;
|
|
42
42
|
/**
|
|
43
43
|
* Returns the contract instance definition associated with this account.
|
|
44
44
|
* Does not require the account to have been published for public execution.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_manager.d.ts","sourceRoot":"","sources":["../../src/wallet/account_manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,KAAK,2BAA2B,EAEjC,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,qBAAa,cAAc;IAEvB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,QAAQ;IAChB;;OAEG;aACa,IAAI,EAAE,IAAI;IAR5B,OAAO;WAWM,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,IAAI;IAoBhG,SAAS,CAAC,aAAa;IAIvB,SAAS,CAAC,iBAAiB;IAI3B;;;OAGG;IACU,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAM7D;;;;OAIG;IACI,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAIrD;;OAEG;IACI,YAAY;IAInB,IAAI,OAAO
|
|
1
|
+
{"version":3,"file":"account_manager.d.ts","sourceRoot":"","sources":["../../src/wallet/account_manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE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ztec/stdlib/aztec-address';
|
|
|
8
8
|
import { type ContractClassMetadata, type ContractInstanceWithAddress, type ContractInstantiationData, type ContractMetadata } from '@aztec/stdlib/contract';
|
|
9
9
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
10
10
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
11
|
-
import type {
|
|
11
|
+
import type { TxExecutionRequest, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
12
12
|
import type { Account } from '../account/account.js';
|
|
13
13
|
import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
|
|
14
14
|
import type { CallIntent, IntentInnerHash } from '../utils/authwit.js';
|
|
@@ -31,7 +31,6 @@ export type FeeOptions = {
|
|
|
31
31
|
* A base class for Wallet implementations
|
|
32
32
|
*/
|
|
33
33
|
export declare abstract class BaseWallet implements Wallet {
|
|
34
|
-
#private;
|
|
35
34
|
protected readonly pxe: any;
|
|
36
35
|
protected readonly aztecNode: AztecNode;
|
|
37
36
|
protected log: import("@aztec/foundation/log").Logger;
|
|
@@ -40,7 +39,14 @@ export declare abstract class BaseWallet implements Wallet {
|
|
|
40
39
|
protected constructor(pxe: any, aztecNode: AztecNode);
|
|
41
40
|
protected abstract getAccountFromAddress(address: AztecAddress): Promise<Account>;
|
|
42
41
|
abstract getAccounts(): Promise<Aliased<AztecAddress>[]>;
|
|
43
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Returns the list of aliased contacts associated with the wallet.
|
|
44
|
+
* This base implementation directly returns PXE's senders, but note that in general contacts are a superset of senders.
|
|
45
|
+
* - Senders: Addresses we check during synching in case they sent us notes,
|
|
46
|
+
* - Contacts: more general concept akin to a phone's contact list.
|
|
47
|
+
* @returns The aliased collection of AztecAddresses that form this wallet's address book
|
|
48
|
+
*/
|
|
49
|
+
getAddressBook(): Promise<Aliased<AztecAddress>[]>;
|
|
44
50
|
getChainInfo(): Promise<ChainInfo>;
|
|
45
51
|
protected createTxExecutionRequestFromPayloadAndFee(executionPayload: ExecutionPayload, from: AztecAddress, feeOptions: FeeOptions): Promise<TxExecutionRequest>;
|
|
46
52
|
createAuthWit(from: AztecAddress, messageHashOrIntent: Fr | Buffer | IntentInnerHash | CallIntent): Promise<AuthWitness>;
|
|
@@ -74,8 +80,8 @@ export declare abstract class BaseWallet implements Wallet {
|
|
|
74
80
|
registerContract(instanceData: AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact, artifact?: ContractArtifact, secretKey?: Fr): Promise<ContractInstanceWithAddress>;
|
|
75
81
|
simulateTx(executionPayload: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
|
|
76
82
|
profileTx(executionPayload: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
sendTx(executionPayload: ExecutionPayload, opts: SendOptions): Promise<TxHash>;
|
|
84
|
+
protected contextualizeError(err: Error, ...context: string[]): Error;
|
|
79
85
|
simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], from?: AztecAddress): Promise<UtilitySimulationResult>;
|
|
80
86
|
getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<ContractClassMetadata>;
|
|
81
87
|
getContractMetadata(address: AztecAddress): Promise<ContractMetadata>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/base_wallet.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAwC,MAAM,4BAA4B,CAAC;AAClH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAA0B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAA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,GAAG,KAAK;IAcrE,eAAe,CACb,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,GAAG,EAAE,EACX,EAAE,EAAE,YAAY,EAChB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,IAAI,CAAC,EAAE,YAAY,GAClB,OAAO,CAAC,uBAAuB,CAAC;IAInC,wBAAwB,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,GAAE,OAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAGlG,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrE,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIhD,gBAAgB,CAAC,CAAC,EAChB,eAAe,EAAE,YAAY,EAC7B,KAAK,EAAE,uBAAuB,EAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,UAAU,GAAE,YAAY,EAAO,GAC9B,OAAO,CAAC,CAAC,EAAE,CAAC;CAGhB"}
|
|
@@ -25,7 +25,13 @@ import { inspect } from 'util';
|
|
|
25
25
|
this.baseFeePadding = 0.5;
|
|
26
26
|
this.cancellableTransactions = false;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Returns the list of aliased contacts associated with the wallet.
|
|
30
|
+
* This base implementation directly returns PXE's senders, but note that in general contacts are a superset of senders.
|
|
31
|
+
* - Senders: Addresses we check during synching in case they sent us notes,
|
|
32
|
+
* - Contacts: more general concept akin to a phone's contact list.
|
|
33
|
+
* @returns The aliased collection of AztecAddresses that form this wallet's address book
|
|
34
|
+
*/ async getAddressBook() {
|
|
29
35
|
const senders = await this.pxe.getSenders();
|
|
30
36
|
return senders.map((sender)=>({
|
|
31
37
|
item: sender,
|
|
@@ -68,7 +74,11 @@ import { inspect } from 'util';
|
|
|
68
74
|
// We use dynamic dispatch here for simplicity, but the types are enforced at the call site.
|
|
69
75
|
const fn = this[name];
|
|
70
76
|
const result = await fn.apply(this, args);
|
|
71
|
-
|
|
77
|
+
// Wrap result with method name for discriminated union deserialization
|
|
78
|
+
results.push({
|
|
79
|
+
name,
|
|
80
|
+
result
|
|
81
|
+
});
|
|
72
82
|
}
|
|
73
83
|
return results;
|
|
74
84
|
}
|
|
@@ -181,24 +191,23 @@ import { inspect } from 'util';
|
|
|
181
191
|
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(executionPayload, opts.from, fee);
|
|
182
192
|
return this.pxe.profileTx(txRequest, opts.profileMode, opts.skipProofGeneration ?? true);
|
|
183
193
|
}
|
|
184
|
-
async
|
|
194
|
+
async sendTx(executionPayload, opts) {
|
|
185
195
|
const fee = await this.getDefaultFeeOptions(opts.from, opts.fee);
|
|
186
|
-
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
async sendTx(tx) {
|
|
196
|
+
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(executionPayload, opts.from, fee);
|
|
197
|
+
const provenTx = await this.pxe.proveTx(txRequest);
|
|
198
|
+
const tx = await provenTx.toTx();
|
|
190
199
|
const txHash = tx.getTxHash();
|
|
191
200
|
if (await this.aztecNode.getTxEffect(txHash)) {
|
|
192
201
|
throw new Error(`A settled tx with equal hash ${txHash.toString()} exists.`);
|
|
193
202
|
}
|
|
194
203
|
this.log.debug(`Sending transaction ${txHash}`);
|
|
195
204
|
await this.aztecNode.sendTx(tx).catch((err)=>{
|
|
196
|
-
throw this
|
|
205
|
+
throw this.contextualizeError(err, inspect(tx));
|
|
197
206
|
});
|
|
198
207
|
this.log.info(`Sent transaction ${txHash}`);
|
|
199
208
|
return txHash;
|
|
200
209
|
}
|
|
201
|
-
|
|
210
|
+
contextualizeError(err, ...context) {
|
|
202
211
|
let contextStr = '';
|
|
203
212
|
if (context.length > 0) {
|
|
204
213
|
contextStr = `\nContext:\n${context.join('\n')}`;
|
package/dest/wallet/wallet.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { type ContractClassMetadata, type ContractInstanceWithAddress, type Cont
|
|
|
8
8
|
import { Gas } from '@aztec/stdlib/gas';
|
|
9
9
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
10
10
|
import { type ApiSchemaFor, type ZodFor } from '@aztec/stdlib/schemas';
|
|
11
|
-
import { Capsule, HashedValues,
|
|
11
|
+
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import type { Contract } from '../contract/contract.js';
|
|
14
14
|
import type { FeeEstimationOptions, GasSettingsOption, ProfileInteractionOptions, SendInteractionOptions, SimulateInteractionOptions } from '../contract/interaction_options.js';
|
|
@@ -70,7 +70,7 @@ export type SendOptions = Omit<SendInteractionOptions, 'fee'> & {
|
|
|
70
70
|
/**
|
|
71
71
|
* Helper type that represents all methods that can be batched.
|
|
72
72
|
*/
|
|
73
|
-
export type BatchableMethods = Pick<Wallet, 'registerContract' | '
|
|
73
|
+
export type BatchableMethods = Pick<Wallet, 'registerContract' | 'sendTx' | 'registerSender'>;
|
|
74
74
|
/**
|
|
75
75
|
* From the batchable methods, we create a type that represents a method call with its name and arguments.
|
|
76
76
|
* This is what the wallet will accept as arguments to the `batch` method.
|
|
@@ -86,10 +86,21 @@ export type BatchedMethod<T extends keyof BatchableMethods> = {
|
|
|
86
86
|
*/
|
|
87
87
|
export type BatchedMethodResult<T> = T extends BatchedMethod<infer K> ? Awaited<ReturnType<BatchableMethods[K]>> : never;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Wrapper type for batch results that includes the method name for discriminated union deserialization.
|
|
90
|
+
* Each result is wrapped as \{ name: 'methodName', result: ActualResult \} to allow proper deserialization
|
|
91
|
+
* when AztecAddress and TxHash would otherwise be ambiguous (both are hex strings).
|
|
92
|
+
*/
|
|
93
|
+
export type BatchedMethodResultWrapper<T extends BatchedMethod<keyof BatchableMethods>> = {
|
|
94
|
+
/** The method name */
|
|
95
|
+
name: T['name'];
|
|
96
|
+
/** The method result */
|
|
97
|
+
result: BatchedMethodResult<T>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Maps a tuple of BatchedMethod to a tuple of their wrapped return types
|
|
90
101
|
*/
|
|
91
102
|
export type BatchResults<T extends readonly BatchedMethod<keyof BatchableMethods>[]> = {
|
|
92
|
-
[K in keyof T]:
|
|
103
|
+
[K in keyof T]: BatchedMethodResultWrapper<T[K]>;
|
|
93
104
|
};
|
|
94
105
|
/**
|
|
95
106
|
* The wallet interface.
|
|
@@ -101,7 +112,7 @@ export type Wallet = {
|
|
|
101
112
|
getChainInfo(): Promise<ChainInfo>;
|
|
102
113
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
103
114
|
registerSender(address: AztecAddress, alias?: string): Promise<AztecAddress>;
|
|
104
|
-
|
|
115
|
+
getAddressBook(): Promise<Aliased<AztecAddress>[]>;
|
|
105
116
|
getAccounts(): Promise<Aliased<AztecAddress>[]>;
|
|
106
117
|
registerContract(instanceData: AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact): Promise<ContractInstanceWithAddress>;
|
|
107
118
|
registerContract(instanceData: AztecAddress | ContractInstanceWithAddress | ContractInstantiationData | ContractInstanceAndArtifact, artifact: ContractArtifact): Promise<ContractInstanceWithAddress>;
|
|
@@ -109,8 +120,7 @@ export type Wallet = {
|
|
|
109
120
|
simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
|
|
110
121
|
simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[]): Promise<UtilitySimulationResult>;
|
|
111
122
|
profileTx(exec: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
|
|
112
|
-
|
|
113
|
-
sendTx(tx: Tx): Promise<TxHash>;
|
|
123
|
+
sendTx(exec: ExecutionPayload, opts: SendOptions): Promise<TxHash>;
|
|
114
124
|
createAuthWit(from: AztecAddress, messageHashOrIntent: Fr | Buffer<ArrayBuffer> | IntentInnerHash | CallIntent): Promise<AuthWitness>;
|
|
115
125
|
batch<const T extends readonly BatchedMethod<keyof BatchableMethods>[]>(methods: T): Promise<BatchResults<T>>;
|
|
116
126
|
};
|
|
@@ -1964,7 +1974,7 @@ export declare const BatchedMethodSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1964
1974
|
name: "registerContract";
|
|
1965
1975
|
args: [any, any, any];
|
|
1966
1976
|
}>, z.ZodObject<{
|
|
1967
|
-
name: z.ZodLiteral<"
|
|
1977
|
+
name: z.ZodLiteral<"sendTx">;
|
|
1968
1978
|
args: z.ZodTuple<[z.ZodObject<{
|
|
1969
1979
|
calls: z.ZodArray<z.ZodObject<{
|
|
1970
1980
|
name: z.ZodString;
|
|
@@ -2188,7 +2198,7 @@ export declare const BatchedMethodSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2188
2198
|
from?: any;
|
|
2189
2199
|
}>], null>;
|
|
2190
2200
|
}, "strip", z.ZodTypeAny, {
|
|
2191
|
-
name: "
|
|
2201
|
+
name: "sendTx";
|
|
2192
2202
|
args: [{
|
|
2193
2203
|
authWitnesses: AuthWitness[];
|
|
2194
2204
|
capsules: Capsule[];
|
|
@@ -2224,7 +2234,7 @@ export declare const BatchedMethodSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2224
2234
|
capsules?: Capsule[] | undefined;
|
|
2225
2235
|
}];
|
|
2226
2236
|
}, {
|
|
2227
|
-
name: "
|
|
2237
|
+
name: "sendTx";
|
|
2228
2238
|
args: [{
|
|
2229
2239
|
authWitnesses: string[];
|
|
2230
2240
|
capsules: string[];
|
|
@@ -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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;;;;;;;;;;;;;;;;IAa9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIE,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;oBAxI1B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAgBuD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAD,CAAC;;;EA4H7B,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CA8C7C,CAAC"}
|
package/dest/wallet/wallet.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@a
|
|
|
4
4
|
import { Gas } from '@aztec/stdlib/gas';
|
|
5
5
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
6
6
|
import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
|
|
7
|
-
import { Capsule, HashedValues,
|
|
7
|
+
import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
export const ContractInstantiationDataSchema = z.object({
|
|
10
10
|
constructorArtifact: optional(z.union([
|
|
@@ -116,7 +116,7 @@ export const BatchedMethodSchema = z.union([
|
|
|
116
116
|
])
|
|
117
117
|
}),
|
|
118
118
|
z.object({
|
|
119
|
-
name: z.literal('
|
|
119
|
+
name: z.literal('sendTx'),
|
|
120
120
|
args: z.tuple([
|
|
121
121
|
ExecutionPayloadSchema,
|
|
122
122
|
SendOptionsSchema
|
|
@@ -157,7 +157,7 @@ export const WalletSchema = {
|
|
|
157
157
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
158
158
|
getPrivateEvents: z.function().args(schemas.AztecAddress, EventMetadataDefinitionSchema, z.number(), z.number(), z.array(schemas.AztecAddress)).returns(z.array(AbiDecodedSchema)),
|
|
159
159
|
registerSender: z.function().args(schemas.AztecAddress, optional(z.string())).returns(schemas.AztecAddress),
|
|
160
|
-
|
|
160
|
+
getAddressBook: z.function().args().returns(z.array(z.object({
|
|
161
161
|
alias: z.string(),
|
|
162
162
|
item: schemas.AztecAddress
|
|
163
163
|
}))),
|
|
@@ -169,13 +169,21 @@ export const WalletSchema = {
|
|
|
169
169
|
simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
|
|
170
170
|
simulateUtility: z.function().args(z.string(), z.array(z.any()), schemas.AztecAddress, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
|
|
171
171
|
profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
|
|
172
|
-
|
|
173
|
-
sendTx: z.function().args(Tx.schema).returns(TxHash.schema),
|
|
172
|
+
sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
|
|
174
173
|
createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
|
|
175
174
|
// @ts-expect-error - ApiSchemaFor cannot properly type generic methods with readonly arrays
|
|
176
|
-
batch: z.function().args(z.array(BatchedMethodSchema)).returns(z.array(z.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
batch: z.function().args(z.array(BatchedMethodSchema)).returns(z.array(z.discriminatedUnion('name', [
|
|
176
|
+
z.object({
|
|
177
|
+
name: z.literal('registerSender'),
|
|
178
|
+
result: schemas.AztecAddress
|
|
179
|
+
}),
|
|
180
|
+
z.object({
|
|
181
|
+
name: z.literal('registerContract'),
|
|
182
|
+
result: ContractInstanceWithAddressSchema
|
|
183
|
+
}),
|
|
184
|
+
z.object({
|
|
185
|
+
name: z.literal('sendTx'),
|
|
186
|
+
result: TxHash.schema
|
|
187
|
+
})
|
|
180
188
|
])))
|
|
181
189
|
};
|
package/package.json
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
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.20251024",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
-
".": "./dest/index.js",
|
|
8
|
-
"./interfaces": "./dest/api/interfaces.js",
|
|
9
7
|
"./abi": "./dest/api/abi.js",
|
|
10
8
|
"./account": "./dest/api/account.js",
|
|
11
9
|
"./addresses": "./dest/api/addresses.js",
|
|
12
|
-
"./
|
|
10
|
+
"./authorization": "./dest/api/authorization.js",
|
|
11
|
+
"./block": "./dest/api/block.js",
|
|
13
12
|
"./contracts": "./dest/api/contract.js",
|
|
13
|
+
"./crypto": "./dest/api/crypto.js",
|
|
14
14
|
"./deployment": "./dest/api/deployment.js",
|
|
15
|
-
"./entrypoint": "./dest/api/entrypoint.js",
|
|
16
|
-
"./eth_address": "./dest/api/eth_address.js",
|
|
17
15
|
"./ethereum": "./dest/api/ethereum.js",
|
|
16
|
+
"./events": "./dest/api/events.js",
|
|
18
17
|
"./fee": "./dest/api/fee.js",
|
|
18
|
+
"./fee/testing": "./dest/api/fee_testing.js",
|
|
19
19
|
"./fields": "./dest/api/fields.js",
|
|
20
|
+
"./keys": "./dest/api/keys.js",
|
|
20
21
|
"./log": "./dest/api/log.js",
|
|
21
|
-
"./
|
|
22
|
-
"./
|
|
23
|
-
"./
|
|
22
|
+
"./messaging": "./dest/api/messaging.js",
|
|
23
|
+
"./node": "./dest/api/node.js",
|
|
24
|
+
"./note": "./dest/api/note.js",
|
|
25
|
+
"./protocol": "./dest/api/protocol.js",
|
|
26
|
+
"./trees": "./dest/api/trees.js",
|
|
27
|
+
"./tx": "./dest/api/tx.js",
|
|
24
28
|
"./utils": "./dest/api/utils.js",
|
|
25
|
-
"./
|
|
29
|
+
"./wallet": "./dest/api/wallet.js"
|
|
26
30
|
},
|
|
27
31
|
"typedocOptions": {
|
|
28
32
|
"entryPoints": [
|
|
@@ -80,13 +84,13 @@
|
|
|
80
84
|
]
|
|
81
85
|
},
|
|
82
86
|
"dependencies": {
|
|
83
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
84
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
85
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
86
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
87
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
88
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
89
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
87
|
+
"@aztec/constants": "3.0.0-nightly.20251024",
|
|
88
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251024",
|
|
89
|
+
"@aztec/ethereum": "3.0.0-nightly.20251024",
|
|
90
|
+
"@aztec/foundation": "3.0.0-nightly.20251024",
|
|
91
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251024",
|
|
92
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251024",
|
|
93
|
+
"@aztec/stdlib": "3.0.0-nightly.20251024",
|
|
90
94
|
"axios": "^1.12.0",
|
|
91
95
|
"tslib": "^2.4.0",
|
|
92
96
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
|
package/src/api/abi.ts
CHANGED
|
@@ -23,3 +23,14 @@ export {
|
|
|
23
23
|
contractArtifactFromBuffer,
|
|
24
24
|
} from '@aztec/stdlib/abi';
|
|
25
25
|
export { type NoirCompiledContract } from '@aztec/stdlib/noir';
|
|
26
|
+
|
|
27
|
+
// Type converters for flexible parameter types in contract calls
|
|
28
|
+
export {
|
|
29
|
+
type AztecAddressLike,
|
|
30
|
+
type EthAddressLike,
|
|
31
|
+
type EventSelectorLike,
|
|
32
|
+
type FieldLike,
|
|
33
|
+
type FunctionSelectorLike,
|
|
34
|
+
type U128Like,
|
|
35
|
+
type WrappedFieldLike,
|
|
36
|
+
} from '../utils/abi_types.js';
|
package/src/api/addresses.ts
CHANGED
package/src/api/block.ts
ADDED
package/src/api/contract.ts
CHANGED
|
@@ -44,14 +44,20 @@ export {
|
|
|
44
44
|
type ProfileInteractionOptions,
|
|
45
45
|
type SimulateInteractionOptions,
|
|
46
46
|
type InteractionFeeOptions,
|
|
47
|
+
toProfileOptions,
|
|
48
|
+
toSendOptions,
|
|
49
|
+
toSimulateOptions,
|
|
47
50
|
} from '../contract/interaction_options.js';
|
|
48
51
|
|
|
49
|
-
export { TxProfileResult } from '@aztec/stdlib/tx';
|
|
50
52
|
export { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/sent_tx.js';
|
|
51
|
-
export { ProvenTx } from '../contract/proven_tx.js';
|
|
52
53
|
export { ContractBase, type ContractMethod, type ContractStorageLayout } from '../contract/contract_base.js';
|
|
53
54
|
export { BatchCall } from '../contract/batch_call.js';
|
|
54
|
-
export {
|
|
55
|
+
export {
|
|
56
|
+
type DeployOptions,
|
|
57
|
+
DeployMethod,
|
|
58
|
+
type RequestDeployOptions,
|
|
59
|
+
type SimulateDeployOptions,
|
|
60
|
+
} from '../contract/deploy_method.js';
|
|
55
61
|
export { DeploySentTx } from '../contract/deploy_sent_tx.js';
|
|
56
62
|
export { waitForProven, type WaitForProvenOpts, DefaultWaitForProvenOpts } from '../contract/wait_for_proven.js';
|
|
57
63
|
export { getGasLimits } from '../contract/get_gas_limits.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { computeSecretHash } from '@aztec/stdlib/hash';
|
package/src/api/keys.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type PublicKey, PublicKeys } from '@aztec/stdlib/keys';
|
|
2
|
+
export {
|
|
3
|
+
computeAppNullifierSecretKey,
|
|
4
|
+
deriveKeys,
|
|
5
|
+
deriveMasterIncomingViewingSecretKey,
|
|
6
|
+
deriveMasterNullifierSecretKey,
|
|
7
|
+
} from '@aztec/stdlib/keys';
|
|
8
|
+
export { generatePublicKey } from '../utils/pub_key.js';
|
package/src/api/log.ts
CHANGED
package/src/api/node.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `node` module provides utilities for connecting to and interacting with an Aztec node.
|
|
3
|
+
*
|
|
4
|
+
* The primary function is {@link createAztecNodeClient}, which creates a JSON-RPC client
|
|
5
|
+
* that connects to a running Aztec node instance. Use {@link waitForNode} to wait for
|
|
6
|
+
* the node to be ready before proceeding.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { createAztecNodeClient, waitForNode } from '@aztec/aztec.js/node';
|
|
11
|
+
*
|
|
12
|
+
* const node = createAztecNodeClient('http://localhost:8080');
|
|
13
|
+
* await waitForNode(node);
|
|
14
|
+
* const blockNumber = await node.getBlockNumber();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
export { createAztecNodeClient, waitForNode, type AztecNode } from '../utils/node.js';
|
|
20
|
+
export { type NodeInfo } from '@aztec/stdlib/contract';
|
package/src/api/note.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UniqueNote, Comparator, Note } from '@aztec/stdlib/note';
|
package/src/api/trees.ts
ADDED
package/src/api/tx.ts
ADDED
package/src/api/utils.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for aztec.js.
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This module contains low-usage utilities and may be deprecated in the future.
|
|
5
|
+
* Prefer using more specific modules:
|
|
6
|
+
* - Node connection utilities → `@aztec/aztec.js/node`
|
|
7
|
+
* - Type converters → `@aztec/aztec.js/abi`
|
|
8
|
+
* - Key generation → `@aztec/aztec.js/keys`
|
|
9
|
+
* - Messaging utilities → `@aztec/aztec.js/messaging`
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// Low-usage utilities - consider these internal/experimental
|
|
12
13
|
export { getFeeJuiceBalance } from '../utils/fee_juice.js';
|
|
13
14
|
export { readFieldCompressedString } from '../utils/field_compressed_string.js';
|
|
14
|
-
export { isL1ToL2MessageReady, waitForL1ToL2MessageReady } from '../utils/cross_chain.js';
|
package/src/api/wallet.ts
CHANGED
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
export {
|
|
2
2
|
type Aliased,
|
|
3
|
-
|
|
4
|
-
type Wallet,
|
|
5
|
-
AccountManager,
|
|
6
|
-
WalletSchema,
|
|
7
|
-
type FeeOptions,
|
|
3
|
+
type ContractInstanceAndArtifact,
|
|
8
4
|
type UserFeeOptions,
|
|
9
5
|
type SimulateOptions,
|
|
10
|
-
type SendOptions,
|
|
11
6
|
type ProfileOptions,
|
|
12
|
-
|
|
7
|
+
type SendOptions,
|
|
8
|
+
type BatchableMethods,
|
|
9
|
+
type BatchedMethod,
|
|
10
|
+
type BatchedMethodResult,
|
|
11
|
+
type BatchedMethodResultWrapper,
|
|
12
|
+
type BatchResults,
|
|
13
|
+
type Wallet,
|
|
14
|
+
ContractInstantiationDataSchema,
|
|
15
|
+
FunctionCallSchema,
|
|
16
|
+
ExecutionPayloadSchema,
|
|
17
|
+
UserFeeOptionsSchema,
|
|
18
|
+
WalletSimulationFeeOptionSchema,
|
|
19
|
+
SendOptionsSchema,
|
|
20
|
+
SimulateOptionsSchema,
|
|
21
|
+
ProfileOptionsSchema,
|
|
22
|
+
InstanceDataSchema,
|
|
23
|
+
MessageHashOrIntentSchema,
|
|
24
|
+
BatchedMethodSchema,
|
|
25
|
+
ContractMetadataSchema,
|
|
26
|
+
ContractClassMetadataSchema,
|
|
27
|
+
EventMetadataDefinitionSchema,
|
|
28
|
+
WalletSchema,
|
|
29
|
+
} from '../wallet/wallet.js';
|
|
30
|
+
|
|
31
|
+
export { type FeeOptions, BaseWallet } from '../wallet/base_wallet.js';
|
|
32
|
+
|
|
33
|
+
export { AccountManager } from '../wallet/account_manager.js';
|
|
13
34
|
|
|
14
35
|
export { type DeployAccountOptions, DeployAccountMethod } from '../wallet/deploy_account_method.js';
|