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.

utils.js 682B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.ensureClassicAddress = void 0;
  4. const ripple_address_codec_1 = require("ripple-address-codec");
  5. function ensureClassicAddress(account) {
  6. if ((0, ripple_address_codec_1.isValidXAddress)(account)) {
  7. const { classicAddress, tag } = (0, ripple_address_codec_1.xAddressToClassicAddress)(account);
  8. if (tag !== false) {
  9. throw new Error('This command does not support the use of a tag. Use an address without a tag.');
  10. }
  11. return classicAddress;
  12. }
  13. return account;
  14. }
  15. exports.ensureClassicAddress = ensureClassicAddress;
  16. //# sourceMappingURL=utils.js.map