// Copyright (c) 2012-2015, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
// Bytecoin is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Bytecoin is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with Bytecoin. If not, see .
#pragma once
#include
#include
#include
#include
namespace CryptoNote {
enum class TransactionRemoveReason : uint8_t
{
INCLUDED_IN_BLOCK = 0,
TIMEOUT = 1
};
struct TransactionOutputToKeyDetails {
std::array txOutKey;
};
struct TransactionOutputMultisignatureDetails {
std::vector> keys;
uint32_t requiredSignatures;
};
struct TransactionOutputDetails {
uint64_t amount;
uint64_t globalIndex;
boost::variant<
TransactionOutputToKeyDetails,
TransactionOutputMultisignatureDetails> output;
};
struct TransactionOutputReferenceDetails {
std::array transactionHash;
size_t number;
};
struct TransactionInputGenerateDetails {
uint64_t height;
};
struct TransactionInputToKeyDetails {
std::vector keyOffsets;
std::array keyImage;
uint64_t mixin;
TransactionOutputReferenceDetails output;
};
struct TransactionInputMultisignatureDetails {
uint32_t signatures;
TransactionOutputReferenceDetails output;
};
struct TransactionInputDetails {
uint64_t amount;
boost::variant<
TransactionInputGenerateDetails,
TransactionInputToKeyDetails,
TransactionInputMultisignatureDetails> input;
};
struct TransactionExtraDetails {
std::vector padding;
std::vector> publicKey;
std::vector nonce;
std::vector raw;
};
struct TransactionDetails {
std::array hash;
uint64_t size;
uint64_t fee;
uint64_t totalInputsAmount;
uint64_t totalOutputsAmount;
uint64_t mixin;
uint64_t unlockTime;
uint64_t timestamp;
std::array paymentId;
bool inBlockchain;
std::array blockHash;
uint64_t blockHeight;
TransactionExtraDetails extra;
std::vector>> signatures;
std::vector inputs;
std::vector outputs;
};
struct BlockDetails {
uint8_t majorVersion;
uint8_t minorVersion;
uint64_t timestamp;
std::array prevBlockHash;
uint32_t nonce;
bool isOrphaned;
uint64_t height;
std::array hash;
uint64_t difficulty;
uint64_t reward;
uint64_t baseReward;
uint64_t blockSize;
uint64_t transactionsCumulativeSize;
uint64_t alreadyGeneratedCoins;
uint64_t alreadyGeneratedTransactions;
uint64_t sizeMedian;
double penalty;
uint64_t totalFeeAmount;
std::vector transactions;
};
}