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/docs/about_aztec/roadmap/features_initial_ldt.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Devs should be able to quickly spin up local, emulated instances of an Ethereum
8
8
9
9
Here's a summary of the features we intend to support with the first release of the Aztec Sandbox.
10
10
11
-
## Noir Contracts
11
+
## Aztec.nr Contracts
12
12
13
13
- Noir `contract` scopes.
14
14
- Declare a `contract`, containing a collection of state variables and functions.
@@ -21,22 +21,22 @@ Here's a summary of the features we intend to support with the first release of
21
21
- public functions
22
22
- May read and modify public state.
23
23
-`constructor` functions, for initialising contract state.
24
-
-`import` other Noir contracts, so their functions may be called.
24
+
-`import` other Aztec.nr contracts, so their functions may be called.
25
25
- Nested function calls, for contract composability
26
26
- private functions can call private functions of other contracts, and receive return values.
27
27
- private functions can call public functions any contract.
28
28
- public functions can call private functions of any contract.
29
29
- public functions can call public functions of other contracts, and receive return values.
30
30
- private functions can be called recursively.
31
31
- public functions can be called recursively.
32
-
- Send messages from Noir contracts to Ethereum L1, for consumption by L1 smart contracts.
32
+
- Send messages from Aztec.nr contracts to Ethereum L1, for consumption by L1 smart contracts.
33
33
- Useful, for example, if writing an app to withdraw funds from L2 to L1.
34
34
- Consume messages which have been sent by:
35
35
- L1 functions.
36
36
- Useful, for example, if writing an app to deposit funds from L1 to L2.
37
37
- public L2 functions.
38
-
- Emit `event` data from a Noir Contract.
39
-
- Allows applications to subscribe to events which have been emitted by a Noir contract's functions, for example.
38
+
- Emit `event` data from a Aztec.nr Contract.
39
+
- Allows applications to subscribe to events which have been emitted by a Aztec.nr contract's functions, for example.
40
40
- Write `unconstrained` functions.
41
41
- These allow developers to write `pure` and `view` functions, which can perform calculations and retrieve state. E.g. for fetching contract-specific information, which may then be consumed by a dapp, without having to generate a zero-knowledge proof or interact with the 'network'.
42
42
@@ -46,13 +46,13 @@ A typescript wrapper for making RPC calls to an Aztec LDT node.
46
46
47
47
- Similar in purpose to `web3.js`/`ethers.js`/`viem`, but for interacting with Aztec Network nodes. The RPC interface for an Aztec node is necessarily different from that of an Ethereum node, because it deals with encrypted transactions and state variables.
48
48
- A library for public/private key management.
49
-
- Construct `Contract` instances from a Noir contract's JSON ABI.
49
+
- Construct `Contract` instances from a Aztec.nr contract's JSON ABI.
50
50
- Deploy new contracts to the Aztec LDT.
51
51
- Construct tx requests, passing arguments to a function of a contract.
52
52
- Sign tx requests.
53
53
- Send txs to the LDT node, for simulating.
54
54
- Send txs to the LDT node, to be sent to the LDT network.
55
-
- Call `unconstrained` functions of a Noir contract, to perform `pure` calculations or retrieve state.
55
+
- Call `unconstrained` functions of a Aztec.nr contract, to perform `pure` calculations or retrieve state.
Copy file name to clipboardexpand all lines: docs/docs/concepts/advanced/circuits/kernels/private_kernel.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This circuit is executed by the user, on their own device. This is to ensure pri
6
6
7
7
- Verifies a user's signature.
8
8
- Hides the user's address.
9
-
- Verifies an app's proof - i.e. a proof which has been output after the execution of some function in a Noir Contract.
9
+
- Verifies an app's proof - i.e. a proof which has been output after the execution of some function in an Aztec.nr Contract.
10
10
- Performs private state reads and writes.
11
11
- Exposes (forwards) the following data to the next recursive circuit:
12
12
- new note hashes;
@@ -21,5 +21,5 @@ This circuit is executed by the user, on their own device. This is to ensure pri
21
21
- Verifies a previous 'Private Kernel Proof', recursively, when verifying transactions which are composed of many private function calls.
22
22
- Optionally can [deploy](../../contract_creation) a new private contract.
23
23
24
-
> Note: **This is the only core protocol circuit which actually needs to be "zk" (zero knowledge)!!!** That's because this is the only core protocol circuit which handles private data, and hence the only circuit for which proofs must not leak any information about witnesses! (The private data being handled includes: details of the Noir Contract function which has been executed; the address of the user who executed the function; the intelligible inputs and outputs of that function).
24
+
> Note: **This is the only core protocol circuit which actually needs to be "zk" (zero knowledge)!!!** That's because this is the only core protocol circuit which handles private data, and hence the only circuit for which proofs must not leak any information about witnesses! (The private data being handled includes: details of the Aztec.nr Contract function which has been executed; the address of the user who executed the function; the intelligible inputs and outputs of that function).
25
25
> This is a really interesting point. Most so-called "zk-Rollups" do not make use of this "zero knowledge" property. Their snarks are "snarks"; with no need for zero-knowledge, because they don't seek privacy; they only seek the 'succinct' computation-compression properties of snarks. Aztec's "zk-Rollup" actually makes use of "zero knowledge" snarks. That's why we sometimes call it a "zk-zk-Rollup", or "_actual_ zk-Rollup".
Copy file name to clipboardexpand all lines: docs/docs/concepts/foundation/accounts/keys.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ The privacy master key is used to derive encryption keys. Encryption keys, as th
69
69
70
70
In a future version, encryption keys will be differentiated between incoming and outgoing. When sending a note to another user, the sender will use the recipient's incoming encryption key for encrypting the data for them, and will optionally use their own outgoing encryption key for encrypting any data about the destination of that note. This is useful for reconstructing transaction history from on-chain data. For example, during a token transfer, the token contract may dictate that the sender encrypts the note with value with the recipient's incoming key, but also records the transfer with its own outgoing key for bookkeeping purposes.
71
71
72
-
An application in Noir can access the encryption public key for a given address using the oracle call `get_public_key`, which you can then use for calls such as `emit_encrypted_log`:
72
+
An application in Aztec.nr can access the encryption public key for a given address using the oracle call `get_public_key`, which you can then use for calls such as `emit_encrypted_log`:
@@ -81,7 +81,7 @@ In order to be able to provide the public encryption key for a given address, th
81
81
82
82
In addition to deriving encryption keys, the privacy master key is used for deriving nullifier secrets. Whenever a private note is consumed, a nullifier deterministically derived from it is emitted. This mechanisms prevents double-spends, since nullifiers are checked by the protocol to be unique. Now, in order to preserve privacy, a third party should not be able to link a note commitment to its nullifier - this link is enforced by the note implementation. Therefore, calculating the nullifier for a note requires a secret from its owner.
83
83
84
-
An application in Noir can request a nullifier from the current user for computing the nullifier of a note via the `get_secret_key` oracle call:
84
+
An application in Aztec.nr can request a nullifier from the current user for computing the nullifier of a note via the `get_secret_key` oracle call:
Copy file name to clipboardexpand all lines: docs/docs/concepts/foundation/state_model.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import Disclaimer from '../../misc/common/\_disclaimer.mdx';
10
10
11
11
## Private State
12
12
13
-
Private state must be treated differently from public state and this must be expressed in the semantics of the Noir language.
13
+
Private state must be treated differently from public state and this must be expressed in the semantics of Aztec.nr.
14
14
15
15
Private state is encrypted and therefore is "owned" by a user or a set of users (via shared secrets) that are able to decrypt the state.
16
16
@@ -22,12 +22,12 @@ Modification of state variables can be emulated by nullifying the a state record
22
22
23
23
### Abstracting UTXO's from App's / Users
24
24
25
-
The goal of Noir's contract syntax is abstract the UTXO model away from an app user / developer, contract developers are the only actor who should have to think about UTXO's.
25
+
The goal of the Aztec.nr smart contract library is to abstract the UTXO model away from an app user / developer, contract developers are the only actor who should have to think about UTXO's.
26
26
27
27
This is achieved with two main features:
28
28
29
29
1. Users sign over transactions, not over specific UTXO's
30
-
2.Noir contracts support developer defined `unconstrained` getter functions to help dApp's make sense of UTXO's. e.g `getBalance()`. These functions can be called outside of a transaction context to read private state.
30
+
2.Aztec.nr contracts support developer defined `unconstrained` getter functions to help dApp's make sense of UTXO's. e.g `getBalance()`. These functions can be called outside of a transaction context to read private state.
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/contracts/compiling.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Compiling contracts
2
2
3
-
Once you have written a [contract](../contracts/main.md) in Noir, you will need to compile it into an [artifact](./abi.md) in order to use it.
3
+
Once you have written a [contract](../contracts/main.md) in Aztec.nr, you will need to compile it into an [artifact](./abi.md) in order to use it.
4
4
5
5
In this guide we will cover how to do so, both using the CLI and programmatically.
6
6
7
-
We'll also cover how to generate a helper [TypeScript interface](#typescript-interfaces) and a [Noir interface](#noir-interfaces) for easily interacting with your contract from your typescript app and from other noir contracts, respectively.
7
+
We'll also cover how to generate a helper [TypeScript interface](#typescript-interfaces) and an [Aztec.nr interface](#noir-interfaces) for easily interacting with your contract from your typescript app and from other Aztec.nr contracts, respectively.
8
8
9
9
## Prerequisites
10
10
@@ -76,13 +76,13 @@ export class PrivateTokenContract extends ContractBase {
76
76
77
77
Read more about interacting with contracts using `aztec.js`[here](../dapps/main.md).
78
78
79
-
### Noir interfaces
79
+
### Aztec.nr interfaces
80
80
81
-
A Noir contract can [call a function](./functions.md) in another contract via `context.call_private_function` or `context.call_public_function`. However, this requires manually assembling the function selector and manually serialising the arguments, which is not type-safe.
81
+
An Aztec.nr contract can [call a function](./functions.md) in another contract via `context.call_private_function` or `context.call_public_function`. However, this requires manually assembling the function selector and manually serialising the arguments, which is not type-safe.
82
82
83
83
To make this easier, the compiler can generate contract interface structs that expose a convenience method for each function listed in a given contract ABI. These structs are intended to be used from another contract project that calls into the current one. For each contract, two interface structs are generated: one to be used from private functions with a `PrivateContext`, and one to be used from open functions with a `PublicContext`.
84
84
85
-
To generate them, include a `--interface` option in the compile command with a path to the target folder for the generated Noir interface files:
85
+
To generate them, include a `--interface` option in the compile command with a path to the target folder for the generated Aztec.nr interface files:
Read more about how to use the Noir interfaces [here](./functions.md#contract-interface).
131
+
Read more about how to use the Aztec.nr interfaces [here](./functions.md#contract-interface).
132
132
133
133
:::info
134
134
At the moment, the compiler generates these interfaces from already compiled ABIs, and not from source code. This means that you should not import a generated interface from within the same project as its source contract, or you risk circular references.
-`compileUsingNargo`: Compiles a Noir project in the target folder using the `nargo` binary available on the shell `PATH` and returns the generated ABIs.
146
+
-`compileUsingNargo`: Compiles an Aztec.nr project in the target folder using the `nargo` binary available on the shell `PATH` and returns the generated ABIs.
147
147
-`generateTypescriptContractInterface`: Generates a typescript class for the given contract ABI.
148
-
-`generateNoirContractInterface`: Generates a Noir interface struct for the given contract ABI.
148
+
-`generateNoirContractInterface`: Generates a Aztec.nr interface struct for the given contract ABI.
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/contracts/contract.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ contract MyContract {
18
18
```
19
19
20
20
21
-
> A note for vanilla Noir devs: There is no [`main()`](https://noir-lang.org/getting_started/breakdown/#mainnr) function within a Noir Contract scope. This is because more than one function of a contract may be called and proven as external (as opposed to inlined by the compiler).
21
+
> A note for vanilla Noir devs: There is no [`main()`](https://noir-lang.org/getting_started/breakdown/#mainnr) function within a Noir `contract` scope. This is because more than one function of a contract may be called and proven as external (as opposed to inlined by the compiler).
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/contracts/main.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## What is Aztec.nr?
4
4
5
-
**Aztec.nr** is a library for writing Aztec smart contracts.
5
+
**Aztec.nr** is a framework for writing Aztec smart contracts.
6
6
7
7
## Nomenclature
8
8
@@ -12,25 +12,26 @@ A **smart contract** is just a collection of persistent state variables, and a c
12
12
13
13
An **Aztec smart contract** is a smart contract with **private** state variables and **private** functions.
14
14
15
-
**Aztec.nr** is a library for writing Aztec smart contracts, written in Noir.
15
+
**Aztec.nr** is a framework for writing Aztec smart contracts, written in Noir.
16
16
17
17
# Getting started
18
18
19
19
## Install Noir
20
20
21
-
To write a Noir Contract, you need to write Noir, and to write Noir, you need to [install Nargo](https://noir-lang.org/getting_started/nargo_installation).
21
+
To write an Aztec.nr contract, you need to write Noir, and to write Noir, you need to [install Nargo](https://noir-lang.org/getting_started/nargo_installation).
22
22
23
23
## Install Noir tooling
24
24
25
-
There are a number of tools to make writing Noir Contracts more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding).
25
+
There are a number of tools to make writing Aztec.nr contracts more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding).
26
26
27
27
## Quick start
28
28
29
29
:::danger TODO
30
30
Starter kit
31
31
:::
32
32
33
-
## Example Noir Contract
33
+
34
+
## Example Aztec.nr Contract
34
35
35
36
In keeping with the origins of blockchain, here's an example of a simple private token contract. Everyone's balances are private.
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/dapps/main.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Explain how to write a dapp using [`aztec.js`](https://github.com/AztecProtocol/
21
21
- Use the e2e tests as inspiration.
22
22
- Instantiate a contract
23
23
- Deploy a contract
24
-
- How to generate a nice typescript interface for a Noir Contract's functions (we have a little `.ts` program in `noir-contracts` to generate a types file at the moment... how would a user do this?)
24
+
- How to generate a nice typescript interface for an Aztec.nr contract's functions (we have a little `.ts` program in `noir-contracts` to generate a types file at the moment... how would a user do this?)
25
25
- Call 'view' functions
26
26
- Simulate functions (simulate the result, without sending to the 'network')
Copy file name to clipboardexpand all lines: docs/docs/dev_docs/getting_started/sandbox.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ import Image from "@theme/IdealImage";
6
6
7
7
## Introduction
8
8
9
-
The Aztec Sandbox aims to provide a local development system against which you can build and test Noir contracts in a fast, safe, and free environment.
9
+
The Aztec Sandbox aims to provide a local development system against which you can build and test Aztec.nr contracts in a fast, safe, and free environment.
10
10
11
11
Here we will walkthrough the process of retrieving the Sandbox, installing the client libraries and using it to deploy and use a fully private token contract on the Aztec network.
0 commit comments