diff --git a/docs/docs/.gitignore b/docs/docs/.gitignore deleted file mode 100644 index 6fa7731468dd..000000000000 --- a/docs/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/apis diff --git a/docs/docs/aztec/concepts/index.md b/docs/docs/aztec/concepts/index.md index 566b50dee3f4..88bbd6efa57b 100644 --- a/docs/docs/aztec/concepts/index.md +++ b/docs/docs/aztec/concepts/index.md @@ -29,7 +29,7 @@ Private state works with UTXOs, or what we call notes. To keep things private, e Public state works similarly to other chains like Ethereum, behaving like a public ledger. Public data is stored in a [public data tree](/aztec/concepts/storage/trees/index.md#public-state-tree). -Aztec [smart contract](/aztec/aztec/concepts/smart_contracts/index.md) developers should keep in mind that different types are used when manipulating private or public state. Working with private state is creating commitments and nullifiers to state, whereas working with public state is directly updating state. +Aztec [smart contract](/aztec/concepts/smart_contracts/index.md) developers should keep in mind that different types are used when manipulating private or public state. Working with private state is creating commitments and nullifiers to state, whereas working with public state is directly updating state. ## Accounts @@ -70,14 +70,4 @@ Explore the Concepts for a deeper understanding into the components that make up ### Start coding -<<<<<<< HEAD -<<<<<<< HEAD:docs/docs/aztec/aztec/concepts/index.md -Follow the [developer getting started guide](/getting_started/getting_started). -======= Follow the [developer getting started guide](/getting_started). - ->>>>>>> fd81464071 (removing nested folders):docs/docs/aztec/concepts/index.md -======= -Follow the [developer getting started guide](/getting_started). - ->>>>>>> 02be02cbcb (fixing conflicts) diff --git a/docs/docs/aztec/concepts/smart_contracts/functions/context.md b/docs/docs/aztec/concepts/smart_contracts/functions/context.md index c313a37bbb39..5bd2f4526b37 100644 --- a/docs/docs/aztec/concepts/smart_contracts/functions/context.md +++ b/docs/docs/aztec/concepts/smart_contracts/functions/context.md @@ -126,11 +126,7 @@ The public call stack contains all of the external function calls that are creat ### New L2 to L1 msgs -<<<<<<< HEAD:docs/docs/aztec/aztec/concepts/smart_contracts/functions/context.md New L2 to L1 messages contains messages that are delivered to the [l1 outbox](/protocol-specs/l1-smart-contracts/index.md) on the execution of each rollup. -======= -New L2 to L1 messages contains messages that are delivered to the [l1 outbox](/aztec/concepts/smart_contracts/communication/cross_chain_calls) on the execution of each rollup. ->>>>>>> fd81464071 (removing nested folders):docs/docs/aztec/concepts/smart_contracts/functions/context.md ## Public Context diff --git a/docs/docs/aztec/core_components.md b/docs/docs/aztec/core_components.md index ac96656eab10..422e2ce90369 100644 --- a/docs/docs/aztec/core_components.md +++ b/docs/docs/aztec/core_components.md @@ -39,11 +39,7 @@ A user of the Aztec network will interact with the network through Aztec.js. Azt ### Private Execution Environment -<<<<<<< HEAD:docs/docs/aztec/aztec/core_components.md -The PXE provides a secure environment for the execution of sensitive operations, ensuring private information and decrypted data are not accessible to unauthorized applications. It hides the details of the [state model](/aztec/aztec/concepts/state_model/index.md) from end users, but the state model is important for Aztec developers to understand as it has implications for [private/public execution](/aztec/aztec/concepts/smart_contracts/communication/public_private_calls.md) and [L1/L2 communication](../../protocol-specs/l1-smart-contracts/index.md). The PXE also includes the [ACIR Simulator](/aztec/aztec/concepts/pxe/acir_simulator.md) for private executions and the KeyStore for secure key management. -======= The PXE provides a secure environment for the execution of sensitive operations, ensuring private information and decrypted data are not accessible to unauthorized applications. It hides the details of the [state model](/aztec/concepts/state_model/index.md) from end users, but the state model is important for Aztec developers to understand as it has implications for [private/public execution](/aztec/concepts/smart_contracts/communication/public_private_calls.md) and [L1/L2 communication](/aztec/concepts/smart_contracts/communication/cross_chain_calls). The PXE also includes the [ACIR Simulator](/aztec/concepts/pxe/acir_simulator.md) for private executions and the KeyStore for secure key management. ->>>>>>> fd81464071 (removing nested folders):docs/docs/aztec/core_components.md Procedurally, the PXE sends results of private function execution and requests for public function executions to the [sequencer](/aztec/concepts/nodes_clients/sequencer), which will update the state of the rollup. diff --git a/docs/docs/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md b/docs/docs/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md index 3c6e756ba1ab..a62981bc9153 100644 --- a/docs/docs/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md +++ b/docs/docs/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md @@ -2,11 +2,7 @@ title: Communicating with L1 --- -<<<<<<< HEAD:docs/docs/guides/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md -Is this your first time hearing the word `Portal`? Check out the [concepts section](../../../../../protocol-specs/l1-smart-contracts/index.md). -======= Is this your first time hearing the word `Portal`? Check out the [concepts section](/aztec/concepts/smart_contracts/communication/cross_chain_calls). ->>>>>>> fd81464071 (removing nested folders):docs/docs/guides/smart_contracts/writing_contracts/portals/communicate_with_portal.md Follow the [token bridge tutorial](/tutorials/contract_tutorials/advanced/token_bridge) for hands-on experience writing and deploying a Portal contract. diff --git a/docs/docs/reference/sandbox_reference/sandbox-reference.md b/docs/docs/reference/sandbox_reference/sandbox-reference.md index 57d559348f27..c02d4a7988c1 100644 --- a/docs/docs/reference/sandbox_reference/sandbox-reference.md +++ b/docs/docs/reference/sandbox_reference/sandbox-reference.md @@ -62,11 +62,7 @@ In the terminal, you will see some logs: ## Manual Install -You can manually install the sandbox via the underlying script used in the [Aztec Boxes](/getting_started.md#run-the-npx-script). ->>>>>>> fd81464071 (removing nested folders):docs/docs/reference/sandbox_reference/sandbox-reference.md -======= You can manually install the sandbox via the underlying script used in the [Aztec Boxes](getting_started.md#run-the-npx-script). ->>>>>>> 02be02cbcb (fixing conflicts) ### Prerequisites diff --git a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/avm_context.md b/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/avm_context.md deleted file mode 100644 index 76769ce65cec..000000000000 --- a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/avm_context.md +++ /dev/null @@ -1,749 +0,0 @@ -# AvmContext - -## Fields -| Field | Type | -| --- | --- | -| inputs | AvmContextInputs | - -## Methods - -### new - -```rust -AvmContext::new(inputs); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| inputs | AvmContextInputs | - -### storage_address - -```rust -AvmContext::storage_address(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### fee_per_l2_gas - -```rust -AvmContext::fee_per_l2_gas(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### fee_per_da_gas - -```rust -AvmContext::fee_per_da_gas(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### emit_unencrypted_log_with_selector - -```rust -AvmContext::emit_unencrypted_log_with_selector(&mut self, event_selector, log); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| event_selector | Field | -| log | T | - -### note_hash_exists - -```rust -AvmContext::note_hash_exists(self, note_hash, leaf_index); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| note_hash | Field | -| leaf_index | Field | - -### l1_to_l2_msg_exists - -```rust -AvmContext::l1_to_l2_msg_exists(self, msg_hash, msg_leaf_index); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| msg_hash | Field | -| msg_leaf_index | Field | - -## Standalone Functions - -### block_number - -```rust -block_number(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### timestamp - -```rust -timestamp(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### coinbase - -```rust -coinbase(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### fee_recipient - -```rust -fee_recipient(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### transaction_fee - -```rust -transaction_fee(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### nullifier_exists - -```rust -nullifier_exists(self, unsiloed_nullifier, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| unsiloed_nullifier | Field | -| address | AztecAddress | - -### emit_unencrypted_log - -```rust -emit_unencrypted_log(&mut self, log); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| log | T | - -### consume_l1_to_l2_message - -```rust -consume_l1_to_l2_message(&mut self, content, secret, sender, leaf_index); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| content | Field | -| secret | Field | -| sender | EthAddress | -| leaf_index | Field | - -### message_portal - -```rust -message_portal(&mut self, recipient, content); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| recipient | EthAddress | -| content | Field | - -### call_public_function - -```rust -call_public_function(self, contract_address, function_selector, args, gas_opts); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field] | -| gas_opts | GasOpts | - -### static_call_public_function - -```rust -static_call_public_function(self, contract_address, function_selector, args, gas_opts); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field] | -| gas_opts | GasOpts | - -### delegate_call_public_function - -```rust -delegate_call_public_function(self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field] | - -### push_new_note_hash - -```rust -push_new_note_hash(&mut self, note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| note_hash | Field | - -### push_new_nullifier - -```rust -push_new_nullifier(&mut self, nullifier, _nullified_commitment); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| nullifier | Field | -| _nullified_commitment | Field | - -### msg_sender - -```rust -msg_sender(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### this_address - -```rust -this_address(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### chain_id - -```rust -chain_id(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### version - -```rust -version(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### selector - -```rust -selector(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### get_args_hash - -```rust -get_args_hash(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### empty - -```rust -empty(); -``` - -Takes no parameters. - -### gas_for_call - -```rust -gas_for_call(user_gas); -``` - -Helper functions - -#### Parameters -| Name | Type | -| --- | --- | -| user_gas | GasOpts | - -### address - -```rust -address(); -``` - -<<<<<<< HEAD -======= -TODO(https://github.com/AztecProtocol/aztec-packages/issues/6420): reconsider. - ->>>>>>> fd81464071 (removing nested folders) -Takes no parameters. - -### sender - -```rust -sender(); -``` - -Takes no parameters. - -### portal - -```rust -portal(); -``` - -Takes no parameters. - -### transaction_fee - -```rust -transaction_fee(); -``` - -Takes no parameters. - -### chain_id - -```rust -chain_id(); -``` - -Takes no parameters. - -### version - -```rust -version(); -``` - -Takes no parameters. - -### block_number - -```rust -block_number(); -``` - -Takes no parameters. - -### timestamp - -```rust -timestamp(); -``` - -Takes no parameters. - -### l2_gas_left - -```rust -l2_gas_left(); -``` - -Takes no parameters. - -### da_gas_left - -```rust -da_gas_left(); -``` - -Takes no parameters. - -### emit_note_hash - -```rust -emit_note_hash(note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| note_hash | Field | - -### nullifier_exists - -```rust -nullifier_exists(nullifier, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| nullifier | Field | -| address | Field | - -### emit_nullifier - -```rust -emit_nullifier(nullifier); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| nullifier | Field | - -### emit_unencrypted_log - -```rust -emit_unencrypted_log(event_selector, message); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| event_selector | Field | -| message | T | - -### send_l2_to_l1_msg - -```rust -send_l2_to_l1_msg(recipient, content); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| recipient | EthAddress | -| content | Field | - -### call - -```rust -call(gas, address, args, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| gas | [Field; 2] | -| address | AztecAddress | -| args | [Field] | -| function_selector | Field | - -### call_static - -```rust -call_static(gas, address, args, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| gas | [Field; 2] | -| address | AztecAddress | -| args | [Field] | -| function_selector | Field | - -### address_opcode - -```rust -address_opcode(); -``` - -Takes no parameters. - -### storage_address_opcode - -```rust -storage_address_opcode(); -``` - -Takes no parameters. - -### sender_opcode - -```rust -sender_opcode(); -``` - -Takes no parameters. - -### portal_opcode - -```rust -portal_opcode(); -``` - -Takes no parameters. - -### fee_per_l2_gas_opcode - -```rust -fee_per_l2_gas_opcode(); -``` - -Takes no parameters. - -### fee_per_da_gas_opcode - -```rust -fee_per_da_gas_opcode(); -``` - -Takes no parameters. - -### transaction_fee_opcode - -```rust -transaction_fee_opcode(); -``` - -Takes no parameters. - -### chain_id_opcode - -```rust -chain_id_opcode(); -``` - -Takes no parameters. - -### version_opcode - -```rust -version_opcode(); -``` - -Takes no parameters. - -### block_number_opcode - -```rust -block_number_opcode(); -``` - -Takes no parameters. - -### timestamp_opcode - -```rust -timestamp_opcode(); -``` - -Takes no parameters. - -### l2_gas_left_opcode - -```rust -l2_gas_left_opcode(); -``` - -Takes no parameters. - -### da_gas_left_opcode - -```rust -da_gas_left_opcode(); -``` - -Takes no parameters. - -### note_hash_exists_opcode - -```rust -note_hash_exists_opcode(note_hash, leaf_index); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| note_hash | Field | -| leaf_index | Field | - -### emit_note_hash_opcode - -```rust -emit_note_hash_opcode(note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| note_hash | Field | - -### nullifier_exists_opcode - -```rust -nullifier_exists_opcode(nullifier, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| nullifier | Field | -| address | Field | - -### emit_nullifier_opcode - -```rust -emit_nullifier_opcode(nullifier); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| nullifier | Field | - -### emit_unencrypted_log_opcode - -```rust -emit_unencrypted_log_opcode(event_selector, message); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| event_selector | Field | -| message | T | - -### l1_to_l2_msg_exists_opcode - -```rust -l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| msg_hash | Field | -| msg_leaf_index | Field | - -### send_l2_to_l1_msg_opcode - -```rust -send_l2_to_l1_msg_opcode(recipient, content); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| recipient | EthAddress | -| content | Field | - -### call_opcode - -```rust -call_opcode(gas, // gas allocation, da_gas] - address, args, // TODO(5110); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| gas | [Field; 2] | -| // gas allocation | [l2_gas | -| da_gas] - address | AztecAddress | -| args | [Field] | -| // TODO(5110 | | - -### call_static_opcode - -```rust -call_static_opcode(gas, // gas allocation, da_gas] - address, args, // TODO(5110); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| gas | [Field; 2] | -| // gas allocation | [l2_gas | -| da_gas] - address | AztecAddress | -| args | [Field] | -| // TODO(5110 | | - diff --git a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md b/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md deleted file mode 100644 index 4bdd0cecae10..000000000000 --- a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/private_context.md +++ /dev/null @@ -1,741 +0,0 @@ -# PrivateContext - -When finished, one can call .finish() to convert back to the abi - -## Fields -| Field | Type | -| --- | --- | -| 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 | -| note_hash_read_requests | BoundedVec<ReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL> | -| nullifier_read_requests | BoundedVec<ReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_CALL> | -| nullifier_key_validation_requests | BoundedVec<NullifierKeyValidationRequest, MAX_NULLIFIER_KEY_VALIDATION_REQUESTS_PER_CALL> | -| new_note_hashes | BoundedVec<NoteHash, MAX_NEW_NOTE_HASHES_PER_CALL> | -| new_nullifiers | BoundedVec<Nullifier, MAX_NEW_NULLIFIERS_PER_CALL> | -| private_call_stack_hashes | BoundedVec<Field, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL> | -| public_call_stack_hashes | BoundedVec<Field, MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL> | -| public_teardown_function_hash | Field | -| new_l2_to_l1_msgs | BoundedVec<L2ToL1Message, MAX_NEW_L2_TO_L1_MSGS_PER_CALL> | -| historical_header | Header | -<<<<<<< HEAD -| note_encrypted_logs_hashes | BoundedVec<NoteLogHash, MAX_NOTE_ENCRYPTED_LOGS_PER_CALL> | -| encrypted_logs_hashes | BoundedVec<LogHash, MAX_ENCRYPTED_LOGS_PER_CALL> | -| unencrypted_logs_hashes | BoundedVec<LogHash, MAX_UNENCRYPTED_LOGS_PER_CALL> | -| encrypted_log_preimages_length | Field | -| unencrypted_log_preimages_length | Field | -| last_nullifier_key_validation_request | Option<NullifierKeyValidationRequest> | -======= -| encrypted_logs_hashes | BoundedVec<SideEffect, MAX_ENCRYPTED_LOGS_PER_CALL> | -| unencrypted_logs_hashes | BoundedVec<SideEffect, MAX_UNENCRYPTED_LOGS_PER_CALL> | -| encrypted_log_preimages_length | Field | -| unencrypted_log_preimages_length | Field | -| nullifier_key | Option<NullifierKeys> | ->>>>>>> fd81464071 (removing nested folders) - -## Methods - -### new - -```rust -PrivateContext::new(inputs, args_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| inputs | PrivateContextInputs | -| args_hash | Field | - -### get_header - -Returns the header of a block whose state is used during private execution (not the block the transaction is included in). - -```rust -PrivateContext::get_header(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### get_header_at - -Returns the header of an arbitrary block whose block number is less than or equal to the block number of historical header. - -```rust -PrivateContext::get_header_at(self, block_number); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| block_number | u32 | - -### set_return_hash - -```rust -PrivateContext::set_return_hash(&mut self, returns_hasher); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| returns_hasher | ArgsHasher | - -### finish - -```rust -PrivateContext::finish(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### set_as_fee_payer - -```rust -PrivateContext::set_as_fee_payer(&mut self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | - -### end_setup - -```rust -PrivateContext::end_setup(&mut self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | - -### set_tx_max_block_number - -```rust -PrivateContext::set_tx_max_block_number(&mut self, max_block_number); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| max_block_number | u32 | - -### push_note_hash_read_request - -```rust -PrivateContext::push_note_hash_read_request(&mut self, note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| note_hash | Field | - -### push_nullifier_read_request - -```rust -PrivateContext::push_nullifier_read_request(&mut self, nullifier); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| nullifier | Field | - -### request_nsk_app - -```rust -PrivateContext::request_nsk_app(&mut self, npk_m_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| npk_m_hash | Field | - -### message_portal - -```rust -PrivateContext::message_portal(&mut self, recipient, content); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| recipient | EthAddress | -| content | Field | - -### consume_l1_to_l2_message - -```rust -PrivateContext::consume_l1_to_l2_message(&mut self, content, secret, sender); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| content | Field | -| secret | Field | -| sender | EthAddress | - -### emit_unencrypted_log - -TODO: We might want to remove this since emitting unencrypted logs from private functions is violating privacy. --> might be a better approach to force devs to make a public function call that emits the log if needed then it would be less easy to accidentally leak information. If we decide to keep this function around would make sense to wait for traits and then merge it with emit_unencrypted_log. - -```rust -PrivateContext::emit_unencrypted_log(&mut self, log); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| log | T | - -### emit_contract_class_unencrypted_log - -This fn exists separately from emit_unencrypted_log because sha hashing the preimage is too large to compile (16,200 fields, 518,400 bytes) => the oracle hashes it It is ONLY used with contract_class_registerer_contract since we already assert correctness: - Contract class -> we will commit to the packed bytecode (currently a TODO) - Private function -> we provide a membership proof - Unconstrained function -> we provide a membership proof Ordinary logs are not protected by the above so this fn shouldn't be called by anything else - -```rust -PrivateContext::emit_contract_class_unencrypted_log(&mut self, log); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| log | [Field; N] | - -### emit_encrypted_log - -<<<<<<< HEAD -TODO(1139): Convert to generic input once we encrypt inside the circuit - -======= ->>>>>>> fd81464071 (removing nested folders) -```rust -PrivateContext::emit_encrypted_log(&mut self, contract_address, storage_slot, note_type_id, ivpk_m, preimage); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| storage_slot | Field | -| note_type_id | Field | -| ivpk_m | GrumpkinPoint | -| preimage | [Field; N] | - -<<<<<<< HEAD -### emit_note_encrypted_log - -```rust -PrivateContext::emit_note_encrypted_log(&mut self, contract_address, storage_slot, note_type_id, encryption_pub_key, note); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| storage_slot | Field | -| note_type_id | Field | -| encryption_pub_key | GrumpkinPoint | -| note | Note | - -======= ->>>>>>> fd81464071 (removing nested folders) -### call_private_function - -```rust -PrivateContext::call_private_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### static_call_private_function - -```rust -PrivateContext::static_call_private_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### delegate_call_private_function - -```rust -PrivateContext::delegate_call_private_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### call_private_function_no_args - -```rust -PrivateContext::call_private_function_no_args(&mut self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### static_call_private_function_no_args - -```rust -PrivateContext::static_call_private_function_no_args(&mut self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### delegate_call_private_function_no_args - -```rust -PrivateContext::delegate_call_private_function_no_args(&mut self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### call_private_function_with_packed_args - -```rust -PrivateContext::call_private_function_with_packed_args(&mut self, contract_address, function_selector, args_hash, is_static_call, is_delegate_call); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args_hash | Field | -| is_static_call | bool | -| is_delegate_call | bool | - -### call_public_function - -```rust -PrivateContext::call_public_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### static_call_public_function - -```rust -PrivateContext::static_call_public_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### delegate_call_public_function - -```rust -PrivateContext::delegate_call_public_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### call_public_function_no_args - -```rust -PrivateContext::call_public_function_no_args(&mut self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### static_call_public_function_no_args - -```rust -PrivateContext::static_call_public_function_no_args(&mut self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### delegate_call_public_function_no_args - -```rust -PrivateContext::delegate_call_public_function_no_args(&mut self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### call_public_function_with_packed_args - -```rust -PrivateContext::call_public_function_with_packed_args(&mut self, contract_address, function_selector, args_hash, is_static_call, is_delegate_call); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args_hash | Field | -| is_static_call | bool | -| is_delegate_call | bool | - -### set_public_teardown_function - -```rust -PrivateContext::set_public_teardown_function(&mut self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field; ARGS_COUNT] | - -### set_public_teardown_function_with_packed_args - -```rust -PrivateContext::set_public_teardown_function_with_packed_args(&mut self, contract_address, function_selector, args_hash, is_static_call, is_delegate_call); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args_hash | Field | -| is_static_call | bool | -| is_delegate_call | bool | - -### validate_call_stack_item_from_oracle - -```rust -PrivateContext::validate_call_stack_item_from_oracle(self, item, contract_address, function_selector, args_hash, is_static_call, is_delegate_call); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| item | PublicCallStackItem | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args_hash | Field | -| is_static_call | bool | -| is_delegate_call | bool | - -### next_counter - -```rust -PrivateContext::next_counter(&mut self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | - -# PackedReturns - -## Fields -| Field | Type | -| --- | --- | -| packed_returns | Field | - -## Methods - -### new - -```rust -PackedReturns::new(packed_returns); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| packed_returns | Field | - -### assert_empty - -```rust -PackedReturns::assert_empty(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### raw - -```rust -PackedReturns::raw(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### unpack - -```rust -PackedReturns::unpack(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### unpack_into - -```rust -PackedReturns::unpack_into(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -## Standalone Functions - -### msg_sender - -```rust -msg_sender(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### this_address - -```rust -this_address(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### chain_id - -```rust -chain_id(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### version - -```rust -version(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### selector - -```rust -selector(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### get_args_hash - -```rust -get_args_hash(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### push_new_note_hash - -```rust -push_new_note_hash(&mut self, note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| note_hash | Field | - -### push_new_nullifier - -```rust -push_new_nullifier(&mut self, nullifier, nullified_note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| nullifier | Field | -| nullified_note_hash | Field | - -### empty - -```rust -empty(); -``` - -Takes no parameters. - -### emit_unencrypted_log_oracle_private - -```rust -emit_unencrypted_log_oracle_private(_contract_address, _event_selector, _message, _counter); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| _contract_address | AztecAddress | -| _event_selector | Field | -| _message | T | -| _counter | u32 | - -### emit_unencrypted_log_private_internal - -```rust -emit_unencrypted_log_private_internal(contract_address, event_selector, message, counter); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| contract_address | AztecAddress | -| event_selector | Field | -| message | T | -| counter | u32 | - -### emit_contract_class_unencrypted_log_private - -```rust -emit_contract_class_unencrypted_log_private(contract_address, event_selector, message, counter); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| contract_address | AztecAddress | -| event_selector | Field | -| message | [Field; N] | -| counter | u32 | - -### emit_contract_class_unencrypted_log_private_internal - -```rust -emit_contract_class_unencrypted_log_private_internal(contract_address, event_selector, message, counter); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| contract_address | AztecAddress | -| event_selector | Field | -| message | [Field; N] | -| counter | u32 | - diff --git a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/public_context.md b/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/public_context.md deleted file mode 100644 index ea88536ea935..000000000000 --- a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/context/public_context.md +++ /dev/null @@ -1,492 +0,0 @@ -# PublicContext - -## Fields -| Field | Type | -| --- | --- | -| inputs | PublicContextInputs | -| side_effect_counter | u32 | -| args_hash | Field | -| return_hash | Field | -| nullifier_read_requests | BoundedVec<ReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_CALL> | -| nullifier_non_existent_read_requests | BoundedVec<ReadRequest, MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL> | -| contract_storage_update_requests | BoundedVec<StorageUpdateRequest, MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL> | -| contract_storage_reads | BoundedVec<StorageRead, MAX_PUBLIC_DATA_READS_PER_CALL> | -| public_call_stack_hashes | BoundedVec<Field, MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL> | -| new_note_hashes | BoundedVec<NoteHash, MAX_NEW_NOTE_HASHES_PER_CALL> | -| new_nullifiers | BoundedVec<Nullifier, MAX_NEW_NULLIFIERS_PER_CALL> | -| new_l2_to_l1_msgs | BoundedVec<L2ToL1Message, MAX_NEW_L2_TO_L1_MSGS_PER_CALL> | -<<<<<<< HEAD -| unencrypted_logs_hashes | BoundedVec<LogHash, MAX_UNENCRYPTED_LOGS_PER_CALL> | -======= -| unencrypted_logs_hashes | BoundedVec<SideEffect, MAX_UNENCRYPTED_LOGS_PER_CALL> | ->>>>>>> fd81464071 (removing nested folders) -| unencrypted_log_preimages_length | Field | -| historical_header | Header | -| prover_address | AztecAddress | - -## Methods - -### new - -```rust -PublicContext::new(inputs, args_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| inputs | PublicContextInputs | -| args_hash | Field | - -### call_public_function_no_args - -```rust -PublicContext::call_public_function_no_args(self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### static_call_public_function_no_args - -```rust -PublicContext::static_call_public_function_no_args(self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### delegate_call_public_function_no_args - -```rust -PublicContext::delegate_call_public_function_no_args(self, contract_address, function_selector); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | - -### call_public_function_with_packed_args - -```rust -PublicContext::call_public_function_with_packed_args(self, contract_address, function_selector, args_hash, is_static_call, is_delegate_call); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args_hash | Field | -| is_static_call | bool | -| is_delegate_call | bool | - -### set_return_hash - -```rust -PublicContext::set_return_hash(&mut self, returns_hasher); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| returns_hasher | ArgsHasher | - -### push_nullifier_read_request - -Keep private or ask the AVM team if you want to change it. - -```rust -PublicContext::push_nullifier_read_request(&mut self, nullifier); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| nullifier | Field | - -### push_nullifier_non_existent_read_request - -Keep private or ask the AVM team if you want to change it. - -```rust -PublicContext::push_nullifier_non_existent_read_request(&mut self, nullifier); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| nullifier | Field | - -### finish - -```rust -PublicContext::finish(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### next_counter - -```rust -PublicContext::next_counter(&mut self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | - -## Standalone Functions - -### msg_sender - -```rust -msg_sender(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### this_address - -```rust -this_address(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### chain_id - -```rust -chain_id(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### version - -```rust -version(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### selector - -```rust -selector(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### get_args_hash - -```rust -get_args_hash(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### push_new_note_hash - -```rust -push_new_note_hash(&mut self, note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| note_hash | Field | - -### push_new_nullifier - -```rust -push_new_nullifier(&mut self, nullifier, _nullified_note_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| nullifier | Field | -| _nullified_note_hash | Field | - -### block_number - -```rust -block_number(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### timestamp - -```rust -timestamp(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### coinbase - -```rust -coinbase(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### fee_recipient - -```rust -fee_recipient(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### fee_per_da_gas - -```rust -fee_per_da_gas(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### fee_per_l2_gas - -```rust -fee_per_l2_gas(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### transaction_fee - -```rust -transaction_fee(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### nullifier_exists - -```rust -nullifier_exists(self, unsiloed_nullifier, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| unsiloed_nullifier | Field | -| address | AztecAddress | - -### message_portal - -```rust -message_portal(&mut self, recipient, content); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| recipient | EthAddress | -| content | Field | - -### consume_l1_to_l2_message - -```rust -consume_l1_to_l2_message(&mut self, content, secret, sender, _leaf_index); -``` - -Leaf index is not used in public context, but it is used in the AVMContext which will replace it. - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| content | Field | -| secret | Field | -| sender | EthAddress | -| _leaf_index | Field | - -### emit_unencrypted_log - -```rust -emit_unencrypted_log(&mut self, log); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| &mut self | | -| log | T | - -### call_public_function - -```rust -call_public_function(self, contract_address, function_selector, args, _gas); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field] | -| _gas | GasOpts | - -### static_call_public_function - -```rust -static_call_public_function(self, contract_address, function_selector, args, _gas); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field] | -| _gas | GasOpts | - -### delegate_call_public_function - -```rust -delegate_call_public_function(self, contract_address, function_selector, args); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | &mut Self | -| contract_address | AztecAddress | -| function_selector | FunctionSelector | -| args | [Field] | - -### empty - -```rust -empty(); -``` - -Takes no parameters. - -### nullifier_exists_oracle - -```rust -nullifier_exists_oracle(nullifier); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| nullifier | Field | - -### emit_unencrypted_log_oracle - -```rust -emit_unencrypted_log_oracle(_contract_address, _event_selector, _message, _counter); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| _contract_address | AztecAddress | -| _event_selector | Field | -| _message | T | -| _counter | u32 | - -### assert_empty - -```rust -assert_empty(returns); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| returns | FunctionReturns<0> | - -### raw - -```rust -raw(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - -### deserialize_into - -```rust -deserialize_into(self); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | - diff --git a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/encrypted_logs/outgoing_body.md b/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/encrypted_logs/outgoing_body.md deleted file mode 100644 index 351fbafa84d6..000000000000 --- a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/encrypted_logs/outgoing_body.md +++ /dev/null @@ -1,47 +0,0 @@ -# EncryptedLogOutgoingBody - -## Fields -| Field | Type | -| --- | --- | -| eph_sk | GrumpkinPrivateKey | -| recipient | AztecAddress | -| recipient_ivpk_app | GrumpkinPoint | - -## Methods - -### new - -```rust -EncryptedLogOutgoingBody::new(eph_sk, recipient, recipient_ivpk_app); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| eph_sk | GrumpkinPrivateKey | -| recipient | AztecAddress | -| recipient_ivpk_app | GrumpkinPoint | - -### compute_ciphertext - -```rust -EncryptedLogOutgoingBody::compute_ciphertext(self, ovsk_app, eph_pk); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| self | | -| ovsk_app | GrumpkinPrivateKey | -| eph_pk | GrumpkinPoint | - -## Standalone Functions - -### test_encrypted_log_outgoing_body - -```rust -test_encrypted_log_outgoing_body(); -``` - -Takes no parameters. - diff --git a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/keys/getters.md b/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/keys/getters.md deleted file mode 100644 index ec73ac5f1433..000000000000 --- a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/keys/getters.md +++ /dev/null @@ -1,126 +0,0 @@ -## Standalone Functions - -### get_npk_m - -```rust -get_npk_m(context, address); -``` - -docs:start:key-getters - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| address | AztecAddress | - -### get_npk_m_hash - -```rust -get_npk_m_hash(context, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| address | AztecAddress | - -### get_ivpk_m - -```rust -get_ivpk_m(context, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| address | AztecAddress | - -### get_ovpk_m - -```rust -get_ovpk_m(context, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| address | AztecAddress | - -### get_tpk_m - -```rust -get_tpk_m(context, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| address | AztecAddress | - -### get_master_key - -```rust -get_master_key(context, address, key_index); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| address | AztecAddress | -| key_index | Field | - -### fetch_key_from_registry - -```rust -fetch_key_from_registry(context, key_index, address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| context | &mut PrivateContext | -| key_index | Field | -| address | AztecAddress | - -### fetch_and_constrain_keys - -```rust -fetch_and_constrain_keys(address); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| address | AztecAddress | - -<<<<<<< HEAD -======= -### get_nullifier_keys - -```rust -get_nullifier_keys(npk_m_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| npk_m_hash | Field | - -### get_nsk_app - -```rust -get_nsk_app(npk_m_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| npk_m_hash | Field | - ->>>>>>> fd81464071 (removing nested folders) diff --git a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/oracle/nullifier_keys.md b/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/oracle/nullifier_keys.md deleted file mode 100644 index 41a2beac9ae1..000000000000 --- a/docs/docs/reference/smart_contract_reference/aztec-nr/aztec/oracle/nullifier_keys.md +++ /dev/null @@ -1,92 +0,0 @@ -<<<<<<< HEAD -## Standalone Functions - -### get_nullifier_key_validation_request_oracle - -```rust -get_nullifier_key_validation_request_oracle(_npk_m_hash); -======= -# NullifierKeys - -Nullifier keys pertaining to a specific account - -## Fields -| Field | Type | -| --- | --- | -| master_nullifier_public_key | GrumpkinPoint | -| app_nullifier_secret_key | Field | - -## Standalone Functions - -### empty - -```rust -empty(); -``` - -Takes no parameters. - -### get_nullifier_keys_oracle - -```rust -get_nullifier_keys_oracle(_npk_m_hash); ->>>>>>> fd81464071 (removing nested folders) -``` - -#### Parameters -| Name | Type | -| --- | --- | -| _npk_m_hash | Field | - -<<<<<<< HEAD -### get_nullifier_key_validation_request_internal - -```rust -get_nullifier_key_validation_request_internal(npk_m_hash); -======= -### get_nullifier_keys_internal - -```rust -get_nullifier_keys_internal(npk_m_hash); ->>>>>>> fd81464071 (removing nested folders) -``` - -#### Parameters -| Name | Type | -| --- | --- | -| npk_m_hash | Field | - -<<<<<<< HEAD -### get_nullifier_key_validation_request - -```rust -get_nullifier_key_validation_request(npk_m_hash); -======= -### get_nullifier_keys - -```rust -get_nullifier_keys(npk_m_hash); ->>>>>>> fd81464071 (removing nested folders) -``` - -We get the full struct Nullifier Keys here - -#### Parameters -| Name | Type | -| --- | --- | -| npk_m_hash | Field | - -<<<<<<< HEAD -### get_nsk_app - -```rust -get_nsk_app(npk_m_hash); -``` - -#### Parameters -| Name | Type | -| --- | --- | -| npk_m_hash | Field | - -======= ->>>>>>> fd81464071 (removing nested folders) diff --git a/docs/docs/reference/smart_contract_reference/storage/public_state.md b/docs/docs/reference/smart_contract_reference/storage/public_state.md index dc4f6706cf5e..f30e256659d6 100644 --- a/docs/docs/reference/smart_contract_reference/storage/public_state.md +++ b/docs/docs/reference/smart_contract_reference/storage/public_state.md @@ -35,11 +35,7 @@ Say that we wish to add `admin` public state variable into our storage struct. I #### Mapping example -<<<<<<< HEAD:docs/docs/reference/reference/smart_contract_reference/storage/public_state.md Say we want to have a group of `minters` that are able to mint assets in our contract, and we want them in public storage, because access control in private is quite cumbersome. In the `Storage` struct we can add it as follows: -======= -Say we want to have a group of `minters` that are able to mint assets in our contract, and we want them in public storage, because [access control in private is quite cumbersome](/aztec/concepts/smart_contracts/communication/cross_chain_calls#a-note-on-l2-access-control). In the `Storage` struct we can add it as follows: ->>>>>>> fd81464071 (removing nested folders):docs/docs/reference/smart_contract_reference/storage/public_state.md #include_code storage-minters-declaration /noir-projects/noir-contracts/contracts/docs_example_contract/src/main.nr rust diff --git a/docs/docs/tutorials/contract_tutorials/advanced/token_bridge/index.md b/docs/docs/tutorials/contract_tutorials/advanced/token_bridge/index.md index 242039dea471..3331911f850f 100644 --- a/docs/docs/tutorials/contract_tutorials/advanced/token_bridge/index.md +++ b/docs/docs/tutorials/contract_tutorials/advanced/token_bridge/index.md @@ -35,15 +35,7 @@ Aztec has the following core smart contracts on L1 that we need to know about: - `Outbox.sol` - a mailbox to the rollup for L2 to L1 messages (e.g. withdrawing tokens). Aztec contracts emit these messages and the sequencer adds these to the outbox. Portals then consume these messages. - `Registry.sol` - just like L1, we assume there will be various versions of Aztec (due to upgrades, forks etc). In such a case messages must not be replayable in other Aztec “domains”. A portal must decide which version/ID of Aztec the message is for. The registry stores the rollup, inbox and outbox address for each version of Aztec deployments, so the portal can find out the address of the mailbox it wants to talk to -<<<<<<< HEAD -<<<<<<< HEAD:docs/docs/tutorials/tutorials/contract_tutorials/advanced/token_bridge/index.md For more information, read [cross-chain calls](/protocol-specs/l1-smart-contracts/index.md). -======= -For more information, read [cross-chain calls](/aztec/concepts/smart_contracts/communication/cross_chain_calls). ->>>>>>> fd81464071 (removing nested folders):docs/docs/tutorials/contract_tutorials/advanced/token_bridge/index.md -======= -For more information, read [cross-chain calls](/protocol-specs/l1-smart-contracts/index.md). ->>>>>>> 02be02cbcb (fixing conflicts) ## Building a Token Bridge with Portals diff --git a/docs/package.json b/docs/package.json index 390cff4d4a52..ce1043aaaef5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,14 +8,11 @@ "dev:local": "ENV=dev yarn docs", "build": "./scripts/build.sh", "swizzle": "docusaurus swizzle", - "clear": "rm -rf 'processed-docs' 'processed-docs-cache' docs/apis && docusaurus clear && rm 'src/preprocess/AztecnrReferenceAutogenStructure.json' && rm -rf 'docs/developers/references/aztec-nr'", + "clean": "./scripts/clean.sh", "serve": "docusaurus serve", "preprocess": "yarn node -r dotenv/config ./src/preprocess/index.js && node src/preprocess/generate_aztecnr_reference.js", "preprocess:dev": "nodemon --config nodemon.json ./src/preprocess/index.js && nodemon --config nodemon.json src/preprocess/generate_aztecnr_reference.js ", - "typedoc": "rm -rf docs/apis && docusaurus generate-typedoc && cp -a docs/apis processed-docs/", - "typedoc:dev": "nodemon -w ../yarn-project -e '*.js,*.ts,*.nr,*.md' --exec \"rm -rf docs/apis && yarn docusaurus generate-typedoc && cp -a docs/apis processed-docs/\"", - "write-translations": "docusaurus write-translations", - "write-heading-ids": "docusaurus write-heading-ids" + "typedoc": "docusaurus generate-typedoc" }, "dependencies": { "@docusaurus/core": "^3.0.1", diff --git a/docs/scripts/build.sh b/docs/scripts/build.sh index ead793d49688..d884bcdf3d56 100755 --- a/docs/scripts/build.sh +++ b/docs/scripts/build.sh @@ -45,10 +45,16 @@ if [ -n "$NETLIFY" ]; then yarn fi +# Clean +echo Cleaning... +yarn clean + # Now build the docsite echo Building docsite... -echo "Generating Aztec.nr reference docs..." -node ./src/preprocess/generate_aztecnr_reference.js -echo "Generated Aztec.nr reference docs" +echo "Processing..." +yarn preprocess +yarn typedoc +sh scripts/move_processed.sh -yarn preprocess && yarn typedoc && yarn docusaurus build +echo "Building..." +yarn docusaurus build diff --git a/docs/scripts/clean.sh b/docs/scripts/clean.sh index 5a11a2ac2ac5..da22dfd276ec 100755 --- a/docs/scripts/clean.sh +++ b/docs/scripts/clean.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -rm -rf 'processed-docs' 'processed-docs-cache' docs/reference/aztecjs -docusaurus clear - -rm -rf 'docs/reference/smart_contract_reference/aztec-nr' +rm -rf 'processed-docs' 'processed-docs-cache' +rm -rf docs/reference/aztecjs 'docs/reference/smart_contract_reference/aztec-nr' +docusaurus clear diff --git a/docs/scripts/move_processed.sh b/docs/scripts/move_processed.sh index 8280970d1a48..8a29b13a16ec 100755 --- a/docs/scripts/move_processed.sh +++ b/docs/scripts/move_processed.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash echo "label: \"AztecJS\"" > ./docs/reference/aztecjs/_category_.yml mv ./docs/reference/aztecjs ./processed-docs/reference/aztecjs +mv ./docs/reference/smart_contract_reference/aztec-nr ./processed-docs/reference/smart_contract_reference/aztec-nr