// 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 #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; } } } //}