You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer_versioned_docs/version-v5.0.0-rc.2/docs/aztec-nr/framework-description/calling_contracts.md
These accounts are pre-funded with fee juice (the native gas token) at genesis, so you can immediately send transactions without needing to bridge funds from L1.
@@ -96,7 +96,7 @@ import { getFeeJuiceBalance } from "@aztec/aztec.js/utils";
Using the [`wallet` from the connection guide](./how_to_connect_to_local_network.md), call `createSchnorrAccount` to create a new account with a random secretand salt:
23
+
Using the [`wallet` from the connection guide](./how_to_connect_to_local_network.md), call `createSchnorrAccount` to create a new account with a random secret, salt, and signing key:
The secret is used to derive the account's encryption keys, and the salt ensures address uniqueness. The signing key is automatically derived from the secret.
37
+
The secret derives the account's encryption keys, the signing key authenticates its transactions, and the salt ensures address uniqueness. The signing key is provided independently and is not derived from the secret: it is an ownership key, so keep it separate from the encryption secret that your PXE holds.
37
38
38
-
:::warning Store your secretand salt
39
-
Save the `secret`and `salt` values securely. You need both to recover access to your account. If you lose them, you will permanently lose access to the account and any assets it holds.
39
+
:::warning Store your secret, salt, and signing key
40
+
Save the `secret`, `salt`, and `signingKey` values securely. You need all three to recover access to your account. If you lose them, you will permanently lose access to the account and any assets it holds.
40
41
:::
41
42
43
+
## Create an initializerless account
44
+
45
+
Alternatively, create an [initializerless account](../foundational-topics/accounts/deployment.md), which needs no deployment transaction at all:
An initializerless account commits its signing public key into the address itself (through the instance's `immutables_hash`), so there is no onchain state to initialize. Creating the account registers it locally in the PXE, and it is ready to use immediately: skip the deployment section below entirely. Fees are only needed for the account's first real transaction, paid with any of the usual [payment methods](./how_to_pay_fees.md).
55
+
56
+
Two things to keep in mind:
57
+
58
+
- The signing key cannot be changed later. A new key means a new address.
59
+
- Calling `getDeployMethod()` on an initializerless account throws, since there is nothing to deploy.
60
+
61
+
See [account deployment](../foundational-topics/accounts/deployment.md) for how this works and how to choose between the two account types.
62
+
42
63
## Deploy the account
43
64
44
-
New accounts must be deployed before they can send transactions. Deployment requires paying fees.
65
+
Accounts created with `createSchnorrAccount`must be deployed before they can send transactions (initializerless accounts skip this step). Deployment requires paying fees.
If the account already has Fee Juice on L2 (for example, from a faucet or a previously claimed bridge), no special payment method is needed — just call `send({ from: NO_FROM })` and Fee Juice is used automatically.
@@ -137,12 +160,12 @@ Confirm the account was deployed successfully. Substitute the account variable f
0 commit comments