Skip to main content

PayChannelFields

Trait PayChannelFields 

Source
pub trait PayChannelFields: LedgerObjectCommonFields {
Show 15 methods // Provided methods fn account(&self) -> Result<AccountID> { ... } fn destination(&self) -> Result<AccountID> { ... } fn sequence(&self) -> Result<Option<u32>> { ... } fn amount(&self) -> Result<Amount> { ... } fn balance(&self) -> Result<Amount> { ... } fn public_key(&self) -> Result<PublicKeyBlob> { ... } fn settle_delay(&self) -> Result<u32> { ... } fn expiration(&self) -> Result<Option<u32>> { ... } fn cancel_after(&self) -> Result<Option<u32>> { ... } fn source_tag(&self) -> Result<Option<u32>> { ... } fn destination_tag(&self) -> Result<Option<u32>> { ... } fn owner_node(&self) -> Result<u64> { ... } fn previous_txn_id(&self) -> Result<Hash256> { ... } fn previous_txn_lgr_seq(&self) -> Result<u32> { ... } fn destination_node(&self) -> Result<Option<u64>> { ... }
}
Expand description

Trait providing access to fields specific to PayChannel objects in any ledger.

Provided Methods§

Source

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

The source address that owns this payment channel. This comes from the sending address of the transaction that created the channel.

Source

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

The destination address for this payment channel. While the payment channel is open, this address is the only one that can receive XRP from the channel. This comes from the Destination field of the transaction that created the channel.

Source

fn sequence(&self) -> Result<Option<u32>>

The Sequence field (Optional).

Source

fn amount(&self) -> Result<Amount>

Total XRP, in drops, that have been allocated to this channel. This includes amounts that have been paid to the destination address. This is initially set by the transaction that created the channel and can be increased if the source address sends a PaymentChannelFund transaction.

Source

fn balance(&self) -> Result<Amount>

Total XRP, in drops already paid out by the channel. The difference between this value and the Amount field is how much can still be paid to the destination address with PaymentChannelClaim transactions. If the channel closes, the remaining difference is returned to the source address.

Source

fn public_key(&self) -> Result<PublicKeyBlob>

Public key, in hexadecimal, of the key pair that can be used to sign claims against this channel. This can be any valid secp256k1 or Ed25519 public key. This is set by the transaction that created the channel and must match the public key used in claims against the channel. The channel source address can also send XRP from this channel to the destination without signed claims.

Source

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

Number of seconds the source address must wait to close the channel if it still has any XRP in it. Smaller values mean that the destination address has less time to redeem any outstanding claims after the source address requests to close the channel. Can be any value that fits in a 32-bit unsigned integer (0 to 2^32-1). This is set by the transaction that creates the channel.

Source

fn expiration(&self) -> Result<Option<u32>>

The mutable expiration time for this payment channel, in seconds since the Ripple Epoch. The channel is expired if this value is present and smaller than the previous ledger’s close_time field. See Channel Expiration for more details.

Source

fn cancel_after(&self) -> Result<Option<u32>>

The immutable expiration time for this payment channel, in seconds since the Ripple Epoch. This channel is expired if this value is present and smaller than the previous ledger’s close_time field. This is optionally set by the transaction that created the channel, and cannot be changed.

Source

fn source_tag(&self) -> Result<Option<u32>>

An arbitrary tag to further specify the source for this payment channel, such as a hosted recipient at the owner’s address.

Source

fn destination_tag(&self) -> Result<Option<u32>>

An arbitrary tag to further specify the destination for this payment channel, such as a hosted recipient at the destination address.

Source

fn owner_node(&self) -> Result<u64>

A hint indicating which page of the source address’s owner directory links to this entry, in case the directory consists of multiple pages.

Source

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

The identifying hash of the transaction that most recently modified this entry.

Source

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

The index of the ledger that contains the transaction that most recently modified this entry.

Source

fn destination_node(&self) -> Result<Option<u64>>

A hint indicating which page of the destination’s owner directory links to this entry, in case the directory consists of multiple pages. Omitted on payment channels created before enabling the fixPayChanRecipientOwnerDir amendment.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§