diff --git a/docs/docs/concepts/foundation/accounts/keys.md b/docs/docs/concepts/foundation/accounts/keys.md index 24a4d9e88d4..6296025ca6e 100644 --- a/docs/docs/concepts/foundation/accounts/keys.md +++ b/docs/docs/concepts/foundation/accounts/keys.md @@ -71,7 +71,7 @@ In a future version, encryption keys will be differentiated between incoming and An application in Aztec.nr can access the encryption public key for a given address using the oracle call `get_public_key`, which you can then use for calls such as `emit_encrypted_log`: -#include_code encrypted /yarn-project/aztec-nr/value-note/src/utils.nr rust +#include_code encrypted /yarn-project/noir-contracts/src/contracts/token_contract/src/types/token_note.nr rust :::info In order to be able to provide the public encryption key for a given address, that public key needs to have been registered in advance. At the moment, there is no broadcasting mechanism for public keys, which means that you will need to manually register all addresses you intend to send encrypted notes to. You can do this via the `registerRecipient` method of the Private Execution Environment (PXE), callable either via aztec.js or the CLI. diff --git a/docs/docs/dev_docs/contracts/syntax/events.md b/docs/docs/dev_docs/contracts/syntax/events.md index d3f3f6c192b..3fae2bb7a17 100644 --- a/docs/docs/dev_docs/contracts/syntax/events.md +++ b/docs/docs/dev_docs/contracts/syntax/events.md @@ -63,11 +63,11 @@ In the future we will allow emitting arbitrary information. To emit encrypted logs first import the `emit_encrypted_log` utility function which wraps an [oracle](./functions.md#oracle-functions): -#include_code encrypted_import /yarn-project/aztec-nr/value-note/src/utils.nr rust +#include_code encrypted_import /yarn-project/aztec-nr/address-note/src/address_note.nr rust Then you can call the function: -#include_code encrypted /yarn-project/aztec-nr/value-note/src/utils.nr rust +#include_code encrypted /yarn-project/noir-contracts/src/contracts/token_contract/src/types/token_note.nr rust ### Processing Encrypted Events diff --git a/yarn-project/aztec-nr/address-note/src/address_note.nr b/yarn-project/aztec-nr/address-note/src/address_note.nr index 23700cee46e..f360d4206ce 100644 --- a/yarn-project/aztec-nr/address-note/src/address_note.nr +++ b/yarn-project/aztec-nr/address-note/src/address_note.nr @@ -1,3 +1,6 @@ +// docs:start:encrypted_import +use dep::aztec::log::emit_encrypted_log; +// docs:end:encrypted_import use dep::aztec::{ note::{ note_header::NoteHeader, @@ -8,7 +11,6 @@ use dep::aztec::{ get_secret_key::get_secret_key, get_public_key::get_public_key, }, - log::emit_encrypted_log, context::PrivateContext, };