// 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 #include #include #include #include #include "CryptoNoteCore/CryptoNoteBasic.h" #include "UnorderedContainersBoostSerialization.h" #include "crypto/crypto.h" //namespace CryptoNote { namespace boost { namespace serialization { //--------------------------------------------------- template inline void serialize(Archive &a, Crypto::PublicKey &x, const boost::serialization::version_type ver) { a & reinterpret_cast(x); } template inline void serialize(Archive &a, Crypto::SecretKey &x, const boost::serialization::version_type ver) { a & reinterpret_cast(x); } template inline void serialize(Archive &a, Crypto::KeyDerivation &x, const boost::serialization::version_type ver) { a & reinterpret_cast(x); } template inline void serialize(Archive &a, Crypto::KeyImage &x, const boost::serialization::version_type ver) { a & reinterpret_cast(x); } template inline void serialize(Archive &a, Crypto::Signature &x, const boost::serialization::version_type ver) { a & reinterpret_cast(x); } template inline void serialize(Archive &a, Crypto::Hash &x, const boost::serialization::version_type ver) { a & reinterpret_cast(x); } template void serialize(Archive& archive, CryptoNote::MultisignatureInput &output, unsigned int version) { archive & output.amount; archive & output.signatureCount; archive & output.outputIndex; } template void serialize(Archive& archive, CryptoNote::MultisignatureOutput &output, unsigned int version) { archive & output.keys; archive & output.requiredSignatureCount; } template inline void serialize(Archive &a, CryptoNote::KeyOutput &x, const boost::serialization::version_type ver) { a & x.key; } template inline void serialize(Archive &a, CryptoNote::BaseInput &x, const boost::serialization::version_type ver) { a & x.blockIndex; } template inline void serialize(Archive &a, CryptoNote::KeyInput &x, const boost::serialization::version_type ver) { a & x.amount; a & x.outputIndexes; a & x.keyImage; } template inline void serialize(Archive &a, CryptoNote::TransactionOutput &x, const boost::serialization::version_type ver) { a & x.amount; a & x.target; } template inline void serialize(Archive &a, CryptoNote::Transaction &x, const boost::serialization::version_type ver) { a & x.version; a & x.unlockTime; a & x.inputs; a & x.outputs; a & x.extra; a & x.signatures; } template inline void serialize(Archive &a, CryptoNote::Block &b, const boost::serialization::version_type ver) { a & b.majorVersion; a & b.minorVersion; a & b.timestamp; a & b.previousBlockHash; a & b.nonce; //------------------ a & b.baseTransaction; a & b.transactionHashes; } } } //}