Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
libzeth
core
joinsplit_input.hpp
Go to the documentation of this file.
1
// Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2
//
3
// SPDX-License-Identifier: LGPL-3.0+
4
5
#ifndef __ZETH_CORE_JOINSPLIT_INPUT_HPP__
6
#define __ZETH_CORE_JOINSPLIT_INPUT_HPP__
7
8
#include "
libzeth/core/bits.hpp
"
9
#include "
libzeth/core/note.hpp
"
10
11
#include <libsnark/common/data_structures/merkle_tree.hpp>
12
#include <vector>
13
14
namespace
libzeth
15
{
16
21
template
<
typename
FieldT,
size_t
TreeDepth>
class
joinsplit_input
22
{
23
public
:
24
// merkle tree witness (path, and address)
25
std::vector<FieldT>
witness_merkle_path
;
26
// boolean vector, of length the depth of the merkle tree, containing the
27
// binary encoding of the address
28
bits_addr<TreeDepth>
address_bits
;
29
zeth_note
note
;
30
bits256
spending_key_a_sk
;
31
bits256
nullifier
;
32
33
joinsplit_input
(){};
34
joinsplit_input
(
35
std::vector<FieldT> &&
witness_merkle_path
,
36
const
bits_addr<TreeDepth>
&
address_bits
,
37
const
zeth_note
&
note
,
38
const
bits256
&key,
39
const
bits256
&
nullifier
)
40
:
witness_merkle_path
(std::move(
witness_merkle_path
))
41
,
address_bits
(
address_bits
)
42
,
note
(
note
)
43
,
spending_key_a_sk
(key)
44
,
nullifier
(
nullifier
)
45
{
46
}
47
};
48
49
}
// namespace libzeth
50
51
#endif // __ZETH_CORE_JOINSPLIT_INPUT_HPP__
libzeth::joinsplit_input::joinsplit_input
joinsplit_input()
Definition:
joinsplit_input.hpp:33
libzeth
Definition:
binary_operation.hpp:15
libzeth::bits< TreeDepth >
note.hpp
libzeth::joinsplit_input::note
zeth_note note
Definition:
joinsplit_input.hpp:29
libzeth::joinsplit_input::nullifier
bits256 nullifier
Definition:
joinsplit_input.hpp:31
libzeth::joinsplit_input
Definition:
joinsplit_input.hpp:21
libzeth::joinsplit_input::joinsplit_input
joinsplit_input(std::vector< FieldT > &&witness_merkle_path, const bits_addr< TreeDepth > &address_bits, const zeth_note ¬e, const bits256 &key, const bits256 &nullifier)
Definition:
joinsplit_input.hpp:34
libzeth::joinsplit_input::address_bits
bits_addr< TreeDepth > address_bits
Definition:
joinsplit_input.hpp:28
libzeth::zeth_note
Definition:
note.hpp:15
libzeth::joinsplit_input::witness_merkle_path
std::vector< FieldT > witness_merkle_path
Definition:
joinsplit_input.hpp:25
bits.hpp
libzeth::joinsplit_input::spending_key_a_sk
bits256 spending_key_a_sk
Definition:
joinsplit_input.hpp:30
Generated on Mon Nov 28 2022 10:29:03 for Zeth - Zerocash on Ethereum by
1.8.17