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,151 @@
|
|
1
|
+
import { ValidationError } from '../../errors'
|
2
|
+
import { Signer } from '../common'
|
3
|
+
import { hasFlag } from '../utils'
|
4
|
+
|
5
|
+
import {
|
6
|
+
BaseTransaction,
|
7
|
+
GlobalFlags,
|
8
|
+
GlobalFlagsInterface,
|
9
|
+
isArray,
|
10
|
+
isRecord,
|
11
|
+
isString,
|
12
|
+
validateBaseTransaction,
|
13
|
+
validateOptionalField,
|
14
|
+
validateRequiredField,
|
15
|
+
} from './common'
|
16
|
+
import type { SubmittableTransaction } from './transaction'
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Enum representing values of {@link Batch} transaction flags.
|
20
|
+
*
|
21
|
+
* @category Transaction Flags
|
22
|
+
*/
|
23
|
+
export enum BatchFlags {
|
24
|
+
tfAllOrNothing = 0x00010000,
|
25
|
+
tfOnlyOne = 0x00020000,
|
26
|
+
tfUntilFailure = 0x00040000,
|
27
|
+
tfIndependent = 0x00080000,
|
28
|
+
}
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Map of flags to boolean values representing {@link Batch} transaction
|
32
|
+
* flags.
|
33
|
+
*
|
34
|
+
* @category Transaction Flags
|
35
|
+
*/
|
36
|
+
export interface BatchFlagsInterface extends GlobalFlagsInterface {
|
37
|
+
tfAllOrNothing?: boolean
|
38
|
+
tfOnlyOne?: boolean
|
39
|
+
tfUntilFailure?: boolean
|
40
|
+
tfIndependent?: boolean
|
41
|
+
}
|
42
|
+
|
43
|
+
export type BatchInnerTransaction = SubmittableTransaction & {
|
44
|
+
Fee?: '0'
|
45
|
+
|
46
|
+
SigningPubKey?: ''
|
47
|
+
|
48
|
+
TxnSignature?: never
|
49
|
+
|
50
|
+
Signers?: never
|
51
|
+
|
52
|
+
LastLedgerSequence?: never
|
53
|
+
}
|
54
|
+
|
55
|
+
export interface BatchSigner {
|
56
|
+
BatchSigner: {
|
57
|
+
Account: string
|
58
|
+
|
59
|
+
SigningPubKey?: string
|
60
|
+
|
61
|
+
TxnSignature?: string
|
62
|
+
|
63
|
+
Signers?: Signer[]
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* @category Transaction Models
|
69
|
+
*/
|
70
|
+
export interface Batch extends BaseTransaction {
|
71
|
+
TransactionType: 'Batch'
|
72
|
+
|
73
|
+
BatchSigners?: BatchSigner[]
|
74
|
+
|
75
|
+
RawTransactions: Array<{
|
76
|
+
RawTransaction: BatchInnerTransaction
|
77
|
+
}>
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Verify the form and type of a Batch at runtime.
|
82
|
+
*
|
83
|
+
* @param tx - A Batch Transaction.
|
84
|
+
* @throws When the Batch is malformed.
|
85
|
+
*/
|
86
|
+
// eslint-disable-next-line max-lines-per-function -- needed here due to the complexity
|
87
|
+
export function validateBatch(tx: Record<string, unknown>): void {
|
88
|
+
validateBaseTransaction(tx)
|
89
|
+
|
90
|
+
validateRequiredField(tx, 'RawTransactions', isArray)
|
91
|
+
|
92
|
+
tx.RawTransactions.forEach((rawTxObj, index) => {
|
93
|
+
if (!isRecord(rawTxObj)) {
|
94
|
+
throw new ValidationError(
|
95
|
+
`Batch: RawTransactions[${index}] is not object.`,
|
96
|
+
)
|
97
|
+
}
|
98
|
+
validateRequiredField(rawTxObj, 'RawTransaction', isRecord, {
|
99
|
+
paramName: `RawTransactions[${index}].RawTransaction`,
|
100
|
+
txType: 'Batch',
|
101
|
+
})
|
102
|
+
|
103
|
+
const rawTx = rawTxObj.RawTransaction
|
104
|
+
if (rawTx.TransactionType === 'Batch') {
|
105
|
+
throw new ValidationError(
|
106
|
+
`Batch: RawTransactions[${index}] is a Batch transaction. Cannot nest Batch transactions.`,
|
107
|
+
)
|
108
|
+
}
|
109
|
+
|
110
|
+
// Check for the `tfInnerBatchTxn` flag in the inner transactions
|
111
|
+
if (!hasFlag(rawTx, GlobalFlags.tfInnerBatchTxn, 'tfInnerBatchTxn')) {
|
112
|
+
throw new ValidationError(
|
113
|
+
`Batch: RawTransactions[${index}] must contain the \`tfInnerBatchTxn\` flag.`,
|
114
|
+
)
|
115
|
+
}
|
116
|
+
|
117
|
+
// Full validation of each `RawTransaction` object is done in `validate` to avoid dependency cycles
|
118
|
+
})
|
119
|
+
|
120
|
+
validateOptionalField(tx, 'BatchSigners', isArray)
|
121
|
+
|
122
|
+
tx.BatchSigners?.forEach((signerObj, index) => {
|
123
|
+
if (!isRecord(signerObj)) {
|
124
|
+
throw new ValidationError(`Batch: BatchSigners[${index}] is not object.`)
|
125
|
+
}
|
126
|
+
|
127
|
+
const signerRecord = signerObj
|
128
|
+
validateRequiredField(signerRecord, 'BatchSigner', isRecord, {
|
129
|
+
paramName: `BatchSigners[${index}].BatchSigner`,
|
130
|
+
txType: 'Batch',
|
131
|
+
})
|
132
|
+
|
133
|
+
const signer = signerRecord.BatchSigner
|
134
|
+
validateRequiredField(signer, 'Account', isString, {
|
135
|
+
paramName: `BatchSigners[${index}].Account`,
|
136
|
+
txType: 'Batch',
|
137
|
+
})
|
138
|
+
validateOptionalField(signer, 'SigningPubKey', isString, {
|
139
|
+
paramName: `BatchSigners[${index}].SigningPubKey`,
|
140
|
+
txType: 'Batch',
|
141
|
+
})
|
142
|
+
validateOptionalField(signer, 'TxnSignature', isString, {
|
143
|
+
paramName: `BatchSigners[${index}].TxnSignature`,
|
144
|
+
txType: 'Batch',
|
145
|
+
})
|
146
|
+
validateOptionalField(signer, 'Signers', isArray, {
|
147
|
+
paramName: `BatchSigners[${index}].Signers`,
|
148
|
+
txType: 'Batch',
|
149
|
+
})
|
150
|
+
})
|
151
|
+
}
|
@@ -69,7 +69,13 @@ const XCHAIN_BRIDGE_SIZE = 4
|
|
69
69
|
const MPTOKEN_SIZE = 2
|
70
70
|
const AUTHORIZE_CREDENTIAL_SIZE = 1
|
71
71
|
|
72
|
-
|
72
|
+
/**
|
73
|
+
* Verify the form and type of a Record/Object at runtime.
|
74
|
+
*
|
75
|
+
* @param value - The object to check the form and type of.
|
76
|
+
* @returns Whether the Record/Object is properly formed.
|
77
|
+
*/
|
78
|
+
export function isRecord(value: unknown): value is Record<string, unknown> {
|
73
79
|
return value !== null && typeof value === 'object'
|
74
80
|
}
|
75
81
|
|
@@ -210,30 +216,54 @@ export function isXChainBridge(input: unknown): input is XChainBridge {
|
|
210
216
|
)
|
211
217
|
}
|
212
218
|
|
219
|
+
/**
|
220
|
+
* Verify the form and type of an Array at runtime.
|
221
|
+
*
|
222
|
+
* @param input - The object to check the form and type of.
|
223
|
+
* @returns Whether the Array is properly formed.
|
224
|
+
*/
|
225
|
+
export function isArray<T = unknown>(input: unknown): input is T[] {
|
226
|
+
return Array.isArray(input)
|
227
|
+
}
|
228
|
+
|
213
229
|
/* eslint-disable @typescript-eslint/restrict-template-expressions -- tx.TransactionType is checked before any calls */
|
214
230
|
|
215
231
|
/**
|
216
232
|
* Verify the form and type of a required type for a transaction at runtime.
|
217
233
|
*
|
218
|
-
* @param tx - The
|
219
|
-
* @param
|
234
|
+
* @param tx - The object input to check the form and type of.
|
235
|
+
* @param param - The object parameter.
|
220
236
|
* @param checkValidity - The function to use to check the type.
|
221
|
-
* @
|
237
|
+
* @param errorOpts - Extra values to make the error message easier to understand.
|
238
|
+
* @param errorOpts.txType - The transaction type throwing the error.
|
239
|
+
* @param errorOpts.paramName - The name of the parameter in the transaction with the error.
|
240
|
+
* @throws ValidationError if the parameter is missing or invalid.
|
222
241
|
*/
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
242
|
+
// eslint-disable-next-line max-params -- helper function
|
243
|
+
export function validateRequiredField<
|
244
|
+
T extends Record<string, unknown>,
|
245
|
+
K extends keyof T,
|
246
|
+
V,
|
247
|
+
>(
|
248
|
+
tx: T,
|
249
|
+
param: K,
|
250
|
+
checkValidity: (inp: unknown) => inp is V,
|
251
|
+
errorOpts: {
|
252
|
+
txType?: string
|
253
|
+
paramName?: string
|
254
|
+
} = {},
|
255
|
+
): asserts tx is T & { [P in K]: V } {
|
256
|
+
const paramNameStr = errorOpts.paramName ?? param
|
257
|
+
const txType = errorOpts.txType ?? tx.TransactionType
|
258
|
+
if (tx[param] == null) {
|
229
259
|
throw new ValidationError(
|
230
|
-
`${
|
260
|
+
`${txType}: missing field ${String(paramNameStr)}`,
|
231
261
|
)
|
232
262
|
}
|
233
263
|
|
234
|
-
if (!checkValidity(tx[
|
264
|
+
if (!checkValidity(tx[param])) {
|
235
265
|
throw new ValidationError(
|
236
|
-
`${
|
266
|
+
`${txType}: invalid field ${String(paramNameStr)}`,
|
237
267
|
)
|
238
268
|
}
|
239
269
|
}
|
@@ -242,31 +272,50 @@ export function validateRequiredField(
|
|
242
272
|
* Verify the form and type of an optional type for a transaction at runtime.
|
243
273
|
*
|
244
274
|
* @param tx - The transaction input to check the form and type of.
|
245
|
-
* @param
|
275
|
+
* @param param - The object parameter.
|
246
276
|
* @param checkValidity - The function to use to check the type.
|
247
|
-
* @
|
277
|
+
* @param errorOpts - Extra values to make the error message easier to understand.
|
278
|
+
* @param errorOpts.txType - The transaction type throwing the error.
|
279
|
+
* @param errorOpts.paramName - The name of the parameter in the transaction with the error.
|
280
|
+
* @throws ValidationError if the parameter is invalid.
|
248
281
|
*/
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
282
|
+
// eslint-disable-next-line max-params -- helper function
|
283
|
+
export function validateOptionalField<
|
284
|
+
T extends Record<string, unknown>,
|
285
|
+
K extends keyof T,
|
286
|
+
V,
|
287
|
+
>(
|
288
|
+
tx: T,
|
289
|
+
param: K,
|
290
|
+
checkValidity: (inp: unknown) => inp is V,
|
291
|
+
errorOpts: {
|
292
|
+
txType?: string
|
293
|
+
paramName?: string
|
294
|
+
} = {},
|
295
|
+
): asserts tx is T & { [P in K]: V | undefined } {
|
296
|
+
const paramNameStr = errorOpts.paramName ?? param
|
297
|
+
const txType = errorOpts.txType ?? tx.TransactionType
|
298
|
+
if (tx[param] !== undefined && !checkValidity(tx[param])) {
|
255
299
|
throw new ValidationError(
|
256
|
-
`${
|
300
|
+
`${txType}: invalid field ${String(paramNameStr)}`,
|
257
301
|
)
|
258
302
|
}
|
259
303
|
}
|
260
304
|
|
261
305
|
/* eslint-enable @typescript-eslint/restrict-template-expressions -- checked before */
|
262
306
|
|
263
|
-
|
264
|
-
|
307
|
+
export enum GlobalFlags {
|
308
|
+
tfInnerBatchTxn = 0x40000000,
|
309
|
+
}
|
310
|
+
|
311
|
+
export interface GlobalFlagsInterface {
|
312
|
+
tfInnerBatchTxn?: boolean
|
313
|
+
}
|
265
314
|
|
266
315
|
/**
|
267
316
|
* Every transaction has the same set of common fields.
|
268
317
|
*/
|
269
|
-
export interface BaseTransaction {
|
318
|
+
export interface BaseTransaction extends Record<string, unknown> {
|
270
319
|
/** The unique address of the transaction sender. */
|
271
320
|
Account: Account
|
272
321
|
/**
|
@@ -294,7 +343,7 @@ export interface BaseTransaction {
|
|
294
343
|
*/
|
295
344
|
AccountTxnID?: string
|
296
345
|
/** Set of bit-flags for this transaction. */
|
297
|
-
Flags?: number |
|
346
|
+
Flags?: number | GlobalFlagsInterface
|
298
347
|
/**
|
299
348
|
* Highest ledger index this transaction can appear in. Specifying this field
|
300
349
|
* places a strict upper limit on how long the transaction can wait to be
|
@@ -337,6 +386,10 @@ export interface BaseTransaction {
|
|
337
386
|
* The network id of the transaction.
|
338
387
|
*/
|
339
388
|
NetworkID?: number
|
389
|
+
/**
|
390
|
+
* The delegate account that is sending the transaction.
|
391
|
+
*/
|
392
|
+
Delegate?: Account
|
340
393
|
}
|
341
394
|
|
342
395
|
/**
|
@@ -347,7 +400,10 @@ export interface BaseTransaction {
|
|
347
400
|
* @param common - An interface w/ common transaction fields.
|
348
401
|
* @throws When the common param is malformed.
|
349
402
|
*/
|
350
|
-
|
403
|
+
// eslint-disable-next-line max-statements, max-lines-per-function -- lines required for validation
|
404
|
+
export function validateBaseTransaction(
|
405
|
+
common: Record<string, unknown>,
|
406
|
+
): asserts common is BaseTransaction {
|
351
407
|
if (common.TransactionType === undefined) {
|
352
408
|
throw new ValidationError('BaseTransaction: missing field TransactionType')
|
353
409
|
}
|
@@ -357,7 +413,9 @@ export function validateBaseTransaction(common: Record<string, unknown>): void {
|
|
357
413
|
}
|
358
414
|
|
359
415
|
if (!TRANSACTION_TYPES.includes(common.TransactionType)) {
|
360
|
-
throw new ValidationError(
|
416
|
+
throw new ValidationError(
|
417
|
+
`BaseTransaction: Unknown TransactionType ${common.TransactionType}`,
|
418
|
+
)
|
361
419
|
}
|
362
420
|
|
363
421
|
validateRequiredField(common, 'Account', isString)
|
@@ -395,6 +453,15 @@ export function validateBaseTransaction(common: Record<string, unknown>): void {
|
|
395
453
|
validateOptionalField(common, 'TxnSignature', isString)
|
396
454
|
|
397
455
|
validateOptionalField(common, 'NetworkID', isNumber)
|
456
|
+
|
457
|
+
validateOptionalField(common, 'Delegate', isAccount)
|
458
|
+
|
459
|
+
const delegate = common.Delegate
|
460
|
+
if (delegate != null && delegate === common.Account) {
|
461
|
+
throw new ValidationError(
|
462
|
+
'BaseTransaction: Account and Delegate addresses cannot be the same',
|
463
|
+
)
|
464
|
+
}
|
398
465
|
}
|
399
466
|
|
400
467
|
/**
|
@@ -534,7 +601,6 @@ export function containsDuplicates(
|
|
534
601
|
if (isAuthorizeCredentialArray(objectList)) {
|
535
602
|
for (const item of objectList) {
|
536
603
|
const key = `${item.Credential.Issuer}-${item.Credential.CredentialType}`
|
537
|
-
// eslint-disable-next-line max-depth -- necessary to check for type-guards
|
538
604
|
if (seen.has(key)) {
|
539
605
|
return true
|
540
606
|
}
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import { ValidationError } from '../../errors'
|
2
|
+
|
3
|
+
import {
|
4
|
+
BaseTransaction,
|
5
|
+
validateBaseTransaction,
|
6
|
+
validateRequiredField,
|
7
|
+
isAccount,
|
8
|
+
Account,
|
9
|
+
} from './common'
|
10
|
+
|
11
|
+
const PERMISSIONS_MAX_LENGTH = 10
|
12
|
+
const NON_DELEGATABLE_TRANSACTIONS = new Set([
|
13
|
+
'AccountSet',
|
14
|
+
'SetRegularKey',
|
15
|
+
'SignerListSet',
|
16
|
+
'DelegateSet',
|
17
|
+
'AccountDelete',
|
18
|
+
'Batch',
|
19
|
+
// Pseudo transactions below:
|
20
|
+
'EnableAmendment',
|
21
|
+
'SetFee',
|
22
|
+
'UNLModify',
|
23
|
+
])
|
24
|
+
|
25
|
+
export interface Permission {
|
26
|
+
Permission: {
|
27
|
+
PermissionValue: string
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* DelegateSet allows an account to delegate a set of permissions to another account.
|
33
|
+
*
|
34
|
+
* @category Transaction Models
|
35
|
+
*/
|
36
|
+
export interface DelegateSet extends BaseTransaction {
|
37
|
+
TransactionType: 'DelegateSet'
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The authorized account.
|
41
|
+
*/
|
42
|
+
Authorize: Account
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The transaction permissions (represented by integers) that the account has been granted.
|
46
|
+
*/
|
47
|
+
Permissions: Permission[]
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Verify the form and type of an DelegateSet at runtime.
|
52
|
+
*
|
53
|
+
* @param tx - An DelegateSet Transaction.
|
54
|
+
* @throws When the DelegateSet is malformed.
|
55
|
+
*/
|
56
|
+
// eslint-disable-next-line max-lines-per-function -- necessary for validation
|
57
|
+
export function validateDelegateSet(tx: Record<string, unknown>): void {
|
58
|
+
validateBaseTransaction(tx)
|
59
|
+
|
60
|
+
validateRequiredField(tx, 'Authorize', isAccount)
|
61
|
+
|
62
|
+
if (tx.Authorize === tx.Account) {
|
63
|
+
throw new ValidationError(
|
64
|
+
'DelegateSet: Authorize and Account must be different.',
|
65
|
+
)
|
66
|
+
}
|
67
|
+
|
68
|
+
validateRequiredField(tx, 'Permissions', Array.isArray)
|
69
|
+
|
70
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- required for validation
|
71
|
+
const permissions = tx.Permissions as DelegateSet['Permissions']
|
72
|
+
if (permissions.length > PERMISSIONS_MAX_LENGTH) {
|
73
|
+
throw new ValidationError(
|
74
|
+
`DelegateSet: Permissions array length cannot be greater than ${PERMISSIONS_MAX_LENGTH}.`,
|
75
|
+
)
|
76
|
+
}
|
77
|
+
|
78
|
+
const permissionValueSet = new Set()
|
79
|
+
permissions.forEach((permission: Permission) => {
|
80
|
+
if (
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- required for validation
|
82
|
+
permission == null ||
|
83
|
+
Object.keys(permission).length !== 1 ||
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- required for validation
|
85
|
+
permission.Permission == null ||
|
86
|
+
Object.keys(permission.Permission).length !== 1
|
87
|
+
) {
|
88
|
+
throw new ValidationError(
|
89
|
+
'DelegateSet: Permissions array element is malformed',
|
90
|
+
)
|
91
|
+
}
|
92
|
+
const permissionValue = permission.Permission.PermissionValue
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- required for validation
|
94
|
+
if (permissionValue == null) {
|
95
|
+
throw new ValidationError('DelegateSet: PermissionValue must be defined')
|
96
|
+
}
|
97
|
+
if (typeof permissionValue !== 'string') {
|
98
|
+
throw new ValidationError('DelegateSet: PermissionValue must be a string')
|
99
|
+
}
|
100
|
+
if (NON_DELEGATABLE_TRANSACTIONS.has(permissionValue)) {
|
101
|
+
throw new ValidationError(
|
102
|
+
`DelegateSet: PermissionValue contains a non-delegatable transaction ${permissionValue}`,
|
103
|
+
)
|
104
|
+
}
|
105
|
+
permissionValueSet.add(permissionValue)
|
106
|
+
})
|
107
|
+
if (permissions.length !== permissionValueSet.size) {
|
108
|
+
throw new ValidationError(
|
109
|
+
'DelegateSet: Permissions array cannot contain duplicate values',
|
110
|
+
)
|
111
|
+
}
|
112
|
+
}
|
@@ -70,16 +70,14 @@ export function validateDepositPreauth(tx: Record<string, unknown>): void {
|
|
70
70
|
} else if (tx.AuthorizeCredentials !== undefined) {
|
71
71
|
validateCredentialsList(
|
72
72
|
tx.AuthorizeCredentials,
|
73
|
-
|
74
|
-
tx.TransactionType as string,
|
73
|
+
tx.TransactionType,
|
75
74
|
false,
|
76
75
|
MAX_AUTHORIZED_CREDENTIALS,
|
77
76
|
)
|
78
77
|
} else if (tx.UnauthorizeCredentials !== undefined) {
|
79
78
|
validateCredentialsList(
|
80
79
|
tx.UnauthorizeCredentials,
|
81
|
-
|
82
|
-
tx.TransactionType as string,
|
80
|
+
tx.TransactionType,
|
83
81
|
false,
|
84
82
|
MAX_AUTHORIZED_CREDENTIALS,
|
85
83
|
)
|
@@ -47,10 +47,6 @@ export interface EscrowCreate extends BaseTransaction {
|
|
47
47
|
* payment, such as a hosted recipient at the destination address.
|
48
48
|
*/
|
49
49
|
DestinationTag?: number
|
50
|
-
|
51
|
-
FinishFunction?: string
|
52
|
-
|
53
|
-
Data?: string
|
54
50
|
}
|
55
51
|
|
56
52
|
/**
|
@@ -79,13 +75,9 @@ export function validateEscrowCreate(tx: Record<string, unknown>): void {
|
|
79
75
|
)
|
80
76
|
}
|
81
77
|
|
82
|
-
if (
|
83
|
-
tx.FinishAfter === undefined &&
|
84
|
-
tx.Condition === undefined &&
|
85
|
-
tx.FinishFunction === undefined
|
86
|
-
) {
|
78
|
+
if (tx.FinishAfter === undefined && tx.Condition === undefined) {
|
87
79
|
throw new ValidationError(
|
88
|
-
'EscrowCreate: Either
|
80
|
+
'EscrowCreate: Either Condition or FinishAfter must be specified',
|
89
81
|
)
|
90
82
|
}
|
91
83
|
|
@@ -38,8 +38,6 @@ export interface EscrowFinish extends BaseTransaction {
|
|
38
38
|
* The credentials included must not be expired.
|
39
39
|
*/
|
40
40
|
CredentialIDs?: string[]
|
41
|
-
|
42
|
-
ComputationAllowance?: number
|
43
41
|
}
|
44
42
|
|
45
43
|
/**
|
@@ -55,8 +53,7 @@ export function validateEscrowFinish(tx: Record<string, unknown>): void {
|
|
55
53
|
|
56
54
|
validateCredentialsList(
|
57
55
|
tx.CredentialIDs,
|
58
|
-
|
59
|
-
tx.TransactionType as string,
|
56
|
+
tx.TransactionType,
|
60
57
|
true,
|
61
58
|
MAX_AUTHORIZED_CREDENTIALS,
|
62
59
|
)
|
@@ -33,6 +33,7 @@ export {
|
|
33
33
|
AMMWithdrawFlagsInterface,
|
34
34
|
AMMWithdraw,
|
35
35
|
} from './AMMWithdraw'
|
36
|
+
export { Batch } from './batch'
|
36
37
|
export { CheckCancel } from './checkCancel'
|
37
38
|
export { CheckCash } from './checkCash'
|
38
39
|
export { CheckCreate } from './checkCreate'
|
@@ -42,6 +43,7 @@ export { CredentialCreate } from './CredentialCreate'
|
|
42
43
|
export { CredentialDelete } from './CredentialDelete'
|
43
44
|
export { DIDDelete } from './DIDDelete'
|
44
45
|
export { DIDSet } from './DIDSet'
|
46
|
+
export { DelegateSet, Permission } from './delegateSet'
|
45
47
|
export { DepositPreauth } from './depositPreauth'
|
46
48
|
export { EscrowCancel } from './escrowCancel'
|
47
49
|
export { EscrowCreate } from './escrowCreate'
|
@@ -99,6 +101,8 @@ export { SignerListSet } from './signerListSet'
|
|
99
101
|
export { TicketCreate } from './ticketCreate'
|
100
102
|
export { TrustSetFlagsInterface, TrustSetFlags, TrustSet } from './trustSet'
|
101
103
|
export { UNLModify } from './UNLModify'
|
104
|
+
export { PermissionedDomainSet } from './permissionedDomainSet'
|
105
|
+
export { PermissionedDomainDelete } from './permissionedDomainDelete'
|
102
106
|
export { XChainAddAccountCreateAttestation } from './XChainAddAccountCreateAttestation'
|
103
107
|
export { XChainAddClaimAttestation } from './XChainAddClaimAttestation'
|
104
108
|
export { XChainClaim } from './XChainClaim'
|
@@ -111,6 +115,3 @@ export {
|
|
111
115
|
XChainModifyBridgeFlags,
|
112
116
|
XChainModifyBridgeFlagsInterface,
|
113
117
|
} from './XChainModifyBridge'
|
114
|
-
|
115
|
-
export { PermissionedDomainSet } from './permissionedDomainSet'
|
116
|
-
export { PermissionedDomainDelete } from './permissionedDomainDelete'
|
@@ -88,6 +88,8 @@ export interface TransactionMetadataBase {
|
|
88
88
|
delivered_amount?: Amount | MPTAmount | 'unavailable'
|
89
89
|
TransactionIndex: number
|
90
90
|
TransactionResult: string
|
91
|
+
|
92
|
+
ParentBatchID?: string
|
91
93
|
}
|
92
94
|
|
93
95
|
export type TransactionMetadata<T extends BaseTransaction = Transaction> =
|
@@ -3,7 +3,7 @@ import { Amount } from '../common'
|
|
3
3
|
|
4
4
|
import {
|
5
5
|
BaseTransaction,
|
6
|
-
|
6
|
+
GlobalFlagsInterface,
|
7
7
|
validateBaseTransaction,
|
8
8
|
isAmount,
|
9
9
|
} from './common'
|
@@ -78,7 +78,7 @@ export enum OfferCreateFlags {
|
|
78
78
|
* // }
|
79
79
|
* ```
|
80
80
|
*/
|
81
|
-
export interface OfferCreateFlagsInterface extends
|
81
|
+
export interface OfferCreateFlagsInterface extends GlobalFlagsInterface {
|
82
82
|
tfPassive?: boolean
|
83
83
|
tfImmediateOrCancel?: boolean
|
84
84
|
tfFillOrKill?: boolean
|