mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-07 18:56:47 +00:00
Address PR comments
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
<!-- cspell:words pyparsing -->
|
||||
|
||||
# Protocol Autogen
|
||||
|
||||
This directory contains auto-generated C++ wrapper classes for XRP Ledger protocol types.
|
||||
|
||||
@@ -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 const> 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<SF_UINT16::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<STObject>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<AMMBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_AMOUNT::type::value_type> const& lPTokenBalance,std::decay_t<typename SF_ISSUE::type::value_type> const& asset,std::decay_t<typename SF_ISSUE::type::value_type> const& asset2,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode)
|
||||
: LedgerEntryBuilderBase<AMMBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT128::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT8::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<AccountRootBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,std::decay_t<typename SF_AMOUNT::type::value_type> const& balance,std::decay_t<typename SF_UINT32::type::value_type> const& ownerCount,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<AccountRootBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_VECTOR256::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<AmendmentsBuilder>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new AmendmentsBuilder with required fields.
|
||||
*/
|
||||
AmendmentsBuilder()
|
||||
: LedgerEntryBuilderBase<AmendmentsBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<BridgeBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_AMOUNT::type::value_type> const& signatureReward,std::decay_t<typename SF_XCHAIN_BRIDGE::type::value_type> const& xChainBridge,std::decay_t<typename SF_UINT64::type::value_type> const& xChainClaimID,std::decay_t<typename SF_UINT64::type::value_type> const& xChainAccountCreateCount,std::decay_t<typename SF_UINT64::type::value_type> const& xChainAccountClaimCount,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<BridgeBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<CheckBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_ACCOUNT::type::value_type> const& destination,std::decay_t<typename SF_AMOUNT::type::value_type> const& sendMax,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT64::type::value_type> const& destinationNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<CheckBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<CredentialBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& subject,std::decay_t<typename SF_ACCOUNT::type::value_type> const& issuer,std::decay_t<typename SF_VL::type::value_type> const& credentialType,std::decay_t<typename SF_UINT64::type::value_type> const& issuerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<CredentialBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<DIDBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<DIDBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<DelegateBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_ACCOUNT::type::value_type> const& authorize,STArray const& permissions,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<DelegateBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<DepositPreauthBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<DepositPreauthBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT160::type::value_type>
|
||||
@@ -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<SF_UINT160::type::value_type>
|
||||
@@ -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<SF_UINT160::type::value_type>
|
||||
@@ -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<SF_UINT160::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<DirectoryNodeBuilder>
|
||||
{
|
||||
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<typename SF_VECTOR256::type::value_type> const& indexes,std::decay_t<typename SF_UINT256::type::value_type> const& rootIndex)
|
||||
: LedgerEntryBuilderBase<DirectoryNodeBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<EscrowBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_ACCOUNT::type::value_type> const& destination,std::decay_t<typename SF_AMOUNT::type::value_type> const& amount,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<EscrowBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<FeeSettingsBuilder>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new FeeSettingsBuilder with required fields.
|
||||
*/
|
||||
FeeSettingsBuilder()
|
||||
: LedgerEntryBuilderBase<FeeSettingsBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<LedgerHashesBuilder>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new LedgerHashesBuilder with required fields.
|
||||
* @param hashes The sfHashes field value.
|
||||
*/
|
||||
LedgerHashesBuilder(std::decay_t<typename SF_VECTOR256::type::value_type> const& hashes)
|
||||
: LedgerEntryBuilderBase<LedgerHashesBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_INT32::type::value_type>
|
||||
@@ -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<LoanBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT64::type::value_type> const& loanBrokerNode,std::decay_t<typename SF_UINT256::type::value_type> const& loanBrokerID,std::decay_t<typename SF_UINT32::type::value_type> const& loanSequence,std::decay_t<typename SF_ACCOUNT::type::value_type> const& borrower,std::decay_t<typename SF_UINT32::type::value_type> const& startDate,std::decay_t<typename SF_UINT32::type::value_type> const& paymentInterval,std::decay_t<typename SF_NUMBER::type::value_type> const& periodicPayment)
|
||||
: LedgerEntryBuilderBase<LoanBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT16::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<LoanBrokerBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT64::type::value_type> const& vaultNode,std::decay_t<typename SF_UINT256::type::value_type> const& vaultID,std::decay_t<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_ACCOUNT::type::value_type> const& owner,std::decay_t<typename SF_UINT32::type::value_type> const& loanSequence)
|
||||
: LedgerEntryBuilderBase<LoanBrokerBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<MPTokenBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_UINT192::type::value_type> const& mPTokenIssuanceID,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<MPTokenBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT16::type::value_type>
|
||||
@@ -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<SF_UINT8::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<MPTokenIssuanceBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& issuer,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT64::type::value_type> const& outstandingAmount,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<MPTokenIssuanceBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<NFTokenOfferBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& owner,std::decay_t<typename SF_UINT256::type::value_type> const& nFTokenID,std::decay_t<typename SF_AMOUNT::type::value_type> const& amount,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT64::type::value_type> const& nFTokenOfferNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<NFTokenOfferBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<NFTokenPageBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<NFTokenPageBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<NegativeUNLBuilder>
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new NegativeUNLBuilder with required fields.
|
||||
*/
|
||||
NegativeUNLBuilder()
|
||||
: LedgerEntryBuilderBase<NegativeUNLBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<OfferBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,std::decay_t<typename SF_AMOUNT::type::value_type> const& takerPays,std::decay_t<typename SF_AMOUNT::type::value_type> const& takerGets,std::decay_t<typename SF_UINT256::type::value_type> const& bookDirectory,std::decay_t<typename SF_UINT64::type::value_type> const& bookNode,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<OfferBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<OracleBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& owner,std::decay_t<typename SF_VL::type::value_type> const& provider,STArray const& priceDataSeries,std::decay_t<typename SF_VL::type::value_type> const& assetClass,std::decay_t<typename SF_UINT32::type::value_type> const& lastUpdateTime,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<OracleBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<PayChannelBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_ACCOUNT::type::value_type> const& destination,std::decay_t<typename SF_AMOUNT::type::value_type> const& amount,std::decay_t<typename SF_AMOUNT::type::value_type> const& balance,std::decay_t<typename SF_VL::type::value_type> const& publicKey,std::decay_t<typename SF_UINT32::type::value_type> const& settleDelay,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<PayChannelBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<PermissionedDomainBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& owner,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,STArray const& acceptedCredentials,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<PermissionedDomainBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<RippleStateBuilder>
|
||||
{
|
||||
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<typename SF_AMOUNT::type::value_type> const& balance,std::decay_t<typename SF_AMOUNT::type::value_type> const& lowLimit,std::decay_t<typename SF_AMOUNT::type::value_type> const& highLimit,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<RippleStateBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SignerListBuilder>
|
||||
{
|
||||
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<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT32::type::value_type> const& signerQuorum,STArray const& signerEntries,std::decay_t<typename SF_UINT32::type::value_type> const& signerListID,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<SignerListBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<TicketBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT32::type::value_type> const& ticketSequence,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<TicketBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_UINT8::type::value_type>
|
||||
@@ -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<VaultBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq,std::decay_t<typename SF_UINT32::type::value_type> const& sequence,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_ACCOUNT::type::value_type> const& owner,std::decay_t<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_ISSUE::type::value_type> const& asset,std::decay_t<typename SF_UINT192::type::value_type> const& shareMPTID,std::decay_t<typename SF_UINT8::type::value_type> const& withdrawalPolicy)
|
||||
: LedgerEntryBuilderBase<VaultBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<XChainOwnedClaimIDBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_XCHAIN_BRIDGE::type::value_type> const& xChainBridge,std::decay_t<typename SF_UINT64::type::value_type> const& xChainClaimID,std::decay_t<typename SF_ACCOUNT::type::value_type> const& otherChainSource,STArray const& xChainClaimAttestations,std::decay_t<typename SF_AMOUNT::type::value_type> const& signatureReward,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<XChainOwnedClaimIDBuilder>(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 const> 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
|
||||
|
||||
@@ -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 const> 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<XChainOwnedCreateAccountClaimIDBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& account,std::decay_t<typename SF_XCHAIN_BRIDGE::type::value_type> const& xChainBridge,std::decay_t<typename SF_UINT64::type::value_type> const& xChainAccountCreateCount,STArray const& xChainCreateAccountAttestations,std::decay_t<typename SF_UINT64::type::value_type> const& ownerNode,std::decay_t<typename SF_UINT256::type::value_type> const& previousTxnID,std::decay_t<typename SF_UINT32::type::value_type> const& previousTxnLgrSeq)
|
||||
: LedgerEntryBuilderBase<XChainOwnedCreateAccountClaimIDBuilder>(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 const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<AMMBidBuilder>
|
||||
{
|
||||
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<typename SF_ISSUE::type::value_type> const& asset, std::decay_t<typename SF_ISSUE::type::value_type> const& asset2, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<AMMClawbackBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& holder, std::decay_t<typename SF_ISSUE::type::value_type> const& asset, std::decay_t<typename SF_ISSUE::type::value_type> const& asset2, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<AMMCreateBuilder>
|
||||
{
|
||||
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<typename SF_AMOUNT::type::value_type> const& amount, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount2, std::decay_t<typename SF_UINT16::type::value_type> const& tradingFee, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<AMMDeleteBuilder>
|
||||
{
|
||||
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<typename SF_ISSUE::type::value_type> const& asset, std::decay_t<typename SF_ISSUE::type::value_type> const& asset2, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_UINT16::type::value_type>
|
||||
@@ -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<AMMDepositBuilder>
|
||||
{
|
||||
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<typename SF_ISSUE::type::value_type> const& asset, std::decay_t<typename SF_ISSUE::type::value_type> const& asset2, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<AMMVoteBuilder>
|
||||
{
|
||||
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<typename SF_ISSUE::type::value_type> const& asset, std::decay_t<typename SF_ISSUE::type::value_type> const& asset2, std::decay_t<typename SF_UINT16::type::value_type> const& tradingFee, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<AMMWithdrawBuilder>
|
||||
{
|
||||
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<typename SF_ISSUE::type::value_type> const& asset, std::decay_t<typename SF_ISSUE::type::value_type> const& asset2, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VECTOR256::type::value_type>
|
||||
@@ -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<AccountDeleteBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& destination, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT128::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT8::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<AccountSetBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<BatchBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<CheckCancelBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& checkID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<CheckCashBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& checkID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<CheckCreateBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& destination, std::decay_t<typename SF_AMOUNT::type::value_type> const& sendMax, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<ClawbackBuilder>
|
||||
{
|
||||
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<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<CredentialAcceptBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& issuer, std::decay_t<typename SF_VL::type::value_type> const& credentialType, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<CredentialCreateBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& subject, std::decay_t<typename SF_VL::type::value_type> const& credentialType, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<CredentialDeleteBuilder>
|
||||
{
|
||||
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<typename SF_VL::type::value_type> const& credentialType, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<DIDDeleteBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<DIDSetBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<DelegateSetBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& authorize, STArray const& permissions, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<DepositPreauthBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<EnableAmendmentBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& ledgerSequence, std::decay_t<typename SF_UINT256::type::value_type> const& amendment, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<EscrowCancelBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& owner, std::decay_t<typename SF_UINT32::type::value_type> const& offerSequence, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<EscrowCreateBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& destination, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VECTOR256::type::value_type>
|
||||
@@ -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<EscrowFinishBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& owner, std::decay_t<typename SF_UINT32::type::value_type> const& offerSequence, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<LedgerStateFixBuilder>
|
||||
{
|
||||
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<typename SF_UINT16::type::value_type> const& ledgerFixType, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<LoanBrokerCoverClawbackBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<LoanBrokerCoverDepositBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanBrokerID, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<LoanBrokerCoverWithdrawBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanBrokerID, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<LoanBrokerDeleteBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanBrokerID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT16::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<LoanBrokerSetBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& vaultID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<LoanDeleteBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<LoanManageBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<LoanPayBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanID, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<STObject>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<LoanSetBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& loanBrokerID, std::decay_t<typename SF_NUMBER::type::value_type> const& principalRequested, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<MPTokenAuthorizeBuilder>
|
||||
{
|
||||
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<typename SF_UINT192::type::value_type> const& mPTokenIssuanceID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT8::type::value_type>
|
||||
@@ -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<SF_UINT16::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<MPTokenIssuanceCreateBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<MPTokenIssuanceDestroyBuilder>
|
||||
{
|
||||
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<typename SF_UINT192::type::value_type> const& mPTokenIssuanceID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT16::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<MPTokenIssuanceSetBuilder>
|
||||
{
|
||||
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<typename SF_UINT192::type::value_type> const& mPTokenIssuanceID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<NFTokenAcceptOfferBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<NFTokenBurnBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& nFTokenID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<NFTokenCancelOfferBuilder>
|
||||
{
|
||||
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<typename SF_VECTOR256::type::value_type> const& nFTokenOffers, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<NFTokenCreateOfferBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& nFTokenID, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT16::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<NFTokenMintBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& nFTokenTaxon, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<NFTokenModifyBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& nFTokenID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<OfferCancelBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& offerSequence, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<OfferCreateBuilder>
|
||||
{
|
||||
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<typename SF_AMOUNT::type::value_type> const& takerPays, std::decay_t<typename SF_AMOUNT::type::value_type> const& takerGets, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<OracleDeleteBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& oracleDocumentID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<OracleSetBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& oracleDocumentID, std::decay_t<typename SF_UINT32::type::value_type> const& lastUpdateTime, STArray const& priceDataSeries, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<std::reference_wrapper<STPathSet const>>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_VECTOR256::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<PaymentBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& destination, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_VECTOR256::type::value_type>
|
||||
@@ -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<PaymentChannelClaimBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& channel, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<PaymentChannelCreateBuilder>
|
||||
{
|
||||
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<typename SF_ACCOUNT::type::value_type> const& destination, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::decay_t<typename SF_UINT32::type::value_type> const& settleDelay, std::decay_t<typename SF_VL::type::value_type> const& publicKey, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<PaymentChannelFundBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& channel, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<PermissionedDomainDeleteBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& domainID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT256::type::value_type>
|
||||
@@ -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<PermissionedDomainSetBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT64::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SetFeeBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SetRegularKeyBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<std::reference_wrapper<STArray const>>
|
||||
@@ -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<SignerListSetBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& signerQuorum, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<TicketCreateBuilder>
|
||||
{
|
||||
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<typename SF_UINT32::type::value_type> const& ticketCount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<TrustSetBuilder>
|
||||
{
|
||||
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<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<UNLModifyBuilder>
|
||||
{
|
||||
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<typename SF_UINT8::type::value_type> const& uNLModifyDisabling, std::decay_t<typename SF_UINT32::type::value_type> const& ledgerSequence, std::decay_t<typename SF_VL::type::value_type> const& uNLModifyValidator, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_AMOUNT::type::value_type>
|
||||
@@ -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<VaultClawbackBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& vaultID, std::decay_t<typename SF_ACCOUNT::type::value_type> const& holder, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_UINT8::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<SF_UINT8::type::value_type>
|
||||
@@ -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<VaultCreateBuilder>
|
||||
{
|
||||
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<typename SF_ISSUE::type::value_type> const& asset, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<VaultDeleteBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& vaultID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<VaultDepositBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& vaultID, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_NUMBER::type::value_type>
|
||||
@@ -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<SF_UINT256::type::value_type>
|
||||
@@ -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<SF_VL::type::value_type>
|
||||
@@ -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<VaultSetBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& vaultID, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<SF_ACCOUNT::type::value_type>
|
||||
@@ -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<SF_UINT32::type::value_type>
|
||||
@@ -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<VaultWithdrawBuilder>
|
||||
{
|
||||
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<typename SF_UINT256::type::value_type> const& vaultID, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<XChainAccountCreateCommitBuilder>
|
||||
{
|
||||
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<typename SF_XCHAIN_BRIDGE::type::value_type> const& xChainBridge, std::decay_t<typename SF_ACCOUNT::type::value_type> const& destination, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::decay_t<typename SF_AMOUNT::type::value_type> const& signatureReward, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
@@ -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<STTx const> 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<XChainAddAccountCreateAttestationBuilder>
|
||||
{
|
||||
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<typename SF_XCHAIN_BRIDGE::type::value_type> const& xChainBridge, std::decay_t<typename SF_ACCOUNT::type::value_type> const& attestationSignerAccount, std::decay_t<typename SF_VL::type::value_type> const& publicKey, std::decay_t<typename SF_VL::type::value_type> const& signature, std::decay_t<typename SF_ACCOUNT::type::value_type> const& otherChainSource, std::decay_t<typename SF_AMOUNT::type::value_type> const& amount, std::decay_t<typename SF_ACCOUNT::type::value_type> const& attestationRewardAccount, std::decay_t<typename SF_UINT8::type::value_type> const& wasLockingChainSend, std::decay_t<typename SF_UINT64::type::value_type> const& xChainAccountCreateCount, std::decay_t<typename SF_ACCOUNT::type::value_type> const& destination, std::decay_t<typename SF_AMOUNT::type::value_type> const& signatureReward, std::optional<SF_UINT32::type::value_type> sequence = std::nullopt,
|
||||
std::optional<SF_AMOUNT::type::value_type> 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<STTx const> 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user