13 bool is_coinbase,
CKey key) {
20 Stake(std::move(utxo), amount, height, is_coinbase, key.
GetPubKey());
21 const uint256 h = stake.getHash(commitment);
27 return stakes.emplace(std::move(stake), std::move(
sig)).second;
34 proofSignature.fill(0);
36 std::vector<SignedStake> signedStakes;
37 signedStakes.reserve(
stakes.size());
41 signedStakes.push_back(handle.value());
46 std::move(proofSignature));
56 for (
const auto &s :
stakes) {
A writer stream (for serialization) that computes a 256-bit hash.
uint256 GetHash()
Compute the double-SHA256 hash of all data written to this object.
An encapsulated secp256k1 private key.
bool IsValid() const
Check whether this private key is valid.
CPubKey GetPubKey() const
Compute the public key from a private key.
bool SignSchnorr(const uint256 &hash, SchnorrSig &sig, uint32_t test_case=0) const
Create a Schnorr signature.
An outpoint - a combination of a transaction hash and an index n into its vout.
static RCUPtr make(Args &&...args)
Construct a new object that is owned by the pointer.
bool addUTXO(COutPoint utxo, Amount amount, uint32_t height, bool is_coinbase, CKey key)
std::set< SignedStake, SignedStakeComparator > stakes
ProofId getProofId() const
LimitedProofId getLimitedProofId() const
CScript payoutScriptPubKey
std::array< uint8_t, CPubKey::SCHNORR_SIZE > SchnorrSig
a Schnorr signature
void WriteCompactSize(CSizeComputer &os, uint64_t nSize)