20 #ifndef RIPPLE_PROTOCOL_SFIELD_H_INCLUDED
21 #define RIPPLE_PROTOCOL_SFIELD_H_INCLUDED
23 #include <ripple/basics/safe_cast.h>
24 #include <ripple/json/json_value.h>
55 #pragma push_macro("XMACRO")
58 #define XMACRO(STYPE) \
60 STYPE(STI_UNKNOWN, -2) \
61 STYPE(STI_NOTPRESENT, 0) \
62 STYPE(STI_UINT16, 1) \
65 STYPE(STI_UINT32, 2) \
66 STYPE(STI_UINT64, 3) \
67 STYPE(STI_UINT128, 4) \
68 STYPE(STI_UINT256, 5) \
69 STYPE(STI_AMOUNT, 6) \
71 STYPE(STI_ACCOUNT, 8) \
74 STYPE(STI_OBJECT, 14) \
75 STYPE(STI_ARRAY, 15) \
78 STYPE(STI_UINT8, 16) \
79 STYPE(STI_UINT160, 17) \
80 STYPE(STI_PATHSET, 18) \
81 STYPE(STI_VECTOR256, 19) \
82 STYPE(STI_UINT96, 20) \
83 STYPE(STI_UINT192, 21) \
84 STYPE(STI_UINT384, 22) \
85 STYPE(STI_UINT512, 23) \
86 STYPE(STI_ISSUE, 24) \
87 STYPE(STI_XCHAIN_BRIDGE, 25) \
91 STYPE(STI_TRANSACTION, 10001) \
92 STYPE(STI_LEDGERENTRY, 10002) \
93 STYPE(STI_VALIDATION, 10003) \
94 STYPE(STI_METADATA, 10004)
96 #pragma push_macro("TO_ENUM")
98 #pragma push_macro("TO_MAP")
101 #define TO_ENUM(name, value) name = value,
102 #define TO_MAP(name, value) {#name, value},
111 #pragma pop_macro("XMACRO")
112 #pragma pop_macro("TO_ENUM")
113 #pragma pop_macro("TO_MAP")
119 return (safe_cast<int>(
id) << 16) | index;
126 return (
id << 16) | index;
308 template <
class... Args>
324 inline OptionaledField<T>
const SF_ACCOUNT sfHookAccount
const SF_UINT64 sfIndexNext
const SF_UINT32 sfSignerListID
const SF_UINT32 sfHighQualityIn
const SF_UINT32 sfOfferSequence
const SF_UINT32 sfPreviousTxnLgrSeq
const SF_UINT256 sfHookHash
const SF_UINT32 sfOwnerCount
const SF_UINT32 sfFirstNFTokenSequence
const SF_UINT16 sfSignerWeight
const SF_UINT16 sfHookApiVersion
const SF_VL sfHookParameterValue
const SF_VL sfUNLModifyValidator
const SF_UINT256 sfRootIndex
const SF_UINT32 sfSourceTag
const SF_AMOUNT sfBaseFeeDrops
const SF_UINT32 sfReserveBase
const SF_UINT16 sfDiscountedFee
const SF_UINT256 sfEmitParentTxnID
const SF_AMOUNT sfSendMax
const SF_UINT16 sfHookExecutionIndex
static const SField & getField(SerializedTypeID type, int value)
const SF_UINT256 sfEmitHookHash
const SF_UINT64 sfOwnerNode
A field with a type known at compile time.
const SF_UINT64 sfHookReturnCode
const SF_AMOUNT sfMinimumOffer
const SField sfGeneric(access, 0)
const SF_UINT32 sfLedgerSequence
const SF_VECTOR256 sfNFTokenOffers
static const std::map< std::string, int > sTypeMap
const SF_ACCOUNT sfDestination
const SF_AMOUNT sfAmount2
const SField sfTransactionMetaData
const SF_UINT256 sfNFTokenID
const SF_UINT32 sfWalletSize
const SF_UINT32 sfFirstLedgerSequence
const SF_UINT256 sfCheckID
const SF_ACCOUNT sfLockingChainDoor
const SF_UINT32 sfQualityOut
const SF_UINT16 sfHookStateChangeCount
const SF_UINT32 sfSequence
const SF_ACCOUNT sfRegularKey
const SF_AMOUNT sfLPTokenBalance
const SF_UINT256 sfBookDirectory
int field_code(SerializedTypeID id, int index)
const std::string fieldName
const SF_UINT160 sfTakerPaysCurrency
const SF_VL sfSigningPubKey
const SF_UINT256 sfLedgerIndex
const SF_UINT32 sfMintedNFTokens
static std::map< int, SField const * > const & getKnownCodeToField()
const SField sfXChainCreateAccountAttestationCollectionElement
const IsSigning signingField
const SF_UINT8 sfHookResult
TypedField(private_access_tag_t pat, Args &&... args)
static const SField & getField(int type, int value)
const SF_ACCOUNT sfOtherChainSource
const SF_UINT32 sfQualityIn
const SF_VL sfHookReturnString
bool operator!=(const SField &f) const
const SF_UINT32 sfSetFlag
const SField sfHookParameters
const SField sfFinalFields
Indicate std::optional field semantics.
const SF_UINT32 sfCloseTime
const SF_UINT32 sfTicketSequence
const SF_UINT32 sfParentCloseTime
const SF_UINT8 sfWasLockingChainSend
static const SField & getField(int fieldCode)
static std::map< int, SField const * > knownCodeToField
const SF_UINT32 sfHookStateCount
const SF_AMOUNT sfLPTokenOut
Json::StaticString const & getJsonName() const
const SF_UINT64 sfXChainAccountClaimCount
bool operator==(const SField &f) const
const SF_UINT160 sfTakerGetsCurrency
SField & operator=(SField const &)=delete
const Json::StaticString jsonName
const SF_UINT32 sfVoteWeight
const SField sfEmitDetails
const SField sfDeletedNode
const SF_UINT64 sfHookInstructionCount
const SF_UINT16 sfHookEmitCount
const SField sfInvalid(access, -1)
const SF_UINT64 sfNFTokenOfferNode
const SF_UINT16 sfTradingFee
const SF_UINT64 sfXChainClaimID
const SF_UINT16 sfTransferFee
const SF_VL sfHookStateData
const SField sfLedgerEntry
const SF_UINT32 sfExpiration
const SF_UINT256 sfTransactionHash
const SF_UINT32 sfSignerQuorum
const SF_VECTOR256 sfIndexes
const SerializedTypeID fieldType
const SF_UINT16 sfVersion
const SF_UINT160 sfTakerGetsIssuer
const SF_UINT64 sfLowNode
const SF_UINT256 sfEmitNonce
const SF_UINT256 sfValidatedHash
const SF_AMOUNT sfTakerPays
SField(SField const &)=delete
const SF_UINT16 sfTransactionType
const SField sfHookExecution
const SF_AMOUNT sfDeliverMin
const SF_UINT32 sfLowQualityOut
const SF_AMOUNT sfLimitAmount
const SF_AMOUNT sfLowLimit
const SField sfHookParameter
OptionaledField(TypedField< T > const &f_)
const SF_AMOUNT sfDeliveredAmount
const SF_UINT256 sfParentHash
const SF_UINT32 sfSettleDelay
const SF_ACCOUNT sfUnauthorize
const SF_AMOUNT sfSignatureReward
const SF_UINT64 sfServerVersion
const SF_UINT32 sfBondAmount
const SF_UINT32 sfLoadFee
const SF_ACCOUNT sfNFTokenMinter
const SF_ISSUE sfLockingChainIssue
const SField sfXChainClaimAttestations
const SF_UINT32 sfReserveIncrement
const SF_VL sfMasterSignature
const SF_UINT256 sfNickname
const SF_UINT64 sfIndexPrevious
const SField sfAffectedNodes
const SField sfAuthAccounts
const SF_UINT64 sfBookNode
const SF_UINT256 sfLedgerHash
static const IsSigning notSigning
const SF_UINT32 sfLowQualityIn
const SF_UINT256 sfDigest
const SF_UINT256 sfHookStateKey
const SF_VL sfValidatorToDisable
const SF_UINT32 sfTicketCount
const SF_AMOUNT sfRippleEscrow
const SF_UINT256 sfAccountTxnID
const SField sfModifiedNode
const SField sfXChainClaimProofSig
const SF_UINT64 sfDestinationNode
const SField sfXChainCreateAccountProofSig
const SF_AMOUNT sfTakerGets
const SF_UINT32 sfTransferRate
const SF_UINT8 sfTickSize
const SF_ACCOUNT sfAttestationSignerAccount
const SF_UINT256 sfPreviousTxnID
const SF_ACCOUNT sfAuthorize
const SF_AMOUNT sfHighLimit
const SF_UINT64 sfExchangeRate
const SF_UINT32 sfEmitGeneration
const SF_UINT32 sfStampEscrow
static int getNumFields()
const SField sfHookExecutions
const SF_AMOUNT sfReserveIncrementDrops
const SF_UINT32 sfClearFlag
const SField sfSignerEntry
const SF_AMOUNT sfReserveBaseDrops
const SF_UINT8 sfUNLModifyDisabling
bool shouldInclude(bool withSigningField) const
const SField sfPreviousFields
const SF_UINT64 sfReferenceCount
const SF_UINT32 sfTransactionIndex
const SF_UINT128 sfEmailHash
const SField sfSignerEntries
const SF_UINT32 sfOperationLimit
const SF_UINT64 sfBaseFee
const SF_VECTOR256 sfHashes
const SF_UINT256 sfNFTokenBuyOffer
const SF_VL sfTxnSignature
const SF_AMOUNT sfMinAccountCreateAmount
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const SField sfHookGrants
const SF_UINT8 sfCloseResolution
const SF_VL sfDIDDocument
const SF_UINT8 sfTransactionResult
const SF_UINT256 sfWalletLocator
const SF_UINT256 sfAccountHash
const SField sfTemplateEntry
const SF_UINT16 sfLedgerEntryType
const SField sfAuthAccount
const SF_UINT160 sfTakerPaysIssuer
const SF_ACCOUNT sfIssuer
std::string const & getName() const
const SField sfXChainClaimAttestationCollectionElement
const SF_UINT256 sfInvoiceID
Lightweight wrapper to tag static string.
bool isDiscardable() const
const SF_UINT256 sfConsensusHash
const SField sfDisabledValidator
const SF_UINT32 sfDestinationTag
const SF_ACCOUNT sfOtherChainDestination
const SField sfCreatedNode
const SF_VL sfHookParameterName
const SF_UINT64 sfXChainAccountCreateCount
const SF_AMOUNT sfBalance
static int compare(const SField &f1, const SField &f2)
const SF_UINT32 sfReferenceFeeUnits
const SF_UINT256 sfNextPageMin
const SF_UINT32 sfCancelAfter
const SField sfHookDefinition
const SF_UINT32 sfHighQualityOut
const SField sfXChainCreateAccountAttestations
const SF_ACCOUNT sfEmitCallback
const SField sfValidation
const SF_UINT256 sfPreviousPageMin
const SF_UINT32 sfFinishAfter
const SF_UINT256 sfChannel
TypedField< T > const * f
const SF_UINT32 sfNFTokenTaxon
const SF_ACCOUNT sfAccount
const SF_ACCOUNT sfIssuingChainDoor
const SField sfEmittedTxn
const SF_UINT64 sfEmitBurden
const SF_ACCOUNT sfAttestationRewardAccount
const SF_AMOUNT sfLPTokenIn
const SF_UINT32 sfNetworkID
const SField sfSufficient
const SF_UINT256 sfHookNamespace
const SF_UINT32 sfLastLedgerSequence
const SF_ISSUE sfIssuingChainIssue
bool shouldMeta(int c) const
const SF_UINT32 sfBurnedNFTokens
const SF_UINT256 sfAmendment
const SField sfMajorities
const SField sfAuctionSlot
const SF_XCHAIN_BRIDGE sfXChainBridge
const SF_UINT32 sfSigningTime
const SField sfDisabledValidators
const SF_VL sfFulfillment
const SF_UINT64 sfHighNode
const SF_UINT256 sfNFTokenSellOffer
const SField sfTransaction
const SF_UINT256 sfHookSetTxnID
const SF_AMOUNT sfNFTokenBrokerFee
const SF_VECTOR256 sfAmendments
constexpr ApplyFlags operator~(ApplyFlags const &flags)
const SF_VL sfValidatorToReEnable