@aztec/aztec.js 0.31.0 → 0.32.1
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/contract.d.ts +4 -4
- package/dest/account/contract.d.ts.map +1 -1
- package/dest/account/index.d.ts +1 -1
- package/dest/account/index.d.ts.map +1 -1
- package/dest/account/interface.d.ts +5 -5
- package/dest/account/interface.d.ts.map +1 -1
- package/dest/account/wallet.d.ts +2 -2
- package/dest/account/wallet.d.ts.map +1 -1
- package/dest/account_manager/deploy_account_sent_tx.d.ts +4 -4
- package/dest/account_manager/deploy_account_sent_tx.d.ts.map +1 -1
- package/dest/account_manager/deploy_account_sent_tx.js +1 -1
- package/dest/account_manager/index.d.ts +7 -7
- package/dest/account_manager/index.d.ts.map +1 -1
- package/dest/account_manager/index.js +1 -1
- package/dest/contract/base_contract_interaction.d.ts +2 -2
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/batch_call.d.ts +3 -3
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +1 -1
- package/dest/contract/checker.d.ts +1 -1
- package/dest/contract/checker.d.ts.map +1 -1
- package/dest/contract/contract.d.ts +4 -4
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract_base.d.ts +3 -3
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_base.js +1 -1
- package/dest/contract/contract_function_interaction.d.ts +4 -4
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +1 -1
- package/dest/contract/deploy_method.d.ts +8 -8
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +1 -1
- package/dest/contract/deploy_sent_tx.d.ts +7 -7
- package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
- package/dest/contract/deploy_sent_tx.js +1 -1
- package/dest/contract/sent_tx.d.ts +2 -2
- package/dest/contract/sent_tx.d.ts.map +1 -1
- package/dest/contract/sent_tx.js +2 -2
- package/dest/contract/unsafe_contract.d.ts +3 -3
- package/dest/contract/unsafe_contract.d.ts.map +1 -1
- package/dest/deployment/broadcast_function.d.ts +3 -3
- package/dest/deployment/broadcast_function.d.ts.map +1 -1
- package/dest/deployment/broadcast_function.js +1 -1
- package/dest/deployment/contract_deployer.d.ts +2 -2
- package/dest/deployment/contract_deployer.d.ts.map +1 -1
- package/dest/deployment/deploy_instance.d.ts +3 -3
- package/dest/deployment/deploy_instance.d.ts.map +1 -1
- package/dest/deployment/protocol_contracts.d.ts +1 -1
- package/dest/deployment/protocol_contracts.d.ts.map +1 -1
- package/dest/deployment/register_class.d.ts +3 -3
- package/dest/deployment/register_class.d.ts.map +1 -1
- package/dest/deployment/register_class.js +1 -1
- package/dest/entrypoint/default_entrypoint.d.ts +2 -2
- package/dest/entrypoint/default_entrypoint.d.ts.map +1 -1
- package/dest/entrypoint/default_entrypoint.js +1 -1
- package/dest/entrypoint/entrypoint.d.ts +3 -3
- package/dest/entrypoint/entrypoint.d.ts.map +1 -1
- package/dest/fee/fee_payment_method.d.ts +3 -3
- package/dest/fee/fee_payment_method.d.ts.map +1 -1
- package/dest/fee/native_fee_payment_method.d.ts +5 -5
- package/dest/fee/native_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/native_fee_payment_method.js +1 -6
- package/dest/fee/private_fee_payment_method.d.ts +4 -4
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.d.ts +4 -4
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
- package/dest/index.d.ts +1 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -2
- package/dest/rpc_clients/pxe_client.d.ts +1 -1
- package/dest/rpc_clients/pxe_client.d.ts.map +1 -1
- package/dest/rpc_clients/pxe_client.js +3 -3
- package/dest/utils/abi_types.d.ts +1 -1
- package/dest/utils/abi_types.d.ts.map +1 -1
- package/dest/utils/account.d.ts +2 -2
- package/dest/utils/account.d.ts.map +1 -1
- package/dest/utils/account.js +1 -1
- package/dest/utils/authwit.d.ts +2 -2
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +3 -3
- package/dest/utils/cheat_codes.d.ts +2 -2
- package/dest/utils/cheat_codes.d.ts.map +1 -1
- package/dest/utils/cheat_codes.js +2 -2
- package/dest/utils/l1_contracts.d.ts +1 -1
- package/dest/utils/l1_contracts.d.ts.map +1 -1
- package/dest/utils/pub_key.d.ts +1 -1
- package/dest/utils/pub_key.d.ts.map +1 -1
- package/dest/utils/pxe.d.ts +2 -2
- package/dest/utils/pxe.d.ts.map +1 -1
- package/dest/wallet/account_wallet.d.ts +4 -4
- package/dest/wallet/account_wallet.d.ts.map +1 -1
- package/dest/wallet/account_wallet.js +1 -1
- package/dest/wallet/account_wallet_with_private_key.d.ts +4 -4
- package/dest/wallet/account_wallet_with_private_key.d.ts.map +1 -1
- package/dest/wallet/base_wallet.d.ts +8 -8
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +1 -1
- package/dest/wallet/create_recipient.d.ts +1 -1
- package/dest/wallet/create_recipient.d.ts.map +1 -1
- package/dest/wallet/index.d.ts +3 -3
- package/dest/wallet/index.d.ts.map +1 -1
- package/dest/wallet/signerless_wallet.d.ts +3 -3
- package/dest/wallet/signerless_wallet.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/account/contract.ts +4 -4
- package/src/account/index.ts +1 -1
- package/src/account/interface.ts +5 -5
- package/src/account/wallet.ts +2 -2
- package/src/account_manager/deploy_account_sent_tx.ts +4 -4
- package/src/account_manager/index.ts +8 -8
- package/src/contract/base_contract_interaction.ts +2 -2
- package/src/contract/batch_call.ts +3 -3
- package/src/contract/checker.ts +1 -1
- package/src/contract/contract.ts +4 -4
- package/src/contract/contract_base.ts +3 -3
- package/src/contract/contract_function_interaction.ts +4 -4
- package/src/contract/deploy_method.ts +8 -8
- package/src/contract/deploy_sent_tx.ts +7 -7
- package/src/contract/sent_tx.ts +9 -2
- package/src/contract/unsafe_contract.ts +3 -3
- package/src/deployment/broadcast_function.ts +3 -3
- package/src/deployment/contract_deployer.ts +4 -4
- package/src/deployment/deploy_instance.ts +3 -3
- package/src/deployment/protocol_contracts.ts +1 -1
- package/src/deployment/register_class.ts +3 -3
- package/src/entrypoint/default_entrypoint.ts +2 -2
- package/src/entrypoint/entrypoint.ts +3 -3
- package/src/fee/fee_payment_method.ts +3 -3
- package/src/fee/native_fee_payment_method.ts +5 -10
- package/src/fee/private_fee_payment_method.ts +4 -4
- package/src/fee/public_fee_payment_method.ts +4 -4
- package/src/index.ts +2 -0
- package/src/rpc_clients/pxe_client.ts +4 -3
- package/src/utils/abi_types.ts +1 -1
- package/src/utils/account.ts +2 -2
- package/src/utils/authwit.ts +4 -10
- package/src/utils/cheat_codes.ts +3 -3
- package/src/utils/l1_contracts.ts +1 -1
- package/src/utils/pub_key.ts +1 -1
- package/src/utils/pxe.ts +2 -2
- package/src/wallet/account_wallet.ts +5 -5
- package/src/wallet/account_wallet_with_private_key.ts +4 -4
- package/src/wallet/base_wallet.ts +27 -21
- package/src/wallet/create_recipient.ts +1 -1
- package/src/wallet/index.ts +3 -3
- package/src/wallet/signerless_wallet.ts +3 -3
package/src/utils/account.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CompleteAddress, PXE } from '@aztec/circuit-types';
|
|
1
|
+
import { type CompleteAddress, type PXE } from '@aztec/circuit-types';
|
|
2
2
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
3
|
|
|
4
|
-
import { DefaultWaitOpts, WaitOpts } from '../contract/index.js';
|
|
4
|
+
import { DefaultWaitOpts, type WaitOpts } from '../contract/index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Waits for the account to finish synchronizing with the PXE Service.
|
package/src/utils/authwit.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FunctionCall, PackedArguments } from '@aztec/circuit-types';
|
|
2
|
-
import { AztecAddress, Fr, GeneratorIndex } from '@aztec/circuits.js';
|
|
1
|
+
import { type FunctionCall, PackedArguments } from '@aztec/circuit-types';
|
|
2
|
+
import { type AztecAddress, type Fr, GeneratorIndex } from '@aztec/circuits.js';
|
|
3
3
|
import { pedersenHash } from '@aztec/foundation/crypto';
|
|
4
4
|
|
|
5
5
|
// docs:start:authwit_computeAuthWitMessageHash
|
|
@@ -40,10 +40,7 @@ export const computeAuthWitMessageHash = (caller: AztecAddress, chainId: Fr, ver
|
|
|
40
40
|
* @returns The inner hash for the witness
|
|
41
41
|
*/
|
|
42
42
|
export const computeInnerAuthWitHash = (args: Fr[]) => {
|
|
43
|
-
return pedersenHash(
|
|
44
|
-
args.map(fr => fr.toBuffer()),
|
|
45
|
-
GeneratorIndex.AUTHWIT_INNER,
|
|
46
|
-
);
|
|
43
|
+
return pedersenHash(args, GeneratorIndex.AUTHWIT_INNER);
|
|
47
44
|
};
|
|
48
45
|
|
|
49
46
|
/**
|
|
@@ -61,8 +58,5 @@ export const computeInnerAuthWitHash = (args: Fr[]) => {
|
|
|
61
58
|
* @returns The outer hash for the witness
|
|
62
59
|
*/
|
|
63
60
|
export const computeOuterAuthWitHash = (consumer: AztecAddress, chainId: Fr, version: Fr, innerHash: Fr) => {
|
|
64
|
-
return pedersenHash(
|
|
65
|
-
[consumer.toField(), chainId, version, innerHash].map(fr => fr.toBuffer()),
|
|
66
|
-
GeneratorIndex.AUTHWIT_OUTER,
|
|
67
|
-
);
|
|
61
|
+
return pedersenHash([consumer.toField(), chainId, version, innerHash], GeneratorIndex.AUTHWIT_OUTER);
|
|
68
62
|
};
|
package/src/utils/cheat_codes.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Note, PXE } from '@aztec/circuit-types';
|
|
2
|
-
import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js';
|
|
1
|
+
import { type Note, type PXE } from '@aztec/circuit-types';
|
|
2
|
+
import { type AztecAddress, type EthAddress, Fr } from '@aztec/circuits.js';
|
|
3
3
|
import { toBigIntBE, toHex } from '@aztec/foundation/bigint-buffer';
|
|
4
4
|
import { keccak, pedersenHash } from '@aztec/foundation/crypto';
|
|
5
5
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
@@ -246,7 +246,7 @@ export class AztecCheatCodes {
|
|
|
246
246
|
public computeSlotInMap(baseSlot: Fr | bigint, key: Fr | bigint | AztecAddress): Fr {
|
|
247
247
|
// Based on `at` function in
|
|
248
248
|
// aztec3-packages/aztec-nr/aztec/src/state_vars/map.nr
|
|
249
|
-
return pedersenHash([new Fr(baseSlot), new Fr(key)]
|
|
249
|
+
return pedersenHash([new Fr(baseSlot), new Fr(key)]);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
/**
|
package/src/utils/pub_key.ts
CHANGED
package/src/utils/pxe.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PXE } from '@aztec/circuit-types';
|
|
2
|
-
import { DebugLogger } from '@aztec/foundation/log';
|
|
1
|
+
import { type PXE } from '@aztec/circuit-types';
|
|
2
|
+
import { type DebugLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
4
|
|
|
5
5
|
export const waitForPXE = async (pxe: PXE, logger?: DebugLogger) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AuthWitness, FunctionCall, PXE, TxExecutionRequest } from '@aztec/circuit-types';
|
|
2
|
-
import { AztecAddress, Fr } from '@aztec/circuits.js';
|
|
3
|
-
import { ABIParameterVisibility, FunctionAbi, FunctionType } from '@aztec/foundation/abi';
|
|
1
|
+
import { type AuthWitness, type FunctionCall, type PXE, type TxExecutionRequest } from '@aztec/circuit-types';
|
|
2
|
+
import { type AztecAddress, Fr } from '@aztec/circuits.js';
|
|
3
|
+
import { type ABIParameterVisibility, type FunctionAbi, FunctionType } from '@aztec/foundation/abi';
|
|
4
4
|
|
|
5
|
-
import { AccountInterface } from '../account/interface.js';
|
|
5
|
+
import { type AccountInterface } from '../account/interface.js';
|
|
6
6
|
import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
7
|
-
import { FeeOptions } from '../entrypoint/entrypoint.js';
|
|
7
|
+
import { type FeeOptions } from '../entrypoint/entrypoint.js';
|
|
8
8
|
import { computeAuthWitMessageHash } from '../utils/authwit.js';
|
|
9
9
|
import { BaseWallet } from './base_wallet.js';
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PXE } from '@aztec/circuit-types';
|
|
2
|
-
import { GrumpkinPrivateKey } from '@aztec/circuits.js';
|
|
1
|
+
import { type PXE } from '@aztec/circuit-types';
|
|
2
|
+
import { type GrumpkinPrivateKey } from '@aztec/circuits.js';
|
|
3
3
|
|
|
4
|
-
import { Salt } from '../account/index.js';
|
|
5
|
-
import { AccountInterface } from '../account/interface.js';
|
|
4
|
+
import { type Salt } from '../account/index.js';
|
|
5
|
+
import { type AccountInterface } from '../account/interface.js';
|
|
6
6
|
import { AccountWallet } from './account_wallet.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AuthWitness,
|
|
3
|
-
ExtendedNote,
|
|
4
|
-
FunctionCall,
|
|
5
|
-
GetUnencryptedLogsResponse,
|
|
6
|
-
L2Block,
|
|
7
|
-
LogFilter,
|
|
8
|
-
NoteFilter,
|
|
9
|
-
PXE,
|
|
10
|
-
SyncStatus,
|
|
11
|
-
Tx,
|
|
12
|
-
TxEffect,
|
|
13
|
-
TxExecutionRequest,
|
|
14
|
-
TxHash,
|
|
15
|
-
TxReceipt,
|
|
2
|
+
type AuthWitness,
|
|
3
|
+
type ExtendedNote,
|
|
4
|
+
type FunctionCall,
|
|
5
|
+
type GetUnencryptedLogsResponse,
|
|
6
|
+
type L2Block,
|
|
7
|
+
type LogFilter,
|
|
8
|
+
type NoteFilter,
|
|
9
|
+
type PXE,
|
|
10
|
+
type SyncStatus,
|
|
11
|
+
type Tx,
|
|
12
|
+
type TxEffect,
|
|
13
|
+
type TxExecutionRequest,
|
|
14
|
+
type TxHash,
|
|
15
|
+
type TxReceipt,
|
|
16
16
|
} from '@aztec/circuit-types';
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
import {
|
|
18
|
+
type AztecAddress,
|
|
19
|
+
type CompleteAddress,
|
|
20
|
+
type Fr,
|
|
21
|
+
type GrumpkinPrivateKey,
|
|
22
|
+
type PartialAddress,
|
|
23
|
+
} from '@aztec/circuits.js';
|
|
24
|
+
import { type ContractArtifact } from '@aztec/foundation/abi';
|
|
25
|
+
import { type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/types/contracts';
|
|
26
|
+
import { type NodeInfo } from '@aztec/types/interfaces';
|
|
21
27
|
|
|
22
|
-
import { Wallet } from '../account/wallet.js';
|
|
23
|
-
import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
24
|
-
import { FeeOptions } from '../entrypoint/entrypoint.js';
|
|
28
|
+
import { type Wallet } from '../account/wallet.js';
|
|
29
|
+
import { type ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
30
|
+
import { type FeeOptions } from '../entrypoint/entrypoint.js';
|
|
25
31
|
|
|
26
32
|
/**
|
|
27
33
|
* A base class for Wallet implementations
|
package/src/wallet/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PXE } from '@aztec/circuit-types';
|
|
2
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
1
|
+
import { type PXE } from '@aztec/circuit-types';
|
|
2
|
+
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
3
3
|
|
|
4
|
-
import { AccountContract } from '../account/contract.js';
|
|
4
|
+
import { type AccountContract } from '../account/contract.js';
|
|
5
5
|
import { AccountWallet } from './account_wallet.js';
|
|
6
6
|
|
|
7
7
|
export * from '../account/wallet.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AuthWitness, FunctionCall, PXE, TxExecutionRequest } from '@aztec/circuit-types';
|
|
2
|
-
import { CompleteAddress, Fr } from '@aztec/circuits.js';
|
|
1
|
+
import { type AuthWitness, type FunctionCall, type PXE, type TxExecutionRequest } from '@aztec/circuit-types';
|
|
2
|
+
import { type CompleteAddress, type Fr } from '@aztec/circuits.js';
|
|
3
3
|
|
|
4
4
|
import { DefaultEntrypoint } from '../entrypoint/default_entrypoint.js';
|
|
5
|
-
import { EntrypointInterface } from '../entrypoint/entrypoint.js';
|
|
5
|
+
import { type EntrypointInterface } from '../entrypoint/entrypoint.js';
|
|
6
6
|
import { BaseWallet } from './base_wallet.js';
|
|
7
7
|
|
|
8
8
|
/**
|