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>
46 template <std::
size_t>
89 return (safe_cast<int>(
id) << 16) | index;
96 return (
id << 16) | index;
285 template <
class... Args>
307 inline OptionaledField<T>
const SF_U32 sfHighQualityIn(access, STI_UINT32, 16, "HighQualityIn")
TypedField(TypedField &&u)
const SF_Account sfRegularKey(access, STI_ACCOUNT, 8, "RegularKey")
const SF_U32 sfLoadFee(access, STI_UINT32, 24, "LoadFee")
const SF_U64 sfIndexNext(access, STI_UINT64, 1, "IndexNext")
const SField sfPreviousFields(access, STI_OBJECT, 6, "PreviousFields")
const SF_Account sfTarget(access, STI_ACCOUNT, 7, "Target")
const SF_U256 sfTicketID(access, STI_HASH256, 20, "TicketID")
const SF_U32 sfTransactionIndex(access, STI_UINT32, 28, "TransactionIndex")
static const SField & getField(SerializedTypeID type, int value)
A field with a type known at compile time.
const SField sfTemplateEntry(access, STI_OBJECT, 9, "TemplateEntry")
const SF_U32 sfPreviousTxnLgrSeq(access, STI_UINT32, 5, "PreviousTxnLgrSeq", SField::sMD_DeleteFinal)
const SField sfGeneric(access, 0)
const SF_U32 sfParentCloseTime(access, STI_UINT32, 8, "ParentCloseTime")
const SF_U32 sfQualityIn(access, STI_UINT32, 20, "QualityIn")
const SF_U256 sfLedgerIndex(access, STI_HASH256, 6, "LedgerIndex")
const SF_U16 sfLedgerEntryType(access, STI_UINT16, 1, "LedgerEntryType", SField::sMD_Never)
const SField sfSigners(access, STI_ARRAY, 3, "Signers", SField::sMD_Default, SField::notSigning)
const SF_Blob sfMemoType(access, STI_VL, 12, "MemoType")
const SF_U32 sfOperationLimit(access, STI_UINT32, 29, "OperationLimit")
const SF_Blob sfSigningPubKey(access, STI_VL, 3, "SigningPubKey")
const SField sfMetadata(access, STI_METADATA, 257, "Metadata")
const SF_Amount sfDeliveredAmount(access, STI_AMOUNT, 18, "DeliveredAmount")
const SF_U32 sfSignerQuorum(access, STI_UINT32, 35, "SignerQuorum")
const SF_Blob sfMessageKey(access, STI_VL, 2, "MessageKey")
const SF_U32 sfSequence(access, STI_UINT32, 4, "Sequence")
int field_code(SerializedTypeID id, int index)
const std::string fieldName
const SField sfSufficient(access, STI_ARRAY, 7, "Sufficient")
const SF_Account sfAccount(access, STI_ACCOUNT, 1, "Account")
const SF_U32 sfFlags(access, STI_UINT32, 2, "Flags")
const IsSigning signingField
const SF_U160 sfTakerPaysIssuer(access, STI_HASH160, 2, "TakerPaysIssuer")
const SField sfNewFields(access, STI_OBJECT, 8, "NewFields")
const SF_Blob sfMasterSignature(access, STI_VL, 18, "MasterSignature", SField::sMD_Default, SField::notSigning)
const SField sfMajorities(access, STI_ARRAY, 16, "Majorities")
const SF_U256 sfWalletLocator(access, STI_HASH256, 7, "WalletLocator")
static const SField & getField(int type, int value)
const SF_Amount sfTakerPays(access, STI_AMOUNT, 4, "TakerPays")
const SF_U8 sfMethod(access, STI_UINT8, 2, "Method")
const SF_Account sfIssuer(access, STI_ACCOUNT, 4, "Issuer")
bool operator!=(const SField &f) const
Indicate boost::optional field semantics.
const SF_Account sfUnauthorize(access, STI_ACCOUNT, 6, "Unauthorize")
const SF_Blob sfUNLModifyValidator(access, STI_VL, 19, "UNLModifyValidator")
const SF_U8 sfUNLModifyDisabling(access, STI_UINT8, 17, "UNLModifyDisabling")
static const SField & getField(int fieldCode)
static std::map< int, SField const * > knownCodeToField
const SF_U64 sfOwnerNode(access, STI_UINT64, 4, "OwnerNode")
const SField sfSigner(access, STI_OBJECT, 16, "Signer")
const SField sfDisabledValidators(access, STI_ARRAY, 17, "DisabledValidators")
const SF_U160 sfTakerGetsCurrency(access, STI_HASH160, 3, "TakerGetsCurrency")
const SF_U256 sfPayChannel(access, STI_HASH256, 22, "Channel")
const SF_U256 sfValidatedHash(access, STI_HASH256, 25, "ValidatedHash")
const SF_Amount sfAmount(access, STI_AMOUNT, 1, "Amount")
Json::StaticString const & getJsonName() const
const SField sfSignerEntries(access, STI_ARRAY, 4, "SignerEntries")
bool operator==(const SField &f) const
const SF_U32 sfOwnerCount(access, STI_UINT32, 13, "OwnerCount")
const SField sfFinalFields(access, STI_OBJECT, 7, "FinalFields")
SField & operator=(SField const &)=delete
const SField sfModifiedNode(access, STI_OBJECT, 5, "ModifiedNode")
const Json::StaticString jsonName
const SF_U32 sfReserveBase(access, STI_UINT32, 31, "ReserveBase")
const SF_Amount sfLimitAmount(access, STI_AMOUNT, 3, "LimitAmount")
const SF_Amount sfHighLimit(access, STI_AMOUNT, 7, "HighLimit")
const SF_Blob sfFundCode(access, STI_VL, 8, "FundCode")
const SF_U32 sfFinishAfter(access, STI_UINT32, 37, "FinishAfter")
const SField sfInvalid(access, -1)
const SF_Blob sfSignature(access, STI_VL, 6, "Signature", SField::sMD_Default, SField::notSigning)
TypedField(Args &&... args)
const SF_U256 sfAccountTxnID(access, STI_HASH256, 9, "AccountTxnID")
const SField sfLedgerEntry(access, STI_LEDGERENTRY, 257, "LedgerEntry")
const SF_Amount sfLowLimit(access, STI_AMOUNT, 6, "LowLimit")
const SField sfMajority(access, STI_OBJECT, 18, "Majority")
const SF_U32 sfDestinationTag(access, STI_UINT32, 14, "DestinationTag")
const SF_Blob sfMemoData(access, STI_VL, 13, "MemoData")
const SF_U64 sfIndexPrevious(access, STI_UINT64, 2, "IndexPrevious")
const SerializedTypeID fieldType
const SF_Blob sfFulfillment(access, STI_VL, 16, "Fulfillment")
const SF_Amount sfMinimumOffer(access, STI_AMOUNT, 16, "MinimumOffer")
SField(SField const &)=delete
const SF_U32 sfLastLedgerSequence(access, STI_UINT32, 27, "LastLedgerSequence")
OptionaledField(TypedField< T > const &f_)
const SF_Account sfOwner(access, STI_ACCOUNT, 2, "Owner")
const SF_U64 sfHighNode(access, STI_UINT64, 8, "HighNode")
const SF_U256 sfParentHash(access, STI_HASH256, 2, "ParentHash")
const SF_U256 sfBookDirectory(access, STI_HASH256, 16, "BookDirectory")
const SF_Blob sfRemoveCode(access, STI_VL, 9, "RemoveCode")
const SF_Amount sfSendMax(access, STI_AMOUNT, 9, "SendMax")
const SF_U256 sfAmendment(access, STI_HASH256, 19, "Amendment")
const SF_U32 sfSignerListID(access, STI_UINT32, 38, "SignerListID")
const SF_U32 sfSigningTime(access, STI_UINT32, 9, "SigningTime")
const SF_U64 sfDestinationNode(access, STI_UINT64, 9, "DestinationNode")
static const IsSigning notSigning
const SField sfTransaction(access, STI_TRANSACTION, 257, "Transaction")
const SF_Blob sfTxnSignature(access, STI_VL, 4, "TxnSignature", SField::sMD_Default, SField::notSigning)
const SF_U16 sfTransactionType(access, STI_UINT16, 2, "TransactionType")
const SF_U32 sfLedgerSequence(access, STI_UINT32, 6, "LedgerSequence")
const SF_U32 sfReferenceFeeUnits(access, STI_UINT32, 30, "ReferenceFeeUnits")
const SField sfTransactionMetaData(access, STI_OBJECT, 2, "TransactionMetaData")
const SF_U64 sfExchangeRate(access, STI_UINT64, 6, "ExchangeRate")
const SF_Blob sfCreateCode(access, STI_VL, 11, "CreateCode")
const SField sfSignerEntry(access, STI_OBJECT, 11, "SignerEntry")
const SF_U32 sfLowQualityOut(access, STI_UINT32, 19, "LowQualityOut")
const SField sfValidation(access, STI_VALIDATION, 257, "Validation")
const SField sfCreatedNode(access, STI_OBJECT, 3, "CreatedNode")
const SF_U32 sfSourceTag(access, STI_UINT32, 3, "SourceTag")
static int getNumFields()
const SF_Vec256 sfIndexes(access, STI_VECTOR256, 1, "Indexes", SField::sMD_Never)
const SF_U32 sfExpiration(access, STI_UINT32, 10, "Expiration")
const SF_U32 sfFirstLedgerSequence(access, STI_UINT32, 26, "FirstLedgerSequence")
const SF_Amount sfFee(access, STI_AMOUNT, 8, "Fee")
const SF_U32 sfQualityOut(access, STI_UINT32, 21, "QualityOut")
const SF_U16 sfVersion(access, STI_UINT16, 16, "Version")
bool shouldInclude(bool withSigningField) const
const SF_Blob sfValidatorToReEnable(access, STI_VL, 21, "ValidatorToReEnable")
const SField sfMemo(access, STI_OBJECT, 10, "Memo")
const SF_Vec256 sfHashes(access, STI_VECTOR256, 2, "Hashes")
const SF_Blob sfPublicKey(access, STI_VL, 1, "PublicKey")
const SF_U16 sfSignerWeight(access, STI_UINT16, 3, "SignerWeight")
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const SF_U32 sfWalletSize(access, STI_UINT32, 12, "WalletSize")
const SField sfNecessary(access, STI_ARRAY, 6, "Necessary")
const SF_U32 sfLowQualityIn(access, STI_UINT32, 18, "LowQualityIn")
const SF_Amount sfBalance(access, STI_AMOUNT, 2, "Balance")
const SF_U160 sfTakerPaysCurrency(access, STI_HASH160, 1, "TakerPaysCurrency")
const SF_Amount sfDeliverMin(access, STI_AMOUNT, 10, "DeliverMin")
const SF_U32 sfOfferSequence(access, STI_UINT32, 25, "OfferSequence")
const SF_U256 sfTransactionHash(access, STI_HASH256, 3, "TransactionHash")
const SField sfAffectedNodes(access, STI_ARRAY, 8, "AffectedNodes")
std::string const & getName() const
const SF_U32 sfReserveIncrement(access, STI_UINT32, 32, "ReserveIncrement")
Lightweight wrapper to tag static string.
bool isDiscardable() const
const SF_Amount sfRippleEscrow(access, STI_AMOUNT, 17, "RippleEscrow")
const SF_U32 sfClearFlag(access, STI_UINT32, 34, "ClearFlag")
const SF_Blob sfCondition(access, STI_VL, 17, "Condition")
const SField sfPaths(access, STI_PATHSET, 1, "Paths")
const SF_U8 sfTransactionResult(access, STI_UINT8, 3, "TransactionResult")
const SF_U32 sfCloseTime(access, STI_UINT32, 7, "CloseTime")
const SField sfMemos(access, STI_ARRAY, 9, "Memos")
static int compare(const SField &f1, const SField &f2)
const SF_U32 sfSettleDelay(access, STI_UINT32, 39, "SettleDelay")
const SF_Amount sfTakerGets(access, STI_AMOUNT, 5, "TakerGets")
const SF_U256 sfDigest(access, STI_HASH256, 21, "Digest")
const SF_U256 sfAccountHash(access, STI_HASH256, 4, "AccountHash")
const SF_Account sfDestination(access, STI_ACCOUNT, 3, "Destination")
const SF_U256 sfCheckID(access, STI_HASH256, 24, "CheckID")
const SF_U256 sfRootIndex(access, STI_HASH256, 8, "RootIndex", SField::sMD_Always)
const SF_U64 sfCookie(access, STI_UINT64, 10, "Cookie")
const SF_U32 sfTransferRate(access, STI_UINT32, 11, "TransferRate")
const SF_Blob sfValidatorToDisable(access, STI_VL, 20, "ValidatorToDisable")
TypedField< T > const * f
const SF_U64 sfLowNode(access, STI_UINT64, 7, "LowNode")
const SF_U32 sfBondAmount(access, STI_UINT32, 23, "BondAmount")
const SF_Vec256 sfAmendments(access, STI_VECTOR256, 3, "Amendments")
const SF_U64 sfBookNode(access, STI_UINT64, 3, "BookNode")
const SField sfTemplate(access, STI_ARRAY, 5, "Template")
const SF_U64 sfBaseFee(access, STI_UINT64, 5, "BaseFee")
bool shouldMeta(int c) const
const SF_Account sfAuthorize(access, STI_ACCOUNT, 5, "Authorize")
const SField sfDeletedNode(access, STI_OBJECT, 4, "DeletedNode")
const SF_U8 sfCloseResolution(access, STI_UINT8, 1, "CloseResolution")
const SF_U256 sfNickname(access, STI_HASH256, 18, "Nickname")
const SF_U256 sfConsensusHash(access, STI_HASH256, 23, "ConsensusHash")
const SF_U32 sfHighQualityOut(access, STI_UINT32, 17, "HighQualityOut")
const SF_U256 sfLedgerHash(access, STI_HASH256, 1, "LedgerHash")
const SF_U256 sfPreviousTxnID(access, STI_HASH256, 5, "PreviousTxnID", SField::sMD_DeleteFinal)
const SF_U32 sfCancelAfter(access, STI_UINT32, 36, "CancelAfter")
const SF_U128 sfEmailHash(access, STI_HASH128, 1, "EmailHash")
const SF_U32 sfSetFlag(access, STI_UINT32, 33, "SetFlag")
const SF_U8 sfTickSize(access, STI_UINT8, 16, "TickSize")
const SF_Blob sfExpireCode(access, STI_VL, 10, "ExpireCode")
const SF_Blob sfMemoFormat(access, STI_VL, 14, "MemoFormat")
const SF_U64 sfServerVersion(access, STI_UINT64, 11, "ServerVersion")
bool isSigningField() const
const SF_U256 sfInvoiceID(access, STI_HASH256, 17, "InvoiceID")
constexpr ApplyFlags operator~(ApplyFlags const &flags)
const SField sfDisabledValidator(access, STI_OBJECT, 19, "DisabledValidator")
const SF_U32 sfStampEscrow(access, STI_UINT32, 22, "StampEscrow")
const SF_U160 sfTakerGetsIssuer(access, STI_HASH160, 4, "TakerGetsIssuer")
const SF_Blob sfDomain(access, STI_VL, 7, "Domain")