barretenberg
Loading...
Searching...
No Matches
complete_partial_commitment.hpp
1#pragma once
2#include "../../constants.hpp"
3#include "barretenberg/crypto/pedersen_hash/pedersen.hpp"
4
5namespace join_split_example::proofs::notes::native::value {
6
7inline auto complete_partial_commitment(grumpkin::fq const& partial_commitment,
8 uint256_t const& value,
9 uint32_t asset_id,
10 grumpkin::fq input_nullifier)
11{
12 return crypto::pedersen_hash::hash({ partial_commitment, value, asset_id, input_nullifier },
13 GeneratorIndex::VALUE_NOTE_COMMITMENT);
14};
15
16} // namespace join_split_example::proofs::notes::native::value
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
Definition: uint256.hpp:25