From 1a0a10d96c4a8e76bb30748fa7c4e47729523021 Mon Sep 17 00:00:00 2001 From: bthomee Date: Tue, 18 Nov 2025 17:24:33 -0800 Subject: [PATCH] deploy: ad37461ab2e3057d1aa2bd8208027284f176a98b --- AMMInfo_8cpp_source.html | 517 +++--- AccountChannels_8cpp_source.html | 399 ++--- AccountCurrenciesHandler_8cpp_source.html | 4 +- AccountInfo_8cpp_source.html | 551 +++---- AccountLines_8cpp_source.html | 489 +++--- AccountObjects_8cpp_source.html | 755 +++++---- AccountOffers_8cpp_source.html | 339 ++-- AccountTx_8cpp_source.html | 4 +- BookOffers_8cpp_source.html | 429 ++--- Config__test_8cpp_source.html | 2 +- DepositAuthorized_8cpp_source.html | 4 +- GRPCHandlers_8h_source.html | 2 +- GRPCServer_8cpp_source.html | 2 +- GatewayBalances_8cpp_source.html | 4 +- GetAggregatePrice_8cpp_source.html | 4 +- Handler_8cpp_source.html | 26 +- Handlers_8h_source.html | 26 +- KeyGeneration__test_8cpp_source.html | 2 +- LedgerData_8cpp_source.html | 393 ++--- LedgerDiff_8cpp_source.html | 4 +- LedgerEntry_8cpp_source.html | 6 +- LedgerHandler_8cpp_source.html | 6 +- LedgerRequest_8cpp_source.html | 2 +- NFTOffers_8cpp_source.html | 333 ++-- NoRippleCheck_8cpp_source.html | 375 ++--- PayChanClaim_8cpp_source.html | 2 +- PermissionedDEX__test_8cpp_source.html | 4 +- RPCHelpers_8cpp_source.html | 1424 +++++------------ RPCHelpers_8h_source.html | 152 +- RPCHelpers__test_8cpp_source.html | 2 +- RPCLedgerHelpers_8cpp_source.html | 627 ++++++++ RPCLedgerHelpers_8h_source.html | 179 +++ RelationalDatabase_8h_source.html | 4 +- RipplePathFind_8cpp_source.html | 4 +- SlotImp_8h_source.html | 2 +- SociDB__test_8cpp_source.html | 2 +- Subscribe_8cpp_source.html | 2 +- TransactionEntry_8cpp_source.html | 4 +- TransactionSign_8cpp_source.html | 2 +- Unsubscribe_8cpp_source.html | 2 +- ValidatorList__test_8cpp_source.html | 2 +- VaultInfo_8cpp_source.html | 4 +- WalletPropose_8cpp_source.html | 4 +- apply__test_8cpp_source.html | 4 +- base__uint_8h_source.html | 2 +- ...t_1_1unit__test_1_1detail_1_1reporter.html | 2 +- classbeast_1_1unit__test_1_1recorder.html | 2 +- classbeast_1_1unit__test_1_1runner.html | 2 +- classripple_1_1SlabAllocator.html | 2 +- ...ipple_1_1test_1_1multi__runner__child.html | 2 +- cluster__test_8cpp_source.html | 2 +- comparators_8h_source.html | 2 +- dir_f2000200ababdfebbc57680f92fa09d7.html | 4 + envconfig_8h_source.html | 2 +- namespacemembers_f.html | 3 +- namespacemembers_func_g.html | 2 +- namespacemembers_g.html | 2 +- namespacemembers_i.html | 2 +- namespacemembers_t.html | 2 +- namespaceripple.html | 108 +- namespaceripple_1_1RPC.html | 571 +++---- search/all_10.js | 2 +- search/all_13.js | 2 +- search/all_17.js | 2 +- search/all_1b.js | 2 +- search/all_1c.js | 2 +- search/all_1d.js | 2 +- search/all_d.js | 4 +- search/all_e.js | 2 +- search/functions_15.js | 2 +- search/functions_7.js | 2 +- search/functions_9.js | 2 +- src_2test_2jtx_2amount_8h_source.html | 2 +- structripple_1_1test_1_1jtx_1_1XRP__t.html | 4 +- ...c_2handlers_2LedgerHeader_8cpp_source.html | 4 +- 75 files changed, 4049 insertions(+), 3801 deletions(-) create mode 100644 RPCLedgerHelpers_8cpp_source.html create mode 100644 RPCLedgerHelpers_8h_source.html diff --git a/AMMInfo_8cpp_source.html b/AMMInfo_8cpp_source.html index 5b33f67564..b6ff049b5e 100644 --- a/AMMInfo_8cpp_source.html +++ b/AMMInfo_8cpp_source.html @@ -85,264 +85,265 @@ $(document).ready(function() { init_codefold(0); });
2#include <xrpld/app/misc/AMMUtils.h>
3#include <xrpld/rpc/Context.h>
4#include <xrpld/rpc/detail/RPCHelpers.h>
-
5
-
6#include <xrpl/json/json_value.h>
-
7#include <xrpl/ledger/ReadView.h>
-
8#include <xrpl/protocol/AMMCore.h>
-
9#include <xrpl/protocol/Issue.h>
-
10
-
11#include <grpcpp/support/status.h>
-
12
-
13namespace ripple {
-
14
-
15std::optional<AccountID>
-
- -
17{
-
18 std::string strIdent(v.asString());
-
19 AccountID accountID;
-
20
-
21 if (auto jv = RPC::accountFromString(accountID, strIdent))
-
22 {
-
23 for (auto it = jv.begin(); it != jv.end(); ++it)
-
24 result[it.memberName()] = (*it);
-
25
-
26 return std::nullopt;
-
27 }
-
28 return std::optional<AccountID>(accountID);
-
29}
+
5#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
+
6
+
7#include <xrpl/json/json_value.h>
+
8#include <xrpl/ledger/ReadView.h>
+
9#include <xrpl/protocol/AMMCore.h>
+
10#include <xrpl/protocol/Issue.h>
+
11
+
12#include <grpcpp/support/status.h>
+
13
+
14namespace ripple {
+
15
+ +
+ +
18{
+
19 std::string strIdent(v.asString());
+
20 AccountID accountID;
+
21
+
22 if (auto jv = RPC::accountFromString(accountID, strIdent))
+
23 {
+
24 for (auto it = jv.begin(); it != jv.end(); ++it)
+
25 result[it.memberName()] = (*it);
+
26
+
27 return std::nullopt;
+
28 }
+
29 return std::optional<AccountID>(accountID);
+
30}
-
30
-
31Expected<Issue, error_code_i>
-
- -
33{
-
34 try
-
35 {
-
36 return issueFromJson(v);
-
37 }
-
38 catch (std::runtime_error const& ex)
-
39 {
-
40 JLOG(j.debug()) << "getIssue " << ex.what();
-
41 }
- -
43}
+
31
+
32Expected<Issue, error_code_i>
+
+ +
34{
+
35 try
+
36 {
+
37 return issueFromJson(v);
+
38 }
+
39 catch (std::runtime_error const& ex)
+
40 {
+
41 JLOG(j.debug()) << "getIssue " << ex.what();
+
42 }
+ +
44}
-
44
- -
- -
47{
-
48 // 2000-01-01 00:00:00 UTC is 946684800s from 1970-01-01 00:00:00 UTC
-
49 using namespace std::chrono;
-
50 return date::format(
-
51 "%Y-%Om-%dT%H:%M:%OS%z",
-
52 date::sys_time<system_clock::duration>(
-
53 system_clock::time_point{tp.time_since_epoch() + epoch_offset}));
-
54}
+
45
+ +
+ +
48{
+
49 // 2000-01-01 00:00:00 UTC is 946684800s from 1970-01-01 00:00:00 UTC
+
50 using namespace std::chrono;
+
51 return date::format(
+
52 "%Y-%Om-%dT%H:%M:%OS%z",
+
53 date::sys_time<system_clock::duration>(
+
54 system_clock::time_point{tp.time_since_epoch() + epoch_offset}));
+
55}
-
55
- -
- -
58{
-
59 auto const& params(context.params);
-
60 Json::Value result;
-
61
- -
63 result = RPC::lookupLedger(ledger, context);
-
64 if (!ledger)
-
65 return result;
-
66
-
67 struct ValuesFromContextParams
-
68 {
- -
70 Issue issue1;
-
71 Issue issue2;
- -
73 };
-
74
-
75 auto getValuesFromContextParams =
- - - - - -
81
-
82 constexpr auto invalid = [](Json::Value const& params) -> bool {
-
83 return (params.isMember(jss::asset) !=
-
84 params.isMember(jss::asset2)) ||
-
85 (params.isMember(jss::asset) ==
-
86 params.isMember(jss::amm_account));
-
87 };
-
88
-
89 // NOTE, identical check for apVersion >= 3 below
-
90 if (context.apiVersion < 3 && invalid(params))
- -
92
-
93 if (params.isMember(jss::asset))
-
94 {
-
95 if (auto const i = getIssue(params[jss::asset], context.j))
-
96 issue1 = *i;
-
97 else
-
98 return Unexpected(i.error());
-
99 }
-
100
-
101 if (params.isMember(jss::asset2))
-
102 {
-
103 if (auto const i = getIssue(params[jss::asset2], context.j))
-
104 issue2 = *i;
-
105 else
-
106 return Unexpected(i.error());
-
107 }
-
108
-
109 if (params.isMember(jss::amm_account))
-
110 {
-
111 auto const id = getAccount(params[jss::amm_account], result);
-
112 if (!id)
- -
114 auto const sle = ledger->read(keylet::account(*id));
-
115 if (!sle)
- -
117 ammID = sle->getFieldH256(sfAMMID);
-
118 if (ammID->isZero())
- -
120 }
-
121
-
122 if (params.isMember(jss::account))
-
123 {
-
124 accountID = getAccount(params[jss::account], result);
-
125 if (!accountID || !ledger->read(keylet::account(*accountID)))
- -
127 }
-
128
-
129 // NOTE, identical check for apVersion < 3 above
-
130 if (context.apiVersion >= 3 && invalid(params))
- -
132
-
133 XRPL_ASSERT(
-
134 (issue1.has_value() == issue2.has_value()) &&
-
135 (issue1.has_value() != ammID.has_value()),
-
136 "ripple::doAMMInfo : issue1 and issue2 do match");
-
137
-
138 auto const ammKeylet = [&]() {
-
139 if (issue1 && issue2)
-
140 return keylet::amm(*issue1, *issue2);
-
141 XRPL_ASSERT(ammID, "ripple::doAMMInfo::ammKeylet : ammID is set");
-
142 return keylet::amm(*ammID);
-
143 }();
-
144 auto const amm = ledger->read(ammKeylet);
-
145 if (!amm)
- -
147 if (!issue1 && !issue2)
-
148 {
-
149 issue1 = (*amm)[sfAsset].get<Issue>();
-
150 issue2 = (*amm)[sfAsset2].get<Issue>();
-
151 }
-
152
-
153 return ValuesFromContextParams{
-
154 accountID, *issue1, *issue2, std::move(amm)};
-
155 };
-
156
-
157 auto const r = getValuesFromContextParams();
-
158 if (!r)
-
159 {
-
160 RPC::inject_error(r.error(), result);
-
161 return result;
-
162 }
-
163
-
164 auto const& [accountID, issue1, issue2, amm] = *r;
-
165
-
166 auto const ammAccountID = amm->getAccountID(sfAccount);
-
167
-
168 // provide funds if frozen, specify asset_frozen flag
-
169 auto const [asset1Balance, asset2Balance] = ammPoolHolds(
-
170 *ledger,
-
171 ammAccountID,
-
172 issue1,
-
173 issue2,
- -
175 context.j);
-
176 auto const lptAMMBalance = accountID
-
177 ? ammLPHolds(*ledger, *amm, *accountID, context.j)
-
178 : (*amm)[sfLPTokenBalance];
-
179
-
180 Json::Value ammResult;
-
181 asset1Balance.setJson(ammResult[jss::amount]);
-
182 asset2Balance.setJson(ammResult[jss::amount2]);
-
183 lptAMMBalance.setJson(ammResult[jss::lp_token]);
-
184 ammResult[jss::trading_fee] = (*amm)[sfTradingFee];
-
185 ammResult[jss::account] = to_string(ammAccountID);
-
186 Json::Value voteSlots(Json::arrayValue);
-
187 if (amm->isFieldPresent(sfVoteSlots))
-
188 {
-
189 for (auto const& voteEntry : amm->getFieldArray(sfVoteSlots))
-
190 {
-
191 Json::Value vote;
-
192 vote[jss::account] = to_string(voteEntry.getAccountID(sfAccount));
-
193 vote[jss::trading_fee] = voteEntry[sfTradingFee];
-
194 vote[jss::vote_weight] = voteEntry[sfVoteWeight];
-
195 voteSlots.append(std::move(vote));
-
196 }
-
197 }
-
198 if (voteSlots.size() > 0)
-
199 ammResult[jss::vote_slots] = std::move(voteSlots);
-
200 XRPL_ASSERT(
-
201 !ledger->rules().enabled(fixInnerObjTemplate) ||
-
202 amm->isFieldPresent(sfAuctionSlot),
-
203 "ripple::doAMMInfo : auction slot is set");
-
204 if (amm->isFieldPresent(sfAuctionSlot))
-
205 {
-
206 auto const& auctionSlot =
-
207 static_cast<STObject const&>(amm->peekAtField(sfAuctionSlot));
-
208 if (auctionSlot.isFieldPresent(sfAccount))
-
209 {
-
210 Json::Value auction;
-
211 auto const timeSlot = ammAuctionTimeSlot(
-
212 ledger->info().parentCloseTime.time_since_epoch().count(),
-
213 auctionSlot);
-
214 auction[jss::time_interval] =
-
215 timeSlot ? *timeSlot : AUCTION_SLOT_TIME_INTERVALS;
-
216 auctionSlot[sfPrice].setJson(auction[jss::price]);
-
217 auction[jss::discounted_fee] = auctionSlot[sfDiscountedFee];
-
218 auction[jss::account] =
-
219 to_string(auctionSlot.getAccountID(sfAccount));
-
220 auction[jss::expiration] = to_iso8601(NetClock::time_point{
-
221 NetClock::duration{auctionSlot[sfExpiration]}});
-
222 if (auctionSlot.isFieldPresent(sfAuthAccounts))
-
223 {
-
224 Json::Value auth;
-
225 for (auto const& acct :
-
226 auctionSlot.getFieldArray(sfAuthAccounts))
-
227 {
-
228 Json::Value jv;
-
229 jv[jss::account] = to_string(acct.getAccountID(sfAccount));
-
230 auth.append(jv);
-
231 }
-
232 auction[jss::auth_accounts] = auth;
-
233 }
-
234 ammResult[jss::auction_slot] = std::move(auction);
-
235 }
-
236 }
-
237
-
238 if (!isXRP(asset1Balance))
-
239 ammResult[jss::asset_frozen] =
-
240 isFrozen(*ledger, ammAccountID, issue1.currency, issue1.account);
-
241 if (!isXRP(asset2Balance))
-
242 ammResult[jss::asset2_frozen] =
-
243 isFrozen(*ledger, ammAccountID, issue2.currency, issue2.account);
-
244
-
245 result[jss::amm] = std::move(ammResult);
-
246 if (!result.isMember(jss::ledger_index) &&
-
247 !result.isMember(jss::ledger_hash))
-
248 result[jss::ledger_current_index] = ledger->info().seq;
-
249 result[jss::validated] = context.ledgerMaster.isValidated(*ledger);
-
250
-
251 return result;
-
252}
+
56
+ +
+ +
59{
+
60 auto const& params(context.params);
+
61 Json::Value result;
+
62
+ +
64 result = RPC::lookupLedger(ledger, context);
+
65 if (!ledger)
+
66 return result;
+
67
+
68 struct ValuesFromContextParams
+
69 {
+ +
71 Issue issue1;
+
72 Issue issue2;
+ +
74 };
+
75
+
76 auto getValuesFromContextParams =
+ + + + + +
82
+
83 constexpr auto invalid = [](Json::Value const& params) -> bool {
+
84 return (params.isMember(jss::asset) !=
+
85 params.isMember(jss::asset2)) ||
+
86 (params.isMember(jss::asset) ==
+
87 params.isMember(jss::amm_account));
+
88 };
+
89
+
90 // NOTE, identical check for apVersion >= 3 below
+
91 if (context.apiVersion < 3 && invalid(params))
+ +
93
+
94 if (params.isMember(jss::asset))
+
95 {
+
96 if (auto const i = getIssue(params[jss::asset], context.j))
+
97 issue1 = *i;
+
98 else
+
99 return Unexpected(i.error());
+
100 }
+
101
+
102 if (params.isMember(jss::asset2))
+
103 {
+
104 if (auto const i = getIssue(params[jss::asset2], context.j))
+
105 issue2 = *i;
+
106 else
+
107 return Unexpected(i.error());
+
108 }
+
109
+
110 if (params.isMember(jss::amm_account))
+
111 {
+
112 auto const id = getAccount(params[jss::amm_account], result);
+
113 if (!id)
+ +
115 auto const sle = ledger->read(keylet::account(*id));
+
116 if (!sle)
+ +
118 ammID = sle->getFieldH256(sfAMMID);
+
119 if (ammID->isZero())
+ +
121 }
+
122
+
123 if (params.isMember(jss::account))
+
124 {
+
125 accountID = getAccount(params[jss::account], result);
+
126 if (!accountID || !ledger->read(keylet::account(*accountID)))
+ +
128 }
+
129
+
130 // NOTE, identical check for apVersion < 3 above
+
131 if (context.apiVersion >= 3 && invalid(params))
+ +
133
+
134 XRPL_ASSERT(
+
135 (issue1.has_value() == issue2.has_value()) &&
+
136 (issue1.has_value() != ammID.has_value()),
+
137 "ripple::doAMMInfo : issue1 and issue2 do match");
+
138
+
139 auto const ammKeylet = [&]() {
+
140 if (issue1 && issue2)
+
141 return keylet::amm(*issue1, *issue2);
+
142 XRPL_ASSERT(ammID, "ripple::doAMMInfo::ammKeylet : ammID is set");
+
143 return keylet::amm(*ammID);
+
144 }();
+
145 auto const amm = ledger->read(ammKeylet);
+
146 if (!amm)
+ +
148 if (!issue1 && !issue2)
+
149 {
+
150 issue1 = (*amm)[sfAsset].get<Issue>();
+
151 issue2 = (*amm)[sfAsset2].get<Issue>();
+
152 }
+
153
+
154 return ValuesFromContextParams{
+
155 accountID, *issue1, *issue2, std::move(amm)};
+
156 };
+
157
+
158 auto const r = getValuesFromContextParams();
+
159 if (!r)
+
160 {
+
161 RPC::inject_error(r.error(), result);
+
162 return result;
+
163 }
+
164
+
165 auto const& [accountID, issue1, issue2, amm] = *r;
+
166
+
167 auto const ammAccountID = amm->getAccountID(sfAccount);
+
168
+
169 // provide funds if frozen, specify asset_frozen flag
+
170 auto const [asset1Balance, asset2Balance] = ammPoolHolds(
+
171 *ledger,
+
172 ammAccountID,
+
173 issue1,
+
174 issue2,
+ +
176 context.j);
+
177 auto const lptAMMBalance = accountID
+
178 ? ammLPHolds(*ledger, *amm, *accountID, context.j)
+
179 : (*amm)[sfLPTokenBalance];
+
180
+
181 Json::Value ammResult;
+
182 asset1Balance.setJson(ammResult[jss::amount]);
+
183 asset2Balance.setJson(ammResult[jss::amount2]);
+
184 lptAMMBalance.setJson(ammResult[jss::lp_token]);
+
185 ammResult[jss::trading_fee] = (*amm)[sfTradingFee];
+
186 ammResult[jss::account] = to_string(ammAccountID);
+
187 Json::Value voteSlots(Json::arrayValue);
+
188 if (amm->isFieldPresent(sfVoteSlots))
+
189 {
+
190 for (auto const& voteEntry : amm->getFieldArray(sfVoteSlots))
+
191 {
+
192 Json::Value vote;
+
193 vote[jss::account] = to_string(voteEntry.getAccountID(sfAccount));
+
194 vote[jss::trading_fee] = voteEntry[sfTradingFee];
+
195 vote[jss::vote_weight] = voteEntry[sfVoteWeight];
+
196 voteSlots.append(std::move(vote));
+
197 }
+
198 }
+
199 if (voteSlots.size() > 0)
+
200 ammResult[jss::vote_slots] = std::move(voteSlots);
+
201 XRPL_ASSERT(
+
202 !ledger->rules().enabled(fixInnerObjTemplate) ||
+
203 amm->isFieldPresent(sfAuctionSlot),
+
204 "ripple::doAMMInfo : auction slot is set");
+
205 if (amm->isFieldPresent(sfAuctionSlot))
+
206 {
+
207 auto const& auctionSlot =
+
208 static_cast<STObject const&>(amm->peekAtField(sfAuctionSlot));
+
209 if (auctionSlot.isFieldPresent(sfAccount))
+
210 {
+
211 Json::Value auction;
+
212 auto const timeSlot = ammAuctionTimeSlot(
+
213 ledger->info().parentCloseTime.time_since_epoch().count(),
+
214 auctionSlot);
+
215 auction[jss::time_interval] =
+
216 timeSlot ? *timeSlot : AUCTION_SLOT_TIME_INTERVALS;
+
217 auctionSlot[sfPrice].setJson(auction[jss::price]);
+
218 auction[jss::discounted_fee] = auctionSlot[sfDiscountedFee];
+
219 auction[jss::account] =
+
220 to_string(auctionSlot.getAccountID(sfAccount));
+
221 auction[jss::expiration] = to_iso8601(NetClock::time_point{
+
222 NetClock::duration{auctionSlot[sfExpiration]}});
+
223 if (auctionSlot.isFieldPresent(sfAuthAccounts))
+
224 {
+
225 Json::Value auth;
+
226 for (auto const& acct :
+
227 auctionSlot.getFieldArray(sfAuthAccounts))
+
228 {
+
229 Json::Value jv;
+
230 jv[jss::account] = to_string(acct.getAccountID(sfAccount));
+
231 auth.append(jv);
+
232 }
+
233 auction[jss::auth_accounts] = auth;
+
234 }
+
235 ammResult[jss::auction_slot] = std::move(auction);
+
236 }
+
237 }
+
238
+
239 if (!isXRP(asset1Balance))
+
240 ammResult[jss::asset_frozen] =
+
241 isFrozen(*ledger, ammAccountID, issue1.currency, issue1.account);
+
242 if (!isXRP(asset2Balance))
+
243 ammResult[jss::asset2_frozen] =
+
244 isFrozen(*ledger, ammAccountID, issue2.currency, issue2.account);
+
245
+
246 result[jss::amm] = std::move(ammResult);
+
247 if (!result.isMember(jss::ledger_index) &&
+
248 !result.isMember(jss::ledger_hash))
+
249 result[jss::ledger_current_index] = ledger->info().seq;
+
250 result[jss::validated] = context.ledgerMaster.isValidated(*ledger);
+
251
+
252 return result;
+
253}
-
253
-
254} // namespace ripple
+
254
+
255} // namespace ripple
Represents a JSON value.
Definition json_value.h:131
Value & append(Value const &value)
Append value to array at the end.
@@ -362,7 +363,7 @@ $(document).ready(function() { init_codefold(0); });
@ arrayValue
array value (ordered list)
Definition json_value.h:26
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Definition ErrorCodes.h:214
Json::Value accountFromString(AccountID &result, std::string const &strIdent, bool bStrict)
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
Keylet amm(Asset const &issue1, Asset const &issue2) noexcept
AMM entry.
Definition Indexes.cpp:427
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:165
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
@@ -375,8 +376,8 @@ $(document).ready(function() { init_codefold(0); });
@ rpcACT_MALFORMED
Definition ErrorCodes.h:71
@ rpcINVALID_PARAMS
Definition ErrorCodes.h:65
Issue getIssue(T const &amt)
-
std::optional< AccountID > getAccount(Json::Value const &v, Json::Value &result)
Definition AMMInfo.cpp:16
-
Json::Value doAMMInfo(RPC::JsonContext &context)
Definition AMMInfo.cpp:57
+
std::optional< AccountID > getAccount(Json::Value const &v, Json::Value &result)
Definition AMMInfo.cpp:17
+
Json::Value doAMMInfo(RPC::JsonContext &context)
Definition AMMInfo.cpp:58
bool isFrozen(ReadView const &view, AccountID const &account, Currency const &currency, AccountID const &issuer)
Definition View.cpp:228
STAmount ammLPHolds(ReadView const &view, Currency const &cur1, Currency const &cur2, AccountID const &ammAccount, AccountID const &lpAccount, beast::Journal const j)
Get the balance of LP tokens.
Definition AMMUtils.cpp:94
Issue issueFromJson(Json::Value const &v)
Definition Issue.cpp:76
@@ -384,7 +385,7 @@ $(document).ready(function() { init_codefold(0); });
@ invalid
Timely, but invalid signature.
static constexpr std::chrono::seconds epoch_offset
Clock for measuring the network time.
Definition chrono.h:36
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611
-
std::string to_iso8601(NetClock::time_point tp)
Definition AMMInfo.cpp:46
+
std::string to_iso8601(NetClock::time_point tp)
Definition AMMInfo.cpp:47
T has_value(T... args)
diff --git a/AccountChannels_8cpp_source.html b/AccountChannels_8cpp_source.html index ca66fc4cc4..5774a5a02b 100644 --- a/AccountChannels_8cpp_source.html +++ b/AccountChannels_8cpp_source.html @@ -83,204 +83,205 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpld/rpc/Context.h>
2#include <xrpld/rpc/detail/RPCHelpers.h>
-
3#include <xrpld/rpc/detail/Tuning.h>
-
4
-
5#include <xrpl/ledger/ReadView.h>
-
6#include <xrpl/ledger/View.h>
-
7#include <xrpl/protocol/ErrorCodes.h>
-
8#include <xrpl/protocol/PublicKey.h>
-
9#include <xrpl/protocol/RPCErr.h>
-
10#include <xrpl/protocol/jss.h>
-
11#include <xrpl/resource/Fees.h>
-
12
-
13namespace ripple {
-
14
-
15void
-
-
16addChannel(Json::Value& jsonLines, SLE const& line)
-
17{
-
18 Json::Value& jDst(jsonLines.append(Json::objectValue));
-
19 jDst[jss::channel_id] = to_string(line.key());
-
20 jDst[jss::account] = to_string(line[sfAccount]);
-
21 jDst[jss::destination_account] = to_string(line[sfDestination]);
-
22 jDst[jss::amount] = line[sfAmount].getText();
-
23 jDst[jss::balance] = line[sfBalance].getText();
-
24 if (publicKeyType(line[sfPublicKey]))
-
25 {
-
26 PublicKey const pk(line[sfPublicKey]);
-
27 jDst[jss::public_key] = toBase58(TokenType::AccountPublic, pk);
-
28 jDst[jss::public_key_hex] = strHex(pk);
-
29 }
-
30 jDst[jss::settle_delay] = line[sfSettleDelay];
-
31 if (auto const& v = line[~sfExpiration])
-
32 jDst[jss::expiration] = *v;
-
33 if (auto const& v = line[~sfCancelAfter])
-
34 jDst[jss::cancel_after] = *v;
-
35 if (auto const& v = line[~sfSourceTag])
-
36 jDst[jss::source_tag] = *v;
-
37 if (auto const& v = line[~sfDestinationTag])
-
38 jDst[jss::destination_tag] = *v;
-
39}
+
3#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
+
4#include <xrpld/rpc/detail/Tuning.h>
+
5
+
6#include <xrpl/ledger/ReadView.h>
+
7#include <xrpl/ledger/View.h>
+
8#include <xrpl/protocol/ErrorCodes.h>
+
9#include <xrpl/protocol/PublicKey.h>
+
10#include <xrpl/protocol/RPCErr.h>
+
11#include <xrpl/protocol/jss.h>
+
12#include <xrpl/resource/Fees.h>
+
13
+
14namespace ripple {
+
15
+
16void
+
+
17addChannel(Json::Value& jsonLines, SLE const& line)
+
18{
+
19 Json::Value& jDst(jsonLines.append(Json::objectValue));
+
20 jDst[jss::channel_id] = to_string(line.key());
+
21 jDst[jss::account] = to_string(line[sfAccount]);
+
22 jDst[jss::destination_account] = to_string(line[sfDestination]);
+
23 jDst[jss::amount] = line[sfAmount].getText();
+
24 jDst[jss::balance] = line[sfBalance].getText();
+
25 if (publicKeyType(line[sfPublicKey]))
+
26 {
+
27 PublicKey const pk(line[sfPublicKey]);
+
28 jDst[jss::public_key] = toBase58(TokenType::AccountPublic, pk);
+
29 jDst[jss::public_key_hex] = strHex(pk);
+
30 }
+
31 jDst[jss::settle_delay] = line[sfSettleDelay];
+
32 if (auto const& v = line[~sfExpiration])
+
33 jDst[jss::expiration] = *v;
+
34 if (auto const& v = line[~sfCancelAfter])
+
35 jDst[jss::cancel_after] = *v;
+
36 if (auto const& v = line[~sfSourceTag])
+
37 jDst[jss::source_tag] = *v;
+
38 if (auto const& v = line[~sfDestinationTag])
+
39 jDst[jss::destination_tag] = *v;
+
40}
-
40
-
41// {
-
42// account: <account>
-
43// ledger_hash : <ledger>
-
44// ledger_index : <ledger_index>
-
45// limit: integer // optional
-
46// marker: opaque // optional, resume previous query
-
47// }
- -
- -
50{
-
51 auto const& params(context.params);
-
52 if (!params.isMember(jss::account))
-
53 return RPC::missing_field_error(jss::account);
-
54
-
55 if (!params[jss::account].isString())
-
56 return RPC::invalid_field_error(jss::account);
-
57
- -
59 auto result = RPC::lookupLedger(ledger, context);
-
60 if (!ledger)
-
61 return result;
-
62
-
63 auto id = parseBase58<AccountID>(params[jss::account].asString());
-
64 if (!id)
-
65 {
- -
67 }
-
68 AccountID const accountID{std::move(id.value())};
-
69
-
70 if (!ledger->exists(keylet::account(accountID)))
- -
72
-
73 std::string strDst;
-
74 if (params.isMember(jss::destination_account))
-
75 strDst = params[jss::destination_account].asString();
-
76
-
77 auto const raDstAccount = [&]() -> std::optional<AccountID> {
-
78 return strDst.empty() ? std::nullopt : parseBase58<AccountID>(strDst);
-
79 }();
-
80 if (!strDst.empty() && !raDstAccount)
- -
82
-
83 unsigned int limit;
-
84 if (auto err = readLimitField(limit, RPC::Tuning::accountChannels, context))
-
85 return *err;
-
86
-
87 Json::Value jsonChannels{Json::arrayValue};
-
88 struct VisitData
-
89 {
- -
91 AccountID const& accountID;
-
92 std::optional<AccountID> const& raDstAccount;
-
93 };
-
94 VisitData visitData = {{}, accountID, raDstAccount};
-
95 visitData.items.reserve(limit);
-
96 uint256 startAfter = beast::zero;
-
97 std::uint64_t startHint = 0;
-
98
-
99 if (params.isMember(jss::marker))
-
100 {
-
101 if (!params[jss::marker].isString())
-
102 return RPC::expected_field_error(jss::marker, "string");
-
103
-
104 // Marker is composed of a comma separated index and start hint. The
-
105 // former will be read as hex, and the latter using boost lexical cast.
-
106 std::stringstream marker(params[jss::marker].asString());
-
107 std::string value;
-
108 if (!std::getline(marker, value, ','))
- -
110
-
111 if (!startAfter.parseHex(value))
- -
113
-
114 if (!std::getline(marker, value, ','))
- -
116
-
117 try
-
118 {
-
119 startHint = boost::lexical_cast<std::uint64_t>(value);
-
120 }
-
121 catch (boost::bad_lexical_cast&)
-
122 {
- -
124 }
-
125
-
126 // We then must check if the object pointed to by the marker is actually
-
127 // owned by the account in the request.
-
128 auto const sle = ledger->read({ltANY, startAfter});
-
129
-
130 if (!sle)
- -
132
-
133 if (!RPC::isRelatedToAccount(*ledger, sle, accountID))
- -
135 }
-
136
-
137 auto count = 0;
-
138 std::optional<uint256> marker = {};
-
139 std::uint64_t nextHint = 0;
-
140 if (!forEachItemAfter(
-
141 *ledger,
-
142 accountID,
-
143 startAfter,
-
144 startHint,
-
145 limit + 1,
-
146 [&visitData, &accountID, &count, &limit, &marker, &nextHint](
-
147 std::shared_ptr<SLE const> const& sleCur) {
-
148 if (!sleCur)
-
149 {
-
150 // LCOV_EXCL_START
-
151 UNREACHABLE("ripple::doAccountChannels : null SLE");
-
152 return false;
-
153 // LCOV_EXCL_STOP
-
154 }
-
155
-
156 if (++count == limit)
-
157 {
-
158 marker = sleCur->key();
-
159 nextHint = RPC::getStartHint(sleCur, visitData.accountID);
-
160 }
-
161
-
162 if (count <= limit && sleCur->getType() == ltPAYCHAN &&
-
163 (*sleCur)[sfAccount] == accountID &&
-
164 (!visitData.raDstAccount ||
-
165 *visitData.raDstAccount == (*sleCur)[sfDestination]))
-
166 {
-
167 visitData.items.emplace_back(sleCur);
-
168 }
-
169
-
170 return true;
-
171 }))
-
172 {
- -
174 }
-
175
-
176 // Both conditions need to be checked because marker is set on the limit-th
-
177 // item, but if there is no item on the limit + 1 iteration, then there is
-
178 // no need to return a marker.
-
179 if (count == limit + 1 && marker)
-
180 {
-
181 result[jss::limit] = limit;
-
182 result[jss::marker] =
-
183 to_string(*marker) + "," + std::to_string(nextHint);
-
184 }
-
185
-
186 result[jss::account] = toBase58(accountID);
-
187
-
188 for (auto const& item : visitData.items)
-
189 addChannel(jsonChannels, *item);
-
190
- -
192 result[jss::channels] = std::move(jsonChannels);
-
193 return result;
-
194}
+
41
+
42// {
+
43// account: <account>
+
44// ledger_hash : <ledger>
+
45// ledger_index : <ledger_index>
+
46// limit: integer // optional
+
47// marker: opaque // optional, resume previous query
+
48// }
+ +
+ +
51{
+
52 auto const& params(context.params);
+
53 if (!params.isMember(jss::account))
+
54 return RPC::missing_field_error(jss::account);
+
55
+
56 if (!params[jss::account].isString())
+
57 return RPC::invalid_field_error(jss::account);
+
58
+ +
60 auto result = RPC::lookupLedger(ledger, context);
+
61 if (!ledger)
+
62 return result;
+
63
+
64 auto id = parseBase58<AccountID>(params[jss::account].asString());
+
65 if (!id)
+
66 {
+ +
68 }
+
69 AccountID const accountID{std::move(id.value())};
+
70
+
71 if (!ledger->exists(keylet::account(accountID)))
+ +
73
+
74 std::string strDst;
+
75 if (params.isMember(jss::destination_account))
+
76 strDst = params[jss::destination_account].asString();
+
77
+
78 auto const raDstAccount = [&]() -> std::optional<AccountID> {
+
79 return strDst.empty() ? std::nullopt : parseBase58<AccountID>(strDst);
+
80 }();
+
81 if (!strDst.empty() && !raDstAccount)
+ +
83
+
84 unsigned int limit;
+
85 if (auto err = readLimitField(limit, RPC::Tuning::accountChannels, context))
+
86 return *err;
+
87
+
88 Json::Value jsonChannels{Json::arrayValue};
+
89 struct VisitData
+
90 {
+ +
92 AccountID const& accountID;
+
93 std::optional<AccountID> const& raDstAccount;
+
94 };
+
95 VisitData visitData = {{}, accountID, raDstAccount};
+
96 visitData.items.reserve(limit);
+
97 uint256 startAfter = beast::zero;
+
98 std::uint64_t startHint = 0;
+
99
+
100 if (params.isMember(jss::marker))
+
101 {
+
102 if (!params[jss::marker].isString())
+
103 return RPC::expected_field_error(jss::marker, "string");
+
104
+
105 // Marker is composed of a comma separated index and start hint. The
+
106 // former will be read as hex, and the latter using boost lexical cast.
+
107 std::stringstream marker(params[jss::marker].asString());
+
108 std::string value;
+
109 if (!std::getline(marker, value, ','))
+ +
111
+
112 if (!startAfter.parseHex(value))
+ +
114
+
115 if (!std::getline(marker, value, ','))
+ +
117
+
118 try
+
119 {
+
120 startHint = boost::lexical_cast<std::uint64_t>(value);
+
121 }
+
122 catch (boost::bad_lexical_cast&)
+
123 {
+ +
125 }
+
126
+
127 // We then must check if the object pointed to by the marker is actually
+
128 // owned by the account in the request.
+
129 auto const sle = ledger->read({ltANY, startAfter});
+
130
+
131 if (!sle)
+ +
133
+
134 if (!RPC::isRelatedToAccount(*ledger, sle, accountID))
+ +
136 }
+
137
+
138 auto count = 0;
+
139 std::optional<uint256> marker = {};
+
140 std::uint64_t nextHint = 0;
+
141 if (!forEachItemAfter(
+
142 *ledger,
+
143 accountID,
+
144 startAfter,
+
145 startHint,
+
146 limit + 1,
+
147 [&visitData, &accountID, &count, &limit, &marker, &nextHint](
+
148 std::shared_ptr<SLE const> const& sleCur) {
+
149 if (!sleCur)
+
150 {
+
151 // LCOV_EXCL_START
+
152 UNREACHABLE("ripple::doAccountChannels : null SLE");
+
153 return false;
+
154 // LCOV_EXCL_STOP
+
155 }
+
156
+
157 if (++count == limit)
+
158 {
+
159 marker = sleCur->key();
+
160 nextHint = RPC::getStartHint(sleCur, visitData.accountID);
+
161 }
+
162
+
163 if (count <= limit && sleCur->getType() == ltPAYCHAN &&
+
164 (*sleCur)[sfAccount] == accountID &&
+
165 (!visitData.raDstAccount ||
+
166 *visitData.raDstAccount == (*sleCur)[sfDestination]))
+
167 {
+
168 visitData.items.emplace_back(sleCur);
+
169 }
+
170
+
171 return true;
+
172 }))
+
173 {
+ +
175 }
+
176
+
177 // Both conditions need to be checked because marker is set on the limit-th
+
178 // item, but if there is no item on the limit + 1 iteration, then there is
+
179 // no need to return a marker.
+
180 if (count == limit + 1 && marker)
+
181 {
+
182 result[jss::limit] = limit;
+
183 result[jss::marker] =
+
184 to_string(*marker) + "," + std::to_string(nextHint);
+
185 }
+
186
+
187 result[jss::account] = toBase58(accountID);
+
188
+
189 for (auto const& item : visitData.items)
+
190 addChannel(jsonChannels, *item);
+
191
+ +
193 result[jss::channels] = std::move(jsonChannels);
+
194 return result;
+
195}
-
195
-
196} // namespace ripple
+
196
+
197} // namespace ripple
Represents a JSON value.
Definition json_value.h:131
@@ -299,14 +300,14 @@ $(document).ready(function() { init_codefold(0); });
Json::Value invalid_field_error(std::string const &name)
Definition ErrorCodes.h:306
bool isRelatedToAccount(ReadView const &ledger, std::shared_ptr< SLE const > const &sle, AccountID const &accountID)
Tests if a SLE is owned by accountID.
Json::Value expected_field_error(std::string const &name, std::string const &type)
Definition ErrorCodes.h:330
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
std::uint64_t getStartHint(std::shared_ptr< SLE const > const &sle, AccountID const &accountID)
Gets the start hint for traversing account objects.
Json::Value missing_field_error(std::string const &name)
Definition ErrorCodes.h:264
Charge const feeMediumBurdenRPC
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:165
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
Definition AccountID.cpp:95
-
void addChannel(Json::Value &jsonLines, SLE const &line)
+
void addChannel(Json::Value &jsonLines, SLE const &line)
@ rpcACT_NOT_FOUND
Definition ErrorCodes.h:51
@ rpcACT_MALFORMED
Definition ErrorCodes.h:71
@@ -317,7 +318,7 @@ $(document).ready(function() { init_codefold(0); });
bool forEachItemAfter(ReadView const &view, Keylet const &root, uint256 const &after, std::uint64_t const hint, unsigned int limit, std::function< bool(std::shared_ptr< SLE const > const &)> const &f)
Iterate all items after an item in the given directory.
Definition View.cpp:665
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611
@ ltANY
A special type, matching any ledger entry type.
-
Json::Value doAccountChannels(RPC::JsonContext &context)
+
Json::Value doAccountChannels(RPC::JsonContext &context)
uint256 key
Definition Keylet.h:21
diff --git a/AccountCurrenciesHandler_8cpp_source.html b/AccountCurrenciesHandler_8cpp_source.html index a34ccae238..6297d856e2 100644 --- a/AccountCurrenciesHandler_8cpp_source.html +++ b/AccountCurrenciesHandler_8cpp_source.html @@ -83,7 +83,7 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpld/app/paths/TrustLine.h>
2#include <xrpld/rpc/Context.h>
-
3#include <xrpld/rpc/detail/RPCHelpers.h>
+
3#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
4
5#include <xrpl/ledger/ReadView.h>
6#include <xrpl/protocol/ErrorCodes.h>
@@ -173,7 +173,7 @@ $(document).ready(function() { init_codefold(0); });
@ arrayValue
array value (ordered list)
Definition json_value.h:26
Json::Value invalid_field_error(std::string const &name)
Definition ErrorCodes.h:306
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Definition ErrorCodes.h:214
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
Json::Value missing_field_error(std::string const &name)
Definition ErrorCodes.h:264
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:165
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
diff --git a/AccountInfo_8cpp_source.html b/AccountInfo_8cpp_source.html index 9579704576..8eb5e5edff 100644 --- a/AccountInfo_8cpp_source.html +++ b/AccountInfo_8cpp_source.html @@ -86,279 +86,280 @@ $(document).ready(function() { init_codefold(0); });
3#include <xrpld/rpc/Context.h>
4#include <xrpld/rpc/GRPCHandlers.h>
5#include <xrpld/rpc/detail/RPCHelpers.h>
-
6
-
7#include <xrpl/json/json_value.h>
-
8#include <xrpl/ledger/ReadView.h>
-
9#include <xrpl/protocol/ErrorCodes.h>
-
10#include <xrpl/protocol/Indexes.h>
-
11#include <xrpl/protocol/UintTypes.h>
-
12#include <xrpl/protocol/jss.h>
-
13
-
14namespace ripple {
-
15
-
16// {
-
17// account: <ident>,
-
18// ledger_hash : <ledger>
-
19// ledger_index : <ledger_index>
-
20// signer_lists : <bool> // optional (default false)
-
21// // if true return SignerList(s).
-
22// queue : <bool> // optional (default false)
-
23// // if true return information about transactions
-
24// // in the current TxQ, only if the requested
-
25// // ledger is open. Otherwise if true, returns an
-
26// // error.
-
27// }
-
28
-
29// TODO(tom): what is that "default"?
- -
- -
32{
-
33 auto& params = context.params;
-
34
-
35 std::string strIdent;
-
36 if (params.isMember(jss::account))
-
37 {
-
38 if (!params[jss::account].isString())
-
39 return RPC::invalid_field_error(jss::account);
-
40 strIdent = params[jss::account].asString();
-
41 }
-
42 else if (params.isMember(jss::ident))
-
43 {
-
44 if (!params[jss::ident].isString())
-
45 return RPC::invalid_field_error(jss::ident);
-
46 strIdent = params[jss::ident].asString();
-
47 }
-
48 else
-
49 return RPC::missing_field_error(jss::account);
-
50
- -
52 auto result = RPC::lookupLedger(ledger, context);
-
53
-
54 if (!ledger)
-
55 return result;
-
56
-
57 // Get info on account.
-
58 auto id = parseBase58<AccountID>(strIdent);
-
59 if (!id)
-
60 {
- -
62 return result;
-
63 }
-
64 auto const accountID{std::move(id.value())};
-
65
-
66 static constexpr std::
- -
68 lsFlags{
-
69 {{"defaultRipple", lsfDefaultRipple},
-
70 {"depositAuth", lsfDepositAuth},
-
71 {"disableMasterKey", lsfDisableMaster},
-
72 {"disallowIncomingXRP", lsfDisallowXRP},
-
73 {"globalFreeze", lsfGlobalFreeze},
-
74 {"noFreeze", lsfNoFreeze},
-
75 {"passwordSpent", lsfPasswordSpent},
-
76 {"requireAuthorization", lsfRequireAuth},
-
77 {"requireDestinationTag", lsfRequireDestTag}}};
-
78
-
79 static constexpr std::
- -
81 disallowIncomingFlags{
-
82 {{"disallowIncomingNFTokenOffer",
- -
84 {"disallowIncomingCheck", lsfDisallowIncomingCheck},
-
85 {"disallowIncomingPayChan", lsfDisallowIncomingPayChan},
-
86 {"disallowIncomingTrustline", lsfDisallowIncomingTrustline}}};
-
87
- -
89 allowTrustLineClawbackFlag{
-
90 "allowTrustLineClawback", lsfAllowTrustLineClawback};
-
91
- -
93 allowTrustLineLockingFlag{
-
94 "allowTrustLineLocking", lsfAllowTrustLineLocking};
-
95
-
96 auto const sleAccepted = ledger->read(keylet::account(accountID));
-
97 if (sleAccepted)
-
98 {
-
99 auto const queue =
-
100 params.isMember(jss::queue) && params[jss::queue].asBool();
-
101
-
102 if (queue && !ledger->open())
-
103 {
-
104 // It doesn't make sense to request the queue
-
105 // with any closed or validated ledger.
- -
107 return result;
-
108 }
-
109
-
110 Json::Value jvAccepted(Json::objectValue);
-
111 RPC::injectSLE(jvAccepted, *sleAccepted);
-
112 result[jss::account_data] = jvAccepted;
-
113
- -
115 for (auto const& lsf : lsFlags)
-
116 acctFlags[lsf.first.data()] = sleAccepted->isFlag(lsf.second);
-
117
-
118 if (ledger->rules().enabled(featureDisallowIncoming))
-
119 {
-
120 for (auto const& lsf : disallowIncomingFlags)
-
121 acctFlags[lsf.first.data()] = sleAccepted->isFlag(lsf.second);
-
122 }
-
123
-
124 if (ledger->rules().enabled(featureClawback))
-
125 acctFlags[allowTrustLineClawbackFlag.first.data()] =
-
126 sleAccepted->isFlag(allowTrustLineClawbackFlag.second);
-
127
-
128 if (ledger->rules().enabled(featureTokenEscrow))
-
129 acctFlags[allowTrustLineLockingFlag.first.data()] =
-
130 sleAccepted->isFlag(allowTrustLineLockingFlag.second);
-
131
-
132 result[jss::account_flags] = std::move(acctFlags);
-
133
-
134 // The document[https://xrpl.org/account_info.html#account_info] states
-
135 // that signer_lists is a bool, however assigning any string value
-
136 // works. Do not allow this. This check is for api Version 2 onwards
-
137 // only
-
138 if (context.apiVersion > 1u && params.isMember(jss::signer_lists) &&
-
139 !params[jss::signer_lists].isBool())
-
140 {
- -
142 return result;
-
143 }
-
144
-
145 // Return SignerList(s) if that is requested.
-
146 if (params.isMember(jss::signer_lists) &&
-
147 params[jss::signer_lists].asBool())
-
148 {
-
149 // We put the SignerList in an array because of an anticipated
-
150 // future when we support multiple signer lists on one account.
-
151 Json::Value jvSignerList = Json::arrayValue;
-
152
-
153 // This code will need to be revisited if in the future we support
-
154 // multiple SignerLists on one account.
-
155 auto const sleSigners = ledger->read(keylet::signers(accountID));
-
156 if (sleSigners)
-
157 jvSignerList.append(sleSigners->getJson(JsonOptions::none));
-
158
-
159 // Documentation states this is returned as part of the account_info
-
160 // response, but previously the code put it under account_data. We
-
161 // can move this to the documentated location from apiVersion 2
-
162 // onwards.
-
163 if (context.apiVersion == 1)
-
164 {
-
165 result[jss::account_data][jss::signer_lists] =
-
166 std::move(jvSignerList);
-
167 }
-
168 else
-
169 {
-
170 result[jss::signer_lists] = std::move(jvSignerList);
-
171 }
-
172 }
-
173 // Return queue info if that is requested
-
174 if (queue)
-
175 {
-
176 Json::Value jvQueueData = Json::objectValue;
-
177
-
178 auto const txs = context.app.getTxQ().getAccountTxs(accountID);
-
179 if (!txs.empty())
-
180 {
-
181 jvQueueData[jss::txn_count] =
-
182 static_cast<Json::UInt>(txs.size());
-
183
-
184 auto& jvQueueTx = jvQueueData[jss::transactions];
-
185 jvQueueTx = Json::arrayValue;
-
186
-
187 std::uint32_t seqCount = 0;
-
188 std::uint32_t ticketCount = 0;
- - -
191 std::optional<std::uint32_t> lowestTicket;
-
192 std::optional<std::uint32_t> highestTicket;
-
193 bool anyAuthChanged = false;
-
194 XRPAmount totalSpend(0);
-
195
-
196 // We expect txs to be returned sorted by SeqProxy. Verify
-
197 // that with a couple of asserts.
-
198 SeqProxy prevSeqProxy = SeqProxy::sequence(0);
-
199 for (auto const& tx : txs)
-
200 {
- -
202
-
203 if (tx.seqProxy.isSeq())
-
204 {
-
205 XRPL_ASSERT(
-
206 prevSeqProxy < tx.seqProxy,
-
207 "rpple::doAccountInfo : first sorted proxy");
-
208 prevSeqProxy = tx.seqProxy;
-
209 jvTx[jss::seq] = tx.seqProxy.value();
-
210 ++seqCount;
-
211 if (!lowestSeq)
-
212 lowestSeq = tx.seqProxy.value();
-
213 highestSeq = tx.seqProxy.value();
-
214 }
-
215 else
-
216 {
-
217 XRPL_ASSERT(
-
218 prevSeqProxy < tx.seqProxy,
-
219 "rpple::doAccountInfo : second sorted proxy");
-
220 prevSeqProxy = tx.seqProxy;
-
221 jvTx[jss::ticket] = tx.seqProxy.value();
-
222 ++ticketCount;
-
223 if (!lowestTicket)
-
224 lowestTicket = tx.seqProxy.value();
-
225 highestTicket = tx.seqProxy.value();
-
226 }
-
227
-
228 jvTx[jss::fee_level] = to_string(tx.feeLevel);
-
229 if (tx.lastValid)
-
230 jvTx[jss::LastLedgerSequence] = *tx.lastValid;
-
231
-
232 jvTx[jss::fee] = to_string(tx.consequences.fee());
-
233 auto const spend = tx.consequences.potentialSpend() +
-
234 tx.consequences.fee();
-
235 jvTx[jss::max_spend_drops] = to_string(spend);
-
236 totalSpend += spend;
-
237 bool const authChanged = tx.consequences.isBlocker();
-
238 if (authChanged)
-
239 anyAuthChanged = authChanged;
-
240 jvTx[jss::auth_change] = authChanged;
-
241
-
242 jvQueueTx.append(std::move(jvTx));
-
243 }
-
244
-
245 if (seqCount)
-
246 jvQueueData[jss::sequence_count] = seqCount;
-
247 if (ticketCount)
-
248 jvQueueData[jss::ticket_count] = ticketCount;
-
249 if (lowestSeq)
-
250 jvQueueData[jss::lowest_sequence] = *lowestSeq;
-
251 if (highestSeq)
-
252 jvQueueData[jss::highest_sequence] = *highestSeq;
-
253 if (lowestTicket)
-
254 jvQueueData[jss::lowest_ticket] = *lowestTicket;
-
255 if (highestTicket)
-
256 jvQueueData[jss::highest_ticket] = *highestTicket;
-
257
-
258 jvQueueData[jss::auth_change_queued] = anyAuthChanged;
-
259 jvQueueData[jss::max_spend_drops_total] = to_string(totalSpend);
-
260 }
-
261 else
-
262 jvQueueData[jss::txn_count] = 0u;
-
263
-
264 result[jss::queue_data] = std::move(jvQueueData);
-
265 }
-
266 }
-
267 else
-
268 {
-
269 result[jss::account] = toBase58(accountID);
- -
271 }
-
272
-
273 return result;
-
274}
+
6#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
+
7
+
8#include <xrpl/json/json_value.h>
+
9#include <xrpl/ledger/ReadView.h>
+
10#include <xrpl/protocol/ErrorCodes.h>
+
11#include <xrpl/protocol/Indexes.h>
+
12#include <xrpl/protocol/UintTypes.h>
+
13#include <xrpl/protocol/jss.h>
+
14
+
15namespace ripple {
+
16
+
17// {
+
18// account: <ident>,
+
19// ledger_hash : <ledger>
+
20// ledger_index : <ledger_index>
+
21// signer_lists : <bool> // optional (default false)
+
22// // if true return SignerList(s).
+
23// queue : <bool> // optional (default false)
+
24// // if true return information about transactions
+
25// // in the current TxQ, only if the requested
+
26// // ledger is open. Otherwise if true, returns an
+
27// // error.
+
28// }
+
29
+
30// TODO(tom): what is that "default"?
+ +
+ +
33{
+
34 auto& params = context.params;
+
35
+
36 std::string strIdent;
+
37 if (params.isMember(jss::account))
+
38 {
+
39 if (!params[jss::account].isString())
+
40 return RPC::invalid_field_error(jss::account);
+
41 strIdent = params[jss::account].asString();
+
42 }
+
43 else if (params.isMember(jss::ident))
+
44 {
+
45 if (!params[jss::ident].isString())
+
46 return RPC::invalid_field_error(jss::ident);
+
47 strIdent = params[jss::ident].asString();
+
48 }
+
49 else
+
50 return RPC::missing_field_error(jss::account);
+
51
+ +
53 auto result = RPC::lookupLedger(ledger, context);
+
54
+
55 if (!ledger)
+
56 return result;
+
57
+
58 // Get info on account.
+
59 auto id = parseBase58<AccountID>(strIdent);
+
60 if (!id)
+
61 {
+ +
63 return result;
+
64 }
+
65 auto const accountID{std::move(id.value())};
+
66
+
67 static constexpr std::
+ +
69 lsFlags{
+
70 {{"defaultRipple", lsfDefaultRipple},
+
71 {"depositAuth", lsfDepositAuth},
+
72 {"disableMasterKey", lsfDisableMaster},
+
73 {"disallowIncomingXRP", lsfDisallowXRP},
+
74 {"globalFreeze", lsfGlobalFreeze},
+
75 {"noFreeze", lsfNoFreeze},
+
76 {"passwordSpent", lsfPasswordSpent},
+
77 {"requireAuthorization", lsfRequireAuth},
+
78 {"requireDestinationTag", lsfRequireDestTag}}};
+
79
+
80 static constexpr std::
+ +
82 disallowIncomingFlags{
+
83 {{"disallowIncomingNFTokenOffer",
+ +
85 {"disallowIncomingCheck", lsfDisallowIncomingCheck},
+
86 {"disallowIncomingPayChan", lsfDisallowIncomingPayChan},
+
87 {"disallowIncomingTrustline", lsfDisallowIncomingTrustline}}};
+
88
+ +
90 allowTrustLineClawbackFlag{
+
91 "allowTrustLineClawback", lsfAllowTrustLineClawback};
+
92
+ +
94 allowTrustLineLockingFlag{
+
95 "allowTrustLineLocking", lsfAllowTrustLineLocking};
+
96
+
97 auto const sleAccepted = ledger->read(keylet::account(accountID));
+
98 if (sleAccepted)
+
99 {
+
100 auto const queue =
+
101 params.isMember(jss::queue) && params[jss::queue].asBool();
+
102
+
103 if (queue && !ledger->open())
+
104 {
+
105 // It doesn't make sense to request the queue
+
106 // with any closed or validated ledger.
+ +
108 return result;
+
109 }
+
110
+
111 Json::Value jvAccepted(Json::objectValue);
+
112 RPC::injectSLE(jvAccepted, *sleAccepted);
+
113 result[jss::account_data] = jvAccepted;
+
114
+ +
116 for (auto const& lsf : lsFlags)
+
117 acctFlags[lsf.first.data()] = sleAccepted->isFlag(lsf.second);
+
118
+
119 if (ledger->rules().enabled(featureDisallowIncoming))
+
120 {
+
121 for (auto const& lsf : disallowIncomingFlags)
+
122 acctFlags[lsf.first.data()] = sleAccepted->isFlag(lsf.second);
+
123 }
+
124
+
125 if (ledger->rules().enabled(featureClawback))
+
126 acctFlags[allowTrustLineClawbackFlag.first.data()] =
+
127 sleAccepted->isFlag(allowTrustLineClawbackFlag.second);
+
128
+
129 if (ledger->rules().enabled(featureTokenEscrow))
+
130 acctFlags[allowTrustLineLockingFlag.first.data()] =
+
131 sleAccepted->isFlag(allowTrustLineLockingFlag.second);
+
132
+
133 result[jss::account_flags] = std::move(acctFlags);
+
134
+
135 // The document[https://xrpl.org/account_info.html#account_info] states
+
136 // that signer_lists is a bool, however assigning any string value
+
137 // works. Do not allow this. This check is for api Version 2 onwards
+
138 // only
+
139 if (context.apiVersion > 1u && params.isMember(jss::signer_lists) &&
+
140 !params[jss::signer_lists].isBool())
+
141 {
+ +
143 return result;
+
144 }
+
145
+
146 // Return SignerList(s) if that is requested.
+
147 if (params.isMember(jss::signer_lists) &&
+
148 params[jss::signer_lists].asBool())
+
149 {
+
150 // We put the SignerList in an array because of an anticipated
+
151 // future when we support multiple signer lists on one account.
+
152 Json::Value jvSignerList = Json::arrayValue;
+
153
+
154 // This code will need to be revisited if in the future we support
+
155 // multiple SignerLists on one account.
+
156 auto const sleSigners = ledger->read(keylet::signers(accountID));
+
157 if (sleSigners)
+
158 jvSignerList.append(sleSigners->getJson(JsonOptions::none));
+
159
+
160 // Documentation states this is returned as part of the account_info
+
161 // response, but previously the code put it under account_data. We
+
162 // can move this to the documentated location from apiVersion 2
+
163 // onwards.
+
164 if (context.apiVersion == 1)
+
165 {
+
166 result[jss::account_data][jss::signer_lists] =
+
167 std::move(jvSignerList);
+
168 }
+
169 else
+
170 {
+
171 result[jss::signer_lists] = std::move(jvSignerList);
+
172 }
+
173 }
+
174 // Return queue info if that is requested
+
175 if (queue)
+
176 {
+
177 Json::Value jvQueueData = Json::objectValue;
+
178
+
179 auto const txs = context.app.getTxQ().getAccountTxs(accountID);
+
180 if (!txs.empty())
+
181 {
+
182 jvQueueData[jss::txn_count] =
+
183 static_cast<Json::UInt>(txs.size());
+
184
+
185 auto& jvQueueTx = jvQueueData[jss::transactions];
+
186 jvQueueTx = Json::arrayValue;
+
187
+
188 std::uint32_t seqCount = 0;
+
189 std::uint32_t ticketCount = 0;
+ + +
192 std::optional<std::uint32_t> lowestTicket;
+
193 std::optional<std::uint32_t> highestTicket;
+
194 bool anyAuthChanged = false;
+
195 XRPAmount totalSpend(0);
+
196
+
197 // We expect txs to be returned sorted by SeqProxy. Verify
+
198 // that with a couple of asserts.
+
199 SeqProxy prevSeqProxy = SeqProxy::sequence(0);
+
200 for (auto const& tx : txs)
+
201 {
+ +
203
+
204 if (tx.seqProxy.isSeq())
+
205 {
+
206 XRPL_ASSERT(
+
207 prevSeqProxy < tx.seqProxy,
+
208 "rpple::doAccountInfo : first sorted proxy");
+
209 prevSeqProxy = tx.seqProxy;
+
210 jvTx[jss::seq] = tx.seqProxy.value();
+
211 ++seqCount;
+
212 if (!lowestSeq)
+
213 lowestSeq = tx.seqProxy.value();
+
214 highestSeq = tx.seqProxy.value();
+
215 }
+
216 else
+
217 {
+
218 XRPL_ASSERT(
+
219 prevSeqProxy < tx.seqProxy,
+
220 "rpple::doAccountInfo : second sorted proxy");
+
221 prevSeqProxy = tx.seqProxy;
+
222 jvTx[jss::ticket] = tx.seqProxy.value();
+
223 ++ticketCount;
+
224 if (!lowestTicket)
+
225 lowestTicket = tx.seqProxy.value();
+
226 highestTicket = tx.seqProxy.value();
+
227 }
+
228
+
229 jvTx[jss::fee_level] = to_string(tx.feeLevel);
+
230 if (tx.lastValid)
+
231 jvTx[jss::LastLedgerSequence] = *tx.lastValid;
+
232
+
233 jvTx[jss::fee] = to_string(tx.consequences.fee());
+
234 auto const spend = tx.consequences.potentialSpend() +
+
235 tx.consequences.fee();
+
236 jvTx[jss::max_spend_drops] = to_string(spend);
+
237 totalSpend += spend;
+
238 bool const authChanged = tx.consequences.isBlocker();
+
239 if (authChanged)
+
240 anyAuthChanged = authChanged;
+
241 jvTx[jss::auth_change] = authChanged;
+
242
+
243 jvQueueTx.append(std::move(jvTx));
+
244 }
+
245
+
246 if (seqCount)
+
247 jvQueueData[jss::sequence_count] = seqCount;
+
248 if (ticketCount)
+
249 jvQueueData[jss::ticket_count] = ticketCount;
+
250 if (lowestSeq)
+
251 jvQueueData[jss::lowest_sequence] = *lowestSeq;
+
252 if (highestSeq)
+
253 jvQueueData[jss::highest_sequence] = *highestSeq;
+
254 if (lowestTicket)
+
255 jvQueueData[jss::lowest_ticket] = *lowestTicket;
+
256 if (highestTicket)
+
257 jvQueueData[jss::highest_ticket] = *highestTicket;
+
258
+
259 jvQueueData[jss::auth_change_queued] = anyAuthChanged;
+
260 jvQueueData[jss::max_spend_drops_total] = to_string(totalSpend);
+
261 }
+
262 else
+
263 jvQueueData[jss::txn_count] = 0u;
+
264
+
265 result[jss::queue_data] = std::move(jvQueueData);
+
266 }
+
267 }
+
268 else
+
269 {
+
270 result[jss::account] = toBase58(accountID);
+ +
272 }
+
273
+
274 return result;
+
275}
-
275
-
276} // namespace ripple
+
276
+
277} // namespace ripple
Represents a JSON value.
Definition json_value.h:131
Value & append(Value const &value)
Append value to array at the end.
@@ -373,9 +374,9 @@ $(document).ready(function() { init_codefold(0); });
@ objectValue
object value (collection of name/value pairs).
Definition json_value.h:27
unsigned int UInt
Json::Value invalid_field_error(std::string const &name)
Definition ErrorCodes.h:306
-
void injectSLE(Json::Value &jv, SLE const &sle)
Inject JSON describing ledger entry.
+
void injectSLE(Json::Value &jv, SLE const &sle)
Inject JSON describing ledger entry.
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Definition ErrorCodes.h:214
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
Json::Value missing_field_error(std::string const &name)
Definition ErrorCodes.h:264
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:165
Keylet signers(AccountID const &account) noexcept
A SignerList.
Definition Indexes.cpp:311
@@ -400,7 +401,7 @@ $(document).ready(function() { init_codefold(0); });
@ lsfGlobalFreeze
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611
-
Json::Value doAccountInfo(RPC::JsonContext &context)
+
Json::Value doAccountInfo(RPC::JsonContext &context)
diff --git a/AccountLines_8cpp_source.html b/AccountLines_8cpp_source.html index 6844dc605b..f644785272 100644 --- a/AccountLines_8cpp_source.html +++ b/AccountLines_8cpp_source.html @@ -84,249 +84,250 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpld/app/paths/TrustLine.h>
2#include <xrpld/rpc/Context.h>
3#include <xrpld/rpc/detail/RPCHelpers.h>
-
4#include <xrpld/rpc/detail/Tuning.h>
-
5
-
6#include <xrpl/ledger/ReadView.h>
-
7#include <xrpl/protocol/ErrorCodes.h>
-
8#include <xrpl/protocol/RPCErr.h>
-
9#include <xrpl/protocol/jss.h>
-
10#include <xrpl/resource/Fees.h>
-
11
-
12namespace ripple {
-
13
-
14void
-
-
15addLine(Json::Value& jsonLines, RPCTrustLine const& line)
-
16{
-
17 STAmount const& saBalance(line.getBalance());
-
18 STAmount const& saLimit(line.getLimit());
-
19 STAmount const& saLimitPeer(line.getLimitPeer());
-
20 Json::Value& jPeer(jsonLines.append(Json::objectValue));
-
21
-
22 jPeer[jss::account] = to_string(line.getAccountIDPeer());
-
23 // Amount reported is positive if current account holds other
-
24 // account's IOUs.
-
25 //
-
26 // Amount reported is negative if other account holds current
-
27 // account's IOUs.
-
28 jPeer[jss::balance] = saBalance.getText();
-
29 jPeer[jss::currency] = to_string(saBalance.issue().currency);
-
30 jPeer[jss::limit] = saLimit.getText();
-
31 jPeer[jss::limit_peer] = saLimitPeer.getText();
-
32 jPeer[jss::quality_in] = line.getQualityIn().value;
-
33 jPeer[jss::quality_out] = line.getQualityOut().value;
-
34 if (line.getAuth())
-
35 jPeer[jss::authorized] = true;
-
36 if (line.getAuthPeer())
-
37 jPeer[jss::peer_authorized] = true;
-
38 if (line.getNoRipple())
-
39 jPeer[jss::no_ripple] = true;
-
40 if (line.getNoRipplePeer())
-
41 jPeer[jss::no_ripple_peer] = true;
-
42 if (line.getFreeze())
-
43 jPeer[jss::freeze] = true;
-
44 if (line.getFreezePeer())
-
45 jPeer[jss::freeze_peer] = true;
-
46 if (line.getDeepFreeze())
-
47 jPeer[jss::deep_freeze] = true;
-
48 if (line.getDeepFreezePeer())
-
49 jPeer[jss::deep_freeze_peer] = true;
-
50}
+
4#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
+
5#include <xrpld/rpc/detail/Tuning.h>
+
6
+
7#include <xrpl/ledger/ReadView.h>
+
8#include <xrpl/protocol/ErrorCodes.h>
+
9#include <xrpl/protocol/RPCErr.h>
+
10#include <xrpl/protocol/jss.h>
+
11#include <xrpl/resource/Fees.h>
+
12
+
13namespace ripple {
+
14
+
15void
+
+
16addLine(Json::Value& jsonLines, RPCTrustLine const& line)
+
17{
+
18 STAmount const& saBalance(line.getBalance());
+
19 STAmount const& saLimit(line.getLimit());
+
20 STAmount const& saLimitPeer(line.getLimitPeer());
+
21 Json::Value& jPeer(jsonLines.append(Json::objectValue));
+
22
+
23 jPeer[jss::account] = to_string(line.getAccountIDPeer());
+
24 // Amount reported is positive if current account holds other
+
25 // account's IOUs.
+
26 //
+
27 // Amount reported is negative if other account holds current
+
28 // account's IOUs.
+
29 jPeer[jss::balance] = saBalance.getText();
+
30 jPeer[jss::currency] = to_string(saBalance.issue().currency);
+
31 jPeer[jss::limit] = saLimit.getText();
+
32 jPeer[jss::limit_peer] = saLimitPeer.getText();
+
33 jPeer[jss::quality_in] = line.getQualityIn().value;
+
34 jPeer[jss::quality_out] = line.getQualityOut().value;
+
35 if (line.getAuth())
+
36 jPeer[jss::authorized] = true;
+
37 if (line.getAuthPeer())
+
38 jPeer[jss::peer_authorized] = true;
+
39 if (line.getNoRipple())
+
40 jPeer[jss::no_ripple] = true;
+
41 if (line.getNoRipplePeer())
+
42 jPeer[jss::no_ripple_peer] = true;
+
43 if (line.getFreeze())
+
44 jPeer[jss::freeze] = true;
+
45 if (line.getFreezePeer())
+
46 jPeer[jss::freeze_peer] = true;
+
47 if (line.getDeepFreeze())
+
48 jPeer[jss::deep_freeze] = true;
+
49 if (line.getDeepFreezePeer())
+
50 jPeer[jss::deep_freeze_peer] = true;
+
51}
-
51
-
52// {
-
53// account: <account>
-
54// ledger_hash : <ledger>
-
55// ledger_index : <ledger_index>
-
56// limit: integer // optional
-
57// marker: opaque // optional, resume previous query
-
58// ignore_default: bool // do not return lines in default state (on
-
59// this account's side)
-
60// }
- -
- -
63{
-
64 auto const& params(context.params);
-
65 if (!params.isMember(jss::account))
-
66 return RPC::missing_field_error(jss::account);
-
67
-
68 if (!params[jss::account].isString())
-
69 return RPC::invalid_field_error(jss::account);
-
70
- -
72 auto result = RPC::lookupLedger(ledger, context);
-
73 if (!ledger)
-
74 return result;
-
75
-
76 auto id = parseBase58<AccountID>(params[jss::account].asString());
-
77 if (!id)
-
78 {
- -
80 return result;
-
81 }
-
82 auto const accountID{std::move(id.value())};
-
83
-
84 if (!ledger->exists(keylet::account(accountID)))
- -
86
-
87 std::string strPeer;
-
88 if (params.isMember(jss::peer))
-
89 strPeer = params[jss::peer].asString();
-
90
-
91 auto const raPeerAccount = [&]() -> std::optional<AccountID> {
-
92 return strPeer.empty() ? std::nullopt : parseBase58<AccountID>(strPeer);
-
93 }();
-
94 if (!strPeer.empty() && !raPeerAccount)
-
95 {
- -
97 return result;
-
98 }
-
99
-
100 unsigned int limit;
-
101 if (auto err = readLimitField(limit, RPC::Tuning::accountLines, context))
-
102 return *err;
-
103
-
104 // this flag allows the requester to ask incoming trustlines in default
-
105 // state be omitted
-
106 bool ignoreDefault = params.isMember(jss::ignore_default) &&
-
107 params[jss::ignore_default].asBool();
-
108
-
109 Json::Value& jsonLines(result[jss::lines] = Json::arrayValue);
-
110 struct VisitData
-
111 {
- -
113 AccountID const& accountID;
-
114 std::optional<AccountID> const& raPeerAccount;
-
115 bool ignoreDefault;
-
116 uint32_t foundCount;
-
117 };
-
118 VisitData visitData = {{}, accountID, raPeerAccount, ignoreDefault, 0};
-
119 uint256 startAfter = beast::zero;
-
120 std::uint64_t startHint = 0;
-
121
-
122 if (params.isMember(jss::marker))
-
123 {
-
124 if (!params[jss::marker].isString())
-
125 return RPC::expected_field_error(jss::marker, "string");
-
126
-
127 // Marker is composed of a comma separated index and start hint. The
-
128 // former will be read as hex, and the latter using boost lexical cast.
-
129 std::stringstream marker(params[jss::marker].asString());
-
130 std::string value;
-
131 if (!std::getline(marker, value, ','))
- -
133
-
134 if (!startAfter.parseHex(value))
- -
136
-
137 if (!std::getline(marker, value, ','))
- -
139
-
140 try
-
141 {
-
142 startHint = boost::lexical_cast<std::uint64_t>(value);
-
143 }
-
144 catch (boost::bad_lexical_cast&)
-
145 {
- -
147 }
-
148
-
149 // We then must check if the object pointed to by the marker is actually
-
150 // owned by the account in the request.
-
151 auto const sle = ledger->read({ltANY, startAfter});
-
152
-
153 if (!sle)
- -
155
-
156 if (!RPC::isRelatedToAccount(*ledger, sle, accountID))
- -
158 }
-
159
-
160 auto count = 0;
-
161 std::optional<uint256> marker = {};
-
162 std::uint64_t nextHint = 0;
-
163 {
-
164 if (!forEachItemAfter(
-
165 *ledger,
-
166 accountID,
-
167 startAfter,
-
168 startHint,
-
169 limit + 1,
-
170 [&visitData, &count, &marker, &limit, &nextHint](
-
171 std::shared_ptr<SLE const> const& sleCur) {
-
172 if (!sleCur)
-
173 {
-
174 // LCOV_EXCL_START
-
175 UNREACHABLE("ripple::doAccountLines : null SLE");
-
176 return false;
-
177 // LCOV_EXCL_STOP
-
178 }
-
179
-
180 if (++count == limit)
-
181 {
-
182 marker = sleCur->key();
-
183 nextHint =
-
184 RPC::getStartHint(sleCur, visitData.accountID);
-
185 }
-
186
-
187 if (sleCur->getType() != ltRIPPLE_STATE)
-
188 return true;
-
189
-
190 bool ignore = false;
-
191 if (visitData.ignoreDefault)
-
192 {
-
193 if (sleCur->getFieldAmount(sfLowLimit).getIssuer() ==
-
194 visitData.accountID)
-
195 ignore =
-
196 !(sleCur->getFieldU32(sfFlags) & lsfLowReserve);
-
197 else
-
198 ignore = !(
-
199 sleCur->getFieldU32(sfFlags) & lsfHighReserve);
-
200 }
-
201
-
202 if (!ignore && count <= limit)
-
203 {
-
204 auto const line =
-
205 RPCTrustLine::makeItem(visitData.accountID, sleCur);
-
206
-
207 if (line &&
-
208 (!visitData.raPeerAccount ||
-
209 *visitData.raPeerAccount ==
-
210 line->getAccountIDPeer()))
-
211 {
-
212 visitData.items.emplace_back(*line);
-
213 }
-
214 }
-
215
-
216 return true;
-
217 }))
-
218 {
- -
220 }
-
221 }
-
222
-
223 // Both conditions need to be checked because marker is set on the limit-th
-
224 // item, but if there is no item on the limit + 1 iteration, then there is
-
225 // no need to return a marker.
-
226 if (count == limit + 1 && marker)
-
227 {
-
228 result[jss::limit] = limit;
-
229 result[jss::marker] =
-
230 to_string(*marker) + "," + std::to_string(nextHint);
-
231 }
-
232
-
233 result[jss::account] = toBase58(accountID);
-
234
-
235 for (auto const& item : visitData.items)
-
236 addLine(jsonLines, item);
-
237
- -
239 return result;
-
240}
+
52
+
53// {
+
54// account: <account>
+
55// ledger_hash : <ledger>
+
56// ledger_index : <ledger_index>
+
57// limit: integer // optional
+
58// marker: opaque // optional, resume previous query
+
59// ignore_default: bool // do not return lines in default state (on
+
60// this account's side)
+
61// }
+ +
+ +
64{
+
65 auto const& params(context.params);
+
66 if (!params.isMember(jss::account))
+
67 return RPC::missing_field_error(jss::account);
+
68
+
69 if (!params[jss::account].isString())
+
70 return RPC::invalid_field_error(jss::account);
+
71
+ +
73 auto result = RPC::lookupLedger(ledger, context);
+
74 if (!ledger)
+
75 return result;
+
76
+
77 auto id = parseBase58<AccountID>(params[jss::account].asString());
+
78 if (!id)
+
79 {
+ +
81 return result;
+
82 }
+
83 auto const accountID{std::move(id.value())};
+
84
+
85 if (!ledger->exists(keylet::account(accountID)))
+ +
87
+
88 std::string strPeer;
+
89 if (params.isMember(jss::peer))
+
90 strPeer = params[jss::peer].asString();
+
91
+
92 auto const raPeerAccount = [&]() -> std::optional<AccountID> {
+
93 return strPeer.empty() ? std::nullopt : parseBase58<AccountID>(strPeer);
+
94 }();
+
95 if (!strPeer.empty() && !raPeerAccount)
+
96 {
+ +
98 return result;
+
99 }
+
100
+
101 unsigned int limit;
+
102 if (auto err = readLimitField(limit, RPC::Tuning::accountLines, context))
+
103 return *err;
+
104
+
105 // this flag allows the requester to ask incoming trustlines in default
+
106 // state be omitted
+
107 bool ignoreDefault = params.isMember(jss::ignore_default) &&
+
108 params[jss::ignore_default].asBool();
+
109
+
110 Json::Value& jsonLines(result[jss::lines] = Json::arrayValue);
+
111 struct VisitData
+
112 {
+ +
114 AccountID const& accountID;
+
115 std::optional<AccountID> const& raPeerAccount;
+
116 bool ignoreDefault;
+
117 uint32_t foundCount;
+
118 };
+
119 VisitData visitData = {{}, accountID, raPeerAccount, ignoreDefault, 0};
+
120 uint256 startAfter = beast::zero;
+
121 std::uint64_t startHint = 0;
+
122
+
123 if (params.isMember(jss::marker))
+
124 {
+
125 if (!params[jss::marker].isString())
+
126 return RPC::expected_field_error(jss::marker, "string");
+
127
+
128 // Marker is composed of a comma separated index and start hint. The
+
129 // former will be read as hex, and the latter using boost lexical cast.
+
130 std::stringstream marker(params[jss::marker].asString());
+
131 std::string value;
+
132 if (!std::getline(marker, value, ','))
+ +
134
+
135 if (!startAfter.parseHex(value))
+ +
137
+
138 if (!std::getline(marker, value, ','))
+ +
140
+
141 try
+
142 {
+
143 startHint = boost::lexical_cast<std::uint64_t>(value);
+
144 }
+
145 catch (boost::bad_lexical_cast&)
+
146 {
+ +
148 }
+
149
+
150 // We then must check if the object pointed to by the marker is actually
+
151 // owned by the account in the request.
+
152 auto const sle = ledger->read({ltANY, startAfter});
+
153
+
154 if (!sle)
+ +
156
+
157 if (!RPC::isRelatedToAccount(*ledger, sle, accountID))
+ +
159 }
+
160
+
161 auto count = 0;
+
162 std::optional<uint256> marker = {};
+
163 std::uint64_t nextHint = 0;
+
164 {
+
165 if (!forEachItemAfter(
+
166 *ledger,
+
167 accountID,
+
168 startAfter,
+
169 startHint,
+
170 limit + 1,
+
171 [&visitData, &count, &marker, &limit, &nextHint](
+
172 std::shared_ptr<SLE const> const& sleCur) {
+
173 if (!sleCur)
+
174 {
+
175 // LCOV_EXCL_START
+
176 UNREACHABLE("ripple::doAccountLines : null SLE");
+
177 return false;
+
178 // LCOV_EXCL_STOP
+
179 }
+
180
+
181 if (++count == limit)
+
182 {
+
183 marker = sleCur->key();
+
184 nextHint =
+
185 RPC::getStartHint(sleCur, visitData.accountID);
+
186 }
+
187
+
188 if (sleCur->getType() != ltRIPPLE_STATE)
+
189 return true;
+
190
+
191 bool ignore = false;
+
192 if (visitData.ignoreDefault)
+
193 {
+
194 if (sleCur->getFieldAmount(sfLowLimit).getIssuer() ==
+
195 visitData.accountID)
+
196 ignore =
+
197 !(sleCur->getFieldU32(sfFlags) & lsfLowReserve);
+
198 else
+
199 ignore = !(
+
200 sleCur->getFieldU32(sfFlags) & lsfHighReserve);
+
201 }
+
202
+
203 if (!ignore && count <= limit)
+
204 {
+
205 auto const line =
+
206 RPCTrustLine::makeItem(visitData.accountID, sleCur);
+
207
+
208 if (line &&
+
209 (!visitData.raPeerAccount ||
+
210 *visitData.raPeerAccount ==
+
211 line->getAccountIDPeer()))
+
212 {
+
213 visitData.items.emplace_back(*line);
+
214 }
+
215 }
+
216
+
217 return true;
+
218 }))
+
219 {
+ +
221 }
+
222 }
+
223
+
224 // Both conditions need to be checked because marker is set on the limit-th
+
225 // item, but if there is no item on the limit + 1 iteration, then there is
+
226 // no need to return a marker.
+
227 if (count == limit + 1 && marker)
+
228 {
+
229 result[jss::limit] = limit;
+
230 result[jss::marker] =
+
231 to_string(*marker) + "," + std::to_string(nextHint);
+
232 }
+
233
+
234 result[jss::account] = toBase58(accountID);
+
235
+
236 for (auto const& item : visitData.items)
+
237 addLine(jsonLines, item);
+
238
+ +
240 return result;
+
241}
-
241
-
242} // namespace ripple
+
242
+
243} // namespace ripple
Represents a JSON value.
Definition json_value.h:131
@@ -350,18 +351,18 @@ $(document).ready(function() { init_codefold(0); });
bool isRelatedToAccount(ReadView const &ledger, std::shared_ptr< SLE const > const &sle, AccountID const &accountID)
Tests if a SLE is owned by accountID.
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Definition ErrorCodes.h:214
Json::Value expected_field_error(std::string const &name, std::string const &type)
Definition ErrorCodes.h:330
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
std::uint64_t getStartHint(std::shared_ptr< SLE const > const &sle, AccountID const &accountID)
Gets the start hint for traversing account objects.
Json::Value missing_field_error(std::string const &name)
Definition ErrorCodes.h:264
Charge const feeMediumBurdenRPC
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:165
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
Definition AccountID.cpp:95
-
void addLine(Json::Value &jsonLines, RPCTrustLine const &line)
+
void addLine(Json::Value &jsonLines, RPCTrustLine const &line)
@ rpcACT_NOT_FOUND
Definition ErrorCodes.h:51
@ rpcACT_MALFORMED
Definition ErrorCodes.h:71
@ rpcINVALID_PARAMS
Definition ErrorCodes.h:65
-
Json::Value doAccountLines(RPC::JsonContext &context)
+
Json::Value doAccountLines(RPC::JsonContext &context)
Json::Value rpcError(int iError)
Definition RPCErr.cpp:12
diff --git a/AccountObjects_8cpp_source.html b/AccountObjects_8cpp_source.html index 922114ea2d..59b17a38c9 100644 --- a/AccountObjects_8cpp_source.html +++ b/AccountObjects_8cpp_source.html @@ -84,304 +84,509 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpld/app/tx/detail/NFTokenUtils.h>
2#include <xrpld/rpc/Context.h>
3#include <xrpld/rpc/detail/RPCHelpers.h>
-
4#include <xrpld/rpc/detail/Tuning.h>
-
5
-
6#include <xrpl/ledger/ReadView.h>
-
7#include <xrpl/protocol/ErrorCodes.h>
-
8#include <xrpl/protocol/Indexes.h>
-
9#include <xrpl/protocol/LedgerFormats.h>
-
10#include <xrpl/protocol/RPCErr.h>
-
11#include <xrpl/protocol/jss.h>
-
12#include <xrpl/protocol/nftPageMask.h>
-
13#include <xrpl/resource/Fees.h>
-
14
-
15#include <string>
-
16
-
17namespace ripple {
-
18
- -
- -
32{
-
33 auto const& params = context.params;
-
34 if (!params.isMember(jss::account))
-
35 return RPC::missing_field_error(jss::account);
-
36
-
37 if (!params[jss::account].isString())
-
38 return RPC::invalid_field_error(jss::account);
-
39
-
40 auto id = parseBase58<AccountID>(params[jss::account].asString());
-
41 if (!id)
-
42 {
- -
44 }
-
45
- -
47 auto result = RPC::lookupLedger(ledger, context);
-
48 if (ledger == nullptr)
-
49 return result;
-
50 auto const accountID{id.value()};
-
51
-
52 if (!ledger->exists(keylet::account(accountID)))
- -
54
-
55 unsigned int limit;
-
56 if (auto err = readLimitField(limit, RPC::Tuning::accountNFTokens, context))
-
57 return *err;
-
58
-
59 uint256 marker;
-
60 bool const markerSet = params.isMember(jss::marker);
-
61
-
62 if (markerSet)
-
63 {
-
64 auto const& m = params[jss::marker];
-
65 if (!m.isString())
-
66 return RPC::expected_field_error(jss::marker, "string");
-
67
-
68 if (!marker.parseHex(m.asString()))
-
69 return RPC::invalid_field_error(jss::marker);
-
70 }
-
71
-
72 auto const first = keylet::nftpage(keylet::nftpage_min(accountID), marker);
-
73 auto const last = keylet::nftpage_max(accountID);
-
74
-
75 auto cp = ledger->read(Keylet(
-
76 ltNFTOKEN_PAGE,
-
77 ledger->succ(first.key, last.key.next()).value_or(last.key)));
-
78
-
79 std::uint32_t cnt = 0;
-
80 auto& nfts = (result[jss::account_nfts] = Json::arrayValue);
-
81
-
82 // Continue iteration from the current page:
-
83 bool pastMarker = marker.isZero();
-
84 bool markerFound = false;
-
85 uint256 const maskedMarker = marker & nft::pageMask;
-
86 while (cp)
-
87 {
-
88 auto arr = cp->getFieldArray(sfNFTokens);
-
89
-
90 for (auto const& o : arr)
-
91 {
-
92 // Scrolling past the marker gets weird. We need to look at
-
93 // a couple of conditions.
-
94 //
-
95 // 1. If the low 96-bits don't match, then we compare only
-
96 // against the low 96-bits, since that's what determines
-
97 // the sort order of the pages.
-
98 //
-
99 // 2. However, within one page there can be a number of
-
100 // NFTokenIDs that all have the same low 96 bits. If we're
-
101 // in that case then we need to compare against the full
-
102 // 256 bits.
-
103 uint256 const nftokenID = o[sfNFTokenID];
-
104 uint256 const maskedNftokenID = nftokenID & nft::pageMask;
-
105
-
106 if (!pastMarker)
-
107 {
-
108 if (maskedNftokenID < maskedMarker)
-
109 continue;
-
110
-
111 if (maskedNftokenID == maskedMarker && nftokenID < marker)
-
112 continue;
-
113
-
114 if (nftokenID == marker)
-
115 {
-
116 markerFound = true;
-
117 continue;
-
118 }
-
119 }
-
120
-
121 if (markerSet && !markerFound)
-
122 return RPC::invalid_field_error(jss::marker);
-
123
-
124 pastMarker = true;
-
125
-
126 {
-
127 Json::Value& obj = nfts.append(o.getJson(JsonOptions::none));
-
128
-
129 // Pull out the components of the nft ID.
-
130 obj[sfFlags.jsonName] = nft::getFlags(nftokenID);
-
131 obj[sfIssuer.jsonName] = to_string(nft::getIssuer(nftokenID));
-
132 obj[sfNFTokenTaxon.jsonName] =
-
133 nft::toUInt32(nft::getTaxon(nftokenID));
-
134 obj[jss::nft_serial] = nft::getSerial(nftokenID);
-
135 if (std::uint16_t xferFee = {nft::getTransferFee(nftokenID)})
-
136 obj[sfTransferFee.jsonName] = xferFee;
-
137 }
-
138
-
139 if (++cnt == limit)
-
140 {
-
141 result[jss::limit] = limit;
-
142 result[jss::marker] = to_string(o.getFieldH256(sfNFTokenID));
-
143 return result;
-
144 }
-
145 }
-
146
-
147 if (auto npm = (*cp)[~sfNextPageMin])
-
148 cp = ledger->read(Keylet(ltNFTOKEN_PAGE, *npm));
-
149 else
-
150 cp = nullptr;
-
151 }
-
152
-
153 if (markerSet && !markerFound)
-
154 return RPC::invalid_field_error(jss::marker);
-
155
-
156 result[jss::account] = toBase58(accountID);
- -
158 return result;
-
159}
+
4#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
+
5#include <xrpld/rpc/detail/Tuning.h>
+
6
+
7#include <xrpl/ledger/ReadView.h>
+
8#include <xrpl/protocol/ErrorCodes.h>
+
9#include <xrpl/protocol/Indexes.h>
+
10#include <xrpl/protocol/LedgerFormats.h>
+
11#include <xrpl/protocol/RPCErr.h>
+
12#include <xrpl/protocol/jss.h>
+
13#include <xrpl/protocol/nftPageMask.h>
+
14#include <xrpl/resource/Fees.h>
+
15
+
16#include <string>
+
17
+
18namespace ripple {
+
19
+ +
+ +
33{
+
34 auto const& params = context.params;
+
35 if (!params.isMember(jss::account))
+
36 return RPC::missing_field_error(jss::account);
+
37
+
38 if (!params[jss::account].isString())
+
39 return RPC::invalid_field_error(jss::account);
+
40
+
41 auto id = parseBase58<AccountID>(params[jss::account].asString());
+
42 if (!id)
+
43 {
+ +
45 }
+
46
+ +
48 auto result = RPC::lookupLedger(ledger, context);
+
49 if (ledger == nullptr)
+
50 return result;
+
51 auto const accountID{id.value()};
+
52
+
53 if (!ledger->exists(keylet::account(accountID)))
+ +
55
+
56 unsigned int limit;
+
57 if (auto err = readLimitField(limit, RPC::Tuning::accountNFTokens, context))
+
58 return *err;
+
59
+
60 uint256 marker;
+
61 bool const markerSet = params.isMember(jss::marker);
+
62
+
63 if (markerSet)
+
64 {
+
65 auto const& m = params[jss::marker];
+
66 if (!m.isString())
+
67 return RPC::expected_field_error(jss::marker, "string");
+
68
+
69 if (!marker.parseHex(m.asString()))
+
70 return RPC::invalid_field_error(jss::marker);
+
71 }
+
72
+
73 auto const first = keylet::nftpage(keylet::nftpage_min(accountID), marker);
+
74 auto const last = keylet::nftpage_max(accountID);
+
75
+
76 auto cp = ledger->read(Keylet(
+
77 ltNFTOKEN_PAGE,
+
78 ledger->succ(first.key, last.key.next()).value_or(last.key)));
+
79
+
80 std::uint32_t cnt = 0;
+
81 auto& nfts = (result[jss::account_nfts] = Json::arrayValue);
+
82
+
83 // Continue iteration from the current page:
+
84 bool pastMarker = marker.isZero();
+
85 bool markerFound = false;
+
86 uint256 const maskedMarker = marker & nft::pageMask;
+
87 while (cp)
+
88 {
+
89 auto arr = cp->getFieldArray(sfNFTokens);
+
90
+
91 for (auto const& o : arr)
+
92 {
+
93 // Scrolling past the marker gets weird. We need to look at
+
94 // a couple of conditions.
+
95 //
+
96 // 1. If the low 96-bits don't match, then we compare only
+
97 // against the low 96-bits, since that's what determines
+
98 // the sort order of the pages.
+
99 //
+
100 // 2. However, within one page there can be a number of
+
101 // NFTokenIDs that all have the same low 96 bits. If we're
+
102 // in that case then we need to compare against the full
+
103 // 256 bits.
+
104 uint256 const nftokenID = o[sfNFTokenID];
+
105 uint256 const maskedNftokenID = nftokenID & nft::pageMask;
+
106
+
107 if (!pastMarker)
+
108 {
+
109 if (maskedNftokenID < maskedMarker)
+
110 continue;
+
111
+
112 if (maskedNftokenID == maskedMarker && nftokenID < marker)
+
113 continue;
+
114
+
115 if (nftokenID == marker)
+
116 {
+
117 markerFound = true;
+
118 continue;
+
119 }
+
120 }
+
121
+
122 if (markerSet && !markerFound)
+
123 return RPC::invalid_field_error(jss::marker);
+
124
+
125 pastMarker = true;
+
126
+
127 {
+
128 Json::Value& obj = nfts.append(o.getJson(JsonOptions::none));
+
129
+
130 // Pull out the components of the nft ID.
+
131 obj[sfFlags.jsonName] = nft::getFlags(nftokenID);
+
132 obj[sfIssuer.jsonName] = to_string(nft::getIssuer(nftokenID));
+
133 obj[sfNFTokenTaxon.jsonName] =
+
134 nft::toUInt32(nft::getTaxon(nftokenID));
+
135 obj[jss::nft_serial] = nft::getSerial(nftokenID);
+
136 if (std::uint16_t xferFee = {nft::getTransferFee(nftokenID)})
+
137 obj[sfTransferFee.jsonName] = xferFee;
+
138 }
+
139
+
140 if (++cnt == limit)
+
141 {
+
142 result[jss::limit] = limit;
+
143 result[jss::marker] = to_string(o.getFieldH256(sfNFTokenID));
+
144 return result;
+
145 }
+
146 }
+
147
+
148 if (auto npm = (*cp)[~sfNextPageMin])
+
149 cp = ledger->read(Keylet(ltNFTOKEN_PAGE, *npm));
+
150 else
+
151 cp = nullptr;
+
152 }
+
153
+
154 if (markerSet && !markerFound)
+
155 return RPC::invalid_field_error(jss::marker);
+
156
+
157 result[jss::account] = toBase58(accountID);
+ +
159 return result;
+
160}
-
160
- -
- -
163{
-
164 auto const& params = context.params;
-
165 if (!params.isMember(jss::account))
-
166 return RPC::missing_field_error(jss::account);
-
167
-
168 if (!params[jss::account].isString())
-
169 return RPC::invalid_field_error(jss::account);
-
170
- -
172 auto result = RPC::lookupLedger(ledger, context);
-
173 if (ledger == nullptr)
-
174 return result;
+
161
+
162bool
+
+ +
164 ReadView const& ledger,
+
165 AccountID const& account,
+ +
167 uint256 dirIndex,
+
168 uint256 entryIndex,
+
169 std::uint32_t const limit,
+
170 Json::Value& jvResult)
+
171{
+
172 // check if dirIndex is valid
+
173 if (!dirIndex.isZero() && !ledger.read({ltDIR_NODE, dirIndex}))
+
174 return false;
175
-
176 auto const id = parseBase58<AccountID>(params[jss::account].asString());
-
177 if (!id)
-
178 {
- -
180 return result;
-
181 }
-
182 auto const accountID{id.value()};
-
183
-
184 if (!ledger->exists(keylet::account(accountID)))
- -
186
- +
176 auto typeMatchesFilter = [](std::vector<LedgerEntryType> const& typeFilter,
+
177 LedgerEntryType ledgerType) {
+
178 auto it = std::find(typeFilter.begin(), typeFilter.end(), ledgerType);
+
179 return it != typeFilter.end();
+
180 };
+
181
+
182 // if dirIndex != 0, then all NFTs have already been returned. only
+
183 // iterate NFT pages if the filter says so AND dirIndex == 0
+
184 bool iterateNFTPages =
+
185 (!typeFilter.has_value() ||
+
186 typeMatchesFilter(typeFilter.value(), ltNFTOKEN_PAGE)) &&
+
187 dirIndex == beast::zero;
188
-
189 if (params.isMember(jss::deletion_blockers_only) &&
-
190 params[jss::deletion_blockers_only].asBool())
-
191 {
-
192 struct
-
193 {
- -
195 LedgerEntryType type;
-
196 } static constexpr deletionBlockers[] = {
-
197 {jss::check, ltCHECK},
-
198 {jss::escrow, ltESCROW},
-
199 {jss::nft_page, ltNFTOKEN_PAGE},
-
200 {jss::payment_channel, ltPAYCHAN},
-
201 {jss::state, ltRIPPLE_STATE},
-
202 {jss::xchain_owned_claim_id, ltXCHAIN_OWNED_CLAIM_ID},
-
203 {jss::xchain_owned_create_account_claim_id,
-
204 ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID},
-
205 {jss::bridge, ltBRIDGE},
-
206 {jss::mpt_issuance, ltMPTOKEN_ISSUANCE},
-
207 {jss::mptoken, ltMPTOKEN},
-
208 {jss::permissioned_domain, ltPERMISSIONED_DOMAIN},
-
209 {jss::vault, ltVAULT},
-
210 };
-
211
-
212 typeFilter.emplace();
-
213 typeFilter->reserve(std::size(deletionBlockers));
-
214
-
215 for (auto [name, type] : deletionBlockers)
-
216 {
-
217 if (params.isMember(jss::type) && name != params[jss::type])
-
218 {
-
219 continue;
-
220 }
+
189 Keylet const firstNFTPage = keylet::nftpage_min(account);
+
190
+
191 // we need to check the marker to see if it is an NFTTokenPage index.
+
192 if (iterateNFTPages && entryIndex != beast::zero)
+
193 {
+
194 // if it is we will try to iterate the pages up to the limit
+
195 // and then change over to the owner directory
+
196
+
197 if (firstNFTPage.key != (entryIndex & ~nft::pageMask))
+
198 iterateNFTPages = false;
+
199 }
+
200
+
201 auto& jvObjects = (jvResult[jss::account_objects] = Json::arrayValue);
+
202
+
203 // this is a mutable version of limit, used to seamlessly switch
+
204 // to iterating directory entries when nftokenpages are exhausted
+
205 uint32_t mlimit = limit;
+
206
+
207 // iterate NFTokenPages preferentially
+
208 if (iterateNFTPages)
+
209 {
+
210 Keylet const first = entryIndex == beast::zero
+
211 ? firstNFTPage
+
212 : Keylet{ltNFTOKEN_PAGE, entryIndex};
+
213
+
214 Keylet const last = keylet::nftpage_max(account);
+
215
+
216 // current key
+
217 uint256 ck = ledger.succ(first.key, last.key.next()).value_or(last.key);
+
218
+
219 // current page
+
220 auto cp = ledger.read(Keylet{ltNFTOKEN_PAGE, ck});
221
-
222 typeFilter->push_back(type);
-
223 }
-
224 }
-
225 else
-
226 {
-
227 auto [rpcStatus, type] = RPC::chooseLedgerEntryType(params);
-
228
- -
230 return RPC::invalid_field_error(jss::type);
-
231
-
232 if (rpcStatus)
-
233 {
-
234 result.clear();
-
235 rpcStatus.inject(result);
-
236 return result;
-
237 }
-
238 else if (type != ltANY)
-
239 {
-
240 typeFilter = std::vector<LedgerEntryType>({type});
-
241 }
-
242 }
+
222 while (cp)
+
223 {
+
224 jvObjects.append(cp->getJson(JsonOptions::none));
+
225 auto const npm = (*cp)[~sfNextPageMin];
+
226 if (npm)
+
227 cp = ledger.read(Keylet(ltNFTOKEN_PAGE, *npm));
+
228 else
+
229 cp = nullptr;
+
230
+
231 if (--mlimit == 0)
+
232 {
+
233 if (cp)
+
234 {
+
235 jvResult[jss::limit] = limit;
+
236 jvResult[jss::marker] = std::string("0,") + to_string(ck);
+
237 return true;
+
238 }
+
239 }
+
240
+
241 if (!npm)
+
242 break;
243
-
244 unsigned int limit;
-
245 if (auto err = readLimitField(limit, RPC::Tuning::accountObjects, context))
-
246 return *err;
-
247
-
248 uint256 dirIndex;
-
249 uint256 entryIndex;
-
250 if (params.isMember(jss::marker))
-
251 {
-
252 auto const& marker = params[jss::marker];
-
253 if (!marker.isString())
-
254 return RPC::expected_field_error(jss::marker, "string");
-
255
-
256 auto const& markerStr = marker.asString();
-
257 auto const& idx = markerStr.find(',');
-
258 if (idx == std::string::npos)
-
259 return RPC::invalid_field_error(jss::marker);
-
260
-
261 if (!dirIndex.parseHex(markerStr.substr(0, idx)))
-
262 return RPC::invalid_field_error(jss::marker);
-
263
-
264 if (!entryIndex.parseHex(markerStr.substr(idx + 1)))
-
265 return RPC::invalid_field_error(jss::marker);
-
266 }
-
267
- -
269 *ledger,
-
270 accountID,
-
271 typeFilter,
-
272 dirIndex,
-
273 entryIndex,
-
274 limit,
-
275 result))
-
276 return RPC::invalid_field_error(jss::marker);
-
277
-
278 result[jss::account] = toBase58(accountID);
- -
280 return result;
-
281}
+
244 ck = *npm;
+
245 }
+
246
+
247 // if execution reaches here then we're about to transition
+
248 // to iterating the root directory (and the conventional
+
249 // behaviour of this RPC function.) Therefore we should
+
250 // zero entryIndex so as not to terribly confuse things.
+
251 entryIndex = beast::zero;
+
252 }
+
253
+
254 auto const root = keylet::ownerDir(account);
+
255 auto found = false;
+
256
+
257 if (dirIndex.isZero())
+
258 {
+
259 dirIndex = root.key;
+
260 found = true;
+
261 }
+
262
+
263 auto dir = ledger.read({ltDIR_NODE, dirIndex});
+
264 if (!dir)
+
265 {
+
266 // it's possible the user had nftoken pages but no
+
267 // directory entries. If there's no nftoken page, we will
+
268 // give empty array for account_objects.
+
269 if (mlimit >= limit)
+
270 jvResult[jss::account_objects] = Json::arrayValue;
+
271
+
272 // non-zero dirIndex validity was checked in the beginning of this
+
273 // function; by this point, it should be zero. This function returns
+
274 // true regardless of nftoken page presence; if absent, account_objects
+
275 // is already set as an empty array. Notice we will only return false in
+
276 // this function when entryIndex can not be found, indicating an invalid
+
277 // marker error.
+
278 return true;
+
279 }
+
280
+
281 std::uint32_t i = 0;
+
282 for (;;)
+
283 {
+
284 auto const& entries = dir->getFieldV256(sfIndexes);
+
285 auto iter = entries.begin();
+
286
+
287 if (!found)
+
288 {
+
289 iter = std::find(iter, entries.end(), entryIndex);
+
290 if (iter == entries.end())
+
291 return false;
+
292
+
293 found = true;
+
294 }
+
295
+
296 // it's possible that the returned NFTPages exactly filled the
+
297 // response. Check for that condition.
+
298 if (i == mlimit && mlimit < limit)
+
299 {
+
300 jvResult[jss::limit] = limit;
+
301 jvResult[jss::marker] =
+
302 to_string(dirIndex) + ',' + to_string(*iter);
+
303 return true;
+
304 }
+
305
+
306 for (; iter != entries.end(); ++iter)
+
307 {
+
308 auto const sleNode = ledger.read(keylet::child(*iter));
+
309
+
310 if (!typeFilter.has_value() ||
+
311 typeMatchesFilter(typeFilter.value(), sleNode->getType()))
+
312 {
+
313 jvObjects.append(sleNode->getJson(JsonOptions::none));
+
314 }
+
315
+
316 if (++i == mlimit)
+
317 {
+
318 if (++iter != entries.end())
+
319 {
+
320 jvResult[jss::limit] = limit;
+
321 jvResult[jss::marker] =
+
322 to_string(dirIndex) + ',' + to_string(*iter);
+
323 return true;
+
324 }
+
325
+
326 break;
+
327 }
+
328 }
+
329
+
330 auto const nodeIndex = dir->getFieldU64(sfIndexNext);
+
331 if (nodeIndex == 0)
+
332 return true;
+
333
+
334 dirIndex = keylet::page(root, nodeIndex).key;
+
335 dir = ledger.read({ltDIR_NODE, dirIndex});
+
336 if (!dir)
+
337 return true;
+
338
+
339 if (i == mlimit)
+
340 {
+
341 auto const& e = dir->getFieldV256(sfIndexes);
+
342 if (!e.empty())
+
343 {
+
344 jvResult[jss::limit] = limit;
+
345 jvResult[jss::marker] =
+
346 to_string(dirIndex) + ',' + to_string(*e.begin());
+
347 }
+
348
+
349 return true;
+
350 }
+
351 }
+
352}
-
282
-
283} // namespace ripple
+
353
+ +
+ +
356{
+
357 auto const& params = context.params;
+
358 if (!params.isMember(jss::account))
+
359 return RPC::missing_field_error(jss::account);
+
360
+
361 if (!params[jss::account].isString())
+
362 return RPC::invalid_field_error(jss::account);
+
363
+ +
365 auto result = RPC::lookupLedger(ledger, context);
+
366 if (ledger == nullptr)
+
367 return result;
+
368
+
369 auto const id = parseBase58<AccountID>(params[jss::account].asString());
+
370 if (!id)
+
371 {
+ +
373 return result;
+
374 }
+
375 auto const accountID{id.value()};
+
376
+
377 if (!ledger->exists(keylet::account(accountID)))
+ +
379
+ +
381
+
382 if (params.isMember(jss::deletion_blockers_only) &&
+
383 params[jss::deletion_blockers_only].asBool())
+
384 {
+
385 struct
+
386 {
+ +
388 LedgerEntryType type;
+
389 } static constexpr deletionBlockers[] = {
+
390 {jss::check, ltCHECK},
+
391 {jss::escrow, ltESCROW},
+
392 {jss::nft_page, ltNFTOKEN_PAGE},
+
393 {jss::payment_channel, ltPAYCHAN},
+
394 {jss::state, ltRIPPLE_STATE},
+
395 {jss::xchain_owned_claim_id, ltXCHAIN_OWNED_CLAIM_ID},
+
396 {jss::xchain_owned_create_account_claim_id,
+
397 ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID},
+
398 {jss::bridge, ltBRIDGE},
+
399 {jss::mpt_issuance, ltMPTOKEN_ISSUANCE},
+
400 {jss::mptoken, ltMPTOKEN},
+
401 {jss::permissioned_domain, ltPERMISSIONED_DOMAIN},
+
402 {jss::vault, ltVAULT},
+
403 };
+
404
+
405 typeFilter.emplace();
+
406 typeFilter->reserve(std::size(deletionBlockers));
+
407
+
408 for (auto [name, type] : deletionBlockers)
+
409 {
+
410 if (params.isMember(jss::type) && name != params[jss::type])
+
411 {
+
412 continue;
+
413 }
+
414
+
415 typeFilter->push_back(type);
+
416 }
+
417 }
+
418 else
+
419 {
+
420 auto [rpcStatus, type] = RPC::chooseLedgerEntryType(params);
+
421
+ +
423 return RPC::invalid_field_error(jss::type);
+
424
+
425 if (rpcStatus)
+
426 {
+
427 result.clear();
+
428 rpcStatus.inject(result);
+
429 return result;
+
430 }
+
431 else if (type != ltANY)
+
432 {
+
433 typeFilter = std::vector<LedgerEntryType>({type});
+
434 }
+
435 }
+
436
+
437 unsigned int limit;
+
438 if (auto err = readLimitField(limit, RPC::Tuning::accountObjects, context))
+
439 return *err;
+
440
+
441 uint256 dirIndex;
+
442 uint256 entryIndex;
+
443 if (params.isMember(jss::marker))
+
444 {
+
445 auto const& marker = params[jss::marker];
+
446 if (!marker.isString())
+
447 return RPC::expected_field_error(jss::marker, "string");
+
448
+
449 auto const& markerStr = marker.asString();
+
450 auto const& idx = markerStr.find(',');
+
451 if (idx == std::string::npos)
+
452 return RPC::invalid_field_error(jss::marker);
+
453
+
454 if (!dirIndex.parseHex(markerStr.substr(0, idx)))
+
455 return RPC::invalid_field_error(jss::marker);
+
456
+
457 if (!entryIndex.parseHex(markerStr.substr(idx + 1)))
+
458 return RPC::invalid_field_error(jss::marker);
+
459 }
+
460
+ +
462 *ledger,
+
463 accountID,
+
464 typeFilter,
+
465 dirIndex,
+
466 entryIndex,
+
467 limit,
+
468 result))
+
469 return RPC::invalid_field_error(jss::marker);
+
470
+
471 result[jss::account] = toBase58(accountID);
+ +
473 return result;
+
474}
+
+
475
+
476} // namespace ripple
+ +
T begin(T... args)
Lightweight wrapper to tag static string.
Definition json_value.h:45
Represents a JSON value.
Definition json_value.h:131
Value & append(Value const &value)
Append value to array at the end.
+
A view into a ledger.
Definition ReadView.h:32
+
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
+
virtual std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const =0
Return the key of the next state item.
+
base_uint next() const
Definition base_uint.h:436
constexpr bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
Definition base_uint.h:484
bool isZero() const
Definition base_uint.h:521
T emplace(T... args)
+
T end(T... args)
+
T find(T... args)
T is_same_v
@ arrayValue
array value (ordered list)
Definition json_value.h:26
static LimitRange constexpr accountNFTokens
Limits for the account_nftokens command, in pages.
static LimitRange constexpr accountObjects
Limits for the account_objects command.
Json::Value invalid_field_error(std::string const &name)
Definition ErrorCodes.h:306
-
bool isAccountObjectsValidType(LedgerEntryType const &type)
Check if the type is a valid filtering type for account_objects method.
+
bool isAccountObjectsValidType(LedgerEntryType const &type)
Check if the type is a valid filtering type for account_objects method.
void inject_error(error_code_i code, JsonValue &json)
Add or update the json update to reflect the error code.
Definition ErrorCodes.h:214
-
std::pair< RPC::Status, LedgerEntryType > chooseLedgerEntryType(Json::Value const &params)
-
bool getAccountObjects(ReadView const &ledger, AccountID const &account, std::optional< std::vector< LedgerEntryType > > const &typeFilter, uint256 dirIndex, uint256 entryIndex, std::uint32_t const limit, Json::Value &jvResult)
Gathers all objects for an account in a ledger.
+
std::pair< RPC::Status, LedgerEntryType > chooseLedgerEntryType(Json::Value const &params)
Json::Value expected_field_error(std::string const &name, std::string const &type)
Definition ErrorCodes.h:330
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
Json::Value missing_field_error(std::string const &name)
Definition ErrorCodes.h:264
Charge const feeMediumBurdenRPC
+
Keylet child(uint256 const &key) noexcept
Any item that can be in an owner dir.
Definition Indexes.cpp:171
Keylet nftpage(Keylet const &k, uint256 const &token)
Definition Indexes.cpp:400
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:165
+
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
Definition Indexes.cpp:361
Keylet nftpage_min(AccountID const &owner)
NFT page keylets.
Definition Indexes.cpp:384
Keylet nftpage_max(AccountID const &owner)
A keylet for the owner's last possible NFT page.
Definition Indexes.cpp:392
+
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition Indexes.cpp:355
std::uint16_t getTransferFee(uint256 const &id)
Definition nft.h:49
std::uint16_t getFlags(uint256 const &id)
Definition nft.h:41
std::uint32_t toUInt32(Taxon t)
Definition nft.h:29
@@ -394,20 +599,24 @@ $(document).ready(function() { init_codefold(0); });
@ rpcACT_NOT_FOUND
Definition ErrorCodes.h:51
@ rpcACT_MALFORMED
Definition ErrorCodes.h:71
Json::Value rpcError(int iError)
Definition RPCErr.cpp:12
-
Json::Value doAccountObjects(RPC::JsonContext &context)
-
Json::Value doAccountNFTs(RPC::JsonContext &context)
General RPC command that can retrieve objects in the account root.
+
Json::Value doAccountObjects(RPC::JsonContext &context)
+
Json::Value doAccountNFTs(RPC::JsonContext &context)
General RPC command that can retrieve objects in the account root.
+
bool getAccountObjects(ReadView const &ledger, AccountID const &account, std::optional< std::vector< LedgerEntryType > > const &typeFilter, uint256 dirIndex, uint256 entryIndex, std::uint32_t const limit, Json::Value &jvResult)
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611
LedgerEntryType
Identifiers for on-ledger objects.
@ ltANY
A special type, matching any ledger entry type.
+
Number root(Number f, unsigned d)
Definition Number.cpp:617
T size(T... args)
A pair of SHAMap key and LedgerEntryType.
Definition Keylet.h:20
+
uint256 key
Definition Keylet.h:21
Resource::Charge & loadType
Definition Context.h:23
+

General RPC command that can retrieve objects in the account root.

{ account: <account> ledger_hash: <string> // optional ledger_index: <string | unsigned integer> // optional type: <string> // optional, defaults to all account objects types limit: <integer> // optional marker: <opaque> // optional, resume previous query }

-

Definition at line 31 of file AccountObjects.cpp.

+

Definition at line 32 of file AccountObjects.cpp.

+ +
+
+ +

◆ getAccountObjects()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool ripple::getAccountObjects (ReadView const & ledger,
AccountID const & account,
std::optional< std::vector< LedgerEntryType > > const & typeFilter,
uint256 dirIndex,
uint256 entryIndex,
std::uint32_t const limit,
Json::ValuejvResult 
)
+
+ +

Definition at line 163 of file AccountObjects.cpp.

@@ -47397,7 +47459,7 @@ template<class T >
-

Definition at line 162 of file AccountObjects.cpp.

+

Definition at line 355 of file AccountObjects.cpp.

@@ -47427,7 +47489,7 @@ template<class T >
-

Definition at line 16 of file AccountOffers.cpp.

+

Definition at line 17 of file AccountOffers.cpp.

@@ -47447,7 +47509,7 @@ template<class T >
-

Definition at line 38 of file AccountOffers.cpp.

+

Definition at line 39 of file AccountOffers.cpp.

@@ -47623,7 +47685,7 @@ template<class T >
-

Definition at line 16 of file AMMInfo.cpp.

+

Definition at line 17 of file AMMInfo.cpp.

@@ -47653,7 +47715,7 @@ template<class T >
-

Definition at line 32 of file AMMInfo.cpp.

+

Definition at line 33 of file AMMInfo.cpp.

@@ -47673,7 +47735,7 @@ template<class T >
-

Definition at line 46 of file AMMInfo.cpp.

+

Definition at line 47 of file AMMInfo.cpp.

@@ -47693,7 +47755,7 @@ template<class T >
-

Definition at line 57 of file AMMInfo.cpp.

+

Definition at line 58 of file AMMInfo.cpp.

@@ -47733,7 +47795,7 @@ template<class T >
-

Definition at line 18 of file BookOffers.cpp.

+

Definition at line 19 of file BookOffers.cpp.

@@ -47753,7 +47815,7 @@ template<class T >
-

Definition at line 203 of file BookOffers.cpp.

+

Definition at line 204 of file BookOffers.cpp.

@@ -48280,7 +48342,7 @@ template<class T >
-

Definition at line 27 of file LedgerData.cpp.

+

Definition at line 28 of file LedgerData.cpp.

@@ -48400,7 +48462,7 @@ template<class T >
-

Definition at line 146 of file NFTOffers.cpp.

+

Definition at line 147 of file NFTOffers.cpp.

@@ -48420,7 +48482,7 @@ template<class T >
-

Definition at line 132 of file NFTOffers.cpp.

+

Definition at line 133 of file NFTOffers.cpp.

@@ -48440,7 +48502,7 @@ template<class T >
-

Definition at line 43 of file NoRippleCheck.cpp.

+

Definition at line 44 of file NoRippleCheck.cpp.

@@ -50334,7 +50396,7 @@ template<class T >
-

Definition at line 16 of file NFTOffers.cpp.

+

Definition at line 17 of file NFTOffers.cpp.

@@ -50378,7 +50440,7 @@ template<class T >
-

Definition at line 44 of file NFTOffers.cpp.

+

Definition at line 45 of file NFTOffers.cpp.

@@ -50434,7 +50496,7 @@ template<class T >
-

Definition at line 17 of file NoRippleCheck.cpp.

+

Definition at line 18 of file NoRippleCheck.cpp.

diff --git a/namespaceripple_1_1RPC.html b/namespaceripple_1_1RPC.html index 71cd2cff81..c958bdbebd 100644 --- a/namespaceripple_1_1RPC.html +++ b/namespaceripple_1_1RPC.html @@ -240,9 +240,27 @@ Functions bool isRelatedToAccount (ReadView const &ledger, std::shared_ptr< SLE const > const &sle, AccountID const &accountID)  Tests if a SLE is owned by accountID.
  -bool getAccountObjects (ReadView const &ledger, AccountID const &account, std::optional< std::vector< LedgerEntryType > > const &typeFilter, uint256 dirIndex, uint256 entryIndex, std::uint32_t const limit, Json::Value &jvResult) - Gathers all objects for an account in a ledger.
-  +hash_set< AccountIDparseAccountIds (Json::Value const &jvArray) +  +void injectSLE (Json::Value &jv, SLE const &sle) + Inject JSON describing ledger entry.
+  +std::optional< Json::ValuereadLimitField (unsigned int &limit, Tuning::LimitRange const &, JsonContext const &) + Retrieve the limit value from a JsonContext, or set a default - then restrict the limit by max and min if not an ADMIN request.
+  +std::optional< SeedparseRippleLibSeed (Json::Value const &value) +  +std::optional< SeedgetSeedFromRPC (Json::Value const &params, Json::Value &error) +  +std::optional< std::pair< PublicKey, SecretKey > > keypairForSignature (Json::Value const &params, Json::Value &error, unsigned int apiVersion) +  +std::pair< RPC::Status, LedgerEntryTypechooseLedgerEntryType (Json::Value const &params) +  +bool isAccountObjectsValidType (LedgerEntryType const &type) + Check if the type is a valid filtering type for account_objects method.
+  +bool isHexTxID (std::string const &txid) +  template<class T , class R > Status ledgerFromRequest (T &ledger, GRPCContext< R > &context)   @@ -279,30 +297,9 @@ Functions Json::Value lookupLedger (std::shared_ptr< ReadView const > &, JsonContext &)  Look up a ledger from a request and fill a Json::Result with either an error, or data representing a ledger.
  -hash_set< AccountIDparseAccountIds (Json::Value const &jvArray) -  -void injectSLE (Json::Value &jv, SLE const &sle) - Inject JSON describing ledger entry.
-  -std::optional< Json::ValuereadLimitField (unsigned int &limit, Tuning::LimitRange const &, JsonContext const &) - Retrieve the limit value from a JsonContext, or set a default - then restrict the limit by max and min if not an ADMIN request.
-  -std::optional< SeedparseRippleLibSeed (Json::Value const &value) -  -std::optional< SeedgetSeedFromRPC (Json::Value const &params, Json::Value &error) -  -std::optional< std::pair< PublicKey, SecretKey > > keypairForSignature (Json::Value const &params, Json::Value &error, unsigned int apiVersion) -  -std::pair< RPC::Status, LedgerEntryTypechooseLedgerEntryType (Json::Value const &params) -  -bool isAccountObjectsValidType (LedgerEntryType const &type) - Check if the type is a valid filtering type for account_objects method.
std::variant< std::shared_ptr< Ledger const >, Json::ValuegetLedgerByContext (RPC::JsonContext &context)  Return a ledger based on ledger_hash or ledger_index, or an RPC error.
  -bool isHexTxID (std::string const &txid) -  static XRPAmount getTxFee (Application const &app, Config const &config, Json::Value tx)   Json::Value getCurrentNetworkFee (Role const role, Config const &config, LoadFeeTrack const &feeTrack, TxQ const &txQ, Application const &app, Json::Value const &tx, int mult, int div) @@ -511,7 +508,7 @@ Variables VALIDATED  -

Definition at line 111 of file RPCHelpers.h.

+

Definition at line 47 of file RPCLedgerHelpers.h.

@@ -2383,53 +2380,43 @@ template<class T > - -

◆ getAccountObjects()

+ +

◆ parseAccountIds()

- + - - - - - + + - - +
bool ripple::RPC::getAccountObjects hash_set< AccountID > ripple::RPC::parseAccountIds (ReadView const & ledger,
Json::Value const & jvArray) AccountID const & account,
+
+ +

Definition at line 134 of file RPCHelpers.cpp.

+ +
+
+ +

◆ injectSLE()

+ +
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + @@ -2439,21 +2426,197 @@ template<class T >
std::optional< std::vector< LedgerEntryType > > const & typeFilter,
uint256 dirIndex,
uint256 entryIndex,
std::uint32_t const limit,
void ripple::RPC::injectSLE ( Json::ValuejvResult jv,
SLE const & sle 
-

Gathers all objects for an account in a ledger.

-
Parameters
- - - - - - - - -
ledgerLedger to search account objects.
accountAccountID to find objects for.
typeFilterGathers objects of these types. empty gathers all types.
dirIndexBegin gathering account objects from this directory.
entryIndexBegin gathering objects from this directory node.
limitMaximum number of objects to find.
jvResultA JSON result that holds the request objects.
-
-
+

Inject JSON describing ledger entry.

+

Effects: Adds the JSON description of sle to jv.

+

If sle holds an account root, also adds the urlgravatar field JSON if sfEmailHash is present.

-

Definition at line 134 of file RPCHelpers.cpp.

+

Definition at line 150 of file RPCHelpers.cpp.

+ +
+
+ +

◆ readLimitField()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::optional< Json::Value > ripple::RPC::readLimitField (unsigned int & limit,
Tuning::LimitRange const & ,
JsonContext const &  
)
+
+ +

Retrieve the limit value from a JsonContext, or set a default - then restrict the limit by max and min if not an ADMIN request.

+

If there is an error, return it as JSON.

+ +

Definition at line 175 of file RPCHelpers.cpp.

+ +
+
+ +

◆ parseRippleLibSeed()

+ +
+
+ + + + + + + + +
std::optional< Seed > ripple::RPC::parseRippleLibSeed (Json::Value const & value)
+
+ +

Definition at line 200 of file RPCHelpers.cpp.

+ +
+
+ +

◆ getSeedFromRPC()

+ +
+
+ + + + + + + + + + + + + + + + + + +
std::optional< Seed > ripple::RPC::getSeedFromRPC (Json::Value const & params,
Json::Valueerror 
)
+
+ +

Definition at line 219 of file RPCHelpers.cpp.

+ +
+
+ +

◆ keypairForSignature()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::optional< std::pair< PublicKey, SecretKey > > ripple::RPC::keypairForSignature (Json::Value const & params,
Json::Valueerror,
unsigned int apiVersion 
)
+
+ +

Definition at line 278 of file RPCHelpers.cpp.

+ +
+
+ +

◆ chooseLedgerEntryType()

+ +
+
+ + + + + + + + +
std::pair< RPC::Status, LedgerEntryType > ripple::RPC::chooseLedgerEntryType (Json::Value const & params)
+
+ +

Definition at line 414 of file RPCHelpers.cpp.

+ +
+
+ +

◆ isAccountObjectsValidType()

+ +
+
+ + + + + + + + +
bool ripple::RPC::isAccountObjectsValidType (LedgerEntryType const & type)
+
+ +

Check if the type is a valid filtering type for account_objects method.

+

Since Amendments, DirectoryNode, FeeSettings, LedgerHashes can not be owned by an account, this function will return false in these situations.

+ +

Definition at line 469 of file RPCHelpers.cpp.

+ +
+
+ +

◆ isHexTxID()

+ +
+
+ + + + + + + + +
bool ripple::RPC::isHexTxID (std::string const & txid)
+
@@ -2485,7 +2648,7 @@ template<class T , class R >
-

Definition at line 392 of file RPCHelpers.cpp.

+

Definition at line 91 of file RPCLedgerHelpers.cpp.

@@ -2607,7 +2770,7 @@ template<class T >
-

Definition at line 418 of file RPCHelpers.cpp.

+

Definition at line 117 of file RPCLedgerHelpers.cpp.

@@ -2647,7 +2810,7 @@ template<class T >

Get ledger by hash If there is no error in the return value, the ledger pointer will have been filled.

-

Definition at line 472 of file RPCHelpers.cpp.

+

Definition at line 171 of file RPCLedgerHelpers.cpp.

@@ -2687,7 +2850,7 @@ template<class T >

Get ledger by sequence If there is no error in the return value, the ledger pointer will have been filled.

-

Definition at line 482 of file RPCHelpers.cpp.

+

Definition at line 181 of file RPCLedgerHelpers.cpp.

@@ -2728,7 +2891,7 @@ template<class T >

Get ledger specified in shortcut.

If there is no error in the return value, the ledger pointer will have been filled

-

Definition at line 511 of file RPCHelpers.cpp.

+

Definition at line 210 of file RPCLedgerHelpers.cpp.

@@ -2869,7 +3032,7 @@ template<class T >

Look up a ledger from a request and fill a Json::Result with the data representing a ledger.

If the returned Status is OK, the ledger pointer will have been filled.

-

Definition at line 606 of file RPCHelpers.cpp.

+

Definition at line 305 of file RPCLedgerHelpers.cpp.

@@ -2902,229 +3065,7 @@ template<class T >

Look up a ledger from a request and fill a Json::Result with either an error, or data representing a ledger.

If there is no error in the return value, then the ledger pointer will have been filled.

-

Definition at line 631 of file RPCHelpers.cpp.

- - - - -

◆ parseAccountIds()

- -
-
- - - - - - - - -
hash_set< AccountID > ripple::RPC::parseAccountIds (Json::Value const & jvArray)
-
- -

Definition at line 641 of file RPCHelpers.cpp.

- -
-
- -

◆ injectSLE()

- -
-
- - - - - - - - - - - - - - - - - - -
void ripple::RPC::injectSLE (Json::Valuejv,
SLE const & sle 
)
-
- -

Inject JSON describing ledger entry.

-

Effects: Adds the JSON description of sle to jv.

-

If sle holds an account root, also adds the urlgravatar field JSON if sfEmailHash is present.

- -

Definition at line 657 of file RPCHelpers.cpp.

- -
-
- -

◆ readLimitField()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
std::optional< Json::Value > ripple::RPC::readLimitField (unsigned int & limit,
Tuning::LimitRange const & ,
JsonContext const &  
)
-
- -

Retrieve the limit value from a JsonContext, or set a default - then restrict the limit by max and min if not an ADMIN request.

-

If there is an error, return it as JSON.

- -

Definition at line 682 of file RPCHelpers.cpp.

- -
-
- -

◆ parseRippleLibSeed()

- -
-
- - - - - - - - -
std::optional< Seed > ripple::RPC::parseRippleLibSeed (Json::Value const & value)
-
- -

Definition at line 707 of file RPCHelpers.cpp.

- -
-
- -

◆ getSeedFromRPC()

- -
-
- - - - - - - - - - - - - - - - - - -
std::optional< Seed > ripple::RPC::getSeedFromRPC (Json::Value const & params,
Json::Valueerror 
)
-
- -

Definition at line 726 of file RPCHelpers.cpp.

- -
-
- -

◆ keypairForSignature()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
std::optional< std::pair< PublicKey, SecretKey > > ripple::RPC::keypairForSignature (Json::Value const & params,
Json::Valueerror,
unsigned int apiVersion 
)
-
- -

Definition at line 785 of file RPCHelpers.cpp.

- -
-
- -

◆ chooseLedgerEntryType()

- -
-
- - - - - - - - -
std::pair< RPC::Status, LedgerEntryType > ripple::RPC::chooseLedgerEntryType (Json::Value const & params)
-
- -

Definition at line 921 of file RPCHelpers.cpp.

- -
-
- -

◆ isAccountObjectsValidType()

- -
-
- - - - - - - - -
bool ripple::RPC::isAccountObjectsValidType (LedgerEntryType const & type)
-
- -

Check if the type is a valid filtering type for account_objects method.

-

Since Amendments, DirectoryNode, FeeSettings, LedgerHashes can not be owned by an account, this function will return false in these situations.

- -

Definition at line 976 of file RPCHelpers.cpp.

+

Definition at line 330 of file RPCLedgerHelpers.cpp.

@@ -3146,25 +3087,7 @@ template<class T >

Return a ledger based on ledger_hash or ledger_index, or an RPC error.

-

Definition at line 992 of file RPCHelpers.cpp.

- - - - -

◆ isHexTxID()

- -
-
- - - - - - - - -
bool ripple::RPC::isHexTxID (std::string const & txid)
-
+

Definition at line 340 of file RPCLedgerHelpers.cpp.

diff --git a/search/all_10.js b/search/all_10.js index 60ac61cb80..5304865847 100644 --- a/search/all_10.js +++ b/search/all_10.js @@ -320,7 +320,7 @@ var searchData= ['ipaddressconversion_317',['ipaddressconversion',['../structbeast_1_1IPAddressConversion.html#aeeb741eceefb870c1c7ff31b894f1011',1,'beast::IPAddressConversion::IPAddressConversion()'],['../structbeast_1_1IPAddressConversion.html',1,'beast::IPAddressConversion']]], ['ipaddresses_318',['IPAddresses',['../namespaceripple_1_1PeerFinder.html#aa976f893782a0e9ae34878b7d7045c05',1,'ripple::PeerFinder']]], ['ipallowed_319',['ipAllowed',['../namespaceripple.html#ae526cb7431d0104912811e64227383f8',1,'ripple']]], - ['ipe_320',['ipe',['../namespaceripple_1_1test_1_1jtx.html#a992303bb9a650824e18de77a2355ac23',1,'ripple::test::jtx::IPE()'],['../namespaceripple_1_1test.html#acb8d1b93cfea8a1115a2ced455a83e82',1,'ripple::test::ipe()']]], + ['ipe_320',['ipe',['../namespaceripple_1_1test.html#acb8d1b93cfea8a1115a2ced455a83e82',1,'ripple::test::ipe()'],['../namespaceripple_1_1test_1_1jtx.html#a992303bb9a650824e18de77a2355ac23',1,'ripple::test::jtx::IPE()']]], ['ipendpoint_5ftest_321',['IPEndpoint_test',['../classbeast_1_1IP_1_1IPEndpoint__test.html',1,'beast::IP']]], ['iplimit_322',['iplimit',['../structripple_1_1PeerFinder_1_1Config.html#a46decaaf39a6782668b563d2d774ddb5',1,'ripple::PeerFinder::Config::ipLimit'],['../structripple_1_1Overlay_1_1Setup.html#a80250951d1e867a2cdc1cb3f4ed6d8a1',1,'ripple::Overlay::Setup::ipLimit']]], ['iplimitexceeded_323',['ipLimitExceeded',['../namespaceripple_1_1PeerFinder.html#ae15e107cb3b0b67dbf43bd4a0a229c15a290e854afb37272f6ff33bda722dacb7',1,'ripple::PeerFinder']]], diff --git a/search/all_13.js b/search/all_13.js index 5a39e3ccb1..c03966cd94 100644 --- a/search/all_13.js +++ b/search/all_13.js @@ -145,7 +145,7 @@ var searchData= ['ledgergenesistimeresolution_142',['ledgerGenesisTimeResolution',['../namespaceripple.html#a82e58c7a4ba5450436885574fb2fd4f5',1,'ripple']]], ['ledgergranularity_143',['ledgerGRANULARITY',['../structripple_1_1ConsensusParms.html#a0f51900eb407dde2619c639882d564e7',1,'ripple::ConsensusParms']]], ['ledgerhandler_144',['ledgerhandler',['../classripple_1_1RPC_1_1LedgerHandler.html',1,'ripple::RPC::LedgerHandler'],['../classripple_1_1RPC_1_1LedgerHandler.html#afa39c881edcf53399964ec32b3312b1a',1,'ripple::RPC::LedgerHandler::LedgerHandler()']]], - ['ledgerhash_145',['ledgerhash',['../classripple_1_1RelationalDatabase.html#ae6ed6a653c43698a1480c0230b1e99aa',1,'ripple::RelationalDatabase::LedgerHash'],['../structripple_1_1LedgerHashPair.html#a4b52e6ae64b9feac6fa5f8f8cbf1f9ce',1,'ripple::LedgerHashPair::ledgerHash'],['../structripple_1_1TxResult.html#a973f423b31549213ee1613c9ae25dc82',1,'ripple::TxResult::ledgerHash'],['../namespaceripple_1_1test.html#a0bd41ec0e7d28cae7397e33711e22ff5',1,'ripple::test::ledgerHash()'],['../namespaceripple.html#af5a72d3e0d9b6913c13f688390b90796',1,'ripple::LedgerHash']]], + ['ledgerhash_145',['ledgerhash',['../classripple_1_1RelationalDatabase.html#ae6ed6a653c43698a1480c0230b1e99aa',1,'ripple::RelationalDatabase::LedgerHash'],['../structripple_1_1LedgerHashPair.html#a4b52e6ae64b9feac6fa5f8f8cbf1f9ce',1,'ripple::LedgerHashPair::ledgerHash'],['../structripple_1_1TxResult.html#a973f423b31549213ee1613c9ae25dc82',1,'ripple::TxResult::ledgerHash'],['../namespaceripple.html#af5a72d3e0d9b6913c13f688390b90796',1,'ripple::LedgerHash'],['../namespaceripple_1_1test.html#a0bd41ec0e7d28cae7397e33711e22ff5',1,'ripple::test::ledgerHash()']]], ['ledgerhashpair_146',['LedgerHashPair',['../structripple_1_1LedgerHashPair.html',1,'ripple']]], ['ledgerheader_147',['ledgerheader',['../structripple_1_1LedgerHeader.html',1,'ripple::LedgerHeader'],['../structripple_1_1LedgerHeader.html#a03771f954fb5b32e330aec50ae5a87de',1,'ripple::LedgerHeader::LedgerHeader()']]], ['ledgerheader_5ftest_148',['LedgerHeader_test',['../classripple_1_1LedgerHeader__test.html',1,'ripple']]], diff --git a/search/all_17.js b/search/all_17.js index 62ab4c0d3d..3ec76b9faf 100644 --- a/search/all_17.js +++ b/search/all_17.js @@ -269,7 +269,7 @@ var searchData= ['payment_266',['payment',['../classripple_1_1Payment.html#a4ed9102d4015a6b67ea2129171fcd159',1,'ripple::Payment::Payment()'],['../classripple_1_1Payment.html',1,'ripple::Payment']]], ['payment_20tt_20transaction_20json_20schema_267',['Modification to <tt>Payment</tt> transaction JSON schema',['../md__2____w_2rippled_2rippled_2API-CHANGELOG.html#autotoc_md4',1,'']]], ['payment_5fauto_5fpath_5ffind_268',['payment_auto_path_find',['../classripple_1_1test_1_1Path__test.html#a3024cf59d94cc5e123c603c6d467e1e5',1,'ripple::test::Path_test']]], - ['paymentchannelclaim_269',['paymentchannelclaim',['../namespaceripple.html#ad5143ceada01141772ae4aab984f94bdae9474a9e64b014ac43be92e69750cfc2',1,'ripple::paymentChannelClaim'],['../namespaceripple.html#adf19dc78a0185e45380be5dbe2415bbb',1,'ripple::PaymentChannelClaim']]], + ['paymentchannelclaim_269',['paymentchannelclaim',['../namespaceripple.html#adf19dc78a0185e45380be5dbe2415bbb',1,'ripple::PaymentChannelClaim'],['../namespaceripple.html#ad5143ceada01141772ae4aab984f94bdae9474a9e64b014ac43be92e69750cfc2',1,'ripple::paymentChannelClaim']]], ['paymentchannelcreate_270',['PaymentChannelCreate',['../namespaceripple.html#aa7a665b0e4d145246c459ffe6d8a6c03',1,'ripple']]], ['paymentchannelfund_271',['PaymentChannelFund',['../namespaceripple.html#a1b8ee7f363a248581f484dbf7bf7fa97',1,'ripple']]], ['paymentsandbox_272',['paymentsandbox',['../classripple_1_1PaymentSandbox.html#adb0094cac0964f9fed3e050364897648',1,'ripple::PaymentSandbox::PaymentSandbox(PaymentSandbox *base)'],['../classripple_1_1PaymentSandbox.html#ae15058fe338f8aa06837f54c21a918d0',1,'ripple::PaymentSandbox::PaymentSandbox(PaymentSandbox const *base)'],['../classripple_1_1PaymentSandbox.html#ab1053f94b2865ac786fac9f780f4cb02',1,'ripple::PaymentSandbox::PaymentSandbox()=delete'],['../classripple_1_1PaymentSandbox.html#ae02b1332fe55c307074866a9c3b15546',1,'ripple::PaymentSandbox::PaymentSandbox(PaymentSandbox const &)=delete'],['../classripple_1_1PaymentSandbox.html#aec1550eb021dc24fc76fdfa320f7c040',1,'ripple::PaymentSandbox::PaymentSandbox(PaymentSandbox &&)=default'],['../classripple_1_1PaymentSandbox.html#ab7631f4e5085e026d8c8fd65aa9b1533',1,'ripple::PaymentSandbox::PaymentSandbox(ReadView const *base, ApplyFlags flags)'],['../classripple_1_1PaymentSandbox.html',1,'ripple::PaymentSandbox'],['../classripple_1_1PaymentSandbox.html#a6859b772e9f03d8f1bb690de83055e22',1,'ripple::PaymentSandbox::PaymentSandbox()']]], diff --git a/search/all_1b.js b/search/all_1b.js index c28853b092..b520fcb56b 100644 --- a/search/all_1b.js +++ b/search/all_1b.js @@ -2053,7 +2053,7 @@ var searchData= ['trustedvalidations_2050',['trustedValidations',['../classripple_1_1AmendmentSet.html#a6d6b63ea4b09a0b012667c79aff07528',1,'ripple::AmendmentSet']]], ['trustedvalidations_5f_2051',['trustedValidations_',['../classripple_1_1AmendmentSet.html#a08f7a2888e1f8767713d045a114975c9',1,'ripple::AmendmentSet']]], ['trustedvotes_2052',['trustedvotes',['../classripple_1_1TrustedVotes.html',1,'ripple::TrustedVotes'],['../classripple_1_1TrustedVotes.html#abe5928a3f6fa4cf32bc180a88978e4bf',1,'ripple::TrustedVotes::TrustedVotes(TrustedVotes const &rhs)=delete'],['../classripple_1_1TrustedVotes.html#a3d752f8a8137c54441bd754db241b286',1,'ripple::TrustedVotes::TrustedVotes()=default']]], - ['trustflag_2053',['trustflag',['../namespaceripple_1_1test.html#acf39cc44acdd6b5089f2076897fa3911',1,'ripple::test::TrustFlag'],['../namespaceripple_1_1test.html#a6879dc19e056b84550387698c4c38ec4',1,'ripple::test::trustFlag(TrustFlag f, bool useHigh)']]], + ['trustflag_2053',['trustflag',['../namespaceripple_1_1test.html#a6879dc19e056b84550387698c4c38ec4',1,'ripple::test::trustFlag(TrustFlag f, bool useHigh)'],['../namespaceripple_1_1test.html#acf39cc44acdd6b5089f2076897fa3911',1,'ripple::test::TrustFlag']]], ['trustgraph_2054',['trustgraph',['../classripple_1_1test_1_1csf_1_1TrustGraph.html',1,'ripple::test::csf::TrustGraph< Peer >'],['../classripple_1_1test_1_1csf_1_1TrustGraph.html#ad71fd7d9762e7c9b25ef2f27514afd9f',1,'ripple::test::csf::TrustGraph::TrustGraph()'],['../structripple_1_1test_1_1csf_1_1Peer.html#a570755672f7b6ec1c2bb96570882c166',1,'ripple::test::csf::Peer::trustGraph'],['../classripple_1_1test_1_1csf_1_1Sim.html#a8bc47ca290010d8a2637da1cd274a605',1,'ripple::test::csf::Sim::trustGraph']]], ['trustgraph_3c_20ripple_3a_3atest_3a_3acsf_3a_3apeer_20_2a_20_3e_2055',['TrustGraph< ripple::test::csf::Peer * >',['../classripple_1_1test_1_1csf_1_1TrustGraph.html',1,'ripple::test::csf']]], ['trustlinebase_2056',['trustlinebase',['../classripple_1_1RPCTrustLine.html#a74bdbbfaa6b36d1c4444faaa507012e9',1,'ripple::RPCTrustLine::TrustLineBase(TrustLineBase &&)=default'],['../classripple_1_1RPCTrustLine.html#ae0423b9670b43791ebddc47fc329256f',1,'ripple::RPCTrustLine::TrustLineBase(TrustLineBase const &)=default'],['../classripple_1_1RPCTrustLine.html#a710bb727f7f0b4d0872fcca8eaed8768',1,'ripple::RPCTrustLine::TrustLineBase(std::shared_ptr< SLE const > const &sle, AccountID const &viewAccount)'],['../classripple_1_1PathFindTrustLine.html#a74bdbbfaa6b36d1c4444faaa507012e9',1,'ripple::PathFindTrustLine::TrustLineBase(TrustLineBase &&)=default'],['../classripple_1_1PathFindTrustLine.html#ae0423b9670b43791ebddc47fc329256f',1,'ripple::PathFindTrustLine::TrustLineBase(TrustLineBase const &)=default'],['../classripple_1_1TrustLineBase.html#a74bdbbfaa6b36d1c4444faaa507012e9',1,'ripple::TrustLineBase::TrustLineBase()'],['../classripple_1_1PathFindTrustLine.html#a710bb727f7f0b4d0872fcca8eaed8768',1,'ripple::PathFindTrustLine::TrustLineBase()'],['../classripple_1_1TrustLineBase.html',1,'ripple::TrustLineBase'],['../classripple_1_1TrustLineBase.html#ae0423b9670b43791ebddc47fc329256f',1,'ripple::TrustLineBase::TrustLineBase(TrustLineBase const &)=default'],['../classripple_1_1TrustLineBase.html#a710bb727f7f0b4d0872fcca8eaed8768',1,'ripple::TrustLineBase::TrustLineBase(std::shared_ptr< SLE const > const &sle, AccountID const &viewAccount)']]], diff --git a/search/all_1c.js b/search/all_1c.js index 3c60a1d1b2..ecf350b852 100644 --- a/search/all_1c.js +++ b/search/all_1c.js @@ -60,7 +60,7 @@ var searchData= ['underlying_5ftype_5ft_57',['underlying_type_t',['http://en.cppreference.com/w/cpp/types/underlying_type.html',1,'std']]], ['undodelay_58',['undodelay',['../structripple_1_1test_1_1Consensus__test_1_1UndoDelay.html#ad77d5ecdff941435a78cd8d970434363',1,'ripple::test::Consensus_test::UndoDelay::UndoDelay()'],['../structripple_1_1test_1_1Consensus__test_1_1UndoDelay.html',1,'ripple::test::Consensus_test::UndoDelay']]], ['unexcept_59',['unexcept',['../classbeast_1_1unit__test_1_1suite.html#ab110ab2b1585caaa855150af0e3c7a74',1,'beast::unit_test::suite::unexcept(F &&f, String const &reason)'],['../classbeast_1_1unit__test_1_1suite.html#ad28942f03a54b2da8204b46850d9cc03',1,'beast::unit_test::suite::unexcept(F &&f)']]], - ['unexpected_60',['unexpected',['../classripple_1_1Unexpected.html#af2f4eee2862f4eab830c32717c524527',1,'ripple::Unexpected::Unexpected()'],['../classbeast_1_1unit__test_1_1suite.html#a865757d2d9992fb2c91c51e137166e9d',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse, String const &reason)'],['../classbeast_1_1unit__test_1_1suite.html#a789edeb2afc9951e32b18362cb98f656',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse)'],['http://en.cppreference.com/w/cpp/error/unexpected.html',1,'std::unexpected()'],['../namespaceripple.html#ad6887fe0534dd3b0df2da54ff8994e2f',1,'ripple::Unexpected()'],['../classripple_1_1Unexpected.html#a8139a951450ea521bb2321a4f2417dce',1,'ripple::Unexpected::Unexpected(E const &e)'],['../classripple_1_1Unexpected.html#ae84f51e4038d4ba8c436d2aa90a33ae8',1,'ripple::Unexpected::Unexpected()=delete'],['../classripple_1_1Unexpected.html',1,'ripple::Unexpected< E >']]], + ['unexpected_60',['unexpected',['../classripple_1_1Unexpected.html#af2f4eee2862f4eab830c32717c524527',1,'ripple::Unexpected::Unexpected()'],['../classbeast_1_1unit__test_1_1suite.html#a865757d2d9992fb2c91c51e137166e9d',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse, String const &reason)'],['../classbeast_1_1unit__test_1_1suite.html#a789edeb2afc9951e32b18362cb98f656',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse)'],['../namespaceripple.html#ad6887fe0534dd3b0df2da54ff8994e2f',1,'ripple::Unexpected()'],['http://en.cppreference.com/w/cpp/error/unexpected.html',1,'std::unexpected()'],['../classripple_1_1Unexpected.html#a8139a951450ea521bb2321a4f2417dce',1,'ripple::Unexpected::Unexpected(E const &e)'],['../classripple_1_1Unexpected.html#ae84f51e4038d4ba8c436d2aa90a33ae8',1,'ripple::Unexpected::Unexpected()=delete'],['../classripple_1_1Unexpected.html',1,'ripple::Unexpected< E >']]], ['unexpected_5fhandler_61',['unexpected_handler',['http://en.cppreference.com/w/cpp/error/unexpected_handler.html',1,'std']]], ['unexpected_5ftag_62',['unexpected_tag',['../namespaceripple_1_1cryptoconditions.html#ae0bee5541ce10d52809660ad2d100a23a680460a7b6e0775b40c1af6d93f0af0a',1,'ripple::cryptoconditions']]], ['unfundedofferremovelimit_63',['unfundedOfferRemoveLimit',['../namespaceripple.html#a2ec27d00ce38a9962f60eaacbc0f0bf1',1,'ripple']]], diff --git a/search/all_1d.js b/search/all_1d.js index 08b526154a..1117be6b57 100644 --- a/search/all_1d.js +++ b/search/all_1d.js @@ -10,7 +10,7 @@ var searchData= ['valcookie_5f_7',['valCookie_',['../classripple_1_1RCLConsensus_1_1Adaptor.html#ae5dae1ff6ce46d6fa64c3d919182c99d',1,'ripple::RCLConsensus::Adaptor']]], ['valence_8',['valence',['../classripple_1_1PeerFinder_1_1Bootcache_1_1Entry.html#a0647b5e8158e4ee5c2c94795e1fd98aa',1,'ripple::PeerFinder::Bootcache::Entry::valence() const'],['../classripple_1_1PeerFinder_1_1Bootcache_1_1Entry.html#a581be978321271123284c7284fd771c3',1,'ripple::PeerFinder::Bootcache::Entry::valence()'],['../structripple_1_1PeerFinder_1_1Store_1_1Entry.html#a655fa5ae18ff218993a606634f07f3e3',1,'ripple::PeerFinder::Store::Entry::valence']]], ['valfilecontents_9',['valFileContents',['../namespaceripple_1_1detail.html#a1c5d9fb1006ebe79534ff7eb895abdbb',1,'ripple::detail']]], - ['valid_10',['valid',['../classripple_1_1test_1_1ElementComboIter.html#a2a29df8240c82cde9df104f298477759',1,'ripple::test::ElementComboIter::valid()'],['../structripple_1_1detail_1_1MultiApiJson.html#a92ff5d0e802f7a50bf23df59c13467bf',1,'ripple::detail::MultiApiJson::valid()'],['http://en.cppreference.com/w/cpp/thread/shared_future/valid.html',1,'std::shared_future::valid()'],['http://en.cppreference.com/w/cpp/thread/packaged_task/valid.html',1,'std::packaged_task::valid()'],['http://en.cppreference.com/w/cpp/thread/future/valid.html',1,'std::future::valid()'],['../structripple_1_1detail_1_1DatabasePairValid.html#a7c79b804e14484620d9f2c18633f5365',1,'ripple::detail::DatabasePairValid::valid'],['../namespaceripple_1_1credentials.html#ab0cd6a3f76fa9f09c5f1c2d6fffc11e0',1,'ripple::credentials::valid()'],['../namespaceripple.html#abcad59b0151763334cc398263373bcdda3ac705f2acd51a4613f9188c05c91d0d',1,'ripple::Valid']]], + ['valid_10',['valid',['../classripple_1_1test_1_1ElementComboIter.html#a2a29df8240c82cde9df104f298477759',1,'ripple::test::ElementComboIter::valid()'],['../structripple_1_1detail_1_1MultiApiJson.html#a92ff5d0e802f7a50bf23df59c13467bf',1,'ripple::detail::MultiApiJson::valid()'],['http://en.cppreference.com/w/cpp/thread/shared_future/valid.html',1,'std::shared_future::valid()'],['http://en.cppreference.com/w/cpp/thread/packaged_task/valid.html',1,'std::packaged_task::valid()'],['http://en.cppreference.com/w/cpp/thread/future/valid.html',1,'std::future::valid()'],['../structripple_1_1detail_1_1DatabasePairValid.html#a7c79b804e14484620d9f2c18633f5365',1,'ripple::detail::DatabasePairValid::valid'],['../namespaceripple.html#abcad59b0151763334cc398263373bcdda3ac705f2acd51a4613f9188c05c91d0d',1,'ripple::Valid'],['../namespaceripple_1_1credentials.html#ab0cd6a3f76fa9f09c5f1c2d6fffc11e0',1,'ripple::credentials::valid()']]], ['valid_5f_11',['valid_',['../classripple_1_1STValidation.html#a2b834566e12309f92d12e7f11771ad82',1,'ripple::STValidation']]], ['validamm_12',['validamm',['../classripple_1_1ValidAMM.html#a4ff96005ce67d1c76f446609e315e6ea',1,'ripple::ValidAMM::ValidAMM()'],['../classripple_1_1ValidAMM.html',1,'ripple::ValidAMM']]], ['validamounts_13',['validamounts',['../structripple_1_1Attestations_1_1AttestationClaim.html#a20c7be9549c66d4053b4cb5aaa77b772',1,'ripple::Attestations::AttestationClaim::validAmounts()'],['../structripple_1_1Attestations_1_1AttestationCreateAccount.html#a31e20b33b7f491a7f449086a26b44c95',1,'ripple::Attestations::AttestationCreateAccount::validAmounts()']]], diff --git a/search/all_d.js b/search/all_d.js index f46ffee079..fb2a8d8b54 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -390,7 +390,7 @@ var searchData= ['frac_5fdigits_387',['frac_digits',['http://en.cppreference.com/w/cpp/locale/moneypunct/frac_digits.html',1,'std::moneypunct_byname::frac_digits()'],['http://en.cppreference.com/w/cpp/locale/moneypunct/frac_digits.html',1,'std::moneypunct::frac_digits()']]], ['framework_388',['Consensus Simulation Framework',['../md_test_2csf_2README.html',1,'']]], ['fread_389',['fread',['http://en.cppreference.com/w/cpp/io/c/fread.html',1,'std']]], - ['free_390',['free',['http://en.cppreference.com/w/cpp/filesystem/space_info.html',1,'std::filesystem::space_info::free'],['http://en.cppreference.com/w/cpp/experimental/fs/space_info.html',1,'std::experimental::filesystem::space_info::free'],['http://en.cppreference.com/w/cpp/memory/c/free.html',1,'std::free()'],['../namespaceripple.html#a5d9fe757c37a7602a883d30b14e1bf3ca88c189a42c87aa49d667fc8ab76bc323',1,'ripple::FREE']]], + ['free_390',['free',['http://en.cppreference.com/w/cpp/filesystem/space_info.html',1,'std::filesystem::space_info::free'],['http://en.cppreference.com/w/cpp/experimental/fs/space_info.html',1,'std::experimental::filesystem::space_info::free'],['../namespaceripple.html#a5d9fe757c37a7602a883d30b14e1bf3ca88c189a42c87aa49d667fc8ab76bc323',1,'ripple::FREE'],['http://en.cppreference.com/w/cpp/memory/c/free.html',1,'std::free()']]], ['free_5ffd_5fthreshold_391',['FREE_FD_THRESHOLD',['../classripple_1_1Door.html#a5b1655cde11f01613b6316e7379cb53e',1,'ripple::Door']]], ['freeze_392',['freeze',['../namespaceripple_1_1test.html#acf39cc44acdd6b5089f2076897fa3911aeb479605271a1f0ffff9d87f2cab0b75',1,'ripple::test::freeze'],['http://en.cppreference.com/w/cpp/io/ostrstream/freeze.html',1,'std::ostrstream::freeze()'],['http://en.cppreference.com/w/cpp/io/strstream/freeze.html',1,'std::strstream::freeze()'],['http://en.cppreference.com/w/cpp/io/strstreambuf/freeze.html',1,'std::strstreambuf::freeze()']]], ['freeze_5ftest_393',['Freeze_test',['../classripple_1_1Freeze__test.html',1,'ripple']]], @@ -480,7 +480,7 @@ var searchData= ['function_5fname_477',['function_name',['http://en.cppreference.com/w/cpp/utility/source_location/function_name.html',1,'std::source_location::function_name()'],['http://en.cppreference.com/w/cpp/experimental/source_location/function_name.html',1,'std::experimental::source_location::function_name()']]], ['functional_478',['functional',['http://en.cppreference.com/w/cpp/header/functional.html',1,'']]], ['functiontype_479',['FunctionType',['../namespaceripple.html#ac7430b8a581c7d838130308cd016633a',1,'ripple']]], - ['fund_480',['fund',['../classripple_1_1test_1_1jtx_1_1Env.html#a9264df26c2f14a094de53a21055cdb1c',1,'ripple::test::jtx::Env::fund()'],['../namespaceripple_1_1test_1_1jtx.html#aff98aceb75526246bab03273ec360fb6',1,'ripple::test::jtx::Fund'],['../namespaceripple_1_1test_1_1jtx.html#a7465bcfa8bde2f58f93cee57934f7df8',1,'ripple::test::jtx::fund(jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, std::vector< STAmount > const &amts, Fund how)'],['../namespaceripple_1_1test_1_1jtx.html#a97d903cc3d66d2e1a292d1cb3121644f',1,'ripple::test::jtx::fund(jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, STAmount const &xrp, std::vector< STAmount > const &amts={}, Fund how=Fund::All)'],['../namespaceripple_1_1test_1_1jtx.html#a5699279c9df70c69fd8c99caec2761c1',1,'ripple::test::jtx::fund(jtx::Env &env, std::vector< jtx::Account > const &accounts, STAmount const &xrp, std::vector< STAmount > const &amts={}, Fund how=Fund::All)'],['../namespaceripple_1_1test_1_1jtx_1_1paychan.html#a1240fe13bcc6f33d957653b61e31122e',1,'ripple::test::jtx::paychan::fund()'],['../structripple_1_1test_1_1jtx_1_1MPTInit.html#aaeab5f952e81f45cc8f9842cc67c2b58',1,'ripple::test::jtx::MPTInit::fund'],['../structripple_1_1test_1_1jtx_1_1MPTCreate.html#aab96e394a05042b3d83739e6843d9dcd',1,'ripple::test::jtx::MPTCreate::fund'],['../structripple_1_1test_1_1SEnv.html#af615fc2c58f90c04d02a76f789559f73',1,'ripple::test::SEnv::fund()'],['../classripple_1_1test_1_1jtx_1_1Env.html#ae2349266cb09d1f1c3de06606ebdf9e2',1,'ripple::test::jtx::Env::fund(bool setDefaultRipple, STAmount const &amount, Account const &account)']]], + ['fund_480',['fund',['../classripple_1_1test_1_1jtx_1_1Env.html#a9264df26c2f14a094de53a21055cdb1c',1,'ripple::test::jtx::Env::fund()'],['../namespaceripple_1_1test_1_1jtx.html#a7465bcfa8bde2f58f93cee57934f7df8',1,'ripple::test::jtx::fund(jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, std::vector< STAmount > const &amts, Fund how)'],['../namespaceripple_1_1test_1_1jtx.html#a97d903cc3d66d2e1a292d1cb3121644f',1,'ripple::test::jtx::fund(jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, STAmount const &xrp, std::vector< STAmount > const &amts={}, Fund how=Fund::All)'],['../namespaceripple_1_1test_1_1jtx.html#a5699279c9df70c69fd8c99caec2761c1',1,'ripple::test::jtx::fund(jtx::Env &env, std::vector< jtx::Account > const &accounts, STAmount const &xrp, std::vector< STAmount > const &amts={}, Fund how=Fund::All)'],['../namespaceripple_1_1test_1_1jtx_1_1paychan.html#a1240fe13bcc6f33d957653b61e31122e',1,'ripple::test::jtx::paychan::fund()'],['../namespaceripple_1_1test_1_1jtx.html#aff98aceb75526246bab03273ec360fb6',1,'ripple::test::jtx::Fund'],['../structripple_1_1test_1_1jtx_1_1MPTInit.html#aaeab5f952e81f45cc8f9842cc67c2b58',1,'ripple::test::jtx::MPTInit::fund'],['../structripple_1_1test_1_1jtx_1_1MPTCreate.html#aab96e394a05042b3d83739e6843d9dcd',1,'ripple::test::jtx::MPTCreate::fund'],['../structripple_1_1test_1_1SEnv.html#af615fc2c58f90c04d02a76f789559f73',1,'ripple::test::SEnv::fund()'],['../classripple_1_1test_1_1jtx_1_1Env.html#ae2349266cb09d1f1c3de06606ebdf9e2',1,'ripple::test::jtx::Env::fund(bool setDefaultRipple, STAmount const &amount, Account const &account)']]], ['fund_5farg_481',['fund_arg',['../classripple_1_1test_1_1jtx_1_1Env.html#a01d32419e46d88ebc1a6325ca56e2902',1,'ripple::test::jtx::Env::fund_arg(STAmount const &amount, std::array< Account, N > const &list)'],['../classripple_1_1test_1_1jtx_1_1Env.html#afa7324d98ed5b298e853f7c170c06ea6',1,'ripple::test::jtx::Env::fund_arg(STAmount const &amount, Account const &account)']]], ['future_482',['future',['http://en.cppreference.com/w/cpp/experimental/future/future.html',1,'std::experimental::future::future()'],['http://en.cppreference.com/w/cpp/header/future.html',1,'(Global Namespace)'],['http://en.cppreference.com/w/cpp/thread/future/future.html',1,'std::future::future()'],['http://en.cppreference.com/w/cpp/thread/future.html',1,'std::future'],['http://en.cppreference.com/w/cpp/experimental/future.html',1,'std::experimental::future']]], ['future_5fcategory_483',['future_category',['http://en.cppreference.com/w/cpp/thread/future_category.html',1,'std']]], diff --git a/search/all_e.js b/search/all_e.js index 1770ececd2..4e8d8ed18a 100644 --- a/search/all_e.js +++ b/search/all_e.js @@ -109,7 +109,7 @@ var searchData= ['getaccountid_106',['getaccountid',['../classripple_1_1STObject.html#a0d2d874d34a1c3ed432cdb9fb1386b35',1,'ripple::STObject::getAccountID()'],['../classripple_1_1STPathElement.html#a34ec4c731897c178cebb4727f1445d8f',1,'ripple::STPathElement::getAccountID()'],['../classripple_1_1TrustLineBase.html#a88cd02cdc2ca7a31a332ff246bac3cfe',1,'ripple::TrustLineBase::getAccountID() const']]], ['getaccountidpeer_107',['getAccountIDPeer',['../classripple_1_1TrustLineBase.html#acbbabccf2e7a126365796c627977cfa7',1,'ripple::TrustLineBase']]], ['getaccountlines_108',['getaccountlines',['../namespaceripple_1_1test_1_1jtx.html#a64156c78e17d95b40ecd47efbd86975e',1,'ripple::test::jtx::getAccountLines(Env &env, AccountID const &acctId)'],['../namespaceripple_1_1test_1_1jtx.html#aaaa207462036797a6d54438e6d23242e',1,'ripple::test::jtx::getAccountLines(Env &env, Account const &acct)'],['../namespaceripple_1_1test_1_1jtx.html#a5ee40310c9627195bbc0825624de0a07',1,'ripple::test::jtx::getAccountLines(Env &env, AccountID const &acctId, IOU... ious)']]], - ['getaccountobjects_109',['getAccountObjects',['../namespaceripple_1_1RPC.html#a8357793802bdb5dc41c19160d17943c1',1,'ripple::RPC']]], + ['getaccountobjects_109',['getAccountObjects',['../namespaceripple.html#a8e341df5ee04eb3eafd7b1a16879da9c',1,'ripple']]], ['getaccountoffers_110',['getaccountoffers',['../namespaceripple_1_1test_1_1jtx.html#aff96e24753f0f457eb0ca0fbf763401c',1,'ripple::test::jtx::getAccountOffers(Env &env, AccountID const &acct, bool current)'],['../namespaceripple_1_1test_1_1jtx.html#a81f0b9b140d0f7a1b2e4ac16ca1321d0',1,'ripple::test::jtx::getAccountOffers(Env &env, Account const &acct, bool current=false)']]], ['getaccounttransactioncount_111',['getaccounttransactioncount',['../classripple_1_1SQLiteDatabaseImp.html#a6828f44ae053fc1ef628028202dc8fac',1,'ripple::SQLiteDatabaseImp::getAccountTransactionCount()'],['../classripple_1_1SQLiteDatabase.html#acb2f609a8add65fb702e840ae74c7422',1,'ripple::SQLiteDatabase::getAccountTransactionCount()']]], ['getaccounttransactionsminledgerseq_112',['getaccounttransactionsminledgerseq',['../classripple_1_1SQLiteDatabaseImp.html#a526e18b895cb05e3b11afcf873f753da',1,'ripple::SQLiteDatabaseImp::getAccountTransactionsMinLedgerSeq()'],['../classripple_1_1SQLiteDatabase.html#a5b2e1df48da2d5d853a8ed23655f5ed2',1,'ripple::SQLiteDatabase::getAccountTransactionsMinLedgerSeq()']]], diff --git a/search/functions_15.js b/search/functions_15.js index b38ed9e02d..e99a452ea8 100644 --- a/search/functions_15.js +++ b/search/functions_15.js @@ -23,7 +23,7 @@ var searchData= ['underflow_5ferror_20',['underflow_error',['http://en.cppreference.com/w/cpp/error/underflow_error.html',1,'std::underflow_error']]], ['undodelay_21',['UndoDelay',['../structripple_1_1test_1_1Consensus__test_1_1UndoDelay.html#ad77d5ecdff941435a78cd8d970434363',1,'ripple::test::Consensus_test::UndoDelay']]], ['unexcept_22',['unexcept',['../classbeast_1_1unit__test_1_1suite.html#ab110ab2b1585caaa855150af0e3c7a74',1,'beast::unit_test::suite::unexcept(F &&f, String const &reason)'],['../classbeast_1_1unit__test_1_1suite.html#ad28942f03a54b2da8204b46850d9cc03',1,'beast::unit_test::suite::unexcept(F &&f)']]], - ['unexpected_23',['unexpected',['../namespaceripple.html#ad6887fe0534dd3b0df2da54ff8994e2f',1,'ripple::Unexpected()'],['http://en.cppreference.com/w/cpp/error/unexpected.html',1,'std::unexpected()'],['../classbeast_1_1unit__test_1_1suite.html#a789edeb2afc9951e32b18362cb98f656',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse)'],['../classbeast_1_1unit__test_1_1suite.html#a865757d2d9992fb2c91c51e137166e9d',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse, String const &reason)'],['../classripple_1_1Unexpected.html#af2f4eee2862f4eab830c32717c524527',1,'ripple::Unexpected::Unexpected(E &&e)'],['../classripple_1_1Unexpected.html#a8139a951450ea521bb2321a4f2417dce',1,'ripple::Unexpected::Unexpected(E const &e)'],['../classripple_1_1Unexpected.html#ae84f51e4038d4ba8c436d2aa90a33ae8',1,'ripple::Unexpected::Unexpected()=delete']]], + ['unexpected_23',['unexpected',['http://en.cppreference.com/w/cpp/error/unexpected.html',1,'std::unexpected()'],['../namespaceripple.html#ad6887fe0534dd3b0df2da54ff8994e2f',1,'ripple::Unexpected()'],['../classbeast_1_1unit__test_1_1suite.html#a789edeb2afc9951e32b18362cb98f656',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse)'],['../classbeast_1_1unit__test_1_1suite.html#a865757d2d9992fb2c91c51e137166e9d',1,'beast::unit_test::suite::unexpected(Condition shouldBeFalse, String const &reason)'],['../classripple_1_1Unexpected.html#af2f4eee2862f4eab830c32717c524527',1,'ripple::Unexpected::Unexpected(E &&e)'],['../classripple_1_1Unexpected.html#a8139a951450ea521bb2321a4f2417dce',1,'ripple::Unexpected::Unexpected(E const &e)'],['../classripple_1_1Unexpected.html#ae84f51e4038d4ba8c436d2aa90a33ae8',1,'ripple::Unexpected::Unexpected()=delete']]], ['unget_24',['unget',['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::wiostream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::wistream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::wistringstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::wstringstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::wifstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::basic_ifstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::istringstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::istream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::iostream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::ifstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::fstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::basic_stringstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::istrstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::basic_istringstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::basic_istream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::basic_iostream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::basic_fstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::stringstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::strstream::unget()'],['http://en.cppreference.com/w/cpp/io/basic_istream/unget.html',1,'std::wfstream::unget()']]], ['ungetc_25',['ungetc',['http://en.cppreference.com/w/cpp/io/c/ungetc.html',1,'std']]], ['ungetwc_26',['ungetwc',['http://en.cppreference.com/w/cpp/io/c/ungetwc.html',1,'std']]], diff --git a/search/functions_7.js b/search/functions_7.js index 8e84c34197..7556988bd8 100644 --- a/search/functions_7.js +++ b/search/functions_7.js @@ -83,7 +83,7 @@ var searchData= ['getaccountid_80',['getaccountid',['../classripple_1_1STObject.html#a0d2d874d34a1c3ed432cdb9fb1386b35',1,'ripple::STObject::getAccountID()'],['../classripple_1_1STPathElement.html#a34ec4c731897c178cebb4727f1445d8f',1,'ripple::STPathElement::getAccountID()'],['../classripple_1_1TrustLineBase.html#a88cd02cdc2ca7a31a332ff246bac3cfe',1,'ripple::TrustLineBase::getAccountID() const']]], ['getaccountidpeer_81',['getAccountIDPeer',['../classripple_1_1TrustLineBase.html#acbbabccf2e7a126365796c627977cfa7',1,'ripple::TrustLineBase']]], ['getaccountlines_82',['getaccountlines',['../namespaceripple_1_1test_1_1jtx.html#aaaa207462036797a6d54438e6d23242e',1,'ripple::test::jtx::getAccountLines(Env &env, Account const &acct)'],['../namespaceripple_1_1test_1_1jtx.html#a64156c78e17d95b40ecd47efbd86975e',1,'ripple::test::jtx::getAccountLines(Env &env, AccountID const &acctId)'],['../namespaceripple_1_1test_1_1jtx.html#a5ee40310c9627195bbc0825624de0a07',1,'ripple::test::jtx::getAccountLines(Env &env, AccountID const &acctId, IOU... ious)']]], - ['getaccountobjects_83',['getAccountObjects',['../namespaceripple_1_1RPC.html#a8357793802bdb5dc41c19160d17943c1',1,'ripple::RPC']]], + ['getaccountobjects_83',['getAccountObjects',['../namespaceripple.html#a8e341df5ee04eb3eafd7b1a16879da9c',1,'ripple']]], ['getaccountoffers_84',['getaccountoffers',['../namespaceripple_1_1test_1_1jtx.html#a81f0b9b140d0f7a1b2e4ac16ca1321d0',1,'ripple::test::jtx::getAccountOffers(Env &env, Account const &acct, bool current=false)'],['../namespaceripple_1_1test_1_1jtx.html#aff96e24753f0f457eb0ca0fbf763401c',1,'ripple::test::jtx::getAccountOffers(Env &env, AccountID const &acct, bool current)']]], ['getaccounttransactioncount_85',['getaccounttransactioncount',['../classripple_1_1SQLiteDatabaseImp.html#a6828f44ae053fc1ef628028202dc8fac',1,'ripple::SQLiteDatabaseImp::getAccountTransactionCount()'],['../classripple_1_1SQLiteDatabase.html#acb2f609a8add65fb702e840ae74c7422',1,'ripple::SQLiteDatabase::getAccountTransactionCount()']]], ['getaccounttransactionsminledgerseq_86',['getaccounttransactionsminledgerseq',['../classripple_1_1SQLiteDatabaseImp.html#a526e18b895cb05e3b11afcf873f753da',1,'ripple::SQLiteDatabaseImp::getAccountTransactionsMinLedgerSeq()'],['../classripple_1_1SQLiteDatabase.html#a5b2e1df48da2d5d853a8ed23655f5ed2',1,'ripple::SQLiteDatabase::getAccountTransactionsMinLedgerSeq()']]], diff --git a/search/functions_9.js b/search/functions_9.js index 6bf47d7127..b2ac9fb363 100644 --- a/search/functions_9.js +++ b/search/functions_9.js @@ -154,7 +154,7 @@ var searchData= ['iouamount_151',['iouamount',['../classripple_1_1IOUAmount.html#a9ad31953488b4fc880a9700da03e2a71',1,'ripple::IOUAmount::IOUAmount()=default'],['../classripple_1_1IOUAmount.html#af346ea69bfcc118ea700e618f32dffc3',1,'ripple::IOUAmount::IOUAmount(Number const &other)'],['../classripple_1_1IOUAmount.html#a65f7a8b13a5e1fd4ebe199d57e2c6393',1,'ripple::IOUAmount::IOUAmount(beast::Zero)'],['../classripple_1_1IOUAmount.html#a95467fc67fc518d10ae94764a967e8bd',1,'ripple::IOUAmount::IOUAmount(std::int64_t mantissa, int exponent)']]], ['ipaddressconversion_152',['IPAddressConversion',['../structbeast_1_1IPAddressConversion.html#aeeb741eceefb870c1c7ff31b894f1011',1,'beast::IPAddressConversion']]], ['ipallowed_153',['ipAllowed',['../namespaceripple.html#ae526cb7431d0104912811e64227383f8',1,'ripple']]], - ['ipe_154',['ipe',['../namespaceripple_1_1test.html#acb8d1b93cfea8a1115a2ced455a83e82',1,'ripple::test::ipe()'],['../namespaceripple_1_1test_1_1jtx.html#a992303bb9a650824e18de77a2355ac23',1,'ripple::test::jtx::IPE()']]], + ['ipe_154',['ipe',['../namespaceripple_1_1test_1_1jtx.html#a992303bb9a650824e18de77a2355ac23',1,'ripple::test::jtx::IPE()'],['../namespaceripple_1_1test.html#acb8d1b93cfea8a1115a2ced455a83e82',1,'ripple::test::ipe()']]], ['is_155',['is',['http://en.cppreference.com/w/cpp/locale/ctype/is.html',1,'std::ctype::is()'],['http://en.cppreference.com/w/cpp/locale/ctype/is.html',1,'std::ctype_byname::is()']]], ['is_5fabsolute_156',['is_absolute',['http://en.cppreference.com/w/cpp/experimental/fs/path/is_absrel.html',1,'std::experimental::filesystem::path::is_absolute()'],['http://en.cppreference.com/w/cpp/filesystem/path/is_absrel.html',1,'std::filesystem::path::is_absolute()']]], ['is_5faged_5fcontainer_157',['is_aged_container',['../structbeast_1_1is__aged__container.html#a1dbf1de88c052c23ef435cc965f1c6da',1,'beast::is_aged_container::is_aged_container()'],['../structbeast_1_1is__aged__container_3_01beast_1_1detail_1_1aged__ordered__container_3_01IsMulti_0338a9b22fe6c4be0d8f95d218bdfb0e7.html#a767d3040286475dd3879f0bfa7feae76',1,'beast::is_aged_container< beast::detail::aged_ordered_container< IsMulti, IsMap, Key, T, Clock, Compare, Allocator > >::is_aged_container()'],['../structbeast_1_1is__aged__container_3_01beast_1_1detail_1_1aged__unordered__container_3_01IsMultia80d60acae45fc077226391e490a323d.html#a2209be63bb676e9732e2e5e33c58fb3e',1,'beast::is_aged_container< beast::detail::aged_unordered_container< IsMulti, IsMap, Key, T, Clock, Hash, KeyEqual, Allocator > >::is_aged_container()']]], diff --git a/src_2test_2jtx_2amount_8h_source.html b/src_2test_2jtx_2amount_8h_source.html index 66ffb678ee..a621dd32cb 100644 --- a/src_2test_2jtx_2amount_8h_source.html +++ b/src_2test_2jtx_2amount_8h_source.html @@ -803,7 +803,7 @@ $(document).ready(function() { init_codefold(0); });
friend BookSpec operator~(XRP_t const &)
None operator()(none_t) const
Returns None-of-XRP.
PrettyAmount operator()(double v) const
-
PrettyAmount operator()(T v) const
Returns an amount of XRP as PrettyAmount, which is trivially convertable to STAmount.
+
PrettyAmount operator()(T v) const
Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.
AnyAmount operator()(STAmount const &sta) const
diff --git a/structripple_1_1test_1_1jtx_1_1XRP__t.html b/structripple_1_1test_1_1jtx_1_1XRP__t.html index 932de9cbe1..7a2b9a4f98 100644 --- a/structripple_1_1test_1_1jtx_1_1XRP__t.html +++ b/structripple_1_1test_1_1jtx_1_1XRP__t.html @@ -94,7 +94,7 @@ Public Member Functions
template<class T , class = std::enable_if_t<std::is_integral_v<T>>> PrettyAmount operator() (T v) const - Returns an amount of XRP as PrettyAmount, which is trivially convertable to STAmount.
+ Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.
  PrettyAmount operator() (double v) const   @@ -148,7 +148,7 @@ template<class T , class = std::enable_if_t<std::is_integral_v<T>&g
-

Returns an amount of XRP as PrettyAmount, which is trivially convertable to STAmount.

+

Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.

Parameters
diff --git a/xrpld_2rpc_2handlers_2LedgerHeader_8cpp_source.html b/xrpld_2rpc_2handlers_2LedgerHeader_8cpp_source.html index e5cd107ba2..801d7b28cf 100644 --- a/xrpld_2rpc_2handlers_2LedgerHeader_8cpp_source.html +++ b/xrpld_2rpc_2handlers_2LedgerHeader_8cpp_source.html @@ -82,7 +82,7 @@ $(document).ready(function() { init_codefold(0); });
1#include <xrpld/app/ledger/LedgerToJson.h>
-
2#include <xrpld/rpc/detail/RPCHelpers.h>
+
2#include <xrpld/rpc/detail/RPCLedgerHelpers.h>
3
4#include <xrpl/basics/strHex.h>
5#include <xrpl/ledger/ReadView.h>
@@ -120,7 +120,7 @@ $(document).ready(function() { init_codefold(0); });
Represents a JSON value.
Definition json_value.h:131
Blob const & peekData() const
Definition Serializer.h:183
-
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
+
Status lookupLedger(std::shared_ptr< ReadView const > &ledger, JsonContext &context, Json::Value &result)
Look up a ledger from a request and fill a Json::Result with the data representing a ledger.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
void addJson(Json::Value &json, LedgerFill const &fill)
Given a Ledger and options, fill a Json::Object or Json::Value with a description of the ledger.
std::string strHex(FwdIt begin, FwdIt end)
Definition strHex.h:11
vThe number of XRP (not drops)