Interface BridgeObject

All Superinterfaces:
LedgerObject
All Known Implementing Classes:
ImmutableBridgeObject

@Beta @Immutable public interface BridgeObject extends LedgerObject
Represents a single cross-chain bridge that connects the XRP Ledger with another blockchain, such as its sidechain, and enables value in the form of XRP and other tokens (IOUs) to move efficiently between the two blockchains.

This interface will be marked Beta until the featureXChainBridge amendment is enabled on mainnet. Its API is subject to change.

  • Method Details

    • builder

      Construct a BridgeObject builder.
      Returns:
      An ImmutableBridgeObject.Builder.
    • ledgerEntryType

      @Derived default LedgerObject.LedgerEntryType ledgerEntryType()
      The type of ledger object, which will always be "Bridge" in this case.
      Returns:
      Always returns LedgerObject.LedgerEntryType.BRIDGE.
    • flags

      @Derived default Flags flags()
      A bit-map of boolean flags. No flags are defined for BridgeObject, so this value is always 0.
      Returns:
      Always Flags.UNSET.
    • account

      Address account()
      The account that owns this object.
      Returns:
      An Address.
    • minAccountCreateAmount

      Optional<XrpCurrencyAmount> minAccountCreateAmount()
      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.
      Returns:
      An optionally-present XrpCurrencyAmount.
    • signatureReward

      XrpCurrencyAmount signatureReward()
      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.
      Returns:
      An XrpCurrencyAmount.
    • xChainBridge

      XChainBridge xChainBridge()
      The door accounts and assets of the bridge this object correlates to.
      Returns:
      An XChainBridge.
    • xChainClaimId

      XChainClaimId xChainClaimId()
      The value of the next XChainClaimID to be created.
      Returns:
      An XChainClaimId.
    • xChainAccountCreateCount

      XChainCount xChainAccountCreateCount()
      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.
      Returns:
      An XChainCount.
    • xChainAccountClaimCount

      XChainCount xChainAccountClaimCount()
      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.
      Returns:
      An XChainCount.
    • ownerNode

      String ownerNode()
      A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.

      Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.

      Returns:
      A String containing the owner node hint.
    • previousTransactionId

      Hash256 previousTransactionId()
      The identifying hash of the transaction that most recently modified this object.
      Returns:
      A Hash256 containing the previous transaction hash.
    • previousTransactionLedgerSequence

      com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence()
      The index of the ledger that contains the transaction that most recently modified this object.
      Returns:
      An UnsignedInteger representing the previous transaction ledger sequence.
    • index

      Hash256 index()
      The unique ID of the BridgeObject.
      Returns:
      A Hash256 containing the ID.