EscrowFinishFields

Trait EscrowFinishFields 

Source
pub trait EscrowFinishFields: TransactionCommonFields {
    // Provided methods
    fn get_id(&self) -> Result<Hash256> { ... }
    fn get_owner(&self) -> Result<AccountID> { ... }
    fn get_offer_sequence(&self) -> Result<u32> { ... }
    fn get_condition(&self) -> Result<Option<Condition>> { ... }
    fn get_fulfillment(&self) -> Result<Option<Fulfillment>> { ... }
}
Expand description

Trait providing access to fields specific to EscrowFinish transactions.

This trait extends TransactionCommonFields with methods for retrieving fields that are unique to EscrowFinish transactions. EscrowFinish transactions are used to complete time-based or condition-based escrows that were previously created with EscrowCreate transactions.

§Implementation Requirements

Types implementing this trait should:

  • Also implement TransactionCommonFields for access to common transaction fields
  • Only be used in the context of processing EscrowFinish transactions
  • Ensure proper error handling when accessing conditional fields

Provided Methods§

Source

fn get_id(&self) -> Result<Hash256>

Retrieves the transaction ID (hash) from the current transaction.

This field provides the unique hash identifier of the current EscrowFinish transaction. Transaction hashes are deterministically calculated from the transaction contents and serve as unique identifiers for referencing transactions across the XRPL network.

§Returns

Returns a Result<Hash256> where:

  • Ok(Hash256) - The 256-bit transaction hash identifier
  • Err(Error) - If the field cannot be retrieved or has an unexpected size
Source

fn get_owner(&self) -> Result<AccountID>

Retrieves the owner account from the current EscrowFinish transaction.

This mandatory field identifies the XRPL account that originally created the escrow with an EscrowCreate transaction. The owner is the account that deposited the XRP into the escrow and specified the conditions for its release.

§Returns

Returns a Result<AccountID> where:

  • Ok(AccountID) - The 20-byte account identifier of the escrow owner
  • Err(Error) - If the field cannot be retrieved or has an unexpected size
Source

fn get_offer_sequence(&self) -> Result<u32>

Retrieves the offer sequence from the current EscrowFinish transaction.

This mandatory field specifies the sequence number of the original EscrowCreate transaction that created the escrow being finished. This creates a unique reference to the specific escrow object, as escrows are identified by the combination of the owner account and the sequence number of the creating transaction.

§Returns

Returns a Result<u32> where:

  • Ok(u32) - The sequence number of the EscrowCreate transaction
  • Err(Error) - If the field cannot be retrieved or has an unexpected size
Source

fn get_condition(&self) -> Result<Option<Condition>>

Retrieves the cryptographic condition from the current EscrowFinish transaction.

This optional field contains the cryptographic condition specified in the original EscrowCreate transaction. If present, a valid Fulfillment must be provided in the Fulfillment field for the escrow to be successfully finished. Conditions enable complex release criteria beyond simple time-based locks.

§Returns

Returns a Result<Option<Condition>> where:

  • Ok(Some(Condition)) - The 32-byte condition hash if the escrow is conditional
  • Ok(None) - If the escrow has no cryptographic condition (time-based only)
  • Err(Error) - If an error occurred during field retrieval
Source

fn get_fulfillment(&self) -> Result<Option<Fulfillment>>

Retrieves the cryptographic fulfillment from the current EscrowFinish transaction.

This optional field contains the cryptographic fulfillment that satisfies the condition specified in the original EscrowCreate transaction. The fulfillment must cryptographically prove that the condition’s requirements have been met. This field is only required when the escrow has an associated condition.

§Returns

Returns a Result<Option<Fulfillment>> where:

  • Ok(Some(Fulfillment)) - The fulfillment data if provided
  • Ok(None) - If no fulfillment is provided (valid for unconditional escrows)
  • Err(Error) - If an error occurred during field retrieval
§Fulfillment Validation

The XRPL network automatically validates that:

  • The fulfillment satisfies the escrow’s condition
  • The fulfillment is properly formatted according to RFC 3814
  • The cryptographic proof is mathematically valid
§Size Limits

Fulfillments are limited to 256 bytes in the current XRPL implementation. This limit ensures network performance while supporting the most practical cryptographic proof scenarios.

Implementors§

Source§

impl EscrowFinishFields for EscrowFinish

Implementation of EscrowFinish-specific transaction fields.

This implementation provides access to fields that are specific to EscrowFinish transactions, such as Owner, OfferSequence, Condition, and Fulfillment. The methods are provided by the EscrowFinishFields trait.