You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

accountDelete.js 830B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.validateAccountDelete = void 0;
  4. const errors_1 = require("../../errors");
  5. const common_1 = require("./common");
  6. function validateAccountDelete(tx) {
  7. (0, common_1.validateBaseTransaction)(tx);
  8. if (tx.Destination === undefined) {
  9. throw new errors_1.ValidationError('AccountDelete: missing field Destination');
  10. }
  11. if (typeof tx.Destination !== 'string') {
  12. throw new errors_1.ValidationError('AccountDelete: invalid Destination');
  13. }
  14. if (tx.DestinationTag !== undefined &&
  15. typeof tx.DestinationTag !== 'number') {
  16. throw new errors_1.ValidationError('AccountDelete: invalid DestinationTag');
  17. }
  18. }
  19. exports.validateAccountDelete = validateAccountDelete;
  20. //# sourceMappingURL=accountDelete.js.map