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 |
|
\ | No newline at end of file |