diff --git a/lib/new-admin/config/accounts.js b/lib/new-admin/config/accounts.js index 05ab6089..199b96bc 100644 --- a/lib/new-admin/config/accounts.js +++ b/lib/new-admin/config/accounts.js @@ -3,7 +3,7 @@ const _ = require('lodash/fp') const { ALL } = require('../../plugins/common/ccxt') -const { BTC, BCH, DASH, ETH, LTC, USDT, ZEC, XMR, TRX, USDT_TRON } = COINS +const { BTC, BCH, DASH, ETH, LTC, USDT, ZEC, XMR, LN, TRX, USDT_TRON } = COINS const { bitpay, coinbase, itbit, bitstamp, kraken, binanceus, cex, binance } = ALL const TICKER = 'ticker' @@ -37,6 +37,7 @@ const ALL_ACCOUNTS = [ { code: 'monerod', display: 'monerod', class: WALLET, cryptos: [XMR] }, { code: 'bitcoincashd', display: 'bitcoincashd', class: WALLET, cryptos: [BCH] }, { code: 'bitgo', display: 'BitGo', class: WALLET, cryptos: [BTC, ZEC, LTC, BCH, DASH] }, + { code: 'galoy', display: 'Galoy', class: WALLET, cryptos: [LN] }, { code: 'bitstamp', display: 'Bitstamp', class: EXCHANGE, cryptos: bitstamp.CRYPTO }, { code: 'itbit', display: 'itBit', class: EXCHANGE, cryptos: itbit.CRYPTO }, { code: 'kraken', display: 'Kraken', class: EXCHANGE, cryptos: kraken.CRYPTO }, diff --git a/lib/new-admin/services/funding.js b/lib/new-admin/services/funding.js index 5b425d82..38436189 100644 --- a/lib/new-admin/services/funding.js +++ b/lib/new-admin/services/funding.js @@ -57,7 +57,7 @@ const reflect = p => p.then(value => ({ value, status: 'fulfilled' }), error => function getFunding () { return settingsLoader.loadLatest().then(settings => { - const cryptoCodes = configManager.getAllCryptoCurrencies(settings.config) + const cryptoCodes = _.filter(code => coinUtils.getExternalCryptoCode(code) === code, configManager.getAllCryptoCurrencies(settings.config)) const fiatCode = configManager.getGlobalLocale(settings.config).fiatCurrency const pareCoins = c => _.includes(c.cryptoCode, cryptoCodes) const cryptoCurrencies = coinUtils.cryptoCurrencies() diff --git a/lib/new-settings-loader.js b/lib/new-settings-loader.js index fe9f02b0..697a385d 100644 --- a/lib/new-settings-loader.js +++ b/lib/new-settings-loader.js @@ -25,7 +25,8 @@ const SECRET_FIELDS = [ 'binance.privateKey', 'twilio.authToken', 'telnyx.apiKey', - 'vonage.apiSecret' + 'vonage.apiSecret', + 'galoy.walletId' ] /* diff --git a/lib/plugins/common/ccxt.js b/lib/plugins/common/ccxt.js index 6b731d85..883c28b9 100644 --- a/lib/plugins/common/ccxt.js +++ b/lib/plugins/common/ccxt.js @@ -1,5 +1,6 @@ const { COINS } = require('@lamassu/coins') const _ = require('lodash/fp') +const { utils: coinUtils } = require('@lamassu/coins') const kraken = require('../exchange/kraken') const bitstamp = require('../exchange/bitstamp') @@ -10,7 +11,7 @@ const bitpay = require('../ticker/bitpay') const binance = require('../exchange/binance') const logger = require('../../logger') -const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT, TRX, USDT_TRON } = COINS +const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT, TRX, USDT_TRON, LN } = COINS const ALL = { cex: cex, @@ -20,22 +21,23 @@ const ALL = { itbit: itbit, bitpay: bitpay, coinbase: { - CRYPTO: [BTC, ETH, LTC, DASH, ZEC, BCH, USDT, USDT_TRON, TRX], + CRYPTO: [BTC, ETH, LTC, DASH, ZEC, BCH, USDT, USDT_TRON, TRX, LN], FIAT: 'ALL_CURRENCIES' }, binance: binance } function buildMarket (fiatCode, cryptoCode, serviceName) { - if (!_.includes(cryptoCode, ALL[serviceName].CRYPTO)) { - throw new Error('Unsupported crypto: ' + cryptoCode) + const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) + if (!_.includes(externalCryptoCode, ALL[serviceName].CRYPTO)) { + throw new Error('Unsupported crypto: ' + externalCryptoCode) } const fiatSupported = ALL[serviceName].FIAT if (fiatSupported !== 'ALL_CURRENCIES' && !_.includes(fiatCode, fiatSupported)) { logger.info('Building a market for an unsupported fiat. Defaulting to EUR market') return cryptoCode + '/' + 'EUR' } - return cryptoCode + '/' + fiatCode + return externalCryptoCode + '/' + fiatCode } function verifyFiatSupport (fiatCode, serviceName) { diff --git a/lib/plugins/exchange/binance.js b/lib/plugins/exchange/binance.js index 0de4c9f9..8a45723c 100644 --- a/lib/plugins/exchange/binance.js +++ b/lib/plugins/exchange/binance.js @@ -4,8 +4,8 @@ const _ = require('lodash/fp') const { ORDER_TYPES } = require('./consts') const ORDER_TYPE = ORDER_TYPES.MARKET -const { BTC, BCH, XMR, ETH, LTC, ZEC } = COINS -const CRYPTO = [BTC, ETH, LTC, ZEC, BCH, XMR] +const { BTC, BCH, XMR, ETH, LTC, ZEC, LN } = COINS +const CRYPTO = [BTC, ETH, LTC, ZEC, BCH, XMR, LN] const FIAT = ['USD', 'EUR'] const REQUIRED_CONFIG_FIELDS = ['apiKey', 'privateKey'] diff --git a/lib/plugins/exchange/binanceus.js b/lib/plugins/exchange/binanceus.js index d68f78f5..ecf058b6 100644 --- a/lib/plugins/exchange/binanceus.js +++ b/lib/plugins/exchange/binanceus.js @@ -4,8 +4,8 @@ const _ = require('lodash/fp') const { ORDER_TYPES } = require('./consts') const ORDER_TYPE = ORDER_TYPES.MARKET -const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT, USDT_TRON } = COINS -const CRYPTO = [BTC, ETH, LTC, DASH, ZEC, BCH, USDT, USDT_TRON] +const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT, USDT_TRON, LN } = COINS +const CRYPTO = [BTC, ETH, LTC, DASH, ZEC, BCH, USDT, USDT_TRON, LN] const FIAT = ['USD'] const REQUIRED_CONFIG_FIELDS = ['apiKey', 'privateKey'] diff --git a/lib/plugins/exchange/bitstamp.js b/lib/plugins/exchange/bitstamp.js index 05b0e23a..5494ff1c 100644 --- a/lib/plugins/exchange/bitstamp.js +++ b/lib/plugins/exchange/bitstamp.js @@ -4,8 +4,8 @@ const _ = require('lodash/fp') const { ORDER_TYPES } = require('./consts') const ORDER_TYPE = ORDER_TYPES.MARKET -const { BTC, ETH, LTC, BCH, USDT } = COINS -const CRYPTO = [BTC, ETH, LTC, BCH, USDT ] +const { BTC, ETH, LTC, BCH, USDT, LN } = COINS +const CRYPTO = [BTC, ETH, LTC, BCH, USDT, LN] const FIAT = ['USD', 'EUR'] const AMOUNT_PRECISION = 8 const REQUIRED_CONFIG_FIELDS = ['key', 'secret', 'clientId'] diff --git a/lib/plugins/exchange/cex.js b/lib/plugins/exchange/cex.js index 03ef1f35..525eb427 100644 --- a/lib/plugins/exchange/cex.js +++ b/lib/plugins/exchange/cex.js @@ -4,8 +4,8 @@ const _ = require('lodash/fp') const { ORDER_TYPES } = require('./consts') const ORDER_TYPE = ORDER_TYPES.MARKET -const { BTC, BCH, DASH, ETH, LTC, USDT, TRX, USDT_TRON } = COINS -const CRYPTO = [BTC, ETH, LTC, DASH, BCH, USDT, TRX, USDT_TRON] +const { BTC, BCH, DASH, ETH, LTC, USDT, TRX, USDT_TRON, LN } = COINS +const CRYPTO = [BTC, ETH, LTC, DASH, BCH, USDT, TRX, USDT_TRON, LN] const FIAT = ['USD', 'EUR'] const REQUIRED_CONFIG_FIELDS = ['apiKey', 'privateKey'] diff --git a/lib/plugins/exchange/itbit.js b/lib/plugins/exchange/itbit.js index dcaa3d83..02572335 100644 --- a/lib/plugins/exchange/itbit.js +++ b/lib/plugins/exchange/itbit.js @@ -4,8 +4,8 @@ const { ORDER_TYPES } = require('./consts') const { COINS } = require('@lamassu/coins') const ORDER_TYPE = ORDER_TYPES.LIMIT -const { BTC, ETH, USDT } = COINS -const CRYPTO = [BTC, ETH, USDT] +const { BTC, ETH, USDT, LN } = COINS +const CRYPTO = [BTC, ETH, USDT, LN] const FIAT = ['USD'] const AMOUNT_PRECISION = 4 const REQUIRED_CONFIG_FIELDS = ['clientKey', 'clientSecret', 'userId', 'walletId'] diff --git a/lib/plugins/exchange/kraken.js b/lib/plugins/exchange/kraken.js index 856990b0..849af0e5 100644 --- a/lib/plugins/exchange/kraken.js +++ b/lib/plugins/exchange/kraken.js @@ -4,8 +4,8 @@ const { ORDER_TYPES } = require('./consts') const { COINS } = require('@lamassu/coins') const ORDER_TYPE = ORDER_TYPES.MARKET -const { BTC, BCH, DASH, ETH, LTC, ZEC, XMR, USDT, TRX, USDT_TRON } = COINS -const CRYPTO = [BTC, ETH, LTC, DASH, ZEC, BCH, XMR, USDT, TRX, USDT_TRON] +const { BTC, BCH, DASH, ETH, LTC, ZEC, XMR, USDT, TRX, USDT_TRON, LN } = COINS +const CRYPTO = [BTC, ETH, LTC, DASH, ZEC, BCH, XMR, USDT, TRX, USDT_TRON, LN] const FIAT = ['USD', 'EUR'] const AMOUNT_PRECISION = 6 const REQUIRED_CONFIG_FIELDS = ['apiKey', 'privateKey'] diff --git a/lib/plugins/ticker/bitpay.js b/lib/plugins/ticker/bitpay.js index f352131c..0952ab40 100644 --- a/lib/plugins/ticker/bitpay.js +++ b/lib/plugins/ticker/bitpay.js @@ -2,9 +2,9 @@ const axios = require('axios') const { COINS } = require('@lamassu/coins') const BN = require('../../bn') -const { BTC, BCH } = COINS +const { BTC, BCH, LN } = COINS -const CRYPTO = [BTC, BCH] +const CRYPTO = [BTC, BCH, LN] const FIAT = 'ALL_CURRENCIES' function ticker (fiatCode, cryptoCode) { diff --git a/lib/plugins/wallet/galoy/galoy.js b/lib/plugins/wallet/galoy/galoy.js new file mode 100644 index 00000000..af877034 --- /dev/null +++ b/lib/plugins/wallet/galoy/galoy.js @@ -0,0 +1,331 @@ +const _ = require('lodash/fp') +const invoice = require('@node-lightning/invoice') +const axios = require('axios') +const { utils: coinUtils } = require('@lamassu/coins') + +const NAME = 'LN' +const SUPPORTED_COINS = ['LN', 'BTC'] +const TX_PENDING = 'PENDING' +const TX_SUCCESS = 'SUCCESS' + +const URI = 'https://api.staging.galoy.io/graphql' + +const BN = require('../../../bn') + +function request (graphqlQuery, token) { + const headers = { + 'content-type': 'application/json', + 'Authorization': `Bearer ${token}` + } + return axios({ + method: 'post', + url: URI, + headers: headers, + data: graphqlQuery + }) + .then(r => { + if (r.error) throw r.error + return r.data + }) +} + +function checkCryptoCode (cryptoCode) { + if (!SUPPORTED_COINS.includes(cryptoCode)) { + return Promise.reject(new Error('Unsupported crypto: ' + cryptoCode)) + } + + return Promise.resolve() +} + +function getGaloyAccount (token) { + const accountInfo = { + 'operationName': 'me', + 'query': `query me { + me { + defaultAccount { + defaultWalletId + wallets { + id + walletCurrency + balance + transactions { + edges { + node { + direction + id + settlementAmount + settlementFee + status + initiationVia { + ... on InitiationViaIntraLedger { + counterPartyUsername + counterPartyWalletId + } + ... on InitiationViaLn { + paymentHash + } + ... on InitiationViaOnChain { + address + } + } + settlementVia { + ... on SettlementViaIntraLedger { + counterPartyUsername + counterPartyWalletId + } + ... on SettlementViaLn { + preImage + } + ... on SettlementViaOnChain { + transactionHash + } + } + } + } + } + } + } + id + } + }`, + 'variables': {} + } + return request(accountInfo, token) + .then(r => { + return r.data.me.defaultAccount + }) +} + +function isLightning (address) { + return address.substr(0, 2) === 'ln' +} + +function sendFundsOnChain (walletId, address, cryptoAtoms, token) { + const sendOnChain = { + 'operationName': 'onChainPaymentSend', + 'query': `mutation onChainPaymentSend($input: OnChainPaymentSendInput!) { + onChainPaymentSend(input: $input) { + errors { + message + path + } + status + } + }`, + 'variables': { 'input': { 'address': `${address}`, 'amount': `${cryptoAtoms}`, 'walletId': `${walletId}` } } + } + return request(sendOnChain, token) + .then(result => { + return result.data.onChainPaymentSend + }) +} + +function sendFundsLN (walletId, invoice, token) { + const sendLN = { + 'operationName': 'lnInvoicePaymentSend', + 'query': `mutation lnInvoicePaymentSend($input: LnInvoicePaymentInput!) { + lnInvoicePaymentSend(input: $input) { + errors { + message + path + } + status + } + }`, + 'variables': { 'input': { 'paymentRequest': `${invoice}`, 'walletId': `${walletId}` } } + } + return request(sendLN, token) + .then(result => { + return result.data.lnInvoicePaymentSend + }) +} + +function sendCoins (account, tx, settings, operatorId) { + const { toAddress, cryptoAtoms, cryptoCode } = tx + const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) + return checkCryptoCode(cryptoCode) + .then(() => getGaloyAccount(account.apiKey)) + .then(galoyAccount => { + const wallet = _.head( + _.filter(wallet => wallet.walletCurrency === externalCryptoCode && + wallet.id === galoyAccount.defaultWalletId && + wallet.id === account.walletId)(galoyAccount.wallets) + ) + if (isLightning(toAddress)) { + return sendFundsLN(wallet.id, toAddress, account.apiKey) + } + return sendFundsOnChain(wallet.id, toAddress, cryptoAtoms, account.apiKey) + }) + .then(result => { + switch (result.status) { + case 'ALREADY_PAID': + throw new Error('Transaction already exists!') + case 'FAILURE': + throw new Error('Transaction failed!') + case 'SUCCESS': + return '' + case 'PENDING': + return '' + default: + throw new Error(`Transaction failed: ${_.head(result.errors).message}`) + } + }) +} + +function newOnChainAddress (walletId, token) { + const createOnChainAddress = { + 'operationName': 'onChainAddressCreate', + 'query': `mutation onChainAddressCreate($input: OnChainAddressCreateInput!) { + onChainAddressCreate(input: $input) { + address + errors { + message + path + } + } + }`, + 'variables': { 'input': { 'walletId': `${walletId}` } } + } + return request(createOnChainAddress, token) + .then(result => { + return result.data.onChainAddressCreate.address + }) +} + +function newInvoice (walletId, cryptoAtoms, token) { + const createInvoice = { + 'operationName': 'lnInvoiceCreate', + 'query': `mutation lnInvoiceCreate($input: LnInvoiceCreateInput!) { + lnInvoiceCreate(input: $input) { + errors { + message + path + } + invoice { + paymentRequest + } + } + }`, + 'variables': { 'input': { 'walletId': `${walletId}`, 'amount': `${cryptoAtoms}` } } + } + return request(createInvoice, token) + .then(result => { + return result.data.lnInvoiceCreate.invoice.paymentRequest + }) +} + +function balance (account, cryptoCode, settings, operatorId) { + const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) + return checkCryptoCode(cryptoCode) + .then(() => getGaloyAccount(account.apiKey)) + .then(galoyAccount => { + // account has a list of wallets, should we consider the balance of each one? + // for now we'll get the first BTC wallet that matches the defaultWalletId + const wallet = _.head( + _.filter( + wallet => wallet.walletCurrency === externalCryptoCode && + wallet.id === account.walletId)(galoyAccount.wallets) + ) + return new BN(wallet.balance || 0) + }) +} + +function newAddress (account, info, tx, settings, operatorId) { + const { cryptoAtoms, cryptoCode } = tx + const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) + return checkCryptoCode(cryptoCode) + .then(() => getGaloyAccount(account.apiKey)) + .then(galoyAccount => { + const wallet = _.head( + _.filter(wallet => wallet.walletCurrency === externalCryptoCode && + wallet.id === galoyAccount.defaultWalletId && + wallet.id === account.walletId)(galoyAccount.wallets) + ) + const promises = [ + newOnChainAddress(wallet.id, account.apiKey), + newInvoice(wallet.id, cryptoAtoms, account.apiKey) + ] + return Promise.all(promises) + }) + .then(([onChainAddress, invoice]) => { + return `bitcoin:${onChainAddress}?amount=${cryptoAtoms}&lightning=${invoice}` + }) +} + +function getStatus (account, tx, requested, settings, operatorId) { + const { toAddress, cryptoAtoms, cryptoCode } = tx + const mapStatus = tx => { + if (!tx) return 'notSeen' + if (tx.node.status === TX_PENDING) return 'authorized' + if (tx.node.status === TX_SUCCESS) return 'confirmed' + return 'notSeen' + } + const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) + const address = coinUtils.parseUrl(toAddress) + return checkCryptoCode(cryptoCode) + .then(() => getGaloyAccount(account.apiKey)) + .then(galoyAccount => { + const wallet = _.head( + _.filter(wallet => wallet.walletCurrency === externalCryptoCode && + wallet.id === galoyAccount.defaultWalletId && + wallet.id === account.walletId)(galoyAccount.wallets) + ) + const transactions = wallet.transactions.edges + if (isLightning(address)) { + const paymentHash = invoice.decode(address).paymentHash.toString('hex') + const transaction = _.head(_.filter(tx => tx.node.initiationVia.paymentHash === paymentHash && tx.node.direction === 'RECEIVE')(transactions)) + return { receivedCryptoAtoms: cryptoAtoms, status: mapStatus(transaction) } + } + // On-chain tx + const transaction = _.head(_.filter(tx => tx.node.initiationVia.address === address)(transactions)) + return { receivedCryptoAtoms: cryptoAtoms, status: mapStatus(transaction) } + }) +} + +function newFunding (account, cryptoCode, settings, operatorId) { + const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) + // Regular BTC address + return checkCryptoCode(cryptoCode) + .then(() => getGaloyAccount(account.apiKey)) + .then(galoyAccount => { + const wallet = _.head( + _.filter(wallet => wallet.walletCurrency === externalCryptoCode && + wallet.id === galoyAccount.defaultWalletId && + wallet.id === account.walletId)(galoyAccount.wallets) + ) + const pendingBalance = _.sumBy(tx => { + if (tx.node.status === TX_PENDING) return tx.node.settlementAmount + return 0 + })(wallet.transactions.edges) + return newOnChainAddress(wallet.id, account.apiKey) + .then(onChainAddress => [onChainAddress, wallet.balance, pendingBalance]) + }) + .then(([onChainAddress, balance, pendingBalance]) => { + return { + fundingPendingBalance: new BN(pendingBalance), + fundingConfirmedBalance: new BN(balance), + fundingAddress: onChainAddress + } + }) +} + +function cryptoNetwork (account, cryptoCode, settings, operatorId) { + return checkCryptoCode(cryptoCode) + .then(() => account.environment === 'test' ? 'test' : 'main') +} + +function checkBlockchainStatus (cryptoCode) { + return checkCryptoCode(cryptoCode) + .then(() => Promise.resolve('ready')) +} + +module.exports = { + NAME, + balance, + sendCoins, + newAddress, + getStatus, + newFunding, + cryptoNetwork, + checkBlockchainStatus +} diff --git a/lib/ticker.js b/lib/ticker.js index 389a0428..9475b71d 100644 --- a/lib/ticker.js +++ b/lib/ticker.js @@ -2,6 +2,7 @@ const { utils: coinUtils } = require('@lamassu/coins') const _ = require('lodash/fp') const mem = require('mem') const configManager = require('./new-config-manager') +const { utils: coinUtils } = require('@lamassu/coins') const logger = require('./logger') const lastRate = {} @@ -36,16 +37,15 @@ function _getRates (settings, fiatCode, cryptoCode) { }) } -function buildTicker (fiatCode, _cryptoCode, tickerName) { - const fiatPeggedEquivalent = _.includes(fiatCode, _.keys(PEGGED_FIAT_CURRENCIES)) +function buildTicker (fiatCode, cryptoCode, tickerName) { + fiatCode = _.includes(fiatCode, _.keys(PEGGED_FIAT_CURRENCIES)) ? PEGGED_FIAT_CURRENCIES[fiatCode] : fiatCode + cryptoCode = coinUtils.getEquivalentCode(cryptoCode) - const cryptoCode = coinUtils.getEquivalentCode(_cryptoCode) - - if (tickerName === 'bitpay') return bitpay.ticker(fiatPeggedEquivalent, cryptoCode) - if (tickerName === 'mock-ticker') return mockTicker.ticker(fiatPeggedEquivalent, cryptoCode) - return ccxt.ticker(fiatPeggedEquivalent, cryptoCode, tickerName) + if (tickerName === 'bitpay') return bitpay.ticker(fiatCode, cryptoCode) + if (tickerName === 'mock-ticker') return mockTicker.ticker(fiatCode, cryptoCode) + return ccxt.ticker(fiatCode, cryptoCode, tickerName) } const getRates = mem(_getRates, { diff --git a/new-lamassu-admin/src/pages/Blacklist/Blacklist.js b/new-lamassu-admin/src/pages/Blacklist/Blacklist.js index e0ac4f42..a7d6e0a9 100644 --- a/new-lamassu-admin/src/pages/Blacklist/Blacklist.js +++ b/new-lamassu-admin/src/pages/Blacklist/Blacklist.js @@ -142,8 +142,9 @@ const Blacklist = () => { const classes = useStyles() const blacklistData = R.path(['blacklist'])(blacklistResponse) ?? [] - const availableCurrencies = - R.path(['cryptoCurrencies'], blacklistResponse) ?? [] + const availableCurrencies = R.filter( + coin => coinUtils.getExternalCryptoCode(coin.code) === coin.code + )(R.path(['cryptoCurrencies'], blacklistResponse) ?? []) const formattedData = groupByCode(blacklistData) diff --git a/new-lamassu-admin/src/pages/Services/schemas/galoy.js b/new-lamassu-admin/src/pages/Services/schemas/galoy.js new file mode 100644 index 00000000..b2d2bdf5 --- /dev/null +++ b/new-lamassu-admin/src/pages/Services/schemas/galoy.js @@ -0,0 +1,36 @@ +import * as Yup from 'yup' + +import SecretInputFormik from 'src/components/inputs/formik/SecretInput' +import TextInputFormik from 'src/components/inputs/formik/TextInput' + +import { secretTest } from './helper' + +export default { + code: 'galoy', + name: 'Galoy', + title: 'Galoy (Wallet)', + elements: [ + { + code: 'apiKey', + display: 'API Key', + component: TextInputFormik, + face: true, + long: true + }, + { + code: 'walletId', + display: 'Wallet ID', + component: SecretInputFormik + } + ], + getValidationSchema: account => { + return Yup.object().shape({ + apiKey: Yup.string('The API key must be a string') + .max(200, 'The API key is too long') + .required('The API key is required'), + walletId: Yup.string('The wallet id must be a string') + .max(100, 'The wallet id is too long') + .test(secretTest(account?.walletId)) + }) + } +} diff --git a/new-lamassu-admin/src/pages/Services/schemas/index.js b/new-lamassu-admin/src/pages/Services/schemas/index.js index 3ff44631..050ccdd2 100644 --- a/new-lamassu-admin/src/pages/Services/schemas/index.js +++ b/new-lamassu-admin/src/pages/Services/schemas/index.js @@ -5,6 +5,7 @@ import bitstamp from './bitstamp' import blockcypher from './blockcypher' import cex from './cex' import ciphertrace from './ciphertrace' +import galoy from './galoy' import infura from './infura' import itbit from './itbit' import kraken from './kraken' @@ -16,6 +17,7 @@ import vonage from './vonage' export default { [bitgo.code]: bitgo, + [galoy.code]: galoy, [bitstamp.code]: bitstamp, [blockcypher.code]: blockcypher, [infura.code]: infura, diff --git a/new-lamassu-admin/src/pages/Wallet/WizardSplash.js b/new-lamassu-admin/src/pages/Wallet/WizardSplash.js index 48692da2..925cbdf2 100644 --- a/new-lamassu-admin/src/pages/Wallet/WizardSplash.js +++ b/new-lamassu-admin/src/pages/Wallet/WizardSplash.js @@ -60,6 +60,8 @@ const getLogo = code => { return MoneroLogo case 'TRX': return TronLogo + case 'LN': + return BitcoinLogo default: return null } diff --git a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js index 5c3bb08b..d7225778 100644 --- a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js +++ b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js @@ -1,4 +1,5 @@ import { useQuery, useMutation } from '@apollo/react-hooks' +import { utils as coinUtils } from '@lamassu/coins' import { makeStyles } from '@material-ui/core' import gql from 'graphql-tag' import * as R from 'ramda' @@ -54,7 +55,7 @@ const ChooseExchange = ({ data: currentData, addData }) => { const accounts = data?.accounts ?? [] const accountsConfig = data?.accountsConfig ?? [] - const coin = currentData.coin + const coin = coinUtils.getExternalCryptoCode(currentData.coin) const exchanges = getItems(accountsConfig, accounts, 'exchange', coin) const submit = () => { diff --git a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseTicker.js b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseTicker.js index ca5e0955..8d320ea3 100644 --- a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseTicker.js +++ b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseTicker.js @@ -1,4 +1,5 @@ import { useQuery } from '@apollo/react-hooks' +import { utils as coinUtils } from '@lamassu/coins' import { makeStyles } from '@material-ui/core' import gql from 'graphql-tag' import * as R from 'ramda' @@ -34,7 +35,7 @@ const ChooseTicker = ({ data: currentData, addData }) => { const accounts = data?.accounts ?? [] const accountsConfig = data?.accountsConfig ?? [] - const coin = currentData.coin + const coin = coinUtils.getExternalCryptoCode(currentData.coin) const tickers = getItems(accountsConfig, accounts, 'ticker', coin) const submit = () => { diff --git a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseWallet.js b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseWallet.js index 94f78241..2f376783 100644 --- a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseWallet.js +++ b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseWallet.js @@ -39,7 +39,8 @@ const SAVE_ACCOUNTS = gql` } ` -const isConfigurable = it => R.contains(it)(['infura', 'bitgo', 'trongrid']) +const isConfigurable = it => + R.contains(it)(['infura', 'bitgo', 'trongrid', 'galoy']) const isLocalHosted = it => R.contains(it)([ @@ -167,6 +168,19 @@ const ChooseWallet = ({ data: currentData, addData }) => { /> )} + {selected === 'galoy' && ( + <> +

Enter wallet information

+ + + )} ) } diff --git a/package-lock.json b/package-lock.json index 1d663059..78149a1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -662,6 +662,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -685,6 +692,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bignumber.js": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz", @@ -717,7 +729,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -945,6 +956,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -1026,6 +1044,11 @@ "follow-redirects": "^1.14.7" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -1053,7 +1076,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -1319,6 +1341,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -1342,6 +1371,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bignumber.js": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz", @@ -1374,7 +1408,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -1520,6 +1553,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -1543,6 +1583,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -1570,7 +1615,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -1783,6 +1827,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -1806,6 +1857,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -1833,7 +1889,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -1988,6 +2043,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -2011,6 +2073,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -2038,7 +2105,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -2207,6 +2273,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -2230,8 +2303,13 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { - "version": "npm:bip174@3.0.0", + "version": "npm:@bitgo/bip174@3.0.0", "resolved": "https://registry.npmjs.org/@bitgo/bip174/-/bip174-3.0.0.tgz", "integrity": "sha512-Qv98vy6l1WgZwrxKx7IPYY91/+Z3tpALVSDn+Ic9qCsxygCq9gYw5eL8q3kd7LYTFLy/HgcqhcMOa83Spbp4JA==" }, @@ -2249,7 +2327,7 @@ } }, "bitcoinjs-lib": { - "version": "npm:bitcoinjs-lib@7.0.0-rc.3", + "version": "npm:@bitgo/bitcoinjs-lib@7.0.0-rc.3", "resolved": "https://registry.npmjs.org/@bitgo/bitcoinjs-lib/-/bitcoinjs-lib-7.0.0-rc.3.tgz", "integrity": "sha512-IjlaIAuVehVF8azp28n2Gk+xKZ/MdH4t8qOvH2flTSDuYDLcZNHGHXmwyHbOfZwfP5R1MKVrGd+dscm1jqhTkQ==", "requires": { @@ -2257,7 +2335,6 @@ "bip174": "npm:@bitgo/bip174@3.0.0", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", @@ -2273,7 +2350,7 @@ } }, "ecpair": { - "version": "npm:ecpair@2.1.0-rc.0", + "version": "npm:@bitgo/ecpair@2.1.0-rc.0", "resolved": "https://registry.npmjs.org/@bitgo/ecpair/-/ecpair-2.1.0-rc.0.tgz", "integrity": "sha512-qPZetcEA1Lzzm9NsqsGF9NGorAGaXrv20eZjopLUjsdwftWcsYTE7lwzE/Xjdf4fcq6G4+vjrCudWAMGNfJqOQ==", "requires": { @@ -2443,6 +2520,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -2466,6 +2550,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -2493,7 +2582,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -2666,6 +2754,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -2689,8 +2784,13 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { - "version": "npm:bip174@3.0.0-rc.1", + "version": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", "integrity": "sha512-eGi5die7Q7O3yPtkcGF1gD7qLlJLiLnYI4DpFTF6tUhUo71gy3RoXAAeeJA2fLpnVoJofXnLdLfpcO6OEZAsvw==" }, @@ -2716,7 +2816,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -2733,7 +2832,7 @@ } }, "ecpair": { - "version": "npm:ecpair@2.1.0-rc.0", + "version": "npm:@bitgo/ecpair@2.1.0-rc.0", "resolved": "https://registry.npmjs.org/@bitgo/ecpair/-/ecpair-2.1.0-rc.0.tgz", "integrity": "sha512-qPZetcEA1Lzzm9NsqsGF9NGorAGaXrv20eZjopLUjsdwftWcsYTE7lwzE/Xjdf4fcq6G4+vjrCudWAMGNfJqOQ==", "requires": { @@ -2874,6 +2973,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -2897,6 +3003,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bignumber.js": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz", @@ -2929,7 +3040,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -3087,6 +3197,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -3118,6 +3235,11 @@ "follow-redirects": "^1.14.7" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -3145,7 +3267,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -3337,6 +3458,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -3360,6 +3488,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -3387,7 +3520,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -3580,6 +3712,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -3603,6 +3742,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -3630,7 +3774,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -3818,6 +3961,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -3841,6 +3991,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -3868,7 +4023,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -4023,6 +4177,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -4046,6 +4207,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -4073,7 +4239,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -4229,6 +4394,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -4252,8 +4424,13 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { - "version": "npm:bip174@3.0.0-rc.1", + "version": "npm:bip174@npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", "integrity": "sha512-eGi5die7Q7O3yPtkcGF1gD7qLlJLiLnYI4DpFTF6tUhUo71gy3RoXAAeeJA2fLpnVoJofXnLdLfpcO6OEZAsvw==" }, @@ -4276,10 +4453,8 @@ "integrity": "sha512-D62U1pWej8M+7gROykLGGPvFf0zFal10kAAbuaHuy1ohtwKLNHRiUz8dpdjEZBzNkF+pU+GQhItdiEJTslK4/A==", "requires": { "bech32": "^2.0.0", - "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -4296,7 +4471,7 @@ } }, "ecpair": { - "version": "npm:ecpair@2.1.0-rc.0", + "version": "npm:ecpair@npm:ecpair@2.1.0-rc.0", "resolved": "https://registry.npmjs.org/@bitgo/ecpair/-/ecpair-2.1.0-rc.0.tgz", "integrity": "sha512-qPZetcEA1Lzzm9NsqsGF9NGorAGaXrv20eZjopLUjsdwftWcsYTE7lwzE/Xjdf4fcq6G4+vjrCudWAMGNfJqOQ==", "requires": { @@ -4433,6 +4608,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -4456,8 +4638,13 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { - "version": "npm:bip174@3.0.0-rc.1", + "version": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", "integrity": "sha512-eGi5die7Q7O3yPtkcGF1gD7qLlJLiLnYI4DpFTF6tUhUo71gy3RoXAAeeJA2fLpnVoJofXnLdLfpcO6OEZAsvw==" }, @@ -4483,7 +4670,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -4500,7 +4686,7 @@ } }, "ecpair": { - "version": "npm:ecpair@2.1.0-rc.0", + "version": "npm:@bitgo/ecpair@2.1.0-rc.0", "resolved": "https://registry.npmjs.org/@bitgo/ecpair/-/ecpair-2.1.0-rc.0.tgz", "integrity": "sha512-qPZetcEA1Lzzm9NsqsGF9NGorAGaXrv20eZjopLUjsdwftWcsYTE7lwzE/Xjdf4fcq6G4+vjrCudWAMGNfJqOQ==", "requires": { @@ -4640,6 +4826,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -5041,6 +5234,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -5068,7 +5266,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -5267,6 +5464,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -5290,6 +5494,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0-rc.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.0.0-rc.1.tgz", @@ -5317,7 +5526,6 @@ "bip174": "npm:@bitgo-forks/bip174@3.0.0-rc.1", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "json5": "^2.2.3", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", @@ -5454,6 +5662,13 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", "wif": "^2.0.1" + }, + "dependencies": { + "fastpriorityqueue": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", + "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" + } } }, "ecpair": { @@ -5477,6 +5692,11 @@ "@types/node": "*" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip174": { "version": "npm:bip174@3.0.0", "resolved": "https://registry.npmjs.org/@bitgo/bip174/-/bip174-3.0.0.tgz", @@ -5504,7 +5724,6 @@ "bip174": "npm:@bitgo/bip174@3.0.0", "bs58check": "^2.1.2", "create-hash": "^1.1.0", - "fastpriorityqueue": "^0.7.1", "ripemd160": "^2.0.2", "typeforce": "^1.11.3", "varuint-bitcoin": "^1.1.2", @@ -6885,6 +7104,13 @@ "ethereumjs-icap": "^0.3.1", "keccak256": "^1.0.2", "lodash": "^4.17.10" + }, + "dependencies": { + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + } } }, "@mapbox/node-pre-gyp": { @@ -6994,6 +7220,30 @@ "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.6.3.tgz", "integrity": "sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==" }, + "@node-lightning/bufio": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@node-lightning/bufio/-/bufio-0.22.1.tgz", + "integrity": "sha512-RsVS8J20qGva2QFZTnFFH93g/fOQ+qBm9APtRQI2VP+oWSICIarWrery83m1GKTzZ1IjpWbiiC9PHwdk6DkSsg==" + }, + "@node-lightning/crypto": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@node-lightning/crypto/-/crypto-0.22.1.tgz", + "integrity": "sha512-uNnhc2/6auOvzTdZ68OrhEMzq/ePc+nNe6f+F2TU4gTFLZYlYvsdKl7UBcmzhxMnWdHxVupVmIHuvgi29r6xGA==", + "requires": { + "secp256k1": "^4.0.2" + } + }, + "@node-lightning/invoice": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@node-lightning/invoice/-/invoice-0.22.1.tgz", + "integrity": "sha512-bXwZhMhAvuqHqW5ptNEThfnmmcmYuRB6r2wKrtK1FgMafzNN6RwLHHCZuYP+V3cudoJ4Ythsl1c84wq+XRAD0A==", + "requires": { + "@node-lightning/bufio": "^0.22.1", + "@node-lightning/crypto": "^0.22.1", + "bech32": "^1.1.3", + "bs58check": "^2.1.2" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -8553,39 +8803,24 @@ "dev": true }, "@vonage/auth": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vonage/auth/-/auth-1.5.0.tgz", - "integrity": "sha512-h2xEFKYW9IyEfFzf1OVzIVZj3/81qlY9S2LThPVFnkkbcXBe4Uph2So4giCF2to8sZ4WJNmFW63cd4S/i1qdgg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vonage/auth/-/auth-1.6.0.tgz", + "integrity": "sha512-Tde2p9HDAcYEzKfMRA1RLHChcqU8zCc2eAvpfx5WHjQSZRLQK3B5BZHjbHP7EnBYDtdX+tjwuLQD641dWElReQ==", "requires": { - "@vonage/jwt": "^1.5.0", + "@vonage/jwt": "^1.6.0", "debug": "^4.3.4" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "@vonage/jwt": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vonage/jwt/-/jwt-1.6.0.tgz", + "integrity": "sha512-AYZCHW0kebs36sNyw5LCZH2HujSpJe8+dpd35fQriyq4qlaMtXoR5xeIaiK6AWIxsCrgEWFVHFyO8resIE3zsA==", "requires": { - "ms": "2.1.2" + "debug": "^4.3.4", + "jsonwebtoken": "^9.0.0", + "uuid": "^9.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "@vonage/jwt": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@vonage/jwt/-/jwt-1.5.0.tgz", - "integrity": "sha512-H2RCqrxkODC0qssT3l4/HpaKiZSuurqjD37WS1ohcuUJVBiVAIOIG5t6N0CobY1M/Oqe9RrNSOeIyMuSh+87+A==", - "requires": { - "debug": "^4.3.4", - "jsonwebtoken": "^9.0.0", - "uuid": "^9.0.0" - }, - "dependencies": { "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -8595,14 +8830,20 @@ } }, "jsonwebtoken": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", - "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "requires": { "jws": "^3.2.2", - "lodash": "^4.17.21", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", "ms": "^2.1.1", - "semver": "^7.3.8" + "semver": "^7.5.4" } }, "ms": { @@ -8610,10 +8851,18 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" } } }, @@ -10116,6 +10365,11 @@ "form-data": "^4.0.0" } }, + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bip39": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz", @@ -10523,9 +10777,9 @@ } }, "bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, "big-integer": { "version": "1.6.51", @@ -10726,6 +10980,11 @@ "lodash": "^4.17.20" }, "dependencies": { + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -14990,11 +15249,6 @@ "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" }, - "fastpriorityqueue": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/fastpriorityqueue/-/fastpriorityqueue-0.7.4.tgz", - "integrity": "sha512-u7o5oa9R7CMOHo2i8P2/T2nRg5bg/0dDegDSJVzkVkMf/A318LNnujNLfpxlJeXUdDAefrVPqsDV624vUyxNfA==" - }, "fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", diff --git a/package.json b/package.json index f1386dc1..59dbd8ec 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@ethereumjs/tx": "^3.5.1", "@graphql-tools/merge": "^6.2.5", "@lamassu/coins": "v1.3.3", + "@node-lightning/invoice": "0.28.0", "@simplewebauthn/server": "^3.0.0", "@vonage/auth": "^1.5.0", "@vonage/sms": "^1.7.0",