XChainCreateBridge

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 XChainCreateBridge transaction creates a new Bridge ledger object and defines a new cross-chain bridge entrance on the chain that the transaction is submitted on. It includes information about door accounts and assets for the bridge.

The transaction must be submitted first by the locking chain door account. To set up a valid bridge, door accounts on both chains must submit this transaction, in addition to setting up witness servers.

The complete production-grade setup would also include a SignerListSet transaction on the two door accounts for the witnesses’ signing keys, as well as disabling the door accounts’ master key. This ensures that the witness servers are truly in control of the funds.

Note: Each door account can only have one bridge. This prevents the creation of duplicate bridges for the same asset, which can cause asset imbalances on either chain.

Example XChainCreateBridge JSON

{
  "TransactionType": "XChainCreateBridge",
  "Account": "rhWQzvdmhf5vFS35vtKUSUwNZHGT53qQsg",
  "XChainBridge": {
    "LockingChainDoor": "rhWQzvdmhf5vFS35vtKUSUwNZHGT53qQsg",
    "LockingChainIssue": {
      "currency": "XRP"
    },
    "IssuingChainDoor": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
    "IssuingChainIssue": {
      "currency": "XRP"
    }
  },
  "SignatureReward": 200,
  "MinAccountCreateAmount": 1000000
}

XChainCreateBridge Fields

FieldJSON TypeInternal TypeRequired?Description
MinAccountCreateAmountCurrency AmountAMOUNTNoThe minimum amount, in XRP, required for a 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 to pay the witness servers for their signatures. This amount will be split among the signers.
XChainBridgeXChainBridgeXCHAIN_BRIDGEYesThe bridge (door accounts and assets) to create.

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.