void GetTransferRequest::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { throwIfRequiredParamsMissing(serializer, "transfer_id"); serializer.beginObject(name); serializer(transferId, "transfer_id"); serializer.endObject(); }
void GetIncomingPaymentsRequest::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { throwIfRequiredParamsMissing(serializer, "payments"); serializer.beginObject(name); serializer(payments, "payments"); serializer.endObject(); }
void TransferDestination::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); throwIfRequiredParamsMissing(serializer, {"amount", "address"}); serializer(amount, "amount"); serializer(address, "address"); serializer.endObject(); }
void GetIncomingPaymentsResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(payments, "payments"); serializer.endObject(); }
void SendTransactionRequest::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { throwIfRequiredParamsMissing(serializer, {"destinations", "fee", "mixin"}); serializer.beginObject(name); size_t size = destinations.size(); serializer.beginArray(size, "destinations"); destinations.resize(size); auto it = destinations.begin(); for (size_t i = 0; i < size; ++i, ++it) { it->serialize(serializer, ""); } serializer.endArray(); serializer(fee, "fee"); serializer(mixin, "mixin"); if (serializer.hasObject("unlock_time")) { serializer(unlockTime, "unlock_time"); } if (serializer.hasObject("payment_id")) { serializer(paymentId, "payment_id"); } serializer.endObject(); }
void serialize(Transfer& tr, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); serializer(tr.address, "address"); serializer(tr.amount, "amount"); serializer.endObject(); }
void PaymentsById::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(id, "id"); serializer(payments, "payments"); serializer.endObject(); }
void PaymentDetails::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(txHash, "tx_hash"); serializer(amount, "amount"); serializer(blockHeight, "block_height"); serializer(unlockTime, "unlock_time"); serializer.endObject(); }
void WalletUnconfirmedTransactions::serialize(cryptonote::ISerializer& s, const std::string& name) { s.beginObject(name); s(m_unconfirmedTxs, "transactions"); s.endObject(); if (s.type() == cryptonote::ISerializer::INPUT) { collectUsedOutputs(); } }
void serialize(UnconfirmedSpentDepositDetails& details, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); uint64_t txId = details.transactionId; serializer(txId, "spendingTransactionId"); details.transactionId = txId; serializer(details.depositsSum, "depositsSum"); serializer(details.fee, "fee"); serializer.endObject(); }
void GetTransferResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(found, "found"); if (!found) { serializer.endObject(); return; } transferInfo.serialize(serializer, "transfer_info"); serializer.endObject(); }
void serialize(UnconfirmedTransferDetails& utd, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); serializer(utd.tx, "transaction"); serializer(utd.amount, "amount"); serializer(utd.outsAmount, "outs_amount"); uint64_t time = static_cast<uint64_t>(utd.sentTime); serializer(time, "sent_time"); utd.sentTime = static_cast<time_t>(time); uint64_t txId = static_cast<uint64_t>(utd.transactionId); serializer(txId, "transaction_id"); utd.transactionId = static_cast<size_t>(txId); serializer.endObject(); }
void TransactionRpcInfo::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(firstTransferId, "first_transfer_id"); serializer(transferCount, "transfer_count"); serializer(totalAmount, "total_amount"); serializer(fee, "fee"); serializer(hash, "hash"); serializer(isCoinbase, "is_coin_base"); serializer(blockHeight, "block_height"); serializer(timestamp, "timestamp"); serializer(extra, "extra"); serializer.endObject(); }
void serialize(Deposit& deposit, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); uint64_t creatingTxId = static_cast<uint64_t>(deposit.creatingTransactionId); serializer(creatingTxId, "creating_transaction_id"); deposit.creatingTransactionId = static_cast<size_t>(creatingTxId); uint64_t spendingTxIx = static_cast<uint64_t>(deposit.spendingTransactionId); serializer(spendingTxIx, "spending_transaction_id"); deposit.spendingTransactionId = static_cast<size_t>(spendingTxIx); serializer(deposit.term, "term"); serializer(deposit.amount, "amount"); serializer(deposit.interest, "interest"); serializer(deposit.locked, "locked"); serializer.endObject(); }
void WalletUserTransactionsCache::serialize(CryptoNote::ISerializer& s, const std::string& name) { s.beginObject(name); if (s.type() == CryptoNote::ISerializer::INPUT) { s(m_transactions, "transactions"); s(m_transfers, "transfers"); s(m_unconfirmedTransactions, "unconfirmed"); updateUnconfirmedTransactions(); } else { UserTransactions txsToSave; UserTransfers transfersToSave; getGoodItems(txsToSave, transfersToSave); s(txsToSave, "transactions"); s(transfersToSave, "transfers"); s(m_unconfirmedTransactions, "unconfirmed"); } s.endObject(); }
void serialize(TransactionInfo& txi, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); uint64_t trId = static_cast<uint64_t>(txi.firstTransferId); serializer(trId, "first_transfer_id"); txi.firstTransferId = static_cast<size_t>(trId); uint64_t trCount = static_cast<uint64_t>(txi.transferCount); serializer(trCount, "transfer_count"); txi.transferCount = static_cast<size_t>(trCount); serializer(txi.totalAmount, "total_amount"); serializer(txi.fee, "fee"); serializer(txi.hash, "hash"); serializer(txi.isCoinbase, "is_coinbase"); serializer(txi.blockHeight, "block_height"); serializer(txi.timestamp, "timestamp"); serializer(txi.unlockTime, "unlock_time"); serializer(txi.extra, "extra"); serializer.endObject(); }
void serialize(DepositInfo& depositInfo, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); serializer(depositInfo.deposit, "deposit"); serializer(depositInfo.outputInTransaction, "output_in_transaction"); serializer.endObject(); }
void SendTransactionResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(transactionId, "transaction_id"); serializer.endObject(); }
void serialize(COMMAND_RPC_STOP_DAEMON::request& value, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); serializer.endObject(); }
void serialize(COMMAND_RPC_STOP_DAEMON::response& value, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); serializer(value.status, "status"); serializer.endObject(); }
void serialize(COMMAND_RPC_START_MINING::request& value, const std::string& name, cryptonote::ISerializer& serializer) { serializer.beginObject(name); serializer(value.miner_address, "miner_address"); serializer(value.threads_count, "threads_count"); serializer.endObject(); }
void GetAddressResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(address, "address"); serializer.endObject(); }
void GetActualBalanceResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(actualBalance, "actual_balance"); serializer.endObject(); }
void GetPendingBalanceResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(pendingBalance, "pending_balance"); serializer.endObject(); }
void TransferRpcInfo::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(address, "address"); serializer(amount, "amount"); serializer.endObject(); }
void GetTransfersCountResponse::serialize(CryptoNote::ISerializer& serializer, const std::string& name) { serializer.beginObject(name); serializer(transfersCount, "transfers_count"); serializer.endObject(); }