From 2b45155992b7b2747eb341ac740c4e03e32bea0f Mon Sep 17 00:00:00 2001 From: bthomee Date: Wed, 19 Nov 2025 09:01:20 -0800 Subject: [PATCH] deploy: 6ff495fd9b923c5a07e5aca159ea268d34ac0c9e --- GRPCHandlers_8h_source.html | 2 +- GRPCServer_8cpp_source.html | 2 +- Handler_8cpp_source.html | 2 +- Handlers_8h_source.html | 2 +- LedgerEntry_8cpp_source.html | 1825 ++++++++++++++-------------- LedgerEntry__test_8cpp_source.html | 6 +- VaultInfo_8cpp_source.html | 2 +- namespaceripple.html | 68 +- structripple_1_1LedgerEntry.html | 8 +- 9 files changed, 965 insertions(+), 952 deletions(-) diff --git a/GRPCHandlers_8h_source.html b/GRPCHandlers_8h_source.html index b73172657c..2d2c359f54 100644 --- a/GRPCHandlers_8h_source.html +++ b/GRPCHandlers_8h_source.html @@ -120,7 +120,7 @@ $(document).ready(function() { init_codefold(0); });
37#endif
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::pair< org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status > doLedgerGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerRequest > &context)
-
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
+
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
std::pair< org::xrpl::rpc::v1::GetLedgerDiffResponse, grpc::Status > doLedgerDiffGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerDiffRequest > &context)
Definition LedgerDiff.cpp:6
std::pair< org::xrpl::rpc::v1::GetLedgerDataResponse, grpc::Status > doLedgerDataGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerDataRequest > &context)
diff --git a/GRPCServer_8cpp_source.html b/GRPCServer_8cpp_source.html index 346f580070..5f113ce6c5 100644 --- a/GRPCServer_8cpp_source.html +++ b/GRPCServer_8cpp_source.html @@ -834,7 +834,7 @@ $(document).ready(function() { init_codefold(0); });
@ rpcSUCCESS
Definition ErrorCodes.h:25
bool isUnlimited(Role const &role)
ADMIN and IDENTIFIED roles shall have unlimited resources.
Definition Role.cpp:106
std::pair< org::xrpl::rpc::v1::GetLedgerResponse, grpc::Status > doLedgerGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerRequest > &context)
-
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
+
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
void erase(STObject &st, TypedField< U > const &f)
Remove a field in an STObject.
Definition STExchange.h:153
Role
Indicates the level of administrative permission to grant.
Definition Role.h:25
@ IDENTIFIED
diff --git a/Handler_8cpp_source.html b/Handler_8cpp_source.html index 4a7b95ef1b..6366f05f15 100644 --- a/Handler_8cpp_source.html +++ b/Handler_8cpp_source.html @@ -423,7 +423,7 @@ $(document).ready(function() { init_codefold(0); });
Json::Value doValidationCreate(RPC::JsonContext &)
Json::Value doGetAggregatePrice(RPC::JsonContext &context)
oracles: array of {account, oracle_document_id} base_asset: is the asset to be priced quote_asset: is...
Json::Value doSubmitMultiSigned(RPC::JsonContext &)
-
Json::Value doLedgerEntry(RPC::JsonContext &)
+
Json::Value doLedgerEntry(RPC::JsonContext &)
Json::Value doNFTBuyOffers(RPC::JsonContext &)
Json::Value doChannelAuthorize(RPC::JsonContext &)
Json::Value doNoRippleCheck(RPC::JsonContext &)
diff --git a/Handlers_8h_source.html b/Handlers_8h_source.html index d8157a2546..ae8661c384 100644 --- a/Handlers_8h_source.html +++ b/Handlers_8h_source.html @@ -247,7 +247,7 @@ $(document).ready(function() { init_codefold(0); });
Json::Value doValidationCreate(RPC::JsonContext &)
Json::Value doGetAggregatePrice(RPC::JsonContext &context)
oracles: array of {account, oracle_document_id} base_asset: is the asset to be priced quote_asset: is...
Json::Value doSubmitMultiSigned(RPC::JsonContext &)
-
Json::Value doLedgerEntry(RPC::JsonContext &)
+
Json::Value doLedgerEntry(RPC::JsonContext &)
Json::Value doNFTBuyOffers(RPC::JsonContext &)
Json::Value doChannelAuthorize(RPC::JsonContext &)
Json::Value doNoRippleCheck(RPC::JsonContext &)
diff --git a/LedgerEntry_8cpp_source.html b/LedgerEntry_8cpp_source.html index c2be30e41a..98d6902e94 100644 --- a/LedgerEntry_8cpp_source.html +++ b/LedgerEntry_8cpp_source.html @@ -99,923 +99,937 @@ $(document).ready(function() { init_codefold(0); });
16#include <xrpl/protocol/STXChainBridge.h>
17#include <xrpl/protocol/jss.h>
18
-
19#include <functional>
+
19namespace ripple {
20
-
21namespace ripple {
-
22
-
23static Expected<uint256, Json::Value>
-
- -
25 Json::Value const& params,
-
26 Json::StaticString const fieldName,
-
27 std::string const& expectedType = "hex string or object")
-
28{
-
29 if (auto const uNodeIndex = LedgerEntryHelpers::parse<uint256>(params))
-
30 {
-
31 return *uNodeIndex;
-
32 }
- -
34 "malformedRequest", fieldName, expectedType);
-
35}
+
21static Expected<uint256, Json::Value>
+
+ +
23 Json::Value const& params,
+
24 Json::StaticString const fieldName,
+
25 std::string const& expectedType = "hex string or object")
+
26{
+
27 if (auto const uNodeIndex = LedgerEntryHelpers::parse<uint256>(params))
+
28 {
+
29 return *uNodeIndex;
+
30 }
+ +
32 "malformedRequest", fieldName, expectedType);
+
33}
-
36
-
37static Expected<uint256, Json::Value>
-
-
38parseIndex(Json::Value const& params, Json::StaticString const fieldName)
-
39{
-
40 return parseObjectID(params, fieldName, "hex string");
-
41}
+
34
+
35static Expected<uint256, Json::Value>
+
+
36parseIndex(Json::Value const& params, Json::StaticString const fieldName)
+
37{
+
38 return parseObjectID(params, fieldName, "hex string");
+
39}
-
42
-
43static Expected<uint256, Json::Value>
-
-
44parseAccountRoot(Json::Value const& params, Json::StaticString const fieldName)
-
45{
-
46 if (auto const account = LedgerEntryHelpers::parse<AccountID>(params))
-
47 {
-
48 return keylet::account(*account).key;
-
49 }
-
50
- -
52 "malformedAddress", fieldName, "AccountID");
-
53}
+
40
+
41static Expected<uint256, Json::Value>
+
+
42parseAccountRoot(Json::Value const& params, Json::StaticString const fieldName)
+
43{
+
44 if (auto const account = LedgerEntryHelpers::parse<AccountID>(params))
+
45 {
+
46 return keylet::account(*account).key;
+
47 }
+
48
+ +
50 "malformedAddress", fieldName, "AccountID");
+
51}
-
54
-
55static Expected<uint256, Json::Value>
-
-
56parseAmendments(Json::Value const& params, Json::StaticString const fieldName)
-
57{
-
58 return parseObjectID(params, fieldName, "hex string");
-
59}
+
52
+
53static Expected<uint256, Json::Value>
+
+
54parseAmendments(Json::Value const& params, Json::StaticString const fieldName)
+
55{
+
56 return parseObjectID(params, fieldName, "hex string");
+
57}
-
60
-
61static Expected<uint256, Json::Value>
-
-
62parseAMM(Json::Value const& params, Json::StaticString const fieldName)
-
63{
-
64 if (!params.isObject())
-
65 {
-
66 return parseObjectID(params, fieldName);
-
67 }
-
68
-
69 if (auto const value =
-
70 LedgerEntryHelpers::hasRequired(params, {jss::asset, jss::asset2});
-
71 !value)
-
72 {
-
73 return Unexpected(value.error());
-
74 }
-
75
-
76 try
-
77 {
-
78 auto const issue = issueFromJson(params[jss::asset]);
-
79 auto const issue2 = issueFromJson(params[jss::asset2]);
-
80 return keylet::amm(issue, issue2).key;
-
81 }
-
82 catch (std::runtime_error const&)
-
83 {
-
84 return LedgerEntryHelpers::malformedError("malformedRequest", "");
-
85 }
-
86}
+
58
+
59static Expected<uint256, Json::Value>
+
+
60parseAMM(Json::Value const& params, Json::StaticString const fieldName)
+
61{
+
62 if (!params.isObject())
+
63 {
+
64 return parseObjectID(params, fieldName);
+
65 }
+
66
+
67 if (auto const value =
+
68 LedgerEntryHelpers::hasRequired(params, {jss::asset, jss::asset2});
+
69 !value)
+
70 {
+
71 return Unexpected(value.error());
+
72 }
+
73
+
74 try
+
75 {
+
76 auto const issue = issueFromJson(params[jss::asset]);
+
77 auto const issue2 = issueFromJson(params[jss::asset2]);
+
78 return keylet::amm(issue, issue2).key;
+
79 }
+
80 catch (std::runtime_error const&)
+
81 {
+
82 return LedgerEntryHelpers::malformedError("malformedRequest", "");
+
83 }
+
84}
-
87
-
88static Expected<uint256, Json::Value>
-
-
89parseBridge(Json::Value const& params, Json::StaticString const fieldName)
-
90{
-
91 if (!params.isMember(jss::bridge))
-
92 {
- -
94 }
-
95
-
96 if (params[jss::bridge].isString())
-
97 {
-
98 return parseObjectID(params, fieldName);
-
99 }
-
100
-
101 auto const bridge =
-
102 LedgerEntryHelpers::parseBridgeFields(params[jss::bridge]);
-
103 if (!bridge)
-
104 return Unexpected(bridge.error());
-
105
-
106 auto const account = LedgerEntryHelpers::requiredAccountID(
-
107 params, jss::bridge_account, "malformedBridgeAccount");
-
108 if (!account)
-
109 return Unexpected(account.error());
-
110
-
111 STXChainBridge::ChainType const chainType =
-
112 STXChainBridge::srcChain(account.value() == bridge->lockingChainDoor());
-
113 if (account.value() != bridge->door(chainType))
-
114 return LedgerEntryHelpers::malformedError("malformedRequest", "");
-
115
-
116 return keylet::bridge(*bridge, chainType).key;
-
117}
+
85
+
86static Expected<uint256, Json::Value>
+
+
87parseBridge(Json::Value const& params, Json::StaticString const fieldName)
+
88{
+
89 if (!params.isMember(jss::bridge))
+
90 {
+ +
92 }
+
93
+
94 if (params[jss::bridge].isString())
+
95 {
+
96 return parseObjectID(params, fieldName);
+
97 }
+
98
+
99 auto const bridge =
+
100 LedgerEntryHelpers::parseBridgeFields(params[jss::bridge]);
+
101 if (!bridge)
+
102 return Unexpected(bridge.error());
+
103
+
104 auto const account = LedgerEntryHelpers::requiredAccountID(
+
105 params, jss::bridge_account, "malformedBridgeAccount");
+
106 if (!account)
+
107 return Unexpected(account.error());
+
108
+
109 STXChainBridge::ChainType const chainType =
+
110 STXChainBridge::srcChain(account.value() == bridge->lockingChainDoor());
+
111 if (account.value() != bridge->door(chainType))
+
112 return LedgerEntryHelpers::malformedError("malformedRequest", "");
+
113
+
114 return keylet::bridge(*bridge, chainType).key;
+
115}
-
118
-
119static Expected<uint256, Json::Value>
-
-
120parseCheck(Json::Value const& params, Json::StaticString const fieldName)
-
121{
-
122 return parseObjectID(params, fieldName, "hex string");
-
123}
+
116
+
117static Expected<uint256, Json::Value>
+
+
118parseCheck(Json::Value const& params, Json::StaticString const fieldName)
+
119{
+
120 return parseObjectID(params, fieldName, "hex string");
+
121}
-
124
-
125static Expected<uint256, Json::Value>
-
-
126parseCredential(Json::Value const& cred, Json::StaticString const fieldName)
-
127{
-
128 if (!cred.isObject())
-
129 {
-
130 return parseObjectID(cred, fieldName);
-
131 }
-
132
-
133 auto const subject = LedgerEntryHelpers::requiredAccountID(
-
134 cred, jss::subject, "malformedRequest");
-
135 if (!subject)
-
136 return Unexpected(subject.error());
-
137
-
138 auto const issuer = LedgerEntryHelpers::requiredAccountID(
-
139 cred, jss::issuer, "malformedRequest");
-
140 if (!issuer)
-
141 return Unexpected(issuer.error());
-
142
-
143 auto const credType = LedgerEntryHelpers::requiredHexBlob(
-
144 cred,
-
145 jss::credential_type,
- -
147 "malformedRequest");
-
148 if (!credType)
-
149 return Unexpected(credType.error());
-
150
-
151 return keylet::credential(
-
152 *subject, *issuer, Slice(credType->data(), credType->size()))
-
153 .key;
-
154}
+
122
+
123static Expected<uint256, Json::Value>
+
+
124parseCredential(Json::Value const& cred, Json::StaticString const fieldName)
+
125{
+
126 if (!cred.isObject())
+
127 {
+
128 return parseObjectID(cred, fieldName);
+
129 }
+
130
+
131 auto const subject = LedgerEntryHelpers::requiredAccountID(
+
132 cred, jss::subject, "malformedRequest");
+
133 if (!subject)
+
134 return Unexpected(subject.error());
+
135
+
136 auto const issuer = LedgerEntryHelpers::requiredAccountID(
+
137 cred, jss::issuer, "malformedRequest");
+
138 if (!issuer)
+
139 return Unexpected(issuer.error());
+
140
+
141 auto const credType = LedgerEntryHelpers::requiredHexBlob(
+
142 cred,
+
143 jss::credential_type,
+ +
145 "malformedRequest");
+
146 if (!credType)
+
147 return Unexpected(credType.error());
+
148
+
149 return keylet::credential(
+
150 *subject, *issuer, Slice(credType->data(), credType->size()))
+
151 .key;
+
152}
-
155
-
156static Expected<uint256, Json::Value>
-
-
157parseDelegate(Json::Value const& params, Json::StaticString const fieldName)
-
158{
-
159 if (!params.isObject())
-
160 {
-
161 return parseObjectID(params, fieldName);
-
162 }
-
163
-
164 auto const account = LedgerEntryHelpers::requiredAccountID(
-
165 params, jss::account, "malformedAddress");
-
166 if (!account)
-
167 return Unexpected(account.error());
-
168
-
169 auto const authorize = LedgerEntryHelpers::requiredAccountID(
-
170 params, jss::authorize, "malformedAddress");
-
171 if (!authorize)
-
172 return Unexpected(authorize.error());
-
173
-
174 return keylet::delegate(*account, *authorize).key;
-
175}
+
153
+
154static Expected<uint256, Json::Value>
+
+
155parseDelegate(Json::Value const& params, Json::StaticString const fieldName)
+
156{
+
157 if (!params.isObject())
+
158 {
+
159 return parseObjectID(params, fieldName);
+
160 }
+
161
+
162 auto const account = LedgerEntryHelpers::requiredAccountID(
+
163 params, jss::account, "malformedAddress");
+
164 if (!account)
+
165 return Unexpected(account.error());
+
166
+
167 auto const authorize = LedgerEntryHelpers::requiredAccountID(
+
168 params, jss::authorize, "malformedAddress");
+
169 if (!authorize)
+
170 return Unexpected(authorize.error());
+
171
+
172 return keylet::delegate(*account, *authorize).key;
+
173}
-
176
-
177static Expected<STArray, Json::Value>
-
- -
179{
-
180 if (!jv.isArray())
- -
182 "malformedAuthorizedCredentials",
-
183 jss::authorized_credentials,
-
184 "array");
-
185 STArray arr(sfAuthorizeCredentials, jv.size());
-
186 for (auto const& jo : jv)
-
187 {
-
188 if (!jo.isObject())
- -
190 "malformedAuthorizedCredentials",
-
191 jss::authorized_credentials,
-
192 "array");
-
193 if (auto const value = LedgerEntryHelpers::hasRequired(
-
194 jo,
-
195 {jss::issuer, jss::credential_type},
-
196 "malformedAuthorizedCredentials");
-
197 !value)
-
198 {
-
199 return Unexpected(value.error());
-
200 }
-
201
-
202 auto const issuer = LedgerEntryHelpers::requiredAccountID(
-
203 jo, jss::issuer, "malformedAuthorizedCredentials");
-
204 if (!issuer)
-
205 return Unexpected(issuer.error());
-
206
-
207 auto const credentialType = LedgerEntryHelpers::requiredHexBlob(
-
208 jo,
-
209 jss::credential_type,
- -
211 "malformedAuthorizedCredentials");
-
212 if (!credentialType)
-
213 return Unexpected(credentialType.error());
-
214
-
215 auto credential = STObject::makeInnerObject(sfCredential);
-
216 credential.setAccountID(sfIssuer, *issuer);
-
217 credential.setFieldVL(sfCredentialType, *credentialType);
-
218 arr.push_back(std::move(credential));
-
219 }
-
220
-
221 return arr;
-
222}
+
174
+
175static Expected<STArray, Json::Value>
+
+ +
177{
+
178 if (!jv.isArray())
+
179 {
+ +
181 "malformedAuthorizedCredentials",
+
182 jss::authorized_credentials,
+
183 "array");
+
184 }
+
185
+
186 std::uint32_t const n = jv.size();
+ +
188 {
+ +
190 "malformedAuthorizedCredentials",
+
191 "Invalid field '" + std::string(jss::authorized_credentials) +
+
192 "', array too long."));
+
193 }
+
194
+
195 if (n == 0)
+
196 {
+ +
198 "malformedAuthorizedCredentials",
+
199 "Invalid field '" + std::string(jss::authorized_credentials) +
+
200 "', array empty."));
+
201 }
+
202
+
203 STArray arr(sfAuthorizeCredentials, n);
+
204 for (auto const& jo : jv)
+
205 {
+
206 if (!jo.isObject())
+
207 {
+ +
209 "malformedAuthorizedCredentials",
+
210 jss::authorized_credentials,
+
211 "array");
+
212 }
+
213
+
214 if (auto const value = LedgerEntryHelpers::hasRequired(
+
215 jo,
+
216 {jss::issuer, jss::credential_type},
+
217 "malformedAuthorizedCredentials");
+
218 !value)
+
219 {
+
220 return Unexpected(value.error());
+
221 }
+
222
+
223 auto const issuer = LedgerEntryHelpers::requiredAccountID(
+
224 jo, jss::issuer, "malformedAuthorizedCredentials");
+
225 if (!issuer)
+
226 return Unexpected(issuer.error());
+
227
+
228 auto const credentialType = LedgerEntryHelpers::requiredHexBlob(
+
229 jo,
+
230 jss::credential_type,
+ +
232 "malformedAuthorizedCredentials");
+
233 if (!credentialType)
+
234 return Unexpected(credentialType.error());
+
235
+
236 auto credential = STObject::makeInnerObject(sfCredential);
+
237 credential.setAccountID(sfIssuer, *issuer);
+
238 credential.setFieldVL(sfCredentialType, *credentialType);
+
239 arr.push_back(std::move(credential));
+
240 }
+
241
+
242 return arr;
+
243}
-
223
-
224static Expected<uint256, Json::Value>
-
- -
226{
-
227 if (!dp.isObject())
-
228 {
-
229 return parseObjectID(dp, fieldName);
-
230 }
-
231
-
232 if ((dp.isMember(jss::authorized) ==
-
233 dp.isMember(jss::authorized_credentials)))
-
234 {
- -
236 "malformedRequest",
-
237 "Must have exactly one of `authorized` and "
-
238 "`authorized_credentials`.");
-
239 }
-
240
-
241 auto const owner =
-
242 LedgerEntryHelpers::requiredAccountID(dp, jss::owner, "malformedOwner");
-
243 if (!owner)
-
244 {
-
245 return Unexpected(owner.error());
-
246 }
-
247
-
248 if (dp.isMember(jss::authorized))
+
244
+
245static Expected<uint256, Json::Value>
+
+ +
247{
+
248 if (!dp.isObject())
249 {
-
250 if (auto const authorized =
-
251 LedgerEntryHelpers::parse<AccountID>(dp[jss::authorized]))
-
252 {
-
253 return keylet::depositPreauth(*owner, *authorized).key;
-
254 }
- -
256 "malformedAuthorized", jss::authorized, "AccountID");
-
257 }
-
258
-
259 auto const& ac(dp[jss::authorized_credentials]);
-
260 auto const arr = parseAuthorizeCredentials(ac);
-
261 if (!arr.has_value())
-
262 return Unexpected(arr.error());
-
263 if (arr->empty() || (arr->size() > maxCredentialsArraySize))
-
264 {
- -
266 "malformedAuthorizedCredentials",
-
267 jss::authorized_credentials,
-
268 "array");
-
269 }
-
270
-
271 auto const& sorted = credentials::makeSorted(arr.value());
-
272 if (sorted.empty())
-
273 {
-
274 // TODO: this error message is bad/inaccurate
- -
276 "malformedAuthorizedCredentials",
-
277 jss::authorized_credentials,
-
278 "array");
-
279 }
-
280
-
281 return keylet::depositPreauth(*owner, std::move(sorted)).key;
-
282}
+
250 return parseObjectID(dp, fieldName);
+
251 }
+
252
+
253 if ((dp.isMember(jss::authorized) ==
+
254 dp.isMember(jss::authorized_credentials)))
+
255 {
+ +
257 "malformedRequest",
+
258 "Must have exactly one of `authorized` and "
+
259 "`authorized_credentials`.");
+
260 }
+
261
+
262 auto const owner =
+
263 LedgerEntryHelpers::requiredAccountID(dp, jss::owner, "malformedOwner");
+
264 if (!owner)
+
265 {
+
266 return Unexpected(owner.error());
+
267 }
+
268
+
269 if (dp.isMember(jss::authorized))
+
270 {
+
271 if (auto const authorized =
+
272 LedgerEntryHelpers::parse<AccountID>(dp[jss::authorized]))
+
273 {
+
274 return keylet::depositPreauth(*owner, *authorized).key;
+
275 }
+ +
277 "malformedAuthorized", jss::authorized, "AccountID");
+
278 }
+
279
+
280 auto const& ac(dp[jss::authorized_credentials]);
+
281 auto const arr = parseAuthorizeCredentials(ac);
+
282 if (!arr.has_value())
+
283 return Unexpected(arr.error());
+
284
+
285 auto const& sorted = credentials::makeSorted(arr.value());
+
286 if (sorted.empty())
+
287 {
+
288 // TODO: this error message is bad/inaccurate
+ +
290 "malformedAuthorizedCredentials",
+
291 jss::authorized_credentials,
+
292 "array");
+
293 }
+
294
+
295 return keylet::depositPreauth(*owner, std::move(sorted)).key;
+
296}
-
283
-
284static Expected<uint256, Json::Value>
-
-
285parseDID(Json::Value const& params, Json::StaticString const fieldName)
-
286{
-
287 auto const account = LedgerEntryHelpers::parse<AccountID>(params);
-
288 if (!account)
-
289 {
- -
291 "malformedAddress", fieldName, "AccountID");
-
292 }
-
293
-
294 return keylet::did(*account).key;
-
295}
-
-
296
-
297static Expected<uint256, Json::Value>
-
- -
299 Json::Value const& params,
-
300 Json::StaticString const fieldName)
-
301{
-
302 if (!params.isObject())
+
297
+
298static Expected<uint256, Json::Value>
+
+
299parseDID(Json::Value const& params, Json::StaticString const fieldName)
+
300{
+
301 auto const account = LedgerEntryHelpers::parse<AccountID>(params);
+
302 if (!account)
303 {
-
304 return parseObjectID(params, fieldName);
-
305 }
-
306
-
307 if (params.isMember(jss::sub_index) &&
-
308 (!params[jss::sub_index].isConvertibleTo(Json::uintValue) ||
-
309 params[jss::sub_index].isBool()))
-
310 {
- -
312 "malformedRequest", jss::sub_index, "number");
-
313 }
-
314
-
315 if (params.isMember(jss::owner) == params.isMember(jss::dir_root))
-
316 {
- -
318 "malformedRequest",
-
319 "Must have exactly one of `owner` and `dir_root` fields.");
-
320 }
-
321
-
322 std::uint64_t uSubIndex = params.get(jss::sub_index, 0).asUInt();
-
323
-
324 if (params.isMember(jss::dir_root))
-
325 {
-
326 if (auto const uDirRoot =
-
327 LedgerEntryHelpers::parse<uint256>(params[jss::dir_root]))
-
328 {
-
329 return keylet::page(*uDirRoot, uSubIndex).key;
-
330 }
-
331
- -
333 "malformedDirRoot", jss::dir_root, "hash");
+ +
305 "malformedAddress", fieldName, "AccountID");
+
306 }
+
307
+
308 return keylet::did(*account).key;
+
309}
+
+
310
+
311static Expected<uint256, Json::Value>
+
+ +
313 Json::Value const& params,
+
314 Json::StaticString const fieldName)
+
315{
+
316 if (!params.isObject())
+
317 {
+
318 return parseObjectID(params, fieldName);
+
319 }
+
320
+
321 if (params.isMember(jss::sub_index) &&
+
322 (!params[jss::sub_index].isConvertibleTo(Json::uintValue) ||
+
323 params[jss::sub_index].isBool()))
+
324 {
+ +
326 "malformedRequest", jss::sub_index, "number");
+
327 }
+
328
+
329 if (params.isMember(jss::owner) == params.isMember(jss::dir_root))
+
330 {
+ +
332 "malformedRequest",
+
333 "Must have exactly one of `owner` and `dir_root` fields.");
334 }
335
-
336 if (params.isMember(jss::owner))
-
337 {
-
338 auto const ownerID =
-
339 LedgerEntryHelpers::parse<AccountID>(params[jss::owner]);
-
340 if (!ownerID)
-
341 {
- -
343 "malformedAddress", jss::owner, "AccountID");
+
336 std::uint64_t uSubIndex = params.get(jss::sub_index, 0).asUInt();
+
337
+
338 if (params.isMember(jss::dir_root))
+
339 {
+
340 if (auto const uDirRoot =
+
341 LedgerEntryHelpers::parse<uint256>(params[jss::dir_root]))
+
342 {
+
343 return keylet::page(*uDirRoot, uSubIndex).key;
344 }
345
-
346 return keylet::page(keylet::ownerDir(*ownerID), uSubIndex).key;
-
347 }
-
348
-
349 return LedgerEntryHelpers::malformedError("malformedRequest", "");
-
350}
-
-
351
-
352static Expected<uint256, Json::Value>
-
-
353parseEscrow(Json::Value const& params, Json::StaticString const fieldName)
-
354{
-
355 if (!params.isObject())
-
356 {
-
357 return parseObjectID(params, fieldName);
-
358 }
+ +
347 "malformedDirRoot", jss::dir_root, "hash");
+
348 }
+
349
+
350 if (params.isMember(jss::owner))
+
351 {
+
352 auto const ownerID =
+
353 LedgerEntryHelpers::parse<AccountID>(params[jss::owner]);
+
354 if (!ownerID)
+
355 {
+ +
357 "malformedAddress", jss::owner, "AccountID");
+
358 }
359
- -
361 params, jss::owner, "malformedOwner");
-
362 if (!id)
-
363 return Unexpected(id.error());
-
364 auto const seq =
-
365 LedgerEntryHelpers::requiredUInt32(params, jss::seq, "malformedSeq");
-
366 if (!seq)
-
367 return Unexpected(seq.error());
-
368
-
369 return keylet::escrow(*id, *seq).key;
-
370}
+
360 return keylet::page(keylet::ownerDir(*ownerID), uSubIndex).key;
+
361 }
+
362
+
363 return LedgerEntryHelpers::malformedError("malformedRequest", "");
+
364}
-
371
-
372static Expected<uint256, Json::Value>
-
-
373parseFeeSettings(Json::Value const& params, Json::StaticString const fieldName)
-
374{
-
375 return parseObjectID(params, fieldName, "hex string");
-
376}
+
365
+
366static Expected<uint256, Json::Value>
+
+
367parseEscrow(Json::Value const& params, Json::StaticString const fieldName)
+
368{
+
369 if (!params.isObject())
+
370 {
+
371 return parseObjectID(params, fieldName);
+
372 }
+
373
+ +
375 params, jss::owner, "malformedOwner");
+
376 if (!id)
+
377 return Unexpected(id.error());
+
378 auto const seq =
+
379 LedgerEntryHelpers::requiredUInt32(params, jss::seq, "malformedSeq");
+
380 if (!seq)
+
381 return Unexpected(seq.error());
+
382
+
383 return keylet::escrow(*id, *seq).key;
+
384}
-
377
-
378static Expected<uint256, Json::Value>
-
-
379parseLedgerHashes(Json::Value const& params, Json::StaticString const fieldName)
-
380{
-
381 return parseObjectID(params, fieldName, "hex string");
-
382}
+
385
+
386static Expected<uint256, Json::Value>
+
+
387parseFeeSettings(Json::Value const& params, Json::StaticString const fieldName)
+
388{
+
389 return parseObjectID(params, fieldName, "hex string");
+
390}
-
383
-
384static Expected<uint256, Json::Value>
-
-
385parseMPToken(Json::Value const& params, Json::StaticString const fieldName)
-
386{
-
387 if (!params.isObject())
-
388 {
-
389 return parseObjectID(params, fieldName);
-
390 }
391
-
392 auto const mptIssuanceID = LedgerEntryHelpers::requiredUInt192(
-
393 params, jss::mpt_issuance_id, "malformedMPTIssuanceID");
-
394 if (!mptIssuanceID)
-
395 return Unexpected(mptIssuanceID.error());
-
396
-
397 auto const account = LedgerEntryHelpers::requiredAccountID(
-
398 params, jss::account, "malformedAccount");
-
399 if (!account)
-
400 return Unexpected(account.error());
-
401
-
402 return keylet::mptoken(*mptIssuanceID, *account).key;
-
403}
+
392static Expected<uint256, Json::Value>
+
+
393parseLedgerHashes(Json::Value const& params, Json::StaticString const fieldName)
+
394{
+
395 return parseObjectID(params, fieldName, "hex string");
+
396}
-
404
-
405static Expected<uint256, Json::Value>
-
- -
407 Json::Value const& params,
-
408 Json::StaticString const fieldName)
-
409{
-
410 auto const mptIssuanceID = LedgerEntryHelpers::parse<uint192>(params);
-
411 if (!mptIssuanceID)
- -
413 "malformedMPTokenIssuance", fieldName, "Hash192");
-
414
-
415 return keylet::mptIssuance(*mptIssuanceID).key;
-
416}
+
397
+
398static Expected<uint256, Json::Value>
+
+
399parseMPToken(Json::Value const& params, Json::StaticString const fieldName)
+
400{
+
401 if (!params.isObject())
+
402 {
+
403 return parseObjectID(params, fieldName);
+
404 }
+
405
+
406 auto const mptIssuanceID = LedgerEntryHelpers::requiredUInt192(
+
407 params, jss::mpt_issuance_id, "malformedMPTIssuanceID");
+
408 if (!mptIssuanceID)
+
409 return Unexpected(mptIssuanceID.error());
+
410
+
411 auto const account = LedgerEntryHelpers::requiredAccountID(
+
412 params, jss::account, "malformedAccount");
+
413 if (!account)
+
414 return Unexpected(account.error());
+
415
+
416 return keylet::mptoken(*mptIssuanceID, *account).key;
+
417}
-
417
-
418static Expected<uint256, Json::Value>
-
-
419parseNFTokenOffer(Json::Value const& params, Json::StaticString const fieldName)
-
420{
-
421 return parseObjectID(params, fieldName, "hex string");
-
422}
+
418
+
419static Expected<uint256, Json::Value>
+
+ +
421 Json::Value const& params,
+
422 Json::StaticString const fieldName)
+
423{
+
424 auto const mptIssuanceID = LedgerEntryHelpers::parse<uint192>(params);
+
425 if (!mptIssuanceID)
+ +
427 "malformedMPTokenIssuance", fieldName, "Hash192");
+
428
+
429 return keylet::mptIssuance(*mptIssuanceID).key;
+
430}
-
423
-
424static Expected<uint256, Json::Value>
-
-
425parseNFTokenPage(Json::Value const& params, Json::StaticString const fieldName)
-
426{
-
427 return parseObjectID(params, fieldName, "hex string");
-
428}
+
431
+
432static Expected<uint256, Json::Value>
+
+
433parseNFTokenOffer(Json::Value const& params, Json::StaticString const fieldName)
+
434{
+
435 return parseObjectID(params, fieldName, "hex string");
+
436}
-
429
-
430static Expected<uint256, Json::Value>
-
-
431parseNegativeUNL(Json::Value const& params, Json::StaticString const fieldName)
-
432{
-
433 return parseObjectID(params, fieldName, "hex string");
-
434}
+
437
+
438static Expected<uint256, Json::Value>
+
+
439parseNFTokenPage(Json::Value const& params, Json::StaticString const fieldName)
+
440{
+
441 return parseObjectID(params, fieldName, "hex string");
+
442}
-
435
-
436static Expected<uint256, Json::Value>
-
-
437parseOffer(Json::Value const& params, Json::StaticString const fieldName)
-
438{
-
439 if (!params.isObject())
-
440 {
-
441 return parseObjectID(params, fieldName);
-
442 }
443
- -
445 params, jss::account, "malformedAddress");
-
446 if (!id)
-
447 return Unexpected(id.error());
-
448
-
449 auto const seq = LedgerEntryHelpers::requiredUInt32(
-
450 params, jss::seq, "malformedRequest");
-
451 if (!seq)
-
452 return Unexpected(seq.error());
-
453
-
454 return keylet::offer(*id, *seq).key;
-
455}
+
444static Expected<uint256, Json::Value>
+
+
445parseNegativeUNL(Json::Value const& params, Json::StaticString const fieldName)
+
446{
+
447 return parseObjectID(params, fieldName, "hex string");
+
448}
-
456
-
457static Expected<uint256, Json::Value>
-
-
458parseOracle(Json::Value const& params, Json::StaticString const fieldName)
-
459{
-
460 if (!params.isObject())
-
461 {
-
462 return parseObjectID(params, fieldName);
-
463 }
-
464
- -
466 params, jss::account, "malformedAccount");
-
467 if (!id)
-
468 return Unexpected(id.error());
-
469
-
470 auto const seq = LedgerEntryHelpers::requiredUInt32(
-
471 params, jss::oracle_document_id, "malformedDocumentID");
-
472 if (!seq)
-
473 return Unexpected(seq.error());
-
474
-
475 return keylet::oracle(*id, *seq).key;
-
476}
-
-
477
-
478static Expected<uint256, Json::Value>
-
-
479parsePayChannel(Json::Value const& params, Json::StaticString const fieldName)
-
480{
-
481 return parseObjectID(params, fieldName, "hex string");
-
482}
+
449
+
450static Expected<uint256, Json::Value>
+
+
451parseOffer(Json::Value const& params, Json::StaticString const fieldName)
+
452{
+
453 if (!params.isObject())
+
454 {
+
455 return parseObjectID(params, fieldName);
+
456 }
+
457
+ +
459 params, jss::account, "malformedAddress");
+
460 if (!id)
+
461 return Unexpected(id.error());
+
462
+
463 auto const seq = LedgerEntryHelpers::requiredUInt32(
+
464 params, jss::seq, "malformedRequest");
+
465 if (!seq)
+
466 return Unexpected(seq.error());
+
467
+
468 return keylet::offer(*id, *seq).key;
+
469}
+
470
+
471static Expected<uint256, Json::Value>
+
+
472parseOracle(Json::Value const& params, Json::StaticString const fieldName)
+
473{
+
474 if (!params.isObject())
+
475 {
+
476 return parseObjectID(params, fieldName);
+
477 }
+
478
+ +
480 params, jss::account, "malformedAccount");
+
481 if (!id)
+
482 return Unexpected(id.error());
483
-
484static Expected<uint256, Json::Value>
-
- -
486 Json::Value const& pd,
-
487 Json::StaticString const fieldName)
-
488{
-
489 if (pd.isString())
-
490 {
-
491 return parseObjectID(pd, fieldName);
-
492 }
-
493
-
494 if (!pd.isObject())
-
495 {
- -
497 "malformedRequest", fieldName, "hex string or object");
-
498 }
-
499
-
500 auto const account = LedgerEntryHelpers::requiredAccountID(
-
501 pd, jss::account, "malformedAddress");
-
502 if (!account)
-
503 return Unexpected(account.error());
-
504
-
505 auto const seq =
-
506 LedgerEntryHelpers::requiredUInt32(pd, jss::seq, "malformedRequest");
-
507 if (!seq)
-
508 return Unexpected(seq.error());
-
509
-
510 return keylet::permissionedDomain(*account, pd[jss::seq].asUInt()).key;
-
511}
+
484 auto const seq = LedgerEntryHelpers::requiredUInt32(
+
485 params, jss::oracle_document_id, "malformedDocumentID");
+
486 if (!seq)
+
487 return Unexpected(seq.error());
+
488
+
489 return keylet::oracle(*id, *seq).key;
+
490}
-
512
-
513static Expected<uint256, Json::Value>
-
- -
515 Json::Value const& jvRippleState,
-
516 Json::StaticString const fieldName)
-
517{
-
518 Currency uCurrency;
-
519
-
520 if (!jvRippleState.isObject())
-
521 {
-
522 return parseObjectID(jvRippleState, fieldName);
-
523 }
-
524
-
525 if (auto const value = LedgerEntryHelpers::hasRequired(
-
526 jvRippleState, {jss::currency, jss::accounts});
-
527 !value)
-
528 {
-
529 return Unexpected(value.error());
-
530 }
-
531
-
532 if (!jvRippleState[jss::accounts].isArray() ||
-
533 jvRippleState[jss::accounts].size() != 2)
-
534 {
- -
536 "malformedRequest", jss::accounts, "length-2 array of Accounts");
+
491
+
492static Expected<uint256, Json::Value>
+
+
493parsePayChannel(Json::Value const& params, Json::StaticString const fieldName)
+
494{
+
495 return parseObjectID(params, fieldName, "hex string");
+
496}
+
+
497
+
498static Expected<uint256, Json::Value>
+
+ +
500 Json::Value const& pd,
+
501 Json::StaticString const fieldName)
+
502{
+
503 if (pd.isString())
+
504 {
+
505 return parseObjectID(pd, fieldName);
+
506 }
+
507
+
508 if (!pd.isObject())
+
509 {
+ +
511 "malformedRequest", fieldName, "hex string or object");
+
512 }
+
513
+
514 auto const account = LedgerEntryHelpers::requiredAccountID(
+
515 pd, jss::account, "malformedAddress");
+
516 if (!account)
+
517 return Unexpected(account.error());
+
518
+
519 auto const seq =
+
520 LedgerEntryHelpers::requiredUInt32(pd, jss::seq, "malformedRequest");
+
521 if (!seq)
+
522 return Unexpected(seq.error());
+
523
+
524 return keylet::permissionedDomain(*account, pd[jss::seq].asUInt()).key;
+
525}
+
+
526
+
527static Expected<uint256, Json::Value>
+
+ +
529 Json::Value const& jvRippleState,
+
530 Json::StaticString const fieldName)
+
531{
+
532 Currency uCurrency;
+
533
+
534 if (!jvRippleState.isObject())
+
535 {
+
536 return parseObjectID(jvRippleState, fieldName);
537 }
538
-
539 auto const id1 =
-
540 LedgerEntryHelpers::parse<AccountID>(jvRippleState[jss::accounts][0u]);
-
541 auto const id2 =
-
542 LedgerEntryHelpers::parse<AccountID>(jvRippleState[jss::accounts][1u]);
-
543 if (!id1 || !id2)
-
544 {
- -
546 "malformedAddress", jss::accounts, "array of Accounts");
-
547 }
-
548 if (id1 == id2)
-
549 {
- -
551 "malformedRequest", "Cannot have a trustline to self.");
-
552 }
-
553
-
554 if (!jvRippleState[jss::currency].isString() ||
-
555 jvRippleState[jss::currency] == "" ||
-
556 !to_currency(uCurrency, jvRippleState[jss::currency].asString()))
-
557 {
- -
559 "malformedCurrency", jss::currency, "Currency");
-
560 }
-
561
-
562 return keylet::line(*id1, *id2, uCurrency).key;
-
563}
+
539 if (auto const value = LedgerEntryHelpers::hasRequired(
+
540 jvRippleState, {jss::currency, jss::accounts});
+
541 !value)
+
542 {
+
543 return Unexpected(value.error());
+
544 }
+
545
+
546 if (!jvRippleState[jss::accounts].isArray() ||
+
547 jvRippleState[jss::accounts].size() != 2)
+
548 {
+ +
550 "malformedRequest", jss::accounts, "length-2 array of Accounts");
+
551 }
+
552
+
553 auto const id1 =
+
554 LedgerEntryHelpers::parse<AccountID>(jvRippleState[jss::accounts][0u]);
+
555 auto const id2 =
+
556 LedgerEntryHelpers::parse<AccountID>(jvRippleState[jss::accounts][1u]);
+
557 if (!id1 || !id2)
+
558 {
+ +
560 "malformedAddress", jss::accounts, "array of Accounts");
+
561 }
+
562 if (id1 == id2)
+
563 {
+ +
565 "malformedRequest", "Cannot have a trustline to self.");
+
566 }
+
567
+
568 if (!jvRippleState[jss::currency].isString() ||
+
569 jvRippleState[jss::currency] == "" ||
+
570 !to_currency(uCurrency, jvRippleState[jss::currency].asString()))
+
571 {
+ +
573 "malformedCurrency", jss::currency, "Currency");
+
574 }
+
575
+
576 return keylet::line(*id1, *id2, uCurrency).key;
+
577}
-
564
-
565static Expected<uint256, Json::Value>
-
-
566parseSignerList(Json::Value const& params, Json::StaticString const fieldName)
-
567{
-
568 return parseObjectID(params, fieldName, "hex string");
-
569}
-
-
570
-
571static Expected<uint256, Json::Value>
-
-
572parseTicket(Json::Value const& params, Json::StaticString const fieldName)
-
573{
-
574 if (!params.isObject())
-
575 {
-
576 return parseObjectID(params, fieldName);
-
577 }
578
- -
580 params, jss::account, "malformedAddress");
-
581 if (!id)
-
582 return Unexpected(id.error());
-
583
-
584 auto const seq = LedgerEntryHelpers::requiredUInt32(
-
585 params, jss::ticket_seq, "malformedRequest");
-
586 if (!seq)
-
587 return Unexpected(seq.error());
-
588
-
589 return getTicketIndex(*id, *seq);
-
590}
+
579static Expected<uint256, Json::Value>
+
+
580parseSignerList(Json::Value const& params, Json::StaticString const fieldName)
+
581{
+
582 return parseObjectID(params, fieldName, "hex string");
+
583}
-
591
-
592static Expected<uint256, Json::Value>
-
-
593parseVault(Json::Value const& params, Json::StaticString const fieldName)
-
594{
-
595 if (!params.isObject())
-
596 {
-
597 return parseObjectID(params, fieldName);
-
598 }
-
599
- -
601 params, jss::owner, "malformedOwner");
-
602 if (!id)
-
603 return Unexpected(id.error());
-
604
-
605 auto const seq = LedgerEntryHelpers::requiredUInt32(
-
606 params, jss::seq, "malformedRequest");
-
607 if (!seq)
-
608 return Unexpected(seq.error());
-
609
-
610 return keylet::vault(*id, *seq).key;
-
611}
+
584
+
585static Expected<uint256, Json::Value>
+
+
586parseTicket(Json::Value const& params, Json::StaticString const fieldName)
+
587{
+
588 if (!params.isObject())
+
589 {
+
590 return parseObjectID(params, fieldName);
+
591 }
+
592
+ +
594 params, jss::account, "malformedAddress");
+
595 if (!id)
+
596 return Unexpected(id.error());
+
597
+
598 auto const seq = LedgerEntryHelpers::requiredUInt32(
+
599 params, jss::ticket_seq, "malformedRequest");
+
600 if (!seq)
+
601 return Unexpected(seq.error());
+
602
+
603 return getTicketIndex(*id, *seq);
+
604}
+
+
605
+
606static Expected<uint256, Json::Value>
+
+
607parseVault(Json::Value const& params, Json::StaticString const fieldName)
+
608{
+
609 if (!params.isObject())
+
610 {
+
611 return parseObjectID(params, fieldName);
+
612 }
+
613
+ +
615 params, jss::owner, "malformedOwner");
+
616 if (!id)
+
617 return Unexpected(id.error());
+
618
+
619 auto const seq = LedgerEntryHelpers::requiredUInt32(
+
620 params, jss::seq, "malformedRequest");
+
621 if (!seq)
+
622 return Unexpected(seq.error());
+
623
+
624 return keylet::vault(*id, *seq).key;
+
625}
-
612
-
613static Expected<uint256, Json::Value>
-
- -
615 Json::Value const& claim_id,
-
616 Json::StaticString const fieldName)
-
617{
-
618 if (!claim_id.isObject())
-
619 {
-
620 return parseObjectID(claim_id, fieldName);
-
621 }
-
622
-
623 auto const bridge_spec = LedgerEntryHelpers::parseBridgeFields(claim_id);
-
624 if (!bridge_spec)
-
625 return Unexpected(bridge_spec.error());
626
-
627 auto const seq = LedgerEntryHelpers::requiredUInt32(
-
628 claim_id, jss::xchain_owned_claim_id, "malformedXChainOwnedClaimID");
-
629 if (!seq)
-
630 {
-
631 return Unexpected(seq.error());
-
632 }
-
633
-
634 Keylet keylet = keylet::xChainClaimID(*bridge_spec, *seq);
-
635 return keylet.key;
-
636}
-
-
637
-
638static Expected<uint256, Json::Value>
-
- -
640 Json::Value const& claim_id,
-
641 Json::StaticString const fieldName)
-
642{
-
643 if (!claim_id.isObject())
+
627static Expected<uint256, Json::Value>
+
+ +
629 Json::Value const& claim_id,
+
630 Json::StaticString const fieldName)
+
631{
+
632 if (!claim_id.isObject())
+
633 {
+
634 return parseObjectID(claim_id, fieldName);
+
635 }
+
636
+
637 auto const bridge_spec = LedgerEntryHelpers::parseBridgeFields(claim_id);
+
638 if (!bridge_spec)
+
639 return Unexpected(bridge_spec.error());
+
640
+
641 auto const seq = LedgerEntryHelpers::requiredUInt32(
+
642 claim_id, jss::xchain_owned_claim_id, "malformedXChainOwnedClaimID");
+
643 if (!seq)
644 {
-
645 return parseObjectID(claim_id, fieldName);
+
645 return Unexpected(seq.error());
646 }
647
-
648 auto const bridge_spec = LedgerEntryHelpers::parseBridgeFields(claim_id);
-
649 if (!bridge_spec)
-
650 return Unexpected(bridge_spec.error());
+
648 Keylet keylet = keylet::xChainClaimID(*bridge_spec, *seq);
+
649 return keylet.key;
+
650}
+
651
-
652 auto const seq = LedgerEntryHelpers::requiredUInt32(
-
653 claim_id,
-
654 jss::xchain_owned_create_account_claim_id,
-
655 "malformedXChainOwnedCreateAccountClaimID");
-
656 if (!seq)
-
657 {
-
658 return Unexpected(seq.error());
-
659 }
-
660
-
661 Keylet keylet = keylet::xChainCreateAccountClaimID(*bridge_spec, *seq);
-
662 return keylet.key;
-
663}
+
652static Expected<uint256, Json::Value>
+
+ +
654 Json::Value const& claim_id,
+
655 Json::StaticString const fieldName)
+
656{
+
657 if (!claim_id.isObject())
+
658 {
+
659 return parseObjectID(claim_id, fieldName);
+
660 }
+
661
+
662 auto const bridge_spec = LedgerEntryHelpers::parseBridgeFields(claim_id);
+
663 if (!bridge_spec)
+
664 return Unexpected(bridge_spec.error());
+
665
+
666 auto const seq = LedgerEntryHelpers::requiredUInt32(
+
667 claim_id,
+
668 jss::xchain_owned_create_account_claim_id,
+
669 "malformedXChainOwnedCreateAccountClaimID");
+
670 if (!seq)
+
671 {
+
672 return Unexpected(seq.error());
+
673 }
+
674
+
675 Keylet keylet = keylet::xChainCreateAccountClaimID(*bridge_spec, *seq);
+
676 return keylet.key;
+
677}
-
664
- -
666 Json::Value const&,
-
667 Json::StaticString const);
-
668
-
- -
670{
- - - -
674};
+
678
+ +
680 Json::Value const&,
+
681 Json::StaticString const);
+
682
+ -
675
-
676// {
-
677// ledger_hash : <ledger>
-
678// ledger_index : <ledger_index>
-
679// ...
-
680// }
- -
- -
683{
-
684 static auto ledgerEntryParsers = std::to_array<LedgerEntry>({
-
685#pragma push_macro("LEDGER_ENTRY")
-
686#undef LEDGER_ENTRY
-
687
-
688#define LEDGER_ENTRY(tag, value, name, rpcName, fields) \
-
689 {jss::rpcName, parse##name, tag},
-
690
-
691#include <xrpl/protocol/detail/ledger_entries.macro>
-
692
-
693#undef LEDGER_ENTRY
-
694#pragma pop_macro("LEDGER_ENTRY")
-
695 {jss::index, parseIndex, ltANY},
-
696 // aliases
-
697 {jss::account_root, parseAccountRoot, ltACCOUNT_ROOT},
-
698 {jss::ripple_state, parseRippleState, ltRIPPLE_STATE},
-
699 });
-
700
-
701 auto hasMoreThanOneMember = [&]() {
-
702 int count = 0;
-
703
-
704 for (auto const& ledgerEntry : ledgerEntryParsers)
-
705 {
-
706 if (context.params.isMember(ledgerEntry.fieldName))
-
707 {
-
708 count++;
-
709 if (count > 1) // Early exit if more than one is found
-
710 return true;
-
711 }
-
712 }
-
713 return false; // Return false if <= 1 is found
-
714 }();
-
715
-
716 if (hasMoreThanOneMember)
-
717 {
-
718 return RPC::make_param_error("Too many fields provided.");
-
719 }
-
720
- -
722 auto jvResult = RPC::lookupLedger(lpLedger, context);
-
723
-
724 if (!lpLedger)
-
725 return jvResult;
-
726
-
727 uint256 uNodeIndex;
-
728 LedgerEntryType expectedType = ltANY;
+
689
+
690// {
+
691// ledger_hash : <ledger>
+
692// ledger_index : <ledger_index>
+
693// ...
+
694// }
+ +
+ +
697{
+
698 static auto ledgerEntryParsers = std::to_array<LedgerEntry>({
+
699#pragma push_macro("LEDGER_ENTRY")
+
700#undef LEDGER_ENTRY
+
701
+
702#define LEDGER_ENTRY(tag, value, name, rpcName, fields) \
+
703 {jss::rpcName, parse##name, tag},
+
704
+
705#include <xrpl/protocol/detail/ledger_entries.macro>
+
706
+
707#undef LEDGER_ENTRY
+
708#pragma pop_macro("LEDGER_ENTRY")
+
709 {jss::index, parseIndex, ltANY},
+
710 // aliases
+
711 {jss::account_root, parseAccountRoot, ltACCOUNT_ROOT},
+
712 {jss::ripple_state, parseRippleState, ltRIPPLE_STATE},
+
713 });
+
714
+
715 auto hasMoreThanOneMember = [&]() {
+
716 int count = 0;
+
717
+
718 for (auto const& ledgerEntry : ledgerEntryParsers)
+
719 {
+
720 if (context.params.isMember(ledgerEntry.fieldName))
+
721 {
+
722 count++;
+
723 if (count > 1) // Early exit if more than one is found
+
724 return true;
+
725 }
+
726 }
+
727 return false; // Return false if <= 1 is found
+
728 }();
729
-
730 try
+
730 if (hasMoreThanOneMember)
731 {
-
732 bool found = false;
-
733 for (auto const& ledgerEntry : ledgerEntryParsers)
-
734 {
-
735 if (context.params.isMember(ledgerEntry.fieldName))
-
736 {
-
737 expectedType = ledgerEntry.expectedType;
-
738 // `Bridge` is the only type that involves two fields at the
-
739 // `ledger_entry` param level.
-
740 // So that parser needs to have the whole `params` field.
-
741 // All other parsers only need the one field name's info.
-
742 Json::Value const& params = ledgerEntry.fieldName == jss::bridge
-
743 ? context.params
-
744 : context.params[ledgerEntry.fieldName];
-
745 auto const result =
-
746 ledgerEntry.parseFunction(params, ledgerEntry.fieldName);
-
747 if (!result)
-
748 return result.error();
-
749
-
750 uNodeIndex = result.value();
-
751 found = true;
-
752 break;
-
753 }
-
754 }
-
755 if (!found)
-
756 {
-
757 if (context.apiVersion < 2u)
-
758 {
-
759 jvResult[jss::error] = "unknownOption";
-
760 return jvResult;
-
761 }
-
762 return RPC::make_param_error("No ledger_entry params provided.");
-
763 }
-
764 }
-
765 catch (Json::error& e)
-
766 {
-
767 if (context.apiVersion > 1u)
-
768 {
-
769 // For apiVersion 2 onwards, any parsing failures that throw
-
770 // this exception return an invalidParam error.
- -
772 }
-
773 else
-
774 throw;
-
775 }
-
776
-
777 if (uNodeIndex.isZero())
-
778 {
- -
780 }
-
781
-
782 auto const sleNode = lpLedger->read(keylet::unchecked(uNodeIndex));
-
783
-
784 bool bNodeBinary = false;
-
785 if (context.params.isMember(jss::binary))
-
786 bNodeBinary = context.params[jss::binary].asBool();
-
787
-
788 if (!sleNode)
-
789 {
-
790 // Not found.
- -
792 }
-
793
-
794 if ((expectedType != ltANY) && (expectedType != sleNode->getType()))
-
795 {
- -
797 }
-
798
-
799 if (bNodeBinary)
-
800 {
-
801 Serializer s;
-
802
-
803 sleNode->add(s);
-
804
-
805 jvResult[jss::node_binary] = strHex(s.peekData());
-
806 jvResult[jss::index] = to_string(uNodeIndex);
-
807 }
-
808 else
+
732 return RPC::make_param_error("Too many fields provided.");
+
733 }
+
734
+ +
736 auto jvResult = RPC::lookupLedger(lpLedger, context);
+
737
+
738 if (!lpLedger)
+
739 return jvResult;
+
740
+
741 uint256 uNodeIndex;
+
742 LedgerEntryType expectedType = ltANY;
+
743
+
744 try
+
745 {
+
746 bool found = false;
+
747 for (auto const& ledgerEntry : ledgerEntryParsers)
+
748 {
+
749 if (context.params.isMember(ledgerEntry.fieldName))
+
750 {
+
751 expectedType = ledgerEntry.expectedType;
+
752 // `Bridge` is the only type that involves two fields at the
+
753 // `ledger_entry` param level.
+
754 // So that parser needs to have the whole `params` field.
+
755 // All other parsers only need the one field name's info.
+
756 Json::Value const& params = ledgerEntry.fieldName == jss::bridge
+
757 ? context.params
+
758 : context.params[ledgerEntry.fieldName];
+
759 auto const result =
+
760 ledgerEntry.parseFunction(params, ledgerEntry.fieldName);
+
761 if (!result)
+
762 return result.error();
+
763
+
764 uNodeIndex = result.value();
+
765 found = true;
+
766 break;
+
767 }
+
768 }
+
769 if (!found)
+
770 {
+
771 if (context.apiVersion < 2u)
+
772 {
+
773 jvResult[jss::error] = "unknownOption";
+
774 return jvResult;
+
775 }
+
776 return RPC::make_param_error("No ledger_entry params provided.");
+
777 }
+
778 }
+
779 catch (Json::error& e)
+
780 {
+
781 if (context.apiVersion > 1u)
+
782 {
+
783 // For apiVersion 2 onwards, any parsing failures that throw
+
784 // this exception return an invalidParam error.
+ +
786 }
+
787 else
+
788 throw;
+
789 }
+
790
+
791 if (uNodeIndex.isZero())
+
792 {
+ +
794 }
+
795
+
796 auto const sleNode = lpLedger->read(keylet::unchecked(uNodeIndex));
+
797
+
798 bool bNodeBinary = false;
+
799 if (context.params.isMember(jss::binary))
+
800 bNodeBinary = context.params[jss::binary].asBool();
+
801
+
802 if (!sleNode)
+
803 {
+
804 // Not found.
+ +
806 }
+
807
+
808 if ((expectedType != ltANY) && (expectedType != sleNode->getType()))
809 {
-
810 jvResult[jss::node] = sleNode->getJson(JsonOptions::none);
-
811 jvResult[jss::index] = to_string(uNodeIndex);
-
812 }
-
813
-
814 return jvResult;
-
815}
-
+ +
811 }
+
812
+
813 if (bNodeBinary)
+
814 {
+
815 Serializer s;
816
- -
- - -
820{
-
821 org::xrpl::rpc::v1::GetLedgerEntryRequest& request = context.params;
-
822 org::xrpl::rpc::v1::GetLedgerEntryResponse response;
-
823 grpc::Status status = grpc::Status::OK;
-
824
- -
826 if (auto status = RPC::ledgerFromRequest(ledger, context))
-
827 {
-
828 grpc::Status errorStatus;
-
829 if (status.toErrorCode() == rpcINVALID_PARAMS)
-
830 {
-
831 errorStatus = grpc::Status(
-
832 grpc::StatusCode::INVALID_ARGUMENT, status.message());
-
833 }
-
834 else
-
835 {
-
836 errorStatus =
-
837 grpc::Status(grpc::StatusCode::NOT_FOUND, status.message());
-
838 }
-
839 return {response, errorStatus};
-
840 }
-
841
-
842 auto const key = uint256::fromVoidChecked(request.key());
-
843 if (!key)
-
844 {
-
845 grpc::Status errorStatus{
-
846 grpc::StatusCode::INVALID_ARGUMENT, "index malformed"};
-
847 return {response, errorStatus};
-
848 }
-
849
-
850 auto const sleNode = ledger->read(keylet::unchecked(*key));
-
851 if (!sleNode)
-
852 {
-
853 grpc::Status errorStatus{
-
854 grpc::StatusCode::NOT_FOUND, "object not found"};
-
855 return {response, errorStatus};
-
856 }
-
857
-
858 Serializer s;
-
859 sleNode->add(s);
-
860
-
861 auto& stateObject = *response.mutable_ledger_object();
-
862 stateObject.set_data(s.peekData().data(), s.getLength());
-
863 stateObject.set_key(request.key());
-
864 *(response.mutable_ledger()) = request.ledger();
-
865 return {response, status};
-
866}
+
817 sleNode->add(s);
+
818
+
819 jvResult[jss::node_binary] = strHex(s.peekData());
+
820 jvResult[jss::index] = to_string(uNodeIndex);
+
821 }
+
822 else
+
823 {
+
824 jvResult[jss::node] = sleNode->getJson(JsonOptions::none);
+
825 jvResult[jss::index] = to_string(uNodeIndex);
+
826 }
+
827
+
828 return jvResult;
+
829}
-
867} // namespace ripple
+
830
+ +
+ + +
834{
+
835 org::xrpl::rpc::v1::GetLedgerEntryRequest& request = context.params;
+
836 org::xrpl::rpc::v1::GetLedgerEntryResponse response;
+
837 grpc::Status status = grpc::Status::OK;
+
838
+ +
840 if (auto status = RPC::ledgerFromRequest(ledger, context))
+
841 {
+
842 grpc::Status errorStatus;
+
843 if (status.toErrorCode() == rpcINVALID_PARAMS)
+
844 {
+
845 errorStatus = grpc::Status(
+
846 grpc::StatusCode::INVALID_ARGUMENT, status.message());
+
847 }
+
848 else
+
849 {
+
850 errorStatus =
+
851 grpc::Status(grpc::StatusCode::NOT_FOUND, status.message());
+
852 }
+
853 return {response, errorStatus};
+
854 }
+
855
+
856 auto const key = uint256::fromVoidChecked(request.key());
+
857 if (!key)
+
858 {
+
859 grpc::Status errorStatus{
+
860 grpc::StatusCode::INVALID_ARGUMENT, "index malformed"};
+
861 return {response, errorStatus};
+
862 }
+
863
+
864 auto const sleNode = ledger->read(keylet::unchecked(*key));
+
865 if (!sleNode)
+
866 {
+
867 grpc::Status errorStatus{
+
868 grpc::StatusCode::NOT_FOUND, "object not found"};
+
869 return {response, errorStatus};
+
870 }
+
871
+
872 Serializer s;
+
873 sleNode->add(s);
+
874
+
875 auto& stateObject = *response.mutable_ledger_object();
+
876 stateObject.set_data(s.peekData().data(), s.getLength());
+
877 stateObject.set_key(request.key());
+
878 *(response.mutable_ledger()) = request.ledger();
+
879 return {response, status};
+
880}
+
+
881} // namespace ripple
Lightweight wrapper to tag static string.
Definition json_value.h:45
Represents a JSON value.
Definition json_value.h:131
@@ -1044,8 +1058,7 @@ $(document).ready(function() { init_codefold(0); });
static std::optional< base_uint > fromVoidChecked(T const &from)
Definition base_uint.h:307
bool isZero() const
Definition base_uint.h:521
T data(T... args)
- - +
T is_same_v
@ uintValue
unsigned integer value
Definition json_value.h:22
Expected< STXChainBridge, Json::Value > parseBridgeFields(Json::Value const &params)
@@ -1083,52 +1096,52 @@ $(document).ready(function() { init_codefold(0); });
Keylet offer(AccountID const &id, std::uint32_t seq) noexcept
An offer from an account.
Definition Indexes.cpp:255
Keylet depositPreauth(AccountID const &owner, AccountID const &preauthorized) noexcept
A DepositPreauth.
Definition Indexes.cpp:323
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
-
static Expected< uint256, Json::Value > parseOracle(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseCredential(Json::Value const &cred, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseFeeSettings(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseXChainOwnedClaimID(Json::Value const &claim_id, Json::StaticString const fieldName)
-
Json::Value doLedgerEntry(RPC::JsonContext &)
-
static Expected< uint256, Json::Value > parsePayChannel(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseNFTokenOffer(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseCheck(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseEscrow(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseOracle(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseCredential(Json::Value const &cred, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseFeeSettings(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseXChainOwnedClaimID(Json::Value const &claim_id, Json::StaticString const fieldName)
+
Json::Value doLedgerEntry(RPC::JsonContext &)
+
static Expected< uint256, Json::Value > parsePayChannel(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseNFTokenOffer(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseCheck(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseEscrow(Json::Value const &params, Json::StaticString const fieldName)
@ rpcENTRY_NOT_FOUND
Definition ErrorCodes.h:142
@ rpcINVALID_PARAMS
Definition ErrorCodes.h:65
@ rpcUNEXPECTED_LEDGER_TYPE
Definition ErrorCodes.h:143
-
static Expected< uint256, Json::Value > parseXChainOwnedCreateAccountClaimID(Json::Value const &claim_id, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseIndex(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseDelegate(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseDepositPreauth(Json::Value const &dp, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseSignerList(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parsePermissionedDomain(Json::Value const &pd, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseBridge(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseAMM(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseMPToken(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< STArray, Json::Value > parseAuthorizeCredentials(Json::Value const &jv)
+
static Expected< uint256, Json::Value > parseXChainOwnedCreateAccountClaimID(Json::Value const &claim_id, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseIndex(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseDelegate(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseDepositPreauth(Json::Value const &dp, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseSignerList(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parsePermissionedDomain(Json::Value const &pd, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseBridge(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseAMM(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseMPToken(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< STArray, Json::Value > parseAuthorizeCredentials(Json::Value const &jv)
Issue issueFromJson(Json::Value const &v)
Definition Issue.cpp:76
std::string strHex(FwdIt begin, FwdIt end)
Definition strHex.h:11
std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
Definition Protocol.h:90
-
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
+
std::pair< org::xrpl::rpc::v1::GetLedgerEntryResponse, grpc::Status > doLedgerEntryGrpc(RPC::GRPCContext< org::xrpl::rpc::v1::GetLedgerEntryRequest > &context)
std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
Definition Protocol.h:87
-
static Expected< uint256, Json::Value > parseOffer(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseNegativeUNL(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseVault(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseMPTokenIssuance(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseNFTokenPage(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseDirectoryNode(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseAmendments(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseAccountRoot(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseOffer(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseNegativeUNL(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseVault(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseMPTokenIssuance(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseNFTokenPage(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseDirectoryNode(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseAmendments(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseAccountRoot(Json::Value const &params, Json::StaticString const fieldName)
uint256 getTicketIndex(AccountID const &account, std::uint32_t uSequence)
Definition Indexes.cpp:137
-
static Expected< uint256, Json::Value > parseTicket(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseObjectID(Json::Value const &params, Json::StaticString const fieldName, std::string const &expectedType="hex string or object")
+
static Expected< uint256, Json::Value > parseTicket(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseObjectID(Json::Value const &params, Json::StaticString const fieldName, std::string const &expectedType="hex string or object")
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.
-
Expected< uint256, Json::Value >(*)(Json::Value const &, Json::StaticString const) FunctionType
-
static Expected< uint256, Json::Value > parseLedgerHashes(Json::Value const &params, Json::StaticString const fieldName)
+
Expected< uint256, Json::Value >(*)(Json::Value const &, Json::StaticString const) FunctionType
+
static Expected< uint256, Json::Value > parseLedgerHashes(Json::Value const &params, Json::StaticString const fieldName)
@ credential
Credentials signature.
-
static Expected< uint256, Json::Value > parseDID(Json::Value const &params, Json::StaticString const fieldName)
-
static Expected< uint256, Json::Value > parseRippleState(Json::Value const &jvRippleState, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseDID(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseRippleState(Json::Value const &jvRippleState, Json::StaticString const fieldName)
static bool authorized(Port const &port, std::map< std::string, std::string > const &h)
bool to_currency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
Definition UintTypes.cpp:65
@@ -1138,10 +1151,10 @@ $(document).ready(function() { init_codefold(0); });
A pair of SHAMap key and LedgerEntryType.
Definition Keylet.h:20
uint256 key
Definition Keylet.h:21
- -
LedgerEntryType expectedType
-
Json::StaticString fieldName
-
FunctionType parseFunction
+ +
LedgerEntryType expectedType
+
Json::StaticString fieldName
+
FunctionType parseFunction
unsigned int apiVersion
Definition Context.h:30
diff --git a/LedgerEntry__test_8cpp_source.html b/LedgerEntry__test_8cpp_source.html index 0872bca136..4b029f102f 100644 --- a/LedgerEntry__test_8cpp_source.html +++ b/LedgerEntry__test_8cpp_source.html @@ -1224,7 +1224,7 @@ $(document).ready(function() { init_codefold(0); });
1104 jrr[jss::result],
1105 "malformedAuthorizedCredentials",
-
1106 "Invalid field 'authorized_credentials', not array.");
+
1106 "Invalid field 'authorized_credentials', array empty.");
1107 }
1108
1109 {
@@ -1265,7 +1265,7 @@ $(document).ready(function() { init_codefold(0); });
1145 jrr[jss::result],
1146 "malformedAuthorizedCredentials",
-
1147 "Invalid field 'authorized_credentials', not array.");
+
1147 "Invalid field 'authorized_credentials', array too long.");
1148 }
1149 }
@@ -2684,7 +2684,7 @@ $(document).ready(function() { init_codefold(0); });
uint256 key
Definition Keylet.h:21
- + diff --git a/VaultInfo_8cpp_source.html b/VaultInfo_8cpp_source.html index 8c7d45c88e..983a7d354e 100644 --- a/VaultInfo_8cpp_source.html +++ b/VaultInfo_8cpp_source.html @@ -194,7 +194,7 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
@ rpcACT_MALFORMED
Definition ErrorCodes.h:71
@ rpcINVALID_PARAMS
Definition ErrorCodes.h:65
-
static Expected< uint256, Json::Value > parseVault(Json::Value const &params, Json::StaticString const fieldName)
+
static Expected< uint256, Json::Value > parseVault(Json::Value const &params, Json::StaticString const fieldName)
Json::Value doVaultInfo(RPC::JsonContext &)
Definition VaultInfo.cpp:60
diff --git a/namespaceripple.html b/namespaceripple.html index 5e235dc0f2..2542273189 100644 --- a/namespaceripple.html +++ b/namespaceripple.html @@ -8505,7 +8505,7 @@ template<class T >
-

Definition at line 665 of file LedgerEntry.cpp.

+

Definition at line 679 of file LedgerEntry.cpp.

@@ -47176,7 +47176,7 @@ template<class T >
-

Definition at line 818 of file LedgerEntry.cpp.

+

Definition at line 832 of file LedgerEntry.cpp.

@@ -48362,7 +48362,7 @@ template<class T >
-

Definition at line 682 of file LedgerEntry.cpp.

+

Definition at line 696 of file LedgerEntry.cpp.

@@ -49222,7 +49222,7 @@ template<class T >
-

Definition at line 24 of file LedgerEntry.cpp.

+

Definition at line 22 of file LedgerEntry.cpp.

@@ -49260,7 +49260,7 @@ template<class T >
-

Definition at line 38 of file LedgerEntry.cpp.

+

Definition at line 36 of file LedgerEntry.cpp.

@@ -49298,7 +49298,7 @@ template<class T >
-

Definition at line 44 of file LedgerEntry.cpp.

+

Definition at line 42 of file LedgerEntry.cpp.

@@ -49336,7 +49336,7 @@ template<class T >
-

Definition at line 56 of file LedgerEntry.cpp.

+

Definition at line 54 of file LedgerEntry.cpp.

@@ -49374,7 +49374,7 @@ template<class T >
-

Definition at line 62 of file LedgerEntry.cpp.

+

Definition at line 60 of file LedgerEntry.cpp.

@@ -49412,7 +49412,7 @@ template<class T >
-

Definition at line 89 of file LedgerEntry.cpp.

+

Definition at line 87 of file LedgerEntry.cpp.

@@ -49450,7 +49450,7 @@ template<class T >
-

Definition at line 120 of file LedgerEntry.cpp.

+

Definition at line 118 of file LedgerEntry.cpp.

@@ -49488,7 +49488,7 @@ template<class T >
-

Definition at line 126 of file LedgerEntry.cpp.

+

Definition at line 124 of file LedgerEntry.cpp.

@@ -49526,7 +49526,7 @@ template<class T >
-

Definition at line 157 of file LedgerEntry.cpp.

+

Definition at line 155 of file LedgerEntry.cpp.

@@ -49554,7 +49554,7 @@ template<class T >
-

Definition at line 178 of file LedgerEntry.cpp.

+

Definition at line 176 of file LedgerEntry.cpp.

@@ -49592,7 +49592,7 @@ template<class T >
-

Definition at line 225 of file LedgerEntry.cpp.

+

Definition at line 246 of file LedgerEntry.cpp.

@@ -49630,7 +49630,7 @@ template<class T >
-

Definition at line 285 of file LedgerEntry.cpp.

+

Definition at line 299 of file LedgerEntry.cpp.

@@ -49668,7 +49668,7 @@ template<class T >
-

Definition at line 298 of file LedgerEntry.cpp.

+

Definition at line 312 of file LedgerEntry.cpp.

@@ -49706,7 +49706,7 @@ template<class T >
-

Definition at line 353 of file LedgerEntry.cpp.

+

Definition at line 367 of file LedgerEntry.cpp.

@@ -49744,7 +49744,7 @@ template<class T >
-

Definition at line 373 of file LedgerEntry.cpp.

+

Definition at line 387 of file LedgerEntry.cpp.

@@ -49782,7 +49782,7 @@ template<class T >
-

Definition at line 379 of file LedgerEntry.cpp.

+

Definition at line 393 of file LedgerEntry.cpp.

@@ -49820,7 +49820,7 @@ template<class T >
-

Definition at line 385 of file LedgerEntry.cpp.

+

Definition at line 399 of file LedgerEntry.cpp.

@@ -49858,7 +49858,7 @@ template<class T >
-

Definition at line 406 of file LedgerEntry.cpp.

+

Definition at line 420 of file LedgerEntry.cpp.

@@ -49896,7 +49896,7 @@ template<class T >
-

Definition at line 419 of file LedgerEntry.cpp.

+

Definition at line 433 of file LedgerEntry.cpp.

@@ -49934,7 +49934,7 @@ template<class T >
-

Definition at line 425 of file LedgerEntry.cpp.

+

Definition at line 439 of file LedgerEntry.cpp.

@@ -49972,7 +49972,7 @@ template<class T >
-

Definition at line 431 of file LedgerEntry.cpp.

+

Definition at line 445 of file LedgerEntry.cpp.

@@ -50010,7 +50010,7 @@ template<class T >
-

Definition at line 437 of file LedgerEntry.cpp.

+

Definition at line 451 of file LedgerEntry.cpp.

@@ -50048,7 +50048,7 @@ template<class T >
-

Definition at line 458 of file LedgerEntry.cpp.

+

Definition at line 472 of file LedgerEntry.cpp.

@@ -50086,7 +50086,7 @@ template<class T >
-

Definition at line 479 of file LedgerEntry.cpp.

+

Definition at line 493 of file LedgerEntry.cpp.

@@ -50124,7 +50124,7 @@ template<class T >
-

Definition at line 485 of file LedgerEntry.cpp.

+

Definition at line 499 of file LedgerEntry.cpp.

@@ -50162,7 +50162,7 @@ template<class T >
-

Definition at line 514 of file LedgerEntry.cpp.

+

Definition at line 528 of file LedgerEntry.cpp.

@@ -50200,7 +50200,7 @@ template<class T >
-

Definition at line 566 of file LedgerEntry.cpp.

+

Definition at line 580 of file LedgerEntry.cpp.

@@ -50238,7 +50238,7 @@ template<class T >
-

Definition at line 572 of file LedgerEntry.cpp.

+

Definition at line 586 of file LedgerEntry.cpp.

@@ -50276,7 +50276,7 @@ template<class T >
-

Definition at line 593 of file LedgerEntry.cpp.

+

Definition at line 607 of file LedgerEntry.cpp.

@@ -50314,7 +50314,7 @@ template<class T >
-

Definition at line 614 of file LedgerEntry.cpp.

+

Definition at line 628 of file LedgerEntry.cpp.

@@ -50352,7 +50352,7 @@ template<class T >
-

Definition at line 639 of file LedgerEntry.cpp.

+

Definition at line 653 of file LedgerEntry.cpp.

diff --git a/structripple_1_1LedgerEntry.html b/structripple_1_1LedgerEntry.html index 3ed84df9e1..7e176bc583 100644 --- a/structripple_1_1LedgerEntry.html +++ b/structripple_1_1LedgerEntry.html @@ -105,7 +105,7 @@ Public Attributes

Detailed Description

-

Definition at line 669 of file LedgerEntry.cpp.

+

Definition at line 683 of file LedgerEntry.cpp.

Member Data Documentation

◆ fieldName

@@ -119,7 +119,7 @@ Public Attributes
-

Definition at line 671 of file LedgerEntry.cpp.

+

Definition at line 685 of file LedgerEntry.cpp.

@@ -135,7 +135,7 @@ Public Attributes
-

Definition at line 672 of file LedgerEntry.cpp.

+

Definition at line 686 of file LedgerEntry.cpp.

@@ -151,7 +151,7 @@ Public Attributes
-

Definition at line 673 of file LedgerEntry.cpp.

+

Definition at line 687 of file LedgerEntry.cpp.