fixed liquid swap bug + track swaps
This commit is contained in:
+13
-13
@@ -2,15 +2,16 @@ import axios from 'axios';
|
||||
import {generateSecureRandom} from 'react-native-securerandom';
|
||||
import ecc from '@bitcoinerlab/secp256k1';
|
||||
import {ECPairFactory} from 'ecpair';
|
||||
const ECPair = ECPairFactory(ecc);
|
||||
import {crypto} from 'liquidjs-lib';
|
||||
import {Musig, SwapTreeSerializer, TaprootUtils} from 'boltz-core';
|
||||
|
||||
const ECPair = ECPairFactory(ecc);
|
||||
async function getSwapFee() {
|
||||
try {
|
||||
const request = await axios.get(
|
||||
'https://api.boltz.exchange/getfeeestimation',
|
||||
);
|
||||
const data = request.data;
|
||||
console.log(data);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return new Promise(resolve => {
|
||||
@@ -20,8 +21,10 @@ async function getSwapFee() {
|
||||
}
|
||||
async function getSwapPairInformation() {
|
||||
try {
|
||||
const request = await axios.get('https://api.boltz.exchange/getpairs');
|
||||
const data = request.data.pairs['L-BTC/BTC'];
|
||||
const request = await axios.get(
|
||||
'https://api.boltz.exchange/v2/swap/submarine',
|
||||
);
|
||||
const data = request.data['L-BTC']['BTC'];
|
||||
return new Promise(resolve => {
|
||||
resolve(data);
|
||||
});
|
||||
@@ -36,26 +39,23 @@ async function getSwapPairInformation() {
|
||||
async function createLiquidSwap(invoice, hash) {
|
||||
try {
|
||||
const randomBytesArray = await generateSecureRandom(32);
|
||||
|
||||
const privateKey = Buffer.from(randomBytesArray);
|
||||
// Create a public key from the private key
|
||||
const publicKey =
|
||||
ECPair.fromPrivateKey(privateKey).publicKey.toString('hex');
|
||||
|
||||
const url = 'https://api.boltz.exchange/createswap';
|
||||
// Set the Content-Type header to application/json
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
const url = 'https://api.boltz.exchange/v2/swap/submarine';
|
||||
|
||||
const postData = {
|
||||
type: 'submarine',
|
||||
pairId: 'L-BTC/BTC',
|
||||
orderSide: 'sell',
|
||||
invoice: invoice,
|
||||
// pairHash: hash,
|
||||
to: 'BTC',
|
||||
from: 'L-BTC',
|
||||
refundPublicKey: publicKey,
|
||||
};
|
||||
|
||||
const request = await axios.post(url, postData);
|
||||
console.log(request.data);
|
||||
|
||||
return new Promise(resolve => {
|
||||
resolve([request.data, privateKey]);
|
||||
|
||||
@@ -181,8 +181,8 @@ async function generateLiquidAddress(
|
||||
if (!pairSwapInfo) new Error('no swap info');
|
||||
const adjustedSatAmount = Math.round(
|
||||
requestedSatAmount -
|
||||
pairSwapInfo.fees.minerFees.baseAsset?.normal -
|
||||
requestedSatAmount * (pairSwapInfo.fees.percentageSwapIn / 100),
|
||||
pairSwapInfo.fees.minerFees -
|
||||
requestedSatAmount * (pairSwapInfo.fees.percentage / 100),
|
||||
);
|
||||
|
||||
if (adjustedSatAmount < pairSwapInfo.limits.minimal) {
|
||||
@@ -222,14 +222,12 @@ async function generateLiquidAddress(
|
||||
amountMsat: adjustedSatAmount * 1000,
|
||||
description: 'Liquid Swap',
|
||||
});
|
||||
console.log(invoice);
|
||||
|
||||
if (invoice) {
|
||||
const [swapInfo, privateKey] = await createLiquidSwap(
|
||||
invoice.lnInvoice.bolt11,
|
||||
pairSwapInfo.hash,
|
||||
);
|
||||
console.log(swapInfo);
|
||||
isGeneratingAddressFunc && isGeneratingAddressFunc(false);
|
||||
return new Promise(resolve => {
|
||||
resolve({
|
||||
@@ -238,16 +236,18 @@ async function generateLiquidAddress(
|
||||
swapInfo: {
|
||||
minMax: {
|
||||
min: pairSwapInfo.limits.minimal * 2.5,
|
||||
max: pairSwapInfo.limits.maximalZeroConf?.baseAsset,
|
||||
max: pairSwapInfo.limits.maximalZeroConf,
|
||||
},
|
||||
pairSwapInfo: {
|
||||
hash: pairSwapInfo.hash,
|
||||
adjustedSatAmount: adjustedSatAmount,
|
||||
id: swapInfo.id,
|
||||
redeemScript: swapInfo.redeemScript,
|
||||
asset: 'L-BTC',
|
||||
version: 3,
|
||||
privateKey: privateKey,
|
||||
blindingKey: swapInfo.blindingKey,
|
||||
claimPublicKey: swapInfo.claimPublicKey,
|
||||
timeoutBlockHeight: swapInfo.timeoutBlockHeight,
|
||||
swapTree: swapInfo.swapTree,
|
||||
adjustedSatAmount: adjustedSatAmount,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -16,6 +16,7 @@ import {useNavigation} from '@react-navigation/native';
|
||||
import {useGlobalContextProvider} from '../../../context-store/context';
|
||||
import {useEffect} from 'react';
|
||||
import {getLocalStorageItem, setLocalStorageItem} from '../../functions';
|
||||
import {removeLocalStorageItem} from '../../functions/localStorage';
|
||||
|
||||
export default function ConfirmTxPage(props) {
|
||||
const navigate = useNavigation();
|
||||
@@ -34,13 +35,18 @@ export default function ConfirmTxPage(props) {
|
||||
: ICONS.XcircleDark;
|
||||
|
||||
(async () => {
|
||||
if (paymentInformation.details.description != 'Liquid Swap') return;
|
||||
try {
|
||||
const prevSwapInfo = JSON.parse(
|
||||
await getLocalStorageItem('liquidSwapInfo'),
|
||||
);
|
||||
prevSwapInfo.pop();
|
||||
setLocalStorageItem('liquidSwapInfo', prevSwapInfo);
|
||||
if (paymentInformation.details.payment.description != 'Liquid Swap')
|
||||
return;
|
||||
try {
|
||||
const prevSwapInfo = JSON.parse(
|
||||
await getLocalStorageItem('liquidSwapInfo'),
|
||||
);
|
||||
prevSwapInfo.pop();
|
||||
setLocalStorageItem('liquidSwapInfo', JSON.stringify(prevSwapInfo));
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import {useEffect, useRef, useState} from 'react';
|
||||
import {useNavigation} from '@react-navigation/native';
|
||||
import * as Device from 'expo-device';
|
||||
import RNEventSource from 'react-native-event-source';
|
||||
|
||||
import {
|
||||
formatBalanceAmount,
|
||||
getLocalStorageItem,
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
} from '../../functions';
|
||||
import {useGlobalContextProvider} from '../../../context-store/context';
|
||||
import QRCode from 'react-native-qrcode-svg';
|
||||
import EventSource from 'react-native-sse';
|
||||
|
||||
import {
|
||||
generateBitcoinAddress,
|
||||
@@ -165,8 +166,34 @@ export function ReceivePaymentHome() {
|
||||
if (selectedRecieveOption != 'Liquid' || !inProgressSwapInfo.id) return;
|
||||
console.log('IS RUNNING IN LIQUID');
|
||||
console.log(inProgressSwapInfo.id);
|
||||
const eventSource = new RNEventSource(
|
||||
'https://api.boltz.exchange/streamswapstatus?id=' + inProgressSwapInfo.id,
|
||||
|
||||
// const webSocket = new WebSocket(`wss://api.boltz.exchange/v2/ws`);
|
||||
// webSocket.onopen = () => {
|
||||
// console.log('did un websocket open');
|
||||
// webSocket.send(
|
||||
// JSON.stringify({
|
||||
// op: 'subscribe',
|
||||
// channel: 'swap.update',
|
||||
// args: [inProgressSwapInfo.id],
|
||||
// }),
|
||||
// );
|
||||
// };
|
||||
|
||||
// webSocket.onmessage = async rawMsg => {
|
||||
// console.log(rawMsg);
|
||||
// const msg = JSON.parse(rawMsg.toString('utf-8'));
|
||||
// console.log(msg.event);
|
||||
// if (msg.event !== 'update') {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// console.log('Got WebSocket update');
|
||||
// console.log(msg);
|
||||
// console.log();
|
||||
// };
|
||||
|
||||
const es = new EventSource(
|
||||
`https://api.boltz.exchange/streamswapstatus?id=${inProgressSwapInfo.id}`,
|
||||
);
|
||||
|
||||
const eventSourceEventListener = event => {
|
||||
@@ -192,11 +219,11 @@ export function ReceivePaymentHome() {
|
||||
}
|
||||
console.log(event.data);
|
||||
};
|
||||
eventSource.addEventListener('message', eventSourceEventListener);
|
||||
|
||||
es.addEventListener('message', eventSourceEventListener);
|
||||
|
||||
return () => {
|
||||
eventSource.removeAllListeners();
|
||||
eventSource.close();
|
||||
es.removeAllEventListeners();
|
||||
};
|
||||
}, [selectedRecieveOption, inProgressSwapInfo]);
|
||||
|
||||
@@ -362,17 +389,13 @@ export function ReceivePaymentHome() {
|
||||
</>
|
||||
)}
|
||||
{(selectedRecieveOption.toLowerCase() === 'bitcoin' ||
|
||||
selectedRecieveOption.toLowerCase() === 'unified qr' ||
|
||||
selectedRecieveOption.toLowerCase() === 'liquid') &&
|
||||
selectedRecieveOption.toLowerCase() === 'unified qr') &&
|
||||
Object.keys(inProgressSwapInfo).length != 0 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
navigate.navigate('viewInProgressSwap', {
|
||||
inProgressSwapInfo: inProgressSwapInfo,
|
||||
type:
|
||||
selectedRecieveOption.toLowerCase() === 'liquid'
|
||||
? 'liquid'
|
||||
: 'bitcoin',
|
||||
type: 'bitcoin',
|
||||
});
|
||||
}}
|
||||
style={[
|
||||
|
||||
@@ -35,6 +35,13 @@
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>api.boltz.exchange</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
@@ -93,7 +100,7 @@
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string/>
|
||||
<string></string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
||||
Generated
+84
-9
@@ -20,6 +20,7 @@
|
||||
"@react-navigation/native-stack": "6.9.17",
|
||||
"axios": "1.6.2",
|
||||
"bip32": "^4.0.0",
|
||||
"boltz-core": "2.1.1",
|
||||
"ecpair": "2.1.0",
|
||||
"expo": "49.0.0",
|
||||
"expo-barcode-scanner": "12.5.3",
|
||||
@@ -39,7 +40,6 @@
|
||||
"liquidjs-lib": "6.0.2-liquid.34",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.6",
|
||||
"react-native-event-source": "1.1.0",
|
||||
"react-native-gesture-handler": "2.12.0",
|
||||
"react-native-qrcode-svg": "6.2.0",
|
||||
"react-native-quick-base64": "2.0.8",
|
||||
@@ -49,6 +49,7 @@
|
||||
"react-native-screens": "3.22.0",
|
||||
"react-native-securerandom": "1.0.1",
|
||||
"react-native-splash-screen": "3.3.0",
|
||||
"react-native-sse": "^1.2.0",
|
||||
"react-native-svg": "13.9.0",
|
||||
"react-native-vision-camera": "3.8.2",
|
||||
"rn-swipe-button": "^1.3.8"
|
||||
@@ -61,7 +62,9 @@
|
||||
"@react-native/metro-config": "^0.72.11",
|
||||
"@tsconfig/react-native": "^3.0.0",
|
||||
"@types/react": "^18.0.24",
|
||||
"@types/react-native-event-source": "^1.1.2",
|
||||
"@types/react-test-renderer": "^18.0.0",
|
||||
"@types/ws": "^8.5.10",
|
||||
"babel-jest": "^29.2.1",
|
||||
"eslint": "^8.19.0",
|
||||
"jest": "^29.2.1",
|
||||
@@ -2117,6 +2120,11 @@
|
||||
"@noble/secp256k1": "^1.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@boltz/bitcoin-ops": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@boltz/bitcoin-ops/-/bitcoin-ops-2.0.0.tgz",
|
||||
"integrity": "sha512-AM7vFNwSD7B4XI6yeRKccWbbD/lvwoFr8U3pqhzryBQo4uMkYe5V3/kMVnml4SNuxzyqdIFu4ur3TId02sC33A=="
|
||||
},
|
||||
"node_modules/@breeztech/react-native-breez-sdk": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@breeztech/react-native-breez-sdk/-/react-native-breez-sdk-0.3.1.tgz",
|
||||
@@ -4893,6 +4901,11 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@openzeppelin/contracts": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.1.tgz",
|
||||
"integrity": "sha512-yQJaT5HDp9hYOOp4jTYxMsR02gdFZFXhewX5HW9Jo4fsqSVqqyIO/xTHdWDaKX5a3pv1txmf076Lziz+sO7L1w=="
|
||||
},
|
||||
"node_modules/@react-native-async-storage/async-storage": {
|
||||
"version": "1.18.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.18.2.tgz",
|
||||
@@ -6908,6 +6921,12 @@
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-native-event-source": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-native-event-source/-/react-native-event-source-1.1.2.tgz",
|
||||
"integrity": "sha512-XL8nDIsUaMsB1BnFgx8SYhSHcFiFUQei2ziz/msHjtV1PmvI9PE9eFf5mOoZWqBp8ncVaU8KHQPK4qXC7cus/w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/react-test-renderer": {
|
||||
"version": "18.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.6.tgz",
|
||||
@@ -6934,6 +6953,15 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
|
||||
"integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw=="
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "8.5.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz",
|
||||
"integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/yargs": {
|
||||
"version": "17.0.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.31.tgz",
|
||||
@@ -7276,6 +7304,22 @@
|
||||
"graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vulpemventures/secp256k1-zkp": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@vulpemventures/secp256k1-zkp/-/secp256k1-zkp-3.2.1.tgz",
|
||||
"integrity": "sha512-2U4nuNbXuUgMmxhuoILbRMoD2DE7KND3udk5cYilIS1MHvMtje9ywUm/zsI0g7d7x8g2A57xri+wvqCC/fCnJg==",
|
||||
"dependencies": {
|
||||
"long": "^5.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@vulpemventures/secp256k1-zkp/node_modules/long": {
|
||||
"version": "5.2.3",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
||||
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
|
||||
},
|
||||
"node_modules/@xmldom/xmldom": {
|
||||
"version": "0.7.13",
|
||||
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.13.tgz",
|
||||
@@ -8106,6 +8150,14 @@
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bip65": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/bip65/-/bip65-1.0.3.tgz",
|
||||
"integrity": "sha512-RQ1nc7xtnLa5XltnCqkoR2zmhuz498RjMJwrLKQzOE049D1HUqnYfon7cVSbwS5UGm0/EQlC2CH+NY3MyITA4Q==",
|
||||
"engines": {
|
||||
"node": ">=4.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bip66": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
|
||||
@@ -8232,6 +8284,29 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
},
|
||||
"node_modules/boltz-core": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/boltz-core/-/boltz-core-2.1.1.tgz",
|
||||
"integrity": "sha512-nbbMQbWcpJKoPvf1KNKZOlcOoflIrcretVhdt4rQ+QXVRULj+lCbl8t3FCfYLNKurWxl7OC3j/f+ILFCU7tkIw==",
|
||||
"dependencies": {
|
||||
"@boltz/bitcoin-ops": "^2.0.0",
|
||||
"@openzeppelin/contracts": "^5.0.1",
|
||||
"@vulpemventures/secp256k1-zkp": "^3.2.1",
|
||||
"bip32": "^4.0.0",
|
||||
"bip65": "^1.0.3",
|
||||
"bip66": "^1.1.5",
|
||||
"bitcoinjs-lib": "^6.1.5",
|
||||
"bn.js": "^5.2.1",
|
||||
"ecpair": "^2.1.0",
|
||||
"varuint-bitcoin": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"liquidjs-lib": "^6.0.2-liquid.34"
|
||||
}
|
||||
},
|
||||
"node_modules/boolbase": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
||||
@@ -18068,11 +18143,6 @@
|
||||
"@babel/runtime": "^7.20.6"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-event-source": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-event-source/-/react-native-event-source-1.1.0.tgz",
|
||||
"integrity": "sha512-CAs76IW8kTrdy0okfV2KPopm7E9TL0uNAR+SRrN7iZ/ii0zBeHWuhD4Q2F8gRKvmkrEtCZ6uwnfYL2TFmK0QZg=="
|
||||
},
|
||||
"node_modules/react-native-gesture-handler": {
|
||||
"version": "2.12.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.12.0.tgz",
|
||||
@@ -18188,6 +18258,11 @@
|
||||
"react-native": ">=0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-sse": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-sse/-/react-native-sse-1.2.0.tgz",
|
||||
"integrity": "sha512-+A1CcxkpR4cpxFzqYB1bg4CL7Yy+XjD258LmasJPBWMdwpMknQxabknSZWzoMgk2MEgmc0uFfbHssk3fZyr+vQ=="
|
||||
},
|
||||
"node_modules/react-native-svg": {
|
||||
"version": "13.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.9.0.tgz",
|
||||
@@ -20379,9 +20454,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.15.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz",
|
||||
"integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==",
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
||||
+4
-1
@@ -22,6 +22,7 @@
|
||||
"@react-navigation/native-stack": "6.9.17",
|
||||
"axios": "1.6.2",
|
||||
"bip32": "^4.0.0",
|
||||
"boltz-core": "2.1.1",
|
||||
"ecpair": "2.1.0",
|
||||
"expo": "49.0.0",
|
||||
"expo-barcode-scanner": "12.5.3",
|
||||
@@ -41,7 +42,6 @@
|
||||
"liquidjs-lib": "6.0.2-liquid.34",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.6",
|
||||
"react-native-event-source": "1.1.0",
|
||||
"react-native-gesture-handler": "2.12.0",
|
||||
"react-native-qrcode-svg": "6.2.0",
|
||||
"react-native-quick-base64": "2.0.8",
|
||||
@@ -51,6 +51,7 @@
|
||||
"react-native-screens": "3.22.0",
|
||||
"react-native-securerandom": "1.0.1",
|
||||
"react-native-splash-screen": "3.3.0",
|
||||
"react-native-sse": "^1.2.0",
|
||||
"react-native-svg": "13.9.0",
|
||||
"react-native-vision-camera": "3.8.2",
|
||||
"rn-swipe-button": "^1.3.8"
|
||||
@@ -63,7 +64,9 @@
|
||||
"@react-native/metro-config": "^0.72.11",
|
||||
"@tsconfig/react-native": "^3.0.0",
|
||||
"@types/react": "^18.0.24",
|
||||
"@types/react-native-event-source": "^1.1.2",
|
||||
"@types/react-test-renderer": "^18.0.0",
|
||||
"@types/ws": "^8.5.10",
|
||||
"babel-jest": "^29.2.1",
|
||||
"eslint": "^8.19.0",
|
||||
"jest": "^29.2.1",
|
||||
|
||||
@@ -1207,6 +1207,11 @@
|
||||
"@noble/hashes" "^1.1.5"
|
||||
"@noble/secp256k1" "^1.7.1"
|
||||
|
||||
"@boltz/bitcoin-ops@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/@boltz/bitcoin-ops/-/bitcoin-ops-2.0.0.tgz"
|
||||
integrity sha512-AM7vFNwSD7B4XI6yeRKccWbbD/lvwoFr8U3pqhzryBQo4uMkYe5V3/kMVnml4SNuxzyqdIFu4ur3TId02sC33A==
|
||||
|
||||
"@breeztech/react-native-breez-sdk@0.3.1":
|
||||
version "0.3.1"
|
||||
resolved "https://registry.npmjs.org/@breeztech/react-native-breez-sdk/-/react-native-breez-sdk-0.3.1.tgz"
|
||||
@@ -2020,6 +2025,11 @@
|
||||
mkdirp "^1.0.4"
|
||||
rimraf "^3.0.2"
|
||||
|
||||
"@openzeppelin/contracts@^5.0.1":
|
||||
version "5.0.1"
|
||||
resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.1.tgz"
|
||||
integrity sha512-yQJaT5HDp9hYOOp4jTYxMsR02gdFZFXhewX5HW9Jo4fsqSVqqyIO/xTHdWDaKX5a3pv1txmf076Lziz+sO7L1w==
|
||||
|
||||
"@react-native-async-storage/async-storage@1.18.2":
|
||||
version "1.18.2"
|
||||
resolved "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.18.2.tgz"
|
||||
@@ -2506,6 +2516,11 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/react-native-event-source@^1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.npmjs.org/@types/react-native-event-source/-/react-native-event-source-1.1.2.tgz"
|
||||
integrity sha512-XL8nDIsUaMsB1BnFgx8SYhSHcFiFUQei2ziz/msHjtV1PmvI9PE9eFf5mOoZWqBp8ncVaU8KHQPK4qXC7cus/w==
|
||||
|
||||
"@types/react-test-renderer@^18.0.0":
|
||||
version "18.0.6"
|
||||
resolved "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-18.0.6.tgz"
|
||||
@@ -2537,6 +2552,13 @@
|
||||
resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz"
|
||||
integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
|
||||
|
||||
"@types/ws@^8.5.10":
|
||||
version "8.5.10"
|
||||
resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz"
|
||||
integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/yargs-parser@*":
|
||||
version "21.0.3"
|
||||
resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz"
|
||||
@@ -2668,6 +2690,13 @@
|
||||
"@urql/core" ">=2.3.1"
|
||||
wonka "^4.0.14"
|
||||
|
||||
"@vulpemventures/secp256k1-zkp@^3.2.1":
|
||||
version "3.2.1"
|
||||
resolved "https://registry.npmjs.org/@vulpemventures/secp256k1-zkp/-/secp256k1-zkp-3.2.1.tgz"
|
||||
integrity sha512-2U4nuNbXuUgMmxhuoILbRMoD2DE7KND3udk5cYilIS1MHvMtje9ywUm/zsI0g7d7x8g2A57xri+wvqCC/fCnJg==
|
||||
dependencies:
|
||||
long "^5.2.3"
|
||||
|
||||
"@xmldom/xmldom@^0.8.8":
|
||||
version "0.8.10"
|
||||
resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz"
|
||||
@@ -3205,14 +3234,19 @@ bip32@^4.0.0:
|
||||
typeforce "^1.11.5"
|
||||
wif "^2.0.6"
|
||||
|
||||
bip66@^1.1.0:
|
||||
bip65@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.npmjs.org/bip65/-/bip65-1.0.3.tgz"
|
||||
integrity sha512-RQ1nc7xtnLa5XltnCqkoR2zmhuz498RjMJwrLKQzOE049D1HUqnYfon7cVSbwS5UGm0/EQlC2CH+NY3MyITA4Q==
|
||||
|
||||
bip66@^1.1.0, bip66@^1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz"
|
||||
integrity sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==
|
||||
dependencies:
|
||||
safe-buffer "^5.0.1"
|
||||
|
||||
bitcoinjs-lib@^6.0.2:
|
||||
bitcoinjs-lib@^6.0.2, bitcoinjs-lib@^6.1.5:
|
||||
version "6.1.5"
|
||||
resolved "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.5.tgz"
|
||||
integrity sha512-yuf6xs9QX/E8LWE2aMJPNd0IxGofwfuVOiYdNUESkc+2bHHVKjhJd8qewqapeoolh9fihzHGoDCB5Vkr57RZCQ==
|
||||
@@ -3293,6 +3327,22 @@ body-parser@^1.20.1:
|
||||
type-is "~1.6.18"
|
||||
unpipe "1.0.0"
|
||||
|
||||
boltz-core@2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.npmjs.org/boltz-core/-/boltz-core-2.1.1.tgz"
|
||||
integrity sha512-nbbMQbWcpJKoPvf1KNKZOlcOoflIrcretVhdt4rQ+QXVRULj+lCbl8t3FCfYLNKurWxl7OC3j/f+ILFCU7tkIw==
|
||||
dependencies:
|
||||
"@boltz/bitcoin-ops" "^2.0.0"
|
||||
"@openzeppelin/contracts" "^5.0.1"
|
||||
"@vulpemventures/secp256k1-zkp" "^3.2.1"
|
||||
bip32 "^4.0.0"
|
||||
bip65 "^1.0.3"
|
||||
bip66 "^1.1.5"
|
||||
bitcoinjs-lib "^6.1.5"
|
||||
bn.js "^5.2.1"
|
||||
ecpair "^2.1.0"
|
||||
varuint-bitcoin "^1.1.2"
|
||||
|
||||
boolbase@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz"
|
||||
@@ -6642,7 +6692,7 @@ lines-and-columns@^1.1.6:
|
||||
resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz"
|
||||
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
||||
|
||||
liquidjs-lib@6.0.2-liquid.34:
|
||||
liquidjs-lib@^6.0.2-liquid.34, liquidjs-lib@6.0.2-liquid.34:
|
||||
version "6.0.2-liquid.34"
|
||||
resolved "https://registry.npmjs.org/liquidjs-lib/-/liquidjs-lib-6.0.2-liquid.34.tgz"
|
||||
integrity sha512-oGW7ianIcrSlK4HdKlhpShx5H4jRxzS/KZahozOb0Vfkz/3PrAXa6fIwuAxfnhOzchVKwqlXerCZvIBXzDQA5g==
|
||||
@@ -6732,6 +6782,11 @@ long@^4.0.0:
|
||||
resolved "https://registry.npmjs.org/long/-/long-4.0.0.tgz"
|
||||
integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==
|
||||
|
||||
long@^5.2.3:
|
||||
version "5.2.3"
|
||||
resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz"
|
||||
integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==
|
||||
|
||||
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz"
|
||||
@@ -8142,11 +8197,6 @@ react-native-dotenv@^3.4.9:
|
||||
dependencies:
|
||||
dotenv "^16.3.1"
|
||||
|
||||
react-native-event-source@1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmjs.org/react-native-event-source/-/react-native-event-source-1.1.0.tgz"
|
||||
integrity sha512-CAs76IW8kTrdy0okfV2KPopm7E9TL0uNAR+SRrN7iZ/ii0zBeHWuhD4Q2F8gRKvmkrEtCZ6uwnfYL2TFmK0QZg==
|
||||
|
||||
react-native-gesture-handler@2.12.0:
|
||||
version "2.12.0"
|
||||
resolved "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.12.0.tgz"
|
||||
@@ -8229,6 +8279,11 @@ react-native-splash-screen@3.3.0:
|
||||
resolved "https://registry.npmjs.org/react-native-splash-screen/-/react-native-splash-screen-3.3.0.tgz"
|
||||
integrity sha512-rGjt6HkoSXxMqH4SQUJ1gnPQlPJV8+J47+4yhgTIan4bVvAwJhEeJH7wWt9hXSdH4+VfwTS0GTaflj1Tw83IhA==
|
||||
|
||||
react-native-sse@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.npmjs.org/react-native-sse/-/react-native-sse-1.2.0.tgz"
|
||||
integrity sha512-+A1CcxkpR4cpxFzqYB1bg4CL7Yy+XjD258LmasJPBWMdwpMknQxabknSZWzoMgk2MEgmc0uFfbHssk3fZyr+vQ==
|
||||
|
||||
react-native-svg@^13.2.0, react-native-svg@13.9.0:
|
||||
version "13.9.0"
|
||||
resolved "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.9.0.tgz"
|
||||
@@ -9902,9 +9957,9 @@ ws@^7.5.1:
|
||||
integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==
|
||||
|
||||
ws@^8.12.1:
|
||||
version "8.15.1"
|
||||
resolved "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz"
|
||||
integrity sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==
|
||||
version "8.16.0"
|
||||
resolved "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz"
|
||||
integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==
|
||||
|
||||
ws@8.3.0:
|
||||
version "8.3.0"
|
||||
|
||||
Reference in New Issue
Block a user