diff --git a/lib/plugins/wallet/galoy/galoy.js b/lib/plugins/wallet/galoy/galoy.js index 932dbf9c..1147cc85 100644 --- a/lib/plugins/wallet/galoy/galoy.js +++ b/lib/plugins/wallet/galoy/galoy.js @@ -1,10 +1,11 @@ const _ = require('lodash/fp') - +const invoice = require('@node-lightning/invoice') const axios = require('axios') const NAME = 'LN' const SUPPORTED_COINS = ['LN', 'BTC'] const TX_PENDING = 'PENDING' +const TX_SUCCESS = 'SUCCESS' const URI = 'https://api.staging.galoy.io/graphql' @@ -13,7 +14,7 @@ const BN = require('../../../bn') function request (graphqlQuery, token) { const headers = { 'content-type': 'application/json', - 'Authorization': `Bearer ${token || TEST_AUTH_TOKEN}` + 'Authorization': `Bearer ${token}` } return Promise.resolve(true) .then(() => { @@ -108,65 +109,6 @@ function getGaloyAccount (token) { }) } -function fetchAuthToken (config) { - const phone = config.phone - // userRequestAuthCode deprecated? - const regularRequestAuthCode = { - 'operationName': 'userRequestAuthCode', - 'query': `mutation userRequestAuthCode($input: UserRequestAuthCodeInput!) { - userRequestAuthCode(input: $input) { - errors { - message - path - } - success - } - }`, - 'variables': { 'input': { 'phone': `${phone}` } } - } - const createCaptcha = { - 'operationName': 'captchaCreateChallenge', - 'query': `mutation captchaCreateChallenge { - captchaCreateChallenge { - errors { - message - path - } - result { - challengeCode - id - } - } - }`, - 'variables': {} - } - const captchaRequestAuthCode = code => ({ - 'operationName': 'captchaRequestAuthCode', - 'query': `mutation captchaRequestAuthCode($input: CaptchaRequestAuthCodeInput!) { - captchaRequestAuthCode(input: $input) { - errors { - message - path - } - success - } - }`, - 'variables': { 'input': { 'phone': `${phone}`, 'challengeCode': `${code.challengeCode}`, 'secCode': `${code.challengeCode.slice(0, 5)}`, 'validationCode': `${code.challengeCode.slice(0, 5)}` } } - }) - - return request(createCaptcha) - .then(r => { - const code = r.data.captchaCreateChallenge.result - if (code) { - // captchaRequestAuthCode parameters have to be processed by geetest - return request(captchaRequestAuthCode(code)) - } - }) - .catch(err => { - throw new Error(err) - }) -} - function isLightning (address) { return address.substr(0, 2) === 'ln' } @@ -220,14 +162,13 @@ function sendFundsLN (walletId, invoice, token) { function sendCoins (account, tx, settings, operatorId) { const { toAddress, cryptoAtoms, cryptoCode } = tx return checkCryptoCode(cryptoCode) - // .then(() => fetchAuthToken({ phone: PHONE })) - .then(authToken => Promise.all([getGaloyAccount(authToken), authToken])) - .then(([account, authToken]) => { - const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === account.defaultWalletId)(account.wallets)) + .then(() => getGaloyAccount(account.authToken)) + .then(galoyAccount => { + const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === galoyAccount.defaultWalletId)(galoyAccount.wallets)) if (isLightning(toAddress)) { - return sendFundsLN(wallet.id, toAddress, authToken) + return sendFundsLN(wallet.id, toAddress, account.authToken) } - return sendFundsOnChain(wallet.id, toAddress, cryptoAtoms, authToken) + return sendFundsOnChain(wallet.id, toAddress, cryptoAtoms, account.authToken) }) .then(result => { return result @@ -287,13 +228,11 @@ function newInvoice (walletId, cryptoAtoms, token) { function balance (account, cryptoCode, settings, operatorId) { return checkCryptoCode(cryptoCode) - // .then(() => fetchAuthToken({ phone: PHONE })) - .then(authToken => getGaloyAccount(authToken)) - .then(account => { - console.log(account) + .then(() => getGaloyAccount(account.authToken)) + .then(galoyAccount => { // account has a list of wallets, should we consider the balance of each one? - // for now we'll pick the first BTC wallet that matches the defaultWalletId - const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === account.defaultWalletId)(account.wallets)) + // for now we'll get the first BTC wallet that matches the defaultWalletId + const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === galoyAccount.defaultWalletId)(galoyAccount.wallets)) console.log(wallet) return new BN(wallet.balance || 0) }) @@ -305,13 +244,12 @@ function balance (account, cryptoCode, settings, operatorId) { function newAddress (account, info, tx, settings, operatorId) { const { cryptoAtoms, cryptoCode } = tx return checkCryptoCode(cryptoCode) - // .then(() => fetchAuthToken({ phone: PHONE })) - .then(authToken => Promise.all([getGaloyAccount(authToken), authToken])) - .then(([account, authToken]) => { - const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === account.defaultWalletId)(account.wallets)) + .then(() => getGaloyAccount(account.authToken)) + .then(galoyAccount => { + const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === galoyAccount.defaultWalletId)(galoyAccount.wallets)) const promises = [ - newOnChainAddress(wallet.id, authToken), - newInvoice(wallet.id, cryptoAtoms, authToken) + newOnChainAddress(wallet.id, account.authToken), + newInvoice(wallet.id, cryptoAtoms, account.authToken) ] return Promise.all(promises) }) @@ -321,22 +259,39 @@ function newAddress (account, info, tx, settings, operatorId) { } function getStatus (account, tx, requested, settings, operatorId) { - // Type Transaction has a field status - // but we're not sure if it's interchangeable with our status definition + const { toAddress, cryptoAtoms, cryptoCode } = tx + const mapStatus = status => { + if (status === TX_PENDING) return 'authorized' + if (status === TX_SUCCESS) return 'confirmed' + return 'notSeen' + } + return checkCryptoCode(cryptoCode) + .then(() => getGaloyAccount(account.authToken)) + .then(galoyAccount => { + const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === galoyAccount.defaultWalletId)(galoyAccount.wallets)) + const transactions = wallet.transactions.edges + if (isLightning(toAddress)) { + const paymentHash = invoice.decode(toAddress).paymentHash.toString('hex') + const transaction = _.head(_.filter(tx => tx.node.initiationVia.paymentHash === paymentHash && tx.node.direction === 'RECEIVE')(transactions)) + return { receivedCryptoAtoms: cryptoAtoms, status: mapStatus(transaction.node.status) } + } + // On-chain tx + const transaction = _.head(_.filter(tx => tx.node.initiationVia.address === toAddress)(transactions)) + return { receivedCryptoAtoms: cryptoAtoms, status: mapStatus(transaction.node.status) } + }) } function newFunding (account, cryptoCode, settings, operatorId) { - // Has to be a regular BTC address + // Regular BTC address return checkCryptoCode(cryptoCode) - // .then(() => fetchAuthToken({ phone: PHONE })) - .then(authToken => Promise.all([getGaloyAccount(authToken), authToken])) - .then(([account, authToken]) => { - const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === account.defaultWalletId)(account.wallets)) + .then(() => getGaloyAccount(account.authToken)) + .then(galoyAccount => { + const wallet = _.head(_.filter(wallet => wallet.walletCurrency === cryptoCode && wallet.id === galoyAccount.defaultWalletId)(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, authToken) + return newOnChainAddress(wallet.id, account.authToken) .then(onChainAddress => [onChainAddress, wallet.balance, pendingBalance]) }) .then(([onChainAddress, balance, pendingBalance]) => { @@ -358,22 +313,63 @@ function checkBlockchainStatus (cryptoCode) { .then(() => Promise.resolve('ready')) } -// sendCoins({}, { -// toAddress: 'tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt', -// cryptoCode: 'BTC', -// cryptoAtoms: 1000 -// }, {}, {}) -// .then(r => console.log(r)) - -// balance({}, 'BTC', {}, {}) -// .then(r => console.log()) -// getGaloyAccount() -// newAddress({}, {}, { cryptoCode: 'BTC', cryptoAtoms: 1 }, {}) -// .then(r => console.log(r)) - -// Test faucet addresses -// tb1qfyt7cgds7z8ssthtnhh35s608059yzk0hwgcqd 1) -// tb1qmflph389nz5ev05jypzvcglyguyrl2qhyaag6r 2) +// function fetchAuthToken (config) { +// const phone = config.phone +// // userRequestAuthCode deprecated? +// const regularRequestAuthCode = { +// 'operationName': 'userRequestAuthCode', +// 'query': `mutation userRequestAuthCode($input: UserRequestAuthCodeInput!) { +// userRequestAuthCode(input: $input) { +// errors { +// message +// path +// } +// success +// } +// }`, +// 'variables': { 'input': { 'phone': `${phone}` } } +// } +// const createCaptcha = { +// 'operationName': 'captchaCreateChallenge', +// 'query': `mutation captchaCreateChallenge { +// captchaCreateChallenge { +// errors { +// message +// path +// } +// result { +// challengeCode +// id +// } +// } +// }`, +// 'variables': {} +// } +// const captchaRequestAuthCode = code => ({ +// 'operationName': 'captchaRequestAuthCode', +// 'query': `mutation captchaRequestAuthCode($input: CaptchaRequestAuthCodeInput!) { +// captchaRequestAuthCode(input: $input) { +// errors { +// message +// path +// } +// success +// } +// }`, +// 'variables': { 'input': { 'phone': `${phone}`, 'challengeCode': `${code.challengeCode}`, 'secCode': `${code.challengeCode.slice(0, 5)}`, 'validationCode': `${code.challengeCode.slice(0, 5)}` } } +// }) +// return request(createCaptcha) +// .then(r => { +// const code = r.data.captchaCreateChallenge.result +// if (code) { +// // captchaRequestAuthCode parameters have to be processed by geetest +// return request(captchaRequestAuthCode(code)) +// } +// }) +// .catch(err => { +// throw new Error(err) +// }) +// } module.exports = { NAME, 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..051eba5e 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.22.1", "@simplewebauthn/server": "^3.0.0", "@vonage/auth": "^1.5.0", "@vonage/sms": "^1.7.0",