Bridge

Attention

Cross-chain bridges functionality is part of the proposed XLS-38d extension (Not Enabled) to the XRP Ledger protocol. There isn't an official amendment yet. Until there is an amendment, the details documented on these pages are subject to change frequently. [Source]

Please use this form to report bugs, provide feedback, or share network issues you experience.

[Source]

The Bridge object 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.

Example Bridge JSON

{
  "Account": "r3nCVTbZGGYoWvZ58BcxDmiMUU7ChMa1eC",
  "Flags": 0,
  "LedgerEntryType": "Bridge",
  "MinAccountCreateAmount": "2000000000",
  "OwnerNode": "0",
  "PreviousTxnID": "67A8A1B36C1B97BE3AAB6B19CB3A3069034877DE917FD1A71919EAE7548E5636",
  "PreviousTxnLgrSeq": 102,
  "SignatureReward": "204",
  "XChainAccountClaimCount": "0",
  "XChainAccountCreateCount": "0",
  "XChainBridge": {
    "IssuingChainDoor": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
    "IssuingChainIssue": {
      "currency": "XRP"
    },
    "LockingChainDoor": "r3nCVTbZGGYoWvZ58BcxDmiMUU7ChMa1eC",
    "LockingChainIssue": {
      "currency": "XRP"
    }
  },
  "XChainClaimID": "1",
  "index": "9F2C9E23343852036AFD323025A8506018ABF9D4DBAA746D61BF1CFB5C297D10"
}

Bridge Fields

FieldJSON TypeInternal TypeRequired?Description
AccountstringACCOUNTYesThe account that owns this object.
LedgerIndexstringHASH256YesThe ledger index is a hash of a unique prefix for a bridge object, and the fields in XChainBridge.
MinAccountCreateAmountCurrency AmountAMOUNTNoThe 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.
SignatureRewardCurrency AmountAMOUNTYesThe 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.
XChainAccountClaimCountnumberUINT64YesA 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.
XChainAccountCreateCountnumberUINT64YesA 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.
XChainBridgeXChainBridgeXCHAIN_BRIDGEYesThe door accounts and assets of the bridge this object correlates to.
XChainClaimIDnumberUINT64YesThe value of the next XChainClaimID to be created.

XChainBridge Fields

FieldJSON TypeInternal TypeRequired?Description
IssuingChainDoorstringACCOUNTYesThe door account on the issuing chain. For an XRP-XRP bridge, this must be the genesis account (the account that is created when the network is first started, which contains all of the XRP).
IssuingChainIssueIssueISSUEYesThe asset that is minted and burned on the issuing chain. For an IOU-IOU bridge, the issuer of the asset must be the door account on the issuing chain, to avoid supply issues.
LockingChainDoorstringACCOUNTYesThe door account on the locking chain.
LockingChainIssueIssueISSUEYesThe asset that is locked and unlocked on the locking chain.

XCHAIN_BRIDGE Field Type

XCHAIN_BRIDGE is a new field type introduced by XLS-38d.

Type NameType CodeBit LengthLength-prefixed?Description
XCHAIN_BRIDGE25VariableNoA bridge between two blockchains, identified by the door accounts and issued assets on the locking chain and issuing chain. XCHAIN_BRIDGE is serialized in this order: locking chain door, locking chain issue, issuing chain door, issuing chain issue.