Monero
Loading...
Searching...
No Matches
wallet_rpc_server.cpp File Reference
#include <boost/format.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <cstdint>
#include <chrono>
#include "include_base_utils.h"
#include "version.h"
#include "wallet_rpc_server.h"
#include "wallet/wallet_args.h"
#include "common/command_line.h"
#include "common/i18n.h"
#include "common/scoped_message_writer.h"
#include "cryptonote_config.h"
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "cryptonote_basic/account.h"
#include "multisig/multisig.h"
#include "wallet_rpc_server_commands_defs.h"
#include "misc_language.h"
#include "string_coding.h"
#include "string_tools.h"
#include "crypto/hash.h"
#include "mnemonics/electrum-words.h"
#include "rpc/rpc_args.h"
#include "rpc/core_rpc_server_commands_defs.h"
#include "daemonizer/daemonizer.h"
Include dependency graph for wallet_rpc_server.cpp:

Classes

class  t_daemon
class  t_executor

Namespaces

namespace  tools
 Various Tools.

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "wallet.rpc"
#define DEFAULT_AUTO_REFRESH_PERIOD   20
#define REFRESH_INDICATIVE_BLOCK_CHUNK_SIZE   256
#define CHECK_MULTISIG_ENABLED()
#define CHECK_IF_BACKGROUND_SYNCING()
#define PRE_VALIDATE_BACKGROUND_SYNC()
#define MKDIR(path, mode)

Functions

static std::string tools::ptx_to_string (const tools::wallet2::pending_tx &ptx)
template<typename T>
static bool tools::is_error_value (const T &val)
static bool tools::is_error_value (const std::string &s)
template<typename T, typename V>
static bool tools::fill (T &where, V s)
template<typename T, typename V>
static bool tools::fill (std::list< T > &where, V s)
static uint64_t tools::total_amount (const tools::wallet2::pending_tx &ptx)
int main (int argc, char **argv)

Macro Definition Documentation

◆ CHECK_IF_BACKGROUND_SYNCING

#define CHECK_IF_BACKGROUND_SYNCING ( )
Value:
do \
{ \
if (!m_wallet) { return not_open(er); } \
if (m_wallet->is_background_wallet()) \
{ \
er.message = "This command is disabled for background wallets."; \
return false; \
} \
if (m_wallet->is_background_syncing()) \
{ \
er.message = "This command is disabled while background syncing. Stop background syncing to use this command."; \
return false; \
} \
} while(0)
#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_WALLET
Definition wallet_rpc_server_error_codes.h:84
#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_SYNCING
Definition wallet_rpc_server_error_codes.h:85

◆ CHECK_MULTISIG_ENABLED

#define CHECK_MULTISIG_ENABLED ( )
Value:
do \
{ \
if (m_wallet->multisig() && !m_wallet->is_multisig_enabled()) \
{ \
er.message = "This wallet is multisig, and multisig is disabled. Multisig is an experimental feature and may have bugs. Things that could go wrong include: funds sent to a multisig wallet can't be spent at all, can only be spent with the participation of a malicious group member, or can be stolen by a malicious group member. You can enable it by running this once in monero-wallet-cli: set enable-multisig-experimental 1"; \
return false; \
} \
} while(0)
#define WALLET_RPC_ERROR_CODE_DISABLED
Definition wallet_rpc_server_error_codes.h:81

◆ DEFAULT_AUTO_REFRESH_PERIOD

#define DEFAULT_AUTO_REFRESH_PERIOD   20

◆ MKDIR

#define MKDIR ( path,
mode )
Value:
mkdir(path, mode)
static int mode
Definition mdb_dump.c:26

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "wallet.rpc"

◆ PRE_VALIDATE_BACKGROUND_SYNC

#define PRE_VALIDATE_BACKGROUND_SYNC ( )
Value:
do \
{ \
if (!m_wallet) { return not_open(er); } \
if (m_restricted) \
{ \
er.message = "Command unavailable in restricted mode."; \
return false; \
} \
if (m_wallet->key_on_device()) \
{ \
er.message = "Command not supported by HW wallet"; \
return false; \
} \
if (m_wallet->multisig()) \
{ \
er.message = "Multisig wallet cannot enable background sync"; \
return false; \
} \
if (m_wallet->watch_only()) \
{ \
er.message = "Watch-only wallet cannot enable background sync"; \
return false; \
} \
} while (0)
#define WALLET_RPC_ERROR_CODE_WATCH_ONLY
Definition wallet_rpc_server_error_codes.h:62
#define WALLET_RPC_ERROR_CODE_DENIED
Definition wallet_rpc_server_error_codes.h:40
#define WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR
Definition wallet_rpc_server_error_codes.h:34

◆ REFRESH_INDICATIVE_BLOCK_CHUNK_SIZE

#define REFRESH_INDICATIVE_BLOCK_CHUNK_SIZE   256

Function Documentation

◆ main()

int main ( int argc,
char ** argv )