XChainCommit

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 XChainCommit is the second step in a cross-chain transfer. It puts assets into trust on the locking chain so that they can be wrapped on the issuing chain, or burns wrapped assets on the issuing chain so that they can be returned on the locking chain.

Example XChainCommit JSON

{
  "Account": "rMTi57fNy2UkUb4RcdoUeJm7gjxVQvxzUo",
  "TransactionType": "XChainCommit",
  "XChainBridge": {
    "LockingChainDoor": "rMAXACCrp3Y8PpswXcg3bKggHX76V3F8M4",
    "LockingChainIssue": {
      "currency": "XRP"
    },
    "IssuingChainDoor": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
    "IssuingChainIssue": {
      "currency": "XRP"
    }
  },
  "Amount": "10000",
  "XChainClaimID": "13f"
}

XChainCommit Fields

FieldJSON TypeInternal TypeRequired?Description
AmountCurrency AmountAMOUNTYesThe asset to commit, and the quantity. This must match the door account's LockingChainIssue (if on the locking chain) or the door account's IssuingChainIssue (if on the issuing chain).
OtherChainDestinationstringACCOUNTNoThe destination account on the destination chain. If this is not specified, the account that submitted the XChainCreateClaimID transaction on the destination chain will need to submit a XChainClaim transaction to claim the funds.
XChainBridgeXChainBridgeXCHAIN_BRIDGEYesThe bridge to use to transfer funds.
XChainClaimIDstringUINT64YesThe unique integer ID for a cross-chain transfer. This must be acquired on the destination chain (via a XChainCreateClaimID transaction) and checked from a validated ledger before submitting this transaction. If an incorrect sequence number is specified, the funds will be lost.

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.