Skip to content

Commit

Permalink
docs imports fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 20, 2023
1 parent 0f10057 commit a154066
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/docs/concepts/foundation/accounts/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/dev_docs/contracts/syntax/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion yarn-project/aztec-nr/address-note/src/address_note.nr
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
};

Expand Down

0 comments on commit a154066

Please sign in to comment.