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 5.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.verifyPaymentChannelClaim = exports.signPaymentChannelClaim = exports.deriveXAddress = exports.deriveAddress = exports.deriveKeypair = exports.generateXAddress = exports.generateAddress = exports.computePaymentChannelHash = exports.computeEscrowHash = exports.computeLedgerHash = exports.computeStateTreeHash = exports.computeTransactionTreeHash = exports.computeTrustlineHash = exports.computeOrderID = exports.computeSignerListLedgerObjectID = exports.computeAccountLedgerObjectID = exports.computeBinaryTransactionSigningHash = exports.computeTransactionHash = exports.computeBinaryTransactionHash = exports.isValidSecret = exports.iso8601ToRippleTime = exports.rippleTimeToISO8601 = exports.removeUndefined = exports.convertKeysFromSnakeCaseToCamelCase = exports.toRippledAmount = exports.xrpToDrops = exports.dropsToXrp = exports.computeLedgerHeaderHash = void 0;
  7. const derive_1 = require("./derive");
  8. Object.defineProperty(exports, "deriveKeypair", { enumerable: true, get: function () { return derive_1.deriveKeypair; } });
  9. Object.defineProperty(exports, "deriveAddress", { enumerable: true, get: function () { return derive_1.deriveAddress; } });
  10. Object.defineProperty(exports, "deriveXAddress", { enumerable: true, get: function () { return derive_1.deriveXAddress; } });
  11. const ledgerhash_1 = __importDefault(require("./ledgerhash"));
  12. exports.computeLedgerHeaderHash = ledgerhash_1.default;
  13. const sign_payment_channel_claim_1 = __importDefault(require("./sign-payment-channel-claim"));
  14. exports.signPaymentChannelClaim = sign_payment_channel_claim_1.default;
  15. const verify_payment_channel_claim_1 = __importDefault(require("./verify-payment-channel-claim"));
  16. exports.verifyPaymentChannelClaim = verify_payment_channel_claim_1.default;
  17. const utils_1 = require("../common/utils");
  18. Object.defineProperty(exports, "dropsToXrp", { enumerable: true, get: function () { return utils_1.dropsToXrp; } });
  19. Object.defineProperty(exports, "xrpToDrops", { enumerable: true, get: function () { return utils_1.xrpToDrops; } });
  20. Object.defineProperty(exports, "toRippledAmount", { enumerable: true, get: function () { return utils_1.toRippledAmount; } });
  21. Object.defineProperty(exports, "convertKeysFromSnakeCaseToCamelCase", { enumerable: true, get: function () { return utils_1.convertKeysFromSnakeCaseToCamelCase; } });
  22. Object.defineProperty(exports, "removeUndefined", { enumerable: true, get: function () { return utils_1.removeUndefined; } });
  23. Object.defineProperty(exports, "rippleTimeToISO8601", { enumerable: true, get: function () { return utils_1.rippleTimeToISO8601; } });
  24. Object.defineProperty(exports, "iso8601ToRippleTime", { enumerable: true, get: function () { return utils_1.iso8601ToRippleTime; } });
  25. Object.defineProperty(exports, "isValidSecret", { enumerable: true, get: function () { return utils_1.isValidSecret; } });
  26. const hashes_1 = require("../common/hashes");
  27. Object.defineProperty(exports, "computeBinaryTransactionHash", { enumerable: true, get: function () { return hashes_1.computeBinaryTransactionHash; } });
  28. Object.defineProperty(exports, "computeTransactionHash", { enumerable: true, get: function () { return hashes_1.computeTransactionHash; } });
  29. Object.defineProperty(exports, "computeBinaryTransactionSigningHash", { enumerable: true, get: function () { return hashes_1.computeBinaryTransactionSigningHash; } });
  30. Object.defineProperty(exports, "computeAccountLedgerObjectID", { enumerable: true, get: function () { return hashes_1.computeAccountLedgerObjectID; } });
  31. Object.defineProperty(exports, "computeSignerListLedgerObjectID", { enumerable: true, get: function () { return hashes_1.computeSignerListLedgerObjectID; } });
  32. Object.defineProperty(exports, "computeOrderID", { enumerable: true, get: function () { return hashes_1.computeOrderID; } });
  33. Object.defineProperty(exports, "computeTrustlineHash", { enumerable: true, get: function () { return hashes_1.computeTrustlineHash; } });
  34. Object.defineProperty(exports, "computeTransactionTreeHash", { enumerable: true, get: function () { return hashes_1.computeTransactionTreeHash; } });
  35. Object.defineProperty(exports, "computeStateTreeHash", { enumerable: true, get: function () { return hashes_1.computeStateTreeHash; } });
  36. Object.defineProperty(exports, "computeLedgerHash", { enumerable: true, get: function () { return hashes_1.computeLedgerHash; } });
  37. Object.defineProperty(exports, "computeEscrowHash", { enumerable: true, get: function () { return hashes_1.computeEscrowHash; } });
  38. Object.defineProperty(exports, "computePaymentChannelHash", { enumerable: true, get: function () { return hashes_1.computePaymentChannelHash; } });
  39. const generate_address_1 = require("../offline/generate-address");
  40. Object.defineProperty(exports, "generateXAddress", { enumerable: true, get: function () { return generate_address_1.generateAddressAPI; } });
  41. const generateAddress = (options = {}) => (generate_address_1.generateAddressAPI(Object.assign(Object.assign({}, options), { includeClassicAddress: true })));
  42. exports.generateAddress = generateAddress;
  43. //# sourceMappingURL=utils.js.map