forked from Zerocoin/libzerocoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpendMetaData.h
52 lines (46 loc) · 1.37 KB
/
SpendMetaData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* @file SpendMetaData.h
*
* @brief SpendMetaData class for the Zerocoin library.
*
* @author Ian Miers, Christina Garman and Matthew Green
* @date June 2013
*
* @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
* @license This project is released under the MIT license.
**/
#ifndef SPENDMETADATA_H_
#define SPENDMETADATA_H_
#include "bitcoin_bignum/uint256.h"
#include "bitcoin_bignum/serialize.h"
using namespace std;
namespace libzerocoin {
/** Any meta data needed for actual bitcoin integration.
* Can extended provided the getHash() function is updated
*/
class SpendMetaData {
public:
/**
* Creates meta data associated with a coin spend
* @param accumulatorId hash of block containing accumulator
* @param txHash hash of transaction
*/
SpendMetaData(uint256 accumulatorId, uint256 txHash);
/**
* The hash of the block containing the accumulator CoinSpend
* proves membership in.
*/
uint256 accumulatorId; // The block the accumulator is in
/**Contains the hash of the rest of transaction
* spending a zerocoin (excluding the coinspend proof)
*/
uint256 txHash; // The Hash of the rest of the transaction the spend proof is n.
// Allows us to sign the transaction.
IMPLEMENT_SERIALIZE
(
READWRITE(accumulatorId);
READWRITE(txHash);
)
};
} /* namespace libzerocoin */
#endif /* SPENDMETADATA_H_ */