xrpl 4.3.0-smartescrow.2 → 4.3.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 +2 -2
- package/build/xrpl-latest-min.js +3 -0
- package/build/xrpl-latest-min.js.map +1 -0
- package/build/xrpl-latest.js +494 -145
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/batchSigner.d.ts +8 -0
- package/dist/npm/Wallet/batchSigner.d.ts.map +1 -0
- package/dist/npm/Wallet/batchSigner.js +111 -0
- package/dist/npm/Wallet/batchSigner.js.map +1 -0
- package/dist/npm/Wallet/defaultFaucets.d.ts +4 -4
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +15 -17
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/Wallet/fundWallet.js +8 -16
- 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 +10 -4
- package/dist/npm/Wallet/index.js.map +1 -1
- package/dist/npm/Wallet/signer.d.ts.map +1 -1
- package/dist/npm/Wallet/signer.js +4 -20
- package/dist/npm/Wallet/signer.js.map +1 -1
- package/dist/npm/Wallet/utils.d.ts +9 -0
- package/dist/npm/Wallet/utils.d.ts.map +1 -0
- package/dist/npm/Wallet/utils.js +28 -0
- package/dist/npm/Wallet/utils.js.map +1 -0
- package/dist/npm/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/client/RequestManager.js +3 -3
- package/dist/npm/client/RequestManager.js.map +1 -1
- package/dist/npm/client/connection.d.ts.map +1 -1
- package/dist/npm/client/connection.js.map +1 -1
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js +6 -9
- package/dist/npm/client/index.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/ledger/Credential.d.ts +2 -2
- package/dist/npm/models/ledger/Credential.d.ts.map +1 -1
- package/dist/npm/models/ledger/Delegate.d.ts +11 -0
- package/dist/npm/models/ledger/Delegate.d.ts.map +1 -0
- package/dist/npm/models/ledger/Delegate.js +3 -0
- package/dist/npm/models/ledger/Delegate.js.map +1 -0
- package/dist/npm/models/ledger/Escrow.d.ts +0 -2
- package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/models/ledger/FeeSettings.d.ts +0 -2
- package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts +3 -2
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts +1 -2
- package/dist/npm/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.d.ts +2 -1
- package/dist/npm/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.js.map +1 -1
- package/dist/npm/models/methods/baseMethod.d.ts +1 -0
- package/dist/npm/models/methods/baseMethod.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +4 -0
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/serverInfo.d.ts +0 -6
- package/dist/npm/models/methods/serverInfo.d.ts.map +1 -1
- package/dist/npm/models/methods/serverState.d.ts +0 -6
- package/dist/npm/models/methods/serverState.d.ts.map +1 -1
- 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/AMMClawback.d.ts +2 -2
- package/dist/npm/models/transactions/AMMClawback.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.d.ts +2 -2
- package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMWithdraw.d.ts +2 -2
- package/dist/npm/models/transactions/AMMWithdraw.d.ts.map +1 -1
- package/dist/npm/models/transactions/MPTokenAuthorize.d.ts +2 -2
- package/dist/npm/models/transactions/MPTokenAuthorize.d.ts.map +1 -1
- package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts +2 -2
- package/dist/npm/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
- package/dist/npm/models/transactions/MPTokenIssuanceSet.d.ts +2 -2
- package/dist/npm/models/transactions/MPTokenIssuanceSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts +2 -2
- package/dist/npm/models/transactions/NFTokenCreateOffer.d.ts.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/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts +2 -2
- package/dist/npm/models/transactions/XChainModifyBridge.d.ts.map +1 -1
- package/dist/npm/models/transactions/accountDelete.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/npm/models/transactions/batch.d.ts +39 -0
- package/dist/npm/models/transactions/batch.d.ts.map +1 -0
- package/dist/npm/models/transactions/batch.js +64 -0
- package/dist/npm/models/transactions/batch.js.map +1 -0
- package/dist/npm/models/transactions/common.d.ts +23 -6
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +30 -10
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/delegateSet.d.ts +13 -0
- package/dist/npm/models/transactions/delegateSet.d.ts.map +1 -0
- package/dist/npm/models/transactions/delegateSet.js +54 -0
- package/dist/npm/models/transactions/delegateSet.js.map +1 -0
- 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/escrowCreate.d.ts +0 -2
- package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.js +2 -4
- package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts +0 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +4 -2
- 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 +1 -0
- package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/models/transactions/offerCreate.d.ts +2 -2
- package/dist/npm/models/transactions/offerCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/oracleSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/oracleSet.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 +3 -0
- package/dist/npm/models/transactions/payment.js.map +1 -1
- package/dist/npm/models/transactions/paymentChannelClaim.d.ts +2 -2
- 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/permissionedDomainSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/permissionedDomainSet.js +1 -1
- package/dist/npm/models/transactions/permissionedDomainSet.js.map +1 -1
- package/dist/npm/models/transactions/signerListSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/signerListSet.js +1 -1
- package/dist/npm/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +3 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +11 -0
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/models/transactions/trustSet.d.ts +2 -2
- package/dist/npm/models/transactions/trustSet.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.js +24 -9
- package/dist/npm/models/utils/flags.js.map +1 -1
- package/dist/npm/models/utils/index.d.ts +2 -0
- package/dist/npm/models/utils/index.d.ts.map +1 -1
- package/dist/npm/models/utils/index.js +11 -1
- package/dist/npm/models/utils/index.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
- package/dist/npm/src/Wallet/batchSigner.d.ts +8 -0
- package/dist/npm/src/Wallet/batchSigner.d.ts.map +1 -0
- package/dist/npm/src/Wallet/batchSigner.js +111 -0
- package/dist/npm/src/Wallet/batchSigner.js.map +1 -0
- package/dist/npm/src/Wallet/defaultFaucets.d.ts +4 -4
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +15 -17
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.js +8 -16
- 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 +10 -4
- package/dist/npm/src/Wallet/index.js.map +1 -1
- package/dist/npm/src/Wallet/signer.d.ts.map +1 -1
- package/dist/npm/src/Wallet/signer.js +4 -20
- package/dist/npm/src/Wallet/signer.js.map +1 -1
- package/dist/npm/src/Wallet/utils.d.ts +9 -0
- package/dist/npm/src/Wallet/utils.d.ts.map +1 -0
- package/dist/npm/src/Wallet/utils.js +28 -0
- package/dist/npm/src/Wallet/utils.js.map +1 -0
- package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/src/client/RequestManager.js +3 -3
- package/dist/npm/src/client/RequestManager.js.map +1 -1
- package/dist/npm/src/client/connection.d.ts.map +1 -1
- package/dist/npm/src/client/connection.js.map +1 -1
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js +6 -9
- package/dist/npm/src/client/index.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/ledger/Credential.d.ts +2 -2
- package/dist/npm/src/models/ledger/Credential.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Delegate.d.ts +11 -0
- package/dist/npm/src/models/ledger/Delegate.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/Delegate.js +3 -0
- package/dist/npm/src/models/ledger/Delegate.js.map +1 -0
- package/dist/npm/src/models/ledger/Escrow.d.ts +0 -2
- package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/FeeSettings.d.ts +0 -2
- package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +3 -2
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts +1 -2
- package/dist/npm/src/models/ledger/XChainOwnedClaimID.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.d.ts +2 -1
- package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.js.map +1 -1
- package/dist/npm/src/models/methods/baseMethod.d.ts +1 -0
- package/dist/npm/src/models/methods/baseMethod.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +4 -0
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/serverInfo.d.ts +0 -6
- package/dist/npm/src/models/methods/serverInfo.d.ts.map +1 -1
- package/dist/npm/src/models/methods/serverState.d.ts +0 -6
- package/dist/npm/src/models/methods/serverState.d.ts.map +1 -1
- 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/AMMClawback.d.ts +2 -2
- package/dist/npm/src/models/transactions/AMMClawback.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts +2 -2
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMWithdraw.d.ts +2 -2
- package/dist/npm/src/models/transactions/AMMWithdraw.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/MPTokenAuthorize.d.ts +2 -2
- package/dist/npm/src/models/transactions/MPTokenAuthorize.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts +2 -2
- package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/MPTokenIssuanceCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/MPTokenIssuanceSet.d.ts +2 -2
- package/dist/npm/src/models/transactions/MPTokenIssuanceSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts +2 -2
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.d.ts.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/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainClaim.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainCommit.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts +2 -2
- package/dist/npm/src/models/transactions/XChainModifyBridge.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/accountDelete.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/npm/src/models/transactions/batch.d.ts +39 -0
- package/dist/npm/src/models/transactions/batch.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/batch.js +64 -0
- package/dist/npm/src/models/transactions/batch.js.map +1 -0
- package/dist/npm/src/models/transactions/common.d.ts +23 -6
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +30 -10
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/delegateSet.d.ts +13 -0
- package/dist/npm/src/models/transactions/delegateSet.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/delegateSet.js +54 -0
- package/dist/npm/src/models/transactions/delegateSet.js.map +1 -0
- 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/escrowCreate.d.ts +0 -2
- package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.js +2 -4
- package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts +0 -1
- package/dist/npm/src/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +4 -2
- 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 +1 -0
- package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/offerCreate.d.ts +2 -2
- package/dist/npm/src/models/transactions/offerCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/oracleSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/oracleSet.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 +3 -0
- package/dist/npm/src/models/transactions/payment.js.map +1 -1
- package/dist/npm/src/models/transactions/paymentChannelClaim.d.ts +2 -2
- 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/permissionedDomainSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/permissionedDomainSet.js +1 -1
- package/dist/npm/src/models/transactions/permissionedDomainSet.js.map +1 -1
- package/dist/npm/src/models/transactions/signerListSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/signerListSet.js +1 -1
- package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +3 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +11 -0
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/models/transactions/trustSet.d.ts +2 -2
- package/dist/npm/src/models/transactions/trustSet.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.js +24 -9
- package/dist/npm/src/models/utils/flags.js.map +1 -1
- package/dist/npm/src/models/utils/index.d.ts +2 -0
- package/dist/npm/src/models/utils/index.d.ts.map +1 -1
- package/dist/npm/src/models/utils/index.js +11 -1
- package/dist/npm/src/models/utils/index.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts +4 -2
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js +114 -42
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/sugar/submit.d.ts.map +1 -1
- package/dist/npm/src/sugar/submit.js.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.js +4 -1
- package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts +4 -2
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js +114 -42
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/submit.d.ts.map +1 -1
- package/dist/npm/sugar/submit.js.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.js +4 -1
- package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
- package/package.json +5 -5
- package/src/Wallet/batchSigner.ts +198 -0
- package/src/Wallet/defaultFaucets.ts +17 -20
- package/src/Wallet/fundWallet.ts +17 -28
- package/src/Wallet/index.ts +9 -3
- package/src/Wallet/signer.ts +4 -39
- package/src/Wallet/utils.ts +58 -0
- package/src/client/RequestManager.ts +4 -1
- package/src/client/connection.ts +0 -1
- package/src/client/index.ts +9 -30
- package/src/client/partialPayment.ts +3 -4
- package/src/models/ledger/Credential.ts +2 -2
- package/src/models/ledger/Delegate.ts +39 -0
- package/src/models/ledger/Escrow.ts +0 -4
- package/src/models/ledger/FeeSettings.ts +0 -4
- package/src/models/ledger/LedgerEntry.ts +3 -0
- package/src/models/ledger/XChainOwnedClaimID.ts +1 -3
- package/src/models/ledger/index.ts +2 -0
- package/src/models/methods/baseMethod.ts +1 -0
- package/src/models/methods/ledgerEntry.ts +5 -0
- package/src/models/methods/serverInfo.ts +0 -9
- package/src/models/methods/serverState.ts +0 -10
- package/src/models/transactions/AMMBid.ts +1 -2
- package/src/models/transactions/AMMClawback.ts +2 -2
- package/src/models/transactions/AMMDeposit.ts +2 -2
- package/src/models/transactions/AMMWithdraw.ts +2 -2
- package/src/models/transactions/MPTokenAuthorize.ts +2 -2
- package/src/models/transactions/MPTokenIssuanceCreate.ts +3 -2
- package/src/models/transactions/MPTokenIssuanceSet.ts +2 -2
- package/src/models/transactions/NFTokenCreateOffer.ts +2 -2
- package/src/models/transactions/NFTokenMint.ts +2 -2
- package/src/models/transactions/XChainAddAccountCreateAttestation.ts +2 -2
- package/src/models/transactions/XChainAddClaimAttestation.ts +2 -2
- package/src/models/transactions/XChainClaim.ts +1 -1
- package/src/models/transactions/XChainCommit.ts +1 -1
- package/src/models/transactions/XChainModifyBridge.ts +2 -2
- package/src/models/transactions/accountDelete.ts +1 -2
- package/src/models/transactions/accountSet.ts +2 -1
- package/src/models/transactions/batch.ts +151 -0
- package/src/models/transactions/common.ts +95 -29
- package/src/models/transactions/delegateSet.ts +112 -0
- package/src/models/transactions/depositPreauth.ts +2 -4
- package/src/models/transactions/escrowCreate.ts +2 -10
- package/src/models/transactions/escrowFinish.ts +1 -4
- package/src/models/transactions/index.ts +4 -3
- package/src/models/transactions/metadata.ts +2 -0
- package/src/models/transactions/offerCreate.ts +2 -2
- package/src/models/transactions/oracleSet.ts +95 -91
- package/src/models/transactions/payment.ts +8 -6
- package/src/models/transactions/paymentChannelClaim.ts +4 -4
- package/src/models/transactions/permissionedDomainSet.ts +3 -7
- package/src/models/transactions/signerListSet.ts +2 -2
- package/src/models/transactions/transaction.ts +21 -0
- package/src/models/transactions/trustSet.ts +2 -2
- package/src/models/utils/flags.ts +28 -10
- package/src/models/utils/index.ts +24 -0
- package/src/sugar/autofill.ts +178 -61
- package/src/sugar/submit.ts +1 -2
- package/src/utils/hashes/hashLedger.ts +5 -2
@@ -0,0 +1,58 @@
|
|
1
|
+
import { bytesToHex } from '@xrplf/isomorphic/utils'
|
2
|
+
import BigNumber from 'bignumber.js'
|
3
|
+
import { decodeAccountID } from 'ripple-address-codec'
|
4
|
+
import { decode, encode } from 'ripple-binary-codec'
|
5
|
+
|
6
|
+
import { Transaction } from '../models'
|
7
|
+
|
8
|
+
/**
|
9
|
+
* If presented in binary form, the Signers array must be sorted based on
|
10
|
+
* the numeric value of the signer addresses, with the lowest value first.
|
11
|
+
* (If submitted as JSON, the submit_multisigned method handles this automatically.)
|
12
|
+
* https://xrpl.org/multi-signing.html.
|
13
|
+
*
|
14
|
+
* @param left - A Signer to compare with.
|
15
|
+
* @param right - A second Signer to compare with.
|
16
|
+
* @returns 1 if left \> right, 0 if left = right, -1 if left \< right, and null if left or right are NaN.
|
17
|
+
*/
|
18
|
+
export function compareSigners<T extends { Account: string }>(
|
19
|
+
left: T,
|
20
|
+
right: T,
|
21
|
+
): number {
|
22
|
+
return addressToBigNumber(left.Account).comparedTo(
|
23
|
+
addressToBigNumber(right.Account),
|
24
|
+
)
|
25
|
+
}
|
26
|
+
|
27
|
+
export const NUM_BITS_IN_HEX = 16
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Converts an address to a BigNumber.
|
31
|
+
*
|
32
|
+
* @param address - The address to convert.
|
33
|
+
* @returns A BigNumber representing the address.
|
34
|
+
*/
|
35
|
+
export function addressToBigNumber(address: string): BigNumber {
|
36
|
+
const hex = bytesToHex(decodeAccountID(address))
|
37
|
+
return new BigNumber(hex, NUM_BITS_IN_HEX)
|
38
|
+
}
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Decodes a transaction or transaction blob into a Transaction object.
|
42
|
+
*
|
43
|
+
* @param txOrBlob - A Transaction object or a hex string representing a transaction blob.
|
44
|
+
* @returns A Transaction object.
|
45
|
+
* @throws If the input is not a valid Transaction or transaction blob.
|
46
|
+
*/
|
47
|
+
export function getDecodedTransaction(
|
48
|
+
txOrBlob: Transaction | string,
|
49
|
+
): Transaction {
|
50
|
+
if (typeof txOrBlob === 'object') {
|
51
|
+
// We need this to handle X-addresses in multisigning
|
52
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We are casting here to get strong typing
|
53
|
+
return decode(encode(txOrBlob)) as unknown as Transaction
|
54
|
+
}
|
55
|
+
|
56
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We are casting here to get strong typing
|
57
|
+
return decode(txOrBlob) as unknown as Transaction
|
58
|
+
}
|
@@ -175,6 +175,7 @@ export default class RequestManager {
|
|
175
175
|
* @param response - The response to handle.
|
176
176
|
* @throws ResponseFormatError if the response format is invalid, RippledError if rippled returns an error.
|
177
177
|
*/
|
178
|
+
// eslint-disable-next-line complexity -- handling a response is complex
|
178
179
|
public handleResponse(
|
179
180
|
response: Partial<Response<APIVersion> | ErrorResponse>,
|
180
181
|
): void {
|
@@ -195,7 +196,9 @@ export default class RequestManager {
|
|
195
196
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- We know this must be true
|
196
197
|
const errorResponse = response as Partial<ErrorResponse>
|
197
198
|
const error = new RippledError(
|
198
|
-
errorResponse.error_message ??
|
199
|
+
errorResponse.error_message ??
|
200
|
+
errorResponse.error_exception ??
|
201
|
+
errorResponse.error,
|
199
202
|
errorResponse,
|
200
203
|
)
|
201
204
|
this.reject(response.id, error)
|
package/src/client/connection.ts
CHANGED
@@ -349,7 +349,6 @@ export class Connection extends EventEmitter {
|
|
349
349
|
try {
|
350
350
|
this.requestManager.handleResponse(data)
|
351
351
|
} catch (error) {
|
352
|
-
// eslint-disable-next-line max-depth -- okay here
|
353
352
|
if (error instanceof Error) {
|
354
353
|
this.emit('error', 'badMessage', error.message, message)
|
355
354
|
} else {
|
package/src/client/index.ts
CHANGED
@@ -63,10 +63,12 @@ import {
|
|
63
63
|
import {
|
64
64
|
setValidAddresses,
|
65
65
|
setNextValidSequenceNumber,
|
66
|
-
calculateFeePerTransactionType,
|
67
66
|
setLatestValidatedLedgerSequence,
|
68
67
|
checkAccountDeleteBlockers,
|
69
68
|
txNeedsNetworkID,
|
69
|
+
autofillBatchTxn,
|
70
|
+
handleDeliverMax,
|
71
|
+
getTransactionFee,
|
70
72
|
} from '../sugar/autofill'
|
71
73
|
import { formatBalances } from '../sugar/balances'
|
72
74
|
import {
|
@@ -662,7 +664,6 @@ class Client extends EventEmitter<EventTypes> {
|
|
662
664
|
* @throws ValidationError If Amount and DeliverMax fields are not identical in a Payment Transaction
|
663
665
|
*/
|
664
666
|
|
665
|
-
// eslint-disable-next-line complexity -- handling Payment transaction API v2 requires more logic
|
666
667
|
public async autofill<T extends SubmittableTransaction>(
|
667
668
|
transaction: T,
|
668
669
|
signersCount?: number,
|
@@ -680,7 +681,7 @@ class Client extends EventEmitter<EventTypes> {
|
|
680
681
|
promises.push(setNextValidSequenceNumber(this, tx))
|
681
682
|
}
|
682
683
|
if (tx.Fee == null) {
|
683
|
-
promises.push(
|
684
|
+
promises.push(getTransactionFee(this, tx, signersCount))
|
684
685
|
}
|
685
686
|
if (tx.LastLedgerSequence == null) {
|
686
687
|
promises.push(setLatestValidatedLedgerSequence(this, tx))
|
@@ -688,33 +689,11 @@ class Client extends EventEmitter<EventTypes> {
|
|
688
689
|
if (tx.TransactionType === 'AccountDelete') {
|
689
690
|
promises.push(checkAccountDeleteBlockers(this, tx))
|
690
691
|
}
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
if (tx.TransactionType === 'Payment'
|
695
|
-
|
696
|
-
if (tx.Amount == null) {
|
697
|
-
// If only DeliverMax is provided, use it to populate the Amount field
|
698
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
|
699
|
-
// @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
|
700
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- DeliverMax is a known RPC-level property
|
701
|
-
tx.Amount = tx.DeliverMax
|
702
|
-
}
|
703
|
-
|
704
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
|
705
|
-
// @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
|
706
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- This is a valid null check for Amount
|
707
|
-
if (tx.Amount != null && tx.Amount !== tx.DeliverMax) {
|
708
|
-
return Promise.reject(
|
709
|
-
new ValidationError(
|
710
|
-
'PaymentTransaction: Amount and DeliverMax fields must be identical when both are provided',
|
711
|
-
),
|
712
|
-
)
|
713
|
-
}
|
714
|
-
|
715
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- ignore type-assertions on the DeliverMax property
|
716
|
-
// @ts-expect-error -- DeliverMax property exists only at the RPC level, not at the protocol level
|
717
|
-
delete tx.DeliverMax
|
692
|
+
if (tx.TransactionType === 'Batch') {
|
693
|
+
promises.push(autofillBatchTxn(this, tx))
|
694
|
+
}
|
695
|
+
if (tx.TransactionType === 'Payment') {
|
696
|
+
handleDeliverMax(tx)
|
718
697
|
}
|
719
698
|
|
720
699
|
return Promise.all(promises).then(() => tx)
|
@@ -96,10 +96,9 @@ function isPartialPayment(
|
|
96
96
|
}
|
97
97
|
|
98
98
|
const delivered = meta.delivered_amount
|
99
|
-
|
100
|
-
// @
|
101
|
-
|
102
|
-
const amount = tx.DeliverMax
|
99
|
+
|
100
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- needed here
|
101
|
+
const amount = tx.DeliverMax as Amount | MPTAmount
|
103
102
|
|
104
103
|
if (delivered === undefined) {
|
105
104
|
return false
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { GlobalFlagsInterface } from '../transactions/common'
|
2
2
|
|
3
3
|
import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
|
4
4
|
|
5
|
-
export interface CredentialFlags extends
|
5
|
+
export interface CredentialFlags extends GlobalFlagsInterface {
|
6
6
|
lsfAccepted?: boolean
|
7
7
|
}
|
8
8
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Permission } from '../transactions'
|
2
|
+
|
3
|
+
import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* This object represents a set of permissions that an account has delegated to another account.
|
7
|
+
*
|
8
|
+
* @category Ledger Entries
|
9
|
+
*/
|
10
|
+
export default interface Delegate extends BaseLedgerEntry, HasPreviousTxnID {
|
11
|
+
LedgerEntryType: 'Delegate'
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The account that wants to authorize another account.
|
15
|
+
*/
|
16
|
+
Account: string
|
17
|
+
|
18
|
+
/**
|
19
|
+
* The authorized account.
|
20
|
+
*/
|
21
|
+
Authorize: string
|
22
|
+
|
23
|
+
/**
|
24
|
+
* The transaction permissions that the account has access to.
|
25
|
+
*/
|
26
|
+
Permissions: Permission[]
|
27
|
+
|
28
|
+
/**
|
29
|
+
* A hint indicating which page of the sender's owner directory links to this object,
|
30
|
+
* in case the directory consists of multiple pages.
|
31
|
+
*/
|
32
|
+
OwnerNode: string
|
33
|
+
|
34
|
+
/**
|
35
|
+
* A bit-map of boolean flags. No flags are defined for the Delegate object
|
36
|
+
* type, so this value is always 0.
|
37
|
+
*/
|
38
|
+
Flags: 0
|
39
|
+
}
|
@@ -24,10 +24,6 @@ export interface FeeSettingsPostAmendmentFields {
|
|
24
24
|
ReserveBaseDrops: string
|
25
25
|
/** The incremental owner reserve for owning objects, as drops of XRP. */
|
26
26
|
ReserveIncrementDrops: string
|
27
|
-
|
28
|
-
ExtensionComputeLimit: number
|
29
|
-
|
30
|
-
ExtensionSizeLimit: number
|
31
27
|
}
|
32
28
|
|
33
29
|
export interface FeeSettingsBase
|
@@ -4,6 +4,7 @@ import AMM from './AMM'
|
|
4
4
|
import Bridge from './Bridge'
|
5
5
|
import Check from './Check'
|
6
6
|
import Credential from './Credential'
|
7
|
+
import Delegate from './Delegate'
|
7
8
|
import DepositPreauth from './DepositPreauth'
|
8
9
|
import DirectoryNode from './DirectoryNode'
|
9
10
|
import Escrow from './Escrow'
|
@@ -27,6 +28,7 @@ type LedgerEntry =
|
|
27
28
|
| Bridge
|
28
29
|
| Check
|
29
30
|
| Credential
|
31
|
+
| Delegate
|
30
32
|
| DepositPreauth
|
31
33
|
| DirectoryNode
|
32
34
|
| Escrow
|
@@ -50,6 +52,7 @@ type LedgerEntryFilter =
|
|
50
52
|
| 'bridge'
|
51
53
|
| 'check'
|
52
54
|
| 'credential'
|
55
|
+
| 'delegate'
|
53
56
|
| 'deposit_preauth'
|
54
57
|
| 'did'
|
55
58
|
| 'directory'
|
@@ -7,6 +7,7 @@ import AMM, { VoteSlot } from './AMM'
|
|
7
7
|
import Bridge from './Bridge'
|
8
8
|
import Check from './Check'
|
9
9
|
import Credential from './Credential'
|
10
|
+
import Delegate from './Delegate'
|
10
11
|
import DepositPreauth from './DepositPreauth'
|
11
12
|
import DID from './DID'
|
12
13
|
import DirectoryNode from './DirectoryNode'
|
@@ -43,6 +44,7 @@ export {
|
|
43
44
|
Bridge,
|
44
45
|
Check,
|
45
46
|
Credential,
|
47
|
+
Delegate,
|
46
48
|
DepositPreauth,
|
47
49
|
DirectoryNode,
|
48
50
|
DID,
|
@@ -85,11 +85,6 @@ export interface ServerInfoResponse extends BaseResponse {
|
|
85
85
|
hash: string
|
86
86
|
reserve_base_xrp: number
|
87
87
|
reserve_inc_xrp: number
|
88
|
-
|
89
|
-
extension_compute: number
|
90
|
-
extension_size: number
|
91
|
-
gas_price: number
|
92
|
-
|
93
88
|
seq: number
|
94
89
|
}
|
95
90
|
/**
|
@@ -257,10 +252,6 @@ export interface ServerInfoResponse extends BaseResponse {
|
|
257
252
|
* object an account owns in the ledger.
|
258
253
|
*/
|
259
254
|
reserve_inc_xrp: number
|
260
|
-
|
261
|
-
extension_compute: number
|
262
|
-
extension_size: number
|
263
|
-
gas_price: number
|
264
255
|
/** The ledger index of the latest validated ledger. */
|
265
256
|
seq: number
|
266
257
|
}
|
@@ -30,11 +30,6 @@ export interface ServerStateResponse extends BaseResponse {
|
|
30
30
|
hash: string
|
31
31
|
reserve_base: number
|
32
32
|
reserve_inc: number
|
33
|
-
|
34
|
-
extension_compute: number
|
35
|
-
extension_size: number
|
36
|
-
gas_price: number
|
37
|
-
|
38
33
|
seq: number
|
39
34
|
}
|
40
35
|
io_latency_ms: number
|
@@ -74,11 +69,6 @@ export interface ServerStateResponse extends BaseResponse {
|
|
74
69
|
hash: string
|
75
70
|
reserve_base: number
|
76
71
|
reserve_inc: number
|
77
|
-
|
78
|
-
extension_compute: number
|
79
|
-
extension_size: number
|
80
|
-
gas_price: number
|
81
|
-
|
82
72
|
seq: number
|
83
73
|
}
|
84
74
|
validation_quorum: number
|
@@ -97,8 +97,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
|
|
97
97
|
)
|
98
98
|
}
|
99
99
|
validateAuthAccounts(
|
100
|
-
|
101
|
-
tx.Account as string,
|
100
|
+
tx.Account,
|
102
101
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Only used by JS
|
103
102
|
tx.AuthAccounts as Array<Record<string, unknown>>,
|
104
103
|
)
|
@@ -4,7 +4,7 @@ import { Currency, IssuedCurrency, IssuedCurrencyAmount } from '../common'
|
|
4
4
|
import {
|
5
5
|
Account,
|
6
6
|
BaseTransaction,
|
7
|
-
|
7
|
+
GlobalFlagsInterface,
|
8
8
|
isAccount,
|
9
9
|
isAmount,
|
10
10
|
isCurrency,
|
@@ -28,7 +28,7 @@ export enum AMMClawbackFlags {
|
|
28
28
|
*
|
29
29
|
* @category Transaction Flags
|
30
30
|
*/
|
31
|
-
export interface AMMClawbackFlagsInterface extends
|
31
|
+
export interface AMMClawbackFlagsInterface extends GlobalFlagsInterface {
|
32
32
|
tfClawTwoAssets?: boolean
|
33
33
|
}
|
34
34
|
|
@@ -3,7 +3,7 @@ import { Amount, Currency, IssuedCurrencyAmount } from '../common'
|
|
3
3
|
|
4
4
|
import {
|
5
5
|
BaseTransaction,
|
6
|
-
|
6
|
+
GlobalFlagsInterface,
|
7
7
|
isAmount,
|
8
8
|
isCurrency,
|
9
9
|
isIssuedCurrency,
|
@@ -24,7 +24,7 @@ export enum AMMDepositFlags {
|
|
24
24
|
tfTwoAssetIfEmpty = 0x00800000,
|
25
25
|
}
|
26
26
|
|
27
|
-
export interface AMMDepositFlagsInterface extends
|
27
|
+
export interface AMMDepositFlagsInterface extends GlobalFlagsInterface {
|
28
28
|
tfLPToken?: boolean
|
29
29
|
tfSingleAsset?: boolean
|
30
30
|
tfTwoAsset?: boolean
|
@@ -3,7 +3,7 @@ import { Amount, Currency, IssuedCurrencyAmount } from '../common'
|
|
3
3
|
|
4
4
|
import {
|
5
5
|
BaseTransaction,
|
6
|
-
|
6
|
+
GlobalFlagsInterface,
|
7
7
|
isAmount,
|
8
8
|
isCurrency,
|
9
9
|
isIssuedCurrency,
|
@@ -25,7 +25,7 @@ export enum AMMWithdrawFlags {
|
|
25
25
|
tfLimitLPToken = 0x00400000,
|
26
26
|
}
|
27
27
|
|
28
|
-
export interface AMMWithdrawFlagsInterface extends
|
28
|
+
export interface AMMWithdrawFlagsInterface extends GlobalFlagsInterface {
|
29
29
|
tfLPToken?: boolean
|
30
30
|
tfWithdrawAll?: boolean
|
31
31
|
tfOneAssetWithdrawAll?: boolean
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
Account,
|
7
7
|
validateOptionalField,
|
8
8
|
isAccount,
|
9
|
-
|
9
|
+
GlobalFlagsInterface,
|
10
10
|
} from './common'
|
11
11
|
|
12
12
|
/**
|
@@ -32,7 +32,7 @@ export enum MPTokenAuthorizeFlags {
|
|
32
32
|
*
|
33
33
|
* @category Transaction Flags
|
34
34
|
*/
|
35
|
-
export interface MPTokenAuthorizeFlagsInterface extends
|
35
|
+
export interface MPTokenAuthorizeFlagsInterface extends GlobalFlagsInterface {
|
36
36
|
tfMPTUnauthorize?: boolean
|
37
37
|
}
|
38
38
|
|
@@ -3,7 +3,7 @@ import { isHex, INTEGER_SANITY_CHECK, isFlagEnabled } from '../utils'
|
|
3
3
|
|
4
4
|
import {
|
5
5
|
BaseTransaction,
|
6
|
-
|
6
|
+
GlobalFlagsInterface,
|
7
7
|
validateBaseTransaction,
|
8
8
|
validateOptionalField,
|
9
9
|
isString,
|
@@ -58,7 +58,8 @@ export enum MPTokenIssuanceCreateFlags {
|
|
58
58
|
*
|
59
59
|
* @category Transaction Flags
|
60
60
|
*/
|
61
|
-
export interface MPTokenIssuanceCreateFlagsInterface
|
61
|
+
export interface MPTokenIssuanceCreateFlagsInterface
|
62
|
+
extends GlobalFlagsInterface {
|
62
63
|
tfMPTCanLock?: boolean
|
63
64
|
tfMPTRequireAuth?: boolean
|
64
65
|
tfMPTCanEscrow?: boolean
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
Account,
|
10
10
|
validateOptionalField,
|
11
11
|
isAccount,
|
12
|
-
|
12
|
+
GlobalFlagsInterface,
|
13
13
|
} from './common'
|
14
14
|
|
15
15
|
/**
|
@@ -34,7 +34,7 @@ export enum MPTokenIssuanceSetFlags {
|
|
34
34
|
*
|
35
35
|
* @category Transaction Flags
|
36
36
|
*/
|
37
|
-
export interface MPTokenIssuanceSetFlagsInterface extends
|
37
|
+
export interface MPTokenIssuanceSetFlagsInterface extends GlobalFlagsInterface {
|
38
38
|
tfMPTLock?: boolean
|
39
39
|
tfMPTUnlock?: boolean
|
40
40
|
}
|
@@ -4,7 +4,7 @@ import { isFlagEnabled } from '../utils'
|
|
4
4
|
|
5
5
|
import {
|
6
6
|
BaseTransaction,
|
7
|
-
|
7
|
+
GlobalFlagsInterface,
|
8
8
|
validateBaseTransaction,
|
9
9
|
isAmount,
|
10
10
|
parseAmountValue,
|
@@ -33,7 +33,7 @@ export enum NFTokenCreateOfferFlags {
|
|
33
33
|
*
|
34
34
|
* @category Transaction Flags
|
35
35
|
*/
|
36
|
-
export interface NFTokenCreateOfferFlagsInterface extends
|
36
|
+
export interface NFTokenCreateOfferFlagsInterface extends GlobalFlagsInterface {
|
37
37
|
tfSellNFToken?: boolean
|
38
38
|
}
|
39
39
|
|
@@ -5,7 +5,7 @@ import { isHex } from '../utils'
|
|
5
5
|
import {
|
6
6
|
Account,
|
7
7
|
BaseTransaction,
|
8
|
-
|
8
|
+
GlobalFlagsInterface,
|
9
9
|
isAccount,
|
10
10
|
isAmount,
|
11
11
|
isNumber,
|
@@ -53,7 +53,7 @@ export enum NFTokenMintFlags {
|
|
53
53
|
*
|
54
54
|
* @category Transaction Flags
|
55
55
|
*/
|
56
|
-
export interface NFTokenMintFlagsInterface extends
|
56
|
+
export interface NFTokenMintFlagsInterface extends GlobalFlagsInterface {
|
57
57
|
tfBurnable?: boolean
|
58
58
|
tfOnlyXRP?: boolean
|
59
59
|
tfTrustLine?: boolean
|
@@ -110,13 +110,13 @@ export function validateXChainAddAccountCreateAttestation(
|
|
110
110
|
validateRequiredField(
|
111
111
|
tx,
|
112
112
|
'WasLockingChainSend',
|
113
|
-
(inp) => inp === 0 || inp === 1,
|
113
|
+
(inp: unknown): inp is 0 | 1 => inp === 0 || inp === 1,
|
114
114
|
)
|
115
115
|
|
116
116
|
validateRequiredField(
|
117
117
|
tx,
|
118
118
|
'XChainAccountCreateCount',
|
119
|
-
(inp) => isNumber(inp) || isString(inp),
|
119
|
+
(inp: unknown): inp is number | string => isNumber(inp) || isString(inp),
|
120
120
|
)
|
121
121
|
|
122
122
|
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
@@ -104,7 +104,7 @@ export function validateXChainAddClaimAttestation(
|
|
104
104
|
validateRequiredField(
|
105
105
|
tx,
|
106
106
|
'WasLockingChainSend',
|
107
|
-
(inp) => inp === 0 || inp === 1,
|
107
|
+
(inp: unknown): inp is 0 | 1 => inp === 0 || inp === 1,
|
108
108
|
)
|
109
109
|
|
110
110
|
validateRequiredField(tx, 'XChainBridge', isXChainBridge)
|
@@ -112,6 +112,6 @@ export function validateXChainAddClaimAttestation(
|
|
112
112
|
validateRequiredField(
|
113
113
|
tx,
|
114
114
|
'XChainClaimID',
|
115
|
-
(inp) => isNumber(inp) || isString(inp),
|
115
|
+
(inp: unknown): inp is number | string => isNumber(inp) || isString(inp),
|
116
116
|
)
|
117
117
|
}
|
@@ -68,7 +68,7 @@ export function validateXChainClaim(tx: Record<string, unknown>): void {
|
|
68
68
|
validateRequiredField(
|
69
69
|
tx,
|
70
70
|
'XChainClaimID',
|
71
|
-
(inp) => isNumber(inp) || isString(inp),
|
71
|
+
(inp: unknown): inp is number | string => isNumber(inp) || isString(inp),
|
72
72
|
)
|
73
73
|
|
74
74
|
validateRequiredField(tx, 'Destination', isAccount)
|
@@ -67,7 +67,7 @@ export function validateXChainCommit(tx: Record<string, unknown>): void {
|
|
67
67
|
validateRequiredField(
|
68
68
|
tx,
|
69
69
|
'XChainClaimID',
|
70
|
-
(inp) => isNumber(inp) || isString(inp),
|
70
|
+
(inp: unknown): inp is number | string => isNumber(inp) || isString(inp),
|
71
71
|
)
|
72
72
|
|
73
73
|
validateOptionalField(tx, 'OtherChainDestination', isAccount)
|
@@ -2,7 +2,7 @@ import { Amount, XChainBridge } from '../common'
|
|
2
2
|
|
3
3
|
import {
|
4
4
|
BaseTransaction,
|
5
|
-
|
5
|
+
GlobalFlagsInterface,
|
6
6
|
isAmount,
|
7
7
|
isXChainBridge,
|
8
8
|
validateBaseTransaction,
|
@@ -26,7 +26,7 @@ export enum XChainModifyBridgeFlags {
|
|
26
26
|
*
|
27
27
|
* @category Transaction Flags
|
28
28
|
*/
|
29
|
-
export interface XChainModifyBridgeFlagsInterface extends
|
29
|
+
export interface XChainModifyBridgeFlagsInterface extends GlobalFlagsInterface {
|
30
30
|
/** Clears the MinAccountCreateAmount of the bridge. */
|
31
31
|
tfClearAccountCreateAmount?: boolean
|
32
32
|
}
|
@@ -52,8 +52,7 @@ export function validateAccountDelete(tx: Record<string, unknown>): void {
|
|
52
52
|
|
53
53
|
validateCredentialsList(
|
54
54
|
tx.CredentialIDs,
|
55
|
-
|
56
|
-
tx.TransactionType as string,
|
55
|
+
tx.TransactionType,
|
57
56
|
true,
|
58
57
|
MAX_AUTHORIZED_CREDENTIALS,
|
59
58
|
)
|
@@ -3,6 +3,7 @@ import { ValidationError } from '../../errors'
|
|
3
3
|
import {
|
4
4
|
Account,
|
5
5
|
BaseTransaction,
|
6
|
+
GlobalFlagsInterface,
|
6
7
|
isAccount,
|
7
8
|
validateBaseTransaction,
|
8
9
|
validateOptionalField,
|
@@ -112,7 +113,7 @@ export enum AccountSetTfFlags {
|
|
112
113
|
* // }
|
113
114
|
* ```
|
114
115
|
*/
|
115
|
-
export interface AccountSetFlagsInterface {
|
116
|
+
export interface AccountSetFlagsInterface extends GlobalFlagsInterface {
|
116
117
|
tfRequireDestTag?: boolean
|
117
118
|
tfOptionalDestTag?: boolean
|
118
119
|
tfRequireAuth?: boolean
|