// Copyright (c) 2011-2016 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include #include #include "CryptoTypes.h" namespace CryptoNote { struct BaseInput { uint32_t blockIndex; }; struct KeyInput { uint64_t amount; std::vector outputIndexes; Crypto::KeyImage keyImage; }; struct MultisignatureInput { uint64_t amount; uint8_t signatureCount; uint32_t outputIndex; }; struct KeyOutput { Crypto::PublicKey key; }; struct MultisignatureOutput { std::vector keys; uint8_t requiredSignatureCount; }; typedef boost::variant TransactionInput; typedef boost::variant TransactionOutputTarget; struct TransactionOutput { uint64_t amount; TransactionOutputTarget target; }; struct TransactionPrefix { uint8_t version; uint64_t unlockTime; std::vector inputs; std::vector outputs; std::vector extra; }; struct Transaction : public TransactionPrefix { std::vector> signatures; }; struct BlockHeader { uint8_t majorVersion; uint8_t minorVersion; uint32_t nonce; uint64_t timestamp; Crypto::Hash previousBlockHash; }; struct Block : public BlockHeader { Transaction baseTransaction; std::vector transactionHashes; }; struct AccountPublicAddress { Crypto::PublicKey spendPublicKey; Crypto::PublicKey viewPublicKey; }; struct AccountKeys { AccountPublicAddress address; Crypto::SecretKey spendSecretKey; Crypto::SecretKey viewSecretKey; }; struct KeyPair { Crypto::PublicKey publicKey; Crypto::SecretKey secretKey; }; using BinaryArray = std::vector; }