-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
34 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
use dep::protocol_types::{grumpkin_point::GrumpkinPoint, abis::nullifier_key_validation_request::NullifierKeyValidationRequest}; | ||
|
||
#[oracle(getNullifierKeys)] | ||
fn get_nullifier_keys_oracle(_npk_m_hash: Field) -> [Field; 3] {} | ||
fn get_nullifier_key_validation_request_oracle(_npk_m_hash: Field) -> [Field; 3] {} | ||
|
||
unconstrained fn get_nullifier_keys_internal(npk_m_hash: Field) -> NullifierKeyValidationRequest { | ||
let result = get_nullifier_keys_oracle(npk_m_hash); | ||
unconstrained fn get_nullifier_key_validation_request_internal(npk_m_hash: Field) -> NullifierKeyValidationRequest { | ||
let result = get_nullifier_key_validation_request_oracle(npk_m_hash); | ||
NullifierKeyValidationRequest { | ||
master_nullifier_public_key: GrumpkinPoint { x: result[0], y: result[1] }, | ||
app_nullifier_secret_key: result[2] | ||
} | ||
} | ||
|
||
// We get the full struct Nullifier Keys here | ||
pub fn get_nullifier_keys(npk_m_hash: Field) -> NullifierKeyValidationRequest { | ||
get_nullifier_keys_internal(npk_m_hash) | ||
pub fn get_nullifier_key_validation_request(npk_m_hash: Field) -> NullifierKeyValidationRequest { | ||
get_nullifier_key_validation_request_internal(npk_m_hash) | ||
} | ||
|
||
pub fn get_nsk_app(npk_m_hash: Field) -> Field { | ||
get_nullifier_key_validation_request_internal(npk_m_hash).app_nullifier_secret_key | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
noir-projects/noir-contracts/contracts/docs_example_contract/src/types/card_note.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
noir-projects/noir-contracts/contracts/schnorr_account_contract/src/public_key_note.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters