Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hash_path.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8#include "hash.hpp"
9#include <vector>
10
12
14using fr_sibling_path = std::vector<fr>;
15
16} // namespace bb::crypto::merkle_tree
17
18// We add to std namespace as fr_hash_path is actually a std::vector, and this is the only way
19// to achieve effective ADL.
20namespace std {
21inline std::ostream& operator<<(std::ostream& os, bb::crypto::merkle_tree::fr_hash_path const& path)
22{
23 os << "[\n";
24 for (size_t i = 0; i < path.size(); ++i) {
25 os << " (" << i << ": " << path[i].first << ", " << path[i].second << ")\n";
26 }
27 os << "]\n";
28 return os;
29}
30} // namespace std
std::vector< std::pair< fr, fr > > fr_hash_path
Definition hash_path.hpp:13
std::vector< fr > fr_sibling_path
Definition hash_path.hpp:14
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::ostream & operator<<(std::ostream &os, const T &obj)
Automatically derived stream operator for any object that defines .msgpack() (implicitly defined by M...
Definition streams.hpp:79