xrpl 2.12.0 → 3.0.0-beta.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 +18365 -75189
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/authorizeChannel.d.ts +3 -0
- package/dist/npm/Wallet/authorizeChannel.d.ts.map +1 -0
- package/dist/npm/Wallet/authorizeChannel.js +14 -0
- package/dist/npm/Wallet/authorizeChannel.js.map +1 -0
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +1 -4
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/Wallet/fundWallet.d.ts +17 -3
- package/dist/npm/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/Wallet/fundWallet.js +53 -78
- package/dist/npm/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/Wallet/index.d.ts.map +1 -1
- package/dist/npm/Wallet/index.js +24 -23
- package/dist/npm/Wallet/index.js.map +1 -1
- package/dist/npm/Wallet/signer.d.ts +2 -4
- package/dist/npm/Wallet/signer.d.ts.map +1 -1
- package/dist/npm/Wallet/signer.js +17 -13
- package/dist/npm/Wallet/signer.js.map +1 -1
- package/dist/npm/Wallet/walletFromSecretNumbers.js +2 -2
- package/dist/npm/Wallet/walletFromSecretNumbers.js.map +1 -1
- package/dist/npm/client/RequestManager.d.ts +3 -2
- package/dist/npm/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/client/RequestManager.js +25 -1
- package/dist/npm/client/RequestManager.js.map +1 -1
- package/dist/npm/client/connection.d.ts +8 -11
- package/dist/npm/client/connection.d.ts.map +1 -1
- package/dist/npm/client/connection.js +8 -54
- package/dist/npm/client/connection.js.map +1 -1
- package/dist/npm/client/index.d.ts +56 -78
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js +155 -42
- package/dist/npm/client/index.js.map +1 -1
- package/dist/npm/client/partialPayment.d.ts +4 -2
- package/dist/npm/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/client/partialPayment.js.map +1 -1
- package/dist/npm/errors.d.ts.map +1 -1
- package/dist/npm/errors.js +1 -2
- package/dist/npm/errors.js.map +1 -1
- package/dist/npm/index.d.ts +1 -1
- package/dist/npm/index.d.ts.map +1 -1
- package/dist/npm/index.js +1 -3
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +2 -4
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts +2 -4
- package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.js +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 +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 +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 +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 +2 -4
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
- package/dist/npm/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.d.ts +2 -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/index.d.ts +12 -1
- package/dist/npm/models/methods/index.d.ts.map +1 -1
- package/dist/npm/models/methods/ledger.d.ts +37 -7
- 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 +2 -2
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/subscribe.d.ts +3 -0
- package/dist/npm/models/methods/subscribe.d.ts.map +1 -1
- package/dist/npm/models/methods/tx.d.ts +3 -2
- package/dist/npm/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.js +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenAcceptOffer.d.ts +4 -0
- package/dist/npm/models/transactions/NFTokenAcceptOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenAcceptOffer.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/NFTokenCancelOffer.d.ts +4 -0
- package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCancelOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +7 -3
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.js +3 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.d.ts +6 -2
- package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.js +2 -1
- 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 +1 -2
- 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 +4 -4
- 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 +4 -4
- 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 +1 -1
- 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 +1 -1
- package/dist/npm/models/transactions/XChainCommit.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 +1 -1
- package/dist/npm/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.js +1 -1
- 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 +3 -7
- package/dist/npm/models/transactions/accountSet.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 +3 -1
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +7 -1
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/enableAmendment.js +1 -1
- package/dist/npm/models/transactions/enableAmendment.js.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.d.ts +2 -2
- package/dist/npm/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCancel.js +1 -6
- 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 +2 -2
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js +1 -6
- 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/metadata.d.ts +9 -1
- package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/models/transactions/metadata.js.map +1 -1
- package/dist/npm/models/transactions/offerCreate.js +1 -1
- package/dist/npm/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/models/transactions/payment.d.ts +7 -2
- package/dist/npm/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/models/transactions/payment.js +3 -10
- package/dist/npm/models/transactions/payment.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.js +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/transaction.d.ts +8 -3
- 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/transactions/trustSet.js +1 -1
- package/dist/npm/models/transactions/trustSet.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 +4 -3
- package/dist/npm/snippets/src/bridgeTransfer.js.map +1 -1
- package/dist/npm/snippets/src/getTransaction.js +1 -1
- package/dist/npm/snippets/src/getTransaction.js.map +1 -1
- package/dist/npm/snippets/src/paths.js +2 -3
- package/dist/npm/snippets/src/paths.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -0
- package/dist/npm/src/Wallet/authorizeChannel.d.ts +3 -0
- package/dist/npm/src/Wallet/authorizeChannel.d.ts.map +1 -0
- package/dist/npm/src/Wallet/authorizeChannel.js +14 -0
- package/dist/npm/src/Wallet/authorizeChannel.js.map +1 -0
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +1 -4
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.d.ts +17 -3
- package/dist/npm/src/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.js +53 -78
- package/dist/npm/src/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/src/Wallet/index.d.ts.map +1 -1
- package/dist/npm/src/Wallet/index.js +24 -23
- package/dist/npm/src/Wallet/index.js.map +1 -1
- package/dist/npm/src/Wallet/signer.d.ts +2 -4
- package/dist/npm/src/Wallet/signer.d.ts.map +1 -1
- package/dist/npm/src/Wallet/signer.js +17 -13
- package/dist/npm/src/Wallet/signer.js.map +1 -1
- package/dist/npm/src/Wallet/walletFromSecretNumbers.js +2 -2
- package/dist/npm/src/Wallet/walletFromSecretNumbers.js.map +1 -1
- package/dist/npm/src/client/RequestManager.d.ts +3 -2
- package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/src/client/RequestManager.js +25 -1
- package/dist/npm/src/client/RequestManager.js.map +1 -1
- package/dist/npm/src/client/connection.d.ts +8 -11
- package/dist/npm/src/client/connection.d.ts.map +1 -1
- package/dist/npm/src/client/connection.js +8 -54
- package/dist/npm/src/client/connection.js.map +1 -1
- package/dist/npm/src/client/index.d.ts +56 -78
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js +155 -42
- package/dist/npm/src/client/index.js.map +1 -1
- package/dist/npm/src/client/partialPayment.d.ts +4 -2
- 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/errors.d.ts.map +1 -1
- package/dist/npm/src/errors.js +1 -2
- package/dist/npm/src/errors.js.map +1 -1
- package/dist/npm/src/index.d.ts +1 -1
- package/dist/npm/src/index.d.ts.map +1 -1
- package/dist/npm/src/index.js +1 -3
- package/dist/npm/src/index.js.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +2 -4
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +2 -4
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js +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 +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 +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 +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 +2 -4
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts +2 -4
- package/dist/npm/src/models/ledger/XChainOwnedCreateAccountClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.d.ts +2 -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/index.d.ts +12 -1
- package/dist/npm/src/models/methods/index.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledger.d.ts +37 -7
- 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 +2 -2
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/subscribe.d.ts +3 -0
- package/dist/npm/src/models/methods/subscribe.d.ts.map +1 -1
- package/dist/npm/src/models/methods/tx.d.ts +3 -2
- package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.js +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenAcceptOffer.d.ts +4 -0
- package/dist/npm/src/models/transactions/NFTokenAcceptOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenAcceptOffer.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/NFTokenCancelOffer.d.ts +4 -0
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +7 -3
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js +3 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts +6 -2
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.js +2 -1
- 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 +1 -2
- 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 +4 -4
- 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 +4 -4
- 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 +1 -1
- 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 +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.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 +1 -1
- package/dist/npm/src/models/transactions/XChainCreateClaimID.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.js +1 -1
- 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 +3 -7
- package/dist/npm/src/models/transactions/accountSet.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 +3 -1
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +7 -1
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/enableAmendment.js +1 -1
- package/dist/npm/src/models/transactions/enableAmendment.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.d.ts +2 -2
- package/dist/npm/src/models/transactions/escrowCancel.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCancel.js +1 -6
- 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 +2 -2
- package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.js +1 -6
- 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/metadata.d.ts +9 -1
- package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/metadata.js.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.js +1 -1
- package/dist/npm/src/models/transactions/offerCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/payment.d.ts +7 -2
- package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/payment.js +3 -10
- package/dist/npm/src/models/transactions/payment.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.js +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/transaction.d.ts +8 -3
- 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/transactions/trustSet.js +1 -1
- package/dist/npm/src/models/transactions/trustSet.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 +6 -2
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js +9 -28
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/sugar/balances.d.ts +2 -17
- package/dist/npm/src/sugar/balances.d.ts.map +1 -1
- package/dist/npm/src/sugar/balances.js +2 -60
- package/dist/npm/src/sugar/balances.js.map +1 -1
- package/dist/npm/src/sugar/getOrderbook.d.ts +19 -5
- package/dist/npm/src/sugar/getOrderbook.d.ts.map +1 -1
- package/dist/npm/src/sugar/getOrderbook.js +72 -53
- package/dist/npm/src/sugar/getOrderbook.js.map +1 -1
- package/dist/npm/src/sugar/index.d.ts +0 -4
- package/dist/npm/src/sugar/index.d.ts.map +1 -1
- package/dist/npm/src/sugar/index.js +0 -13
- package/dist/npm/src/sugar/index.js.map +1 -1
- package/dist/npm/src/sugar/submit.d.ts +6 -9
- package/dist/npm/src/sugar/submit.d.ts.map +1 -1
- package/dist/npm/src/sugar/submit.js +5 -22
- package/dist/npm/src/sugar/submit.js.map +1 -1
- package/dist/npm/src/utils/collections.d.ts +7 -0
- package/dist/npm/src/utils/collections.d.ts.map +1 -0
- package/dist/npm/src/utils/collections.js +22 -0
- package/dist/npm/src/utils/collections.js.map +1 -0
- package/dist/npm/src/utils/getBalanceChanges.d.ts.map +1 -1
- package/dist/npm/src/utils/getBalanceChanges.js +3 -4
- package/dist/npm/src/utils/getBalanceChanges.js.map +1 -1
- package/dist/npm/src/utils/getNFTokenID.d.ts.map +1 -1
- package/dist/npm/src/utils/getNFTokenID.js +8 -8
- package/dist/npm/src/utils/getNFTokenID.js.map +1 -1
- package/dist/npm/src/utils/hashes/SHAMap/node.js +1 -1
- package/dist/npm/src/utils/hashes/SHAMap/node.js.map +1 -1
- 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/hashes/sha512Half.d.ts.map +1 -1
- package/dist/npm/src/utils/hashes/sha512Half.js +4 -7
- package/dist/npm/src/utils/hashes/sha512Half.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts +6 -2
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js +9 -28
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/balances.d.ts +2 -17
- package/dist/npm/sugar/balances.d.ts.map +1 -1
- package/dist/npm/sugar/balances.js +2 -60
- package/dist/npm/sugar/balances.js.map +1 -1
- package/dist/npm/sugar/getOrderbook.d.ts +19 -5
- package/dist/npm/sugar/getOrderbook.d.ts.map +1 -1
- package/dist/npm/sugar/getOrderbook.js +72 -53
- package/dist/npm/sugar/getOrderbook.js.map +1 -1
- package/dist/npm/sugar/index.d.ts +0 -4
- package/dist/npm/sugar/index.d.ts.map +1 -1
- package/dist/npm/sugar/index.js +0 -13
- package/dist/npm/sugar/index.js.map +1 -1
- package/dist/npm/sugar/submit.d.ts +6 -9
- package/dist/npm/sugar/submit.d.ts.map +1 -1
- package/dist/npm/sugar/submit.js +5 -22
- package/dist/npm/sugar/submit.js.map +1 -1
- package/dist/npm/utils/collections.d.ts +7 -0
- package/dist/npm/utils/collections.d.ts.map +1 -0
- package/dist/npm/utils/collections.js +22 -0
- package/dist/npm/utils/collections.js.map +1 -0
- package/dist/npm/utils/getBalanceChanges.d.ts.map +1 -1
- package/dist/npm/utils/getBalanceChanges.js +3 -4
- package/dist/npm/utils/getBalanceChanges.js.map +1 -1
- package/dist/npm/utils/getNFTokenID.d.ts.map +1 -1
- package/dist/npm/utils/getNFTokenID.js +8 -8
- package/dist/npm/utils/getNFTokenID.js.map +1 -1
- package/dist/npm/utils/hashes/SHAMap/node.js +1 -1
- package/dist/npm/utils/hashes/SHAMap/node.js.map +1 -1
- 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/hashes/sha512Half.d.ts.map +1 -1
- package/dist/npm/utils/hashes/sha512Half.js +4 -7
- package/dist/npm/utils/hashes/sha512Half.js.map +1 -1
- package/package.json +32 -25
- package/src/Wallet/authorizeChannel.ts +26 -0
- package/src/Wallet/defaultFaucets.ts +0 -4
- package/src/Wallet/fundWallet.ts +151 -212
- package/src/Wallet/index.ts +28 -25
- package/src/Wallet/signer.ts +32 -43
- package/src/Wallet/walletFromSecretNumbers.ts +1 -1
- package/src/client/RequestManager.ts +40 -14
- package/src/client/connection.ts +20 -89
- package/src/client/index.ts +704 -269
- package/src/client/partialPayment.ts +20 -10
- package/src/errors.ts +1 -3
- package/src/index.ts +1 -3
- package/src/models/ledger/AMM.ts +2 -10
- package/src/models/ledger/AccountRoot.ts +2 -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 +10 -4
- 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 +4 -12
- package/src/models/ledger/XChainOwnedCreateAccountClaimID.ts +3 -12
- package/src/models/ledger/index.ts +2 -1
- package/src/models/methods/accountObjects.ts +10 -44
- package/src/models/methods/index.ts +175 -0
- package/src/models/methods/ledger.ts +154 -20
- package/src/models/methods/ledgerData.ts +5 -1
- package/src/models/methods/ledgerEntry.ts +2 -2
- package/src/models/methods/subscribe.ts +36 -0
- package/src/models/methods/tx.ts +6 -3
- package/src/models/transactions/NFTokenAcceptOffer.ts +6 -0
- package/src/models/transactions/NFTokenBurn.ts +13 -9
- package/src/models/transactions/NFTokenCancelOffer.ts +6 -0
- package/src/models/transactions/NFTokenCreateOffer.ts +14 -2
- package/src/models/transactions/NFTokenMint.ts +17 -2
- package/src/models/transactions/UNLModify.ts +3 -1
- package/src/models/transactions/XChainAccountCreateCommit.ts +4 -4
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +10 -8
- package/src/models/transactions/XChainAddClaimAttestation.ts +10 -8
- package/src/models/transactions/XChainClaim.ts +4 -2
- package/src/models/transactions/XChainCommit.ts +4 -2
- package/src/models/transactions/XChainCreateClaimID.ts +4 -3
- package/src/models/transactions/accountDelete.ts +12 -18
- package/src/models/transactions/accountSet.ts +10 -11
- package/src/models/transactions/checkCreate.ts +8 -15
- package/src/models/transactions/common.ts +20 -1
- package/src/models/transactions/escrowCancel.ts +9 -9
- package/src/models/transactions/escrowCreate.ts +12 -16
- package/src/models/transactions/escrowFinish.ts +9 -9
- package/src/models/transactions/index.ts +6 -1
- package/src/models/transactions/metadata.ts +31 -1
- package/src/models/transactions/payment.ts +14 -14
- package/src/models/transactions/paymentChannelCreate.ts +12 -21
- package/src/models/transactions/transaction.ts +11 -4
- package/src/models/utils/flags.ts +18 -28
- package/src/sugar/autofill.ts +84 -88
- package/src/sugar/balances.ts +8 -116
- package/src/sugar/getOrderbook.ts +138 -61
- package/src/sugar/index.ts +0 -8
- package/src/sugar/submit.ts +114 -132
- package/src/utils/collections.ts +53 -0
- package/src/utils/getBalanceChanges.ts +2 -3
- package/src/utils/getNFTokenID.ts +18 -16
- package/src/utils/hashes/hashLedger.ts +4 -1
- package/src/utils/hashes/sha512Half.ts +4 -7
- package/dist/npm/client/BroadcastClient.d.ts +0 -7
- package/dist/npm/client/BroadcastClient.d.ts.map +0 -1
- package/dist/npm/client/BroadcastClient.js +0 -49
- package/dist/npm/client/BroadcastClient.js.map +0 -1
- package/dist/npm/client/WSWrapper.d.ts +0 -25
- package/dist/npm/client/WSWrapper.d.ts.map +0 -1
- package/dist/npm/client/WSWrapper.js +0 -44
- package/dist/npm/client/WSWrapper.js.map +0 -1
- package/dist/npm/src/client/BroadcastClient.d.ts +0 -7
- package/dist/npm/src/client/BroadcastClient.d.ts.map +0 -1
- package/dist/npm/src/client/BroadcastClient.js +0 -49
- package/dist/npm/src/client/BroadcastClient.js.map +0 -1
- package/dist/npm/src/client/WSWrapper.d.ts +0 -25
- package/dist/npm/src/client/WSWrapper.d.ts.map +0 -1
- package/dist/npm/src/client/WSWrapper.js +0 -44
- package/dist/npm/src/client/WSWrapper.js.map +0 -1
- package/dist/npm/src/sugar/getLedgerIndex.d.ts +0 -3
- package/dist/npm/src/sugar/getLedgerIndex.d.ts.map +0 -1
- package/dist/npm/src/sugar/getLedgerIndex.js +0 -22
- package/dist/npm/src/sugar/getLedgerIndex.js.map +0 -1
- package/dist/npm/sugar/getLedgerIndex.d.ts +0 -3
- package/dist/npm/sugar/getLedgerIndex.d.ts.map +0 -1
- package/dist/npm/sugar/getLedgerIndex.js +0 -22
- package/dist/npm/sugar/getLedgerIndex.js.map +0 -1
- package/src/client/BroadcastClient.ts +0 -84
- package/src/client/WSWrapper.ts +0 -106
- package/src/sugar/getLedgerIndex.ts +0 -15
@@ -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
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ValidationError } from '../../errors'
|
2
2
|
|
3
3
|
import { BaseTransaction, validateBaseTransaction } from './common'
|
4
|
+
import type { TransactionMetadataBase } from './metadata'
|
4
5
|
|
5
6
|
/**
|
6
7
|
* The NFTokenCancelOffer transaction deletes existing NFTokenOffer objects.
|
@@ -26,6 +27,11 @@ export interface NFTokenCancelOffer extends BaseTransaction {
|
|
26
27
|
NFTokenOffers: string[]
|
27
28
|
}
|
28
29
|
|
30
|
+
export interface NFTokenCancelOfferMetadata extends TransactionMetadataBase {
|
31
|
+
// rippled 1.11.0 or later
|
32
|
+
nftoken_ids?: string[]
|
33
|
+
}
|
34
|
+
|
29
35
|
/**
|
30
36
|
* Verify the form and type of an NFTokenCancelOffer at runtime.
|
31
37
|
*
|
@@ -8,7 +8,11 @@ import {
|
|
8
8
|
validateBaseTransaction,
|
9
9
|
isAmount,
|
10
10
|
parseAmountValue,
|
11
|
+
isAccount,
|
12
|
+
validateOptionalField,
|
13
|
+
Account,
|
11
14
|
} from './common'
|
15
|
+
import type { TransactionMetadataBase } from './metadata'
|
12
16
|
|
13
17
|
/**
|
14
18
|
* Transaction Flags for an NFTokenCreateOffer Transaction.
|
@@ -67,7 +71,7 @@ export interface NFTokenCreateOffer extends BaseTransaction {
|
|
67
71
|
* (since an offer to sell a token one doesn't already hold
|
68
72
|
* is meaningless).
|
69
73
|
*/
|
70
|
-
Owner?:
|
74
|
+
Owner?: Account
|
71
75
|
/**
|
72
76
|
* Indicates the time after which the offer will no longer
|
73
77
|
* be valid. The value is the number of seconds since the
|
@@ -79,10 +83,15 @@ export interface NFTokenCreateOffer extends BaseTransaction {
|
|
79
83
|
* accepted by the specified account. Attempts by other
|
80
84
|
* accounts to accept this offer MUST fail.
|
81
85
|
*/
|
82
|
-
Destination?:
|
86
|
+
Destination?: Account
|
83
87
|
Flags?: number | NFTokenCreateOfferFlagsInterface
|
84
88
|
}
|
85
89
|
|
90
|
+
export interface NFTokenCreateOfferMetadata extends TransactionMetadataBase {
|
91
|
+
// rippled 1.11.0 or later
|
92
|
+
offer_id?: string
|
93
|
+
}
|
94
|
+
|
86
95
|
function validateNFTokenSellOfferCases(tx: Record<string, unknown>): void {
|
87
96
|
if (tx.Owner != null) {
|
88
97
|
throw new ValidationError(
|
@@ -126,6 +135,9 @@ export function validateNFTokenCreateOffer(tx: Record<string, unknown>): void {
|
|
126
135
|
)
|
127
136
|
}
|
128
137
|
|
138
|
+
validateOptionalField(tx, 'Destination', isAccount)
|
139
|
+
validateOptionalField(tx, 'Owner', isAccount)
|
140
|
+
|
129
141
|
if (tx.NFTokenID == null) {
|
130
142
|
throw new ValidationError('NFTokenCreateOffer: missing field NFTokenID')
|
131
143
|
}
|
@@ -1,7 +1,15 @@
|
|
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'
|
12
|
+
import type { TransactionMetadataBase } from './metadata'
|
5
13
|
|
6
14
|
/**
|
7
15
|
* Transaction Flags for an NFTokenMint Transaction.
|
@@ -68,7 +76,7 @@ export interface NFTokenMint extends BaseTransaction {
|
|
68
76
|
* present, the `MintAccount` field in the `AccountRoot` of the `Issuer`
|
69
77
|
* field must match the `Account`, otherwise the transaction will fail.
|
70
78
|
*/
|
71
|
-
Issuer?:
|
79
|
+
Issuer?: Account
|
72
80
|
/**
|
73
81
|
* Specifies the fee charged by the issuer for secondary sales of the Token,
|
74
82
|
* if such sales are allowed. Valid values for this field are between 0 and
|
@@ -94,6 +102,11 @@ export interface NFTokenMint extends BaseTransaction {
|
|
94
102
|
Flags?: number | NFTokenMintFlagsInterface
|
95
103
|
}
|
96
104
|
|
105
|
+
export interface NFTokenMintMetadata extends TransactionMetadataBase {
|
106
|
+
// rippled 1.11.0 or later
|
107
|
+
nftoken_id?: string
|
108
|
+
}
|
109
|
+
|
97
110
|
/**
|
98
111
|
* Verify the form and type of an NFTokenMint at runtime.
|
99
112
|
*
|
@@ -109,6 +122,8 @@ export function validateNFTokenMint(tx: Record<string, unknown>): void {
|
|
109
122
|
)
|
110
123
|
}
|
111
124
|
|
125
|
+
validateOptionalField(tx, 'Issuer', isAccount)
|
126
|
+
|
112
127
|
if (typeof tx.URI === 'string' && tx.URI === '') {
|
113
128
|
throw new ValidationError('NFTokenMint: URI must not be empty string')
|
114
129
|
}
|
@@ -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,5 +1,3 @@
|
|
1
|
-
import { isString } from 'lodash'
|
2
|
-
|
3
1
|
import { Amount, XChainBridge } from '../common'
|
4
2
|
|
5
3
|
import {
|
@@ -8,6 +6,8 @@ import {
|
|
8
6
|
isXChainBridge,
|
9
7
|
validateBaseTransaction,
|
10
8
|
validateRequiredField,
|
9
|
+
isAccount,
|
10
|
+
Account,
|
11
11
|
} from './common'
|
12
12
|
|
13
13
|
/**
|
@@ -39,7 +39,7 @@ export interface XChainAccountCreateCommit extends BaseTransaction {
|
|
39
39
|
/**
|
40
40
|
* The destination account on the destination chain.
|
41
41
|
*/
|
42
|
-
Destination:
|
42
|
+
Destination: Account
|
43
43
|
|
44
44
|
/**
|
45
45
|
* The amount, in XRP, to use for account creation. This must be greater than or
|
@@ -63,7 +63,7 @@ export function validateXChainAccountCreateCommit(
|
|
63
63
|
|
64
64
|
validateRequiredField(tx, 'SignatureReward', isAmount)
|
65
65
|
|
66
|
-
validateRequiredField(tx, 'Destination',
|
66
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
67
67
|
|
68
68
|
validateRequiredField(tx, 'Amount', isAmount)
|
69
69
|
}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { Amount, XChainBridge } from '../common'
|
2
2
|
|
3
3
|
import {
|
4
|
+
Account,
|
4
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
5
7
|
isAmount,
|
6
8
|
isNumber,
|
7
9
|
isString,
|
@@ -29,23 +31,23 @@ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
|
|
29
31
|
/**
|
30
32
|
* The account that should receive this signer's share of the SignatureReward.
|
31
33
|
*/
|
32
|
-
AttestationRewardAccount:
|
34
|
+
AttestationRewardAccount: Account
|
33
35
|
|
34
36
|
/**
|
35
37
|
* The account on the door account's signer list that is signing the transaction.
|
36
38
|
*/
|
37
|
-
AttestationSignerAccount:
|
39
|
+
AttestationSignerAccount: Account
|
38
40
|
|
39
41
|
/**
|
40
42
|
* The destination account for the funds on the destination chain.
|
41
43
|
*/
|
42
|
-
Destination:
|
44
|
+
Destination: Account
|
43
45
|
|
44
46
|
/**
|
45
47
|
* The account on the source chain that submitted the {@link XChainAccountCreateCommit}
|
46
48
|
* transaction that triggered the event associated with the attestation.
|
47
49
|
*/
|
48
|
-
OtherChainSource:
|
50
|
+
OtherChainSource: Account
|
49
51
|
|
50
52
|
/**
|
51
53
|
* The public key used to verify the signature.
|
@@ -91,13 +93,13 @@ export function validateXChainAddAccountCreateAttestation(
|
|
91
93
|
|
92
94
|
validateRequiredField(tx, 'Amount', isAmount)
|
93
95
|
|
94
|
-
validateRequiredField(tx, 'AttestationRewardAccount',
|
96
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isAccount)
|
95
97
|
|
96
|
-
validateRequiredField(tx, 'AttestationSignerAccount',
|
98
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isAccount)
|
97
99
|
|
98
|
-
validateRequiredField(tx, 'Destination',
|
100
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
99
101
|
|
100
|
-
validateRequiredField(tx, 'OtherChainSource',
|
102
|
+
validateRequiredField(tx, 'OtherChainSource', isAccount)
|
101
103
|
|
102
104
|
validateRequiredField(tx, 'PublicKey', isString)
|
103
105
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { Amount, XChainBridge } from '../common'
|
2
2
|
|
3
3
|
import {
|
4
|
+
Account,
|
4
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
5
7
|
isAmount,
|
6
8
|
isNumber,
|
7
9
|
isString,
|
@@ -28,24 +30,24 @@ export interface XChainAddClaimAttestation extends BaseTransaction {
|
|
28
30
|
/**
|
29
31
|
* The account that should receive this signer's share of the SignatureReward.
|
30
32
|
*/
|
31
|
-
AttestationRewardAccount:
|
33
|
+
AttestationRewardAccount: Account
|
32
34
|
|
33
35
|
/**
|
34
36
|
* The account on the door account's signer list that is signing the transaction.
|
35
37
|
*/
|
36
|
-
AttestationSignerAccount:
|
38
|
+
AttestationSignerAccount: Account
|
37
39
|
|
38
40
|
/**
|
39
41
|
* The destination account for the funds on the destination chain (taken from
|
40
42
|
* the {@link XChainCommit} transaction).
|
41
43
|
*/
|
42
|
-
Destination?:
|
44
|
+
Destination?: Account
|
43
45
|
|
44
46
|
/**
|
45
47
|
* The account on the source chain that submitted the {@link XChainCommit}
|
46
48
|
* transaction that triggered the event associated with the attestation.
|
47
49
|
*/
|
48
|
-
OtherChainSource:
|
50
|
+
OtherChainSource: Account
|
49
51
|
|
50
52
|
/**
|
51
53
|
* The public key used to verify the attestation signature.
|
@@ -87,13 +89,13 @@ export function validateXChainAddClaimAttestation(
|
|
87
89
|
|
88
90
|
validateRequiredField(tx, 'Amount', isAmount)
|
89
91
|
|
90
|
-
validateRequiredField(tx, 'AttestationRewardAccount',
|
92
|
+
validateRequiredField(tx, 'AttestationRewardAccount', isAccount)
|
91
93
|
|
92
|
-
validateRequiredField(tx, 'AttestationSignerAccount',
|
94
|
+
validateRequiredField(tx, 'AttestationSignerAccount', isAccount)
|
93
95
|
|
94
|
-
validateOptionalField(tx, 'Destination',
|
96
|
+
validateOptionalField(tx, 'Destination', isAccount)
|
95
97
|
|
96
|
-
validateRequiredField(tx, 'OtherChainSource',
|
98
|
+
validateRequiredField(tx, 'OtherChainSource', isAccount)
|
97
99
|
|
98
100
|
validateRequiredField(tx, 'PublicKey', isString)
|
99
101
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { Amount, XChainBridge } from '../common'
|
2
2
|
|
3
3
|
import {
|
4
|
+
Account,
|
4
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
5
7
|
isAmount,
|
6
8
|
isNumber,
|
7
9
|
isString,
|
@@ -38,7 +40,7 @@ export interface XChainClaim extends BaseTransaction {
|
|
38
40
|
* sequence number and collected signatures won't be destroyed, and the
|
39
41
|
* transaction can be rerun with a different destination.
|
40
42
|
*/
|
41
|
-
Destination:
|
43
|
+
Destination: Account
|
42
44
|
|
43
45
|
/**
|
44
46
|
* An integer destination tag.
|
@@ -69,7 +71,7 @@ export function validateXChainClaim(tx: Record<string, unknown>): void {
|
|
69
71
|
(inp) => isNumber(inp) || isString(inp),
|
70
72
|
)
|
71
73
|
|
72
|
-
validateRequiredField(tx, 'Destination',
|
74
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
73
75
|
|
74
76
|
validateOptionalField(tx, 'DestinationTag', isNumber)
|
75
77
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { Amount, XChainBridge } from '../common'
|
2
2
|
|
3
3
|
import {
|
4
|
+
Account,
|
4
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
5
7
|
isAmount,
|
6
8
|
isNumber,
|
7
9
|
isString,
|
@@ -41,7 +43,7 @@ export interface XChainCommit extends BaseTransaction {
|
|
41
43
|
* destination chain will need to submit a {@link XChainClaim} transaction to
|
42
44
|
* claim the funds.
|
43
45
|
*/
|
44
|
-
OtherChainDestination?:
|
46
|
+
OtherChainDestination?: Account
|
45
47
|
|
46
48
|
/**
|
47
49
|
* The asset to commit, and the quantity. This must match the door account's
|
@@ -68,7 +70,7 @@ export function validateXChainCommit(tx: Record<string, unknown>): void {
|
|
68
70
|
(inp) => isNumber(inp) || isString(inp),
|
69
71
|
)
|
70
72
|
|
71
|
-
validateOptionalField(tx, 'OtherChainDestination',
|
73
|
+
validateOptionalField(tx, 'OtherChainDestination', isAccount)
|
72
74
|
|
73
75
|
validateRequiredField(tx, 'Amount', isAmount)
|
74
76
|
}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { Amount, XChainBridge } from '../common'
|
2
2
|
|
3
3
|
import {
|
4
|
+
Account,
|
4
5
|
BaseTransaction,
|
6
|
+
isAccount,
|
5
7
|
isAmount,
|
6
|
-
isString,
|
7
8
|
isXChainBridge,
|
8
9
|
validateBaseTransaction,
|
9
10
|
validateRequiredField,
|
@@ -33,7 +34,7 @@ export interface XChainCreateClaimID extends BaseTransaction {
|
|
33
34
|
/**
|
34
35
|
* The account that must send the {@link XChainCommit} transaction on the source chain.
|
35
36
|
*/
|
36
|
-
OtherChainSource:
|
37
|
+
OtherChainSource: Account
|
37
38
|
}
|
38
39
|
|
39
40
|
/**
|
@@ -49,5 +50,5 @@ export function validateXChainCreateClaimID(tx: Record<string, unknown>): void {
|
|
49
50
|
|
50
51
|
validateRequiredField(tx, 'SignatureReward', isAmount)
|
51
52
|
|
52
|
-
validateRequiredField(tx, 'OtherChainSource',
|
53
|
+
validateRequiredField(tx, 'OtherChainSource', isAccount)
|
53
54
|
}
|
@@ -1,6 +1,12 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
1
|
+
import {
|
2
|
+
Account,
|
3
|
+
BaseTransaction,
|
4
|
+
isAccount,
|
5
|
+
isNumber,
|
6
|
+
validateBaseTransaction,
|
7
|
+
validateOptionalField,
|
8
|
+
validateRequiredField,
|
9
|
+
} from './common'
|
4
10
|
|
5
11
|
/**
|
6
12
|
* An AccountDelete transaction deletes an account and any objects it owns in
|
@@ -16,7 +22,7 @@ export interface AccountDelete extends BaseTransaction {
|
|
16
22
|
* sending account. Must be a funded account in the ledger, and must not be.
|
17
23
|
* the sending account.
|
18
24
|
*/
|
19
|
-
Destination:
|
25
|
+
Destination: Account
|
20
26
|
/**
|
21
27
|
* Arbitrary destination tag that identifies a hosted recipient or other.
|
22
28
|
* information for the recipient of the deleted account's leftover XRP.
|
@@ -33,18 +39,6 @@ export interface AccountDelete extends BaseTransaction {
|
|
33
39
|
export function validateAccountDelete(tx: Record<string, unknown>): void {
|
34
40
|
validateBaseTransaction(tx)
|
35
41
|
|
36
|
-
|
37
|
-
|
38
|
-
}
|
39
|
-
|
40
|
-
if (typeof tx.Destination !== 'string') {
|
41
|
-
throw new ValidationError('AccountDelete: invalid Destination')
|
42
|
-
}
|
43
|
-
|
44
|
-
if (
|
45
|
-
tx.DestinationTag !== undefined &&
|
46
|
-
typeof tx.DestinationTag !== 'number'
|
47
|
-
) {
|
48
|
-
throw new ValidationError('AccountDelete: invalid DestinationTag')
|
49
|
-
}
|
42
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
43
|
+
validateOptionalField(tx, 'DestinationTag', isNumber)
|
50
44
|
}
|
@@ -1,8 +1,12 @@
|
|
1
|
-
import { isValidClassicAddress } from 'ripple-address-codec'
|
2
|
-
|
3
1
|
import { ValidationError } from '../../errors'
|
4
2
|
|
5
|
-
import {
|
3
|
+
import {
|
4
|
+
Account,
|
5
|
+
BaseTransaction,
|
6
|
+
isAccount,
|
7
|
+
validateBaseTransaction,
|
8
|
+
validateOptionalField,
|
9
|
+
} from './common'
|
6
10
|
|
7
11
|
/**
|
8
12
|
* Enum for AccountSet Flags.
|
@@ -155,7 +159,7 @@ export interface AccountSet extends BaseTransaction {
|
|
155
159
|
* Sets an alternate account that is allowed to mint NFTokens on this
|
156
160
|
* account's behalf using NFTokenMint's `Issuer` field.
|
157
161
|
*/
|
158
|
-
NFTokenMinter?:
|
162
|
+
NFTokenMinter?: Account
|
159
163
|
}
|
160
164
|
|
161
165
|
const MIN_TICK_SIZE = 3
|
@@ -167,16 +171,11 @@ const MAX_TICK_SIZE = 15
|
|
167
171
|
* @param tx - An AccountSet Transaction.
|
168
172
|
* @throws When the AccountSet is Malformed.
|
169
173
|
*/
|
170
|
-
// eslint-disable-next-line max-lines-per-function
|
174
|
+
// eslint-disable-next-line max-lines-per-function -- okay for this method, only a little over
|
171
175
|
export function validateAccountSet(tx: Record<string, unknown>): void {
|
172
176
|
validateBaseTransaction(tx)
|
173
177
|
|
174
|
-
|
175
|
-
tx.NFTokenMinter !== undefined &&
|
176
|
-
!isValidClassicAddress(String(tx.NFTokenMinter))
|
177
|
-
) {
|
178
|
-
throw new ValidationError('AccountSet: invalid NFTokenMinter')
|
179
|
-
}
|
178
|
+
validateOptionalField(tx, 'NFTokenMinter', isAccount)
|
180
179
|
|
181
180
|
if (tx.ClearFlag !== undefined) {
|
182
181
|
if (typeof tx.ClearFlag !== 'number') {
|
@@ -5,6 +5,11 @@ import {
|
|
5
5
|
BaseTransaction,
|
6
6
|
validateBaseTransaction,
|
7
7
|
isIssuedCurrency,
|
8
|
+
isAccount,
|
9
|
+
validateRequiredField,
|
10
|
+
validateOptionalField,
|
11
|
+
isNumber,
|
12
|
+
Account,
|
8
13
|
} from './common'
|
9
14
|
|
10
15
|
/**
|
@@ -17,7 +22,7 @@ import {
|
|
17
22
|
export interface CheckCreate extends BaseTransaction {
|
18
23
|
TransactionType: 'CheckCreate'
|
19
24
|
/** The unique address of the account that can cash the Check. */
|
20
|
-
Destination:
|
25
|
+
Destination: Account
|
21
26
|
/**
|
22
27
|
* Maximum amount of source currency the Check is allowed to debit the
|
23
28
|
* sender, including transfer fees on non-XRP currencies. The Check can only
|
@@ -56,9 +61,8 @@ export function validateCheckCreate(tx: Record<string, unknown>): void {
|
|
56
61
|
throw new ValidationError('CheckCreate: missing field SendMax')
|
57
62
|
}
|
58
63
|
|
59
|
-
|
60
|
-
|
61
|
-
}
|
64
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
65
|
+
validateOptionalField(tx, 'DestinationTag', isNumber)
|
62
66
|
|
63
67
|
if (
|
64
68
|
typeof tx.SendMax !== 'string' &&
|
@@ -68,17 +72,6 @@ export function validateCheckCreate(tx: Record<string, unknown>): void {
|
|
68
72
|
throw new ValidationError('CheckCreate: invalid SendMax')
|
69
73
|
}
|
70
74
|
|
71
|
-
if (typeof tx.Destination !== 'string') {
|
72
|
-
throw new ValidationError('CheckCreate: invalid Destination')
|
73
|
-
}
|
74
|
-
|
75
|
-
if (
|
76
|
-
tx.DestinationTag !== undefined &&
|
77
|
-
typeof tx.DestinationTag !== 'number'
|
78
|
-
) {
|
79
|
-
throw new ValidationError('CheckCreate: invalid DestinationTag')
|
80
|
-
}
|
81
|
-
|
82
75
|
if (tx.Expiration !== undefined && typeof tx.Expiration !== 'number') {
|
83
76
|
throw new ValidationError('CheckCreate: invalid Expiration')
|
84
77
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { isValidClassicAddress, isValidXAddress } from 'ripple-address-codec'
|
1
2
|
import { TRANSACTION_TYPES } from 'ripple-binary-codec'
|
2
3
|
|
3
4
|
import { ValidationError } from '../../errors'
|
@@ -118,6 +119,24 @@ export function isIssuedCurrency(
|
|
118
119
|
)
|
119
120
|
}
|
120
121
|
|
122
|
+
/**
|
123
|
+
* Must be a valid account address
|
124
|
+
*/
|
125
|
+
export type Account = string
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Verify a string is in fact a valid account address.
|
129
|
+
*
|
130
|
+
* @param account - The object to check the form and type of.
|
131
|
+
* @returns Whether the account is properly formed account for a transaction.
|
132
|
+
*/
|
133
|
+
export function isAccount(account: unknown): account is Account {
|
134
|
+
return (
|
135
|
+
typeof account === 'string' &&
|
136
|
+
(isValidClassicAddress(account) || isValidXAddress(account))
|
137
|
+
)
|
138
|
+
}
|
139
|
+
|
121
140
|
/**
|
122
141
|
* Verify the form and type of an Amount at runtime.
|
123
142
|
*
|
@@ -203,7 +222,7 @@ export interface GlobalFlags {}
|
|
203
222
|
*/
|
204
223
|
export interface BaseTransaction {
|
205
224
|
/** The unique address of the transaction sender. */
|
206
|
-
Account:
|
225
|
+
Account: Account
|
207
226
|
/**
|
208
227
|
* The type of transaction. Valid types include: `Payment`, `OfferCreate`,
|
209
228
|
* `TrustSet`, and many others.
|
@@ -1,6 +1,12 @@
|
|
1
1
|
import { ValidationError } from '../../errors'
|
2
2
|
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
Account,
|
5
|
+
BaseTransaction,
|
6
|
+
isAccount,
|
7
|
+
validateBaseTransaction,
|
8
|
+
validateRequiredField,
|
9
|
+
} from './common'
|
4
10
|
|
5
11
|
/**
|
6
12
|
* Return escrowed XRP to the sender.
|
@@ -10,7 +16,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
|
10
16
|
export interface EscrowCancel extends BaseTransaction {
|
11
17
|
TransactionType: 'EscrowCancel'
|
12
18
|
/** Address of the source account that funded the escrow payment. */
|
13
|
-
Owner:
|
19
|
+
Owner: Account
|
14
20
|
/**
|
15
21
|
* Transaction sequence (or Ticket number) of EscrowCreate transaction that.
|
16
22
|
* created the escrow to cancel.
|
@@ -27,13 +33,7 @@ export interface EscrowCancel extends BaseTransaction {
|
|
27
33
|
export function validateEscrowCancel(tx: Record<string, unknown>): void {
|
28
34
|
validateBaseTransaction(tx)
|
29
35
|
|
30
|
-
|
31
|
-
throw new ValidationError('EscrowCancel: missing Owner')
|
32
|
-
}
|
33
|
-
|
34
|
-
if (typeof tx.Owner !== 'string') {
|
35
|
-
throw new ValidationError('EscrowCancel: Owner must be a string')
|
36
|
-
}
|
36
|
+
validateRequiredField(tx, 'Owner', isAccount)
|
37
37
|
|
38
38
|
if (tx.OfferSequence == null) {
|
39
39
|
throw new ValidationError('EscrowCancel: missing OfferSequence')
|
@@ -1,6 +1,14 @@
|
|
1
1
|
import { ValidationError } from '../../errors'
|
2
2
|
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
Account,
|
5
|
+
BaseTransaction,
|
6
|
+
isAccount,
|
7
|
+
isNumber,
|
8
|
+
validateBaseTransaction,
|
9
|
+
validateOptionalField,
|
10
|
+
validateRequiredField,
|
11
|
+
} from './common'
|
4
12
|
|
5
13
|
/**
|
6
14
|
* Sequester XRP until the escrow process either finishes or is canceled.
|
@@ -16,7 +24,7 @@ export interface EscrowCreate extends BaseTransaction {
|
|
16
24
|
*/
|
17
25
|
Amount: string
|
18
26
|
/** Address to receive escrowed XRP. */
|
19
|
-
Destination:
|
27
|
+
Destination: Account
|
20
28
|
/**
|
21
29
|
* The time, in seconds since the Ripple Epoch, when this escrow expires.
|
22
30
|
* This value is immutable; the funds can only be returned the sender after.
|
@@ -58,13 +66,8 @@ export function validateEscrowCreate(tx: Record<string, unknown>): void {
|
|
58
66
|
throw new ValidationError('EscrowCreate: Amount must be a string')
|
59
67
|
}
|
60
68
|
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
|
65
|
-
if (typeof tx.Destination !== 'string') {
|
66
|
-
throw new ValidationError('EscrowCreate: Destination must be a string')
|
67
|
-
}
|
69
|
+
validateRequiredField(tx, 'Destination', isAccount)
|
70
|
+
validateOptionalField(tx, 'DestinationTag', isNumber)
|
68
71
|
|
69
72
|
if (tx.CancelAfter === undefined && tx.FinishAfter === undefined) {
|
70
73
|
throw new ValidationError(
|
@@ -89,11 +92,4 @@ export function validateEscrowCreate(tx: Record<string, unknown>): void {
|
|
89
92
|
if (tx.Condition !== undefined && typeof tx.Condition !== 'string') {
|
90
93
|
throw new ValidationError('EscrowCreate: Condition must be a string')
|
91
94
|
}
|
92
|
-
|
93
|
-
if (
|
94
|
-
tx.DestinationTag !== undefined &&
|
95
|
-
typeof tx.DestinationTag !== 'number'
|
96
|
-
) {
|
97
|
-
throw new ValidationError('EscrowCreate: DestinationTag must be a number')
|
98
|
-
}
|
99
95
|
}
|