rippled
SField.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012, 2013 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #include <ripple/protocol/SField.h>
21 #include <cassert>
22 #include <string>
23 #include <utility>
24 
25 namespace ripple {
26 
27 // Storage for static const members.
29 int SField::num = 0;
31 
32 // Give only this translation unit permission to construct SFields
34 {
35  explicit private_access_tag_t() = default;
36 };
37 
39 
40 // Construct all compile-time SFields, and register them in the knownCodeToField
41 // database:
42 
43 SField const sfInvalid(access, -1);
44 SField const sfGeneric(access, 0);
45 SField const sfLedgerEntry(access, STI_LEDGERENTRY, 257, "LedgerEntry");
46 SField const sfTransaction(access, STI_TRANSACTION, 257, "Transaction");
47 SField const sfValidation(access, STI_VALIDATION, 257, "Validation");
48 SField const sfMetadata(access, STI_METADATA, 257, "Metadata");
49 SField const sfHash(access, STI_HASH256, 257, "hash");
50 SField const sfIndex(access, STI_HASH256, 258, "index");
51 
52 // 8-bit integers
53 SF_U8 const sfCloseResolution(access, STI_UINT8, 1, "CloseResolution");
54 SF_U8 const sfMethod(access, STI_UINT8, 2, "Method");
55 SF_U8 const sfTransactionResult(access, STI_UINT8, 3, "TransactionResult");
56 
57 // 8-bit integers (uncommon)
58 SF_U8 const sfTickSize(access, STI_UINT8, 16, "TickSize");
59 SF_U8 const sfUNLModifyDisabling(access, STI_UINT8, 17, "UNLModifyDisabling");
60 
61 // 16-bit integers
63  access,
64  STI_UINT16,
65  1,
66  "LedgerEntryType",
68 SF_U16 const sfTransactionType(access, STI_UINT16, 2, "TransactionType");
69 SF_U16 const sfSignerWeight(access, STI_UINT16, 3, "SignerWeight");
70 
71 // 16-bit integers (uncommon)
72 SF_U16 const sfVersion(access, STI_UINT16, 16, "Version");
73 
74 // 32-bit integers (common)
75 SF_U32 const sfFlags(access, STI_UINT32, 2, "Flags");
76 SF_U32 const sfSourceTag(access, STI_UINT32, 3, "SourceTag");
77 SF_U32 const sfSequence(access, STI_UINT32, 4, "Sequence");
79  access,
80  STI_UINT32,
81  5,
82  "PreviousTxnLgrSeq",
84 SF_U32 const sfLedgerSequence(access, STI_UINT32, 6, "LedgerSequence");
85 SF_U32 const sfCloseTime(access, STI_UINT32, 7, "CloseTime");
86 SF_U32 const sfParentCloseTime(access, STI_UINT32, 8, "ParentCloseTime");
87 SF_U32 const sfSigningTime(access, STI_UINT32, 9, "SigningTime");
88 SF_U32 const sfExpiration(access, STI_UINT32, 10, "Expiration");
89 SF_U32 const sfTransferRate(access, STI_UINT32, 11, "TransferRate");
90 SF_U32 const sfWalletSize(access, STI_UINT32, 12, "WalletSize");
91 SF_U32 const sfOwnerCount(access, STI_UINT32, 13, "OwnerCount");
92 SF_U32 const sfDestinationTag(access, STI_UINT32, 14, "DestinationTag");
93 
94 // 32-bit integers (uncommon)
95 SF_U32 const sfHighQualityIn(access, STI_UINT32, 16, "HighQualityIn");
96 SF_U32 const sfHighQualityOut(access, STI_UINT32, 17, "HighQualityOut");
97 SF_U32 const sfLowQualityIn(access, STI_UINT32, 18, "LowQualityIn");
98 SF_U32 const sfLowQualityOut(access, STI_UINT32, 19, "LowQualityOut");
99 SF_U32 const sfQualityIn(access, STI_UINT32, 20, "QualityIn");
100 SF_U32 const sfQualityOut(access, STI_UINT32, 21, "QualityOut");
101 SF_U32 const sfStampEscrow(access, STI_UINT32, 22, "StampEscrow");
102 SF_U32 const sfBondAmount(access, STI_UINT32, 23, "BondAmount");
103 SF_U32 const sfLoadFee(access, STI_UINT32, 24, "LoadFee");
104 SF_U32 const sfOfferSequence(access, STI_UINT32, 25, "OfferSequence");
105 SF_U32 const
106  sfFirstLedgerSequence(access, STI_UINT32, 26, "FirstLedgerSequence");
107 SF_U32 const sfLastLedgerSequence(access, STI_UINT32, 27, "LastLedgerSequence");
108 SF_U32 const sfTransactionIndex(access, STI_UINT32, 28, "TransactionIndex");
109 SF_U32 const sfOperationLimit(access, STI_UINT32, 29, "OperationLimit");
110 SF_U32 const sfReferenceFeeUnits(access, STI_UINT32, 30, "ReferenceFeeUnits");
111 SF_U32 const sfReserveBase(access, STI_UINT32, 31, "ReserveBase");
112 SF_U32 const sfReserveIncrement(access, STI_UINT32, 32, "ReserveIncrement");
113 SF_U32 const sfSetFlag(access, STI_UINT32, 33, "SetFlag");
114 SF_U32 const sfClearFlag(access, STI_UINT32, 34, "ClearFlag");
115 SF_U32 const sfSignerQuorum(access, STI_UINT32, 35, "SignerQuorum");
116 SF_U32 const sfCancelAfter(access, STI_UINT32, 36, "CancelAfter");
117 SF_U32 const sfFinishAfter(access, STI_UINT32, 37, "FinishAfter");
118 SF_U32 const sfSignerListID(access, STI_UINT32, 38, "SignerListID");
119 SF_U32 const sfSettleDelay(access, STI_UINT32, 39, "SettleDelay");
120 SF_U32 const sfTicketCount(access, STI_UINT32, 40, "TicketCount");
121 SF_U32 const sfTicketSequence(access, STI_UINT32, 41, "TicketSequence");
122 
123 // 64-bit integers
124 SF_U64 const sfIndexNext(access, STI_UINT64, 1, "IndexNext");
125 SF_U64 const sfIndexPrevious(access, STI_UINT64, 2, "IndexPrevious");
126 SF_U64 const sfBookNode(access, STI_UINT64, 3, "BookNode");
127 SF_U64 const sfOwnerNode(access, STI_UINT64, 4, "OwnerNode");
128 SF_U64 const sfBaseFee(access, STI_UINT64, 5, "BaseFee");
129 SF_U64 const sfExchangeRate(access, STI_UINT64, 6, "ExchangeRate");
130 SF_U64 const sfLowNode(access, STI_UINT64, 7, "LowNode");
131 SF_U64 const sfHighNode(access, STI_UINT64, 8, "HighNode");
132 SF_U64 const sfDestinationNode(access, STI_UINT64, 9, "DestinationNode");
133 SF_U64 const sfCookie(access, STI_UINT64, 10, "Cookie");
134 SF_U64 const sfServerVersion(access, STI_UINT64, 11, "ServerVersion");
135 
136 // 128-bit
137 SF_U128 const sfEmailHash(access, STI_HASH128, 1, "EmailHash");
138 
139 // 160-bit (common)
140 SF_U160 const sfTakerPaysCurrency(access, STI_HASH160, 1, "TakerPaysCurrency");
141 SF_U160 const sfTakerPaysIssuer(access, STI_HASH160, 2, "TakerPaysIssuer");
142 SF_U160 const sfTakerGetsCurrency(access, STI_HASH160, 3, "TakerGetsCurrency");
143 SF_U160 const sfTakerGetsIssuer(access, STI_HASH160, 4, "TakerGetsIssuer");
144 
145 // 256-bit (common)
146 SF_U256 const sfLedgerHash(access, STI_HASH256, 1, "LedgerHash");
147 SF_U256 const sfParentHash(access, STI_HASH256, 2, "ParentHash");
148 SF_U256 const sfTransactionHash(access, STI_HASH256, 3, "TransactionHash");
149 SF_U256 const sfAccountHash(access, STI_HASH256, 4, "AccountHash");
151  access,
152  STI_HASH256,
153  5,
154  "PreviousTxnID",
156 SF_U256 const sfLedgerIndex(access, STI_HASH256, 6, "LedgerIndex");
157 SF_U256 const sfWalletLocator(access, STI_HASH256, 7, "WalletLocator");
158 SF_U256 const
160 SF_U256 const sfAccountTxnID(access, STI_HASH256, 9, "AccountTxnID");
161 
162 // 256-bit (uncommon)
163 SF_U256 const sfBookDirectory(access, STI_HASH256, 16, "BookDirectory");
164 SF_U256 const sfInvoiceID(access, STI_HASH256, 17, "InvoiceID");
165 SF_U256 const sfNickname(access, STI_HASH256, 18, "Nickname");
166 SF_U256 const sfAmendment(access, STI_HASH256, 19, "Amendment");
167 // 20 is currently unused
168 SF_U256 const sfDigest(access, STI_HASH256, 21, "Digest");
169 SF_U256 const sfPayChannel(access, STI_HASH256, 22, "Channel");
170 SF_U256 const sfConsensusHash(access, STI_HASH256, 23, "ConsensusHash");
171 SF_U256 const sfCheckID(access, STI_HASH256, 24, "CheckID");
172 SF_U256 const sfValidatedHash(access, STI_HASH256, 25, "ValidatedHash");
173 
174 // currency amount (common)
175 SF_Amount const sfAmount(access, STI_AMOUNT, 1, "Amount");
176 SF_Amount const sfBalance(access, STI_AMOUNT, 2, "Balance");
177 SF_Amount const sfLimitAmount(access, STI_AMOUNT, 3, "LimitAmount");
178 SF_Amount const sfTakerPays(access, STI_AMOUNT, 4, "TakerPays");
179 SF_Amount const sfTakerGets(access, STI_AMOUNT, 5, "TakerGets");
180 SF_Amount const sfLowLimit(access, STI_AMOUNT, 6, "LowLimit");
181 SF_Amount const sfHighLimit(access, STI_AMOUNT, 7, "HighLimit");
182 SF_Amount const sfFee(access, STI_AMOUNT, 8, "Fee");
183 SF_Amount const sfSendMax(access, STI_AMOUNT, 9, "SendMax");
184 SF_Amount const sfDeliverMin(access, STI_AMOUNT, 10, "DeliverMin");
185 
186 // currency amount (uncommon)
187 SF_Amount const sfMinimumOffer(access, STI_AMOUNT, 16, "MinimumOffer");
188 SF_Amount const sfRippleEscrow(access, STI_AMOUNT, 17, "RippleEscrow");
189 SF_Amount const sfDeliveredAmount(access, STI_AMOUNT, 18, "DeliveredAmount");
190 
191 // variable length (common)
192 SF_Blob const sfPublicKey(access, STI_VL, 1, "PublicKey");
193 SF_Blob const sfMessageKey(access, STI_VL, 2, "MessageKey");
194 SF_Blob const sfSigningPubKey(access, STI_VL, 3, "SigningPubKey");
195 SF_Blob const sfTxnSignature(
196  access,
197  STI_VL,
198  4,
199  "TxnSignature",
202 SF_Blob const sfSignature(
203  access,
204  STI_VL,
205  6,
206  "Signature",
209 SF_Blob const sfDomain(access, STI_VL, 7, "Domain");
210 SF_Blob const sfFundCode(access, STI_VL, 8, "FundCode");
211 SF_Blob const sfRemoveCode(access, STI_VL, 9, "RemoveCode");
212 SF_Blob const sfExpireCode(access, STI_VL, 10, "ExpireCode");
213 SF_Blob const sfCreateCode(access, STI_VL, 11, "CreateCode");
214 SF_Blob const sfMemoType(access, STI_VL, 12, "MemoType");
215 SF_Blob const sfMemoData(access, STI_VL, 13, "MemoData");
216 SF_Blob const sfMemoFormat(access, STI_VL, 14, "MemoFormat");
217 
218 // variable length (uncommon)
219 SF_Blob const sfFulfillment(access, STI_VL, 16, "Fulfillment");
220 SF_Blob const sfCondition(access, STI_VL, 17, "Condition");
222  access,
223  STI_VL,
224  18,
225  "MasterSignature",
228 SF_Blob const sfUNLModifyValidator(access, STI_VL, 19, "UNLModifyValidator");
229 SF_Blob const sfValidatorToDisable(access, STI_VL, 20, "ValidatorToDisable");
230 SF_Blob const sfValidatorToReEnable(access, STI_VL, 21, "ValidatorToReEnable");
231 
232 // account
233 SF_Account const sfAccount(access, STI_ACCOUNT, 1, "Account");
234 SF_Account const sfOwner(access, STI_ACCOUNT, 2, "Owner");
235 SF_Account const sfDestination(access, STI_ACCOUNT, 3, "Destination");
236 SF_Account const sfIssuer(access, STI_ACCOUNT, 4, "Issuer");
237 SF_Account const sfAuthorize(access, STI_ACCOUNT, 5, "Authorize");
238 SF_Account const sfUnauthorize(access, STI_ACCOUNT, 6, "Unauthorize");
239 // 7 is currently unused
240 SF_Account const sfRegularKey(access, STI_ACCOUNT, 8, "RegularKey");
241 
242 // path set
243 SField const sfPaths(access, STI_PATHSET, 1, "Paths");
244 
245 // vector of 256-bit
246 SF_Vec256 const
248 SF_Vec256 const sfHashes(access, STI_VECTOR256, 2, "Hashes");
249 SF_Vec256 const sfAmendments(access, STI_VECTOR256, 3, "Amendments");
250 
251 // inner object
252 // OBJECT/1 is reserved for end of object
253 SField const
254  sfTransactionMetaData(access, STI_OBJECT, 2, "TransactionMetaData");
255 SField const sfCreatedNode(access, STI_OBJECT, 3, "CreatedNode");
256 SField const sfDeletedNode(access, STI_OBJECT, 4, "DeletedNode");
257 SField const sfModifiedNode(access, STI_OBJECT, 5, "ModifiedNode");
258 SField const sfPreviousFields(access, STI_OBJECT, 6, "PreviousFields");
259 SField const sfFinalFields(access, STI_OBJECT, 7, "FinalFields");
260 SField const sfNewFields(access, STI_OBJECT, 8, "NewFields");
261 SField const sfTemplateEntry(access, STI_OBJECT, 9, "TemplateEntry");
262 SField const sfMemo(access, STI_OBJECT, 10, "Memo");
263 SField const sfSignerEntry(access, STI_OBJECT, 11, "SignerEntry");
264 
265 // inner object (uncommon)
266 SField const sfSigner(access, STI_OBJECT, 16, "Signer");
267 // 17 has not been used yet...
268 SField const sfMajority(access, STI_OBJECT, 18, "Majority");
269 SField const sfDisabledValidator(access, STI_OBJECT, 19, "DisabledValidator");
270 
271 // array of objects
272 // ARRAY/1 is reserved for end of array
273 // SField const sfSigningAccounts (access, STI_ARRAY, 2, "SigningAccounts"); //
274 // Never been used.
275 SField const sfSigners(
276  access,
277  STI_ARRAY,
278  3,
279  "Signers",
282 SField const sfSignerEntries(access, STI_ARRAY, 4, "SignerEntries");
283 SField const sfTemplate(access, STI_ARRAY, 5, "Template");
284 SField const sfNecessary(access, STI_ARRAY, 6, "Necessary");
285 SField const sfSufficient(access, STI_ARRAY, 7, "Sufficient");
286 SField const sfAffectedNodes(access, STI_ARRAY, 8, "AffectedNodes");
287 SField const sfMemos(access, STI_ARRAY, 9, "Memos");
288 
289 // array of objects (uncommon)
290 SField const sfMajorities(access, STI_ARRAY, 16, "Majorities");
291 SField const sfDisabledValidators(access, STI_ARRAY, 17, "DisabledValidators");
292 
295  SerializedTypeID tid,
296  int fv,
297  const char* fn,
298  int meta,
299  IsSigning signing)
300  : fieldCode(field_code(tid, fv))
301  , fieldType(tid)
302  , fieldValue(fv)
303  , fieldName(fn)
304  , fieldMeta(meta)
305  , fieldNum(++num)
306  , signingField(signing)
307  , jsonName(fieldName.c_str())
308 {
309  knownCodeToField[fieldCode] = this;
310 }
311 
313  : fieldCode(fc)
314  , fieldType(STI_UNKNOWN)
315  , fieldValue(0)
316  , fieldMeta(sMD_Never)
317  , fieldNum(++num)
318  , signingField(IsSigning::yes)
319  , jsonName(fieldName.c_str())
320 {
321  knownCodeToField[fieldCode] = this;
322 }
323 
324 SField const&
326 {
327  auto it = knownCodeToField.find(code);
328 
329  if (it != knownCodeToField.end())
330  {
331  return *(it->second);
332  }
333  return sfInvalid;
334 }
335 
336 int
337 SField::compare(SField const& f1, SField const& f2)
338 {
339  // -1 = f1 comes before f2, 0 = illegal combination, 1 = f1 comes after f2
340  if ((f1.fieldCode <= 0) || (f2.fieldCode <= 0))
341  return 0;
342 
343  if (f1.fieldCode < f2.fieldCode)
344  return -1;
345 
346  if (f2.fieldCode < f1.fieldCode)
347  return 1;
348 
349  return 0;
350 }
351 
352 SField const&
353 SField::getField(std::string const& fieldName)
354 {
355  for (auto const& [_, f] : knownCodeToField)
356  {
357  (void)_;
358  if (f->fieldName == fieldName)
359  return *f;
360  }
361  return sfInvalid;
362 }
363 
364 } // namespace ripple
ripple::sfHighQualityIn
const SF_U32 sfHighQualityIn(access, STI_UINT32, 16, "HighQualityIn")
Definition: SField.h:369
ripple::sfRegularKey
const SF_Account sfRegularKey(access, STI_ACCOUNT, 8, "RegularKey")
Definition: SField.h:488
ripple::sfTicketCount
const SF_U32 sfTicketCount(access, STI_UINT32, 40, "TicketCount")
Definition: SField.h:393
ripple::sfLoadFee
const SF_U32 sfLoadFee(access, STI_UINT32, 24, "LoadFee")
Definition: SField.h:377
ripple::sfIndexNext
const SF_U64 sfIndexNext(access, STI_UINT64, 1, "IndexNext")
Definition: SField.h:397
ripple::sfPreviousFields
const SField sfPreviousFields(access, STI_OBJECT, 6, "PreviousFields")
Definition: SField.h:504
ripple::SField::IsSigning
IsSigning
Definition: SField.h:123
ripple::sfTransactionIndex
const SF_U32 sfTransactionIndex(access, STI_UINT32, 28, "TransactionIndex")
Definition: SField.h:381
std::string
STL class.
utility
ripple::TypedField
A field with a type known at compile time.
Definition: SField.h:281
ripple::sfTemplateEntry
const SField sfTemplateEntry(access, STI_OBJECT, 9, "TemplateEntry")
Definition: SField.h:507
ripple::STI_METADATA
@ STI_METADATA
Definition: SField.h:82
ripple::sfPreviousTxnLgrSeq
const SF_U32 sfPreviousTxnLgrSeq(access, STI_UINT32, 5, "PreviousTxnLgrSeq", SField::sMD_DeleteFinal)
Definition: SField.h:357
ripple::sfGeneric
const SField sfGeneric(access, 0)
Definition: SField.h:332
ripple::sfParentCloseTime
const SF_U32 sfParentCloseTime(access, STI_UINT32, 8, "ParentCloseTime")
Definition: SField.h:360
ripple::sfQualityIn
const SF_U32 sfQualityIn(access, STI_UINT32, 20, "QualityIn")
Definition: SField.h:373
ripple::sfLedgerIndex
const SF_U256 sfLedgerIndex(access, STI_HASH256, 6, "LedgerIndex")
Definition: SField.h:424
ripple::sfLedgerEntryType
const SF_U16 sfLedgerEntryType(access, STI_UINT16, 1, "LedgerEntryType", SField::sMD_Never)
Definition: SField.h:346
ripple::sfSigners
const SField sfSigners(access, STI_ARRAY, 3, "Signers", SField::sMD_Default, SField::notSigning)
Definition: SField.h:517
ripple::sfMemoType
const SF_Blob sfMemoType(access, STI_VL, 12, "MemoType")
Definition: SField.h:468
ripple::sfOperationLimit
const SF_U32 sfOperationLimit(access, STI_UINT32, 29, "OperationLimit")
Definition: SField.h:382
ripple::sfSigningPubKey
const SF_Blob sfSigningPubKey(access, STI_VL, 3, "SigningPubKey")
Definition: SField.h:460
ripple::sfMetadata
const SField sfMetadata(access, STI_METADATA, 257, "Metadata")
Definition: SField.h:336
ripple::SField::private_access_tag_t
Definition: SField.cpp:33
ripple::sfDeliveredAmount
const SF_Amount sfDeliveredAmount(access, STI_AMOUNT, 18, "DeliveredAmount")
Definition: SField.h:455
ripple::sfSignerQuorum
const SF_U32 sfSignerQuorum(access, STI_UINT32, 35, "SignerQuorum")
Definition: SField.h:388
ripple::STI_AMOUNT
@ STI_AMOUNT
Definition: SField.h:64
ripple::sfMessageKey
const SF_Blob sfMessageKey(access, STI_VL, 2, "MessageKey")
Definition: SField.h:459
ripple::sfSequence
const SF_U32 sfSequence(access, STI_UINT32, 4, "Sequence")
Definition: SField.h:356
ripple::STI_UINT8
@ STI_UINT8
Definition: SField.h:72
ripple::field_code
int field_code(SerializedTypeID id, int index)
Definition: SField.h:87
ripple::SField::fieldName
const std::string fieldName
Definition: SField.h:129
ripple::sfSufficient
const SField sfSufficient(access, STI_ARRAY, 7, "Sufficient")
Definition: SField.h:521
ripple::STI_PATHSET
@ STI_PATHSET
Definition: SField.h:74
ripple::SerializedTypeID
SerializedTypeID
Definition: SField.h:52
ripple::sfAccount
const SF_Account sfAccount(access, STI_ACCOUNT, 1, "Account")
Definition: SField.h:481
ripple::sfFlags
const SF_U32 sfFlags(access, STI_UINT32, 2, "Flags")
Definition: SField.h:354
ripple::STI_VALIDATION
@ STI_VALIDATION
Definition: SField.h:81
ripple::STI_LEDGERENTRY
@ STI_LEDGERENTRY
Definition: SField.h:80
ripple::sfTakerPaysIssuer
const SF_U160 sfTakerPaysIssuer(access, STI_HASH160, 2, "TakerPaysIssuer")
Definition: SField.h:414
ripple::sfNewFields
const SField sfNewFields(access, STI_OBJECT, 8, "NewFields")
Definition: SField.h:506
ripple::sfMasterSignature
const SF_Blob sfMasterSignature(access, STI_VL, 18, "MasterSignature", SField::sMD_Default, SField::notSigning)
Definition: SField.h:475
ripple::sfMajorities
const SField sfMajorities(access, STI_ARRAY, 16, "Majorities")
Definition: SField.h:524
ripple::sfWalletLocator
const SF_U256 sfWalletLocator(access, STI_HASH256, 7, "WalletLocator")
Definition: SField.h:425
ripple::sfTakerPays
const SF_Amount sfTakerPays(access, STI_AMOUNT, 4, "TakerPays")
Definition: SField.h:444
ripple::sfMethod
const SF_U8 sfMethod(access, STI_UINT8, 2, "Method")
Definition: SField.h:340
ripple::sfIssuer
const SF_Account sfIssuer(access, STI_ACCOUNT, 4, "Issuer")
Definition: SField.h:484
ripple::sfUnauthorize
const SF_Account sfUnauthorize(access, STI_ACCOUNT, 6, "Unauthorize")
Definition: SField.h:486
ripple::sfUNLModifyValidator
const SF_Blob sfUNLModifyValidator(access, STI_VL, 19, "UNLModifyValidator")
Definition: SField.h:476
ripple::sfUNLModifyDisabling
const SF_U8 sfUNLModifyDisabling(access, STI_UINT8, 17, "UNLModifyDisabling")
Definition: SField.h:343
ripple::SField::getField
static const SField & getField(int fieldCode)
Definition: SField.cpp:325
ripple::STI_ACCOUNT
@ STI_ACCOUNT
Definition: SField.h:66
ripple::STI_ARRAY
@ STI_ARRAY
Definition: SField.h:69
ripple::SField::knownCodeToField
static std::map< int, SField const * > knownCodeToField
Definition: SField.h:276
ripple::STI_HASH160
@ STI_HASH160
Definition: SField.h:73
ripple::sfOwnerNode
const SF_U64 sfOwnerNode(access, STI_UINT64, 4, "OwnerNode")
Definition: SField.h:400
ripple::sfSigner
const SField sfSigner(access, STI_OBJECT, 16, "Signer")
Definition: SField.h:510
ripple::sfDisabledValidators
const SField sfDisabledValidators(access, STI_ARRAY, 17, "DisabledValidators")
Definition: SField.h:525
ripple::sfTakerGetsCurrency
const SF_U160 sfTakerGetsCurrency(access, STI_HASH160, 3, "TakerGetsCurrency")
Definition: SField.h:415
ripple::sfPayChannel
const SF_U256 sfPayChannel(access, STI_HASH256, 22, "Channel")
Definition: SField.h:435
ripple::sfValidatedHash
const SF_U256 sfValidatedHash(access, STI_HASH256, 25, "ValidatedHash")
Definition: SField.h:438
ripple::sfAmount
const SF_Amount sfAmount(access, STI_AMOUNT, 1, "Amount")
Definition: SField.h:441
ripple::sfSignerEntries
const SField sfSignerEntries(access, STI_ARRAY, 4, "SignerEntries")
Definition: SField.h:518
ripple::sfOwnerCount
const SF_U32 sfOwnerCount(access, STI_UINT32, 13, "OwnerCount")
Definition: SField.h:365
ripple::SField::sMD_Never
@ sMD_Never
Definition: SField.h:113
ripple::sfFinalFields
const SField sfFinalFields(access, STI_OBJECT, 7, "FinalFields")
Definition: SField.h:505
ripple::sfModifiedNode
const SField sfModifiedNode(access, STI_OBJECT, 5, "ModifiedNode")
Definition: SField.h:503
ripple::sfReserveBase
const SF_U32 sfReserveBase(access, STI_UINT32, 31, "ReserveBase")
Definition: SField.h:384
ripple::sfLimitAmount
const SF_Amount sfLimitAmount(access, STI_AMOUNT, 3, "LimitAmount")
Definition: SField.h:443
ripple::sfHighLimit
const SF_Amount sfHighLimit(access, STI_AMOUNT, 7, "HighLimit")
Definition: SField.h:447
ripple::sfFundCode
const SF_Blob sfFundCode(access, STI_VL, 8, "FundCode")
Definition: SField.h:464
ripple::sfFinishAfter
const SF_U32 sfFinishAfter(access, STI_UINT32, 37, "FinishAfter")
Definition: SField.h:390
ripple::sfInvalid
const SField sfInvalid(access, -1)
Definition: SField.h:331
ripple::sfSignature
const SF_Blob sfSignature(access, STI_VL, 6, "Signature", SField::sMD_Default, SField::notSigning)
Definition: SField.h:462
ripple::sfAccountTxnID
const SF_U256 sfAccountTxnID(access, STI_HASH256, 9, "AccountTxnID")
Definition: SField.h:427
ripple::sfLedgerEntry
const SField sfLedgerEntry(access, STI_LEDGERENTRY, 257, "LedgerEntry")
Definition: SField.h:333
ripple::sfLowLimit
const SF_Amount sfLowLimit(access, STI_AMOUNT, 6, "LowLimit")
Definition: SField.h:446
ripple::sfMajority
const SField sfMajority(access, STI_OBJECT, 18, "Majority")
Definition: SField.h:511
ripple::sfDestinationTag
const SF_U32 sfDestinationTag(access, STI_UINT32, 14, "DestinationTag")
Definition: SField.h:366
ripple::sfMemoData
const SF_Blob sfMemoData(access, STI_VL, 13, "MemoData")
Definition: SField.h:469
ripple::sfIndexPrevious
const SF_U64 sfIndexPrevious(access, STI_UINT64, 2, "IndexPrevious")
Definition: SField.h:398
ripple::sfFulfillment
const SF_Blob sfFulfillment(access, STI_VL, 16, "Fulfillment")
Definition: SField.h:473
ripple::sfMinimumOffer
const SF_Amount sfMinimumOffer(access, STI_AMOUNT, 16, "MinimumOffer")
Definition: SField.h:453
ripple::SField::SField
SField(SField const &)=delete
ripple::sfLastLedgerSequence
const SF_U32 sfLastLedgerSequence(access, STI_UINT32, 27, "LastLedgerSequence")
Definition: SField.h:380
ripple::sfOwner
const SF_Account sfOwner(access, STI_ACCOUNT, 2, "Owner")
Definition: SField.h:482
ripple::sfHighNode
const SF_U64 sfHighNode(access, STI_UINT64, 8, "HighNode")
Definition: SField.h:404
ripple::SField::private_access_tag_t::private_access_tag_t
private_access_tag_t()=default
ripple::sfParentHash
const SF_U256 sfParentHash(access, STI_HASH256, 2, "ParentHash")
Definition: SField.h:420
ripple::sfBookDirectory
const SF_U256 sfBookDirectory(access, STI_HASH256, 16, "BookDirectory")
Definition: SField.h:430
ripple::SField::sMD_Always
@ sMD_Always
Definition: SField.h:118
ripple::sfRemoveCode
const SF_Blob sfRemoveCode(access, STI_VL, 9, "RemoveCode")
Definition: SField.h:465
ripple::sfSendMax
const SF_Amount sfSendMax(access, STI_AMOUNT, 9, "SendMax")
Definition: SField.h:449
ripple::sfAmendment
const SF_U256 sfAmendment(access, STI_HASH256, 19, "Amendment")
Definition: SField.h:433
ripple::sfSignerListID
const SF_U32 sfSignerListID(access, STI_UINT32, 38, "SignerListID")
Definition: SField.h:391
ripple::sfSigningTime
const SF_U32 sfSigningTime(access, STI_UINT32, 9, "SigningTime")
Definition: SField.h:361
ripple::sfDestinationNode
const SF_U64 sfDestinationNode(access, STI_UINT64, 9, "DestinationNode")
Definition: SField.h:405
ripple::SField::notSigning
static const IsSigning notSigning
Definition: SField.h:124
ripple::sfTransaction
const SField sfTransaction(access, STI_TRANSACTION, 257, "Transaction")
Definition: SField.h:334
ripple::STI_UNKNOWN
@ STI_UNKNOWN
Definition: SField.h:54
ripple::STI_VL
@ STI_VL
Definition: SField.h:65
ripple::STI_UINT16
@ STI_UINT16
Definition: SField.h:59
ripple::sfTxnSignature
const SF_Blob sfTxnSignature(access, STI_VL, 4, "TxnSignature", SField::sMD_Default, SField::notSigning)
Definition: SField.h:461
ripple::sfTransactionType
const SF_U16 sfTransactionType(access, STI_UINT16, 2, "TransactionType")
Definition: SField.h:347
ripple::STI_HASH256
@ STI_HASH256
Definition: SField.h:63
ripple::sfLedgerSequence
const SF_U32 sfLedgerSequence(access, STI_UINT32, 6, "LedgerSequence")
Definition: SField.h:358
ripple::sfReferenceFeeUnits
const SF_U32 sfReferenceFeeUnits(access, STI_UINT32, 30, "ReferenceFeeUnits")
Definition: SField.h:383
ripple::SField::sMD_DeleteFinal
@ sMD_DeleteFinal
Definition: SField.h:116
ripple::sfTransactionMetaData
const SField sfTransactionMetaData(access, STI_OBJECT, 2, "TransactionMetaData")
Definition: SField.h:500
ripple::sfExchangeRate
const SF_U64 sfExchangeRate(access, STI_UINT64, 6, "ExchangeRate")
Definition: SField.h:402
ripple::sfCreateCode
const SF_Blob sfCreateCode(access, STI_VL, 11, "CreateCode")
Definition: SField.h:467
ripple::sfSignerEntry
const SField sfSignerEntry(access, STI_OBJECT, 11, "SignerEntry")
Definition: SField.h:509
ripple::SField::fieldCode
const int fieldCode
Definition: SField.h:126
ripple::sfLowQualityOut
const SF_U32 sfLowQualityOut(access, STI_UINT32, 19, "LowQualityOut")
Definition: SField.h:372
ripple::STI_VECTOR256
@ STI_VECTOR256
Definition: SField.h:75
ripple::sfValidation
const SField sfValidation(access, STI_VALIDATION, 257, "Validation")
Definition: SField.h:335
ripple::sfCreatedNode
const SField sfCreatedNode(access, STI_OBJECT, 3, "CreatedNode")
Definition: SField.h:501
std::map
STL class.
ripple::sfSourceTag
const SF_U32 sfSourceTag(access, STI_UINT32, 3, "SourceTag")
Definition: SField.h:355
ripple::sfIndexes
const SF_Vec256 sfIndexes(access, STI_VECTOR256, 1, "Indexes", SField::sMD_Never)
Definition: SField.h:494
ripple::sfHash
const SField sfHash(access, STI_HASH256, 257, "hash")
ripple::sfExpiration
const SF_U32 sfExpiration(access, STI_UINT32, 10, "Expiration")
Definition: SField.h:362
ripple::sfFirstLedgerSequence
const SF_U32 sfFirstLedgerSequence(access, STI_UINT32, 26, "FirstLedgerSequence")
Definition: SField.h:379
ripple::sfFee
const SF_Amount sfFee(access, STI_AMOUNT, 8, "Fee")
Definition: SField.h:448
ripple::sfQualityOut
const SF_U32 sfQualityOut(access, STI_UINT32, 21, "QualityOut")
Definition: SField.h:374
ripple::sfVersion
const SF_U16 sfVersion(access, STI_UINT16, 16, "Version")
Definition: SField.h:351
ripple::sfIndex
const SField sfIndex(access, STI_HASH256, 258, "index")
ripple::sfValidatorToReEnable
const SF_Blob sfValidatorToReEnable(access, STI_VL, 21, "ValidatorToReEnable")
Definition: SField.h:478
ripple::sfTicketSequence
const SF_U32 sfTicketSequence(access, STI_UINT32, 41, "TicketSequence")
Definition: SField.h:394
ripple::sfMemo
const SField sfMemo(access, STI_OBJECT, 10, "Memo")
Definition: SField.h:508
ripple::sfHashes
const SF_Vec256 sfHashes(access, STI_VECTOR256, 2, "Hashes")
Definition: SField.h:495
ripple::STI_UINT32
@ STI_UINT32
Definition: SField.h:60
ripple::access
static SField::private_access_tag_t access
Definition: SField.cpp:38
ripple::sfPublicKey
const SF_Blob sfPublicKey(access, STI_VL, 1, "PublicKey")
Definition: SField.h:458
ripple::sfSignerWeight
const SF_U16 sfSignerWeight(access, STI_UINT16, 3, "SignerWeight")
Definition: SField.h:348
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::sfWalletSize
const SF_U32 sfWalletSize(access, STI_UINT32, 12, "WalletSize")
Definition: SField.h:364
ripple::sfNecessary
const SField sfNecessary(access, STI_ARRAY, 6, "Necessary")
Definition: SField.h:520
ripple::sfLowQualityIn
const SF_U32 sfLowQualityIn(access, STI_UINT32, 18, "LowQualityIn")
Definition: SField.h:371
ripple::sfBalance
const SF_Amount sfBalance(access, STI_AMOUNT, 2, "Balance")
Definition: SField.h:442
ripple::sfTakerPaysCurrency
const SF_U160 sfTakerPaysCurrency(access, STI_HASH160, 1, "TakerPaysCurrency")
Definition: SField.h:413
ripple::sfDeliverMin
const SF_Amount sfDeliverMin(access, STI_AMOUNT, 10, "DeliverMin")
Definition: SField.h:450
ripple::sfOfferSequence
const SF_U32 sfOfferSequence(access, STI_UINT32, 25, "OfferSequence")
Definition: SField.h:378
ripple::SField
Identifies fields.
Definition: SField.h:109
ripple::sfTransactionHash
const SF_U256 sfTransactionHash(access, STI_HASH256, 3, "TransactionHash")
Definition: SField.h:421
ripple::STI_UINT64
@ STI_UINT64
Definition: SField.h:61
ripple::SField::num
static int num
Definition: SField.h:275
ripple::sfAffectedNodes
const SField sfAffectedNodes(access, STI_ARRAY, 8, "AffectedNodes")
Definition: SField.h:522
ripple::sfReserveIncrement
const SF_U32 sfReserveIncrement(access, STI_UINT32, 32, "ReserveIncrement")
Definition: SField.h:385
ripple::STI_HASH128
@ STI_HASH128
Definition: SField.h:62
cassert
ripple::sfRippleEscrow
const SF_Amount sfRippleEscrow(access, STI_AMOUNT, 17, "RippleEscrow")
Definition: SField.h:454
ripple::sfClearFlag
const SF_U32 sfClearFlag(access, STI_UINT32, 34, "ClearFlag")
Definition: SField.h:387
ripple::sfCondition
const SF_Blob sfCondition(access, STI_VL, 17, "Condition")
Definition: SField.h:474
ripple::sfPaths
const SField sfPaths(access, STI_PATHSET, 1, "Paths")
Definition: SField.h:491
ripple::sfTransactionResult
const SF_U8 sfTransactionResult(access, STI_UINT8, 3, "TransactionResult")
Definition: SField.h:341
ripple::sfCloseTime
const SF_U32 sfCloseTime(access, STI_UINT32, 7, "CloseTime")
Definition: SField.h:359
ripple::sfMemos
const SField sfMemos(access, STI_ARRAY, 9, "Memos")
Definition: SField.h:523
ripple::SField::compare
static int compare(const SField &f1, const SField &f2)
Definition: SField.cpp:337
ripple::sfSettleDelay
const SF_U32 sfSettleDelay(access, STI_UINT32, 39, "SettleDelay")
Definition: SField.h:392
ripple::sfTakerGets
const SF_Amount sfTakerGets(access, STI_AMOUNT, 5, "TakerGets")
Definition: SField.h:445
ripple::sfDigest
const SF_U256 sfDigest(access, STI_HASH256, 21, "Digest")
Definition: SField.h:434
ripple::sfAccountHash
const SF_U256 sfAccountHash(access, STI_HASH256, 4, "AccountHash")
Definition: SField.h:422
ripple::sfDestination
const SF_Account sfDestination(access, STI_ACCOUNT, 3, "Destination")
Definition: SField.h:483
ripple::sfCheckID
const SF_U256 sfCheckID(access, STI_HASH256, 24, "CheckID")
Definition: SField.h:437
ripple::sfRootIndex
const SF_U256 sfRootIndex(access, STI_HASH256, 8, "RootIndex", SField::sMD_Always)
Definition: SField.h:426
ripple::sfCookie
const SF_U64 sfCookie(access, STI_UINT64, 10, "Cookie")
Definition: SField.h:406
ripple::sfTransferRate
const SF_U32 sfTransferRate(access, STI_UINT32, 11, "TransferRate")
Definition: SField.h:363
ripple::sfValidatorToDisable
const SF_Blob sfValidatorToDisable(access, STI_VL, 20, "ValidatorToDisable")
Definition: SField.h:477
ripple::sfLowNode
const SF_U64 sfLowNode(access, STI_UINT64, 7, "LowNode")
Definition: SField.h:403
ripple::sfBondAmount
const SF_U32 sfBondAmount(access, STI_UINT32, 23, "BondAmount")
Definition: SField.h:376
ripple::STI_OBJECT
@ STI_OBJECT
Definition: SField.h:68
ripple::sfAmendments
const SF_Vec256 sfAmendments(access, STI_VECTOR256, 3, "Amendments")
Definition: SField.h:496
ripple::SField::sMD_Default
@ sMD_Default
Definition: SField.h:119
ripple::sfBookNode
const SF_U64 sfBookNode(access, STI_UINT64, 3, "BookNode")
Definition: SField.h:399
ripple::sfTemplate
const SField sfTemplate(access, STI_ARRAY, 5, "Template")
Definition: SField.h:519
ripple::sfBaseFee
const SF_U64 sfBaseFee(access, STI_UINT64, 5, "BaseFee")
Definition: SField.h:401
ripple::sfAuthorize
const SF_Account sfAuthorize(access, STI_ACCOUNT, 5, "Authorize")
Definition: SField.h:485
ripple::sfDeletedNode
const SField sfDeletedNode(access, STI_OBJECT, 4, "DeletedNode")
Definition: SField.h:502
ripple::sfCloseResolution
const SF_U8 sfCloseResolution(access, STI_UINT8, 1, "CloseResolution")
Definition: SField.h:339
ripple::sfNickname
const SF_U256 sfNickname(access, STI_HASH256, 18, "Nickname")
Definition: SField.h:432
ripple::sfConsensusHash
const SF_U256 sfConsensusHash(access, STI_HASH256, 23, "ConsensusHash")
Definition: SField.h:436
ripple::sfHighQualityOut
const SF_U32 sfHighQualityOut(access, STI_UINT32, 17, "HighQualityOut")
Definition: SField.h:370
ripple::sfLedgerHash
const SF_U256 sfLedgerHash(access, STI_HASH256, 1, "LedgerHash")
Definition: SField.h:419
ripple::sfPreviousTxnID
const SF_U256 sfPreviousTxnID(access, STI_HASH256, 5, "PreviousTxnID", SField::sMD_DeleteFinal)
Definition: SField.h:423
ripple::sfCancelAfter
const SF_U32 sfCancelAfter(access, STI_UINT32, 36, "CancelAfter")
Definition: SField.h:389
ripple::sfEmailHash
const SF_U128 sfEmailHash(access, STI_HASH128, 1, "EmailHash")
Definition: SField.h:410
ripple::sfSetFlag
const SF_U32 sfSetFlag(access, STI_UINT32, 33, "SetFlag")
Definition: SField.h:386
ripple::sfTickSize
const SF_U8 sfTickSize(access, STI_UINT8, 16, "TickSize")
Definition: SField.h:342
ripple::sfExpireCode
const SF_Blob sfExpireCode(access, STI_VL, 10, "ExpireCode")
Definition: SField.h:466
ripple::sfMemoFormat
const SF_Blob sfMemoFormat(access, STI_VL, 14, "MemoFormat")
Definition: SField.h:470
ripple::sfServerVersion
const SF_U64 sfServerVersion(access, STI_UINT64, 11, "ServerVersion")
Definition: SField.h:407
ripple::sfInvoiceID
const SF_U256 sfInvoiceID(access, STI_HASH256, 17, "InvoiceID")
Definition: SField.h:431
ripple::STI_TRANSACTION
@ STI_TRANSACTION
Definition: SField.h:79
ripple::sfDisabledValidator
const SField sfDisabledValidator(access, STI_OBJECT, 19, "DisabledValidator")
Definition: SField.h:512
ripple::sfStampEscrow
const SF_U32 sfStampEscrow(access, STI_UINT32, 22, "StampEscrow")
Definition: SField.h:375
ripple::sfTakerGetsIssuer
const SF_U160 sfTakerGetsIssuer(access, STI_HASH160, 4, "TakerGetsIssuer")
Definition: SField.h:416
string
ripple::sfDomain
const SF_Blob sfDomain(access, STI_VL, 7, "Domain")
Definition: SField.h:463