xrpl 4.3.0-smartescrow.3 → 4.4.0-smartescrow.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 +1457 -1505
- 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 +3 -2
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +16 -15
- 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 +3 -3
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js +14 -14
- 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 +2 -2
- package/dist/npm/client/partialPayment.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +1 -0
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts +1 -1
- package/dist/npm/models/ledger/AccountRoot.d.ts.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/LedgerEntry.d.ts +3 -2
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/Vault.d.ts +21 -0
- package/dist/npm/models/ledger/Vault.d.ts.map +1 -0
- package/dist/npm/models/ledger/Vault.js +3 -0
- package/dist/npm/models/ledger/Vault.js.map +1 -0
- 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/index.d.ts +5 -4
- package/dist/npm/models/methods/index.d.ts.map +1 -1
- package/dist/npm/models/methods/vaultInfo.d.ts +46 -0
- package/dist/npm/models/methods/vaultInfo.d.ts.map +1 -0
- package/dist/npm/models/methods/vaultInfo.js +3 -0
- package/dist/npm/models/methods/vaultInfo.js.map +1 -0
- package/dist/npm/models/transactions/AMMBid.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMBid.js +7 -5
- 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/AMMClawback.js +5 -6
- package/dist/npm/models/transactions/AMMClawback.js.map +1 -1
- package/dist/npm/models/transactions/AMMDelete.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDelete.js +2 -2
- package/dist/npm/models/transactions/AMMDelete.js.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/AMMDeposit.js +3 -3
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/models/transactions/AMMVote.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMVote.js +2 -2
- package/dist/npm/models/transactions/AMMVote.js.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/AMMWithdraw.js +3 -3
- package/dist/npm/models/transactions/AMMWithdraw.js.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 +3 -3
- 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/MPTokenIssuanceSet.js +4 -4
- package/dist/npm/models/transactions/MPTokenIssuanceSet.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
- package/dist/npm/models/transactions/NFTokenCancelOffer.js +1 -1
- package/dist/npm/models/transactions/NFTokenCancelOffer.js.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/NFTokenCreateOffer.js +6 -2
- package/dist/npm/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/models/transactions/NFTokenMint.d.ts +2 -2
- package/dist/npm/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/models/transactions/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/checkCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/checkCreate.js +1 -2
- package/dist/npm/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/models/transactions/clawback.d.ts +2 -2
- package/dist/npm/models/transactions/clawback.d.ts.map +1 -1
- package/dist/npm/models/transactions/clawback.js +4 -6
- package/dist/npm/models/transactions/clawback.js.map +1 -1
- package/dist/npm/models/transactions/common.d.ts +30 -9
- package/dist/npm/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/models/transactions/common.js +74 -36
- package/dist/npm/models/transactions/common.js.map +1 -1
- package/dist/npm/models/transactions/delegateSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/delegateSet.js +1 -0
- package/dist/npm/models/transactions/delegateSet.js.map +1 -1
- package/dist/npm/models/transactions/depositPreauth.d.ts.map +1 -1
- package/dist/npm/models/transactions/depositPreauth.js.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowFinish.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +9 -2
- package/dist/npm/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/models/transactions/index.js +4 -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 +22 -21
- package/dist/npm/models/transactions/oracleSet.js.map +1 -1
- package/dist/npm/models/transactions/payment.d.ts +3 -2
- package/dist/npm/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/models/transactions/payment.js +9 -4
- 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 +10 -16
- package/dist/npm/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +8 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +35 -35
- 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/transactions/vaultClawback.d.ts +10 -0
- package/dist/npm/models/transactions/vaultClawback.d.ts.map +1 -0
- package/dist/npm/models/transactions/vaultClawback.js +12 -0
- package/dist/npm/models/transactions/vaultClawback.js.map +1 -0
- package/dist/npm/models/transactions/vaultCreate.d.ts +24 -0
- package/dist/npm/models/transactions/vaultCreate.d.ts.map +1 -0
- package/dist/npm/models/transactions/vaultCreate.js +51 -0
- package/dist/npm/models/transactions/vaultCreate.js.map +1 -0
- package/dist/npm/models/transactions/vaultDelete.d.ts +7 -0
- package/dist/npm/models/transactions/vaultDelete.d.ts.map +1 -0
- package/dist/npm/models/transactions/vaultDelete.js +10 -0
- package/dist/npm/models/transactions/vaultDelete.js.map +1 -0
- package/dist/npm/models/transactions/vaultDeposit.d.ts +9 -0
- package/dist/npm/models/transactions/vaultDeposit.d.ts.map +1 -0
- package/dist/npm/models/transactions/vaultDeposit.js +11 -0
- package/dist/npm/models/transactions/vaultDeposit.js.map +1 -0
- package/dist/npm/models/transactions/vaultSet.d.ts +10 -0
- package/dist/npm/models/transactions/vaultSet.d.ts.map +1 -0
- package/dist/npm/models/transactions/vaultSet.js +25 -0
- package/dist/npm/models/transactions/vaultSet.js.map +1 -0
- package/dist/npm/models/transactions/vaultWithdraw.d.ts +10 -0
- package/dist/npm/models/transactions/vaultWithdraw.d.ts.map +1 -0
- package/dist/npm/models/transactions/vaultWithdraw.js +12 -0
- package/dist/npm/models/transactions/vaultWithdraw.js.map +1 -0
- package/dist/npm/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/models/utils/flags.js +26 -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 +3 -2
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +16 -15
- 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 +3 -3
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js +14 -14
- 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 +2 -2
- package/dist/npm/src/client/partialPayment.js.map +1 -1
- package/dist/npm/src/models/common/index.d.ts +1 -0
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.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/LedgerEntry.d.ts +3 -2
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Vault.d.ts +21 -0
- package/dist/npm/src/models/ledger/Vault.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/Vault.js +3 -0
- package/dist/npm/src/models/ledger/Vault.js.map +1 -0
- 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/index.d.ts +5 -4
- package/dist/npm/src/models/methods/index.d.ts.map +1 -1
- package/dist/npm/src/models/methods/vaultInfo.d.ts +46 -0
- package/dist/npm/src/models/methods/vaultInfo.d.ts.map +1 -0
- package/dist/npm/src/models/methods/vaultInfo.js +3 -0
- package/dist/npm/src/models/methods/vaultInfo.js.map +1 -0
- package/dist/npm/src/models/transactions/AMMBid.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMBid.js +7 -5
- 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/AMMClawback.js +5 -6
- package/dist/npm/src/models/transactions/AMMClawback.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMDelete.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDelete.js +2 -2
- package/dist/npm/src/models/transactions/AMMDelete.js.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/AMMDeposit.js +3 -3
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/src/models/transactions/AMMVote.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMVote.js +2 -2
- package/dist/npm/src/models/transactions/AMMVote.js.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/AMMWithdraw.js +3 -3
- package/dist/npm/src/models/transactions/AMMWithdraw.js.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 +3 -3
- 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/MPTokenIssuanceSet.js +4 -4
- package/dist/npm/src/models/transactions/MPTokenIssuanceSet.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.js +1 -1
- package/dist/npm/src/models/transactions/NFTokenCancelOffer.js.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/NFTokenCreateOffer.js +6 -2
- package/dist/npm/src/models/transactions/NFTokenCreateOffer.js.map +1 -1
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts +2 -2
- package/dist/npm/src/models/transactions/NFTokenMint.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/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/checkCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/checkCreate.js +1 -2
- package/dist/npm/src/models/transactions/checkCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/clawback.d.ts +2 -2
- package/dist/npm/src/models/transactions/clawback.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/clawback.js +4 -6
- package/dist/npm/src/models/transactions/clawback.js.map +1 -1
- package/dist/npm/src/models/transactions/common.d.ts +30 -9
- package/dist/npm/src/models/transactions/common.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/common.js +74 -36
- package/dist/npm/src/models/transactions/common.js.map +1 -1
- package/dist/npm/src/models/transactions/delegateSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/delegateSet.js +1 -0
- package/dist/npm/src/models/transactions/delegateSet.js.map +1 -1
- package/dist/npm/src/models/transactions/depositPreauth.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/depositPreauth.js.map +1 -1
- package/dist/npm/src/models/transactions/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 +9 -2
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/index.js +4 -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 +22 -21
- package/dist/npm/src/models/transactions/oracleSet.js.map +1 -1
- package/dist/npm/src/models/transactions/payment.d.ts +3 -2
- package/dist/npm/src/models/transactions/payment.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/payment.js +9 -4
- 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 +10 -16
- package/dist/npm/src/models/transactions/signerListSet.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +8 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +35 -35
- 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/transactions/vaultClawback.d.ts +10 -0
- package/dist/npm/src/models/transactions/vaultClawback.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/vaultClawback.js +12 -0
- package/dist/npm/src/models/transactions/vaultClawback.js.map +1 -0
- package/dist/npm/src/models/transactions/vaultCreate.d.ts +24 -0
- package/dist/npm/src/models/transactions/vaultCreate.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/vaultCreate.js +51 -0
- package/dist/npm/src/models/transactions/vaultCreate.js.map +1 -0
- package/dist/npm/src/models/transactions/vaultDelete.d.ts +7 -0
- package/dist/npm/src/models/transactions/vaultDelete.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/vaultDelete.js +10 -0
- package/dist/npm/src/models/transactions/vaultDelete.js.map +1 -0
- package/dist/npm/src/models/transactions/vaultDeposit.d.ts +9 -0
- package/dist/npm/src/models/transactions/vaultDeposit.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/vaultDeposit.js +11 -0
- package/dist/npm/src/models/transactions/vaultDeposit.js.map +1 -0
- package/dist/npm/src/models/transactions/vaultSet.d.ts +10 -0
- package/dist/npm/src/models/transactions/vaultSet.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/vaultSet.js +25 -0
- package/dist/npm/src/models/transactions/vaultSet.js.map +1 -0
- package/dist/npm/src/models/transactions/vaultWithdraw.d.ts +10 -0
- package/dist/npm/src/models/transactions/vaultWithdraw.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/vaultWithdraw.js +12 -0
- package/dist/npm/src/models/transactions/vaultWithdraw.js.map +1 -0
- package/dist/npm/src/models/utils/flags.d.ts.map +1 -1
- package/dist/npm/src/models/utils/flags.js +26 -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 +109 -16
- 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 +109 -16
- 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 +7 -6
- package/src/Wallet/batchSigner.ts +198 -0
- package/src/Wallet/defaultFaucets.ts +20 -18
- 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 +50 -66
- package/src/client/partialPayment.ts +2 -4
- package/src/models/common/index.ts +2 -0
- package/src/models/ledger/AccountRoot.ts +1 -1
- package/src/models/ledger/Credential.ts +2 -2
- package/src/models/ledger/LedgerEntry.ts +3 -0
- package/src/models/ledger/Vault.ts +83 -0
- package/src/models/ledger/XChainOwnedClaimID.ts +1 -3
- package/src/models/ledger/index.ts +3 -1
- package/src/models/methods/baseMethod.ts +1 -0
- package/src/models/methods/index.ts +10 -0
- package/src/models/methods/vaultInfo.ts +193 -0
- package/src/models/transactions/AMMBid.ts +12 -21
- package/src/models/transactions/AMMClawback.ts +10 -13
- package/src/models/transactions/AMMDelete.ts +7 -3
- package/src/models/transactions/AMMDeposit.ts +6 -6
- package/src/models/transactions/AMMVote.ts +7 -3
- package/src/models/transactions/AMMWithdraw.ts +6 -6
- package/src/models/transactions/MPTokenAuthorize.ts +2 -2
- package/src/models/transactions/MPTokenIssuanceCreate.ts +6 -3
- package/src/models/transactions/MPTokenIssuanceSet.ts +3 -3
- package/src/models/transactions/NFTokenCancelOffer.ts +2 -2
- package/src/models/transactions/NFTokenCreateOffer.ts +10 -6
- 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/checkCreate.ts +2 -6
- package/src/models/transactions/clawback.ts +9 -10
- package/src/models/transactions/common.ts +194 -69
- package/src/models/transactions/delegateSet.ts +1 -0
- package/src/models/transactions/depositPreauth.ts +2 -4
- package/src/models/transactions/escrowFinish.ts +1 -2
- package/src/models/transactions/index.ts +14 -3
- package/src/models/transactions/metadata.ts +2 -0
- package/src/models/transactions/offerCreate.ts +2 -2
- package/src/models/transactions/oracleSet.ts +88 -91
- package/src/models/transactions/payment.ts +21 -13
- package/src/models/transactions/paymentChannelClaim.ts +4 -4
- package/src/models/transactions/permissionedDomainSet.ts +3 -7
- package/src/models/transactions/signerListSet.ts +21 -21
- package/src/models/transactions/transaction.ts +61 -43
- package/src/models/transactions/trustSet.ts +2 -2
- package/src/models/transactions/vaultClawback.ts +55 -0
- package/src/models/transactions/vaultCreate.ts +142 -0
- package/src/models/transactions/vaultDelete.ts +32 -0
- package/src/models/transactions/vaultDeposit.ts +41 -0
- package/src/models/transactions/vaultSet.ts +71 -0
- package/src/models/transactions/vaultWithdraw.ts +50 -0
- package/src/models/utils/flags.ts +30 -10
- package/src/models/utils/index.ts +24 -0
- package/src/sugar/autofill.ts +165 -35
- package/src/sugar/submit.ts +1 -2
- package/src/utils/hashes/hashLedger.ts +5 -2
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 {
|
@@ -661,8 +663,6 @@ class Client extends EventEmitter<EventTypes> {
|
|
661
663
|
* @returns The autofilled transaction.
|
662
664
|
* @throws ValidationError If Amount and DeliverMax fields are not identical in a Payment Transaction
|
663
665
|
*/
|
664
|
-
|
665
|
-
// eslint-disable-next-line complexity -- handling Payment transaction API v2 requires more logic
|
666
666
|
public async autofill<T extends SubmittableTransaction>(
|
667
667
|
transaction: T,
|
668
668
|
signersCount?: number,
|
@@ -680,7 +680,7 @@ class Client extends EventEmitter<EventTypes> {
|
|
680
680
|
promises.push(setNextValidSequenceNumber(this, tx))
|
681
681
|
}
|
682
682
|
if (tx.Fee == null) {
|
683
|
-
promises.push(
|
683
|
+
promises.push(getTransactionFee(this, tx, signersCount))
|
684
684
|
}
|
685
685
|
if (tx.LastLedgerSequence == null) {
|
686
686
|
promises.push(setLatestValidatedLedgerSequence(this, tx))
|
@@ -688,38 +688,51 @@ class Client extends EventEmitter<EventTypes> {
|
|
688
688
|
if (tx.TransactionType === 'AccountDelete') {
|
689
689
|
promises.push(checkAccountDeleteBlockers(this, tx))
|
690
690
|
}
|
691
|
-
|
692
|
-
|
693
|
-
|
691
|
+
if (tx.TransactionType === 'Batch') {
|
692
|
+
promises.push(autofillBatchTxn(this, tx))
|
693
|
+
}
|
694
694
|
if (tx.TransactionType === 'Payment' && tx.DeliverMax != null) {
|
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
|
695
|
+
handleDeliverMax(tx)
|
718
696
|
}
|
719
697
|
|
720
698
|
return Promise.all(promises).then(() => tx)
|
721
699
|
}
|
722
700
|
|
701
|
+
/**
|
702
|
+
* Simulates an unsigned transaction.
|
703
|
+
* Steps performed on a transaction:
|
704
|
+
* 1. Autofill.
|
705
|
+
* 2. Sign & Encode.
|
706
|
+
* 3. Submit.
|
707
|
+
*
|
708
|
+
* @category Core
|
709
|
+
*
|
710
|
+
* @param transaction - A transaction to autofill, sign & encode, and submit.
|
711
|
+
* @param opts - (Optional) Options used to sign and submit a transaction.
|
712
|
+
* @param opts.binary - If true, return the metadata in a binary encoding.
|
713
|
+
*
|
714
|
+
* @returns A promise that contains SimulateResponse.
|
715
|
+
* @throws RippledError if the simulate request fails.
|
716
|
+
*/
|
717
|
+
|
718
|
+
public async simulate<Binary extends boolean = false>(
|
719
|
+
transaction: SubmittableTransaction | string,
|
720
|
+
opts?: {
|
721
|
+
// If true, return the binary-encoded representation of the results.
|
722
|
+
binary?: Binary
|
723
|
+
},
|
724
|
+
): Promise<
|
725
|
+
Binary extends true ? SimulateBinaryResponse : SimulateJsonResponse
|
726
|
+
> {
|
727
|
+
// send request
|
728
|
+
const binary = opts?.binary ?? false
|
729
|
+
const request: SimulateRequest =
|
730
|
+
typeof transaction === 'string'
|
731
|
+
? { command: 'simulate', tx_blob: transaction, binary }
|
732
|
+
: { command: 'simulate', tx_json: transaction, binary }
|
733
|
+
return this.request(request)
|
734
|
+
}
|
735
|
+
|
723
736
|
/**
|
724
737
|
* Submits a signed/unsigned transaction.
|
725
738
|
* Steps performed on a transaction:
|
@@ -769,41 +782,6 @@ class Client extends EventEmitter<EventTypes> {
|
|
769
782
|
return submitRequest(this, signedTx, opts?.failHard)
|
770
783
|
}
|
771
784
|
|
772
|
-
/**
|
773
|
-
* Simulates an unsigned transaction.
|
774
|
-
* Steps performed on a transaction:
|
775
|
-
* 1. Autofill.
|
776
|
-
* 2. Sign & Encode.
|
777
|
-
* 3. Submit.
|
778
|
-
*
|
779
|
-
* @category Core
|
780
|
-
*
|
781
|
-
* @param transaction - A transaction to autofill, sign & encode, and submit.
|
782
|
-
* @param opts - (Optional) Options used to sign and submit a transaction.
|
783
|
-
* @param opts.binary - If true, return the metadata in a binary encoding.
|
784
|
-
*
|
785
|
-
* @returns A promise that contains SimulateResponse.
|
786
|
-
* @throws RippledError if the simulate request fails.
|
787
|
-
*/
|
788
|
-
|
789
|
-
public async simulate<Binary extends boolean = false>(
|
790
|
-
transaction: SubmittableTransaction | string,
|
791
|
-
opts?: {
|
792
|
-
// If true, return the binary-encoded representation of the results.
|
793
|
-
binary?: Binary
|
794
|
-
},
|
795
|
-
): Promise<
|
796
|
-
Binary extends true ? SimulateBinaryResponse : SimulateJsonResponse
|
797
|
-
> {
|
798
|
-
// send request
|
799
|
-
const binary = opts?.binary ?? false
|
800
|
-
const request: SimulateRequest =
|
801
|
-
typeof transaction === 'string'
|
802
|
-
? { command: 'simulate', tx_blob: transaction, binary }
|
803
|
-
: { command: 'simulate', tx_json: transaction, binary }
|
804
|
-
return this.request(request)
|
805
|
-
}
|
806
|
-
|
807
785
|
/**
|
808
786
|
* Asynchronously submits a transaction and verifies that it has been included in a
|
809
787
|
* validated ledger (or has errored/will not be included for some reason).
|
@@ -844,7 +822,7 @@ class Client extends EventEmitter<EventTypes> {
|
|
844
822
|
* Under the hood, `submit` will call `client.autofill` by default, and because we've passed in a `Wallet` it
|
845
823
|
* Will also sign the transaction for us before submitting the signed transaction binary blob to the ledger.
|
846
824
|
*
|
847
|
-
* This is similar to `
|
825
|
+
* This is similar to `submit`, which does all of the above, but also waits to see if the transaction has been validated.
|
848
826
|
* @param transaction - A transaction to autofill, sign & encode, and submit.
|
849
827
|
* @param opts - (Optional) Options used to sign and submit a transaction.
|
850
828
|
* @param opts.autofill - If true, autofill a transaction.
|
@@ -885,6 +863,12 @@ class Client extends EventEmitter<EventTypes> {
|
|
885
863
|
|
886
864
|
const response = await submitRequest(this, signedTx, opts?.failHard)
|
887
865
|
|
866
|
+
if (response.result.engine_result.startsWith('tem')) {
|
867
|
+
throw new XrplError(
|
868
|
+
`Transaction failed, ${response.result.engine_result}: ${response.result.engine_result_message}`,
|
869
|
+
)
|
870
|
+
}
|
871
|
+
|
888
872
|
const txHash = hashes.hashSignedTx(signedTx)
|
889
873
|
return waitForFinalTransactionOutcome(
|
890
874
|
this,
|
@@ -96,10 +96,8 @@ function isPartialPayment(
|
|
96
96
|
}
|
97
97
|
|
98
98
|
const delivered = meta.delivered_amount
|
99
|
-
|
100
|
-
|
101
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- DeliverMax is a valid field on Payment response
|
102
|
-
const amount = tx.DeliverMax
|
99
|
+
|
100
|
+
const amount = tx.DeliverMax ?? tx.Amount
|
103
101
|
|
104
102
|
if (delivered === undefined) {
|
105
103
|
return false
|
@@ -73,7 +73,7 @@ export default interface AccountRoot extends BaseLedgerEntry, HasPreviousTxnID {
|
|
73
73
|
/** Total NFTokens this account's issued that have been burned. This number is always equal or less than MintedNFTokens. */
|
74
74
|
BurnedNFTokens?: number
|
75
75
|
/** The sequence that the account first minted an NFToken */
|
76
|
-
|
76
|
+
FirstNFTokenSequence?: number
|
77
77
|
/** Total NFTokens have been minted by and on behalf of this account. */
|
78
78
|
MintedNFTokens?: number
|
79
79
|
/** Another account that can mint NFTokens on behalf of this account. */
|
@@ -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
|
|
@@ -18,6 +18,7 @@ import PermissionedDomain from './PermissionedDomain'
|
|
18
18
|
import RippleState from './RippleState'
|
19
19
|
import SignerList from './SignerList'
|
20
20
|
import Ticket from './Ticket'
|
21
|
+
import Vault from './Vault'
|
21
22
|
import XChainOwnedClaimID from './XChainOwnedClaimID'
|
22
23
|
import XChainOwnedCreateAccountClaimID from './XChainOwnedCreateAccountClaimID'
|
23
24
|
|
@@ -42,6 +43,7 @@ type LedgerEntry =
|
|
42
43
|
| RippleState
|
43
44
|
| SignerList
|
44
45
|
| Ticket
|
46
|
+
| Vault
|
45
47
|
| XChainOwnedClaimID
|
46
48
|
| XChainOwnedCreateAccountClaimID
|
47
49
|
|
@@ -70,6 +72,7 @@ type LedgerEntryFilter =
|
|
70
72
|
| 'signer_list'
|
71
73
|
| 'state'
|
72
74
|
| 'ticket'
|
75
|
+
| 'vault'
|
73
76
|
| 'xchain_owned_create_account_claim_id'
|
74
77
|
| 'xchain_owned_claim_id'
|
75
78
|
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { Currency } from '../common'
|
2
|
+
import { Account } from '../transactions/common'
|
3
|
+
|
4
|
+
import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
|
5
|
+
|
6
|
+
/**
|
7
|
+
* The Vault object type represents a Single Asset Vault instance.
|
8
|
+
*
|
9
|
+
* @category Ledger Entries
|
10
|
+
*/
|
11
|
+
export default interface Vault extends BaseLedgerEntry, HasPreviousTxnID {
|
12
|
+
LedgerEntryType: 'Vault'
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Ledger object identifier.
|
16
|
+
*/
|
17
|
+
LedgerIndex: string
|
18
|
+
|
19
|
+
/**
|
20
|
+
* A bit-map of boolean flags.
|
21
|
+
*/
|
22
|
+
Flags: 0
|
23
|
+
|
24
|
+
/**
|
25
|
+
* The transaction sequence number that created the vault.
|
26
|
+
*/
|
27
|
+
Sequence: number
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Identifies the page where this item is referenced in the owner's directory.
|
31
|
+
*/
|
32
|
+
OwnerNode: string
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The account address of the Vault Owner.
|
36
|
+
*/
|
37
|
+
Owner: string
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The address of the Vaults pseudo-account.
|
41
|
+
*/
|
42
|
+
Account: Account
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The asset of the vault. The vault supports XRP, IOU and MPT.
|
46
|
+
*/
|
47
|
+
Asset: Currency
|
48
|
+
|
49
|
+
/**
|
50
|
+
* The total value of the vault.
|
51
|
+
*/
|
52
|
+
AssetsTotal: string
|
53
|
+
|
54
|
+
/**
|
55
|
+
* The asset amount that is available in the vault.
|
56
|
+
*/
|
57
|
+
AssetsAvailable: string
|
58
|
+
|
59
|
+
/**
|
60
|
+
* The potential loss amount that is not yet realized expressed as the vaults asset.
|
61
|
+
*/
|
62
|
+
LossUnrealized: string
|
63
|
+
|
64
|
+
/**
|
65
|
+
* The identifier of the share MPTokenIssuance object.
|
66
|
+
*/
|
67
|
+
MPTokenIssuanceID: string
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Indicates the withdrawal strategy used by the Vault.
|
71
|
+
*/
|
72
|
+
WithdrawalPolicy: number
|
73
|
+
|
74
|
+
/**
|
75
|
+
* The maximum asset amount that can be held in the vault. Zero value 0 indicates there is no cap.
|
76
|
+
*/
|
77
|
+
AssetsMaximum?: string
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Arbitrary metadata about the Vault. Limited to 256 bytes.
|
81
|
+
*/
|
82
|
+
Data?: string
|
83
|
+
}
|
@@ -31,6 +31,7 @@ import PayChannel from './PayChannel'
|
|
31
31
|
import RippleState, { RippleStateFlags } from './RippleState'
|
32
32
|
import SignerList, { SignerListFlags } from './SignerList'
|
33
33
|
import Ticket from './Ticket'
|
34
|
+
import Vault from './Vault'
|
34
35
|
import XChainOwnedClaimID from './XChainOwnedClaimID'
|
35
36
|
import XChainOwnedCreateAccountClaimID from './XChainOwnedCreateAccountClaimID'
|
36
37
|
|
@@ -75,7 +76,8 @@ export {
|
|
75
76
|
SignerList,
|
76
77
|
SignerListFlags,
|
77
78
|
Ticket,
|
79
|
+
Vault,
|
80
|
+
VoteSlot,
|
78
81
|
XChainOwnedClaimID,
|
79
82
|
XChainOwnedCreateAccountClaimID,
|
80
|
-
VoteSlot,
|
81
83
|
}
|
@@ -189,6 +189,7 @@ import {
|
|
189
189
|
UnsubscribeRequest,
|
190
190
|
UnsubscribeResponse,
|
191
191
|
} from './unsubscribe'
|
192
|
+
import { VaultInfoRequest, VaultInfoResponse } from './vaultInfo'
|
192
193
|
/**
|
193
194
|
* @category Requests
|
194
195
|
*/
|
@@ -247,6 +248,8 @@ type Request =
|
|
247
248
|
| AMMInfoRequest
|
248
249
|
// Price Oracle methods
|
249
250
|
| GetAggregatePriceRequest
|
251
|
+
// Vault methods
|
252
|
+
| VaultInfoRequest
|
250
253
|
|
251
254
|
/**
|
252
255
|
* @category Responses
|
@@ -306,6 +309,8 @@ type Response<Version extends APIVersion = typeof DEFAULT_API_VERSION> =
|
|
306
309
|
| AMMInfoResponse
|
307
310
|
// Price Oracle methods
|
308
311
|
| GetAggregatePriceResponse
|
312
|
+
// Vault methods
|
313
|
+
| VaultInfoResponse
|
309
314
|
|
310
315
|
export type RequestResponseMap<
|
311
316
|
T,
|
@@ -464,6 +469,8 @@ export type RequestResponseMap<
|
|
464
469
|
? NFTsByIssuerResponse
|
465
470
|
: T extends NFTHistoryRequest
|
466
471
|
? NFTHistoryResponse
|
472
|
+
: T extends VaultInfoRequest
|
473
|
+
? VaultInfoResponse
|
467
474
|
: Response<Version>
|
468
475
|
|
469
476
|
export type MarkerRequest = Request & {
|
@@ -649,4 +656,7 @@ export {
|
|
649
656
|
// AMM methods
|
650
657
|
AMMInfoRequest,
|
651
658
|
AMMInfoResponse,
|
659
|
+
// Vault methods
|
660
|
+
VaultInfoRequest,
|
661
|
+
VaultInfoResponse,
|
652
662
|
}
|
@@ -0,0 +1,193 @@
|
|
1
|
+
import { Currency } from '../common'
|
2
|
+
|
3
|
+
import { BaseRequest, BaseResponse } from './baseMethod'
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The `vault_info` method gets information about a Vault instance.
|
7
|
+
* Returns an {@link VaultInfoResponse}.
|
8
|
+
*
|
9
|
+
* @category Requests
|
10
|
+
*/
|
11
|
+
export interface VaultInfoRequest extends BaseRequest {
|
12
|
+
command: 'vault_info'
|
13
|
+
|
14
|
+
/**
|
15
|
+
* The object ID of the Vault to be returned.
|
16
|
+
*/
|
17
|
+
vault_id?: string
|
18
|
+
|
19
|
+
/**
|
20
|
+
* ID of the Vault Owner account.
|
21
|
+
*/
|
22
|
+
owner?: string
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Sequence number of the vault entry.
|
26
|
+
*/
|
27
|
+
seq?: number
|
28
|
+
}
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Response expected from an {@link VaultInfoRequest}.
|
32
|
+
*
|
33
|
+
* @category Responses
|
34
|
+
*/
|
35
|
+
export interface VaultInfoResponse extends BaseResponse {
|
36
|
+
result: {
|
37
|
+
vault: {
|
38
|
+
/**
|
39
|
+
* The pseudo-account ID of the vault.
|
40
|
+
*/
|
41
|
+
Account: string
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Object representing the asset held in the vault.
|
45
|
+
*/
|
46
|
+
Asset: Currency
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Amount of assets currently available for withdrawal.
|
50
|
+
*/
|
51
|
+
AssetsAvailable: string
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Total amount of assets in the vault.
|
55
|
+
*/
|
56
|
+
AssetsTotal: string
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Ledger entry type, always "Vault".
|
60
|
+
*/
|
61
|
+
LedgerEntryType: 'Vault'
|
62
|
+
|
63
|
+
/**
|
64
|
+
* ID of the Vault Owner account.
|
65
|
+
*/
|
66
|
+
Owner: string
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Transaction ID of the last modification to this vault.
|
70
|
+
*/
|
71
|
+
PreviousTxnID: string
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Ledger sequence number of the last transaction modifying this vault.
|
75
|
+
*/
|
76
|
+
PreviousTxnLgrSeq: number
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Sequence number of the vault entry.
|
80
|
+
*/
|
81
|
+
Sequence: number
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Unique index of the vault ledger entry.
|
85
|
+
*/
|
86
|
+
index: string
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Object containing details about issued shares.
|
90
|
+
*/
|
91
|
+
shares: {
|
92
|
+
/**
|
93
|
+
* The ID of the Issuer of the Share. It will always be the pseudo-account ID.
|
94
|
+
*/
|
95
|
+
Issuer: string
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Ledger entry type, always "MPTokenIssuance".
|
99
|
+
*/
|
100
|
+
LedgerEntryType: string
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Total outstanding shares issued.
|
104
|
+
*/
|
105
|
+
OutstandingAmount: string
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Transaction ID of the last modification to the shares issuance.
|
109
|
+
*/
|
110
|
+
PreviousTxnID: string
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Ledger sequence number of the last transaction modifying the shares issuance.
|
114
|
+
*/
|
115
|
+
PreviousTxnLgrSeq: number
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Sequence number of the shares issuance entry.
|
119
|
+
*/
|
120
|
+
Sequence: number
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Unique index of the shares ledger entry.
|
124
|
+
*/
|
125
|
+
index: string
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Identifier for the owner node of the shares.
|
129
|
+
*/
|
130
|
+
OwnerNode?: string
|
131
|
+
|
132
|
+
/**
|
133
|
+
* The ID of the MPTokenIssuance object. It will always be equal to vault.ShareMPTID.
|
134
|
+
*/
|
135
|
+
mpt_issuance_id?: string
|
136
|
+
|
137
|
+
/**
|
138
|
+
* The PermissionedDomain object ID associated with the shares of this Vault.
|
139
|
+
*/
|
140
|
+
DomainID?: string
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Bit-field flags associated with the shares issuance.
|
144
|
+
*/
|
145
|
+
Flags?: number
|
146
|
+
}
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Unrealized loss associated with the vault.
|
150
|
+
*/
|
151
|
+
LossUnrealized?: string
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Identifier for the owner node in the ledger tree.
|
155
|
+
*/
|
156
|
+
OwnerNode?: string
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Multi-purpose token ID associated with this vault.
|
160
|
+
*/
|
161
|
+
ShareMPTID?: string
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Policy defining withdrawal conditions.
|
165
|
+
*/
|
166
|
+
WithdrawalPolicy?: number
|
167
|
+
|
168
|
+
/**
|
169
|
+
* Flags
|
170
|
+
*/
|
171
|
+
Flags?: number
|
172
|
+
}
|
173
|
+
|
174
|
+
/**
|
175
|
+
* The identifying hash of the ledger that was used to generate this
|
176
|
+
* response.
|
177
|
+
*/
|
178
|
+
ledger_hash?: string
|
179
|
+
|
180
|
+
/**
|
181
|
+
* The ledger index of the ledger version that was used to generate this
|
182
|
+
* response.
|
183
|
+
*/
|
184
|
+
ledger_index?: number
|
185
|
+
|
186
|
+
/**
|
187
|
+
* If included and set to true, the information in this response comes from
|
188
|
+
* a validated ledger version. Otherwise, the information is subject to
|
189
|
+
* change.
|
190
|
+
*/
|
191
|
+
validated?: boolean
|
192
|
+
}
|
193
|
+
}
|
@@ -4,7 +4,9 @@ import { AuthAccount, Currency, IssuedCurrencyAmount } from '../common'
|
|
4
4
|
import {
|
5
5
|
BaseTransaction,
|
6
6
|
isAmount,
|
7
|
-
|
7
|
+
isArray,
|
8
|
+
isIssuedCurrency,
|
9
|
+
isRecord,
|
8
10
|
validateBaseTransaction,
|
9
11
|
} from './common'
|
10
12
|
|
@@ -65,7 +67,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
|
|
65
67
|
throw new ValidationError('AMMBid: missing field Asset')
|
66
68
|
}
|
67
69
|
|
68
|
-
if (!
|
70
|
+
if (!isIssuedCurrency(tx.Asset)) {
|
69
71
|
throw new ValidationError('AMMBid: Asset must be a Currency')
|
70
72
|
}
|
71
73
|
|
@@ -73,7 +75,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
|
|
73
75
|
throw new ValidationError('AMMBid: missing field Asset2')
|
74
76
|
}
|
75
77
|
|
76
|
-
if (!
|
78
|
+
if (!isIssuedCurrency(tx.Asset2)) {
|
77
79
|
throw new ValidationError('AMMBid: Asset2 must be a Currency')
|
78
80
|
}
|
79
81
|
|
@@ -86,7 +88,7 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
|
|
86
88
|
}
|
87
89
|
|
88
90
|
if (tx.AuthAccounts != null) {
|
89
|
-
if (!
|
91
|
+
if (!isArray(tx.AuthAccounts)) {
|
90
92
|
throw new ValidationError(
|
91
93
|
`AMMBid: AuthAccounts must be an AuthAccount array`,
|
92
94
|
)
|
@@ -96,38 +98,27 @@ export function validateAMMBid(tx: Record<string, unknown>): void {
|
|
96
98
|
`AMMBid: AuthAccounts length must not be greater than ${MAX_AUTH_ACCOUNTS}`,
|
97
99
|
)
|
98
100
|
}
|
99
|
-
validateAuthAccounts(
|
100
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Only used by JS
|
101
|
-
tx.Account as string,
|
102
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Only used by JS
|
103
|
-
tx.AuthAccounts as Array<Record<string, unknown>>,
|
104
|
-
)
|
101
|
+
validateAuthAccounts(tx.Account, tx.AuthAccounts)
|
105
102
|
}
|
106
103
|
}
|
107
104
|
|
108
105
|
function validateAuthAccounts(
|
109
106
|
senderAddress: string,
|
110
|
-
authAccounts:
|
107
|
+
authAccounts: unknown[],
|
111
108
|
): boolean {
|
112
109
|
for (const authAccount of authAccounts) {
|
113
|
-
if (
|
114
|
-
|
115
|
-
|
116
|
-
) {
|
110
|
+
if (!isRecord(authAccount)) {
|
111
|
+
throw new ValidationError(`AMMBid: invalid AuthAccounts`)
|
112
|
+
}
|
113
|
+
if (!isRecord(authAccount.AuthAccount)) {
|
117
114
|
throw new ValidationError(`AMMBid: invalid AuthAccounts`)
|
118
115
|
}
|
119
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- used for null check
|
120
|
-
// @ts-expect-error -- used for null check
|
121
116
|
if (authAccount.AuthAccount.Account == null) {
|
122
117
|
throw new ValidationError(`AMMBid: invalid AuthAccounts`)
|
123
118
|
}
|
124
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- used for null check
|
125
|
-
// @ts-expect-error -- used for null check
|
126
119
|
if (typeof authAccount.AuthAccount.Account !== 'string') {
|
127
120
|
throw new ValidationError(`AMMBid: invalid AuthAccounts`)
|
128
121
|
}
|
129
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- used for null check
|
130
|
-
// @ts-expect-error -- used for null check
|
131
122
|
if (authAccount.AuthAccount.Account === senderAddress) {
|
132
123
|
throw new ValidationError(
|
133
124
|
`AMMBid: AuthAccounts must not include sender's address`,
|