How to use the ln-service.createChainAddress 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 / swaps / swap_out.js View on Github external
createAddress: ['recover', 'validate', ({recover}, cbk) => {
      // Exit early when there is already a sweep address specified in recovery
      if (!!recover && recover.sweep_address) {
        return cbk(null, {address: recover.sweep_address});
      }

      // Exit early when the sweep out address is directly specified
      if (!!args.out_address) {
        return cbk(null, {address: args.out_address});
      }

      return createChainAddress({format: 'p2wpkh', lnd: args.lnd}, cbk);
    }],
github alexbosworth / balanceofsatoshis / chain / split_utxos.js View on Github external
return asyncMapSeries(newArrayOfSize(outputCount), (_, cbk) => {
       return createChainAddress({format, lnd}, cbk);
      },
      cbk);
github alexbosworth / balanceofsatoshis / swaps / swap_in.js View on Github external
chainAddress: ['getLnd', 'swap', ({getLnd, swap}, cbk) => {
      return createChainAddress({
        format: 'p2wpkh',
        is_unused: true,
        lnd: getLnd.lnd,
      },
      cbk);
    }],
github submarineswaps / swaps-service / service / complete_swap_transaction.js View on Github external
getSweepAddress: ['createLockingInvoice', 'lnd', ({lnd}, cbk) => {
      const net = network.toUpperCase();

      const address = process.env[`SSS_CLAIM_${net}_ADDRESS`];

      if (!!address) {
        return cbk(null, {address});
      }

      return createChainAddress({lnd, format: 'p2wpkh'}, cbk);
    }],