xrpl 2.12.0-beta.0 → 2.13.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/README.md +114 -5
- package/build/xrpl-latest-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +7248 -7657
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +0 -3
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/client/partialPayment.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +2 -1
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +5 -5
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts +3 -4
- 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/Amendments.d.ts +2 -2
- package/dist/npm/models/ledger/Amendments.d.ts.map +1 -1
- package/dist/npm/models/ledger/BaseLedgerEntry.d.ts +9 -1
- package/dist/npm/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/Bridge.d.ts +2 -4
- package/dist/npm/models/ledger/Bridge.d.ts.map +1 -1
- package/dist/npm/models/ledger/Check.d.ts +2 -2
- package/dist/npm/models/ledger/Check.d.ts.map +1 -1
- package/dist/npm/models/ledger/DepositPreauth.d.ts +2 -4
- package/dist/npm/models/ledger/DepositPreauth.d.ts.map +1 -1
- package/dist/npm/models/ledger/DirectoryNode.d.ts +2 -2
- package/dist/npm/models/ledger/DirectoryNode.d.ts.map +1 -1
- package/dist/npm/models/ledger/Escrow.d.ts +2 -4
- package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/models/ledger/FeeSettings.d.ts +2 -2
- package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/models/ledger/Ledger.d.ts +3 -3
- package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts +2 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerHashes.d.ts +2 -2
- package/dist/npm/models/ledger/LedgerHashes.d.ts.map +1 -1
- package/dist/npm/models/ledger/NFTokenOffer.d.ts +2 -4
- package/dist/npm/models/ledger/NFTokenOffer.d.ts.map +1 -1
- package/dist/npm/models/ledger/NFTokenPage.d.ts +2 -4
- package/dist/npm/models/ledger/NFTokenPage.d.ts.map +1 -1
- package/dist/npm/models/ledger/NegativeUNL.d.ts +2 -2
- package/dist/npm/models/ledger/NegativeUNL.d.ts.map +1 -1
- package/dist/npm/models/ledger/Offer.d.ts +2 -4
- package/dist/npm/models/ledger/Offer.d.ts.map +1 -1
- package/dist/npm/models/ledger/Offer.js.map +1 -1
- package/dist/npm/models/ledger/PayChannel.d.ts +2 -4
- package/dist/npm/models/ledger/PayChannel.d.ts.map +1 -1
- package/dist/npm/models/ledger/RippleState.d.ts +2 -4
- package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
- package/dist/npm/models/ledger/RippleState.js.map +1 -1
- package/dist/npm/models/ledger/SignerList.d.ts +2 -4
- package/dist/npm/models/ledger/SignerList.d.ts.map +1 -1
- package/dist/npm/models/ledger/SignerList.js.map +1 -1
- package/dist/npm/models/ledger/Ticket.d.ts +2 -4
- package/dist/npm/models/ledger/Ticket.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +13 -5
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +12 -5
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.d.ts +3 -2
- 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 +4 -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/ledger.d.ts +2 -0
- package/dist/npm/models/methods/ledger.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerData.d.ts +2 -1
- package/dist/npm/models/methods/ledgerData.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +6 -6
- 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/methods/tx.d.ts +2 -1
- package/dist/npm/models/methods/tx.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/NFTokenBurn.d.ts +3 -3
- package/dist/npm/models/transactions/NFTokenBurn.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenBurn.js +2 -4
- package/dist/npm/models/transactions/NFTokenBurn.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +3 -3
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.js +2 -0
- package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.d.ts +2 -2
- package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.js +1 -0
- package/dist/npm/models/transactions/NFTokenMint.js.map +1 -1
- package/dist/npm/models/transactions/UNLModify.d.ts +2 -1
- package/dist/npm/models/transactions/UNLModify.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js +4 -26
- package/dist/npm/models/transactions/XChainAccountCreateCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +11 -68
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js +10 -59
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.d.ts +2 -2
- package/dist/npm/models/transactions/XChainClaim.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.js +5 -30
- package/dist/npm/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.d.ts +2 -2
- package/dist/npm/models/transactions/XChainCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.js +4 -24
- package/dist/npm/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainCreateBridge.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCreateBridge.js +3 -17
- package/dist/npm/models/transactions/XChainCreateBridge.js.map +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts +2 -2
- package/dist/npm/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.js +3 -19
- package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.js +3 -14
- package/dist/npm/models/transactions/XChainModifyBridge.js.map +1 -1
- package/dist/npm/models/transactions/accountDelete.d.ts +2 -2
- package/dist/npm/models/transactions/accountDelete.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountDelete.js +2 -11
- package/dist/npm/models/transactions/accountDelete.js.map +1 -1
- package/dist/npm/models/transactions/accountSet.d.ts +2 -2
- package/dist/npm/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountSet.js +1 -5
- 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 +2 -2
- package/dist/npm/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCreate.js +2 -10
- package/dist/npm/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/models/transactions/common.d.ts +7 -1
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +39 -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 +3 -3
- package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.js +5 -8
- package/dist/npm/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.d.ts +2 -2
- package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.js +2 -10
- package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts +3 -3
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js +5 -8
- package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +1 -1
- package/dist/npm/models/transactions/index.d.ts.map +1 -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 +2 -2
- package/dist/npm/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/models/transactions/payment.js +2 -9
- 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 +2 -2
- package/dist/npm/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/paymentChannelCreate.js +2 -10
- 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 +4 -0
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- 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 +17 -28
- package/dist/npm/models/utils/flags.js.map +1 -1
- package/dist/npm/snippets/src/bridgeTransfer.js +16 -13
- package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +0 -3
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/src/client/partialPayment.js.map +1 -1
- package/dist/npm/src/models/common/index.d.ts +2 -1
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +5 -5
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +3 -4
- 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/Amendments.d.ts +2 -2
- package/dist/npm/src/models/ledger/Amendments.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts +9 -1
- package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Bridge.d.ts +2 -4
- package/dist/npm/src/models/ledger/Bridge.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Check.d.ts +2 -2
- package/dist/npm/src/models/ledger/Check.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/DepositPreauth.d.ts +2 -4
- package/dist/npm/src/models/ledger/DepositPreauth.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/DirectoryNode.d.ts +2 -2
- package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Escrow.d.ts +2 -4
- package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -2
- package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Ledger.d.ts +3 -3
- package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +2 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerHashes.d.ts +2 -2
- package/dist/npm/src/models/ledger/LedgerHashes.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NFTokenOffer.d.ts +2 -4
- package/dist/npm/src/models/ledger/NFTokenOffer.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NFTokenPage.d.ts +2 -4
- package/dist/npm/src/models/ledger/NFTokenPage.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NegativeUNL.d.ts +2 -2
- package/dist/npm/src/models/ledger/NegativeUNL.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Offer.d.ts +2 -4
- package/dist/npm/src/models/ledger/Offer.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Offer.js.map +1 -1
- package/dist/npm/src/models/ledger/PayChannel.d.ts +2 -4
- package/dist/npm/src/models/ledger/PayChannel.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/RippleState.d.ts +2 -4
- package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
- package/dist/npm/src/models/ledger/SignerList.d.ts +2 -4
- package/dist/npm/src/models/ledger/SignerList.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/SignerList.js.map +1 -1
- package/dist/npm/src/models/ledger/Ticket.d.ts +2 -4
- package/dist/npm/src/models/ledger/Ticket.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +13 -5
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +12 -5
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.d.ts +3 -2
- 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 +4 -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/ledger.d.ts +2 -0
- package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerData.d.ts +2 -1
- package/dist/npm/src/models/methods/ledgerData.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +6 -6
- 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/methods/tx.d.ts +2 -1
- package/dist/npm/src/models/methods/tx.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/NFTokenBurn.d.ts +3 -3
- package/dist/npm/src/models/transactions/NFTokenBurn.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenBurn.js +2 -4
- package/dist/npm/src/models/transactions/NFTokenBurn.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +3 -3
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +2 -0
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts +2 -2
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.js +1 -0
- package/dist/npm/src/models/transactions/NFTokenMint.js.map +1 -1
- package/dist/npm/src/models/transactions/UNLModify.d.ts +2 -1
- package/dist/npm/src/models/transactions/UNLModify.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js +4 -26
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +5 -5
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +11 -68
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +5 -5
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +10 -59
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainClaim.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.js +5 -30
- package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.js +4 -24
- package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateBridge.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateBridge.js +3 -17
- package/dist/npm/src/models/transactions/XChainCreateBridge.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainCreateClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js +3 -19
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.js +3 -14
- package/dist/npm/src/models/transactions/XChainModifyBridge.js.map +1 -1
- package/dist/npm/src/models/transactions/accountDelete.d.ts +2 -2
- package/dist/npm/src/models/transactions/accountDelete.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountDelete.js +2 -11
- package/dist/npm/src/models/transactions/accountDelete.js.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.d.ts +2 -2
- package/dist/npm/src/models/transactions/accountSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountSet.js +1 -5
- 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 +2 -2
- package/dist/npm/src/models/transactions/checkCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.js +2 -10
- package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/common.d.ts +7 -1
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +39 -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 +3 -3
- package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.js +5 -8
- package/dist/npm/src/models/transactions/escrowCancel.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -2
- package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.js +2 -10
- package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts +3 -3
- package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.js +5 -8
- package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +1 -1
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -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 +2 -2
- package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/payment.js +2 -9
- 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 +2 -2
- package/dist/npm/src/models/transactions/paymentChannelCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelCreate.js +2 -10
- 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 +4 -0
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- 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 +17 -28
- 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/hashes/hashLedger.d.ts +2 -1
- package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
- 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/hashes/hashLedger.d.ts +2 -1
- package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
- 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 +14 -6
- package/src/Wallet/defaultFaucets.ts +0 -4
- package/src/client/partialPayment.ts +6 -2
- package/src/models/common/index.ts +2 -1
- package/src/models/ledger/AMM.ts +5 -5
- package/src/models/ledger/AccountRoot.ts +8 -12
- package/src/models/ledger/Amendments.ts +4 -2
- package/src/models/ledger/BaseLedgerEntry.ts +25 -1
- package/src/models/ledger/Bridge.ts +2 -14
- package/src/models/ledger/Check.ts +2 -2
- package/src/models/ledger/DepositPreauth.ts +4 -12
- package/src/models/ledger/DirectoryNode.ts +4 -2
- package/src/models/ledger/Escrow.ts +2 -12
- package/src/models/ledger/FeeSettings.ts +2 -2
- package/src/models/ledger/Ledger.ts +9 -3
- package/src/models/ledger/LedgerEntry.ts +22 -1
- package/src/models/ledger/LedgerHashes.ts +4 -2
- package/src/models/ledger/NFTokenOffer.ts +2 -4
- package/src/models/ledger/NFTokenPage.ts +2 -4
- package/src/models/ledger/NegativeUNL.ts +4 -2
- package/src/models/ledger/Offer.ts +2 -12
- package/src/models/ledger/PayChannel.ts +2 -12
- package/src/models/ledger/RippleState.ts +2 -12
- package/src/models/ledger/SignerList.ts +2 -12
- package/src/models/ledger/Ticket.ts +2 -12
- package/src/models/ledger/XChainOwnedClaimID.ts +22 -14
- package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +19 -14
- package/src/models/ledger/index.ts +5 -1
- package/src/models/methods/accountObjects.ts +10 -41
- package/src/models/methods/ammInfo.ts +8 -3
- package/src/models/methods/ledger.ts +5 -0
- package/src/models/methods/ledgerData.ts +5 -1
- package/src/models/methods/ledgerEntry.ts +6 -6
- package/src/models/methods/serverInfo.ts +21 -0
- package/src/models/methods/tx.ts +4 -2
- 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/NFTokenBurn.ts +13 -9
- package/src/models/transactions/NFTokenCreateOffer.ts +8 -2
- package/src/models/transactions/NFTokenMint.ts +11 -2
- package/src/models/transactions/UNLModify.ts +3 -1
- package/src/models/transactions/XChainAccountCreateCommit.ts +10 -48
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +40 -142
- package/src/models/transactions/XChainAddClaimAttestation.ts +39 -120
- package/src/models/transactions/XChainClaim.ts +18 -42
- package/src/models/transactions/XChainCommit.ts +17 -36
- package/src/models/transactions/XChainCreateBridge.ts +7 -29
- package/src/models/transactions/XChainCreateClaimID.ts +9 -33
- package/src/models/transactions/XChainModifyBridge.ts +7 -23
- package/src/models/transactions/accountDelete.ts +12 -18
- package/src/models/transactions/accountSet.ts +10 -13
- package/src/models/transactions/checkCash.ts +0 -1
- package/src/models/transactions/checkCreate.ts +8 -16
- package/src/models/transactions/common.ts +102 -54
- package/src/models/transactions/depositPreauth.ts +0 -1
- package/src/models/transactions/escrowCancel.ts +16 -12
- package/src/models/transactions/escrowCreate.ts +12 -17
- package/src/models/transactions/escrowFinish.ts +16 -12
- package/src/models/transactions/index.ts +6 -1
- package/src/models/transactions/offerCreate.ts +0 -1
- package/src/models/transactions/payment.ts +8 -15
- package/src/models/transactions/paymentChannelClaim.ts +0 -1
- package/src/models/transactions/paymentChannelCreate.ts +12 -22
- package/src/models/transactions/signerListSet.ts +0 -1
- package/src/models/transactions/transaction.ts +5 -1
- package/src/models/utils/flags.ts +18 -29
- package/src/sugar/autofill.ts +0 -2
- package/src/utils/getXChainClaimID.ts +64 -0
- package/src/utils/hashes/hashLedger.ts +4 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/signPaymentChannelClaim.ts +3 -3
- package/src/utils/verifyPaymentChannelClaim.ts +3 -3
@@ -1,6 +1,12 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
1
|
+
import {
|
2
|
+
Account,
|
3
|
+
BaseTransaction,
|
4
|
+
isAccount,
|
5
|
+
isString,
|
6
|
+
validateBaseTransaction,
|
7
|
+
validateOptionalField,
|
8
|
+
validateRequiredField,
|
9
|
+
} from './common'
|
4
10
|
|
5
11
|
/**
|
6
12
|
* The NFTokenBurn transaction is used to remove an NFToken object from the
|
@@ -20,7 +26,7 @@ export interface NFTokenBurn extends BaseTransaction {
|
|
20
26
|
* in the NFToken, either the issuer account or an account authorized by the
|
21
27
|
* issuer, i.e. MintAccount.
|
22
28
|
*/
|
23
|
-
Account:
|
29
|
+
Account: Account
|
24
30
|
/**
|
25
31
|
* Identifies the NFToken object to be removed by the transaction.
|
26
32
|
*/
|
@@ -30,7 +36,7 @@ export interface NFTokenBurn extends BaseTransaction {
|
|
30
36
|
* Account. Only used to burn tokens which have the lsfBurnable flag enabled
|
31
37
|
* and are not owned by the signing account.
|
32
38
|
*/
|
33
|
-
Owner?:
|
39
|
+
Owner?: Account
|
34
40
|
}
|
35
41
|
|
36
42
|
/**
|
@@ -41,8 +47,6 @@ export interface NFTokenBurn extends BaseTransaction {
|
|
41
47
|
*/
|
42
48
|
export function validateNFTokenBurn(tx: Record<string, unknown>): void {
|
43
49
|
validateBaseTransaction(tx)
|
44
|
-
|
45
|
-
|
46
|
-
throw new ValidationError('NFTokenBurn: missing field NFTokenID')
|
47
|
-
}
|
50
|
+
validateRequiredField(tx, 'NFTokenID', isString)
|
51
|
+
validateOptionalField(tx, 'Owner', isAccount)
|
48
52
|
}
|
@@ -8,6 +8,9 @@ import {
|
|
8
8
|
validateBaseTransaction,
|
9
9
|
isAmount,
|
10
10
|
parseAmountValue,
|
11
|
+
isAccount,
|
12
|
+
validateOptionalField,
|
13
|
+
Account,
|
11
14
|
} from './common'
|
12
15
|
|
13
16
|
/**
|
@@ -67,7 +70,7 @@ export interface NFTokenCreateOffer extends BaseTransaction {
|
|
67
70
|
* (since an offer to sell a token one doesn't already hold
|
68
71
|
* is meaningless).
|
69
72
|
*/
|
70
|
-
Owner?:
|
73
|
+
Owner?: Account
|
71
74
|
/**
|
72
75
|
* Indicates the time after which the offer will no longer
|
73
76
|
* be valid. The value is the number of seconds since the
|
@@ -79,7 +82,7 @@ export interface NFTokenCreateOffer extends BaseTransaction {
|
|
79
82
|
* accepted by the specified account. Attempts by other
|
80
83
|
* accounts to accept this offer MUST fail.
|
81
84
|
*/
|
82
|
-
Destination?:
|
85
|
+
Destination?: Account
|
83
86
|
Flags?: number | NFTokenCreateOfferFlagsInterface
|
84
87
|
}
|
85
88
|
|
@@ -126,6 +129,9 @@ export function validateNFTokenCreateOffer(tx: Record<string, unknown>): void {
|
|
126
129
|
)
|
127
130
|
}
|
128
131
|
|
132
|
+
validateOptionalField(tx, 'Destination', isAccount)
|
133
|
+
validateOptionalField(tx, 'Owner', isAccount)
|
134
|
+
|
129
135
|
if (tx.NFTokenID == null) {
|
130
136
|
throw new ValidationError('NFTokenCreateOffer: missing field NFTokenID')
|
131
137
|
}
|
@@ -1,7 +1,14 @@
|
|
1
1
|
import { ValidationError } from '../../errors'
|
2
2
|
import { isHex } from '../utils'
|
3
3
|
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
Account,
|
6
|
+
BaseTransaction,
|
7
|
+
GlobalFlags,
|
8
|
+
isAccount,
|
9
|
+
validateBaseTransaction,
|
10
|
+
validateOptionalField,
|
11
|
+
} from './common'
|
5
12
|
|
6
13
|
/**
|
7
14
|
* Transaction Flags for an NFTokenMint Transaction.
|
@@ -68,7 +75,7 @@ export interface NFTokenMint extends BaseTransaction {
|
|
68
75
|
* present, the `MintAccount` field in the `AccountRoot` of the `Issuer`
|
69
76
|
* field must match the `Account`, otherwise the transaction will fail.
|
70
77
|
*/
|
71
|
-
Issuer?:
|
78
|
+
Issuer?: Account
|
72
79
|
/**
|
73
80
|
* Specifies the fee charged by the issuer for secondary sales of the Token,
|
74
81
|
* if such sales are allowed. Valid values for this field are between 0 and
|
@@ -109,6 +116,8 @@ export function validateNFTokenMint(tx: Record<string, unknown>): void {
|
|
109
116
|
)
|
110
117
|
}
|
111
118
|
|
119
|
+
validateOptionalField(tx, 'Issuer', isAccount)
|
120
|
+
|
112
121
|
if (typeof tx.URI === 'string' && tx.URI === '') {
|
113
122
|
throw new ValidationError('NFTokenMint: URI must not be empty string')
|
114
123
|
}
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import { BaseTransaction } from './common'
|
2
|
+
|
1
3
|
/**
|
2
4
|
* Mark a change to the Negative UNL.
|
3
5
|
*
|
4
6
|
* @category Pseudo Transaction Models
|
5
7
|
*/
|
6
|
-
export interface UNLModify {
|
8
|
+
export interface UNLModify extends BaseTransaction {
|
7
9
|
TransactionType: 'UNLModify'
|
8
10
|
/**
|
9
11
|
* The ledger index where this pseudo-transaction appears.
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { ValidationError } from '../../errors'
|
2
1
|
import { Amount, XChainBridge } from '../common'
|
3
2
|
|
4
3
|
import {
|
@@ -6,6 +5,9 @@ import {
|
|
6
5
|
isAmount,
|
7
6
|
isXChainBridge,
|
8
7
|
validateBaseTransaction,
|
8
|
+
validateRequiredField,
|
9
|
+
isAccount,
|
10
|
+
Account,
|
9
11
|
} from './common'
|
10
12
|
|
11
13
|
/**
|
@@ -37,7 +39,7 @@ export interface XChainAccountCreateCommit extends BaseTransaction {
|
|
37
39
|
/**
|
38
40
|
* The destination account on the destination chain.
|
39
41
|
*/
|
40
|
-
Destination:
|
42
|
+
Destination: Account
|
41
43
|
|
42
44
|
/**
|
43
45
|
* The amount, in XRP, to use for account creation. This must be greater than or
|
@@ -47,61 +49,21 @@ export interface XChainAccountCreateCommit extends BaseTransaction {
|
|
47
49
|
}
|
48
50
|
|
49
51
|
/**
|
50
|
-
* Verify the form and type of
|
52
|
+
* Verify the form and type of an XChainAccountCreateCommit at runtime.
|
51
53
|
*
|
52
|
-
* @param tx -
|
54
|
+
* @param tx - An XChainAccountCreateCommit Transaction.
|
53
55
|
* @throws When the XChainAccountCreateCommit is malformed.
|
54
56
|
*/
|
55
|
-
// eslint-disable-next-line max-lines-per-function -- okay for this function, there's a lot of things to check
|
56
57
|
export function validateXChainAccountCreateCommit(
|
57
58
|
tx: Record<string, unknown>,
|
58
59
|
): void {
|
59
60
|
validateBaseTransaction(tx)
|
60
61
|
|
61
|
-
|
62
|
-
throw new ValidationError(
|
63
|
-
'XChainAccountCreateCommit: missing field XChainBridge',
|
64
|
-
)
|
65
|
-
}
|
62
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
66
63
|
|
67
|
-
|
68
|
-
throw new ValidationError(
|
69
|
-
'XChainAccountCreateCommit: invalid field XChainBridge',
|
70
|
-
)
|
71
|
-
}
|
64
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
72
65
|
|
73
|
-
|
74
|
-
throw new ValidationError(
|
75
|
-
'XChainAccountCreateCommit: missing field SignatureReward',
|
76
|
-
)
|
77
|
-
}
|
66
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
78
67
|
|
79
|
-
|
80
|
-
typeof tx.SignatureReward !== 'number' &&
|
81
|
-
typeof tx.SignatureReward !== 'string'
|
82
|
-
) {
|
83
|
-
throw new ValidationError(
|
84
|
-
'XChainAccountCreateCommit: invalid field SignatureReward',
|
85
|
-
)
|
86
|
-
}
|
87
|
-
|
88
|
-
if (tx.Destination == null) {
|
89
|
-
throw new ValidationError(
|
90
|
-
'XChainAccountCreateCommit: missing field Destination',
|
91
|
-
)
|
92
|
-
}
|
93
|
-
|
94
|
-
if (typeof tx.Destination !== 'string') {
|
95
|
-
throw new ValidationError(
|
96
|
-
'XChainAccountCreateCommit: invalid field Destination',
|
97
|
-
)
|
98
|
-
}
|
99
|
-
|
100
|
-
if (tx.Amount == null) {
|
101
|
-
throw new ValidationError('XChainAccountCreateCommit: missing field Amount')
|
102
|
-
}
|
103
|
-
|
104
|
-
if (!isAmount(tx.Amount)) {
|
105
|
-
throw new ValidationError('XChainAccountCreateCommit: invalid field Amount')
|
106
|
-
}
|
68
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
107
69
|
}
|
@@ -1,11 +1,15 @@
|
|
1
|
-
import { ValidationError } from '../../errors'
|
2
1
|
import { Amount, XChainBridge } from '../common'
|
3
2
|
|
4
3
|
import {
|
4
|
+
Account,
|
5
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
6
7
|
isAmount,
|
8
|
+
isNumber,
|
9
|
+
isString,
|
7
10
|
isXChainBridge,
|
8
11
|
validateBaseTransaction,
|
12
|
+
validateRequiredField,
|
9
13
|
} from './common'
|
10
14
|
|
11
15
|
/**
|
@@ -27,23 +31,23 @@ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
|
|
27
31
|
/**
|
28
32
|
* The account that should receive this signer's share of the SignatureReward.
|
29
33
|
*/
|
30
|
-
AttestationRewardAccount:
|
34
|
+
AttestationRewardAccount: Account
|
31
35
|
|
32
36
|
/**
|
33
37
|
* The account on the door account's signer list that is signing the transaction.
|
34
38
|
*/
|
35
|
-
AttestationSignerAccount:
|
39
|
+
AttestationSignerAccount: Account
|
36
40
|
|
37
41
|
/**
|
38
42
|
* The destination account for the funds on the destination chain.
|
39
43
|
*/
|
40
|
-
Destination:
|
44
|
+
Destination: Account
|
41
45
|
|
42
46
|
/**
|
43
47
|
* The account on the source chain that submitted the {@link XChainAccountCreateCommit}
|
44
48
|
* transaction that triggered the event associated with the attestation.
|
45
49
|
*/
|
46
|
-
OtherChainSource:
|
50
|
+
OtherChainSource: Account
|
47
51
|
|
48
52
|
/**
|
49
53
|
* The public key used to verify the signature.
|
@@ -77,149 +81,43 @@ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
|
|
77
81
|
}
|
78
82
|
|
79
83
|
/**
|
80
|
-
* Verify the form and type of
|
84
|
+
* Verify the form and type of an XChainAddAccountCreateAttestation at runtime.
|
81
85
|
*
|
82
|
-
* @param tx -
|
86
|
+
* @param tx - An XChainAddAccountCreateAttestation Transaction.
|
83
87
|
* @throws When the XChainAddAccountCreateAttestation is malformed.
|
84
88
|
*/
|
85
|
-
// eslint-disable-next-line max-lines-per-function, max-statements, complexity -- okay for this function, lots of things to check
|
86
89
|
export function validateXChainAddAccountCreateAttestation(
|
87
90
|
tx: Record<string, unknown>,
|
88
91
|
): void {
|
89
92
|
validateBaseTransaction(tx)
|
90
93
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
if (typeof tx.AttestationSignerAccount !== 'string') {
|
122
|
-
throw new ValidationError(
|
123
|
-
'XChainAddAccountCreateAttestation: invalid field AttestationSignerAccount',
|
124
|
-
)
|
125
|
-
}
|
126
|
-
|
127
|
-
if (tx.Destination == null) {
|
128
|
-
throw new ValidationError(
|
129
|
-
'XChainAddAccountCreateAttestation: missing field Destination',
|
130
|
-
)
|
131
|
-
}
|
132
|
-
|
133
|
-
if (typeof tx.Destination !== 'string') {
|
134
|
-
throw new ValidationError(
|
135
|
-
'XChainAddAccountCreateAttestation: invalid field Destination',
|
136
|
-
)
|
137
|
-
}
|
138
|
-
|
139
|
-
if (tx.OtherChainSource == null) {
|
140
|
-
throw new ValidationError(
|
141
|
-
'XChainAddAccountCreateAttestation: missing field OtherChainSource',
|
142
|
-
)
|
143
|
-
}
|
144
|
-
|
145
|
-
if (typeof tx.OtherChainSource !== 'string') {
|
146
|
-
throw new ValidationError(
|
147
|
-
'XChainAddAccountCreateAttestation: invalid field OtherChainSource',
|
148
|
-
)
|
149
|
-
}
|
150
|
-
|
151
|
-
if (tx.PublicKey == null) {
|
152
|
-
throw new ValidationError(
|
153
|
-
'XChainAddAccountCreateAttestation: missing field PublicKey',
|
154
|
-
)
|
155
|
-
}
|
156
|
-
|
157
|
-
if (typeof tx.PublicKey !== 'string') {
|
158
|
-
throw new ValidationError(
|
159
|
-
'XChainAddAccountCreateAttestation: invalid field PublicKey',
|
160
|
-
)
|
161
|
-
}
|
162
|
-
|
163
|
-
if (tx.Signature == null) {
|
164
|
-
throw new ValidationError(
|
165
|
-
'XChainAddAccountCreateAttestation: missing field Signature',
|
166
|
-
)
|
167
|
-
}
|
168
|
-
|
169
|
-
if (typeof tx.Signature !== 'string') {
|
170
|
-
throw new ValidationError(
|
171
|
-
'XChainAddAccountCreateAttestation: invalid field Signature',
|
172
|
-
)
|
173
|
-
}
|
174
|
-
|
175
|
-
if (tx.SignatureReward == null) {
|
176
|
-
throw new ValidationError(
|
177
|
-
'XChainAddAccountCreateAttestation: missing field SignatureReward',
|
178
|
-
)
|
179
|
-
}
|
180
|
-
|
181
|
-
if (!isAmount(tx.SignatureReward)) {
|
182
|
-
throw new ValidationError(
|
183
|
-
'XChainAddAccountCreateAttestation: invalid field SignatureReward',
|
184
|
-
)
|
185
|
-
}
|
186
|
-
|
187
|
-
if (tx.WasLockingChainSend == null) {
|
188
|
-
throw new ValidationError(
|
189
|
-
'XChainAddAccountCreateAttestation: missing field WasLockingChainSend',
|
190
|
-
)
|
191
|
-
}
|
192
|
-
|
193
|
-
if (tx.WasLockingChainSend !== 0 && tx.WasLockingChainSend !== 1) {
|
194
|
-
throw new ValidationError(
|
195
|
-
'XChainAddAccountCreateAttestation: invalid field WasLockingChainSend',
|
196
|
-
)
|
197
|
-
}
|
198
|
-
|
199
|
-
if (tx.XChainAccountCreateCount == null) {
|
200
|
-
throw new ValidationError(
|
201
|
-
'XChainAddAccountCreateAttestation: missing field XChainAccountCreateCount',
|
202
|
-
)
|
203
|
-
}
|
204
|
-
|
205
|
-
if (
|
206
|
-
typeof tx.XChainAccountCreateCount !== 'string' &&
|
207
|
-
typeof tx.XChainAccountCreateCount !== 'number'
|
208
|
-
) {
|
209
|
-
throw new ValidationError(
|
210
|
-
'XChainAddAccountCreateAttestation: invalid field XChainAccountCreateCount',
|
211
|
-
)
|
212
|
-
}
|
213
|
-
|
214
|
-
if (tx.XChainBridge == null) {
|
215
|
-
throw new ValidationError(
|
216
|
-
'XChainAddAccountCreateAttestation: missing field XChainBridge',
|
217
|
-
)
|
218
|
-
}
|
219
|
-
|
220
|
-
if (!isXChainBridge(tx.XChainBridge)) {
|
221
|
-
throw new ValidationError(
|
222
|
-
'XChainAddAccountCreateAttestation: invalid field XChainBridge',
|
223
|
-
)
|
224
|
-
}
|
94
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
95
|
+
|
96
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isAccount)
|
97
|
+
|
98
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isAccount)
|
99
|
+
|
100
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
101
|
+
|
102
|
+
validateRequiredField(tx, 'OtherChainSource', isAccount)
|
103
|
+
|
104
|
+
validateRequiredField(tx, 'PublicKey', isString)
|
105
|
+
|
106
|
+
validateRequiredField(tx, 'Signature', isString)
|
107
|
+
|
108
|
+
validateRequiredField(tx, 'SignatureReward', isAmount)
|
109
|
+
|
110
|
+
validateRequiredField(
|
111
|
+
tx,
|
112
|
+
'WasLockingChainSend',
|
113
|
+
(inp) => inp === 0 || inp === 1,
|
114
|
+
)
|
115
|
+
|
116
|
+
validateRequiredField(
|
117
|
+
tx,
|
118
|
+
'XChainAccountCreateCount',
|
119
|
+
(inp) => isNumber(inp) || isString(inp),
|
120
|
+
)
|
121
|
+
|
122
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
225
123
|
}
|
@@ -1,11 +1,16 @@
|
|
1
|
-
import { ValidationError } from '../../errors'
|
2
1
|
import { Amount, XChainBridge } from '../common'
|
3
2
|
|
4
3
|
import {
|
4
|
+
Account,
|
5
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
6
7
|
isAmount,
|
8
|
+
isNumber,
|
9
|
+
isString,
|
7
10
|
isXChainBridge,
|
8
11
|
validateBaseTransaction,
|
12
|
+
validateOptionalField,
|
13
|
+
validateRequiredField,
|
9
14
|
} from './common'
|
10
15
|
|
11
16
|
/**
|
@@ -25,24 +30,24 @@ export interface XChainAddClaimAttestation extends BaseTransaction {
|
|
25
30
|
/**
|
26
31
|
* The account that should receive this signer's share of the SignatureReward.
|
27
32
|
*/
|
28
|
-
AttestationRewardAccount:
|
33
|
+
AttestationRewardAccount: Account
|
29
34
|
|
30
35
|
/**
|
31
36
|
* The account on the door account's signer list that is signing the transaction.
|
32
37
|
*/
|
33
|
-
AttestationSignerAccount:
|
38
|
+
AttestationSignerAccount: Account
|
34
39
|
|
35
40
|
/**
|
36
41
|
* The destination account for the funds on the destination chain (taken from
|
37
42
|
* the {@link XChainCommit} transaction).
|
38
43
|
*/
|
39
|
-
Destination?:
|
44
|
+
Destination?: Account
|
40
45
|
|
41
46
|
/**
|
42
47
|
* The account on the source chain that submitted the {@link XChainCommit}
|
43
48
|
* transaction that triggered the event associated with the attestation.
|
44
49
|
*/
|
45
|
-
OtherChainSource:
|
50
|
+
OtherChainSource: Account
|
46
51
|
|
47
52
|
/**
|
48
53
|
* The public key used to verify the attestation signature.
|
@@ -72,127 +77,41 @@ export interface XChainAddClaimAttestation extends BaseTransaction {
|
|
72
77
|
}
|
73
78
|
|
74
79
|
/**
|
75
|
-
* Verify the form and type of
|
80
|
+
* Verify the form and type of an XChainAddClaimAttestation at runtime.
|
76
81
|
*
|
77
|
-
* @param tx -
|
82
|
+
* @param tx - An XChainAddClaimAttestation Transaction.
|
78
83
|
* @throws When the XChainAddClaimAttestation is malformed.
|
79
84
|
*/
|
80
|
-
// eslint-disable-next-line max-lines-per-function, max-statements, complexity -- okay for this function, lots of things to check
|
81
85
|
export function validateXChainAddClaimAttestation(
|
82
86
|
tx: Record<string, unknown>,
|
83
87
|
): void {
|
84
88
|
validateBaseTransaction(tx)
|
85
89
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
)
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
throw new ValidationError(
|
114
|
-
'XChainAddClaimAttestation: invalid field AttestationSignerAccount',
|
115
|
-
)
|
116
|
-
}
|
117
|
-
|
118
|
-
if (tx.Destination !== undefined && typeof tx.Destination !== 'string') {
|
119
|
-
throw new ValidationError(
|
120
|
-
'XChainAddClaimAttestation: invalid field Destination',
|
121
|
-
)
|
122
|
-
}
|
123
|
-
|
124
|
-
if (tx.OtherChainSource == null) {
|
125
|
-
throw new ValidationError(
|
126
|
-
'XChainAddClaimAttestation: missing field OtherChainSource',
|
127
|
-
)
|
128
|
-
}
|
129
|
-
|
130
|
-
if (typeof tx.OtherChainSource !== 'string') {
|
131
|
-
throw new ValidationError(
|
132
|
-
'XChainAddClaimAttestation: invalid field OtherChainSource',
|
133
|
-
)
|
134
|
-
}
|
135
|
-
|
136
|
-
if (tx.PublicKey == null) {
|
137
|
-
throw new ValidationError(
|
138
|
-
'XChainAddClaimAttestation: missing field PublicKey',
|
139
|
-
)
|
140
|
-
}
|
141
|
-
|
142
|
-
if (typeof tx.PublicKey !== 'string') {
|
143
|
-
throw new ValidationError(
|
144
|
-
'XChainAddClaimAttestation: invalid field PublicKey',
|
145
|
-
)
|
146
|
-
}
|
147
|
-
|
148
|
-
if (tx.Signature == null) {
|
149
|
-
throw new ValidationError(
|
150
|
-
'XChainAddClaimAttestation: missing field Signature',
|
151
|
-
)
|
152
|
-
}
|
153
|
-
|
154
|
-
if (typeof tx.Signature !== 'string') {
|
155
|
-
throw new ValidationError(
|
156
|
-
'XChainAddClaimAttestation: invalid field Signature',
|
157
|
-
)
|
158
|
-
}
|
159
|
-
|
160
|
-
if (tx.WasLockingChainSend == null) {
|
161
|
-
throw new ValidationError(
|
162
|
-
'XChainAddClaimAttestation: missing field WasLockingChainSend',
|
163
|
-
)
|
164
|
-
}
|
165
|
-
|
166
|
-
if (tx.WasLockingChainSend !== 0 && tx.WasLockingChainSend !== 1) {
|
167
|
-
throw new ValidationError(
|
168
|
-
'XChainAddClaimAttestation: invalid field WasLockingChainSend',
|
169
|
-
)
|
170
|
-
}
|
171
|
-
|
172
|
-
if (tx.XChainBridge == null) {
|
173
|
-
throw new ValidationError(
|
174
|
-
'XChainAddClaimAttestation: missing field XChainBridge',
|
175
|
-
)
|
176
|
-
}
|
177
|
-
|
178
|
-
if (!isXChainBridge(tx.XChainBridge)) {
|
179
|
-
throw new ValidationError(
|
180
|
-
'XChainAddClaimAttestation: invalid field XChainBridge',
|
181
|
-
)
|
182
|
-
}
|
183
|
-
|
184
|
-
if (tx.XChainClaimID == null) {
|
185
|
-
throw new ValidationError(
|
186
|
-
'XChainAddClaimAttestation: missing field XChainClaimID',
|
187
|
-
)
|
188
|
-
}
|
189
|
-
|
190
|
-
if (
|
191
|
-
typeof tx.XChainClaimID !== 'string' &&
|
192
|
-
typeof tx.XChainClaimID !== 'number'
|
193
|
-
) {
|
194
|
-
throw new ValidationError(
|
195
|
-
'XChainAddClaimAttestation: invalid field XChainClaimID',
|
196
|
-
)
|
197
|
-
}
|
90
|
+
validateRequiredField(tx, 'Amount', isAmount)
|
91
|
+
|
92
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isAccount)
|
93
|
+
|
94
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isAccount)
|
95
|
+
|
96
|
+
validateOptionalField(tx, 'Destination', isAccount)
|
97
|
+
|
98
|
+
validateRequiredField(tx, 'OtherChainSource', isAccount)
|
99
|
+
|
100
|
+
validateRequiredField(tx, 'PublicKey', isString)
|
101
|
+
|
102
|
+
validateRequiredField(tx, 'Signature', isString)
|
103
|
+
|
104
|
+
validateRequiredField(
|
105
|
+
tx,
|
106
|
+
'WasLockingChainSend',
|
107
|
+
(inp) => inp === 0 || inp === 1,
|
108
|
+
)
|
109
|
+
|
110
|
+
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
111
|
+
|
112
|
+
validateRequiredField(
|
113
|
+
tx,
|
114
|
+
'XChainClaimID',
|
115
|
+
(inp) => isNumber(inp) || isString(inp),
|
116
|
+
)
|
198
117
|
}
|