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.

verify-payment-channel-claim.js 912B

123456789101112131415161718
  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. const ripple_keypairs_1 = __importDefault(require("ripple-keypairs"));
  7. const ripple_binary_codec_1 = __importDefault(require("ripple-binary-codec"));
  8. const common_1 = require("../common");
  9. function verifyPaymentChannelClaim(channel, amount, signature, publicKey) {
  10. common_1.validate.verifyPaymentChannelClaim({ channel, amount, signature, publicKey });
  11. const signingData = ripple_binary_codec_1.default.encodeForSigningClaim({
  12. channel: channel,
  13. amount: common_1.xrpToDrops(amount)
  14. });
  15. return ripple_keypairs_1.default.verify(signingData, signature, publicKey);
  16. }
  17. exports.default = verifyPaymentChannelClaim;
  18. //# sourceMappingURL=verify-payment-channel-claim.js.map