Skip to content

Commit 103e6d3

Browse files
committed
documenting helper funcs
1 parent 6661067 commit 103e6d3

File tree

1 file changed

+7
-0
lines changed
  • noir-projects/aztec-nr/aztec/src/keys/getters

1 file changed

+7
-0
lines changed

noir-projects/aztec-nr/aztec/src/keys/getters/mod.nr

+7
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,17 @@ global KEY_REGISTRY_UPDATE_BLOCKS = 5;
2424

2525
global KEY_REGISTRY_STORAGE_SLOT = 1;
2626

27+
// A helper function that gets app-siloed nullifier secret key for a given `npk_m_hash`. This function is used
28+
// in unconstrained contexts only - in Note::compute_nullifier_without_context which in turn is called by
29+
// `compute_note_hash_and_optionally_a_nullifier` function that is used by the NoteProcessor. The safe alternative
30+
// is `request_nsk_app` function define on `PrivateContext`.
2731
unconstrained pub fn get_nsk_app(npk_m_hash: Field) -> Field {
2832
get_key_validation_request(npk_m_hash, NULLIFIER_INDEX).sk_app
2933
}
3034

35+
// A helper function that gets app-siloed outgoing viewing key for a given `ovpk_m_hash`. This function is used
36+
// in unconstrained contexts only - when computing unconstrained note logs. The safe alternative is `request_ovsk_app`
37+
// function defined on `PrivateContext`.
3138
unconstrained pub fn get_ovsk_app(ovpk_m_hash: Field) -> Field {
3239
get_key_validation_request(ovpk_m_hash, OUTGOING_INDEX).sk_app
3340
}

0 commit comments

Comments
 (0)