Add wallet method for finding spendable notes in a CTransaction

This commit is contained in:
Jack Grigg
2016-08-24 15:50:45 +12:00
parent 5db5e42ec3
commit 02e674555e
8 changed files with 264 additions and 2 deletions

View File

@@ -61,6 +61,8 @@ public:
typedef boost::array<unsigned char, CLEN> Ciphertext;
typedef boost::array<unsigned char, MLEN> Plaintext;
// Unused default constructor to make allocators happy
NoteDecryption() { }
NoteDecryption(uint256 sk_enc);
Plaintext decrypt(const Ciphertext &ciphertext,
@@ -68,6 +70,8 @@ public:
const uint256 &hSig,
unsigned char nonce
) const;
friend inline bool operator<(const NoteDecryption& a, const NoteDecryption& b) { return a.pk_enc < b.pk_enc; }
};
uint256 random_uint256();