barretenberg
Loading...
Searching...
No Matches
claim_note_tx_data.hpp
1#pragma once
2#include "../bridge_call_data.hpp"
3#include "barretenberg/common/serialize.hpp"
4#include "barretenberg/crypto/pedersen_commitment/pedersen.hpp"
5#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
6
7namespace join_split_example {
8namespace proofs {
9namespace notes {
10namespace native {
11namespace claim {
12
14 uint256_t deposit_value;
16 uint256_t note_secret;
17 barretenberg::fr input_nullifier;
18
19 bool operator==(partial_claim_note_data const&) const = default;
20};
21
22inline std::ostream& operator<<(std::ostream& os, partial_claim_note_data const& note)
23{
24 return os << "{ value: " << note.deposit_value << ", bridge_call_data: " << note.bridge_call_data
25 << ", secret: " << note.note_secret << ", input_nullifier: " << note.input_nullifier << " }";
26}
27
28inline void read(uint8_t const*& it, partial_claim_note_data& note)
29{
30 using serialize::read;
31 read(it, note.deposit_value);
32 read(it, note.bridge_call_data);
33 read(it, note.note_secret);
34 read(it, note.input_nullifier);
35}
36
37inline void write(std::vector<uint8_t>& buf, partial_claim_note_data const& note)
38{
39 using serialize::write;
40 write(buf, note.deposit_value);
41 write(buf, note.bridge_call_data);
42 write(buf, note.note_secret);
43 write(buf, note.input_nullifier);
44}
45
46} // namespace claim
47} // namespace native
48} // namespace notes
49} // namespace proofs
50} // namespace join_split_example
Definition: uint256.hpp:25