Package org.xrpl.xrpl4j.model.ledger
Interface BridgeObject
- All Superinterfaces:
LedgerObject
- All Known Implementing Classes:
ImmutableBridgeObject
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account that owns this object.builder()Construct aBridgeObjectbuilder.default Flagsflags()A bit-map of boolean flags.index()The unique ID of theBridgeObject.default LedgerObject.LedgerEntryTypeThe type of ledger object, which will always be "Bridge" in this case.The minimum amount, in XRP, required for an XChainAccountCreateCommit transaction.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.The identifying hash of the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.The total amount, in XRP, to be rewarded for providing a signature for cross-chain transfer or for signing for the cross-chain reward.A counter used to order the execution of account create transactions.A counter used to order the execution of account create transactions.The door accounts and assets of the bridge this object correlates to.The value of the next XChainClaimID to be created.
-
Method Details
-
builder
Construct aBridgeObjectbuilder.- Returns:
- An
ImmutableBridgeObject.Builder.
-
ledgerEntryType
The type of ledger object, which will always be "Bridge" in this case.- Returns:
- Always returns
LedgerObject.LedgerEntryType.BRIDGE.
-
flags
A bit-map of boolean flags. No flags are defined forBridgeObject, 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, theXChainAccountCreateCommittransaction 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 successfulXChainAccountCreateCommittransaction 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 aXChainAccountCreateCommittransaction is "claimed" on the destination chain. When the "claim" transaction is run on the destination chain, thexChainAccountClaimCount()must match the value that thexChainAccountCreateCount()had at the time thexChainAccountClaimCount()was run on the source chain. This orders the claims so that they run in the same order that theXChainAccountCreateCommittransactions 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
Stringcontaining the owner node hint.
-
previousTransactionId
Hash256 previousTransactionId()The identifying hash of the transaction that most recently modified this object.- Returns:
- A
Hash256containing 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
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
index
Hash256 index()The unique ID of theBridgeObject.- Returns:
- A
Hash256containing the ID.
-