How to use the ln-service.decodePaymentRequest function in ln-service

To help you get started, we’ve selected a few ln-service examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexbosworth / balanceofsatoshis / fiat / get_price_chart.js View on Github external
decodedRequest: ['getLnd', 'getPrices', ({getLnd, getPrices}, cbk) => {
        return decodePaymentRequest({
          lnd: getLnd.lnd,
          request: getPrices.request,
        },
        cbk);
      }],
github alexbosworth / balanceofsatoshis / network / probe_destination.js View on Github external
to: ['validate', ({}, cbk) => {
      if (!!args.destination) {
        return cbk(null, {destination: args.destination, routes: []});
      }

      if (!args.request) {
        return cbk([400, 'PayRequestOrDestinationRequiredToInitiateProbe']);
      }

      return decodePaymentRequest({lnd: args.lnd, request: args.request}, cbk);
    }],
github alexbosworth / balanceofsatoshis / swaps / swap_out.js View on Github external
decodeExecutionRequest: ['initiateSwap', ({initiateSwap}, cbk) => {
      if (!!args.recovery) {
        return cbk();
      }

      return decodePaymentRequest({
        lnd: args.lnd,
        request: initiateSwap.swap_execute_request,
      },
      cbk);
    }],