From 7a2ba4348f73b0cbeca553fc72d4f8bafd3ea64c Mon Sep 17 00:00:00 2001 From: gAndroid Date: Tue, 21 Apr 2020 14:14:06 -0400 Subject: [PATCH] Release 0.0.2 - Ln wallet --- .gitignore | 7 +- .vscode/launch.json | 29 + README.md | 45 +- android/app/build.gradle | 17 +- android/app/src/main/AndroidManifest.xml | 3 +- .../main/java/com/sifir/MainApplication.java | 4 +- .../app/src/main/java/com/sifir/Rudder.java | 52 + .../main/java/com/sifir/RudderPackage.java | 29 + .../src/main/java/com/sifir/TorBridge.java | 6 +- .../java/com/sifir/TorBridgeAsyncTask.java | 14 +- android/build.gradle | 15 + android/settings.gradle | 2 + babel.config.js | 1 + index.js | 1 - metro.config.js | 4 +- package-lock.json | 2591 ++++++++++++----- package.json | 60 +- shim.js | 30 - src/assets/images/boltTxn.png | Bin 0 -> 555 bytes src/assets/images/boltTxn@2x.png | Bin 0 -> 1064 bytes src/assets/images/boltTxn@3x.png | Bin 0 -> 1566 bytes src/assets/images/bolt_blue.png | Bin 0 -> 18790 bytes src/assets/images/camera-small.png | Bin 0 -> 10400 bytes src/assets/images/yellowTxn.png | Bin 0 -> 516 bytes src/assets/images/yellowTxn@2x.png | Bin 0 -> 1004 bytes src/assets/images/yellowTxn@3x.png | Bin 0 -> 1495 bytes src/common/AppStyle.js | 1 + src/common/constants.js | 66 +- src/common/images.js | 4 + .../elements/SifirAccountActions.js | 98 + src/components/elements/SifirAccountHeader.js | 123 + .../elements/SifirAccountHistory.js | 71 + src/components/elements/SifirBTCAmount.js | 1 - .../elements/SifirChannelProgress.js | 69 + src/components/elements/SifirNodesTable.js | 125 + src/components/elements/SifirQrCodeCamera.js | 1 + src/components/elements/SifirSettingModal.js | 304 +- src/components/elements/SifirTxnList.js | 224 +- .../elements/deprecated/StyledText.js | 6 + src/components/elements/deprecated/SwipeUp.js | 61 + .../elements/deprecated/TabBarIcon.js | 15 + .../screens/auth/ScanToPairScreen.js | 51 +- .../screens/auth/UnlockORGenKeys.js | 58 +- src/components/screens/error/errorScreen.js | 159 + src/components/screens/error/index.js | 1 + .../ln/SifirLNChannelConfirmedScreen.js | 145 + .../screens/ln/SifirLNChannelFundingScreen.js | 321 ++ .../screens/ln/SifirLNInvoiceConfirmScreen.js | 421 +++ .../screens/ln/SifirLNNodeSelectScreen.js | 224 ++ src/components/screens/ln/index.js | 11 + .../screens/wallet/SifirAccountScreen.js | 404 ++- .../screens/wallet/SifirAccountsListScreen.js | 155 +- .../wallet/SifirBtcReceiveTxnScreen.js | 67 +- .../wallet/SifirBtcSendTxnConfirmScreen.js | 235 +- .../SifirBtcSendTxnInputAmountScreen.js | 119 +- .../wallet/SifirBtcTxnConfirmedScreen.js | 107 +- .../screens/wallet/SifirGetAddrScreen.js | 199 +- src/containers/LnStack.js | 65 + src/containers/WalletStack.js | 10 +- src/containers/index.js | 45 +- src/helpers/bolt11.min.js | 1 + src/helpers/validations.js | 7 +- src/store/actions/auth.js | 10 +- src/store/actions/btcwallet.js | 29 +- src/store/actions/lnWallet.js | 385 +++ src/store/io/btcClient/index.js | 2 +- src/store/io/events/index.js | 10 +- src/store/io/lnClient/clientFactory.js | 10 + src/store/io/lnClient/index.js | 1 + src/store/io/sifirClient/index.js | 9 + .../io/stores/b64RnSensitiveStorage/index.js | 27 + src/store/io/stores/index.js | 138 + src/store/io/stores/melondb/index.js | 25 + src/store/io/stores/melondb/ln/models.js | 44 + src/store/io/stores/melondb/ln/schemas.js | 23 + src/store/io/transports/tor/index.js | 5 +- src/store/reducers/auth.js | 27 +- src/store/reducers/btcWallet.js | 27 + src/store/reducers/index.js | 1 + src/store/reducers/lnWallet.js | 212 ++ src/store/types/index.js | 14 + src/store/utils/constants.js | 1 + 82 files changed, 6235 insertions(+), 1649 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 android/app/src/main/java/com/sifir/Rudder.java create mode 100644 android/app/src/main/java/com/sifir/RudderPackage.java delete mode 100644 shim.js create mode 100644 src/assets/images/boltTxn.png create mode 100644 src/assets/images/boltTxn@2x.png create mode 100644 src/assets/images/boltTxn@3x.png create mode 100644 src/assets/images/bolt_blue.png create mode 100644 src/assets/images/camera-small.png create mode 100644 src/assets/images/yellowTxn.png create mode 100644 src/assets/images/yellowTxn@2x.png create mode 100644 src/assets/images/yellowTxn@3x.png create mode 100644 src/components/elements/SifirAccountActions.js create mode 100644 src/components/elements/SifirAccountHeader.js create mode 100644 src/components/elements/SifirAccountHistory.js create mode 100755 src/components/elements/SifirChannelProgress.js create mode 100755 src/components/elements/SifirNodesTable.js create mode 100755 src/components/elements/deprecated/StyledText.js create mode 100644 src/components/elements/deprecated/SwipeUp.js create mode 100755 src/components/elements/deprecated/TabBarIcon.js create mode 100644 src/components/screens/error/errorScreen.js create mode 100644 src/components/screens/error/index.js create mode 100644 src/components/screens/ln/SifirLNChannelConfirmedScreen.js create mode 100644 src/components/screens/ln/SifirLNChannelFundingScreen.js create mode 100644 src/components/screens/ln/SifirLNInvoiceConfirmScreen.js create mode 100644 src/components/screens/ln/SifirLNNodeSelectScreen.js create mode 100644 src/components/screens/ln/index.js create mode 100644 src/containers/LnStack.js create mode 100644 src/helpers/bolt11.min.js create mode 100644 src/store/actions/lnWallet.js create mode 100644 src/store/io/lnClient/clientFactory.js create mode 100644 src/store/io/lnClient/index.js create mode 100644 src/store/io/sifirClient/index.js create mode 100644 src/store/io/stores/b64RnSensitiveStorage/index.js create mode 100644 src/store/io/stores/index.js create mode 100644 src/store/io/stores/melondb/index.js create mode 100644 src/store/io/stores/melondb/ln/models.js create mode 100644 src/store/io/stores/melondb/ln/schemas.js create mode 100644 src/store/reducers/lnWallet.js diff --git a/.gitignore b/.gitignore index 1ff9875..efa71d0 100644 --- a/.gitignore +++ b/.gitignore @@ -21,12 +21,14 @@ DerivedData *.ipa *.xcuserstate + # Android/IntelliJ # build/ .idea .gradle local.properties +package-lock.json *.iml # node.js @@ -35,13 +37,13 @@ node_modules/ npm-debug.log yarn-error.log yarn.lock - +.vscode # BUCK buck-out/ \.buckd/ *.keystore !debug.keystore - +TODO.txt # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the @@ -59,4 +61,5 @@ buck-out/ # CocoaPods /ios/Pods/ *.swp +**/**/*.swo android/gradle.properties diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..12ea22d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to packager", + "cwd": "${workspaceFolder}", + "type": "reactnative", + "request": "attach" + }, + { + "name": "Debug Android", + "cwd": "${workspaceFolder}", + "type": "reactnative", + "request": "launch", + "platform": "android" + }, + + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "skipFiles": ["/**"], + "program": "${workspaceFolder}\\start" + } + ] +} diff --git a/README.md b/README.md index 4d4cf56..4c71efe 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,47 @@ -# Sifir Mobile Wallet - -An anonymous, private and secure Bitcoin wallet +# Sifir : Bitcoin and Lightning powered mobile wallet +- Non-custodial and open-source +- Anonymous, private and secure TOR connection to your own Bitcoin and Lightning node via Cyphernode. +- All communication is signed and encrypted with PGP keys generated on device to ensure maximum privacy and origination of messages. +- User friendly UX without compromising cypherpunk principles. :warning: Dragons lie ahead ! :warning: -Sifir is still very much Alpha software with known issues. Please keep that in mind when using it. If you do find an issue while using the Sifir *please* open an issue for it so we can get on it. +Sifir is still very much Alpha software. Please keep that in mind when using it. If you do find an issue while using the Sifir *please* open an issue for it so we can get on it. *ANDROID ONLY* Sifir has only been tested on android phones at this time. -### Downloading Release +## Downloading Release - Download and install the prebuilt APK from the release section - Google Store - Coming soon... -### Build and Installing +## Build and Install for your self 1. Setup React Native CLI - https://facebook.github.io/react-native/docs/getting-started - 2. Clone the Sifir project repository +3. Install any npm dependencies locally: +`npm i` -3. Install any npm dependencies locally -## Running the wallet app - +### Running in development mode +1. Make sure you've installed all depedencies and that your phone is connected and recongized by your system. +2. Open two terminal windows (or Tmux panes, emacs,...) +In one terminal window run: +``` +npm run start ``` -react-native run-android +and in another run: ``` +npm run android +``` +This will build, upload and start a debug version of the app on your phone with hot reload enabled. +### Building APK for 'real' use +1. Build APK by running: +`npm run android:apk` +This will build the APK as `app-release.apk` and also make a copy tagged with the git commit being built ex: `sifir-android-app-release-e3fa51.apk` +Both files will be located in: +`/android/app/build/outputs/apk/release` + +2. Make sure your phone is connected and recongized by your computer and then install APK directly on your phohne by running +`adb install app-release.apk` ## Built With @@ -33,10 +50,6 @@ react-native run-android ## Authors - @gabidi -## License - -This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details - ## Acknowledgments - React Native diff --git a/android/app/build.gradle b/android/app/build.gradle index 1659323..4acb8ed 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,5 +1,5 @@ apply plugin: "com.android.application" - +apply plugin: 'kotlin-android' import com.android.build.OutputFile /** @@ -191,14 +191,28 @@ android { aaptOptions { cruncherEnabled = false } + // react-native-v8 mod + packagingOptions { + // Make sure libjsc.so does not packed in APK + exclude "**/libjsc.so" + } + //eof react-native-v8 mod } dependencies { + // Add v8-android - prebuilt libv8android.so into APK + implementation 'org.chromium:v8-android:+' implementation project(':react-native-randombytes') implementation project(':react-native-share') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.facebook.react:react-native:+" implementation project(path: ':gopenpgp') + implementation project(':watermelondb') + // Rudder includes + implementation 'com.rudderstack.android.sdk:core:1.0' + implementation 'com.google.code.gson:gson:2.8.6' + // EOF Rudder includes + // From node_modules if (enableHermes) { @@ -217,4 +231,5 @@ task copyDownloadableDepsToLibs(type: Copy) { into 'libs' } + apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index df549cb..112a5e1 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -3,6 +3,8 @@ + + getPackages() { // Packages that cannot be autolinked yet can be added manually here, for example: packages.add(new TorBridgePackage()); packages.add(new PgpBridgePackage()); + packages.add(new RudderPackage()); + packages.add(new WatermelonDBPackage()); return packages; } diff --git a/android/app/src/main/java/com/sifir/Rudder.java b/android/app/src/main/java/com/sifir/Rudder.java new file mode 100644 index 0000000..9515bae --- /dev/null +++ b/android/app/src/main/java/com/sifir/Rudder.java @@ -0,0 +1,52 @@ +package com.sifir; + +import android.util.Log; + +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.bridge.Arguments; +import com.rudderstack.android.sdk.core.RudderClient; +import com.rudderstack.android.sdk.core.RudderConfig; +import com.rudderstack.android.sdk.core.RudderLogger; +import com.rudderstack.android.sdk.core.RudderMessageBuilder; + +import java.util.HashMap; +import java.util.Map; + +public class Rudder extends ReactContextBaseJavaModule { + private static ReactApplicationContext reactContext; + private RudderClient client; + + public Rudder(ReactApplicationContext context) { + super(context); + this.client = RudderClient.getInstance( + context, + "1YST7ARggOUXVKmylkX9K7Rk7w5", + new RudderConfig.Builder() + .withEndPointUri("https://hosted.rudderlabs.com") +// .withLogLevel(RudderLogger.RudderLogLevel.DEBUG) + .withTrackLifecycleEvents(true) + .build() + + ); + } + + @Override + public String getName() { + return "Rudder"; + } + + @ReactMethod + public void event(String eventName, String eventJson) { + Map properties = new HashMap<>(); + properties.put("event_json", eventJson); + this.client.track( + new RudderMessageBuilder() + .setEventName(eventName) + .setProperty(properties) + .build() + ); + } +} diff --git a/android/app/src/main/java/com/sifir/RudderPackage.java b/android/app/src/main/java/com/sifir/RudderPackage.java new file mode 100644 index 0000000..6b726b3 --- /dev/null +++ b/android/app/src/main/java/com/sifir/RudderPackage.java @@ -0,0 +1,29 @@ +package com.sifir; + +import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.uimanager.ViewManager; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class RudderPackage implements ReactPackage { + + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } + + @Override + public List createNativeModules( + ReactApplicationContext reactContext) { + List modules = new ArrayList<>(); + + modules.add(new Rudder(reactContext)); + + return modules; + } + +} diff --git a/android/app/src/main/java/com/sifir/TorBridge.java b/android/app/src/main/java/com/sifir/TorBridge.java index f9f1a1d..8c5bd19 100644 --- a/android/app/src/main/java/com/sifir/TorBridge.java +++ b/android/app/src/main/java/com/sifir/TorBridge.java @@ -29,9 +29,9 @@ public TorBridge(ReactApplicationContext context) { this.client = new OkHttpClient() .newBuilder() .proxy(this.proxy) - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(10, TimeUnit.SECONDS) + .connectTimeout(15, TimeUnit.SECONDS) + .writeTimeout(15, TimeUnit.SECONDS) + .readTimeout(15, TimeUnit.SECONDS) .build(); } diff --git a/android/app/src/main/java/com/sifir/TorBridgeAsyncTask.java b/android/app/src/main/java/com/sifir/TorBridgeAsyncTask.java index 85108a6..06fa67c 100644 --- a/android/app/src/main/java/com/sifir/TorBridgeAsyncTask.java +++ b/android/app/src/main/java/com/sifir/TorBridgeAsyncTask.java @@ -34,10 +34,9 @@ public TorBridgeAsyncTask(Promise promise, OkHttpClient client) { @Override protected void onPostExecute(WritableMap result) { if (this.error != null) { - Log.d("TorBridge","error onPostExecute" + this.error.toString()); + Log.d("TorBridge", "error onPostExecute" + this.error.toString()); mPromise.reject(this.error); - } - else { + } else { mPromise.resolve(result); } @@ -68,9 +67,9 @@ public WritableMap run(String method, String url, String json, String signatureH } try (Response response = this.client.newCall(request.build()).execute()) { WritableMap resp = Arguments.createMap(); - Map> headers = response.headers().toMultimap(); - resp.putString("headers",new JSONObject(headers).toString()); - resp.putString("body",response.body().string()); + Map> headers = response.headers().toMultimap(); + resp.putString("headers", new JSONObject(headers).toString()); + resp.putString("body", response.body().string()); return resp; } } @@ -81,9 +80,10 @@ protected WritableMap doInBackground(String... params) { try { return run(params[0], params[1], params[2], params[3]); } catch (Exception e) { + Log.d("TorBridge", "error doInBackground" + e.toString()); this.error = e; WritableMap resp = Arguments.createMap(); - resp.putString("error",e.toString()); + resp.putString("error", e.toString()); return resp; } } diff --git a/android/build.gradle b/android/build.gradle index 9f633ce..776ed77 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,6 +6,7 @@ buildscript { minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 + kotlin_version = '1.3.21' } repositories { google() @@ -13,6 +14,7 @@ buildscript { } dependencies { classpath('com.android.tools.build:gradle:3.5.0') + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -24,11 +26,24 @@ allprojects { maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") + // Replace AAR from original RN with AAR from react-native-v8 + url("$rootDir/../node_modules/react-native-v8/dist") } + // react-native-v8 mod + maven { + // prebuilt libv8android.so + url("$rootDir/../node_modules/v8-android/dist") + } + // eof mod maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } + // rudder mod + maven { + url "https://dl.bintray.com/rudderstack/rudderstack" + } + google() jcenter() diff --git a/android/settings.gradle b/android/settings.gradle index 81ed43b..657a105 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'Sifir' +include ':watermelondb' +project(':watermelondb').projectDir = new File(rootProject.projectDir, '../node_modules/@nozbe/watermelondb/native/android') include ':react-native-randombytes', ':gopenpgp' project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android') include ':react-native-share' diff --git a/babel.config.js b/babel.config.js index 1fd825f..ae9d761 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,7 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ + ['@babel/plugin-proposal-decorators', {legacy: true}], [ 'module-resolver', { diff --git a/index.js b/index.js index a06cee3..6c0df91 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,6 @@ * @format */ import 'react-native-gesture-handler'; -import './shim'; import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; diff --git a/metro.config.js b/metro.config.js index 6d90b4e..6896884 100644 --- a/metro.config.js +++ b/metro.config.js @@ -16,8 +16,8 @@ module.exports = { }, resolver: { extraNodeModules: { - // ...require('node-libs-react-native'), - // vm: require.resolve('vm-browserify'), + ...require('node-libs-react-native'), + vm: require.resolve('vm-browserify'), }, }, }; diff --git a/package-lock.json b/package-lock.json index 349450c..869986f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,21 +13,22 @@ } }, "@babel/core": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", - "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", + "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", - "@babel/helpers": "^7.8.4", - "@babel/parser": "^7.8.4", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/generator": "^7.9.0", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.0", + "@babel/parser": "^7.9.0", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", - "json5": "^2.1.0", + "json5": "^2.1.2", "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", @@ -50,11 +51,11 @@ } }, "@babel/generator": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", - "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz", + "integrity": "sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ==", "requires": { - "@babel/types": "^7.8.3", + "@babel/types": "^7.9.5", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -78,44 +79,45 @@ } }, "@babel/helper-builder-react-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.8.3.tgz", - "integrity": "sha512-JT8mfnpTkKNCboTqZsQTdGo3l3Ik3l7QIt9hh0O9DYiwVel37VoJpILKM4YFbP2euF32nkQSb+F9cUk9b7DDXQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.9.0.tgz", + "integrity": "sha512-weiIo4gaoGgnhff54GQ3P5wsUQmnSwpkvU0r6ZHq6TzoSzKy4JxHEgnxNytaKbov2a9z/CVNyzliuCOUPEX3Jw==", "requires": { - "@babel/types": "^7.8.3", - "esutils": "^2.0.0" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/types": "^7.9.0" } }, - "@babel/helper-call-delegate": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", - "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", + "@babel/helper-builder-react-jsx-experimental": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.5.tgz", + "integrity": "sha512-HAagjAC93tk748jcXpZ7oYRZH485RCq/+yEv9SIWezHRPv9moZArTnkUNciUNzvwHUABmiWKlcxJvMcu59UwTg==", "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-module-imports": "^7.8.3", + "@babel/types": "^7.9.5" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz", - "integrity": "sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.5.tgz", + "integrity": "sha512-IipaxGaQmW4TfWoXdqjY0TzoXQ1HRS0kPpEgvjosb3u7Uedcq297xFqDQiCcQtRRwzIMif+N1MLVI8C5a4/PAA==", "requires": { - "@babel/helper-function-name": "^7.8.3", + "@babel/helper-function-name": "^7.9.5", "@babel/helper-member-expression-to-functions": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-split-export-declaration": "^7.8.3" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", - "integrity": "sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.6.0" + "regexpu-core": "^4.7.0" } }, "@babel/helper-define-map": { @@ -138,13 +140,13 @@ } }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", "requires": { "@babel/helper-get-function-arity": "^7.8.3", "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/types": "^7.9.5" } }, "@babel/helper-get-function-arity": { @@ -155,14 +157,6 @@ "@babel/types": "^7.8.3" } }, - "@babel/helper-hoist-variables": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", - "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", - "requires": { - "@babel/types": "^7.8.3" - } - }, "@babel/helper-member-expression-to-functions": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", @@ -180,15 +174,16 @@ } }, "@babel/helper-module-transforms": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz", - "integrity": "sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", "requires": { "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-simple-access": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.9.0", "lodash": "^4.17.13" } }, @@ -226,14 +221,14 @@ } }, "@babel/helper-replace-supers": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz", - "integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", + "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", "requires": { "@babel/helper-member-expression-to-functions": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/helper-simple-access": { @@ -253,6 +248,11 @@ "@babel/types": "^7.8.3" } }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==" + }, "@babel/helper-wrap-function": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", @@ -265,29 +265,29 @@ } }, "@babel/helpers": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", - "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", + "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", "requires": { "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0" } }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", "requires": { + "@babel/helper-validator-identifier": "^7.9.0", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", - "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==" + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==" }, "@babel/plugin-external-helpers": { "version": "7.8.3", @@ -306,6 +306,17 @@ "@babel/helper-plugin-utils": "^7.8.3" } }, + "@babel/plugin-proposal-decorators": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.8.3.tgz", + "integrity": "sha512-e3RvdvS4qPJVTe288DlXjwKflpfy1hr0j5dz5WpIYYeP7vQZg2WfAEIp8k5/Lwis/m5REXEteIz6rrcDtXXG7w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-decorators": "^7.8.3" + } + }, "@babel/plugin-proposal-export-default-from": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.8.3.tgz", @@ -325,12 +336,13 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz", + "integrity": "sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg==", "requires": { "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0" + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.9.5" } }, "@babel/plugin-proposal-optional-catch-binding": { @@ -343,9 +355,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", - "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", + "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", "requires": { "@babel/helper-plugin-utils": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.0" @@ -359,6 +371,15 @@ "@babel/helper-plugin-utils": "^7.8.3" } }, + "@babel/plugin-syntax-decorators": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.8.3.tgz", + "integrity": "sha512-8Hg4dNNT9/LcA1zQlfwuKR8BUc/if7Q7NkTam9sGTcJphLwpf2g4S42uhspQrIrR+dpzE0dtTqBVFoHl8GtnnQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -467,16 +488,16 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz", - "integrity": "sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz", + "integrity": "sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==", "requires": { "@babel/helper-annotate-as-pure": "^7.8.3", "@babel/helper-define-map": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", + "@babel/helper-function-name": "^7.9.5", "@babel/helper-optimise-call-expression": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-split-export-declaration": "^7.8.3", "globals": "^11.1.0" } @@ -490,9 +511,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", - "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz", + "integrity": "sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==", "requires": { "@babel/helper-plugin-utils": "^7.8.3" } @@ -507,18 +528,18 @@ } }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.8.3.tgz", - "integrity": "sha512-g/6WTWG/xbdd2exBBzMfygjX/zw4eyNC4X8pRaq7aRHRoDUCzAIu3kGYIXviOv8BjCuWm8vDBwjHcjiRNgXrPA==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.9.0.tgz", + "integrity": "sha512-7Qfg0lKQhEHs93FChxVLAvhBshOPQDtJUTVHr/ZwQNRccCm4O9D79r9tVSoV8iNwjP1YgfD+e/fgHcPkN1qEQg==", "requires": { "@babel/helper-plugin-utils": "^7.8.3", "@babel/plugin-syntax-flow": "^7.8.3" } }, "@babel/plugin-transform-for-of": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz", - "integrity": "sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", + "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", "requires": { "@babel/helper-plugin-utils": "^7.8.3" } @@ -549,11 +570,11 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", - "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", + "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", "requires": { - "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-simple-access": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" @@ -577,11 +598,10 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz", - "integrity": "sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz", + "integrity": "sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==", "requires": { - "@babel/helper-call-delegate": "^7.8.3", "@babel/helper-get-function-arity": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3" } @@ -603,36 +623,37 @@ } }, "@babel/plugin-transform-react-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.8.3.tgz", - "integrity": "sha512-r0h+mUiyL595ikykci+fbwm9YzmuOrUBi0b+FDIKmi3fPQyFokWVEMJnRWHJPPQEjyFJyna9WZC6Viv6UHSv1g==", + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz", + "integrity": "sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw==", "requires": { - "@babel/helper-builder-react-jsx": "^7.8.3", + "@babel/helper-builder-react-jsx": "^7.9.0", + "@babel/helper-builder-react-jsx-experimental": "^7.9.0", "@babel/helper-plugin-utils": "^7.8.3", "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.8.3.tgz", - "integrity": "sha512-PLMgdMGuVDtRS/SzjNEQYUT8f4z1xb2BAT54vM1X5efkVuYBf5WyGUMbpmARcfq3NaglIwz08UVQK4HHHbC6ag==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.9.0.tgz", + "integrity": "sha512-K6m3LlSnTSfRkM6FcRk8saNEeaeyG5k7AVkBU2bZK3+1zdkSED3qNdsWrUgQBeTVD2Tp3VMmerxVO2yM5iITmw==", "requires": { "@babel/helper-plugin-utils": "^7.8.3", "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-regenerator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", - "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", + "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", "requires": { - "regenerator-transform": "^0.14.0" + "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-runtime": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.8.3.tgz", - "integrity": "sha512-/vqUt5Yh+cgPZXXjmaG9NT8aVfThKk7G4OqkVhrXqwsC5soMn/qTCxs36rZ2QFhpfTJcjw4SNDIZ4RUb8OL4jQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz", + "integrity": "sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw==", "requires": { "@babel/helper-module-imports": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", @@ -682,9 +703,9 @@ } }, "@babel/plugin-transform-typescript": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.3.tgz", - "integrity": "sha512-Ebj230AxcrKGZPKIp4g4TdQLrqX95TobLUWKd/CwG7X1XHUH1ZpkpFvXuXqWbtGRWb7uuEWNlrl681wsOArAdQ==", + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz", + "integrity": "sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w==", "requires": { "@babel/helper-create-class-features-plugin": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", @@ -701,9 +722,9 @@ } }, "@babel/register": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.8.3.tgz", - "integrity": "sha512-t7UqebaWwo9nXWClIPLPloa5pN33A2leVs8Hf0e9g9YwUP8/H9NeR7DJU+4CXo23QtjChQv5a3DjEtT83ih1rg==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.9.0.tgz", + "integrity": "sha512-Tv8Zyi2J2VRR8g7pC5gTeIN8Ihultbmk0ocyNz8H2nEZbmhp1N6q0A1UGsQbDvGP/sNinQKUHf3SqXwqjtFv4Q==", "requires": { "find-cache-dir": "^2.0.0", "lodash": "^4.17.13", @@ -713,34 +734,34 @@ } }, "@babel/runtime": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", - "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", "requires": { - "regenerator-runtime": "^0.13.2" + "regenerator-runtime": "^0.13.4" } }, "@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", "requires": { "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/traverse": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", - "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.5.tgz", + "integrity": "sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ==", "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", - "@babel/helper-function-name": "^7.8.3", + "@babel/generator": "^7.9.5", + "@babel/helper-function-name": "^7.9.5", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/parser": "^7.9.0", + "@babel/types": "^7.9.5", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" @@ -757,11 +778,11 @@ } }, "@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz", + "integrity": "sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==", "requires": { - "esutils": "^2.0.2", + "@babel/helper-validator-identifier": "^7.9.5", "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" } @@ -1019,15 +1040,40 @@ "@types/yargs": "^13.0.0" } }, + "@nozbe/watermelondb": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@nozbe/watermelondb/-/watermelondb-0.16.0.tgz", + "integrity": "sha512-WzV7YL8iPUVZ6KLQqzY9z1g913z3laFt4ZWCejcIZMWon89kZ8K9NlniufNUBkTCKrt007U4HSJw6bmTHrDnQA==", + "requires": { + "lodash.clonedeep": "^4.5.0", + "lokijs": "git+https://github.com/Nozbe/LokiJS.git#d08f660", + "rambdax": "2.15.0", + "rxjs": "^6.2.2", + "rxjs-compat": "^6.3.2", + "sql-escape-string": "^1.1.0" + } + }, + "@nozbe/with-observables": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@nozbe/with-observables/-/with-observables-1.0.5.tgz", + "integrity": "sha512-1thn5tRlZiC2ys8OVyJDe/9XBbUMKWlALtfv0eX4Pcom5/dsY9OYWBXc1braGdFWcVnBjDlLamDGITDljLkqtw==", + "requires": { + "hoist-non-react-statics": "^3.3.0", + "rxjs": "^6.4.0" + } + }, "@react-native-community/async-storage": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.8.0.tgz", - "integrity": "sha512-R8hYm9h7MqoTa/opzBID6hhL5rseNoMJK1wG/B/Diob+JzEv7b1GMpHjsAZX2pU2o82LU73XbPJOPzfvkGFaUA==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.9.0.tgz", + "integrity": "sha512-TlGMr02JcmY4huH1P7Mt7p6wJecosPpW+09+CwCFLn875IhpRqU2XiVA+BQppZOYfQdHUfUzIKyCBeXOlCEbEg==", + "requires": { + "deep-assign": "^3.0.0" + } }, "@react-native-community/cli": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-3.2.0.tgz", - "integrity": "sha512-k8GmNQH/EbIIVd4VlVbFP99IRNhovWV6hhnJ3y2+FfZq18H/U6yV/t1bpI3A3QqPuAyWxk/1jBdXvP6BY/7kbw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-3.2.1.tgz", + "integrity": "sha512-bZ/bfZ+9r1gQSxp6t7+00DcpC6vmbVYSvzUCFM/yo5k8bhsDdcy8aocscIaXXVGG+v9Edri/Q7hH9ks7L18/Rg==", "requires": { "@hapi/joi": "^15.0.3", "@react-native-community/cli-debugger-ui": "^3.0.0", @@ -1154,21 +1200,21 @@ } }, "@react-native-community/masked-view": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.6.tgz", - "integrity": "sha512-PpMoeXwPUoldCRKDuSi+zK5rT+sJTW6ri6RdGPkSKRzU77Q1d9IaR0O5IKvBj0XSdL3p+dcOa05gk35aGDffBQ==" + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.7.tgz", + "integrity": "sha512-9KbP7LTLFz9dx1heURJbO6nuVMdSjDez8znlrUzaB1nUwKVsTTwlKRuHxGUYIIkReLWrJQeCv9tidy+84z2eCw==" }, "@react-navigation/core": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-5.1.6.tgz", - "integrity": "sha512-YsYICOZ+a1HmvfSULtR9BTRYJVB0vO9ZCFlSI5OZTcqlMH1oyV4Zt7Dxk6slPg0qa9n0agJB6L0ZWI2+gjmO0w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-5.3.3.tgz", + "integrity": "sha512-YCrDIcvbuT++8RJA11gwv4qJTvsrwlp+4J1mWonGlHQnPMuB+uHvxqV8/VaHJ6FmzL11tSE6EzzdO0obm7JwIA==", "requires": { - "@react-navigation/routers": "^5.0.2", + "@react-navigation/routers": "^5.3.0", "escape-string-regexp": "^2.0.0", - "query-string": "^6.10.1", - "react-is": "^16.12.0", - "shortid": "^2.2.15", - "use-subscription": "^1.3.0" + "nanoid": "^3.0.2", + "query-string": "^6.12.0", + "react-is": "^16.13.0", + "use-subscription": "^1.4.0" }, "dependencies": { "escape-string-regexp": { @@ -1179,11 +1225,11 @@ } }, "@react-navigation/native": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-5.0.7.tgz", - "integrity": "sha512-WDqhjyGSFsoMHD2436lvL6Z9Lmn3vJhY3Ltm8T2PNNtnR/3/Z7mNAKU373zritAUVSk0lJppAQluJYITtbdXcQ==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-5.1.5.tgz", + "integrity": "sha512-LP8Z8YIXS5HrGJM8CR683pLBSU5MilGRQRZYCmvp8f77oKJm2o1ETZPaOPLav8gMrtcJ2B9T02HQSP1Kz/iIxQ==", "requires": { - "@react-navigation/core": "^5.1.6" + "@react-navigation/core": "^5.3.3" } }, "@react-navigation/native-stack": { @@ -1192,17 +1238,17 @@ "integrity": "sha512-gzBwX0tVLUFSBudLV1BxwcyOJ8FZ0+fzWiK9BjFkamUCXE7Vi9mA5PIgoXW69X3tnATTM3+7VA3d+/UcflpJow==" }, "@react-navigation/routers": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-5.0.2.tgz", - "integrity": "sha512-vHzXuhS9bkr/GnBkFVVmduHDTXRQAxKDBU77BRqL7Qg0D6gVlIHZTa68HsuoOoz1UH07ZaxYo1br0btXM322SQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-5.3.0.tgz", + "integrity": "sha512-hU9ize/NPHS5wWR5KVx/cgN9DH29Y9iHa+SxUd3IJmBnK8ujj0rM8xz3hihY4yfu0kOvTFOPHojoBwnpH5cs+g==", "requires": { - "shortid": "^2.2.15" + "nanoid": "^3.0.2" } }, "@react-navigation/stack": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-5.0.9.tgz", - "integrity": "sha512-6cgOCvvX4N35d2y+NX36qN25w8bjsJXVoo213cXB23X6SVRSRqbAPOWE98rsHyX6REYPyJx200k7U09xiwCImg==", + "version": "5.2.10", + "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-5.2.10.tgz", + "integrity": "sha512-QOx+ak+nLox9h4iwxL6+eJ6ndo4C43BVibN8/EWLydvcHB078eqSCKB77PS6XsohGGe0xbD/+jTOYbvPpfpjGw==", "requires": { "color": "^3.1.2", "react-native-iphone-x-helper": "^1.2.1" @@ -1218,9 +1264,9 @@ } }, "@types/babel__core": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.6.tgz", - "integrity": "sha512-tTnhWszAqvXnhW7m5jQU9PomXSiKXk2sFxpahXvI20SZKu9ylPi8WtIxueZ6ehDWikPT0jeFujMj3X4ZHuf3Tg==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.7.tgz", + "integrity": "sha512-RL62NqSFPCDK2FM1pSDH0scHpJvsXtZNiYlMB73DgPBaG1E38ZYVL+ei5EkWRbr+KC4YNiAUNBnRj+bgwpgjMw==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -1250,14 +1296,22 @@ } }, "@types/babel__traverse": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.9.tgz", - "integrity": "sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.10.tgz", + "integrity": "sha512-74fNdUGrWsgIB/V9kTO5FGHPWYY6Eqn+3Z7L6Hc4e/BxjYV7puvBqp5HwsVYYfLm6iURYBNCx4Ut37OF9yitCw==", "dev": true, "requires": { "@babel/types": "^7.3.0" } }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "requires": { + "@types/node": "*" + } + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -1302,24 +1356,29 @@ "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", "dev": true }, + "@types/node": { + "version": "13.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", + "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==" + }, "@types/prop-types": { "version": "15.7.3", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz", "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" }, "@types/react": { - "version": "16.9.23", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.23.tgz", - "integrity": "sha512-SsGVT4E7L2wLN3tPYLiF20hmZTPGuzaayVunfgXzUn1x4uHVsKH6QDJQ/TdpHqwsTLd4CwrmQ2vOgxN7gE24gw==", + "version": "16.9.34", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.34.tgz", + "integrity": "sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow==", "requires": { "@types/prop-types": "*", "csstype": "^2.2.0" } }, "@types/react-native": { - "version": "0.61.17", - "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.61.17.tgz", - "integrity": "sha512-12qKZz/ob56lglVRAIDgqDchcyO0g5lZtrjxCTQDNJv8HFHZMcZx78+/CjKsu3LGs6KbajkZ1+0htqiaxr5JVA==", + "version": "0.62.2", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.62.2.tgz", + "integrity": "sha512-oIUIbqZNN9vRnGKWHYbTVp/GyTqdaM5mfy1s4zsi6BYvHAaFOPZ32IrhIHno/A5XOv4wuGfE7g5fliDk/H0+/Q==", "requires": { "@types/react": "*" } @@ -1405,17 +1464,20 @@ } } }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, "Base64": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "abab": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", @@ -1445,10 +1507,9 @@ } }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", - "dev": true + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==" }, "acorn-globals": { "version": "4.3.4", @@ -1461,24 +1522,47 @@ }, "dependencies": { "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "dev": true + }, + "acorn-walk": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz", + "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", "dev": true } } }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, "acorn-walk": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz", - "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", - "dev": true + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", + "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==" + }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "requires": { + "es6-promisify": "^5.0.0" + } }, "ajv": { "version": "6.12.0", @@ -1685,6 +1769,21 @@ "requires": { "object-assign": "^4.1.1", "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } + } } }, "assert-plus": { @@ -1697,6 +1796,11 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, + "ast-types": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.3.tgz", + "integrity": "sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA==" + }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -2033,20 +2137,64 @@ "tweetnacl": "^0.14.3" } }, + "bech32": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.3.tgz", + "integrity": "sha512-yuVFUvrNcoJi0sv5phmqc6P+Fl1HjRDRNOOkHY2X/3LBy2bIGNSFx4fZ95HMaXHupuS7cZR15AsvtmCIF4UEyg==" + }, "big-integer": { "version": "1.6.48", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" }, + "bigi": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz", + "integrity": "sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU=" + }, "bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "optional": true, "requires": { "file-uri-to-path": "1.0.0" } }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bitcoin-ops": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", + "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==" + }, + "bitcoinjs-lib": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-3.3.2.tgz", + "integrity": "sha512-l5qqvbaK8wwtANPf6oEffykycg4383XgEYdia1rI7/JpGf1jfRWlOUCvx5TiTZS7kyIvY4j/UhIQ2urLsvGkzw==", + "requires": { + "bech32": "^1.1.2", + "bigi": "^1.4.0", + "bip66": "^1.1.0", + "bitcoin-ops": "^1.3.0", + "bs58check": "^2.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.3", + "ecurve": "^1.0.0", + "merkle-lib": "^2.0.10", + "pushdata-bitcoin": "^1.0.1", + "randombytes": "^2.0.1", + "safe-buffer": "^5.0.1", + "typeforce": "^1.11.3", + "varuint-bitcoin": "^1.0.4", + "wif": "^2.0.1" + } + }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -2093,6 +2241,22 @@ } } }, + "bolt11": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/bolt11/-/bolt11-1.2.7.tgz", + "integrity": "sha512-og00WBenEDUeMOVLoiWIiA0i14+tslzqhk/fJIYt5L7GWFFvY88kl0J1ib5DqMXp7mQKez4E8/XI6nrG0Rek4g==", + "requires": { + "@types/bn.js": "^4.11.3", + "bech32": "^1.1.2", + "bitcoinjs-lib": "^3.3.1", + "bn.js": "^4.11.8", + "coininfo": "^4.5.0", + "create-hash": "^1.2.0", + "lodash": "^4.17.11", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.4.0" + } + }, "bplist-creator": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz", @@ -2150,10 +2314,23 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, "browser-process-hrtime": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, "browser-request": { @@ -2165,7 +2342,6 @@ "version": "1.11.3", "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, "requires": { "resolve": "1.1.7" }, @@ -2173,11 +2349,65 @@ "resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" } } }, + "browserify": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.1.tgz", + "integrity": "sha512-EQX0h59Pp+0GtSRb5rL6OTfrttlzv+uyaUVlK6GX3w11SQ0jKPKyjC/54RhPR2ib2KmfcELM06e8FxcI5XNU2A==", + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "~5.2.1", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^2.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "mkdirp-classic": "^0.5.2", + "module-deps": "^6.0.0", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + } + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -2236,11 +2466,11 @@ } }, "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "requires": { - "pako": "~0.2.0" + "pako": "~1.0.5" } }, "bs58": { @@ -2251,6 +2481,16 @@ "base-x": "^3.0.2" } }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "bser": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", @@ -2260,13 +2500,12 @@ } }, "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "buffer-crc32": { @@ -2284,6 +2523,11 @@ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -2305,6 +2549,11 @@ "unset-value": "^1.0.0" } }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==" + }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -2403,9 +2652,9 @@ } }, "cli-spinners": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.2.0.tgz", - "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.3.0.tgz", + "integrity": "sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w==" }, "cli-width": { "version": "2.2.0", @@ -2463,14 +2712,21 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "coininfo": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/coininfo/-/coininfo-4.5.0.tgz", + "integrity": "sha512-9YnPekCDaFSJl/yG27dEkCbHF09CO3Cz38A2TMcFZRMcaCy2l38B2nQK/rdz8zLqOLVzzE/e0MpcWMxvyEncGA==", + "requires": { + "safe-buffer": "^5.1.1" + } + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -2521,6 +2777,24 @@ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.1.0.tgz", "integrity": "sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg==" }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" + } + } + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2585,30 +2859,6 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "connect": { @@ -2669,6 +2919,12 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "optional": true + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -2779,6 +3035,24 @@ } } }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, "cssom": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", @@ -2795,13 +3069,19 @@ } }, "csstype": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.9.tgz", - "integrity": "sha512-xz39Sb4+OaTsULgUERcCk+TJj8ylkL4aSVDQiX/ksxbELSqwkgt4d4RD7fovIdgJGSuNYqwZEiVjYY5l0ask+Q==" + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.10.tgz", + "integrity": "sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w==" }, "cyphernode-js-sdk": { - "version": "git+https://github.com/gabidi/cyphernode-js-sdk.git#60496a5b1fce9e1e8c5019af0e71da25a7924110", - "from": "git+https://github.com/gabidi/cyphernode-js-sdk.git#feature/rn" + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/cyphernode-js-sdk/-/cyphernode-js-sdk-0.1.1.tgz", + "integrity": "sha512-1wlcb2gGpsGxTYa6rBlcCQkP8m9pnCcwmtptgqwOVNHDsutOufrgFx3q+WL75BDfhBR1xbRNTTy+76ulCkaeWA==", + "requires": { + "socks-proxy-agent": "^4.0.2", + "superagent": "^5.0.6", + "superagent-proxy": "^2.0.0" + } }, "cyphernode-js-sdk-transports": { "version": "git+https://github.com/gabidi/cyphernode-js-sdk-transports.git#7701da2e457db025b496c47847ee4472a433dc20", @@ -2831,6 +3111,11 @@ } } }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==" + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -2839,6 +3124,11 @@ "assert-plus": "^1.0.0" } }, + "data-uri-to-buffer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", + "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" + }, "data-urls": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", @@ -2864,9 +3154,9 @@ } }, "dayjs": { - "version": "1.8.20", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.20.tgz", - "integrity": "sha512-mH0MCDxw6UCGJYxVN78h8ugWycZAO8thkj3bW6vApL5tS0hQplIDdAQcmbvl7n35H0AKdCJQaArTrIQw2xt4Qg==" + "version": "1.8.24", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.24.tgz", + "integrity": "sha512-bImQZbBv86zcOWOq6fLg7r4aqMx8fScdmykA7cSh+gH1Yh8AM0Dbw0gHYrsOrza6oBBnkK+/OaR+UAa9UsMrDw==" }, "debounce": { "version": "1.2.0", @@ -2898,25 +3188,18 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, + "deep-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-3.0.0.tgz", + "integrity": "sha512-YX2i9XjJ7h5q/aQ/IM9PEwEnDqETAIYbggmdDB3HLTlSgo1CxPsj6pvhPG68rq6SVE0+p+6Ywsm5fTYNrYtBWw==", "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" + "is-obj": "^1.0.0" } }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, "deepmerge": { "version": "3.3.0", @@ -2976,6 +3259,28 @@ } } }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "degenerator": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", + "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", + "requires": { + "ast-types": "0.x.x", + "escodegen": "1.x.x", + "esprima": "3.x.x" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2991,6 +3296,17 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, + "deps-sort": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", + "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", + "requires": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, "des.js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", @@ -3011,6 +3327,16 @@ "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", "dev": true }, + "detective": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", + "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", + "requires": { + "acorn-node": "^1.6.1", + "defined": "^1.0.0", + "minimist": "^1.1.1" + } + }, "didyoumean": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.1.tgz", @@ -3041,6 +3367,11 @@ "esutils": "^2.0.2" } }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -3050,6 +3381,24 @@ "webidl-conversions": "^4.0.2" } }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "requires": { + "readable-stream": "^2.0.2" + } + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -3059,7 +3408,16 @@ "safer-buffer": "^2.1.0" } }, - "ee-first": { + "ecurve": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ecurve/-/ecurve-1.0.6.tgz", + "integrity": "sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w==", + "requires": { + "bigi": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" @@ -3127,9 +3485,9 @@ } }, "es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -3156,6 +3514,19 @@ "is-symbol": "^1.0.2" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "requires": { + "es6-promise": "^4.0.3" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3170,7 +3541,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", - "dev": true, "requires": { "esprima": "^4.0.1", "estraverse": "^4.2.0", @@ -3183,7 +3553,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "optional": true } } @@ -3234,12 +3603,20 @@ }, "dependencies": { "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, "ansi-regex": { @@ -3248,6 +3625,16 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -3263,6 +3650,21 @@ "restore-cursor": "^3.1.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -3318,14 +3720,20 @@ } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -3343,24 +3751,45 @@ } }, "inquirer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", - "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.15", "mute-stream": "0.0.8", - "run-async": "^2.2.0", + "run-async": "^2.4.0", "rxjs": "^6.5.3", "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "is-fullwidth-code-point": { @@ -3406,15 +3835,6 @@ "signal-exit": "^3.0.2" } }, - "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -3437,6 +3857,15 @@ } } }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -3456,9 +3885,9 @@ } }, "eslint-module-utils": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", - "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", "dev": true, "requires": { "debug": "^2.6.9", @@ -3545,9 +3974,9 @@ } }, "eslint-plugin-import": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz", - "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==", + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", + "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", "dev": true, "requires": { "array-includes": "^3.0.3", @@ -3654,13 +4083,13 @@ "dev": true }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "dev": true, "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } }, @@ -3670,12 +4099,20 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", - "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", + "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.0.0" + }, + "dependencies": { + "estraverse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", + "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", + "dev": true + } } }, "esrecurse": { @@ -3690,8 +4127,7 @@ "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, "esutils": { "version": "2.0.3", @@ -3714,9 +4150,9 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" }, "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==" }, "evp_bytestokey": { "version": "1.0.3", @@ -3963,8 +4399,12 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fb-watchman": { "version": "2.0.1", @@ -4048,8 +4488,7 @@ "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "optional": true + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, "fill-range": { "version": "4.0.0", @@ -4129,12 +4568,6 @@ "path-exists": "^4.0.0" } }, - "findit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz", - "integrity": "sha1-ZQnwEmr0wXhVHPqZOU4DLhOk1W4=", - "dev": true - }, "flat-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", @@ -4158,9 +4591,9 @@ } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, "follow-redirects": { @@ -4197,15 +4630,22 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "optional": true, "requires": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==", + "optional": true + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -4240,9 +4680,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", + "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", "optional": true, "requires": { "bindings": "^1.5.0", @@ -4289,7 +4729,7 @@ } }, "chownr": { - "version": "1.1.3", + "version": "1.1.4", "bundled": true, "optional": true }, @@ -4439,7 +4879,7 @@ } }, "minimist": { - "version": "0.0.8", + "version": "1.2.5", "bundled": true, "optional": true }, @@ -4461,11 +4901,11 @@ } }, "mkdirp": { - "version": "0.5.1", + "version": "0.5.3", "bundled": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, "ms": { @@ -4474,7 +4914,7 @@ "optional": true }, "needle": { - "version": "2.4.0", + "version": "2.3.3", "bundled": true, "optional": true, "requires": { @@ -4501,7 +4941,7 @@ } }, "nopt": { - "version": "4.0.1", + "version": "4.0.3", "bundled": true, "optional": true, "requires": { @@ -4523,12 +4963,13 @@ "optional": true }, "npm-packlist": { - "version": "1.4.7", + "version": "1.4.8", "bundled": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npmlog": { @@ -4598,17 +5039,10 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } } }, "readable-stream": { - "version": "2.3.6", + "version": "2.3.7", "bundled": true, "optional": true, "requires": { @@ -4729,6 +5163,38 @@ } } }, + "ftp": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", + "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", + "requires": { + "readable-stream": "1.1.x", + "xregexp": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -4745,6 +5211,11 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==" + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -4758,6 +5229,19 @@ "pump": "^3.0.0" } }, + "get-uri": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.4.tgz", + "integrity": "sha512-v7LT/s8kVjs+Tx0ykk1I+H/rbpzkHvuIq87LmeXptcf5sNWm9uQiwjNAt94SJPA1zOlCntmnOlJvVWKmzsxG8Q==", + "requires": { + "data-uri-to-buffer": "1", + "debug": "2", + "extend": "~3.0.2", + "file-uri-to-path": "1", + "ftp": "~0.3.10", + "readable-stream": "2" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -4785,9 +5269,9 @@ } }, "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -4826,7 +5310,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -4927,9 +5410,9 @@ } }, "hosted-git-info": { - "version": "2.8.6", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.6.tgz", - "integrity": "sha512-Kp6rShEsCHhF5dD3EWKdkgVA8ix90oSUJ0VY4g9goxxa0+f4lx63muTftn0mlJ/+8IESGWyKnP//V2D7S4ZbIQ==" + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" }, "html-encoding-sniffer": { "version": "1.0.2", @@ -4941,11 +5424,16 @@ } }, "html-escaper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.0.tgz", - "integrity": "sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" + }, "http-errors": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", @@ -4958,6 +5446,30 @@ "toidentifier": "1.0.0" } }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -4968,6 +5480,38 @@ "sshpk": "^1.7.0" } }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "https-proxy-agent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz", + "integrity": "sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg==", + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + }, + "dependencies": { + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -5030,6 +5574,14 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "requires": { + "source-map": "~0.5.3" + } + }, "inquirer": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", @@ -5061,6 +5613,23 @@ } } }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -5074,10 +5643,10 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, - "ip-regex": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", - "integrity": "sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0=" + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, "ipaddr.js": { "version": "1.9.1", @@ -5102,12 +5671,6 @@ } } }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5227,6 +5790,11 @@ } } }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -5523,9 +6091,9 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -5537,13 +6105,13 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -6050,9 +6618,9 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -6064,13 +6632,13 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -6290,9 +6858,9 @@ }, "dependencies": { "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "ws": { @@ -6346,11 +6914,11 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "jsonfile": { @@ -6366,6 +6934,11 @@ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -6406,6 +6979,15 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, + "labeled-stream-splicer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", + "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", + "requires": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -6429,7 +7011,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, "requires": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -6474,6 +7055,16 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -6630,6 +7221,10 @@ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==" }, + "lokijs": { + "version": "git+https://github.com/Nozbe/LokiJS.git#d08f660794be558529f5ba049fe2868d4f243ec4", + "from": "git+https://github.com/Nozbe/LokiJS.git#d08f660" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -6740,32 +7335,13 @@ "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", "requires": { "readable-stream": "^2.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, + "merkle-lib": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz", + "integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY=" + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -6955,6 +7531,16 @@ "rxjs": "^5.4.3", "ws": "^1.1.5", "yargs": "^9.0.0" + }, + "dependencies": { + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "requires": { + "symbol-observable": "1.0.1" + } + } } }, "metro-minify-uglify": { @@ -7124,9 +7710,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "mixin-deep": { "version": "1.3.2", @@ -7148,18 +7734,38 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } + "minimist": "^1.2.5" + } + }, + "mkdirp-classic": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.2.tgz", + "integrity": "sha512-ejdnDQcR75gwknmMw/tx02AuRs8jCtqFoFqDZMjiNxsu85sRIJVXDKHuLYvUUPRBUtV2FpSZa9bL1BUa3BdR2g==" + }, + "module-deps": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz", + "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==", + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" } }, "moment": { @@ -7168,15 +7774,22 @@ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "morgan": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", - "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", "requires": { - "basic-auth": "~2.0.0", + "basic-auth": "~2.0.1", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "~2.0.0", "on-finished": "~2.3.0", - "on-headers": "~1.0.1" + "on-headers": "~1.0.2" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + } } }, "ms": { @@ -7192,13 +7805,12 @@ "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "optional": true + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, "nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.0.2.tgz", + "integrity": "sha512-WOjyy/xu3199NlQiQWlx7VbspSFlGtOxa1bRX9ebmXOnp1fje4bJfjPs1wLQ8jZbJUfD+yceJmw879ZSaVJkdQ==" }, "nanomatch": { "version": "1.2.13", @@ -7229,7 +7841,12 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, - "nice-try": { + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" + }, + "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" @@ -7244,6 +7861,77 @@ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" }, + "node-libs-react-native": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/node-libs-react-native/-/node-libs-react-native-1.0.3.tgz", + "integrity": "sha512-2X/M/DMB4hij2L0tsnJOiDhYR2N0YtetIhb/eN5+5vksLxjXwaFgLbSXWT3XExnGJpISDn8dYuYz6yvdndjjkg==", + "requires": { + "assert": "^1.4.1", + "browserify-zlib": "^0.2.0", + "buffer": "^5.0.6", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.0", + "punycode": "^2.1.0", + "querystring-es3": "^0.2.0", + "react-native-crypto": "^2.0.1", + "react-native-randombytes": "^3.5.1", + "readable-stream": "^2.2.9", + "stream-http": "^2.3.1", + "string_decoder": "^1.0.3", + "timers-browserify": "^2.0.2", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3" + }, + "dependencies": { + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "timers-browserify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + } + } + }, "node-modules-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", @@ -7367,12 +8055,6 @@ "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", "dev": true }, - "object-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", - "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==", - "dev": true - }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -7536,6 +8218,11 @@ "through": "^2.3.6" } }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, "node-fetch": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", @@ -7578,7 +8265,6 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, "requires": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -7606,6 +8292,11 @@ "wcwidth": "^1.0.1" } }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -7677,9 +8368,9 @@ "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { "p-try": "^2.0.0" } @@ -7703,10 +8394,47 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, + "pac-proxy-agent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-3.0.1.tgz", + "integrity": "sha512-44DUg21G/liUZ48dJpUSjZnFfZro/0K5JTyFYLBcmh9+T6Ooi4/i4efwUiEy0+4oQusCBqWdhv16XohIj1GqnQ==", + "requires": { + "agent-base": "^4.2.0", + "debug": "^4.1.1", + "get-uri": "^2.0.0", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^3.0.0", + "pac-resolver": "^3.0.0", + "raw-body": "^2.2.0", + "socks-proxy-agent": "^4.0.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "pac-resolver": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", + "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", + "requires": { + "co": "^4.6.0", + "degenerator": "^1.0.4", + "ip": "^1.1.5", + "netmask": "^1.0.6", + "thunkify": "^2.1.2" + } + }, "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parent-module": { "version": "1.0.1", @@ -7725,6 +8453,14 @@ } } }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "requires": { + "path-platform": "~0.11.15" + } + }, "parse-asn1": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", @@ -7768,6 +8504,11 @@ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7788,6 +8529,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -7809,11 +8555,15 @@ } }, "pbkdf2": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.8.tgz", - "integrity": "sha1-L4q/FuvsyCJ3lF10irodeHYfYeI=", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "requires": { - "create-hmac": "^1.1.2" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "performance-now": { @@ -8012,8 +8762,7 @@ "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, "prettier": { "version": "1.16.4", @@ -8022,20 +8771,20 @@ "dev": true }, "pretty-format": { - "version": "25.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.1.0.tgz", - "integrity": "sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ==", + "version": "25.3.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.3.0.tgz", + "integrity": "sha512-wToHwF8bkQknIcFkBqNfKu4+UZqnrLn/Vr+wwKQwwvPzkBfDDKp/qIabFqdgtoi5PEnM8LFByVsOrHoa3SpTVA==", "requires": { - "@jest/types": "^25.1.0", + "@jest/types": "^25.3.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" }, "dependencies": { "@jest/types": { - "version": "25.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.1.0.tgz", - "integrity": "sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA==", + "version": "25.3.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.3.0.tgz", + "integrity": "sha512-UkaDNewdqXAmCDbN2GlUM6amDKS78eCqiw/UmF5nE0mmLTd6moJkiZJML/X52Ke3LH7Swhw883IRXq8o9nWjVw==", "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", @@ -8132,9 +8881,9 @@ } }, "prompts": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.1.tgz", - "integrity": "sha512-qIP2lQyCwYbdzcqHIUi2HAxiWixhoM9OdLCWf8txXsapC/X9YdsCoeyRIXE/GP+Q0J37Q7+XN/MFqbUa7IzXNA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz", + "integrity": "sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA==", "dev": true, "requires": { "kleur": "^3.0.3", @@ -8160,15 +8909,58 @@ "ipaddr.js": "1.9.1" } }, + "proxy-agent": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.1.1.tgz", + "integrity": "sha512-WudaR0eTsDx33O3EJE16PjBRZWcX8GqCEeERw1W3hZJgH/F2a46g7jty6UGty6NeJ4CKQy8ds2CJPMiyeqaTvw==", + "requires": { + "agent-base": "^4.2.0", + "debug": "4", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^3.0.0", + "lru-cache": "^5.1.1", + "pac-proxy-agent": "^3.0.1", + "proxy-from-env": "^1.0.0", + "socks-proxy-agent": "^4.0.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "psl": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", - "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "public-encrypt": { "version": "4.0.3", @@ -8193,9 +8985,17 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "pushdata-bitcoin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", + "integrity": "sha1-FZMdPNlnreUiBvUjqnMxrvfUOvc=", + "requires": { + "bitcoin-ops": "^1.3.0" + } }, "qr.js": { "version": "0.0.0", @@ -8208,9 +9008,9 @@ "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, "query-string": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.11.0.tgz", - "integrity": "sha512-jS+me8X3OEGFTsF6kF+vUUMFG/d3WUCvD7bHhfZP5784nOq1pjj8yau/u86nfOncmcN6ZkSWKWkKAvv/MGxzLA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.12.0.tgz", + "integrity": "sha512-aoiFW9ZU7jP8Itjqfpw80Qe7RoyCIhFrW522sdsp9LG92pat6CCG3d8qNZBaUi71FsEjIfLjx9Ky347FtVoqXA==", "requires": { "decode-uri-component": "^0.2.0", "split-on-first": "^1.0.0", @@ -8222,6 +9022,11 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, "raf": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", @@ -8230,6 +9035,11 @@ "performance-now": "^2.1.0" } }, + "rambdax": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/rambdax/-/rambdax-2.15.0.tgz", + "integrity": "sha512-9ScXRMAcLaiist63yYDeDTRSIbL9DFY5yaIkoWyodaHS94PUL1ECQxQkxPP+h76oXG6bLo9b/ML+yvIRd78qeg==" + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -8324,9 +9134,9 @@ } }, "react-is": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", - "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-native": { "version": "0.61.5", @@ -8391,9 +9201,9 @@ } }, "react-native-camera": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/react-native-camera/-/react-native-camera-3.18.0.tgz", - "integrity": "sha512-rLjLKJDEnI0E0nN7ZfK3GKEP37cYURh6QV2DCI1BRs9FWcETwDcgVYtQSfFEibWcGazPtsAqVDTg5LUYMFPjCA==", + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/react-native-camera/-/react-native-camera-3.22.1.tgz", + "integrity": "sha512-KMi/pagWz9ssODghHHKXypukTFpM14T62ZNbd/UriZZSnvdQxXrddJhwQpH3cnZS2kl03Jupu52vi4AvT36Feg==", "requires": { "prop-types": "^15.6.2" } @@ -8413,6 +9223,16 @@ "pbkdf2": "3.0.8", "public-encrypt": "^4.0.0", "randomfill": "^1.0.3" + }, + "dependencies": { + "pbkdf2": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.8.tgz", + "integrity": "sha1-L4q/FuvsyCJ3lF10irodeHYfYeI=", + "requires": { + "create-hmac": "^1.1.2" + } + } } }, "react-native-elements": { @@ -8431,9 +9251,9 @@ } }, "react-native-gesture-handler": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.6.0.tgz", - "integrity": "sha512-KulGCWKTxa6xBpPP4LWEPmmLqBqOe2jbtdlILOVF/dR4EgImiaBVrKdOHeRMyMzJOYAWxs5uDZsyA8hgSsm+lw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.6.1.tgz", + "integrity": "sha512-gQgIKhDiYf754yzhhliagLuLupvGb6ZyBdzYzr7aus3Fyi87TLOw63ers+r4kGw0h26oAWTAdHd34JnF4NeL6Q==", "requires": { "@egjs/hammerjs": "^2.0.17", "hoist-non-react-statics": "^2.3.1", @@ -8471,20 +9291,15 @@ "resolved": "https://registry.npmjs.org/react-native-nav/-/react-native-nav-2.0.2.tgz", "integrity": "sha512-t5BOIMRU5vMzMOtuUUuYxd59ipwRe8v1H7NTk8Z0elvBf8hCwYSsnRFDIYk35k/ZbbKZcODmd74P4x1zLTsDyA==" }, - "react-native-os": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/react-native-os/-/react-native-os-1.2.6.tgz", - "integrity": "sha512-OlT+xQAcvkcnf7imgXiu+myMkqDt4xw2bP5SlVo19hEn5XHBkPMLX7dk3sSGxxncH/ToMDsf1KLyrPabNVtadA==" - }, "react-native-permissions": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/react-native-permissions/-/react-native-permissions-2.0.9.tgz", - "integrity": "sha512-64F95x4Y1RqsQiPco+Qs+OAm3rKUTRfWDMpp1f0If9YfRXOxxVFJqf7mSlVvlSY4pZAhZgLVydOmA7aTTduPUw==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/react-native-permissions/-/react-native-permissions-2.0.10.tgz", + "integrity": "sha512-oQmWgm4tqUYyWmMNtYzNO7U/+6+WHyKiRd5cwNeE1FCJTGh8cJ5HapjHw3d6ZVfhSLzNwWqgJy1P4NpTANYa/g==" }, "react-native-qrcode-scanner": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/react-native-qrcode-scanner/-/react-native-qrcode-scanner-1.3.1.tgz", - "integrity": "sha512-oRqIfyUnFYrJi9tyrUxbJr0po3T4TxFSln0fKRlNwnpzcUSf7XCZ95BiDq+OEZFXWVH3T9jJjRywaOI4KzwqUw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/react-native-qrcode-scanner/-/react-native-qrcode-scanner-1.4.0.tgz", + "integrity": "sha512-W6wLJNbPQ/SQSRaVcAaGDN919me0LQQyHx7xzx3d/bB8NBya1RJ/bn7zUdnPUhSrp5OVDkGhW9BvRZBoX7xHPw==", "requires": { "@react-native-community/async-storage": "^1.6.1", "opencollective": "^1.0.3", @@ -8500,6 +9315,26 @@ "requires": { "buffer": "^4.9.1", "sjcl": "^1.0.3" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + } + } + }, + "react-native-range-slider": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/react-native-range-slider/-/react-native-range-slider-0.1.2.tgz", + "integrity": "sha512-EZLOtcnhOcOv4yZtPT826jZknqn+h3zbqM08tc3dFbakBFMoK4aN5GAuHP2RJ3PhMtwzl2h6HzOeFilq8cKaXQ==", + "requires": { + "prop-types": "^15.5.10" } }, "react-native-ratings": { @@ -8512,9 +9347,12 @@ } }, "react-native-reanimated": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.7.0.tgz", - "integrity": "sha512-FQWSqP605eQVJumuK2HpR+7heF0ZI+qfy4jNguv3Xv8nPFHeIgZaRTXHCEQL2AcuSIj50zy8jGJf5l134QMQWQ==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.8.0.tgz", + "integrity": "sha512-vGTt94lE5fsZmfMwERWFIsCr5LHsyllOESeNvlKryLgAg7h4cnJ5XSmVSy4L3qogdgFYCL6HEgY+s7tQmKXiiQ==", + "requires": { + "fbjs": "^1.0.0" + } }, "react-native-safe-area-context": { "version": "0.7.3", @@ -8522,9 +9360,9 @@ "integrity": "sha512-9Uqu1vlXPi+2cKW/CW6OnHxA76mWC4kF3wvlqzq4DY8hn37AeiXtLFs2WkxH4yXQRrnJdP6ivc65Lz+MqwRZAA==" }, "react-native-screens": { - "version": "2.0.0-beta.13", - "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-2.0.0-beta.13.tgz", - "integrity": "sha512-u2ajGWVv9QoQnFzRFHD2Oe0v+jRqWzGNXJm31B9b03x21oFDv6NRTCMF3UqntQcg1SRJh6PdlQQc2M0qymDIww==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-2.4.0.tgz", + "integrity": "sha512-7GcXlaj7IIrM4l5Ub7BPTkNQJ2slHGt2bhmfWmW73NTXEv+7pjHlp+JpQO32Yn+O8UQGPFf0rsesfYUdER7ppQ==", "requires": { "debounce": "^1.2.0" } @@ -8547,10 +9385,55 @@ "prop-types": "^15.5.6" } }, + "react-native-sliding-up-down-panels": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/react-native-sliding-up-down-panels/-/react-native-sliding-up-down-panels-1.0.0.tgz", + "integrity": "sha1-SRdvJqoDOv7eaUHLFX/wSNqaKJs=", + "requires": { + "react": "16.3.1" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + } + }, + "react": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.3.1.tgz", + "integrity": "sha512-NbkxN9jsZ6+G+ICsLdC7/wUD26uNbvKU/RAxEWgc9kcdKvROt+5d5j2cNQm5PSFTQ4WNGsR3pa4qL2Q0/WSy1w==", + "requires": { + "fbjs": "^0.8.16", + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.0" + } + } + } + }, "react-native-status-bar-height": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/react-native-status-bar-height/-/react-native-status-bar-height-2.4.0.tgz", - "integrity": "sha512-pWvZFlyIHiuxLugLioq97vXiaGSovFXEyxt76wQtbq0gxv4dGXMPqYow46UmpwOgeJpBhqL1E0EKxnfJRrFz5w==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/react-native-status-bar-height/-/react-native-status-bar-height-2.5.0.tgz", + "integrity": "sha512-sYBCPYA/NapBSHkdm/IVL4ID3LLlIuLqINi2FBDyMkc2BU9pfSGOtkz9yfxoK39mYJuTrlTOQ7mManARUsYDSA==" + }, + "react-native-swipe-up-down": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/react-native-swipe-up-down/-/react-native-swipe-up-down-1.0.7.tgz", + "integrity": "sha512-8j3mo+ukZBLRfQNz5N/TXLG7hTKTT8fg/2HkWWJ9umRzPz2kDthxzIkntp9QRPVh7h/sRymkhZdtLY3axdO2Zw==" }, "react-native-swipeout": { "version": "2.3.6", @@ -8562,59 +9445,12 @@ "react-tween-state": "^0.1.5" } }, - "react-native-tcp": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/react-native-tcp/-/react-native-tcp-3.3.2.tgz", - "integrity": "sha512-zjFmjAvYOsBkR1MF7htuPlk+uOzTykKaeu/eN+I7fkZ7UqBCW+9u/gJgWCv6Tjfn2tGgku6hsEWril4Oy3zJhg==", - "requires": { - "base64-js": "0.0.8", - "buffer": "^5.0.0", - "events": "^1.0.2", - "ip-regex": "^1.0.3", - "process": "^0.11.9", - "util": "^0.10.3" - }, - "dependencies": { - "base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=" - }, - "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - }, - "dependencies": { - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - } - } - } - } - }, - "react-native-udp": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/react-native-udp/-/react-native-udp-2.7.0.tgz", - "integrity": "sha512-tT+Wn0yLbdaTohXkGGor0HYgScGaASWCaCLSO1kCIUdNke7AtcOX5a5nfNLYrEjdUn7/2HRofuplyky7iJHSQA==", + "react-native-v8": { + "version": "0.61.5-patch.3", + "resolved": "https://registry.npmjs.org/react-native-v8/-/react-native-v8-0.61.5-patch.3.tgz", + "integrity": "sha512-1cCc/zRK9uZ6Z/++aLPBMf5h78B74+qMdyKlJRDG9uREtd6BiAPvtqkW2QN37SYAe4IjH23BfO85rnpBGrnfgA==", "requires": { - "base64-js": "0.0.8", - "events": "^1.0.2", - "inherits": "^2.0.1", - "ip-regex": "^1.0.3", - "util": "^0.10.3" - }, - "dependencies": { - "base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=" - } + "v8-android": "~8.80.1" } }, "react-native-vector-icons": { @@ -8703,9 +9539,9 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -8716,13 +9552,13 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -8761,6 +9597,14 @@ "tween-functions": "^1.0.1" } }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "requires": { + "readable-stream": "^2.0.2" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -8826,21 +9670,17 @@ } }, "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - } + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "realpath-native": { @@ -8879,24 +9719,25 @@ "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" }, "regenerate-unicode-properties": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", - "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "requires": { "regenerate": "^1.4.0" } }, "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" }, "regenerator-transform": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", - "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", "requires": { - "private": "^0.1.6" + "@babel/runtime": "^7.8.4", + "private": "^0.1.8" } }, "regex-not": { @@ -8908,16 +9749,6 @@ "safe-regex": "^1.1.0" } }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -8925,16 +9756,16 @@ "dev": true }, "regexpu-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", - "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.1.0", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.1.0" + "unicode-match-property-value-ecmascript": "^1.2.0" } }, "regjsgen": { @@ -8943,9 +9774,9 @@ "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==" }, "regjsparser": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.3.tgz", - "integrity": "sha512-8uZvYbnfAtEm9Ab8NTb3hdLwL4g/LQzEYP7Xs27T96abJCCE2d6r3cPZPQEsLKy0vRSGVNG+/zVGtLr86HQduA==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", "requires": { "jsesc": "~0.5.0" }, @@ -8999,6 +9830,16 @@ "uuid": "^3.3.2" }, "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -9100,70 +9941,19 @@ "inherits": "^2.0.1" } }, - "rn-nodeify": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/rn-nodeify/-/rn-nodeify-10.2.0.tgz", - "integrity": "sha512-mPNe2vNR14UTwAbpebI9fXn9HAU37vebyZDCqZOK6G5GBEUiMCANIVa7zgc9aJ1JeziLUGLR9c+H9/BSbVdd4Q==", - "dev": true, - "requires": { - "@yarnpkg/lockfile": "^1.0.0", - "deep-equal": "^1.0.0", - "findit": "^2.0.0", - "fs-extra": "^0.22.1", - "minimist": "^1.1.2", - "object.pick": "^1.1.1", - "run-parallel": "^1.1.2", - "semver": "^5.0.1", - "xtend": "^4.0.0" - }, - "dependencies": { - "fs-extra": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.22.1.tgz", - "integrity": "sha1-X9b4BJ3JdsoZ6yNV1lgXPKvM4FY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "rsvp": { "version": "4.8.5", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==" }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "requires": { "is-promise": "^2.1.0" } }, - "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", - "dev": true - }, "rx": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", @@ -9183,13 +9973,18 @@ } }, "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", "requires": { - "symbol-observable": "1.0.1" + "tslib": "^1.9.0" } }, + "rxjs-compat": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.5.5.tgz", + "integrity": "sha512-F42sssVbUyWH4vJswEo6m+Eh02xHv3q93n8S7nUJO58R7sbc3CvJIOts605zdaBhWa1xMB9aVSyqPqhQ5q3eXg==" + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -9238,6 +10033,21 @@ "object-assign": "^4.1.1" } }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -9324,6 +10134,33 @@ "safe-buffer": "^5.0.1" } }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + }, + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "requires": { + "jsonify": "~0.0.0" + } + } + } + }, + "shasum-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", + "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "requires": { + "fast-safe-stringify": "^2.0.7" + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -9353,18 +10190,19 @@ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" }, - "shortid": { - "version": "2.2.15", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.15.tgz", - "integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==", - "requires": { - "nanoid": "^2.1.0" - } + "sifir-js-sdk": { + "version": "git+https://github.com/Sifir-io/sifir-js-sdk.git#f860e9b2fac8dbb52606b0fadc41977f70350ce8", + "from": "git+https://github.com/Sifir-io/sifir-js-sdk.git#feature/rn" }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" }, "simple-plist": { "version": "1.1.0", @@ -9392,9 +10230,9 @@ } }, "sisteransi": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz", - "integrity": "sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, "sjcl": { @@ -9422,6 +10260,11 @@ "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" }, + "smart-buffer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==" + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -9519,6 +10362,24 @@ } } }, + "socks": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", + "requires": { + "ip": "1.1.5", + "smart-buffer": "^4.1.0" + } + }, + "socks-proxy-agent": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", + "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", + "requires": { + "agent-base": "~4.2.1", + "socks": "~2.3.2" + } + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -9603,6 +10464,11 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "sql-escape-string": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/sql-escape-string/-/sql-escape-string-1.1.0.tgz", + "integrity": "sha1-/nRLhRSGjA60v7nkqYknHUDzDrk=" + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -9663,12 +10529,12 @@ "dev": true }, "stream-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", - "integrity": "sha1-v5tKv7QrJ011FHnkTg/yZWtvEZM=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "requires": { "inherits": "~2.0.1", - "readable-stream": "^1.0.27-1" + "readable-stream": "^2.0.2" } }, "stream-buffers": { @@ -9676,6 +10542,47 @@ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=" }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.0.tgz", + "integrity": "sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^3.0.6", + "xtend": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", + "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, "strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", @@ -9721,30 +10628,55 @@ } } }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" } }, "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } }, "strip-ansi": { "version": "5.2.0", @@ -9772,16 +10704,96 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", "dev": true }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "requires": { + "minimist": "^1.1.0" + } + }, "sudo-prompt": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-9.1.1.tgz", "integrity": "sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA==" }, + "superagent": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-5.2.2.tgz", + "integrity": "sha512-pMWBUnIllK4ZTw7p/UaobiQPwAO5w/1NRRTDpV0FTVNmECztsxKspj3ZWEordVEaqpZtmOQJJna4yTLyC/q7PQ==", + "optional": true, + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.1", + "methods": "^1.1.2", + "mime": "^2.4.4", + "qs": "^6.9.1", + "readable-stream": "^3.4.0", + "semver": "^6.3.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "mime": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "optional": true + }, + "qs": { + "version": "6.9.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.3.tgz", + "integrity": "sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw==", + "optional": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "superagent-proxy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-2.0.0.tgz", + "integrity": "sha512-TktJma5jPdiH1BNN+reF/RMW3b8aBTCV7KlLFV0uYcREgNf3pvo7Rdt564OcFHwkGb3mYEhHuWPBhSbOwiNaYw==", + "requires": { + "debug": "^3.1.0", + "proxy-agent": "3" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -9801,6 +10813,14 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "requires": { + "acorn-node": "^1.2.0" + } + }, "table": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", @@ -9967,37 +10987,26 @@ "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, + "thunkify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", + "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" + }, "time-stamp": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "requires": { + "process": "~0.11.0" + } + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -10011,6 +11020,11 @@ "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=" }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -10066,6 +11080,13 @@ "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } } }, "tr46": { @@ -10075,13 +11096,20 @@ "dev": true, "requires": { "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } } }, "tslib": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.0.tgz", - "integrity": "sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg==", - "dev": true + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" }, "tsutils": { "version": "3.17.1", @@ -10093,9 +11121,9 @@ } }, "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" }, "tunnel-agent": { "version": "0.6.0", @@ -10119,7 +11147,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, "requires": { "prelude-ls": "~1.1.2" } @@ -10143,6 +11170,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, "ua-parser-js": { "version": "0.7.21", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", @@ -10174,6 +11206,23 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==" + }, + "undeclared-identifiers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "requires": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -10189,14 +11238,14 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==" }, "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==" }, "union-value": { "version": "1.0.1", @@ -10261,6 +11310,13 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "requires": { "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } } }, "urix": { @@ -10269,9 +11325,9 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, "url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -10290,25 +11346,25 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "use-subscription": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/use-subscription/-/use-subscription-1.3.0.tgz", - "integrity": "sha512-buZV7FUtnbOr+65dN7PHK7chHhQGfk/yjgqfpRLoWuHIAc4klAD/rdot2FsPNtFthN1ZydvA8tR/mWBMQ+/fDQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/use-subscription/-/use-subscription-1.4.1.tgz", + "integrity": "sha512-7+IIwDG/4JICrWHL/Q/ZPK5yozEnvRm6vHImu0LKwQlmWGKeiF7mbAenLlK/cTNXrTtXHU/SFASQHzB6+oSJMQ==", "requires": { "object-assign": "^4.1.1" } }, "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", "requires": { - "inherits": "2.0.1" + "inherits": "2.0.3" }, "dependencies": { "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" } } }, @@ -10339,6 +11395,11 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, + "v8-android": { + "version": "8.80.1", + "resolved": "https://registry.npmjs.org/v8-android/-/v8-android-8.80.1.tgz", + "integrity": "sha512-YtJEYC4cEr/EJjCAllQN1T+PX+XtcrCCBXJv+dLdzxxRtVKkHlf8kAxyriXUOtGmiMtgzlz+d8hQugVPdq8ZfA==" + }, "v8-compile-cache": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", @@ -10354,6 +11415,14 @@ "spdx-expression-parse": "^3.0.0" } }, + "varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", + "requires": { + "safe-buffer": "^5.1.1" + } + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -10380,12 +11449,12 @@ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "w3c-hr-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", - "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "requires": { - "browser-process-hrtime": "^0.1.2" + "browser-process-hrtime": "^1.0.0" } }, "walker": { @@ -10454,11 +11523,18 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=", + "requires": { + "bs58check": "<3.0.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "wordwrap": { "version": "1.0.0", @@ -10578,6 +11654,11 @@ "resolved": "https://registry.npmjs.org/xpipe/-/xpipe-1.0.5.tgz", "integrity": "sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98=" }, + "xregexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", + "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 3c67a03..86deecc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Sifir", - "version": "0.0.1", + "version": "0.0.2", "private": true, "scripts": { "android": "./node_modules/react-native/cli.js run-android", @@ -8,13 +8,15 @@ "start": "./node_modules/react-native/cli.js start", "test": "jest", "lint": "eslint . --fix", - "postinstall": "./node_modules/.bin/rn-nodeify --install 'stream,console,dgram,url' --hack; npx jetify;", "clean": "rm -rf node_modules/ package-lock.json /tmp/metro-cache", "debug:connect": "adb reverse tcp:8097 tcp:8097", "android:release": "./node_modules/react-native/cli.js run-android --variant=release", - "android:apk": "cd android && ./gradlew assembleRelease && cd app/build/outputs/apk/release && cp app-release.apk sifir-android-app-release-$(git log | head -n 1 | awk '{print substr($2,1,6)}').apk" + "android:apk": "cd android && ./gradlew assembleRelease && cd app/build/outputs/apk/release && cp app-release.apk sifir-android-app-release-$(git log | head -n 1 | awk '{print substr($2,1,6)}').apk", + "usb": "adb reverse tcp:8081 tcp:8081" }, "dependencies": { + "@nozbe/watermelondb": "^0.16.0", + "@nozbe/with-observables": "^1.0.5", "@react-native-community/async-storage": "^1.6.2", "@react-native-community/cli": "^3.1.0", "@react-native-community/masked-view": "^0.1.6", @@ -22,15 +24,13 @@ "@react-navigation/native-stack": "^5.0.0", "@react-navigation/stack": "^5.0.0", "@tradle/react-native-http": "^2.0.1", - "assert": "^1.5.0", "axios": "^0.19.0", "base-64": "^0.1.0", - "browserify-zlib": "^0.1.4", - "console-browserify": "^1.2.0", - "constants-browserify": "^1.0.0", - "cyphernode-js-sdk": "git+https://github.com/gabidi/cyphernode-js-sdk.git#feature/rn", + "bolt11": "^1.2.7", + "browserify": "^16.5.0", "cyphernode-js-sdk-transports": "git+https://github.com/gabidi/cyphernode-js-sdk-transports.git#feature/rn", "moment": "^2.24.0", + "node-libs-react-native": "^1.0.3", "qr.js": "^0.0.0", "react": "16.9.0", "react-native": "0.61.5", @@ -38,38 +38,35 @@ "react-native-camera": "^3.17.0", "react-native-crypto": "^2.2.0", "react-native-elements": "^1.2.6", - "react-native-gesture-handler": "^1.5.6", + "react-native-gesture-handler": "^1.6.0", "react-native-linear-gradient": "^2.5.6", "react-native-modal-overlay": "^1.3.1", "react-native-nav": "^2.0.2", - "react-native-os": "^1.2.6", "react-native-permissions": "^2.0.3", "react-native-qrcode-scanner": "^1.2.3", - "react-native-randombytes": "^3.5.3", + "react-native-range-slider": "^0.1.2", "react-native-reanimated": "^1.7.0", - "react-native-safe-area-context": "^0.7.2", - "react-native-screens": "^2.0.0-beta.2", + "react-native-safe-area-context": "^0.7.3", + "react-native-screens": "^2.0.0", "react-native-sensitive-info": "^5.5.3", "react-native-share": "^2.0.0", "react-native-slider": "^0.11.0", + "react-native-sliding-up-down-panels": "^1.0.0", + "react-native-swipe-up-down": "^1.0.7", "react-native-swipeout": "^2.3.6", - "react-native-tcp": "^3.3.2", - "react-native-udp": "^2.7.0", + "react-native-v8": "^0.61.5-patch.2", "react-native-vector-icons": "^6.6.0", "react-navigation-transitions": "^1.0.12", "react-redux": "^7.1.1", - "readable-stream": "^1.0.33", "redux": "^4.0.4", "redux-thunk": "^2.3.0", - "stream-browserify": "^1.0.0", - "string_decoder": "^0.10.31", - "tty-browserify": "0.0.0", - "url": "^0.10.3", + "sifir-js-sdk": "git+https://github.com/Sifir-io/sifir-js-sdk.git#feature/rn", "uuid": "^3.4.0", "vm-browserify": "^1.1.2" }, "devDependencies": { "@babel/core": "^7.6.4", + "@babel/plugin-proposal-decorators": "^7.8.3", "@babel/runtime": "^7.6.3", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.9.0", @@ -78,30 +75,9 @@ "eslint-plugin-import": "^2.19.1", "jest": "^24.9.0", "jetifier": "^1.6.5", - "metro-react-native-babel-preset": "^0.56.0", - "rn-nodeify": "^10.2.0" + "metro-react-native-babel-preset": "^0.56.0" }, "jest": { "preset": "react-native" - }, - "react-native": { - "console": "console-browserify", - "_stream_transform": "readable-stream/transform", - "_stream_readable": "readable-stream/readable", - "_stream_writable": "readable-stream/writable", - "_stream_duplex": "readable-stream/duplex", - "_stream_passthrough": "readable-stream/passthrough", - "dgram": "react-native-udp", - "stream": "stream-browserify" - }, - "browser": { - "console": "console-browserify", - "_stream_transform": "readable-stream/transform", - "_stream_readable": "readable-stream/readable", - "_stream_writable": "readable-stream/writable", - "_stream_duplex": "readable-stream/duplex", - "_stream_passthrough": "readable-stream/passthrough", - "dgram": "react-native-udp", - "stream": "stream-browserify" } } diff --git a/shim.js b/shim.js deleted file mode 100644 index 9abd34e..0000000 --- a/shim.js +++ /dev/null @@ -1,30 +0,0 @@ -// global.net = require('react-native-tcp'); -global.encoding = require('encoding'); -if (typeof __dirname === 'undefined') { - global.__dirname = '/'; -} -if (typeof __filename === 'undefined') { - global.__filename = ''; -} -if (typeof process === 'undefined') { - global.process = require('process'); -} else { - const bProcess = require('process'); - for (var p in bProcess) { - if (!(p in process)) { - process[p] = bProcess[p]; - } - } -} - -process.browser = false; -if (typeof Buffer === 'undefined') { - global.Buffer = require('buffer').Buffer; -} - -// global.location = global.location || { port: 80 } -const isDev = typeof __DEV__ === 'boolean' && __DEV__; -process.env.NODE_ENV = isDev ? 'development' : 'production'; -if (typeof localStorage !== 'undefined') { - localStorage.debug = isDev ? '*' : ''; -} diff --git a/src/assets/images/boltTxn.png b/src/assets/images/boltTxn.png new file mode 100644 index 0000000000000000000000000000000000000000..692cf50bd7009cb9acfbf9debb68ed177b000f1b GIT binary patch literal 555 zcmV+`0@VG9P)P000>X1^@s6#OZ}&00009a7bBm000XT z000XT0n*)m`~Uy}-AP12R7l62mcNmmFc8LnPjdxOflN$tbnqyFNa?8r+yU+YS74ly z__+g0;1b0g70|(RvhwH{fn;k&gAluX+He2q_Iy6c8P&AaKoM-M&geBq_jUzROH#R_`H1~Q`BuF)F7We^tb4K@>R2IM}7B|l5 z zT$-#eEh>onu9~(op;+Y5B*nJ=1R~i!hDGfpQrZlfe6h8ks&EiRMKx{XMa(Z50JC(` z$63?zLOamLT4~~<@c?FLv`w|&u$2zLa0MoQ?14Ant227YzO6`g?!|$#P&EeuP|HE? t(pye%EVtCXOHS&er933*BK%*{`Umu`;VrO^Y(xM6002ovPDHLkV1fae`(6M5 literal 0 HcmV?d00001 diff --git a/src/assets/images/boltTxn@2x.png b/src/assets/images/boltTxn@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f5913edae69bc7c35733d434b0afe7e5562149f2 GIT binary patch literal 1064 zcmV+@1lRkCP)}7&xQw*8!oPZ^ebz!JA z2$4$$jI^)UKmnAuPD1)o4C;M71IsE2kKRE{@;Z>oKl-qq(f15kXbc^Id6k5vHxQG& zj>OW+Vk;nRW33iomijnV5-yxUi1wGjeOn841QGx#@KclO+-5K<2m$a*K5l@SZ|mPU z_6~?IjeQY>Q2Qz$U#cXW^T|zQT#5=dRT9Qc{~K6d&b|@=K$V1BAQmSwo#b_P6BDAz z5_kZ1RT4&gaWka#-3*RROr!$fBv$C!B1tjM7oKqoMl$h;0GSxN8HA(|$}7wr7qMcq zsjVfdw~^LD7Wln*%Zp4X&8;2tnYj#hsbwAeRWaj94E_;>d^t7#>;l4;_!S)&dMPX_ z+5g8xs(B-qG-7-un_W5@DAm{qOb|0is&8SzxqorHJAJHy7TE5AgNKyD2I55uBiFXn z4X>C`uC#FM+)S%|OG)>9NB|5>5Ph<+lepm{lJ7N1MGC}&2M~c)YxK#2YRVw-Q1`cv z!R^|DK3Xz>F2++HG#F~(f8%JGYq90kve-)pCZd5SYU3*l+7|e_2G*lB74Jbxw)dP} zt`86a@YLbGl?QL=4aBUYj8YHA17N7F@@dD;O5mI2_uoCqNEK`4uu8)HB(MKvvK^AY zy`?r7_b4OP_iuOtVQox3%P7$5^OYXY1`QR{vsyHIt57pihCzvtKutSpU6a3@TavX*W!NX+|<0%iFVZ?_3rMR}LI z9kFb;H0}Crc)wAjXSI=3WTS>+N!?Cp?E!tV+R(!{QSyPWU<0000_*fw*5N1xy^Cm8w$ zxMhVmz#Hg>wQ>SILBB;OZ_2dzQ>qGLGQ#K%+s5MK`?4~#vg+;Y>kB%~NlP1mOD`LM z*YYn%09ODxfOFx`&(LgdIzV#La!X)%09G$v?m~d&0J6fLUndKala?NU0KgW&OyNE3 z0VIV#&n5$sla>L1u!S)flF<>snO-uhq`9P@ZP$zmujWO7H2*uNav*X&Fmc^><&V-WjACfIbR;9%IBtvth!<-3zErAV~lkmAsyOz@33= z1*rxg?^!2k5Gb4OW7QX^Mv&;jN5M%?5};S_$7;DQpT&Zy0t5gwxoim>kUBB~uRlmm zT1G62{+NmnY60pQYSmBrqr=!en@4Y*yjPn3cg$PPhnRkMNDS7Vt~39U^(EdR*px6fg>_5{G_t5KND0(iTsJmL2-i0n2jxLtpO)E$B7fB; z-t&TD#XBa64)mgUMl(I_H>E6l*%&S1$%^@!O0yv^+?$k|?B2IcOv*;Yq8+}MxJ`hx zsA49IewnenMx}*glNyuUNqEbxm?S2Q2gT!XdpPXD^0c0ow}Ev0zp|(X15XB$%Gk*6 zk%rtfP5UxCvoYgG^@|23_3bX{3Q{oe!xb@DRUqlIK2n=O-dmtNT`Bze)k({T1b3~0 zNo{R2&)5xWi-GbgfWqQhpy-;a#(NPGf7j9^wV^@UD|YO6&fC%i&}?EdyK_Mnqn4*= zR-1~kKD92)`ss*k2+CN&-cEENQhfAx&AS0-mOv5rLFi64}!tQCQDWw}tBtwtcT zB@c-#_QfvDnL84hJ)~)tETJ=GUPH_h7#hbnlUV&|CR>~{43gH_j4>$}BkqI3Df<<< zefIQeuR3i{i0N)sn~^2SxB~+KE%8{4yFmTgUsFt%^W04YX=Oli-UwvILCWqxqJ_wl zK{mN2WkyotE7+N=3Xm8C$ulf7;J)6q6DuMdq^ehEK^-PK%w|EPcA1fTS=SKeKadDH z(Kkf~SfpKMLON90fiJ5ywcadf7m_Z2WJG2(?QfdM!7GzzdYXU!p{;#)Kqi@(&01L` zV^W2r*hiQs9^~4T%%}}})#hRzKqB8Het4tMiF*cR#@nzz>z4Ryw@o-{DV9)FZI`eq z+CFLqh;N^`0C4LTLadhP^GX?*864KL2CVBEl9#Xj6dlLfLwzkSIwdXkJ~{S z{bA#3iDY}hq=6!U-dSYb+L+OGQy{;&}=)5>t1Jto;ch3j_s&;*DUQxj_TizoUUsO3)G$#2`O7$;$dq)qumpyxU zLO|jCjFmV-(;EkgJux0zcmAP$B+vqqFqj07Yh?#wRjwJFB}MMM{rLu9`^tERIM78V zzY45aHM4|snqO!5$ap{ zZZz8*(eaEnb_QGpPFl({Pl`q1 Q*8l(j07*qoM6N<$g7MJOR{#J2 literal 0 HcmV?d00001 diff --git a/src/assets/images/bolt_blue.png b/src/assets/images/bolt_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..9f24ebed0afb86fdb76b9761b699536a983d38b7 GIT binary patch literal 18790 zcmeI4c{r5q+sE&*MNza_tFff4v)HF0Yjz=7iY#L=VP=?NEXkCTy(~$h=*eETvLsuJ zE!mP}CkbUqLY8<(_0-hU^PBhg9`Bzs$1yXf>-wJG^SVFRGWS2XP-7!)j*Wa90RZ68 z)zLJid|R%+Sy?Eb9+#oAlrJ{Cjuim_B=y(dpfu(9EC5gxz?fMQEe#D2D4e^ry(7*6 zE$!our>Fq{dC&)Mk8(v5!47C=3|3ia`azWt7~`lcWFcn=HNY&_R`rNFM~nz#UDr2m83YVF?HyWudRW2ui%(3=slq+xO}Sw)y67!HNWK%g=Zn2Zz*j({p5U~=H^FCmqUlnCkR=!7uU zJoLRB+b%?(gdQG zHwD3Wq<_pLnEB$-5K}Y(=jDk)Yk5;HMfguwPsBL=oSa{r)_eYS>}Vg%zof1Ad`tVf z6u!+6l5(vG4NtT^5$9=!!?~$^TV=+7BLr(`fcINqu#PwqK@17`UHx;ae;T1R?TKg= zI1~<*g2JWXvSx4@1Pq3ND@s7+5Kt(U$v5S19)>tajFT^whl~^)ZU&Pb7U$wN_&Um+SAQm6mJS`&xzTHh$&tsVbMYpV2rSReMpP!2hJH!98g=>OXif3W#S zDIE-fvNV0EmMmrAem%yHpgn$V{ky{r^Yu8w+j|nw>zhqk=Q))zxh+8|9cIR3mW^MHqf>dBzsS^ znloih(AehR41dk|-5Cj4Kl9x%zs|w8)?cUQ@5TDhsYI?HWeCbLpbW|WD}ERf@{hKk zmA~mN*Qe9X>#H8Fs0gLJAh7k%@43|dzvo)f$ffT8J@;qoQ7ne20{>p_w`QuW^%M8o znQ(-1bAVQnmy?r`LqdLU{yoDOV;B5C2S2aq|Jj(@j$VYC2F;j`izXs!0UZ}L4Vp0> z7fnRe0y-{g8Z=`%E}Dp_1$120G-$?jTr?3;3+TA0Y0!-6xM(7x7SM4~)1VpCanVFX zEuiC~ra?2N9}Yjq889`QPZFq({a&6L@l7>qNYJJ zrsJZCh+06$MNNZdOvgnN5w(Dhi<$<_n2w7kB5DC07c~u&LH zh^Pg0T+}pZ#{Uu5#-ES;p|O`&2i?OXa1OS{*bT!q?e7Yx+eeu>EmoEe^RNk@h$|>4p731Niqx!_) zQ9Sv!8XHRw9NhKF=iw70bMEZ^4(>}w+dKTWZl75ELW2H?~f+=_uoH9h=PcC z2$@$9m;mF2B3DzDgptVQ>v2qRdh-6cBAdoFQ(ib07@ye)X5s`v0RdnX0I9MK&in9o zdTGq%?DM*~@Pynm`y@4zq+qb2`qoDXE{z?(IKOL4X`%H&XxANPrw4}HGXcFvRoggO zbc7DJ*SEASM-Dw3RW})nZeikJv{o3L+B0!e)I?8gKfneEGR4h8?bKh}U0AEpxBN?qXB1Y?2aq3!EE@z)ryOkUSuhVc ziuN@H?Q3MQn8?b}Z)`aseRaD@Jem_I1gnOuoQPr+16tJuYuRfVDyzZFY^+?lNifz3 zLaowh1cBAeOr#+#!7wI;@u@4zHJLLQj5IBGk1bM;SF&oHJ#OQ;*&e!X;() zXhUslN=8W)?!!1Y?v9Tl7wXl$oK?LXiAk}B%f+qOqC~Ui6m8k7XM|mNfDKDM-4~~_ zGD{r}eWTcWpSedQr{-2Y98eWviZj&#?xpZ~-k9pDavzV`+i>qZ|FwDdLZ@2?-#pcU zyig1RsfN3hG_y0EQt^HlyKT#E>yo!Km`$JG1_!@QI$Lh4&gN(ptonGTc`8$-T8V#V z#e3}s)0y4zdL@{-TxHuvsrtN<`_JEI0_sR4ELicvK^}5dMwNSKQ^~Vrb8=&LN!*(j zh~M$T1jBPlXC$_Q2j|ZBy6@sA4VWC2NoF92CGOfZ8@_2C0dL;~0@o{>Ki1{} zUwnVzNzu0);tTT1AJg>Ts%#$=VA(+2DbE`eOGXM-hrj1fBy613`wO;1kSRF5AT_E| zJ24yUPZZtfTv_4Uv%_}DuVFw$Ed{ZG-3gqTJ$7;$x$=$)e3Add>!skg6OYPG`8Hg6 z&vL-y({P@sFkElvo7Z{I0v|h;baQO}90YHH$>t}3fq zJ@+TKs?--S{v(kC${(FCDm6KEvNNg~GL8!L4Zm-ecnEG1W@;ll**wf@r* znXhh#9UR=^Jk6uA+=j9c=q?=^i*vy*p=Sre%j|(_VzSr0dp40Rp#p2mbry@k6%m@- zBaFjV7PZz6>=kurXoQq(jM3SV)X-2I*jk8}w7?bDr$+Kel^s7Y6@%tAsgJ3--CLM9 z{zVrgotO1Rfnao~fc?qG;tUnUs$I;`$Ix>2+Iv|7nvb(D_xK+~tlkvRwF9X-o$zjm zJnm|4@QTHvaxPtMZ*-!tg;47OXj(4e8qTQxd9 zb>n)$k;j8@*psJPL_*D?5?IpTOE%#5?F}Vw0&MDfo^qM!F{m0l&ZH}Qc?~mI&-cD< zyyM$t!OEKVhC$W2u^~{~^Jr(n7>RfEjAr+6YV+zq?ct>^t;Ng33~miA*swLmZt?@t zTK9p#%Ldhs0xCI)|CSo+!4a~q>jY1_m3`4a1xN^kq=hblE56_DdN$7nN| zJn~unkdCwKa#`k80O-_GN<)2hWD+b`mU*Rs7h;y?y^-{B--*rrMcBjjG82)N+%13A z`~_UQYhBaE8-q_-CLXTgUh>0^W2bw00_9|83v;W$lqEAH!TH4$%-r3m)MTe@nvX;PZcm9Pw(Z&rYVB-ai*v-NvR2Q?>;Z9pV!xp`57yG#w2$k4m+76F?)-sm zh7zozTBSqd&X7>hPWSk|Gh{}M>j5%jo0E68sIqVN?T_3OViz+V2HI($#}&#yx!RF) zS~dvWHV!DhnN#LkJK_Bb8_8j0bl2v|UpQiN0L`s4X?_G_3X8tD zT~I;P)v?56eTMAxI#6*PaKt2{&ndX)+6y+L6xqOHmjW!0GjRN|+Hv;V=VTh@c;z1^ ze{m47iy#Dff96)dl86{z z4G(JEd^Y`7@|FGRHB|@mu}y&&7$Zv~${k^&%{$vw#desgumFQITH6^6iRIC8#-}Vh z5@R@y6kazm+HKN}KV8R-uT!^(jd7`FBUvhr_NLc2#^&BB+&=4LrPGNbYpkj|mvgMv zHT9T_v`R0<+6^Cxc@)tyK2}+6$DU8BZzpr*CQkM;5U+s(K#y1aH@%gZ0NLr(sJ zl)ET{sF-!%rCsyP&i7p|)&PvE`J@!NmzFx)>!lvduhbcw<%dVasc`R->IMOQfwdCh zpxy8Id-?n|^*im&Z#^CNS_ljd7h%1UaT4!rQR<4FE-)bvlrCJiDK@Z3_siv)+8hOjdT)Y3Uk^H~exPB&Xk0D5GlvreM}- zb;@vnwVH8PpYZj^cqc`915$O2YPhNIDgD#)At7x8UCXtZ#!BM2)y6F)SyMv^XNuDf zB$Z6P@^TL2EgV0|2UN!mNg^7Ny`&S>Kx?0;18L=I+Kx9!xm}YvD)&cL#iDCCIGWmO znpk`L@47A>0;#NgiG1HNl*0AgiwBsH9woNEZo_h=F^d&dw76IH`n?Q-tTtcY6BTCN zGKVJhWbG=m*DOo&yp?exJR=#C{{}5r>zenLcm8^g-IpY?ZC}23fQzDwX4AQv5u*8& zy8*&6s9?$@{h^(ER`BupiP=WOE?&ZL1<}@jw3hJpMDv1nuX~0!!%&@+(rA5REa`CJ zVa*g-|2Pb%%hNrhMJ*D&JF1p;kMX-47#Q9;%DnO}xXATF+42R{)Fq*IjtyJx1@s$g z_)bP?cqU5i+)1b%JlIF*@113i6;7TG^pUujz!pSMB*4SXC)}58#Em3*o?pDhH#K)y z`L5WP*N?cq_#x|hZj`pR12?)%ofeyIaLzWxgW_C6-Ez#;`=(F(pxet13>cbkKFgSN zt90|{YgLPrXUk*sqdYT|i|zO)_$N+dW}3LIAFn)9Q^+kFewSLQR>jrfsBTQ`S|Poh z$XfGL|7%mNx`(&mh}O&do5BW6Uk~zSJAF3t3V46FQX%~eX>~5>yq`}f8)B5xF|=Fy zsY-$|N-XsyIr)7GBLqF{^L%}#;8Q3+Vc_0JXN9%)noj9cdh9ol zl3@G;<^F-d;iYpTqjEM|pv_*fB3(z=NHsZmpTw??^R~&40D~$oiv!k@b6!U3n$)%@ zV09-q8FJfrjKjHx{2ZlrAV!71kXU`yUN*n<6cF1;9NG0 zbcC1WT7!PzU1j>=@?tpKqsYmYcI`IU`TJiX^aWjRq{oDaWA5bmMG)TH$totQN;8 zZ`oS@ZHL~YhqomrlcbNu^>_Al@{YbqxjM~T|lgvz{|@8Vt=Hf)D$UU4EksbeloTB@UiLs%ED}KM37D4 zgDJt$q}~gmB2lf!c0O?NRs%Xx8JyPtw_>;xN=XqJSOmTcCqh% z%8?MGl=oTnP_VE*2)uP;sIg8QkX?(oSTq@c9htn`4sxsQRWfWgu;AK9&dv_$>^&17 z8|aVjcp8{cNXBFnm*0PqitoZvoZ} ze*dT&0u~=Gc~+a;_o~Z1;O=X6xD4KI1At9HTLHcOw^&`$-}eq2Xr1Q&Sh+`FzQVZT z^xX8miH;Xj<)#J40|nE%^5hTP<~_ULl#%?9M?Lzii||QTr3+OLra!A{leBKmC+aH> zT7FtsDb|Z^oN0_W+siDfCCVVksRlL{EY1;RW}B9(1CiFqovmI~+3$C&hh#DrS+Fxi zGs-?uR8%auX4nZc$;azS#ni+}OB7~m&!?c;p6wyqiRkWNY~(@O1ZZFIU+NSo%L;rB zXpeN)t&P6E{p^|TE$&f^^byCzoBnmW=gtx~M?cqrK_k<}xCZKkRyMlce9GhVB<3Bm zT*>xXZg6{YD^K{D4&>whhf}L}mMsRNKb+8Pb4PB2H$-+Btu2LWi9Q%P?P~P$XxHpU zLd{rn2v??wgqUU_DP+RO<%!xG4?g}1R!IkEB@}B}MZeuz>w80q?Ccm{Y&*k;F3;Y)^w$3qlCGAKX0E#3+5Z8ksv0~1 literal 0 HcmV?d00001 diff --git a/src/assets/images/camera-small.png b/src/assets/images/camera-small.png new file mode 100644 index 0000000000000000000000000000000000000000..3f2290781a5a6c419d6f2537e6e38b40b5c9b17a GIT binary patch literal 10400 zcmV;RC|}o!P)o4^LWf8vAU!Ash4AnUh%HML4@aZ^?F5R{=Rb3 zNgIV(h8#$$8q!d_|Ne1$OYKY|x)PuXF$^YvF3NcG;vgonM68$Sbug}01u9o2PJBb4 z8WOO>IL8?)9vrWz@4Lj9n~K4BI}=2APVB7Fj%X(+5QuS4fjjN#M{e)^{GyXjen+5eOBmA5G53xKM)i)WtzqC;0NIrt z-p-f~l1dgyalHieYUs%;CQn`~P_`WmS?4I;d++Ypil-Ua&DCKsx<^Oe7}4E_B5>&V zn0!*qngo1#+2rH@NuX*g7?RFWEZ;v)7iupM(^vp`DLX>w@=|7*$YQu&=I<{5#H7C! zsM-cps|BzP7d`rDC#%|Th%t5m$pRq@9X>h+SQyMgBanxuQ>5caSqKb@T(lVhEAD93{4$s&vx7o88VrpR4OTk zuJ}5vmK{4lnbmX_3D24gC|%R{pbZ1@ka3RRz3=E#0Ny*?C>@Pd%Z@C|EE8Fxc$fqQ zFU~KEJQe`s*clH$e3H8bmRIis#{O<>RJ5~UFfcS26Ir5oL>q5DPS)kDNkkK7JpAy-yi(^GhJ+vExZ=*}XG*eJ7LSZ1Z0HM>UdGfJ2_chL6E0qBDUe#R_2vMIA*V7!hj5-Lj+j|63w z%`6fSc(xQa4i~uR4%*&17<5py!3Z5<77@m0WH8Oil46ja%`4BIt$9MWnF; zAKO_o$I#Z!QDSz>Z@KKq{ho+xy-Bl3hI=Ay0&VRaPgN=%X_p<@WDy%>mZvjj*37KT zY6EC%=h(Js*s!L{4j-M3GRx6u##x)rB91aEG>e4sfMJ=HLDtMU*uB4=nTnN)dU3;s zOq}k3k$djT3eVSD*}Y4u9Uf0Llf}m4xF)iAJLuT|e(Aa23e-NBa?wS#)e9E*HVqHh zbyw;=;D8P%?%hD&f@6-Ug2dd{G{km}xp&+#YMUN)3^Yz+&?EvM$3$+YXu@E)jSR-- zJD!rsVq?7~vNZ8>xrBV|=#^gp;~r8S%eIXk{@CgdeQ1k79SKc4$IM%oe^4|19f&{W zn=0YL>^O*tES3&r=y;2Ka^Z+3StKv(b$1f+vKrAhR~~=-Gs1{KFm{gV3zi+O3bYKs zd&6f)ra*3y0`u*NCbDF=-gbILsR#FSRqLExIpMfJ38TWmzI! zjH8ii7TNKldsEIDn@{__qSQ4d;Y-UVPP{Ja+$7XFK6A^eU50Vr&jEbEgsESOD2`DM z;^|CcFd=+eVwf#87!z5d*V``d&I*ua&6X{DopRr)2X7Nb1x^P5n0C{T-c#V=&wwyG zzR>-M1PU}OvrJ^k#$fW3MY7A9`6#nu@p)SbmclNW<& zyOZ@SqI+%}v3*b0L3n8w*6+J*^5kAGx$pY%ISUsKuN6i=38o2oS{S+iq{hd3Bx_HD z5$M9#OV(tuq5G!RyK5h*N!|PHd;3EVJ>)tE@om<-Mf=u*EQ*bMZ^GQ zax2EpTTlFSHf}vJkR{TNVEs-4X8zcdlRn{lZIH{iiVMoegXy7mh;~Dw%*u+-&N9nL zmJaA6mrkDiWCJ^pIf~_S7cu|XEZX^hx^XFI5k~#qpTzenHDr-_q@Fba|9U+?-MIG2 zn(gq4Qm^i-DEy>UDh>F=z`ZH-7ru}SG-i;g;Bk$~23AcDoR^OM5r#c<4L)A49-#B^ z@dgsE|8Zpzkq07V;Xod4Stx)9>Icai?Ywl%uMy~9nP@GbUj@`=U8`c7#qrCK$fWW!a(;C>jm6=e73+K7WPD3bPnB% zbRNBmbp3OL@_>m=@B7rG6HW(8D+kC*C00-ES=k6+bgs&drphc6SrU|41GHvk2LVrL z@XdG zy+ruSvg42614MOKDlRA=4~>W7PU!2jZJ35UTDd2};8%#%^;D}quz7vgbN5|(YT)LQ zZ8&G)n&Iz^?R&50>S;u{1fU6SneDGvri%`Ox!My62!c%fkrk6CudO@B4ND&e(Zuix z^Wq@UvSfAZ2{H8&;TrD4t(AFG{wPqk1g04qV+NhT&ecyuibsl87~O4F<{y|J1-87*V*X*LDqMBf>?wZ{Mz$5q zTD5Ags_wc5pgGBdppC$j&oYaME~f4qmfpyW`K^lX#!Aj4i+Ff29$-xI-JRQ$n` zO=vu`VJo@^ju$#wRL%)y)@CYne!OzlX-^2V?hw$u>fVoPR{sW|%hh4MN)S47SY|0A z?r?j5KZxEhc$^er;Kez+?A*I!mZ^eeao*v}jJ4bQXs;dFF#w=^`lDt1?S2fnt|g5a{~XLJY04N{`9QETJRFS;G~$xuEHw%ABcB3tV=B2P$WL@`*m; zLrAml8SCuJtonIkHqVJ@D9uVodz@zmkxs}WQk@#f!^Hc;csTg@(XVxG*}Bh?^QOKc z^zMWJxciJ#U%;^8`!n=gzE0~w&@8&AeX>q~u9sEb-q;@3U@DCjgbt*$qd@mGw54NM z=MjrPch&}B#+?uWmD47_syg{F(%c(vl>La*gJAk6>&ibci}V-~VT>}Bz(+ht3}&j* z_P)c0!o5+ggvx2By{b_AU_-AyNF@k{@kp=C(#)E=|7G!3W*WS8!0HtSrwvQfW(uGLjav-5_Qu(~8 z4+6TAuG`(J051>R!Eva;$`i2FOW5M*h?_EGl7Y-nD^q51^JrM%EU3U(q;dYESFJ%@0 z(C-d^W!llD5@q(JUa`DpG`4U20yM5->c7i1<*Z4BCqVqgN^#21ZGF+m6eg9{bc}z0 z@3RCP=n^m&c9blO5a4ui}aol+s@pZPDh3v0<@PXu1N=J!Mh&`Obx=^&0qs(T_1Swa;EFsMq~^cMs! z)}T}>sqTdD!R^; zWyx|+Bs?HDvnN7K!Y%8*gB0ccQC{tlGKs;!i*t4{p!Mv^=esux6jtD@AKg3Vsr`=n zH4|SMB#YUb;E{>JFnA2Jeti1UdoDvz5oQTiPCM~U0=^O?OH)}hwjBw41UoXl^+cs` z$7=wcErSV=MbneZE}F4S=&=IDh4<{at#8}Q0FH497O-Bi%o2lwf2>ch2@Qr=UpHgP zPnH$SW#9K$tU`6ubpXE>EKAgSfhfJ2WKA1o7DGErDia4u80}JgGkPDYQ`5SXSzNU0 zAfn!v2t2l#tm!MWgr*g}nivdt8hF&dUG(Uqol>t2sC0MN2y}*DJ`bWz$}HtVr2XNL z0milshSuCYe^x3lS}QKR`$*be{e$Zk8<#BMS<`Nr6&~%P42D@xeDlS1k4###ro-QB z2P)G}`4u!jotLZ`_c;;PVBeRWvU)t#R(h-_K+G3LCx&T@mcJWZdz7ia{ER%9Uff_; zUcM(n8b^GM&pg<=b^V;PX&v;%~ zMIxAe=TCO+=;LSMdJ~69+$xN=0?Vd;@>c*}HggbUk~QNz zCo*`>5!2(68cb3JYE`&EpiTtEa=FmgyKOBqjY%VGX0j*Z9pF92gtKQX`N<{1XbV70 zRJd@EZ$7f7Y0$5qtdrw0S$K&YLK{UpX{^u)b&#eF=Go;J&3H$7GZ7ajBo3Zg=GZ5bmRIkEV8gLHRz^KWDj#Q#ugaV0HRl2*k3ZrAgdiw9bXWjT{sFQDSgc(3& zQD&v3S5lv!b=Q6S2_q6g<jL0~d!8l}DEcC_( zUF{ew(V9@8S+tYJ3XK4|EXyncjyPk{>h}v&i9j*kY90iI=GxEuR$EF(5*)0tazX2dN(s8F+#ZW@cp;(P>jw zulB!nKLLz?bNt{58y3v}P#*}71k2*ZIq8J;`sktpZ9l>^ z==V2;kJs2NvxJVM(T?b60;gCo`-gY#3e88kWf5eQ6c~CirLj&PQ3o@eN9@OO;iZ!u zQFH&3juwHnzAIQ38(Ad&di}E0L9r%ruOr(s3x)>6pj!1=SOTrOJ~%M7i>V-=3ztO} z2{)KD_e2Od`jqSM9VW~c8@NCrn}ME2sDmWUB98Tj+VsGsTv>tnE3*Lfb^S@8hy_(( zhAfNUVElAZ>lHehiFU?W#D>8%WEsSb9=H7vScEQBcxhn0k;W^@=fq`^MYQutz~ISR zQf37y<~`Ub%p41dd5*}#C5s@V>mWrPOkuqy#tRthHI0*XE-0(#9qTtK$3+yA^_pZ6 zX{-|$-$4l8x73B)sp!fgSs09{Kwekr?ymWl(mYJ*=@|*|=)647Y{Ot|mRZF3q%b-* z{B+*QTYOAI?Z_cms2zE9ZxVQXJY-oE0sfulOtMHEgQ1@bGsS|=zTI|r%i?G4ZZx^x zSV4ge4`whAYh{+^kHao7;63lKVMjuTXh+QjLDo=;83FfKML9@=X@J1ivdEyp5Ysw= zTP)}*=>6S%1qF(-cyW-|3xTe|$A=RT39^WdGK&erZ9nHh;OBy65e68p*UUlCR1hTP zy=7gDFtWi!mRT;wcCv^Dy(x^21vTbFk}5Em&dz$nc{myYbV(n_t@d_|6-LAcW(*#` zkRa%j#jDrQKIl|QDrvOK@?@RB)|>-`alx{fDbP5JgdWT&9?1+Q$ty~! zFwE||cD42&zm{YXVZA=OMoDF?Kw&b@Zcl`yubIXKhTc`;;bJ^QPS)e@iFDSsS-p(} zir2U5F^4!o(DNidwPlQ2l3)HbdF~&u&7lG?_H%yE-jEB&X)L_IcA{b0a5Uipw zO5hk9SQj=7@(m7x0|?uDB7s5BFDo%AMdY|z)r`jpJb-k|ECuQlDC2=fVelZC8%!`A z8yuvlgK5!VJU<)I+{rpyeYY-AZIhc#RN!gIB24C5uSph(;^7~xScg3->*qg+6DI7Z zOKVT0hT3S~3gQCg`L!`gvq-eT7?oKa%IX{ISr`0eTGI6zXOZTEV8FLI8aM+5X1OQA z^e&+{9uV9ohhAq5mBowmHj=Ja;FBba1Q<+Inbk?PcLeET11aokJ!=BZ>9vU8hm^>0g)h!gq2yu%Ie!) zz&zeBpR3>BVR^mgL0>E7nlSQU`uPvyf(^#J%o6xGK!L1XcP{`hNjwH|CJM|Vi`Xz2 zM!hj06 zeZ&#nO$;VbX!&5q-4kJ^;{?iBQ2AW(9cHQy@`xW{90CT6bv8_lH;PC42BVm*J#pCp z0w3*SZxVPIe!cqWI5Z#+HlldAWf4AJBQ%=HB0jocgK4(RB5;SbC)9|Tz{`^=u$ips zLPQ206Ir5o#5b54)$W5un9{R)B!dF%Etws;5RrCd9t0DAvB=E(g)Guf*X*9iyS8o| z4|_29{;QY@l<9=^`sku~csc_O#zdAV9)4LiVat=ksMs*7tGb725cK{W#MxM{qY)7V z2d`FH^tfQUKjK0(WxO_`UG#dRc?cazvk36=Pv_0Ey2r7-t8@QB zS-kQ&W%1Zrpz%s$9f*W?5`bN0m5peZ%wSCRL~5F?y^-(7U!46KnBC8a1Q|@|!IZ`} zaDraNgBiu6NrQnvXBq@q|Ghw!2uRo5Z+Q{r^UC7?If%27MS_Dq0m}cNQ_jmQs?j;H z2}D=6I%~T4wA^5T&dy;Kfg%wQXh!1orkzDRV*_pWr-C~R zdWDI>n61~uc!jZPXOZR%=CQ?ReR_i+eQY?Ur>7Id9}AYni-Wvg2y}o!;BoK?r1SF- zK3?OT%p}@LW6|8g0u&RpCo+E5KkpAqu=sOlZ2)*pk_h9*MMXOsdKLKi=;9en0rVwd zwnVVsE_)pqE{m=8Mg`>Nf_}gqxgMsG24mv=Av{7HQQ8xss{VwZI6kOa?elI~1fl>1 z%5+f&35E{Re6;iPXv$z-fA7n`we}K=2B?}oF%vst`1R_eGY*1E03OaVOM%W8 zM#qMwm(6JuHS<}Owm11%@NZe@W6FRBEAXI?_0He2lN*EOzR$e;yx6EA0 zW7ZsOBsCbJqtPtXrlgTIx<*3!-qrZhHWJKu{Fgciqo8mSpf;oHK9L@-S81;m4& zWN+N-izmP$ z+{wtaam-M0a>?qZQe3Zphyg7+_7R00((lTAX&UPZzJh? z1wIir9daobNL;shC9rHTy4p8OpiBhiOV3nNt68(b$A=RT3@BpO!9?&YIdC!)?~mfqticqnE|$wy-;e=-M{d|Q z9f11<3^~f0w)9Fw-z#4*-TI|l04SA83cxo9cyTMfjvGX05cCz1;(_PLqYh@&L4u*d zB#m~13S{sYdb#&hSccn5=k}_C`iNOj5GL@hR~!rfdIRZ948}wj7x^#W_sX=(g%MWZ zseO++0qB3Lq=Ro3pKUYEnxQtWnLW3USn#;WgXCyf$RbR1bAObw3QNB*>p2ijGFxxL zXqR=_!FYc2){&pE`7L*ktOP|j1<8{3XWIsG2^-mh66P#R*FZ2ovq%DiVT`6xTdx*IS%c-5%zl=2=bixlEJs;0)LLFm z#Cjc#06K1=9f9#${e;}I$F*`#gjHt+vMOu>S1vni0gvn&2gcnk&zcS(tu+%}eE6$R zAC{G403fawmb+2Ovu4uIwhcC#w<7?cV#$#?S`zJ&M;LD>5iVQ$<$2!|s8fOI*WY!t z()v~qK9G9W9KieeFmNqt`gY~>-Bv#x5Ct=CU48*EZgR`#5iWrpaVx43#yYoihy!gH zZ_I_cXq$6Hs`8;ruQ>ZTdD3)X=07hvLUZi~5Pi(onUY@XxBt+$dxvlS&X3POf0IC& zD$HE4zjwawaZb(6*fM&VE%l2U%YAp&RMu{_?Cfc0L=gZ z2oXs{K~&n9R~WpTaS+TTi&(HD=5=+aVD@_)I|nvuLxJf4onwG&tdq{u;iKaS9*#yR z4}d^>jNUeOF@WjF82UHaegxpo;t$FbxYlL4uQEYt!pif64;?vW_n8z zZc)%HI(HfO+ePzEw))bw7(iQUyDVpL{mu7{+MPVd7ijVrI|d2InEH<~N7@k#Y&yh_ z0Ms+bz&VGFl;mlonfgL`)c-KiS1Mng`~L-s?17nz3o2u2_q~YP@Hf)lqi7bo7gWB=ME}^zDk0r6i`TiG!+65>Dzh}x zoMm5~d#6CL6JkK|=JH&yy2FKRQ4mb8%;I$cyW>q<9t)(4x&$Y5h?hT2WC`b?NdIWo zcNSUue8G+k-3ykV2u*kRu8qdBqkcq!OWbMRdg6Gwf_I=Wp^whw`Z0TOUb-kA4OxPC zI2s|caJBaD#p@Owgq;u@X5P5s{S00IZijIY6b?$$4&rD8(53O5i2tQ-rW1N+Pn1Q{ zS0IBF_35W(e&_Z>gjse%1kAj7#St~qkGhangCH9Q!C)S?pA%8O8CsMcQz^6jq+RIa zXJ%fr@UI04c0vHmx~Vcr*Q&oKa7XKdV7MJwdrpL*9d93r;c=q(OJm_zVC)FfkR^(T ztUxAG4E3v-*W57;J0TLfZ(KU3rg=@hWurK@e!Z%%biqd$xh8 z{&;DU^ay0Mvu?SZ^OjkJRnWa>SN`w(RG+oZ6BK*O`=G`v030)bZ1HVB$#^&#fn`>> zEX;U?y1(A@DhLxyCX5yuLqdVXtWluP9rn&kH>L6B@w`B>RPN$EYF81{73M+E#w|St zd|G_#2@#%9032Ua4Nghfr^hfJLWjjNi-{C#-1zkH{hk?;n}*EPef`oYygP3orYq_= zn4N1TDPLW<)}Ctu;bj&xUZw6UdTs&XygK#3Fvko6b8A^7FA*j}7KL9hcU)5W%2`hc zy=?=fQb|2K{?LgvqFVv%4`9cu5(4=6vWTL8pzg0PxESCYLMPnO6c|89j9=bjx(WvSaX1W^S{p;8v6x}o6L(G~- zR=WrQW?s?rAOj~183ne$Ss7F%!V;?K#cFuxZ|?fy?AIZmE?R|SdU`q!+A`vx8g)!m zMCUX3Sig)8M4Ra~K97Dx44Wp<&E>PFUPu5?yyC`_2>7WP)0ConDtyvYpu5X&Fid!h zG!}xerbe~rRdxHi!+Y0lN|IfQ*Of=0(7St~*12z$YR3@K*#JHeC5sP{iz>lHmKIeB z1v;uSXX@|k&QUBE=-~Bl0gbveFA7Y_5mPZ36IloZdY*|N0qD=H`7esFffe3{QX2t4 z*DyvY-UUqW(u4`nJWc^0V1;ANcnBS>(tU<{4d-DZ%fOH4E9abXC>j^A0HFKpJ!gaY zHuK3Gjr=UEbp~V1CwMLFYy`?EOgxnJn(2B05RR*yJ?&S3 zvPkL%19`o!CD;gpHtfjLX)6e7oN)KKXT0U4@O`HE>0jLQ>%%90dOR2(29VOpYhLP9 z6IoijUJ6He=F7`^O=M}&Igx-OqR&>&o3_GBCVs>FsefO6|KSrK8waH6AfC=VDKKXz zmCZRwd_ED3J#_7_R{(&*1(kEB-{dEdry79b*Lprn;2*|f>TG1;AX)Kgan@ub9-huN z&6>^0(%gFcH*HU>oHy-ZfjV#+7tH?hjR#jd=m9itMaZoJcN~LZC!#IZYa&a4DW=2c z7vS3Il?%Gp%S?lZ`=C@Rsb{uN=mw~V8Dny#z?36Qd|8@YuSgrb7MFuG!)Hg+tDEkX z0`t5j7Zx89Mu)SFf>NoZo~=%pSgX<3i111OY=#R9;+zi!8uI8zws7>K0nTOu^&98NgplIw?!9^G}I0zOP000>X1^@s6#OZ}&00009a7bBm000XT z000XT0n*)m`~Uy}wn;=mR7l6Qmd|a2FcgQsSiNv6#~$&i$I=PP2pNG6fJ7%KBOrNz zrW?==yg`x)U<7VHrkCf)Mf?dweG)=Sus^?_{eI88%jLpSIHNNl1>)f64zN+tc1z=T zQxIo#0+c`w^njI#eWXAp|J6~^)~g`S=n|-aMkYATWVx5cBtRY&tzCpTqYtve(E&3s zzpyeY+QTG704b0~MccD7oYASs`UiA{IHN0IzZEb59f4ObvkEr(QzY690Fa44fNLg7 z-WBjYx4|nxH4rz0V|>$%H!q9+D~fIQs{HSHdcx#s2{C5N^rjX$wF~ z<0UFutD>T9fJCZ(ES`Z!v5HIZ*c-C{2`j#tC`JqHCZ45zEPbJdwz8KFcz1}|_TGt= z6iz3ggJ^jVAoFHBG)Ql17O-1EV)G5~9-6HhSV1l)s9P(YbjIUiXAB1Tx;O#VR2v>R zcrX3vwC1)F2e*}2fOg<%Z@^hD8;8|bq7ki=fmzyHTf{GMA=d$PHo^V?0000Jo*M82ap2T*g=+e?fa&SBsg#%z@oz#3IJ;Wu^nW)!63@W^#QE3*)9NV zIK!zOWNFQNQz5N+4g4#Bm8o=$Aj-&{bJp&8>jOZ{Sxj3@#uR{(ru^pG4zgA65M|`9 z06fZ$*x9ZpoAM}K1@jJI*+eQQAvjyH5d9WF*oQ$L=r1J9gp;+jgDhzcL4X9n9dA9@ zLAE}(%Pb?;p?#@-f7(G78$)OS9{{{Idfx$LN|pU_3gj3>Lj4>ZKpRIaK)%t{96N9Z)M3j;!h+!a7k6V6Z8G zslhuNs{2gYh9y?WJI%0%0C-`)p`kQlp*@u(l(laMvIPZDh2MtnZ|WdCwU}H0z;9t2 z2~}!RM((^TgbJU%p#Vfvi*N-o5x&?I;;|t_p8#^g9gAUx+JuZ&g=*SPmxR1|4FFP| zrq1v-$ zQtLxCN+BmimDbc(Y&GzZTh_6)Rb4W}(soQSzA|m=kx9YBS7y>b6+5X17OWMFMUB+H z`cVQSh;^IZpum9$F$M zMV?dpi6uh`0C-`-c?f_x*OEq6sz%jQty=RAz(1FIX;s<+`@-YVzD!EMKHcs_1beH# zs;D&u{w*i#WaMC4jCTkkPXcVQFUD_L4BVkh_r>4~>`M!czt{Fygol3%=b-K;)a8WE zA<+h`e(Gq%o%VjK0)N*7Dh~bjvcvXvi~VVvxa~M@`a17KkK%Eb)r{+4Z(Ph(!QI~9>DAg#(RP=2SCf5 zV3`{*;s8r-;GAIb4e6u@(0gwa804(gFSPvQ! z0~0oYa;&WYq-_H;4yjC>34n+IjgF{dP0HYAv?Y_PT4k2UKtBOU?V!kd3yHybJn+`D z>Nv;0kRS8t1?ZqH0YoNYHHJiH6$1EEqm~7L*t9v&OR3CxtWj2I!r3>1L~k}#+~kJd zW_rP%G6FCYe|iDn+d;AD1X7tekwQHeg>wR|Myfg)5}DURaUD>@%18v~Ln;#|7J$AE z5s(1ovr{ALsn3H{Ce9qdAKXdXK@nr%jRMOr?9_~$`)NLjB)DewyRw7A#TB(OaZ)kP z{G{_wIwi%z!Od}fEu;}b)zaGLMxi|?99=58bz!sH3jZ{vNWGSlxP30K!4Dk(l>zw9 zpIz14Sqc@+G{CO4MItN+k0~h@keHe?>$Sne@Ol~8t3rje?mBCc3 zOAq2IJwp*Krd|IKe0Yc?5OkZ1*ATj7*83kEg>!U1JJ%Bw^VV# z2cUh&jSe9777))PaY%b%_>C)wLt0jlwikpn1QYXQ+-QlRh*1vKl3xsh`gP9Mh)BxLuMCSF(pA%nPq1i3OP|4T*qY@HD+jC)d ziz`x5irqYRcxa|bI}t$U^;PtC=@kI-MQ`?WY|+}m*%DgA{lrc^4jGhU-`lEA$5eMy zU@pcrPj*oF0|&GL;MN()*PVCsu$yywEE6XkiZiF)TJD^j*UfaCvIkeUNqOGay(e_f zsfdM6-h*3v2A8ONA|jsx$on{ap)DY}0JH)yX>B*RxPchE8wNq}!md?C>WMV>=bw{I zY*JyOO3aOflw)*MM1h=hjQusCR zu0Hcj(fY!qy6BqKF;cxGQ*{eW)=#QR1clIVX?P}Qnw^^UBuC7bJ*%$Kin+H@iK{A8 z7HO0P5ztlUD4|v9-$~8yN!#*;trotc83>=CjSYYO3p3+Z2j6#>DxpZgDpPUKfcAp- x%7ED=cXi%%RcDg<8DPKOB=BBe5?ya|{U1_yxH2clIMx6F002ovPDHLkV1nFwu { + const [btnStatus, setButtonStatus] = useState(0); + return ( + + {!!handleSendBtn && ( + setButtonStatus(1)} + onPressOut={() => { + setButtonStatus(0); + handleSendBtn(); + }}> + + {C.STR_SEND} + + + + )} + {!!handleReceiveButton && ( + setButtonStatus(2)} + onPressOut={() => { + setButtonStatus(0); + handleReceiveButton(); + }}> + + + {C.STR_RECEIVE} + + + + + )} + + ); +}; + +const styles = StyleSheet.create({ + btnAreaView: { + flex: 1, + flexDirection: 'row', + borderColor: AppStyle.mainColor, + borderWidth: 1, + borderRadius: 7, + height: 55, + marginLeft: 26, + marginRight: 26, + marginTop: 10, + }, + txnBtnView: { + flex: 1, + flexDirection: 'row', + justifyContent: 'center', + borderRightColor: AppStyle.mainColor, + borderTopColor: 'transparent', + borderLeftColor: 'transparent', + borderBottomColor: 'transparent', + height: '100%', + borderWidth: 1, + borderTopLeftRadius: 10, + borderBottomLeftRadius: 10, + alignItems: 'center', + }, + leftTxnBtnView: { + borderRightColor: 'transparent', + borderTopRightRadius: 10, + borderBottomRightRadius: 10, + borderBottomLeftRadius: 0, + borderTopLeftRadius: 0, + }, +}); +export default SifirAccountActions; diff --git a/src/components/elements/SifirAccountHeader.js b/src/components/elements/SifirAccountHeader.js new file mode 100644 index 0000000..4fc4dac --- /dev/null +++ b/src/components/elements/SifirAccountHeader.js @@ -0,0 +1,123 @@ +import React from 'react'; +import { + View, + Text, + StyleSheet, + ActivityIndicator, + Image, + TouchableOpacity, +} from 'react-native'; +import {Images, AppStyle, C} from '@common/index'; +import SifirBTCAmount from '@elements/SifirBTCAmount'; +import LinearGradient from 'react-native-linear-gradient'; +const BTN_WIDTH = C.SCREEN_WIDTH / 2; + +const SifirAccountHeader = ({ + loading, + loaded, + type, + balance, + btcUnit, + label, + headerText = C.STR_Cur_Balance, + accountIconOnPress, + accountIcon, +}) => { + return ( + + + + + + {loading === true && ( + + )} + {loaded === true && loading === false && ( + <> + + {label} + + {type === C.STR_WATCH_WALLET_TYPE && ( + {C.STR_WATCHING} + )} + + )} + + + + + {loading === true && ( + + )} + {loaded === true && loading === false && ( + <> + + + + + + {headerText} + + )} + + + ); +}; + +const styles = StyleSheet.create({ + headerView: { + flex: 3, + marginTop: 0, + marginLeft: 20, + flexDirection: 'row', + justifyContent: 'space-around', + }, + gradient: { + flex: 4.6, + borderWidth: 1, + borderRadius: 15, + }, + boxImage: { + marginBottom: 10, + marginTop: 15, + marginLeft: 13, + width: 43, + height: 43, + opacity: 0.6, + }, + boxTxt: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 24, + marginLeft: 13, + marginBottom: -10, + marginRight: 4, + }, + balanceView: { + flex: 5, + flexDirection: 'column-reverse', + marginLeft: 25, + paddingBottom: 15, + }, + balAmountTxt: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: BTN_WIDTH / 4, + }, + balanceTxt: { + color: AppStyle.mainColor, + fontFamily: AppStyle.mainFont, + fontSize: 16, + textAlignVertical: 'bottom', + marginBottom: -5, + marginLeft: 5, + }, +}); +export default SifirAccountHeader; diff --git a/src/components/elements/SifirAccountHistory.js b/src/components/elements/SifirAccountHistory.js new file mode 100644 index 0000000..a77017e --- /dev/null +++ b/src/components/elements/SifirAccountHistory.js @@ -0,0 +1,71 @@ +import React from 'react'; +import { + View, + Image, + StyleSheet, + TouchableOpacity, + Text, + ActivityIndicator, +} from 'react-native'; +import {Images, AppStyle, C} from '@common/index'; +import SifirTxnList from '@elements/SifirTxnList'; + +const SifirAccountHistory = ({ + loading, + loaded, + txnData, + btcUnit, + type, + headerText, +}) => { + const BTN_WIDTH = C.SCREEN_WIDTH / 2; + return ( + <> + + {headerText} + + + + {loading && ( + + )} + + + + + + ); +}; + +const styles = StyleSheet.create({ + txnSetView: { + flex: 1, + flexDirection: 'row', + marginLeft: 26, + marginTop: 30, + }, + txnLblTxt: { + color: 'white', + fontSize: 23, + fontWeight: 'bold', + }, + txnListView: { + flex: 3, + height: '100%', + marginBottom: 20, + marginLeft: 25, + }, + settingIcon: {width: 20, height: 20, marginLeft: 20, marginTop: 7}, + spinner: {right: 30, position: 'absolute', alignSelf: 'center'}, +}); + +export default SifirAccountHistory; diff --git a/src/components/elements/SifirBTCAmount.js b/src/components/elements/SifirBTCAmount.js index 4ad812a..5912343 100644 --- a/src/components/elements/SifirBTCAmount.js +++ b/src/components/elements/SifirBTCAmount.js @@ -1,6 +1,5 @@ import {PureComponent} from 'react'; import {C} from '@common/index'; -import {log} from '@io/events'; export default class SifirBTCAmount extends PureComponent { formatAmount = (amount, unit = C.STR_BTC) => { const amountStr = amount; diff --git a/src/components/elements/SifirChannelProgress.js b/src/components/elements/SifirChannelProgress.js new file mode 100755 index 0000000..b9c2ca0 --- /dev/null +++ b/src/components/elements/SifirChannelProgress.js @@ -0,0 +1,69 @@ +import React from 'react'; +import {View, StyleSheet} from 'react-native'; +import {AppStyle} from '@common/index'; + +export const SifirChannelProgress = props => { + const {loaded, routes, isRouteFound, loading} = props; + const primaryColor = + !loading && !isRouteFound ? '#21827D' : AppStyle.mainColor; + const isGoldenColor = isRouteFound && routes?.length ? true : false; + const remaining = 100 - loaded; + const startDotColor = loaded === 0 ? 'rgb(30, 73, 95)' : primaryColor; + const endDotColor = loaded === 100 ? primaryColor : 'rgb(30, 73, 95)'; + + const styles = StyleSheet.create({ + progress_wrapper: { + flexDirection: 'row', + flex: 0.7, + position: 'relative', + alignItems: 'center', + }, + completed: { + width: `${loaded - 2}%`, + borderWidth: 1, + borderStyle: loaded === 100 ? 'solid' : 'dashed', + borderColor: isGoldenColor ? AppStyle.orange : primaryColor, + }, + remaining: { + width: `${remaining}%`, + borderWidth: 1, + borderStyle: 'dashed', + borderColor: 'rgb(30, 73, 95)', + }, + startDot: { + position: 'absolute', + left: 0, + backgroundColor: isGoldenColor ? AppStyle.orange : startDotColor, + width: 20, + height: 20, + borderRadius: 10, + }, + endDot: { + position: 'absolute', + right: 0, + backgroundColor: isGoldenColor ? AppStyle.orange : endDotColor, + width: 20, + height: 20, + borderRadius: 10, + justifyContent: 'center', + alignItems: 'center', + }, + endDotInner: { + width: 15, + height: 15, + borderRadius: 8, + backgroundColor: AppStyle.backgroundColor, + }, + }); + + return ( + + + + + + {loaded !== 100 && loaded !== 0 && } + + + ); +}; diff --git a/src/components/elements/SifirNodesTable.js b/src/components/elements/SifirNodesTable.js new file mode 100755 index 0000000..dc79f64 --- /dev/null +++ b/src/components/elements/SifirNodesTable.js @@ -0,0 +1,125 @@ +import React from 'react'; +import {View, Text, StyleSheet, ScrollView} from 'react-native'; +import {AppStyle, C} from '@common/index'; + +const Columns = ({columns}) => { + return ( + + {columns.map((col, index) => ( + + {col} + + ))} + + ); +}; + +const Row = props => { + const {secondCol, thirdCol, firstCol, bgIndicator} = props; + const backgroundColor = bgIndicator % 2 === 0 ? '#102c3a' : '#1f4c5f'; + return ( + + + + {firstCol} + + + + {secondCol} + + + + {thirdCol} + + + + ); +}; + +const SifirNodesTable = props => { + const {nodes, routes, nodeInputRequired} = props; + const tableData = nodeInputRequired ? nodes : routes; + + const renderRow = (item, rowIndex) => { + if (nodeInputRequired) { + const nodeId = `${item.id.slice(0, 4)} - ${item.id.slice(-4)}`; + const channelStatus = item.channels[0]?.state || 'NA'; + const capacity = item.channels[0]?.spendable_msatoshi || 'NA'; + return ( + + ); + } else { + const {channel, id, msatoshi} = item; + const formattedID = `${id.slice(0, 4)} - ${id.slice(-4)}`; + let hopFee = 0; + if (rowIndex > 0) { + hopFee = msatoshi - routes[rowIndex - 1]?.msatoshi; + } + return ( + + ); + } + }; + + return ( + + + {tableData.map((item, i) => renderRow(item, i))} + + ); +}; +export default SifirNodesTable; + +const styles = StyleSheet.create({ + table: {backgroundColor: 'black'}, + columnWrapper: { + padding: 7, + flexDirection: 'row', + }, + rowWrapper: { + padding: 10, + flexDirection: 'row', + }, + rowBox: { + flex: 1, + alignItems: 'center', + }, + columnBox: { + flex: 1, + borderRightWidth: 1, + borderRightColor: AppStyle.mainColor, + alignItems: 'center', + }, + columnText: {color: 'white', textAlign: 'center', width: '70%'}, + columnTextRow: { + color: AppStyle.mainColor, + textAlign: 'center', + width: '80%', + }, +}); diff --git a/src/components/elements/SifirQrCodeCamera.js b/src/components/elements/SifirQrCodeCamera.js index feb745d..93287bb 100644 --- a/src/components/elements/SifirQrCodeCamera.js +++ b/src/components/elements/SifirQrCodeCamera.js @@ -30,6 +30,7 @@ class SifirQrCodeCamera extends Component { { + return ( + + + + {label} + + + ); +}; -export default class SifirSettingModal extends Component { +class SifirSettingModal extends Component { state = {curMenu: 0, value: 0.6}; + // FIXME + // Replace legacy shit with menuItems[] based rendering` render() { + const { + navigation, + walletInfo, + toolTipStyle, + isLoading, + menuItems, + } = this.props; return ( - <> - - - + + {toolTipStyle && ( + <> + - - - {this.state.curMenu === 1 && ( - - - - - {C.STR_SET_FEES} - - - 0.015 BTC - + + + )} + + {isLoading && ( + + + + )} + {!isLoading && menuItems && menuItems.length && ( + + {menuItems.map((item, index) => ( + { + item.onPress ? item.onPress(item) : this.props.hideModal(); + }} + /> + ))} + + )} + {this.state.curMenu === 1 && ( + + + + + {C.STR_SET_FEES} - - this.setState({value})} - minimumTrackTintColor="#25b6fa" - maximumTrackTintColor="#412160" - thumbStyle={styles.thumb} - trackStyle={{ - height: 10, - borderRadius: 5, - }} - /> - - - {C.STR_Wait} - 4 Hours + + 0.015 BTC - )} - {this.state.curMenu === 0 && ( - - - - - {C.STR_Manage_Fund} - - - - {this.props.feeSettingEnabled && ( - - this.setState({curMenu: 1})}> - - {C.STR_SET_FEES} - - - )} - - - - {C.STR_SETTINGS} - - + + this.setState({value})} + minimumTrackTintColor="#25b6fa" + maximumTrackTintColor="#412160" + thumbStyle={styles.thumb} + trackStyle={{ + height: 10, + borderRadius: 5, + }} + /> - )} - - - - - - + + {C.STR_Wait} + 4 Hours + + + )} + {this.state.curMenu === 0 && ( + + {this.props.showManageFunds && ( + { + this.setState({curMenu: 1}); + }} + /> + )} + {this.props.feeSettingEnabled && ( + { + this.setState({curMenu: 1}); + }} + /> + )} + {this.props.showSettings && ( + { + this.props.hideModal(); + }} + /> + )} + {this.props.showTopUp && ( + { + this.props.hideModal(); + this.props.navigation.navigate('BtcReceiveTxn', { + walletInfo, + }); + }} + /> + )} + {this.props.showWithdraw && ( + { + this.props.hideModal(); + this.props.navigation.navigate('GetAddress', { + walletInfo: {...walletInfo, type: C.STR_LN_WITHDRAW}, + }); + }} + /> + )} + {this.props.showOpenChannel && ( + { + this.props.hideModal(); + navigation.navigate('LNChannelRoute', { + screen: 'LnNodeSelect', + params: {walletInfo, nodeInputRequired: true}, + }); + }} + /> + )} + + )} - + ); } } +export default props => { + const navigation = useNavigation(); + return ; +}; + const styles = StyleSheet.create({ + container: { + marginHorizontal: 20, + }, textStyle: { fontFamily: AppStyle.mainFont, fontSize: 17, @@ -121,10 +219,9 @@ const styles = StyleSheet.create({ backgroundColor: 'white', paddingLeft: 20, paddingRight: 20, - paddingTop: 5, paddingBottom: 10, + paddingTop: 5, height: 160, - width: C.SCREEN_WIDTH * 0.85, }, rowStyle: { flex: 1, @@ -135,8 +232,6 @@ const styles = StyleSheet.create({ }, bottomStyle: { flexDirection: 'row-reverse', - marginBottom: 8, - marginTop: -21, }, feeTxtView: { flex: 1, @@ -147,11 +242,16 @@ const styles = StyleSheet.create({ justifyContent: 'center', marginHorizontal: 14, }, - mainView: { - flexDirection: 'row-reverse', - marginBottom: 8, + closeBtn: { + top: -10, + }, + closeImg: { + height: 25, + width: 25, + resizeMode: 'contain', + borderRadius: 6, + overflow: 'hidden', }, - closeImg: {height: 30, width: 30, marginRight: 10}, timeView: { flex: 1, backgroundColor: 'white', @@ -174,4 +274,12 @@ const styles = StyleSheet.create({ justifyContent: 'space-between', }, thumb: {height: 25, width: 25, borderRadius: 12.5}, + upArrow: { + height: 40, + width: 40, + transform: [{rotate: '180deg'}], + alignSelf: 'flex-end', + position: 'absolute', + right: 15, + }, }); diff --git a/src/components/elements/SifirTxnList.js b/src/components/elements/SifirTxnList.js index 4b8b4ca..45fe0b9 100644 --- a/src/components/elements/SifirTxnList.js +++ b/src/components/elements/SifirTxnList.js @@ -1,4 +1,4 @@ -import React, {Component, PureComponent} from 'react'; +import React from 'react'; import { View, Image, @@ -9,92 +9,156 @@ import { } from 'react-native'; import SifirBTCAmount from '@elements/SifirBTCAmount'; import moment from 'moment'; +import {Images, AppStyle, C} from '@common/index'; +import {useMemo, useState} from 'react'; +const makeInvoiceRenderData = ({ + decodedBolt11, + meta: {description: desc, status}, +}) => { + let amount, imgURL, description, timeStr; + const {millisatoshis, timestamp} = decodedBolt11; + amount = millisatoshis; + description = desc; + switch (status) { + case 'unpaid': + imgURL = Images.icon_yellowTxn; + break; + case 'paid': + imgURL = Images.icon_thickGreenArrowTxn; + break; + } + timeStr = moment(timestamp * 1000).fromNow(); + return {amount, description, imgURL, timeStr}; +}; -import {Images, AppStyle} from '@common/index'; +const makePaysRenderData = ({decodedBolt11, meta: {preimage}}) => { + let amount, imgURL, description, timeStr; + const {millisatoshis, complete, timestamp} = decodedBolt11; + if (complete) { + imgURL = Images.icon_send; + // FIXME strings to constants... + description = `Paid - ${preimage.slice(0, 3)} .. ${preimage.slice(-3)}`; + amount = millisatoshis; + timeStr = moment(timestamp * 1000).fromNow(); + } + return {amount, description, imgURL, timeStr}; +}; -class SifirTxnEntry extends PureComponent { - makeRenderData = ({category, txid, amount, timereceived, unit}) => { - let txIDStr = `${txid.slice(0, 3)} .. ${txid.slice(-3)}`; - let imgURL; - if (category) { - switch (category) { - case 'send': - txIDStr = 'Sent - #' + txIDStr; - imgURL = Images.icon_send; - break; - case 'receive': - txIDStr = 'Received - #' + txIDStr; - imgURL = Images.icon_receive; - break; - default: - txIDStr = 'Unknown - #' + txIDStr; - imgURL = Images.icon_receive; - break; - } - } else { - txIDStr = 'Received - #' + txIDStr; - imgURL = Images.icon_receive; +const makeTxnRenderData = ({category, txid, amount, timereceived}) => { + let imgURL, timeStr, txIDStr; + txIDStr = `${txid.slice(0, 3)} .. ${txid.slice(-3)}`; + if (category) { + switch (category) { + case 'send': + txIDStr = 'Sent - #' + txIDStr; + imgURL = Images.icon_send; + break; + case 'receive': + txIDStr = 'Received - #' + txIDStr; + imgURL = Images.icon_receive; + break; + default: + txIDStr = 'Unknown - #' + txIDStr; + imgURL = Images.icon_receive; + break; } + } else { + txIDStr = 'Received - #' + txIDStr; + imgURL = Images.icon_receive; + } + timeStr = moment(timereceived * 1000).fromNow(); + return {imgURL, txIDStr, amount, timeStr}; +}; - const timeStr = moment(timereceived * 1000).fromNow(); - return {imgURL, txIDStr, amount, timeStr}; - }; - - render() { - const {txn, unit} = this.props; - const {imgURL, txIDStr, amount, timeStr} = this.makeRenderData(txn); +// FIXME this file is starting to get conjected , move these to elements +const SifirTxnEntry = ({txn, unit}) => { + const {imgURL, txIDStr, amount, timeStr} = makeTxnRenderData(txn); + return ( + + ); +}; - return ( - - - - - {timeStr} - - {txIDStr} - - - - - +const ListItem = ({title, description, imgURL, amount, unit}) => { + return ( + + + + + {title} + {description} - + + + + + + ); +}; +const SifirInvEntry = React.memo(({inv, unit}) => { + const {type} = inv; + try { + const {amount, imgURL, timeStr, description} = + type === 'invoice' ? makeInvoiceRenderData(inv) : makePaysRenderData(inv); + return ( + ); + } catch (err) { + return null; } -} - -export default class SifirTxnList extends Component { - state = { - txnData: {}, - }; +}); - sortTxnData = txnData => { - return txnData.sort((a, b) => { - return moment(b.timereceived * 1000).diff(moment(a.timereceived * 1000)); - }); - }; +/** + * Takes equal slices of invoices and payments decodes them and sorts them + */ +const processLnTxnList = (txnData, start = 0, length = 20) => + [...(txnData?.invoices || []), ...(txnData?.pays || [])] + .filter(txn => txn && txn?.decodedBolt11?.timestamp > 1) + .sort((a, b) => b.decodedBolt11.timestamp - a.decodedBolt11.timestamp) + .slice(start, length); - componentDidMount() { - this.setState({txnData: this.sortTxnData(this.props.txnData)}); +const SifirTxnList = ({width, height, unit, txnData, type}) => { + const [txnDataCached, setTxnDataCached] = useState([]); + // FIXME proper array compare + if (txnData.length !== txnDataCached.length) { + setTxnDataCached(txnData); } + const txnListToRender = React.useMemo(() => { + if (type === C.STR_LN_WALLET_TYPE) { + return processLnTxnList(txnData, 0, 20); + } else { + return txnData; + } + }, [txnDataCached]); + return ( + item?.bolt11 + item?.txid + index} + renderItem={({item}) => { + if (type === C.STR_LN_WALLET_TYPE) { + return ; + } else { + return ; + } + }} + /> + ); +}; - render() { - const {width, height, unit} = this.props; - return ( - item.category + item.txid} - renderItem={({item}) => } - /> - ); - } -} +export default SifirTxnList; const styles = StyleSheet.create({ listItme: { @@ -106,4 +170,14 @@ const styles = StyleSheet.create({ borderBottomWidth: 2, alignItems: 'center', }, + txIDstr: { + color: AppStyle.mainColor, + fontWeight: 'bold', + }, + amount: { + flex: 2, + color: AppStyle.mainColor, + }, + arrowIcon: {width: 30, height: 30}, + timeStrContainer: {flex: 5, marginLeft: 20}, }); diff --git a/src/components/elements/deprecated/StyledText.js b/src/components/elements/deprecated/StyledText.js new file mode 100755 index 0000000..a6d6e95 --- /dev/null +++ b/src/components/elements/deprecated/StyledText.js @@ -0,0 +1,6 @@ +import React from 'react'; +import {Text} from 'react-native'; + +export function MonoText(props) { + return ; +} diff --git a/src/components/elements/deprecated/SwipeUp.js b/src/components/elements/deprecated/SwipeUp.js new file mode 100644 index 0000000..b3738ba --- /dev/null +++ b/src/components/elements/deprecated/SwipeUp.js @@ -0,0 +1,61 @@ +import React from "react"; +import SwipeUpDown from "react-native-swipe-up-down/src"; +import { View, Text, StyleSheet } from "react-native"; +import { AppStyle } from "@common/index"; + +const SwipeUp = props => { + const { onShowFull, onShowMini } = props; + return ( + + + + OPEN CHANNEL + + + } + itemFull={} + onShowFull={onShowFull} + onShowMini={onShowMini} + disablePressToShow={false} + style={styles.swipe_styles} + animation="easeInEaseOut" + /> + ); +}; + +const styles = StyleSheet.create({ + relative: { + position: "relative" + }, + item_full: { backgroundColor: "#ffa500", flex: 1 }, + swipe_styles: { backgroundColor: "#ffa500", borderRadius: 0 }, + up_triangle: { + position: "absolute", + top: -40, + left: "45%", + borderLeftWidth: 15, + borderStyle: "solid", + borderLeftColor: "transparent", + borderBottomColor: "#ffa500" + }, + text_center: { + textAlign: "center" + }, + text_large: { + fontSize: 20 + }, + textBrightLight: { + color: "rgb(30, 73, 95)", + fontFamily: AppStyle.mainFont + } +}); + +export { SwipeUp }; \ No newline at end of file diff --git a/src/components/elements/deprecated/TabBarIcon.js b/src/components/elements/deprecated/TabBarIcon.js new file mode 100755 index 0000000..46508c7 --- /dev/null +++ b/src/components/elements/deprecated/TabBarIcon.js @@ -0,0 +1,15 @@ +import React from 'react'; +import {Ionicons} from '@expo/vector-icons'; + +import Colors from '../constants/Colors'; + +export default function TabBarIcon(props) { + return ( + + ); +} diff --git a/src/components/screens/auth/ScanToPairScreen.js b/src/components/screens/auth/ScanToPairScreen.js index 1a7658e..97fdc6b 100644 --- a/src/components/screens/auth/ScanToPairScreen.js +++ b/src/components/screens/auth/ScanToPairScreen.js @@ -11,11 +11,8 @@ import { } from 'react-native'; import {validatedTokenHash} from '@helpers/validations'; import SifirQrCodeCamera from '@elements/SifirQrCodeCamera'; - import {Images, AppStyle, C} from '@common/index'; - -// import {pairPhoneWithToken} from '@actions/auth'; - +// import {ErrorScreen} from '@screens/error'; class ScanToPairScreen extends Component { constructor(props, context) { super(props, context); @@ -24,6 +21,7 @@ class ScanToPairScreen extends Component { state = { showModal: false, qrError: null, + pairingError: null, }; processQRCode = async qrdata => { this.setState({showModal: false}); @@ -38,14 +36,38 @@ class ScanToPairScreen extends Component { }; continue = () => { - throw 'shold not get here'; + throw 'INVALID_SCANTOPAIR_FLOW'; }; - + // TODO refactor this component to use error component rather than mess below + // Note: UnlockGen component handles errors from pairing, this component should only handle token parsing errors etc.. + //static getDerivedStateFromProps(props, state) { + // if (props.error && !state.pairingError) { + // return {...state, pairingError: props.error}; + // } else { + // return null; + // } + //} render() { const { - auth: {pairing, token, key, error}, + auth: {pairing, token, key}, } = this.props; const {qrError} = this.state; + // TODO refactor this component to use error component rather than mess below + //if (qrError) { + // return ( + // this.setState({pairingError: null}), + // }, + // ]} + // /> + // ); + //} return ( {pairing && ( @@ -60,24 +82,20 @@ class ScanToPairScreen extends Component { source={ token ? Images.icon_done - : error || qrError + : qrError ? Images.icon_failure : Images.icon_header } style={styles.checkImg} /> - {token - ? C.STR_SUCCESS - : error || qrError - ? C.STR_FAILED - : C.STR_WELCOME} + {token ? C.STR_SUCCESS : qrError ? C.STR_FAILED : C.STR_WELCOME} {token ? C.STR_AUTH_SUCCESS - : error || qrError - ? error || qrError + : qrError + ? qrError : C.STR_WELCOME_DESC} @@ -98,7 +116,7 @@ class ScanToPairScreen extends Component { {token ? C.STR_CONTINUE - : error || qrError + : qrError ? C.STR_TRY_AGAIN : C.STR_PAIR_NOW} @@ -173,7 +191,6 @@ const mapStateToProps = state => { }; const mapDispatchToProps = {}; -// const mapDispatchToProps = {pairPhoneWithToken}; export default connect( mapStateToProps, diff --git a/src/components/screens/auth/UnlockORGenKeys.js b/src/components/screens/auth/UnlockORGenKeys.js index a752ca0..e026ea6 100644 --- a/src/components/screens/auth/UnlockORGenKeys.js +++ b/src/components/screens/auth/UnlockORGenKeys.js @@ -20,7 +20,9 @@ import { loadDevicePgpKeys, storeEncryptedAuthInfo, deleteDevicePgpKeys, + restartPairingState, } from '@actions/auth'; +import {ErrorScreen} from '@screens/error'; import {decryptMessage} from '@io/pgp'; import uuid from 'uuid/v4'; class UnlockORGenKeys extends Component { @@ -95,7 +97,6 @@ class UnlockORGenKeys extends Component { return; } else { //not paired on auth info , send back to Landing - //FIXME handle errorin root error('unlockOrGenkeys.invalid.state'); log('invalid state', this.props.auth); } @@ -117,9 +118,7 @@ class UnlockORGenKeys extends Component { // more serious error, notify and try again error('unlockOrGenkeys.pairingError', err); this.setState({ - retryablePairingError: - 'An unexpected error happened while trying to pair:' + - err.toString(), + retryablePairingError: err, }); break; } @@ -140,7 +139,31 @@ class UnlockORGenKeys extends Component { error: pairingError, } = this.props.auth; const {pubkeyArmored} = devicePgpKey; - + if (retryablePairingError || pairingError) { + return ( + { + this.props.restartPairingState(); + this.setState({retryablePairingError: null}); + }, + }, + { + text: 'Restart Pairing', + onPress: () => { + this.props.restartPairingState(); + this.props.navigation.navigate('ScanToPairScreen'); + }, + }, + ]} + /> + ); + } let view; if (pairing || paired) { view = ( @@ -161,28 +184,6 @@ class UnlockORGenKeys extends Component { ); return view; } - if (retryablePairingError) { - view = ( - - - {C.STR_FAILED} - {retryablePairingError} - {pairingError} - this.setState({retryablePairingError: null})} - style={styles.doneTouch}> - - {C.STR_TRY_AGAIN} - - - - - ); - return view; - } const [welcomeText, ctaText, mainText] = [ encAuthInfo ? C.STR_WELCOME_BACK @@ -256,7 +257,7 @@ const styles = StyleSheet.create({ marginBottom: 10, marginTop: 20, width: C.SCREEN_WIDTH * 0.8, - marginLeft: C.SCREEN_WIDTH * 0.1, + // marginLeft: C.SCREEN_WIDTH * 0.1, height: 70, borderRadius: 10, borderColor: AppStyle.mainColor, @@ -315,6 +316,7 @@ const mapDispatchToProps = { storeEncryptedAuthInfo, loadDevicePgpKeys, deleteDevicePgpKeys, + restartPairingState, }; export default connect( diff --git a/src/components/screens/error/errorScreen.js b/src/components/screens/error/errorScreen.js new file mode 100644 index 0000000..9c1dc34 --- /dev/null +++ b/src/components/screens/error/errorScreen.js @@ -0,0 +1,159 @@ +import React, {Component} from 'react'; +import { + View, + ScrollView, + Image, + StyleSheet, + TouchableOpacity, + Text, +} from 'react-native'; + +import {Images, AppStyle, C} from '@common/index'; +import {error, log} from '@io/events'; +export default class ErrorScreen extends Component { + constructor(props, context) { + super(props, context); + } + + state = {}; + componentDidUpdate(prevProps) { + if (prevProps.error !== this.props.error) error(error); + } + render() { + const {title, desc, error: passedError, actions} = this.props; + let printableErrorDetails = null; + if (passedError) { + if (passedError instanceof String) { + printableErrorDetails = passedError; + } else { + try { + // TODO refactor this to helpers + const cypernodeError = passedError?.err?.err || passedError?.err; + if (cypernodeError) { + try { + printableErrorDetails = JSON.stringify(cypernodeError); + } catch {} + } + // Where we able to parse the error yet ? + if (!printableErrorDetails) { + // try generic objec to string conversion + if (passedError?.toString()) { + printableErrorDetails = passedError.toString(); + } else { + printableErrorDetails = JSON.stringify( + passedError, + Object.getOwnPropertyNames(passedError), + ); + } + } + } catch (err) { + error('errorScreen: could not parse error type', err); + } + } + } + log('ErrorScreen Data', { + title, + desc, + passedError, + actions, + printableErrorDetails, + }); + + return ( + + + + {title} + {desc} + + {printableErrorDetails} + + + + {actions && actions.length > 0 + ? actions.map((action, index) => ( + + action?.onPress && action.onPress()}> + + {action.text} + + + + )) + : null} + + + ); + } +} + +const styles = StyleSheet.create({ + mainView: { + flex: 1, + height: '100%', + backgroundColor: AppStyle.backgroundColor, + width: '100%', + }, + gridView: { + flex: 1, + width: '100%', + display: 'flex', + flexDirection: 'row', + flexWrap: 'wrap', + marginTop: -25, + padding: 30, + justifyContent: 'space-between', + alignItems: 'center', + }, + doneView: { + flexDirection: 'row', + height: 9.5 * C.vh, + backgroundColor: '#53cbc8', + alignItems: 'center', + borderRadius: 10, + justifyContent: 'center', + }, + mainContent: {alignItems: 'center', flex: 3, marginTop: 2 * C.vh}, + _headLine: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 10 * C.vh, + marginTop: 10, + textAlign: 'center', + }, + descriptionTxt: { + color: AppStyle.mainColor, + fontSize: 16, + marginTop: 20, + fontFamily: AppStyle.mainFontBold, + }, + technicalTxt: { + color: AppStyle.mainColor, + fontSize: 11, + marginTop: 10, + fontFamily: AppStyle.mainFontBold, + }, + doneTouch: { + alignItems: 'center', + flex: 1, + justifyContent: 'center', + }, + doneTxt: { + color: AppStyle.backgroundColor, + fontWeight: 'bold', + fontSize: 26, + marginRight: 15, + }, + checkImg: {width: 8 * C.vh, height: 8 * C.vh, marginTop: 2 * C.vh}, + progressView: { + flex: 1, + flexDirection: 'row', + justifyContent: 'space-around', + }, +}); diff --git a/src/components/screens/error/index.js b/src/components/screens/error/index.js new file mode 100644 index 0000000..a4f4426 --- /dev/null +++ b/src/components/screens/error/index.js @@ -0,0 +1 @@ +export ErrorScreen from './errorScreen'; diff --git a/src/components/screens/ln/SifirLNChannelConfirmedScreen.js b/src/components/screens/ln/SifirLNChannelConfirmedScreen.js new file mode 100644 index 0000000..bbac171 --- /dev/null +++ b/src/components/screens/ln/SifirLNChannelConfirmedScreen.js @@ -0,0 +1,145 @@ +import React, {Component} from 'react'; +import { + View, + Image, + StyleSheet, + TouchableOpacity, + Text, + ScrollView, +} from 'react-native'; +import {connect} from 'react-redux'; +import {Images, AppStyle, C} from '@common/index'; +class SifirLNChannelConfirmedScreen extends Component { + render() { + const {fundingResponse, walletInfo} = this.props.route.params; + return ( + + + + + {C.STR_OPEN_CHANNEL} + {!fundingResponse.result && ( + {C.STR_REQUEST_SENT} + )} + {fundingResponse.message} + {fundingResponse.result && ( + <> + {C.STR_TxID} + {fundingResponse.txid} + {C.STR_ChannelID} + + {fundingResponse.channel_id} + + + )} + + + this.props.navigation.navigate('LnNodeSelect', {walletInfo}) + }> + + {C.STR_DONE} + + + + + ); + } +} + +const mapStateToProps = state => { + return { + lnWallet: state.lnWallet, + }; +}; + +const mapDispatchToProps = {}; + +export default connect( + mapStateToProps, + mapDispatchToProps, +)(SifirLNChannelConfirmedScreen); + +const styles = StyleSheet.create({ + sv: { + flex: 1, + }, + container: { + alignItems: 'center', + flex: 3, + }, + mainView: { + flex: 1, + height: '100%', + backgroundColor: AppStyle.backgroundColor, + width: '100%', + paddingVertical: 15, + }, + doneView: { + width: C.SCREEN_WIDTH * 0.5, + flexDirection: 'row', + height: 9.5 * C.vh, + backgroundColor: '#53cbc8', + alignItems: 'center', + borderRadius: 10, + justifyContent: 'center', + marginTop: 10, + }, + paymentTxt: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 10 * C.vh, + marginTop: 10, + textAlign: 'center', + }, + addressLblTxt: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 10 * C.vh, + marginTop: -30, + }, + payAddrTxt: { + color: AppStyle.mainColor, + marginTop: 20, + fontFamily: AppStyle.mainFontBold, + textAlign: 'center', + }, + addrTxt: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 28, + marginTop: 5, + marginHorizontal: 50, + textAlign: 'center', + }, + amountLblTxt: { + color: AppStyle.mainColor, + fontSize: 16, + marginTop: 25, + fontFamily: AppStyle.mainFontBold, + }, + amountTxt: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 28, + marginTop: 5, + }, + doneTouch: { + alignItems: 'center', + flex: 1, + justifyContent: 'center', + }, + doneTxt: { + color: AppStyle.backgroundColor, + fontWeight: 'bold', + fontSize: 26, + marginRight: 15, + }, + checkImg: {width: 8 * C.vh, height: 8 * C.vh, marginTop: 2 * C.vh}, + loading: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + }, +}); diff --git a/src/components/screens/ln/SifirLNChannelFundingScreen.js b/src/components/screens/ln/SifirLNChannelFundingScreen.js new file mode 100644 index 0000000..57dceee --- /dev/null +++ b/src/components/screens/ln/SifirLNChannelFundingScreen.js @@ -0,0 +1,321 @@ +import React, {useState, useEffect} from 'react'; +import { + Image, + StyleSheet, + Text, + TouchableOpacity, + View, + ScrollView, + ActivityIndicator, + TextInput, + Alert, +} from 'react-native'; +import {Images, AppStyle, C} from '@common/index'; +import {Slider} from 'react-native-elements'; +import {openAndFundPeerChannel} from '@actions/lnWallet'; +import {connect} from 'react-redux'; +import {ErrorScreen} from '@screens/error'; +const SifirLNChannelFundingScreen = ({ + navigation, + route, + openAndFundPeerChannel, + lnWallet, +}) => { + const [enableSetFees, setEnableSetFees] = useState(false); + const [fundingAmount, setFundingAmount] = useState(0); + const {nodeAddress, walletInfo} = route.params; + const {id, alias} = walletInfo; + const {loading, loaded, error} = lnWallet; + const handleOpenChannelBtn = async () => { + // TODO fix this validation + if (!isNaN(fundingAmount) && fundingAmount > 0) { + const fundingResponse = await openAndFundPeerChannel({ + peer: nodeAddress, + msatoshi: fundingAmount, + }); + if (fundingResponse && fundingResponse.result === 'success') { + navigation.navigate('LnChannelConfirmed', { + fundingResponse, + walletInfo, + }); + } + } else { + Alert.alert(C.STR_ERROR, C.STR_ERROR_enter_valid_amount); + } + }; + + if (error) { + return ( + navigation.navigate('Account', {walletInfo}), + }, + ]} + /> + ); + } + return ( + + + + + + { + navigation.navigate('LnNodeSelect'); + }}> + + {C.STR_Open_Channel} + + + + + + + {C.STR_FUNDING_AMOUNT} + + + setFundingAmount(amount)} + /> + {C.STR_SAT} + + + + + {alias && ( + <> + Alias + + {alias} + + + )} + {id && ( + <> + + {C.STR_From_Node} + + {id} + + )} + + {C.STR_To_Node} + + + {nodeAddress} + + + + {C.STR_Channel_visibility} + + + {C.STR_Public} + + + {enableSetFees && ( + + {C.STR_Fees} + + )} + + {enableSetFees && ( + + + 0.015 {C.STR_BTC} + + + )} + + {enableSetFees && ( + {}} + style={enableSetFees ? styles.width_60 : styles.width_100} + thumbTintColor="white" + maximumTrackTintColor="rgba(45, 171, 226,0.2)" + minimumTrackTintColor="rgb(45, 171, 226)" + /> + )} + {enableSetFees && ( + + + {C.STR_Approximate_wait} + + + 4 {C.STR_hours} + + + )} + + + + {loading && !loaded && } + handleOpenChannelBtn()}> + + {C.STR_OPEN_CHANNEL} + + + + + + ); +}; + +SifirLNChannelFundingScreen.navigationOptions = { + header: null, +}; + +const mapStateToProps = state => { + return { + lnWallet: state.lnWallet, + }; +}; + +const mapDispatchToProps = { + openAndFundPeerChannel, +}; + +export default connect( + mapStateToProps, + mapDispatchToProps, +)(SifirLNChannelFundingScreen); + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: AppStyle.backgroundColor, + }, + text_26: {fontSize: 26}, + row: { + flexDirection: 'row', + }, + yellow_button: { + backgroundColor: '#ffa500', + padding: 25, + borderRadius: 10, + marginTop: 50, + }, + yellow_button_disabled: { + backgroundColor: '#ffa500', + padding: 25, + borderRadius: 10, + marginTop: 50, + opacity: 0.5, + }, + space_between: { + flexDirection: 'row', + justifyContent: 'space-between', + }, + width_60: { + width: '60%', + }, + width_100: { + width: '100%', + }, + text_bold: { + fontWeight: 'bold', + }, + text_normal: { + fontSize: 13, + }, + text_center: { + textAlign: 'center', + }, + text_large: { + fontSize: 20, + }, + textRow: { + flexDirection: 'row', + alignItems: 'center', + }, + text_white: { + color: 'white', + fontFamily: AppStyle.mainFont, + }, + textBright: { + color: AppStyle.mainColor, + fontFamily: AppStyle.mainFont, + }, + mt7: { + marginTop: 7, + }, + slider_wrapper: {width: '100%', marginLeft: 20}, + back: { + marginRight: 8, + width: 12, + height: 12, + }, + margin_30: { + margin: 30, + }, + margin_15: { + margin: 15, + }, + margin_top_30: {marginTop: 30}, + margin_top_15: {marginTop: 15}, + funding_wrapper: { + alignItems: 'center', + marginTop: 50, + }, + text_x_large: { + fontSize: 60, + }, + outline_button: { + padding: 10, + borderRadius: 5, + borderWidth: 1, + borderColor: AppStyle.mainColor, + justifyContent: 'center', + }, + fundInputField: { + marginTop: 10, + borderRadius: 4, + color: 'white', + borderBottomWidth: 1, + borderBottomColor: AppStyle.mainColor, + fontSize: 60, + paddingHorizontal: 10, + fontFamily: AppStyle.mainFont, + paddingBottom: 0, + }, + fundingAmountInputContainer: { + flexDirection: 'row', + alignItems: 'baseline', + justifyContent: 'center', + }, + + fundingAmountUnit: { + color: 'white', + fontSize: 30, + fontFamily: AppStyle.mainFont, + paddingBottom: 10, + }, +}); diff --git a/src/components/screens/ln/SifirLNInvoiceConfirmScreen.js b/src/components/screens/ln/SifirLNInvoiceConfirmScreen.js new file mode 100644 index 0000000..ad40128 --- /dev/null +++ b/src/components/screens/ln/SifirLNInvoiceConfirmScreen.js @@ -0,0 +1,421 @@ +import React, {useState, useEffect, useRef} from 'react'; +import { + StyleSheet, + Text, + TouchableOpacity, + View, + Image, + ScrollView, +} from 'react-native'; +import {AppStyle, Images, C} from '@common/index'; +import {SifirChannelProgress} from '@elements/SifirChannelProgress'; +import SlidingPanel from 'react-native-sliding-up-down-panels'; +import {getRoute, getPeers, payBolt} from '@actions/lnWallet'; +import {ErrorScreen} from '@screens/error'; +import {connect} from 'react-redux'; +import moment from 'moment'; +import SifirBTCAmount from '@elements/SifirBTCAmount'; +import {ActivityIndicator} from 'react-native'; + +const SifirLNInvoiceConfirmScreen = props => { + const [routes, setRoutes] = useState([]); + const [peers, setPeers] = useState([]); + const [routeFound, setRouteFound] = useState({}); + const [progress, setProgress] = useState(10); + const [routeLabel, setRouteLabel] = useState(null); + const [routeFees, setRouteFees] = useState(0); + const childRef = useRef(); + const {loading, loaded, error: LnError, isPayingBolt} = props.lnWallet; + const {walletInfo, bolt11} = props.route.params; + useEffect(() => { + (async () => { + const {invoice} = props.route.params; + const [routes, peers] = await Promise.all([ + props.getRoute(invoice.payee, invoice.msatoshi), + props.getPeers(), + ]); + setRoutes(routes); + setPeers(peers); + if (peers?.length && routes?.length) { + const foundRoute = peers.find(peer => peer.id === routes[0]?.id); + setRouteFound(foundRoute); + setRouteLabel( + `${routes.length} ${C.STR_Hops_to_route}, ${C.STR_Fees}: `, + ); + // Generate total fees paid along route by subtracting msatoshi at index=0 from msatoshi of last entry in routes. + setRouteFees(routes[0].msatoshi - routes[routes.length - 1].msatoshi); + } + })(); + }, [props.route.params.invoice]); + + const handleSendButton = async () => { + const txnInfo = await props.payBolt(bolt11); + if (txnInfo.status === 'complete') { + props.navigation.navigate('LnInvoicePaymentConfirmed', { + walletInfo, + isSendTxn: true, + txnInfo: { + amount: txnInfo.msatoshi, + address: txnInfo.payment_preimage, + unit: C.STR_MSAT, + }, + }); + } + }; + + const handleOpenChannelDrag = () => { + childRef.current?.onRequestClose(); + props.navigation.navigate('LNChannelRoute', { + screen: 'LnNodeSelect', + params: { + walletInfo, + nodeInputRequired: isRouteFound ? false : true, + routes, + }, + }); + }; + + useEffect(() => { + // TODO replace it with Animated API. + let progressBar; + if (loading) { + progressBar = setTimeout(() => { + setProgress((progress % 100) + 2); + }, 100); + } else { + clearTimeout(progressBar); + } + }, [loading, progress]); + + // TODO move to util + const formatExpiryDate = expiry => + moment(Date.now() + expiry * 1000) + .fromNow() + .substr(3); + + if (LnError) { + return ( + props.navigation.navigate('Account', {walletInfo}), + }, + ]} + /> + ); + } + + const isRouteFound = routeFound?.id ? true : false; + const {amount_msat, description, expiry} = props.route.params.invoice; + return ( + + + + + + {C.STR_INVOICE_AMOUNT} + + + + {amount_msat} + + + + {description} + + + {`${C.STR_EXPIRES_IN} `} + + {formatExpiryDate(expiry)} {C.STR_from_now} + + + + + + + + + {isPayingBolt && } + + handleSendButton()}> + + {C.STR_SEND} + + + + + + + + {loaded && !isPayingBolt && peers?.length > 0 && ( + + handleOpenChannelDrag()} + onDragStop={() => handleOpenChannelDrag()} + headerLayout={() => ( + + + + {!isRouteFound ? C.STR_OPEN_CHANNEL : routeLabel} + {isRouteFound && ( + + )} + + + )} + slidingPanelLayout={() => ( + + )} + /> + + )} + + ); +}; + +const mapStateToProps = state => { + return { + lnWallet: state.lnWallet, + }; +}; + +const mapDispatchToProps = { + getRoute, + getPeers, + payBolt, +}; + +export default connect( + mapStateToProps, + mapDispatchToProps, +)(SifirLNInvoiceConfirmScreen); + +SifirLNInvoiceConfirmScreen.navigationOptions = { + header: null, +}; + +const styles = StyleSheet.create({ + flex1: { + flex: 1, + }, + container: { + flex: 1, + backgroundColor: AppStyle.backgroundColor, + }, + justify_center: {flexDirection: 'row', justifyContent: 'center'}, + justify_end: { + flex: 1, + justifyContent: 'flex-end', + }, + send_icon: {width: 15, height: 15, marginLeft: 10}, + inactiveTriangle: { + position: 'absolute', + top: -10, + left: '45%', + borderLeftWidth: 15, + borderLeftColor: 'transparent', + borderRightWidth: 15, + borderRightColor: 'transparent', + borderBottomWidth: 15, + borderStyle: 'solid', + borderBottomColor: '#ffa500', + }, + activeTriangle: { + position: 'absolute', + top: -4, + left: '45%', + height: 20, + width: 20, + borderLeftWidth: 4, + borderLeftColor: 'orange', + borderTopWidth: 4, + borderTopColor: 'orange', + borderStyle: 'solid', + transform: [{rotate: '45deg'}], + }, + send_button: { + backgroundColor: AppStyle.mainColor, + padding: 30, + borderRadius: 10, + marginTop: 40, + width: '85%', + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + }, + send_button_disabled: { + backgroundColor: 'transparent', + padding: 30, + borderRadius: 10, + marginTop: 52, + width: '85%', + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + borderWidth: 2, + borderColor: '#21827D', + }, + space_between: { + flexDirection: 'row', + justifyContent: 'space-between', + }, + orange: { + width: C.SCREEN_WIDTH, + height: 80, + backgroundColor: 'orange', + justifyContent: 'center', + alignItems: 'center', + }, + transparent: { + width: C.SCREEN_WIDTH, + height: 80, + backgroundColor: 'transparent', + justifyContent: 'center', + alignItems: 'center', + }, + orangeColor: { + color: 'orange', + }, + slidingPanelLayoutStyle: { + width: C.SCREEN_WIDTH, + height: C.SCREEN_HEIGHT - 10, + backgroundColor: 'orange', + justifyContent: 'center', + alignItems: 'center', + }, + commonTextStyle: { + color: 'white', + fontSize: 18, + }, + width_60: { + width: '60%', + }, + text_bold: { + fontWeight: 'bold', + }, + text_normal: { + fontSize: 13, + }, + text_center: { + textAlign: 'center', + }, + text_primary: { + color: AppStyle.backgroundColor, + }, + sendLabel: { + fontSize: 20, + textAlign: 'center', + fontWeight: 'bold', + fontFamily: AppStyle.mainFont, + }, + text_small: { + fontSize: 8, + }, + text_large: { + fontSize: 20, + }, + text_29: { + fontSize: 29, + }, + text_18: { + fontSize: 18, + }, + textRow: { + flexDirection: 'row', + alignItems: 'center', + }, + text_white: { + color: 'white', + fontFamily: AppStyle.mainFont, + }, + darkColor: { + color: AppStyle.backgroundColor, + fontFamily: AppStyle.mainFont, + }, + align_center: {alignItems: 'center'}, + arrow_up: {transform: [{rotateX: '120deg'}]}, + textBright: { + color: AppStyle.mainColor, + fontFamily: AppStyle.mainFont, + }, + back: { + marginRight: 8, + width: 12, + height: 12, + }, + margin_30: { + margin: 30, + }, + margin_15: { + margin: 15, + }, + margin_top_30: {marginTop: 30}, + margin_top_50: {marginTop: 50}, + margin_top_15: {marginTop: 15}, + funding_wrapper: { + alignItems: 'center', + marginTop: 50, + }, + text_x_large: { + fontSize: 40, + }, + outline_button: { + padding: 10, + borderRadius: 5, + borderWidth: 1, + borderColor: AppStyle.mainColor, + }, + sv: { + marginBottom: 60, + }, + contentContainer: { + paddingBottom: 30, + }, +}); diff --git a/src/components/screens/ln/SifirLNNodeSelectScreen.js b/src/components/screens/ln/SifirLNNodeSelectScreen.js new file mode 100644 index 0000000..d8f1687 --- /dev/null +++ b/src/components/screens/ln/SifirLNNodeSelectScreen.js @@ -0,0 +1,224 @@ +import React, {useState, useCallback} from 'react'; +import { + StyleSheet, + Text, + TouchableOpacity, + View, + Image, + TextInput, + Modal, + ActivityIndicator, +} from 'react-native'; +import {useFocusEffect} from '@react-navigation/native'; +import {AppStyle, Images, C} from '@common/index'; +import SifirNodesTable from '@elements/SifirNodesTable'; +import {getPeers} from '@actions/lnWallet'; +import {connect} from 'react-redux'; +import SifirQrCodeCamera from '@elements/SifirQrCodeCamera'; +import {isValidLnNodeId} from '@helpers/validations'; +import {error} from '@io/events'; + +function SifirLNNodeSelectScreen(props) { + const [isModalVisible, setModalVisible] = useState(false); + const {nodeInputRequired, routes} = props.route.params; + const [QRdataORuserInput, setQRorUserInput] = useState(''); + const {loading, loaded} = props.lnWallet; + + useFocusEffect( + useCallback(() => { + const [{id}] = props.lnWallet.nodeInfo; + props.getPeers(id); + return () => {}; + }, []), + [], + ); + + const closeModal = data => { + if (data === null) { + return setModalVisible(false); + } + setQRorUserInput(data); + setModalVisible(false); + }; + + const isContinueButtonDisabled = () => { + if (nodeInputRequired) { + const nodeId = QRdataORuserInput.split('@')[0]; + return isValidLnNodeId(nodeId) ? false : true; + } + return false; + }; + const handleContinueBtn = () => { + if (nodeInputRequired) { + const {walletInfo} = props.route.params; + props.navigation.navigate('LnChannelFunding', { + nodeAddress: QRdataORuserInput, + walletInfo, + }); + } else { + props.navigation.goBack(); + } + }; + + const isButtonDisabled = isContinueButtonDisabled(); + return ( + + + {nodeInputRequired && ( + + setQRorUserInput(txt)} + /> + + setModalVisible(true)}> + + + + + + )} + + + {nodeInputRequired ? C.STR_Browse_Channels : C.STR_Path_to_Node} + + {loading && !loaded && } + + + + + + handleContinueBtn()} + style={[ + styles.continueBtn, + // eslint-disable-next-line react-native/no-inline-styles + { + backgroundColor: !isButtonDisabled ? '#ffa500' : 'lightgrey', + }, + ]}> + + {C.STR_CONTINUE} + + + setModalVisible(false)} + animationType="fade" + presentationStyle="fullScreen"> + + + + ); +} +const mapStateToProps = state => { + return { + lnWallet: state.lnWallet, + }; +}; + +const mapDispatchToProps = { + getPeers, +}; + +export default connect( + mapStateToProps, + mapDispatchToProps, +)(SifirLNNodeSelectScreen); + +SifirLNNodeSelectScreen.navigationOptions = { + header: null, +}; + +const styles = StyleSheet.create({ + flex1: { + flex: 1, + overflow: 'hidden', + }, + inputWrapper: { + flexDirection: 'row', + borderColor: AppStyle.mainColor, + borderRadius: 10, + borderWidth: 1, + padding: 10, + alignItems: 'center', + justifyContent: 'center', + overflow: 'visible', + }, + container: { + flex: 1, + backgroundColor: AppStyle.backgroundColor, + }, + camera_icon: {width: 25, height: 20}, + burger_icon: {width: 25, height: 20}, + space_around: { + flexDirection: 'row', + flex: 1, + justifyContent: 'space-around', + marginLeft: 10, + }, + space_between: { + flexDirection: 'row', + justifyContent: 'space-between', + }, + mb_20: {marginBottom: 20}, + input: { + width: '70%', + color: 'white', + // height: Platform.OS === 'android' ? 30 : 25, + fontSize: 12, + }, + text_bold: { + fontWeight: 'bold', + }, + text_center: { + textAlign: 'center', + }, + text_large: { + fontSize: 17, + }, + text_white: { + color: 'white', + fontFamily: AppStyle.mainFont, + }, + back: { + marginRight: 8, + width: 12, + height: 12, + }, + margin_30: { + margin: 30, + }, + margin_top_30: {marginTop: 30}, + continueBtn: { + padding: 20, + borderRadius: 10, + bottom: 0, + position: 'absolute', + left: 0, + right: 0, + margin: 30, + }, + headingAndSpinnerRow: { + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'baseline', + }, + nodesTblContainer: {flex: 1, paddingBottom: 120}, +}); diff --git a/src/components/screens/ln/index.js b/src/components/screens/ln/index.js new file mode 100644 index 0000000..f3161b3 --- /dev/null +++ b/src/components/screens/ln/index.js @@ -0,0 +1,11 @@ +import SifirLNChannelFundingScreen from './SifirLNChannelFundingScreen'; +import SifirLNInvoiceConfirmScreen from './SifirLNInvoiceConfirmScreen'; +import SifirLNNodeSelectScreen from './SifirLNNodeSelectScreen'; +import SifirLNChannelConfirmedScreen from './SifirLNChannelConfirmedScreen'; + +export { + SifirLNChannelFundingScreen, + SifirLNInvoiceConfirmScreen, + SifirLNNodeSelectScreen, + SifirLNChannelConfirmedScreen, +}; diff --git a/src/components/screens/wallet/SifirAccountScreen.js b/src/components/screens/wallet/SifirAccountScreen.js index 5517960..2556473 100644 --- a/src/components/screens/wallet/SifirAccountScreen.js +++ b/src/components/screens/wallet/SifirAccountScreen.js @@ -1,62 +1,114 @@ import React from 'react'; -import { - View, - Image, - StyleSheet, - TouchableWithoutFeedback, - TouchableOpacity, - Text, - ActivityIndicator, -} from 'react-native'; +import {View, Image, StyleSheet, TouchableOpacity, Text} from 'react-native'; import {connect} from 'react-redux'; -import LinearGradient from 'react-native-linear-gradient'; import {Images, AppStyle, C} from '@common/index'; import {getWalletDetails} from '@actions/btcwallet'; -import SifirTxnList from '@elements/SifirTxnList'; -import SifirBTCAmount from '@elements/SifirBTCAmount'; -import {Alert} from 'react-native'; +import {getLnWalletDetails} from '@actions/lnWallet'; +import SifirAccountHeader from '@elements/SifirAccountHeader'; +import SifirAccountActions from '@elements/SifirAccountActions'; +import SifirAccountHistory from '@elements/SifirAccountHistory'; +import SifirSettingModal from '@elements/SifirSettingModal'; +import {ErrorScreen} from '@screens/error'; class SifirAccountScreen extends React.Component { constructor(props, context) { super(props, context); } state = { - btnStatus: 0, balance: 0, - txnData: null, - btcUnit: C.STR_BTC, + txnData: [], + isVisibleSettingsModal: false, }; + stopLoading = null; + async _loadWalletFromProps() { const {label, type} = this.props.route.params.walletInfo; - const {balance, txnData} = await this.props.getWalletDetails({label, type}); - this.setState({balance, txnData}); + if (type === C.STR_LN_WALLET_TYPE) { + const {balance, txnData} = await this.props.getLnWalletDetails({label}); + this.setState({balance, txnData}); + } else { + const {balance, txnData} = await this.props.getWalletDetails({ + label, + type, + }); + this.setState({balance, txnData}); + } } + componentDidMount() { - this._loadWalletFromProps(); + const {_loadWalletFromProps} = this; + this.stopLoading = this.props.navigation.addListener( + 'focus', + _loadWalletFromProps.bind(this), + ); } + componentWillUnmount() { + this.stopLoading(); + } + toggleSettingsModal() { + this.setState({isVisibleSettingsModal: !this.state.isVisibleSettingsModal}); + } + + handleReceiveButton = () => { + const {walletInfo} = this.props.route.params; + this.props.navigation.navigate('BtcReceiveTxn', {walletInfo}); + }; + + handleSendBtn = () => { + const {walletInfo} = this.props.route.params; + const {type} = walletInfo; + const {balance} = this.state; + if (type === C.STR_LN_WALLET_TYPE) { + this.props.navigation.navigate('LNPayInvoiceRoute', { + screen: 'LnScanBolt', + params: {walletInfo: {...walletInfo, balance}}, + }); + } else { + this.props.navigation.navigate('GetAddress', { + walletInfo: {...walletInfo, balance}, + }); + } + }; + render() { - const {btnStatus, balance, txnData, btcUnit} = this.state; + const {balance, txnData} = this.state; const {navigate} = this.props.navigation; - const {label, type} = this.props.route.params.walletInfo; - const {loading, loaded, feeSettingEnabled, error} = this.props.btcWallet; - const BTN_WIDTH = C.SCREEN_WIDTH / 2; - if (error) { - Alert.alert( - C.STR_ERROR_btc_action, - C.STR_ERROR_account_screen, - [ - { - text: 'Try again', - onPress: () => this._loadWalletFromProps(), - }, - ], - {cancelable: false}, + const {walletInfo} = this.props.route.params; + const {label, type} = walletInfo; + const {loading, loaded, error: errorBtc} = this.props.btcWallet; + const { + loading: loadingLN, + loaded: loadedLN, + error: errorLN, + } = this.props.lnWallet; + const btcUnit = type === C.STR_LN_WALLET_TYPE ? C.STR_MSAT : C.STR_BTC; + const isLoading = type === C.STR_LN_WALLET_TYPE ? loadingLN : loading; + const isLoaded = type === C.STR_LN_WALLET_TYPE ? loadedLN : loaded; + const hasError = type === C.STR_LN_WALLET_TYPE ? errorLN : errorBtc; + const {toggleSettingsModal} = this; + if (hasError) { + return ( + this._loadWalletFromProps(), + }, + { + text: C.STR_GO_BACK, + onPress: () => navigate('AccountList'), + }, + ]} + /> ); } return ( - + - - - - - {loading === true && ( - - )} - {loaded === true && loading === false && ( - <> - {label} - {type === C.STR_WATCH_WALLET_TYPE && ( - {C.STR_WATCHING} - )} - - )} - - + {this.state.isVisibleSettingsModal && ( - {loading === true && ( - - )} - {loaded === true && loading === false && ( - <> - - - - - - {C.STR_Cur_Balance} - - )} - - - - - {type === C.STR_SPEND_WALLET_TYPE && ( - this.setState({btnStatus: 1})} - onPressOut={() => { - this.setState({btnStatus: 0}); - navigate('GetAddress', { - walletInfo: {type, label, balance, feeSettingEnabled}, - }); - }}> - - {C.STR_SEND} - - - - )} - this.setState({btnStatus: 2})} - onPressOut={() => { - this.setState({btnStatus: 0}); - navigate('BtcReceiveTxn', {walletInfo: {type, label}}); - }}> - - - {C.STR_RECEIVE} - - - - - - - {C.TRANSACTIONS} - - + - - - - {loading === true && ( - - )} - {loaded === true && loading === false && txnData !== null && ( - - )} - + + )} + {} + } + loading={isLoading} + loaded={isLoaded} + type={type} + label={label} + balance={balance} + btcUnit={btcUnit} + headerText={ + type === C.STR_LN_WALLET_TYPE + ? C.STR_Balance_Channels_n_Outputs + : C.STR_Cur_Balance + } + /> + + ); } @@ -186,10 +189,14 @@ class SifirAccountScreen extends React.Component { const mapStateToProps = state => { return { btcWallet: state.btcWallet, + lnWallet: state.lnWallet, }; }; -const mapDispatchToProps = {getWalletDetails}; +const mapDispatchToProps = { + getWalletDetails, + getLnWalletDetails, +}; export default connect( mapStateToProps, @@ -197,55 +204,11 @@ export default connect( )(SifirAccountScreen); const styles = StyleSheet.create({ + navBtn: {flex: 0.7}, mainView: { flex: 1, backgroundColor: AppStyle.backgroundColor, - }, - leftTxnBtnView: { - borderRightColor: 'transparent', - borderTopRightRadius: 10, - borderBottomRightRadius: 10, - borderBottomLeftRadius: 0, - borderTopLeftRadius: 0, - }, - headerView: { - flex: 3, - marginTop: 0, - marginLeft: 20, - flexDirection: 'row', - justifyContent: 'space-around', - }, - btnAreaView: { - flex: 1, - flexDirection: 'row', - borderColor: AppStyle.mainColor, - borderWidth: 1, - borderRadius: 7, - height: 55, - marginLeft: 26, - marginRight: 26, - marginTop: 30, - }, - txnListView: { - flex: 3, - height: '100%', - marginBottom: 20, - marginLeft: 25, - }, - boxTxt: { - color: 'white', - fontFamily: AppStyle.mainFont, - fontSize: 24, - marginLeft: 13, - marginBottom: -10, - }, - boxImage: { - marginBottom: 10, - marginTop: 15, - marginLeft: 13, - width: 43, - height: 43, - opacity: 0.6, + paddingTop: 10, }, backNavView: { display: 'flex', @@ -266,25 +229,7 @@ const styles = StyleSheet.create({ marginLeft: 10, marginTop: 2, }, - gradient: { - flex: 4.6, - borderWidth: 1, - borderRadius: 15, - }, - txnBtnView: { - flex: 1, - flexDirection: 'row', - justifyContent: 'center', - borderRightColor: AppStyle.mainColor, - borderTopColor: 'transparent', - borderLeftColor: 'transparent', - borderBottomColor: 'transparent', - height: '100%', - borderWidth: 1, - borderTopLeftRadius: 10, - borderBottomLeftRadius: 10, - alignItems: 'center', - }, + satTxt: { color: 'white', fontSize: 26, @@ -293,34 +238,13 @@ const styles = StyleSheet.create({ marginBottom: 7, marginLeft: 5, }, - balanceTxt: { - color: AppStyle.mainColor, - fontFamily: AppStyle.mainFont, - fontSize: 16, - textAlignVertical: 'bottom', - marginBottom: -5, - marginLeft: 5, - }, - balanceView: { - flex: 5, - flexDirection: 'column-reverse', - marginLeft: 25, - paddingBottom: 15, - }, - txnLblTxt: { - color: 'white', - fontSize: 23, - fontWeight: 'bold', - }, - txnSetView: { - flex: 1, - flexDirection: 'row', - marginLeft: 26, - marginTop: 30, - }, - balAmountTxt: { - color: 'white', - fontFamily: AppStyle.mainFont, - fontSize: 50, + settingMenuContainer: { + position: 'absolute', + paddingTop: 80, + width: '100%', + backgroundColor: 'rgba(0,0,0,0.5)', + height: '100%', + elevation: 10, + zIndex: 10, }, }); diff --git a/src/components/screens/wallet/SifirAccountsListScreen.js b/src/components/screens/wallet/SifirAccountsListScreen.js index da9fd90..fa642a3 100644 --- a/src/components/screens/wallet/SifirAccountsListScreen.js +++ b/src/components/screens/wallet/SifirAccountsListScreen.js @@ -8,62 +8,140 @@ import { } from 'react-native'; import {connect} from 'react-redux'; import SifirWalletButton from '@elements/SifirWalletButton'; -import {getBtcWalletList} from '@actions/btcwallet'; +import {getBtcWalletList, getBlockChainInfo} from '@actions/btcwallet'; +import {getLnNodesList} from '@actions/lnWallet'; import {Images, AppStyle, C} from '@common/index'; -import {Alert} from 'react-native'; +import {ErrorScreen} from '@screens/error'; +import SifirSettingModal from '@elements/SifirSettingModal'; class SifirAccountsListScreen extends React.Component { constructor(props, context) { super(props, context); } + state = { + modalVisible: false, + }; - componentDidMount() { + _init = () => { this.props.getBtcWalletList(); + this.props.getLnNodesList(); + }; + + componentDidMount() { + this.stopLoading = this.props.navigation.addListener( + 'focus', + this._init.bind(this), + ); + } + componentWillUnmount() { + this.stopLoading(); + } + + handleMenuBtn() { + if (this.state.modalVisible) { + this.setState({modalVisible: !this.state.modalVisible}); + } else { + this.props.getBlockChainInfo(); + this.setState({modalVisible: !this.state.modalVisible}); + } } + onClose = () => this.setState({modalVisible: false}); + render() { const CARD_SIZE = C.SCREEN_WIDTH / 2 - 40; - const {navigate} = this.props.navigation; + // const {navigate} = this.props.navigation; const { - btcWallet: {btcWalletList, loaded, loading, error}, - } = this.props; - if (error) { - Alert.alert( - C.STR_ERROR_btc_action, - C.STR_ERROR_account_list_screen, - [ - { - text: 'Try again', - onPress: () => this.props.getBtcWalletList(), - }, - ], - {cancelable: false}, + _init, + props: { + btcWallet: {btcWalletList, chainInfo, loading, error}, + lnWallet: {nodeInfo, loading: lnLoading, nodeError: lnError}, + navigation: {navigate}, + }, + } = this; + if (error || lnError) { + return ( + ); } return ( - + {(loading || lnLoading) && btcWalletList.length !== 0 && ( + + )} + + this.handleMenuBtn()}> - {loading === true && ( + {this.state.modalVisible && ( + this.handleMenuBtn()}> + this.handleMenuBtn()} + /> + + )} + {btcWalletList.length === 0 && ( )} - - {loaded === true && - loading === false && - btcWalletList.map((wallet, i) => ( + + + {btcWalletList.map((wallet, i) => ( + + ))} + {nodeInfo.map((info, i) => { + return ( - ))} + ); + })} ); @@ -74,7 +152,7 @@ const styles = StyleSheet.create({ settingView: { display: 'flex', flexDirection: 'row', - justifyContent: 'flex-end', + justifyContent: 'space-between', padding: 30, marginTop: 10, height: 100, @@ -89,7 +167,7 @@ const styles = StyleSheet.create({ width: '100%', backgroundColor: AppStyle.backgroundColor, }, - girdView: { + gridView: { flex: 1, width: '100%', display: 'flex', @@ -104,15 +182,34 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', }, + overlayContainer: { + backgroundColor: 'rgba(0, 0, 0, 0.7)', + borderRadius: 15, + }, + LnSpinner: {flex: 1, justifyContent: 'center', alignItems: 'center'}, + settingMenuContainer: { + position: 'absolute', + paddingTop: 80, + width: '100%', + backgroundColor: 'rgba(0,0,0,0.5)', + height: '100%', + elevation: 10, + zIndex: 10, + }, }); const mapStateToProps = state => { return { btcWallet: state.btcWallet, + lnWallet: state.lnWallet, }; }; -const mapDispatchToProps = {getBtcWalletList}; +const mapDispatchToProps = { + getBtcWalletList, + getLnNodesList, + getBlockChainInfo, +}; export default connect( mapStateToProps, diff --git a/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js b/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js index d60340f..cc7af33 100644 --- a/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js +++ b/src/components/screens/wallet/SifirBtcReceiveTxnScreen.js @@ -14,9 +14,10 @@ import SifirQRCode from '@elements/SifirQRCode'; import Share from 'react-native-share'; import {getWalletAddress} from '@actions/btcwallet'; +import {getNewAddress} from '@actions/lnWallet'; import {Images, AppStyle, C} from '@common/index'; import {log} from '@io/events/'; -import {Alert} from 'react-native'; +import {ErrorScreen} from '@screens/error'; class SifirBtcReceiveTxnScreen extends Component { constructor(props) { @@ -38,7 +39,10 @@ class SifirBtcReceiveTxnScreen extends Component { const {label, type} = this.props.route.params.walletInfo; if (type === C.STR_WATCH_WALLET_TYPE) { await this.props.getWalletAddress({label, type}); - await this.setState({showQRCode: true}); + this.setState({showQRCode: true}); + } else if (type === C.STR_LN_WALLET_TYPE) { + await this.props.getNewAddress(); + this.setState({showQRCode: true}); } } componentDidMount() { @@ -72,32 +76,51 @@ class SifirBtcReceiveTxnScreen extends Component { await this.props.getWalletAddress({label, type, addrType}); this.setState({showQRCode: true}); }; + + handleBackBtn = () => { + const {walletInfo} = this.props.route.params; + const {type} = walletInfo; + const {navigation} = this.props; + // if (type === C.STR_WATCH_WALLET_TYPE) { + // navigation.navigate('Account', {walletInfo}); + // } else { + navigation.goBack(); + // } + }; + render() { - const {navigate} = this.props.navigation; - const {label, type} = this.props.route.params.walletInfo; + const {walletInfo} = this.props.route.params; + const {label, type} = walletInfo; const {showQRCode, enableWatchSelection} = this.state; - const {loaded, loading, address, error} = this.props.btcWallet; + let loaded, loading, address, error; + if (type === C.STR_LN_WALLET_TYPE) { + ({loaded, loading, address, error} = this.props.lnWallet); + } else { + ({loaded, loading, address, error} = this.props.btcWallet); + } if (error) { - Alert.alert( - C.STR_ERROR_btc_action, - C.STR_ERROR_account_screen, - [ - { - text: 'Try again', - onPress: () => this._bootStrap(), - }, - ], - {cancelable: false}, + return ( + this._bootStrap(), + }, + { + text: C.GO_BACK, + onPress: () => this.navigation.navigate('Account', {label, type}), + }, + ]} + /> ); } - return ( - - navigate('Account')}> + this.handleBackBtn()}> + {label} Wallet @@ -312,10 +335,11 @@ class SifirBtcReceiveTxnScreen extends Component { const mapStateToProps = state => { return { btcWallet: state.btcWallet, + lnWallet: state.lnWallet, }; }; -const mapDispatchToProps = {getWalletAddress}; +const mapDispatchToProps = {getWalletAddress, getNewAddress}; export default connect( mapStateToProps, @@ -330,6 +354,7 @@ const styles = StyleSheet.create({ position: 'relative', alignItems: 'center', justifyContent: 'space-between', + paddingVertical: 15, }, loadingView: {justifyContent: 'center', position: 'absolute', top: 40 * C.vh}, settingView: { diff --git a/src/components/screens/wallet/SifirBtcSendTxnConfirmScreen.js b/src/components/screens/wallet/SifirBtcSendTxnConfirmScreen.js index 42e193b..2562426 100644 --- a/src/components/screens/wallet/SifirBtcSendTxnConfirmScreen.js +++ b/src/components/screens/wallet/SifirBtcSendTxnConfirmScreen.js @@ -1,10 +1,21 @@ import React, {Component} from 'react'; import {connect} from 'react-redux'; -import {View, Image, StyleSheet, TouchableOpacity, Text} from 'react-native'; +import { + View, + Image, + StyleSheet, + TouchableOpacity, + ActivityIndicator, + Text, + ScrollView, +} from 'react-native'; import {Images, AppStyle, C} from '@common/index'; import {sendBitcoin} from '@actions/btcwallet'; +import {withdrawFunds} from '@actions/lnWallet'; import Overlay from 'react-native-modal-overlay'; import SifirSettingModal from '@elements/SifirSettingModal'; +import {ErrorScreen} from '@screens/error'; +import SifirBTCAmount from '@elements/SifirBTCAmount'; class SifirBtcSendTxnConfirmScreen extends Component { constructor(props, context) { @@ -15,107 +26,139 @@ class SifirBtcSendTxnConfirmScreen extends Component { btnStatus: 0, modalVisible: false, }; - sendBtc = () => { - console.log('in send'); + + withdrawFunds = async () => { + const { + txnInfo, + walletInfo, + walletInfo: {type}, + } = this.props.route.params; + const {address, amount} = txnInfo; + const withdrawDetails = await this.props.withdrawFunds(address, amount); + if (withdrawDetails?.tx) { + this.props.navigation.navigate('BtcTxnConfirmed', { + txnInfo: { + ...txnInfo, + isSendTxn: true, + amount, + address, + }, + walletInfo, + displayUnit: C.STR_MSAT, + type, + }); + } + }; + + sendBitcoin = async () => { const {txnInfo, walletInfo} = this.props.route.params; const {address, amount} = txnInfo; - this.props.sendBitcoin({address, amount}); + await this.props.sendBitcoin({address, amount}); this.props.navigation.navigate('BtcTxnConfirmed', { txnInfo: {...txnInfo, isSendTxn: true}, walletInfo, }); }; + handleSendBtn = () => { + const { + walletInfo: {type}, + } = this.props.route.params; + if (type === C.STR_LN_WITHDRAW) { + this.withdrawFunds(); + } else { + this.sendBitcoin(); + } + }; + render() { const { - walletInfo: {feeSettingEnabled}, - txnInfo: {address, amount}, + walletInfo: {feeSettingEnabled, type}, + txnInfo: {address, amount, unit}, } = this.props.route.params; - const amountFontSize = (C.vw * 80) / amount.length; - const btcUnitFontSize = amountFontSize * 0.6; - const recTxtFontSize = (C.vw * 70) / address.length; + const amountFontSize = + (C.vw * 80) / (amount.length < 3 ? 5 : amount.length); + const recTxtFontSize = (C.vw * 120) / address.length; + const {loading: btcLoading, error: btcError} = this.props.lnWallet; + const {loading: lnLoading, error: lnError} = this.props.btcWallet; + + if (btcError || lnError) { + return ( + this.props.navigation.navigate('AccountList'), + }, + ]} + /> + ); + } return ( - - feeSettingEnabled && this.setState({modalVisible: true}) - }> - - - - - - {C.STR_PAYMENT_RECEIPIENT} - - {address} - - {C.STR_PAYMENT_AMOUNT} - - + - - {amount} - - - {C.STR_BTC} - + style={styles.setting} + onTouchEnd={() => + feeSettingEnabled && this.setState({modalVisible: true}) + }> + + + - - - {feeSettingEnabled && ( - - {C.STR_FEES} - {amount} BTC - [4 Hour Wait] + + {C.STR_PAYMENT_RECEIPIENT} + + {address} + + {C.STR_PAYMENT_AMOUNT} - )} - - - {C.STR_SEND} - + + + + + + + - - - {hideModal => ( - + {feeSettingEnabled && ( + + {C.STR_FEES} + {amount} BTC + [4 Hour Wait] + )} - + {(btcLoading || lnLoading) && } + + + {C.STR_SEND} + + + + + {hideModal => ( + + )} + + ); } @@ -123,10 +166,11 @@ class SifirBtcSendTxnConfirmScreen extends Component { const mapStateToProps = state => { return { btcWallet: state.btcWallet, + lnWallet: state.lnWallet, }; }; -const mapDispatchToProps = {sendBitcoin}; +const mapDispatchToProps = {sendBitcoin, withdrawFunds}; export default connect( mapStateToProps, @@ -182,7 +226,6 @@ const styles = StyleSheet.create({ }, bigTxt: { color: 'white', - width: C.SCREEN_WIDTH * 0.55, textAlign: 'center', }, recTxt: { @@ -228,4 +271,26 @@ const styles = StyleSheet.create({ marginLeft: 10, marginRight: 10, }, + addressContainer: { + alignItems: 'center', + marginTop: 15, + }, + amountContainer: { + flexDirection: 'row', + alignItems: 'flex-end', + justifyContent: 'center', + }, + amountUniLabel: { + color: 'white', + marginBottom: 5, + }, + sendBtnTouchable: { + marginTop: 50, + alignItems: 'center', + }, + overlayContainer: { + backgroundColor: 'rgba(0, 0, 0, 0.7)', + borderRadius: 15, + }, + sendImg: {width: 20, height: 20}, }); diff --git a/src/components/screens/wallet/SifirBtcSendTxnInputAmountScreen.js b/src/components/screens/wallet/SifirBtcSendTxnInputAmountScreen.js index 1d82cb3..a6982ac 100644 --- a/src/components/screens/wallet/SifirBtcSendTxnInputAmountScreen.js +++ b/src/components/screens/wallet/SifirBtcSendTxnInputAmountScreen.js @@ -5,9 +5,11 @@ import { TouchableOpacity, Text, TextInput, + ScrollView, } from 'react-native'; import {AppStyle, C} from '@common/index'; +import SifirBTCAmount from '@elements/SifirBTCAmount'; export default class SifirBtcSendTxnInputAmountScreen extends Component { constructor(props, context) { @@ -16,70 +18,97 @@ export default class SifirBtcSendTxnInputAmountScreen extends Component { state = { btnStatus: 0, amount: 0, + validAmount: false, }; - goToConfirm = () => { + + goToConfirm = ({unit}) => { const {txnInfo, walletInfo} = this.props.route.params; const {amount} = this.state; this.props.navigation.navigate('BtcSendTxnConfirm', { - txnInfo: {...txnInfo, amount}, + txnInfo: {...txnInfo, amount, unit}, walletInfo, }); }; + checkAndSetInput = (inputamount, unit) => { + // TODO this to proper SATS vs BTC unit parse + const { + walletInfo: {balance}, + } = this.props.route.params; + if (isNaN(inputamount)) { + return this.setState({validAmount: false}); + } + /// msat and sats should be integer amounts + if (unit !== C.STR_BTC && !Number.isInteger(Number(inputamount))) { + return this.setState({validAmount: false}); + } + + // Check amounts + if (inputamount > balance) { + return this.setState({validAmount: false}); + } + return this.setState({ + amount: inputamount, + // Do > 0 check here to allow temporary 0 while deleting / editing amounts + validAmount: inputamount > 0 ? true : false, + }); + }; + render() { - const {amount} = this.state; + const {validAmount} = this.state; const { txnInfo: {address}, - walletInfo: {balance}, + walletInfo: {balance, type}, } = this.props.route.params; + const unit = type === C.STR_LN_WITHDRAW ? C.STR_SAT : C.STR_BTC; return ( - - - - {C.STR_PAYMENT_RECEIPIENT} - {address} - {C.STR_PAYMENT_AMOUNT} - - - - this.setState({amount: amount})} - /> - {C.STR_BTC} + + + + + {C.STR_PAYMENT_RECEIPIENT} + {address} + {C.STR_PAYMENT_AMOUNT} + + {`${C.STR_Wallet_balance}: `} + + + + + + this.checkAndSetInput(input, unit)} + /> + {unit} + + - - - {amount > 0 && ( this.goToConfirm({unit})} shadowOffset="30"> this.goToConfirm()}> + style={[ + styles.btnStyle, + { + backgroundColor: validAmount + ? AppStyle.mainColor + : AppStyle.backgroundColor, + }, + ]}> {C.STR_CONFIRM} - )} - {(amount <= 0 || parseInt(amount, 10) === 0) && ( - - {C.STR_CONFIRM} - - )} + - + ); } } @@ -87,12 +116,10 @@ export default class SifirBtcSendTxnInputAmountScreen extends Component { const styles = StyleSheet.create({ mainView: { flex: 1, - height: '100%', backgroundColor: AppStyle.backgroundColor, position: 'relative', }, contentView: { - position: 'absolute', alignItems: 'center', width: '100%', left: 0, @@ -128,6 +155,14 @@ const styles = StyleSheet.create({ fontWeight: 'bold', fontSize: 23, }, + smallWhiteText: { + color: 'white', + fontFamily: AppStyle.mainFont, + fontSize: 12, + marginTop: 10, + marginHorizontal: 50, + textAlign: 'center', + }, recTxt: { color: 'white', fontFamily: AppStyle.mainFont, diff --git a/src/components/screens/wallet/SifirBtcTxnConfirmedScreen.js b/src/components/screens/wallet/SifirBtcTxnConfirmedScreen.js index 41bb943..498cdc3 100644 --- a/src/components/screens/wallet/SifirBtcTxnConfirmedScreen.js +++ b/src/components/screens/wallet/SifirBtcTxnConfirmedScreen.js @@ -6,65 +6,66 @@ import { StyleSheet, TouchableOpacity, Text, - ActivityIndicator, + ScrollView, } from 'react-native'; import {connect} from 'react-redux'; import {Images, AppStyle, C} from '@common/index'; +import SifirBTCAmount from '@elements/SifirBTCAmount'; class SifirBtcTxnConfirmedScreen extends Component { - constructor(props, context) { - super(props, context); - } - done = () => { - const {walletInfo} = this.props.route.params; - this.props.navigation.navigate('Account', {walletInfo}); + backToAccount = () => { + const {type, walletInfo} = this.props.route.params; + if (type === C.STR_LN_WALLET_TYPE) { + this.props.navigation.navigate('Account', {walletInfo}); + } else { + this.props.navigation.navigate('AccountList'); + } }; render() { - const { - txnInfo: {amount, address, isSendTxn}, - } = this.props.route.params; - // TODO remove from here - const {loaded, loading, btcSendResult} = this.props.btcWallet; - const addrTxtFontSize = (C.vw * 250) / address.length; + const {type} = this.props.route.params; + const addrTxtFontSize = (C.vw * 250) / address?.length || 25; + + const {amount, address, isSendTxn, unit} = this.props.route.params.txnInfo; + const payTitleText = + type === C.STR_LN_WALLET_TYPE + ? C.STR_PAID + : isSendTxn + ? C.STR_SENT + : C.STR_RECEIVED; + const payDataTitleText = `${C.STR_PAYMENT} ${ + type === C.STR_LN_WALLET_TYPE + ? C.STR_PRE_IMAGE + : isSendTxn + ? C.STR_RECEIPIENT + : C.STR_SENDER + }`; return ( - {loading === true && ( - - + + + + + {type === C.STR_LN_WALLET_TYPE ? C.STR_INVOICE : C.STR_PAYMENT} + + {payTitleText} + {payDataTitleText} + + {address} + + {C.STR_PAYMENT_AMOUNT} + + + - )} - {loaded === true && btcSendResult !== null && ( - <> - - - {C.STR_PAYMENT} - - {isSendTxn ? C.STR_SENT : C.STR_RECEIVED} - - - {C.STR_PAYMENT + - ' ' + - (isSendTxn ? C.STR_RECEIPIENT : C.STR_SENDER)} - - - {address} - - {C.STR_PAYMENT_AMOUNT} - {amount + ' ' + C.STR_BTC} + this.backToAccount()}> + + {C.STR_DONE} - this.done()}> - - {C.STR_DONE} - - - - )} + + ); } @@ -73,6 +74,7 @@ class SifirBtcTxnConfirmedScreen extends Component { const mapStateToProps = state => { return { btcWallet: state.btcWallet, + lnWallet: state.lnWallet, }; }; @@ -84,11 +86,16 @@ export default connect( )(SifirBtcTxnConfirmedScreen); const styles = StyleSheet.create({ + container: { + alignItems: 'center', + flex: 3, + }, mainView: { flex: 1, height: '100%', backgroundColor: AppStyle.backgroundColor, width: '100%', + paddingVertical: 15, }, doneView: { width: C.SCREEN_WIDTH * 0.5, @@ -150,8 +157,10 @@ const styles = StyleSheet.create({ }, checkImg: {width: 8 * C.vh, height: 8 * C.vh, marginTop: 2 * C.vh}, loading: { + alignSelf: 'center', + marginTop: C.SCREEN_HEIGHT / 4, + }, + sv: { flex: 1, - justifyContent: 'center', - alignItems: 'center', }, }); diff --git a/src/components/screens/wallet/SifirGetAddrScreen.js b/src/components/screens/wallet/SifirGetAddrScreen.js index f92c9ab..2cbea13 100644 --- a/src/components/screens/wallet/SifirGetAddrScreen.js +++ b/src/components/screens/wallet/SifirGetAddrScreen.js @@ -7,87 +7,165 @@ import { Text, TextInput, Modal, + ActivityIndicator, } from 'react-native'; import {Images, AppStyle, C} from '@common/index'; import SifirQrCodeCamera from '@elements/SifirQrCodeCamera'; +import {decodeBolt} from '@actions/lnWallet'; +import {connect} from 'react-redux'; +import {ErrorScreen} from '@screens/error'; -export default class SifirGetAddrScreen extends Component { +class SifirGetAddrScreen extends Component { constructor(props, context) { super(props, context); } state = { - btnStatus: 0, showModal: false, torchOn: false, - address: null, - addrFontSize: 22, + scannedQRdata: null, }; closeModal = data => { if (data === null) { - this.setState({showModal: false}); - return; + return this.setState({showModal: false}); + } + const { + walletInfo: {type}, + } = this.props.route.params; + + this.setState( + { + scannedQRdata: data, + showModal: false, + }, + () => { + if (type === C.STR_LN_WITHDRAW) { + this.handleAddressScanned(); + } else { + this.handleBoltScanned(); + } + }, + ); + }; + + handleBoltScanned = async () => { + const {scannedQRdata} = this.state; + const invoice = await this.props.decodeBolt(scannedQRdata); + const {walletInfo} = this.props.route.params; + + if (invoice?.amount_msat) { + this.props.navigation.navigate('LnInvoiceConfirm', { + invoice, + walletInfo, + bolt11: scannedQRdata, + }); } - this.setState({ - address: data, - showModal: false, - addrFontSize: (1.2 * C.SCREEN_WIDTH) / data.length, - }); }; - goToEnterAmount = () => { + handleAddressScanned = () => { const {walletInfo} = this.props.route.params; - const {address} = this.state; + const {scannedQRdata} = this.state; this.props.navigation.navigate('BtcSendTxnInputAmount', { - txnInfo: {address}, + txnInfo: {address: scannedQRdata}, walletInfo, }); }; - - inputAddr = address => { - if (address.length * 22 < C.SCREEN_WIDTH) { - this.setState({address, addrFontSize: 22}); + handleContinueBtn = async () => { + const { + walletInfo, + walletInfo: {type}, + } = this.props.route.params; + const {scannedQRdata} = this.state; + if (type === C.STR_LN_WALLET_TYPE) { + // Bolt scanned + const invoice = await this.props.decodeBolt(scannedQRdata); + if (invoice?.amount_msat) { + this.props.navigation.navigate('LnInvoiceConfirm', { + invoice, + walletInfo, + bolt11: scannedQRdata, + }); + } } else { - this.setState({ - address, - addrFontSize: (1.2 * C.SCREEN_WIDTH) / address.length, + // Normal btc Txn or 'Withdraw' + this.props.navigation.navigate('BtcSendTxnInputAmount', { + txnInfo: {address: scannedQRdata}, + walletInfo, }); } }; + handleBackButton = () => { + const {walletInfo} = this.props.route.params; + const {type} = walletInfo; + if (type === C.STR_LN_WITHDRAW) { + this.props.navigation.goBack(); + } else { + this.props.navigation.navigate('Account', {walletInfo}); + } + }; + + inputAddr = address => { + this.setState({scannedQRdata: address}); + }; + render() { - const {navigate} = this.props.navigation; - const {showModal, address, addrFontSize} = this.state; + const {showModal, scannedQRdata} = this.state; + const {loading, error} = this.props.lnWallet; + const { + walletInfo: {type, label}, + } = this.props.route.params; + const placeHolder = + type === C.STR_LN_WALLET_TYPE ? C.STR_Enter_bolt : C.STR_Enter_addr; + if (error && scannedQRdata) { + return ( + this.props.navigation.goBack(), + }, + ]} + /> + ); + } return ( - - navigate('Account')}> - - - {C.STR_Send} - + this.handleBackButton()}> + + + {label} - {C.STR_Enter_addr} + {placeHolder} {C.SCAN_ORSCAN} this.inputAddr(add)} /> - { this.setState({showModal: true}); }}> @@ -95,33 +173,27 @@ export default class SifirGetAddrScreen extends Component { - - {address != null && ( - - this.goToEnterAmount()}> - {C.STR_CONTINUE} - - - - )} - {address == null && ( - + {loading && } + this.handleContinueBtn()} + disabled={scannedQRdata && !loading ? false : true}> + {C.STR_CONTINUE} - )} + this.setState({showModal: false})} presentationStyle="fullScreen"> @@ -130,6 +202,21 @@ export default class SifirGetAddrScreen extends Component { } } +const mapStateToProps = state => { + return { + lnWallet: state.lnWallet, + }; +}; + +const mapDispatchToProps = { + decodeBolt, +}; + +export default connect( + mapStateToProps, + mapDispatchToProps, +)(SifirGetAddrScreen); + const styles = StyleSheet.create({ mainView: { flex: 1, @@ -138,6 +225,7 @@ const styles = StyleSheet.create({ position: 'relative', }, contentView: { + paddingTop: 20, position: 'absolute', left: 0, top: 0, @@ -227,4 +315,7 @@ const styles = StyleSheet.create({ height: C.SCREEN_HEIGHT - 495, width: (C.SCREEN_HEIGHT - 495) * 1.06, }, + spinner: { + marginTop: 20, + }, }); diff --git a/src/containers/LnStack.js b/src/containers/LnStack.js new file mode 100644 index 0000000..8772033 --- /dev/null +++ b/src/containers/LnStack.js @@ -0,0 +1,65 @@ +import React from 'react'; +import {createStackNavigator} from '@react-navigation/stack'; +import { + SifirLNChannelFundingScreen, + SifirLNNodeSelectScreen, + SifirLNInvoiceConfirmScreen, + SifirLNChannelConfirmedScreen, +} from '@screens/ln/'; +import {SifirBtcTxnConfirmedScreen, SifirGetAddrScreen} from '@screens/wallet/'; +import {C} from '@common/index'; + +const LNPayInvoiceStack = createStackNavigator(); +const LNChannelStack = createStackNavigator(); + +const LNPayInvoiceRoute = () => { + return ( + + + + + + ); +}; +const LNChannelRoute = () => { + return ( + + + + + + ); +}; + +export {LNPayInvoiceRoute, LNChannelRoute}; diff --git a/src/containers/WalletStack.js b/src/containers/WalletStack.js index aa8dbe8..47f9034 100644 --- a/src/containers/WalletStack.js +++ b/src/containers/WalletStack.js @@ -12,6 +12,7 @@ import { SifirBtcTxnConfirmedScreen, SifirAddWalletScreen, } from '@screens/wallet/index'; +import {LNChannelRoute, LNPayInvoiceRoute} from './LnStack'; const WalletStack = createStackNavigator(); export default function WalletTab() { @@ -31,6 +32,8 @@ export default function WalletTab() { name="AccountList" component={SifirAccountsListScreen} /> + + - + + + ); } diff --git a/src/containers/index.js b/src/containers/index.js index 42e5f31..0b1e1d6 100644 --- a/src/containers/index.js +++ b/src/containers/index.js @@ -7,7 +7,7 @@ import {ScanToPairScreen, UnlockORGenKeys} from '@screens/auth/index'; import WalletTab from './WalletStack'; import {connect} from 'react-redux'; import {event} from '@io/events'; -import {Alert} from 'react-native'; +import {ErrorScreen} from '@screens/error'; import { loadEncryptedAuthInfo, loadDevicePgpKeys, @@ -15,7 +15,7 @@ import { clearAuthInfo, } from '@actions/auth'; import {createStackNavigator} from '@react-navigation/stack'; - +import {error} from '@io/events'; const RootStack = createStackNavigator(); const ContentStack = createStackNavigator(); /** @@ -82,6 +82,7 @@ class Root extends React.Component { initLoading: true, encAuthInfo: null, devicePgpKeys: null, + caughtError: false, }; _bootstrapAsync = async () => { const [encAuthInfo, devicePgpKeys] = await Promise.all([ @@ -93,26 +94,40 @@ class Root extends React.Component { componentDidMount() { this._bootstrapAsync(); } + static getDerivedStateFromError(err) { + // Update state so the next render will show the fallback UI. + return {caughtError: true, initLoading: false, caughtErrorObj: err}; + } + componentDidCatch(errorThrown, info) { - event('error.root.componentDidCatch', {errorThrown, info}); - Alert.alert( - C.STR_ERROR_app, - C.STR_ERROR_app_unhandled, - [ - { - text: 'Reload', - onPress: () => this._bootstrapAsync(), - }, - ], - {cancelable: false}, - ); + error('containerIndex:componentDidCatch', errorThrown, info); + event('error.componentDidCatch', { + component: 'containerIndex', + errorThrown, + info, + }); } render() { const { auth: {token, key, nodePubkey}, } = this.props; - const {initLoading, encAuthInfo} = this.state; + const {initLoading, encAuthInfo, caughtError, caughtErrorObj} = this.state; const authStateReady = token && key && nodePubkey; + if (caughtError) { + return ( + + ); + } return ( {initLoading ? ( diff --git a/src/helpers/bolt11.min.js b/src/helpers/bolt11.min.js new file mode 100644 index 0000000..28808a6 --- /dev/null +++ b/src/helpers/bolt11.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).lightningPayReq=e()}}(function(){return function(){return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var f="function"==typeof require&&require;if(!a&&f)return f(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[s]={exports:{}};t[s][0].call(u.exports,function(e){return i(t[s][1][e]||e)},u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s0?s-4:s;for(r=0;r>16&255,f[u++]=t>>8&255,f[u++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,f[u++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,f[u++]=t>>8&255,f[u++]=255&t);return f},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,f=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){},{}],3:[function(e,t,r){(function(t){"use strict";var n=e("base64-js"),i=e("ieee754"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=t,r.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},r.INSPECT_MAX_BYTES=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,t.prototype),r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return f(e,t,r)}function f(e,r,n){if("string"==typeof e)return function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|p(e,r),i=a(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,r,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(e,r,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return t.from(i,r,n);var o=function(e){if(t.isBuffer(e)){var r=0|l(e.length),n=a(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(void 0!==e.length)return"number"!=typeof e.length||z(e.length)?a(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|l(e))}function h(e){for(var t=e.length<0?0:0|l(e.length),r=a(t),n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function p(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return C(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(o)return i?-1:C(e).length;r=(""+r).toLowerCase(),o=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),z(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:g(e,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):g(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,s=1,a=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,f/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=r;oa&&(r=a-f),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&c)<<6|63&o)>127&&(u=f);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(f=(15&c)<<12|(63&o)<<6|63&s)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(f=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&f<1114112&&(u=f)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),""},o&&(t.prototype[o]=t.prototype.inspect),t.prototype.compare=function(e,r,n,i,o){if(K(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,f=Math.min(s,a),c=this.slice(i,o),u=e.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function T(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,t>>>=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||L(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},t.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||T(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||T(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r=0;--s)e[s+r]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,i),r);return o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=r;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}var q=function(){for(var e=new Array(256),t=0;t<16;++t)for(var r=16*t,n=0;n<16;++n)e[r+n]="0123456789abcdef"[t]+"0123456789abcdef"[n];return e}()}).call(this,e("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:6}],4:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":8}],5:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,f=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),a=0===c.x}catch(e){a=!1}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var o,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=n(null),e._eventsCount=0),a){if("function"==typeof a?a=s[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),!a.warned&&(o=u(e))&&o>0&&a.length>o){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",f.name,f.message)}}else a=s[t]=r,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var f=new Error('Unhandled "error" event. ('+t+")");throw f.context=t,f}if(!(r=s[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=m(e,n),o=0;o=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},s.prototype.listenerCount=b,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],6:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,f=(1<>1,u=-7,h=r?i-1:0,d=r?-1:1,l=e[t+h];for(h+=d,o=l&(1<<-u)-1,l>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===f)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,n),o-=c}return(l?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,f,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-s))<1&&(s--,f*=2),(t+=s+h>=1?d/f:d*Math.pow(2,1-h))*f>=2&&(s++,f/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*f-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+l]=255&a,l+=p,a/=256,i-=8);for(s=s<0;e[r+l]=255&s,l+=p,s/=256,c-=8);e[r+l-p]|=128*b}},{}],7:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],8:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],9:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],10:[function(e,t,r){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s1)for(var r=1;r0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):M(e,s)):w(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(I,e):I(e))}function I(e){l("emit readable"),e.emit("readable"),O(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):S(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e0?L(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:v;function c(t,r){l("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",v),n.removeListener("data",b),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){l("onend"),e.end()}o.endEmitted?i.nextTick(f):n.once("end",f),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,O(e))}}(n);e.on("drain",h);var d=!1;var p=!1;function b(t){l("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!d&&(l("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){l("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),v()}function y(){l("onfinish"),e.removeListener("close",g),v()}function v(){l("unpipe"),n.unpipe(e)}return n.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",y),e.emit("pipe",n),o.flowing||(l("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?i:o.nextTick;y.WritableState=g;var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var u={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,l=n.Uint8Array||function(){};var p,b=e("./internal/streams/destroy");function m(){}function g(t,r){a=a||e("./_stream_duplex"),t=t||{};var n=r instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,r,n,t,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?f(_,e,r,s,i):_(e,r,s,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(t){if(a=a||e("./_stream_duplex"),!(p.call(y,this)||this instanceof a))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function v(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,f=!0;r;)i[a]=r,r.isBuf||(f=!1),r=r.next,a+=1;i.allBuffers=f,v(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,h=r.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,u,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(A,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(y,h),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof g)}})):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof l);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=m),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=b.destroy,y.prototype._undestroy=b.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":13,"./internal/streams/destroy":19,"./internal/streams/stream":20,_process:11,"core-util-is":4,inherits:7,"process-nextick-args":10,"safe-buffer":21,timers:30,"util-deprecate":31}],18:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":21,util:2}],19:[function(e,t,r){"use strict";var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":10}],20:[function(e,t,r){t.exports=e("events").EventEmitter},{events:5}],21:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:3}],22:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":21}],23:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":24}],24:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":13,"./lib/_stream_passthrough.js":14,"./lib/_stream_readable.js":15,"./lib/_stream_transform.js":16,"./lib/_stream_writable.js":17}],25:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":24}],26:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":17}],27:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:3}],28:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",f));var s=!1;function a(){s||(s=!0,e.end())}function f(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",f),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}},{events:5,inherits:7,"readable-stream/duplex.js":12,"readable-stream/passthrough.js":23,"readable-stream/readable.js":24,"readable-stream/transform.js":25,"readable-stream/writable.js":26}],29:[function(e,t,r){arguments[4][22][0].apply(r,arguments)},{dup:22,"safe-buffer":27}],30:[function(e,t,r){(function(t,n){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,a={},f=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=f++,n=!(arguments.length<2)&&s.call(arguments,1);return a[t]=!0,i(function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":11,timers:30}],31:[function(e,t,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],32:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer;t.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,u=new Uint8Array(s);e[r];){var h=t[e.charCodeAt(r)];if(255===h)return;for(var d=0,l=s-1;(0!==h||d>>0,u[l]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=d,r++}if(" "!==e[r]){for(var p=s-o;p!==s&&0===u[p];)p++;var b=n.allocUnsafe(i+(s-p));b.fill(0,0,i);for(var m=i;p!==s;)b[m++]=u[p++];return b}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,s=t.length;o!==s&&0===t[o];)o++,r++;for(var c=(s-o)*u+1>>>0,h=new Uint8Array(c);o!==s;){for(var d=t[o],l=0,p=c-1;(0!==d||l>>0,h[p]=d%a>>>0,d=d/a>>>0;if(0!==d)throw new Error("Non-zero carry");i=l,o++}for(var b=c-i;b!==c&&0===h[b];)b++;for(var m=f.repeat(r);b>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function f(e){for(var t=1,r=0;r126)throw new Error("Invalid prefix ("+e+")");t=a(t)^n>>5}for(t=a(t),r=0;r=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<=t)throw new Error("Excess padding");if(i<t)throw new TypeError("Exceeds length limit");var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)throw new Error("Mixed-case string "+e);var o=(e=r).lastIndexOf("1");if(-1===o)throw new Error("No separator character for "+e);if(0===o)throw new Error("Missing prefix for "+e);var s=e.slice(0,o),c=e.slice(o+1);if(c.length<6)throw new Error("Data too short");for(var u=f(s),h=[],d=0;d=c.length||h.push(p)}if(1!==u)throw new Error("Invalid checksum for "+e);return{prefix:s,words:h}},encode:function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");for(var i=f(e=e.toLowerCase()),o=e+"1",s=0;s>5!=0)throw new Error("Non 5-bit word");i=a(i)^c,o+=n.charAt(c)}for(s=0;s<6;++s)i=a(i);for(i^=1,s=0;s<6;++s){var u=i>>5*(5-s)&31;o+=n.charAt(u)}return o},toWords:function(e){return c(e,8,5,!0)},fromWords:function(e){return c(e,5,8,!1)}}},{}],34:[function(e,t,r){var n=e("safe-buffer").Buffer;t.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},{"safe-buffer":234}],35:[function(e,t,r){t.exports={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}},{}],36:[function(e,t,r){var n=e("./index.json"),i={};for(var o in n){i[n[o]]=o}t.exports=i},{"./index.json":35}],37:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("bech32"),o=e("bs58check"),s=e("./script"),a=e("./templates"),f=e("./networks"),c=e("typeforce"),u=e("./types");function h(e){var t=o.decode(e);if(t.length<21)throw new TypeError(e+" is too short");if(t.length>21)throw new TypeError(e+" is too long");return{version:t.readUInt8(0),hash:t.slice(1)}}function d(e){var t=i.decode(e),r=i.fromWords(t.words.slice(1));return{version:t.words[0],prefix:t.prefix,data:n.from(r)}}function l(e,t){c(u.tuple(u.Hash160bit,u.UInt8),arguments);var r=n.allocUnsafe(21);return r.writeUInt8(t,0),e.copy(r,1),o.encode(r)}function p(e,t,r){var n=i.toWords(e);return n.unshift(t),i.encode(r,n)}t.exports={fromBase58Check:h,fromBech32:d,fromOutputScript:function(e,t){if(t=t||f.bitcoin,a.pubKeyHash.output.check(e))return l(s.compile(e).slice(3,23),t.pubKeyHash);if(a.scriptHash.output.check(e))return l(s.compile(e).slice(2,22),t.scriptHash);if(a.witnessPubKeyHash.output.check(e))return p(s.compile(e).slice(2,22),0,t.bech32);if(a.witnessScriptHash.output.check(e))return p(s.compile(e).slice(2,34),0,t.bech32);throw new Error(s.toASM(e)+" has no matching Address")},toBase58Check:l,toBech32:p,toOutputScript:function(e,t){var r;t=t||f.bitcoin;try{r=h(e)}catch(e){}if(r){if(r.version===t.pubKeyHash)return a.pubKeyHash.output.encode(r.hash);if(r.version===t.scriptHash)return a.scriptHash.output.encode(r.hash)}else{try{r=d(e)}catch(e){}if(r){if(r.prefix!==t.bech32)throw new Error(e+" has an invalid prefix");if(0===r.version){if(20===r.data.length)return a.witnessPubKeyHash.output.encode(r.data);if(32===r.data.length)return a.witnessScriptHash.output.encode(r.data)}}}throw new Error(e+" has no matching Script")}}},{"./networks":38,"./script":39,"./templates":41,"./types":63,bech32:33,bs58check:68,"safe-buffer":234,typeforce:251}],38:[function(e,t,r){t.exports={bitcoin:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},testnet:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},litecoin:{messagePrefix:"Litecoin Signed Message:\n",bip32:{public:27108450,private:27106558},pubKeyHash:48,scriptHash:50,wif:176}}},{}],39:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("bip66"),o=e("pushdata-bitcoin"),s=e("typeforce"),a=e("./types"),f=e("./script_number"),c=e("bitcoin-ops"),u=e("bitcoin-ops/map"),h=c.OP_RESERVED;function d(e){return a.Buffer(e)||function(e){return a.Number(e)&&(e===c.OP_0||e>=c.OP_1&&e<=c.OP_16||e===c.OP_1NEGATE)}(e)}function l(e){return a.Array(e)&&e.every(d)}function p(e){return 0===e.length?c.OP_0:1===e.length?e[0]>=1&&e[0]<=16?h+e[0]:129===e[0]?c.OP_1NEGATE:void 0:void 0}function b(e){if(n.isBuffer(e))return e;s(a.Array,e);var t=e.reduce(function(e,t){return n.isBuffer(t)?1===t.length&&void 0!==p(t)?e+1:e+o.encodingLength(t.length)+t.length:e+1},0),r=n.allocUnsafe(t),i=0;if(e.forEach(function(e){if(n.isBuffer(e)){var t=p(e);if(void 0!==t)return r.writeUInt8(t,i),void(i+=1);i+=o.encode(r,e.length,i),e.copy(r,i),i+=e.length}else r.writeUInt8(e,i),i+=1}),i!==r.length)throw new Error("Could not decode chunks");return r}function m(e){if(a.Array(e))return e;s(a.Buffer,e);for(var t=[],r=0;rc.OP_0&&n<=c.OP_PUSHDATA4){var i=o.decode(e,r);if(null===i)return[];if((r+=i.size)+i.number>e.length)return[];var f=e.slice(r,r+i.number);r+=i.number;var u=p(f);void 0!==u?t.push(u):t.push(f)}else t.push(n),r+=1}return t}function g(e){var t=-129&e;return t>0&&t<4}t.exports={compile:b,decompile:m,fromASM:function(e){return s(a.String,e),b(e.split(" ").map(function(e){return void 0!==c[e]?c[e]:(s(a.Hex,e),n.from(e,"hex"))}))},toASM:function(e){return n.isBuffer(e)&&(e=m(e)),e.map(function(e){if(n.isBuffer(e)){var t=p(e);if(void 0===t)return e.toString("hex");e=t}return u[e]}).join(" ")},toStack:function(e){return e=m(e),s(l,e),e.map(function(e){return n.isBuffer(e)?e:e===c.OP_0?n.allocUnsafe(0):f.encode(e-h)})},number:e("./script_number"),isCanonicalPubKey:function(e){if(!n.isBuffer(e))return!1;if(e.length<33)return!1;switch(e[0]){case 2:case 3:return 33===e.length;case 4:return 65===e.length}return!1},isCanonicalSignature:function(e){return!!n.isBuffer(e)&&!!g(e[e.length-1])&&i.check(e.slice(0,-1))},isPushOnly:l,isDefinedHashType:g}},{"./script_number":40,"./types":63,bip66:34,"bitcoin-ops":35,"bitcoin-ops/map":36,"pushdata-bitcoin":232,"safe-buffer":234,typeforce:251}],40:[function(e,t,r){var n=e("safe-buffer").Buffer;t.exports={decode:function(e,t,r){t=t||4,r=void 0===r||r;var n=e.length;if(0===n)return 0;if(n>t)throw new TypeError("Script number overflow");if(r&&0==(127&e[n-1])&&(n<=1||0==(128&e[n-2])))throw new Error("Non-minimally encoded script number");if(5===n){var i=e.readUInt32LE(0),o=e.readUInt8(4);return 128&o?-(4294967296*(-129&o)+i):4294967296*o+i}for(var s=0,a=0;a2147483647?5:e>8388607?4:e>32767?3:e>127?2:e>0?1:0}(t),i=n.allocUnsafe(r),o=e<0,s=0;s>=8;return 128&i[r-1]?i.writeUInt8(o?128:0,r-1):o&&(i[r-1]|=128),i}}},{"safe-buffer":234}],41:[function(e,t,r){var n=e("../script").decompile,i=e("./multisig"),o=e("./nulldata"),s=e("./pubkey"),a=e("./pubkeyhash"),f=e("./scripthash"),c=e("./witnesspubkeyhash"),u=e("./witnessscripthash"),h=e("./witnesscommitment"),d={MULTISIG:"multisig",NONSTANDARD:"nonstandard",NULLDATA:"nulldata",P2PK:"pubkey",P2PKH:"pubkeyhash",P2SH:"scripthash",P2WPKH:"witnesspubkeyhash",P2WSH:"witnessscripthash",WITNESS_COMMITMENT:"witnesscommitment"};t.exports={classifyInput:function(e,t){var r=n(e);return a.input.check(r)?d.P2PKH:f.input.check(r,t)?d.P2SH:i.input.check(r,t)?d.MULTISIG:s.input.check(r)?d.P2PK:d.NONSTANDARD},classifyOutput:function(e){if(c.output.check(e))return d.P2WPKH;if(u.output.check(e))return d.P2WSH;if(a.output.check(e))return d.P2PKH;if(f.output.check(e))return d.P2SH;var t=n(e);return i.output.check(t)?d.MULTISIG:s.output.check(t)?d.P2PK:h.output.check(t)?d.WITNESS_COMMITMENT:o.output.check(t)?d.NULLDATA:d.NONSTANDARD},classifyWitness:function(e,t){var r=n(e);return c.input.check(r)?d.P2WPKH:u.input.check(r,t)?d.P2WSH:d.NONSTANDARD},multisig:i,nullData:o,pubKey:s,pubKeyHash:a,scriptHash:f,witnessPubKeyHash:c,witnessScriptHash:u,witnessCommitment:h,types:d}},{"../script":39,"./multisig":42,"./nulldata":45,"./pubkey":46,"./pubkeyhash":49,"./scripthash":52,"./witnesscommitment":55,"./witnesspubkeyhash":57,"./witnessscripthash":60}],42:[function(e,t,r){t.exports={input:e("./input"),output:e("./output")}},{"./input":43,"./output":44}],43:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("../../script"),o=e("./output"),s=e("typeforce"),a=e("bitcoin-ops");function f(e){return e===a.OP_0||i.isCanonicalSignature(e)}function c(e,t){var r=i.decompile(e);return!(r.length<2)&&(r[0]===a.OP_0&&(t?r.slice(1).every(f):r.slice(1).every(i.isCanonicalSignature)))}c.toJSON=function(){return"multisig input"};var u=n.allocUnsafe(0);function h(e,t){if(s([f],e),t){var r=o.decode(t);if(e.lengthr.pubKeys.length)throw new TypeError("Too many signatures provided")}return[].concat(u,e.map(function(e){return e===a.OP_0?u:e}))}function d(e,t){return s(s.Array,e),s(c,e,t),e.slice(1)}t.exports={check:c,decode:function(e,t){return d(i.decompile(e),t)},decodeStack:d,encode:function(e,t){return i.compile(h(e,t))},encodeStack:h}},{"../../script":39,"./output":44,"bitcoin-ops":35,"safe-buffer":234,typeforce:251}],44:[function(e,t,r){var n=e("../../script"),i=e("../../types"),o=e("typeforce"),s=e("bitcoin-ops"),a=s.OP_RESERVED;function f(e,t){var r=n.decompile(e);if(r.length<4)return!1;if(r[r.length-1]!==s.OP_CHECKMULTISIG)return!1;if(!i.Number(r[0]))return!1;if(!i.Number(r[r.length-2]))return!1;var o=r[0]-a,f=r[r.length-2]-a;return!(o<=0)&&(!(f>16)&&(!(o>f)&&(f===r.length-3&&(!!t||r.slice(1,-2).every(n.isCanonicalPubKey)))))}f.toJSON=function(){return"multi-sig output"},t.exports={check:f,decode:function(e,t){var r=n.decompile(e);return o(f,r,t),{m:r[0]-a,pubKeys:r.slice(1,-2)}},encode:function(e,t){o({m:i.Number,pubKeys:[n.isCanonicalPubKey]},{m:e,pubKeys:t});var r=t.length;if(r1&&t[0]===s.OP_RETURN}a.toJSON=function(){return"null data output"},t.exports={output:{check:a,decode:function(e){return o(a,e),e.slice(2)},encode:function(e){return o(i.Buffer,e),n.compile([s.OP_RETURN,e])}}}},{"../script":39,"../types":63,"bitcoin-ops":35,typeforce:251}],46:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{"./input":47,"./output":48,dup:42}],47:[function(e,t,r){var n=e("../../script"),i=e("typeforce");function o(e){var t=n.decompile(e);return 1===t.length&&n.isCanonicalSignature(t[0])}function s(e){return i(n.isCanonicalSignature,e),[e]}function a(e){return i(i.Array,e),i(o,e),e[0]}o.toJSON=function(){return"pubKey input"},t.exports={check:o,decode:function(e){return a(n.decompile(e))},decodeStack:a,encode:function(e){return n.compile(s(e))},encodeStack:s}},{"../../script":39,typeforce:251}],48:[function(e,t,r){var n=e("../../script"),i=e("typeforce"),o=e("bitcoin-ops");function s(e){var t=n.decompile(e);return 2===t.length&&n.isCanonicalPubKey(t[0])&&t[1]===o.OP_CHECKSIG}s.toJSON=function(){return"pubKey output"},t.exports={check:s,decode:function(e){var t=n.decompile(e);return i(s,t),t[0]},encode:function(e){return i(n.isCanonicalPubKey,e),n.compile([e,o.OP_CHECKSIG])}}},{"../../script":39,"bitcoin-ops":35,typeforce:251}],49:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{"./input":50,"./output":51,dup:42}],50:[function(e,t,r){var n=e("../../script"),i=e("typeforce");function o(e){var t=n.decompile(e);return 2===t.length&&n.isCanonicalSignature(t[0])&&n.isCanonicalPubKey(t[1])}function s(e,t){return i({signature:n.isCanonicalSignature,pubKey:n.isCanonicalPubKey},{signature:e,pubKey:t}),[e,t]}function a(e){return i(i.Array,e),i(o,e),{signature:e[0],pubKey:e[1]}}o.toJSON=function(){return"pubKeyHash input"},t.exports={check:o,decode:function(e){return a(n.decompile(e))},decodeStack:a,encode:function(e,t){return n.compile(s(e,t))},encodeStack:s}},{"../../script":39,typeforce:251}],51:[function(e,t,r){var n=e("../../script"),i=e("../../types"),o=e("typeforce"),s=e("bitcoin-ops");function a(e){var t=n.compile(e);return 25===t.length&&t[0]===s.OP_DUP&&t[1]===s.OP_HASH160&&20===t[2]&&t[23]===s.OP_EQUALVERIFY&&t[24]===s.OP_CHECKSIG}a.toJSON=function(){return"pubKeyHash output"},t.exports={check:a,decode:function(e){return o(a,e),e.slice(3,23)},encode:function(e){return o(i.Hash160bit,e),n.compile([s.OP_DUP,s.OP_HASH160,e,s.OP_EQUALVERIFY,s.OP_CHECKSIG])}}},{"../../script":39,"../../types":63,"bitcoin-ops":35,typeforce:251}],52:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{"./input":53,"./output":54,dup:42}],53:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("../../script"),o=e("typeforce"),s=e("../multisig/"),a=e("../pubkey/"),f=e("../pubkeyhash/"),c=e("../witnesspubkeyhash/output"),u=e("../witnessscripthash/output");function h(e,t){var r=i.decompile(e);if(r.length<1)return!1;var o=r[r.length-1];if(!n.isBuffer(o))return!1;var h=i.decompile(i.compile(r.slice(0,-1))),d=i.decompile(o);return 0!==d.length&&(!!i.isPushOnly(h)&&(1===r.length?u.check(d)||c.check(d):!(!f.input.check(h)||!f.output.check(d))||(!(!s.input.check(h,t)||!s.output.check(d))||!(!a.input.check(h)||!a.output.check(d)))))}function d(e,t){var r=i.compile(t);return[].concat(e,r)}function l(e){return o(o.Array,e),o(h,e),{redeemScriptStack:e.slice(0,-1),redeemScript:e[e.length-1]}}h.toJSON=function(){return"scriptHash input"},t.exports={check:h,decode:function(e){var t=l(i.decompile(e));return t.redeemScriptSig=i.compile(t.redeemScriptStack),delete t.redeemScriptStack,t},decodeStack:l,encode:function(e,t){var r=i.decompile(e);return i.compile(d(r,t))},encodeStack:d}},{"../../script":39,"../multisig/":42,"../pubkey/":46,"../pubkeyhash/":49,"../witnesspubkeyhash/output":59,"../witnessscripthash/output":62,"safe-buffer":234,typeforce:251}],54:[function(e,t,r){var n=e("../../script"),i=e("../../types"),o=e("typeforce"),s=e("bitcoin-ops");function a(e){var t=n.compile(e);return 23===t.length&&t[0]===s.OP_HASH160&&20===t[1]&&t[22]===s.OP_EQUAL}a.toJSON=function(){return"scriptHash output"},t.exports={check:a,decode:function(e){return o(a,e),e.slice(2,22)},encode:function(e){return o(i.Hash160bit,e),n.compile([s.OP_HASH160,e,s.OP_EQUAL])}}},{"../../script":39,"../../types":63,"bitcoin-ops":35,typeforce:251}],55:[function(e,t,r){t.exports={output:e("./output")}},{"./output":56}],56:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("../../script"),o=e("../../types"),s=e("typeforce"),a=e("bitcoin-ops"),f=n.from("aa21a9ed","hex");function c(e){var t=i.compile(e);return t.length>37&&t[0]===a.OP_RETURN&&36===t[1]&&t.slice(2,6).equals(f)}c.toJSON=function(){return"Witness commitment output"},t.exports={check:c,decode:function(e){return s(c,e),i.decompile(e)[1].slice(4,36)},encode:function(e){s(o.Hash256bit,e);var t=n.allocUnsafe(36);return f.copy(t,0),e.copy(t,4),i.compile([a.OP_RETURN,t])}}},{"../../script":39,"../../types":63,"bitcoin-ops":35,"safe-buffer":234,typeforce:251}],57:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{"./input":58,"./output":59,dup:42}],58:[function(e,t,r){var n=e("../../script"),i=e("typeforce");function o(e){return n.isCanonicalPubKey(e)&&33===e.length}function s(e){var t=n.decompile(e);return 2===t.length&&n.isCanonicalSignature(t[0])&&o(t[1])}s.toJSON=function(){return"witnessPubKeyHash input"},t.exports={check:s,decodeStack:function(e){return i(i.Array,e),i(s,e),{signature:e[0],pubKey:e[1]}},encodeStack:function(e,t){return i({signature:n.isCanonicalSignature,pubKey:o},{signature:e,pubKey:t}),[e,t]}}},{"../../script":39,typeforce:251}],59:[function(e,t,r){var n=e("../../script"),i=e("../../types"),o=e("typeforce"),s=e("bitcoin-ops");function a(e){var t=n.compile(e);return 22===t.length&&t[0]===s.OP_0&&20===t[1]}a.toJSON=function(){return"Witness pubKeyHash output"},t.exports={check:a,decode:function(e){return o(a,e),e.slice(2)},encode:function(e){return o(i.Hash160bit,e),n.compile([s.OP_0,e])}}},{"../../script":39,"../../types":63,"bitcoin-ops":35,typeforce:251}],60:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{"./input":61,"./output":62,dup:42}],61:[function(e,t,r){(function(r){var n=e("../../script"),i=e("../../types"),o=e("typeforce"),s=e("../multisig/"),a=e("../pubkey/"),f=e("../pubkeyhash/");function c(e,t){if(o(i.Array,e),e.length<1)return!1;var c=e[e.length-1];if(!r.isBuffer(c))return!1;var u=n.decompile(c);if(0===u.length)return!1;var h=n.compile(e.slice(0,-1));return!(!f.input.check(h)||!f.output.check(u))||(!(!s.input.check(h,t)||!s.output.check(u))||!(!a.input.check(h)||!a.output.check(u)))}c.toJSON=function(){return"witnessScriptHash input"},t.exports={check:c,decodeStack:function(e){return o(o.Array,e),o(c,e),{witnessData:e.slice(0,-1),witnessScript:e[e.length-1]}},encodeStack:function(e,t){return o({witnessData:[i.Buffer],witnessScript:i.Buffer},{witnessData:e,witnessScript:t}),[].concat(e,t)}}}).call(this,{isBuffer:e("C:/Users/Hamza/AppData/Roaming/npm/node_modules/browserify/node_modules/is-buffer/index.js")})},{"../../script":39,"../../types":63,"../multisig/":42,"../pubkey/":46,"../pubkeyhash/":49,"C:/Users/Hamza/AppData/Roaming/npm/node_modules/browserify/node_modules/is-buffer/index.js":8,typeforce:251}],62:[function(e,t,r){var n=e("../../script"),i=e("../../types"),o=e("typeforce"),s=e("bitcoin-ops");function a(e){var t=n.compile(e);return 34===t.length&&t[0]===s.OP_0&&32===t[1]}a.toJSON=function(){return"Witness scriptHash output"},t.exports={check:a,decode:function(e){return o(a,e),e.slice(2)},encode:function(e){return o(i.Hash256bit,e),n.compile([s.OP_0,e])}}},{"../../script":39,"../../types":63,"bitcoin-ops":35,typeforce:251}],63:[function(e,t,r){var n=e("typeforce"),i=Math.pow(2,31)-1;function o(e){return n.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}o.toJSON=function(){return"BIP32 derivation path"};var s=21e14;var a=n.quacksLike("BigInteger"),f=n.quacksLike("Point"),c=n.compile({r:a,s:a}),u=n.compile({messagePrefix:n.oneOf(n.Buffer,n.String),bip32:{public:n.UInt32,private:n.UInt32},pubKeyHash:n.UInt8,scriptHash:n.UInt8,wif:n.UInt8}),h={BigInt:a,BIP32Path:o,Buffer256bit:n.BufferN(32),ECPoint:f,ECSignature:c,Hash160bit:n.BufferN(20),Hash256bit:n.BufferN(32),Network:u,Satoshi:function(e){return n.UInt53(e)&&e<=s},UInt31:function(e){return n.UInt32(e)&&e<=i}};for(var d in n)h[d]=n[d];t.exports=h},{typeforce:251}],64:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;try{s=e("buffer").Buffer}catch(e){}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function f(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,f=s/67108864|0;r.words[0]=a;for(var c=1;c>>26,h=67108863&f,d=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=d;l++){var p=c-l|0;u+=(s=(i=0|e.words[p])*(o=0|t.words[l])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,f=0|u}return 0!==f?r.words[c]=0|f:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=u[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(e);r=(p=p.idivn(l)).isZero()?b+r:c[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,f="le"===t,c=new e(o),u=this.clone();if(f){for(a=0;!u.isZero();a++)s=u.andln(255),u.iushrn(8),c[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,l=0|s[1],p=8191&l,b=l>>>13,m=0|s[2],g=8191&m,y=m>>>13,v=0|s[3],_=8191&v,w=v>>>13,E=0|s[4],A=8191&E,S=E>>>13,I=0|s[5],M=8191&I,x=I>>>13,P=0|s[6],k=8191&P,O=P>>>13,L=0|s[7],T=8191&L,N=L>>>13,B=0|s[8],j=8191&B,R=B>>>13,C=0|s[9],D=8191&C,U=C>>>13,K=0|a[0],z=8191&K,q=K>>>13,H=0|a[1],V=8191&H,F=H>>>13,G=0|a[2],Y=8191&G,W=G>>>13,J=0|a[3],Z=8191&J,X=J>>>13,$=0|a[4],Q=8191&$,ee=$>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],fe=8191&ae,ce=ae>>>13,ue=0|a[8],he=8191&ue,de=ue>>>13,le=0|a[9],pe=8191&le,be=le>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(b,z)|0,o=Math.imul(b,q);var ge=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,F)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,F)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,q))+Math.imul(y,z)|0,o=Math.imul(y,q),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,F)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,F)|0;var ye=(c+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,q))+Math.imul(w,z)|0,o=Math.imul(w,q),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,F)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,F)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,W)|0;var ve=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,q))+Math.imul(S,z)|0,o=Math.imul(S,q),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,F)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,F)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0;var _e=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,q))+Math.imul(x,z)|0,o=Math.imul(x,q),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,F)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,F)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var we=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,F)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,F)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Ee=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,q))+Math.imul(N,z)|0,o=Math.imul(N,q),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,F)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,F)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var Ae=(c+(n=n+Math.imul(h,fe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,q))+Math.imul(R,z)|0,o=Math.imul(R,q),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,F)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,F)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,ce)|0;var Se=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,F)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,F)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,de)|0;var Ie=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,be)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,V),i=(i=Math.imul(D,F))+Math.imul(U,V)|0,o=Math.imul(U,F),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(g,he)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,Y),i=(i=Math.imul(D,W))+Math.imul(U,Y)|0,o=Math.imul(U,W),n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(_,he)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(w,he)|0,o=o+Math.imul(w,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,be)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,X))+Math.imul(U,Z)|0,o=Math.imul(U,X),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(S,he)|0,o=o+Math.imul(S,de)|0;var Pe=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,be)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(U,Q)|0,o=Math.imul(U,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var ke=(c+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,be)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(k,he)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(U,oe)|0,o=Math.imul(U,se),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Le=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,ce))+Math.imul(U,fe)|0,o=Math.imul(U,ce),n=n+Math.imul(j,he)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,de)|0;var Te=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,he),i=(i=Math.imul(D,de))+Math.imul(U,he)|0,o=Math.imul(U,de);var Ne=(c+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,be))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,be))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=me,f[1]=ge,f[2]=ye,f[3]=ve,f[4]=_e,f[5]=we,f[6]=Ee,f[7]=Ae,f[8]=Se,f[9]=Ie,f[10]=Me,f[11]=xe,f[12]=Pe,f[13]=ke,f[14]=Oe,f[15]=Le,f[16]=Te,f[17]=Ne,f[18]=Be,0!==c&&(f[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(l=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?l(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&a}return f&&0!==u&&(f.words[f.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,f=n.length-i.length;if("mod"!==t){(a=new o(null)).length=f+1,a.words=new Array(a.length);for(var c=0;c=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),f=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,l=1;0==(t.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||f.isOdd())&&(a.iadd(u),f.isub(h)),a.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(f)):(r.isub(t),a.isub(i),f.isub(s))}return{a:a,b:f,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(y,g),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new v;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),f=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(f);)u.redIAdd(f);for(var h=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=s;0!==l.cmp(a);){for(var b=l,m=0;0!==b.cmp(a);m++)b=b.redSqr();n(m=0;n--){for(var c=t.words[n],u=f-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}f=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,E),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:2}],65:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=f;t--)c=(c<<1)+n[t];s.push(c)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(f=0;f=0;c--){for(t=0;c>=0&&0===s[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=s[c];a(0!==u),f="affine"===e.type?u>0?f.mixedAdd(i[u-1>>1]):f.mixedAdd(i[-u-1>>1].neg()):u>0?f.add(i[u-1>>1]):f.add(i[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var a=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,h=0;h=1;h-=2){var l=h-1,p=h;if(1===a[l]&&1===a[p]){var b=[t[l],null,null,t[p]];0===t[l].y.cmp(t[p].y)?(b[1]=t[l].add(t[p]),b[2]=t[l].toJ().mixedAdd(t[p].neg())):0===t[l].y.cmp(t[p].y.redNeg())?(b[1]=t[l].toJ().mixedAdd(t[p]),b[2]=t[l].add(t[p].neg())):(b[1]=t[l].toJ().mixedAdd(t[p]),b[2]=t[l].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],g=s(r[l],r[p]);u=Math.max(g[0].length,u),c[l]=new Array(u),c[p]=new Array(u);for(var y=0;y=0;h--){for(var A=0;h>=0;){var S=!0;for(y=0;y=0&&A++,w=w.dblp(A),h<0)break;for(y=0;y0?I=f[y][M-1>>1]:M<0&&(I=f[y][-M-1>>1].neg()),w="affine"===I.type?w.mixedAdd(I):w.add(I))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),f=i.redMul(s),c=o.redMul(a),u=i.redMul(a),h=s.redMul(o);return this.curve.point(f,c,h,u)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),t=s.redMul(c.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),f=s.redSub(a).redISub(a);e=n.redSub(i).redISub(o).redMul(f),t=s.redMul(c.redSub(o)),r=s.redMul(f)}}else{var c=i.redAdd(o);a=this.curve._mulC(this.z).redSqr(),f=c.redSub(a).redSub(a);e=this.curve._mulC(n.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),f=r.redAdd(t),c=o.redMul(s),u=a.redMul(f),h=o.redMul(f),d=s.redMul(a);return this.curve.point(c,u,d,h)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),f=i.redSub(a),c=i.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=n.redMul(f).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=f.redMul(c)):(t=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(f).redMul(c)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},{"../utils":104,"./base":91,"bn.js":64,inherits:120}],93:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":91,"./edwards":92,"./mont":94,"./short":95}],94:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("inherits"),o=e("./base"),s=e("../utils");function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new f(this,e,t)},a.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),f=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":104,"./base":91,"bn.js":64,inherits:120}],95:[function(e,t,r){"use strict";var n=e("../utils"),i=e("bn.js"),o=e("inherits"),s=e("./base"),a=n.assert;function f(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(f,s),t.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,f,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new i(1),b=new i(0),m=new i(0),g=new i(1),y=0;0!==d.cmpn(0);){var v=l.div(d);c=l.sub(v.mul(d)),u=m.sub(v.mul(p));var _=g.sub(v.mul(b));if(!n&&c.cmp(h)<0)t=f.neg(),r=p,n=c.neg(),o=u;else if(n&&2==++y)break;f=c,l=d,d=c,m=p,p=u,g=b,b=_}s=c.neg(),a=u;var w=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),f=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:f.add(c).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,s.BasePoint),f.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),f=o.redSub(s);if(0===a.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),h=n.redMul(c),d=f.redSqr().redIAdd(u).redISub(h).redISub(h),l=f.redMul(h.redISub(d)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,l,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),c=f.redMul(s),u=r.redMul(f),h=a.redSqr().redIAdd(c).redISub(u).redISub(u),d=a.redMul(u.redISub(h)).redISub(i.redMul(c)),l=this.z.redMul(s);return this.curve.jpoint(h,d,l)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":104,"./base":91,"bn.js":64,inherits:120}],96:[function(e,t,r){"use strict";var n,i=r,o=e("hash.js"),s=e("./curve"),a=e("./utils").assert;function f(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":93,"./precomputed/secp256k1":103,"./utils":104,"hash.js":107}],97:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("hmac-drbg"),o=e("../utils"),s=e("../curves"),a=e("brorand"),f=o.assert,c=e("./key"),u=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(f(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=h,h.prototype.keyPair=function(e){return new c(this,e)},h.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),f=e.toArray("be",s),c=new i({hash:this.hash,entropy:a,nonce:f,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),d=0;;d++){var l=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),m=b.umod(this.n);if(0!==m.cmpn(0)){var g=l.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(m)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new u({r:m,s:g,recoveryParam:y})}}}}}},h.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,f=s.invm(this.n),c=f.mul(e).umod(this.n),h=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,t,r,i){f((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,s=new n(e),a=t.r,c=t.s,h=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var l=t.r.invm(o),p=o.sub(s).mul(l).umod(o),b=c.mul(l).umod(o);return this.g.mulAdd(p,a,b)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../curves":96,"../utils":104,"./key":98,"./signature":99,"bn.js":64,brorand:65,"hmac-drbg":119}],98:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../utils":104,"bn.js":64}],99:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("../utils"),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,s=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}t.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(a(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=a(e,r),s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var f=a(e,r);if(e.length!==f+r.place)return!1;var c=e.slice(r.place,f+r.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(s),this.s=new n(c),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,e)}},{"../utils":104,"bn.js":64}],100:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("../curves"),o=e("../utils"),s=o.assert,a=o.parseBytes,f=e("./key"),c=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=u,u.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},u.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(i>>1)-1?(i>>1)-f:f,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,s,a,f=e.andln(3)+n&3,c=t.andln(3)+i&3;3===f&&(f=-1),3===c&&(c=-1),o=0==(1&f)?0:3!=(a=e.andln(7)+n&7)&&5!==a||2!==c?f:-f,r[0].push(o),s=0==(1&c)?0:3!=(a=t.andln(7)+i&7)&&5!==a||2!==f?c:-c,r[1].push(s),2*n===o+1&&(n=1-n),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":64,"minimalistic-assert":230,"minimalistic-crypto-utils":231}],105:[function(e,t,r){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.5.2",_inBundle:!1,_integrity:"sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz",_shasum:"05c5678d7173c049d8ca433552224a495d0e3762",_spec:"elliptic@^6.0.0",_where:"D:\\Projects\\RN\\sifir-app\\node_modules\\browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.5.2"}},{}],106:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("stream").Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:120,"safe-buffer":234,stream:28}],107:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":108,"./hash/hmac":109,"./hash/ripemd":110,"./hash/sha":111,"./hash/utils":118}],108:[function(e,t,r){"use strict";var n=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":118}],118:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits");function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,s,a){var f=0,c=t;return f+=(c=c+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,s,a,f,c){var u=0,h=t;return u+=(h=h+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,s,a,f,c){return t+n+o+a+c>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:120,"minimalistic-assert":230}],119:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}t.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length-1&&e%1==0&&e-1}},{"./_assocIndexOf":137}],193:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},{"./_assocIndexOf":137}],194:[function(e,t,r){var n=e("./_Hash"),i=e("./_ListCache"),o=e("./_Map");t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},{"./_Hash":122,"./_ListCache":123,"./_Map":124}],195:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},{"./_getMapData":169}],196:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).get(e)}},{"./_getMapData":169}],197:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).has(e)}},{"./_getMapData":169}],198:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},{"./_getMapData":169}],199:[function(e,t,r){var n=e("./_getNative")(Object,"create");t.exports=n},{"./_getNative":170}],200:[function(e,t,r){var n=e("./_overArg")(Object.keys,Object);t.exports=n},{"./_overArg":204}],201:[function(e,t,r){t.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},{}],202:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=a},{"./_freeGlobal":166}],203:[function(e,t,r){var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},{}],204:[function(e,t,r){t.exports=function(e,t){return function(r){return e(t(r))}}},{}],205:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},{"./_freeGlobal":166}],206:[function(e,t,r){var n=e("./_ListCache");t.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":123}],207:[function(e,t,r){t.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},{}],208:[function(e,t,r){t.exports=function(e){return this.__data__.get(e)}},{}],209:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],210:[function(e,t,r){var n=e("./_ListCache"),i=e("./_Map"),o=e("./_MapCache"),s=200;t.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length-1&&e%1==0&&e<=n}},{}],220:[function(e,t,r){var n=e("./_baseIsMap"),i=e("./_baseUnary"),o=e("./_nodeUtil"),s=o&&o.isMap,a=s?i(s):n;t.exports=a},{"./_baseIsMap":146,"./_baseUnary":153,"./_nodeUtil":202}],221:[function(e,t,r){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},{}],222:[function(e,t,r){t.exports=function(e){return null!=e&&"object"==typeof e}},{}],223:[function(e,t,r){var n=e("./_baseIsSet"),i=e("./_baseUnary"),o=e("./_nodeUtil"),s=o&&o.isSet,a=s?i(s):n;t.exports=a},{"./_baseIsSet":148,"./_baseUnary":153,"./_nodeUtil":202}],224:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),o=e("./_nodeUtil"),s=o&&o.isTypedArray,a=s?i(s):n;t.exports=a},{"./_baseIsTypedArray":149,"./_baseUnary":153,"./_nodeUtil":202}],225:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),o=e("./isArrayLike");t.exports=function(e){return o(e)?n(e):i(e)}},{"./_arrayLikeKeys":134,"./_baseKeys":150,"./isArrayLike":216}],226:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeysIn"),o=e("./isArrayLike");t.exports=function(e){return o(e)?n(e,!0):i(e)}},{"./_arrayLikeKeys":134,"./_baseKeysIn":151,"./isArrayLike":216}],227:[function(e,t,r){t.exports=function(){return[]}},{}],228:[function(e,t,r){t.exports=function(){return!1}},{}],229:[function(e,t,r){"use strict";var n=e("inherits"),i=e("hash-base"),o=e("safe-buffer").Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function c(e,t,r,n,i,o,s){return f(e+(t&r|~t&n)+i+o|0,s)+t|0}function u(e,t,r,n,i,o,s){return f(e+(t&n|r&~n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return f(e+(t^r^n)+i+o|0,s)+t|0}function d(e,t,r,n,i,o,s){return f(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;n=d(n=d(n=d(n=d(n=h(n=h(n=h(n=h(n=u(n=u(n=u(n=u(n=c(n=c(n=c(n=c(n,i=c(i,o=c(o,r=c(r,n,i,o,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),o,r,e[3],3250441966,22),i=c(i,o=c(o,r=c(r,n,i,o,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),o,r,e[7],4249261313,22),i=c(i,o=c(o,r=c(r,n,i,o,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),o,r,e[11],2304563134,22),i=c(i,o=c(o,r=c(r,n,i,o,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),o,r,e[15],1236535329,22),i=u(i,o=u(o,r=u(r,n,i,o,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),o,r,e[0],3921069994,20),i=u(i,o=u(o,r=u(r,n,i,o,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),o,r,e[4],3889429448,20),i=u(i,o=u(o,r=u(r,n,i,o,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),o,r,e[8],1163531501,20),i=u(i,o=u(o,r=u(r,n,i,o,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),o,r,e[12],2368359562,20),i=h(i,o=h(o,r=h(r,n,i,o,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),o,r,e[14],4259657740,23),i=h(i,o=h(o,r=h(r,n,i,o,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),o,r,e[10],3200236656,23),i=h(i,o=h(o,r=h(r,n,i,o,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),o,r,e[6],76029189,23),i=h(i,o=h(o,r=h(r,n,i,o,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),o,r,e[2],3299628645,23),i=d(i,o=d(o,r=d(r,n,i,o,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),o,r,e[5],4237533241,21),i=d(i,o=d(o,r=d(r,n,i,o,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),o,r,e[1],2240044497,21),i=d(i,o=d(o,r=d(r,n,i,o,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),o,r,e[13],1309151649,21),i=d(i,o=d(o,r=d(r,n,i,o,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=a},{"hash-base":106,inherits:120,"safe-buffer":234}],230:[function(e,t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],231:[function(e,t,r){"use strict";var n=r;function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},{}],232:[function(e,t,r){var n=e("bitcoin-ops");function i(e){return ee.length)return null;r=e.readUInt8(t+1),i=2}else if(o===n.OP_PUSHDATA2){if(t+3>e.length)return null;r=e.readUInt16LE(t+1),i=3}else{if(t+5>e.length)return null;if(o!==n.OP_PUSHDATA4)throw new Error("Unexpected opcode");r=e.readUInt32LE(t+1),i=5}return{opcode:o,number:r,size:i}}}},{"bitcoin-ops":35}],233:[function(e,t,r){"use strict";var n=e("buffer").Buffer,i=e("inherits"),o=e("hash-base"),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,i,o,s,a){return p(e+(t^r^n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return p(e+(t&r|~t&n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return p(e+((t|~r)^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return p(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return p(e+(t^(r|~n))+o+s|0,a)+i|0}i(l,o),l.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,_=0|this._a,w=0|this._b,E=0|this._c,A=0|this._d,S=0|this._e,I=0;I<80;I+=1){var M,x;I<16?(M=b(r,n,i,o,l,e[a[I]],h[0],c[I]),x=v(_,w,E,A,S,e[f[I]],d[0],u[I])):I<32?(M=m(r,n,i,o,l,e[a[I]],h[1],c[I]),x=y(_,w,E,A,S,e[f[I]],d[1],u[I])):I<48?(M=g(r,n,i,o,l,e[a[I]],h[2],c[I]),x=g(_,w,E,A,S,e[f[I]],d[2],u[I])):I<64?(M=y(r,n,i,o,l,e[a[I]],h[3],c[I]),x=m(_,w,E,A,S,e[f[I]],d[3],u[I])):(M=v(r,n,i,o,l,e[a[I]],h[4],c[I]),x=b(_,w,E,A,S,e[f[I]],d[4],u[I])),r=l,l=o,o=p(i,10),i=n,n=M,_=S,S=A,A=p(E,10),E=w,w=x}var P=this._b+i+A|0;this._b=this._c+o+S|0,this._c=this._d+l+_|0,this._d=this._e+r+w|0,this._e=this._a+n+E|0,this._a=P},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=l},{buffer:3,"hash-base":106,inherits:120}],234:[function(e,t,r){arguments[4][21][0].apply(r,arguments)},{buffer:3,dup:21}],235:[function(e,t,r){"use strict";t.exports=e("./lib")(e("./lib/elliptic"))},{"./lib":239,"./lib/elliptic":238}],236:[function(e,t,r){(function(e){"use strict";var t=Object.prototype.toString;r.isArray=function(e,t){if(!Array.isArray(e))throw TypeError(t)},r.isBoolean=function(e,r){if("[object Boolean]"!==t.call(e))throw TypeError(r)},r.isBuffer=function(t,r){if(!e.isBuffer(t))throw TypeError(r)},r.isFunction=function(e,r){if("[object Function]"!==t.call(e))throw TypeError(r)},r.isNumber=function(e,r){if("[object Number]"!==t.call(e))throw TypeError(r)},r.isObject=function(e,r){if("[object Object]"!==t.call(e))throw TypeError(r)},r.isBufferLength=function(e,t,r){if(e.length!==t)throw RangeError(r)},r.isBufferLength2=function(e,t,r,n){if(e.length!==t&&e.length!==r)throw RangeError(n)},r.isLengthGTZero=function(e,t){if(0===e.length)throw RangeError(t)},r.isNumberInInterval=function(e,t,r,n){if(e<=t||e>=r)throw RangeError(n)}}).call(this,{isBuffer:e("C:/Users/Hamza/AppData/Roaming/npm/node_modules/browserify/node_modules/is-buffer/index.js")})},{"C:/Users/Hamza/AppData/Roaming/npm/node_modules/browserify/node_modules/is-buffer/index.js":8}],237:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("bip66"),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);r.privateKeyExport=function(e,t,r){var i=n.from(r?o:s);return e.copy(i,r?8:9),t.copy(i,r?181:214),i},r.privateKeyImport=function(e){var t=e.length,r=0;if(!(t2||t1?e[r+n-2]<<8:0);if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var s=n.concat([n.from([0]),e.s]),a=33,f=0;a>1&&0===s[f]&&!(128&s[f+1]);--a,++f);return i.encode(t.slice(o),s.slice(f))},r.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(e);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},r.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0;if(48===e[o++]){var s=e[o++];if(!(128&s&&(o+=s-128)>i)&&2===e[o++]){var a=e[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+e[o]}if(!(a>i-o)){var f=o;if(o+=a,2===e[o++]){var c=e[o++];if(128&c){if(o+(s=c-128)>i)return;for(;s>0&&0===e[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+e[o]}if(!(c>i-o)){var u=o;for(o+=c;a>0&&0===e[f];a-=1,f+=1);if(!(a>32)){var h=e.slice(f,f+a);for(h.copy(t,32-h.length);c>0&&0===e[u];c-=1,u+=1);if(!(c>32)){var d=e.slice(u,u+c);return d.copy(r,32-d.length),{r:t,s:r}}}}}}}}}},{bip66:34,"safe-buffer":234}],238:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hash"),o=e("bn.js"),s=e("elliptic").ec,a=e("../messages.json"),f=new s("secp256k1"),c=f.curve;function u(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(c.p)>=0)return null;var n=(r=r.toRed(c.red)).redSqr().redIMul(r).redIAdd(c.b).redSqrt();return 3===e!==n.isOdd()&&(n=n.redNeg()),f.keyPair({pub:{x:r,y:n}})}(t,e.slice(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var n=new o(t),i=new o(r);if(n.cmp(c.p)>=0||i.cmp(c.p)>=0)return null;if(n=n.toRed(c.red),i=i.toRed(c.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;var s=n.redSqr().redIMul(n);return i.redSqr().redISub(s.redIAdd(c.b)).isZero()?f.keyPair({pub:{x:n,y:i}}):null}(t,e.slice(1,33),e.slice(33,65));default:return null}}r.privateKeyVerify=function(e){var t=new o(e);return t.cmp(c.n)<0&&!t.isZero()},r.privateKeyExport=function(e,t){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return n.from(f.keyFromPrivate(e).getPublic(t,!0))},r.privateKeyNegate=function(e){var t=new o(e);return t.isZero()?n.alloc(32):c.n.sub(t).umod(c.n).toArrayLike(n,"be",32)},r.privateKeyModInverse=function(e){var t=new o(e);if(t.cmp(c.n)>=0||t.isZero())throw new Error(a.EC_PRIVATE_KEY_RANGE_INVALID);return t.invm(c.n).toArrayLike(n,"be",32)},r.privateKeyTweakAdd=function(e,t){var r=new o(t);if(r.cmp(c.n)>=0)throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(new o(e)),r.cmp(c.n)>=0&&r.isub(c.n),r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toArrayLike(n,"be",32)},r.privateKeyTweakMul=function(e,t){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return r.imul(new o(e)),r.cmp(c.n)&&(r=r.umod(c.n)),r.toArrayLike(n,"be",32)},r.publicKeyCreate=function(e,t){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PUBLIC_KEY_CREATE_FAIL);return n.from(f.keyFromPrivate(e).getPublic(t,!0))},r.publicKeyConvert=function(e,t){var r=u(e);if(null===r)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return n.from(r.getPublic(t,!0))},r.publicKeyVerify=function(e){return null!==u(e)},r.publicKeyTweakAdd=function(e,t,r){var i=u(e);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new o(t)).cmp(c.n)>=0)throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var s=c.g.mul(t).add(i.pub);if(s.isInfinity())throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return n.from(s.encode(!0,r))},r.publicKeyTweakMul=function(e,t,r){var i=u(e);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if((t=new o(t)).cmp(c.n)>=0||t.isZero())throw new Error(a.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.from(i.pub.mul(t).encode(!0,r))},r.publicKeyCombine=function(e,t){for(var r=new Array(e.length),i=0;i=0||r.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);var i=n.from(e);return 1===r.cmp(f.nh)&&c.n.sub(r).toArrayLike(n,"be",32).copy(i,32),i},r.signatureExport=function(e){var t=e.slice(0,32),r=e.slice(32,64);if(new o(t).cmp(c.n)>=0||new o(r).cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);return{r:t,s:r}},r.signatureImport=function(e){var t=new o(e.r);t.cmp(c.n)>=0&&(t=new o(0));var r=new o(e.s);return r.cmp(c.n)>=0&&(r=new o(0)),n.concat([t.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},r.sign=function(e,t,r,i){if("function"==typeof r){var s=r;r=function(r){var f=s(e,t,null,i,r);if(!n.isBuffer(f)||32!==f.length)throw new Error(a.ECDSA_SIGN_FAIL);return new o(f)}}var u=new o(t);if(u.cmp(c.n)>=0||u.isZero())throw new Error(a.ECDSA_SIGN_FAIL);var h=f.sign(e,t,{canonical:!0,k:r,pers:i});return{signature:n.concat([h.r.toArrayLike(n,"be",32),h.s.toArrayLike(n,"be",32)]),recovery:h.recoveryParam}},r.verify=function(e,t,r){var n={r:t.slice(0,32),s:t.slice(32,64)},i=new o(n.r),s=new o(n.s);if(i.cmp(c.n)>=0||s.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);if(1===s.cmp(f.nh)||i.isZero()||s.isZero())return!1;var h=u(r);if(null===h)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return f.verify(e,n,{x:h.pub.x,y:h.pub.y})},r.recover=function(e,t,r,i){var s={r:t.slice(0,32),s:t.slice(32,64)},u=new o(s.r),h=new o(s.s);if(u.cmp(c.n)>=0||h.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);try{if(u.isZero()||h.isZero())throw new Error;var d=f.recoverPubKey(e,s,r);return n.from(d.encode(!0,i))}catch(e){throw new Error(a.ECDSA_RECOVER_FAIL)}},r.ecdh=function(e,t){var n=r.ecdhUnsafe(e,t,!0);return i("sha256").update(n).digest()},r.ecdhUnsafe=function(e,t,r){var i=u(e);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);var s=new o(t);if(s.cmp(c.n)>=0||s.isZero())throw new Error(a.ECDH_FAIL);return n.from(i.pub.mul(s).encode(!0,r))}},{"../messages.json":240,"bn.js":64,"create-hash":89,elliptic:90,"safe-buffer":234}],239:[function(e,t,r){"use strict";var n=e("./assert"),i=e("./der"),o=e("./messages.json");function s(e,t){return void 0===e?t:(n.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}t.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0);var a=e.privateKeyExport(t,r);return i.privateKeyExport(t,a,r)},privateKeyImport:function(t){if(n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),(t=i.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=s(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakAdd(t,r,i)},publicKeyTweakMul:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),e.publicKeyTweakMul(t,r,i)},publicKeyCombine:function(t,r){n.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":234}],242:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":243,"./sha1":244,"./sha224":245,"./sha256":246,"./sha384":247,"./sha512":248}],243:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function f(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,f=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var d=0;d<80;++d){var l=~~(d/20),p=0|((t=n)<<5|t>>>27)+u(l,i,o,a)+f+r[d]+s[l];f=a,a=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=f},{"./hash":241,inherits:120,"safe-buffer":234}],244:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function f(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),b=c(n)+h(p,i,o,a)+f+r[l]+s[p]|0;f=a,a=o,o=u(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=f},{"./hash":241,inherits:120,"safe-buffer":234}],245:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),o=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(64);function f(){this.init(),this._w=a,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=f},{"./hash":241,"./sha256":246,inherits:120,"safe-buffer":234}],246:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function f(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+l(r[g-15])+r[g-16];for(var y=0;y<64;++y){var v=m+d(f)+c(f,p,b)+s[y]+r[y]|0,_=h(n)+u(n,i,o)|0;m=b,b=p,p=f,f=a+v|0,a=o,o=i,i=n,n=v+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=m+this._h|0},f.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=f},{"./hash":241,inherits:120,"safe-buffer":234}],247:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),o=e("./hash"),s=e("safe-buffer").Buffer,a=new Array(160);function f(){this.init(),this._w=a,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=f},{"./hash":241,"./sha512":248,inherits:120,"safe-buffer":234}],248:[function(e,t,r){var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function f(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,f=0|this._fh,y=0|this._gh,v=0|this._hh,_=0|this._al,w=0|this._bl,E=0|this._cl,A=0|this._dl,S=0|this._el,I=0|this._fl,M=0|this._gl,x=0|this._hl,P=0;P<32;P+=2)t[P]=e.readInt32BE(4*P),t[P+1]=e.readInt32BE(4*P+4);for(;P<160;P+=2){var k=t[P-30],O=t[P-30+1],L=l(k,O),T=p(O,k),N=b(k=t[P-4],O=t[P-4+1]),B=m(O,k),j=t[P-14],R=t[P-14+1],C=t[P-32],D=t[P-32+1],U=T+R|0,K=L+j+g(U,T)|0;K=(K=K+N+g(U=U+B|0,B)|0)+C+g(U=U+D|0,D)|0,t[P]=K,t[P+1]=U}for(var z=0;z<160;z+=2){K=t[z],U=t[z+1];var q=u(r,n,i),H=u(_,w,E),V=h(r,_),F=h(_,r),G=d(a,S),Y=d(S,a),W=s[z],J=s[z+1],Z=c(a,f,y),X=c(S,I,M),$=x+Y|0,Q=v+G+g($,x)|0;Q=(Q=(Q=Q+Z+g($=$+X|0,X)|0)+W+g($=$+J|0,J)|0)+K+g($=$+U|0,U)|0;var ee=F+H|0,te=V+q+g(ee,F)|0;v=y,x=M,y=f,M=I,f=a,I=S,a=o+Q+g(S=A+$|0,A)|0,o=i,A=E,i=n,E=w,n=r,w=_,r=Q+te+g(_=$+ee|0,$)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+A|0,this._el=this._el+S|0,this._fl=this._fl+I|0,this._gl=this._gl+M|0,this._hl=this._hl+x|0,this._ah=this._ah+r+g(this._al,_)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,E)|0,this._dh=this._dh+o+g(this._dl,A)|0,this._eh=this._eh+a+g(this._el,S)|0,this._fh=this._fh+f+g(this._fl,I)|0,this._gh=this._gh+y+g(this._gl,M)|0,this._hh=this._hh+v+g(this._hl,x)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=f},{"./hash":241,inherits:120,"safe-buffer":234}],249:[function(e,t,r){var n=e("./native");function i(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function o(e){return n.Nil(e)?"":i(e.constructor)}function s(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function a(e){return n.Function(e)?e.toJSON?e.toJSON():i(e):n.Array(e)?"Array":e&&n.Object(e)?"Object":void 0!==e?e:""}function f(e,t,r){var i=function(e){return n.Function(e)?"":n.String(e)?JSON.stringify(e):e&&n.Object(e)?"":e}(t);return"Expected "+a(e)+", got"+(""!==r?" "+r:"")+(""!==i?" "+i:"")}function c(e,t,r){r=r||o(t),this.message=f(e,t,r),s(this,c),this.__type=e,this.__value=t,this.__valueTypeName=r}function u(e,t,r,n,i){e?(i=i||o(n),this.message=function(e,t,r,n,i){var o='" of type ';return"key"===t&&(o='" with key type '),f('property "'+a(r)+o+a(e),n,i)}(e,r,t,n,i)):this.message='Unexpected property "'+t+'"',s(this,c),this.__label=r,this.__property=t,this.__type=e,this.__value=n,this.__valueTypeName=i}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,u.prototype=Object.create(Error.prototype),u.prototype.constructor=c,t.exports={TfTypeError:c,TfPropertyTypeError:u,tfCustomError:function(e,t){return new c(e,{},t)},tfSubError:function(e,t,r){return e instanceof u?(t=t+"."+e.__property,e=new u(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof c&&(e=new u(e.__type,t,r,e.__value,e.__valueTypeName)),s(e),e},tfJSON:a,getValueTypeName:o}},{"./native":252}],250:[function(e,t,r){(function(r){var n=e("./native"),i=e("./errors");function o(e){return r.isBuffer(e)}function s(e){return"string"==typeof e&&/^([0-9a-f]{2})+$/i.test(e)}function a(e,t){var r=e.toJSON();function n(n){if(!e(n))return!1;if(n.length===t)return!0;throw i.tfCustomError(r+"(Length: "+t+")",r+"(Length: "+n.length+")")}return n.toJSON=function(){return r},n}var f=a.bind(null,n.Array),c=a.bind(null,o),u=a.bind(null,s),h=a.bind(null,n.String);var d=Math.pow(2,53)-1;var l={ArrayN:f,Buffer:o,BufferN:c,Finite:function(e){return"number"==typeof e&&isFinite(e)},Hex:s,HexN:u,Int8:function(e){return e<<24>>24===e},Int16:function(e){return e<<16>>16===e},Int32:function(e){return(0|e)===e},Int53:function(e){return"number"==typeof e&&e>=-d&&e<=d&&Math.floor(e)===e},Range:function(e,t,r){function i(n,i){return r(n,i)&&n>e&&n>>0===e},UInt53:function(e){return"number"==typeof e&&e>=0&&e<=d&&Math.floor(e)===e}};for(var p in l)l[p].toJSON=function(e){return e}.bind(null,p);t.exports=l}).call(this,{isBuffer:e("C:/Users/Hamza/AppData/Roaming/npm/node_modules/browserify/node_modules/is-buffer/index.js")})},{"./errors":249,"./native":252,"C:/Users/Hamza/AppData/Roaming/npm/node_modules/browserify/node_modules/is-buffer/index.js":8}],251:[function(e,t,r){var n=e("./errors"),i=e("./native"),o=n.tfJSON,s=n.TfTypeError,a=n.TfPropertyTypeError,f=n.tfSubError,c=n.getValueTypeName,u={arrayOf:function(e,t){function r(r,n){return!!i.Array(r)&&(!i.Nil(r)&&(!(void 0!==t.minLength&&r.lengtht.maxLength)&&((void 0===t.length||r.length===t.length)&&r.every(function(t,r){try{return d(e,t,n)}catch(e){throw f(e,r)}})))))}return e=h(e),t=t||{},r.toJSON=function(){var r="["+o(e)+"]";return void 0!==t.length?r+="{"+t.length+"}":void 0===t.minLength&&void 0===t.maxLength||(r+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),r},r},maybe:function e(t){function r(r,n){return i.Nil(r)||t(r,n,e)}return t=h(t),r.toJSON=function(){return"?"+o(t)},r},map:function(e,t){function r(r,n){if(!i.Object(r))return!1;if(i.Nil(r))return!1;for(var o in r){try{t&&d(t,o,n)}catch(e){throw f(e,o,"key")}try{var s=r[o];d(e,s,n)}catch(e){throw f(e,o)}}return!0}return e=h(e),t&&(t=h(t)),r.toJSON=t?function(){return"{"+o(t)+": "+o(e)+"}"}:function(){return"{"+o(e)+"}"},r},object:function(e){var t={};for(var r in e)t[r]=h(e[r]);function n(e,r){if(!i.Object(e))return!1;if(i.Nil(e))return!1;var n;try{for(n in t){d(t[n],e[n],r)}}catch(e){throw f(e,n)}if(r)for(n in e)if(!t[n])throw new a(void 0,n);return!0}return n.toJSON=function(){return o(t)},n},anyOf:function(){var e=[].slice.call(arguments).map(h);function t(t,r){return e.some(function(e){try{return d(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(h);function t(t,r){return e.every(function(e){try{return d(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join(" & ")},t},quacksLike:function(e){function t(t){return e===c(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(h);function t(t,r){return!i.Nil(t)&&(!i.Nil(t.length)&&((!r||t.length===e.length)&&e.every(function(e,n){try{return d(e,t[n],r)}catch(e){throw f(e,n)}})))}return t.toJSON=function(){return"("+e.map(o).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function h(e){if(i.String(e))return"?"===e[0]?u.maybe(e.slice(1)):i[e]||u.quacksLike(e);if(e&&i.Object(e)){if(i.Array(e)){if(1!==e.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return u.arrayOf(e[0])}return u.object(e)}return i.Function(e)?e:u.value(e)}function d(e,t,r,n){if(i.Function(e)){if(e(t,r))return!0;throw new s(n||e,t)}return d(h(e),t,r)}for(var l in u.oneOf=u.anyOf,i)d[l]=i[l];for(l in u)d[l]=u[l];var p=e("./extra");for(l in p)d[l]=p[l];d.compile=h,d.TfTypeError=s,d.TfPropertyTypeError=a,t.exports=d},{"./errors":249,"./extra":250,"./native":252}],252:[function(e,t,r){var n={Array:function(e){return null!==e&&void 0!==e&&e.constructor===Array},Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return void 0===e||null===e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==typeof e},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var i in n.Null=n.Nil,n)n[i].toJSON=function(e){return e}.bind(null,i);t.exports=n},{}],bolt11:[function(e,t,r){"use strict";const n=e("create-hash"),i=e("bech32"),o=e("secp256k1"),s=e("safe-buffer").Buffer,a=e("bn.js"),f=e("bitcoinjs-lib/src/address"),c=e("lodash/cloneDeep"),u=e("coininfo"),h={bitcoin:u.bitcoin.main.toBitcoinJS(),testnet:u.bitcoin.test.toBitcoinJS(),regtest:u.bitcoin.regtest.toBitcoinJS(),litecoin:u.litecoin.main.toBitcoinJS(),litecoin_testnet:u.litecoin.test.toBitcoinJS()};h.bitcoin.bech32="bc",h.testnet.bech32="tb",h.regtest.bech32="bcrt",h.litecoin.bech32="ltc",h.litecoin_testnet.bech32="tltc";const d="testnet",l=h[d],p=3600,b=9,m="",g=[0],y={bc:"bitcoin",tb:"testnet",bcrt:"regtest",ltc:"litecoin",tltc:"litecoin_testnet"},v={m:new a(1e3,10),u:new a(1e6,10),n:new a(1e9,10),p:new a(1e12,10)},_=new a("2100000000000000000",10),w=new a(1e11,10),E=new a(1e8,10),A=new a(1e5,10),S=new a(100,10),I=new a(10,10),M={payment_hash:1,description:13,payee_node_key:19,purpose_commit_hash:23,expire_time:6,min_final_cltv_expiry:24,fallback_address:9,routing_info:3},x={};for(let e=0,t=Object.keys(M);e{t=s.concat([t,C(e.pubkey)]),t=s.concat([t,C(e.short_channel_id)]),t=s.concat([t,s.from([0,0,0].concat(N(e.fee_base_msat,8)).slice(-4))]),t=s.concat([t,s.from([0,0,0].concat(N(e.fee_proportional_millionths,8)).slice(-4))]),t=s.concat([t,s.from([0].concat(N(e.cltv_expiry_delta,8)).slice(-2))])}),D(t)}},k={1:e=>R(e,!0).toString("hex"),13:e=>R(e,!0).toString("utf8"),19:e=>R(e,!0).toString("hex"),23:e=>R(e,!0).toString("hex"),6:T,24:T,9:function(e,t){let r=e[0],n=R(e=e.slice(1),!0),i=null;switch(r){case 17:i=f.toBase58Check(n,t.pubKeyHash);break;case 18:i=f.toBase58Check(n,t.scriptHash);break;case 0:i=f.toBech32(n,r,t.bech32)}return{code:r,address:i,addressHash:n.toString("hex")}},3:function(e){let t,r,n,i,o,s=[],a=R(e,!0);for(;a.length>0;)t=a.slice(0,33).toString("hex"),r=a.slice(33,41).toString("hex"),n=parseInt(a.slice(41,45).toString("hex"),16),i=parseInt(a.slice(45,49).toString("hex"),16),o=parseInt(a.slice(49,51).toString("hex"),16),a=a.slice(51),s.push({pubkey:t,short_channel_id:r,fee_base_msat:n,fee_proportional_millionths:i,cltv_expiry_delta:o});return s}},O="unknownTag";function L(e){return t=>({tagCode:parseInt(e),words:i.encode("unknown",t,Number.MAX_SAFE_INTEGER)})}function T(e){return e.reverse().reduce((e,t,r)=>e+t*Math.pow(32,r),0)}function N(e,t){let r=[];if(void 0===t&&(t=5),0===(e=Math.floor(e)))return[0];for(;e>0;)r.push(e&Math.pow(2,t)-1),e=Math.floor(e/Math.pow(2,t));return r.reverse()}function B(e){return n("sha256").update(e).digest()}function j(e,t,r){let n=0,i=0,o=(1<=r;)i-=r,s.push(n>>i&o);return i>0&&s.push(n<e.tagName===t);return r.length>0?r[0].data:null}function K(e,t){return null!==U(e,t)}function z(e){let t={};return Object.keys(e).sort().forEach(r=>{t[r]=e[r]}),t}function q(e){if(!e.toString().match(/^\d+$/))throw new Error("satoshis must be an integer");return H(new a(e,10).mul(new a(1e3,10)))}function H(e){if(!e.toString().match(/^\d+$/))throw new Error("millisatoshis must be an integer");let t,r,n=new a(e,10),i=n.toString(10),o=i.length;return o>11&&/0{11}$/.test(i)?(t="",r=n.div(w).toString(10)):o>8&&/0{8}$/.test(i)?(t="m",r=n.div(E).toString(10)):o>5&&/0{5}$/.test(i)?(t="u",r=n.div(A).toString(10)):o>2&&/0{2}$/.test(i)?(t="n",r=n.div(S).toString(10)):(t="p",r=n.mul(I).toString(10)),r+t}function V(e,t){let r=F(e,!1);if(!r.mod(new a(1e3,10)).eq(new a(0,10)))throw new Error("Amount is outside of valid range");let n=r.div(new a(1e3,10));return t?n.toString():n}function F(e,t){let r,n;if(e.slice(-1).match(/^[munp]$/))r=e.slice(-1),n=e.slice(0,-1);else{if(e.slice(-1).match(/^[^munp0-9]$/))throw new Error("Not a valid multiplier for the amount");n=e}if(!n.match(/^\d+$/))throw new Error("Not a valid human readable amount");let i=new a(n,10),o=r?i.mul(w).div(v[r]):i.mul(w);if("p"===r&&!i.mod(new a(10,10)).eq(new a(0,10))||o.gt(_))throw new Error("Amount is outside of valid range");return t?o.toString():o}t.exports={encode:function(e,t){let r=c(e);void 0===t&&(t=!0);let n,u,y,v,_,w,E=!(void 0===r.signature||void 0===r.recoveryFlag);if(void 0!==r.coinType||E){if(void 0===r.coinType&&E)throw new Error("Need coinType for proper payment request reconstruction");if(!h[r.coinType])throw new Error("Unknown coin type");n=h[r.coinType]}else r.coinType=d,n=l;if(void 0!==r.timestamp||E){if(void 0===r.timestamp&&E)throw new Error("Need timestamp for proper payment request reconstruction")}else r.timestamp=Math.floor((new Date).getTime()/1e3);if(void 0===r.tags)throw new Error("Payment Requests need tags array");if(!K(r.tags,x[1]))throw new Error("Lightning Payment Request needs a payment hash");if(!K(r.tags,x[13])&&!K(r.tags,x[23])){if(!t)throw new Error("Payment request requires description or purpose commit hash");r.tags.push({tagName:x[13],data:m})}if(K(r.tags,x[13])&&s.from(U(r.tags,x[13]),"utf8").length>639)throw new Error("Description is too long: Max length 639 bytes");if(K(r.tags,x[6])||E||!t||r.tags.push({tagName:x[6],data:p}),K(r.tags,x[24])||E||!t||r.tags.push({tagName:x[24],data:b}),K(r.tags,x[19])&&(y=C(U(r.tags,x[19]))),r.payeeNodeKey&&(u=C(r.payeeNodeKey)),u&&y&&!y.equals(u))throw new Error("payeeNodeKey and tag payee node key do not match");if((u=u||y)&&(r.payeeNodeKey=u.toString("hex")),K(r.tags,x[9])){let e=U(r.tags,x[9]);if(w=e.address,_=e.addressHash,v=e.code,void 0===_||void 0===v){let t,r;try{_=(t=f.fromBech32(w)).data,v=t.version}catch(e){try{(r=f.fromBase58Check(w)).version===n.pubKeyHash?v=17:r.version===n.scriptHash&&(v=18),_=r.hash}catch(e){throw new Error("Fallback address type is unknown")}}if(t&&!(t.version in g))throw new Error("Fallback address witness version is unknown");if(t&&t.prefix!==n.bech32)throw new Error("Fallback address network type does not match payment request network type");if(r&&r.version!==n.pubKeyHash&&r.version!==n.scriptHash)throw new Error("Fallback address version (base58) is unknown or the network type is incorrect");e.addressHash=_.toString("hex"),e.code=v}}K(r.tags,x[3])&&U(r.tags,x[3]).forEach(e=>{if(void 0===e.pubkey||void 0===e.short_channel_id||void 0===e.fee_base_msat||void 0===e.fee_proportional_millionths||void 0===e.cltv_expiry_delta)throw new Error("Routing info is incomplete");if(!o.publicKeyVerify(C(e.pubkey)))throw new Error("Routing info pubkey is not a valid pubkey");let t=C(e.short_channel_id);if(!(t instanceof s)||8!==t.length)throw new Error("Routing info short channel id must be 8 bytes");if("number"!=typeof e.fee_base_msat||Math.floor(e.fee_base_msat)!==e.fee_base_msat)throw new Error("Routing info fee base msat is not an integer");if("number"!=typeof e.fee_proportional_millionths||Math.floor(e.fee_proportional_millionths)!==e.fee_proportional_millionths)throw new Error("Routing info fee proportional millionths is not an integer");if("number"!=typeof e.cltv_expiry_delta||Math.floor(e.cltv_expiry_delta)!==e.cltv_expiry_delta)throw new Error("Routing info cltv expiry delta is not an integer")});let A,S="ln";if(S+=n.bech32,r.millisatoshis&&r.satoshis){if(A=H(new a(r.millisatoshis,10)),q(new a(r.satoshis,10))!==A)throw new Error("satoshis and millisatoshis do not match")}else A=r.millisatoshis?H(new a(r.millisatoshis,10)):r.satoshis?q(new a(r.satoshis,10)):"";S+=A;let I=N(r.timestamp),k=[];r.tags.forEach(e=>{const t=Object.keys(P);if(E&&t.push(O),-1===t.indexOf(e.tagName))throw new Error("Unknown tag key: "+e.tagName);let r;if(e.tagName!==O)k.push(M[e.tagName]),r=(0,P[e.tagName])(e.data);else{let t=function(e){return e.words=i.decode(e.words,Number.MAX_SAFE_INTEGER).words,e}(e.data);k.push(t.tagCode),r=t.words}k=(k=k.concat([0].concat(N(r.length)).slice(-2))).concat(r)});let L,T=I.concat(k),R=B(s.concat([s.from(S,"utf8"),s.from(j(T,5,8))]));if(E){if(!u)throw new Error("Reconstruction with signature and recoveryID requires payeeNodeKey to verify correctness of input data.");{let e=o.recover(R,s.from(r.signature,"hex"),r.recoveryFlag,!0);if(u&&!u.equals(e))throw new Error("Signature, message, and recoveryID did not produce the same pubkey as payeeNodeKey");L=D(r.signature+"0"+r.recoveryFlag)}}return L&&(T=T.concat(L)),K(r.tags,x[6])&&(r.timeExpireDate=r.timestamp+U(r.tags,x[6]),r.timeExpireDateString=new Date(1e3*r.timeExpireDate).toISOString()),r.timestampString=new Date(1e3*r.timestamp).toISOString(),r.paymentRequest=r.complete?i.encode(S,T,Number.MAX_SAFE_INTEGER):"",r.prefix=S,r.wordsTemp=i.encode("temp",T,Number.MAX_SAFE_INTEGER),r.complete=!!L,z(r)},decode:function(e,t){if("string"!=typeof e)throw new Error("Lightning Payment Request must be string");if("ln"!==e.slice(0,2).toLowerCase())throw new Error("Not a proper lightning payment request");let r=i.decode(e,Number.MAX_SAFE_INTEGER);e=e.toLowerCase();let n=r.prefix,a=r.words,f=a.slice(-104),c=a.slice(0,-104);a=a.slice(0,-104);let u=R(f,!0),d=u.slice(-1)[0];if(u=u.slice(0,-1),!(d in[0,1,2,3])||64!==u.length)throw new Error("Signature is missing or incorrect");let l=n.match(/^ln(\S+?)(\d*)([a-zA-Z]?)$/);if(l&&!l[2]&&(l=n.match(/^ln(\S+)$/)),!l)throw new Error("Not a proper lightning payment request");let p,b,m=l[1];if(y[m]?(b=y[m],p=h[b]):t&&t.bech32&&(b="unknown",p=t),!p||p.bech32!==m)throw new Error("Unknown coin bech32 prefix");let g,v,_,w=l[2];if(w){let e=l[3];try{g=parseInt(V(w+e,!0))}catch(e){g=null,_=!0}v=F(w+e,!0)}else g=null,v=null;let E=T(a.slice(0,7)),A=new Date(1e3*E).toISOString();a=a.slice(7);let S,I,M,P,N,C,D=[];for(;a.length>0;){let e=a[0].toString();S=x[e]||O,I=k[e]||L(e),M=T((a=a.slice(1)).slice(0,2)),P=(a=a.slice(2)).slice(0,M),a=a.slice(M),D.push({tagName:S,data:I(P,p)})}K(D,x[6])&&(N=E+U(D,x[6]),C=new Date(1e3*N).toISOString());let q=B(s.concat([s.from(n,"utf8"),s.from(j(c,5,8))])),H=o.recover(q,u,d,!0);if(K(D,x[19])&&U(D,x[19])!==H.toString("hex"))throw new Error("Lightning Payment Request signature pubkey does not match payee pubkey");let G={paymentRequest:e,complete:!0,prefix:n,wordsTemp:i.encode("temp",c.concat(f),Number.MAX_SAFE_INTEGER),coinType:b,satoshis:g,millisatoshis:v,timestamp:E,timestampString:A,payeeNodeKey:H.toString("hex"),signature:u.toString("hex"),recoveryFlag:d,tags:D};return _&&delete G.satoshis,N&&(G=Object.assign(G,{timeExpireDate:N,timeExpireDateString:C})),z(G)},sign:function(e,t){let r,n,a=c(e),f=C(t);if(a.complete&&a.paymentRequest)return a;if(void 0===f||32!==f.length||!o.privateKeyVerify(f))throw new Error("privateKey must be a 32 byte Buffer and valid private key");if(K(a.tags,x[19])&&(n=C(U(a.tags,x[19]))),a.payeeNodeKey&&(r=C(a.payeeNodeKey)),r&&n&&!n.equals(r))throw new Error("payee node key tag and payeeNodeKey attribute must match");r=n||r;let u=o.publicKeyCreate(f);if(r&&!u.equals(r))throw new Error("The private key given is not the private key of the node public key given");let h=i.decode(a.wordsTemp,Number.MAX_SAFE_INTEGER).words,d=B(s.concat([s.from(a.prefix,"utf8"),R(h)])),l=o.sign(d,f),p=D(l.signature.toString("hex")+"0"+l.recovery);return a.payeeNodeKey=u.toString("hex"),a.signature=l.signature.toString("hex"),a.recoveryFlag=l.recovery,a.wordsTemp=i.encode("temp",h.concat(p),Number.MAX_SAFE_INTEGER),a.complete=!0,a.paymentRequest=i.encode(a.prefix,h.concat(p),Number.MAX_SAFE_INTEGER),z(a)},satToHrp:q,millisatToHrp:H,hrpToSat:V,hrpToMillisat:F}},{bech32:33,"bitcoinjs-lib/src/address":37,"bn.js":64,coininfo:70,"create-hash":89,"lodash/cloneDeep":212,"safe-buffer":234,secp256k1:235}]},{},[])("bolt11")}); \ No newline at end of file diff --git a/src/helpers/validations.js b/src/helpers/validations.js index d6708f0..f34a931 100644 --- a/src/helpers/validations.js +++ b/src/helpers/validations.js @@ -15,4 +15,9 @@ const validatedTokenHash = tokenHash => { } }; -export {validatedTokenHash}; +const isValidLnNodeId = node => { + const nodeRegx = new RegExp(/^([A-Za-z0-9]{66})/); + return nodeRegx.test(node); +}; + +export {validatedTokenHash, isValidLnNodeId}; diff --git a/src/store/actions/auth.js b/src/store/actions/auth.js index da2bae4..15369b7 100644 --- a/src/store/actions/auth.js +++ b/src/store/actions/auth.js @@ -1,4 +1,5 @@ import { + RESTART, FULFILLED, PENDING, REJECTED, @@ -90,8 +91,6 @@ const loadDevicePgpKeys = () => async dispatch => { if (payload) { // FIXME should PGP private keys be saved in state ? or just public + finger print // and just return private keyu to be use in init during unlockorgenkey - //payload.pubkeyArmored = payload.pubkeyArmored.replace(/\\n/gim, '\r\n'); - //payload.privkeyArmored = payload.privkeyArmored.replace(/\\n/gim, '\r\n'); dispatch({ type: PGP_GET_KEYS + FULFILLED, payload, @@ -197,6 +196,12 @@ const clearAuthInfo = () => async dispatch => { }); }; +const restartPairingState = () => async dispatch => { + dispatch({ + type: REQUEST_PAIR + RESTART, + payload: {}, + }); +}; export { loadEncryptedAuthInfo, storeEncryptedAuthInfo, @@ -207,4 +212,5 @@ export { genAndSaveDevicePgpKeys, deleteDevicePgpKeys, initAndUnlockDeviceKeys, + restartPairingState, }; diff --git a/src/store/actions/btcwallet.js b/src/store/actions/btcwallet.js index 47a3b8c..33da28a 100644 --- a/src/store/actions/btcwallet.js +++ b/src/store/actions/btcwallet.js @@ -26,6 +26,24 @@ const initBtcClient = () => async (dispatch, getState) => { return btcClient; }; +const getBlockChainInfo = () => async dispatch => { + dispatch({type: types.BTC_WALLET_GET_BLOCKCHAININFO + PENDING}); + try { + await dispatch(initBtcClient()); + const chainInfo = await btcClient.getBlockChainInfo(); + dispatch({ + type: types.BTC_WALLET_GET_BLOCKCHAININFO + FULFILLED, + payload: {chainInfo}, + }); + return chainInfo; + } catch (err) { + error(err); + dispatch({ + type: types.BTC_WALLET_GET_BLOCKCHAININFO + REJECTED, + payload: {error: err}, + }); + } +}; const getBtcWalletList = () => async dispatch => { dispatch({type: types.BTC_WALLET_LIST_DATA_SHOW + PENDING}); @@ -54,7 +72,7 @@ const getBtcWalletList = () => async dispatch => { }), ); - // Add spending walet + // Add spending wallet btcWalletList.push({ label: 'Spending', desc: C.STR_WALLET, @@ -102,7 +120,10 @@ const getWalletDetails = ({label, type}) => async dispatch => { } dispatch({ type: types.BTC_WALLET_DETAILS + FULFILLED, - // payload: {btcWalletDetails: {balance, txnData, btcUnit}}, + }); + // TODO move this to component + txnData.sort((a, b) => { + return b.timereceived - a.timereceived; }); return {balance, txnData}; } catch (err) { @@ -115,7 +136,6 @@ const getWalletDetails = ({label, type}) => async dispatch => { }; const getWalletAddress = ({label, type, addrType = null}) => async dispatch => { - log('getwalletaddress'); dispatch({type: types.BTC_WALLET_ADDRESS + PENDING}); let address = null; @@ -132,12 +152,10 @@ const getWalletAddress = ({label, type, addrType = null}) => async dispatch => { default: break; } - log('dispatch getwalletaddress'); dispatch({ type: types.BTC_WALLET_ADDRESS + FULFILLED, payload: {address}, }); - log('getwalletaddress goinghome'); } catch (err) { error(err); dispatch({ @@ -175,4 +193,5 @@ export { initBtcClient, getWalletAddress, sendBitcoin, + getBlockChainInfo, }; diff --git a/src/store/actions/lnWallet.js b/src/store/actions/lnWallet.js new file mode 100644 index 0000000..617c7ed --- /dev/null +++ b/src/store/actions/lnWallet.js @@ -0,0 +1,385 @@ +import * as types from '@types/'; +import {FULFILLED, PENDING, REJECTED} from '@utils/constants'; +import {lnClient as _ln} from '@io/lnClient'; +import _sifir from '@io/sifirClient'; +import {lnStore} from '@io/stores'; +import {Images, C} from '@common/index'; +import {getTransportFromToken} from '@io/transports'; +import {log, error} from '@io/events/'; +import bolt11Lib from '@helpers/bolt11.min'; +let lnClient; +let sifirClient; + +const initLnClient = () => async (dispatch, getState) => { + if (!lnClient) { + log('lnWallet:starting ln client'); + const { + auth: {token, key, nodePubkey, devicePgpKey}, + } = getState(); + + if (!token || !key || !nodePubkey) { + throw 'Unable to init ln client'; + } + const transport = await getTransportFromToken({ + token, + nodePubkey, + devicePgpKey, + }); + lnClient = await _ln({transport}); + } + return lnClient; +}; +const initSifirClient = () => async (dispatch, getState) => { + if (!sifirClient) { + log('sifir:starting sifir client'); + const { + auth: {token, key, nodePubkey, devicePgpKey}, + } = getState(); + + if (!token || !key || !nodePubkey) { + throw 'Unable to init sifir client'; + } + const transport = await getTransportFromToken({ + token, + nodePubkey, + devicePgpKey, + }); + sifirClient = await _sifir({transport}); + } + return sifirClient; +}; +// TODO formalize cache expiry handling +const isStaleCacheTimestamp = timestamp => + Date.now() - timestamp < 1000 * 60 * 10; + +const getLnNodesList = () => async dispatch => { + await dispatch(initLnClient()); + const lnNodes = await lnStore.getLnNodes(); + if (!lnNodes?.length) { + // FIXME cold boot hack + // mainly to stay backward compatible with old archittecture + // Either go to observable or fix this shit + const nodeInfo = await lnClient.getNodeInfo(); + dispatch(getLnNodeInfo(nodeInfo.alias)); + } else { + dispatch(getLnNodeInfo(lnNodes[0].nodeInfo.alias)); + } +}; +const getLnNodeInfo = label => async dispatch => { + dispatch({type: types.LN_WALLET_NODEINFO + PENDING}); + await dispatch(initLnClient()); + try { + let nodeInfo; + const cachedNodeInfo = await lnStore.getLnNodeByAlias(label); + if ( + cachedNodeInfo && + isStaleCacheTimestamp(cachedNodeInfo.updatedAt.getTime()) + ) { + log('Found cached node', cachedNodeInfo.updatedAt, cachedNodeInfo); + nodeInfo = {...cachedNodeInfo.nodeInfo}; + } else { + nodeInfo = await lnClient.getNodeInfo(); + log('inserting new LnNode', nodeInfo); + await lnStore.upsertLnNodeByPubkey(nodeInfo.id, {...nodeInfo, nodeInfo}); + } + nodeInfo.pageURL = 'Account'; + nodeInfo.type = C.STR_LN_WALLET_TYPE; + nodeInfo.label = nodeInfo.alias; + nodeInfo.iconURL = Images.icon_light; + nodeInfo.iconClickedURL = Images.icon_light_clicked; + // nodeInfo.balance = balance; + dispatch({ + type: types.LN_WALLET_NODEINFO + FULFILLED, + payload: {nodeInfo}, + }); + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_NODEINFO + REJECTED, + payload: {nodeError: err}, + }); + } +}; + +const getLnWalletDetails = ({label}) => async dispatch => { + dispatch({type: types.LN_WALLET_DETAILS + PENDING}); + try { + await dispatch(initSifirClient()); + const { + funds: {channels, outputs}, + invoices, + pays, + } = await sifirClient.getLnWalletSnapshot(); + const inChannelBalance = channels.reduce((balance, {channel_sat}) => { + balance += channel_sat; + return balance; + }, 0); + const outputBalance = outputs.reduce((balance, {value}) => { + balance += value; + return balance; + }, 0); + const balance = inChannelBalance + outputBalance; + // get cached node info + const lnNode = await lnStore.getLnNodeByAlias(label); + if (!lnNode) { + throw 'LN node not found, please reload your wallets'; + } + // FIXME here lazy loaded transactions ? and maybe promises neede to be waiting ? + // move the fetch to model? + const nodeTransactions = await lnNode.transactions.fetch(); + const nodeBoltsToInsert = []; + const [processedInvoices, processedPays] = [invoices, pays].map( + (collection, i) => + collection.map(inv => { + const type = i === 0 ? 'invoice' : 'pay'; + let payload; + try { + const cachedBolt = nodeTransactions.find( + ({bolt11, type: rType}) => + rType === type && bolt11 === inv.bolt11, + ); + if (cachedBolt) { + payload = { + decodedBolt11: cachedBolt.decodedBolt11, + bolt11: cachedBolt.bolt11, + type: cachedBolt.type, + meta: cachedBolt.meta, + }; + log('cached bolt', payload); + } else { + // decode and insert it + const decodedBolt11 = bolt11Lib.decode(inv.bolt11); + payload = { + decodedBolt11, + bolt11: inv.bolt11, + type, + meta: inv, + }; + nodeBoltsToInsert.push(payload); + } + return payload; + } catch (err) { + log('error processing lnwallet bolt', err); + } + }), + ); + if (nodeBoltsToInsert.length) { + await lnStore.batchInsertLnNodeDecodedBolts( + lnNode.pubkey, + nodeBoltsToInsert, + ); + } + dispatch({ + type: types.LN_WALLET_DETAILS + FULFILLED, + }); + return { + balance, + txnData: {invoices: processedInvoices, pays: processedPays}, + }; + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_DETAILS + REJECTED, + payload: {error: err}, + }); + } +}; + +const getFunds = () => async dispatch => { + dispatch({type: types.LN_WALLET_GET_FUNDS + PENDING}); + try { + await dispatch(initLnClient()); + const {channels, outputs} = await lnClient.listFunds(); + const inChannelBalance = channels.reduce((balance, {channel_sat}) => { + balance += channel_sat; + return balance; + }, 0); + const outputBalance = outputs.reduce((balance, {value}) => { + balance += value; + return balance; + }, 0); + const balance = inChannelBalance + outputBalance; + dispatch({ + type: types.LN_WALLET_GET_FUNDS + FULFILLED, + payload: {balance}, + }); + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_GET_FUNDS + REJECTED, + payload: {error: err}, + }); + } +}; + +const decodeBolt = bolt11 => async dispatch => { + dispatch({type: types.LN_WALLET_DECODE_BOLT + PENDING}); + try { + await dispatch(initLnClient()); + const invoice = await lnClient.decodeBolt(bolt11); + dispatch({ + type: types.LN_WALLET_DECODE_BOLT + FULFILLED, + }); + return invoice; + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_DECODE_BOLT + REJECTED, + payload: {error: err}, + }); + } +}; + +const getRoute = (nodeId, msatoshi) => async dispatch => { + dispatch({type: types.LN_WALLET_GET_ROUTE + PENDING}); + try { + await dispatch(initLnClient()); + const routes = await lnClient.getRoute(nodeId, msatoshi); + dispatch({ + type: types.LN_WALLET_GET_ROUTE + FULFILLED, + }); + return routes; + } catch (err) { + // if throws no found exception + if (err?.err?.code === 205) { + dispatch({ + type: types.LN_WALLET_GET_ROUTE + FULFILLED, + }); + return []; + } else { + error(err); + dispatch({ + payload: {error: err}, + type: types.LN_WALLET_GET_ROUTE + REJECTED, + }); + } + } +}; + +const payBolt = bolt11 => async dispatch => { + dispatch({type: types.LN_WALLET_PAY_BOLT + PENDING}); + try { + await dispatch(initLnClient()); + const txnDetails = await lnClient.payBolt11(bolt11); + dispatch({ + type: types.LN_WALLET_PAY_BOLT + FULFILLED, + }); + return txnDetails; + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_PAY_BOLT + REJECTED, + payload: {error: err}, + }); + } +}; + +const getPeers = nodeId => async dispatch => { + dispatch({type: types.LN_WALLET_GET_PEERS + PENDING}); + try { + await dispatch(initLnClient()); + const peers = await lnClient.listPeers(nodeId); + dispatch({ + type: types.LN_WALLET_GET_PEERS + FULFILLED, + payload: {peers}, + }); + return peers; + } catch (err) { + dispatch({ + type: types.LN_WALLET_GET_PEERS + REJECTED, + payload: {error: err}, + }); + error(err); + } +}; + +const createInvoice = invoice => async dispatch => { + dispatch({type: types.LN_WALLET_CREATE_INVOICE + PENDING}); + try { + await dispatch(initLnClient()); + const createdInvoice = await lnClient.createInvoice(invoice); + dispatch({ + type: types.LN_WALLET_CREATE_INVOICE + FULFILLED, + }); + return createdInvoice; + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_CREATE_INVOICE + REJECTED, + payload: {error: err}, + }); + } +}; +const openAndFundPeerChannel = payload => async dispatch => { + dispatch({type: types.LN_WALLET_OPEN_FUND_PEER_CHANNEL + PENDING}); + try { + await dispatch(initLnClient()); + const fundingResponse = await lnClient.openAndFundPeerChannel(payload); + // cn error returns 200 but has result failed + if (fundingResponse.result !== 'success') { + throw fundingResponse; + } + dispatch({ + type: types.LN_WALLET_OPEN_FUND_PEER_CHANNEL + FULFILLED, + }); + return fundingResponse; + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_OPEN_FUND_PEER_CHANNEL + REJECTED, + payload: {error: err}, + }); + } +}; + +const getNewAddress = () => async dispatch => { + dispatch({type: types.LN_WALLET_GET_NEW_ADDRESS + PENDING}); + try { + await dispatch(initLnClient()); + const address = await lnClient.getNewAddress(); + dispatch({ + type: types.LN_WALLET_GET_NEW_ADDRESS + FULFILLED, + payload: {address}, + }); + return address; + } catch (err) { + dispatch({ + type: types.LN_WALLET_GET_NEW_ADDRESS + REJECTED, + payload: {error: err}, + }); + error(err); + } +}; + +const withdrawFunds = (address, amount) => async dispatch => { + dispatch({type: types.LN_WALLET_WITHDRAW_FUNDS + PENDING}); + try { + await dispatch(initLnClient()); + const withdrawResult = await lnClient.withdrawFunds(address, amount); + dispatch({ + type: types.LN_WALLET_WITHDRAW_FUNDS + FULFILLED, + }); + return withdrawResult; + } catch (err) { + error(err); + dispatch({ + type: types.LN_WALLET_WITHDRAW_FUNDS + REJECTED, + payload: {error: err}, + }); + } +}; + +export { + getFunds, + getLnNodesList, + getLnNodeInfo, + getLnWalletDetails, + decodeBolt, + getRoute, + payBolt, + getPeers, + createInvoice, + openAndFundPeerChannel, + getNewAddress, + withdrawFunds, +}; diff --git a/src/store/io/btcClient/index.js b/src/store/io/btcClient/index.js index c589a10..1d78975 100644 --- a/src/store/io/btcClient/index.js +++ b/src/store/io/btcClient/index.js @@ -1,4 +1,4 @@ -import {btcClient} from 'cyphernode-js-sdk'; +import {btcClient} from 'sifir-js-sdk'; let _btcClient = null; export default async ({transport}) => { if (!_btcClient) { diff --git a/src/store/io/events/index.js b/src/store/io/events/index.js index 8dad172..6016263 100644 --- a/src/store/io/events/index.js +++ b/src/store/io/events/index.js @@ -1,10 +1,14 @@ -// import {NativeModules} from 'react-native'; -//const {PgpBridge} = NativeModules; +/** +This is the events class we use for logging + tracking important events +*/ +import {NativeModules} from 'react-native'; +const {Rudder} = NativeModules; -const event = (name, payload) => { +const event = (name, payload = '') => { if (__DEV__) { console.log('event:', name, payload); } + Rudder.event(name, JSON.stringify({env: __DEV__ ? 'dev' : 'prod', payload})); }; const log = (name, ...payload) => { if (__DEV__) { diff --git a/src/store/io/lnClient/clientFactory.js b/src/store/io/lnClient/clientFactory.js new file mode 100644 index 0000000..674bcd6 --- /dev/null +++ b/src/store/io/lnClient/clientFactory.js @@ -0,0 +1,10 @@ +import {lnClient} from 'sifir-js-sdk'; +let _lnClient = null; +export default async ({transport}) => { + if (!_lnClient) { + _lnClient = lnClient({ + transport, + }); + } + return _lnClient; +}; diff --git a/src/store/io/lnClient/index.js b/src/store/io/lnClient/index.js new file mode 100644 index 0000000..5a91614 --- /dev/null +++ b/src/store/io/lnClient/index.js @@ -0,0 +1 @@ +export lnClient from './clientFactory'; diff --git a/src/store/io/sifirClient/index.js b/src/store/io/sifirClient/index.js new file mode 100644 index 0000000..0f7ab95 --- /dev/null +++ b/src/store/io/sifirClient/index.js @@ -0,0 +1,9 @@ +import {sifirClient} from 'sifir-js-sdk'; +let client = null; +export default async ({transport}) => { + if (!client) { + // FIXME sifir to {transport} + client = sifirClient(transport); + } + return client; +}; diff --git a/src/store/io/stores/b64RnSensitiveStorage/index.js b/src/store/io/stores/b64RnSensitiveStorage/index.js new file mode 100644 index 0000000..220378a --- /dev/null +++ b/src/store/io/stores/b64RnSensitiveStorage/index.js @@ -0,0 +1,27 @@ +import SInfo from 'react-native-sensitive-info'; +import base64 from 'base-64'; +const asyncStore = ({nameSpace = 'SIFIR_WALLET'} = {}) => { + const _makeKey = label => `${nameSpace}_${label}`; + + const get = async (label, jsonPayload) => { + const encoded = base64.encode(JSON.stringify(jsonPayload)); + return await SInfo.setItem(_makeKey(label), encoded, { + sharedPreferencesName: 'Sifir', + keychainService: 'SifirKeychain', + }); + }; + const set = async label => { + const encodedKeysString = await SInfo.getItem(_makeKey(label), { + sharedPreferencesName: 'Sifir', + keychainService: 'SifirKeychain', + }); + if (encodedKeysString) { + return JSON.parse(base64.decode(encodedKeysString)); + } else { + return null; + } + }; + + return {get, set}; +}; +export default asyncStore; diff --git a/src/store/io/stores/index.js b/src/store/io/stores/index.js new file mode 100644 index 0000000..166b9f7 --- /dev/null +++ b/src/store/io/stores/index.js @@ -0,0 +1,138 @@ +import {db as _melondb} from './melondb'; +import {bolt11Table, lnNodesTableSchema} from './melondb/ln/schemas'; +import {LnNodes, LnNodeBolt11Records} from './melondb/ln/models'; +import {Q} from '@nozbe/watermelondb'; +import {log} from '@io/events'; +const db = _melondb({ + tableSchemas: [bolt11Table, lnNodesTableSchema], + modelClasses: [LnNodes, LnNodeBolt11Records], +}); +const lnStore = { + async getLnNodes() { + try { + const wallet = await db.collections + .get('ln_nodes') + .query() + .fetch(); + return wallet; + } catch (err) { + log('lnstore:getLnWalletByLabel:', err); + return null; + } + }, + async insertLnNode({alias, id, nodeInfo}) { + await db.action(async () => { + await db.collections.get('ln_nodes').create(node => { + node.pubkey = id; + node.alias = alias; + node.nodeInfo = nodeInfo; + }); + }); + }, + async upsertLnNodeByPubkey(pubkey, {alias, id, nodeInfo}) { + await db.action(async () => { + const [node] = await db.collections + .get('ln_nodes') + .query(Q.where('pubkey_id', Q.eq(pubkey))) + .fetch(); + if (!node) { + await db.collections.get('ln_nodes').create(lnNode => { + lnNode.pubkey = id; + lnNode.alias = alias; + lnNode.nodeInfo = nodeInfo; + }); + } else { + await node.update(lnNode => { + lnNode.alias = alias; + lnNode.nodeInfo = nodeInfo; + }); + } + }); + }, + async getLnNodeByAlias(alias) { + try { + const [node] = await db.collections + .get('ln_nodes') + .query(Q.where('alias', Q.eq(alias))) + .fetch(); + return node; + } catch (err) { + log('lnstore:getLnWalletByLabel:', err); + return null; + } + }, + async getLnNodeByPubkey(pubkey) { + try { + const [node] = await db.collections + .get('ln_nodes') + .query(Q.where('pubkey_id', Q.eq(pubkey))) + .fetch(); + return node; + } catch (err) { + log('lnstore:getLnWalletByLabel:', err); + return null; + } + }, + async insertLnNodeDecodedBolt({ + lnNodePubkey, + bolt11, + type, + decodedBolt11, + meta, + }) { + const node = await this.getLnNodeByPubkey(lnNodePubkey); + await db.action(async () => { + await db.collections.get('bolt11_records').create(bolt => { + bolt.bolt11 = bolt11; + bolt.type = type; + bolt.decodedBolt11 = decodedBolt11; + bolt.meta = meta; + bolt.lnNodePubkey.set(node); + }); + }); + }, + async batchInsertLnNodeDecodedBolts(lnNodePubkey, payload) { + const node = await this.getLnNodeByPubkey(lnNodePubkey); + await db.action(async () => { + const collection = await db.collections.get('bolt11_records'); + const batch = payload + .filter(x => !!x) + .map(({bolt11, type, decodedBolt11, meta}) => + collection.prepareCreate(bolt => { + bolt.bolt11 = bolt11; + bolt.type = type; + bolt.decodedBolt11 = decodedBolt11; + bolt.meta = meta; + bolt.lnNodePubkey.set(node); + return bolt; + }), + ); + await db.batch(...batch); + }); + }, + async getBoltByBolt11(bolt11) { + try { + const txnsByType = await db.collections + .get('bolt11_records') + .query(Q.where('bolt11_id', Q.eq(bolt11))) + .fetch(); + return txnsByType; + } catch (err) { + log('lnstore:txnsByBolt11:', err); + return null; + } + }, + async getBoltsByType(type) { + try { + const txnsByType = await db.collections + .get('bolt11_records') + .query(Q.where('type', Q.eq(type))) + .fetch(); + return txnsByType; + } catch (err) { + log('lnstore:getTxnByType', err); + return null; + } + }, +}; +export {db, lnStore}; diff --git a/src/store/io/stores/melondb/index.js b/src/store/io/stores/melondb/index.js new file mode 100644 index 0000000..023612a --- /dev/null +++ b/src/store/io/stores/melondb/index.js @@ -0,0 +1,25 @@ +import {appSchema} from '@nozbe/watermelondb'; +import {Database} from '@nozbe/watermelondb'; +import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite'; + +// TODO adapter as param to inject +const db = ({tableSchemas, modelClasses}) => { + const schema = appSchema({ + version: 7, + tables: tableSchemas, + }); + // First, create the adapter to the underlying database: + const adapter = new SQLiteAdapter({ + schema, + }); + + // Then, make a Watermelon database from it! + const database = new Database({ + adapter, + modelClasses, + actionsEnabled: true, + }); + return database; +}; + +export {db}; diff --git a/src/store/io/stores/melondb/ln/models.js b/src/store/io/stores/melondb/ln/models.js new file mode 100644 index 0000000..5eb8ce9 --- /dev/null +++ b/src/store/io/stores/melondb/ln/models.js @@ -0,0 +1,44 @@ +import { + date, + readonly, + field, + relation, + json, + children, + nochange, + text, + lazy, +} from '@nozbe/watermelondb/decorators'; +import {Model} from '@nozbe/watermelondb'; +import {Q} from '@nozbe/watermelondb'; + +class LnNodes extends Model { + static table = 'ln_nodes'; + static associations = { + bolt11_records: {type: 'has_many', foreignKey: 'pubkey_id'}, + }; + @nochange @field('pubkey_id') pubkey; + @readonly @date('created_at') createdAt; + @readonly @date('updated_at') updatedAt; + @field('alias') alias; + @json('node_info', jsn => jsn) nodeInfo; + + @children('bolt11_records') transactions; + @lazy invoices = this.transactions.extend(Q.where('type', Q.eq('invoice'))); + @lazy pays = this.transactions.extend(Q.where('type', Q.eq('pays'))); +} + +class LnNodeBolt11Records extends Model { + static table = 'bolt11_records'; + static associations = { + ln_nodes: {type: 'belongs_to', key: 'pubkey_id'}, + }; + @nochange @field('bolt11_id') bolt11; + @field('type') type; + @json('decoded_bolt11', jsn => jsn) decodedBolt11; + @json('meta', jsn => jsn) meta; + @readonly @date('created_at') createdAt; + @relation('ln_nodes', 'pubkey_id') lnNodePubkey; +} + +export {LnNodes, LnNodeBolt11Records}; diff --git a/src/store/io/stores/melondb/ln/schemas.js b/src/store/io/stores/melondb/ln/schemas.js new file mode 100644 index 0000000..f692f40 --- /dev/null +++ b/src/store/io/stores/melondb/ln/schemas.js @@ -0,0 +1,23 @@ +import {tableSchema} from '@nozbe/watermelondb'; +const lnNodesTableSchema = tableSchema({ + name: 'ln_nodes', + columns: [ + {name: 'pubkey_id', type: 'string', isIndexed: true}, + {name: 'alias', type: 'string', isIndexed: true}, + {name: 'node_info', type: 'string'}, + {name: 'updated_at', type: 'number'}, + {name: 'created_at', type: 'number'}, + ], +}); +const bolt11Table = tableSchema({ + name: 'bolt11_records', + columns: [ + {name: 'bolt11_id', type: 'string', isIndexed: true}, + {name: 'pubkey_id', type: 'string', isIndexed: true}, + {name: 'type', type: 'string', isIndexed: true}, + {name: 'decoded_bolt11', type: 'string'}, + {name: 'meta', type: 'string'}, + ], +}); + +export {bolt11Table, lnNodesTableSchema}; diff --git a/src/store/io/transports/tor/index.js b/src/store/io/transports/tor/index.js index 51e516c..3d74772 100644 --- a/src/store/io/transports/tor/index.js +++ b/src/store/io/transports/tor/index.js @@ -1,7 +1,7 @@ import {signMessage, verifySignedMessage} from '@io/pgp/'; import {rnTorTransport} from './sifirRnTorTransport'; import base64 from 'base-64'; -import {log, error} from '@io/events/'; +import {error} from '@io/events/'; const getTransport = (token, devicePgpKey, nodePubkey) => { const {onionUrl} = token; const {fingerprint} = devicePgpKey; @@ -37,6 +37,9 @@ const getTransport = (token, devicePgpKey, nodePubkey) => { error( 'error validating signature of incoming message', err, + 'payload', + payload, + 'fp,sig:', sigfingerprint, sig, ); diff --git a/src/store/reducers/auth.js b/src/store/reducers/auth.js index e3a9b15..6f3116e 100644 --- a/src/store/reducers/auth.js +++ b/src/store/reducers/auth.js @@ -5,16 +5,13 @@ import { PGP_UNLOCK_KEYS, } from '@types/'; import {createReducer} from '@utils/'; -import {FULFILLED, PENDING, REJECTED, READY} from '@utils/constants'; +import {RESTART, FULFILLED, PENDING, REJECTED, READY} from '@utils/constants'; const initialState = { loading: false, loaded: false, pairing: false, paired: false, - keyWarning: '', - keyError: '', - authWarning: '', error: '', unlocked: false, // --- @@ -30,22 +27,18 @@ const auth = createReducer(initialState)({ [PGP_UNLOCK_KEYS + FULFILLED]: (state, {payload}) => ({ ...state, unlocked: true, - keyError: null, - keyWarning: null, }), - [PGP_UNLOCK_KEYS + REJECTED]: (state, {warning = null, error = null}) => ({ + [PGP_UNLOCK_KEYS + REJECTED]: (state, {error = null}) => ({ ...state, unlocked: false, - keyWarning: warning, - keyError: error, + error, }), [PGP_GET_KEYS + FULFILLED]: (state, {payload}) => ({ ...state, devicePgpKey: payload, }), - [PGP_GET_KEYS + REJECTED]: (state, {warning = null, error = null}) => ({ + [PGP_GET_KEYS + REJECTED]: (state, {error = null}) => ({ ...state, - keyWarning: warning, error, devicePgpKey: {}, }), @@ -61,14 +54,18 @@ const auth = createReducer(initialState)({ nodePubkey, key, }), - [GET_AUTH_STATUS + REJECTED]: (state, {warning = null, error = null}) => ({ + [GET_AUTH_STATUS + REJECTED]: (state, {error = null}) => ({ ...state, - authWarning: warning, error, - // encAuthInfo: null, token: null, pairingKey: null, }), + [REQUEST_PAIR + RESTART]: state => ({ + ...state, + paired: false, + pairing: false, + error: '', + }), [REQUEST_PAIR + PENDING]: state => ({ ...state, paired: false, @@ -77,14 +74,12 @@ const auth = createReducer(initialState)({ [REQUEST_PAIR + FULFILLED]: (state, {payload: {nodePubkey}}) => ({ ...state, paired: true, - // nodePubkey, pairing: false, }), [REQUEST_PAIR + REJECTED]: (state, {error}) => ({ ...state, paired: false, pairing: false, - // nodePubkey: '', error, }), }); diff --git a/src/store/reducers/btcWallet.js b/src/store/reducers/btcWallet.js index 2f43bca..53c79a6 100644 --- a/src/store/reducers/btcWallet.js +++ b/src/store/reducers/btcWallet.js @@ -10,9 +10,36 @@ const initialState = { address: null, btcSendResult: null, feeSettingEnabled: false, + chainInfo: null, }; const btcWallet = createReducer(initialState)({ + [types.BTC_WALLET_GET_BLOCKCHAININFO + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.BTC_WALLET_GET_BLOCKCHAININFO + FULFILLED]: ( + state, + {payload: {chainInfo}}, + ) => ({ + ...state, + loading: false, + loaded: true, + error: null, + chainInfo, + }), + [types.BTC_WALLET_GET_BLOCKCHAININFO + REJECTED]: ( + state, + {payload: {error}}, + ) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + [types.BTC_WALLET_LIST_DATA_SHOW + PENDING]: state => ({ ...state, error: null, diff --git a/src/store/reducers/index.js b/src/store/reducers/index.js index 53d0797..2bf2e30 100644 --- a/src/store/reducers/index.js +++ b/src/store/reducers/index.js @@ -1,2 +1,3 @@ export btcWallet from './btcWallet'; +export lnWallet from './lnWallet'; export auth from './auth'; diff --git a/src/store/reducers/lnWallet.js b/src/store/reducers/lnWallet.js new file mode 100644 index 0000000..7a52ed5 --- /dev/null +++ b/src/store/reducers/lnWallet.js @@ -0,0 +1,212 @@ +import * as types from '@types/'; +import {createReducer} from '@utils/'; +import {FULFILLED, PENDING, REJECTED} from '@utils/constants'; + +const initialState = { + loading: false, + error: null, + loaded: false, + funds: [], + peers: [], + nodeInfo: [], +}; + +const lnWallet = createReducer(initialState)({ + [types.LN_WALLET_NODEINFO + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_NODEINFO + FULFILLED]: (state, {payload: {nodeInfo}}) => ({ + ...state, + nodeInfo: [nodeInfo], + loading: false, + loaded: true, + error: null, + }), + [types.LN_WALLET_NODEINFO + REJECTED]: (state, {payload: {nodeError}}) => ({ + ...state, + nodeError, + loading: false, + loaded: false, + }), + [types.LN_WALLET_GET_FUNDS + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_GET_FUNDS + FULFILLED]: (state, {payload: {balance}}) => ({ + ...state, + loading: false, + loaded: true, + error: null, + balance, + }), + [types.LN_WALLET_GET_FUNDS + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + [types.LN_WALLET_DETAILS + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_DETAILS + FULFILLED]: state => ({ + ...state, + loading: false, + loaded: true, + error: null, + }), + [types.LN_WALLET_DETAILS + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + + [types.LN_WALLET_DECODE_BOLT + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_DECODE_BOLT + FULFILLED]: state => ({ + ...state, + loading: false, + loaded: true, + error: null, + }), + [types.LN_WALLET_DECODE_BOLT + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + + [types.LN_WALLET_GET_ROUTE + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_GET_ROUTE + FULFILLED]: state => ({ + ...state, + loading: false, + loaded: true, + error: null, + }), + [types.LN_WALLET_GET_ROUTE + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + [types.LN_WALLET_PAY_BOLT + PENDING]: state => ({ + ...state, + error: null, + isPayingBolt: true, + isBoltPaid: false, + }), + [types.LN_WALLET_PAY_BOLT + FULFILLED]: state => ({ + ...state, + isPayingBolt: false, + isBoltPaid: true, + error: null, + }), + [types.LN_WALLET_PAY_BOLT + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + isPayingBolt: false, + isBoltPaid: false, + }), + [types.LN_WALLET_GET_PEERS + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_GET_PEERS + FULFILLED]: (state, {payload: {peers}}) => ({ + ...state, + loading: false, + loaded: true, + error: null, + peers, + }), + [types.LN_WALLET_GET_PEERS + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + [types.LN_WALLET_OPEN_FUND_PEER_CHANNEL + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_OPEN_FUND_PEER_CHANNEL + FULFILLED]: state => ({ + ...state, + loading: false, + loaded: true, + error: null, + }), + [types.LN_WALLET_OPEN_FUND_PEER_CHANNEL + REJECTED]: ( + state, + {payload: {error}}, + ) => ({ + ...state, + error, + loading: false, + loaded: false, + }), + [types.LN_WALLET_GET_NEW_ADDRESS + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_GET_NEW_ADDRESS + FULFILLED]: ( + state, + {payload: {address}}, + ) => ({ + ...state, + loading: false, + loaded: true, + error: null, + address, + }), + [types.LN_WALLET_GET_NEW_ADDRESS + REJECTED]: ( + state, + {payload: {address}}, + ) => ({ + ...state, + address, + loading: false, + loaded: false, + }), + [types.LN_WALLET_WITHDRAW_FUNDS + PENDING]: state => ({ + ...state, + error: null, + loading: true, + loaded: false, + }), + [types.LN_WALLET_WITHDRAW_FUNDS + FULFILLED]: state => ({ + ...state, + loading: false, + loaded: true, + error: null, + }), + [types.LN_WALLET_WITHDRAW_FUNDS + REJECTED]: (state, {payload: {error}}) => ({ + ...state, + error, + loading: false, + loaded: false, + }), +}); + +export default lnWallet; diff --git a/src/store/types/index.js b/src/store/types/index.js index c449f06..24d72f9 100644 --- a/src/store/types/index.js +++ b/src/store/types/index.js @@ -1,10 +1,24 @@ // Wallet +export const BTC_WALLET_GET_BLOCKCHAININFO = 'BTC_WALLET_GET_BLOCKCHAININFO'; export const BTC_CLIENT_STATUS = 'BTC_CLIENT_STATUS'; export const BTC_WALLET_LIST_DATA_SHOW = 'WALLETLIST_DATA_SHOW'; export const BTC_WALLET_DETAILS = 'WALLET_DATA_SHOW'; export const BTC_WALLET_ADDRESS = 'WALLET_ADDRESS'; export const SEND_BITCOIN = 'SEND_BITCOIN'; +// Ln +export const LN_WALLET_GET_FUNDS = 'LN_WALLET_GET_FUNDS'; +export const LN_WALLET_NODEINFO = 'LN_WALLET_NODEINFO'; +export const LN_WALLET_DECODE_BOLT = 'LN_WALLET_DECODE_BOLT'; +export const LN_WALLET_GET_ROUTE = 'LN_WALLET_GET_ROUTE'; +export const LN_WALLET_PAY_BOLT = 'LN_WALLET_PAY_BOLT'; +export const LN_WALLET_CREATE_INVOICE = 'LN_WALLET_CREATE_INVOICE'; +export const LN_WALLET_GET_PEERS = 'LN_WALLET_GET_PEERS'; +export const LN_WALLET_OPEN_FUND_PEER_CHANNEL = + 'LN_WALLET_OPEN_FUND_PEER_CHANNEL'; +export const LN_WALLET_GET_NEW_ADDRESS = 'LN_WALLET_GET_NEW_ADDRESS'; +export const LN_WALLET_WITHDRAW_FUNDS = 'LN_WALLET_WITHDRAW_FUNDS'; + // Auth export const REQUEST_PAIR = 'REQUEST_PAIR'; export const GET_AUTH_STATUS = 'GET_AUTH_STATUS'; diff --git a/src/store/utils/constants.js b/src/store/utils/constants.js index d0ace73..45083e9 100644 --- a/src/store/utils/constants.js +++ b/src/store/utils/constants.js @@ -10,6 +10,7 @@ export const PENDING = '_PENDING'; export const FULFILLED = '_FULFILLED'; export const REJECTED = '_REJECTED'; export const READY = 'READY'; +export const RESTART = 'RESTART'; // key status export const PGP_KEYS_NOT_FOUND = 'PGP_KEYS_NOT_FOUND';