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 
26 #include <cstdint>
27 #include <map>
28 #include <utility>
29 
30 namespace ripple {
31 
32 /*
33 
34 Some fields have a different meaning for their
35  default value versus not present.
36  Example:
37  QualityIn on a TrustLine
38 
39 */
40 
41 //------------------------------------------------------------------------------
42 
43 // Forwards
44 class STAccount;
45 class STAmount;
46 class STIssue;
47 class STBlob;
48 template <int>
50 template <class>
51 class STInteger;
52 class STXChainBridge;
53 class STVector256;
54 class STCurrency;
55 
56 #pragma push_macro("XMACRO")
57 #undef XMACRO
58 
59 #define XMACRO(STYPE) \
60  /* special types */ \
61  STYPE(STI_UNKNOWN, -2) \
62  STYPE(STI_NOTPRESENT, 0) \
63  STYPE(STI_UINT16, 1) \
64  \
65  /* types (common) */ \
66  STYPE(STI_UINT32, 2) \
67  STYPE(STI_UINT64, 3) \
68  STYPE(STI_UINT128, 4) \
69  STYPE(STI_UINT256, 5) \
70  STYPE(STI_AMOUNT, 6) \
71  STYPE(STI_VL, 7) \
72  STYPE(STI_ACCOUNT, 8) \
73  \
74  /* 9-13 are reserved */ \
75  STYPE(STI_OBJECT, 14) \
76  STYPE(STI_ARRAY, 15) \
77  \
78  /* types (uncommon) */ \
79  STYPE(STI_UINT8, 16) \
80  STYPE(STI_UINT160, 17) \
81  STYPE(STI_PATHSET, 18) \
82  STYPE(STI_VECTOR256, 19) \
83  STYPE(STI_UINT96, 20) \
84  STYPE(STI_UINT192, 21) \
85  STYPE(STI_UINT384, 22) \
86  STYPE(STI_UINT512, 23) \
87  STYPE(STI_ISSUE, 24) \
88  STYPE(STI_XCHAIN_BRIDGE, 25) \
89  STYPE(STI_CURRENCY, 26) \
90  \
91  /* high-level types */ \
92  /* cannot be serialized inside other types */ \
93  STYPE(STI_TRANSACTION, 10001) \
94  STYPE(STI_LEDGERENTRY, 10002) \
95  STYPE(STI_VALIDATION, 10003) \
96  STYPE(STI_METADATA, 10004)
97 
98 #pragma push_macro("TO_ENUM")
99 #undef TO_ENUM
100 #pragma push_macro("TO_MAP")
101 #undef TO_MAP
102 
103 #define TO_ENUM(name, value) name = value,
104 #define TO_MAP(name, value) {#name, value},
105 
106 enum SerializedTypeID { XMACRO(TO_ENUM) };
107 
108 static std::map<std::string, int> const sTypeMap = {XMACRO(TO_MAP)};
109 
110 #undef XMACRO
111 #undef TO_ENUM
112 
113 #pragma pop_macro("XMACRO")
114 #pragma pop_macro("TO_ENUM")
115 #pragma pop_macro("TO_MAP")
116 
117 // constexpr
118 inline int
120 {
121  return (safe_cast<int>(id) << 16) | index;
122 }
123 
124 // constexpr
125 inline int
126 field_code(int id, int index)
127 {
128  return (id << 16) | index;
129 }
130 
141 class SField
142 {
143 public:
144  enum {
145  sMD_Never = 0x00,
146  sMD_ChangeOrig = 0x01, // original value when it changes
147  sMD_ChangeNew = 0x02, // new value when it changes
148  sMD_DeleteFinal = 0x04, // final value when it is deleted
149  sMD_Create = 0x08, // value when it's created
150  sMD_Always = 0x10, // value when node containing it is affected at all
153  };
154 
155  enum class IsSigning : unsigned char { no, yes };
157 
158  int const fieldCode; // (type<<16)|index
159  SerializedTypeID const fieldType; // STI_*
160  int const fieldValue; // Code number for protocol
162  int const fieldMeta;
163  int const fieldNum;
166 
167  SField(SField const&) = delete;
168  SField&
169  operator=(SField const&) = delete;
170  SField(SField&&) = delete;
171  SField&
172  operator=(SField&&) = delete;
173 
174 public:
175  struct private_access_tag_t; // public, but still an implementation detail
176 
177  // These constructors can only be called from SField.cpp
178  SField(
180  SerializedTypeID tid,
181  int fv,
182  const char* fn,
183  int meta = sMD_Default,
184  IsSigning signing = IsSigning::yes);
185  explicit SField(private_access_tag_t, int fc);
186 
187  static const SField&
188  getField(int fieldCode);
189  static const SField&
191  static const SField&
192  getField(int type, int value)
193  {
194  return getField(field_code(type, value));
195  }
196 
197  static const SField&
198  getField(SerializedTypeID type, int value)
199  {
200  return getField(field_code(type, value));
201  }
202 
203  std::string const&
204  getName() const
205  {
206  return fieldName;
207  }
208 
209  bool
210  hasName() const
211  {
212  return fieldCode > 0;
213  }
214 
215  Json::StaticString const&
216  getJsonName() const
217  {
218  return jsonName;
219  }
220 
221  bool
222  isInvalid() const
223  {
224  return fieldCode == -1;
225  }
226 
227  bool
228  isUseful() const
229  {
230  return fieldCode > 0;
231  }
232 
233  bool
234  isBinary() const
235  {
236  return fieldValue < 256;
237  }
238 
239  // A discardable field is one that cannot be serialized, and
240  // should be discarded during serialization,like 'hash'.
241  // You cannot serialize an object's hash inside that object,
242  // but you can have it in the JSON representation.
243  bool
245  {
246  return fieldValue > 256;
247  }
248 
249  int
250  getCode() const
251  {
252  return fieldCode;
253  }
254  int
255  getNum() const
256  {
257  return fieldNum;
258  }
259  static int
261  {
262  return num;
263  }
264 
265  bool
266  shouldMeta(int c) const
267  {
268  return (fieldMeta & c) != 0;
269  }
270 
271  bool
272  shouldInclude(bool withSigningField) const
273  {
274  return (fieldValue < 256) &&
275  (withSigningField || (signingField == IsSigning::yes));
276  }
277 
278  bool
279  operator==(const SField& f) const
280  {
281  return fieldCode == f.fieldCode;
282  }
283 
284  bool
285  operator!=(const SField& f) const
286  {
287  return fieldCode != f.fieldCode;
288  }
289 
290  static int
291  compare(const SField& f1, const SField& f2);
292 
293  static std::map<int, SField const*> const&
295  {
296  return knownCodeToField;
297  }
298 
299 private:
300  static int num;
302 };
303 
305 template <class T>
307 {
308  using type = T;
309 
310  template <class... Args>
311  explicit TypedField(private_access_tag_t pat, Args&&... args);
312 };
313 
315 template <class T>
317 {
318  TypedField<T> const* f;
319 
320  explicit OptionaledField(TypedField<T> const& f_) : f(&f_)
321  {
322  }
323 };
324 
325 template <class T>
326 inline OptionaledField<T>
328 {
329  return OptionaledField<T>(f);
330 }
331 
332 //------------------------------------------------------------------------------
333 
334 //------------------------------------------------------------------------------
335 
347 
355 
356 //------------------------------------------------------------------------------
357 
358 extern SField const sfInvalid;
359 extern SField const sfGeneric;
360 extern SField const sfLedgerEntry;
361 extern SField const sfTransaction;
362 extern SField const sfValidation;
363 extern SField const sfMetadata;
364 
365 // 8-bit integers (common)
366 extern SF_UINT8 const sfCloseResolution;
367 extern SF_UINT8 const sfMethod;
368 extern SF_UINT8 const sfTransactionResult;
369 extern SF_UINT8 const sfWasLockingChainSend;
370 extern SF_UINT8 const sfScale;
371 
372 // 8-bit integers (uncommon)
373 extern SF_UINT8 const sfTickSize;
374 extern SF_UINT8 const sfUNLModifyDisabling;
375 extern SF_UINT8 const sfHookResult;
376 
377 // 16-bit integers (common)
378 extern SF_UINT16 const sfLedgerEntryType;
379 extern SF_UINT16 const sfTransactionType;
380 extern SF_UINT16 const sfSignerWeight;
381 extern SF_UINT16 const sfTransferFee;
382 extern SF_UINT16 const sfTradingFee;
383 
384 // 16-bit integers (uncommon)
385 extern SF_UINT16 const sfVersion;
386 extern SF_UINT16 const sfHookStateChangeCount;
387 extern SF_UINT16 const sfHookEmitCount;
388 extern SF_UINT16 const sfHookExecutionIndex;
389 extern SF_UINT16 const sfHookApiVersion;
390 extern SF_UINT16 const sfDiscountedFee;
391 
392 // 32-bit integers (common)
393 extern SF_UINT32 const sfNetworkID;
394 extern SF_UINT32 const sfFlags;
395 extern SF_UINT32 const sfSourceTag;
396 extern SF_UINT32 const sfSequence;
397 extern SF_UINT32 const sfPreviousTxnLgrSeq;
398 extern SF_UINT32 const sfLedgerSequence;
399 extern SF_UINT32 const sfCloseTime;
400 extern SF_UINT32 const sfParentCloseTime;
401 extern SF_UINT32 const sfSigningTime;
402 extern SF_UINT32 const sfExpiration;
403 extern SF_UINT32 const sfTransferRate;
404 extern SF_UINT32 const sfWalletSize;
405 extern SF_UINT32 const sfOwnerCount;
406 extern SF_UINT32 const sfDestinationTag;
407 extern SF_UINT32 const sfLastUpdateTime;
408 
409 // 32-bit integers (uncommon)
410 extern SF_UINT32 const sfHighQualityIn;
411 extern SF_UINT32 const sfHighQualityOut;
412 extern SF_UINT32 const sfLowQualityIn;
413 extern SF_UINT32 const sfLowQualityOut;
414 extern SF_UINT32 const sfQualityIn;
415 extern SF_UINT32 const sfQualityOut;
416 extern SF_UINT32 const sfStampEscrow;
417 extern SF_UINT32 const sfBondAmount;
418 extern SF_UINT32 const sfLoadFee;
419 extern SF_UINT32 const sfOfferSequence;
420 extern SF_UINT32 const sfFirstLedgerSequence;
421 extern SF_UINT32 const sfLastLedgerSequence;
422 extern SF_UINT32 const sfTransactionIndex;
423 extern SF_UINT32 const sfOperationLimit;
424 extern SF_UINT32 const sfReferenceFeeUnits;
425 extern SF_UINT32 const sfReserveBase;
426 extern SF_UINT32 const sfReserveIncrement;
427 extern SF_UINT32 const sfSetFlag;
428 extern SF_UINT32 const sfClearFlag;
429 extern SF_UINT32 const sfSignerQuorum;
430 extern SF_UINT32 const sfCancelAfter;
431 extern SF_UINT32 const sfFinishAfter;
432 extern SF_UINT32 const sfSignerListID;
433 extern SF_UINT32 const sfSettleDelay;
434 extern SF_UINT32 const sfTicketCount;
435 extern SF_UINT32 const sfTicketSequence;
436 extern SF_UINT32 const sfNFTokenTaxon;
437 extern SF_UINT32 const sfMintedNFTokens;
438 extern SF_UINT32 const sfBurnedNFTokens;
439 extern SF_UINT32 const sfHookStateCount;
440 extern SF_UINT32 const sfEmitGeneration;
441 extern SF_UINT32 const sfVoteWeight;
442 extern SF_UINT32 const sfFirstNFTokenSequence;
443 extern SF_UINT32 const sfOracleDocumentID;
444 
445 // 64-bit integers (common)
446 extern SF_UINT64 const sfIndexNext;
447 extern SF_UINT64 const sfIndexPrevious;
448 extern SF_UINT64 const sfBookNode;
449 extern SF_UINT64 const sfOwnerNode;
450 extern SF_UINT64 const sfBaseFee;
451 extern SF_UINT64 const sfExchangeRate;
452 extern SF_UINT64 const sfLowNode;
453 extern SF_UINT64 const sfHighNode;
454 extern SF_UINT64 const sfDestinationNode;
455 extern SF_UINT64 const sfCookie;
456 extern SF_UINT64 const sfServerVersion;
457 extern SF_UINT64 const sfNFTokenOfferNode;
458 extern SF_UINT64 const sfEmitBurden;
459 
460 // 64-bit integers (uncommon)
461 extern SF_UINT64 const sfHookOn;
462 extern SF_UINT64 const sfHookInstructionCount;
463 extern SF_UINT64 const sfHookReturnCode;
464 extern SF_UINT64 const sfReferenceCount;
465 extern SF_UINT64 const sfXChainClaimID;
468 extern SF_UINT64 const sfAssetPrice;
469 
470 // 128-bit
471 extern SF_UINT128 const sfEmailHash;
472 
473 // 160-bit (common)
474 extern SF_UINT160 const sfTakerPaysCurrency;
475 extern SF_UINT160 const sfTakerPaysIssuer;
476 extern SF_UINT160 const sfTakerGetsCurrency;
477 extern SF_UINT160 const sfTakerGetsIssuer;
478 
479 // 256-bit (common)
480 extern SF_UINT256 const sfLedgerHash;
481 extern SF_UINT256 const sfParentHash;
482 extern SF_UINT256 const sfTransactionHash;
483 extern SF_UINT256 const sfAccountHash;
484 extern SF_UINT256 const sfPreviousTxnID;
485 extern SF_UINT256 const sfLedgerIndex;
486 extern SF_UINT256 const sfWalletLocator;
487 extern SF_UINT256 const sfRootIndex;
488 extern SF_UINT256 const sfAccountTxnID;
489 extern SF_UINT256 const sfNFTokenID;
490 extern SF_UINT256 const sfEmitParentTxnID;
491 extern SF_UINT256 const sfEmitNonce;
492 extern SF_UINT256 const sfEmitHookHash;
493 extern SF_UINT256 const sfAMMID;
494 
495 // 256-bit (uncommon)
496 extern SF_UINT256 const sfBookDirectory;
497 extern SF_UINT256 const sfInvoiceID;
498 extern SF_UINT256 const sfNickname;
499 extern SF_UINT256 const sfAmendment;
500 extern SF_UINT256 const sfDigest;
501 extern SF_UINT256 const sfChannel;
502 extern SF_UINT256 const sfConsensusHash;
503 extern SF_UINT256 const sfCheckID;
504 extern SF_UINT256 const sfValidatedHash;
505 extern SF_UINT256 const sfPreviousPageMin;
506 extern SF_UINT256 const sfNextPageMin;
507 extern SF_UINT256 const sfNFTokenBuyOffer;
508 extern SF_UINT256 const sfNFTokenSellOffer;
509 extern SF_UINT256 const sfHookStateKey;
510 extern SF_UINT256 const sfHookHash;
511 extern SF_UINT256 const sfHookNamespace;
512 extern SF_UINT256 const sfHookSetTxnID;
513 
514 // currency amount (common)
515 extern SF_AMOUNT const sfAmount;
516 extern SF_AMOUNT const sfBalance;
517 extern SF_AMOUNT const sfLimitAmount;
518 extern SF_AMOUNT const sfTakerPays;
519 extern SF_AMOUNT const sfTakerGets;
520 extern SF_AMOUNT const sfLowLimit;
521 extern SF_AMOUNT const sfHighLimit;
522 extern SF_AMOUNT const sfFee;
523 extern SF_AMOUNT const sfSendMax;
524 extern SF_AMOUNT const sfDeliverMin;
525 extern SF_AMOUNT const sfAmount2;
526 extern SF_AMOUNT const sfEPrice;
527 extern SF_AMOUNT const sfBidMin;
528 extern SF_AMOUNT const sfBidMax;
529 extern SF_AMOUNT const sfPrice;
530 extern SF_AMOUNT const sfLPTokenBalance;
531 
532 // currency amount (uncommon)
533 extern SF_AMOUNT const sfMinimumOffer;
534 extern SF_AMOUNT const sfRippleEscrow;
535 extern SF_AMOUNT const sfDeliveredAmount;
536 extern SF_AMOUNT const sfNFTokenBrokerFee;
537 extern SF_AMOUNT const sfLPTokenOut;
538 extern SF_AMOUNT const sfLPTokenIn;
539 
540 // currency amount (fees)
541 extern SF_AMOUNT const sfBaseFeeDrops;
542 extern SF_AMOUNT const sfReserveBaseDrops;
544 extern SF_AMOUNT const sfSignatureReward;
546 
547 // variable length (common)
548 extern SF_VL const sfPublicKey;
549 extern SF_VL const sfMessageKey;
550 extern SF_VL const sfSigningPubKey;
551 extern SF_VL const sfTxnSignature;
552 extern SF_VL const sfURI;
553 extern SF_VL const sfSignature;
554 extern SF_VL const sfDomain;
555 extern SF_VL const sfFundCode;
556 extern SF_VL const sfRemoveCode;
557 extern SF_VL const sfExpireCode;
558 extern SF_VL const sfCreateCode;
559 extern SF_VL const sfMemoType;
560 extern SF_VL const sfMemoData;
561 extern SF_VL const sfMemoFormat;
562 extern SF_VL const sfDIDDocument;
563 extern SF_VL const sfData;
564 extern SF_VL const sfAssetClass;
565 extern SF_VL const sfProvider;
566 
567 // variable length (uncommon)
568 extern SF_VL const sfFulfillment;
569 extern SF_VL const sfCondition;
570 extern SF_VL const sfMasterSignature;
571 extern SF_VL const sfUNLModifyValidator;
572 extern SF_VL const sfValidatorToDisable;
573 extern SF_VL const sfValidatorToReEnable;
574 extern SF_VL const sfHookStateData;
575 extern SF_VL const sfHookReturnString;
576 extern SF_VL const sfHookParameterName;
577 extern SF_VL const sfHookParameterValue;
578 
579 // account
580 extern SF_ACCOUNT const sfAccount;
581 extern SF_ACCOUNT const sfOwner;
582 extern SF_ACCOUNT const sfDestination;
583 extern SF_ACCOUNT const sfIssuer;
584 extern SF_ACCOUNT const sfAuthorize;
585 extern SF_ACCOUNT const sfUnauthorize;
586 extern SF_ACCOUNT const sfRegularKey;
587 extern SF_ACCOUNT const sfNFTokenMinter;
588 extern SF_ACCOUNT const sfEmitCallback;
589 
590 // account (uncommon)
591 extern SF_ACCOUNT const sfHookAccount;
592 extern SF_ACCOUNT const sfOtherChainSource;
596 extern SF_ACCOUNT const sfLockingChainDoor;
597 extern SF_ACCOUNT const sfIssuingChainDoor;
598 
599 // path set
600 extern SField const sfPaths;
601 
602 // currency
603 extern SF_CURRENCY const sfBaseAsset;
604 extern SF_CURRENCY const sfQuoteAsset;
605 
606 // issue
607 extern SF_ISSUE const sfAsset;
608 extern SF_ISSUE const sfAsset2;
609 extern SF_ISSUE const sfLockingChainIssue;
610 extern SF_ISSUE const sfIssuingChainIssue;
611 
612 // bridge
613 extern SF_XCHAIN_BRIDGE const sfXChainBridge;
614 
615 // vector of 256-bit
616 extern SF_VECTOR256 const sfIndexes;
617 extern SF_VECTOR256 const sfHashes;
618 extern SF_VECTOR256 const sfAmendments;
619 extern SF_VECTOR256 const sfNFTokenOffers;
620 
621 // inner object
622 // OBJECT/1 is reserved for end of object
623 extern SField const sfTransactionMetaData;
624 extern SField const sfCreatedNode;
625 extern SField const sfDeletedNode;
626 extern SField const sfModifiedNode;
627 extern SField const sfPreviousFields;
628 extern SField const sfFinalFields;
629 extern SField const sfNewFields;
630 extern SField const sfTemplateEntry;
631 extern SField const sfMemo;
632 extern SField const sfSignerEntry;
633 extern SField const sfNFToken;
634 extern SField const sfEmitDetails;
635 extern SField const sfHook;
636 extern SField const sfVoteEntry;
637 extern SField const sfAuctionSlot;
638 extern SField const sfAuthAccount;
639 extern SField const sfPriceData;
640 
641 extern SField const sfSigner;
642 extern SField const sfMajority;
643 extern SField const sfDisabledValidator;
644 extern SField const sfEmittedTxn;
645 extern SField const sfHookExecution;
646 extern SField const sfHookDefinition;
647 extern SField const sfHookParameter;
648 extern SField const sfHookGrant;
649 extern SField const sfXChainClaimProofSig;
653 
654 // array of objects (common)
655 // ARRAY/1 is reserved for end of array
656 // extern SField const sfSigningAccounts; // Never been used.
657 extern SField const sfSigners;
658 extern SField const sfSignerEntries;
659 extern SField const sfTemplate;
660 extern SField const sfNecessary;
661 extern SField const sfSufficient;
662 extern SField const sfAffectedNodes;
663 extern SField const sfMemos;
664 extern SField const sfNFTokens;
665 extern SField const sfHooks;
666 extern SField const sfVoteSlots;
667 extern SField const sfAuthAccounts;
668 extern SField const sfPriceDataSeries;
669 
670 // array of objects (uncommon)
671 extern SField const sfMajorities;
672 extern SField const sfDisabledValidators;
673 extern SField const sfHookExecutions;
674 extern SField const sfHookParameters;
675 extern SField const sfHookGrants;
676 extern SField const sfXChainClaimAttestations;
678 
679 //------------------------------------------------------------------------------
680 
681 } // namespace ripple
682 
683 #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::sfScale
const SF_UINT8 sfScale
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::sfLastUpdateTime
const SF_UINT32 sfLastUpdateTime
ripple::sfReserveBase
const SF_UINT32 sfReserveBase
ripple::sfCreateCode
const SF_VL sfCreateCode
ripple::sfDiscountedFee
const SF_UINT16 sfDiscountedFee
ripple::sfEmitParentTxnID
const SF_UINT256 sfEmitParentTxnID
ripple::SField::IsSigning
IsSigning
Definition: SField.h:155
ripple::sfMetadata
const SField sfMetadata
ripple::sfAsset
const SF_ISSUE sfAsset
ripple::sfSendMax
const SF_AMOUNT sfSendMax
std::string
STL class.
ripple::sfSigners
const SField sfSigners
ripple::sfHookExecutionIndex
const SF_UINT16 sfHookExecutionIndex
ripple::SField::getField
static const SField & getField(SerializedTypeID type, int value)
Definition: SField.h:198
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:306
ripple::sfHookReturnCode
const SF_UINT64 sfHookReturnCode
ripple::sfMinimumOffer
const SF_AMOUNT sfMinimumOffer
ripple::sfGeneric
const SField sfGeneric(access, 0)
Definition: SField.h:359
ripple::SField::fieldValue
const int fieldValue
Definition: SField.h:160
ripple::sfLedgerSequence
const SF_UINT32 sfLedgerSequence
ripple::sfNFTokenOffers
const SF_VECTOR256 sfNFTokenOffers
ripple::sTypeMap
static const std::map< std::string, int > sTypeMap
Definition: SField.h:108
ripple::sfDestination
const SF_ACCOUNT sfDestination
ripple::sfAmount2
const SF_AMOUNT sfAmount2
ripple::sfTransactionMetaData
const SField sfTransactionMetaData
ripple::SField::isBinary
bool isBinary() const
Definition: SField.h:234
ripple::sfAmount
const SF_AMOUNT sfAmount
ripple::sfBaseAsset
const SF_CURRENCY sfBaseAsset
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::sfLockingChainDoor
const SF_ACCOUNT sfLockingChainDoor
ripple::SField::sMD_Always
@ sMD_Always
Definition: SField.h:150
ripple::SField::sMD_DeleteFinal
@ sMD_DeleteFinal
Definition: SField.h:148
ripple::SField::isInvalid
bool isInvalid() const
Definition: SField.h:222
ripple::sfVoteSlots
const SField sfVoteSlots
ripple::sfQualityOut
const SF_UINT32 sfQualityOut
ripple::sfOwner
const SF_ACCOUNT sfOwner
ripple::sfHookStateChangeCount
const SF_UINT16 sfHookStateChangeCount
ripple::sfProvider
const SF_VL sfProvider
ripple::sfSequence
const SF_UINT32 sfSequence
ripple::sfRegularKey
const SF_ACCOUNT sfRegularKey
ripple::sfVoteEntry
const SField sfVoteEntry
ripple::sfLPTokenBalance
const SF_AMOUNT sfLPTokenBalance
ripple::SField::private_access_tag_t
Definition: SField.cpp:34
ripple::sfBookDirectory
const SF_UINT256 sfBookDirectory
ripple::field_code
int field_code(SerializedTypeID id, int index)
Definition: SField.h:119
ripple::SField::fieldName
const std::string fieldName
Definition: SField.h:161
ripple::sfTakerPaysCurrency
const SF_UINT160 sfTakerPaysCurrency
ripple::sfSigningPubKey
const SF_VL sfSigningPubKey
ripple::sfEPrice
const SF_AMOUNT sfEPrice
ripple::SField::hasName
bool hasName() const
Definition: SField.h:210
ripple::SerializedTypeID
SerializedTypeID
Definition: SField.h:106
ripple::sfLedgerIndex
const SF_UINT256 sfLedgerIndex
ripple::SField::isUseful
bool isUseful() const
Definition: SField.h:228
ripple::sfMintedNFTokens
const SF_UINT32 sfMintedNFTokens
ripple::SField::getKnownCodeToField
static std::map< int, SField const * > const & getKnownCodeToField()
Definition: SField.h:294
ripple::sfXChainCreateAccountAttestationCollectionElement
const SField sfXChainCreateAccountAttestationCollectionElement
ripple::SField::signingField
const IsSigning signingField
Definition: SField.h:164
ripple::sfHookResult
const SF_UINT8 sfHookResult
ripple::TypedField::TypedField
TypedField(private_access_tag_t pat, Args &&... args)
Definition: SField.cpp:43
ripple::SField::getField
static const SField & getField(int type, int value)
Definition: SField.h:192
ripple::sfHookOn
const SF_UINT64 sfHookOn
ripple::sfOtherChainSource
const SF_ACCOUNT sfOtherChainSource
ripple::sfQualityIn
const SF_UINT32 sfQualityIn
ripple::sfHookReturnString
const SF_VL sfHookReturnString
ripple::SField::operator!=
bool operator!=(const SField &f) const
Definition: SField.h:285
ripple::SField::getNum
int getNum() const
Definition: SField.h:255
ripple::sfSetFlag
const SF_UINT32 sfSetFlag
ripple::sfHookParameters
const SField sfHookParameters
ripple::sfFinalFields
const SField sfFinalFields
ripple::OptionaledField
Indicate std::optional field semantics.
Definition: SField.h:316
ripple::sfCloseTime
const SF_UINT32 sfCloseTime
ripple::sfTicketSequence
const SF_UINT32 sfTicketSequence
ripple::sfParentCloseTime
const SF_UINT32 sfParentCloseTime
ripple::sfWasLockingChainSend
const SF_UINT8 sfWasLockingChainSend
ripple::SField::getField
static const SField & getField(int fieldCode)
Definition: SField.cpp:464
ripple::SField::knownCodeToField
static std::map< int, SField const * > knownCodeToField
Definition: SField.h:301
ripple::sfHookStateCount
const SF_UINT32 sfHookStateCount
ripple::SField::sMD_ChangeOrig
@ sMD_ChangeOrig
Definition: SField.h:146
ripple::sfLPTokenOut
const SF_AMOUNT sfLPTokenOut
ripple::SField::getJsonName
Json::StaticString const & getJsonName() const
Definition: SField.h:216
ripple::sfXChainAccountClaimCount
const SF_UINT64 sfXChainAccountClaimCount
ripple::SField::operator==
bool operator==(const SField &f) const
Definition: SField.h:279
ripple::sfPrice
const SF_AMOUNT sfPrice
ripple::sfTakerGetsCurrency
const SF_UINT160 sfTakerGetsCurrency
ripple::STBitString
Definition: SField.h:49
ripple::SField::operator=
SField & operator=(SField const &)=delete
ripple::SField::jsonName
const Json::StaticString jsonName
Definition: SField.h:165
ripple::sfVoteWeight
const SF_UINT32 sfVoteWeight
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:358
ripple::SField::sMD_Create
@ sMD_Create
Definition: SField.h:149
ripple::sfNFTokenOfferNode
const SF_UINT64 sfNFTokenOfferNode
ripple::sfTradingFee
const SF_UINT16 sfTradingFee
ripple::sfXChainClaimID
const SF_UINT64 sfXChainClaimID
ripple::sfTransferFee
const SF_UINT16 sfTransferFee
ripple::XMACRO
@ XMACRO
Definition: SField.h:106
ripple::sfHookStateData
const SF_VL sfHookStateData
ripple::sfLedgerEntry
const SField sfLedgerEntry
ripple::SField::sMD_Default
@ sMD_Default
Definition: SField.h:151
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:159
ripple::sfVersion
const SF_UINT16 sfVersion
ripple::sfExpireCode
const SF_VL sfExpireCode
ripple::sfTakerGetsIssuer
const SF_UINT160 sfTakerGetsIssuer
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:320
ripple::sfDeliveredAmount
const SF_AMOUNT sfDeliveredAmount
ripple::sfAsset2
const SF_ISSUE sfAsset2
ripple::sfParentHash
const SF_UINT256 sfParentHash
ripple::sfSettleDelay
const SF_UINT32 sfSettleDelay
ripple::sfUnauthorize
const SF_ACCOUNT sfUnauthorize
ripple::sfSignatureReward
const SF_AMOUNT sfSignatureReward
ripple::sfMemos
const SField sfMemos
ripple::sfBidMax
const SF_AMOUNT sfBidMax
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::sfLockingChainIssue
const SF_ISSUE sfLockingChainIssue
ripple::sfXChainClaimAttestations
const SField sfXChainClaimAttestations
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::sfAuthAccounts
const SField sfAuthAccounts
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:156
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::sfValidatorToDisable
const SF_VL sfValidatorToDisable
ripple::sfTicketCount
const SF_UINT32 sfTicketCount
ripple::sfRippleEscrow
const SF_AMOUNT sfRippleEscrow
ripple::sfAccountTxnID
const SF_UINT256 sfAccountTxnID
ripple::sfModifiedNode
const SField sfModifiedNode
ripple::sfXChainClaimProofSig
const SField sfXChainClaimProofSig
ripple::sfDestinationNode
const SF_UINT64 sfDestinationNode
ripple::sfXChainCreateAccountProofSig
const SField sfXChainCreateAccountProofSig
ripple::sfOracleDocumentID
const SF_UINT32 sfOracleDocumentID
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::sfAttestationSignerAccount
const SF_ACCOUNT sfAttestationSignerAccount
ripple::sfPreviousTxnID
const SF_UINT256 sfPreviousTxnID
ripple::SField::fieldCode
const int fieldCode
Definition: SField.h:158
ripple::sfAuthorize
const SF_ACCOUNT sfAuthorize
ripple::sfHighLimit
const SF_AMOUNT sfHighLimit
ripple::sfExchangeRate
const SF_UINT64 sfExchangeRate
ripple::sfEmitGeneration
const SF_UINT32 sfEmitGeneration
ripple::sfStampEscrow
const SF_UINT32 sfStampEscrow
map
ripple::SField::getNumFields
static int getNumFields()
Definition: SField.h:260
ripple::sfHookExecutions
const SField sfHookExecutions
ripple::STCurrency
Definition: STCurrency.h:31
ripple::sfAMMID
const SF_UINT256 sfAMMID
ripple::sfAssetClass
const SF_VL sfAssetClass
ripple::sfSigner
const SField sfSigner
ripple::sfReserveIncrementDrops
const SF_AMOUNT sfReserveIncrementDrops
ripple::sfClearFlag
const SF_UINT32 sfClearFlag
ripple::sfSignerEntry
const SField sfSignerEntry
ripple::sfBidMin
const SF_AMOUNT sfBidMin
ripple::sfReserveBaseDrops
const SF_AMOUNT sfReserveBaseDrops
ripple::STInteger
Definition: SField.h:51
ripple::sfNFToken
const SField sfNFToken
ripple::sfUNLModifyDisabling
const SF_UINT8 sfUNLModifyDisabling
ripple::STXChainBridge
Definition: STXChainBridge.h:33
ripple::SField::IsSigning::yes
@ yes
ripple::SField::shouldInclude
bool shouldInclude(bool withSigningField) const
Definition: SField.h:272
ripple::TypedField::type
T type
Definition: SField.h:308
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::sfTxnSignature
const SF_VL sfTxnSignature
ripple::sfURI
const SF_VL sfURI
ripple::sfMinAccountCreateAmount
const SF_AMOUNT sfMinAccountCreateAmount
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::sfDIDDocument
const SF_VL sfDIDDocument
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:141
ripple::sfAuthAccount
const SField sfAuthAccount
ripple::sfCondition
const SF_VL sfCondition
ripple::SField::num
static int num
Definition: SField.h:300
ripple::sfTakerPaysIssuer
const SF_UINT160 sfTakerPaysIssuer
ripple::sfIssuer
const SF_ACCOUNT sfIssuer
ripple::SField::getName
std::string const & getName() const
Definition: SField.h:204
ripple::sfXChainClaimAttestationCollectionElement
const SField sfXChainClaimAttestationCollectionElement
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
ripple::SField::isDiscardable
bool isDiscardable() const
Definition: SField.h:244
ripple::sfConsensusHash
const SF_UINT256 sfConsensusHash
ripple::sfDisabledValidator
const SField sfDisabledValidator
ripple::sfDestinationTag
const SF_UINT32 sfDestinationTag
ripple::sfOtherChainDestination
const SF_ACCOUNT sfOtherChainDestination
ripple::sfCreatedNode
const SField sfCreatedNode
ripple::sfHookParameterName
const SF_VL sfHookParameterName
ripple::sfXChainAccountCreateCount
const SF_UINT64 sfXChainAccountCreateCount
ripple::sfSignature
const SF_VL sfSignature
ripple::sfData
const SF_VL sfData
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:476
ripple::sfReferenceFeeUnits
const SF_UINT32 sfReferenceFeeUnits
ripple::STVector256
Definition: STVector256.h:30
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::sfXChainCreateAccountAttestations
const SField sfXChainCreateAccountAttestations
ripple::sfEmitCallback
const SF_ACCOUNT sfEmitCallback
ripple::SField::getCode
int getCode() const
Definition: SField.h:250
ripple::sfValidation
const SField sfValidation
ripple::sfPreviousPageMin
const SF_UINT256 sfPreviousPageMin
ripple::SField::fieldMeta
const int fieldMeta
Definition: SField.h:162
ripple::sfFinishAfter
const SF_UINT32 sfFinishAfter
ripple::sfChannel
const SF_UINT256 sfChannel
ripple::OptionaledField::f
TypedField< T > const * f
Definition: SField.h:318
ripple::sfNFTokenTaxon
const SF_UINT32 sfNFTokenTaxon
ripple::sfFee
const SF_AMOUNT sfFee
ripple::sfMemo
const SField sfMemo
ripple::sfAccount
const SF_ACCOUNT sfAccount
ripple::sfIssuingChainDoor
const SF_ACCOUNT sfIssuingChainDoor
ripple::sfEmittedTxn
const SField sfEmittedTxn
ripple::sfEmitBurden
const SF_UINT64 sfEmitBurden
ripple::sfAttestationRewardAccount
const SF_ACCOUNT sfAttestationRewardAccount
ripple::sfLPTokenIn
const SF_AMOUNT sfLPTokenIn
ripple::sfNetworkID
const SF_UINT32 sfNetworkID
ripple::sfSufficient
const SField sfSufficient
ripple::sfHookNamespace
const SF_UINT256 sfHookNamespace
ripple::sfDomain
const SF_VL sfDomain
ripple::sfLastLedgerSequence
const SF_UINT32 sfLastLedgerSequence
ripple::sfIssuingChainIssue
const SF_ISSUE sfIssuingChainIssue
ripple::SField::shouldMeta
bool shouldMeta(int c) const
Definition: SField.h:266
ripple::sfBurnedNFTokens
const SF_UINT32 sfBurnedNFTokens
ripple::SField::sMD_ChangeNew
@ sMD_ChangeNew
Definition: SField.h:147
ripple::sfAmendment
const SF_UINT256 sfAmendment
ripple::sfQuoteAsset
const SF_CURRENCY sfQuoteAsset
ripple::sfMajorities
const SField sfMajorities
ripple::sfAuctionSlot
const SField sfAuctionSlot
ripple::sfXChainBridge
const SF_XCHAIN_BRIDGE sfXChainBridge
ripple::SField::sMD_Never
@ sMD_Never
Definition: SField.h:145
ripple::sfSigningTime
const SF_UINT32 sfSigningTime
ripple::sfPriceDataSeries
const SField sfPriceDataSeries
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:163
ripple::sfNFTokenBrokerFee
const SF_AMOUNT sfNFTokenBrokerFee
ripple::sfPriceData
const SField sfPriceData
ripple::sfAmendments
const SF_VECTOR256 sfAmendments
ripple::sfMethod
const SF_UINT8 sfMethod
ripple::sfMemoFormat
const SF_VL sfMemoFormat
ripple::sfAssetPrice
const SF_UINT64 sfAssetPrice
ripple::operator~
constexpr ApplyFlags operator~(ApplyFlags const &flags)
Definition: ApplyView.h:71
ripple::sfValidatorToReEnable
const SF_VL sfValidatorToReEnable
ripple::sfMemoType
const SF_VL sfMemoType