barretenberg
Loading...
Searching...
No Matches
compute_account_public_key_nullifier.hpp
1#pragma once
2#include "../../constants.hpp"
3#include "account_note.hpp"
4#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
5
6namespace join_split_example::proofs::notes::native::account {
7
8using namespace barretenberg;
9
10inline fr compute_account_public_key_nullifier(grumpkin::g1::affine_element const& public_key)
11{
12 return crypto::pedersen_hash::hash(std::vector<fr>{ public_key.x },
13 notes::GeneratorIndex::ACCOUNT_PUBLIC_KEY_NULLIFIER);
14}
15
16} // namespace join_split_example::proofs::notes::native::account
Definition: affine_element.hpp:11
static Fq hash(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen hash using generators from context.
Definition: pedersen.cpp:59
constexpr_utils defines some helper methods that perform some stl-equivalent operations but in a cons...
Definition: constexpr_utils.hpp:16