rippled
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
xrpl::ledger_entries::EscrowBuilder Class Reference

Builder for Escrow ledger entries. More...

#include <Escrow.h>

Inheritance diagram for xrpl::ledger_entries::EscrowBuilder:
Inheritance graph
[legend]
Collaboration diagram for xrpl::ledger_entries::EscrowBuilder:
Collaboration graph
[legend]

Public Member Functions

 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)
 Construct a new EscrowBuilder with required fields.
 
 EscrowBuilder (std::shared_ptr< SLE const > sle)
 Construct a EscrowBuilder from an existing SLE object.
 
EscrowBuildersetAccount (std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
 Ledger entry-specific field setters.
 
EscrowBuildersetSequence (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfSequence (soeOPTIONAL)
 
EscrowBuildersetDestination (std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
 Set sfDestination (soeREQUIRED)
 
EscrowBuildersetAmount (std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
 Set sfAmount (soeREQUIRED)
 
EscrowBuildersetCondition (std::decay_t< typename SF_VL::type::value_type > const &value)
 Set sfCondition (soeOPTIONAL)
 
EscrowBuildersetCancelAfter (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfCancelAfter (soeOPTIONAL)
 
EscrowBuildersetFinishAfter (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfFinishAfter (soeOPTIONAL)
 
EscrowBuildersetSourceTag (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfSourceTag (soeOPTIONAL)
 
EscrowBuildersetDestinationTag (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfDestinationTag (soeOPTIONAL)
 
EscrowBuildersetOwnerNode (std::decay_t< typename SF_UINT64::type::value_type > const &value)
 Set sfOwnerNode (soeREQUIRED)
 
EscrowBuildersetPreviousTxnID (std::decay_t< typename SF_UINT256::type::value_type > const &value)
 Set sfPreviousTxnID (soeREQUIRED)
 
EscrowBuildersetPreviousTxnLgrSeq (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfPreviousTxnLgrSeq (soeREQUIRED)
 
EscrowBuildersetDestinationNode (std::decay_t< typename SF_UINT64::type::value_type > const &value)
 Set sfDestinationNode (soeOPTIONAL)
 
EscrowBuildersetTransferRate (std::decay_t< typename SF_UINT32::type::value_type > const &value)
 Set sfTransferRate (soeOPTIONAL)
 
EscrowBuildersetIssuerNode (std::decay_t< typename SF_UINT64::type::value_type > const &value)
 Set sfIssuerNode (soeOPTIONAL)
 
Escrow build (uint256 const &index)
 Build and return the completed Escrow wrapper.
 
bool validate () const
 Validate the ledger entry.
 
EscrowBuildersetLedgerIndex (uint256 const &value)
 Set the ledger index.
 
EscrowBuildersetFlags (uint32_t value)
 Set the flags.
 

Protected Attributes

STObject object_
 

Detailed Description

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.

Definition at line 338 of file Escrow.h.

Constructor & Destructor Documentation

◆ EscrowBuilder() [1/2]

xrpl::ledger_entries::EscrowBuilder::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 
)

Construct a new EscrowBuilder with required fields.

Parameters
accountThe sfAccount field value.
destinationThe sfDestination field value.
amountThe sfAmount field value.
ownerNodeThe sfOwnerNode field value.
previousTxnIDThe sfPreviousTxnID field value.
previousTxnLgrSeqThe sfPreviousTxnLgrSeq field value.

Definition at line 350 of file Escrow.h.

◆ EscrowBuilder() [2/2]

xrpl::ledger_entries::EscrowBuilder::EscrowBuilder ( std::shared_ptr< SLE const >  sle)

Construct a EscrowBuilder from an existing SLE object.

Parameters
sleThe existing ledger entry to copy from.
Exceptions
std::runtime_errorif the ledger entry type doesn't match.

Definition at line 366 of file Escrow.h.

Member Function Documentation

◆ setAccount()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setAccount ( std::decay_t< typename SF_ACCOUNT::type::value_type > const &  value)

Ledger entry-specific field setters.

Set sfAccount (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 382 of file Escrow.h.

◆ setSequence()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setSequence ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfSequence (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 393 of file Escrow.h.

◆ setDestination()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setDestination ( std::decay_t< typename SF_ACCOUNT::type::value_type > const &  value)

Set sfDestination (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 404 of file Escrow.h.

◆ setAmount()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setAmount ( std::decay_t< typename SF_AMOUNT::type::value_type > const &  value)

Set sfAmount (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 415 of file Escrow.h.

◆ setCondition()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setCondition ( std::decay_t< typename SF_VL::type::value_type > const &  value)

Set sfCondition (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 426 of file Escrow.h.

◆ setCancelAfter()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setCancelAfter ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfCancelAfter (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 437 of file Escrow.h.

◆ setFinishAfter()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setFinishAfter ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfFinishAfter (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 448 of file Escrow.h.

◆ setSourceTag()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setSourceTag ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfSourceTag (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 459 of file Escrow.h.

◆ setDestinationTag()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setDestinationTag ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfDestinationTag (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 470 of file Escrow.h.

◆ setOwnerNode()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setOwnerNode ( std::decay_t< typename SF_UINT64::type::value_type > const &  value)

Set sfOwnerNode (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 481 of file Escrow.h.

◆ setPreviousTxnID()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setPreviousTxnID ( std::decay_t< typename SF_UINT256::type::value_type > const &  value)

Set sfPreviousTxnID (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 492 of file Escrow.h.

◆ setPreviousTxnLgrSeq()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setPreviousTxnLgrSeq ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfPreviousTxnLgrSeq (soeREQUIRED)

Returns
Reference to this builder for method chaining.

Definition at line 503 of file Escrow.h.

◆ setDestinationNode()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setDestinationNode ( std::decay_t< typename SF_UINT64::type::value_type > const &  value)

Set sfDestinationNode (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 514 of file Escrow.h.

◆ setTransferRate()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setTransferRate ( std::decay_t< typename SF_UINT32::type::value_type > const &  value)

Set sfTransferRate (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 525 of file Escrow.h.

◆ setIssuerNode()

EscrowBuilder & xrpl::ledger_entries::EscrowBuilder::setIssuerNode ( std::decay_t< typename SF_UINT64::type::value_type > const &  value)

Set sfIssuerNode (soeOPTIONAL)

Returns
Reference to this builder for method chaining.

Definition at line 536 of file Escrow.h.

◆ build()

Escrow xrpl::ledger_entries::EscrowBuilder::build ( uint256 const &  index)

Build and return the completed Escrow wrapper.

Parameters
indexThe ledger entry index.
Returns
The constructed ledger entry wrapper.

Definition at line 548 of file Escrow.h.

◆ validate()

bool xrpl::ledger_entries::LedgerEntryBuilderBase< EscrowBuilder >::validate ( ) const
inherited

Validate the ledger entry.

Returns
true if validation passes, false otherwise

Definition at line 45 of file LedgerEntryBuilderBase.h.

◆ setLedgerIndex()

EscrowBuilder & xrpl::ledger_entries::LedgerEntryBuilderBase< EscrowBuilder >::setLedgerIndex ( uint256 const &  value)
inherited

Set the ledger index.

Parameters
valueLedger index
Returns
Reference to the derived builder for method chaining.

Definition at line 62 of file LedgerEntryBuilderBase.h.

◆ setFlags()

EscrowBuilder & xrpl::ledger_entries::LedgerEntryBuilderBase< EscrowBuilder >::setFlags ( uint32_t  value)
inherited

Set the flags.

Parameters
valueFlags value
Returns
Reference to the derived builder for method chaining.

Definition at line 74 of file LedgerEntryBuilderBase.h.

Member Data Documentation

◆ object_

Definition at line 81 of file LedgerEntryBuilderBase.h.