diff --git a/cmake/XrplProtocolAutogen.cmake b/cmake/XrplProtocolAutogen.cmake index bc1f0c5848..d2f42e8c1c 100644 --- a/cmake/XrplProtocolAutogen.cmake +++ b/cmake/XrplProtocolAutogen.cmake @@ -193,6 +193,41 @@ function(setup_protocol_autogen) message(STATUS "Ledger entry classes generated successfully") endif() + # Format generated files using pre-commit (clang-format) + if(WIN32) + set(VENV_PRECOMMIT "${VENV_DIR}/Scripts/pre-commit.exe") + else() + set(VENV_PRECOMMIT "${VENV_DIR}/bin/pre-commit") + endif() + + file( + GLOB GENERATED_FILES + "${AUTOGEN_HEADER_DIR}/transactions/*.h" + "${AUTOGEN_HEADER_DIR}/ledger_entries/*.h" + "${AUTOGEN_TEST_DIR}/transactions/*.cpp" + "${AUTOGEN_TEST_DIR}/ledger_entries/*.cpp" + ) + + if(GENERATED_FILES) + message(STATUS "Formatting generated files with clang-format...") + execute_process( + COMMAND + ${VENV_PRECOMMIT} run clang-format --files ${GENERATED_FILES} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE FORMAT_RESULT + OUTPUT_VARIABLE FORMAT_OUTPUT + ERROR_VARIABLE FORMAT_ERROR + ) + if(NOT FORMAT_RESULT EQUAL 0) + message( + WARNING + "Failed to format generated files:\n${FORMAT_ERROR}" + ) + else() + message(STATUS "Generated files formatted successfully") + endif() + endif() + # Register dependencies so CMake reconfigures when these files change set_property( DIRECTORY diff --git a/cspell.config.yaml b/cspell.config.yaml index 98b6be81e7..9f466209a8 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -204,6 +204,7 @@ words: - ptrs - pushd - pyenv + - pyparsing - qalloc - queuable - Raphson @@ -229,6 +230,7 @@ words: - seqit - sf - SFIELD + - sfields - shamap - shamapitem - sidechain diff --git a/include/xrpl/protocol_autogen/README.md b/include/xrpl/protocol_autogen/README.md index 6ede380d69..be90788b05 100644 --- a/include/xrpl/protocol_autogen/README.md +++ b/include/xrpl/protocol_autogen/README.md @@ -1,5 +1,3 @@ - - # Protocol Autogen This directory contains auto-generated C++ wrapper classes for XRP Ledger protocol types. diff --git a/include/xrpl/protocol_autogen/ledger_entries/AMM.h b/include/xrpl/protocol_autogen/ledger_entries/AMM.h index 0541328fa8..f92f15eaa8 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/AMM.h +++ b/include/xrpl/protocol_autogen/ledger_entries/AMM.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class AMMBuilder; /** - * Ledger Entry: AMM + * @brief Ledger Entry: AMM + * * Type: ltAMM (0x0079) * RPC Name: amm * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltAMM; /** - * Construct a AMM ledger entry wrapper from an existing SLE object. + * @brief Construct a AMM ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit AMM(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfTradingFee (soeDEFAULT) + * @brief Get sfTradingFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -67,6 +69,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTradingFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTradingFee() const @@ -75,8 +81,9 @@ public: } /** - * Get sfVoteSlots (soeOPTIONAL) - * Note: This is an untyped field (unknown). + * @brief Get sfVoteSlots (soeOPTIONAL) + * @note This is an untyped field (unknown). + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -87,6 +94,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfVoteSlots is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasVoteSlots() const @@ -95,8 +106,9 @@ public: } /** - * Get sfAuctionSlot (soeOPTIONAL) - * Note: This is an untyped field (unknown). + * @brief Get sfAuctionSlot (soeOPTIONAL) + * @note This is an untyped field (unknown). + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional @@ -107,6 +119,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAuctionSlot is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAuctionSlot() const @@ -115,7 +131,8 @@ public: } /** - * Get sfLPTokenBalance (soeREQUIRED) + * @brief Get sfLPTokenBalance (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -125,7 +142,8 @@ public: } /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -135,7 +153,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -145,7 +164,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -155,7 +175,8 @@ public: } /** - * Get sfPreviousTxnID (soeOPTIONAL) + * @brief Get sfPreviousTxnID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +187,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnID() const @@ -174,7 +199,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -185,6 +211,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnLgrSeq is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnLgrSeq() const @@ -194,7 +224,8 @@ public: }; /** - * Builder for AMM ledger entries. + * @brief Builder for AMM ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -202,6 +233,14 @@ public: class AMMBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new AMMBuilder with required fields. + * @param account The sfAccount field value. + * @param lPTokenBalance The sfLPTokenBalance field value. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param ownerNode The sfOwnerNode field value. + */ AMMBuilder(std::decay_t const& account,std::decay_t const& lPTokenBalance,std::decay_t const& asset,std::decay_t const& asset2,std::decay_t const& ownerNode) : LedgerEntryBuilderBase(ltAMM) { @@ -212,6 +251,11 @@ public: setOwnerNode(ownerNode); } + /** + * @brief Construct a AMMBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ AMMBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltAMM) @@ -221,10 +265,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -235,7 +279,7 @@ public: } /** - * Set sfTradingFee (soeDEFAULT) + * @brief Set sfTradingFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -246,7 +290,7 @@ public: } /** - * Set sfVoteSlots (soeOPTIONAL) + * @brief Set sfVoteSlots (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -257,7 +301,7 @@ public: } /** - * Set sfAuctionSlot (soeOPTIONAL) + * @brief Set sfAuctionSlot (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -268,7 +312,7 @@ public: } /** - * Set sfLPTokenBalance (soeREQUIRED) + * @brief Set sfLPTokenBalance (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -279,7 +323,7 @@ public: } /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -290,7 +334,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -301,7 +345,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -312,7 +356,7 @@ public: } /** - * Set sfPreviousTxnID (soeOPTIONAL) + * @brief Set sfPreviousTxnID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -323,7 +367,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Set sfPreviousTxnLgrSeq (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBuilder& @@ -334,7 +378,8 @@ public: } /** - * Build and return the completed AMM wrapper. + * @brief Build and return the completed AMM wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ AMM diff --git a/include/xrpl/protocol_autogen/ledger_entries/AccountRoot.h b/include/xrpl/protocol_autogen/ledger_entries/AccountRoot.h index da070a6877..15cf14b21a 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/AccountRoot.h +++ b/include/xrpl/protocol_autogen/ledger_entries/AccountRoot.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class AccountRootBuilder; /** - * Ledger Entry: AccountRoot + * @brief Ledger Entry: AccountRoot + * * Type: ltACCOUNT_ROOT (0x0061) * RPC Name: account * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltACCOUNT_ROOT; /** - * Construct a AccountRoot ledger entry wrapper from an existing SLE object. + * @brief Construct a AccountRoot ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit AccountRoot(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfBalance (soeREQUIRED) + * @brief Get sfBalance (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfOwnerCount (soeREQUIRED) + * @brief Get sfOwnerCount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -106,7 +112,8 @@ public: } /** - * Get sfAccountTxnID (soeOPTIONAL) + * @brief Get sfAccountTxnID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -117,6 +124,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAccountTxnID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAccountTxnID() const @@ -125,7 +136,8 @@ public: } /** - * Get sfRegularKey (soeOPTIONAL) + * @brief Get sfRegularKey (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -136,6 +148,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfRegularKey is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasRegularKey() const @@ -144,7 +160,8 @@ public: } /** - * Get sfEmailHash (soeOPTIONAL) + * @brief Get sfEmailHash (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +172,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfEmailHash is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasEmailHash() const @@ -163,7 +184,8 @@ public: } /** - * Get sfWalletLocator (soeOPTIONAL) + * @brief Get sfWalletLocator (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -174,6 +196,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfWalletLocator is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasWalletLocator() const @@ -182,7 +208,8 @@ public: } /** - * Get sfWalletSize (soeOPTIONAL) + * @brief Get sfWalletSize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -193,6 +220,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfWalletSize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasWalletSize() const @@ -201,7 +232,8 @@ public: } /** - * Get sfMessageKey (soeOPTIONAL) + * @brief Get sfMessageKey (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -212,6 +244,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMessageKey is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMessageKey() const @@ -220,7 +256,8 @@ public: } /** - * Get sfTransferRate (soeOPTIONAL) + * @brief Get sfTransferRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -231,6 +268,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferRate() const @@ -239,7 +280,8 @@ public: } /** - * Get sfDomain (soeOPTIONAL) + * @brief Get sfDomain (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -250,6 +292,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomain is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomain() const @@ -258,7 +304,8 @@ public: } /** - * Get sfTickSize (soeOPTIONAL) + * @brief Get sfTickSize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -269,6 +316,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTickSize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTickSize() const @@ -277,7 +328,8 @@ public: } /** - * Get sfTicketCount (soeOPTIONAL) + * @brief Get sfTicketCount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -288,6 +340,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTicketCount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTicketCount() const @@ -296,7 +352,8 @@ public: } /** - * Get sfNFTokenMinter (soeOPTIONAL) + * @brief Get sfNFTokenMinter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -307,6 +364,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNFTokenMinter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNFTokenMinter() const @@ -315,7 +376,8 @@ public: } /** - * Get sfMintedNFTokens (soeDEFAULT) + * @brief Get sfMintedNFTokens (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -326,6 +388,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMintedNFTokens is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMintedNFTokens() const @@ -334,7 +400,8 @@ public: } /** - * Get sfBurnedNFTokens (soeDEFAULT) + * @brief Get sfBurnedNFTokens (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -345,6 +412,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBurnedNFTokens is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBurnedNFTokens() const @@ -353,7 +424,8 @@ public: } /** - * Get sfFirstNFTokenSequence (soeOPTIONAL) + * @brief Get sfFirstNFTokenSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -364,6 +436,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfFirstNFTokenSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasFirstNFTokenSequence() const @@ -372,7 +448,8 @@ public: } /** - * Get sfAMMID (soeOPTIONAL) + * @brief Get sfAMMID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -383,6 +460,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAMMID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAMMID() const @@ -391,7 +472,8 @@ public: } /** - * Get sfVaultID (soeOPTIONAL) + * @brief Get sfVaultID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -402,6 +484,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfVaultID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasVaultID() const @@ -410,7 +496,8 @@ public: } /** - * Get sfLoanBrokerID (soeOPTIONAL) + * @brief Get sfLoanBrokerID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -421,6 +508,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanBrokerID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanBrokerID() const @@ -430,7 +521,8 @@ public: }; /** - * Builder for AccountRoot ledger entries. + * @brief Builder for AccountRoot ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -438,6 +530,15 @@ public: class AccountRootBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new AccountRootBuilder with required fields. + * @param account The sfAccount field value. + * @param sequence The sfSequence field value. + * @param balance The sfBalance field value. + * @param ownerCount The sfOwnerCount field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ AccountRootBuilder(std::decay_t const& account,std::decay_t const& sequence,std::decay_t const& balance,std::decay_t const& ownerCount,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltACCOUNT_ROOT) { @@ -449,6 +550,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a AccountRootBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ AccountRootBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltACCOUNT_ROOT) @@ -458,10 +564,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -472,7 +578,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -483,7 +589,7 @@ public: } /** - * Set sfBalance (soeREQUIRED) + * @brief Set sfBalance (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -494,7 +600,7 @@ public: } /** - * Set sfOwnerCount (soeREQUIRED) + * @brief Set sfOwnerCount (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -505,7 +611,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -516,7 +622,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -527,7 +633,7 @@ public: } /** - * Set sfAccountTxnID (soeOPTIONAL) + * @brief Set sfAccountTxnID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -538,7 +644,7 @@ public: } /** - * Set sfRegularKey (soeOPTIONAL) + * @brief Set sfRegularKey (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -549,7 +655,7 @@ public: } /** - * Set sfEmailHash (soeOPTIONAL) + * @brief Set sfEmailHash (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -560,7 +666,7 @@ public: } /** - * Set sfWalletLocator (soeOPTIONAL) + * @brief Set sfWalletLocator (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -571,7 +677,7 @@ public: } /** - * Set sfWalletSize (soeOPTIONAL) + * @brief Set sfWalletSize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -582,7 +688,7 @@ public: } /** - * Set sfMessageKey (soeOPTIONAL) + * @brief Set sfMessageKey (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -593,7 +699,7 @@ public: } /** - * Set sfTransferRate (soeOPTIONAL) + * @brief Set sfTransferRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -604,7 +710,7 @@ public: } /** - * Set sfDomain (soeOPTIONAL) + * @brief Set sfDomain (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -615,7 +721,7 @@ public: } /** - * Set sfTickSize (soeOPTIONAL) + * @brief Set sfTickSize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -626,7 +732,7 @@ public: } /** - * Set sfTicketCount (soeOPTIONAL) + * @brief Set sfTicketCount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -637,7 +743,7 @@ public: } /** - * Set sfNFTokenMinter (soeOPTIONAL) + * @brief Set sfNFTokenMinter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -648,7 +754,7 @@ public: } /** - * Set sfMintedNFTokens (soeDEFAULT) + * @brief Set sfMintedNFTokens (soeDEFAULT) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -659,7 +765,7 @@ public: } /** - * Set sfBurnedNFTokens (soeDEFAULT) + * @brief Set sfBurnedNFTokens (soeDEFAULT) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -670,7 +776,7 @@ public: } /** - * Set sfFirstNFTokenSequence (soeOPTIONAL) + * @brief Set sfFirstNFTokenSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -681,7 +787,7 @@ public: } /** - * Set sfAMMID (soeOPTIONAL) + * @brief Set sfAMMID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -692,7 +798,7 @@ public: } /** - * Set sfVaultID (soeOPTIONAL) + * @brief Set sfVaultID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -703,7 +809,7 @@ public: } /** - * Set sfLoanBrokerID (soeOPTIONAL) + * @brief Set sfLoanBrokerID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountRootBuilder& @@ -714,7 +820,8 @@ public: } /** - * Build and return the completed AccountRoot wrapper. + * @brief Build and return the completed AccountRoot wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ AccountRoot diff --git a/include/xrpl/protocol_autogen/ledger_entries/Amendments.h b/include/xrpl/protocol_autogen/ledger_entries/Amendments.h index 9d0913a98e..2b51b83747 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Amendments.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Amendments.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class AmendmentsBuilder; /** - * Ledger Entry: Amendments + * @brief Ledger Entry: Amendments + * * Type: ltAMENDMENTS (0x0066) * RPC Name: amendments * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltAMENDMENTS; /** - * Construct a Amendments ledger entry wrapper from an existing SLE object. + * @brief Construct a Amendments ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Amendments(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAmendments (soeOPTIONAL) + * @brief Get sfAmendments (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -57,6 +58,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmendments is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmendments() const @@ -65,8 +70,9 @@ public: } /** - * Get sfMajorities (soeOPTIONAL) - * Note: This is an untyped field (unknown). + * @brief Get sfMajorities (soeOPTIONAL) + * @note This is an untyped field (unknown). + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -77,6 +83,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMajorities is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMajorities() const @@ -85,7 +95,8 @@ public: } /** - * Get sfPreviousTxnID (soeOPTIONAL) + * @brief Get sfPreviousTxnID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -96,6 +107,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnID() const @@ -104,7 +119,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -115,6 +131,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnLgrSeq is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnLgrSeq() const @@ -124,7 +144,8 @@ public: }; /** - * Builder for Amendments ledger entries. + * @brief Builder for Amendments ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -132,11 +153,19 @@ public: class AmendmentsBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new AmendmentsBuilder with required fields. + */ AmendmentsBuilder() : LedgerEntryBuilderBase(ltAMENDMENTS) { } + /** + * @brief Construct a AmendmentsBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ AmendmentsBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltAMENDMENTS) @@ -146,10 +175,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAmendments (soeOPTIONAL) + * @brief Set sfAmendments (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AmendmentsBuilder& @@ -160,7 +189,7 @@ public: } /** - * Set sfMajorities (soeOPTIONAL) + * @brief Set sfMajorities (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AmendmentsBuilder& @@ -171,7 +200,7 @@ public: } /** - * Set sfPreviousTxnID (soeOPTIONAL) + * @brief Set sfPreviousTxnID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AmendmentsBuilder& @@ -182,7 +211,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Set sfPreviousTxnLgrSeq (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AmendmentsBuilder& @@ -193,7 +222,8 @@ public: } /** - * Build and return the completed Amendments wrapper. + * @brief Build and return the completed Amendments wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Amendments diff --git a/include/xrpl/protocol_autogen/ledger_entries/Bridge.h b/include/xrpl/protocol_autogen/ledger_entries/Bridge.h index a7ec170f27..3926ff65fa 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Bridge.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Bridge.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class BridgeBuilder; /** - * Ledger Entry: Bridge + * @brief Ledger Entry: Bridge + * * Type: ltBRIDGE (0x0069) * RPC Name: bridge * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltBRIDGE; /** - * Construct a Bridge ledger entry wrapper from an existing SLE object. + * @brief Construct a Bridge ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Bridge(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfSignatureReward (soeREQUIRED) + * @brief Get sfSignatureReward (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfMinAccountCreateAmount (soeOPTIONAL) + * @brief Get sfMinAccountCreateAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -77,6 +80,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMinAccountCreateAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMinAccountCreateAmount() const @@ -85,7 +92,8 @@ public: } /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -95,7 +103,8 @@ public: } /** - * Get sfXChainClaimID (soeREQUIRED) + * @brief Get sfXChainClaimID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -105,7 +114,8 @@ public: } /** - * Get sfXChainAccountCreateCount (soeREQUIRED) + * @brief Get sfXChainAccountCreateCount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -115,7 +125,8 @@ public: } /** - * Get sfXChainAccountClaimCount (soeREQUIRED) + * @brief Get sfXChainAccountClaimCount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -125,7 +136,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -135,7 +147,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -145,7 +158,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -156,7 +170,8 @@ public: }; /** - * Builder for Bridge ledger entries. + * @brief Builder for Bridge ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -164,6 +179,18 @@ public: class BridgeBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new BridgeBuilder with required fields. + * @param account The sfAccount field value. + * @param signatureReward The sfSignatureReward field value. + * @param xChainBridge The sfXChainBridge field value. + * @param xChainClaimID The sfXChainClaimID field value. + * @param xChainAccountCreateCount The sfXChainAccountCreateCount field value. + * @param xChainAccountClaimCount The sfXChainAccountClaimCount field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ BridgeBuilder(std::decay_t const& account,std::decay_t const& signatureReward,std::decay_t const& xChainBridge,std::decay_t const& xChainClaimID,std::decay_t const& xChainAccountCreateCount,std::decay_t const& xChainAccountClaimCount,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltBRIDGE) { @@ -178,6 +205,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a BridgeBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ BridgeBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltBRIDGE) @@ -187,10 +219,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -201,7 +233,7 @@ public: } /** - * Set sfSignatureReward (soeREQUIRED) + * @brief Set sfSignatureReward (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -212,7 +244,7 @@ public: } /** - * Set sfMinAccountCreateAmount (soeOPTIONAL) + * @brief Set sfMinAccountCreateAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -223,7 +255,7 @@ public: } /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -234,7 +266,7 @@ public: } /** - * Set sfXChainClaimID (soeREQUIRED) + * @brief Set sfXChainClaimID (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -245,7 +277,7 @@ public: } /** - * Set sfXChainAccountCreateCount (soeREQUIRED) + * @brief Set sfXChainAccountCreateCount (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -256,7 +288,7 @@ public: } /** - * Set sfXChainAccountClaimCount (soeREQUIRED) + * @brief Set sfXChainAccountClaimCount (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -267,7 +299,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -278,7 +310,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -289,7 +321,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ BridgeBuilder& @@ -300,7 +332,8 @@ public: } /** - * Build and return the completed Bridge wrapper. + * @brief Build and return the completed Bridge wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Bridge diff --git a/include/xrpl/protocol_autogen/ledger_entries/Check.h b/include/xrpl/protocol_autogen/ledger_entries/Check.h index 3214080409..c071186afb 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Check.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Check.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class CheckBuilder; /** - * Ledger Entry: Check + * @brief Ledger Entry: Check + * * Type: ltCHECK (0x0043) * RPC Name: check * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltCHECK; /** - * Construct a Check ledger entry wrapper from an existing SLE object. + * @brief Construct a Check ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Check(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfSendMax (soeREQUIRED) + * @brief Get sfSendMax (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfDestinationNode (soeREQUIRED) + * @brief Get sfDestinationNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -106,7 +112,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -117,6 +124,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -125,7 +136,8 @@ public: } /** - * Get sfInvoiceID (soeOPTIONAL) + * @brief Get sfInvoiceID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -136,6 +148,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfInvoiceID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasInvoiceID() const @@ -144,7 +160,8 @@ public: } /** - * Get sfSourceTag (soeOPTIONAL) + * @brief Get sfSourceTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +172,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSourceTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSourceTag() const @@ -163,7 +184,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -174,6 +196,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -182,7 +208,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -192,7 +219,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -203,7 +231,8 @@ public: }; /** - * Builder for Check ledger entries. + * @brief Builder for Check ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -211,6 +240,17 @@ public: class CheckBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new CheckBuilder with required fields. + * @param account The sfAccount field value. + * @param destination The sfDestination field value. + * @param sendMax The sfSendMax field value. + * @param sequence The sfSequence field value. + * @param ownerNode The sfOwnerNode field value. + * @param destinationNode The sfDestinationNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ CheckBuilder(std::decay_t const& account,std::decay_t const& destination,std::decay_t const& sendMax,std::decay_t const& sequence,std::decay_t const& ownerNode,std::decay_t const& destinationNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltCHECK) { @@ -224,6 +264,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a CheckBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ CheckBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltCHECK) @@ -233,10 +278,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -247,7 +292,7 @@ public: } /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -258,7 +303,7 @@ public: } /** - * Set sfSendMax (soeREQUIRED) + * @brief Set sfSendMax (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -269,7 +314,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -280,7 +325,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -291,7 +336,7 @@ public: } /** - * Set sfDestinationNode (soeREQUIRED) + * @brief Set sfDestinationNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -302,7 +347,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -313,7 +358,7 @@ public: } /** - * Set sfInvoiceID (soeOPTIONAL) + * @brief Set sfInvoiceID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -324,7 +369,7 @@ public: } /** - * Set sfSourceTag (soeOPTIONAL) + * @brief Set sfSourceTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -335,7 +380,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -346,7 +391,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -357,7 +402,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckBuilder& @@ -368,7 +413,8 @@ public: } /** - * Build and return the completed Check wrapper. + * @brief Build and return the completed Check wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Check diff --git a/include/xrpl/protocol_autogen/ledger_entries/Credential.h b/include/xrpl/protocol_autogen/ledger_entries/Credential.h index be5e8c5a2e..4c45f80a8d 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Credential.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Credential.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class CredentialBuilder; /** - * Ledger Entry: Credential + * @brief Ledger Entry: Credential + * * Type: ltCREDENTIAL (0x0081) * RPC Name: credential * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltCREDENTIAL; /** - * Construct a Credential ledger entry wrapper from an existing SLE object. + * @brief Construct a Credential ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Credential(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfSubject (soeREQUIRED) + * @brief Get sfSubject (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfIssuer (soeREQUIRED) + * @brief Get sfIssuer (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfCredentialType (soeREQUIRED) + * @brief Get sfCredentialType (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -87,6 +91,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -95,7 +103,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -106,6 +115,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -114,7 +127,8 @@ public: } /** - * Get sfIssuerNode (soeREQUIRED) + * @brief Get sfIssuerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -124,7 +138,8 @@ public: } /** - * Get sfSubjectNode (soeOPTIONAL) + * @brief Get sfSubjectNode (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -135,6 +150,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSubjectNode is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSubjectNode() const @@ -143,7 +162,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -153,7 +173,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -164,7 +185,8 @@ public: }; /** - * Builder for Credential ledger entries. + * @brief Builder for Credential ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -172,6 +194,15 @@ public: class CredentialBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new CredentialBuilder with required fields. + * @param subject The sfSubject field value. + * @param issuer The sfIssuer field value. + * @param credentialType The sfCredentialType field value. + * @param issuerNode The sfIssuerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ CredentialBuilder(std::decay_t const& subject,std::decay_t const& issuer,std::decay_t const& credentialType,std::decay_t const& issuerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltCREDENTIAL) { @@ -183,6 +214,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a CredentialBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ CredentialBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltCREDENTIAL) @@ -192,10 +228,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfSubject (soeREQUIRED) + * @brief Set sfSubject (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -206,7 +242,7 @@ public: } /** - * Set sfIssuer (soeREQUIRED) + * @brief Set sfIssuer (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -217,7 +253,7 @@ public: } /** - * Set sfCredentialType (soeREQUIRED) + * @brief Set sfCredentialType (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -228,7 +264,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -239,7 +275,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -250,7 +286,7 @@ public: } /** - * Set sfIssuerNode (soeREQUIRED) + * @brief Set sfIssuerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -261,7 +297,7 @@ public: } /** - * Set sfSubjectNode (soeOPTIONAL) + * @brief Set sfSubjectNode (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -272,7 +308,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -283,7 +319,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialBuilder& @@ -294,7 +330,8 @@ public: } /** - * Build and return the completed Credential wrapper. + * @brief Build and return the completed Credential wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Credential diff --git a/include/xrpl/protocol_autogen/ledger_entries/DID.h b/include/xrpl/protocol_autogen/ledger_entries/DID.h index 6acbad0275..fc88e988df 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/DID.h +++ b/include/xrpl/protocol_autogen/ledger_entries/DID.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class DIDBuilder; /** - * Ledger Entry: DID + * @brief Ledger Entry: DID + * * Type: ltDID (0x0049) * RPC Name: did * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltDID; /** - * Construct a DID ledger entry wrapper from an existing SLE object. + * @brief Construct a DID ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit DID(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfDIDDocument (soeOPTIONAL) + * @brief Get sfDIDDocument (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -67,6 +69,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDIDDocument is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDIDDocument() const @@ -75,7 +81,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -86,6 +93,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -94,7 +105,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -105,6 +117,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -113,7 +129,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -123,7 +140,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -133,7 +151,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -144,7 +163,8 @@ public: }; /** - * Builder for DID ledger entries. + * @brief Builder for DID ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -152,6 +172,13 @@ public: class DIDBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new DIDBuilder with required fields. + * @param account The sfAccount field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ DIDBuilder(std::decay_t const& account,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltDID) { @@ -161,6 +188,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a DIDBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ DIDBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltDID) @@ -170,10 +202,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -184,7 +216,7 @@ public: } /** - * Set sfDIDDocument (soeOPTIONAL) + * @brief Set sfDIDDocument (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -195,7 +227,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -206,7 +238,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -217,7 +249,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -228,7 +260,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -239,7 +271,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ DIDBuilder& @@ -250,7 +282,8 @@ public: } /** - * Build and return the completed DID wrapper. + * @brief Build and return the completed DID wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ DID diff --git a/include/xrpl/protocol_autogen/ledger_entries/Delegate.h b/include/xrpl/protocol_autogen/ledger_entries/Delegate.h index f98a277b53..4d937eb99a 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Delegate.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Delegate.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class DelegateBuilder; /** - * Ledger Entry: Delegate + * @brief Ledger Entry: Delegate + * * Type: ltDELEGATE (0x0083) * RPC Name: delegate * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltDELEGATE; /** - * Construct a Delegate ledger entry wrapper from an existing SLE object. + * @brief Construct a Delegate ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Delegate(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfAuthorize (soeREQUIRED) + * @brief Get sfAuthorize (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -66,8 +68,9 @@ public: } /** - * Get sfPermissions (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfPermissions (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -77,7 +80,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -87,7 +91,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -97,7 +102,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -108,7 +114,8 @@ public: }; /** - * Builder for Delegate ledger entries. + * @brief Builder for Delegate ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -116,6 +123,15 @@ public: class DelegateBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new DelegateBuilder with required fields. + * @param account The sfAccount field value. + * @param authorize The sfAuthorize field value. + * @param permissions The sfPermissions field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ DelegateBuilder(std::decay_t const& account,std::decay_t const& authorize,STArray const& permissions,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltDELEGATE) { @@ -127,6 +143,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a DelegateBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ DelegateBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltDELEGATE) @@ -136,10 +157,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateBuilder& @@ -150,7 +171,7 @@ public: } /** - * Set sfAuthorize (soeREQUIRED) + * @brief Set sfAuthorize (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateBuilder& @@ -161,7 +182,7 @@ public: } /** - * Set sfPermissions (soeREQUIRED) + * @brief Set sfPermissions (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateBuilder& @@ -172,7 +193,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateBuilder& @@ -183,7 +204,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateBuilder& @@ -194,7 +215,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateBuilder& @@ -205,7 +226,8 @@ public: } /** - * Build and return the completed Delegate wrapper. + * @brief Build and return the completed Delegate wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Delegate diff --git a/include/xrpl/protocol_autogen/ledger_entries/DepositPreauth.h b/include/xrpl/protocol_autogen/ledger_entries/DepositPreauth.h index a3fe190163..533caba619 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/DepositPreauth.h +++ b/include/xrpl/protocol_autogen/ledger_entries/DepositPreauth.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class DepositPreauthBuilder; /** - * Ledger Entry: DepositPreauth + * @brief Ledger Entry: DepositPreauth + * * Type: ltDEPOSIT_PREAUTH (0x0070) * RPC Name: deposit_preauth * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltDEPOSIT_PREAUTH; /** - * Construct a DepositPreauth ledger entry wrapper from an existing SLE object. + * @brief Construct a DepositPreauth ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit DepositPreauth(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfAuthorize (soeOPTIONAL) + * @brief Get sfAuthorize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -67,6 +69,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAuthorize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAuthorize() const @@ -75,7 +81,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -85,7 +92,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -95,7 +103,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -105,8 +114,9 @@ public: } /** - * Get sfAuthorizeCredentials (soeOPTIONAL) - * Note: This is an untyped field (unknown). + * @brief Get sfAuthorizeCredentials (soeOPTIONAL) + * @note This is an untyped field (unknown). + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -117,6 +127,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAuthorizeCredentials is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAuthorizeCredentials() const @@ -126,7 +140,8 @@ public: }; /** - * Builder for DepositPreauth ledger entries. + * @brief Builder for DepositPreauth ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -134,6 +149,13 @@ public: class DepositPreauthBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new DepositPreauthBuilder with required fields. + * @param account The sfAccount field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ DepositPreauthBuilder(std::decay_t const& account,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltDEPOSIT_PREAUTH) { @@ -143,6 +165,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a DepositPreauthBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ DepositPreauthBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltDEPOSIT_PREAUTH) @@ -152,10 +179,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -166,7 +193,7 @@ public: } /** - * Set sfAuthorize (soeOPTIONAL) + * @brief Set sfAuthorize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -177,7 +204,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -188,7 +215,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -199,7 +226,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -210,7 +237,7 @@ public: } /** - * Set sfAuthorizeCredentials (soeOPTIONAL) + * @brief Set sfAuthorizeCredentials (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -221,7 +248,8 @@ public: } /** - * Build and return the completed DepositPreauth wrapper. + * @brief Build and return the completed DepositPreauth wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ DepositPreauth diff --git a/include/xrpl/protocol_autogen/ledger_entries/DirectoryNode.h b/include/xrpl/protocol_autogen/ledger_entries/DirectoryNode.h index ffb43a6873..545542ec6c 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/DirectoryNode.h +++ b/include/xrpl/protocol_autogen/ledger_entries/DirectoryNode.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class DirectoryNodeBuilder; /** - * Ledger Entry: DirectoryNode + * @brief Ledger Entry: DirectoryNode + * * Type: ltDIR_NODE (0x0064) * RPC Name: directory * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltDIR_NODE; /** - * Construct a DirectoryNode ledger entry wrapper from an existing SLE object. + * @brief Construct a DirectoryNode ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit DirectoryNode(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfOwner (soeOPTIONAL) + * @brief Get sfOwner (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -57,6 +58,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwner is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwner() const @@ -65,7 +70,8 @@ public: } /** - * Get sfTakerPaysCurrency (soeOPTIONAL) + * @brief Get sfTakerPaysCurrency (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -76,6 +82,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTakerPaysCurrency is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTakerPaysCurrency() const @@ -84,7 +94,8 @@ public: } /** - * Get sfTakerPaysIssuer (soeOPTIONAL) + * @brief Get sfTakerPaysIssuer (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -95,6 +106,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTakerPaysIssuer is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTakerPaysIssuer() const @@ -103,7 +118,8 @@ public: } /** - * Get sfTakerGetsCurrency (soeOPTIONAL) + * @brief Get sfTakerGetsCurrency (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -114,6 +130,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTakerGetsCurrency is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTakerGetsCurrency() const @@ -122,7 +142,8 @@ public: } /** - * Get sfTakerGetsIssuer (soeOPTIONAL) + * @brief Get sfTakerGetsIssuer (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -133,6 +154,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTakerGetsIssuer is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTakerGetsIssuer() const @@ -141,7 +166,8 @@ public: } /** - * Get sfExchangeRate (soeOPTIONAL) + * @brief Get sfExchangeRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -152,6 +178,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExchangeRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExchangeRate() const @@ -160,7 +190,8 @@ public: } /** - * Get sfIndexes (soeREQUIRED) + * @brief Get sfIndexes (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VECTOR256::type::value_type @@ -170,7 +201,8 @@ public: } /** - * Get sfRootIndex (soeREQUIRED) + * @brief Get sfRootIndex (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -180,7 +212,8 @@ public: } /** - * Get sfIndexNext (soeOPTIONAL) + * @brief Get sfIndexNext (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -191,6 +224,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfIndexNext is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasIndexNext() const @@ -199,7 +236,8 @@ public: } /** - * Get sfIndexPrevious (soeOPTIONAL) + * @brief Get sfIndexPrevious (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -210,6 +248,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfIndexPrevious is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasIndexPrevious() const @@ -218,7 +260,8 @@ public: } /** - * Get sfNFTokenID (soeOPTIONAL) + * @brief Get sfNFTokenID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -229,6 +272,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNFTokenID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNFTokenID() const @@ -237,7 +284,8 @@ public: } /** - * Get sfPreviousTxnID (soeOPTIONAL) + * @brief Get sfPreviousTxnID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -248,6 +296,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnID() const @@ -256,7 +308,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -267,6 +320,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnLgrSeq is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnLgrSeq() const @@ -275,7 +332,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -286,6 +344,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -295,7 +357,8 @@ public: }; /** - * Builder for DirectoryNode ledger entries. + * @brief Builder for DirectoryNode ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -303,6 +366,11 @@ public: class DirectoryNodeBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new DirectoryNodeBuilder with required fields. + * @param indexes The sfIndexes field value. + * @param rootIndex The sfRootIndex field value. + */ DirectoryNodeBuilder(std::decay_t const& indexes,std::decay_t const& rootIndex) : LedgerEntryBuilderBase(ltDIR_NODE) { @@ -310,6 +378,11 @@ public: setRootIndex(rootIndex); } + /** + * @brief Construct a DirectoryNodeBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ DirectoryNodeBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltDIR_NODE) @@ -319,10 +392,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfOwner (soeOPTIONAL) + * @brief Set sfOwner (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -333,7 +406,7 @@ public: } /** - * Set sfTakerPaysCurrency (soeOPTIONAL) + * @brief Set sfTakerPaysCurrency (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -344,7 +417,7 @@ public: } /** - * Set sfTakerPaysIssuer (soeOPTIONAL) + * @brief Set sfTakerPaysIssuer (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -355,7 +428,7 @@ public: } /** - * Set sfTakerGetsCurrency (soeOPTIONAL) + * @brief Set sfTakerGetsCurrency (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -366,7 +439,7 @@ public: } /** - * Set sfTakerGetsIssuer (soeOPTIONAL) + * @brief Set sfTakerGetsIssuer (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -377,7 +450,7 @@ public: } /** - * Set sfExchangeRate (soeOPTIONAL) + * @brief Set sfExchangeRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -388,7 +461,7 @@ public: } /** - * Set sfIndexes (soeREQUIRED) + * @brief Set sfIndexes (soeREQUIRED) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -399,7 +472,7 @@ public: } /** - * Set sfRootIndex (soeREQUIRED) + * @brief Set sfRootIndex (soeREQUIRED) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -410,7 +483,7 @@ public: } /** - * Set sfIndexNext (soeOPTIONAL) + * @brief Set sfIndexNext (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -421,7 +494,7 @@ public: } /** - * Set sfIndexPrevious (soeOPTIONAL) + * @brief Set sfIndexPrevious (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -432,7 +505,7 @@ public: } /** - * Set sfNFTokenID (soeOPTIONAL) + * @brief Set sfNFTokenID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -443,7 +516,7 @@ public: } /** - * Set sfPreviousTxnID (soeOPTIONAL) + * @brief Set sfPreviousTxnID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -454,7 +527,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Set sfPreviousTxnLgrSeq (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -465,7 +538,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DirectoryNodeBuilder& @@ -476,7 +549,8 @@ public: } /** - * Build and return the completed DirectoryNode wrapper. + * @brief Build and return the completed DirectoryNode wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ DirectoryNode diff --git a/include/xrpl/protocol_autogen/ledger_entries/Escrow.h b/include/xrpl/protocol_autogen/ledger_entries/Escrow.h index eb0ec8ee40..fd15b2a713 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Escrow.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Escrow.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class EscrowBuilder; /** - * Ledger Entry: Escrow + * @brief Ledger Entry: Escrow + * * Type: ltESCROW (0x0075) * RPC Name: escrow * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltESCROW; /** - * Construct a Escrow ledger entry wrapper from an existing SLE object. + * @brief Construct a Escrow ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Escrow(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfSequence (soeOPTIONAL) + * @brief Get sfSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -67,6 +69,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSequence() const @@ -75,7 +81,8 @@ public: } /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -85,7 +92,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -95,7 +103,8 @@ public: } /** - * Get sfCondition (soeOPTIONAL) + * @brief Get sfCondition (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -106,6 +115,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCondition is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCondition() const @@ -114,7 +127,8 @@ public: } /** - * Get sfCancelAfter (soeOPTIONAL) + * @brief Get sfCancelAfter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -125,6 +139,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCancelAfter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCancelAfter() const @@ -133,7 +151,8 @@ public: } /** - * Get sfFinishAfter (soeOPTIONAL) + * @brief Get sfFinishAfter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -144,6 +163,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfFinishAfter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasFinishAfter() const @@ -152,7 +175,8 @@ public: } /** - * Get sfSourceTag (soeOPTIONAL) + * @brief Get sfSourceTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -163,6 +187,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSourceTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSourceTag() const @@ -171,7 +199,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -182,6 +211,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -190,7 +223,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -200,7 +234,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -210,7 +245,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -220,7 +256,8 @@ public: } /** - * Get sfDestinationNode (soeOPTIONAL) + * @brief Get sfDestinationNode (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -231,6 +268,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationNode is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationNode() const @@ -239,7 +280,8 @@ public: } /** - * Get sfTransferRate (soeOPTIONAL) + * @brief Get sfTransferRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -250,6 +292,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferRate() const @@ -258,7 +304,8 @@ public: } /** - * Get sfIssuerNode (soeOPTIONAL) + * @brief Get sfIssuerNode (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -269,6 +316,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfIssuerNode is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasIssuerNode() const @@ -278,7 +329,8 @@ public: }; /** - * Builder for Escrow ledger entries. + * @brief Builder for Escrow ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -286,6 +338,15 @@ public: class EscrowBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new EscrowBuilder with required fields. + * @param account The sfAccount field value. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ EscrowBuilder(std::decay_t const& account,std::decay_t const& destination,std::decay_t const& amount,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltESCROW) { @@ -297,6 +358,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a EscrowBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ EscrowBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltESCROW) @@ -306,10 +372,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -320,7 +386,7 @@ public: } /** - * Set sfSequence (soeOPTIONAL) + * @brief Set sfSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -331,7 +397,7 @@ public: } /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -342,7 +408,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -353,7 +419,7 @@ public: } /** - * Set sfCondition (soeOPTIONAL) + * @brief Set sfCondition (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -364,7 +430,7 @@ public: } /** - * Set sfCancelAfter (soeOPTIONAL) + * @brief Set sfCancelAfter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -375,7 +441,7 @@ public: } /** - * Set sfFinishAfter (soeOPTIONAL) + * @brief Set sfFinishAfter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -386,7 +452,7 @@ public: } /** - * Set sfSourceTag (soeOPTIONAL) + * @brief Set sfSourceTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -397,7 +463,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -408,7 +474,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -419,7 +485,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -430,7 +496,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -441,7 +507,7 @@ public: } /** - * Set sfDestinationNode (soeOPTIONAL) + * @brief Set sfDestinationNode (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -452,7 +518,7 @@ public: } /** - * Set sfTransferRate (soeOPTIONAL) + * @brief Set sfTransferRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -463,7 +529,7 @@ public: } /** - * Set sfIssuerNode (soeOPTIONAL) + * @brief Set sfIssuerNode (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowBuilder& @@ -474,7 +540,8 @@ public: } /** - * Build and return the completed Escrow wrapper. + * @brief Build and return the completed Escrow wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Escrow diff --git a/include/xrpl/protocol_autogen/ledger_entries/FeeSettings.h b/include/xrpl/protocol_autogen/ledger_entries/FeeSettings.h index d3b381c9ba..e3c9ca0091 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/FeeSettings.h +++ b/include/xrpl/protocol_autogen/ledger_entries/FeeSettings.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class FeeSettingsBuilder; /** - * Ledger Entry: FeeSettings + * @brief Ledger Entry: FeeSettings + * * Type: ltFEE_SETTINGS (0x0073) * RPC Name: fee * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltFEE_SETTINGS; /** - * Construct a FeeSettings ledger entry wrapper from an existing SLE object. + * @brief Construct a FeeSettings ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit FeeSettings(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfBaseFee (soeOPTIONAL) + * @brief Get sfBaseFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -57,6 +58,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBaseFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBaseFee() const @@ -65,7 +70,8 @@ public: } /** - * Get sfReferenceFeeUnits (soeOPTIONAL) + * @brief Get sfReferenceFeeUnits (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -76,6 +82,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReferenceFeeUnits is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReferenceFeeUnits() const @@ -84,7 +94,8 @@ public: } /** - * Get sfReserveBase (soeOPTIONAL) + * @brief Get sfReserveBase (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -95,6 +106,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveBase is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveBase() const @@ -103,7 +118,8 @@ public: } /** - * Get sfReserveIncrement (soeOPTIONAL) + * @brief Get sfReserveIncrement (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -114,6 +130,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveIncrement is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveIncrement() const @@ -122,7 +142,8 @@ public: } /** - * Get sfBaseFeeDrops (soeOPTIONAL) + * @brief Get sfBaseFeeDrops (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -133,6 +154,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBaseFeeDrops is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBaseFeeDrops() const @@ -141,7 +166,8 @@ public: } /** - * Get sfReserveBaseDrops (soeOPTIONAL) + * @brief Get sfReserveBaseDrops (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -152,6 +178,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveBaseDrops is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveBaseDrops() const @@ -160,7 +190,8 @@ public: } /** - * Get sfReserveIncrementDrops (soeOPTIONAL) + * @brief Get sfReserveIncrementDrops (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -171,6 +202,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveIncrementDrops is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveIncrementDrops() const @@ -179,7 +214,8 @@ public: } /** - * Get sfPreviousTxnID (soeOPTIONAL) + * @brief Get sfPreviousTxnID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -190,6 +226,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnID() const @@ -198,7 +238,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -209,6 +250,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnLgrSeq is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnLgrSeq() const @@ -218,7 +263,8 @@ public: }; /** - * Builder for FeeSettings ledger entries. + * @brief Builder for FeeSettings ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -226,11 +272,19 @@ public: class FeeSettingsBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new FeeSettingsBuilder with required fields. + */ FeeSettingsBuilder() : LedgerEntryBuilderBase(ltFEE_SETTINGS) { } + /** + * @brief Construct a FeeSettingsBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ FeeSettingsBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltFEE_SETTINGS) @@ -240,10 +294,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfBaseFee (soeOPTIONAL) + * @brief Set sfBaseFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -254,7 +308,7 @@ public: } /** - * Set sfReferenceFeeUnits (soeOPTIONAL) + * @brief Set sfReferenceFeeUnits (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -265,7 +319,7 @@ public: } /** - * Set sfReserveBase (soeOPTIONAL) + * @brief Set sfReserveBase (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -276,7 +330,7 @@ public: } /** - * Set sfReserveIncrement (soeOPTIONAL) + * @brief Set sfReserveIncrement (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -287,7 +341,7 @@ public: } /** - * Set sfBaseFeeDrops (soeOPTIONAL) + * @brief Set sfBaseFeeDrops (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -298,7 +352,7 @@ public: } /** - * Set sfReserveBaseDrops (soeOPTIONAL) + * @brief Set sfReserveBaseDrops (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -309,7 +363,7 @@ public: } /** - * Set sfReserveIncrementDrops (soeOPTIONAL) + * @brief Set sfReserveIncrementDrops (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -320,7 +374,7 @@ public: } /** - * Set sfPreviousTxnID (soeOPTIONAL) + * @brief Set sfPreviousTxnID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -331,7 +385,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Set sfPreviousTxnLgrSeq (soeOPTIONAL) * @return Reference to this builder for method chaining. */ FeeSettingsBuilder& @@ -342,7 +396,8 @@ public: } /** - * Build and return the completed FeeSettings wrapper. + * @brief Build and return the completed FeeSettings wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ FeeSettings diff --git a/include/xrpl/protocol_autogen/ledger_entries/LedgerHashes.h b/include/xrpl/protocol_autogen/ledger_entries/LedgerHashes.h index 33c78c5d69..c95ca303ba 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/LedgerHashes.h +++ b/include/xrpl/protocol_autogen/ledger_entries/LedgerHashes.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class LedgerHashesBuilder; /** - * Ledger Entry: LedgerHashes + * @brief Ledger Entry: LedgerHashes + * * Type: ltLEDGER_HASHES (0x0068) * RPC Name: hashes * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltLEDGER_HASHES; /** - * Construct a LedgerHashes ledger entry wrapper from an existing SLE object. + * @brief Construct a LedgerHashes ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit LedgerHashes(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfFirstLedgerSequence (soeOPTIONAL) + * @brief Get sfFirstLedgerSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -57,6 +58,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfFirstLedgerSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasFirstLedgerSequence() const @@ -65,7 +70,8 @@ public: } /** - * Get sfLastLedgerSequence (soeOPTIONAL) + * @brief Get sfLastLedgerSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -76,6 +82,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLastLedgerSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLastLedgerSequence() const @@ -84,7 +94,8 @@ public: } /** - * Get sfHashes (soeREQUIRED) + * @brief Get sfHashes (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VECTOR256::type::value_type @@ -95,7 +106,8 @@ public: }; /** - * Builder for LedgerHashes ledger entries. + * @brief Builder for LedgerHashes ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -103,12 +115,21 @@ public: class LedgerHashesBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new LedgerHashesBuilder with required fields. + * @param hashes The sfHashes field value. + */ LedgerHashesBuilder(std::decay_t const& hashes) : LedgerEntryBuilderBase(ltLEDGER_HASHES) { setHashes(hashes); } + /** + * @brief Construct a LedgerHashesBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ LedgerHashesBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltLEDGER_HASHES) @@ -118,10 +139,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfFirstLedgerSequence (soeOPTIONAL) + * @brief Set sfFirstLedgerSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LedgerHashesBuilder& @@ -132,7 +153,7 @@ public: } /** - * Set sfLastLedgerSequence (soeOPTIONAL) + * @brief Set sfLastLedgerSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LedgerHashesBuilder& @@ -143,7 +164,7 @@ public: } /** - * Set sfHashes (soeREQUIRED) + * @brief Set sfHashes (soeREQUIRED) * @return Reference to this builder for method chaining. */ LedgerHashesBuilder& @@ -154,7 +175,8 @@ public: } /** - * Build and return the completed LedgerHashes wrapper. + * @brief Build and return the completed LedgerHashes wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ LedgerHashes diff --git a/include/xrpl/protocol_autogen/ledger_entries/Loan.h b/include/xrpl/protocol_autogen/ledger_entries/Loan.h index 4e77700c6d..73b37ea892 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Loan.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Loan.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class LoanBuilder; /** - * Ledger Entry: Loan + * @brief Ledger Entry: Loan + * * Type: ltLOAN (0x0089) * RPC Name: loan * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltLOAN; /** - * Construct a Loan ledger entry wrapper from an existing SLE object. + * @brief Construct a Loan ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Loan(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfLoanBrokerNode (soeREQUIRED) + * @brief Get sfLoanBrokerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfLoanBrokerID (soeREQUIRED) + * @brief Get sfLoanBrokerID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfLoanSequence (soeREQUIRED) + * @brief Get sfLoanSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -106,7 +112,8 @@ public: } /** - * Get sfBorrower (soeREQUIRED) + * @brief Get sfBorrower (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -116,7 +123,8 @@ public: } /** - * Get sfLoanOriginationFee (soeDEFAULT) + * @brief Get sfLoanOriginationFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -127,6 +135,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanOriginationFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanOriginationFee() const @@ -135,7 +147,8 @@ public: } /** - * Get sfLoanServiceFee (soeDEFAULT) + * @brief Get sfLoanServiceFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -146,6 +159,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanServiceFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanServiceFee() const @@ -154,7 +171,8 @@ public: } /** - * Get sfLatePaymentFee (soeDEFAULT) + * @brief Get sfLatePaymentFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -165,6 +183,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLatePaymentFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLatePaymentFee() const @@ -173,7 +195,8 @@ public: } /** - * Get sfClosePaymentFee (soeDEFAULT) + * @brief Get sfClosePaymentFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -184,6 +207,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfClosePaymentFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasClosePaymentFee() const @@ -192,7 +219,8 @@ public: } /** - * Get sfOverpaymentFee (soeDEFAULT) + * @brief Get sfOverpaymentFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -203,6 +231,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOverpaymentFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOverpaymentFee() const @@ -211,7 +243,8 @@ public: } /** - * Get sfInterestRate (soeDEFAULT) + * @brief Get sfInterestRate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -222,6 +255,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasInterestRate() const @@ -230,7 +267,8 @@ public: } /** - * Get sfLateInterestRate (soeDEFAULT) + * @brief Get sfLateInterestRate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -241,6 +279,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLateInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLateInterestRate() const @@ -249,7 +291,8 @@ public: } /** - * Get sfCloseInterestRate (soeDEFAULT) + * @brief Get sfCloseInterestRate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -260,6 +303,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCloseInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCloseInterestRate() const @@ -268,7 +315,8 @@ public: } /** - * Get sfOverpaymentInterestRate (soeDEFAULT) + * @brief Get sfOverpaymentInterestRate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -279,6 +327,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOverpaymentInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOverpaymentInterestRate() const @@ -287,7 +339,8 @@ public: } /** - * Get sfStartDate (soeREQUIRED) + * @brief Get sfStartDate (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -297,7 +350,8 @@ public: } /** - * Get sfPaymentInterval (soeREQUIRED) + * @brief Get sfPaymentInterval (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -307,7 +361,8 @@ public: } /** - * Get sfGracePeriod (soeDEFAULT) + * @brief Get sfGracePeriod (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -318,6 +373,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfGracePeriod is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasGracePeriod() const @@ -326,7 +385,8 @@ public: } /** - * Get sfPreviousPaymentDueDate (soeDEFAULT) + * @brief Get sfPreviousPaymentDueDate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -337,6 +397,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousPaymentDueDate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousPaymentDueDate() const @@ -345,7 +409,8 @@ public: } /** - * Get sfNextPaymentDueDate (soeDEFAULT) + * @brief Get sfNextPaymentDueDate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -356,6 +421,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNextPaymentDueDate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNextPaymentDueDate() const @@ -364,7 +433,8 @@ public: } /** - * Get sfPaymentRemaining (soeDEFAULT) + * @brief Get sfPaymentRemaining (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -375,6 +445,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPaymentRemaining is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPaymentRemaining() const @@ -383,7 +457,8 @@ public: } /** - * Get sfPeriodicPayment (soeREQUIRED) + * @brief Get sfPeriodicPayment (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_NUMBER::type::value_type @@ -393,7 +468,8 @@ public: } /** - * Get sfPrincipalOutstanding (soeDEFAULT) + * @brief Get sfPrincipalOutstanding (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -404,6 +480,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPrincipalOutstanding is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPrincipalOutstanding() const @@ -412,7 +492,8 @@ public: } /** - * Get sfTotalValueOutstanding (soeDEFAULT) + * @brief Get sfTotalValueOutstanding (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -423,6 +504,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTotalValueOutstanding is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTotalValueOutstanding() const @@ -431,7 +516,8 @@ public: } /** - * Get sfManagementFeeOutstanding (soeDEFAULT) + * @brief Get sfManagementFeeOutstanding (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -442,6 +528,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfManagementFeeOutstanding is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasManagementFeeOutstanding() const @@ -450,7 +540,8 @@ public: } /** - * Get sfLoanScale (soeDEFAULT) + * @brief Get sfLoanScale (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -461,6 +552,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanScale is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanScale() const @@ -470,7 +565,8 @@ public: }; /** - * Builder for Loan ledger entries. + * @brief Builder for Loan ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -478,6 +574,19 @@ public: class LoanBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new LoanBuilder with required fields. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + * @param ownerNode The sfOwnerNode field value. + * @param loanBrokerNode The sfLoanBrokerNode field value. + * @param loanBrokerID The sfLoanBrokerID field value. + * @param loanSequence The sfLoanSequence field value. + * @param borrower The sfBorrower field value. + * @param startDate The sfStartDate field value. + * @param paymentInterval The sfPaymentInterval field value. + * @param periodicPayment The sfPeriodicPayment field value. + */ LoanBuilder(std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq,std::decay_t const& ownerNode,std::decay_t const& loanBrokerNode,std::decay_t const& loanBrokerID,std::decay_t const& loanSequence,std::decay_t const& borrower,std::decay_t const& startDate,std::decay_t const& paymentInterval,std::decay_t const& periodicPayment) : LedgerEntryBuilderBase(ltLOAN) { @@ -493,6 +602,11 @@ public: setPeriodicPayment(periodicPayment); } + /** + * @brief Construct a LoanBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ LoanBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltLOAN) @@ -502,10 +616,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -516,7 +630,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -527,7 +641,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -538,7 +652,7 @@ public: } /** - * Set sfLoanBrokerNode (soeREQUIRED) + * @brief Set sfLoanBrokerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -549,7 +663,7 @@ public: } /** - * Set sfLoanBrokerID (soeREQUIRED) + * @brief Set sfLoanBrokerID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -560,7 +674,7 @@ public: } /** - * Set sfLoanSequence (soeREQUIRED) + * @brief Set sfLoanSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -571,7 +685,7 @@ public: } /** - * Set sfBorrower (soeREQUIRED) + * @brief Set sfBorrower (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -582,7 +696,7 @@ public: } /** - * Set sfLoanOriginationFee (soeDEFAULT) + * @brief Set sfLoanOriginationFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -593,7 +707,7 @@ public: } /** - * Set sfLoanServiceFee (soeDEFAULT) + * @brief Set sfLoanServiceFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -604,7 +718,7 @@ public: } /** - * Set sfLatePaymentFee (soeDEFAULT) + * @brief Set sfLatePaymentFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -615,7 +729,7 @@ public: } /** - * Set sfClosePaymentFee (soeDEFAULT) + * @brief Set sfClosePaymentFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -626,7 +740,7 @@ public: } /** - * Set sfOverpaymentFee (soeDEFAULT) + * @brief Set sfOverpaymentFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -637,7 +751,7 @@ public: } /** - * Set sfInterestRate (soeDEFAULT) + * @brief Set sfInterestRate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -648,7 +762,7 @@ public: } /** - * Set sfLateInterestRate (soeDEFAULT) + * @brief Set sfLateInterestRate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -659,7 +773,7 @@ public: } /** - * Set sfCloseInterestRate (soeDEFAULT) + * @brief Set sfCloseInterestRate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -670,7 +784,7 @@ public: } /** - * Set sfOverpaymentInterestRate (soeDEFAULT) + * @brief Set sfOverpaymentInterestRate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -681,7 +795,7 @@ public: } /** - * Set sfStartDate (soeREQUIRED) + * @brief Set sfStartDate (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -692,7 +806,7 @@ public: } /** - * Set sfPaymentInterval (soeREQUIRED) + * @brief Set sfPaymentInterval (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -703,7 +817,7 @@ public: } /** - * Set sfGracePeriod (soeDEFAULT) + * @brief Set sfGracePeriod (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -714,7 +828,7 @@ public: } /** - * Set sfPreviousPaymentDueDate (soeDEFAULT) + * @brief Set sfPreviousPaymentDueDate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -725,7 +839,7 @@ public: } /** - * Set sfNextPaymentDueDate (soeDEFAULT) + * @brief Set sfNextPaymentDueDate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -736,7 +850,7 @@ public: } /** - * Set sfPaymentRemaining (soeDEFAULT) + * @brief Set sfPaymentRemaining (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -747,7 +861,7 @@ public: } /** - * Set sfPeriodicPayment (soeREQUIRED) + * @brief Set sfPeriodicPayment (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -758,7 +872,7 @@ public: } /** - * Set sfPrincipalOutstanding (soeDEFAULT) + * @brief Set sfPrincipalOutstanding (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -769,7 +883,7 @@ public: } /** - * Set sfTotalValueOutstanding (soeDEFAULT) + * @brief Set sfTotalValueOutstanding (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -780,7 +894,7 @@ public: } /** - * Set sfManagementFeeOutstanding (soeDEFAULT) + * @brief Set sfManagementFeeOutstanding (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -791,7 +905,7 @@ public: } /** - * Set sfLoanScale (soeDEFAULT) + * @brief Set sfLoanScale (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBuilder& @@ -802,7 +916,8 @@ public: } /** - * Build and return the completed Loan wrapper. + * @brief Build and return the completed Loan wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Loan diff --git a/include/xrpl/protocol_autogen/ledger_entries/LoanBroker.h b/include/xrpl/protocol_autogen/ledger_entries/LoanBroker.h index 32fbcbee65..99083d6fce 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/LoanBroker.h +++ b/include/xrpl/protocol_autogen/ledger_entries/LoanBroker.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class LoanBrokerBuilder; /** - * Ledger Entry: LoanBroker + * @brief Ledger Entry: LoanBroker + * * Type: ltLOAN_BROKER (0x0088) * RPC Name: loan_broker * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltLOAN_BROKER; /** - * Construct a LoanBroker ledger entry wrapper from an existing SLE object. + * @brief Construct a LoanBroker ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit LoanBroker(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfVaultNode (soeREQUIRED) + * @brief Get sfVaultNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -106,7 +112,8 @@ public: } /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -116,7 +123,8 @@ public: } /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -126,7 +134,8 @@ public: } /** - * Get sfLoanSequence (soeREQUIRED) + * @brief Get sfLoanSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -136,7 +145,8 @@ public: } /** - * Get sfData (soeDEFAULT) + * @brief Get sfData (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -147,6 +157,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -155,7 +169,8 @@ public: } /** - * Get sfManagementFeeRate (soeDEFAULT) + * @brief Get sfManagementFeeRate (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +181,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfManagementFeeRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasManagementFeeRate() const @@ -174,7 +193,8 @@ public: } /** - * Get sfOwnerCount (soeDEFAULT) + * @brief Get sfOwnerCount (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -185,6 +205,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwnerCount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwnerCount() const @@ -193,7 +217,8 @@ public: } /** - * Get sfDebtTotal (soeDEFAULT) + * @brief Get sfDebtTotal (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -204,6 +229,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDebtTotal is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDebtTotal() const @@ -212,7 +241,8 @@ public: } /** - * Get sfDebtMaximum (soeDEFAULT) + * @brief Get sfDebtMaximum (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -223,6 +253,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDebtMaximum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDebtMaximum() const @@ -231,7 +265,8 @@ public: } /** - * Get sfCoverAvailable (soeDEFAULT) + * @brief Get sfCoverAvailable (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -242,6 +277,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCoverAvailable is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCoverAvailable() const @@ -250,7 +289,8 @@ public: } /** - * Get sfCoverRateMinimum (soeDEFAULT) + * @brief Get sfCoverRateMinimum (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -261,6 +301,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCoverRateMinimum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCoverRateMinimum() const @@ -269,7 +313,8 @@ public: } /** - * Get sfCoverRateLiquidation (soeDEFAULT) + * @brief Get sfCoverRateLiquidation (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -280,6 +325,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCoverRateLiquidation is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCoverRateLiquidation() const @@ -289,7 +338,8 @@ public: }; /** - * Builder for LoanBroker ledger entries. + * @brief Builder for LoanBroker ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -297,6 +347,18 @@ public: class LoanBrokerBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new LoanBrokerBuilder with required fields. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + * @param sequence The sfSequence field value. + * @param ownerNode The sfOwnerNode field value. + * @param vaultNode The sfVaultNode field value. + * @param vaultID The sfVaultID field value. + * @param account The sfAccount field value. + * @param owner The sfOwner field value. + * @param loanSequence The sfLoanSequence field value. + */ LoanBrokerBuilder(std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq,std::decay_t const& sequence,std::decay_t const& ownerNode,std::decay_t const& vaultNode,std::decay_t const& vaultID,std::decay_t const& account,std::decay_t const& owner,std::decay_t const& loanSequence) : LedgerEntryBuilderBase(ltLOAN_BROKER) { @@ -311,6 +373,11 @@ public: setLoanSequence(loanSequence); } + /** + * @brief Construct a LoanBrokerBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ LoanBrokerBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltLOAN_BROKER) @@ -320,10 +387,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -334,7 +401,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -345,7 +412,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -356,7 +423,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -367,7 +434,7 @@ public: } /** - * Set sfVaultNode (soeREQUIRED) + * @brief Set sfVaultNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -378,7 +445,7 @@ public: } /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -389,7 +456,7 @@ public: } /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -400,7 +467,7 @@ public: } /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -411,7 +478,7 @@ public: } /** - * Set sfLoanSequence (soeREQUIRED) + * @brief Set sfLoanSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -422,7 +489,7 @@ public: } /** - * Set sfData (soeDEFAULT) + * @brief Set sfData (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -433,7 +500,7 @@ public: } /** - * Set sfManagementFeeRate (soeDEFAULT) + * @brief Set sfManagementFeeRate (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -444,7 +511,7 @@ public: } /** - * Set sfOwnerCount (soeDEFAULT) + * @brief Set sfOwnerCount (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -455,7 +522,7 @@ public: } /** - * Set sfDebtTotal (soeDEFAULT) + * @brief Set sfDebtTotal (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -466,7 +533,7 @@ public: } /** - * Set sfDebtMaximum (soeDEFAULT) + * @brief Set sfDebtMaximum (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -477,7 +544,7 @@ public: } /** - * Set sfCoverAvailable (soeDEFAULT) + * @brief Set sfCoverAvailable (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -488,7 +555,7 @@ public: } /** - * Set sfCoverRateMinimum (soeDEFAULT) + * @brief Set sfCoverRateMinimum (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -499,7 +566,7 @@ public: } /** - * Set sfCoverRateLiquidation (soeDEFAULT) + * @brief Set sfCoverRateLiquidation (soeDEFAULT) * @return Reference to this builder for method chaining. */ LoanBrokerBuilder& @@ -510,7 +577,8 @@ public: } /** - * Build and return the completed LoanBroker wrapper. + * @brief Build and return the completed LoanBroker wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ LoanBroker diff --git a/include/xrpl/protocol_autogen/ledger_entries/MPToken.h b/include/xrpl/protocol_autogen/ledger_entries/MPToken.h index 055f36ea4f..d11a8effd3 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/MPToken.h +++ b/include/xrpl/protocol_autogen/ledger_entries/MPToken.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class MPTokenBuilder; /** - * Ledger Entry: MPToken + * @brief Ledger Entry: MPToken + * * Type: ltMPTOKEN (0x007f) * RPC Name: mptoken * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltMPTOKEN; /** - * Construct a MPToken ledger entry wrapper from an existing SLE object. + * @brief Construct a MPToken ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit MPToken(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfMPTokenIssuanceID (soeREQUIRED) + * @brief Get sfMPTokenIssuanceID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT192::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfMPTAmount (soeDEFAULT) + * @brief Get sfMPTAmount (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -77,6 +80,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMPTAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMPTAmount() const @@ -85,7 +92,8 @@ public: } /** - * Get sfLockedAmount (soeOPTIONAL) + * @brief Get sfLockedAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -96,6 +104,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLockedAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLockedAmount() const @@ -104,7 +116,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -114,7 +127,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -124,7 +138,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -135,7 +150,8 @@ public: }; /** - * Builder for MPToken ledger entries. + * @brief Builder for MPToken ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -143,6 +159,14 @@ public: class MPTokenBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new MPTokenBuilder with required fields. + * @param account The sfAccount field value. + * @param mPTokenIssuanceID The sfMPTokenIssuanceID field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ MPTokenBuilder(std::decay_t const& account,std::decay_t const& mPTokenIssuanceID,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltMPTOKEN) { @@ -153,6 +177,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a MPTokenBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ MPTokenBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltMPTOKEN) @@ -162,10 +191,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -176,7 +205,7 @@ public: } /** - * Set sfMPTokenIssuanceID (soeREQUIRED) + * @brief Set sfMPTokenIssuanceID (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -187,7 +216,7 @@ public: } /** - * Set sfMPTAmount (soeDEFAULT) + * @brief Set sfMPTAmount (soeDEFAULT) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -198,7 +227,7 @@ public: } /** - * Set sfLockedAmount (soeOPTIONAL) + * @brief Set sfLockedAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -209,7 +238,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -220,7 +249,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -231,7 +260,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenBuilder& @@ -242,7 +271,8 @@ public: } /** - * Build and return the completed MPToken wrapper. + * @brief Build and return the completed MPToken wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ MPToken diff --git a/include/xrpl/protocol_autogen/ledger_entries/MPTokenIssuance.h b/include/xrpl/protocol_autogen/ledger_entries/MPTokenIssuance.h index 5afd49f0b2..23b8a05015 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/MPTokenIssuance.h +++ b/include/xrpl/protocol_autogen/ledger_entries/MPTokenIssuance.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class MPTokenIssuanceBuilder; /** - * Ledger Entry: MPTokenIssuance + * @brief Ledger Entry: MPTokenIssuance + * * Type: ltMPTOKEN_ISSUANCE (0x007e) * RPC Name: mpt_issuance * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltMPTOKEN_ISSUANCE; /** - * Construct a MPTokenIssuance ledger entry wrapper from an existing SLE object. + * @brief Construct a MPTokenIssuance ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit MPTokenIssuance(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfIssuer (soeREQUIRED) + * @brief Get sfIssuer (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfTransferFee (soeDEFAULT) + * @brief Get sfTransferFee (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -77,6 +80,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferFee() const @@ -85,7 +92,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -95,7 +103,8 @@ public: } /** - * Get sfAssetScale (soeDEFAULT) + * @brief Get sfAssetScale (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -106,6 +115,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetScale is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetScale() const @@ -114,7 +127,8 @@ public: } /** - * Get sfMaximumAmount (soeOPTIONAL) + * @brief Get sfMaximumAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -125,6 +139,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMaximumAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMaximumAmount() const @@ -133,7 +151,8 @@ public: } /** - * Get sfOutstandingAmount (soeREQUIRED) + * @brief Get sfOutstandingAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -143,7 +162,8 @@ public: } /** - * Get sfLockedAmount (soeOPTIONAL) + * @brief Get sfLockedAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -154,6 +174,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLockedAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLockedAmount() const @@ -162,7 +186,8 @@ public: } /** - * Get sfMPTokenMetadata (soeOPTIONAL) + * @brief Get sfMPTokenMetadata (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -173,6 +198,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMPTokenMetadata is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMPTokenMetadata() const @@ -181,7 +210,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -191,7 +221,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -201,7 +232,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -212,6 +244,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -220,7 +256,8 @@ public: } /** - * Get sfMutableFlags (soeDEFAULT) + * @brief Get sfMutableFlags (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -231,6 +268,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMutableFlags is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMutableFlags() const @@ -240,7 +281,8 @@ public: }; /** - * Builder for MPTokenIssuance ledger entries. + * @brief Builder for MPTokenIssuance ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -248,6 +290,15 @@ public: class MPTokenIssuanceBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new MPTokenIssuanceBuilder with required fields. + * @param issuer The sfIssuer field value. + * @param sequence The sfSequence field value. + * @param ownerNode The sfOwnerNode field value. + * @param outstandingAmount The sfOutstandingAmount field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ MPTokenIssuanceBuilder(std::decay_t const& issuer,std::decay_t const& sequence,std::decay_t const& ownerNode,std::decay_t const& outstandingAmount,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltMPTOKEN_ISSUANCE) { @@ -259,6 +310,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a MPTokenIssuanceBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ MPTokenIssuanceBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltMPTOKEN_ISSUANCE) @@ -268,10 +324,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfIssuer (soeREQUIRED) + * @brief Set sfIssuer (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -282,7 +338,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -293,7 +349,7 @@ public: } /** - * Set sfTransferFee (soeDEFAULT) + * @brief Set sfTransferFee (soeDEFAULT) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -304,7 +360,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -315,7 +371,7 @@ public: } /** - * Set sfAssetScale (soeDEFAULT) + * @brief Set sfAssetScale (soeDEFAULT) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -326,7 +382,7 @@ public: } /** - * Set sfMaximumAmount (soeOPTIONAL) + * @brief Set sfMaximumAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -337,7 +393,7 @@ public: } /** - * Set sfOutstandingAmount (soeREQUIRED) + * @brief Set sfOutstandingAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -348,7 +404,7 @@ public: } /** - * Set sfLockedAmount (soeOPTIONAL) + * @brief Set sfLockedAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -359,7 +415,7 @@ public: } /** - * Set sfMPTokenMetadata (soeOPTIONAL) + * @brief Set sfMPTokenMetadata (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -370,7 +426,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -381,7 +437,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -392,7 +448,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -403,7 +459,7 @@ public: } /** - * Set sfMutableFlags (soeDEFAULT) + * @brief Set sfMutableFlags (soeDEFAULT) * @return Reference to this builder for method chaining. */ MPTokenIssuanceBuilder& @@ -414,7 +470,8 @@ public: } /** - * Build and return the completed MPTokenIssuance wrapper. + * @brief Build and return the completed MPTokenIssuance wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ MPTokenIssuance diff --git a/include/xrpl/protocol_autogen/ledger_entries/NFTokenOffer.h b/include/xrpl/protocol_autogen/ledger_entries/NFTokenOffer.h index bc9a4227b6..c500cde14c 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/NFTokenOffer.h +++ b/include/xrpl/protocol_autogen/ledger_entries/NFTokenOffer.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class NFTokenOfferBuilder; /** - * Ledger Entry: NFTokenOffer + * @brief Ledger Entry: NFTokenOffer + * * Type: ltNFTOKEN_OFFER (0x0037) * RPC Name: nft_offer * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltNFTOKEN_OFFER; /** - * Construct a NFTokenOffer ledger entry wrapper from an existing SLE object. + * @brief Construct a NFTokenOffer ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit NFTokenOffer(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfNFTokenID (soeREQUIRED) + * @brief Get sfNFTokenID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfNFTokenOfferNode (soeREQUIRED) + * @brief Get sfNFTokenOfferNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfDestination (soeOPTIONAL) + * @brief Get sfDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -107,6 +113,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestination() const @@ -115,7 +125,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -126,6 +137,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -134,7 +149,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -144,7 +160,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -155,7 +172,8 @@ public: }; /** - * Builder for NFTokenOffer ledger entries. + * @brief Builder for NFTokenOffer ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -163,6 +181,16 @@ public: class NFTokenOfferBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new NFTokenOfferBuilder with required fields. + * @param owner The sfOwner field value. + * @param nFTokenID The sfNFTokenID field value. + * @param amount The sfAmount field value. + * @param ownerNode The sfOwnerNode field value. + * @param nFTokenOfferNode The sfNFTokenOfferNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ NFTokenOfferBuilder(std::decay_t const& owner,std::decay_t const& nFTokenID,std::decay_t const& amount,std::decay_t const& ownerNode,std::decay_t const& nFTokenOfferNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltNFTOKEN_OFFER) { @@ -175,6 +203,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a NFTokenOfferBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ NFTokenOfferBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltNFTOKEN_OFFER) @@ -184,10 +217,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -198,7 +231,7 @@ public: } /** - * Set sfNFTokenID (soeREQUIRED) + * @brief Set sfNFTokenID (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -209,7 +242,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -220,7 +253,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -231,7 +264,7 @@ public: } /** - * Set sfNFTokenOfferNode (soeREQUIRED) + * @brief Set sfNFTokenOfferNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -242,7 +275,7 @@ public: } /** - * Set sfDestination (soeOPTIONAL) + * @brief Set sfDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -253,7 +286,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -264,7 +297,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -275,7 +308,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenOfferBuilder& @@ -286,7 +319,8 @@ public: } /** - * Build and return the completed NFTokenOffer wrapper. + * @brief Build and return the completed NFTokenOffer wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ NFTokenOffer diff --git a/include/xrpl/protocol_autogen/ledger_entries/NFTokenPage.h b/include/xrpl/protocol_autogen/ledger_entries/NFTokenPage.h index 2623dc8cd4..fa8c415495 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/NFTokenPage.h +++ b/include/xrpl/protocol_autogen/ledger_entries/NFTokenPage.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class NFTokenPageBuilder; /** - * Ledger Entry: NFTokenPage + * @brief Ledger Entry: NFTokenPage + * * Type: ltNFTOKEN_PAGE (0x0050) * RPC Name: nft_page * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltNFTOKEN_PAGE; /** - * Construct a NFTokenPage ledger entry wrapper from an existing SLE object. + * @brief Construct a NFTokenPage ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit NFTokenPage(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfPreviousPageMin (soeOPTIONAL) + * @brief Get sfPreviousPageMin (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -57,6 +58,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousPageMin is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousPageMin() const @@ -65,7 +70,8 @@ public: } /** - * Get sfNextPageMin (soeOPTIONAL) + * @brief Get sfNextPageMin (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -76,6 +82,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNextPageMin is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNextPageMin() const @@ -84,8 +94,9 @@ public: } /** - * Get sfNFTokens (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfNFTokens (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -95,7 +106,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -105,7 +117,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -116,7 +129,8 @@ public: }; /** - * Builder for NFTokenPage ledger entries. + * @brief Builder for NFTokenPage ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -124,6 +138,12 @@ public: class NFTokenPageBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new NFTokenPageBuilder with required fields. + * @param nFTokens The sfNFTokens field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ NFTokenPageBuilder(STArray const& nFTokens,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltNFTOKEN_PAGE) { @@ -132,6 +152,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a NFTokenPageBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ NFTokenPageBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltNFTOKEN_PAGE) @@ -141,10 +166,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfPreviousPageMin (soeOPTIONAL) + * @brief Set sfPreviousPageMin (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenPageBuilder& @@ -155,7 +180,7 @@ public: } /** - * Set sfNextPageMin (soeOPTIONAL) + * @brief Set sfNextPageMin (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenPageBuilder& @@ -166,7 +191,7 @@ public: } /** - * Set sfNFTokens (soeREQUIRED) + * @brief Set sfNFTokens (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenPageBuilder& @@ -177,7 +202,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenPageBuilder& @@ -188,7 +213,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenPageBuilder& @@ -199,7 +224,8 @@ public: } /** - * Build and return the completed NFTokenPage wrapper. + * @brief Build and return the completed NFTokenPage wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ NFTokenPage diff --git a/include/xrpl/protocol_autogen/ledger_entries/NegativeUNL.h b/include/xrpl/protocol_autogen/ledger_entries/NegativeUNL.h index 7a9348fc1e..8ac2db5683 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/NegativeUNL.h +++ b/include/xrpl/protocol_autogen/ledger_entries/NegativeUNL.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class NegativeUNLBuilder; /** - * Ledger Entry: NegativeUNL + * @brief Ledger Entry: NegativeUNL + * * Type: ltNEGATIVE_UNL (0x004e) * RPC Name: nunl * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltNEGATIVE_UNL; /** - * Construct a NegativeUNL ledger entry wrapper from an existing SLE object. + * @brief Construct a NegativeUNL ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit NegativeUNL(std::shared_ptr sle) @@ -46,8 +46,9 @@ public: // Ledger entry-specific field getters /** - * Get sfDisabledValidators (soeOPTIONAL) - * Note: This is an untyped field (unknown). + * @brief Get sfDisabledValidators (soeOPTIONAL) + * @note This is an untyped field (unknown). + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -58,6 +59,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDisabledValidators is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDisabledValidators() const @@ -66,7 +71,8 @@ public: } /** - * Get sfValidatorToDisable (soeOPTIONAL) + * @brief Get sfValidatorToDisable (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -77,6 +83,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfValidatorToDisable is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasValidatorToDisable() const @@ -85,7 +95,8 @@ public: } /** - * Get sfValidatorToReEnable (soeOPTIONAL) + * @brief Get sfValidatorToReEnable (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -96,6 +107,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfValidatorToReEnable is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasValidatorToReEnable() const @@ -104,7 +119,8 @@ public: } /** - * Get sfPreviousTxnID (soeOPTIONAL) + * @brief Get sfPreviousTxnID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -115,6 +131,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnID() const @@ -123,7 +143,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Get sfPreviousTxnLgrSeq (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -134,6 +155,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPreviousTxnLgrSeq is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPreviousTxnLgrSeq() const @@ -143,7 +168,8 @@ public: }; /** - * Builder for NegativeUNL ledger entries. + * @brief Builder for NegativeUNL ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -151,11 +177,19 @@ public: class NegativeUNLBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new NegativeUNLBuilder with required fields. + */ NegativeUNLBuilder() : LedgerEntryBuilderBase(ltNEGATIVE_UNL) { } + /** + * @brief Construct a NegativeUNLBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ NegativeUNLBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltNEGATIVE_UNL) @@ -165,10 +199,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfDisabledValidators (soeOPTIONAL) + * @brief Set sfDisabledValidators (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NegativeUNLBuilder& @@ -179,7 +213,7 @@ public: } /** - * Set sfValidatorToDisable (soeOPTIONAL) + * @brief Set sfValidatorToDisable (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NegativeUNLBuilder& @@ -190,7 +224,7 @@ public: } /** - * Set sfValidatorToReEnable (soeOPTIONAL) + * @brief Set sfValidatorToReEnable (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NegativeUNLBuilder& @@ -201,7 +235,7 @@ public: } /** - * Set sfPreviousTxnID (soeOPTIONAL) + * @brief Set sfPreviousTxnID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NegativeUNLBuilder& @@ -212,7 +246,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeOPTIONAL) + * @brief Set sfPreviousTxnLgrSeq (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NegativeUNLBuilder& @@ -223,7 +257,8 @@ public: } /** - * Build and return the completed NegativeUNL wrapper. + * @brief Build and return the completed NegativeUNL wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ NegativeUNL diff --git a/include/xrpl/protocol_autogen/ledger_entries/Offer.h b/include/xrpl/protocol_autogen/ledger_entries/Offer.h index 6dc4d6ff38..cccd9183a1 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Offer.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Offer.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class OfferBuilder; /** - * Ledger Entry: Offer + * @brief Ledger Entry: Offer + * * Type: ltOFFER (0x006f) * RPC Name: offer * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltOFFER; /** - * Construct a Offer ledger entry wrapper from an existing SLE object. + * @brief Construct a Offer ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Offer(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfTakerPays (soeREQUIRED) + * @brief Get sfTakerPays (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfTakerGets (soeREQUIRED) + * @brief Get sfTakerGets (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfBookDirectory (soeREQUIRED) + * @brief Get sfBookDirectory (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfBookNode (soeREQUIRED) + * @brief Get sfBookNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -106,7 +112,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -116,7 +123,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -126,7 +134,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -136,7 +145,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -147,6 +157,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -155,7 +169,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +181,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -174,8 +193,9 @@ public: } /** - * Get sfAdditionalBooks (soeOPTIONAL) - * Note: This is an untyped field (unknown). + * @brief Get sfAdditionalBooks (soeOPTIONAL) + * @note This is an untyped field (unknown). + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -186,6 +206,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAdditionalBooks is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAdditionalBooks() const @@ -195,7 +219,8 @@ public: }; /** - * Builder for Offer ledger entries. + * @brief Builder for Offer ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -203,6 +228,18 @@ public: class OfferBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new OfferBuilder with required fields. + * @param account The sfAccount field value. + * @param sequence The sfSequence field value. + * @param takerPays The sfTakerPays field value. + * @param takerGets The sfTakerGets field value. + * @param bookDirectory The sfBookDirectory field value. + * @param bookNode The sfBookNode field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ OfferBuilder(std::decay_t const& account,std::decay_t const& sequence,std::decay_t const& takerPays,std::decay_t const& takerGets,std::decay_t const& bookDirectory,std::decay_t const& bookNode,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltOFFER) { @@ -217,6 +254,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a OfferBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ OfferBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltOFFER) @@ -226,10 +268,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -240,7 +282,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -251,7 +293,7 @@ public: } /** - * Set sfTakerPays (soeREQUIRED) + * @brief Set sfTakerPays (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -262,7 +304,7 @@ public: } /** - * Set sfTakerGets (soeREQUIRED) + * @brief Set sfTakerGets (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -273,7 +315,7 @@ public: } /** - * Set sfBookDirectory (soeREQUIRED) + * @brief Set sfBookDirectory (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -284,7 +326,7 @@ public: } /** - * Set sfBookNode (soeREQUIRED) + * @brief Set sfBookNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -295,7 +337,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -306,7 +348,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -317,7 +359,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -328,7 +370,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -339,7 +381,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -350,7 +392,7 @@ public: } /** - * Set sfAdditionalBooks (soeOPTIONAL) + * @brief Set sfAdditionalBooks (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OfferBuilder& @@ -361,7 +403,8 @@ public: } /** - * Build and return the completed Offer wrapper. + * @brief Build and return the completed Offer wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Offer diff --git a/include/xrpl/protocol_autogen/ledger_entries/Oracle.h b/include/xrpl/protocol_autogen/ledger_entries/Oracle.h index 7fccf13a06..4da93773e6 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Oracle.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Oracle.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class OracleBuilder; /** - * Ledger Entry: Oracle + * @brief Ledger Entry: Oracle + * * Type: ltORACLE (0x0080) * RPC Name: oracle * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltORACLE; /** - * Construct a Oracle ledger entry wrapper from an existing SLE object. + * @brief Construct a Oracle ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Oracle(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfOracleDocumentID (soeOPTIONAL) + * @brief Get sfOracleDocumentID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -67,6 +69,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOracleDocumentID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOracleDocumentID() const @@ -75,7 +81,8 @@ public: } /** - * Get sfProvider (soeREQUIRED) + * @brief Get sfProvider (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -85,8 +92,9 @@ public: } /** - * Get sfPriceDataSeries (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfPriceDataSeries (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -96,7 +104,8 @@ public: } /** - * Get sfAssetClass (soeREQUIRED) + * @brief Get sfAssetClass (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -106,7 +115,8 @@ public: } /** - * Get sfLastUpdateTime (soeREQUIRED) + * @brief Get sfLastUpdateTime (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -116,7 +126,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -127,6 +138,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -135,7 +150,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -145,7 +161,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -155,7 +172,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -166,7 +184,8 @@ public: }; /** - * Builder for Oracle ledger entries. + * @brief Builder for Oracle ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -174,6 +193,17 @@ public: class OracleBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new OracleBuilder with required fields. + * @param owner The sfOwner field value. + * @param provider The sfProvider field value. + * @param priceDataSeries The sfPriceDataSeries field value. + * @param assetClass The sfAssetClass field value. + * @param lastUpdateTime The sfLastUpdateTime field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ OracleBuilder(std::decay_t const& owner,std::decay_t const& provider,STArray const& priceDataSeries,std::decay_t const& assetClass,std::decay_t const& lastUpdateTime,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltORACLE) { @@ -187,6 +217,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a OracleBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ OracleBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltORACLE) @@ -196,10 +231,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -210,7 +245,7 @@ public: } /** - * Set sfOracleDocumentID (soeOPTIONAL) + * @brief Set sfOracleDocumentID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -221,7 +256,7 @@ public: } /** - * Set sfProvider (soeREQUIRED) + * @brief Set sfProvider (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -232,7 +267,7 @@ public: } /** - * Set sfPriceDataSeries (soeREQUIRED) + * @brief Set sfPriceDataSeries (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -243,7 +278,7 @@ public: } /** - * Set sfAssetClass (soeREQUIRED) + * @brief Set sfAssetClass (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -254,7 +289,7 @@ public: } /** - * Set sfLastUpdateTime (soeREQUIRED) + * @brief Set sfLastUpdateTime (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -265,7 +300,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -276,7 +311,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -287,7 +322,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -298,7 +333,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleBuilder& @@ -309,7 +344,8 @@ public: } /** - * Build and return the completed Oracle wrapper. + * @brief Build and return the completed Oracle wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Oracle diff --git a/include/xrpl/protocol_autogen/ledger_entries/PayChannel.h b/include/xrpl/protocol_autogen/ledger_entries/PayChannel.h index 6219d6700a..50245bc0d8 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/PayChannel.h +++ b/include/xrpl/protocol_autogen/ledger_entries/PayChannel.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class PayChannelBuilder; /** - * Ledger Entry: PayChannel + * @brief Ledger Entry: PayChannel + * * Type: ltPAYCHAN (0x0078) * RPC Name: payment_channel * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltPAYCHAN; /** - * Construct a PayChannel ledger entry wrapper from an existing SLE object. + * @brief Construct a PayChannel ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit PayChannel(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfSequence (soeOPTIONAL) + * @brief Get sfSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -77,6 +80,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSequence() const @@ -85,7 +92,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -95,7 +103,8 @@ public: } /** - * Get sfBalance (soeREQUIRED) + * @brief Get sfBalance (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -105,7 +114,8 @@ public: } /** - * Get sfPublicKey (soeREQUIRED) + * @brief Get sfPublicKey (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -115,7 +125,8 @@ public: } /** - * Get sfSettleDelay (soeREQUIRED) + * @brief Get sfSettleDelay (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -125,7 +136,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -136,6 +148,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -144,7 +160,8 @@ public: } /** - * Get sfCancelAfter (soeOPTIONAL) + * @brief Get sfCancelAfter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +172,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCancelAfter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCancelAfter() const @@ -163,7 +184,8 @@ public: } /** - * Get sfSourceTag (soeOPTIONAL) + * @brief Get sfSourceTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -174,6 +196,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSourceTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSourceTag() const @@ -182,7 +208,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -193,6 +220,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -201,7 +232,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -211,7 +243,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -221,7 +254,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -231,7 +265,8 @@ public: } /** - * Get sfDestinationNode (soeOPTIONAL) + * @brief Get sfDestinationNode (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -242,6 +277,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationNode is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationNode() const @@ -251,7 +290,8 @@ public: }; /** - * Builder for PayChannel ledger entries. + * @brief Builder for PayChannel ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -259,6 +299,18 @@ public: class PayChannelBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new PayChannelBuilder with required fields. + * @param account The sfAccount field value. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param balance The sfBalance field value. + * @param publicKey The sfPublicKey field value. + * @param settleDelay The sfSettleDelay field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ PayChannelBuilder(std::decay_t const& account,std::decay_t const& destination,std::decay_t const& amount,std::decay_t const& balance,std::decay_t const& publicKey,std::decay_t const& settleDelay,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltPAYCHAN) { @@ -273,6 +325,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a PayChannelBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ PayChannelBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltPAYCHAN) @@ -282,10 +339,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -296,7 +353,7 @@ public: } /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -307,7 +364,7 @@ public: } /** - * Set sfSequence (soeOPTIONAL) + * @brief Set sfSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -318,7 +375,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -329,7 +386,7 @@ public: } /** - * Set sfBalance (soeREQUIRED) + * @brief Set sfBalance (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -340,7 +397,7 @@ public: } /** - * Set sfPublicKey (soeREQUIRED) + * @brief Set sfPublicKey (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -351,7 +408,7 @@ public: } /** - * Set sfSettleDelay (soeREQUIRED) + * @brief Set sfSettleDelay (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -362,7 +419,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -373,7 +430,7 @@ public: } /** - * Set sfCancelAfter (soeOPTIONAL) + * @brief Set sfCancelAfter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -384,7 +441,7 @@ public: } /** - * Set sfSourceTag (soeOPTIONAL) + * @brief Set sfSourceTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -395,7 +452,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -406,7 +463,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -417,7 +474,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -428,7 +485,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -439,7 +496,7 @@ public: } /** - * Set sfDestinationNode (soeOPTIONAL) + * @brief Set sfDestinationNode (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PayChannelBuilder& @@ -450,7 +507,8 @@ public: } /** - * Build and return the completed PayChannel wrapper. + * @brief Build and return the completed PayChannel wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ PayChannel diff --git a/include/xrpl/protocol_autogen/ledger_entries/PermissionedDomain.h b/include/xrpl/protocol_autogen/ledger_entries/PermissionedDomain.h index e528e30cfd..630f46517f 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/PermissionedDomain.h +++ b/include/xrpl/protocol_autogen/ledger_entries/PermissionedDomain.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class PermissionedDomainBuilder; /** - * Ledger Entry: PermissionedDomain + * @brief Ledger Entry: PermissionedDomain + * * Type: ltPERMISSIONED_DOMAIN (0x0082) * RPC Name: permissioned_domain * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltPERMISSIONED_DOMAIN; /** - * Construct a PermissionedDomain ledger entry wrapper from an existing SLE object. + * @brief Construct a PermissionedDomain ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit PermissionedDomain(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,8 +68,9 @@ public: } /** - * Get sfAcceptedCredentials (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfAcceptedCredentials (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -77,7 +80,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -87,7 +91,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -97,7 +102,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -108,7 +114,8 @@ public: }; /** - * Builder for PermissionedDomain ledger entries. + * @brief Builder for PermissionedDomain ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -116,6 +123,15 @@ public: class PermissionedDomainBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new PermissionedDomainBuilder with required fields. + * @param owner The sfOwner field value. + * @param sequence The sfSequence field value. + * @param acceptedCredentials The sfAcceptedCredentials field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ PermissionedDomainBuilder(std::decay_t const& owner,std::decay_t const& sequence,STArray const& acceptedCredentials,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltPERMISSIONED_DOMAIN) { @@ -127,6 +143,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a PermissionedDomainBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ PermissionedDomainBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltPERMISSIONED_DOMAIN) @@ -136,10 +157,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainBuilder& @@ -150,7 +171,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainBuilder& @@ -161,7 +182,7 @@ public: } /** - * Set sfAcceptedCredentials (soeREQUIRED) + * @brief Set sfAcceptedCredentials (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainBuilder& @@ -172,7 +193,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainBuilder& @@ -183,7 +204,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainBuilder& @@ -194,7 +215,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainBuilder& @@ -205,7 +226,8 @@ public: } /** - * Build and return the completed PermissionedDomain wrapper. + * @brief Build and return the completed PermissionedDomain wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ PermissionedDomain diff --git a/include/xrpl/protocol_autogen/ledger_entries/RippleState.h b/include/xrpl/protocol_autogen/ledger_entries/RippleState.h index aa64748aea..993496d38f 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/RippleState.h +++ b/include/xrpl/protocol_autogen/ledger_entries/RippleState.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class RippleStateBuilder; /** - * Ledger Entry: RippleState + * @brief Ledger Entry: RippleState + * * Type: ltRIPPLE_STATE (0x0072) * RPC Name: state * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltRIPPLE_STATE; /** - * Construct a RippleState ledger entry wrapper from an existing SLE object. + * @brief Construct a RippleState ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit RippleState(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfBalance (soeREQUIRED) + * @brief Get sfBalance (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfLowLimit (soeREQUIRED) + * @brief Get sfLowLimit (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfHighLimit (soeREQUIRED) + * @brief Get sfHighLimit (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfLowNode (soeOPTIONAL) + * @brief Get sfLowNode (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -107,6 +113,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLowNode is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLowNode() const @@ -115,7 +125,8 @@ public: } /** - * Get sfLowQualityIn (soeOPTIONAL) + * @brief Get sfLowQualityIn (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -126,6 +137,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLowQualityIn is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLowQualityIn() const @@ -134,7 +149,8 @@ public: } /** - * Get sfLowQualityOut (soeOPTIONAL) + * @brief Get sfLowQualityOut (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -145,6 +161,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLowQualityOut is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLowQualityOut() const @@ -153,7 +173,8 @@ public: } /** - * Get sfHighNode (soeOPTIONAL) + * @brief Get sfHighNode (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -164,6 +185,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfHighNode is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasHighNode() const @@ -172,7 +197,8 @@ public: } /** - * Get sfHighQualityIn (soeOPTIONAL) + * @brief Get sfHighQualityIn (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -183,6 +209,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfHighQualityIn is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasHighQualityIn() const @@ -191,7 +221,8 @@ public: } /** - * Get sfHighQualityOut (soeOPTIONAL) + * @brief Get sfHighQualityOut (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -202,6 +233,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfHighQualityOut is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasHighQualityOut() const @@ -211,7 +246,8 @@ public: }; /** - * Builder for RippleState ledger entries. + * @brief Builder for RippleState ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -219,6 +255,14 @@ public: class RippleStateBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new RippleStateBuilder with required fields. + * @param balance The sfBalance field value. + * @param lowLimit The sfLowLimit field value. + * @param highLimit The sfHighLimit field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ RippleStateBuilder(std::decay_t const& balance,std::decay_t const& lowLimit,std::decay_t const& highLimit,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltRIPPLE_STATE) { @@ -229,6 +273,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a RippleStateBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ RippleStateBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltRIPPLE_STATE) @@ -238,10 +287,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfBalance (soeREQUIRED) + * @brief Set sfBalance (soeREQUIRED) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -252,7 +301,7 @@ public: } /** - * Set sfLowLimit (soeREQUIRED) + * @brief Set sfLowLimit (soeREQUIRED) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -263,7 +312,7 @@ public: } /** - * Set sfHighLimit (soeREQUIRED) + * @brief Set sfHighLimit (soeREQUIRED) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -274,7 +323,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -285,7 +334,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -296,7 +345,7 @@ public: } /** - * Set sfLowNode (soeOPTIONAL) + * @brief Set sfLowNode (soeOPTIONAL) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -307,7 +356,7 @@ public: } /** - * Set sfLowQualityIn (soeOPTIONAL) + * @brief Set sfLowQualityIn (soeOPTIONAL) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -318,7 +367,7 @@ public: } /** - * Set sfLowQualityOut (soeOPTIONAL) + * @brief Set sfLowQualityOut (soeOPTIONAL) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -329,7 +378,7 @@ public: } /** - * Set sfHighNode (soeOPTIONAL) + * @brief Set sfHighNode (soeOPTIONAL) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -340,7 +389,7 @@ public: } /** - * Set sfHighQualityIn (soeOPTIONAL) + * @brief Set sfHighQualityIn (soeOPTIONAL) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -351,7 +400,7 @@ public: } /** - * Set sfHighQualityOut (soeOPTIONAL) + * @brief Set sfHighQualityOut (soeOPTIONAL) * @return Reference to this builder for method chaining. */ RippleStateBuilder& @@ -362,7 +411,8 @@ public: } /** - * Build and return the completed RippleState wrapper. + * @brief Build and return the completed RippleState wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ RippleState diff --git a/include/xrpl/protocol_autogen/ledger_entries/SignerList.h b/include/xrpl/protocol_autogen/ledger_entries/SignerList.h index 575606dbbd..57d706bc28 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/SignerList.h +++ b/include/xrpl/protocol_autogen/ledger_entries/SignerList.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class SignerListBuilder; /** - * Ledger Entry: SignerList + * @brief Ledger Entry: SignerList + * * Type: ltSIGNER_LIST (0x0053) * RPC Name: signer_list * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltSIGNER_LIST; /** - * Construct a SignerList ledger entry wrapper from an existing SLE object. + * @brief Construct a SignerList ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit SignerList(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfOwner (soeOPTIONAL) + * @brief Get sfOwner (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -57,6 +58,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwner is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwner() const @@ -65,7 +70,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -75,7 +81,8 @@ public: } /** - * Get sfSignerQuorum (soeREQUIRED) + * @brief Get sfSignerQuorum (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -85,8 +92,9 @@ public: } /** - * Get sfSignerEntries (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfSignerEntries (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -96,7 +104,8 @@ public: } /** - * Get sfSignerListID (soeREQUIRED) + * @brief Get sfSignerListID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -106,7 +115,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -116,7 +126,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -127,7 +138,8 @@ public: }; /** - * Builder for SignerList ledger entries. + * @brief Builder for SignerList ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -135,6 +147,15 @@ public: class SignerListBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new SignerListBuilder with required fields. + * @param ownerNode The sfOwnerNode field value. + * @param signerQuorum The sfSignerQuorum field value. + * @param signerEntries The sfSignerEntries field value. + * @param signerListID The sfSignerListID field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ SignerListBuilder(std::decay_t const& ownerNode,std::decay_t const& signerQuorum,STArray const& signerEntries,std::decay_t const& signerListID,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltSIGNER_LIST) { @@ -146,6 +167,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a SignerListBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ SignerListBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltSIGNER_LIST) @@ -155,10 +181,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfOwner (soeOPTIONAL) + * @brief Set sfOwner (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -169,7 +195,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -180,7 +206,7 @@ public: } /** - * Set sfSignerQuorum (soeREQUIRED) + * @brief Set sfSignerQuorum (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -191,7 +217,7 @@ public: } /** - * Set sfSignerEntries (soeREQUIRED) + * @brief Set sfSignerEntries (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -202,7 +228,7 @@ public: } /** - * Set sfSignerListID (soeREQUIRED) + * @brief Set sfSignerListID (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -213,7 +239,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -224,7 +250,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListBuilder& @@ -235,7 +261,8 @@ public: } /** - * Build and return the completed SignerList wrapper. + * @brief Build and return the completed SignerList wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ SignerList diff --git a/include/xrpl/protocol_autogen/ledger_entries/Ticket.h b/include/xrpl/protocol_autogen/ledger_entries/Ticket.h index 711d11de95..f13e8a398f 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Ticket.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Ticket.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class TicketBuilder; /** - * Ledger Entry: Ticket + * @brief Ledger Entry: Ticket + * * Type: ltTICKET (0x0054) * RPC Name: ticket * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltTICKET; /** - * Construct a Ticket ledger entry wrapper from an existing SLE object. + * @brief Construct a Ticket ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Ticket(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfTicketSequence (soeREQUIRED) + * @brief Get sfTicketSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -97,7 +102,8 @@ public: }; /** - * Builder for Ticket ledger entries. + * @brief Builder for Ticket ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -105,6 +111,14 @@ public: class TicketBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new TicketBuilder with required fields. + * @param account The sfAccount field value. + * @param ownerNode The sfOwnerNode field value. + * @param ticketSequence The sfTicketSequence field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ TicketBuilder(std::decay_t const& account,std::decay_t const& ownerNode,std::decay_t const& ticketSequence,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltTICKET) { @@ -115,6 +129,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a TicketBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ TicketBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltTICKET) @@ -124,10 +143,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ TicketBuilder& @@ -138,7 +157,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ TicketBuilder& @@ -149,7 +168,7 @@ public: } /** - * Set sfTicketSequence (soeREQUIRED) + * @brief Set sfTicketSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ TicketBuilder& @@ -160,7 +179,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ TicketBuilder& @@ -171,7 +190,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ TicketBuilder& @@ -182,7 +201,8 @@ public: } /** - * Build and return the completed Ticket wrapper. + * @brief Build and return the completed Ticket wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Ticket diff --git a/include/xrpl/protocol_autogen/ledger_entries/Vault.h b/include/xrpl/protocol_autogen/ledger_entries/Vault.h index 373591fd87..e24e73fab3 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/Vault.h +++ b/include/xrpl/protocol_autogen/ledger_entries/Vault.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class VaultBuilder; /** - * Ledger Entry: Vault + * @brief Ledger Entry: Vault + * * Type: ltVAULT (0x0084) * RPC Name: vault * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltVAULT; /** - * Construct a Vault ledger entry wrapper from an existing SLE object. + * @brief Construct a Vault ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit Vault(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfSequence (soeREQUIRED) + * @brief Get sfSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -86,7 +90,8 @@ public: } /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -96,7 +101,8 @@ public: } /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -106,7 +112,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -117,6 +124,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -125,7 +136,8 @@ public: } /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -135,7 +147,8 @@ public: } /** - * Get sfAssetsTotal (soeDEFAULT) + * @brief Get sfAssetsTotal (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -146,6 +159,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetsTotal is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetsTotal() const @@ -154,7 +171,8 @@ public: } /** - * Get sfAssetsAvailable (soeDEFAULT) + * @brief Get sfAssetsAvailable (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -165,6 +183,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetsAvailable is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetsAvailable() const @@ -173,7 +195,8 @@ public: } /** - * Get sfAssetsMaximum (soeDEFAULT) + * @brief Get sfAssetsMaximum (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -184,6 +207,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetsMaximum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetsMaximum() const @@ -192,7 +219,8 @@ public: } /** - * Get sfLossUnrealized (soeDEFAULT) + * @brief Get sfLossUnrealized (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -203,6 +231,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLossUnrealized is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLossUnrealized() const @@ -211,7 +243,8 @@ public: } /** - * Get sfShareMPTID (soeREQUIRED) + * @brief Get sfShareMPTID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT192::type::value_type @@ -221,7 +254,8 @@ public: } /** - * Get sfWithdrawalPolicy (soeREQUIRED) + * @brief Get sfWithdrawalPolicy (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT8::type::value_type @@ -231,7 +265,8 @@ public: } /** - * Get sfScale (soeDEFAULT) + * @brief Get sfScale (soeDEFAULT) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -242,6 +277,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfScale is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasScale() const @@ -251,7 +290,8 @@ public: }; /** - * Builder for Vault ledger entries. + * @brief Builder for Vault ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -259,6 +299,18 @@ public: class VaultBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new VaultBuilder with required fields. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + * @param sequence The sfSequence field value. + * @param ownerNode The sfOwnerNode field value. + * @param owner The sfOwner field value. + * @param account The sfAccount field value. + * @param asset The sfAsset field value. + * @param shareMPTID The sfShareMPTID field value. + * @param withdrawalPolicy The sfWithdrawalPolicy field value. + */ VaultBuilder(std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq,std::decay_t const& sequence,std::decay_t const& ownerNode,std::decay_t const& owner,std::decay_t const& account,std::decay_t const& asset,std::decay_t const& shareMPTID,std::decay_t const& withdrawalPolicy) : LedgerEntryBuilderBase(ltVAULT) { @@ -273,6 +325,11 @@ public: setWithdrawalPolicy(withdrawalPolicy); } + /** + * @brief Construct a VaultBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ VaultBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltVAULT) @@ -282,10 +339,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -296,7 +353,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -307,7 +364,7 @@ public: } /** - * Set sfSequence (soeREQUIRED) + * @brief Set sfSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -318,7 +375,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -329,7 +386,7 @@ public: } /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -340,7 +397,7 @@ public: } /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -351,7 +408,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -362,7 +419,7 @@ public: } /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -373,7 +430,7 @@ public: } /** - * Set sfAssetsTotal (soeDEFAULT) + * @brief Set sfAssetsTotal (soeDEFAULT) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -384,7 +441,7 @@ public: } /** - * Set sfAssetsAvailable (soeDEFAULT) + * @brief Set sfAssetsAvailable (soeDEFAULT) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -395,7 +452,7 @@ public: } /** - * Set sfAssetsMaximum (soeDEFAULT) + * @brief Set sfAssetsMaximum (soeDEFAULT) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -406,7 +463,7 @@ public: } /** - * Set sfLossUnrealized (soeDEFAULT) + * @brief Set sfLossUnrealized (soeDEFAULT) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -417,7 +474,7 @@ public: } /** - * Set sfShareMPTID (soeREQUIRED) + * @brief Set sfShareMPTID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -428,7 +485,7 @@ public: } /** - * Set sfWithdrawalPolicy (soeREQUIRED) + * @brief Set sfWithdrawalPolicy (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -439,7 +496,7 @@ public: } /** - * Set sfScale (soeDEFAULT) + * @brief Set sfScale (soeDEFAULT) * @return Reference to this builder for method chaining. */ VaultBuilder& @@ -450,7 +507,8 @@ public: } /** - * Build and return the completed Vault wrapper. + * @brief Build and return the completed Vault wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ Vault diff --git a/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedClaimID.h b/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedClaimID.h index 3499180c0d..3309228951 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedClaimID.h +++ b/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedClaimID.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class XChainOwnedClaimIDBuilder; /** - * Ledger Entry: XChainOwnedClaimID + * @brief Ledger Entry: XChainOwnedClaimID + * * Type: ltXCHAIN_OWNED_CLAIM_ID (0x0071) * RPC Name: xchain_owned_claim_id * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltXCHAIN_OWNED_CLAIM_ID; /** - * Construct a XChainOwnedClaimID ledger entry wrapper from an existing SLE object. + * @brief Construct a XChainOwnedClaimID ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit XChainOwnedClaimID(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfXChainClaimID (soeREQUIRED) + * @brief Get sfXChainClaimID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -76,7 +79,8 @@ public: } /** - * Get sfOtherChainSource (soeREQUIRED) + * @brief Get sfOtherChainSource (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -86,8 +90,9 @@ public: } /** - * Get sfXChainClaimAttestations (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfXChainClaimAttestations (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -97,7 +102,8 @@ public: } /** - * Get sfSignatureReward (soeREQUIRED) + * @brief Get sfSignatureReward (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -107,7 +113,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -117,7 +124,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -127,7 +135,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -138,7 +147,8 @@ public: }; /** - * Builder for XChainOwnedClaimID ledger entries. + * @brief Builder for XChainOwnedClaimID ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -146,6 +156,18 @@ public: class XChainOwnedClaimIDBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new XChainOwnedClaimIDBuilder with required fields. + * @param account The sfAccount field value. + * @param xChainBridge The sfXChainBridge field value. + * @param xChainClaimID The sfXChainClaimID field value. + * @param otherChainSource The sfOtherChainSource field value. + * @param xChainClaimAttestations The sfXChainClaimAttestations field value. + * @param signatureReward The sfSignatureReward field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ XChainOwnedClaimIDBuilder(std::decay_t const& account,std::decay_t const& xChainBridge,std::decay_t const& xChainClaimID,std::decay_t const& otherChainSource,STArray const& xChainClaimAttestations,std::decay_t const& signatureReward,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltXCHAIN_OWNED_CLAIM_ID) { @@ -160,6 +182,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a XChainOwnedClaimIDBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ XChainOwnedClaimIDBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltXCHAIN_OWNED_CLAIM_ID) @@ -169,10 +196,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -183,7 +210,7 @@ public: } /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -194,7 +221,7 @@ public: } /** - * Set sfXChainClaimID (soeREQUIRED) + * @brief Set sfXChainClaimID (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -205,7 +232,7 @@ public: } /** - * Set sfOtherChainSource (soeREQUIRED) + * @brief Set sfOtherChainSource (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -216,7 +243,7 @@ public: } /** - * Set sfXChainClaimAttestations (soeREQUIRED) + * @brief Set sfXChainClaimAttestations (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -227,7 +254,7 @@ public: } /** - * Set sfSignatureReward (soeREQUIRED) + * @brief Set sfSignatureReward (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -238,7 +265,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -249,7 +276,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -260,7 +287,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedClaimIDBuilder& @@ -271,7 +298,8 @@ public: } /** - * Build and return the completed XChainOwnedClaimID wrapper. + * @brief Build and return the completed XChainOwnedClaimID wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ XChainOwnedClaimID diff --git a/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedCreateAccountClaimID.h b/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedCreateAccountClaimID.h index 428419f24a..5415d52884 100644 --- a/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedCreateAccountClaimID.h +++ b/include/xrpl/protocol_autogen/ledger_entries/XChainOwnedCreateAccountClaimID.h @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class XChainOwnedCreateAccountClaimIDBuilder; /** - * Ledger Entry: XChainOwnedCreateAccountClaimID + * @brief Ledger Entry: XChainOwnedCreateAccountClaimID + * * Type: ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID (0x0074) * RPC Name: xchain_owned_create_account_claim_id * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID; /** - * Construct a XChainOwnedCreateAccountClaimID ledger entry wrapper from an existing SLE object. + * @brief Construct a XChainOwnedCreateAccountClaimID ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit XChainOwnedCreateAccountClaimID(std::shared_ptr sle) @@ -46,7 +46,8 @@ public: // Ledger entry-specific field getters /** - * Get sfAccount (soeREQUIRED) + * @brief Get sfAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -56,7 +57,8 @@ public: } /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -66,7 +68,8 @@ public: } /** - * Get sfXChainAccountCreateCount (soeREQUIRED) + * @brief Get sfXChainAccountCreateCount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -76,8 +79,9 @@ public: } /** - * Get sfXChainCreateAccountAttestations (soeREQUIRED) - * Note: This is an untyped field (unknown). + * @brief Get sfXChainCreateAccountAttestations (soeREQUIRED) + * @note This is an untyped field (unknown). + * @return The field value. */ [[nodiscard]] STArray const& @@ -87,7 +91,8 @@ public: } /** - * Get sfOwnerNode (soeREQUIRED) + * @brief Get sfOwnerNode (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -97,7 +102,8 @@ public: } /** - * Get sfPreviousTxnID (soeREQUIRED) + * @brief Get sfPreviousTxnID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -107,7 +113,8 @@ public: } /** - * Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Get sfPreviousTxnLgrSeq (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -118,7 +125,8 @@ public: }; /** - * Builder for XChainOwnedCreateAccountClaimID ledger entries. + * @brief Builder for XChainOwnedCreateAccountClaimID ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -126,6 +134,16 @@ public: class XChainOwnedCreateAccountClaimIDBuilder : public LedgerEntryBuilderBase { public: + /** + * @brief Construct a new XChainOwnedCreateAccountClaimIDBuilder with required fields. + * @param account The sfAccount field value. + * @param xChainBridge The sfXChainBridge field value. + * @param xChainAccountCreateCount The sfXChainAccountCreateCount field value. + * @param xChainCreateAccountAttestations The sfXChainCreateAccountAttestations field value. + * @param ownerNode The sfOwnerNode field value. + * @param previousTxnID The sfPreviousTxnID field value. + * @param previousTxnLgrSeq The sfPreviousTxnLgrSeq field value. + */ XChainOwnedCreateAccountClaimIDBuilder(std::decay_t const& account,std::decay_t const& xChainBridge,std::decay_t const& xChainAccountCreateCount,STArray const& xChainCreateAccountAttestations,std::decay_t const& ownerNode,std::decay_t const& previousTxnID,std::decay_t const& previousTxnLgrSeq) : LedgerEntryBuilderBase(ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID) { @@ -138,6 +156,11 @@ public: setPreviousTxnLgrSeq(previousTxnLgrSeq); } + /** + * @brief Construct a XChainOwnedCreateAccountClaimIDBuilder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ XChainOwnedCreateAccountClaimIDBuilder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID) @@ -147,10 +170,10 @@ public: object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ /** - * Set sfAccount (soeREQUIRED) + * @brief Set sfAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -161,7 +184,7 @@ public: } /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -172,7 +195,7 @@ public: } /** - * Set sfXChainAccountCreateCount (soeREQUIRED) + * @brief Set sfXChainAccountCreateCount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -183,7 +206,7 @@ public: } /** - * Set sfXChainCreateAccountAttestations (soeREQUIRED) + * @brief Set sfXChainCreateAccountAttestations (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -194,7 +217,7 @@ public: } /** - * Set sfOwnerNode (soeREQUIRED) + * @brief Set sfOwnerNode (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -205,7 +228,7 @@ public: } /** - * Set sfPreviousTxnID (soeREQUIRED) + * @brief Set sfPreviousTxnID (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -216,7 +239,7 @@ public: } /** - * Set sfPreviousTxnLgrSeq (soeREQUIRED) + * @brief Set sfPreviousTxnLgrSeq (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainOwnedCreateAccountClaimIDBuilder& @@ -227,7 +250,8 @@ public: } /** - * Build and return the completed XChainOwnedCreateAccountClaimID wrapper. + * @brief Build and return the completed XChainOwnedCreateAccountClaimID wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ XChainOwnedCreateAccountClaimID diff --git a/include/xrpl/protocol_autogen/transactions/AMMBid.h b/include/xrpl/protocol_autogen/transactions/AMMBid.h index 651141a476..d3f8cba8f7 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMBid.h +++ b/include/xrpl/protocol_autogen/transactions/AMMBid.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMBidBuilder; /** - * Transaction: AMMBid + * @brief Transaction: AMMBid + * * Type: ttAMM_BID (39) * Delegable: Delegation::delegable * Amendment: featureAMM @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_BID; /** - * Construct a AMMBid transaction wrapper from an existing STTx object. + * @brief Construct a AMMBid transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMBid(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfBidMin (soeOPTIONAL) + * @brief Get sfBidMin (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBidMin is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBidMin() const @@ -89,7 +96,8 @@ public: } /** - * Get sfBidMax (soeOPTIONAL) + * @brief Get sfBidMax (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBidMax is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBidMax() const @@ -109,8 +121,9 @@ public: return this->tx_->isFieldPresent(sfBidMax); } /** - * Get sfAuthAccounts (soeOPTIONAL) - * Note: This is an untyped field + * @brief Get sfAuthAccounts (soeOPTIONAL) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -121,6 +134,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAuthAccounts is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAuthAccounts() const @@ -130,7 +147,8 @@ public: }; /** - * Builder for AMMBid transactions. + * @brief Builder for AMMBid transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -138,6 +156,14 @@ public: class AMMBidBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMBidBuilder with required fields. + * @param account The account initiating the transaction. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMBidBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& asset, std::decay_t const& asset2, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -148,6 +174,11 @@ public: setAsset2(asset2); } + /** + * @brief Construct a AMMBidBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMBidBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_BID) @@ -157,10 +188,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBidBuilder& @@ -171,7 +202,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMBidBuilder& @@ -182,7 +213,7 @@ public: } /** - * Set sfBidMin (soeOPTIONAL) + * @brief Set sfBidMin (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBidBuilder& @@ -193,7 +224,7 @@ public: } /** - * Set sfBidMax (soeOPTIONAL) + * @brief Set sfBidMax (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBidBuilder& @@ -204,7 +235,7 @@ public: } /** - * Set sfAuthAccounts (soeOPTIONAL) + * @brief Set sfAuthAccounts (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMBidBuilder& @@ -215,9 +246,9 @@ public: } /** - * Build and return the AMMBid wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMBid wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMBid diff --git a/include/xrpl/protocol_autogen/transactions/AMMClawback.h b/include/xrpl/protocol_autogen/transactions/AMMClawback.h index 279743eb62..9603cad6ef 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMClawback.h +++ b/include/xrpl/protocol_autogen/transactions/AMMClawback.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMClawbackBuilder; /** - * Transaction: AMMClawback + * @brief Transaction: AMMClawback + * * Type: ttAMM_CLAWBACK (31) * Delegable: Delegation::delegable * Amendment: featureAMMClawback @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_CLAWBACK; /** - * Construct a AMMClawback transaction wrapper from an existing STTx object. + * @brief Construct a AMMClawback transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMClawback(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfHolder (soeREQUIRED) + * @brief Get sfHolder (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfAmount (soeOPTIONAL) + * @brief Get sfAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -91,6 +95,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -100,7 +108,8 @@ public: }; /** - * Builder for AMMClawback transactions. + * @brief Builder for AMMClawback transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -108,6 +117,15 @@ public: class AMMClawbackBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMClawbackBuilder with required fields. + * @param account The account initiating the transaction. + * @param holder The sfHolder field value. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMClawbackBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& holder, std::decay_t const& asset, std::decay_t const& asset2, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -119,6 +137,11 @@ public: setAsset2(asset2); } + /** + * @brief Construct a AMMClawbackBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMClawbackBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_CLAWBACK) @@ -128,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfHolder (soeREQUIRED) + * @brief Set sfHolder (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMClawbackBuilder& @@ -142,7 +165,7 @@ public: } /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMClawbackBuilder& @@ -153,7 +176,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMClawbackBuilder& @@ -164,7 +187,7 @@ public: } /** - * Set sfAmount (soeOPTIONAL) + * @brief Set sfAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMClawbackBuilder& @@ -175,9 +198,9 @@ public: } /** - * Build and return the AMMClawback wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMClawback wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMClawback diff --git a/include/xrpl/protocol_autogen/transactions/AMMCreate.h b/include/xrpl/protocol_autogen/transactions/AMMCreate.h index d77ec5f214..311d19a3c4 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMCreate.h +++ b/include/xrpl/protocol_autogen/transactions/AMMCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMCreateBuilder; /** - * Transaction: AMMCreate + * @brief Transaction: AMMCreate + * * Type: ttAMM_CREATE (35) * Delegable: Delegation::delegable * Amendment: featureAMM @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_CREATE; /** - * Construct a AMMCreate transaction wrapper from an existing STTx object. + * @brief Construct a AMMCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmount2 (soeREQUIRED) + * @brief Get sfAmount2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfTradingFee (soeREQUIRED) + * @brief Get sfTradingFee (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT16::type::value_type @@ -79,7 +82,8 @@ public: }; /** - * Builder for AMMCreate transactions. + * @brief Builder for AMMCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -87,6 +91,15 @@ public: class AMMCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param amount The sfAmount field value. + * @param amount2 The sfAmount2 field value. + * @param tradingFee The sfTradingFee field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& amount, std::decay_t const& amount2, std::decay_t const& tradingFee, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -98,6 +111,11 @@ public: setTradingFee(tradingFee); } + /** + * @brief Construct a AMMCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_CREATE) @@ -107,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMCreateBuilder& @@ -121,7 +139,7 @@ public: } /** - * Set sfAmount2 (soeREQUIRED) + * @brief Set sfAmount2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMCreateBuilder& @@ -132,7 +150,7 @@ public: } /** - * Set sfTradingFee (soeREQUIRED) + * @brief Set sfTradingFee (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMCreateBuilder& @@ -143,9 +161,9 @@ public: } /** - * Build and return the AMMCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMCreate diff --git a/include/xrpl/protocol_autogen/transactions/AMMDelete.h b/include/xrpl/protocol_autogen/transactions/AMMDelete.h index e15e9cc58a..bc61434d0b 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMDelete.h +++ b/include/xrpl/protocol_autogen/transactions/AMMDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMDeleteBuilder; /** - * Transaction: AMMDelete + * @brief Transaction: AMMDelete + * * Type: ttAMM_DELETE (40) * Delegable: Delegation::delegable * Amendment: featureAMM @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_DELETE; /** - * Construct a AMMDelete transaction wrapper from an existing STTx object. + * @brief Construct a AMMDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -69,7 +71,8 @@ public: }; /** - * Builder for AMMDelete transactions. + * @brief Builder for AMMDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -77,6 +80,14 @@ public: class AMMDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& asset, std::decay_t const& asset2, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -87,6 +98,11 @@ public: setAsset2(asset2); } + /** + * @brief Construct a AMMDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_DELETE) @@ -96,10 +112,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMDeleteBuilder& @@ -110,7 +126,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMDeleteBuilder& @@ -121,9 +137,9 @@ public: } /** - * Build and return the AMMDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMDelete diff --git a/include/xrpl/protocol_autogen/transactions/AMMDeposit.h b/include/xrpl/protocol_autogen/transactions/AMMDeposit.h index f872f5d9c1..8e86339b0a 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMDeposit.h +++ b/include/xrpl/protocol_autogen/transactions/AMMDeposit.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMDepositBuilder; /** - * Transaction: AMMDeposit + * @brief Transaction: AMMDeposit + * * Type: ttAMM_DEPOSIT (36) * Delegable: Delegation::delegable * Amendment: featureAMM @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_DEPOSIT; /** - * Construct a AMMDeposit transaction wrapper from an existing STTx object. + * @brief Construct a AMMDeposit transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMDeposit(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfAmount (soeOPTIONAL) + * @brief Get sfAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -89,7 +96,8 @@ public: } /** - * Get sfAmount2 (soeOPTIONAL) + * @brief Get sfAmount2 (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount2 is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount2() const @@ -110,7 +122,8 @@ public: } /** - * Get sfEPrice (soeOPTIONAL) + * @brief Get sfEPrice (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfEPrice is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasEPrice() const @@ -131,7 +148,8 @@ public: } /** - * Get sfLPTokenOut (soeOPTIONAL) + * @brief Get sfLPTokenOut (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -144,6 +162,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLPTokenOut is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLPTokenOut() const @@ -152,7 +174,8 @@ public: } /** - * Get sfTradingFee (soeOPTIONAL) + * @brief Get sfTradingFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -165,6 +188,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTradingFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTradingFee() const @@ -174,7 +201,8 @@ public: }; /** - * Builder for AMMDeposit transactions. + * @brief Builder for AMMDeposit transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -182,6 +210,14 @@ public: class AMMDepositBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMDepositBuilder with required fields. + * @param account The account initiating the transaction. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMDepositBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& asset, std::decay_t const& asset2, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -192,6 +228,11 @@ public: setAsset2(asset2); } + /** + * @brief Construct a AMMDepositBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMDepositBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_DEPOSIT) @@ -201,10 +242,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -215,7 +256,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -226,7 +267,7 @@ public: } /** - * Set sfAmount (soeOPTIONAL) + * @brief Set sfAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -237,7 +278,7 @@ public: } /** - * Set sfAmount2 (soeOPTIONAL) + * @brief Set sfAmount2 (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -248,7 +289,7 @@ public: } /** - * Set sfEPrice (soeOPTIONAL) + * @brief Set sfEPrice (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -259,7 +300,7 @@ public: } /** - * Set sfLPTokenOut (soeOPTIONAL) + * @brief Set sfLPTokenOut (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -270,7 +311,7 @@ public: } /** - * Set sfTradingFee (soeOPTIONAL) + * @brief Set sfTradingFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMDepositBuilder& @@ -281,9 +322,9 @@ public: } /** - * Build and return the AMMDeposit wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMDeposit wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMDeposit diff --git a/include/xrpl/protocol_autogen/transactions/AMMVote.h b/include/xrpl/protocol_autogen/transactions/AMMVote.h index 088adfb398..a4e58c9aa4 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMVote.h +++ b/include/xrpl/protocol_autogen/transactions/AMMVote.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMVoteBuilder; /** - * Transaction: AMMVote + * @brief Transaction: AMMVote + * * Type: ttAMM_VOTE (38) * Delegable: Delegation::delegable * Amendment: featureAMM @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_VOTE; /** - * Construct a AMMVote transaction wrapper from an existing STTx object. + * @brief Construct a AMMVote transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMVote(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfTradingFee (soeREQUIRED) + * @brief Get sfTradingFee (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT16::type::value_type @@ -79,7 +82,8 @@ public: }; /** - * Builder for AMMVote transactions. + * @brief Builder for AMMVote transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -87,6 +91,15 @@ public: class AMMVoteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMVoteBuilder with required fields. + * @param account The account initiating the transaction. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param tradingFee The sfTradingFee field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMVoteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& asset, std::decay_t const& asset2, std::decay_t const& tradingFee, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -98,6 +111,11 @@ public: setTradingFee(tradingFee); } + /** + * @brief Construct a AMMVoteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMVoteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_VOTE) @@ -107,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMVoteBuilder& @@ -121,7 +139,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMVoteBuilder& @@ -132,7 +150,7 @@ public: } /** - * Set sfTradingFee (soeREQUIRED) + * @brief Set sfTradingFee (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMVoteBuilder& @@ -143,9 +161,9 @@ public: } /** - * Build and return the AMMVote wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMVote wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMVote diff --git a/include/xrpl/protocol_autogen/transactions/AMMWithdraw.h b/include/xrpl/protocol_autogen/transactions/AMMWithdraw.h index aacd40314f..da19c546ee 100644 --- a/include/xrpl/protocol_autogen/transactions/AMMWithdraw.h +++ b/include/xrpl/protocol_autogen/transactions/AMMWithdraw.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AMMWithdrawBuilder; /** - * Transaction: AMMWithdraw + * @brief Transaction: AMMWithdraw + * * Type: ttAMM_WITHDRAW (37) * Delegable: Delegation::delegable * Amendment: featureAMM @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMM_WITHDRAW; /** - * Construct a AMMWithdraw transaction wrapper from an existing STTx object. + * @brief Construct a AMMWithdraw transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AMMWithdraw(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAsset (soeREQUIRED) + * @brief Get sfAsset (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAsset2 (soeREQUIRED) + * @brief Get sfAsset2 (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfAmount (soeOPTIONAL) + * @brief Get sfAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -89,7 +96,8 @@ public: } /** - * Get sfAmount2 (soeOPTIONAL) + * @brief Get sfAmount2 (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount2 is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount2() const @@ -110,7 +122,8 @@ public: } /** - * Get sfEPrice (soeOPTIONAL) + * @brief Get sfEPrice (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfEPrice is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasEPrice() const @@ -131,7 +148,8 @@ public: } /** - * Get sfLPTokenIn (soeOPTIONAL) + * @brief Get sfLPTokenIn (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -144,6 +162,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLPTokenIn is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLPTokenIn() const @@ -153,7 +175,8 @@ public: }; /** - * Builder for AMMWithdraw transactions. + * @brief Builder for AMMWithdraw transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -161,6 +184,14 @@ public: class AMMWithdrawBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AMMWithdrawBuilder with required fields. + * @param account The account initiating the transaction. + * @param asset The sfAsset field value. + * @param asset2 The sfAsset2 field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AMMWithdrawBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& asset, std::decay_t const& asset2, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -171,6 +202,11 @@ public: setAsset2(asset2); } + /** + * @brief Construct a AMMWithdrawBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AMMWithdrawBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMM_WITHDRAW) @@ -180,10 +216,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAsset (soeREQUIRED) + * @brief Set sfAsset (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMWithdrawBuilder& @@ -194,7 +230,7 @@ public: } /** - * Set sfAsset2 (soeREQUIRED) + * @brief Set sfAsset2 (soeREQUIRED) * @return Reference to this builder for method chaining. */ AMMWithdrawBuilder& @@ -205,7 +241,7 @@ public: } /** - * Set sfAmount (soeOPTIONAL) + * @brief Set sfAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMWithdrawBuilder& @@ -216,7 +252,7 @@ public: } /** - * Set sfAmount2 (soeOPTIONAL) + * @brief Set sfAmount2 (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMWithdrawBuilder& @@ -227,7 +263,7 @@ public: } /** - * Set sfEPrice (soeOPTIONAL) + * @brief Set sfEPrice (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMWithdrawBuilder& @@ -238,7 +274,7 @@ public: } /** - * Set sfLPTokenIn (soeOPTIONAL) + * @brief Set sfLPTokenIn (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AMMWithdrawBuilder& @@ -249,9 +285,9 @@ public: } /** - * Build and return the AMMWithdraw wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AMMWithdraw wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AMMWithdraw diff --git a/include/xrpl/protocol_autogen/transactions/AccountDelete.h b/include/xrpl/protocol_autogen/transactions/AccountDelete.h index 2b66594c5b..86ae9af546 100644 --- a/include/xrpl/protocol_autogen/transactions/AccountDelete.h +++ b/include/xrpl/protocol_autogen/transactions/AccountDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AccountDeleteBuilder; /** - * Transaction: AccountDelete + * @brief Transaction: AccountDelete + * * Type: ttACCOUNT_DELETE (21) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttACCOUNT_DELETE; /** - * Construct a AccountDelete transaction wrapper from an existing STTx object. + * @brief Construct a AccountDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AccountDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -79,7 +85,8 @@ public: } /** - * Get sfCredentialIDs (soeOPTIONAL) + * @brief Get sfCredentialIDs (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCredentialIDs is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCredentialIDs() const @@ -101,7 +112,8 @@ public: }; /** - * Builder for AccountDelete transactions. + * @brief Builder for AccountDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -109,6 +121,13 @@ public: class AccountDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AccountDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param destination The sfDestination field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AccountDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& destination, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -118,6 +137,11 @@ public: setDestination(destination); } + /** + * @brief Construct a AccountDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AccountDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttACCOUNT_DELETE) @@ -127,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ AccountDeleteBuilder& @@ -141,7 +165,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountDeleteBuilder& @@ -152,7 +176,7 @@ public: } /** - * Set sfCredentialIDs (soeOPTIONAL) + * @brief Set sfCredentialIDs (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountDeleteBuilder& @@ -163,9 +187,9 @@ public: } /** - * Build and return the AccountDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AccountDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AccountDelete diff --git a/include/xrpl/protocol_autogen/transactions/AccountSet.h b/include/xrpl/protocol_autogen/transactions/AccountSet.h index 776b15d989..c00142bd1e 100644 --- a/include/xrpl/protocol_autogen/transactions/AccountSet.h +++ b/include/xrpl/protocol_autogen/transactions/AccountSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class AccountSetBuilder; /** - * Transaction: AccountSet + * @brief Transaction: AccountSet + * * Type: ttACCOUNT_SET (3) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttACCOUNT_SET; /** - * Construct a AccountSet transaction wrapper from an existing STTx object. + * @brief Construct a AccountSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit AccountSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfEmailHash (soeOPTIONAL) + * @brief Get sfEmailHash (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfEmailHash is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasEmailHash() const @@ -69,7 +74,8 @@ public: } /** - * Get sfWalletLocator (soeOPTIONAL) + * @brief Get sfWalletLocator (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfWalletLocator is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasWalletLocator() const @@ -90,7 +100,8 @@ public: } /** - * Get sfWalletSize (soeOPTIONAL) + * @brief Get sfWalletSize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +114,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfWalletSize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasWalletSize() const @@ -111,7 +126,8 @@ public: } /** - * Get sfMessageKey (soeOPTIONAL) + * @brief Get sfMessageKey (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -124,6 +140,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMessageKey is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMessageKey() const @@ -132,7 +152,8 @@ public: } /** - * Get sfDomain (soeOPTIONAL) + * @brief Get sfDomain (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -145,6 +166,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomain is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomain() const @@ -153,7 +178,8 @@ public: } /** - * Get sfTransferRate (soeOPTIONAL) + * @brief Get sfTransferRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +192,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferRate() const @@ -174,7 +204,8 @@ public: } /** - * Get sfSetFlag (soeOPTIONAL) + * @brief Get sfSetFlag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -187,6 +218,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSetFlag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSetFlag() const @@ -195,7 +230,8 @@ public: } /** - * Get sfClearFlag (soeOPTIONAL) + * @brief Get sfClearFlag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -208,6 +244,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfClearFlag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasClearFlag() const @@ -216,7 +256,8 @@ public: } /** - * Get sfTickSize (soeOPTIONAL) + * @brief Get sfTickSize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -229,6 +270,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTickSize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTickSize() const @@ -237,7 +282,8 @@ public: } /** - * Get sfNFTokenMinter (soeOPTIONAL) + * @brief Get sfNFTokenMinter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -250,6 +296,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNFTokenMinter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNFTokenMinter() const @@ -259,7 +309,8 @@ public: }; /** - * Builder for AccountSet transactions. + * @brief Builder for AccountSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -267,6 +318,12 @@ public: class AccountSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new AccountSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ AccountSetBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -275,6 +332,11 @@ public: { } + /** + * @brief Construct a AccountSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ AccountSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttACCOUNT_SET) @@ -284,10 +346,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfEmailHash (soeOPTIONAL) + * @brief Set sfEmailHash (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -298,7 +360,7 @@ public: } /** - * Set sfWalletLocator (soeOPTIONAL) + * @brief Set sfWalletLocator (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -309,7 +371,7 @@ public: } /** - * Set sfWalletSize (soeOPTIONAL) + * @brief Set sfWalletSize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -320,7 +382,7 @@ public: } /** - * Set sfMessageKey (soeOPTIONAL) + * @brief Set sfMessageKey (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -331,7 +393,7 @@ public: } /** - * Set sfDomain (soeOPTIONAL) + * @brief Set sfDomain (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -342,7 +404,7 @@ public: } /** - * Set sfTransferRate (soeOPTIONAL) + * @brief Set sfTransferRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -353,7 +415,7 @@ public: } /** - * Set sfSetFlag (soeOPTIONAL) + * @brief Set sfSetFlag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -364,7 +426,7 @@ public: } /** - * Set sfClearFlag (soeOPTIONAL) + * @brief Set sfClearFlag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -375,7 +437,7 @@ public: } /** - * Set sfTickSize (soeOPTIONAL) + * @brief Set sfTickSize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -386,7 +448,7 @@ public: } /** - * Set sfNFTokenMinter (soeOPTIONAL) + * @brief Set sfNFTokenMinter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ AccountSetBuilder& @@ -397,9 +459,9 @@ public: } /** - * Build and return the AccountSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the AccountSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ AccountSet diff --git a/include/xrpl/protocol_autogen/transactions/Batch.h b/include/xrpl/protocol_autogen/transactions/Batch.h index 051a8a45a6..0bb638435c 100644 --- a/include/xrpl/protocol_autogen/transactions/Batch.h +++ b/include/xrpl/protocol_autogen/transactions/Batch.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class BatchBuilder; /** - * Transaction: Batch + * @brief Transaction: Batch + * * Type: ttBATCH (71) * Delegable: Delegation::notDelegable * Amendment: featureBatch @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttBATCH; /** - * Construct a Batch transaction wrapper from an existing STTx object. + * @brief Construct a Batch transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit Batch(std::shared_ptr tx) @@ -47,8 +47,9 @@ public: // Transaction-specific field getters /** - * Get sfRawTransactions (soeREQUIRED) - * Note: This is an untyped field + * @brief Get sfRawTransactions (soeREQUIRED) + * @note This is an untyped field. + * @return The field value. */ [[nodiscard]] STArray const& @@ -57,8 +58,9 @@ public: return this->tx_->getFieldArray(sfRawTransactions); } /** - * Get sfBatchSigners (soeOPTIONAL) - * Note: This is an untyped field + * @brief Get sfBatchSigners (soeOPTIONAL) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -69,6 +71,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBatchSigners is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBatchSigners() const @@ -78,7 +84,8 @@ public: }; /** - * Builder for Batch transactions. + * @brief Builder for Batch transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -86,6 +93,13 @@ public: class BatchBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new BatchBuilder with required fields. + * @param account The account initiating the transaction. + * @param rawTransactions The sfRawTransactions field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ BatchBuilder(SF_ACCOUNT::type::value_type account, STArray const& rawTransactions, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -95,6 +109,11 @@ public: setRawTransactions(rawTransactions); } + /** + * @brief Construct a BatchBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ BatchBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttBATCH) @@ -104,10 +123,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfRawTransactions (soeREQUIRED) + * @brief Set sfRawTransactions (soeREQUIRED) * @return Reference to this builder for method chaining. */ BatchBuilder& @@ -118,7 +137,7 @@ public: } /** - * Set sfBatchSigners (soeOPTIONAL) + * @brief Set sfBatchSigners (soeOPTIONAL) * @return Reference to this builder for method chaining. */ BatchBuilder& @@ -129,9 +148,9 @@ public: } /** - * Build and return the Batch wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the Batch wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ Batch diff --git a/include/xrpl/protocol_autogen/transactions/CheckCancel.h b/include/xrpl/protocol_autogen/transactions/CheckCancel.h index b6a5f13e1f..2409e7064c 100644 --- a/include/xrpl/protocol_autogen/transactions/CheckCancel.h +++ b/include/xrpl/protocol_autogen/transactions/CheckCancel.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class CheckCancelBuilder; /** - * Transaction: CheckCancel + * @brief Transaction: CheckCancel + * * Type: ttCHECK_CANCEL (18) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCHECK_CANCEL; /** - * Construct a CheckCancel transaction wrapper from an existing STTx object. + * @brief Construct a CheckCancel transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit CheckCancel(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfCheckID (soeREQUIRED) + * @brief Get sfCheckID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for CheckCancel transactions. + * @brief Builder for CheckCancel transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class CheckCancelBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new CheckCancelBuilder with required fields. + * @param account The account initiating the transaction. + * @param checkID The sfCheckID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ CheckCancelBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& checkID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setCheckID(checkID); } + /** + * @brief Construct a CheckCancelBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ CheckCancelBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCHECK_CANCEL) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfCheckID (soeREQUIRED) + * @brief Set sfCheckID (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckCancelBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the CheckCancel wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the CheckCancel wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ CheckCancel diff --git a/include/xrpl/protocol_autogen/transactions/CheckCash.h b/include/xrpl/protocol_autogen/transactions/CheckCash.h index a506fe7e5e..2a2bc9c7af 100644 --- a/include/xrpl/protocol_autogen/transactions/CheckCash.h +++ b/include/xrpl/protocol_autogen/transactions/CheckCash.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class CheckCashBuilder; /** - * Transaction: CheckCash + * @brief Transaction: CheckCash + * * Type: ttCHECK_CASH (17) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCHECK_CASH; /** - * Construct a CheckCash transaction wrapper from an existing STTx object. + * @brief Construct a CheckCash transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit CheckCash(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfCheckID (soeREQUIRED) + * @brief Get sfCheckID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmount (soeOPTIONAL) + * @brief Get sfAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -79,7 +85,8 @@ public: } /** - * Get sfDeliverMin (soeOPTIONAL) + * @brief Get sfDeliverMin (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDeliverMin is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDeliverMin() const @@ -101,7 +112,8 @@ public: }; /** - * Builder for CheckCash transactions. + * @brief Builder for CheckCash transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -109,6 +121,13 @@ public: class CheckCashBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new CheckCashBuilder with required fields. + * @param account The account initiating the transaction. + * @param checkID The sfCheckID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ CheckCashBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& checkID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -118,6 +137,11 @@ public: setCheckID(checkID); } + /** + * @brief Construct a CheckCashBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ CheckCashBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCHECK_CASH) @@ -127,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfCheckID (soeREQUIRED) + * @brief Set sfCheckID (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckCashBuilder& @@ -141,7 +165,7 @@ public: } /** - * Set sfAmount (soeOPTIONAL) + * @brief Set sfAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckCashBuilder& @@ -152,7 +176,7 @@ public: } /** - * Set sfDeliverMin (soeOPTIONAL) + * @brief Set sfDeliverMin (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckCashBuilder& @@ -163,9 +187,9 @@ public: } /** - * Build and return the CheckCash wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the CheckCash wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ CheckCash diff --git a/include/xrpl/protocol_autogen/transactions/CheckCreate.h b/include/xrpl/protocol_autogen/transactions/CheckCreate.h index 8ec98b87ac..ba209a7fc4 100644 --- a/include/xrpl/protocol_autogen/transactions/CheckCreate.h +++ b/include/xrpl/protocol_autogen/transactions/CheckCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class CheckCreateBuilder; /** - * Transaction: CheckCreate + * @brief Transaction: CheckCreate + * * Type: ttCHECK_CREATE (16) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCHECK_CREATE; /** - * Construct a CheckCreate transaction wrapper from an existing STTx object. + * @brief Construct a CheckCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit CheckCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfSendMax (soeREQUIRED) + * @brief Get sfSendMax (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -89,7 +96,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -110,7 +122,8 @@ public: } /** - * Get sfInvoiceID (soeOPTIONAL) + * @brief Get sfInvoiceID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfInvoiceID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasInvoiceID() const @@ -132,7 +149,8 @@ public: }; /** - * Builder for CheckCreate transactions. + * @brief Builder for CheckCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -140,6 +158,14 @@ public: class CheckCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new CheckCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param destination The sfDestination field value. + * @param sendMax The sfSendMax field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ CheckCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& destination, std::decay_t const& sendMax, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -150,6 +176,11 @@ public: setSendMax(sendMax); } + /** + * @brief Construct a CheckCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ CheckCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCHECK_CREATE) @@ -159,10 +190,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckCreateBuilder& @@ -173,7 +204,7 @@ public: } /** - * Set sfSendMax (soeREQUIRED) + * @brief Set sfSendMax (soeREQUIRED) * @return Reference to this builder for method chaining. */ CheckCreateBuilder& @@ -184,7 +215,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckCreateBuilder& @@ -195,7 +226,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckCreateBuilder& @@ -206,7 +237,7 @@ public: } /** - * Set sfInvoiceID (soeOPTIONAL) + * @brief Set sfInvoiceID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CheckCreateBuilder& @@ -217,9 +248,9 @@ public: } /** - * Build and return the CheckCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the CheckCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ CheckCreate diff --git a/include/xrpl/protocol_autogen/transactions/Clawback.h b/include/xrpl/protocol_autogen/transactions/Clawback.h index 7742423b24..6c34ceff11 100644 --- a/include/xrpl/protocol_autogen/transactions/Clawback.h +++ b/include/xrpl/protocol_autogen/transactions/Clawback.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class ClawbackBuilder; /** - * Transaction: Clawback + * @brief Transaction: Clawback + * * Type: ttCLAWBACK (30) * Delegable: Delegation::delegable * Amendment: featureClawback @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCLAWBACK; /** - * Construct a Clawback transaction wrapper from an existing STTx object. + * @brief Construct a Clawback transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit Clawback(std::shared_ptr tx) @@ -48,8 +48,9 @@ public: // Transaction-specific field getters /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -59,7 +60,8 @@ public: } /** - * Get sfHolder (soeOPTIONAL) + * @brief Get sfHolder (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -72,6 +74,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfHolder is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasHolder() const @@ -81,7 +87,8 @@ public: }; /** - * Builder for Clawback transactions. + * @brief Builder for Clawback transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -89,6 +96,13 @@ public: class ClawbackBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new ClawbackBuilder with required fields. + * @param account The account initiating the transaction. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ ClawbackBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -98,6 +112,11 @@ public: setAmount(amount); } + /** + * @brief Construct a ClawbackBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ ClawbackBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCLAWBACK) @@ -107,11 +126,11 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ ClawbackBuilder& @@ -122,7 +141,7 @@ public: } /** - * Set sfHolder (soeOPTIONAL) + * @brief Set sfHolder (soeOPTIONAL) * @return Reference to this builder for method chaining. */ ClawbackBuilder& @@ -133,9 +152,9 @@ public: } /** - * Build and return the Clawback wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the Clawback wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ Clawback diff --git a/include/xrpl/protocol_autogen/transactions/CredentialAccept.h b/include/xrpl/protocol_autogen/transactions/CredentialAccept.h index e727a99397..c739e4abcb 100644 --- a/include/xrpl/protocol_autogen/transactions/CredentialAccept.h +++ b/include/xrpl/protocol_autogen/transactions/CredentialAccept.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class CredentialAcceptBuilder; /** - * Transaction: CredentialAccept + * @brief Transaction: CredentialAccept + * * Type: ttCREDENTIAL_ACCEPT (59) * Delegable: Delegation::delegable * Amendment: featureCredentials @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCREDENTIAL_ACCEPT; /** - * Construct a CredentialAccept transaction wrapper from an existing STTx object. + * @brief Construct a CredentialAccept transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit CredentialAccept(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfIssuer (soeREQUIRED) + * @brief Get sfIssuer (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfCredentialType (soeREQUIRED) + * @brief Get sfCredentialType (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -69,7 +71,8 @@ public: }; /** - * Builder for CredentialAccept transactions. + * @brief Builder for CredentialAccept transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -77,6 +80,14 @@ public: class CredentialAcceptBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new CredentialAcceptBuilder with required fields. + * @param account The account initiating the transaction. + * @param issuer The sfIssuer field value. + * @param credentialType The sfCredentialType field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ CredentialAcceptBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& issuer, std::decay_t const& credentialType, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -87,6 +98,11 @@ public: setCredentialType(credentialType); } + /** + * @brief Construct a CredentialAcceptBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ CredentialAcceptBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCREDENTIAL_ACCEPT) @@ -96,10 +112,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfIssuer (soeREQUIRED) + * @brief Set sfIssuer (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialAcceptBuilder& @@ -110,7 +126,7 @@ public: } /** - * Set sfCredentialType (soeREQUIRED) + * @brief Set sfCredentialType (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialAcceptBuilder& @@ -121,9 +137,9 @@ public: } /** - * Build and return the CredentialAccept wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the CredentialAccept wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ CredentialAccept diff --git a/include/xrpl/protocol_autogen/transactions/CredentialCreate.h b/include/xrpl/protocol_autogen/transactions/CredentialCreate.h index 6dee6ace32..4da5b3ff47 100644 --- a/include/xrpl/protocol_autogen/transactions/CredentialCreate.h +++ b/include/xrpl/protocol_autogen/transactions/CredentialCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class CredentialCreateBuilder; /** - * Transaction: CredentialCreate + * @brief Transaction: CredentialCreate + * * Type: ttCREDENTIAL_CREATE (58) * Delegable: Delegation::delegable * Amendment: featureCredentials @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCREDENTIAL_CREATE; /** - * Construct a CredentialCreate transaction wrapper from an existing STTx object. + * @brief Construct a CredentialCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit CredentialCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfSubject (soeREQUIRED) + * @brief Get sfSubject (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfCredentialType (soeREQUIRED) + * @brief Get sfCredentialType (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -89,7 +96,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -111,7 +123,8 @@ public: }; /** - * Builder for CredentialCreate transactions. + * @brief Builder for CredentialCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -119,6 +132,14 @@ public: class CredentialCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new CredentialCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param subject The sfSubject field value. + * @param credentialType The sfCredentialType field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ CredentialCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& subject, std::decay_t const& credentialType, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -129,6 +150,11 @@ public: setCredentialType(credentialType); } + /** + * @brief Construct a CredentialCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ CredentialCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCREDENTIAL_CREATE) @@ -138,10 +164,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfSubject (soeREQUIRED) + * @brief Set sfSubject (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialCreateBuilder& @@ -152,7 +178,7 @@ public: } /** - * Set sfCredentialType (soeREQUIRED) + * @brief Set sfCredentialType (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialCreateBuilder& @@ -163,7 +189,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialCreateBuilder& @@ -174,7 +200,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialCreateBuilder& @@ -185,9 +211,9 @@ public: } /** - * Build and return the CredentialCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the CredentialCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ CredentialCreate diff --git a/include/xrpl/protocol_autogen/transactions/CredentialDelete.h b/include/xrpl/protocol_autogen/transactions/CredentialDelete.h index 70450b0382..bd840ed104 100644 --- a/include/xrpl/protocol_autogen/transactions/CredentialDelete.h +++ b/include/xrpl/protocol_autogen/transactions/CredentialDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class CredentialDeleteBuilder; /** - * Transaction: CredentialDelete + * @brief Transaction: CredentialDelete + * * Type: ttCREDENTIAL_DELETE (60) * Delegable: Delegation::delegable * Amendment: featureCredentials @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttCREDENTIAL_DELETE; /** - * Construct a CredentialDelete transaction wrapper from an existing STTx object. + * @brief Construct a CredentialDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit CredentialDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfSubject (soeOPTIONAL) + * @brief Get sfSubject (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSubject is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSubject() const @@ -69,7 +74,8 @@ public: } /** - * Get sfIssuer (soeOPTIONAL) + * @brief Get sfIssuer (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfIssuer is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasIssuer() const @@ -90,7 +100,8 @@ public: } /** - * Get sfCredentialType (soeREQUIRED) + * @brief Get sfCredentialType (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -101,7 +112,8 @@ public: }; /** - * Builder for CredentialDelete transactions. + * @brief Builder for CredentialDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -109,6 +121,13 @@ public: class CredentialDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new CredentialDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param credentialType The sfCredentialType field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ CredentialDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& credentialType, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -118,6 +137,11 @@ public: setCredentialType(credentialType); } + /** + * @brief Construct a CredentialDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ CredentialDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttCREDENTIAL_DELETE) @@ -127,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfSubject (soeOPTIONAL) + * @brief Set sfSubject (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialDeleteBuilder& @@ -141,7 +165,7 @@ public: } /** - * Set sfIssuer (soeOPTIONAL) + * @brief Set sfIssuer (soeOPTIONAL) * @return Reference to this builder for method chaining. */ CredentialDeleteBuilder& @@ -152,7 +176,7 @@ public: } /** - * Set sfCredentialType (soeREQUIRED) + * @brief Set sfCredentialType (soeREQUIRED) * @return Reference to this builder for method chaining. */ CredentialDeleteBuilder& @@ -163,9 +187,9 @@ public: } /** - * Build and return the CredentialDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the CredentialDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ CredentialDelete diff --git a/include/xrpl/protocol_autogen/transactions/DIDDelete.h b/include/xrpl/protocol_autogen/transactions/DIDDelete.h index 942dfda05f..c4e61eb19e 100644 --- a/include/xrpl/protocol_autogen/transactions/DIDDelete.h +++ b/include/xrpl/protocol_autogen/transactions/DIDDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class DIDDeleteBuilder; /** - * Transaction: DIDDelete + * @brief Transaction: DIDDelete + * * Type: ttDID_DELETE (50) * Delegable: Delegation::delegable * Amendment: featureDID @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttDID_DELETE; /** - * Construct a DIDDelete transaction wrapper from an existing STTx object. + * @brief Construct a DIDDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit DIDDelete(std::shared_ptr tx) @@ -49,7 +49,8 @@ public: }; /** - * Builder for DIDDelete transactions. + * @brief Builder for DIDDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -57,6 +58,12 @@ public: class DIDDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new DIDDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ DIDDeleteBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -65,6 +72,11 @@ public: { } + /** + * @brief Construct a DIDDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ DIDDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttDID_DELETE) @@ -74,12 +86,12 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Build and return the DIDDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the DIDDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ DIDDelete diff --git a/include/xrpl/protocol_autogen/transactions/DIDSet.h b/include/xrpl/protocol_autogen/transactions/DIDSet.h index d66d5c50fb..33313d384c 100644 --- a/include/xrpl/protocol_autogen/transactions/DIDSet.h +++ b/include/xrpl/protocol_autogen/transactions/DIDSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class DIDSetBuilder; /** - * Transaction: DIDSet + * @brief Transaction: DIDSet + * * Type: ttDID_SET (49) * Delegable: Delegation::delegable * Amendment: featureDID @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttDID_SET; /** - * Construct a DIDSet transaction wrapper from an existing STTx object. + * @brief Construct a DIDSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit DIDSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDIDDocument (soeOPTIONAL) + * @brief Get sfDIDDocument (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDIDDocument is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDIDDocument() const @@ -69,7 +74,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -90,7 +100,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +114,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -112,7 +127,8 @@ public: }; /** - * Builder for DIDSet transactions. + * @brief Builder for DIDSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -120,6 +136,12 @@ public: class DIDSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new DIDSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ DIDSetBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -128,6 +150,11 @@ public: { } + /** + * @brief Construct a DIDSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ DIDSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttDID_SET) @@ -137,10 +164,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDIDDocument (soeOPTIONAL) + * @brief Set sfDIDDocument (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DIDSetBuilder& @@ -151,7 +178,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DIDSetBuilder& @@ -162,7 +189,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DIDSetBuilder& @@ -173,9 +200,9 @@ public: } /** - * Build and return the DIDSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the DIDSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ DIDSet diff --git a/include/xrpl/protocol_autogen/transactions/DelegateSet.h b/include/xrpl/protocol_autogen/transactions/DelegateSet.h index 65c549cd23..cac4b3abef 100644 --- a/include/xrpl/protocol_autogen/transactions/DelegateSet.h +++ b/include/xrpl/protocol_autogen/transactions/DelegateSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class DelegateSetBuilder; /** - * Transaction: DelegateSet + * @brief Transaction: DelegateSet + * * Type: ttDELEGATE_SET (64) * Delegable: Delegation::notDelegable * Amendment: featurePermissionDelegationV1_1 @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttDELEGATE_SET; /** - * Construct a DelegateSet transaction wrapper from an existing STTx object. + * @brief Construct a DelegateSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit DelegateSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAuthorize (soeREQUIRED) + * @brief Get sfAuthorize (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -57,8 +58,9 @@ public: return this->tx_->at(sfAuthorize); } /** - * Get sfPermissions (soeREQUIRED) - * Note: This is an untyped field + * @brief Get sfPermissions (soeREQUIRED) + * @note This is an untyped field. + * @return The field value. */ [[nodiscard]] STArray const& @@ -69,7 +71,8 @@ public: }; /** - * Builder for DelegateSet transactions. + * @brief Builder for DelegateSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -77,6 +80,14 @@ public: class DelegateSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new DelegateSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param authorize The sfAuthorize field value. + * @param permissions The sfPermissions field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ DelegateSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& authorize, STArray const& permissions, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -87,6 +98,11 @@ public: setPermissions(permissions); } + /** + * @brief Construct a DelegateSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ DelegateSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttDELEGATE_SET) @@ -96,10 +112,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAuthorize (soeREQUIRED) + * @brief Set sfAuthorize (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateSetBuilder& @@ -110,7 +126,7 @@ public: } /** - * Set sfPermissions (soeREQUIRED) + * @brief Set sfPermissions (soeREQUIRED) * @return Reference to this builder for method chaining. */ DelegateSetBuilder& @@ -121,9 +137,9 @@ public: } /** - * Build and return the DelegateSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the DelegateSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ DelegateSet diff --git a/include/xrpl/protocol_autogen/transactions/DepositPreauth.h b/include/xrpl/protocol_autogen/transactions/DepositPreauth.h index 948cfe56b6..eae8b113a9 100644 --- a/include/xrpl/protocol_autogen/transactions/DepositPreauth.h +++ b/include/xrpl/protocol_autogen/transactions/DepositPreauth.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class DepositPreauthBuilder; /** - * Transaction: DepositPreauth + * @brief Transaction: DepositPreauth + * * Type: ttDEPOSIT_PREAUTH (19) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttDEPOSIT_PREAUTH; /** - * Construct a DepositPreauth transaction wrapper from an existing STTx object. + * @brief Construct a DepositPreauth transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit DepositPreauth(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAuthorize (soeOPTIONAL) + * @brief Get sfAuthorize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAuthorize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAuthorize() const @@ -69,7 +74,8 @@ public: } /** - * Get sfUnauthorize (soeOPTIONAL) + * @brief Get sfUnauthorize (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfUnauthorize is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasUnauthorize() const @@ -89,8 +99,9 @@ public: return this->tx_->isFieldPresent(sfUnauthorize); } /** - * Get sfAuthorizeCredentials (soeOPTIONAL) - * Note: This is an untyped field + * @brief Get sfAuthorizeCredentials (soeOPTIONAL) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -101,6 +112,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAuthorizeCredentials is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAuthorizeCredentials() const @@ -108,8 +123,9 @@ public: return this->tx_->isFieldPresent(sfAuthorizeCredentials); } /** - * Get sfUnauthorizeCredentials (soeOPTIONAL) - * Note: This is an untyped field + * @brief Get sfUnauthorizeCredentials (soeOPTIONAL) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -120,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfUnauthorizeCredentials is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasUnauthorizeCredentials() const @@ -129,7 +149,8 @@ public: }; /** - * Builder for DepositPreauth transactions. + * @brief Builder for DepositPreauth transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -137,6 +158,12 @@ public: class DepositPreauthBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new DepositPreauthBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ DepositPreauthBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -145,6 +172,11 @@ public: { } + /** + * @brief Construct a DepositPreauthBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ DepositPreauthBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttDEPOSIT_PREAUTH) @@ -154,10 +186,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAuthorize (soeOPTIONAL) + * @brief Set sfAuthorize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -168,7 +200,7 @@ public: } /** - * Set sfUnauthorize (soeOPTIONAL) + * @brief Set sfUnauthorize (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -179,7 +211,7 @@ public: } /** - * Set sfAuthorizeCredentials (soeOPTIONAL) + * @brief Set sfAuthorizeCredentials (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -190,7 +222,7 @@ public: } /** - * Set sfUnauthorizeCredentials (soeOPTIONAL) + * @brief Set sfUnauthorizeCredentials (soeOPTIONAL) * @return Reference to this builder for method chaining. */ DepositPreauthBuilder& @@ -201,9 +233,9 @@ public: } /** - * Build and return the DepositPreauth wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the DepositPreauth wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ DepositPreauth diff --git a/include/xrpl/protocol_autogen/transactions/EnableAmendment.h b/include/xrpl/protocol_autogen/transactions/EnableAmendment.h index b610f5ecf6..0bf3dfd575 100644 --- a/include/xrpl/protocol_autogen/transactions/EnableAmendment.h +++ b/include/xrpl/protocol_autogen/transactions/EnableAmendment.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class EnableAmendmentBuilder; /** - * Transaction: EnableAmendment + * @brief Transaction: EnableAmendment + * * Type: ttAMENDMENT (100) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttAMENDMENT; /** - * Construct a EnableAmendment transaction wrapper from an existing STTx object. + * @brief Construct a EnableAmendment transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit EnableAmendment(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLedgerSequence (soeREQUIRED) + * @brief Get sfLedgerSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmendment (soeREQUIRED) + * @brief Get sfAmendment (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -69,7 +71,8 @@ public: }; /** - * Builder for EnableAmendment transactions. + * @brief Builder for EnableAmendment transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -77,6 +80,14 @@ public: class EnableAmendmentBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new EnableAmendmentBuilder with required fields. + * @param account The account initiating the transaction. + * @param ledgerSequence The sfLedgerSequence field value. + * @param amendment The sfAmendment field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ EnableAmendmentBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& ledgerSequence, std::decay_t const& amendment, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -87,6 +98,11 @@ public: setAmendment(amendment); } + /** + * @brief Construct a EnableAmendmentBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ EnableAmendmentBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttAMENDMENT) @@ -96,10 +112,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLedgerSequence (soeREQUIRED) + * @brief Set sfLedgerSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ EnableAmendmentBuilder& @@ -110,7 +126,7 @@ public: } /** - * Set sfAmendment (soeREQUIRED) + * @brief Set sfAmendment (soeREQUIRED) * @return Reference to this builder for method chaining. */ EnableAmendmentBuilder& @@ -121,9 +137,9 @@ public: } /** - * Build and return the EnableAmendment wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the EnableAmendment wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ EnableAmendment diff --git a/include/xrpl/protocol_autogen/transactions/EscrowCancel.h b/include/xrpl/protocol_autogen/transactions/EscrowCancel.h index d438fd32a2..a92d5b10ae 100644 --- a/include/xrpl/protocol_autogen/transactions/EscrowCancel.h +++ b/include/xrpl/protocol_autogen/transactions/EscrowCancel.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class EscrowCancelBuilder; /** - * Transaction: EscrowCancel + * @brief Transaction: EscrowCancel + * * Type: ttESCROW_CANCEL (4) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttESCROW_CANCEL; /** - * Construct a EscrowCancel transaction wrapper from an existing STTx object. + * @brief Construct a EscrowCancel transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit EscrowCancel(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfOfferSequence (soeREQUIRED) + * @brief Get sfOfferSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -69,7 +71,8 @@ public: }; /** - * Builder for EscrowCancel transactions. + * @brief Builder for EscrowCancel transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -77,6 +80,14 @@ public: class EscrowCancelBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new EscrowCancelBuilder with required fields. + * @param account The account initiating the transaction. + * @param owner The sfOwner field value. + * @param offerSequence The sfOfferSequence field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ EscrowCancelBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& owner, std::decay_t const& offerSequence, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -87,6 +98,11 @@ public: setOfferSequence(offerSequence); } + /** + * @brief Construct a EscrowCancelBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ EscrowCancelBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttESCROW_CANCEL) @@ -96,10 +112,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowCancelBuilder& @@ -110,7 +126,7 @@ public: } /** - * Set sfOfferSequence (soeREQUIRED) + * @brief Set sfOfferSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowCancelBuilder& @@ -121,9 +137,9 @@ public: } /** - * Build and return the EscrowCancel wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the EscrowCancel wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ EscrowCancel diff --git a/include/xrpl/protocol_autogen/transactions/EscrowCreate.h b/include/xrpl/protocol_autogen/transactions/EscrowCreate.h index 5b97b0ccfd..32dae6cc57 100644 --- a/include/xrpl/protocol_autogen/transactions/EscrowCreate.h +++ b/include/xrpl/protocol_autogen/transactions/EscrowCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class EscrowCreateBuilder; /** - * Transaction: EscrowCreate + * @brief Transaction: EscrowCreate + * * Type: ttESCROW_CREATE (1) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttESCROW_CREATE; /** - * Construct a EscrowCreate transaction wrapper from an existing STTx object. + * @brief Construct a EscrowCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit EscrowCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -69,7 +71,8 @@ public: } /** - * Get sfCondition (soeOPTIONAL) + * @brief Get sfCondition (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +85,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCondition is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCondition() const @@ -90,7 +97,8 @@ public: } /** - * Get sfCancelAfter (soeOPTIONAL) + * @brief Get sfCancelAfter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +111,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCancelAfter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCancelAfter() const @@ -111,7 +123,8 @@ public: } /** - * Get sfFinishAfter (soeOPTIONAL) + * @brief Get sfFinishAfter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -124,6 +137,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfFinishAfter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasFinishAfter() const @@ -132,7 +149,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -145,6 +163,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -154,7 +176,8 @@ public: }; /** - * Builder for EscrowCreate transactions. + * @brief Builder for EscrowCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -162,6 +185,14 @@ public: class EscrowCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new EscrowCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ EscrowCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& destination, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -172,6 +203,11 @@ public: setAmount(amount); } + /** + * @brief Construct a EscrowCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ EscrowCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttESCROW_CREATE) @@ -181,10 +217,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowCreateBuilder& @@ -195,8 +231,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ EscrowCreateBuilder& @@ -207,7 +243,7 @@ public: } /** - * Set sfCondition (soeOPTIONAL) + * @brief Set sfCondition (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowCreateBuilder& @@ -218,7 +254,7 @@ public: } /** - * Set sfCancelAfter (soeOPTIONAL) + * @brief Set sfCancelAfter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowCreateBuilder& @@ -229,7 +265,7 @@ public: } /** - * Set sfFinishAfter (soeOPTIONAL) + * @brief Set sfFinishAfter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowCreateBuilder& @@ -240,7 +276,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowCreateBuilder& @@ -251,9 +287,9 @@ public: } /** - * Build and return the EscrowCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the EscrowCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ EscrowCreate diff --git a/include/xrpl/protocol_autogen/transactions/EscrowFinish.h b/include/xrpl/protocol_autogen/transactions/EscrowFinish.h index 7288648a76..20e9a089fb 100644 --- a/include/xrpl/protocol_autogen/transactions/EscrowFinish.h +++ b/include/xrpl/protocol_autogen/transactions/EscrowFinish.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class EscrowFinishBuilder; /** - * Transaction: EscrowFinish + * @brief Transaction: EscrowFinish + * * Type: ttESCROW_FINISH (2) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttESCROW_FINISH; /** - * Construct a EscrowFinish transaction wrapper from an existing STTx object. + * @brief Construct a EscrowFinish transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit EscrowFinish(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfOwner (soeREQUIRED) + * @brief Get sfOwner (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfOfferSequence (soeREQUIRED) + * @brief Get sfOfferSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfFulfillment (soeOPTIONAL) + * @brief Get sfFulfillment (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfFulfillment is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasFulfillment() const @@ -89,7 +96,8 @@ public: } /** - * Get sfCondition (soeOPTIONAL) + * @brief Get sfCondition (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCondition is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCondition() const @@ -110,7 +122,8 @@ public: } /** - * Get sfCredentialIDs (soeOPTIONAL) + * @brief Get sfCredentialIDs (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCredentialIDs is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCredentialIDs() const @@ -132,7 +149,8 @@ public: }; /** - * Builder for EscrowFinish transactions. + * @brief Builder for EscrowFinish transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -140,6 +158,14 @@ public: class EscrowFinishBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new EscrowFinishBuilder with required fields. + * @param account The account initiating the transaction. + * @param owner The sfOwner field value. + * @param offerSequence The sfOfferSequence field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ EscrowFinishBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& owner, std::decay_t const& offerSequence, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -150,6 +176,11 @@ public: setOfferSequence(offerSequence); } + /** + * @brief Construct a EscrowFinishBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ EscrowFinishBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttESCROW_FINISH) @@ -159,10 +190,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfOwner (soeREQUIRED) + * @brief Set sfOwner (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowFinishBuilder& @@ -173,7 +204,7 @@ public: } /** - * Set sfOfferSequence (soeREQUIRED) + * @brief Set sfOfferSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ EscrowFinishBuilder& @@ -184,7 +215,7 @@ public: } /** - * Set sfFulfillment (soeOPTIONAL) + * @brief Set sfFulfillment (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowFinishBuilder& @@ -195,7 +226,7 @@ public: } /** - * Set sfCondition (soeOPTIONAL) + * @brief Set sfCondition (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowFinishBuilder& @@ -206,7 +237,7 @@ public: } /** - * Set sfCredentialIDs (soeOPTIONAL) + * @brief Set sfCredentialIDs (soeOPTIONAL) * @return Reference to this builder for method chaining. */ EscrowFinishBuilder& @@ -217,9 +248,9 @@ public: } /** - * Build and return the EscrowFinish wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the EscrowFinish wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ EscrowFinish diff --git a/include/xrpl/protocol_autogen/transactions/LedgerStateFix.h b/include/xrpl/protocol_autogen/transactions/LedgerStateFix.h index 0ff1a45de4..6f60b81a04 100644 --- a/include/xrpl/protocol_autogen/transactions/LedgerStateFix.h +++ b/include/xrpl/protocol_autogen/transactions/LedgerStateFix.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LedgerStateFixBuilder; /** - * Transaction: LedgerStateFix + * @brief Transaction: LedgerStateFix + * * Type: ttLEDGER_STATE_FIX (53) * Delegable: Delegation::delegable * Amendment: fixNFTokenPageLinks @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLEDGER_STATE_FIX; /** - * Construct a LedgerStateFix transaction wrapper from an existing STTx object. + * @brief Construct a LedgerStateFix transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LedgerStateFix(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLedgerFixType (soeREQUIRED) + * @brief Get sfLedgerFixType (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT16::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfOwner (soeOPTIONAL) + * @brief Get sfOwner (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwner is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwner() const @@ -80,7 +86,8 @@ public: }; /** - * Builder for LedgerStateFix transactions. + * @brief Builder for LedgerStateFix transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -88,6 +95,13 @@ public: class LedgerStateFixBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LedgerStateFixBuilder with required fields. + * @param account The account initiating the transaction. + * @param ledgerFixType The sfLedgerFixType field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LedgerStateFixBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& ledgerFixType, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -97,6 +111,11 @@ public: setLedgerFixType(ledgerFixType); } + /** + * @brief Construct a LedgerStateFixBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LedgerStateFixBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLEDGER_STATE_FIX) @@ -106,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLedgerFixType (soeREQUIRED) + * @brief Set sfLedgerFixType (soeREQUIRED) * @return Reference to this builder for method chaining. */ LedgerStateFixBuilder& @@ -120,7 +139,7 @@ public: } /** - * Set sfOwner (soeOPTIONAL) + * @brief Set sfOwner (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LedgerStateFixBuilder& @@ -131,9 +150,9 @@ public: } /** - * Build and return the LedgerStateFix wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LedgerStateFix wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LedgerStateFix diff --git a/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverClawback.h b/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverClawback.h index dbe27722f0..0069868e47 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverClawback.h +++ b/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverClawback.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanBrokerCoverClawbackBuilder; /** - * Transaction: LoanBrokerCoverClawback + * @brief Transaction: LoanBrokerCoverClawback + * * Type: ttLOAN_BROKER_COVER_CLAWBACK (78) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_BROKER_COVER_CLAWBACK; /** - * Construct a LoanBrokerCoverClawback transaction wrapper from an existing STTx object. + * @brief Construct a LoanBrokerCoverClawback transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanBrokerCoverClawback(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanBrokerID (soeOPTIONAL) + * @brief Get sfLoanBrokerID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanBrokerID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanBrokerID() const @@ -69,8 +74,9 @@ public: } /** - * Get sfAmount (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -83,6 +89,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -92,7 +102,8 @@ public: }; /** - * Builder for LoanBrokerCoverClawback transactions. + * @brief Builder for LoanBrokerCoverClawback transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -100,6 +111,12 @@ public: class LoanBrokerCoverClawbackBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanBrokerCoverClawbackBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanBrokerCoverClawbackBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -108,6 +125,11 @@ public: { } + /** + * @brief Construct a LoanBrokerCoverClawbackBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanBrokerCoverClawbackBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_BROKER_COVER_CLAWBACK) @@ -117,10 +139,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanBrokerID (soeOPTIONAL) + * @brief Set sfLoanBrokerID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerCoverClawbackBuilder& @@ -131,8 +153,8 @@ public: } /** - * Set sfAmount (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ LoanBrokerCoverClawbackBuilder& @@ -143,9 +165,9 @@ public: } /** - * Build and return the LoanBrokerCoverClawback wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanBrokerCoverClawback wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanBrokerCoverClawback diff --git a/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverDeposit.h b/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverDeposit.h index dff41fc3c2..5401faac4c 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverDeposit.h +++ b/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverDeposit.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanBrokerCoverDepositBuilder; /** - * Transaction: LoanBrokerCoverDeposit + * @brief Transaction: LoanBrokerCoverDeposit + * * Type: ttLOAN_BROKER_COVER_DEPOSIT (76) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_BROKER_COVER_DEPOSIT; /** - * Construct a LoanBrokerCoverDeposit transaction wrapper from an existing STTx object. + * @brief Construct a LoanBrokerCoverDeposit transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanBrokerCoverDeposit(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanBrokerID (soeREQUIRED) + * @brief Get sfLoanBrokerID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -70,7 +72,8 @@ public: }; /** - * Builder for LoanBrokerCoverDeposit transactions. + * @brief Builder for LoanBrokerCoverDeposit transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -78,6 +81,14 @@ public: class LoanBrokerCoverDepositBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanBrokerCoverDepositBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanBrokerID The sfLoanBrokerID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanBrokerCoverDepositBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanBrokerID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -88,6 +99,11 @@ public: setAmount(amount); } + /** + * @brief Construct a LoanBrokerCoverDepositBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanBrokerCoverDepositBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_BROKER_COVER_DEPOSIT) @@ -97,10 +113,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanBrokerID (soeREQUIRED) + * @brief Set sfLoanBrokerID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerCoverDepositBuilder& @@ -111,8 +127,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ LoanBrokerCoverDepositBuilder& @@ -123,9 +139,9 @@ public: } /** - * Build and return the LoanBrokerCoverDeposit wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanBrokerCoverDeposit wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanBrokerCoverDeposit diff --git a/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverWithdraw.h b/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverWithdraw.h index 218e191e62..bd9515286c 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverWithdraw.h +++ b/include/xrpl/protocol_autogen/transactions/LoanBrokerCoverWithdraw.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanBrokerCoverWithdrawBuilder; /** - * Transaction: LoanBrokerCoverWithdraw + * @brief Transaction: LoanBrokerCoverWithdraw + * * Type: ttLOAN_BROKER_COVER_WITHDRAW (77) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_BROKER_COVER_WITHDRAW; /** - * Construct a LoanBrokerCoverWithdraw transaction wrapper from an existing STTx object. + * @brief Construct a LoanBrokerCoverWithdraw transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanBrokerCoverWithdraw(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanBrokerID (soeREQUIRED) + * @brief Get sfLoanBrokerID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -69,7 +71,8 @@ public: } /** - * Get sfDestination (soeOPTIONAL) + * @brief Get sfDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +85,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestination() const @@ -90,7 +97,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +111,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -112,7 +124,8 @@ public: }; /** - * Builder for LoanBrokerCoverWithdraw transactions. + * @brief Builder for LoanBrokerCoverWithdraw transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -120,6 +133,14 @@ public: class LoanBrokerCoverWithdrawBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanBrokerCoverWithdrawBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanBrokerID The sfLoanBrokerID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanBrokerCoverWithdrawBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanBrokerID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -130,6 +151,11 @@ public: setAmount(amount); } + /** + * @brief Construct a LoanBrokerCoverWithdrawBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanBrokerCoverWithdrawBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_BROKER_COVER_WITHDRAW) @@ -139,10 +165,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanBrokerID (soeREQUIRED) + * @brief Set sfLoanBrokerID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerCoverWithdrawBuilder& @@ -153,8 +179,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ LoanBrokerCoverWithdrawBuilder& @@ -165,7 +191,7 @@ public: } /** - * Set sfDestination (soeOPTIONAL) + * @brief Set sfDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerCoverWithdrawBuilder& @@ -176,7 +202,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerCoverWithdrawBuilder& @@ -187,9 +213,9 @@ public: } /** - * Build and return the LoanBrokerCoverWithdraw wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanBrokerCoverWithdraw wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanBrokerCoverWithdraw diff --git a/include/xrpl/protocol_autogen/transactions/LoanBrokerDelete.h b/include/xrpl/protocol_autogen/transactions/LoanBrokerDelete.h index f3e0716797..13ba5f4823 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanBrokerDelete.h +++ b/include/xrpl/protocol_autogen/transactions/LoanBrokerDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanBrokerDeleteBuilder; /** - * Transaction: LoanBrokerDelete + * @brief Transaction: LoanBrokerDelete + * * Type: ttLOAN_BROKER_DELETE (75) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_BROKER_DELETE; /** - * Construct a LoanBrokerDelete transaction wrapper from an existing STTx object. + * @brief Construct a LoanBrokerDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanBrokerDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanBrokerID (soeREQUIRED) + * @brief Get sfLoanBrokerID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for LoanBrokerDelete transactions. + * @brief Builder for LoanBrokerDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class LoanBrokerDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanBrokerDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanBrokerID The sfLoanBrokerID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanBrokerDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanBrokerID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setLoanBrokerID(loanBrokerID); } + /** + * @brief Construct a LoanBrokerDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanBrokerDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_BROKER_DELETE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanBrokerID (soeREQUIRED) + * @brief Set sfLoanBrokerID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerDeleteBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the LoanBrokerDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanBrokerDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanBrokerDelete diff --git a/include/xrpl/protocol_autogen/transactions/LoanBrokerSet.h b/include/xrpl/protocol_autogen/transactions/LoanBrokerSet.h index 7ed59fe366..cf3b34f397 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanBrokerSet.h +++ b/include/xrpl/protocol_autogen/transactions/LoanBrokerSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanBrokerSetBuilder; /** - * Transaction: LoanBrokerSet + * @brief Transaction: LoanBrokerSet + * * Type: ttLOAN_BROKER_SET (74) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_BROKER_SET; /** - * Construct a LoanBrokerSet transaction wrapper from an existing STTx object. + * @brief Construct a LoanBrokerSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanBrokerSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfLoanBrokerID (soeOPTIONAL) + * @brief Get sfLoanBrokerID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanBrokerID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanBrokerID() const @@ -79,7 +85,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -100,7 +111,8 @@ public: } /** - * Get sfManagementFeeRate (soeOPTIONAL) + * @brief Get sfManagementFeeRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -113,6 +125,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfManagementFeeRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasManagementFeeRate() const @@ -121,7 +137,8 @@ public: } /** - * Get sfDebtMaximum (soeOPTIONAL) + * @brief Get sfDebtMaximum (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -134,6 +151,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDebtMaximum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDebtMaximum() const @@ -142,7 +163,8 @@ public: } /** - * Get sfCoverRateMinimum (soeOPTIONAL) + * @brief Get sfCoverRateMinimum (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +177,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCoverRateMinimum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCoverRateMinimum() const @@ -163,7 +189,8 @@ public: } /** - * Get sfCoverRateLiquidation (soeOPTIONAL) + * @brief Get sfCoverRateLiquidation (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -176,6 +203,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCoverRateLiquidation is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCoverRateLiquidation() const @@ -185,7 +216,8 @@ public: }; /** - * Builder for LoanBrokerSet transactions. + * @brief Builder for LoanBrokerSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -193,6 +225,13 @@ public: class LoanBrokerSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanBrokerSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param vaultID The sfVaultID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanBrokerSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& vaultID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -202,6 +241,11 @@ public: setVaultID(vaultID); } + /** + * @brief Construct a LoanBrokerSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanBrokerSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_BROKER_SET) @@ -211,10 +255,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -225,7 +269,7 @@ public: } /** - * Set sfLoanBrokerID (soeOPTIONAL) + * @brief Set sfLoanBrokerID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -236,7 +280,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -247,7 +291,7 @@ public: } /** - * Set sfManagementFeeRate (soeOPTIONAL) + * @brief Set sfManagementFeeRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -258,7 +302,7 @@ public: } /** - * Set sfDebtMaximum (soeOPTIONAL) + * @brief Set sfDebtMaximum (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -269,7 +313,7 @@ public: } /** - * Set sfCoverRateMinimum (soeOPTIONAL) + * @brief Set sfCoverRateMinimum (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -280,7 +324,7 @@ public: } /** - * Set sfCoverRateLiquidation (soeOPTIONAL) + * @brief Set sfCoverRateLiquidation (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanBrokerSetBuilder& @@ -291,9 +335,9 @@ public: } /** - * Build and return the LoanBrokerSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanBrokerSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanBrokerSet diff --git a/include/xrpl/protocol_autogen/transactions/LoanDelete.h b/include/xrpl/protocol_autogen/transactions/LoanDelete.h index 3ab27af914..bec9994d6f 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanDelete.h +++ b/include/xrpl/protocol_autogen/transactions/LoanDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanDeleteBuilder; /** - * Transaction: LoanDelete + * @brief Transaction: LoanDelete + * * Type: ttLOAN_DELETE (81) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_DELETE; /** - * Construct a LoanDelete transaction wrapper from an existing STTx object. + * @brief Construct a LoanDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanID (soeREQUIRED) + * @brief Get sfLoanID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for LoanDelete transactions. + * @brief Builder for LoanDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class LoanDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanID The sfLoanID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setLoanID(loanID); } + /** + * @brief Construct a LoanDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_DELETE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanID (soeREQUIRED) + * @brief Set sfLoanID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanDeleteBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the LoanDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanDelete diff --git a/include/xrpl/protocol_autogen/transactions/LoanManage.h b/include/xrpl/protocol_autogen/transactions/LoanManage.h index 89f7fa38f6..76635c99f9 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanManage.h +++ b/include/xrpl/protocol_autogen/transactions/LoanManage.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanManageBuilder; /** - * Transaction: LoanManage + * @brief Transaction: LoanManage + * * Type: ttLOAN_MANAGE (82) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_MANAGE; /** - * Construct a LoanManage transaction wrapper from an existing STTx object. + * @brief Construct a LoanManage transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanManage(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanID (soeREQUIRED) + * @brief Get sfLoanID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for LoanManage transactions. + * @brief Builder for LoanManage transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class LoanManageBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanManageBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanID The sfLoanID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanManageBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setLoanID(loanID); } + /** + * @brief Construct a LoanManageBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanManageBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_MANAGE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanID (soeREQUIRED) + * @brief Set sfLoanID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanManageBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the LoanManage wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanManage wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanManage diff --git a/include/xrpl/protocol_autogen/transactions/LoanPay.h b/include/xrpl/protocol_autogen/transactions/LoanPay.h index 00eb52f113..66ccd48679 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanPay.h +++ b/include/xrpl/protocol_autogen/transactions/LoanPay.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanPayBuilder; /** - * Transaction: LoanPay + * @brief Transaction: LoanPay + * * Type: ttLOAN_PAY (84) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_PAY; /** - * Construct a LoanPay transaction wrapper from an existing STTx object. + * @brief Construct a LoanPay transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanPay(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanID (soeREQUIRED) + * @brief Get sfLoanID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -70,7 +72,8 @@ public: }; /** - * Builder for LoanPay transactions. + * @brief Builder for LoanPay transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -78,6 +81,14 @@ public: class LoanPayBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanPayBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanID The sfLoanID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanPayBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -88,6 +99,11 @@ public: setAmount(amount); } + /** + * @brief Construct a LoanPayBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanPayBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_PAY) @@ -97,10 +113,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanID (soeREQUIRED) + * @brief Set sfLoanID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanPayBuilder& @@ -111,8 +127,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ LoanPayBuilder& @@ -123,9 +139,9 @@ public: } /** - * Build and return the LoanPay wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanPay wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanPay diff --git a/include/xrpl/protocol_autogen/transactions/LoanSet.h b/include/xrpl/protocol_autogen/transactions/LoanSet.h index 26aa3291fe..8436e8f1ac 100644 --- a/include/xrpl/protocol_autogen/transactions/LoanSet.h +++ b/include/xrpl/protocol_autogen/transactions/LoanSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class LoanSetBuilder; /** - * Transaction: LoanSet + * @brief Transaction: LoanSet + * * Type: ttLOAN_SET (80) * Delegable: Delegation::delegable * Amendment: featureLendingProtocol @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttLOAN_SET; /** - * Construct a LoanSet transaction wrapper from an existing STTx object. + * @brief Construct a LoanSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit LoanSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLoanBrokerID (soeREQUIRED) + * @brief Get sfLoanBrokerID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -79,7 +85,8 @@ public: } /** - * Get sfCounterparty (soeOPTIONAL) + * @brief Get sfCounterparty (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCounterparty is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCounterparty() const @@ -99,8 +110,9 @@ public: return this->tx_->isFieldPresent(sfCounterparty); } /** - * Get sfCounterpartySignature (soeOPTIONAL) - * Note: This is an untyped field + * @brief Get sfCounterpartySignature (soeOPTIONAL) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional @@ -111,6 +123,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCounterpartySignature is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCounterpartySignature() const @@ -119,7 +135,8 @@ public: } /** - * Get sfLoanOriginationFee (soeOPTIONAL) + * @brief Get sfLoanOriginationFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -132,6 +149,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanOriginationFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanOriginationFee() const @@ -140,7 +161,8 @@ public: } /** - * Get sfLoanServiceFee (soeOPTIONAL) + * @brief Get sfLoanServiceFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -153,6 +175,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLoanServiceFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLoanServiceFee() const @@ -161,7 +187,8 @@ public: } /** - * Get sfLatePaymentFee (soeOPTIONAL) + * @brief Get sfLatePaymentFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -174,6 +201,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLatePaymentFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLatePaymentFee() const @@ -182,7 +213,8 @@ public: } /** - * Get sfClosePaymentFee (soeOPTIONAL) + * @brief Get sfClosePaymentFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -195,6 +227,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfClosePaymentFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasClosePaymentFee() const @@ -203,7 +239,8 @@ public: } /** - * Get sfOverpaymentFee (soeOPTIONAL) + * @brief Get sfOverpaymentFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -216,6 +253,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOverpaymentFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOverpaymentFee() const @@ -224,7 +265,8 @@ public: } /** - * Get sfInterestRate (soeOPTIONAL) + * @brief Get sfInterestRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -237,6 +279,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasInterestRate() const @@ -245,7 +291,8 @@ public: } /** - * Get sfLateInterestRate (soeOPTIONAL) + * @brief Get sfLateInterestRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -258,6 +305,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLateInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLateInterestRate() const @@ -266,7 +317,8 @@ public: } /** - * Get sfCloseInterestRate (soeOPTIONAL) + * @brief Get sfCloseInterestRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -279,6 +331,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCloseInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCloseInterestRate() const @@ -287,7 +343,8 @@ public: } /** - * Get sfOverpaymentInterestRate (soeOPTIONAL) + * @brief Get sfOverpaymentInterestRate (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -300,6 +357,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOverpaymentInterestRate is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOverpaymentInterestRate() const @@ -308,7 +369,8 @@ public: } /** - * Get sfPrincipalRequested (soeREQUIRED) + * @brief Get sfPrincipalRequested (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_NUMBER::type::value_type @@ -318,7 +380,8 @@ public: } /** - * Get sfPaymentTotal (soeOPTIONAL) + * @brief Get sfPaymentTotal (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -331,6 +394,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPaymentTotal is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPaymentTotal() const @@ -339,7 +406,8 @@ public: } /** - * Get sfPaymentInterval (soeOPTIONAL) + * @brief Get sfPaymentInterval (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -352,6 +420,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPaymentInterval is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPaymentInterval() const @@ -360,7 +432,8 @@ public: } /** - * Get sfGracePeriod (soeOPTIONAL) + * @brief Get sfGracePeriod (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -373,6 +446,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfGracePeriod is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasGracePeriod() const @@ -382,7 +459,8 @@ public: }; /** - * Builder for LoanSet transactions. + * @brief Builder for LoanSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -390,6 +468,14 @@ public: class LoanSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new LoanSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param loanBrokerID The sfLoanBrokerID field value. + * @param principalRequested The sfPrincipalRequested field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ LoanSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& loanBrokerID, std::decay_t const& principalRequested, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -400,6 +486,11 @@ public: setPrincipalRequested(principalRequested); } + /** + * @brief Construct a LoanSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ LoanSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttLOAN_SET) @@ -409,10 +500,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLoanBrokerID (soeREQUIRED) + * @brief Set sfLoanBrokerID (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -423,7 +514,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -434,7 +525,7 @@ public: } /** - * Set sfCounterparty (soeOPTIONAL) + * @brief Set sfCounterparty (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -445,7 +536,7 @@ public: } /** - * Set sfCounterpartySignature (soeOPTIONAL) + * @brief Set sfCounterpartySignature (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -456,7 +547,7 @@ public: } /** - * Set sfLoanOriginationFee (soeOPTIONAL) + * @brief Set sfLoanOriginationFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -467,7 +558,7 @@ public: } /** - * Set sfLoanServiceFee (soeOPTIONAL) + * @brief Set sfLoanServiceFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -478,7 +569,7 @@ public: } /** - * Set sfLatePaymentFee (soeOPTIONAL) + * @brief Set sfLatePaymentFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -489,7 +580,7 @@ public: } /** - * Set sfClosePaymentFee (soeOPTIONAL) + * @brief Set sfClosePaymentFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -500,7 +591,7 @@ public: } /** - * Set sfOverpaymentFee (soeOPTIONAL) + * @brief Set sfOverpaymentFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -511,7 +602,7 @@ public: } /** - * Set sfInterestRate (soeOPTIONAL) + * @brief Set sfInterestRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -522,7 +613,7 @@ public: } /** - * Set sfLateInterestRate (soeOPTIONAL) + * @brief Set sfLateInterestRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -533,7 +624,7 @@ public: } /** - * Set sfCloseInterestRate (soeOPTIONAL) + * @brief Set sfCloseInterestRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -544,7 +635,7 @@ public: } /** - * Set sfOverpaymentInterestRate (soeOPTIONAL) + * @brief Set sfOverpaymentInterestRate (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -555,7 +646,7 @@ public: } /** - * Set sfPrincipalRequested (soeREQUIRED) + * @brief Set sfPrincipalRequested (soeREQUIRED) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -566,7 +657,7 @@ public: } /** - * Set sfPaymentTotal (soeOPTIONAL) + * @brief Set sfPaymentTotal (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -577,7 +668,7 @@ public: } /** - * Set sfPaymentInterval (soeOPTIONAL) + * @brief Set sfPaymentInterval (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -588,7 +679,7 @@ public: } /** - * Set sfGracePeriod (soeOPTIONAL) + * @brief Set sfGracePeriod (soeOPTIONAL) * @return Reference to this builder for method chaining. */ LoanSetBuilder& @@ -599,9 +690,9 @@ public: } /** - * Build and return the LoanSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the LoanSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ LoanSet diff --git a/include/xrpl/protocol_autogen/transactions/MPTokenAuthorize.h b/include/xrpl/protocol_autogen/transactions/MPTokenAuthorize.h index 9c84d6dbf0..a4641f5dc0 100644 --- a/include/xrpl/protocol_autogen/transactions/MPTokenAuthorize.h +++ b/include/xrpl/protocol_autogen/transactions/MPTokenAuthorize.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class MPTokenAuthorizeBuilder; /** - * Transaction: MPTokenAuthorize + * @brief Transaction: MPTokenAuthorize + * * Type: ttMPTOKEN_AUTHORIZE (57) * Delegable: Delegation::delegable * Amendment: featureMPTokensV1 @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttMPTOKEN_AUTHORIZE; /** - * Construct a MPTokenAuthorize transaction wrapper from an existing STTx object. + * @brief Construct a MPTokenAuthorize transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit MPTokenAuthorize(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfMPTokenIssuanceID (soeREQUIRED) + * @brief Get sfMPTokenIssuanceID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT192::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfHolder (soeOPTIONAL) + * @brief Get sfHolder (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfHolder is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasHolder() const @@ -80,7 +86,8 @@ public: }; /** - * Builder for MPTokenAuthorize transactions. + * @brief Builder for MPTokenAuthorize transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -88,6 +95,13 @@ public: class MPTokenAuthorizeBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new MPTokenAuthorizeBuilder with required fields. + * @param account The account initiating the transaction. + * @param mPTokenIssuanceID The sfMPTokenIssuanceID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ MPTokenAuthorizeBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& mPTokenIssuanceID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -97,6 +111,11 @@ public: setMPTokenIssuanceID(mPTokenIssuanceID); } + /** + * @brief Construct a MPTokenAuthorizeBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ MPTokenAuthorizeBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttMPTOKEN_AUTHORIZE) @@ -106,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfMPTokenIssuanceID (soeREQUIRED) + * @brief Set sfMPTokenIssuanceID (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenAuthorizeBuilder& @@ -120,7 +139,7 @@ public: } /** - * Set sfHolder (soeOPTIONAL) + * @brief Set sfHolder (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenAuthorizeBuilder& @@ -131,9 +150,9 @@ public: } /** - * Build and return the MPTokenAuthorize wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the MPTokenAuthorize wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ MPTokenAuthorize diff --git a/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceCreate.h b/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceCreate.h index 977a28bb44..6f5c50fc4a 100644 --- a/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceCreate.h +++ b/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class MPTokenIssuanceCreateBuilder; /** - * Transaction: MPTokenIssuanceCreate + * @brief Transaction: MPTokenIssuanceCreate + * * Type: ttMPTOKEN_ISSUANCE_CREATE (54) * Delegable: Delegation::delegable * Amendment: featureMPTokensV1 @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttMPTOKEN_ISSUANCE_CREATE; /** - * Construct a MPTokenIssuanceCreate transaction wrapper from an existing STTx object. + * @brief Construct a MPTokenIssuanceCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit MPTokenIssuanceCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfAssetScale (soeOPTIONAL) + * @brief Get sfAssetScale (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetScale is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetScale() const @@ -69,7 +74,8 @@ public: } /** - * Get sfTransferFee (soeOPTIONAL) + * @brief Get sfTransferFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferFee() const @@ -90,7 +100,8 @@ public: } /** - * Get sfMaximumAmount (soeOPTIONAL) + * @brief Get sfMaximumAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +114,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMaximumAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMaximumAmount() const @@ -111,7 +126,8 @@ public: } /** - * Get sfMPTokenMetadata (soeOPTIONAL) + * @brief Get sfMPTokenMetadata (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -124,6 +140,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMPTokenMetadata is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMPTokenMetadata() const @@ -132,7 +152,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -145,6 +166,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -153,7 +178,8 @@ public: } /** - * Get sfMutableFlags (soeOPTIONAL) + * @brief Get sfMutableFlags (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +192,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMutableFlags is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMutableFlags() const @@ -175,7 +205,8 @@ public: }; /** - * Builder for MPTokenIssuanceCreate transactions. + * @brief Builder for MPTokenIssuanceCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -183,6 +214,12 @@ public: class MPTokenIssuanceCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new MPTokenIssuanceCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ MPTokenIssuanceCreateBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -191,6 +228,11 @@ public: { } + /** + * @brief Construct a MPTokenIssuanceCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ MPTokenIssuanceCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttMPTOKEN_ISSUANCE_CREATE) @@ -200,10 +242,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAssetScale (soeOPTIONAL) + * @brief Set sfAssetScale (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceCreateBuilder& @@ -214,7 +256,7 @@ public: } /** - * Set sfTransferFee (soeOPTIONAL) + * @brief Set sfTransferFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceCreateBuilder& @@ -225,7 +267,7 @@ public: } /** - * Set sfMaximumAmount (soeOPTIONAL) + * @brief Set sfMaximumAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceCreateBuilder& @@ -236,7 +278,7 @@ public: } /** - * Set sfMPTokenMetadata (soeOPTIONAL) + * @brief Set sfMPTokenMetadata (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceCreateBuilder& @@ -247,7 +289,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceCreateBuilder& @@ -258,7 +300,7 @@ public: } /** - * Set sfMutableFlags (soeOPTIONAL) + * @brief Set sfMutableFlags (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceCreateBuilder& @@ -269,9 +311,9 @@ public: } /** - * Build and return the MPTokenIssuanceCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the MPTokenIssuanceCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ MPTokenIssuanceCreate diff --git a/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceDestroy.h b/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceDestroy.h index d2cedb1a2f..28d2e49971 100644 --- a/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceDestroy.h +++ b/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceDestroy.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class MPTokenIssuanceDestroyBuilder; /** - * Transaction: MPTokenIssuanceDestroy + * @brief Transaction: MPTokenIssuanceDestroy + * * Type: ttMPTOKEN_ISSUANCE_DESTROY (55) * Delegable: Delegation::delegable * Amendment: featureMPTokensV1 @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttMPTOKEN_ISSUANCE_DESTROY; /** - * Construct a MPTokenIssuanceDestroy transaction wrapper from an existing STTx object. + * @brief Construct a MPTokenIssuanceDestroy transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit MPTokenIssuanceDestroy(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfMPTokenIssuanceID (soeREQUIRED) + * @brief Get sfMPTokenIssuanceID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT192::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for MPTokenIssuanceDestroy transactions. + * @brief Builder for MPTokenIssuanceDestroy transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class MPTokenIssuanceDestroyBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new MPTokenIssuanceDestroyBuilder with required fields. + * @param account The account initiating the transaction. + * @param mPTokenIssuanceID The sfMPTokenIssuanceID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ MPTokenIssuanceDestroyBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& mPTokenIssuanceID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setMPTokenIssuanceID(mPTokenIssuanceID); } + /** + * @brief Construct a MPTokenIssuanceDestroyBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ MPTokenIssuanceDestroyBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttMPTOKEN_ISSUANCE_DESTROY) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfMPTokenIssuanceID (soeREQUIRED) + * @brief Set sfMPTokenIssuanceID (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceDestroyBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the MPTokenIssuanceDestroy wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the MPTokenIssuanceDestroy wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ MPTokenIssuanceDestroy diff --git a/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceSet.h b/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceSet.h index 2f77b13472..429b252e95 100644 --- a/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceSet.h +++ b/include/xrpl/protocol_autogen/transactions/MPTokenIssuanceSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class MPTokenIssuanceSetBuilder; /** - * Transaction: MPTokenIssuanceSet + * @brief Transaction: MPTokenIssuanceSet + * * Type: ttMPTOKEN_ISSUANCE_SET (56) * Delegable: Delegation::delegable * Amendment: featureMPTokensV1 @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttMPTOKEN_ISSUANCE_SET; /** - * Construct a MPTokenIssuanceSet transaction wrapper from an existing STTx object. + * @brief Construct a MPTokenIssuanceSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit MPTokenIssuanceSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfMPTokenIssuanceID (soeREQUIRED) + * @brief Get sfMPTokenIssuanceID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT192::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfHolder (soeOPTIONAL) + * @brief Get sfHolder (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfHolder is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasHolder() const @@ -79,7 +85,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -100,7 +111,8 @@ public: } /** - * Get sfMPTokenMetadata (soeOPTIONAL) + * @brief Get sfMPTokenMetadata (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -113,6 +125,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMPTokenMetadata is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMPTokenMetadata() const @@ -121,7 +137,8 @@ public: } /** - * Get sfTransferFee (soeOPTIONAL) + * @brief Get sfTransferFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -134,6 +151,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferFee() const @@ -142,7 +163,8 @@ public: } /** - * Get sfMutableFlags (soeOPTIONAL) + * @brief Get sfMutableFlags (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +177,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMutableFlags is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMutableFlags() const @@ -164,7 +190,8 @@ public: }; /** - * Builder for MPTokenIssuanceSet transactions. + * @brief Builder for MPTokenIssuanceSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -172,6 +199,13 @@ public: class MPTokenIssuanceSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new MPTokenIssuanceSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param mPTokenIssuanceID The sfMPTokenIssuanceID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ MPTokenIssuanceSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& mPTokenIssuanceID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -181,6 +215,11 @@ public: setMPTokenIssuanceID(mPTokenIssuanceID); } + /** + * @brief Construct a MPTokenIssuanceSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ MPTokenIssuanceSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttMPTOKEN_ISSUANCE_SET) @@ -190,10 +229,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfMPTokenIssuanceID (soeREQUIRED) + * @brief Set sfMPTokenIssuanceID (soeREQUIRED) * @return Reference to this builder for method chaining. */ MPTokenIssuanceSetBuilder& @@ -204,7 +243,7 @@ public: } /** - * Set sfHolder (soeOPTIONAL) + * @brief Set sfHolder (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceSetBuilder& @@ -215,7 +254,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceSetBuilder& @@ -226,7 +265,7 @@ public: } /** - * Set sfMPTokenMetadata (soeOPTIONAL) + * @brief Set sfMPTokenMetadata (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceSetBuilder& @@ -237,7 +276,7 @@ public: } /** - * Set sfTransferFee (soeOPTIONAL) + * @brief Set sfTransferFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceSetBuilder& @@ -248,7 +287,7 @@ public: } /** - * Set sfMutableFlags (soeOPTIONAL) + * @brief Set sfMutableFlags (soeOPTIONAL) * @return Reference to this builder for method chaining. */ MPTokenIssuanceSetBuilder& @@ -259,9 +298,9 @@ public: } /** - * Build and return the MPTokenIssuanceSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the MPTokenIssuanceSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ MPTokenIssuanceSet diff --git a/include/xrpl/protocol_autogen/transactions/NFTokenAcceptOffer.h b/include/xrpl/protocol_autogen/transactions/NFTokenAcceptOffer.h index 8ca7cb5e89..53ae614ee4 100644 --- a/include/xrpl/protocol_autogen/transactions/NFTokenAcceptOffer.h +++ b/include/xrpl/protocol_autogen/transactions/NFTokenAcceptOffer.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class NFTokenAcceptOfferBuilder; /** - * Transaction: NFTokenAcceptOffer + * @brief Transaction: NFTokenAcceptOffer + * * Type: ttNFTOKEN_ACCEPT_OFFER (29) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttNFTOKEN_ACCEPT_OFFER; /** - * Construct a NFTokenAcceptOffer transaction wrapper from an existing STTx object. + * @brief Construct a NFTokenAcceptOffer transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit NFTokenAcceptOffer(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfNFTokenBuyOffer (soeOPTIONAL) + * @brief Get sfNFTokenBuyOffer (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNFTokenBuyOffer is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNFTokenBuyOffer() const @@ -69,7 +74,8 @@ public: } /** - * Get sfNFTokenSellOffer (soeOPTIONAL) + * @brief Get sfNFTokenSellOffer (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNFTokenSellOffer is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNFTokenSellOffer() const @@ -90,7 +100,8 @@ public: } /** - * Get sfNFTokenBrokerFee (soeOPTIONAL) + * @brief Get sfNFTokenBrokerFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +114,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfNFTokenBrokerFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasNFTokenBrokerFee() const @@ -112,7 +127,8 @@ public: }; /** - * Builder for NFTokenAcceptOffer transactions. + * @brief Builder for NFTokenAcceptOffer transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -120,6 +136,12 @@ public: class NFTokenAcceptOfferBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new NFTokenAcceptOfferBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ NFTokenAcceptOfferBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -128,6 +150,11 @@ public: { } + /** + * @brief Construct a NFTokenAcceptOfferBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ NFTokenAcceptOfferBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttNFTOKEN_ACCEPT_OFFER) @@ -137,10 +164,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfNFTokenBuyOffer (soeOPTIONAL) + * @brief Set sfNFTokenBuyOffer (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenAcceptOfferBuilder& @@ -151,7 +178,7 @@ public: } /** - * Set sfNFTokenSellOffer (soeOPTIONAL) + * @brief Set sfNFTokenSellOffer (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenAcceptOfferBuilder& @@ -162,7 +189,7 @@ public: } /** - * Set sfNFTokenBrokerFee (soeOPTIONAL) + * @brief Set sfNFTokenBrokerFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenAcceptOfferBuilder& @@ -173,9 +200,9 @@ public: } /** - * Build and return the NFTokenAcceptOffer wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the NFTokenAcceptOffer wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ NFTokenAcceptOffer diff --git a/include/xrpl/protocol_autogen/transactions/NFTokenBurn.h b/include/xrpl/protocol_autogen/transactions/NFTokenBurn.h index 11f4c51e74..123418d00a 100644 --- a/include/xrpl/protocol_autogen/transactions/NFTokenBurn.h +++ b/include/xrpl/protocol_autogen/transactions/NFTokenBurn.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class NFTokenBurnBuilder; /** - * Transaction: NFTokenBurn + * @brief Transaction: NFTokenBurn + * * Type: ttNFTOKEN_BURN (26) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttNFTOKEN_BURN; /** - * Construct a NFTokenBurn transaction wrapper from an existing STTx object. + * @brief Construct a NFTokenBurn transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit NFTokenBurn(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfNFTokenID (soeREQUIRED) + * @brief Get sfNFTokenID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfOwner (soeOPTIONAL) + * @brief Get sfOwner (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwner is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwner() const @@ -80,7 +86,8 @@ public: }; /** - * Builder for NFTokenBurn transactions. + * @brief Builder for NFTokenBurn transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -88,6 +95,13 @@ public: class NFTokenBurnBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new NFTokenBurnBuilder with required fields. + * @param account The account initiating the transaction. + * @param nFTokenID The sfNFTokenID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ NFTokenBurnBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& nFTokenID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -97,6 +111,11 @@ public: setNFTokenID(nFTokenID); } + /** + * @brief Construct a NFTokenBurnBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ NFTokenBurnBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttNFTOKEN_BURN) @@ -106,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfNFTokenID (soeREQUIRED) + * @brief Set sfNFTokenID (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenBurnBuilder& @@ -120,7 +139,7 @@ public: } /** - * Set sfOwner (soeOPTIONAL) + * @brief Set sfOwner (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenBurnBuilder& @@ -131,9 +150,9 @@ public: } /** - * Build and return the NFTokenBurn wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the NFTokenBurn wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ NFTokenBurn diff --git a/include/xrpl/protocol_autogen/transactions/NFTokenCancelOffer.h b/include/xrpl/protocol_autogen/transactions/NFTokenCancelOffer.h index 6cd5ec46b4..5fbbeca96c 100644 --- a/include/xrpl/protocol_autogen/transactions/NFTokenCancelOffer.h +++ b/include/xrpl/protocol_autogen/transactions/NFTokenCancelOffer.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class NFTokenCancelOfferBuilder; /** - * Transaction: NFTokenCancelOffer + * @brief Transaction: NFTokenCancelOffer + * * Type: ttNFTOKEN_CANCEL_OFFER (28) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttNFTOKEN_CANCEL_OFFER; /** - * Construct a NFTokenCancelOffer transaction wrapper from an existing STTx object. + * @brief Construct a NFTokenCancelOffer transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit NFTokenCancelOffer(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfNFTokenOffers (soeREQUIRED) + * @brief Get sfNFTokenOffers (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VECTOR256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for NFTokenCancelOffer transactions. + * @brief Builder for NFTokenCancelOffer transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class NFTokenCancelOfferBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new NFTokenCancelOfferBuilder with required fields. + * @param account The account initiating the transaction. + * @param nFTokenOffers The sfNFTokenOffers field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ NFTokenCancelOfferBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& nFTokenOffers, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setNFTokenOffers(nFTokenOffers); } + /** + * @brief Construct a NFTokenCancelOfferBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ NFTokenCancelOfferBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttNFTOKEN_CANCEL_OFFER) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfNFTokenOffers (soeREQUIRED) + * @brief Set sfNFTokenOffers (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenCancelOfferBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the NFTokenCancelOffer wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the NFTokenCancelOffer wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ NFTokenCancelOffer diff --git a/include/xrpl/protocol_autogen/transactions/NFTokenCreateOffer.h b/include/xrpl/protocol_autogen/transactions/NFTokenCreateOffer.h index 5cc0919fe3..e820272f83 100644 --- a/include/xrpl/protocol_autogen/transactions/NFTokenCreateOffer.h +++ b/include/xrpl/protocol_autogen/transactions/NFTokenCreateOffer.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class NFTokenCreateOfferBuilder; /** - * Transaction: NFTokenCreateOffer + * @brief Transaction: NFTokenCreateOffer + * * Type: ttNFTOKEN_CREATE_OFFER (27) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttNFTOKEN_CREATE_OFFER; /** - * Construct a NFTokenCreateOffer transaction wrapper from an existing STTx object. + * @brief Construct a NFTokenCreateOffer transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit NFTokenCreateOffer(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfNFTokenID (soeREQUIRED) + * @brief Get sfNFTokenID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfDestination (soeOPTIONAL) + * @brief Get sfDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestination() const @@ -89,7 +96,8 @@ public: } /** - * Get sfOwner (soeOPTIONAL) + * @brief Get sfOwner (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwner is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwner() const @@ -110,7 +122,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -132,7 +149,8 @@ public: }; /** - * Builder for NFTokenCreateOffer transactions. + * @brief Builder for NFTokenCreateOffer transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -140,6 +158,14 @@ public: class NFTokenCreateOfferBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new NFTokenCreateOfferBuilder with required fields. + * @param account The account initiating the transaction. + * @param nFTokenID The sfNFTokenID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ NFTokenCreateOfferBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& nFTokenID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -150,6 +176,11 @@ public: setAmount(amount); } + /** + * @brief Construct a NFTokenCreateOfferBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ NFTokenCreateOfferBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttNFTOKEN_CREATE_OFFER) @@ -159,10 +190,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfNFTokenID (soeREQUIRED) + * @brief Set sfNFTokenID (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenCreateOfferBuilder& @@ -173,7 +204,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenCreateOfferBuilder& @@ -184,7 +215,7 @@ public: } /** - * Set sfDestination (soeOPTIONAL) + * @brief Set sfDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenCreateOfferBuilder& @@ -195,7 +226,7 @@ public: } /** - * Set sfOwner (soeOPTIONAL) + * @brief Set sfOwner (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenCreateOfferBuilder& @@ -206,7 +237,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenCreateOfferBuilder& @@ -217,9 +248,9 @@ public: } /** - * Build and return the NFTokenCreateOffer wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the NFTokenCreateOffer wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ NFTokenCreateOffer diff --git a/include/xrpl/protocol_autogen/transactions/NFTokenMint.h b/include/xrpl/protocol_autogen/transactions/NFTokenMint.h index 3c4c9a38b6..9854147570 100644 --- a/include/xrpl/protocol_autogen/transactions/NFTokenMint.h +++ b/include/xrpl/protocol_autogen/transactions/NFTokenMint.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class NFTokenMintBuilder; /** - * Transaction: NFTokenMint + * @brief Transaction: NFTokenMint + * * Type: ttNFTOKEN_MINT (25) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttNFTOKEN_MINT; /** - * Construct a NFTokenMint transaction wrapper from an existing STTx object. + * @brief Construct a NFTokenMint transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit NFTokenMint(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfNFTokenTaxon (soeREQUIRED) + * @brief Get sfNFTokenTaxon (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfTransferFee (soeOPTIONAL) + * @brief Get sfTransferFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfTransferFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasTransferFee() const @@ -79,7 +85,8 @@ public: } /** - * Get sfIssuer (soeOPTIONAL) + * @brief Get sfIssuer (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfIssuer is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasIssuer() const @@ -100,7 +111,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -113,6 +125,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -121,7 +137,8 @@ public: } /** - * Get sfAmount (soeOPTIONAL) + * @brief Get sfAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -134,6 +151,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -142,7 +163,8 @@ public: } /** - * Get sfDestination (soeOPTIONAL) + * @brief Get sfDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +177,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestination() const @@ -163,7 +189,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -176,6 +203,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -185,7 +216,8 @@ public: }; /** - * Builder for NFTokenMint transactions. + * @brief Builder for NFTokenMint transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -193,6 +225,13 @@ public: class NFTokenMintBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new NFTokenMintBuilder with required fields. + * @param account The account initiating the transaction. + * @param nFTokenTaxon The sfNFTokenTaxon field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ NFTokenMintBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& nFTokenTaxon, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -202,6 +241,11 @@ public: setNFTokenTaxon(nFTokenTaxon); } + /** + * @brief Construct a NFTokenMintBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ NFTokenMintBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttNFTOKEN_MINT) @@ -211,10 +255,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfNFTokenTaxon (soeREQUIRED) + * @brief Set sfNFTokenTaxon (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -225,7 +269,7 @@ public: } /** - * Set sfTransferFee (soeOPTIONAL) + * @brief Set sfTransferFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -236,7 +280,7 @@ public: } /** - * Set sfIssuer (soeOPTIONAL) + * @brief Set sfIssuer (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -247,7 +291,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -258,7 +302,7 @@ public: } /** - * Set sfAmount (soeOPTIONAL) + * @brief Set sfAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -269,7 +313,7 @@ public: } /** - * Set sfDestination (soeOPTIONAL) + * @brief Set sfDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -280,7 +324,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenMintBuilder& @@ -291,9 +335,9 @@ public: } /** - * Build and return the NFTokenMint wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the NFTokenMint wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ NFTokenMint diff --git a/include/xrpl/protocol_autogen/transactions/NFTokenModify.h b/include/xrpl/protocol_autogen/transactions/NFTokenModify.h index 8c7fb23e5b..6f9b75532c 100644 --- a/include/xrpl/protocol_autogen/transactions/NFTokenModify.h +++ b/include/xrpl/protocol_autogen/transactions/NFTokenModify.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class NFTokenModifyBuilder; /** - * Transaction: NFTokenModify + * @brief Transaction: NFTokenModify + * * Type: ttNFTOKEN_MODIFY (61) * Delegable: Delegation::delegable * Amendment: featureDynamicNFT @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttNFTOKEN_MODIFY; /** - * Construct a NFTokenModify transaction wrapper from an existing STTx object. + * @brief Construct a NFTokenModify transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit NFTokenModify(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfNFTokenID (soeREQUIRED) + * @brief Get sfNFTokenID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfOwner (soeOPTIONAL) + * @brief Get sfOwner (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOwner is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOwner() const @@ -79,7 +85,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -101,7 +112,8 @@ public: }; /** - * Builder for NFTokenModify transactions. + * @brief Builder for NFTokenModify transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -109,6 +121,13 @@ public: class NFTokenModifyBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new NFTokenModifyBuilder with required fields. + * @param account The account initiating the transaction. + * @param nFTokenID The sfNFTokenID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ NFTokenModifyBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& nFTokenID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -118,6 +137,11 @@ public: setNFTokenID(nFTokenID); } + /** + * @brief Construct a NFTokenModifyBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ NFTokenModifyBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttNFTOKEN_MODIFY) @@ -127,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfNFTokenID (soeREQUIRED) + * @brief Set sfNFTokenID (soeREQUIRED) * @return Reference to this builder for method chaining. */ NFTokenModifyBuilder& @@ -141,7 +165,7 @@ public: } /** - * Set sfOwner (soeOPTIONAL) + * @brief Set sfOwner (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenModifyBuilder& @@ -152,7 +176,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ NFTokenModifyBuilder& @@ -163,9 +187,9 @@ public: } /** - * Build and return the NFTokenModify wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the NFTokenModify wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ NFTokenModify diff --git a/include/xrpl/protocol_autogen/transactions/OfferCancel.h b/include/xrpl/protocol_autogen/transactions/OfferCancel.h index ac898d03ab..ed2c761c0e 100644 --- a/include/xrpl/protocol_autogen/transactions/OfferCancel.h +++ b/include/xrpl/protocol_autogen/transactions/OfferCancel.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class OfferCancelBuilder; /** - * Transaction: OfferCancel + * @brief Transaction: OfferCancel + * * Type: ttOFFER_CANCEL (8) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttOFFER_CANCEL; /** - * Construct a OfferCancel transaction wrapper from an existing STTx object. + * @brief Construct a OfferCancel transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit OfferCancel(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfOfferSequence (soeREQUIRED) + * @brief Get sfOfferSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for OfferCancel transactions. + * @brief Builder for OfferCancel transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class OfferCancelBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new OfferCancelBuilder with required fields. + * @param account The account initiating the transaction. + * @param offerSequence The sfOfferSequence field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ OfferCancelBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& offerSequence, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setOfferSequence(offerSequence); } + /** + * @brief Construct a OfferCancelBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ OfferCancelBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttOFFER_CANCEL) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfOfferSequence (soeREQUIRED) + * @brief Set sfOfferSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferCancelBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the OfferCancel wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the OfferCancel wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ OfferCancel diff --git a/include/xrpl/protocol_autogen/transactions/OfferCreate.h b/include/xrpl/protocol_autogen/transactions/OfferCreate.h index e44df1647f..a0eff385f6 100644 --- a/include/xrpl/protocol_autogen/transactions/OfferCreate.h +++ b/include/xrpl/protocol_autogen/transactions/OfferCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class OfferCreateBuilder; /** - * Transaction: OfferCreate + * @brief Transaction: OfferCreate + * * Type: ttOFFER_CREATE (7) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttOFFER_CREATE; /** - * Construct a OfferCreate transaction wrapper from an existing STTx object. + * @brief Construct a OfferCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit OfferCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfTakerPays (soeREQUIRED) + * @brief Get sfTakerPays (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfTakerGets (soeREQUIRED) + * @brief Get sfTakerGets (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -89,7 +96,8 @@ public: } /** - * Get sfOfferSequence (soeOPTIONAL) + * @brief Get sfOfferSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOfferSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOfferSequence() const @@ -110,7 +122,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -132,7 +149,8 @@ public: }; /** - * Builder for OfferCreate transactions. + * @brief Builder for OfferCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -140,6 +158,14 @@ public: class OfferCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new OfferCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param takerPays The sfTakerPays field value. + * @param takerGets The sfTakerGets field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ OfferCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& takerPays, std::decay_t const& takerGets, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -150,6 +176,11 @@ public: setTakerGets(takerGets); } + /** + * @brief Construct a OfferCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ OfferCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttOFFER_CREATE) @@ -159,10 +190,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfTakerPays (soeREQUIRED) + * @brief Set sfTakerPays (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferCreateBuilder& @@ -173,7 +204,7 @@ public: } /** - * Set sfTakerGets (soeREQUIRED) + * @brief Set sfTakerGets (soeREQUIRED) * @return Reference to this builder for method chaining. */ OfferCreateBuilder& @@ -184,7 +215,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OfferCreateBuilder& @@ -195,7 +226,7 @@ public: } /** - * Set sfOfferSequence (soeOPTIONAL) + * @brief Set sfOfferSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OfferCreateBuilder& @@ -206,7 +237,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OfferCreateBuilder& @@ -217,9 +248,9 @@ public: } /** - * Build and return the OfferCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the OfferCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ OfferCreate diff --git a/include/xrpl/protocol_autogen/transactions/OracleDelete.h b/include/xrpl/protocol_autogen/transactions/OracleDelete.h index 1acaed42c1..6cafd2b6de 100644 --- a/include/xrpl/protocol_autogen/transactions/OracleDelete.h +++ b/include/xrpl/protocol_autogen/transactions/OracleDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class OracleDeleteBuilder; /** - * Transaction: OracleDelete + * @brief Transaction: OracleDelete + * * Type: ttORACLE_DELETE (52) * Delegable: Delegation::delegable * Amendment: featurePriceOracle @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttORACLE_DELETE; /** - * Construct a OracleDelete transaction wrapper from an existing STTx object. + * @brief Construct a OracleDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit OracleDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfOracleDocumentID (soeREQUIRED) + * @brief Get sfOracleDocumentID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for OracleDelete transactions. + * @brief Builder for OracleDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class OracleDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new OracleDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param oracleDocumentID The sfOracleDocumentID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ OracleDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& oracleDocumentID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setOracleDocumentID(oracleDocumentID); } + /** + * @brief Construct a OracleDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ OracleDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttORACLE_DELETE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfOracleDocumentID (soeREQUIRED) + * @brief Set sfOracleDocumentID (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleDeleteBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the OracleDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the OracleDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ OracleDelete diff --git a/include/xrpl/protocol_autogen/transactions/OracleSet.h b/include/xrpl/protocol_autogen/transactions/OracleSet.h index d5a5c95b29..8dd0d88865 100644 --- a/include/xrpl/protocol_autogen/transactions/OracleSet.h +++ b/include/xrpl/protocol_autogen/transactions/OracleSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class OracleSetBuilder; /** - * Transaction: OracleSet + * @brief Transaction: OracleSet + * * Type: ttORACLE_SET (51) * Delegable: Delegation::delegable * Amendment: featurePriceOracle @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttORACLE_SET; /** - * Construct a OracleSet transaction wrapper from an existing STTx object. + * @brief Construct a OracleSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit OracleSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfOracleDocumentID (soeREQUIRED) + * @brief Get sfOracleDocumentID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfProvider (soeOPTIONAL) + * @brief Get sfProvider (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfProvider is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasProvider() const @@ -79,7 +85,8 @@ public: } /** - * Get sfURI (soeOPTIONAL) + * @brief Get sfURI (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfURI is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasURI() const @@ -100,7 +111,8 @@ public: } /** - * Get sfAssetClass (soeOPTIONAL) + * @brief Get sfAssetClass (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -113,6 +125,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetClass is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetClass() const @@ -121,7 +137,8 @@ public: } /** - * Get sfLastUpdateTime (soeREQUIRED) + * @brief Get sfLastUpdateTime (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -130,8 +147,9 @@ public: return this->tx_->at(sfLastUpdateTime); } /** - * Get sfPriceDataSeries (soeREQUIRED) - * Note: This is an untyped field + * @brief Get sfPriceDataSeries (soeREQUIRED) + * @note This is an untyped field. + * @return The field value. */ [[nodiscard]] STArray const& @@ -142,7 +160,8 @@ public: }; /** - * Builder for OracleSet transactions. + * @brief Builder for OracleSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -150,6 +169,15 @@ public: class OracleSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new OracleSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param oracleDocumentID The sfOracleDocumentID field value. + * @param lastUpdateTime The sfLastUpdateTime field value. + * @param priceDataSeries The sfPriceDataSeries field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ OracleSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& oracleDocumentID, std::decay_t const& lastUpdateTime, STArray const& priceDataSeries, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -161,6 +189,11 @@ public: setPriceDataSeries(priceDataSeries); } + /** + * @brief Construct a OracleSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ OracleSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttORACLE_SET) @@ -170,10 +203,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfOracleDocumentID (soeREQUIRED) + * @brief Set sfOracleDocumentID (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleSetBuilder& @@ -184,7 +217,7 @@ public: } /** - * Set sfProvider (soeOPTIONAL) + * @brief Set sfProvider (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OracleSetBuilder& @@ -195,7 +228,7 @@ public: } /** - * Set sfURI (soeOPTIONAL) + * @brief Set sfURI (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OracleSetBuilder& @@ -206,7 +239,7 @@ public: } /** - * Set sfAssetClass (soeOPTIONAL) + * @brief Set sfAssetClass (soeOPTIONAL) * @return Reference to this builder for method chaining. */ OracleSetBuilder& @@ -217,7 +250,7 @@ public: } /** - * Set sfLastUpdateTime (soeREQUIRED) + * @brief Set sfLastUpdateTime (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleSetBuilder& @@ -228,7 +261,7 @@ public: } /** - * Set sfPriceDataSeries (soeREQUIRED) + * @brief Set sfPriceDataSeries (soeREQUIRED) * @return Reference to this builder for method chaining. */ OracleSetBuilder& @@ -239,9 +272,9 @@ public: } /** - * Build and return the OracleSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the OracleSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ OracleSet diff --git a/include/xrpl/protocol_autogen/transactions/Payment.h b/include/xrpl/protocol_autogen/transactions/Payment.h index 60a4303584..877286f90e 100644 --- a/include/xrpl/protocol_autogen/transactions/Payment.h +++ b/include/xrpl/protocol_autogen/transactions/Payment.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class PaymentBuilder; /** - * Transaction: Payment + * @brief Transaction: Payment + * * Type: ttPAYMENT (0) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttPAYMENT; /** - * Construct a Payment transaction wrapper from an existing STTx object. + * @brief Construct a Payment transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit Payment(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -69,8 +71,9 @@ public: } /** - * Get sfSendMax (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfSendMax (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -83,6 +86,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSendMax is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSendMax() const @@ -90,8 +97,9 @@ public: return this->tx_->isFieldPresent(sfSendMax); } /** - * Get sfPaths (soeDEFAULT) - * Note: This is an untyped field + * @brief Get sfPaths (soeDEFAULT) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -102,6 +110,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPaths is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPaths() const @@ -110,7 +122,8 @@ public: } /** - * Get sfInvoiceID (soeOPTIONAL) + * @brief Get sfInvoiceID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -123,6 +136,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfInvoiceID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasInvoiceID() const @@ -131,7 +148,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -144,6 +162,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -152,8 +174,9 @@ public: } /** - * Get sfDeliverMin (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfDeliverMin (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +189,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDeliverMin is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDeliverMin() const @@ -174,7 +201,8 @@ public: } /** - * Get sfCredentialIDs (soeOPTIONAL) + * @brief Get sfCredentialIDs (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -187,6 +215,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCredentialIDs is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCredentialIDs() const @@ -195,7 +227,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -208,6 +241,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -217,7 +254,8 @@ public: }; /** - * Builder for Payment transactions. + * @brief Builder for Payment transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -225,6 +263,14 @@ public: class PaymentBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new PaymentBuilder with required fields. + * @param account The account initiating the transaction. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ PaymentBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& destination, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -235,6 +281,11 @@ public: setAmount(amount); } + /** + * @brief Construct a PaymentBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ PaymentBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttPAYMENT) @@ -244,10 +295,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -258,8 +309,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -270,8 +321,8 @@ public: } /** - * Set sfSendMax (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfSendMax (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -282,7 +333,7 @@ public: } /** - * Set sfPaths (soeDEFAULT) + * @brief Set sfPaths (soeDEFAULT) * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -293,7 +344,7 @@ public: } /** - * Set sfInvoiceID (soeOPTIONAL) + * @brief Set sfInvoiceID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -304,7 +355,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -315,8 +366,8 @@ public: } /** - * Set sfDeliverMin (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfDeliverMin (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -327,7 +378,7 @@ public: } /** - * Set sfCredentialIDs (soeOPTIONAL) + * @brief Set sfCredentialIDs (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -338,7 +389,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentBuilder& @@ -349,9 +400,9 @@ public: } /** - * Build and return the Payment wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the Payment wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ Payment diff --git a/include/xrpl/protocol_autogen/transactions/PaymentChannelClaim.h b/include/xrpl/protocol_autogen/transactions/PaymentChannelClaim.h index 4f5d79cf6e..1e90c74aa1 100644 --- a/include/xrpl/protocol_autogen/transactions/PaymentChannelClaim.h +++ b/include/xrpl/protocol_autogen/transactions/PaymentChannelClaim.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class PaymentChannelClaimBuilder; /** - * Transaction: PaymentChannelClaim + * @brief Transaction: PaymentChannelClaim + * * Type: ttPAYCHAN_CLAIM (15) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttPAYCHAN_CLAIM; /** - * Construct a PaymentChannelClaim transaction wrapper from an existing STTx object. + * @brief Construct a PaymentChannelClaim transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit PaymentChannelClaim(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfChannel (soeREQUIRED) + * @brief Get sfChannel (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmount (soeOPTIONAL) + * @brief Get sfAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -79,7 +85,8 @@ public: } /** - * Get sfBalance (soeOPTIONAL) + * @brief Get sfBalance (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBalance is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBalance() const @@ -100,7 +111,8 @@ public: } /** - * Get sfSignature (soeOPTIONAL) + * @brief Get sfSignature (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -113,6 +125,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSignature is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSignature() const @@ -121,7 +137,8 @@ public: } /** - * Get sfPublicKey (soeOPTIONAL) + * @brief Get sfPublicKey (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -134,6 +151,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfPublicKey is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasPublicKey() const @@ -142,7 +163,8 @@ public: } /** - * Get sfCredentialIDs (soeOPTIONAL) + * @brief Get sfCredentialIDs (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -155,6 +177,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCredentialIDs is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCredentialIDs() const @@ -164,7 +190,8 @@ public: }; /** - * Builder for PaymentChannelClaim transactions. + * @brief Builder for PaymentChannelClaim transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -172,6 +199,13 @@ public: class PaymentChannelClaimBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new PaymentChannelClaimBuilder with required fields. + * @param account The account initiating the transaction. + * @param channel The sfChannel field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ PaymentChannelClaimBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& channel, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -181,6 +215,11 @@ public: setChannel(channel); } + /** + * @brief Construct a PaymentChannelClaimBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ PaymentChannelClaimBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttPAYCHAN_CLAIM) @@ -190,10 +229,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfChannel (soeREQUIRED) + * @brief Set sfChannel (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelClaimBuilder& @@ -204,7 +243,7 @@ public: } /** - * Set sfAmount (soeOPTIONAL) + * @brief Set sfAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelClaimBuilder& @@ -215,7 +254,7 @@ public: } /** - * Set sfBalance (soeOPTIONAL) + * @brief Set sfBalance (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelClaimBuilder& @@ -226,7 +265,7 @@ public: } /** - * Set sfSignature (soeOPTIONAL) + * @brief Set sfSignature (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelClaimBuilder& @@ -237,7 +276,7 @@ public: } /** - * Set sfPublicKey (soeOPTIONAL) + * @brief Set sfPublicKey (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelClaimBuilder& @@ -248,7 +287,7 @@ public: } /** - * Set sfCredentialIDs (soeOPTIONAL) + * @brief Set sfCredentialIDs (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelClaimBuilder& @@ -259,9 +298,9 @@ public: } /** - * Build and return the PaymentChannelClaim wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the PaymentChannelClaim wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ PaymentChannelClaim diff --git a/include/xrpl/protocol_autogen/transactions/PaymentChannelCreate.h b/include/xrpl/protocol_autogen/transactions/PaymentChannelCreate.h index 88a6c6f47d..4242046114 100644 --- a/include/xrpl/protocol_autogen/transactions/PaymentChannelCreate.h +++ b/include/xrpl/protocol_autogen/transactions/PaymentChannelCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class PaymentChannelCreateBuilder; /** - * Transaction: PaymentChannelCreate + * @brief Transaction: PaymentChannelCreate + * * Type: ttPAYCHAN_CREATE (13) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttPAYCHAN_CREATE; /** - * Construct a PaymentChannelCreate transaction wrapper from an existing STTx object. + * @brief Construct a PaymentChannelCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit PaymentChannelCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfSettleDelay (soeREQUIRED) + * @brief Get sfSettleDelay (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfPublicKey (soeREQUIRED) + * @brief Get sfPublicKey (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -88,7 +92,8 @@ public: } /** - * Get sfCancelAfter (soeOPTIONAL) + * @brief Get sfCancelAfter (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -101,6 +106,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfCancelAfter is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasCancelAfter() const @@ -109,7 +118,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -122,6 +132,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -131,7 +145,8 @@ public: }; /** - * Builder for PaymentChannelCreate transactions. + * @brief Builder for PaymentChannelCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -139,6 +154,16 @@ public: class PaymentChannelCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new PaymentChannelCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param settleDelay The sfSettleDelay field value. + * @param publicKey The sfPublicKey field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ PaymentChannelCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& destination, std::decay_t const& amount, std::decay_t const& settleDelay, std::decay_t const& publicKey, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -151,6 +176,11 @@ public: setPublicKey(publicKey); } + /** + * @brief Construct a PaymentChannelCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ PaymentChannelCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttPAYCHAN_CREATE) @@ -160,10 +190,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelCreateBuilder& @@ -174,7 +204,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelCreateBuilder& @@ -185,7 +215,7 @@ public: } /** - * Set sfSettleDelay (soeREQUIRED) + * @brief Set sfSettleDelay (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelCreateBuilder& @@ -196,7 +226,7 @@ public: } /** - * Set sfPublicKey (soeREQUIRED) + * @brief Set sfPublicKey (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelCreateBuilder& @@ -207,7 +237,7 @@ public: } /** - * Set sfCancelAfter (soeOPTIONAL) + * @brief Set sfCancelAfter (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelCreateBuilder& @@ -218,7 +248,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelCreateBuilder& @@ -229,9 +259,9 @@ public: } /** - * Build and return the PaymentChannelCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the PaymentChannelCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ PaymentChannelCreate diff --git a/include/xrpl/protocol_autogen/transactions/PaymentChannelFund.h b/include/xrpl/protocol_autogen/transactions/PaymentChannelFund.h index efb35372b2..2fecf21154 100644 --- a/include/xrpl/protocol_autogen/transactions/PaymentChannelFund.h +++ b/include/xrpl/protocol_autogen/transactions/PaymentChannelFund.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class PaymentChannelFundBuilder; /** - * Transaction: PaymentChannelFund + * @brief Transaction: PaymentChannelFund + * * Type: ttPAYCHAN_FUND (14) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttPAYCHAN_FUND; /** - * Construct a PaymentChannelFund transaction wrapper from an existing STTx object. + * @brief Construct a PaymentChannelFund transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit PaymentChannelFund(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfChannel (soeREQUIRED) + * @brief Get sfChannel (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfExpiration (soeOPTIONAL) + * @brief Get sfExpiration (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfExpiration is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasExpiration() const @@ -90,7 +97,8 @@ public: }; /** - * Builder for PaymentChannelFund transactions. + * @brief Builder for PaymentChannelFund transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -98,6 +106,14 @@ public: class PaymentChannelFundBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new PaymentChannelFundBuilder with required fields. + * @param account The account initiating the transaction. + * @param channel The sfChannel field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ PaymentChannelFundBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& channel, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -108,6 +124,11 @@ public: setAmount(amount); } + /** + * @brief Construct a PaymentChannelFundBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ PaymentChannelFundBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttPAYCHAN_FUND) @@ -117,10 +138,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfChannel (soeREQUIRED) + * @brief Set sfChannel (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelFundBuilder& @@ -131,7 +152,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ PaymentChannelFundBuilder& @@ -142,7 +163,7 @@ public: } /** - * Set sfExpiration (soeOPTIONAL) + * @brief Set sfExpiration (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PaymentChannelFundBuilder& @@ -153,9 +174,9 @@ public: } /** - * Build and return the PaymentChannelFund wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the PaymentChannelFund wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ PaymentChannelFund diff --git a/include/xrpl/protocol_autogen/transactions/PermissionedDomainDelete.h b/include/xrpl/protocol_autogen/transactions/PermissionedDomainDelete.h index 7ed1b76a3e..c95e0f2e18 100644 --- a/include/xrpl/protocol_autogen/transactions/PermissionedDomainDelete.h +++ b/include/xrpl/protocol_autogen/transactions/PermissionedDomainDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class PermissionedDomainDeleteBuilder; /** - * Transaction: PermissionedDomainDelete + * @brief Transaction: PermissionedDomainDelete + * * Type: ttPERMISSIONED_DOMAIN_DELETE (63) * Delegable: Delegation::delegable * Amendment: featurePermissionedDomains @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttPERMISSIONED_DOMAIN_DELETE; /** - * Construct a PermissionedDomainDelete transaction wrapper from an existing STTx object. + * @brief Construct a PermissionedDomainDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit PermissionedDomainDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDomainID (soeREQUIRED) + * @brief Get sfDomainID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for PermissionedDomainDelete transactions. + * @brief Builder for PermissionedDomainDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class PermissionedDomainDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new PermissionedDomainDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param domainID The sfDomainID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ PermissionedDomainDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& domainID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setDomainID(domainID); } + /** + * @brief Construct a PermissionedDomainDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ PermissionedDomainDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttPERMISSIONED_DOMAIN_DELETE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDomainID (soeREQUIRED) + * @brief Set sfDomainID (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainDeleteBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the PermissionedDomainDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the PermissionedDomainDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ PermissionedDomainDelete diff --git a/include/xrpl/protocol_autogen/transactions/PermissionedDomainSet.h b/include/xrpl/protocol_autogen/transactions/PermissionedDomainSet.h index 267106fd2f..38df7f4fc7 100644 --- a/include/xrpl/protocol_autogen/transactions/PermissionedDomainSet.h +++ b/include/xrpl/protocol_autogen/transactions/PermissionedDomainSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class PermissionedDomainSetBuilder; /** - * Transaction: PermissionedDomainSet + * @brief Transaction: PermissionedDomainSet + * * Type: ttPERMISSIONED_DOMAIN_SET (62) * Delegable: Delegation::delegable * Amendment: featurePermissionedDomains @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttPERMISSIONED_DOMAIN_SET; /** - * Construct a PermissionedDomainSet transaction wrapper from an existing STTx object. + * @brief Construct a PermissionedDomainSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit PermissionedDomainSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -68,8 +73,9 @@ public: return this->tx_->isFieldPresent(sfDomainID); } /** - * Get sfAcceptedCredentials (soeREQUIRED) - * Note: This is an untyped field + * @brief Get sfAcceptedCredentials (soeREQUIRED) + * @note This is an untyped field. + * @return The field value. */ [[nodiscard]] STArray const& @@ -80,7 +86,8 @@ public: }; /** - * Builder for PermissionedDomainSet transactions. + * @brief Builder for PermissionedDomainSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -88,6 +95,13 @@ public: class PermissionedDomainSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new PermissionedDomainSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param acceptedCredentials The sfAcceptedCredentials field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ PermissionedDomainSetBuilder(SF_ACCOUNT::type::value_type account, STArray const& acceptedCredentials, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -97,6 +111,11 @@ public: setAcceptedCredentials(acceptedCredentials); } + /** + * @brief Construct a PermissionedDomainSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ PermissionedDomainSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttPERMISSIONED_DOMAIN_SET) @@ -106,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ PermissionedDomainSetBuilder& @@ -120,7 +139,7 @@ public: } /** - * Set sfAcceptedCredentials (soeREQUIRED) + * @brief Set sfAcceptedCredentials (soeREQUIRED) * @return Reference to this builder for method chaining. */ PermissionedDomainSetBuilder& @@ -131,9 +150,9 @@ public: } /** - * Build and return the PermissionedDomainSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the PermissionedDomainSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ PermissionedDomainSet diff --git a/include/xrpl/protocol_autogen/transactions/SetFee.h b/include/xrpl/protocol_autogen/transactions/SetFee.h index 0a0ada5960..7bf73201b9 100644 --- a/include/xrpl/protocol_autogen/transactions/SetFee.h +++ b/include/xrpl/protocol_autogen/transactions/SetFee.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class SetFeeBuilder; /** - * Transaction: SetFee + * @brief Transaction: SetFee + * * Type: ttFEE (101) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttFEE; /** - * Construct a SetFee transaction wrapper from an existing STTx object. + * @brief Construct a SetFee transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit SetFee(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLedgerSequence (soeOPTIONAL) + * @brief Get sfLedgerSequence (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLedgerSequence is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLedgerSequence() const @@ -69,7 +74,8 @@ public: } /** - * Get sfBaseFee (soeOPTIONAL) + * @brief Get sfBaseFee (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBaseFee is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBaseFee() const @@ -90,7 +100,8 @@ public: } /** - * Get sfReferenceFeeUnits (soeOPTIONAL) + * @brief Get sfReferenceFeeUnits (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +114,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReferenceFeeUnits is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReferenceFeeUnits() const @@ -111,7 +126,8 @@ public: } /** - * Get sfReserveBase (soeOPTIONAL) + * @brief Get sfReserveBase (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -124,6 +140,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveBase is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveBase() const @@ -132,7 +152,8 @@ public: } /** - * Get sfReserveIncrement (soeOPTIONAL) + * @brief Get sfReserveIncrement (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -145,6 +166,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveIncrement is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveIncrement() const @@ -153,7 +178,8 @@ public: } /** - * Get sfBaseFeeDrops (soeOPTIONAL) + * @brief Get sfBaseFeeDrops (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -166,6 +192,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfBaseFeeDrops is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasBaseFeeDrops() const @@ -174,7 +204,8 @@ public: } /** - * Get sfReserveBaseDrops (soeOPTIONAL) + * @brief Get sfReserveBaseDrops (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -187,6 +218,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveBaseDrops is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveBaseDrops() const @@ -195,7 +230,8 @@ public: } /** - * Get sfReserveIncrementDrops (soeOPTIONAL) + * @brief Get sfReserveIncrementDrops (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -208,6 +244,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfReserveIncrementDrops is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasReserveIncrementDrops() const @@ -217,7 +257,8 @@ public: }; /** - * Builder for SetFee transactions. + * @brief Builder for SetFee transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -225,6 +266,12 @@ public: class SetFeeBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new SetFeeBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ SetFeeBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -233,6 +280,11 @@ public: { } + /** + * @brief Construct a SetFeeBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ SetFeeBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttFEE) @@ -242,10 +294,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLedgerSequence (soeOPTIONAL) + * @brief Set sfLedgerSequence (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -256,7 +308,7 @@ public: } /** - * Set sfBaseFee (soeOPTIONAL) + * @brief Set sfBaseFee (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -267,7 +319,7 @@ public: } /** - * Set sfReferenceFeeUnits (soeOPTIONAL) + * @brief Set sfReferenceFeeUnits (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -278,7 +330,7 @@ public: } /** - * Set sfReserveBase (soeOPTIONAL) + * @brief Set sfReserveBase (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -289,7 +341,7 @@ public: } /** - * Set sfReserveIncrement (soeOPTIONAL) + * @brief Set sfReserveIncrement (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -300,7 +352,7 @@ public: } /** - * Set sfBaseFeeDrops (soeOPTIONAL) + * @brief Set sfBaseFeeDrops (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -311,7 +363,7 @@ public: } /** - * Set sfReserveBaseDrops (soeOPTIONAL) + * @brief Set sfReserveBaseDrops (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -322,7 +374,7 @@ public: } /** - * Set sfReserveIncrementDrops (soeOPTIONAL) + * @brief Set sfReserveIncrementDrops (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetFeeBuilder& @@ -333,9 +385,9 @@ public: } /** - * Build and return the SetFee wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the SetFee wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ SetFee diff --git a/include/xrpl/protocol_autogen/transactions/SetRegularKey.h b/include/xrpl/protocol_autogen/transactions/SetRegularKey.h index b530d0c8d3..3d70d092c5 100644 --- a/include/xrpl/protocol_autogen/transactions/SetRegularKey.h +++ b/include/xrpl/protocol_autogen/transactions/SetRegularKey.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class SetRegularKeyBuilder; /** - * Transaction: SetRegularKey + * @brief Transaction: SetRegularKey + * * Type: ttREGULAR_KEY_SET (5) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttREGULAR_KEY_SET; /** - * Construct a SetRegularKey transaction wrapper from an existing STTx object. + * @brief Construct a SetRegularKey transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit SetRegularKey(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfRegularKey (soeOPTIONAL) + * @brief Get sfRegularKey (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfRegularKey is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasRegularKey() const @@ -70,7 +75,8 @@ public: }; /** - * Builder for SetRegularKey transactions. + * @brief Builder for SetRegularKey transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -78,6 +84,12 @@ public: class SetRegularKeyBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new SetRegularKeyBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ SetRegularKeyBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -86,6 +98,11 @@ public: { } + /** + * @brief Construct a SetRegularKeyBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ SetRegularKeyBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttREGULAR_KEY_SET) @@ -95,10 +112,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfRegularKey (soeOPTIONAL) + * @brief Set sfRegularKey (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SetRegularKeyBuilder& @@ -109,9 +126,9 @@ public: } /** - * Build and return the SetRegularKey wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the SetRegularKey wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ SetRegularKey diff --git a/include/xrpl/protocol_autogen/transactions/SignerListSet.h b/include/xrpl/protocol_autogen/transactions/SignerListSet.h index d0a8b453f0..ec5330a9cb 100644 --- a/include/xrpl/protocol_autogen/transactions/SignerListSet.h +++ b/include/xrpl/protocol_autogen/transactions/SignerListSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class SignerListSetBuilder; /** - * Transaction: SignerListSet + * @brief Transaction: SignerListSet + * * Type: ttSIGNER_LIST_SET (12) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttSIGNER_LIST_SET; /** - * Construct a SignerListSet transaction wrapper from an existing STTx object. + * @brief Construct a SignerListSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit SignerListSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfSignerQuorum (soeREQUIRED) + * @brief Get sfSignerQuorum (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -57,8 +58,9 @@ public: return this->tx_->at(sfSignerQuorum); } /** - * Get sfSignerEntries (soeOPTIONAL) - * Note: This is an untyped field + * @brief Get sfSignerEntries (soeOPTIONAL) + * @note This is an untyped field. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] std::optional> @@ -69,6 +71,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSignerEntries is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSignerEntries() const @@ -78,7 +84,8 @@ public: }; /** - * Builder for SignerListSet transactions. + * @brief Builder for SignerListSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -86,6 +93,13 @@ public: class SignerListSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new SignerListSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param signerQuorum The sfSignerQuorum field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ SignerListSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& signerQuorum, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -95,6 +109,11 @@ public: setSignerQuorum(signerQuorum); } + /** + * @brief Construct a SignerListSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ SignerListSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttSIGNER_LIST_SET) @@ -104,10 +123,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfSignerQuorum (soeREQUIRED) + * @brief Set sfSignerQuorum (soeREQUIRED) * @return Reference to this builder for method chaining. */ SignerListSetBuilder& @@ -118,7 +137,7 @@ public: } /** - * Set sfSignerEntries (soeOPTIONAL) + * @brief Set sfSignerEntries (soeOPTIONAL) * @return Reference to this builder for method chaining. */ SignerListSetBuilder& @@ -129,9 +148,9 @@ public: } /** - * Build and return the SignerListSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the SignerListSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ SignerListSet diff --git a/include/xrpl/protocol_autogen/transactions/TicketCreate.h b/include/xrpl/protocol_autogen/transactions/TicketCreate.h index 5ca445e43f..842ae93111 100644 --- a/include/xrpl/protocol_autogen/transactions/TicketCreate.h +++ b/include/xrpl/protocol_autogen/transactions/TicketCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class TicketCreateBuilder; /** - * Transaction: TicketCreate + * @brief Transaction: TicketCreate + * * Type: ttTICKET_CREATE (10) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttTICKET_CREATE; /** - * Construct a TicketCreate transaction wrapper from an existing STTx object. + * @brief Construct a TicketCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit TicketCreate(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfTicketCount (soeREQUIRED) + * @brief Get sfTicketCount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for TicketCreate transactions. + * @brief Builder for TicketCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class TicketCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new TicketCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param ticketCount The sfTicketCount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ TicketCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& ticketCount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setTicketCount(ticketCount); } + /** + * @brief Construct a TicketCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ TicketCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttTICKET_CREATE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfTicketCount (soeREQUIRED) + * @brief Set sfTicketCount (soeREQUIRED) * @return Reference to this builder for method chaining. */ TicketCreateBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the TicketCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the TicketCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ TicketCreate diff --git a/include/xrpl/protocol_autogen/transactions/TrustSet.h b/include/xrpl/protocol_autogen/transactions/TrustSet.h index cc9db88b0b..5623311b92 100644 --- a/include/xrpl/protocol_autogen/transactions/TrustSet.h +++ b/include/xrpl/protocol_autogen/transactions/TrustSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class TrustSetBuilder; /** - * Transaction: TrustSet + * @brief Transaction: TrustSet + * * Type: ttTRUST_SET (20) * Delegable: Delegation::delegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttTRUST_SET; /** - * Construct a TrustSet transaction wrapper from an existing STTx object. + * @brief Construct a TrustSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit TrustSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfLimitAmount (soeOPTIONAL) + * @brief Get sfLimitAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -61,6 +62,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfLimitAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasLimitAmount() const @@ -69,7 +74,8 @@ public: } /** - * Get sfQualityIn (soeOPTIONAL) + * @brief Get sfQualityIn (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +88,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfQualityIn is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasQualityIn() const @@ -90,7 +100,8 @@ public: } /** - * Get sfQualityOut (soeOPTIONAL) + * @brief Get sfQualityOut (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +114,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfQualityOut is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasQualityOut() const @@ -112,7 +127,8 @@ public: }; /** - * Builder for TrustSet transactions. + * @brief Builder for TrustSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -120,6 +136,12 @@ public: class TrustSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new TrustSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ TrustSetBuilder(SF_ACCOUNT::type::value_type account, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -128,6 +150,11 @@ public: { } + /** + * @brief Construct a TrustSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ TrustSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttTRUST_SET) @@ -137,10 +164,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfLimitAmount (soeOPTIONAL) + * @brief Set sfLimitAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ TrustSetBuilder& @@ -151,7 +178,7 @@ public: } /** - * Set sfQualityIn (soeOPTIONAL) + * @brief Set sfQualityIn (soeOPTIONAL) * @return Reference to this builder for method chaining. */ TrustSetBuilder& @@ -162,7 +189,7 @@ public: } /** - * Set sfQualityOut (soeOPTIONAL) + * @brief Set sfQualityOut (soeOPTIONAL) * @return Reference to this builder for method chaining. */ TrustSetBuilder& @@ -173,9 +200,9 @@ public: } /** - * Build and return the TrustSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the TrustSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ TrustSet diff --git a/include/xrpl/protocol_autogen/transactions/UNLModify.h b/include/xrpl/protocol_autogen/transactions/UNLModify.h index f11ea1c81b..b5e64f19a0 100644 --- a/include/xrpl/protocol_autogen/transactions/UNLModify.h +++ b/include/xrpl/protocol_autogen/transactions/UNLModify.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class UNLModifyBuilder; /** - * Transaction: UNLModify + * @brief Transaction: UNLModify + * * Type: ttUNL_MODIFY (102) * Delegable: Delegation::notDelegable * Amendment: uint256{} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttUNL_MODIFY; /** - * Construct a UNLModify transaction wrapper from an existing STTx object. + * @brief Construct a UNLModify transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit UNLModify(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfUNLModifyDisabling (soeREQUIRED) + * @brief Get sfUNLModifyDisabling (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT8::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfLedgerSequence (soeREQUIRED) + * @brief Get sfLedgerSequence (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT32::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfUNLModifyValidator (soeREQUIRED) + * @brief Get sfUNLModifyValidator (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -79,7 +82,8 @@ public: }; /** - * Builder for UNLModify transactions. + * @brief Builder for UNLModify transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -87,6 +91,15 @@ public: class UNLModifyBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new UNLModifyBuilder with required fields. + * @param account The account initiating the transaction. + * @param uNLModifyDisabling The sfUNLModifyDisabling field value. + * @param ledgerSequence The sfLedgerSequence field value. + * @param uNLModifyValidator The sfUNLModifyValidator field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ UNLModifyBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& uNLModifyDisabling, std::decay_t const& ledgerSequence, std::decay_t const& uNLModifyValidator, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -98,6 +111,11 @@ public: setUNLModifyValidator(uNLModifyValidator); } + /** + * @brief Construct a UNLModifyBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ UNLModifyBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttUNL_MODIFY) @@ -107,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfUNLModifyDisabling (soeREQUIRED) + * @brief Set sfUNLModifyDisabling (soeREQUIRED) * @return Reference to this builder for method chaining. */ UNLModifyBuilder& @@ -121,7 +139,7 @@ public: } /** - * Set sfLedgerSequence (soeREQUIRED) + * @brief Set sfLedgerSequence (soeREQUIRED) * @return Reference to this builder for method chaining. */ UNLModifyBuilder& @@ -132,7 +150,7 @@ public: } /** - * Set sfUNLModifyValidator (soeREQUIRED) + * @brief Set sfUNLModifyValidator (soeREQUIRED) * @return Reference to this builder for method chaining. */ UNLModifyBuilder& @@ -143,9 +161,9 @@ public: } /** - * Build and return the UNLModify wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the UNLModify wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ UNLModify diff --git a/include/xrpl/protocol_autogen/transactions/VaultClawback.h b/include/xrpl/protocol_autogen/transactions/VaultClawback.h index 6847c241a0..012e9ea58d 100644 --- a/include/xrpl/protocol_autogen/transactions/VaultClawback.h +++ b/include/xrpl/protocol_autogen/transactions/VaultClawback.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class VaultClawbackBuilder; /** - * Transaction: VaultClawback + * @brief Transaction: VaultClawback + * * Type: ttVAULT_CLAWBACK (70) * Delegable: Delegation::delegable * Amendment: featureSingleAssetVault @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttVAULT_CLAWBACK; /** - * Construct a VaultClawback transaction wrapper from an existing STTx object. + * @brief Construct a VaultClawback transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit VaultClawback(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfHolder (soeREQUIRED) + * @brief Get sfHolder (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -68,8 +70,9 @@ public: } /** - * Get sfAmount (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +85,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAmount() const @@ -91,7 +98,8 @@ public: }; /** - * Builder for VaultClawback transactions. + * @brief Builder for VaultClawback transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -99,6 +107,14 @@ public: class VaultClawbackBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new VaultClawbackBuilder with required fields. + * @param account The account initiating the transaction. + * @param vaultID The sfVaultID field value. + * @param holder The sfHolder field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ VaultClawbackBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& vaultID, std::decay_t const& holder, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -109,6 +125,11 @@ public: setHolder(holder); } + /** + * @brief Construct a VaultClawbackBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ VaultClawbackBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttVAULT_CLAWBACK) @@ -118,10 +139,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultClawbackBuilder& @@ -132,7 +153,7 @@ public: } /** - * Set sfHolder (soeREQUIRED) + * @brief Set sfHolder (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultClawbackBuilder& @@ -143,8 +164,8 @@ public: } /** - * Set sfAmount (soeOPTIONAL) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeOPTIONAL) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ VaultClawbackBuilder& @@ -155,9 +176,9 @@ public: } /** - * Build and return the VaultClawback wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the VaultClawback wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ VaultClawback diff --git a/include/xrpl/protocol_autogen/transactions/VaultCreate.h b/include/xrpl/protocol_autogen/transactions/VaultCreate.h index e03ff46b0e..a608a8e560 100644 --- a/include/xrpl/protocol_autogen/transactions/VaultCreate.h +++ b/include/xrpl/protocol_autogen/transactions/VaultCreate.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class VaultCreateBuilder; /** - * Transaction: VaultCreate + * @brief Transaction: VaultCreate + * * Type: ttVAULT_CREATE (65) * Delegable: Delegation::delegable * Amendment: featureSingleAssetVault @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttVAULT_CREATE; /** - * Construct a VaultCreate transaction wrapper from an existing STTx object. + * @brief Construct a VaultCreate transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit VaultCreate(std::shared_ptr tx) @@ -48,8 +48,9 @@ public: // Transaction-specific field getters /** - * Get sfAsset (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAsset (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_ISSUE::type::value_type @@ -59,7 +60,8 @@ public: } /** - * Get sfAssetsMaximum (soeOPTIONAL) + * @brief Get sfAssetsMaximum (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -72,6 +74,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetsMaximum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetsMaximum() const @@ -80,7 +86,8 @@ public: } /** - * Get sfMPTokenMetadata (soeOPTIONAL) + * @brief Get sfMPTokenMetadata (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -93,6 +100,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMPTokenMetadata is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMPTokenMetadata() const @@ -101,7 +112,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -114,6 +126,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -122,7 +138,8 @@ public: } /** - * Get sfWithdrawalPolicy (soeOPTIONAL) + * @brief Get sfWithdrawalPolicy (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -135,6 +152,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfWithdrawalPolicy is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasWithdrawalPolicy() const @@ -143,7 +164,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -156,6 +178,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -164,7 +190,8 @@ public: } /** - * Get sfScale (soeOPTIONAL) + * @brief Get sfScale (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -177,6 +204,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfScale is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasScale() const @@ -186,7 +217,8 @@ public: }; /** - * Builder for VaultCreate transactions. + * @brief Builder for VaultCreate transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -194,6 +226,13 @@ public: class VaultCreateBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new VaultCreateBuilder with required fields. + * @param account The account initiating the transaction. + * @param asset The sfAsset field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ VaultCreateBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& asset, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -203,6 +242,11 @@ public: setAsset(asset); } + /** + * @brief Construct a VaultCreateBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ VaultCreateBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttVAULT_CREATE) @@ -212,11 +256,11 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfAsset (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAsset (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -227,7 +271,7 @@ public: } /** - * Set sfAssetsMaximum (soeOPTIONAL) + * @brief Set sfAssetsMaximum (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -238,7 +282,7 @@ public: } /** - * Set sfMPTokenMetadata (soeOPTIONAL) + * @brief Set sfMPTokenMetadata (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -249,7 +293,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -260,7 +304,7 @@ public: } /** - * Set sfWithdrawalPolicy (soeOPTIONAL) + * @brief Set sfWithdrawalPolicy (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -271,7 +315,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -282,7 +326,7 @@ public: } /** - * Set sfScale (soeOPTIONAL) + * @brief Set sfScale (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultCreateBuilder& @@ -293,9 +337,9 @@ public: } /** - * Build and return the VaultCreate wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the VaultCreate wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ VaultCreate diff --git a/include/xrpl/protocol_autogen/transactions/VaultDelete.h b/include/xrpl/protocol_autogen/transactions/VaultDelete.h index 069e83c143..b27ea64b75 100644 --- a/include/xrpl/protocol_autogen/transactions/VaultDelete.h +++ b/include/xrpl/protocol_autogen/transactions/VaultDelete.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class VaultDeleteBuilder; /** - * Transaction: VaultDelete + * @brief Transaction: VaultDelete + * * Type: ttVAULT_DELETE (67) * Delegable: Delegation::delegable * Amendment: featureSingleAssetVault @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttVAULT_DELETE; /** - * Construct a VaultDelete transaction wrapper from an existing STTx object. + * @brief Construct a VaultDelete transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit VaultDelete(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -59,7 +60,8 @@ public: }; /** - * Builder for VaultDelete transactions. + * @brief Builder for VaultDelete transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -67,6 +69,13 @@ public: class VaultDeleteBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new VaultDeleteBuilder with required fields. + * @param account The account initiating the transaction. + * @param vaultID The sfVaultID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ VaultDeleteBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& vaultID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -76,6 +85,11 @@ public: setVaultID(vaultID); } + /** + * @brief Construct a VaultDeleteBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ VaultDeleteBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttVAULT_DELETE) @@ -85,10 +99,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultDeleteBuilder& @@ -99,9 +113,9 @@ public: } /** - * Build and return the VaultDelete wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the VaultDelete wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ VaultDelete diff --git a/include/xrpl/protocol_autogen/transactions/VaultDeposit.h b/include/xrpl/protocol_autogen/transactions/VaultDeposit.h index 09157d3815..48b84170ab 100644 --- a/include/xrpl/protocol_autogen/transactions/VaultDeposit.h +++ b/include/xrpl/protocol_autogen/transactions/VaultDeposit.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class VaultDepositBuilder; /** - * Transaction: VaultDeposit + * @brief Transaction: VaultDeposit + * * Type: ttVAULT_DEPOSIT (68) * Delegable: Delegation::delegable * Amendment: featureSingleAssetVault @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttVAULT_DEPOSIT; /** - * Construct a VaultDeposit transaction wrapper from an existing STTx object. + * @brief Construct a VaultDeposit transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit VaultDeposit(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -70,7 +72,8 @@ public: }; /** - * Builder for VaultDeposit transactions. + * @brief Builder for VaultDeposit transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -78,6 +81,14 @@ public: class VaultDepositBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new VaultDepositBuilder with required fields. + * @param account The account initiating the transaction. + * @param vaultID The sfVaultID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ VaultDepositBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& vaultID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -88,6 +99,11 @@ public: setAmount(amount); } + /** + * @brief Construct a VaultDepositBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ VaultDepositBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttVAULT_DEPOSIT) @@ -97,10 +113,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultDepositBuilder& @@ -111,8 +127,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ VaultDepositBuilder& @@ -123,9 +139,9 @@ public: } /** - * Build and return the VaultDeposit wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the VaultDeposit wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ VaultDeposit diff --git a/include/xrpl/protocol_autogen/transactions/VaultSet.h b/include/xrpl/protocol_autogen/transactions/VaultSet.h index e77a0b267f..a671610f9f 100644 --- a/include/xrpl/protocol_autogen/transactions/VaultSet.h +++ b/include/xrpl/protocol_autogen/transactions/VaultSet.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class VaultSetBuilder; /** - * Transaction: VaultSet + * @brief Transaction: VaultSet + * * Type: ttVAULT_SET (66) * Delegable: Delegation::delegable * Amendment: featureSingleAssetVault @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttVAULT_SET; /** - * Construct a VaultSet transaction wrapper from an existing STTx object. + * @brief Construct a VaultSet transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit VaultSet(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAssetsMaximum (soeOPTIONAL) + * @brief Get sfAssetsMaximum (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfAssetsMaximum is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasAssetsMaximum() const @@ -79,7 +85,8 @@ public: } /** - * Get sfDomainID (soeOPTIONAL) + * @brief Get sfDomainID (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDomainID is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDomainID() const @@ -100,7 +111,8 @@ public: } /** - * Get sfData (soeOPTIONAL) + * @brief Get sfData (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -113,6 +125,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfData is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasData() const @@ -122,7 +138,8 @@ public: }; /** - * Builder for VaultSet transactions. + * @brief Builder for VaultSet transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -130,6 +147,13 @@ public: class VaultSetBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new VaultSetBuilder with required fields. + * @param account The account initiating the transaction. + * @param vaultID The sfVaultID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ VaultSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& vaultID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -139,6 +163,11 @@ public: setVaultID(vaultID); } + /** + * @brief Construct a VaultSetBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ VaultSetBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttVAULT_SET) @@ -148,10 +177,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultSetBuilder& @@ -162,7 +191,7 @@ public: } /** - * Set sfAssetsMaximum (soeOPTIONAL) + * @brief Set sfAssetsMaximum (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultSetBuilder& @@ -173,7 +202,7 @@ public: } /** - * Set sfDomainID (soeOPTIONAL) + * @brief Set sfDomainID (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultSetBuilder& @@ -184,7 +213,7 @@ public: } /** - * Set sfData (soeOPTIONAL) + * @brief Set sfData (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultSetBuilder& @@ -195,9 +224,9 @@ public: } /** - * Build and return the VaultSet wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the VaultSet wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ VaultSet diff --git a/include/xrpl/protocol_autogen/transactions/VaultWithdraw.h b/include/xrpl/protocol_autogen/transactions/VaultWithdraw.h index 49a95d9568..66dda1b252 100644 --- a/include/xrpl/protocol_autogen/transactions/VaultWithdraw.h +++ b/include/xrpl/protocol_autogen/transactions/VaultWithdraw.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class VaultWithdrawBuilder; /** - * Transaction: VaultWithdraw + * @brief Transaction: VaultWithdraw + * * Type: ttVAULT_WITHDRAW (69) * Delegable: Delegation::delegable * Amendment: featureSingleAssetVault @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttVAULT_WITHDRAW; /** - * Construct a VaultWithdraw transaction wrapper from an existing STTx object. + * @brief Construct a VaultWithdraw transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit VaultWithdraw(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfVaultID (soeREQUIRED) + * @brief Get sfVaultID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT256::type::value_type @@ -58,8 +59,9 @@ public: } /** - * Get sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Get sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -69,7 +71,8 @@ public: } /** - * Get sfDestination (soeOPTIONAL) + * @brief Get sfDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -82,6 +85,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestination() const @@ -90,7 +97,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -103,6 +111,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -112,7 +124,8 @@ public: }; /** - * Builder for VaultWithdraw transactions. + * @brief Builder for VaultWithdraw transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -120,6 +133,14 @@ public: class VaultWithdrawBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new VaultWithdrawBuilder with required fields. + * @param account The account initiating the transaction. + * @param vaultID The sfVaultID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ VaultWithdrawBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& vaultID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -130,6 +151,11 @@ public: setAmount(amount); } + /** + * @brief Construct a VaultWithdrawBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ VaultWithdrawBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttVAULT_WITHDRAW) @@ -139,10 +165,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfVaultID (soeREQUIRED) + * @brief Set sfVaultID (soeREQUIRED) * @return Reference to this builder for method chaining. */ VaultWithdrawBuilder& @@ -153,8 +179,8 @@ public: } /** - * Set sfAmount (soeREQUIRED) - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @brief Set sfAmount (soeREQUIRED) + * @note This field supports MPT (Multi-Purpose Token) amounts. * @return Reference to this builder for method chaining. */ VaultWithdrawBuilder& @@ -165,7 +191,7 @@ public: } /** - * Set sfDestination (soeOPTIONAL) + * @brief Set sfDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultWithdrawBuilder& @@ -176,7 +202,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ VaultWithdrawBuilder& @@ -187,9 +213,9 @@ public: } /** - * Build and return the VaultWithdraw wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the VaultWithdraw wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ VaultWithdraw diff --git a/include/xrpl/protocol_autogen/transactions/XChainAccountCreateCommit.h b/include/xrpl/protocol_autogen/transactions/XChainAccountCreateCommit.h index 83b4ff39fa..aebfbea5d3 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainAccountCreateCommit.h +++ b/include/xrpl/protocol_autogen/transactions/XChainAccountCreateCommit.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainAccountCreateCommitBuilder; /** - * Transaction: XChainAccountCreateCommit + * @brief Transaction: XChainAccountCreateCommit + * * Type: ttXCHAIN_ACCOUNT_CREATE_COMMIT (44) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_ACCOUNT_CREATE_COMMIT; /** - * Construct a XChainAccountCreateCommit transaction wrapper from an existing STTx object. + * @brief Construct a XChainAccountCreateCommit transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainAccountCreateCommit(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfSignatureReward (soeREQUIRED) + * @brief Get sfSignatureReward (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -89,7 +93,8 @@ public: }; /** - * Builder for XChainAccountCreateCommit transactions. + * @brief Builder for XChainAccountCreateCommit transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -97,6 +102,16 @@ public: class XChainAccountCreateCommitBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainAccountCreateCommitBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param signatureReward The sfSignatureReward field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainAccountCreateCommitBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& destination, std::decay_t const& amount, std::decay_t const& signatureReward, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -109,6 +124,11 @@ public: setSignatureReward(signatureReward); } + /** + * @brief Construct a XChainAccountCreateCommitBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainAccountCreateCommitBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_ACCOUNT_CREATE_COMMIT) @@ -118,10 +138,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAccountCreateCommitBuilder& @@ -132,7 +152,7 @@ public: } /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAccountCreateCommitBuilder& @@ -143,7 +163,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAccountCreateCommitBuilder& @@ -154,7 +174,7 @@ public: } /** - * Set sfSignatureReward (soeREQUIRED) + * @brief Set sfSignatureReward (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAccountCreateCommitBuilder& @@ -165,9 +185,9 @@ public: } /** - * Build and return the XChainAccountCreateCommit wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainAccountCreateCommit wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainAccountCreateCommit diff --git a/include/xrpl/protocol_autogen/transactions/XChainAddAccountCreateAttestation.h b/include/xrpl/protocol_autogen/transactions/XChainAddAccountCreateAttestation.h index 1da34d365b..08dc646470 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainAddAccountCreateAttestation.h +++ b/include/xrpl/protocol_autogen/transactions/XChainAddAccountCreateAttestation.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainAddAccountCreateAttestationBuilder; /** - * Transaction: XChainAddAccountCreateAttestation + * @brief Transaction: XChainAddAccountCreateAttestation + * * Type: ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION (46) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION; /** - * Construct a XChainAddAccountCreateAttestation transaction wrapper from an existing STTx object. + * @brief Construct a XChainAddAccountCreateAttestation transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainAddAccountCreateAttestation(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAttestationSignerAccount (soeREQUIRED) + * @brief Get sfAttestationSignerAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfPublicKey (soeREQUIRED) + * @brief Get sfPublicKey (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfSignature (soeREQUIRED) + * @brief Get sfSignature (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -88,7 +92,8 @@ public: } /** - * Get sfOtherChainSource (soeREQUIRED) + * @brief Get sfOtherChainSource (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -98,7 +103,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -108,7 +114,8 @@ public: } /** - * Get sfAttestationRewardAccount (soeREQUIRED) + * @brief Get sfAttestationRewardAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -118,7 +125,8 @@ public: } /** - * Get sfWasLockingChainSend (soeREQUIRED) + * @brief Get sfWasLockingChainSend (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT8::type::value_type @@ -128,7 +136,8 @@ public: } /** - * Get sfXChainAccountCreateCount (soeREQUIRED) + * @brief Get sfXChainAccountCreateCount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -138,7 +147,8 @@ public: } /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -148,7 +158,8 @@ public: } /** - * Get sfSignatureReward (soeREQUIRED) + * @brief Get sfSignatureReward (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -159,7 +170,8 @@ public: }; /** - * Builder for XChainAddAccountCreateAttestation transactions. + * @brief Builder for XChainAddAccountCreateAttestation transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -167,6 +179,23 @@ public: class XChainAddAccountCreateAttestationBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainAddAccountCreateAttestationBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param attestationSignerAccount The sfAttestationSignerAccount field value. + * @param publicKey The sfPublicKey field value. + * @param signature The sfSignature field value. + * @param otherChainSource The sfOtherChainSource field value. + * @param amount The sfAmount field value. + * @param attestationRewardAccount The sfAttestationRewardAccount field value. + * @param wasLockingChainSend The sfWasLockingChainSend field value. + * @param xChainAccountCreateCount The sfXChainAccountCreateCount field value. + * @param destination The sfDestination field value. + * @param signatureReward The sfSignatureReward field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainAddAccountCreateAttestationBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& attestationSignerAccount, std::decay_t const& publicKey, std::decay_t const& signature, std::decay_t const& otherChainSource, std::decay_t const& amount, std::decay_t const& attestationRewardAccount, std::decay_t const& wasLockingChainSend, std::decay_t const& xChainAccountCreateCount, std::decay_t const& destination, std::decay_t const& signatureReward, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -186,6 +215,11 @@ public: setSignatureReward(signatureReward); } + /** + * @brief Construct a XChainAddAccountCreateAttestationBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainAddAccountCreateAttestationBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION) @@ -195,10 +229,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -209,7 +243,7 @@ public: } /** - * Set sfAttestationSignerAccount (soeREQUIRED) + * @brief Set sfAttestationSignerAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -220,7 +254,7 @@ public: } /** - * Set sfPublicKey (soeREQUIRED) + * @brief Set sfPublicKey (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -231,7 +265,7 @@ public: } /** - * Set sfSignature (soeREQUIRED) + * @brief Set sfSignature (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -242,7 +276,7 @@ public: } /** - * Set sfOtherChainSource (soeREQUIRED) + * @brief Set sfOtherChainSource (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -253,7 +287,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -264,7 +298,7 @@ public: } /** - * Set sfAttestationRewardAccount (soeREQUIRED) + * @brief Set sfAttestationRewardAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -275,7 +309,7 @@ public: } /** - * Set sfWasLockingChainSend (soeREQUIRED) + * @brief Set sfWasLockingChainSend (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -286,7 +320,7 @@ public: } /** - * Set sfXChainAccountCreateCount (soeREQUIRED) + * @brief Set sfXChainAccountCreateCount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -297,7 +331,7 @@ public: } /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -308,7 +342,7 @@ public: } /** - * Set sfSignatureReward (soeREQUIRED) + * @brief Set sfSignatureReward (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddAccountCreateAttestationBuilder& @@ -319,9 +353,9 @@ public: } /** - * Build and return the XChainAddAccountCreateAttestation wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainAddAccountCreateAttestation wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainAddAccountCreateAttestation diff --git a/include/xrpl/protocol_autogen/transactions/XChainAddClaimAttestation.h b/include/xrpl/protocol_autogen/transactions/XChainAddClaimAttestation.h index 3e2923553e..100fc855aa 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainAddClaimAttestation.h +++ b/include/xrpl/protocol_autogen/transactions/XChainAddClaimAttestation.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainAddClaimAttestationBuilder; /** - * Transaction: XChainAddClaimAttestation + * @brief Transaction: XChainAddClaimAttestation + * * Type: ttXCHAIN_ADD_CLAIM_ATTESTATION (45) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_ADD_CLAIM_ATTESTATION; /** - * Construct a XChainAddClaimAttestation transaction wrapper from an existing STTx object. + * @brief Construct a XChainAddClaimAttestation transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainAddClaimAttestation(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfAttestationSignerAccount (soeREQUIRED) + * @brief Get sfAttestationSignerAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfPublicKey (soeREQUIRED) + * @brief Get sfPublicKey (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfSignature (soeREQUIRED) + * @brief Get sfSignature (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_VL::type::value_type @@ -88,7 +92,8 @@ public: } /** - * Get sfOtherChainSource (soeREQUIRED) + * @brief Get sfOtherChainSource (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -98,7 +103,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -108,7 +114,8 @@ public: } /** - * Get sfAttestationRewardAccount (soeREQUIRED) + * @brief Get sfAttestationRewardAccount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -118,7 +125,8 @@ public: } /** - * Get sfWasLockingChainSend (soeREQUIRED) + * @brief Get sfWasLockingChainSend (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT8::type::value_type @@ -128,7 +136,8 @@ public: } /** - * Get sfXChainClaimID (soeREQUIRED) + * @brief Get sfXChainClaimID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -138,7 +147,8 @@ public: } /** - * Get sfDestination (soeOPTIONAL) + * @brief Get sfDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -151,6 +161,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestination() const @@ -160,7 +174,8 @@ public: }; /** - * Builder for XChainAddClaimAttestation transactions. + * @brief Builder for XChainAddClaimAttestation transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -168,6 +183,21 @@ public: class XChainAddClaimAttestationBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainAddClaimAttestationBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param attestationSignerAccount The sfAttestationSignerAccount field value. + * @param publicKey The sfPublicKey field value. + * @param signature The sfSignature field value. + * @param otherChainSource The sfOtherChainSource field value. + * @param amount The sfAmount field value. + * @param attestationRewardAccount The sfAttestationRewardAccount field value. + * @param wasLockingChainSend The sfWasLockingChainSend field value. + * @param xChainClaimID The sfXChainClaimID field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainAddClaimAttestationBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& attestationSignerAccount, std::decay_t const& publicKey, std::decay_t const& signature, std::decay_t const& otherChainSource, std::decay_t const& amount, std::decay_t const& attestationRewardAccount, std::decay_t const& wasLockingChainSend, std::decay_t const& xChainClaimID, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -185,6 +215,11 @@ public: setXChainClaimID(xChainClaimID); } + /** + * @brief Construct a XChainAddClaimAttestationBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainAddClaimAttestationBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_ADD_CLAIM_ATTESTATION) @@ -194,10 +229,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -208,7 +243,7 @@ public: } /** - * Set sfAttestationSignerAccount (soeREQUIRED) + * @brief Set sfAttestationSignerAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -219,7 +254,7 @@ public: } /** - * Set sfPublicKey (soeREQUIRED) + * @brief Set sfPublicKey (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -230,7 +265,7 @@ public: } /** - * Set sfSignature (soeREQUIRED) + * @brief Set sfSignature (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -241,7 +276,7 @@ public: } /** - * Set sfOtherChainSource (soeREQUIRED) + * @brief Set sfOtherChainSource (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -252,7 +287,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -263,7 +298,7 @@ public: } /** - * Set sfAttestationRewardAccount (soeREQUIRED) + * @brief Set sfAttestationRewardAccount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -274,7 +309,7 @@ public: } /** - * Set sfWasLockingChainSend (soeREQUIRED) + * @brief Set sfWasLockingChainSend (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -285,7 +320,7 @@ public: } /** - * Set sfXChainClaimID (soeREQUIRED) + * @brief Set sfXChainClaimID (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -296,7 +331,7 @@ public: } /** - * Set sfDestination (soeOPTIONAL) + * @brief Set sfDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ XChainAddClaimAttestationBuilder& @@ -307,9 +342,9 @@ public: } /** - * Build and return the XChainAddClaimAttestation wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainAddClaimAttestation wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainAddClaimAttestation diff --git a/include/xrpl/protocol_autogen/transactions/XChainClaim.h b/include/xrpl/protocol_autogen/transactions/XChainClaim.h index bdef09ef8d..6b1b748677 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainClaim.h +++ b/include/xrpl/protocol_autogen/transactions/XChainClaim.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainClaimBuilder; /** - * Transaction: XChainClaim + * @brief Transaction: XChainClaim + * * Type: ttXCHAIN_CLAIM (43) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_CLAIM; /** - * Construct a XChainClaim transaction wrapper from an existing STTx object. + * @brief Construct a XChainClaim transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainClaim(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfXChainClaimID (soeREQUIRED) + * @brief Get sfXChainClaimID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfDestination (soeREQUIRED) + * @brief Get sfDestination (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfDestinationTag (soeOPTIONAL) + * @brief Get sfDestinationTag (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -91,6 +95,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfDestinationTag is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasDestinationTag() const @@ -99,7 +107,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -110,7 +119,8 @@ public: }; /** - * Builder for XChainClaim transactions. + * @brief Builder for XChainClaim transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -118,6 +128,16 @@ public: class XChainClaimBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainClaimBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param xChainClaimID The sfXChainClaimID field value. + * @param destination The sfDestination field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainClaimBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& xChainClaimID, std::decay_t const& destination, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -130,6 +150,11 @@ public: setAmount(amount); } + /** + * @brief Construct a XChainClaimBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainClaimBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_CLAIM) @@ -139,10 +164,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainClaimBuilder& @@ -153,7 +178,7 @@ public: } /** - * Set sfXChainClaimID (soeREQUIRED) + * @brief Set sfXChainClaimID (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainClaimBuilder& @@ -164,7 +189,7 @@ public: } /** - * Set sfDestination (soeREQUIRED) + * @brief Set sfDestination (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainClaimBuilder& @@ -175,7 +200,7 @@ public: } /** - * Set sfDestinationTag (soeOPTIONAL) + * @brief Set sfDestinationTag (soeOPTIONAL) * @return Reference to this builder for method chaining. */ XChainClaimBuilder& @@ -186,7 +211,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainClaimBuilder& @@ -197,9 +222,9 @@ public: } /** - * Build and return the XChainClaim wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainClaim wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainClaim diff --git a/include/xrpl/protocol_autogen/transactions/XChainCommit.h b/include/xrpl/protocol_autogen/transactions/XChainCommit.h index d6130a66fb..879c76f180 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainCommit.h +++ b/include/xrpl/protocol_autogen/transactions/XChainCommit.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainCommitBuilder; /** - * Transaction: XChainCommit + * @brief Transaction: XChainCommit + * * Type: ttXCHAIN_COMMIT (42) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_COMMIT; /** - * Construct a XChainCommit transaction wrapper from an existing STTx object. + * @brief Construct a XChainCommit transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainCommit(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfXChainClaimID (soeREQUIRED) + * @brief Get sfXChainClaimID (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_UINT64::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfAmount (soeREQUIRED) + * @brief Get sfAmount (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -78,7 +81,8 @@ public: } /** - * Get sfOtherChainDestination (soeOPTIONAL) + * @brief Get sfOtherChainDestination (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -91,6 +95,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfOtherChainDestination is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasOtherChainDestination() const @@ -100,7 +108,8 @@ public: }; /** - * Builder for XChainCommit transactions. + * @brief Builder for XChainCommit transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -108,6 +117,15 @@ public: class XChainCommitBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainCommitBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param xChainClaimID The sfXChainClaimID field value. + * @param amount The sfAmount field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainCommitBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& xChainClaimID, std::decay_t const& amount, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -119,6 +137,11 @@ public: setAmount(amount); } + /** + * @brief Construct a XChainCommitBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainCommitBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_COMMIT) @@ -128,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCommitBuilder& @@ -142,7 +165,7 @@ public: } /** - * Set sfXChainClaimID (soeREQUIRED) + * @brief Set sfXChainClaimID (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCommitBuilder& @@ -153,7 +176,7 @@ public: } /** - * Set sfAmount (soeREQUIRED) + * @brief Set sfAmount (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCommitBuilder& @@ -164,7 +187,7 @@ public: } /** - * Set sfOtherChainDestination (soeOPTIONAL) + * @brief Set sfOtherChainDestination (soeOPTIONAL) * @return Reference to this builder for method chaining. */ XChainCommitBuilder& @@ -175,9 +198,9 @@ public: } /** - * Build and return the XChainCommit wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainCommit wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainCommit diff --git a/include/xrpl/protocol_autogen/transactions/XChainCreateBridge.h b/include/xrpl/protocol_autogen/transactions/XChainCreateBridge.h index 88c6216b0e..6ec22dd9fc 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainCreateBridge.h +++ b/include/xrpl/protocol_autogen/transactions/XChainCreateBridge.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainCreateBridgeBuilder; /** - * Transaction: XChainCreateBridge + * @brief Transaction: XChainCreateBridge + * * Type: ttXCHAIN_CREATE_BRIDGE (48) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_CREATE_BRIDGE; /** - * Construct a XChainCreateBridge transaction wrapper from an existing STTx object. + * @brief Construct a XChainCreateBridge transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainCreateBridge(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfSignatureReward (soeREQUIRED) + * @brief Get sfSignatureReward (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfMinAccountCreateAmount (soeOPTIONAL) + * @brief Get sfMinAccountCreateAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -81,6 +84,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMinAccountCreateAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMinAccountCreateAmount() const @@ -90,7 +97,8 @@ public: }; /** - * Builder for XChainCreateBridge transactions. + * @brief Builder for XChainCreateBridge transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -98,6 +106,14 @@ public: class XChainCreateBridgeBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainCreateBridgeBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param signatureReward The sfSignatureReward field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainCreateBridgeBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& signatureReward, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -108,6 +124,11 @@ public: setSignatureReward(signatureReward); } + /** + * @brief Construct a XChainCreateBridgeBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainCreateBridgeBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_CREATE_BRIDGE) @@ -117,10 +138,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCreateBridgeBuilder& @@ -131,7 +152,7 @@ public: } /** - * Set sfSignatureReward (soeREQUIRED) + * @brief Set sfSignatureReward (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCreateBridgeBuilder& @@ -142,7 +163,7 @@ public: } /** - * Set sfMinAccountCreateAmount (soeOPTIONAL) + * @brief Set sfMinAccountCreateAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ XChainCreateBridgeBuilder& @@ -153,9 +174,9 @@ public: } /** - * Build and return the XChainCreateBridge wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainCreateBridge wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainCreateBridge diff --git a/include/xrpl/protocol_autogen/transactions/XChainCreateClaimID.h b/include/xrpl/protocol_autogen/transactions/XChainCreateClaimID.h index 7ed0c44bc8..ab76ee0e77 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainCreateClaimID.h +++ b/include/xrpl/protocol_autogen/transactions/XChainCreateClaimID.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainCreateClaimIDBuilder; /** - * Transaction: XChainCreateClaimID + * @brief Transaction: XChainCreateClaimID + * * Type: ttXCHAIN_CREATE_CLAIM_ID (41) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_CREATE_CLAIM_ID; /** - * Construct a XChainCreateClaimID transaction wrapper from an existing STTx object. + * @brief Construct a XChainCreateClaimID transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainCreateClaimID(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfSignatureReward (soeREQUIRED) + * @brief Get sfSignatureReward (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_AMOUNT::type::value_type @@ -68,7 +70,8 @@ public: } /** - * Get sfOtherChainSource (soeREQUIRED) + * @brief Get sfOtherChainSource (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_ACCOUNT::type::value_type @@ -79,7 +82,8 @@ public: }; /** - * Builder for XChainCreateClaimID transactions. + * @brief Builder for XChainCreateClaimID transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -87,6 +91,15 @@ public: class XChainCreateClaimIDBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainCreateClaimIDBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param signatureReward The sfSignatureReward field value. + * @param otherChainSource The sfOtherChainSource field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainCreateClaimIDBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::decay_t const& signatureReward, std::decay_t const& otherChainSource, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -98,6 +111,11 @@ public: setOtherChainSource(otherChainSource); } + /** + * @brief Construct a XChainCreateClaimIDBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainCreateClaimIDBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_CREATE_CLAIM_ID) @@ -107,10 +125,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCreateClaimIDBuilder& @@ -121,7 +139,7 @@ public: } /** - * Set sfSignatureReward (soeREQUIRED) + * @brief Set sfSignatureReward (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCreateClaimIDBuilder& @@ -132,7 +150,7 @@ public: } /** - * Set sfOtherChainSource (soeREQUIRED) + * @brief Set sfOtherChainSource (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainCreateClaimIDBuilder& @@ -143,9 +161,9 @@ public: } /** - * Build and return the XChainCreateClaimID wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainCreateClaimID wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainCreateClaimID diff --git a/include/xrpl/protocol_autogen/transactions/XChainModifyBridge.h b/include/xrpl/protocol_autogen/transactions/XChainModifyBridge.h index 5636f97578..b57e0fdbdc 100644 --- a/include/xrpl/protocol_autogen/transactions/XChainModifyBridge.h +++ b/include/xrpl/protocol_autogen/transactions/XChainModifyBridge.h @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class XChainModifyBridgeBuilder; /** - * Transaction: XChainModifyBridge + * @brief Transaction: XChainModifyBridge + * * Type: ttXCHAIN_MODIFY_BRIDGE (47) * Delegable: Delegation::delegable * Amendment: featureXChainBridge @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ttXCHAIN_MODIFY_BRIDGE; /** - * Construct a XChainModifyBridge transaction wrapper from an existing STTx object. + * @brief Construct a XChainModifyBridge transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit XChainModifyBridge(std::shared_ptr tx) @@ -48,7 +48,8 @@ public: // Transaction-specific field getters /** - * Get sfXChainBridge (soeREQUIRED) + * @brief Get sfXChainBridge (soeREQUIRED) + * @return The field value. */ [[nodiscard]] SF_XCHAIN_BRIDGE::type::value_type @@ -58,7 +59,8 @@ public: } /** - * Get sfSignatureReward (soeOPTIONAL) + * @brief Get sfSignatureReward (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -71,6 +73,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfSignatureReward is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasSignatureReward() const @@ -79,7 +85,8 @@ public: } /** - * Get sfMinAccountCreateAmount (soeOPTIONAL) + * @brief Get sfMinAccountCreateAmount (soeOPTIONAL) + * @return The field value, or std::nullopt if not present. */ [[nodiscard]] protocol_autogen::Optional @@ -92,6 +99,10 @@ public: return std::nullopt; } + /** + * @brief Check if sfMinAccountCreateAmount is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool hasMinAccountCreateAmount() const @@ -101,7 +112,8 @@ public: }; /** - * Builder for XChainModifyBridge transactions. + * @brief Builder for XChainModifyBridge transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -109,6 +121,13 @@ public: class XChainModifyBridgeBuilder : public TransactionBuilderBase { public: + /** + * @brief Construct a new XChainModifyBridgeBuilder with required fields. + * @param account The account initiating the transaction. + * @param xChainBridge The sfXChainBridge field value. + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ XChainModifyBridgeBuilder(SF_ACCOUNT::type::value_type account, std::decay_t const& xChainBridge, std::optional sequence = std::nullopt, std::optional fee = std::nullopt @@ -118,6 +137,11 @@ public: setXChainBridge(xChainBridge); } + /** + * @brief Construct a XChainModifyBridgeBuilder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ XChainModifyBridgeBuilder(std::shared_ptr tx) { if (tx->getTxnType() != ttXCHAIN_MODIFY_BRIDGE) @@ -127,10 +151,10 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ /** - * Set sfXChainBridge (soeREQUIRED) + * @brief Set sfXChainBridge (soeREQUIRED) * @return Reference to this builder for method chaining. */ XChainModifyBridgeBuilder& @@ -141,7 +165,7 @@ public: } /** - * Set sfSignatureReward (soeOPTIONAL) + * @brief Set sfSignatureReward (soeOPTIONAL) * @return Reference to this builder for method chaining. */ XChainModifyBridgeBuilder& @@ -152,7 +176,7 @@ public: } /** - * Set sfMinAccountCreateAmount (soeOPTIONAL) + * @brief Set sfMinAccountCreateAmount (soeOPTIONAL) * @return Reference to this builder for method chaining. */ XChainModifyBridgeBuilder& @@ -163,9 +187,9 @@ public: } /** - * Build and return the XChainModifyBridge wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the XChainModifyBridge wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ XChainModifyBridge diff --git a/scripts/generate_ledger_classes.py b/scripts/generate_ledger_classes.py index 2868c8fc46..261f84e111 100644 --- a/scripts/generate_ledger_classes.py +++ b/scripts/generate_ledger_classes.py @@ -8,8 +8,6 @@ classes for each ledger entry type, similar to the transaction wrapper classes. Uses pcpp to preprocess the macro file and pyparsing to parse the DSL. """ -# cspell:words sfields - import io import argparse from pathlib import Path diff --git a/scripts/generate_tx_classes.py b/scripts/generate_tx_classes.py index 80478f79ce..823a26a4f1 100644 --- a/scripts/generate_tx_classes.py +++ b/scripts/generate_tx_classes.py @@ -6,8 +6,6 @@ and generate C++ classes for each transaction type. Uses pcpp to preprocess the macro file and pyparsing to parse the DSL. """ -# cspell:words sfields - import io import argparse from pathlib import Path diff --git a/scripts/macro_parser_common.py b/scripts/macro_parser_common.py index faff154ab1..d4642371e0 100644 --- a/scripts/macro_parser_common.py +++ b/scripts/macro_parser_common.py @@ -6,8 +6,6 @@ This module provides shared functionality for parsing transactions.macro and ledger_entries.macro files using pcpp and pyparsing. """ -# cspell:words sfields - import re from pathlib import Path import pyparsing as pp diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 97a95b7660..6f1fd971ad 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -2,7 +2,6 @@ # # These packages are required to run the code generation scripts that # parse macro files and generate C++ wrapper classes. -# cspell:words pyparsing # C preprocessor for Python - used to preprocess macro files pcpp>=1.30 @@ -12,3 +11,9 @@ pyparsing>=3.0.0 # Template engine - used to generate C++ code from templates Mako>=1.2.0 + +# Pre-commit - used to format generated C++ code +pre-commit>=3.0.0 + +# Code formatter - used to format generated C++ code +clang-format>=18.1.0 diff --git a/scripts/templates/LedgerEntry.h.mako b/scripts/templates/LedgerEntry.h.mako index 3eb4c9854f..fdb55a973a 100644 --- a/scripts/templates/LedgerEntry.h.mako +++ b/scripts/templates/LedgerEntry.h.mako @@ -13,11 +13,11 @@ namespace xrpl::ledger_entries { -// Forward declaration class ${name}Builder; /** - * Ledger Entry: ${name} + * @brief Ledger Entry: ${name} + * * Type: ${tag} (${value}) * RPC Name: ${rpc_name} * @@ -30,7 +30,7 @@ public: static constexpr LedgerEntryType entryType = ${tag}; /** - * Construct a ${name} ledger entry wrapper from an existing SLE object. + * @brief Construct a ${name} ledger entry wrapper from an existing SLE object. * @throws std::runtime_error if the ledger entry type doesn't match. */ explicit ${name}(std::shared_ptr sle) @@ -48,9 +48,14 @@ public: % if field['typed']: /** - * Get ${field['name']} (${field['requirement']}) + * @brief Get ${field['name']} (${field['requirement']}) % if field.get('mpt_support'): * MPT Support: ${field['mpt_support']} +% endif +% if field['requirement'] == 'soeREQUIRED': + * @return The field value. +% else: + * @return The field value, or std::nullopt if not present. % endif */ % if field['requirement'] == 'soeREQUIRED': @@ -70,6 +75,10 @@ public: return std::nullopt; } + /** + * @brief Check if ${field['name']} is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool has${field['name'][2:]}() const @@ -80,11 +89,16 @@ public: % else: /** - * Get ${field['name']} (${field['requirement']}) + * @brief Get ${field['name']} (${field['requirement']}) % if field.get('mpt_support'): * MPT Support: ${field['mpt_support']} % endif - * Note: This is an untyped field (${field.get('cppType', 'unknown')}). + * @note This is an untyped field (${field.get('cppType', 'unknown')}). +% if field['requirement'] == 'soeREQUIRED': + * @return The field value. +% else: + * @return The field value, or std::nullopt if not present. +% endif */ % if field['requirement'] == 'soeREQUIRED': [[nodiscard]] @@ -103,6 +117,10 @@ public: return std::nullopt; } + /** + * @brief Check if ${field['name']} is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool has${field['name'][2:]}() const @@ -118,7 +136,8 @@ public: required_fields = [f for f in fields if f['requirement'] == 'soeREQUIRED'] %>\ /** - * Builder for ${name} ledger entries. + * @brief Builder for ${name} ledger entries. + * * Provides a fluent interface for constructing ledger entries with method chaining. * Uses Json::Value internally for flexible ledger entry construction. * Inherits common field setters from LedgerEntryBuilderBase. @@ -126,6 +145,12 @@ public: class ${name}Builder : public LedgerEntryBuilderBase<${name}Builder> { public: + /** + * @brief Construct a new ${name}Builder with required fields. +% for field in required_fields: + * @param ${field['paramName']} The ${field['name']} field value. +% endfor + */ ${name}Builder(\ % for i, field in enumerate(required_fields): ${field['typeData']['setter_type']} ${field['paramName']}${',' if i < len(required_fields) - 1 else ''}\ @@ -138,6 +163,11 @@ ${field['typeData']['setter_type']} ${field['paramName']}${',' if i < len(requir % endfor } + /** + * @brief Construct a ${name}Builder from an existing SLE object. + * @param sle The existing ledger entry to copy from. + * @throws std::runtime_error if the ledger entry type doesn't match. + */ ${name}Builder(std::shared_ptr sle) { if (sle->at(sfLedgerEntryType) != ${tag}) @@ -147,11 +177,11 @@ ${field['typeData']['setter_type']} ${field['paramName']}${',' if i < len(requir object_ = *sle; } - // Ledger entry-specific field setters + /** @brief Ledger entry-specific field setters */ % for field in fields: /** - * Set ${field['name']} (${field['requirement']}) + * @brief Set ${field['name']} (${field['requirement']}) % if field.get('mpt_support'): * MPT Support: ${field['mpt_support']} % endif @@ -172,7 +202,8 @@ ${field['typeData']['setter_type']} ${field['paramName']}${',' if i < len(requir % endfor /** - * Build and return the completed ${name} wrapper. + * @brief Build and return the completed ${name} wrapper. + * @param index The ledger entry index. * @return The constructed ledger entry wrapper. */ ${name} diff --git a/scripts/templates/Transaction.h.mako b/scripts/templates/Transaction.h.mako index 40f55d0e63..62c51a5c97 100644 --- a/scripts/templates/Transaction.h.mako +++ b/scripts/templates/Transaction.h.mako @@ -13,11 +13,11 @@ namespace xrpl::transactions { -// Forward declaration class ${name}Builder; /** - * Transaction: ${name} + * @brief Transaction: ${name} + * * Type: ${tag} (${value}) * Delegable: ${delegable} * Amendment: ${amendments} @@ -32,7 +32,7 @@ public: static constexpr xrpl::TxType txType = ${tag}; /** - * Construct a ${name} transaction wrapper from an existing STTx object. + * @brief Construct a ${name} transaction wrapper from an existing STTx object. * @throws std::runtime_error if the transaction type doesn't match. */ explicit ${name}(std::shared_ptr tx) @@ -50,9 +50,14 @@ public: % if field['typed']: /** - * Get ${field['name']} (${field['requirement']}) + * @brief Get ${field['name']} (${field['requirement']}) % if field.get('supports_mpt'): - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @note This field supports MPT (Multi-Purpose Token) amounts. +% endif +% if field['requirement'] == 'soeREQUIRED': + * @return The field value. +% else: + * @return The field value, or std::nullopt if not present. % endif */ % if field['requirement'] == 'soeREQUIRED': @@ -74,6 +79,10 @@ public: return std::nullopt; } + /** + * @brief Check if ${field['name']} is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool has${field['name'][2:]}() const @@ -83,11 +92,16 @@ public: % endif % else: /** - * Get ${field['name']} (${field['requirement']}) + * @brief Get ${field['name']} (${field['requirement']}) % if field.get('supports_mpt'): - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @note This field supports MPT (Multi-Purpose Token) amounts. +% endif + * @note This is an untyped field. +% if field['requirement'] == 'soeREQUIRED': + * @return The field value. +% else: + * @return The field value, or std::nullopt if not present. % endif - * Note: This is an untyped field */ % if field['requirement'] == 'soeREQUIRED': [[nodiscard]] @@ -106,6 +120,10 @@ public: return std::nullopt; } + /** + * @brief Check if ${field['name']} is present. + * @return True if the field is present, false otherwise. + */ [[nodiscard]] bool has${field['name'][2:]}() const @@ -121,7 +139,8 @@ public: required_fields = [f for f in fields if f['requirement'] == 'soeREQUIRED'] %>\ /** - * Builder for ${name} transactions. + * @brief Builder for ${name} transactions. + * * Provides a fluent interface for constructing transactions with method chaining. * Uses Json::Value internally for flexible transaction construction. * Inherits common field setters from TransactionBuilderBase. @@ -129,6 +148,15 @@ public: class ${name}Builder : public TransactionBuilderBase<${name}Builder> { public: + /** + * @brief Construct a new ${name}Builder with required fields. + * @param account The account initiating the transaction. +% for field in required_fields: + * @param ${field['paramName']} The ${field['name']} field value. +% endfor + * @param sequence Optional sequence number for the transaction. + * @param fee Optional fee for the transaction. + */ ${name}Builder(SF_ACCOUNT::type::value_type account, % for i, field in enumerate(required_fields): ${field['typeData']['setter_type']} ${field['paramName']},\ @@ -143,6 +171,11 @@ public: % endfor } + /** + * @brief Construct a ${name}Builder from an existing STTx object. + * @param tx The existing transaction to copy from. + * @throws std::runtime_error if the transaction type doesn't match. + */ ${name}Builder(std::shared_ptr tx) { if (tx->getTxnType() != ${tag}) @@ -152,13 +185,13 @@ public: object_ = *tx; } - // Transaction-specific field setters + /** @brief Transaction-specific field setters */ % for field in fields: /** - * Set ${field['name']} (${field['requirement']}) + * @brief Set ${field['name']} (${field['requirement']}) % if field.get('supports_mpt'): - * Note: This field supports MPT (Multi-Purpose Token) amounts. + * @note This field supports MPT (Multi-Purpose Token) amounts. % endif * @return Reference to this builder for method chaining. */ @@ -177,9 +210,9 @@ public: % endfor /** - * Build and return the ${name} wrapper. - * @param publicKey The public key for signing - * @param secretKey The secret key for signing + * @brief Build and return the ${name} wrapper. + * @param publicKey The public key for signing. + * @param secretKey The secret key for signing. * @return The constructed transaction wrapper. */ ${name}