Merge pull request #1615 from RafaelTaranto/fix/missing-ln-commits
LAM-980 missing ln commits
This commit is contained in:
commit
f5ea2375eb
10 changed files with 257 additions and 514 deletions
|
|
@ -26,7 +26,8 @@ const SECRET_FIELDS = [
|
|||
'twilio.authToken',
|
||||
'telnyx.apiKey',
|
||||
'vonage.apiSecret',
|
||||
'galoy.walletId'
|
||||
'galoy.walletId',
|
||||
'galoy.apiSecret'
|
||||
]
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -845,6 +845,10 @@ function plugins (settings, deviceId) {
|
|||
return walletScoring.isWalletScoringEnabled(settings, tx.cryptoCode)
|
||||
}
|
||||
|
||||
function probeLN (cryptoCode, address) {
|
||||
return wallet.probeLN(settings, cryptoCode, address)
|
||||
}
|
||||
|
||||
return {
|
||||
getRates,
|
||||
recordPing,
|
||||
|
|
@ -877,7 +881,8 @@ function plugins (settings, deviceId) {
|
|||
isValidWalletScore,
|
||||
getTransactionHash,
|
||||
getInputAddresses,
|
||||
isWalletScoringEnabled
|
||||
isWalletScoringEnabled,
|
||||
probeLN
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,14 @@ const RETRIES = 2
|
|||
|
||||
const tickerObjects = {}
|
||||
|
||||
// This is probably fixed on upstream ccxt
|
||||
// but we need to udpate node to get on the latest version
|
||||
const sanityCheckRates = (ask, bid, tickerName) => {
|
||||
if (new BN(0).eq(ask) || new BN(0).eq(bid)) {
|
||||
throw new Error(`Failure fetching rates for ${tickerName}`)
|
||||
}
|
||||
}
|
||||
|
||||
function ticker (fiatCode, cryptoCode, tickerName) {
|
||||
if (!tickerObjects[tickerName]) {
|
||||
tickerObjects[tickerName] = new ccxt[tickerName]({
|
||||
|
|
@ -45,12 +53,15 @@ function getCurrencyRates (ticker, fiatCode, cryptoCode) {
|
|||
}
|
||||
const symbol = buildMarket(fiatCode, cryptoCode, ticker.id)
|
||||
return ticker.fetchTicker(symbol)
|
||||
.then(res => ({
|
||||
rates: {
|
||||
ask: new BN(res.ask),
|
||||
bid: new BN(res.bid)
|
||||
.then(res => {
|
||||
sanityCheckRates(res.ask, res.bid, cryptoCode)
|
||||
return {
|
||||
rates: {
|
||||
ask: new BN(res.ask),
|
||||
bid: new BN(res.bid)
|
||||
}
|
||||
}
|
||||
}))
|
||||
})
|
||||
} catch (e) {
|
||||
return Promise.reject(e)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,20 @@
|
|||
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) {
|
||||
function request (graphqlQuery, token, endpoint) {
|
||||
const headers = {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': `Bearer ${token}`
|
||||
}
|
||||
return axios({
|
||||
method: 'post',
|
||||
url: URI,
|
||||
url: endpoint,
|
||||
headers: headers,
|
||||
data: graphqlQuery
|
||||
})
|
||||
|
|
@ -27,6 +22,9 @@ function request (graphqlQuery, token) {
|
|||
if (r.error) throw r.error
|
||||
return r.data
|
||||
})
|
||||
.catch(err => {
|
||||
throw new Error(err)
|
||||
})
|
||||
}
|
||||
|
||||
function checkCryptoCode (cryptoCode) {
|
||||
|
|
@ -37,7 +35,41 @@ function checkCryptoCode (cryptoCode) {
|
|||
return Promise.resolve()
|
||||
}
|
||||
|
||||
function getGaloyAccount (token) {
|
||||
function getTransactionsByAddress (token, endpoint, address) {
|
||||
const accountInfo = {
|
||||
'operationName': 'me',
|
||||
'query': `query me {
|
||||
me {
|
||||
defaultAccount {
|
||||
defaultWalletId
|
||||
wallets {
|
||||
id
|
||||
walletCurrency
|
||||
transactionsByAddress (address: "${address}")
|
||||
edges {
|
||||
node {
|
||||
direction
|
||||
settlementAmount
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
'variables': {}
|
||||
}
|
||||
return request(accountInfo, token, endpoint)
|
||||
.then(r => {
|
||||
return r.data.me.defaultAccount
|
||||
})
|
||||
.catch(err => {
|
||||
throw new Error(err)
|
||||
})
|
||||
}
|
||||
|
||||
function getGaloyAccount (token, endpoint) {
|
||||
const accountInfo = {
|
||||
'operationName': 'me',
|
||||
'query': `query me {
|
||||
|
|
@ -48,59 +80,27 @@ function getGaloyAccount (token) {
|
|||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pendingIncomingBalance
|
||||
}
|
||||
}
|
||||
id
|
||||
}
|
||||
}`,
|
||||
'variables': {}
|
||||
}
|
||||
return request(accountInfo, token)
|
||||
return request(accountInfo, token, endpoint)
|
||||
.then(r => {
|
||||
return r.data.me.defaultAccount
|
||||
})
|
||||
.catch(err => {
|
||||
throw new Error(err)
|
||||
})
|
||||
}
|
||||
|
||||
function isLightning (address) {
|
||||
return address.substr(0, 2) === 'ln'
|
||||
}
|
||||
|
||||
function sendFundsOnChain (walletId, address, cryptoAtoms, token) {
|
||||
function sendFundsOnChain (walletId, address, cryptoAtoms, token, endpoint) {
|
||||
const sendOnChain = {
|
||||
'operationName': 'onChainPaymentSend',
|
||||
'query': `mutation onChainPaymentSend($input: OnChainPaymentSendInput!) {
|
||||
|
|
@ -114,17 +114,17 @@ function sendFundsOnChain (walletId, address, cryptoAtoms, token) {
|
|||
}`,
|
||||
'variables': { 'input': { 'address': `${address}`, 'amount': `${cryptoAtoms}`, 'walletId': `${walletId}` } }
|
||||
}
|
||||
return request(sendOnChain, token)
|
||||
return request(sendOnChain, token, endpoint)
|
||||
.then(result => {
|
||||
return result.data.onChainPaymentSend
|
||||
})
|
||||
}
|
||||
|
||||
function sendFundsLN (walletId, invoice, token) {
|
||||
const sendLN = {
|
||||
'operationName': 'lnInvoicePaymentSend',
|
||||
'query': `mutation lnInvoicePaymentSend($input: LnInvoicePaymentInput!) {
|
||||
lnInvoicePaymentSend(input: $input) {
|
||||
function sendFundsLN (walletId, invoice, cryptoAtoms, token, endpoint) {
|
||||
const sendLnNoAmount = {
|
||||
'operationName': 'lnNoAmountInvoicePaymentSend',
|
||||
'query': `mutation lnNoAmountInvoicePaymentSend($input: LnNoAmountInvoicePaymentInput!) {
|
||||
lnNoAmountInvoicePaymentSend(input: $input) {
|
||||
errors {
|
||||
message
|
||||
path
|
||||
|
|
@ -132,29 +132,41 @@ function sendFundsLN (walletId, invoice, token) {
|
|||
status
|
||||
}
|
||||
}`,
|
||||
'variables': { 'input': { 'paymentRequest': `${invoice}`, 'walletId': `${walletId}` } }
|
||||
'variables': { 'input': { 'paymentRequest': `${invoice}`, 'walletId': `${walletId}`, 'amount': `${cryptoAtoms}` } }
|
||||
}
|
||||
return request(sendLN, token)
|
||||
.then(result => {
|
||||
return result.data.lnInvoicePaymentSend
|
||||
})
|
||||
return request(sendLnNoAmount, token, endpoint).then(result => result.data.lnNoAmountInvoicePaymentSend)
|
||||
}
|
||||
|
||||
function sendProbeRequest (walletId, invoice, cryptoAtoms, token, endpoint) {
|
||||
const sendProbeNoAmount = {
|
||||
'operationName': 'lnNoAmountInvoiceFeeProbe',
|
||||
'query': `mutation lnNoAmountInvoiceFeeProbe($input: LnNoAmountInvoiceFeeProbeInput!) {
|
||||
lnNoAmountInvoiceFeeProbe(input: $input) {
|
||||
amount
|
||||
errors {
|
||||
message
|
||||
path
|
||||
}
|
||||
}
|
||||
}`,
|
||||
'variables': { 'input': { 'paymentRequest': `${invoice}`, 'walletId': `${walletId}`, 'amount': `${cryptoAtoms}` } }
|
||||
}
|
||||
return request(sendProbeNoAmount, token, endpoint).then(result => result.data.lnNoAmountInvoiceFeeProbe)
|
||||
}
|
||||
|
||||
function sendCoins (account, tx, settings, operatorId) {
|
||||
const { toAddress, cryptoAtoms, cryptoCode } = tx
|
||||
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => getGaloyAccount(account.apiKey))
|
||||
.then(() => getGaloyAccount(account.apiSecret, account.endpoint))
|
||||
.then(galoyAccount => {
|
||||
const wallet = _.head(
|
||||
_.filter(wallet => wallet.walletCurrency === externalCryptoCode &&
|
||||
wallet.id === galoyAccount.defaultWalletId &&
|
||||
wallet.id === account.walletId)(galoyAccount.wallets)
|
||||
)
|
||||
const wallet = _.find(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 sendFundsLN(wallet.id, toAddress, cryptoAtoms, account.apiSecret, account.endpoint)
|
||||
}
|
||||
return sendFundsOnChain(wallet.id, toAddress, cryptoAtoms, account.apiKey)
|
||||
return sendFundsOnChain(wallet.id, toAddress, cryptoAtoms, account.apiSecret, account.endpoint)
|
||||
})
|
||||
.then(result => {
|
||||
switch (result.status) {
|
||||
|
|
@ -172,7 +184,17 @@ function sendCoins (account, tx, settings, operatorId) {
|
|||
})
|
||||
}
|
||||
|
||||
function newOnChainAddress (walletId, token) {
|
||||
function probeLN (account, cryptoCode, invoice) {
|
||||
const probeHardLimits = [100, 500, 1000]
|
||||
const promises = probeHardLimits.map(limit => {
|
||||
return sendProbeRequest(account.walletId, invoice, limit, account.apiSecret, account.endpoint)
|
||||
.then(r => _.isEmpty(r.errors))
|
||||
})
|
||||
return Promise.all(promises)
|
||||
.then(results => _.zipObject(probeHardLimits, results))
|
||||
}
|
||||
|
||||
function newOnChainAddress (walletId, token, endpoint) {
|
||||
const createOnChainAddress = {
|
||||
'operationName': 'onChainAddressCreate',
|
||||
'query': `mutation onChainAddressCreate($input: OnChainAddressCreateInput!) {
|
||||
|
|
@ -186,13 +208,13 @@ function newOnChainAddress (walletId, token) {
|
|||
}`,
|
||||
'variables': { 'input': { 'walletId': `${walletId}` } }
|
||||
}
|
||||
return request(createOnChainAddress, token)
|
||||
return request(createOnChainAddress, token, endpoint)
|
||||
.then(result => {
|
||||
return result.data.onChainAddressCreate.address
|
||||
})
|
||||
}
|
||||
|
||||
function newInvoice (walletId, cryptoAtoms, token) {
|
||||
function newInvoice (walletId, cryptoAtoms, token, endpoint) {
|
||||
const createInvoice = {
|
||||
'operationName': 'lnInvoiceCreate',
|
||||
'query': `mutation lnInvoiceCreate($input: LnInvoiceCreateInput!) {
|
||||
|
|
@ -208,7 +230,7 @@ function newInvoice (walletId, cryptoAtoms, token) {
|
|||
}`,
|
||||
'variables': { 'input': { 'walletId': `${walletId}`, 'amount': `${cryptoAtoms}` } }
|
||||
}
|
||||
return request(createInvoice, token)
|
||||
return request(createInvoice, token, endpoint)
|
||||
.then(result => {
|
||||
return result.data.lnInvoiceCreate.invoice.paymentRequest
|
||||
})
|
||||
|
|
@ -217,15 +239,13 @@ function newInvoice (walletId, cryptoAtoms, token) {
|
|||
function balance (account, cryptoCode, settings, operatorId) {
|
||||
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => getGaloyAccount(account.apiKey))
|
||||
.then(() => getGaloyAccount(account.apiSecret, account.endpoint))
|
||||
.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)
|
||||
)
|
||||
const wallet = _.find(wallet => wallet.walletCurrency === externalCryptoCode &&
|
||||
wallet.id === galoyAccount.defaultWalletId &&
|
||||
wallet.id === account.walletId)(galoyAccount.wallets)
|
||||
return new BN(wallet.balance || 0)
|
||||
})
|
||||
}
|
||||
|
|
@ -234,16 +254,14 @@ function newAddress (account, info, tx, settings, operatorId) {
|
|||
const { cryptoAtoms, cryptoCode } = tx
|
||||
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => getGaloyAccount(account.apiKey))
|
||||
.then(() => getGaloyAccount(account.apiSecret, account.endpoint))
|
||||
.then(galoyAccount => {
|
||||
const wallet = _.head(
|
||||
_.filter(wallet => wallet.walletCurrency === externalCryptoCode &&
|
||||
wallet.id === galoyAccount.defaultWalletId &&
|
||||
wallet.id === account.walletId)(galoyAccount.wallets)
|
||||
)
|
||||
const wallet = _.find(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)
|
||||
newOnChainAddress(wallet.id, account.apiSecret, account.endpoint),
|
||||
newInvoice(wallet.id, cryptoAtoms, account.apiSecret, account.endpoint)
|
||||
]
|
||||
return Promise.all(promises)
|
||||
})
|
||||
|
|
@ -254,31 +272,32 @@ function newAddress (account, info, tx, settings, operatorId) {
|
|||
|
||||
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 getBalance = _.reduce((acc, value) => {
|
||||
acc[value.node.status] = acc[value.node.status].plus(new BN(value.node.settlementAmount))
|
||||
return acc
|
||||
}, { SUCCESS: new BN(0), PENDING: new BN(0), FAILURE: new BN(0) })
|
||||
|
||||
const externalCryptoCode = coinUtils.getEquivalentCode(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
|
||||
.then(() => {
|
||||
const address = coinUtils.parseUrl(cryptoCode, account.environment, toAddress)
|
||||
// Consider all LN transactions successful
|
||||
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) }
|
||||
return { receivedCryptoAtoms: cryptoAtoms, status: 'confirmed' }
|
||||
}
|
||||
// On-chain tx
|
||||
const transaction = _.head(_.filter(tx => tx.node.initiationVia.address === address)(transactions))
|
||||
return { receivedCryptoAtoms: cryptoAtoms, status: mapStatus(transaction) }
|
||||
// On-chain and intra-ledger transactions
|
||||
return getTransactionsByAddress(account.apiSecret, account.endpoint, address)
|
||||
.then(accountInfo => {
|
||||
const transactions =
|
||||
_.find(wallet => wallet.walletCurrency === externalCryptoCode &&
|
||||
wallet.id === accountInfo.defaultWalletId &&
|
||||
wallet.id === account.walletId)(accountInfo.wallets).transactions.edges
|
||||
const { SUCCESS: confirmed, PENDING: pending } = getBalance(transactions)
|
||||
if (confirmed.gte(requested)) return { receivedCryptoAtoms: confirmed, status: 'confirmed' }
|
||||
if (pending.gte(requested)) return { receivedCryptoAtoms: pending, status: 'authorized' }
|
||||
if (pending.gt(0)) return { receivedCryptoAtoms: pending, status: 'insufficientFunds' }
|
||||
return { receivedCryptoAtoms: pending, status: 'notSeen' }
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -286,23 +305,17 @@ function newFunding (account, cryptoCode, settings, operatorId) {
|
|||
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
|
||||
// Regular BTC address
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => getGaloyAccount(account.apiKey))
|
||||
.then(() => getGaloyAccount(account.apiSecret, account.endpoint))
|
||||
.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])
|
||||
const wallet = _.find(wallet => wallet.walletCurrency === externalCryptoCode &&
|
||||
wallet.id === galoyAccount.defaultWalletId &&
|
||||
wallet.id === account.walletId)(galoyAccount.wallets)
|
||||
return newOnChainAddress(wallet.id, account.apiSecret, account.endpoint)
|
||||
.then(onChainAddress => [onChainAddress, wallet.balance, wallet.pendingIncomingBalance])
|
||||
})
|
||||
.then(([onChainAddress, balance, pendingBalance]) => {
|
||||
.then(([onChainAddress, balance, pendingIncomingBalance]) => {
|
||||
return {
|
||||
fundingPendingBalance: new BN(pendingBalance),
|
||||
fundingPendingBalance: new BN(pendingIncomingBalance),
|
||||
fundingConfirmedBalance: new BN(balance),
|
||||
fundingAddress: onChainAddress
|
||||
}
|
||||
|
|
@ -327,5 +340,7 @@ module.exports = {
|
|||
getStatus,
|
||||
newFunding,
|
||||
cryptoNetwork,
|
||||
checkBlockchainStatus
|
||||
checkBlockchainStatus,
|
||||
sendProbeRequest,
|
||||
probeLN
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const { router: txRoutes } = require('./routes/txRoutes')
|
|||
const verifyUserRoutes = require('./routes/verifyUserRoutes')
|
||||
const verifyTxRoutes = require('./routes/verifyTxRoutes')
|
||||
const verifyPromoCodeRoutes = require('./routes/verifyPromoCodeRoutes')
|
||||
const probeRoutes = require('./routes/probeLnRoutes')
|
||||
|
||||
const graphQLServer = require('./graphql/server')
|
||||
|
||||
|
|
@ -83,6 +84,8 @@ app.use('/tx', txRoutes)
|
|||
|
||||
app.use('/logs', logsRoutes)
|
||||
|
||||
app.use('/probe', probeRoutes)
|
||||
|
||||
graphQLServer.applyMiddleware({ app })
|
||||
|
||||
app.use(errorHandler)
|
||||
|
|
|
|||
20
lib/routes/probeLnRoutes.js
Normal file
20
lib/routes/probeLnRoutes.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
const express = require('express')
|
||||
const router = express.Router()
|
||||
|
||||
const plugins = require('../plugins')
|
||||
const settingsLoader = require('../new-settings-loader')
|
||||
|
||||
function probe (req, res, next) {
|
||||
// TODO: why req.settings is undefined?
|
||||
settingsLoader.loadLatest()
|
||||
.then(settings => {
|
||||
const pi = plugins(settings, req.deviceId)
|
||||
return pi.probeLN('LN', req.body.address)
|
||||
.then(r => res.status(200).send({ hardLimits: r }))
|
||||
.catch(next)
|
||||
})
|
||||
}
|
||||
|
||||
router.get('/', probe)
|
||||
|
||||
module.exports = router
|
||||
|
|
@ -62,6 +62,13 @@ function _balance (settings, cryptoCode) {
|
|||
})
|
||||
}
|
||||
|
||||
function probeLN (settings, cryptoCode, address) {
|
||||
return fetchWallet(settings, cryptoCode).then(r => {
|
||||
if (!r.wallet.probeLN) return null
|
||||
return r.wallet.probeLN(r.account, cryptoCode, address)
|
||||
})
|
||||
}
|
||||
|
||||
function sendCoins (settings, tx) {
|
||||
return fetchWallet(settings, tx.cryptoCode)
|
||||
.then(r => {
|
||||
|
|
@ -299,5 +306,6 @@ module.exports = {
|
|||
newFunding,
|
||||
cryptoNetwork,
|
||||
supportsBatching,
|
||||
checkBlockchainStatus
|
||||
checkBlockchainStatus,
|
||||
probeLN
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
import * as Yup from 'yup'
|
||||
|
||||
import SecretInputFormik from 'src/components/inputs/formik/SecretInput'
|
||||
import TextInputFormik from 'src/components/inputs/formik/TextInput'
|
||||
import {
|
||||
SecretInput,
|
||||
TextInput,
|
||||
Autocomplete
|
||||
} from 'src/components/inputs/formik'
|
||||
|
||||
import { secretTest } from './helper'
|
||||
|
||||
|
|
@ -11,26 +14,49 @@ export default {
|
|||
title: 'Galoy (Wallet)',
|
||||
elements: [
|
||||
{
|
||||
code: 'apiKey',
|
||||
display: 'API Key',
|
||||
component: TextInputFormik,
|
||||
face: true,
|
||||
long: true
|
||||
code: 'apiSecret',
|
||||
display: 'API Secret',
|
||||
component: SecretInput
|
||||
},
|
||||
{
|
||||
code: 'environment',
|
||||
display: 'Environment',
|
||||
component: Autocomplete,
|
||||
inputProps: {
|
||||
options: [
|
||||
{ code: 'main', display: 'prod' },
|
||||
{ code: 'test', display: 'test' }
|
||||
],
|
||||
labelProp: 'display',
|
||||
valueProp: 'code'
|
||||
},
|
||||
face: true
|
||||
},
|
||||
{
|
||||
code: 'endpoint',
|
||||
display: 'Endpoint',
|
||||
component: TextInput
|
||||
},
|
||||
{
|
||||
code: 'walletId',
|
||||
display: 'Wallet ID',
|
||||
component: SecretInputFormik
|
||||
component: SecretInput
|
||||
}
|
||||
],
|
||||
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'),
|
||||
apiSecret: Yup.string('The API Secret must be a string')
|
||||
.max(200, 'The API Secret is too long')
|
||||
.test(secretTest(account?.apiSecret)),
|
||||
walletId: Yup.string('The wallet id must be a string')
|
||||
.max(100, 'The wallet id is too long')
|
||||
.test(secretTest(account?.walletId))
|
||||
.test(secretTest(account?.walletId)),
|
||||
environment: Yup.string('The environment must be a string')
|
||||
.matches(/(main|test)/)
|
||||
.required('The environment is required'),
|
||||
endpoint: Yup.string('The endpoint must be a string')
|
||||
.max(100, 'The endpoint is too long')
|
||||
.required('The endpoint is required')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
403
package-lock.json
generated
403
package-lock.json
generated
|
|
@ -1564,31 +1564,6 @@
|
|||
"wif": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"bitcoinjs-message": {
|
||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||
"requires": {
|
||||
"bech32": "^1.1.3",
|
||||
"bs58check": "^2.1.2",
|
||||
"buffer-equals": "^1.0.3",
|
||||
"create-hash": "^1.1.2",
|
||||
"secp256k1": "5.0.0",
|
||||
"varuint-bitcoin": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bech32": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||
},
|
||||
"buffer-equals": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/buffer-equals/-/buffer-equals-1.0.4.tgz",
|
||||
"integrity": "sha512-99MsCq0j5+RhubVEtKQgKaD6EM+UP3xJgIvQqwJ3SOLDUekzxMX1ylXBng+Wa2sh7mGT0W6RUly8ojjr1Tt6nA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs58": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
|
||||
|
|
@ -1680,7 +1655,7 @@
|
|||
}
|
||||
},
|
||||
"bitcoinjs-message": {
|
||||
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||
"requires": {
|
||||
|
|
@ -3543,6 +3518,23 @@
|
|||
"wif": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"bitcoinjs-lib": {
|
||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||
"requires": {
|
||||
"bech32": "^2.0.0",
|
||||
"bip174": "npm:@bitgo-forks/bip174@3.1.0-master.4",
|
||||
"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",
|
||||
"varuint-bitcoin": "^1.1.2",
|
||||
"wif": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"ecpair": {
|
||||
"version": "npm:@bitgo/ecpair@2.1.0-rc.0",
|
||||
"resolved": "https://registry.npmjs.org/@bitgo/ecpair/-/ecpair-2.1.0-rc.0.tgz",
|
||||
|
|
@ -4088,11 +4080,6 @@
|
|||
"@ethersproject/strings": "^5.6.1"
|
||||
}
|
||||
},
|
||||
"@gar/promisify": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
|
||||
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw=="
|
||||
},
|
||||
"@graphql-tools/merge": {
|
||||
"version": "6.2.17",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-6.2.17.tgz",
|
||||
|
|
@ -4638,53 +4625,6 @@
|
|||
"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.28.0",
|
||||
"resolved": "https://registry.npmjs.org/@node-lightning/bufio/-/bufio-0.28.0.tgz",
|
||||
"integrity": "sha512-H93eIosyLGhxEGnbM+9PE3OTUGTFogiCZCCq7xcc8WpHD8EJ4pyshEeRlcW+ssTYfrSsT1QU5XaGfDah+mXZpw=="
|
||||
},
|
||||
"@node-lightning/crypto": {
|
||||
"version": "0.28.0",
|
||||
"resolved": "https://registry.npmjs.org/@node-lightning/crypto/-/crypto-0.28.0.tgz",
|
||||
"integrity": "sha512-gBTEMKlPFc6/Q4E6pKZes+3WnTh1WJFul2XMJdrWYsMlPFwmeiO9ynXt3AA7ImsbQF19MmLY6We8KQhwFWivrw==",
|
||||
"requires": {
|
||||
"@node-lightning/secp256k1": "^0.28.0"
|
||||
}
|
||||
},
|
||||
"@node-lightning/invoice": {
|
||||
"version": "0.28.0",
|
||||
"resolved": "https://registry.npmjs.org/@node-lightning/invoice/-/invoice-0.28.0.tgz",
|
||||
"integrity": "sha512-8vmOQU1lpClou/Npqrwiwn0AVyvN33QLcUYGpq3S8JkoC6RTGQN7iYMV+6utoTy7nfFM8GqPBfORxtOK8NPXsQ==",
|
||||
"requires": {
|
||||
"@node-lightning/bufio": "^0.28.0",
|
||||
"@node-lightning/crypto": "^0.28.0",
|
||||
"bech32": "^1.1.3",
|
||||
"bs58check": "^2.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"bech32": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
|
||||
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@node-lightning/secp256k1": {
|
||||
"version": "0.28.0",
|
||||
"resolved": "https://registry.npmjs.org/@node-lightning/secp256k1/-/secp256k1-0.28.0.tgz",
|
||||
"integrity": "sha512-xpFAspwOFJlVvuUH88OFOvcLERXjC+UdapyQau13IXCbOptjoAhGM8aWJCI+VWbEcIK4r3i0zpmFAAqZRaiUxA==",
|
||||
"requires": {
|
||||
"node-addon-api": "^4.2.0",
|
||||
"node-gyp": "^8.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-addon-api": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz",
|
||||
"integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
|
|
@ -4711,24 +4651,6 @@
|
|||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@npmcli/fs": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",
|
||||
"integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==",
|
||||
"requires": {
|
||||
"@gar/promisify": "^1.0.1",
|
||||
"semver": "^7.3.5"
|
||||
}
|
||||
},
|
||||
"@npmcli/move-file": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz",
|
||||
"integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==",
|
||||
"requires": {
|
||||
"mkdirp": "^1.0.4",
|
||||
"rimraf": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"@otplib/core": {
|
||||
"version": "12.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@otplib/core/-/core-12.0.1.tgz",
|
||||
|
|
@ -5476,18 +5398,11 @@
|
|||
"debug": "4"
|
||||
}
|
||||
},
|
||||
"agentkeepalive": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
|
||||
"integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
|
||||
"requires": {
|
||||
"humanize-ms": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"aggregate-error": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
|
||||
"integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"clean-stack": "^2.0.0",
|
||||
"indent-string": "^4.0.0"
|
||||
|
|
@ -5754,15 +5669,6 @@
|
|||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
|
||||
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
|
||||
"integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
|
||||
"requires": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
}
|
||||
},
|
||||
"argon2": {
|
||||
"version": "0.28.2",
|
||||
"resolved": "https://registry.npmjs.org/argon2/-/argon2-0.28.2.tgz",
|
||||
|
|
@ -6645,30 +6551,6 @@
|
|||
"resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
|
||||
"integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
|
||||
},
|
||||
"bitcoinjs-lib": {
|
||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||
"requires": {
|
||||
"bech32": "^2.0.0",
|
||||
"bip174": "npm:@bitgo-forks/bip174@3.1.0-master.4",
|
||||
"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",
|
||||
"varuint-bitcoin": "^1.1.2",
|
||||
"wif": "^2.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bip174": {
|
||||
"version": "npm:@bitgo-forks/bip174@3.1.0-master.4",
|
||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bip174/-/bip174-3.1.0-master.4.tgz",
|
||||
"integrity": "sha512-WDRNzPSdJGDqQNqfN+L5KHNHFDmNOPYnUnT7NkEkfHWn5m1jSOfcf8Swaslt5P0xcSDiERdN2gZxFc6XtOqRYg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"bitcore-lib": {
|
||||
"version": "8.25.47",
|
||||
"resolved": "https://registry.npmjs.org/bitcore-lib/-/bitcore-lib-8.25.47.tgz",
|
||||
|
|
@ -7141,31 +7023,6 @@
|
|||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
|
||||
},
|
||||
"cacache": {
|
||||
"version": "15.3.0",
|
||||
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz",
|
||||
"integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==",
|
||||
"requires": {
|
||||
"@npmcli/fs": "^1.0.0",
|
||||
"@npmcli/move-file": "^1.0.1",
|
||||
"chownr": "^2.0.0",
|
||||
"fs-minipass": "^2.0.0",
|
||||
"glob": "^7.1.4",
|
||||
"infer-owner": "^1.0.4",
|
||||
"lru-cache": "^6.0.0",
|
||||
"minipass": "^3.1.1",
|
||||
"minipass-collect": "^1.0.2",
|
||||
"minipass-flush": "^1.0.5",
|
||||
"minipass-pipeline": "^1.2.2",
|
||||
"mkdirp": "^1.0.3",
|
||||
"p-map": "^4.0.0",
|
||||
"promise-inflight": "^1.0.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"ssri": "^8.0.1",
|
||||
"tar": "^6.0.2",
|
||||
"unique-filename": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"cache-base": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
|
||||
|
|
@ -7489,7 +7346,8 @@
|
|||
"clean-stack": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
|
||||
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="
|
||||
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
|
||||
"dev": true
|
||||
},
|
||||
"clean-yaml-object": {
|
||||
"version": "0.1.0",
|
||||
|
|
@ -8844,15 +8702,6 @@
|
|||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
|
||||
},
|
||||
"encoding": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
|
||||
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"iconv-lite": "^0.6.2"
|
||||
}
|
||||
},
|
||||
"end-of-stream": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
|
|
@ -8861,11 +8710,6 @@
|
|||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"env-paths": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
|
||||
"integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="
|
||||
},
|
||||
"eol": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/eol/-/eol-0.5.1.tgz",
|
||||
|
|
@ -8877,11 +8721,6 @@
|
|||
"integrity": "sha512-TK2m7MvWPt/v3dan0BCNp99pytIE5UGrUj7F0KZirNX8xz8fDFUAZfgm8uB5FuQq9u0sMeDocYBfEhsd1nwGoA==",
|
||||
"dev": true
|
||||
},
|
||||
"err-code": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
|
||||
"integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA=="
|
||||
},
|
||||
"error-ex": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
||||
|
|
@ -10682,21 +10521,6 @@
|
|||
"resolved": "https://registry.npmjs.org/futoin-hkdf/-/futoin-hkdf-1.5.3.tgz",
|
||||
"integrity": "sha512-SewY5KdMpaoCeh7jachEWFsh1nNlaDjNHZXWqL5IGwtpEYHTgkr2+AMCgNwKWkcc0wpSYrZfR7he4WdmHFtDxQ=="
|
||||
},
|
||||
"gauge": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
|
||||
"integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
|
||||
"requires": {
|
||||
"aproba": "^1.0.3 || ^2.0.0",
|
||||
"color-support": "^1.1.3",
|
||||
"console-control-strings": "^1.1.0",
|
||||
"has-unicode": "^2.0.1",
|
||||
"signal-exit": "^3.0.7",
|
||||
"string-width": "^4.2.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"wide-align": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
|
||||
|
|
@ -11392,14 +11216,6 @@
|
|||
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==",
|
||||
"dev": true
|
||||
},
|
||||
"humanize-ms": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
|
||||
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
|
||||
"requires": {
|
||||
"ms": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"iconv": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/iconv/-/iconv-2.3.5.tgz",
|
||||
|
|
@ -11409,15 +11225,6 @@
|
|||
"safer-buffer": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
}
|
||||
},
|
||||
"idna-uts46-hx": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz",
|
||||
|
|
@ -11469,17 +11276,14 @@
|
|||
"imurmurhash": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
|
||||
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="
|
||||
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
|
||||
"dev": true
|
||||
},
|
||||
"indent-string": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
|
||||
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="
|
||||
},
|
||||
"infer-owner": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
|
||||
"integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A=="
|
||||
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
|
||||
"dev": true
|
||||
},
|
||||
"inflection": {
|
||||
"version": "1.12.0",
|
||||
|
|
@ -11884,11 +11688,6 @@
|
|||
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
|
||||
"dev": true
|
||||
},
|
||||
"is-lambda": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",
|
||||
"integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ=="
|
||||
},
|
||||
"is-negative-zero": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
|
||||
|
|
@ -12054,7 +11853,8 @@
|
|||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"dev": true
|
||||
},
|
||||
"isobject": {
|
||||
"version": "4.0.0",
|
||||
|
|
@ -13802,29 +13602,6 @@
|
|||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"make-fetch-happen": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz",
|
||||
"integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==",
|
||||
"requires": {
|
||||
"agentkeepalive": "^4.1.3",
|
||||
"cacache": "^15.2.0",
|
||||
"http-cache-semantics": "^4.1.0",
|
||||
"http-proxy-agent": "^4.0.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"is-lambda": "^1.0.1",
|
||||
"lru-cache": "^6.0.0",
|
||||
"minipass": "^3.1.3",
|
||||
"minipass-collect": "^1.0.2",
|
||||
"minipass-fetch": "^1.3.2",
|
||||
"minipass-flush": "^1.0.5",
|
||||
"minipass-pipeline": "^1.2.4",
|
||||
"negotiator": "^0.6.2",
|
||||
"promise-retry": "^2.0.1",
|
||||
"socks-proxy-agent": "^6.0.0",
|
||||
"ssri": "^8.0.0"
|
||||
}
|
||||
},
|
||||
"makeerror": {
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
|
||||
|
|
@ -14128,49 +13905,6 @@
|
|||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"minipass-collect": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
|
||||
"integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",
|
||||
"requires": {
|
||||
"minipass": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"minipass-fetch": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz",
|
||||
"integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==",
|
||||
"requires": {
|
||||
"encoding": "^0.1.12",
|
||||
"minipass": "^3.1.0",
|
||||
"minipass-sized": "^1.0.3",
|
||||
"minizlib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"minipass-flush": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
|
||||
"integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
|
||||
"requires": {
|
||||
"minipass": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"minipass-pipeline": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
|
||||
"integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
|
||||
"requires": {
|
||||
"minipass": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"minipass-sized": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",
|
||||
"integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",
|
||||
"requires": {
|
||||
"minipass": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"minizlib": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
|
||||
|
|
@ -14590,23 +14324,6 @@
|
|||
"whatwg-url": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node-gyp": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz",
|
||||
"integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==",
|
||||
"requires": {
|
||||
"env-paths": "^2.2.0",
|
||||
"glob": "^7.1.4",
|
||||
"graceful-fs": "^4.2.6",
|
||||
"make-fetch-happen": "^9.1.0",
|
||||
"nopt": "^5.0.0",
|
||||
"npmlog": "^6.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.5",
|
||||
"tar": "^6.1.2",
|
||||
"which": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"node-gyp-build": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
|
||||
|
|
@ -14750,17 +14467,6 @@
|
|||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"npmlog": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
|
||||
"integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
|
||||
"requires": {
|
||||
"are-we-there-yet": "^3.0.0",
|
||||
"console-control-strings": "^1.1.0",
|
||||
"gauge": "^4.0.3",
|
||||
"set-blocking": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"number-to-bn": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz",
|
||||
|
|
@ -15102,6 +14808,7 @@
|
|||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
|
||||
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"aggregate-error": "^3.0.0"
|
||||
}
|
||||
|
|
@ -15672,20 +15379,6 @@
|
|||
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
|
||||
"dev": true
|
||||
},
|
||||
"promise-inflight": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
|
||||
"integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g=="
|
||||
},
|
||||
"promise-retry": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
|
||||
"integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
|
||||
"requires": {
|
||||
"err-code": "^2.0.2",
|
||||
"retry": "^0.12.0"
|
||||
}
|
||||
},
|
||||
"promise-sequential": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/promise-sequential/-/promise-sequential-1.1.1.tgz",
|
||||
|
|
@ -16297,11 +15990,6 @@
|
|||
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
|
||||
"dev": true
|
||||
},
|
||||
"retry": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
|
||||
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="
|
||||
},
|
||||
"reusify": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||
|
|
@ -17128,16 +16816,6 @@
|
|||
"smart-buffer": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"socks-proxy-agent": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz",
|
||||
"integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==",
|
||||
"requires": {
|
||||
"agent-base": "^6.0.2",
|
||||
"debug": "^4.3.3",
|
||||
"socks": "^2.6.2"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
|
|
@ -17263,14 +16941,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"ssri": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
|
||||
"integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==",
|
||||
"requires": {
|
||||
"minipass": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"stack-trace": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
|
||||
|
|
@ -19139,22 +18809,6 @@
|
|||
"integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==",
|
||||
"dev": true
|
||||
},
|
||||
"unique-filename": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
|
||||
"integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
|
||||
"requires": {
|
||||
"unique-slug": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"unique-slug": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz",
|
||||
"integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==",
|
||||
"requires": {
|
||||
"imurmurhash": "^0.1.4"
|
||||
}
|
||||
},
|
||||
"unique-string": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
|
||||
|
|
@ -19938,6 +19592,7 @@
|
|||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
"@ethereumjs/tx": "^3.5.1",
|
||||
"@graphql-tools/merge": "^6.2.5",
|
||||
"@lamassu/coins": "v1.4.0-beta.4",
|
||||
"@node-lightning/invoice": "0.28.0",
|
||||
"@simplewebauthn/server": "^3.0.0",
|
||||
"@vonage/auth": "^1.5.0",
|
||||
"@vonage/sms": "^1.7.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue