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
TransactionCommonFieldsfor 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§
Sourcefn get_id(&self) -> Result<Hash256>
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 identifierErr(Error)- If the field cannot be retrieved or has an unexpected size
Sourcefn get_owner(&self) -> Result<AccountID>
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 ownerErr(Error)- If the field cannot be retrieved or has an unexpected size
Sourcefn get_offer_sequence(&self) -> Result<u32>
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 transactionErr(Error)- If the field cannot be retrieved or has an unexpected size
Sourcefn get_condition(&self) -> Result<Option<Condition>>
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 conditionalOk(None)- If the escrow has no cryptographic condition (time-based only)Err(Error)- If an error occurred during field retrieval
Sourcefn get_fulfillment(&self) -> Result<Option<Fulfillment>>
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 providedOk(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§
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.