Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
libzeth
core
note.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_NOTE_HPP__
6
#define __ZETH_CORE_NOTE_HPP__
7
8
#include "
libzeth/core/bits.hpp
"
9
10
#include <array>
11
12
namespace
libzeth
13
{
14
15
class
zeth_note
16
{
17
public
:
18
bits256
a_pk
;
19
bits64
value
;
20
bits256
rho
;
21
bits256
r
;
22
23
// Note, r-value refs are not used because the bits* objects are all
24
// trivially-copyable.
25
zeth_note
(
26
const
bits256
&
a_pk
,
27
const
bits64
&
value
,
28
const
bits256
&
rho
,
29
const
bits256
&
r
)
30
:
a_pk
(
a_pk
),
value
(
value
),
rho
(
rho
),
r
(
r
)
31
{
32
}
33
34
zeth_note
() {}
35
36
inline
bool
is_zero_valued
()
const
{
return
value
.
is_zero
(); }
37
};
38
39
}
// namespace libzeth
40
41
#endif // __ZETH_CORE_NOTE_HPP__
libzeth::zeth_note::r
bits256 r
Definition:
note.hpp:21
libzeth::zeth_note::value
bits64 value
Definition:
note.hpp:19
libzeth::bits::is_zero
bool is_zero() const
libzeth
Definition:
binary_operation.hpp:15
libzeth::zeth_note::is_zero_valued
bool is_zero_valued() const
Definition:
note.hpp:36
libzeth::zeth_note::zeth_note
zeth_note()
Definition:
note.hpp:34
libzeth::bits< 256 >
libzeth::zeth_note::a_pk
bits256 a_pk
Definition:
note.hpp:18
libzeth::zeth_note::zeth_note
zeth_note(const bits256 &a_pk, const bits64 &value, const bits256 &rho, const bits256 &r)
Definition:
note.hpp:25
libzeth::zeth_note::rho
bits256 rho
Definition:
note.hpp:20
libzeth::zeth_note
Definition:
note.hpp:15
bits.hpp
Generated on Mon Nov 28 2022 10:29:03 for Zeth - Zerocash on Ethereum by
1.8.17