rippled
SField.h
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 #ifndef RIPPLE_PROTOCOL_SFIELD_H_INCLUDED
21 #define RIPPLE_PROTOCOL_SFIELD_H_INCLUDED
22 
23 #include <ripple/basics/safe_cast.h>
24 #include <ripple/json/json_value.h>
25 #include <cstdint>
26 #include <map>
27 #include <utility>
28 
29 namespace ripple {
30 
31 /*
32 
33 Some fields have a different meaning for their
34  default value versus not present.
35  Example:
36  QualityIn on a TrustLine
37 
38 */
39 
40 //------------------------------------------------------------------------------
41 
42 // Forwards
43 class STAccount;
44 class STAmount;
45 class STBlob;
46 template <int>
48 template <class>
49 class STInteger;
50 class STVector256;
51 
53  // special types
56 
57  // // types (common)
64  STI_VL = 7,
66  // 9-13 are reserved
67  STI_OBJECT = 14,
68  STI_ARRAY = 15,
69 
70  // types (uncommon)
71  STI_UINT8 = 16,
75  STI_UINT96 = 20,
79 
80  // high level types
81  // cannot be serialized inside other types
82  STI_TRANSACTION = 10001,
83  STI_LEDGERENTRY = 10002,
84  STI_VALIDATION = 10003,
85  STI_METADATA = 10004,
86 };
87 
88 // constexpr
89 inline int
91 {
92  return (safe_cast<int>(id) << 16) | index;
93 }
94 
95 // constexpr
96 inline int
97 field_code(int id, int index)
98 {
99  return (id << 16) | index;
100 }
101 
112 class SField
113 {
114 public:
115  enum {
116  sMD_Never = 0x00,
117  sMD_ChangeOrig = 0x01, // original value when it changes
118  sMD_ChangeNew = 0x02, // new value when it changes
119  sMD_DeleteFinal = 0x04, // final value when it is deleted
120  sMD_Create = 0x08, // value when it's created
121  sMD_Always = 0x10, // value when node containing it is affected at all
124  };
125 
126  enum class IsSigning : unsigned char { no, yes };
128 
129  int const fieldCode; // (type<<16)|index
130  SerializedTypeID const fieldType; // STI_*
131  int const fieldValue; // Code number for protocol
133  int const fieldMeta;
134  int const fieldNum;
137 
138  SField(SField const&) = delete;
139  SField&
140  operator=(SField const&) = delete;
141  SField(SField&&) = delete;
142  SField&
143  operator=(SField&&) = delete;
144 
145 public:
146  struct private_access_tag_t; // public, but still an implementation detail
147 
148  // These constructors can only be called from SField.cpp
149  SField(
151  SerializedTypeID tid,
152  int fv,
153  const char* fn,
154  int meta = sMD_Default,
155  IsSigning signing = IsSigning::yes);
156  explicit SField(private_access_tag_t, int fc);
157 
158  static const SField&
159  getField(int fieldCode);
160  static const SField&
162  static const SField&
163  getField(int type, int value)
164  {
165  return getField(field_code(type, value));
166  }
167 
168  static const SField&
169  getField(SerializedTypeID type, int value)
170  {
171  return getField(field_code(type, value));
172  }
173 
174  std::string const&
175  getName() const
176  {
177  return fieldName;
178  }
179 
180  bool
181  hasName() const
182  {
183  return fieldCode > 0;
184  }
185 
186  Json::StaticString const&
187  getJsonName() const
188  {
189  return jsonName;
190  }
191 
192  bool
193  isInvalid() const
194  {
195  return fieldCode == -1;
196  }
197 
198  bool
199  isUseful() const
200  {
201  return fieldCode > 0;
202  }
203 
204  bool
205  isBinary() const
206  {
207  return fieldValue < 256;
208  }
209 
210  // A discardable field is one that cannot be serialized, and
211  // should be discarded during serialization,like 'hash'.
212  // You cannot serialize an object's hash inside that object,
213  // but you can have it in the JSON representation.
214  bool
216  {
217  return fieldValue > 256;
218  }
219 
220  int
221  getCode() const
222  {
223  return fieldCode;
224  }
225  int
226  getNum() const
227  {
228  return fieldNum;
229  }
230  static int
232  {
233  return num;
234  }
235 
236  bool
237  shouldMeta(int c) const
238  {
239  return (fieldMeta & c) != 0;
240  }
241 
242  bool
243  shouldInclude(bool withSigningField) const
244  {
245  return (fieldValue < 256) &&
246  (withSigningField || (signingField == IsSigning::yes));
247  }
248 
249  bool
250  operator==(const SField& f) const
251  {
252  return fieldCode == f.fieldCode;
253  }
254 
255  bool
256  operator!=(const SField& f) const
257  {
258  return fieldCode != f.fieldCode;
259  }
260 
261  static int
262  compare(const SField& f1, const SField& f2);
263 
264 private:
265  static int num;
267 };
268 
270 template <class T>
272 {
273  using type = T;
274 
275  template <class... Args>
276  explicit TypedField(Args&&... args) : SField(std::forward<Args>(args)...)
277  {
278  }
279 
280  TypedField(TypedField&& u) : SField(std::move(u))
281  {
282  }
283 };
284 
286 template <class T>
288 {
289  TypedField<T> const* f;
290 
291  explicit OptionaledField(TypedField<T> const& f_) : f(&f_)
292  {
293  }
294 };
295 
296 template <class T>
297 inline OptionaledField<T>
299 {
300  return OptionaledField<T>(f);
301 }
302 
303 //------------------------------------------------------------------------------
304 
305 //------------------------------------------------------------------------------
306 
318 
323 
324 //------------------------------------------------------------------------------
325 
326 extern SField const sfInvalid;
327 extern SField const sfGeneric;
328 extern SField const sfLedgerEntry;
329 extern SField const sfTransaction;
330 extern SField const sfValidation;
331 extern SField const sfMetadata;
332 
333 // 8-bit integers (common)
334 extern SF_UINT8 const sfCloseResolution;
335 extern SF_UINT8 const sfMethod;
336 extern SF_UINT8 const sfTransactionResult;
337 
338 // 8-bit integers (uncommon)
339 extern SF_UINT8 const sfTickSize;
340 extern SF_UINT8 const sfUNLModifyDisabling;
341 extern SF_UINT8 const sfHookResult;
342 
343 // 16-bit integers (common)
344 extern SF_UINT16 const sfLedgerEntryType;
345 extern SF_UINT16 const sfTransactionType;
346 extern SF_UINT16 const sfSignerWeight;
347 extern SF_UINT16 const sfTransferFee;
348 
349 // 16-bit integers (uncommon)
350 extern SF_UINT16 const sfVersion;
351 extern SF_UINT16 const sfHookStateChangeCount;
352 extern SF_UINT16 const sfHookEmitCount;
353 extern SF_UINT16 const sfHookExecutionIndex;
354 extern SF_UINT16 const sfHookApiVersion;
355 
356 // 32-bit integers (common)
357 extern SF_UINT32 const sfNetworkID;
358 extern SF_UINT32 const sfFlags;
359 extern SF_UINT32 const sfSourceTag;
360 extern SF_UINT32 const sfSequence;
361 extern SF_UINT32 const sfPreviousTxnLgrSeq;
362 extern SF_UINT32 const sfLedgerSequence;
363 extern SF_UINT32 const sfCloseTime;
364 extern SF_UINT32 const sfParentCloseTime;
365 extern SF_UINT32 const sfSigningTime;
366 extern SF_UINT32 const sfExpiration;
367 extern SF_UINT32 const sfTransferRate;
368 extern SF_UINT32 const sfWalletSize;
369 extern SF_UINT32 const sfOwnerCount;
370 extern SF_UINT32 const sfDestinationTag;
371 
372 // 32-bit integers (uncommon)
373 extern SF_UINT32 const sfHighQualityIn;
374 extern SF_UINT32 const sfHighQualityOut;
375 extern SF_UINT32 const sfLowQualityIn;
376 extern SF_UINT32 const sfLowQualityOut;
377 extern SF_UINT32 const sfQualityIn;
378 extern SF_UINT32 const sfQualityOut;
379 extern SF_UINT32 const sfStampEscrow;
380 extern SF_UINT32 const sfBondAmount;
381 extern SF_UINT32 const sfLoadFee;
382 extern SF_UINT32 const sfOfferSequence;
383 extern SF_UINT32 const sfFirstLedgerSequence;
384 extern SF_UINT32 const sfLastLedgerSequence;
385 extern SF_UINT32 const sfTransactionIndex;
386 extern SF_UINT32 const sfOperationLimit;
387 extern SF_UINT32 const sfReferenceFeeUnits;
388 extern SF_UINT32 const sfReserveBase;
389 extern SF_UINT32 const sfReserveIncrement;
390 extern SF_UINT32 const sfSetFlag;
391 extern SF_UINT32 const sfClearFlag;
392 extern SF_UINT32 const sfSignerQuorum;
393 extern SF_UINT32 const sfCancelAfter;
394 extern SF_UINT32 const sfFinishAfter;
395 extern SF_UINT32 const sfSignerListID;
396 extern SF_UINT32 const sfSettleDelay;
397 extern SF_UINT32 const sfTicketCount;
398 extern SF_UINT32 const sfTicketSequence;
399 extern SF_UINT32 const sfNFTokenTaxon;
400 extern SF_UINT32 const sfMintedNFTokens;
401 extern SF_UINT32 const sfBurnedNFTokens;
402 extern SF_UINT32 const sfHookStateCount;
403 extern SF_UINT32 const sfEmitGeneration;
404 extern SF_UINT32 const sfFirstNFTokenSequence;
405 
406 // 64-bit integers (common)
407 extern SF_UINT64 const sfIndexNext;
408 extern SF_UINT64 const sfIndexPrevious;
409 extern SF_UINT64 const sfBookNode;
410 extern SF_UINT64 const sfOwnerNode;
411 extern SF_UINT64 const sfBaseFee;
412 extern SF_UINT64 const sfExchangeRate;
413 extern SF_UINT64 const sfLowNode;
414 extern SF_UINT64 const sfHighNode;
415 extern SF_UINT64 const sfDestinationNode;
416 extern SF_UINT64 const sfCookie;
417 extern SF_UINT64 const sfServerVersion;
418 extern SF_UINT64 const sfNFTokenOfferNode;
419 extern SF_UINT64 const sfEmitBurden;
420 
421 // 64-bit integers (uncommon)
422 extern SF_UINT64 const sfHookOn;
423 extern SF_UINT64 const sfHookInstructionCount;
424 extern SF_UINT64 const sfHookReturnCode;
425 extern SF_UINT64 const sfReferenceCount;
426 
427 // 128-bit
428 extern SF_UINT128 const sfEmailHash;
429 
430 // 160-bit (common)
431 extern SF_UINT160 const sfTakerPaysCurrency;
432 extern SF_UINT160 const sfTakerPaysIssuer;
433 extern SF_UINT160 const sfTakerGetsCurrency;
434 extern SF_UINT160 const sfTakerGetsIssuer;
435 
436 // 256-bit (common)
437 extern SF_UINT256 const sfLedgerHash;
438 extern SF_UINT256 const sfParentHash;
439 extern SF_UINT256 const sfTransactionHash;
440 extern SF_UINT256 const sfAccountHash;
441 extern SF_UINT256 const sfPreviousTxnID;
442 extern SF_UINT256 const sfLedgerIndex;
443 extern SF_UINT256 const sfWalletLocator;
444 extern SF_UINT256 const sfRootIndex;
445 extern SF_UINT256 const sfAccountTxnID;
446 extern SF_UINT256 const sfNFTokenID;
447 extern SF_UINT256 const sfEmitParentTxnID;
448 extern SF_UINT256 const sfEmitNonce;
449 extern SF_UINT256 const sfEmitHookHash;
450 
451 // 256-bit (uncommon)
452 extern SF_UINT256 const sfBookDirectory;
453 extern SF_UINT256 const sfInvoiceID;
454 extern SF_UINT256 const sfNickname;
455 extern SF_UINT256 const sfAmendment;
456 extern SF_UINT256 const sfDigest;
457 extern SF_UINT256 const sfChannel;
458 extern SF_UINT256 const sfConsensusHash;
459 extern SF_UINT256 const sfCheckID;
460 extern SF_UINT256 const sfValidatedHash;
461 extern SF_UINT256 const sfPreviousPageMin;
462 extern SF_UINT256 const sfNextPageMin;
463 extern SF_UINT256 const sfNFTokenBuyOffer;
464 extern SF_UINT256 const sfNFTokenSellOffer;
465 extern SF_UINT256 const sfHookStateKey;
466 extern SF_UINT256 const sfHookHash;
467 extern SF_UINT256 const sfHookNamespace;
468 extern SF_UINT256 const sfHookSetTxnID;
469 
470 // currency amount (common)
471 extern SF_AMOUNT const sfAmount;
472 extern SF_AMOUNT const sfBalance;
473 extern SF_AMOUNT const sfLimitAmount;
474 extern SF_AMOUNT const sfTakerPays;
475 extern SF_AMOUNT const sfTakerGets;
476 extern SF_AMOUNT const sfLowLimit;
477 extern SF_AMOUNT const sfHighLimit;
478 extern SF_AMOUNT const sfFee;
479 extern SF_AMOUNT const sfSendMax;
480 extern SF_AMOUNT const sfDeliverMin;
481 
482 // currency amount (uncommon)
483 extern SF_AMOUNT const sfMinimumOffer;
484 extern SF_AMOUNT const sfRippleEscrow;
485 extern SF_AMOUNT const sfDeliveredAmount;
486 extern SF_AMOUNT const sfNFTokenBrokerFee;
487 
488 // currency amount (fees)
489 extern SF_AMOUNT const sfBaseFeeDrops;
490 extern SF_AMOUNT const sfReserveBaseDrops;
492 
493 // variable length (common)
494 extern SF_VL const sfPublicKey;
495 extern SF_VL const sfMessageKey;
496 extern SF_VL const sfSigningPubKey;
497 extern SF_VL const sfTxnSignature;
498 extern SF_VL const sfURI;
499 extern SF_VL const sfSignature;
500 extern SF_VL const sfDomain;
501 extern SF_VL const sfFundCode;
502 extern SF_VL const sfRemoveCode;
503 extern SF_VL const sfExpireCode;
504 extern SF_VL const sfCreateCode;
505 extern SF_VL const sfMemoType;
506 extern SF_VL const sfMemoData;
507 extern SF_VL const sfMemoFormat;
508 
509 // variable length (uncommon)
510 extern SF_VL const sfFulfillment;
511 extern SF_VL const sfCondition;
512 extern SF_VL const sfMasterSignature;
513 extern SF_VL const sfUNLModifyValidator;
514 extern SF_VL const sfValidatorToDisable;
515 extern SF_VL const sfValidatorToReEnable;
516 extern SF_VL const sfHookStateData;
517 extern SF_VL const sfHookReturnString;
518 extern SF_VL const sfHookParameterName;
519 extern SF_VL const sfHookParameterValue;
520 
521 // account
522 extern SF_ACCOUNT const sfAccount;
523 extern SF_ACCOUNT const sfOwner;
524 extern SF_ACCOUNT const sfDestination;
525 extern SF_ACCOUNT const sfIssuer;
526 extern SF_ACCOUNT const sfAuthorize;
527 extern SF_ACCOUNT const sfUnauthorize;
528 extern SF_ACCOUNT const sfRegularKey;
529 extern SF_ACCOUNT const sfNFTokenMinter;
530 extern SF_ACCOUNT const sfEmitCallback;
531 
532 // account (uncommon)
533 extern SF_ACCOUNT const sfHookAccount;
534 
535 // path set
536 extern SField const sfPaths;
537 
538 // vector of 256-bit
539 extern SF_VECTOR256 const sfIndexes;
540 extern SF_VECTOR256 const sfHashes;
541 extern SF_VECTOR256 const sfAmendments;
542 extern SF_VECTOR256 const sfNFTokenOffers;
543 
544 // inner object
545 // OBJECT/1 is reserved for end of object
546 extern SField const sfTransactionMetaData;
547 extern SField const sfCreatedNode;
548 extern SField const sfDeletedNode;
549 extern SField const sfModifiedNode;
550 extern SField const sfPreviousFields;
551 extern SField const sfFinalFields;
552 extern SField const sfNewFields;
553 extern SField const sfTemplateEntry;
554 extern SField const sfMemo;
555 extern SField const sfSignerEntry;
556 extern SField const sfNFToken;
557 extern SField const sfEmitDetails;
558 extern SField const sfHook;
559 
560 extern SField const sfSigner;
561 extern SField const sfMajority;
562 extern SField const sfDisabledValidator;
563 extern SField const sfEmittedTxn;
564 extern SField const sfHookExecution;
565 extern SField const sfHookDefinition;
566 extern SField const sfHookParameter;
567 extern SField const sfHookGrant;
568 
569 // array of objects (common)
570 // ARRAY/1 is reserved for end of array
571 // extern SField const sfSigningAccounts; // Never been used.
572 extern SField const sfSigners;
573 extern SField const sfSignerEntries;
574 extern SField const sfTemplate;
575 extern SField const sfNecessary;
576 extern SField const sfSufficient;
577 extern SField const sfAffectedNodes;
578 extern SField const sfMemos;
579 extern SField const sfNFTokens;
580 extern SField const sfHooks;
581 
582 // array of objects (uncommon)
583 extern SField const sfMajorities;
584 extern SField const sfDisabledValidators;
585 extern SField const sfHookExecutions;
586 extern SField const sfHookParameters;
587 extern SField const sfHookGrants;
588 
589 //------------------------------------------------------------------------------
590 
591 } // namespace ripple
592 
593 #endif
ripple::sfHookAccount
const SF_ACCOUNT sfHookAccount
ripple::sfIndexNext
const SF_UINT64 sfIndexNext
ripple::sfSignerListID
const SF_UINT32 sfSignerListID
ripple::sfHighQualityIn
const SF_UINT32 sfHighQualityIn
ripple::sfOfferSequence
const SF_UINT32 sfOfferSequence
ripple::sfPreviousTxnLgrSeq
const SF_UINT32 sfPreviousTxnLgrSeq
ripple::sfHookHash
const SF_UINT256 sfHookHash
ripple::sfOwnerCount
const SF_UINT32 sfOwnerCount
ripple::sfFirstNFTokenSequence
const SF_UINT32 sfFirstNFTokenSequence
ripple::TypedField::TypedField
TypedField(TypedField &&u)
Definition: SField.h:280
ripple::sfSignerWeight
const SF_UINT16 sfSignerWeight
ripple::sfHookApiVersion
const SF_UINT16 sfHookApiVersion
ripple::sfHooks
const SField sfHooks
ripple::sfPaths
const SField sfPaths
ripple::sfHookParameterValue
const SF_VL sfHookParameterValue
ripple::sfUNLModifyValidator
const SF_VL sfUNLModifyValidator
ripple::sfRootIndex
const SF_UINT256 sfRootIndex
ripple::sfSourceTag
const SF_UINT32 sfSourceTag
ripple::sfBaseFeeDrops
const SF_AMOUNT sfBaseFeeDrops
ripple::sfReserveBase
const SF_UINT32 sfReserveBase
ripple::sfCreateCode
const SF_VL sfCreateCode
ripple::sfEmitParentTxnID
const SF_UINT256 sfEmitParentTxnID
ripple::SField::IsSigning
IsSigning
Definition: SField.h:126
ripple::sfMetadata
const SField sfMetadata
ripple::sfSendMax
const SF_AMOUNT sfSendMax
std::string
STL class.
ripple::sfSigners
const SField sfSigners
ripple::STI_UINT128
@ STI_UINT128
Definition: SField.h:61
ripple::sfHookExecutionIndex
const SF_UINT16 sfHookExecutionIndex
ripple::SField::getField
static const SField & getField(SerializedTypeID type, int value)
Definition: SField.h:169
ripple::sfEmitHookHash
const SF_UINT256 sfEmitHookHash
utility
ripple::sfOwnerNode
const SF_UINT64 sfOwnerNode
ripple::TypedField
A field with a type known at compile time.
Definition: SField.h:271
ripple::sfHookReturnCode
const SF_UINT64 sfHookReturnCode
ripple::sfMinimumOffer
const SF_AMOUNT sfMinimumOffer
ripple::STI_METADATA
@ STI_METADATA
Definition: SField.h:85
ripple::sfGeneric
const SField sfGeneric(access, 0)
Definition: SField.h:327
ripple::SField::fieldValue
const int fieldValue
Definition: SField.h:131
ripple::sfLedgerSequence
const SF_UINT32 sfLedgerSequence
ripple::sfNFTokenOffers
const SF_VECTOR256 sfNFTokenOffers
ripple::sfDestination
const SF_ACCOUNT sfDestination
ripple::sfTransactionMetaData
const SField sfTransactionMetaData
ripple::SField::isBinary
bool isBinary() const
Definition: SField.h:205
ripple::sfAmount
const SF_AMOUNT sfAmount
ripple::sfNFTokenID
const SF_UINT256 sfNFTokenID
ripple::sfWalletSize
const SF_UINT32 sfWalletSize
ripple::sfFirstLedgerSequence
const SF_UINT32 sfFirstLedgerSequence
ripple::sfCheckID
const SF_UINT256 sfCheckID
ripple::SField::sMD_Always
@ sMD_Always
Definition: SField.h:121
ripple::SField::sMD_DeleteFinal
@ sMD_DeleteFinal
Definition: SField.h:119
ripple::SField::isInvalid
bool isInvalid() const
Definition: SField.h:193
ripple::sfQualityOut
const SF_UINT32 sfQualityOut
ripple::sfOwner
const SF_ACCOUNT sfOwner
ripple::sfHookStateChangeCount
const SF_UINT16 sfHookStateChangeCount
ripple::sfSequence
const SF_UINT32 sfSequence
ripple::sfRegularKey
const SF_ACCOUNT sfRegularKey
ripple::SField::private_access_tag_t
Definition: SField.cpp:34
ripple::sfBookDirectory
const SF_UINT256 sfBookDirectory
ripple::STI_AMOUNT
@ STI_AMOUNT
Definition: SField.h:63
ripple::STI_UINT8
@ STI_UINT8
Definition: SField.h:71
ripple::field_code
int field_code(SerializedTypeID id, int index)
Definition: SField.h:90
ripple::SField::fieldName
const std::string fieldName
Definition: SField.h:132
ripple::STI_UINT192
@ STI_UINT192
Definition: SField.h:76
ripple::sfTakerPaysCurrency
const SF_UINT160 sfTakerPaysCurrency
ripple::STI_PATHSET
@ STI_PATHSET
Definition: SField.h:73
ripple::sfSigningPubKey
const SF_VL sfSigningPubKey
ripple::SField::hasName
bool hasName() const
Definition: SField.h:181
ripple::SerializedTypeID
SerializedTypeID
Definition: SField.h:52
ripple::sfLedgerIndex
const SF_UINT256 sfLedgerIndex
ripple::SField::isUseful
bool isUseful() const
Definition: SField.h:199
ripple::sfMintedNFTokens
const SF_UINT32 sfMintedNFTokens
ripple::STI_VALIDATION
@ STI_VALIDATION
Definition: SField.h:84
ripple::STI_LEDGERENTRY
@ STI_LEDGERENTRY
Definition: SField.h:83
ripple::STI_UINT512
@ STI_UINT512
Definition: SField.h:78
ripple::SField::signingField
const IsSigning signingField
Definition: SField.h:135
ripple::sfHookResult
const SF_UINT8 sfHookResult
ripple::SField::getField
static const SField & getField(int type, int value)
Definition: SField.h:163
ripple::sfHookOn
const SF_UINT64 sfHookOn
ripple::STI_UINT160
@ STI_UINT160
Definition: SField.h:72
ripple::sfQualityIn
const SF_UINT32 sfQualityIn
ripple::sfHookReturnString
const SF_VL sfHookReturnString
ripple::SField::operator!=
bool operator!=(const SField &f) const
Definition: SField.h:256
ripple::SField::getNum
int getNum() const
Definition: SField.h:226
ripple::sfSetFlag
const SF_UINT32 sfSetFlag
ripple::sfHookParameters
const SField sfHookParameters
ripple::STI_UINT384
@ STI_UINT384
Definition: SField.h:77
ripple::sfFinalFields
const SField sfFinalFields
ripple::OptionaledField
Indicate std::optional field semantics.
Definition: SField.h:287
ripple::sfCloseTime
const SF_UINT32 sfCloseTime
ripple::sfTicketSequence
const SF_UINT32 sfTicketSequence
ripple::sfParentCloseTime
const SF_UINT32 sfParentCloseTime
ripple::SField::getField
static const SField & getField(int fieldCode)
Definition: SField.cpp:387
ripple::STI_ACCOUNT
@ STI_ACCOUNT
Definition: SField.h:65
ripple::STI_ARRAY
@ STI_ARRAY
Definition: SField.h:68
ripple::SField::knownCodeToField
static std::map< int, SField const * > knownCodeToField
Definition: SField.h:266
ripple::sfHookStateCount
const SF_UINT32 sfHookStateCount
ripple::SField::sMD_ChangeOrig
@ sMD_ChangeOrig
Definition: SField.h:117
ripple::SField::getJsonName
Json::StaticString const & getJsonName() const
Definition: SField.h:187
ripple::SField::operator==
bool operator==(const SField &f) const
Definition: SField.h:250
ripple::sfTakerGetsCurrency
const SF_UINT160 sfTakerGetsCurrency
ripple::STBitString
Definition: SField.h:47
ripple::SField::operator=
SField & operator=(SField const &)=delete
ripple::SField::jsonName
const Json::StaticString jsonName
Definition: SField.h:136
ripple::sfEmitDetails
const SField sfEmitDetails
ripple::sfDeletedNode
const SField sfDeletedNode
ripple::sfHookInstructionCount
const SF_UINT64 sfHookInstructionCount
ripple::sfHookEmitCount
const SF_UINT16 sfHookEmitCount
ripple::sfInvalid
const SField sfInvalid(access, -1)
Definition: SField.h:326
ripple::TypedField::TypedField
TypedField(Args &&... args)
Definition: SField.h:276
ripple::SField::sMD_Create
@ sMD_Create
Definition: SField.h:120
ripple::sfNFTokenOfferNode
const SF_UINT64 sfNFTokenOfferNode
ripple::sfTransferFee
const SF_UINT16 sfTransferFee
ripple::sfHookStateData
const SF_VL sfHookStateData
ripple::sfLedgerEntry
const SField sfLedgerEntry
ripple::SField::sMD_Default
@ sMD_Default
Definition: SField.h:122
ripple::sfExpiration
const SF_UINT32 sfExpiration
ripple::sfTransactionHash
const SF_UINT256 sfTransactionHash
ripple::sfSignerQuorum
const SF_UINT32 sfSignerQuorum
ripple::sfIndexes
const SF_VECTOR256 sfIndexes
ripple::SField::fieldType
const SerializedTypeID fieldType
Definition: SField.h:130
ripple::sfVersion
const SF_UINT16 sfVersion
ripple::sfExpireCode
const SF_VL sfExpireCode
ripple::sfTakerGetsIssuer
const SF_UINT160 sfTakerGetsIssuer
ripple::STI_UINT96
@ STI_UINT96
Definition: SField.h:75
ripple::sfLowNode
const SF_UINT64 sfLowNode
ripple::sfEmitNonce
const SF_UINT256 sfEmitNonce
ripple::sfValidatedHash
const SF_UINT256 sfValidatedHash
ripple::sfTakerPays
const SF_AMOUNT sfTakerPays
ripple::SField::SField
SField(SField const &)=delete
ripple::sfTransactionType
const SF_UINT16 sfTransactionType
ripple::sfHookExecution
const SField sfHookExecution
ripple::sfDeliverMin
const SF_AMOUNT sfDeliverMin
ripple::sfLowQualityOut
const SF_UINT32 sfLowQualityOut
ripple::sfLimitAmount
const SF_AMOUNT sfLimitAmount
ripple::sfLowLimit
const SF_AMOUNT sfLowLimit
ripple::sfHookParameter
const SField sfHookParameter
ripple::OptionaledField::OptionaledField
OptionaledField(TypedField< T > const &f_)
Definition: SField.h:291
ripple::sfDeliveredAmount
const SF_AMOUNT sfDeliveredAmount
ripple::sfParentHash
const SF_UINT256 sfParentHash
ripple::sfSettleDelay
const SF_UINT32 sfSettleDelay
ripple::sfUnauthorize
const SF_ACCOUNT sfUnauthorize
ripple::sfMemos
const SField sfMemos
ripple::sfServerVersion
const SF_UINT64 sfServerVersion
ripple::sfBondAmount
const SF_UINT32 sfBondAmount
ripple::sfLoadFee
const SF_UINT32 sfLoadFee
ripple::sfNFTokenMinter
const SF_ACCOUNT sfNFTokenMinter
ripple::sfNewFields
const SField sfNewFields
ripple::sfReserveIncrement
const SF_UINT32 sfReserveIncrement
ripple::sfMasterSignature
const SF_VL sfMasterSignature
ripple::sfNickname
const SF_UINT256 sfNickname
ripple::sfIndexPrevious
const SF_UINT64 sfIndexPrevious
ripple::sfAffectedNodes
const SField sfAffectedNodes
ripple::sfTemplate
const SField sfTemplate
ripple::sfBookNode
const SF_UINT64 sfBookNode
ripple::sfLedgerHash
const SF_UINT256 sfLedgerHash
ripple::sfFundCode
const SF_VL sfFundCode
ripple::SField::notSigning
static const IsSigning notSigning
Definition: SField.h:127
ripple::sfCookie
const SF_UINT64 sfCookie
ripple::sfLowQualityIn
const SF_UINT32 sfLowQualityIn
ripple::sfDigest
const SF_UINT256 sfDigest
ripple::sfHookStateKey
const SF_UINT256 sfHookStateKey
ripple::STI_UNKNOWN
@ STI_UNKNOWN
Definition: SField.h:54
ripple::sfValidatorToDisable
const SF_VL sfValidatorToDisable
ripple::sfTicketCount
const SF_UINT32 sfTicketCount
ripple::STI_VL
@ STI_VL
Definition: SField.h:64
ripple::sfRippleEscrow
const SF_AMOUNT sfRippleEscrow
ripple::sfAccountTxnID
const SF_UINT256 sfAccountTxnID
ripple::STI_UINT16
@ STI_UINT16
Definition: SField.h:58
ripple::sfModifiedNode
const SField sfModifiedNode
ripple::sfDestinationNode
const SF_UINT64 sfDestinationNode
ripple::sfTakerGets
const SF_AMOUNT sfTakerGets
ripple::sfMajority
const SField sfMajority
cstdint
ripple::sfRemoveCode
const SF_VL sfRemoveCode
ripple::sfTransferRate
const SF_UINT32 sfTransferRate
ripple::sfTickSize
const SF_UINT8 sfTickSize
ripple::sfPreviousTxnID
const SF_UINT256 sfPreviousTxnID
ripple::SField::fieldCode
const int fieldCode
Definition: SField.h:129
ripple::sfAuthorize
const SF_ACCOUNT sfAuthorize
ripple::sfHighLimit
const SF_AMOUNT sfHighLimit
ripple::sfExchangeRate
const SF_UINT64 sfExchangeRate
ripple::STI_VECTOR256
@ STI_VECTOR256
Definition: SField.h:74
ripple::sfEmitGeneration
const SF_UINT32 sfEmitGeneration
ripple::sfStampEscrow
const SF_UINT32 sfStampEscrow
map
ripple::SField::getNumFields
static int getNumFields()
Definition: SField.h:231
ripple::sfHookExecutions
const SField sfHookExecutions
ripple::sfSigner
const SField sfSigner
ripple::sfReserveIncrementDrops
const SF_AMOUNT sfReserveIncrementDrops
ripple::sfClearFlag
const SF_UINT32 sfClearFlag
ripple::sfSignerEntry
const SField sfSignerEntry
ripple::sfReserveBaseDrops
const SF_AMOUNT sfReserveBaseDrops
ripple::STInteger
Definition: SField.h:49
ripple::sfNFToken
const SField sfNFToken
ripple::sfUNLModifyDisabling
const SF_UINT8 sfUNLModifyDisabling
ripple::SField::IsSigning::yes
@ yes
ripple::SField::shouldInclude
bool shouldInclude(bool withSigningField) const
Definition: SField.h:243
ripple::TypedField::type
T type
Definition: SField.h:273
ripple::sfPreviousFields
const SField sfPreviousFields
ripple::sfReferenceCount
const SF_UINT64 sfReferenceCount
ripple::sfTransactionIndex
const SF_UINT32 sfTransactionIndex
ripple::sfEmailHash
const SF_UINT128 sfEmailHash
ripple::sfNFTokens
const SField sfNFTokens
ripple::sfSignerEntries
const SField sfSignerEntries
ripple::sfOperationLimit
const SF_UINT32 sfOperationLimit
ripple::sfBaseFee
const SF_UINT64 sfBaseFee
ripple::sfHashes
const SF_VECTOR256 sfHashes
ripple::sfMemoData
const SF_VL sfMemoData
ripple::sfNFTokenBuyOffer
const SF_UINT256 sfNFTokenBuyOffer
ripple::STI_UINT32
@ STI_UINT32
Definition: SField.h:59
ripple::sfTxnSignature
const SF_VL sfTxnSignature
ripple::sfURI
const SF_VL sfURI
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::sfHookGrants
const SField sfHookGrants
ripple::sfHookGrant
const SField sfHookGrant
ripple::sfCloseResolution
const SF_UINT8 sfCloseResolution
ripple::sfTransactionResult
const SF_UINT8 sfTransactionResult
ripple::sfWalletLocator
const SF_UINT256 sfWalletLocator
ripple::sfAccountHash
const SF_UINT256 sfAccountHash
ripple::sfTemplateEntry
const SField sfTemplateEntry
ripple::sfLedgerEntryType
const SF_UINT16 sfLedgerEntryType
ripple::SField
Identifies fields.
Definition: SField.h:112
ripple::sfCondition
const SF_VL sfCondition
ripple::STI_UINT64
@ STI_UINT64
Definition: SField.h:60
ripple::SField::num
static int num
Definition: SField.h:265
ripple::sfTakerPaysIssuer
const SF_UINT160 sfTakerPaysIssuer
ripple::sfIssuer
const SF_ACCOUNT sfIssuer
ripple::SField::getName
std::string const & getName() const
Definition: SField.h:175
ripple::sfInvoiceID
const SF_UINT256 sfInvoiceID
Json::StaticString
Lightweight wrapper to tag static string.
Definition: json_value.h:60
ripple::sfFlags
const SF_UINT32 sfFlags
std
STL namespace.
ripple::SField::isDiscardable
bool isDiscardable() const
Definition: SField.h:215
ripple::sfConsensusHash
const SF_UINT256 sfConsensusHash
ripple::sfDisabledValidator
const SField sfDisabledValidator
ripple::sfDestinationTag
const SF_UINT32 sfDestinationTag
ripple::sfCreatedNode
const SField sfCreatedNode
ripple::sfHookParameterName
const SF_VL sfHookParameterName
ripple::sfSignature
const SF_VL sfSignature
ripple::sfBalance
const SF_AMOUNT sfBalance
ripple::sfHook
const SField sfHook
ripple::SField::compare
static int compare(const SField &f1, const SField &f2)
Definition: SField.cpp:399
ripple::sfReferenceFeeUnits
const SF_UINT32 sfReferenceFeeUnits
ripple::STVector256
Definition: STVector256.h:29
ripple::sfNextPageMin
const SF_UINT256 sfNextPageMin
ripple::sfCancelAfter
const SF_UINT32 sfCancelAfter
ripple::sfHookDefinition
const SField sfHookDefinition
ripple::sfMessageKey
const SF_VL sfMessageKey
ripple::sfHighQualityOut
const SF_UINT32 sfHighQualityOut
ripple::sfEmitCallback
const SF_ACCOUNT sfEmitCallback
ripple::SField::getCode
int getCode() const
Definition: SField.h:221
ripple::sfValidation
const SField sfValidation
ripple::sfPreviousPageMin
const SF_UINT256 sfPreviousPageMin
ripple::SField::fieldMeta
const int fieldMeta
Definition: SField.h:133
ripple::sfFinishAfter
const SF_UINT32 sfFinishAfter
ripple::sfChannel
const SF_UINT256 sfChannel
ripple::OptionaledField::f
TypedField< T > const * f
Definition: SField.h:289
ripple::sfNFTokenTaxon
const SF_UINT32 sfNFTokenTaxon
ripple::sfFee
const SF_AMOUNT sfFee
ripple::sfMemo
const SField sfMemo
ripple::sfAccount
const SF_ACCOUNT sfAccount
ripple::sfEmittedTxn
const SField sfEmittedTxn
ripple::sfEmitBurden
const SF_UINT64 sfEmitBurden
ripple::sfNetworkID
const SF_UINT32 sfNetworkID
ripple::STI_OBJECT
@ STI_OBJECT
Definition: SField.h:67
ripple::sfSufficient
const SField sfSufficient
ripple::sfHookNamespace
const SF_UINT256 sfHookNamespace
ripple::sfDomain
const SF_VL sfDomain
ripple::sfLastLedgerSequence
const SF_UINT32 sfLastLedgerSequence
ripple::SField::shouldMeta
bool shouldMeta(int c) const
Definition: SField.h:237
ripple::sfBurnedNFTokens
const SF_UINT32 sfBurnedNFTokens
ripple::SField::sMD_ChangeNew
@ sMD_ChangeNew
Definition: SField.h:118
ripple::sfAmendment
const SF_UINT256 sfAmendment
ripple::STI_UINT256
@ STI_UINT256
Definition: SField.h:62
ripple::sfMajorities
const SField sfMajorities
ripple::SField::sMD_Never
@ sMD_Never
Definition: SField.h:116
ripple::sfSigningTime
const SF_UINT32 sfSigningTime
ripple::sfDisabledValidators
const SField sfDisabledValidators
ripple::sfFulfillment
const SF_VL sfFulfillment
ripple::SField::IsSigning::no
@ no
ripple::sfPublicKey
const SF_VL sfPublicKey
ripple::sfNecessary
const SField sfNecessary
ripple::sfHighNode
const SF_UINT64 sfHighNode
ripple::sfNFTokenSellOffer
const SF_UINT256 sfNFTokenSellOffer
ripple::sfTransaction
const SField sfTransaction
ripple::sfHookSetTxnID
const SF_UINT256 sfHookSetTxnID
ripple::SField::fieldNum
const int fieldNum
Definition: SField.h:134
ripple::sfNFTokenBrokerFee
const SF_AMOUNT sfNFTokenBrokerFee
ripple::sfAmendments
const SF_VECTOR256 sfAmendments
ripple::sfMethod
const SF_UINT8 sfMethod
ripple::STI_TRANSACTION
@ STI_TRANSACTION
Definition: SField.h:82
ripple::STI_NOTPRESENT
@ STI_NOTPRESENT
Definition: SField.h:55
ripple::sfMemoFormat
const SF_VL sfMemoFormat
ripple::operator~
constexpr ApplyFlags operator~(ApplyFlags const &flags)
Definition: ApplyView.h:71
ripple::sfValidatorToReEnable
const SF_VL sfValidatorToReEnable
ripple::sfMemoType
const SF_VL sfMemoType