Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: aztec js circulars #3723

Merged
merged 44 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9c19912
wip
charlielye Nov 29, 2023
62a82f1
wip
charlielye Nov 30, 2023
cbc30f6
wip
charlielye Nov 30, 2023
e4cb78a
Rebuild patterns and fix.
charlielye Nov 30, 2023
dd2af06
Force deploy comtainer [ci force-deploy]
charlielye Nov 30, 2023
10172b7
Leading layers must be same between output containers. [ci force-deploy]
charlielye Nov 30, 2023
1187702
Lets play with buildx [ci rebuild yarn-project-prod]
charlielye Nov 30, 2023
7a3206d
Lets play with buildx [ci rebuild sandbox] [ci rebuild cli]
charlielye Nov 30, 2023
5667550
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Nov 30, 2023
2901ba2
wip
charlielye Dec 1, 2023
307111b
wip
charlielye Dec 1, 2023
d7cd82f
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
b216989
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
845d6a7
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
c6c1746
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
4dbe5d8
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
2b37d4f
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
c8b54e9
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
6f37879
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
e507c11
Lets play with buildx [ci rebuild noir] [ci rebuild aztec-sandbox] [c…
charlielye Dec 1, 2023
55df33d
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
8c42a0c
Lets play with buildx [ci rebuild aztec-sandbox] [ci rebuild cli]
charlielye Dec 1, 2023
d717cf1
[ci force-deploy]
charlielye Dec 1, 2023
5a699f1
[ci force-deploy]
charlielye Dec 1, 2023
a65b6d3
[ci force-deploy]
charlielye Dec 1, 2023
79767ff
[ci force-deploy]
charlielye Dec 1, 2023
9eed4a3
[ci force-deploy]
charlielye Dec 1, 2023
bcfb480
[ci rebuild aztec-sandbox] [ci force-deploy]
charlielye Dec 1, 2023
c4fcc95
Merge remote-tracking branch 'origin/master' into cl/sandbox_cli_laye…
charlielye Dec 1, 2023
2cd5000
[ci force-release]
charlielye Dec 1, 2023
f0c0806
[ci force-release]
charlielye Dec 1, 2023
c0fda33
[ci force-release]
charlielye Dec 1, 2023
c89fdef
[ci force-release]
charlielye Dec 1, 2023
b0da8f5
[ci force-release]
charlielye Dec 1, 2023
87db3be
Merge branch 'master' into cl/sandbox_cli_layer_share
charlielye Dec 1, 2023
eb6b3f8
wip
charlielye Dec 2, 2023
0f535c5
Merge branch 'master' into cl/aztec_js_circulars
charlielye Dec 16, 2023
a106051
builds.
charlielye Dec 17, 2023
491212e
Merge remote-tracking branch 'origin/master' into cl/aztec_js_circulars
charlielye Dec 17, 2023
bdee88b
maybe fix
charlielye Dec 17, 2023
e8e1f5b
fix
charlielye Dec 17, 2023
be74798
Merge remote-tracking branch 'origin/master' into cl/aztec_js_circulars
charlielye Dec 19, 2023
deed769
wip
charlielye Dec 21, 2023
4064114
Merge remote-tracking branch 'origin' into cl/aztec_js_circulars
charlielye Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,6 @@ aztec-faucet:
dependencies:
- yarn-project-prod

aztec-node:
buildDir: yarn-project
projectDir: yarn-project/aztec-node
dependencies:
- yarn-project-prod

p2p-bootstrap:
buildDir: yarn-project
projectDir: yarn-project/p2p-bootstrap
dependencies:
- yarn-project-prod

Comment on lines -152 to -163
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was deliberate. These don't exit anymore.

cli:
buildDir: yarn-project
projectDir: yarn-project/cli
Expand Down
7 changes: 3 additions & 4 deletions docs/docs/dev_docs/wallets/main.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wallets

Wallets are the applications through which users manage their accounts. Users rely on wallets to browse through their accounts, monitor their balances, and create new accounts. Wallets also store seed phrases and private keys, or interact with external keystores such as hardware wallets.
Wallets are the applications through which users manage their accounts. Users rely on wallets to browse through their accounts, monitor their balances, and create new accounts. Wallets also store seed phrases and private keys, or interact with external keystores such as hardware wallets.

Wallets also provide an interface for dapps. Dapps may request access to see the user accounts, in order to show the state of those accounts in the context of the application, and request to send transactions from those accounts as the user interacts with the dapp.

Expand All @@ -10,9 +10,9 @@ In this page we will cover the main responsibilities of a wallet in the Aztec ne

## Account setup

The first step for any wallet is to let the user set up their [accounts](../../concepts/foundation/accounts/main.md). An account in Aztec is represented on-chain by its corresponding account contract that the user must deploy to begin interacting with the network. This account contract dictates how transactions are authenticated and executed.
The first step for any wallet is to let the user set up their [accounts](../../concepts/foundation/accounts/main.md). An account in Aztec is represented on-chain by its corresponding account contract that the user must deploy to begin interacting with the network. This account contract dictates how transactions are authenticated and executed.

A wallet must support at least one specific [account contract implementation](./writing_an_account_contract.md), which means being able to deploy such a contract, as well as interacting with it when sending transactions. Code-wise, this requires [implementing the `AccountContract` interface](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec.js/src/account/contract/index.ts).
A wallet must support at least one specific [account contract implementation](./writing_an_account_contract.md), which means being able to deploy such a contract, as well as interacting with it when sending transactions. Code-wise, this requires [implementing the `AccountContract` interface](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/aztec.js/src/account_contract/index.ts).

Note that users must be able to receive funds in Aztec before deploying their account. A wallet should let a user generate a [deterministic complete address](../../concepts/foundation/accounts/keys.md#addresses-partial-addresses-and-public-keys) without having to interact with the network, so they can share it with others to receive funds. This requires that the wallet pins a specific contract implementation, its initialization arguments, a deployment salt, and a privacy key. These values yield a deterministic address, so when the account contract is actually deployed, it is available at the precalculated address. Once the account contract is deployed, the user can start sending transactions using it as the transaction origin.

Expand Down Expand Up @@ -64,4 +64,3 @@ At the time of this writing, all private state is encrypted and broadcasted thro
Encrypted data blobs do not carry any public information as to whom their recipient is. Therefore, it is not possible for a remote node to identify the notes that belong to a user, and it is not possible for a wallet to query a remote node for its private state. As such, wallets need to keep a local database of their accounts private state, in order to be able to answer any queries on their private state.

Dapps may require access to the user's private state, in order to show information relevant to the current application. For instance, a dapp for a token may require access to the user's private notes in the token contract in order to display the user's balance. It is responsibility of the wallet to require authorization from the user before disclosing private state to a dapp.

2 changes: 1 addition & 1 deletion docs/docs/dev_docs/wallets/writing_an_account_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ For our account contract, we will take the hash of the action to authorize, requ

Now that we have a valid account contract, we need to write the typescript glue code that will take care of formatting and authenticating transactions so they can be processed by our contract, as well as deploying the contract during account setup. This takes the form of implementing the `AccountContract` interface:

#include_code account-contract-interface yarn-project/aztec.js/src/account/contract/index.ts typescript
#include_code account-contract-interface yarn-project/aztec.js/src/account_contract/account_contract.ts typescript

However, if you are using the default `AccountActions` module, then you can leverage the `BaseAccountContract` class and just implement the logic for generating an auth witness that matches the one you wrote in Noir:

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ RUN ARCH= && \
rm "node-v$NODE_VERSION-linux-$ARCH.tar.gz" && \
node --version
COPY --from=builder /usr/src /usr/src
ENTRYPOINT ["/usr/bin/node"]
ENTRYPOINT ["/usr/bin/node"]
1 change: 1 addition & 0 deletions yarn-project/aztec.js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/account_contract/artifacts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall having to add artifacts to source control (horrible, I know) to avoid a bootstrapping issue. Are we sure removing them doesn't break bootstrapping? (maybe it was fixed by removing some unneeded dependencies?)

And more importantly: are we sure our build steps that generate these contracts are always run before this package is published, so that we don't accidentally publish aztec.js without these artifacts?

Copy link
Contributor Author

@charlielye charlielye Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check, but given that we build-all-the-things in yarn-project, and in the bootstrap script, I would assume these should be present and not need to be committed.

As a separate point of note, I don't think these should even be here? The account contracts are defined by users of our system. Is there a reason we're baking these into aztec.js?

I could kind of see them being in the CLI, if we assume cli to be a layer that wraps aztec.js, and the cli is a tool that, amongst other things, provides examples.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! We can probably move them elsewhere at this point. Not the CLI though: these contracts need to be available as a library, since they are used a lot in tests (to bootstrap accounts to interact with) or even in the sandbox itself.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { pedersenHash } from '@aztec/foundation/crypto';
import { FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/types';

// These must match the values defined in yarn-project/aztec-nr/aztec/src/entrypoint.nr
export const ACCOUNT_MAX_CALLS = 4;
const ACCOUNT_MAX_CALLS = 4;

/** Encoded function call for account contract entrypoint */
export type EntrypointFunctionCall = {
type EntrypointFunctionCall = {
// eslint-disable-next-line camelcase
/** Arguments hash for the call */
args_hash: Fr;
Expand Down Expand Up @@ -76,7 +76,7 @@ export function hashPayload(payload: EntrypointPayload) {
}

/** Flattens an entrypoint payload */
export function flattenPayload(payload: EntrypointPayload) {
function flattenPayload(payload: EntrypointPayload) {
return [
...payload.function_calls.flatMap(call => [
call.args_hash,
Expand Down
99 changes: 3 additions & 96 deletions yarn-project/aztec.js/src/account/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,106 +19,13 @@
*
* @packageDocumentation
*/
import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types';
import { Fr } from '@aztec/circuits.js';

import { AccountContract, AccountWallet, AztecAddress, Fr } from '../index.js';
import { EcdsaAccountContract } from './contract/ecdsa_account_contract.js';
import { SchnorrAccountContract } from './contract/schnorr_account_contract.js';
import { SingleKeyAccountContract } from './contract/single_key_account_contract.js';
import { AccountManager } from './manager/index.js';
export { CompleteAddress } from '@aztec/types';

export * from './contract/index.js';
export * from './defaults/index.js';
export * from './utils.js';
export { AccountInterface, AuthWitnessProvider } from './interface.js';
export { AccountManager, CompleteAddress };
export * from './wallet.js';

/** A contract deployment salt. */
export type Salt = Fr | number | bigint;

/**
* Creates an Account that relies on an ECDSA signing key for authentication.
* @param pxe - An PXE server instance.
* @param encryptionPrivateKey - Grumpkin key used for note encryption.
* @param signingPrivateKey - Secp256k1 key used for signing transactions.
* @param saltOrAddress - Deployment salt or complete address if account contract is already deployed.
*/
export function getEcdsaAccount(
pxe: PXE,
encryptionPrivateKey: GrumpkinPrivateKey,
signingPrivateKey: Buffer,
saltOrAddress?: Salt | CompleteAddress,
): AccountManager {
return new AccountManager(pxe, encryptionPrivateKey, new EcdsaAccountContract(signingPrivateKey), saltOrAddress);
}

/**
* Creates an Account that relies on a Grumpkin signing key for authentication.
* @param pxe - An PXE server instance.
* @param encryptionPrivateKey - Grumpkin key used for note encryption.
* @param signingPrivateKey - Grumpkin key used for signing transactions.
* @param saltOrAddress - Deployment salt or complete address if account contract is already deployed.
*/
export function getSchnorrAccount(
pxe: PXE,
encryptionPrivateKey: GrumpkinPrivateKey,
signingPrivateKey: GrumpkinPrivateKey,
saltOrAddress?: Salt | CompleteAddress,
): AccountManager {
return new AccountManager(pxe, encryptionPrivateKey, new SchnorrAccountContract(signingPrivateKey), saltOrAddress);
}

/**
* Creates an Account that uses the same Grumpkin key for encryption and authentication.
* @param pxe - An PXE server instance.
* @param encryptionAndSigningPrivateKey - Grumpkin key used for note encryption and signing transactions.
* @param saltOrAddress - Deployment salt or complete address if account contract is already deployed.
*/
export function getUnsafeSchnorrAccount(
pxe: PXE,
encryptionAndSigningPrivateKey: GrumpkinPrivateKey,
saltOrAddress?: Salt | CompleteAddress,
): AccountManager {
return new AccountManager(
pxe,
encryptionAndSigningPrivateKey,
new SingleKeyAccountContract(encryptionAndSigningPrivateKey),
saltOrAddress,
);
}

/**
* Gets a wallet for an already registered account using Schnorr signatures with a single key for encryption and authentication.
* @param pxe - An PXE server instance.
* @param address - Address for the account.
* @param signingPrivateKey - Grumpkin key used for note encryption and signing transactions.
* @returns A wallet for this account that can be used to interact with a contract instance.
*/
export function getUnsafeSchnorrWallet(
pxe: PXE,
address: AztecAddress,
signingKey: GrumpkinPrivateKey,
): Promise<AccountWallet> {
return getWallet(pxe, address, new SingleKeyAccountContract(signingKey));
}

/**
* Gets a wallet for an already registered account.
* @param pxe - PXE Service instance.
* @param address - Address for the account.
* @param accountContract - Account contract implementation.
* @returns A wallet for this account that can be used to interact with a contract instance.
*/
export async function getWallet(
pxe: PXE,
address: AztecAddress,
accountContract: AccountContract,
): Promise<AccountWallet> {
const completeAddress = await pxe.getRegisteredAccount(address);
if (!completeAddress) {
throw new Error(`Account ${address} not found`);
}
const nodeInfo = await pxe.getNodeInfo();
const entrypoint = accountContract.getInterface(completeAddress, nodeInfo);
return new AccountWallet(pxe, entrypoint);
}
8 changes: 8 additions & 0 deletions yarn-project/aztec.js/src/account/wallet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PXE } from '@aztec/types';

import { AccountInterface } from './interface.js';

/**
* The wallet interface.
*/
export type Wallet = AccountInterface & PXE;
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { ContractArtifact } from '@aztec/foundation/abi';
import { CompleteAddress, NodeInfo } from '@aztec/types';

import { AccountInterface } from '../interface.js';

export * from './ecdsa_account_contract.js';
export * from './schnorr_account_contract.js';
export * from './single_key_account_contract.js';
export * from './base_account_contract.js';
import { AccountInterface } from '../account/interface.js';

// docs:start:account-contract-interface
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ContractArtifact } from '@aztec/foundation/abi';
import { CompleteAddress, NodeInfo } from '@aztec/types';

import { DefaultAccountInterface } from '../defaults/default_interface.js';
import { AccountInterface, AuthWitnessProvider } from '../interface.js';
import { AccountContract } from './index.js';
import { DefaultAccountInterface } from '../account/defaults/default_interface.js';
import { AccountInterface, AuthWitnessProvider } from '../account/interface.js';
import { AccountContract } from './account_contract.js';

/**
* Base class for implementing an account contract. Requires that the account uses the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ContractArtifact } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress } from '@aztec/types';

import EcdsaAccountContractArtifact from '../../artifacts/ecdsa_account_contract.json' assert { type: 'json' };
import { AuthWitnessProvider } from '../interface.js';
import { AuthWitnessProvider } from '../account/interface.js';
import EcdsaAccountContractArtifact from './artifacts/ecdsa_account_contract.json' assert { type: 'json' };
import { BaseAccountContract } from './base_account_contract.js';

/**
Expand Down
5 changes: 5 additions & 0 deletions yarn-project/aztec.js/src/account_contract/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './account_contract.js';
export * from './ecdsa_account_contract.js';
export * from './schnorr_account_contract.js';
export * from './single_key_account_contract.js';
export * from './base_account_contract.js';
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ContractArtifact } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/types';

import SchnorrAccountContractArtifact from '../../artifacts/schnorr_account_contract.json' assert { type: 'json' };
import { AuthWitnessProvider } from '../interface.js';
import { AuthWitnessProvider } from '../account/interface.js';
import SchnorrAccountContractArtifact from './artifacts/schnorr_account_contract.json' assert { type: 'json' };
import { BaseAccountContract } from './base_account_contract.js';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { ContractArtifact } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/types';

import SchnorrSingleKeyAccountContractArtifact from '../../artifacts/schnorr_single_key_account_contract.json' assert { type: 'json' };
import { generatePublicKey } from '../../index.js';
import { AuthWitnessProvider } from '../interface.js';
import { AuthWitnessProvider } from '../account/interface.js';
import { generatePublicKey } from '../utils/index.js';
import SchnorrSingleKeyAccountContractArtifact from './artifacts/schnorr_single_key_account_contract.json' assert { type: 'json' };
import { BaseAccountContract } from './base_account_contract.js';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FieldsOf } from '@aztec/circuits.js';
import { TxHash, TxReceipt } from '@aztec/types';

import { DefaultWaitOpts, SentTx, WaitOpts } from '../../contract/sent_tx.js';
import { Wallet } from '../../wallet/index.js';
import { Wallet } from '../account/index.js';
import { DefaultWaitOpts, SentTx, WaitOpts } from '../contract/index.js';
import { waitForAccountSynch } from './util.js';

/** Extends a transaction receipt with a wallet instance for the newly deployed contract. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ import { PublicKey, getContractDeploymentInfo } from '@aztec/circuits.js';
import { Fr } from '@aztec/foundation/fields';
import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types';

import { DefaultWaitOpts } from '../../contract/sent_tx.js';
import { Salt } from '../account/index.js';
import { AccountInterface } from '../account/interface.js';
import {
AccountWalletWithPrivateKey,
ContractDeployer,
DeployMethod,
WaitOpts,
generatePublicKey,
} from '../../index.js';
import { AccountContract, Salt } from '../index.js';
import { AccountInterface } from '../interface.js';
AccountContract,
EcdsaAccountContract,
SchnorrAccountContract,
SingleKeyAccountContract,
} from '../account_contract/index.js';
import { DefaultWaitOpts, DeployMethod, WaitOpts } from '../contract/index.js';
import { ContractDeployer } from '../contract_deployer/index.js';
import { generatePublicKey } from '../utils/index.js';
import { AccountWalletWithPrivateKey } from '../wallet/index.js';
import { DeployAccountSentTx } from './deploy_account_sent_tx.js';
import { waitForAccountSynch } from './util.js';

Expand Down Expand Up @@ -154,3 +156,54 @@ export class AccountManager {
return completeAddress;
}
}

/**
* Creates an Account that relies on an ECDSA signing key for authentication.
* @param pxe - An PXE server instance.
* @param encryptionPrivateKey - Grumpkin key used for note encryption.
* @param signingPrivateKey - Secp256k1 key used for signing transactions.
* @param saltOrAddress - Deployment salt or complete address if account contract is already deployed.
*/
export function getEcdsaAccount(
pxe: PXE,
encryptionPrivateKey: GrumpkinPrivateKey,
signingPrivateKey: Buffer,
saltOrAddress?: Salt | CompleteAddress,
): AccountManager {
return new AccountManager(pxe, encryptionPrivateKey, new EcdsaAccountContract(signingPrivateKey), saltOrAddress);
}

/**
* Creates an Account that relies on a Grumpkin signing key for authentication.
* @param pxe - An PXE server instance.
* @param encryptionPrivateKey - Grumpkin key used for note encryption.
* @param signingPrivateKey - Grumpkin key used for signing transactions.
* @param saltOrAddress - Deployment salt or complete address if account contract is already deployed.
*/
export function getSchnorrAccount(
pxe: PXE,
encryptionPrivateKey: GrumpkinPrivateKey,
signingPrivateKey: GrumpkinPrivateKey,
saltOrAddress?: Salt | CompleteAddress,
): AccountManager {
return new AccountManager(pxe, encryptionPrivateKey, new SchnorrAccountContract(signingPrivateKey), saltOrAddress);
}

/**
* Creates an Account that uses the same Grumpkin key for encryption and authentication.
* @param pxe - An PXE server instance.
* @param encryptionAndSigningPrivateKey - Grumpkin key used for note encryption and signing transactions.
* @param saltOrAddress - Deployment salt or complete address if account contract is already deployed.
*/
export function getUnsafeSchnorrAccount(
pxe: PXE,
encryptionAndSigningPrivateKey: GrumpkinPrivateKey,
saltOrAddress?: Salt | CompleteAddress,
): AccountManager {
return new AccountManager(
pxe,
encryptionAndSigningPrivateKey,
new SingleKeyAccountContract(encryptionAndSigningPrivateKey),
saltOrAddress,
);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { CompleteAddress, PXE, WaitOpts, retryUntil } from '../../index.js';
import { retryUntil } from '@aztec/foundation/retry';
import { CompleteAddress, PXE } from '@aztec/types';

import { WaitOpts } from '../contract/index.js';

/**
* Waits for the account to finish synchronizing with the PXE Service.
Expand Down
Loading