barretenberg
Loading...
Searching...
No Matches
join_split_tx.hpp
1#pragma once
2#include "../notes/native/claim/claim_note_tx_data.hpp"
3#include "../notes/native/value/value_note.hpp"
4#include "barretenberg/crypto/schnorr/schnorr.hpp"
5#include "barretenberg/join_split_example/types.hpp"
6#include "barretenberg/stdlib/merkle_tree/hash_path.hpp"
7
8namespace join_split_example {
9namespace proofs {
10namespace join_split {
11
13 uint32_t proof_id;
14 uint256_t public_value;
15 barretenberg::fr public_owner;
16 uint32_t asset_id;
17 uint32_t num_input_notes;
18 std::array<uint32_t, 2> input_index;
19 barretenberg::fr old_data_root;
20 std::array<proof_system::plonk::stdlib::merkle_tree::fr_hash_path, 2> input_path;
21 std::array<notes::native::value::value_note, 2> input_note;
22 std::array<notes::native::value::value_note, 2> output_note;
23
25
26 grumpkin::fr account_private_key;
27 barretenberg::fr alias_hash;
28 bool account_required;
29 uint32_t account_note_index;
30 proof_system::plonk::stdlib::merkle_tree::fr_hash_path account_note_path;
31 grumpkin::g1::affine_element signing_pub_key;
32
33 barretenberg::fr backward_link; // 0: no link, otherwise: any commitment.
34 uint32_t allow_chain; // 0: none, 1: output_note1, 2: output_note2
35
37
38 bool operator==(join_split_tx const&) const = default;
39};
40
41void read(uint8_t const*& it, join_split_tx& tx);
42void write(std::vector<uint8_t>& buf, join_split_tx const& tx);
43
44std::ostream& operator<<(std::ostream& os, join_split_tx const& tx);
45
46} // namespace join_split
47} // namespace proofs
48} // namespace join_split_example
Definition: affine_element.hpp:11
Definition: uint256.hpp:25
Definition: schnorr.hpp:25