@nextrope/xrpl
Version:
A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser
16 lines • 854 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateLoanBrokerCoverWithdraw = void 0;
const errors_1 = require("../../errors");
const common_1 = require("./common");
function validateLoanBrokerCoverWithdraw(tx) {
(0, common_1.validateBaseTransaction)(tx);
(0, common_1.validateRequiredField)(tx, 'LoanBrokerID', common_1.isString);
(0, common_1.validateRequiredField)(tx, 'Amount', common_1.isAmount);
(0, common_1.validateOptionalField)(tx, 'Destination', common_1.isAccount);
if (!(0, common_1.isLedgerEntryId)(tx.LoanBrokerID)) {
throw new errors_1.ValidationError(`LoanBrokerCoverWithdraw: LoanBrokerID must be 64 characters hexadecimal string`);
}
}
exports.validateLoanBrokerCoverWithdraw = validateLoanBrokerCoverWithdraw;
//# sourceMappingURL=loanBrokerCoverWithdraw.js.map