Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,007 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
RPCResult::Type::OBJ, | RPCResult::Type::OBJ, | ||||
"", | "", | ||||
"", | "", | ||||
{{ | {{ | ||||
{RPCResult::Type::STR, "walletname", "the wallet name"}, | {RPCResult::Type::STR, "walletname", "the wallet name"}, | ||||
{RPCResult::Type::NUM, "walletversion", "the wallet version"}, | {RPCResult::Type::NUM, "walletversion", "the wallet version"}, | ||||
{RPCResult::Type::STR_AMOUNT, "balance", | {RPCResult::Type::STR_AMOUNT, "balance", | ||||
"DEPRECATED. Identical to getbalances().mine.trusted"}, | "DEPRECATED. Identical to getbalances().mine.trusted"}, | ||||
{RPCResult::Type::STR, "format", | |||||
"the database format (bdb or sqlite)"}, | |||||
{RPCResult::Type::STR_AMOUNT, "unconfirmed_balance", | {RPCResult::Type::STR_AMOUNT, "unconfirmed_balance", | ||||
"DEPRECATED. Identical to " | "DEPRECATED. Identical to " | ||||
"getbalances().mine.untrusted_pending"}, | "getbalances().mine.untrusted_pending"}, | ||||
{RPCResult::Type::STR_AMOUNT, "immature_balance", | {RPCResult::Type::STR_AMOUNT, "immature_balance", | ||||
"DEPRECATED. Identical to getbalances().mine.immature"}, | "DEPRECATED. Identical to getbalances().mine.immature"}, | ||||
{RPCResult::Type::NUM, "txcount", | {RPCResult::Type::NUM, "txcount", | ||||
"the total number of transactions in the wallet"}, | "the total number of transactions in the wallet"}, | ||||
{RPCResult::Type::NUM_TIME, "keypoololdest", | {RPCResult::Type::NUM_TIME, "keypoololdest", | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
UniValue obj(UniValue::VOBJ); | UniValue obj(UniValue::VOBJ); | ||||
size_t kpExternalSize = pwallet->KeypoolCountExternalKeys(); | size_t kpExternalSize = pwallet->KeypoolCountExternalKeys(); | ||||
const auto bal = pwallet->GetBalance(); | const auto bal = pwallet->GetBalance(); | ||||
int64_t kp_oldest = pwallet->GetOldestKeyPoolTime(); | int64_t kp_oldest = pwallet->GetOldestKeyPoolTime(); | ||||
obj.pushKV("walletname", pwallet->GetName()); | obj.pushKV("walletname", pwallet->GetName()); | ||||
obj.pushKV("walletversion", pwallet->GetVersion()); | obj.pushKV("walletversion", pwallet->GetVersion()); | ||||
obj.pushKV("format", pwallet->GetDatabase().Format()); | |||||
obj.pushKV("balance", bal.m_mine_trusted); | obj.pushKV("balance", bal.m_mine_trusted); | ||||
obj.pushKV("unconfirmed_balance", bal.m_mine_untrusted_pending); | obj.pushKV("unconfirmed_balance", bal.m_mine_untrusted_pending); | ||||
obj.pushKV("immature_balance", bal.m_mine_immature); | obj.pushKV("immature_balance", bal.m_mine_immature); | ||||
obj.pushKV("txcount", (int)pwallet->mapWallet.size()); | obj.pushKV("txcount", (int)pwallet->mapWallet.size()); | ||||
if (kp_oldest > 0) { | if (kp_oldest > 0) { | ||||
obj.pushKV("keypoololdest", kp_oldest); | obj.pushKV("keypoololdest", kp_oldest); | ||||
} | } | ||||
obj.pushKV("keypoolsize", (int64_t)kpExternalSize); | obj.pushKV("keypoolsize", (int64_t)kpExternalSize); | ||||
▲ Show 20 Lines • Show All 2,353 Lines • Show Last 20 Lines |