xrpl 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/xrpl-latest-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +453 -51
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +8 -1
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +5 -3
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts +1 -0
- package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/models/ledger/Bridge.d.ts +17 -0
- package/dist/npm/models/ledger/Bridge.d.ts.map +1 -0
- package/dist/npm/models/ledger/Bridge.js +3 -0
- package/dist/npm/models/ledger/Bridge.js.map +1 -0
- package/dist/npm/models/ledger/LedgerEntry.d.ts +4 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +26 -0
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -0
- package/dist/npm/models/ledger/XChainOwnedClaimID.js +3 -0
- package/dist/npm/models/ledger/XChainOwnedClaimID.js.map +1 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +23 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.js +3 -0
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.js.map +1 -0
- package/dist/npm/models/ledger/index.d.ts +5 -1
- package/dist/npm/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.js.map +1 -1
- package/dist/npm/models/methods/accountObjects.d.ts +3 -3
- package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/models/methods/ammInfo.d.ts +4 -3
- package/dist/npm/models/methods/ammInfo.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +17 -0
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/serverInfo.d.ts +6 -0
- package/dist/npm/models/methods/serverInfo.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMBid.d.ts +3 -3
- package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMBid.js.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +11 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js +14 -0
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +18 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +20 -0
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +17 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js +19 -0
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -0
- package/dist/npm/models/transactions/XChainClaim.d.ts +12 -0
- package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainClaim.js +14 -0
- package/dist/npm/models/transactions/XChainClaim.js.map +1 -0
- package/dist/npm/models/transactions/XChainCommit.d.ts +11 -0
- package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainCommit.js +13 -0
- package/dist/npm/models/transactions/XChainCommit.js.map +1 -0
- package/dist/npm/models/transactions/XChainCreateBridge.d.ts +10 -0
- package/dist/npm/models/transactions/XChainCreateBridge.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainCreateBridge.js +12 -0
- package/dist/npm/models/transactions/XChainCreateBridge.js.map +1 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +10 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.js +12 -0
- package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -0
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts +17 -0
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -0
- package/dist/npm/models/transactions/XChainModifyBridge.js +16 -0
- package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -0
- package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountSet.js.map +1 -1
- package/dist/npm/models/transactions/checkCash.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCash.js.map +1 -1
- package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/models/transactions/common.d.ts +6 -1
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +43 -38
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/depositPreauth.d.ts.map +1 -1
- package/dist/npm/models/transactions/depositPreauth.js.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.d.ts +1 -1
- package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.js +5 -3
- package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js +5 -3
- package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +9 -1
- package/dist/npm/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/models/transactions/index.js +3 -1
- package/dist/npm/models/transactions/index.js.map +1 -1
- package/dist/npm/models/transactions/offerCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/models/transactions/payment.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.js.map +1 -1
- package/dist/npm/models/transactions/signerListSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +9 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +32 -0
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.js +4 -0
- package/dist/npm/models/utils/flags.js.map +1 -1
- package/dist/npm/snippets/src/bridgeTransfer.d.ts +2 -0
- package/dist/npm/snippets/src/bridgeTransfer.d.ts.map +1 -0
- package/dist/npm/snippets/src/bridgeTransfer.js +126 -0
- package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -0
- package/dist/npm/src/models/common/index.d.ts +8 -1
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +5 -3
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +1 -0
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/src/models/ledger/Bridge.d.ts +17 -0
- package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/Bridge.js +3 -0
- package/dist/npm/src/models/ledger/Bridge.js.map +1 -0
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +4 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +26 -0
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.js +3 -0
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.js.map +1 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +23 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.js +3 -0
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.js.map +1 -0
- package/dist/npm/src/models/ledger/index.d.ts +5 -1
- package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.js.map +1 -1
- package/dist/npm/src/models/methods/accountObjects.d.ts +3 -3
- package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ammInfo.d.ts +4 -3
- package/dist/npm/src/models/methods/ammInfo.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +17 -0
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/serverInfo.d.ts +6 -0
- package/dist/npm/src/models/methods/serverInfo.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMBid.d.ts +3 -3
- package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMBid.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +11 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +14 -0
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +18 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +20 -0
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +17 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +19 -0
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainClaim.d.ts +12 -0
- package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainClaim.js +14 -0
- package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainCommit.d.ts +11 -0
- package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainCommit.js +13 -0
- package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts +10 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.js +12 -0
- package/dist/npm/src/models/transactions/XChainCreateBridge.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +10 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js +12 -0
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts +17 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.js +16 -0
- package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -0
- package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.js.map +1 -1
- package/dist/npm/src/models/transactions/checkCash.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCash.js.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/common.d.ts +6 -1
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +43 -38
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/depositPreauth.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/depositPreauth.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.d.ts +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.js +5 -3
- package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.js +5 -3
- package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +9 -1
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/index.js +3 -1
- package/dist/npm/src/models/transactions/index.js.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/payment.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/signerListSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +9 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +32 -0
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.js +4 -0
- package/dist/npm/src/models/utils/flags.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/utils/getXChainClaimID.d.ts +3 -0
- package/dist/npm/src/utils/getXChainClaimID.d.ts.map +1 -0
- package/dist/npm/src/utils/getXChainClaimID.js +29 -0
- package/dist/npm/src/utils/getXChainClaimID.js.map +1 -0
- package/dist/npm/src/utils/index.d.ts +2 -1
- package/dist/npm/src/utils/index.d.ts.map +1 -1
- package/dist/npm/src/utils/index.js +3 -1
- package/dist/npm/src/utils/index.js.map +1 -1
- package/dist/npm/src/utils/signPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/src/utils/signPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/src/utils/signPaymentChannelClaim.js +2 -2
- package/dist/npm/src/utils/signPaymentChannelClaim.js.map +1 -1
- package/dist/npm/src/utils/verifyPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/src/utils/verifyPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/src/utils/verifyPaymentChannelClaim.js +2 -2
- package/dist/npm/src/utils/verifyPaymentChannelClaim.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/utils/getXChainClaimID.d.ts +3 -0
- package/dist/npm/utils/getXChainClaimID.d.ts.map +1 -0
- package/dist/npm/utils/getXChainClaimID.js +29 -0
- package/dist/npm/utils/getXChainClaimID.js.map +1 -0
- package/dist/npm/utils/index.d.ts +2 -1
- package/dist/npm/utils/index.d.ts.map +1 -1
- package/dist/npm/utils/index.js +3 -1
- package/dist/npm/utils/index.js.map +1 -1
- package/dist/npm/utils/signPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/utils/signPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/utils/signPaymentChannelClaim.js +2 -2
- package/dist/npm/utils/signPaymentChannelClaim.js.map +1 -1
- package/dist/npm/utils/verifyPaymentChannelClaim.d.ts +1 -1
- package/dist/npm/utils/verifyPaymentChannelClaim.d.ts.map +1 -1
- package/dist/npm/utils/verifyPaymentChannelClaim.js +2 -2
- package/dist/npm/utils/verifyPaymentChannelClaim.js.map +1 -1
- package/package.json +6 -7
- package/src/models/common/index.ts +9 -1
- package/src/models/ledger/AMM.ts +11 -3
- package/src/models/ledger/AccountRoot.ts +6 -0
- package/src/models/ledger/Bridge.ts +84 -0
- package/src/models/ledger/LedgerEntry.ts +6 -0
- package/src/models/ledger/XChainOwnedClaimID.ts +89 -0
- package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +74 -0
- package/src/models/ledger/index.ts +9 -0
- package/src/models/methods/accountObjects.ts +12 -0
- package/src/models/methods/ammInfo.ts +8 -3
- package/src/models/methods/ledgerEntry.ts +25 -0
- package/src/models/methods/serverInfo.ts +21 -0
- package/src/models/transactions/AMMBid.ts +5 -6
- package/src/models/transactions/AMMDeposit.ts +0 -1
- package/src/models/transactions/AMMWithdraw.ts +0 -1
- package/src/models/transactions/XChainAccountCreateCommit.ts +69 -0
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +121 -0
- package/src/models/transactions/XChainAddClaimAttestation.ts +115 -0
- package/src/models/transactions/XChainClaim.ts +77 -0
- package/src/models/transactions/XChainCommit.ts +74 -0
- package/src/models/transactions/XChainCreateBridge.ts +56 -0
- package/src/models/transactions/XChainCreateClaimID.ts +53 -0
- package/src/models/transactions/XChainModifyBridge.ts +77 -0
- package/src/models/transactions/accountSet.ts +0 -2
- package/src/models/transactions/checkCash.ts +0 -1
- package/src/models/transactions/checkCreate.ts +0 -1
- package/src/models/transactions/common.ts +108 -54
- package/src/models/transactions/depositPreauth.ts +0 -1
- package/src/models/transactions/escrowCancel.ts +8 -4
- package/src/models/transactions/escrowCreate.ts +0 -1
- package/src/models/transactions/escrowFinish.ts +8 -4
- package/src/models/transactions/index.ts +13 -1
- package/src/models/transactions/offerCreate.ts +0 -1
- package/src/models/transactions/payment.ts +0 -1
- package/src/models/transactions/paymentChannelClaim.ts +0 -1
- package/src/models/transactions/paymentChannelCreate.ts +0 -1
- package/src/models/transactions/signerListSet.ts +0 -1
- package/src/models/transactions/transaction.ts +67 -1
- package/src/models/utils/flags.ts +4 -0
- package/src/sugar/autofill.ts +0 -2
- package/src/utils/getXChainClaimID.ts +64 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/signPaymentChannelClaim.ts +3 -3
- package/src/utils/verifyPaymentChannelClaim.ts +3 -3
- package/dist/npm/snippets/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,121 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
isAmount,
|
6
|
+
isNumber,
|
7
|
+
isString,
|
8
|
+
isXChainBridge,
|
9
|
+
validateBaseTransaction,
|
10
|
+
validateRequiredField,
|
11
|
+
} from './common'
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The XChainAddAccountCreateAttestation transaction provides an attestation
|
15
|
+
* from a witness server that a {@link XChainAccountCreateCommit} transaction
|
16
|
+
* occurred on the other chain.
|
17
|
+
*
|
18
|
+
* @category Transaction Models
|
19
|
+
*/
|
20
|
+
export interface XChainAddAccountCreateAttestation extends BaseTransaction {
|
21
|
+
TransactionType: 'XChainAddAccountCreateAttestation'
|
22
|
+
|
23
|
+
/**
|
24
|
+
* The amount committed by the {@link XChainAccountCreateCommit} transaction
|
25
|
+
* on the source chain.
|
26
|
+
*/
|
27
|
+
Amount: Amount
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The account that should receive this signer's share of the SignatureReward.
|
31
|
+
*/
|
32
|
+
AttestationRewardAccount: string
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The account on the door account's signer list that is signing the transaction.
|
36
|
+
*/
|
37
|
+
AttestationSignerAccount: string
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The destination account for the funds on the destination chain.
|
41
|
+
*/
|
42
|
+
Destination: string
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The account on the source chain that submitted the {@link XChainAccountCreateCommit}
|
46
|
+
* transaction that triggered the event associated with the attestation.
|
47
|
+
*/
|
48
|
+
OtherChainSource: string
|
49
|
+
|
50
|
+
/**
|
51
|
+
* The public key used to verify the signature.
|
52
|
+
*/
|
53
|
+
PublicKey: string
|
54
|
+
|
55
|
+
/**
|
56
|
+
* The signature attesting to the event on the other chain.
|
57
|
+
*/
|
58
|
+
Signature: string
|
59
|
+
|
60
|
+
/**
|
61
|
+
* The signature reward paid in the {@link XChainAccountCreateCommit} transaction.
|
62
|
+
*/
|
63
|
+
SignatureReward: Amount
|
64
|
+
|
65
|
+
/**
|
66
|
+
* A boolean representing the chain where the event occurred.
|
67
|
+
*/
|
68
|
+
WasLockingChainSend: 0 | 1
|
69
|
+
|
70
|
+
/**
|
71
|
+
* The counter that represents the order that the claims must be processed in.
|
72
|
+
*/
|
73
|
+
XChainAccountCreateCount: number | string
|
74
|
+
|
75
|
+
/**
|
76
|
+
* The bridge associated with the attestation.
|
77
|
+
*/
|
78
|
+
XChainBridge: XChainBridge
|
79
|
+
}
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Verify the form and type of an XChainAddAccountCreateAttestation at runtime.
|
83
|
+
*
|
84
|
+
* @param tx - An XChainAddAccountCreateAttestation Transaction.
|
85
|
+
* @throws When the XChainAddAccountCreateAttestation is malformed.
|
86
|
+
*/
|
87
|
+
export function validateXChainAddAccountCreateAttestation(
|
88
|
+
tx: Record<string, unknown>,
|
89
|
+
): void {
|
90
|
+
validateBaseTransaction(tx)
|
91
|
+
|
92
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
93
|
+
|
94
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isString)
|
95
|
+
|
96
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isString)
|
97
|
+
|
98
|
+
validateRequiredField(tx, 'Destination', isString)
|
99
|
+
|
100
|
+
validateRequiredField(tx, 'OtherChainSource', isString)
|
101
|
+
|
102
|
+
validateRequiredField(tx, 'PublicKey', isString)
|
103
|
+
|
104
|
+
validateRequiredField(tx, 'Signature', isString)
|
105
|
+
|
106
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
107
|
+
|
108
|
+
validateRequiredField(
|
109
|
+
tx,
|
110
|
+
'WasLockingChainSend',
|
111
|
+
(inp) => inp === 0 || inp === 1,
|
112
|
+
)
|
113
|
+
|
114
|
+
validateRequiredField(
|
115
|
+
tx,
|
116
|
+
'XChainAccountCreateCount',
|
117
|
+
(inp) => isNumber(inp) || isString(inp),
|
118
|
+
)
|
119
|
+
|
120
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
121
|
+
}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
isAmount,
|
6
|
+
isNumber,
|
7
|
+
isString,
|
8
|
+
isXChainBridge,
|
9
|
+
validateBaseTransaction,
|
10
|
+
validateOptionalField,
|
11
|
+
validateRequiredField,
|
12
|
+
} from './common'
|
13
|
+
|
14
|
+
/**
|
15
|
+
* The XChainAddClaimAttestation transaction provides proof from a witness server,
|
16
|
+
* attesting to an {@link XChainCommit} transaction.
|
17
|
+
*
|
18
|
+
* @category Transaction Models
|
19
|
+
*/
|
20
|
+
export interface XChainAddClaimAttestation extends BaseTransaction {
|
21
|
+
TransactionType: 'XChainAddClaimAttestation'
|
22
|
+
|
23
|
+
/**
|
24
|
+
* The amount committed by the {@link XChainCommit} transaction on the source chain.
|
25
|
+
*/
|
26
|
+
Amount: Amount
|
27
|
+
|
28
|
+
/**
|
29
|
+
* The account that should receive this signer's share of the SignatureReward.
|
30
|
+
*/
|
31
|
+
AttestationRewardAccount: string
|
32
|
+
|
33
|
+
/**
|
34
|
+
* The account on the door account's signer list that is signing the transaction.
|
35
|
+
*/
|
36
|
+
AttestationSignerAccount: string
|
37
|
+
|
38
|
+
/**
|
39
|
+
* The destination account for the funds on the destination chain (taken from
|
40
|
+
* the {@link XChainCommit} transaction).
|
41
|
+
*/
|
42
|
+
Destination?: string
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The account on the source chain that submitted the {@link XChainCommit}
|
46
|
+
* transaction that triggered the event associated with the attestation.
|
47
|
+
*/
|
48
|
+
OtherChainSource: string
|
49
|
+
|
50
|
+
/**
|
51
|
+
* The public key used to verify the attestation signature.
|
52
|
+
*/
|
53
|
+
PublicKey: string
|
54
|
+
|
55
|
+
/**
|
56
|
+
* The signature attesting to the event on the other chain.
|
57
|
+
*/
|
58
|
+
Signature: string
|
59
|
+
|
60
|
+
/**
|
61
|
+
* A boolean representing the chain where the event occurred.
|
62
|
+
*/
|
63
|
+
WasLockingChainSend: 0 | 1
|
64
|
+
|
65
|
+
/**
|
66
|
+
* The bridge to use to transfer funds.
|
67
|
+
*/
|
68
|
+
XChainBridge: XChainBridge
|
69
|
+
|
70
|
+
/**
|
71
|
+
* The XChainClaimID associated with the transfer, which was included in the
|
72
|
+
* {@link XChainCommit} transaction.
|
73
|
+
*/
|
74
|
+
XChainClaimID: number | string
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Verify the form and type of an XChainAddClaimAttestation at runtime.
|
79
|
+
*
|
80
|
+
* @param tx - An XChainAddClaimAttestation Transaction.
|
81
|
+
* @throws When the XChainAddClaimAttestation is malformed.
|
82
|
+
*/
|
83
|
+
export function validateXChainAddClaimAttestation(
|
84
|
+
tx: Record<string, unknown>,
|
85
|
+
): void {
|
86
|
+
validateBaseTransaction(tx)
|
87
|
+
|
88
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
89
|
+
|
90
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isString)
|
91
|
+
|
92
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isString)
|
93
|
+
|
94
|
+
validateOptionalField(tx, 'Destination', isString)
|
95
|
+
|
96
|
+
validateRequiredField(tx, 'OtherChainSource', isString)
|
97
|
+
|
98
|
+
validateRequiredField(tx, 'PublicKey', isString)
|
99
|
+
|
100
|
+
validateRequiredField(tx, 'Signature', isString)
|
101
|
+
|
102
|
+
validateRequiredField(
|
103
|
+
tx,
|
104
|
+
'WasLockingChainSend',
|
105
|
+
(inp) => inp === 0 || inp === 1,
|
106
|
+
)
|
107
|
+
|
108
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
109
|
+
|
110
|
+
validateRequiredField(
|
111
|
+
tx,
|
112
|
+
'XChainClaimID',
|
113
|
+
(inp) => isNumber(inp) || isString(inp),
|
114
|
+
)
|
115
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
isAmount,
|
6
|
+
isNumber,
|
7
|
+
isString,
|
8
|
+
isXChainBridge,
|
9
|
+
validateBaseTransaction,
|
10
|
+
validateOptionalField,
|
11
|
+
validateRequiredField,
|
12
|
+
} from './common'
|
13
|
+
|
14
|
+
/**
|
15
|
+
* The XChainClaim transaction completes a cross-chain transfer of value. It
|
16
|
+
* allows a user to claim the value on the destination chain - the equivalent
|
17
|
+
* of the value locked on the source chain.
|
18
|
+
*
|
19
|
+
* @category Transaction Models
|
20
|
+
*/
|
21
|
+
export interface XChainClaim extends BaseTransaction {
|
22
|
+
TransactionType: 'XChainClaim'
|
23
|
+
|
24
|
+
/**
|
25
|
+
* The bridge to use for the transfer.
|
26
|
+
*/
|
27
|
+
XChainBridge: XChainBridge
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The unique integer ID for the cross-chain transfer that was referenced in the
|
31
|
+
* corresponding {@link XChainCommit} transaction.
|
32
|
+
*/
|
33
|
+
XChainClaimID: number | string
|
34
|
+
|
35
|
+
/**
|
36
|
+
* The destination account on the destination chain. It must exist or the
|
37
|
+
* transaction will fail. However, if the transaction fails in this case, the
|
38
|
+
* sequence number and collected signatures won't be destroyed, and the
|
39
|
+
* transaction can be rerun with a different destination.
|
40
|
+
*/
|
41
|
+
Destination: string
|
42
|
+
|
43
|
+
/**
|
44
|
+
* An integer destination tag.
|
45
|
+
*/
|
46
|
+
DestinationTag?: number
|
47
|
+
|
48
|
+
/**
|
49
|
+
* The amount to claim on the destination chain. This must match the amount
|
50
|
+
* attested to on the attestations associated with this XChainClaimID.
|
51
|
+
*/
|
52
|
+
Amount: Amount
|
53
|
+
}
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Verify the form and type of an XChainClaim at runtime.
|
57
|
+
*
|
58
|
+
* @param tx - An XChainClaim Transaction.
|
59
|
+
* @throws When the XChainClaim is malformed.
|
60
|
+
*/
|
61
|
+
export function validateXChainClaim(tx: Record<string, unknown>): void {
|
62
|
+
validateBaseTransaction(tx)
|
63
|
+
|
64
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
65
|
+
|
66
|
+
validateRequiredField(
|
67
|
+
tx,
|
68
|
+
'XChainClaimID',
|
69
|
+
(inp) => isNumber(inp) || isString(inp),
|
70
|
+
)
|
71
|
+
|
72
|
+
validateRequiredField(tx, 'Destination', isString)
|
73
|
+
|
74
|
+
validateOptionalField(tx, 'DestinationTag', isNumber)
|
75
|
+
|
76
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
77
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
isAmount,
|
6
|
+
isNumber,
|
7
|
+
isString,
|
8
|
+
isXChainBridge,
|
9
|
+
validateBaseTransaction,
|
10
|
+
validateOptionalField,
|
11
|
+
validateRequiredField,
|
12
|
+
} from './common'
|
13
|
+
|
14
|
+
/**
|
15
|
+
* The XChainCommit is the second step in a cross-chain transfer. It puts assets
|
16
|
+
* into trust on the locking chain so that they can be wrapped on the issuing
|
17
|
+
* chain, or burns wrapped assets on the issuing chain so that they can be returned
|
18
|
+
* on the locking chain.
|
19
|
+
*
|
20
|
+
* @category Transaction Models
|
21
|
+
*/
|
22
|
+
export interface XChainCommit extends BaseTransaction {
|
23
|
+
TransactionType: 'XChainCommit'
|
24
|
+
|
25
|
+
/**
|
26
|
+
* The bridge to use to transfer funds.
|
27
|
+
*/
|
28
|
+
XChainBridge: XChainBridge
|
29
|
+
|
30
|
+
/**
|
31
|
+
* The unique integer ID for a cross-chain transfer. This must be acquired on
|
32
|
+
* the destination chain (via a {@link XChainCreateClaimID} transaction) and
|
33
|
+
* checked from a validated ledger before submitting this transaction. If an
|
34
|
+
* incorrect sequence number is specified, the funds will be lost.
|
35
|
+
*/
|
36
|
+
XChainClaimID: number | string
|
37
|
+
|
38
|
+
/**
|
39
|
+
* The destination account on the destination chain. If this is not specified,
|
40
|
+
* the account that submitted the {@link XChainCreateClaimID} transaction on the
|
41
|
+
* destination chain will need to submit a {@link XChainClaim} transaction to
|
42
|
+
* claim the funds.
|
43
|
+
*/
|
44
|
+
OtherChainDestination?: string
|
45
|
+
|
46
|
+
/**
|
47
|
+
* The asset to commit, and the quantity. This must match the door account's
|
48
|
+
* LockingChainIssue (if on the locking chain) or the door account's
|
49
|
+
* IssuingChainIssue (if on the issuing chain).
|
50
|
+
*/
|
51
|
+
Amount: Amount
|
52
|
+
}
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Verify the form and type of an XChainCommit at runtime.
|
56
|
+
*
|
57
|
+
* @param tx - An XChainCommit Transaction.
|
58
|
+
* @throws When the XChainCommit is malformed.
|
59
|
+
*/
|
60
|
+
export function validateXChainCommit(tx: Record<string, unknown>): void {
|
61
|
+
validateBaseTransaction(tx)
|
62
|
+
|
63
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
64
|
+
|
65
|
+
validateRequiredField(
|
66
|
+
tx,
|
67
|
+
'XChainClaimID',
|
68
|
+
(inp) => isNumber(inp) || isString(inp),
|
69
|
+
)
|
70
|
+
|
71
|
+
validateOptionalField(tx, 'OtherChainDestination', isString)
|
72
|
+
|
73
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
74
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
isAmount,
|
6
|
+
isXChainBridge,
|
7
|
+
validateBaseTransaction,
|
8
|
+
validateOptionalField,
|
9
|
+
validateRequiredField,
|
10
|
+
} from './common'
|
11
|
+
|
12
|
+
/**
|
13
|
+
* The XChainCreateBridge transaction creates a new {@link Bridge} ledger object
|
14
|
+
* and defines a new cross-chain bridge entrance on the chain that the transaction
|
15
|
+
* is submitted on. It includes information about door accounts and assets for the
|
16
|
+
* bridge.
|
17
|
+
*
|
18
|
+
* @category Transaction Models
|
19
|
+
*/
|
20
|
+
export interface XChainCreateBridge extends BaseTransaction {
|
21
|
+
TransactionType: 'XChainCreateBridge'
|
22
|
+
|
23
|
+
/**
|
24
|
+
* The bridge (door accounts and assets) to create.
|
25
|
+
*/
|
26
|
+
XChainBridge: XChainBridge
|
27
|
+
|
28
|
+
/**
|
29
|
+
* The total amount to pay the witness servers for their signatures. This amount
|
30
|
+
* will be split among the signers.
|
31
|
+
*/
|
32
|
+
SignatureReward: Amount
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The minimum amount, in XRP, required for a {@link XChainAccountCreateCommit}
|
36
|
+
* transaction. If this isn't present, the {@link XChainAccountCreateCommit}
|
37
|
+
* transaction will fail. This field can only be present on XRP-XRP bridges.
|
38
|
+
*/
|
39
|
+
MinAccountCreateAmount?: Amount
|
40
|
+
}
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Verify the form and type of an XChainCreateBridge at runtime.
|
44
|
+
*
|
45
|
+
* @param tx - An XChainCreateBridge Transaction.
|
46
|
+
* @throws When the XChainCreateBridge is malformed.
|
47
|
+
*/
|
48
|
+
export function validateXChainCreateBridge(tx: Record<string, unknown>): void {
|
49
|
+
validateBaseTransaction(tx)
|
50
|
+
|
51
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
52
|
+
|
53
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
54
|
+
|
55
|
+
validateOptionalField(tx, 'MinAccountCreateAmount', isAmount)
|
56
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
isAmount,
|
6
|
+
isString,
|
7
|
+
isXChainBridge,
|
8
|
+
validateBaseTransaction,
|
9
|
+
validateRequiredField,
|
10
|
+
} from './common'
|
11
|
+
|
12
|
+
/**
|
13
|
+
* The XChainCreateClaimID transaction creates a new cross-chain claim ID that is
|
14
|
+
* used for a cross-chain transfer. A cross-chain claim ID represents one
|
15
|
+
* cross-chain transfer of value.
|
16
|
+
*
|
17
|
+
* @category Transaction Models
|
18
|
+
*/
|
19
|
+
export interface XChainCreateClaimID extends BaseTransaction {
|
20
|
+
TransactionType: 'XChainCreateClaimID'
|
21
|
+
|
22
|
+
/**
|
23
|
+
* The bridge to create the claim ID for.
|
24
|
+
*/
|
25
|
+
XChainBridge: XChainBridge
|
26
|
+
|
27
|
+
/**
|
28
|
+
* The amount, in XRP, to reward the witness servers for providing signatures.
|
29
|
+
* This must match the amount on the {@link Bridge} ledger object.
|
30
|
+
*/
|
31
|
+
SignatureReward: Amount
|
32
|
+
|
33
|
+
/**
|
34
|
+
* The account that must send the {@link XChainCommit} transaction on the source chain.
|
35
|
+
*/
|
36
|
+
OtherChainSource: string
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Verify the form and type of an XChainCreateClaimID at runtime.
|
41
|
+
*
|
42
|
+
* @param tx - An XChainCreateClaimID Transaction.
|
43
|
+
* @throws When the XChainCreateClaimID is malformed.
|
44
|
+
*/
|
45
|
+
export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
|
46
|
+
validateBaseTransaction(tx)
|
47
|
+
|
48
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
49
|
+
|
50
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
51
|
+
|
52
|
+
validateRequiredField(tx, 'OtherChainSource', isString)
|
53
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { Amount, XChainBridge } from '../common'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
GlobalFlags,
|
6
|
+
isAmount,
|
7
|
+
isXChainBridge,
|
8
|
+
validateBaseTransaction,
|
9
|
+
validateOptionalField,
|
10
|
+
validateRequiredField,
|
11
|
+
} from './common'
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Enum representing values of {@link XChainModifyBridge} transaction flags.
|
15
|
+
*
|
16
|
+
* @category Transaction Flags
|
17
|
+
*/
|
18
|
+
export enum XChainModifyBridgeFlags {
|
19
|
+
/** Clears the MinAccountCreateAmount of the bridge. */
|
20
|
+
tfClearAccountCreateAmount = 0x00010000,
|
21
|
+
}
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Map of flags to boolean values representing {@link XChainModifyBridge} transaction
|
25
|
+
* flags.
|
26
|
+
*
|
27
|
+
* @category Transaction Flags
|
28
|
+
*/
|
29
|
+
export interface XChainModifyBridgeFlagsInterface extends GlobalFlags {
|
30
|
+
/** Clears the MinAccountCreateAmount of the bridge. */
|
31
|
+
tfClearAccountCreateAmount?: boolean
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The XChainModifyBridge transaction allows bridge managers to modify the parameters
|
36
|
+
* of the bridge.
|
37
|
+
*
|
38
|
+
* @category Transaction Models
|
39
|
+
*/
|
40
|
+
export interface XChainModifyBridge extends BaseTransaction {
|
41
|
+
TransactionType: 'XChainModifyBridge'
|
42
|
+
|
43
|
+
/**
|
44
|
+
* The bridge to modify.
|
45
|
+
*/
|
46
|
+
XChainBridge: XChainBridge
|
47
|
+
|
48
|
+
/**
|
49
|
+
* The signature reward split between the witnesses for submitting attestations.
|
50
|
+
*/
|
51
|
+
SignatureReward?: Amount
|
52
|
+
|
53
|
+
/**
|
54
|
+
* The minimum amount, in XRP, required for a {@link XChainAccountCreateCommit}
|
55
|
+
* transaction. If this is not present, the {@link XChainAccountCreateCommit}
|
56
|
+
* transaction will fail. This field can only be present on XRP-XRP bridges.
|
57
|
+
*/
|
58
|
+
MinAccountCreateAmount?: Amount
|
59
|
+
|
60
|
+
Flags?: number | XChainModifyBridgeFlagsInterface
|
61
|
+
}
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Verify the form and type of an XChainModifyBridge at runtime.
|
65
|
+
*
|
66
|
+
* @param tx - An XChainModifyBridge Transaction.
|
67
|
+
* @throws When the XChainModifyBridge is malformed.
|
68
|
+
*/
|
69
|
+
export function validateXChainModifyBridge(tx: Record<string, unknown>): void {
|
70
|
+
validateBaseTransaction(tx)
|
71
|
+
|
72
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
73
|
+
|
74
|
+
validateOptionalField(tx, 'SignatureReward', isAmount)
|
75
|
+
|
76
|
+
validateOptionalField(tx, 'MinAccountCreateAmount', isAmount)
|
77
|
+
}
|