barretenberg
Loading...
Searching...
No Matches
create_partial_commitment.hpp
1#pragma once
2#include "../../constants.hpp"
3#include "barretenberg/common/serialize.hpp"
4#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
5#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
6
7namespace join_split_example::proofs::notes::native::value {
8
9inline auto create_partial_commitment(barretenberg::fr const& secret,
11 bool account_required,
12 barretenberg::fr const& creator_pubkey)
13{
14 return crypto::pedersen_hash::hash({ secret, owner.x, owner.y, account_required, creator_pubkey },
15 GeneratorIndex::VALUE_NOTE_PARTIAL_COMMITMENT);
16}
17
18} // namespace join_split_example::proofs::notes::native::value
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