Skip to main content

BridgeFields

Trait BridgeFields 

Source
pub trait BridgeFields: LedgerObjectCommonFields {
    // Provided methods
    fn account(&self) -> Result<AccountID> { ... }
    fn signature_reward(&self) -> Result<Amount> { ... }
    fn min_account_create_amount(&self) -> Result<Option<Amount>> { ... }
    fn xchain_bridge(&self) -> Result<[u8; 512]> { ... }
    fn xchain_claim_id(&self) -> Result<u64> { ... }
    fn xchain_account_create_count(&self) -> Result<u64> { ... }
    fn xchain_account_claim_count(&self) -> Result<u64> { ... }
    fn owner_node(&self) -> Result<u64> { ... }
    fn previous_txn_id(&self) -> Result<Hash256> { ... }
    fn previous_txn_lgr_seq(&self) -> Result<u32> { ... }
}
Expand description

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

Provided Methods§

Source

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

The account that submitted the XChainCreateBridge transaction on the blockchain.

Source

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

The total amount, in XRP, to be rewarded for providing a signature for cross-chain transfer or for signing for the cross-chain reward. This amount will be split among the signers.

Source

fn min_account_create_amount(&self) -> Result<Option<Amount>>

The minimum amount, in XRP, required for an XChainAccountCreateCommit transaction. If this isn’t present, the XChainAccountCreateCommit transaction will fail. This field can only be present on XRP-XRP bridges.

Source

fn xchain_bridge(&self) -> Result<[u8; 512]>

The door accounts and assets of the bridge this object correlates to. Raw bytes; XCHAIN_BRIDGE is not yet typed in Rust.

Source

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

The value of the next XChainClaimID to be created.

Source

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

A counter used to order the execution of account create transactions. It is incremented every time a successful XChainAccountCreateCommit transaction is run for the source chain.

Source

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

A counter used to order the execution of account create transactions. It is incremented every time a XChainAccountCreateCommit transaction is “claimed” on the destination chain. When the “claim” transaction is run on the destination chain, the XChainAccountClaimCount must match the value that the XChainAccountCreateCount had at the time the XChainAccountClaimCount was run on the source chain. This orders the claims so that they run in the same order that the XChainAccountCreateCommit transactions ran on the source chain, to prevent transaction replay.

Source

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

The OwnerNode field (Required).

Source

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

The PreviousTxnID field (Required).

Source

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

The PreviousTxnLgrSeq field (Required).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§