diff --git a/docs/docs/aztec/aztec/concepts/accounts/index.md b/docs/docs/aztec/aztec/concepts/accounts/index.md index 92a4daaa743..e9add04a564 100644 --- a/docs/docs/aztec/aztec/concepts/accounts/index.md +++ b/docs/docs/aztec/aztec/concepts/accounts/index.md @@ -144,4 +144,4 @@ In order to be considered valid, an account must prove that it has locked enough However, there is one major consideration around public execution reverts. In the current design, if one of the public function executions enqueued in a transaction fails, then the entire transaction is reverted. But reverting the whole transaction would also revert the fee payment, and leave the sequencer with their hands empty after running the public execution. This means we will need to enshrine an initial verification and fee payment phase that is _not_ reverted if public execution fails. -You can read the latest information about fees in the [protocol specs](../../../protocol-specs/gas-and-fees/index.md). +You can read the latest information about fees in the [protocol specs](/protocol-specs/gas-and-fees/index.md). diff --git a/docs/docs/aztec/aztec/concepts/smart_contracts/contract_creation.md b/docs/docs/aztec/aztec/concepts/smart_contracts/contract_creation.md index 636ca4fc8c2..f6944dbd053 100644 --- a/docs/docs/aztec/aztec/concepts/smart_contracts/contract_creation.md +++ b/docs/docs/aztec/aztec/concepts/smart_contracts/contract_creation.md @@ -2,7 +2,7 @@ title: Contract Deployment --- -The latest information about contract deployment has moved to the protocol specification. You can find it [here](../../../protocol-specs/contract-deployment/index.md). +The latest information about contract deployment has moved to the protocol specification. You can find it [here](/protocol-specs/contract-deployment/index.md). ## Further reading diff --git a/docs/docs/aztec/aztec/concepts/wallets/index.md b/docs/docs/aztec/aztec/concepts/wallets/index.md index 39934283e60..18540be83db 100644 --- a/docs/docs/aztec/aztec/concepts/wallets/index.md +++ b/docs/docs/aztec/aztec/concepts/wallets/index.md @@ -4,7 +4,7 @@ title: Wallets In this page we will cover the main responsibilities of a wallet in the Aztec network. -Refer to [_writing an account contract_](../contracts/writing_contracts/accounts/write_accounts_contract.md) for a tutorial on how to write a contract to back a user's account. +Refer to [_writing an account contract_](/tutorials/tutorials/write_accounts_contract.md) for a tutorial on how to write a contract to back a user's account. Go to [\_wallet architecture](./architecture.md) for an overview of its architecture and a reference on the interface a wallet must implement. @@ -18,7 +18,7 @@ In addition to these usual responsibilities, wallets in Aztec also need to track The first step for any wallet is to let the user set up their [accounts](/aztec/aztec/concepts/index.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](../contracts/writing_contracts/accounts/write_accounts_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](/tutorials/tutorials/write_accounts_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](/aztec/aztec/concepts/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. diff --git a/docs/docs/aztec/aztec/glossary/_category_.json b/docs/docs/aztec/aztec/glossary/_category_.json deleted file mode 100644 index 88ac6a0165b..00000000000 --- a/docs/docs/aztec/aztec/glossary/_category_.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": "Glossary", - "position": 2, - "collapsible": true, - "collapsed": true -} diff --git a/docs/docs/aztec/aztec/glossary/call_types.md b/docs/docs/aztec/aztec/glossary/call_types.md index c19a794bb6d..ba700ae846d 100644 --- a/docs/docs/aztec/aztec/glossary/call_types.md +++ b/docs/docs/aztec/aztec/glossary/call_types.md @@ -121,7 +121,7 @@ A common pattern is to enqueue public calls to check some validity condition on #include_code deadline /noir-projects/noir-contracts/contracts/crowdfunding_contract/src/main.nr rust :::warning -Calling public functions privately leaks some privacy! The caller of the function and all arguments will be revelead, so exercise care when mixing the private and public domains. To learn about alternative ways to access public state privately, look into [Shared State](../../developers/contracts/references/storage/shared_state.md). +Calling public functions privately leaks some privacy! The caller of the function and all arguments will be revelead, so exercise care when mixing the private and public domains. To learn about alternative ways to access public state privately, look into [Shared State](/reference/reference/smart_contract_reference/storage/shared_state.md). ::: ### Public Execution diff --git a/docs/docs/aztec/aztec/limitations.md b/docs/docs/aztec/aztec/limitations.md index 25af684d174..5ca4703a923 100644 --- a/docs/docs/aztec/aztec/limitations.md +++ b/docs/docs/aztec/aztec/limitations.md @@ -53,7 +53,7 @@ That's right, the Sandbox doesn't actually generate or verify any zk-SNARKs yet! The main goal of the Sandbox is to enable developers to experiment with building apps, and hopefully to provide feedback. We want the developer experience to be as fast as possible, much like how Ethereum developers use Ganache or Anvil to get super-fast block times, instead of the slow-but-realistic 12-second block times that they'll encounter in production. A fast Sandbox enables fast testing, which enables developers to iterate quickly. -That's not to say a super-fast proving system isn't being worked on [as we speak](/aztec/aztec/what_is_aztec/roadmap/cryptography_roadmap.md). +That's not to say a super-fast proving system isn't being worked on [as we speak](/aztec/aztec/roadmap/cryptography_roadmap.md). #### What are the consequences? @@ -172,11 +172,11 @@ This will be patched in the near future, but unfortunately, app developers might ### New Privacy Standards are required -There are many [patterns](/aztec/aztec/what_is_aztec/privacy_considerations.md) which can leak privacy, even on Aztec. Standards haven't been developed yet, to encourage best practices when designing private smart contracts. +There are many [patterns](/reference/reference/privacy_considerations.md) which can leak privacy, even on Aztec. Standards haven't been developed yet, to encourage best practices when designing private smart contracts. #### What are the consequences? -For example, until community standards are developed to reduce the uniqueness of ['Tx Fingerprints'](/aztec/aztec/what_is_aztec/privacy_considerations.md#function-fingerprints-and-tx-fingerprints) app developers might accidentally forfeit some function privacy. +For example, until community standards are developed to reduce the uniqueness of ['Tx Fingerprints'](/reference/reference/privacy_considerations.md#function-fingerprints-and-tx-fingerprints) app developers might accidentally forfeit some function privacy. ## Circuit limitations diff --git a/docs/docs/aztec/vision.mdx b/docs/docs/aztec/index.mdx similarity index 95% rename from docs/docs/aztec/vision.mdx rename to docs/docs/aztec/index.mdx index 927b0f7246e..5381c307ecb 100644 --- a/docs/docs/aztec/vision.mdx +++ b/docs/docs/aztec/index.mdx @@ -3,7 +3,7 @@ title: Vision sidebar_position: 1 --- -import Disclaimer from "../../../../src/components/Disclaimers/_wip_disclaimer.mdx"; +import Disclaimer from "../../src/components/Disclaimers/_wip_disclaimer.mdx"; ## The world's encrypted ledger diff --git a/docs/docs/getting_started/getting_started/index.md b/docs/docs/getting_started/getting_started/index.md index 8ad154578a9..18c358b4cf2 100644 --- a/docs/docs/getting_started/getting_started/index.md +++ b/docs/docs/getting_started/getting_started/index.md @@ -16,7 +16,7 @@ This creates a codespace with a prebuilt image containing one of the "Aztec Boxe The above method uses Aztec boxes to install the sandbox and clone the repo. You can use it too to get started on your own machine and use your own IDE. -You can also [install the sandbox manually](../sandbox/references/sandbox-reference.md). +You can also [install the sandbox manually](/reference/reference/sandbox_reference). ### Prerequisites diff --git a/docs/docs/guides/guides/local_env/creating_schnorr_accounts.md b/docs/docs/guides/guides/local_env/creating_schnorr_accounts.md index f63ca1d2580..0649378a77a 100644 --- a/docs/docs/guides/guides/local_env/creating_schnorr_accounts.md +++ b/docs/docs/guides/guides/local_env/creating_schnorr_accounts.md @@ -61,4 +61,4 @@ Once this has completed, the L2 block is retrieved and pulled down to the PXE so ## Next Steps -Check out our section on [Writing your own Account Contract](../contracts/writing_contracts/accounts/write_accounts_contract.md) leveraging our account abstraction +Check out our section on [Writing your own Account Contract](/tutorials/tutorials/write_accounts_contract.md) leveraging our account abstraction diff --git a/docs/docs/guides/guides/smart_contracts/writing_contracts/common_patterns/authwit.md b/docs/docs/guides/guides/smart_contracts/writing_contracts/common_patterns/authwit.md index 73398bb6a40..6840366384b 100644 --- a/docs/docs/guides/guides/smart_contracts/writing_contracts/common_patterns/authwit.md +++ b/docs/docs/guides/guides/smart_contracts/writing_contracts/common_patterns/authwit.md @@ -82,7 +82,7 @@ Both return the value `0xabf64ad4` (`IS_VALID` selector) for a successful authen As part of [Aztec.nr](https://aztec.nr), we are providing a library that can be used to implement authentication witness for your contracts. -This library also provides a basis for account implementations such that these can more easily implement authentication witness. For more on the wallets, see [writing an account contract](../../writing_contracts/accounts/write_accounts_contract.md). +This library also provides a basis for account implementations such that these can more easily implement authentication witness. For more on the wallets, see [writing an account contract](/tutorials/tutorials/write_accounts_contract.md). For our purposes here (not building a wallet), the most important part of the library is the `auth` utility which exposes a couple of helper methods for computing the action hash, retrieving witnesses, validating them and emitting the nullifier. diff --git a/docs/docs/guides/guides/smart_contracts/writing_contracts/storage/notes.md b/docs/docs/guides/guides/smart_contracts/writing_contracts/storage/notes.md index eee2950d2e9..da2a8e82fe6 100644 --- a/docs/docs/guides/guides/smart_contracts/writing_contracts/storage/notes.md +++ b/docs/docs/guides/guides/smart_contracts/writing_contracts/storage/notes.md @@ -69,7 +69,7 @@ To update a value, its previous note hash(es) are nullified. The new note value ## Supplementary components Some optional background resources on notes can be found here: -- [High level network architecture](/aztec/aztec/what_is_aztec/core_components.md#high-level-network-architecture), specifically the Private Execution Environment +- [High level network architecture](/aztec/aztec/core_components.md#high-level-network-architecture), specifically the Private Execution Environment - [Transaction lifecycle (simple diagram)](/aztec/aztec/concepts/transactions.md#simple-example-of-the-private-transaction-lifecycle) - [Public and Private state](/aztec/aztec/concepts/state_model) diff --git a/docs/docs/index.mdx b/docs/docs/index.mdx index e8719c8730a..1957686f36e 100644 --- a/docs/docs/index.mdx +++ b/docs/docs/index.mdx @@ -36,7 +36,7 @@ Aztec is: ### Learn 📚 -Start on the [Technical Overview page](/aztec/aztec/what_is_aztec/core_components) to read about how Aztec works. +Start on the [Technical Overview page](/aztec/aztec/core_components) to read about how Aztec works. ### Build 🧑‍💻 diff --git a/docs/docs/reference/reference/sandbox_reference/sandbox-reference.md b/docs/docs/reference/reference/sandbox_reference/sandbox-reference.md index 44d0131fbd5..39004a48b31 100644 --- a/docs/docs/reference/reference/sandbox_reference/sandbox-reference.md +++ b/docs/docs/reference/reference/sandbox_reference/sandbox-reference.md @@ -10,7 +10,7 @@ For a quick start, follow the [guide](/getting_started/getting_started) to insta ## Manual Install -You can manually install the sandbox via the underlying script used in the [Aztec Boxes](../../getting_started/quickstart.md#run-the-npx-script). +You can manually install the sandbox via the underlying script used in the [Aztec Boxes](/getting_started/getting_started/index.md#run-the-npx-script). ### Prerequisites diff --git a/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md b/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md index 7ceb0f1f7b0..6f1d5ea0807 100644 --- a/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md +++ b/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md @@ -8,6 +8,7 @@ When finished, one can call .finish() to convert back to the abi | inputs | PrivateContextInputs | | side_effect_counter | u32 | | min_revertible_side_effect_counter | u32 | +| is_fee_payer | bool | | args_hash | Field | | return_hash | Field | | max_block_number | MaxBlockNumber | @@ -91,6 +92,17 @@ PrivateContext::finish(self); | --- | --- | | self | | +### set_as_fee_payer + +```rust +PrivateContext::set_as_fee_payer(&mut self); +``` + +#### Parameters +| Name | Type | +| --- | --- | +| &mut self | | + ### end_setup ```rust @@ -208,7 +220,7 @@ PrivateContext::emit_contract_class_unencrypted_log(&mut self, log); ### emit_encrypted_log ```rust -PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, note_type_id, encryption_pub_key, preimage); +PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, note_type_id, ivpk_m, preimage); ``` #### Parameters @@ -218,7 +230,7 @@ PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, no | contract_address | AztecAddress | | storage_slot | Field | | note_type_id | Field | -| encryption_pub_key | GrumpkinPoint | +| ivpk_m | GrumpkinPoint | | preimage | [Field; N] | ### call_private_function diff --git a/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/note/utils.md b/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/note/utils.md index c646d50a639..90fae9cde16 100644 --- a/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/note/utils.md +++ b/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/note/utils.md @@ -80,6 +80,17 @@ compute_note_hash_for_insertion(note); | --- | --- | | note | Note | +### compute_note_hash_for_read_request + +```rust +compute_note_hash_for_read_request(note); +``` + +#### Parameters +| Name | Type | +| --- | --- | +| note | Note | + ### compute_note_hash_for_consumption ```rust diff --git a/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/oracle/logs.md b/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/oracle/logs.md index 265c6e23318..940a05934fd 100644 --- a/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/oracle/logs.md +++ b/docs/docs/reference/reference/smart_contract_reference/aztec-nr/aztec/oracle/logs.md @@ -19,7 +19,7 @@ emit_encrypted_log_oracle(_contract_address, _storage_slot, _note_type_id, _encr ### emit_encrypted_log ```rust -emit_encrypted_log(contract_address, storage_slot, note_type_id, encryption_pub_key, preimage, counter); +emit_encrypted_log(contract_address, storage_slot, note_type_id, ivpk_m, preimage, counter); ``` #### Parameters @@ -28,7 +28,7 @@ emit_encrypted_log(contract_address, storage_slot, note_type_id, encryption_pub_ | contract_address | AztecAddress | | storage_slot | Field | | note_type_id | Field | -| encryption_pub_key | GrumpkinPoint | +| ivpk_m | GrumpkinPoint | | preimage | [Field; N] | | counter | u32 | diff --git a/docs/docs/tutorials/tutorials/simple_dapp/testing.md b/docs/docs/tutorials/tutorials/simple_dapp/testing.md index bf9531ddead..c9907bd0dd0 100644 --- a/docs/docs/tutorials/tutorials/simple_dapp/testing.md +++ b/docs/docs/tutorials/tutorials/simple_dapp/testing.md @@ -67,4 +67,4 @@ yarn node --experimental-vm-modules $(yarn bin jest) --testRegex '.*\.test\.mjs$ ## Next steps -Now that you have finished the tutorial, you can learn more about [writing contracts with Noir](/aztec/aztec/concepts/smart_contracts/index.md) or read about the [fundamental concepts behind Aztec Network](/aztec/aztec/what_is_aztec/core_components). +Now that you have finished the tutorial, you can learn more about [writing contracts with Noir](/aztec/aztec/concepts/smart_contracts/index.md) or read about the [fundamental concepts behind Aztec Network](/aztec/aztec/core_components). diff --git a/docs/docs/tutorials/tutorials/write_accounts_contract.md b/docs/docs/tutorials/tutorials/write_accounts_contract.md index 46f62fb5d55..bee114a9c58 100644 --- a/docs/docs/tutorials/tutorials/write_accounts_contract.md +++ b/docs/docs/tutorials/tutorials/write_accounts_contract.md @@ -15,7 +15,7 @@ You will learn: Writing your own account contract allows you to define the rules by which user transactions are authorized and paid for, as well as how user keys are managed (including key rotation and recovery). In other words, writing an account contract lets you make the most out of [account abstraction](/aztec/aztec/concepts/index.md#what-is-account-abstraction) in the Aztec network. -It is highly recommended that you understand how an [account](/aztec/aztec/concepts/index.md) is defined in Aztec, as well as the differences between privacy and authentication [keys](/aztec/aztec/concepts/accounts/keys.md). You will also need to know how to write a [contract in Noir](../layout.md), as well as some basic [Typescript](https://www.typescriptlang.org/). +It is highly recommended that you understand how an [account](/aztec/aztec/concepts/index.md) is defined in Aztec, as well as the differences between privacy and authentication [keys](/aztec/aztec/concepts/accounts/keys.md). You will also need to know how to write a contract in Noir, as well as some basic [Typescript](https://www.typescriptlang.org/). For this tutorial, we will write an account contract that uses Schnorr signatures for authenticating transaction requests. @@ -29,7 +29,7 @@ Let's start with the account contract itself in Aztec.nr. Create a new Aztec.nr #include_code contract noir-projects/noir-contracts/contracts/schnorr_hardcoded_account_contract/src/main.nr rust -The important part of this contract is the `entrypoint` function, which will be the first function executed in any transaction originated from this account. This function has two main responsibilities: authenticating the transaction and executing calls. It receives a `payload` with the list of function calls to execute, and requests a corresponding [authentication witness](../../../../learn/concepts/accounts/authwit.md) from an oracle to validate it. Authentication witnesses are used for authorizing actions for an account, whether it is just checking a signature, like in this case, or granting authorization for another account to act on an accounts behalf (e.g. token approvals). You will find this logic implemented in the `AccountActions` module, which use the `AppPayload` and `FeePayload` structs: +The important part of this contract is the `entrypoint` function, which will be the first function executed in any transaction originated from this account. This function has two main responsibilities: authenticating the transaction and executing calls. It receives a `payload` with the list of function calls to execute, and requests a corresponding [authentication witness](/aztec/aztec/concepts/accounts/authwit.md) from an oracle to validate it. Authentication witnesses are used for authorizing actions for an account, whether it is just checking a signature, like in this case, or granting authorization for another account to act on an accounts behalf (e.g. token approvals). You will find this logic implemented in the `AccountActions` module, which use the `AppPayload` and `FeePayload` structs: #include_code entrypoint noir-projects/aztec-nr/authwit/src/account.nr rust @@ -49,7 +49,7 @@ For our account contract, we will take the hash of the action to authorize, requ ### Fee Abstraction -The `FeePayload`, being distinct from the `AppPayload`, allows for fee abstraction, meaning the account paying the fee for the transaction can be different than the account that is initiating the transaction. This is also useful for maintaining privacy, as fee payments on the network must be public. For example, Alice could pay a relayer transaction fees in private, and the relayer could pay the transaction fee in public. This also allows for accounts without a fee paying asset to use a non-fee paying asset to pay for fees, provided they can find a relayer willing to accept a non-fee paying asset as payment (or do it for free). You can read more about that works in the protocol specification on fees [here](../../../../protocol-specs/gas-and-fees/tx-setup-and-teardown.md). +The `FeePayload`, being distinct from the `AppPayload`, allows for fee abstraction, meaning the account paying the fee for the transaction can be different than the account that is initiating the transaction. This is also useful for maintaining privacy, as fee payments on the network must be public. For example, Alice could pay a relayer transaction fees in private, and the relayer could pay the transaction fee in public. This also allows for accounts without a fee paying asset to use a non-fee paying asset to pay for fees, provided they can find a relayer willing to accept a non-fee paying asset as payment (or do it for free). You can read more about that works in the protocol specification on fees [here](/protocol-specs/gas-and-fees/tx-setup-and-teardown.md). ### Nonce Abstraction diff --git a/docs/docs/welcome.md b/docs/docs/welcome.md deleted file mode 100644 index c579ef9d130..00000000000 --- a/docs/docs/welcome.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -slug: "/" -id: "welcome" -title: Welcome -description: "Aztec introduces a privacy-centric zkRollup solution for Ethereum, enhancing confidentiality and scalability within the Ethereum ecosystem." ---- - -# Aztec: A Privacy-First L2 on Ethereum - -On Ethereum today, everything is publicly visible, by everyone. In the real world, people enjoy privacy. Aztec brings privacy to Ethereum. - -## Get started - -### Learn :book: - -Start on the [Technical Overview page](./learn/about_aztec/technical_overview.md) to read about how Aztec works. - -### Build :technologist: - -Go to the [Getting Started section](./developers/getting_started/main.md) of the developer docs to get your hands dirty and start developing on Aztec. - -#### Go deeper 🔬 - -Check out the [Awesome Aztec repo](https://github.com/AztecProtocol/awesome-aztec) for a curated list of learning resources and tools to help you learn more about Aztec. - -Jump into one of the [tutorials](./developers/tutorials/main.md) to learn how to build more complex applications on Aztec. diff --git a/docs/relative_paths.js b/docs/relative_paths.js deleted file mode 100644 index 24f209c5ea7..00000000000 --- a/docs/relative_paths.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -function rewrite(markdownContent, file) { - const matchAbsolute = new RegExp( - /(\(\/([a-zA-Z0-9_-]+))(\/[a-zA-Z0-9_-]+)*/g - ); - - const matchSplit = new RegExp(/\/([a-zA-Z0-9_-]+)*/g); - - const tests = markdownContent.split("\n"); - // console.log(tests); - // console.log("TESTING FILE: ", file); - for (let test of tests) { - const absolutePathMatches = test.match(matchAbsolute); - if (!absolutePathMatches) continue; - // console.log(absolutePathMatches); - - const matches = absolutePathMatches.map((match) => { - return match.match(matchSplit); - }); - - console.log(matches); - matches.forEach((s) => { - if (!s.includes("/img")) { - // console.log(s); - - let result = s.slice(-1)[0].slice(1); - // console.log(result); - s.slice(1).forEach((sub) => { - result = "../" + result; - }); - console.log(`(${result}`); - } - }); - } -} - -const rootDir = path.join(__dirname); -const docsDir = path.join(rootDir, "docs"); - -async function iterate(dir) { - const files = fs.readdirSync(dir); - - for (const file of files) { - const filepath = path.join(dir, file); - const stat = fs.statSync(filepath); - - if (stat.isDirectory()) { - iterate(filepath); - } else if ( - stat.isFile() && - (file.endsWith(".md") || file.endsWith(".mdx") || file.endsWith(".json")) - ) { - // console.log(file); - // if (file === "index.mdx") { - const markdownContent = fs.readFileSync(filepath, "utf-8"); - // console.log(markdownContent); - rewrite(markdownContent, file); - // } - } - } -} - -iterate(docsDir); diff --git a/docs/sidebars.js b/docs/sidebars.js index baea2db6289..e8adcdc8704 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -85,543 +85,6 @@ export default { { type: "doc", id: "migration_notes" }, { type: "doc", id: "aztec_connect_sunset" }, ], - protocolSpecSidebar: [ - "protocol-specs/intro", - { - label: "Cryptography", - type: "category", - link: { type: "doc", id: "protocol-specs/cryptography/index" }, - items: [ - { - label: "Proving System", - type: "category", - link: { - type: "doc", - id: "protocol-specs/cryptography/proving-system/performance-targets", - }, - items: [ - "protocol-specs/cryptography/proving-system/performance-targets", - "protocol-specs/cryptography/proving-system/overview", - "protocol-specs/cryptography/proving-system/data-bus", - ], - }, - { - label: "Storage", - type: "category", - items: [ - { - label: "Trees", - type: "category", - link: { - type: "doc", - id: "learn/concepts/storage/trees/main", - }, - items: ["learn/concepts/storage/trees/indexed_merkle_tree"], - }, - "learn/concepts/storage/storage_slots", - ], - }, - { - label: "Accounts", - type: "category", - link: { - type: "doc", - id: "learn/concepts/accounts/main", - }, - items: [ - "learn/concepts/accounts/keys", - "learn/concepts/accounts/authwit", - ], - }, - "learn/concepts/transactions", - { - label: "Smart Contracts", - type: "category", - link: { - type: "doc", - id: "learn/concepts/smart_contracts/main", - }, - items: ["learn/concepts/smart_contracts/contract_creation"], - }, - { - label: "Communication", - type: "category", - link: { - type: "doc", - id: "learn/concepts/communication/main", - }, - items: [ - "learn/concepts/communication/public_private_calls", - "learn/concepts/communication/cross_chain_calls", - ], - }, - { - label: "Private Execution Environment (PXE)", - type: "category", - link: { - type: "doc", - id: "learn/concepts/pxe/main", - }, - items: ["learn/concepts/pxe/acir_simulator"], - }, - { - label: "Circuits", - type: "category", - link: { - type: "doc", - id: "learn/concepts/circuits/main", - }, - items: [ - { - label: "Kernel Circuits", - type: "category", - items: [ - "learn/concepts/circuits/kernels/private_kernel", - "learn/concepts/circuits/kernels/public_kernel", - ], - }, - "learn/concepts/circuits/rollup_circuits/main", - ], - }, - { - label: "Nodes and Clients", - type: "category", - items: [ - { - label: "Sequencer", - link: { - type: "doc", - id: "learn/concepts/nodes_clients/sequencer/main", - }, - type: "category", - items: [ - "learn/concepts/nodes_clients/sequencer/sequencer_selection", - ], - }, - ], - }, - ], - }, - - // DEVELOPER DOCUMENTATION - - { - type: "html", - className: "sidebar-title", - value: "BUILD", - defaultStyle: true, - }, - - { - label: "Getting Started", - type: "category", - link: { - type: "doc", - id: "developers/getting_started/main", - }, - items: [ - "developers/getting_started/quickstart", - "developers/getting_started/aztecjs-getting-started", - "developers/getting_started/aztecnr-getting-started", - ], - }, - - { - label: "Tutorials", - type: "category", - link: { - type: "doc", - id: "developers/tutorials/main", - }, - items: [ - "developers/tutorials/writing_private_voting_contract", - "developers/tutorials/writing_token_contract", - "developers/tutorials/crowdfunding/donations", - - { - label: "Writing a DApp", - type: "category", - link: { - type: "doc", - id: "developers/tutorials/writing_dapp/main", - }, - items: [ - "developers/tutorials/writing_dapp/project_setup", - "developers/tutorials/writing_dapp/pxe_service", - "developers/tutorials/writing_dapp/contract_deployment", - "developers/tutorials/writing_dapp/contract_interaction", - "developers/tutorials/writing_dapp/testing", - ], - }, - { - label: "Build a Token Bridge", - type: "category", - link: { - type: "doc", - id: "developers/tutorials/token_portal/main", - }, - items: [ - "developers/tutorials/token_portal/setup", - "developers/tutorials/token_portal/depositing_to_aztec", - "developers/tutorials/token_portal/minting_on_aztec", - "developers/tutorials/token_portal/withdrawing_to_l1", - "developers/tutorials/token_portal/typescript_glue_code", - ], - }, - // { // temporarily removing as it is very very messy with monorepo references. we need to write new ts for this - // label: "Swap on L1 Uniswap from L2 with Portals", - // type: "category", - // link: { - // type: "doc", - // id: "developers/tutorials/uniswap/main", - // }, - // items: [ - // "developers/tutorials/uniswap/setup", - // "developers/tutorials/uniswap/l1_portal", - // "developers/tutorials/uniswap/l2_contract_setup", - // "developers/tutorials/uniswap/swap_publicly", - // "developers/tutorials/uniswap/execute_public_swap_on_l1", - // "developers/tutorials/uniswap/swap_privately", - // "developers/tutorials/uniswap/execute_private_swap_on_l1", - // "developers/tutorials/uniswap/redeeming_swapped_assets_on_l2", - // "developers/tutorials/uniswap/typescript_glue_code", - // ], - // }, - "developers/tutorials/testing", - ], - }, - - { - label: "Aztec Sandbox and CLI", - type: "category", - link: { - type: "doc", - id: "developers/sandbox/main", - }, - items: [ - { - label: "Guides", - type: "category", - items: [ - "developers/sandbox/guides/run_more_than_one_pxe_sandbox", - "developers/wallets/creating_schnorr_accounts", - ], - }, - { - label: "References", - type: "category", - items: [ - "developers/sandbox/references/sandbox-reference", - "developers/sandbox/references/cheat_codes", - { - label: "PXE Reference", - type: "doc", - id: "apis/pxe/interfaces/PXE", - }, - ], - }, - ], - }, - { - label: "Smart Contracts", - type: "category", - link: { - type: "doc", - id: "developers/contracts/main", - }, - items: [ - "developers/contracts/setup", - { - label: "Writing Contracts", - type: "category", - items: [ - "developers/contracts/writing_contracts/layout", - "developers/contracts/writing_contracts/example_contract", - { - label: "Functions and Initializers", - type: "category", - link: { - type: "doc", - id: "developers/contracts/writing_contracts/functions/main", - }, - items: [ - "developers/contracts/writing_contracts/functions/context", - "developers/contracts/writing_contracts/functions/public_private_unconstrained", - "developers/contracts/writing_contracts/functions/visibility", - "developers/contracts/writing_contracts/functions/call_functions", - "developers/contracts/writing_contracts/functions/initializers", - "developers/contracts/writing_contracts/functions/compute_note_hash_and_nullifier", - "developers/contracts/writing_contracts/functions/inner_workings", - ], - }, - { - label: "Storage", - type: "category", - link: { - type: "doc", - id: "developers/contracts/writing_contracts/storage/main", - }, - items: [ - "developers/contracts/writing_contracts/storage/define_storage", - "developers/contracts/writing_contracts/storage/notes", - "developers/contracts/writing_contracts/storage/storage_slots", - ], - }, - { - label: "Accounts and Account Contracts", - type: "category", - items: [ - "developers/contracts/writing_contracts/accounts/write_accounts_contract", - ], - }, - { - label: "Events", - type: "category", - items: [ - "developers/contracts/writing_contracts/events/emit_event", - ], - }, - { - label: "Oracles", - type: "category", - link: { - type: "doc", - id: "developers/contracts/writing_contracts/oracles/main", - }, - items: [ - "developers/contracts/writing_contracts/oracles/inbuilt_oracles", - "developers/contracts/writing_contracts/oracles/pop_capsule", - ], - }, - { - label: "Portals", - type: "category", - link: { - type: "doc", - id: "developers/contracts/writing_contracts/portals/portals", - }, - items: [ - "developers/contracts/writing_contracts/portals/deploy_with_portal", - "developers/contracts/writing_contracts/portals/communicate_with_portal", - ], - }, - { - label: "Historical Data", - type: "category", - items: [ - "developers/contracts/writing_contracts/historical_data/archive_tree/how_to_prove_history", - ], - }, - ], - }, - { - label: "Compiling Contracts", - type: "category", - items: [ - "developers/contracts/compiling_contracts/how_to_compile_contract", - "developers/contracts/compiling_contracts/artifacts", - ], - }, - { - label: "Deploying Contracts", - type: "category", - items: [ - "developers/contracts/deploying_contracts/how_to_deploy_contract", - ], - }, - "developers/contracts/testing_contracts/main", - { - label: "References", - type: "category", - items: [ - "developers/contracts/references/globals", - { - label: "Storage Reference", - type: "category", - link: { - type: "doc", - id: "developers/contracts/references/storage/main", - }, - items: [ - "developers/contracts/references/storage/private_state", - "developers/contracts/references/storage/public_state", - "developers/contracts/references/storage/shared_state", - ], - }, - { - label: "Portals Reference", - type: "category", - items: [ - "developers/contracts/references/portals/data_structures", - "developers/contracts/references/portals/inbox", - "developers/contracts/references/portals/outbox", - "developers/contracts/references/portals/registry", - ], - }, - { - label: "Aztec.nr Reference", - type: "category", - items: aztecNRSidebar, - }, - "developers/contracts/references/history_lib_reference", - ], - }, - { - label: "Resources", - type: "category", - items: [ - "developers/contracts/resources/dependencies", - //"developers/contracts/resources/style_guide", - { - label: "Common Patterns", - type: "category", - link: { - type: "doc", - id: "developers/contracts/resources/common_patterns/main", - }, - items: [ - "developers/contracts/resources/common_patterns/authwit", - // "developers/contracts/resources/common_patterns/sending_tokens_to_user", - // "developers/contracts/resources/common_patterns/sending_tokens_to_contract", - // "developers/contracts/resources/common_patterns/access_control", - // "developers/contracts/resources/common_patterns/interacting_with_l1", - ], - }, - ], - }, - // { - // label: "Security Considerations", - // type: "category", - // items: [ - // { - // label: "Breaking changes", - // type: "category", - // link: { - // type: "doc", - // id: "developers/contracts/security/breaking_changes/main", - // }, - // items: ["developers/contracts/security/breaking_changes/v0"], - // }, - // ], - // }, - ], - }, - - { - label: "Aztec.js", - type: "category", - link: { - type: "doc", - id: "developers/aztecjs/main", - }, - items: [ - { - label: "Guides", - type: "category", - items: [ - "developers/aztecjs/guides/create_account", - "developers/aztecjs/guides/deploy_contract", - "developers/aztecjs/guides/send_transaction", - "developers/aztecjs/guides/call_view_function", - ], - }, - { - label: "References", - type: "category", - items: [ - { - label: "Aztec.js", - type: "category", - items: [{ dirName: "apis/aztec-js", type: "autogenerated" }], - }, - { - label: "Accounts", - type: "category", - items: [{ dirName: "apis/accounts", type: "autogenerated" }], - }, - ], - }, - ], - }, - { - label: "Debugging", - type: "category", - link: { - type: "doc", - id: "developers/debugging/main", - }, - items: [ - "developers/debugging/aztecnr-errors", - "developers/debugging/sandbox-errors", - ], - }, - { - label: "Versions and Updating", - type: "doc", - id: "developers/versions-updating", - }, - { - label: "Wallets", - type: "category", - link: { - type: "doc", - id: "developers/wallets/main", - }, - items: ["developers/wallets/architecture"], - }, - - /* { - label: "Security Considerations", - type: "category", - items: [], - },*/ - "developers/privacy/main", - "developers/limitations/main", - - { - type: "html", - value: '', - }, - - // MISCELLANEOUS - - { - type: "html", - className: "sidebar-title", - value: "MISCELLANEOUS", - defaultStyle: true, - }, - "misc/migration_notes", - { - label: "Glossary", - type: "category", - link: { - type: "doc", - id: "misc/glossary/main", - }, - items: ["misc/glossary/call_types"], - }, - { - label: "Roadmap", - type: "category", - link: { - type: "doc", - id: "misc/roadmap/main", - }, - items: [ - "misc/roadmap/features_initial_ldt", - "misc/roadmap/cryptography_roadmap", - ], - }, - "misc/how_to_contribute", - - { - type: "html", - value: '', - }, - - "misc/aztec_connect_sunset", - ], protocolSpecSidebar: [ "protocol-specs/intro", diff --git a/docs/src/components/Disclaimers/_wip_disclaimer.mdx b/docs/src/components/Disclaimers/_wip_disclaimer.mdx index 12d716ed63c..8d1d33f4405 100644 --- a/docs/src/components/Disclaimers/_wip_disclaimer.mdx +++ b/docs/src/components/Disclaimers/_wip_disclaimer.mdx @@ -5,7 +5,7 @@ :::caution Disclaimer We are building Aztec as transparently as we can. The documents published here are living documents. The protocol, sandbox, language, and tools are all subject to change over time. -Please see [here](/aztec/aztec/what_is_aztec/limitations) for details of known Aztec protocol and Aztec Sandbox limitations. +Please see [here](/aztec/aztec/limitations) for details of known Aztec protocol and Aztec Sandbox limitations. If you would like to help us build Aztec: diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index f7ad5cd7120..0cc79a46b28 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -97,4 +97,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +}