From 2dd1d7946072ba87ce3dfa460157170953e332c3 Mon Sep 17 00:00:00 2001 From: YJ Date: Mon, 22 Jul 2019 14:09:36 +0200 Subject: [PATCH 001/101] feat: wip for adding QR support for UOS --- ios/NativeSigner.xcodeproj/project.pbxproj | 1 - package.json | 1 + src/components/QrView.js | 12 +++++ src/screens/QrScanner.js | 34 +++++++++++-- src/util/native.js | 6 +++ yarn.lock | 55 +++++++++++++++++++++- 6 files changed, 102 insertions(+), 7 deletions(-) diff --git a/ios/NativeSigner.xcodeproj/project.pbxproj b/ios/NativeSigner.xcodeproj/project.pbxproj index a36f2867a6..6688af10de 100644 --- a/ios/NativeSigner.xcodeproj/project.pbxproj +++ b/ios/NativeSigner.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; diff --git a/package.json b/package.json index 1c738cc58e..4cae639467 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "commit": "commit-wizard" }, "dependencies": { + "@parity/qr-signer": "^0.3.2", "@react-native-community/netinfo": "^4.1.1", "bignumber.js": "^4.0.0", "debounce": "^1.0.0", diff --git a/src/components/QrView.js b/src/components/QrView.js index 5680d7cd76..1b1c75a4c2 100644 --- a/src/components/QrView.js +++ b/src/components/QrView.js @@ -28,6 +28,7 @@ export default class QrView extends React.PureComponent { displayQrCode = async (data) => { try { + // TODO: let qr = props.network === 'substrate' ? await qrSubstrate(data) : await qrCode(data); let qr = await qrCode(data); this.setState({ qr: qr @@ -60,6 +61,17 @@ export default class QrView extends React.PureComponent { let size = this.props.size || deviceWidth - 80; let flexBasis = this.props.height || deviceWidth - 40; + /* + TODO: + + */ + return ( . 'use strict'; - +import QrSigner from '@parity/qr-signer'; import PropTypes from 'prop-types'; import React from 'react'; import { Alert, StyleSheet, Text, View } from 'react-native'; @@ -43,6 +43,29 @@ export default class Scanner extends React.PureComponent { if (scannerStore.isBusy()) { return; } + /* + TODO: + assuming the txRequestData comes as raw binary: + + const buffer = new ArrayBuffer(txRequestData); + const dataAsBytes = new Uint8Array(buffer); + + let payloadType = { + '7B': 'ethereum_legacy', + '53': 'substrate', + '45': 'ethereum + } + + switch(payloadType[dataAsBytes[0]]) { + case 'ethereum': + ... + case 'ethereum_legacy': + ... handle legacy Ethereum payload as JSON as done below + case 'substrate': + ... + } + */ + try { const data = JSON.parse(txRequestData.data); if (data.action === undefined) { @@ -113,9 +136,10 @@ export class QrScannerView extends React.PureComponent { return ; } return ( - @@ -132,7 +156,7 @@ export class QrScannerView extends React.PureComponent { To Sign a New Transaction - + ); } } diff --git a/src/util/native.js b/src/util/native.js index 3a12021e75..4279ba454c 100644 --- a/src/util/native.js +++ b/src/util/native.js @@ -111,3 +111,9 @@ export function decryptData (data, password) { export function qrCode (data) { return EthkeyBridge.qrCode(data) } + +/* Not yet implemented +export function qrSubstrate (data) { + return SubkeyBridge.qrCode(data) +} +*/ diff --git a/yarn.lock b/yarn.lock index 9ccd9b3f34..10bfc8449b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -857,6 +857,20 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^12.0.9" +"@parity/erc681@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@parity/erc681/-/erc681-0.1.1.tgz#0ade5233751011c15d5e75bd2bb583a9ba450a5e" + integrity sha512-OGDAWbAcm4mh+wzw6uBYxw0OJtqJ+39W3pOXl0W93d2p/cH7ppfvunwf7irEPw0FPiAIuR/F77nU1zMKNhm8Dg== + +"@parity/qr-signer@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@parity/qr-signer/-/qr-signer-0.3.2.tgz#ad2ea95627c5fddb73f31a6950f8cf23c350c89f" + integrity sha512-6VMBzxkB2KecC8ZucAEy1DQ+4ZhcHwlffkMitbunn1Xw1duPXZ0b/suwDFBNZ3e9pRE3ErdxSUs2QKkIxDgt8w== + dependencies: + "@parity/erc681" "0.1.1" + qrcode-generator "1.4.1" + react-qr-reader "2.1.2" + "@react-native-community/cli-platform-android@^2.0.1", "@react-native-community/cli-platform-android@^2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-2.6.2.tgz#4e7ce8784e6b4a3139c739ce15672c9c4007b9fb" @@ -4263,6 +4277,11 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +jsqr@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.2.0.tgz#f93fc65fa7d1ded78b1bcb020fa044352b04261a" + integrity sha512-wKcQS9QC2VHGk7aphWCp1RrFyC0CM6fMgC5prZZ2KV/Lk6OKNoCod9IR6bao+yx3KPY0gZFC5dc+h+KFzCI0Wg== + jsx-ast-utils@^2.0.1: version "2.2.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz#4d4973ebf8b9d2837ee91a8208cc66f3a2776cfb" @@ -5685,7 +5704,7 @@ prompts@^2.0.1: kleur "^3.0.2" sisteransi "^1.0.0" -prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -5731,6 +5750,11 @@ q@2.0.3: pop-iterate "^1.0.1" weak-map "^1.0.5" +qrcode-generator@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.4.1.tgz#bfb6760e05d12c39df8acd60a0d459bdb2fa0756" + integrity sha512-KOdSAyFBPf0/5Z3mra4JfSbjrDlUn2J3YH8Rm33tRGbptxP4vhogLWysvkQp8mp5ix9u80Wfr4vxHXTeR9o0Ug== + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -5953,6 +5977,15 @@ react-proxy@^1.1.7: lodash "^4.6.1" react-deep-force-update "^1.0.0" +react-qr-reader@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/react-qr-reader/-/react-qr-reader-2.1.2.tgz#ff3d7d377d3ffbd9d78a0947ca04221c2f180e15" + integrity sha512-SyRrRRRS7XcIyX8x6tb+mgcMqYZw6Admf4vlnUO/Z21nJklf6WILmP4jstd1W5tNlonvuC/S8R8/doIuZBgVjA== + dependencies: + jsqr "^1.1.1" + prop-types "^15.5.8" + webrtc-adapter "^6.4.0" + react-refresh@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.2.0.tgz#f0cff375e8f75dea7133a847a1b40cf5c073dd0d" @@ -6302,6 +6335,13 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== +rtcpeerconnection-shim@^1.2.14: + version "1.2.15" + resolved "https://registry.yarnpkg.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243" + integrity sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw== + dependencies: + sdp "^2.6.0" + run-async@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" @@ -6415,6 +6455,11 @@ scheduler@^0.13.6: loose-envify "^1.1.0" object-assign "^4.1.1" +sdp@^2.6.0, sdp@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/sdp/-/sdp-2.9.0.tgz#2eed2d9c0b26c81ff87593107895c68d6fb9a0a6" + integrity sha512-XAVZQO4qsfzVTHorF49zCpkdxiGmPNjA8ps8RcJGtGP3QJ/A8I9/SVg/QnkAFDMXIyGbHZBBFwYBw6WdnhT96w== + semver-regex@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" @@ -7257,6 +7302,14 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== +webrtc-adapter@^6.4.0: + version "6.4.8" + resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-6.4.8.tgz#eeca3f0d5b40c0e629b865ef2a936a0b658274de" + integrity sha512-YM8yl545c/JhYcjGHgaCoA7jRK/KZuMwEDFeP2AcP0Auv5awEd+gZE0hXy9z7Ed3p9HvAXp8jdbe+4ESb1zxAw== + dependencies: + rtcpeerconnection-shim "^1.2.14" + sdp "^2.9.0" + whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" From d13508b21953c4c04ba3f308eb26739f2327d23b Mon Sep 17 00:00:00 2001 From: Maciej Hirsz Date: Tue, 23 Jul 2019 16:46:29 +0200 Subject: [PATCH 002/101] chore: Squashed old branch --- .../java/io/parity/signer/EthkeyBridge.java | 10 ++ ios/NativeSigner/EthkeyBridge.swift | 15 +++ rust/signer/Cargo.lock | 120 +++++++++--------- rust/signer/Cargo.toml | 1 - rust/signer/signer.h | 5 +- rust/signer/src/lib.rs | 56 ++++---- rust/signer/src/strate.rs | 14 ++ src/util/native.js | 6 + 8 files changed, 144 insertions(+), 83 deletions(-) create mode 100644 rust/signer/src/strate.rs diff --git a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java index b69f5f96fc..93b07db447 100644 --- a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java +++ b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java @@ -111,6 +111,15 @@ public void qrCode(String data, Promise promise) { } } + @ReactMethod + public void qrCodeHex(String data, Promise promise) { + try { + promise.resolve(ethkeyQrCodeHex(data)); + } catch (Exception e) { + promise.reject("failed to create QR code", "failed to create QR code"); + } + } + private static native String ethkeyBrainwalletAddress(String seed); private static native String ethkeyBrainwalletBIP39Address(String seed); private static native String ethkeyBrainwalletSign(String seed, String message); @@ -122,4 +131,5 @@ public void qrCode(String data, Promise promise) { private static native String ethkeyEncryptData(String data, String password); private static native String ethkeyDecryptData(String data, String password); private static native String ethkeyQrCode(String data); + private static native String ethkeyQrCodeHex(String data); } diff --git a/ios/NativeSigner/EthkeyBridge.swift b/ios/NativeSigner/EthkeyBridge.swift index 4f0df704c9..2ad89bd341 100644 --- a/ios/NativeSigner/EthkeyBridge.swift +++ b/ios/NativeSigner/EthkeyBridge.swift @@ -143,4 +143,19 @@ class EthkeyBridge: NSObject { reject("Failed to generate blockies", nil, nil) } } + + @objc func qrCodeHex(_ data: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { + var error: UInt32 = 0 + var data_ptr = data.asPtr() + let icon_rust_str = qrcode_hex(&error, &data_ptr) + let icon_rust_str_ptr = rust_string_ptr(icon_rust_str) + let icon = String.fromStringPtr(ptr: icon_rust_str_ptr!.pointee) + rust_string_ptr_destroy(icon_rust_str_ptr) + rust_string_destroy(icon_rust_str) + if error == 0 { + resolve(icon) + } else { + reject("Failed to generate blockies", nil, nil) + } + } } diff --git a/rust/signer/Cargo.lock b/rust/signer/Cargo.lock index 5f952229d2..c29e0e4f09 100644 --- a/rust/signer/Cargo.lock +++ b/rust/signer/Cargo.lock @@ -51,7 +51,7 @@ dependencies = [ [[package]] name = "ascii" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -61,11 +61,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -73,7 +72,7 @@ dependencies = [ [[package]] name = "backtrace-sys" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -124,7 +123,7 @@ dependencies = [ "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -132,7 +131,7 @@ name = "block-cipher-trait" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -203,10 +202,10 @@ name = "combine" version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ascii 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -259,6 +258,11 @@ name = "crunchy" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "crypto-mac" version = "0.4.0" @@ -273,7 +277,7 @@ name = "crypto-mac" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -293,14 +297,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "deflate" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -317,10 +321,10 @@ dependencies = [ [[package]] name = "digest" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -356,8 +360,8 @@ dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -369,7 +373,7 @@ dependencies = [ "ethbloom 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", "uint 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -378,7 +382,7 @@ name = "ethereum-types-serialize" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -391,7 +395,7 @@ dependencies = [ "memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -404,7 +408,7 @@ dependencies = [ "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -412,7 +416,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -423,7 +427,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.36 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -458,7 +462,7 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -497,7 +501,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -592,7 +596,7 @@ dependencies = [ [[package]] name = "memchr" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -714,7 +718,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)", + "deflate 0.7.20 (registry+https://github.com/rust-lang/crates.io-index)", "inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -920,7 +924,7 @@ dependencies = [ [[package]] name = "ryu" -version = "0.2.8" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -988,30 +992,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.36 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1032,7 +1036,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1044,7 +1048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1063,12 +1067,11 @@ dependencies = [ "rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-hderive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1081,7 +1084,7 @@ name = "stream-cipher" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1096,7 +1099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.36" +version = "0.15.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1111,7 +1114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.36 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1142,10 +1145,10 @@ dependencies = [ [[package]] name = "tiny-keccak" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1231,10 +1234,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" -"checksum ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5fc969a8ce2c9c0c4b0429bb8431544f6658283c8326ba5ff8c762b75369335" +"checksum ascii 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "91e320562a8fa3286a481b7189f89578ace6b20df99e123c87f2f509c957c5d6" "checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" -"checksum backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)" = "ada4c783bb7e7443c14e0480f429ae2cc99da95065aeab7ee1b81ada0419404f" -"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" +"checksum backtrace 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "18b50f5258d1a9ad8396d2d345827875de4261b158124d4c819d9b351454fae5" +"checksum backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "5b3a000b9c543553af61bc01cbfc403b04b5caa9e421033866f2e98061eb3e61" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" @@ -1259,13 +1262,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" +"checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" "checksum crypto-mac 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "779015233ac67d65098614aec748ac1c756ab6677fa2e14cf8b37c08dfed1198" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" "checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" "checksum curve25519-dalek 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5d4b820e8711c211745880150f5fac78ab07d6e3851d8ce9f5a02cedc199174c" -"checksum deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8a6abb26e16e8d419b5c78662aa9f82857c2386a073da266840e474d5055ec86" +"checksum deflate 0.7.20 (registry+https://github.com/rust-lang/crates.io-index)" = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" -"checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" +"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" @@ -1279,7 +1283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fixed-hash 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7afe6ce860afb14422711595a7b26ada9ed7de2f43c0b2ab79d09ee196287273" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" @@ -1297,7 +1301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "688e8d65e495567c2c35ea0001b26b9debf0b4ea11f8cccc954233b75fc3428a" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" -"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db" "checksum merlin 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8c39467de91b004f5b9c06fac5bbc8e7d28309a205ee66905166b70804a71fea" @@ -1335,7 +1339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" "checksum rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "403bb3a286107a04825a5f82e1270acc1e14028d3d554d7a1e08914549575ab8" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" +"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5eff518f9bed3d803a0d002af0ab96339b0ebbedde3bec98a684986134b7a39" @@ -1343,9 +1347,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "656c79d0e90d0ab28ac86bf3c3d10bfbbac91450d3f190113b4e76d9fec3cfdd" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "32746bf0f26eab52f06af0d0aa1984f641341d06d8d673c693871da2d188c9be" -"checksum serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)" = "46a3223d0c9ba936b61c0d2e3e559e3217dbfb8d65d06d26e8b3c25de38bae3e" -"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +"checksum serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)" = "076a696fdea89c19d3baed462576b8f6d663064414b5c793642da8dfeb99475b" +"checksum serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)" = "ef45eb79d6463b22f5f9e16d283798b7c0175ba6050bc25c1a946c122727fe7b" +"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" @@ -1353,11 +1357,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01dca13cf6c3b179864ab3292bd794e757618d35a7766b7c46050c614ba00829" -"checksum syn 0.15.36 (registry+https://github.com/rust-lang/crates.io-index)" = "8b4f551a91e2e3848aeef8751d0d4eec9489b6474c720fd4c55958d8d31a430c" +"checksum syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d960b829a55e56db167e861ddb43602c003c7be0bee1d345021703fac2fb7c" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" "checksum tiny-hderive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61b93055d985b003d5f982ef03088f1a5597bb85b9e0b00efac1b36c18a6cb93" -"checksum tiny-keccak 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dbbdebb0b801c7fa4260b6b9ac5a15980276d7d7bcc2dc2959a7c4dc8b426a1a" +"checksum tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum uint 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "754ba11732b9161b94c41798e5197e5e75388d012f760c42adb5000353e98646" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" diff --git a/rust/signer/Cargo.toml b/rust/signer/Cargo.toml index b24989d7bd..f447ad89c8 100644 --- a/rust/signer/Cargo.toml +++ b/rust/signer/Cargo.toml @@ -15,7 +15,6 @@ rustc-hex = "2.0.1" schnorrkel = "0.1.0" serde = "1.0" serde_json = "1.0" -sha2 = "0.8" tiny-bip39 = { version = "0.6.1", default-features = false } tiny-hderive = "0.1" tiny-keccak = "1.4" diff --git a/rust/signer/signer.h b/rust/signer/signer.h index a65c4be71d..46cc4638d6 100644 --- a/rust/signer/signer.h +++ b/rust/signer/signer.h @@ -74,5 +74,8 @@ struct rust_string* encrypt_data(unsigned* error, const struct rust_string_ptr* struct rust_string* decrypt_data(unsigned* error, const struct rust_string_ptr* encrypted_data, const struct rust_string_ptr* password); -// qr code generator +// qr code generator for utf-8 strings struct rust_string* qrcode(unsigned* error, const struct rust_string_ptr* data); + +// qr code generator for hex-encoded binary +struct rust_string* qrcode_hex(unsigned* error, const struct rust_string_ptr* data); diff --git a/rust/signer/src/lib.rs b/rust/signer/src/lib.rs index c6e50ea01d..fb98669612 100644 --- a/rust/signer/src/lib.rs +++ b/rust/signer/src/lib.rs @@ -15,6 +15,7 @@ // along with Parity. If not, see . mod eth; +mod strate; mod util; use util::StringPtr; @@ -68,6 +69,33 @@ pub unsafe extern fn ethkey_keypair_sign(keypair: *mut KeyPair, message: *mut St Box::into_raw(Box::new(signature)) } +fn qrcode_bytes(data: &[u8]) -> Option { + use qrcodegen::{QrCode, QrCodeEcc}; + use pixelate::{Image, Color, BLACK}; + + let qr = QrCode::encode_binary(data, QrCodeEcc::Medium).ok()?; + + let palette = &[Color::Rgba(255,255,255,0), BLACK]; + let mut pixels = Vec::with_capacity((qr.size() * qr.size()) as usize); + + for y in 0..qr.size() { + for x in 0..qr.size() { + pixels.push(qr.get_module(x, y) as u8); + } + } + + let mut result = Vec::new(); + + Image { + palette, + pixels: &pixels, + width: qr.size() as usize, + scale: 16, + }.render(&mut result).ok()?; + + Some(base64png(&result)) +} + export! { @Java_io_parity_signer_EthkeyBridge_ethkeyBrainwalletAddress fn ethkey_brainwallet_address(seed: &str) -> String { @@ -169,30 +197,12 @@ export! { @Java_io_parity_signer_EthkeyBridge_ethkeyQrCode fn qrcode(data: &str) -> Option { - use qrcodegen::{QrCode, QrCodeEcc}; - use pixelate::{Image, Color, BLACK}; - - let qr = QrCode::encode_binary(data.as_bytes(), QrCodeEcc::Medium).ok()?; - - let palette = &[Color::Rgba(255,255,255,0), BLACK]; - let mut pixels = Vec::with_capacity((qr.size() * qr.size()) as usize); - - for y in 0..qr.size() { - for x in 0..qr.size() { - pixels.push(qr.get_module(x, y) as u8); - } - } - - let mut result = Vec::new(); - - Image { - palette, - pixels: &pixels, - width: qr.size() as usize, - scale: 16, - }.render(&mut result).ok()?; + qrcode_bytes(data.as_bytes()) + } - Some(base64png(&result)) + @Java_io_parity_signer_EthkeyBridge_ethkeyQrCodeHex + fn qrcode_hex(data: &str) -> Option { + qrcode_bytes(&data.from_hex::>().ok()?) } } diff --git a/rust/signer/src/strate.rs b/rust/signer/src/strate.rs new file mode 100644 index 0000000000..e644f81d89 --- /dev/null +++ b/rust/signer/src/strate.rs @@ -0,0 +1,14 @@ +use schnorrkel::MiniSecretKey; +use bip39::{Mnemonic, Seed, Language}; + +pub struct KeyPair(schnorrkel::Keypair); + +impl KeyPair { + pub fn from_bip39_phrase(phrase: &str) -> Option { + let mnemonic = Mnemonic::from_phrase(phrase, Language::English).ok()?; + let seed = Seed::new(&mnemonic, ""); + let mini_secret_key = MiniSecretKey::from_bytes(&seed.as_bytes()[..32]).ok()?; + + Some(KeyPair(mini_secret_key.expand_to_keypair())) + } +} diff --git a/src/util/native.js b/src/util/native.js index 3a12021e75..b26bc37689 100644 --- a/src/util/native.js +++ b/src/util/native.js @@ -108,6 +108,12 @@ export function decryptData (data, password) { return EthkeyBridge.decryptData(data, password); } +// Creates a QR code for the UTF-8 representation of a string export function qrCode (data) { return EthkeyBridge.qrCode(data) } + +// Creates a QR code for binary data from a hex-encoded string +export function qrCodeHex (data) { + return EthkeyBridge.qrCodeHex(data) +} From 106a47ff6f984dd001045f9adc66b8798df37e73 Mon Sep 17 00:00:00 2001 From: Maciej Hirsz Date: Tue, 23 Jul 2019 17:20:12 +0200 Subject: [PATCH 003/101] feat: expose blake2s hash function --- .../src/main/java/io/parity/signer/EthkeyBridge.java | 6 ++++++ ios/NativeSigner/EthkeyBridge.swift | 11 +++++++++++ rust/signer/Cargo.lock | 11 +++++++++++ rust/signer/Cargo.toml | 1 + rust/signer/signer.h | 12 ++---------- rust/signer/src/lib.rs | 9 ++++++++- 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java index 93b07db447..a9dbefe6b6 100644 --- a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java +++ b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java @@ -73,6 +73,11 @@ public void keccak(String data, Promise promise) { promise.resolve(ethkeyKeccak(data)); } + @ReactMethod + public void blake2s(String data, Promise promise) { + promise.resolve(ethkeyBlake2s(data)); + } + @ReactMethod public void ethSign(String data, Promise promise) { promise.resolve(ethkeyEthSign(data)); @@ -125,6 +130,7 @@ public void qrCodeHex(String data, Promise promise) { private static native String ethkeyBrainwalletSign(String seed, String message); private static native String ethkeyRlpItem(String data, int position); private static native String ethkeyKeccak(String data); + private static native String ethkeyBlake2s(String data); private static native String ethkeyEthSign(String data); private static native String ethkeyBlockiesIcon(String seed); private static native String ethkeyRandomPhrase(); diff --git a/ios/NativeSigner/EthkeyBridge.swift b/ios/NativeSigner/EthkeyBridge.swift index 2ad89bd341..3beed3a83f 100644 --- a/ios/NativeSigner/EthkeyBridge.swift +++ b/ios/NativeSigner/EthkeyBridge.swift @@ -65,6 +65,17 @@ class EthkeyBridge: NSObject { resolve(hash) } + @objc func blake2s(_ data: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { + var error: UInt32 = 0 + var data_ptr = data.asPtr() + let hash_rust_str = blake2s(&error, &data_ptr) + let hash_rust_str_ptr = rust_string_ptr(hash_rust_str) + let hash = String.fromStringPtr(ptr: hash_rust_str_ptr!.pointee) + rust_string_ptr_destroy(hash_rust_str_ptr) + rust_string_destroy(hash_rust_str) + resolve(hash) + } + @objc func ethSign(_ data: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { var error: UInt32 = 0 var data_ptr = data.asPtr() diff --git a/rust/signer/Cargo.lock b/rust/signer/Cargo.lock index c29e0e4f09..8d456542f9 100644 --- a/rust/signer/Cargo.lock +++ b/rust/signer/Cargo.lock @@ -106,6 +106,15 @@ name = "bitflags" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "block-buffer" version = "0.2.0" @@ -1058,6 +1067,7 @@ name = "signer" version = "0.1.0" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "blockies 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethsign 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1242,6 +1252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" "checksum block-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1339a1042f5d9f295737ad4d9a6ab6bf81c84a933dba110b9200cd6d1448b814" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" diff --git a/rust/signer/Cargo.toml b/rust/signer/Cargo.toml index f447ad89c8..0815832b9a 100644 --- a/rust/signer/Cargo.toml +++ b/rust/signer/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" [dependencies] base64 = "0.10.1" +blake2-rfc = "0.2.18" blockies = "0.3" ethsign = { version = "0.6.1", default-features = false, features = ["pure-rust"] } jni = { version = "0.10.2", default-features = false, optional = true } diff --git a/rust/signer/signer.h b/rust/signer/signer.h index 46cc4638d6..efc68a712c 100644 --- a/rust/signer/signer.h +++ b/rust/signer/signer.h @@ -49,27 +49,19 @@ struct rust_string* ethkey_brainwallet_bip39_address(unsigned* error, const stru // returns message signed with keypair struct rust_string* ethkey_brainwallet_sign(unsigned* error, const struct rust_string_ptr* seed, const struct rust_string_ptr* message); -// rlp ffi - // returns rlp item at given position struct rust_string* rlp_item(unsigned* error, const struct rust_string_ptr* rlp, const unsigned position); -// sha3 ffi - struct rust_string* keccak256(unsigned* error, const struct rust_string_ptr* data); -struct rust_string* eth_sign(unsigned* error, const struct rust_string_ptr* data); +struct rust_string* blake2s(unsigned* error, const struct rust_string_ptr* data); -// blockies ffi +struct rust_string* eth_sign(unsigned* error, const struct rust_string_ptr* data); struct rust_string* blockies_icon(unsigned* error, const struct rust_string_ptr* blockies_seed); -// random phrase ffi - struct rust_string* random_phrase(unsigned* error); -// data encryption ffi - struct rust_string* encrypt_data(unsigned* error, const struct rust_string_ptr* data, const struct rust_string_ptr* password); struct rust_string* decrypt_data(unsigned* error, const struct rust_string_ptr* encrypted_data, const struct rust_string_ptr* password); diff --git a/rust/signer/src/lib.rs b/rust/signer/src/lib.rs index fb98669612..dee6ba00b6 100644 --- a/rust/signer/src/lib.rs +++ b/rust/signer/src/lib.rs @@ -26,7 +26,7 @@ use rlp::decode_list; use rustc_hex::{ToHex, FromHex}; use tiny_keccak::Keccak; use tiny_keccak::keccak256 as keccak; - +use blake2_rfc::blake2s::blake2s as blake; use std::num::NonZeroU32; // 10240 is always non-zero, ergo this is safe @@ -142,6 +142,13 @@ export! { Some(keccak(&data).to_hex()) } + @Java_io_parity_signer_EthkeyBridge_ethkeyBlake2s + fn blake2s(data: &str) -> Option { + let data: Vec = data.from_hex().ok()?; + + Some(blake(32, &[], &data).as_bytes().to_hex()) + } + @Java_io_parity_signer_EthkeyBridge_ethkeyBlockiesIcon fn blockies_icon(seed: String) -> Option { use blockies::Ethereum; From e7ae6cb19101ba8bbb3345e7d4e6941c5ebd39e0 Mon Sep 17 00:00:00 2001 From: YJ Date: Fri, 26 Jul 2019 00:58:13 +0200 Subject: [PATCH 004/101] fix: use ui-qr --- package.json | 5 ++- src/screens/QrScanner.js | 13 +++---- yarn.lock | 77 +++++++++++++++++++++------------------- 3 files changed, 50 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 103c83be27..c54b31dc41 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "commit": "commit-wizard" }, "dependencies": { - "@parity/qr-signer": "^0.3.2", + "@polkadot/ui-qr": "^0.34.0-beta.86", "@react-native-community/netinfo": "^4.1.1", "bignumber.js": "^4.0.0", "debounce": "^1.0.0", @@ -38,8 +38,7 @@ "react-native-tabs": "^1.0.9", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.1", - "unstated": "^2.1.1", - "yarn": "^1.17.3" + "unstated": "^2.1.1" }, "devDependencies": { "@babel/cli": "^7.5.0", diff --git a/src/screens/QrScanner.js b/src/screens/QrScanner.js index 939cc778bb..2b678848cc 100644 --- a/src/screens/QrScanner.js +++ b/src/screens/QrScanner.js @@ -15,7 +15,8 @@ // along with Parity. If not, see . 'use strict'; -import QrSigner from '@parity/qr-signer'; + +import QrScan from '@polkadot/ui-qr'; import PropTypes from 'prop-types'; import React from 'react'; import { Alert, StyleSheet, Text, View } from 'react-native'; @@ -108,7 +109,8 @@ export class QrScannerView extends React.PureComponent { } static propTypes = { - onBarCodeRead: PropTypes.func.isRequired + onBarCodeRead: PropTypes.func.isRequired, + onError: PropTypes.func.isRequired }; componentWillMount() { @@ -136,10 +138,9 @@ export class QrScannerView extends React.PureComponent { return ; } return ( - @@ -156,7 +157,7 @@ export class QrScannerView extends React.PureComponent { To Sign a New Transaction - + ); } } diff --git a/yarn.lock b/yarn.lock index d170518cfd..7301af1947 100644 --- a/yarn.lock +++ b/yarn.lock @@ -633,6 +633,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" + integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ== + dependencies: + regenerator-runtime "^0.13.2" + "@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" @@ -857,19 +864,15 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^12.0.9" -"@parity/erc681@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@parity/erc681/-/erc681-0.1.1.tgz#0ade5233751011c15d5e75bd2bb583a9ba450a5e" - integrity sha512-OGDAWbAcm4mh+wzw6uBYxw0OJtqJ+39W3pOXl0W93d2p/cH7ppfvunwf7irEPw0FPiAIuR/F77nU1zMKNhm8Dg== - -"@parity/qr-signer@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@parity/qr-signer/-/qr-signer-0.3.2.tgz#ad2ea95627c5fddb73f31a6950f8cf23c350c89f" - integrity sha512-6VMBzxkB2KecC8ZucAEy1DQ+4ZhcHwlffkMitbunn1Xw1duPXZ0b/suwDFBNZ3e9pRE3ErdxSUs2QKkIxDgt8w== +"@polkadot/ui-qr@^0.34.0-beta.86": + version "0.34.0-beta.86" + resolved "https://registry.yarnpkg.com/@polkadot/ui-qr/-/ui-qr-0.34.0-beta.86.tgz#3c2bc7fe0b39bd2e63e11466173d79a14e1f4fb9" + integrity sha512-+wch0GA+PWaM62sO8cLE4nzVNWQj/zuNgPuOD4wVxFNw0PyC+7AtDCkv8hgHrUarBfcONvP4mWqJ//9E+UTwpA== dependencies: - "@parity/erc681" "0.1.1" - qrcode-generator "1.4.1" - react-qr-reader "2.1.2" + "@babel/runtime" "^7.5.5" + "@types/react-qr-reader" "^2.1.1" + qrcode-generator "^1.4.3" + react-qr-reader "^2.2.1" "@react-native-community/cli-platform-android@^2.0.1", "@react-native-community/cli-platform-android@^2.6.2": version "2.6.2" @@ -1059,6 +1062,13 @@ "@types/prop-types" "*" "@types/react" "*" +"@types/react-qr-reader@^2.1.1": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@types/react-qr-reader/-/react-qr-reader-2.1.2.tgz#da7a674cf9e3ceb1c026e89d5aa41fb1587fc66b" + integrity sha512-tDLqqiQMZlTKBKtWedcf7QZ3L9fyz8nPHNq/j+1mcJoEvrdM3Y89i3/FKwdmZ4H7G6uUk4JqShpWXLCuYpZK+w== + dependencies: + "@types/react" "*" + "@types/react@*": version "16.8.23" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.23.tgz#ec6be3ceed6353a20948169b6cb4c97b65b97ad2" @@ -4277,7 +4287,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsqr@^1.1.1: +jsqr@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.2.0.tgz#f93fc65fa7d1ded78b1bcb020fa044352b04261a" integrity sha512-wKcQS9QC2VHGk7aphWCp1RrFyC0CM6fMgC5prZZ2KV/Lk6OKNoCod9IR6bao+yx3KPY0gZFC5dc+h+KFzCI0Wg== @@ -5709,7 +5719,7 @@ prompts@^2.0.1: kleur "^3.0.2" sisteransi "^1.0.0" -prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -5755,10 +5765,10 @@ q@2.0.3: pop-iterate "^1.0.1" weak-map "^1.0.5" -qrcode-generator@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.4.1.tgz#bfb6760e05d12c39df8acd60a0d459bdb2fa0756" - integrity sha512-KOdSAyFBPf0/5Z3mra4JfSbjrDlUn2J3YH8Rm33tRGbptxP4vhogLWysvkQp8mp5ix9u80Wfr4vxHXTeR9o0Ug== +qrcode-generator@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.4.3.tgz#4876e8f280e65b6c94615f4c19c484f6b964b199" + integrity sha512-++rVRvMRq5BlHfmAafl8a4ppUntzUxCCUTT2t0siUgqKwdnqRzY8IH6f6WSX5dZUhD2Ul5/MIKuTJddflwrGzw== qs@~6.5.2: version "6.5.2" @@ -5995,14 +6005,14 @@ react-proxy@^1.1.7: lodash "^4.6.1" react-deep-force-update "^1.0.0" -react-qr-reader@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/react-qr-reader/-/react-qr-reader-2.1.2.tgz#ff3d7d377d3ffbd9d78a0947ca04221c2f180e15" - integrity sha512-SyRrRRRS7XcIyX8x6tb+mgcMqYZw6Admf4vlnUO/Z21nJklf6WILmP4jstd1W5tNlonvuC/S8R8/doIuZBgVjA== +react-qr-reader@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/react-qr-reader/-/react-qr-reader-2.2.1.tgz#dc89046d1c1a1da837a683dd970de5926817d55b" + integrity sha512-EL5JEj53u2yAOgtpAKAVBzD/SiKWn0Bl7AZy6ZrSf1lub7xHwtaXe6XSx36Wbhl1VMGmvmrwYMRwO1aSCT2fwA== dependencies: - jsqr "^1.1.1" - prop-types "^15.5.8" - webrtc-adapter "^6.4.0" + jsqr "^1.2.0" + prop-types "^15.7.2" + webrtc-adapter "^7.2.1" react-refresh@^0.2.0: version "0.2.0" @@ -6353,7 +6363,7 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -rtcpeerconnection-shim@^1.2.14: +rtcpeerconnection-shim@^1.2.15: version "1.2.15" resolved "https://registry.yarnpkg.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243" integrity sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw== @@ -7320,12 +7330,12 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webrtc-adapter@^6.4.0: - version "6.4.8" - resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-6.4.8.tgz#eeca3f0d5b40c0e629b865ef2a936a0b658274de" - integrity sha512-YM8yl545c/JhYcjGHgaCoA7jRK/KZuMwEDFeP2AcP0Auv5awEd+gZE0hXy9z7Ed3p9HvAXp8jdbe+4ESb1zxAw== +webrtc-adapter@^7.2.1: + version "7.2.8" + resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-7.2.8.tgz#1373fa874559c655aa713830c2836511588d77ab" + integrity sha512-d/rZVIIqqPqu/1I9rabhI+hmVhNtT+MoJk0eipCJasiVM9L9ZOTBoVhZmtC/naB4G8GTvnCaassrDz5IqWZP6w== dependencies: - rtcpeerconnection-shim "^1.2.14" + rtcpeerconnection-shim "^1.2.15" sdp "^2.9.0" whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: @@ -7608,8 +7618,3 @@ yargs@^9.0.0: which-module "^2.0.0" y18n "^3.2.1" yargs-parser "^7.0.0" - -yarn@^1.17.3: - version "1.17.3" - resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.17.3.tgz#60e0b77d079eb78e753bb616f7592b51b6a9adce" - integrity sha512-CgA8o7nRZaQvmeF/WBx2FC7f9W/0X59T2IaLYqgMo6637wfp5mMEsM3YXoJtKUspnpmDJKl/gGFhnqS+sON7hA== From 8f7373cafa3ec5eb8edd2b99d594458f2051965a Mon Sep 17 00:00:00 2001 From: YJ Date: Fri, 26 Jul 2019 14:01:50 +0200 Subject: [PATCH 005/101] fix: add peer dependencies for @polkadot/* --- package.json | 3 + src/components/QrView.js | 9 +- src/screens/QrScanner.js | 13 +- src/util/native.js | 8 +- yarn.lock | 931 ++++++++++++++++++++++++++++++--------- 5 files changed, 731 insertions(+), 233 deletions(-) diff --git a/package.json b/package.json index 9a1ef2cb2a..591659a75b 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ }, "dependencies": { "@polkadot/ui-qr": "^0.34.0-beta.86", + "@polkadot/util-crypto": "^0.94.1", + "@polkadot/wasm-crypto": "^0.13.1", "@react-native-community/netinfo": "^4.1.1", "bignumber.js": "^4.0.0", "hoist-non-react-statics": "^2.5.0", @@ -37,6 +39,7 @@ "react-native-tabs": "^1.0.9", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.1", + "styled-components": "^4.3.2", "unstated": "^2.1.1" }, "devDependencies": { diff --git a/src/components/QrView.js b/src/components/QrView.js index ac4a59813a..de0b490759 100644 --- a/src/components/QrView.js +++ b/src/components/QrView.js @@ -16,18 +16,21 @@ 'use strict'; +// import { QrDisplayAddress } from '@polkadot/ui-qr'; import React from 'react'; import { Dimensions, StyleSheet, Image, View } from 'react-native'; + import colors from '../colors'; import { qrCode } from '../util/native'; - export default class QrView extends React.PureComponent { state = {}; displayQrCode = async (data) => { try { + console.log(props); + debugger; // TODO: let qr = props.network === 'substrate' ? await qrSubstrate(data) : await qrCode(data); let qr = await qrCode(data); this.setState({ @@ -56,6 +59,10 @@ export default class QrView extends React.PureComponent { return this.renderQr(); } + renderSubstrateQr() { + + } + renderQr() { const { width: deviceWidth } = Dimensions.get('window'); let size = this.props.size || deviceWidth - 80; diff --git a/src/screens/QrScanner.js b/src/screens/QrScanner.js index 2b678848cc..8dc09dd523 100644 --- a/src/screens/QrScanner.js +++ b/src/screens/QrScanner.js @@ -16,7 +16,8 @@ 'use strict'; -import QrScan from '@polkadot/ui-qr'; +// import QrScan from '@polkadot/ui-qr'; +// import { decodeAddress } from '@polkadot/util-crypto'; import PropTypes from 'prop-types'; import React from 'react'; import { Alert, StyleSheet, Text, View } from 'react-native'; @@ -44,6 +45,8 @@ export default class Scanner extends React.PureComponent { if (scannerStore.isBusy()) { return; } + + debugger; /* TODO: assuming the txRequestData comes as raw binary: @@ -138,9 +141,9 @@ export class QrScannerView extends React.PureComponent { return ; } return ( - @@ -157,7 +160,7 @@ export class QrScannerView extends React.PureComponent { To Sign a New Transaction - + ); } } diff --git a/src/util/native.js b/src/util/native.js index 93e530c940..8ead256e10 100644 --- a/src/util/native.js +++ b/src/util/native.js @@ -110,10 +110,4 @@ export function decryptData (data, password) { export function qrCode (data) { return EthkeyBridge.qrCode(data) -} - -/* Not yet implemented -export function qrSubstrate (data) { - return SubkeyBridge.qrCode(data) -} -*/ +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index c421693f8a..2a71798286 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,15 +3,15 @@ "@babel/cli@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.5.0.tgz#f403c930692e28ecfa3bf02a9e7562b474f38271" - integrity sha512-qNH55fWbKrEsCwID+Qc/3JDPnsSGpIIiMDbppnR8Z6PxLAqMQCFNqBctkIkBrMH49Nx+qqVTrHRWUR+ho2k+qQ== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.5.5.tgz#bdb6d9169e93e241a08f5f7b0265195bf38ef5ec" + integrity sha512-UHI+7pHv/tk9g6WXQKYz+kmXTI77YtuY3vqC59KIqcoWEjsJJSG6rAxKaLsgj3LDyadsPrCB929gVOKM6Hui0w== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" fs-readdir-recursive "^1.1.0" glob "^7.0.0" - lodash "^4.17.11" + lodash "^4.17.13" mkdirp "^0.5.1" output-file-sync "^2.0.0" slash "^2.0.0" @@ -19,41 +19,41 @@ optionalDependencies: chokidar "^2.0.4" -"@babel/code-frame@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== dependencies: "@babel/highlight" "^7.0.0" "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.5.4": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.4.tgz#4c32df7ad5a58e9ea27ad025c11276324e0b4ddd" - integrity sha512-+DaeBEpYq6b2+ZmHx3tHspC+ZRflrvLqwfv8E3hNr5LVQoyBnL8RPKSBCg+rK2W2My9PWlujBiqd0ZPsR9Q6zQ== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30" + integrity sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.5.0" - "@babel/helpers" "^7.5.4" - "@babel/parser" "^7.5.0" + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.5.5" + "@babel/helpers" "^7.5.5" + "@babel/parser" "^7.5.5" "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.0" - "@babel/types" "^7.5.0" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" - lodash "^4.17.11" + lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.0.0", "@babel/generator@^7.4.0", "@babel/generator@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.0.tgz#f20e4b7a91750ee8b63656073d843d2a736dca4a" - integrity sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA== +"@babel/generator@^7.0.0", "@babel/generator@^7.4.0", "@babel/generator@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" + integrity sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ== dependencies: - "@babel/types" "^7.5.0" + "@babel/types" "^7.5.5" jsesc "^2.5.1" - lodash "^4.17.11" + lodash "^4.17.13" source-map "^0.5.0" trim-right "^1.0.1" @@ -89,26 +89,26 @@ "@babel/traverse" "^7.4.4" "@babel/types" "^7.4.4" -"@babel/helper-create-class-features-plugin@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.0.tgz#02edb97f512d44ba23b3227f1bf2ed43454edac5" - integrity sha512-EAoMc3hE5vE5LNhMqDOwB1usHvmRjCDAnH8CD4PVkX9/Yr3W/tcz8xE8QvdZxfsFBDICwZnF2UTHIqslRpvxmA== +"@babel/helper-create-class-features-plugin@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.5.tgz#401f302c8ddbc0edd36f7c6b2887d8fa1122e5a4" + integrity sha512-ZsxkyYiRA7Bg+ZTRpPvB6AbOFKTFFK4LrvTet8lInm0V468MWCaSYJE+I7v2z2r8KNLtYiV+K5kTCnR7dvyZjg== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-replace-supers" "^7.5.5" "@babel/helper-split-export-declaration" "^7.4.4" -"@babel/helper-define-map@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" - integrity sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg== +"@babel/helper-define-map@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" + integrity sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg== dependencies: "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.4.4" - lodash "^4.17.11" + "@babel/types" "^7.5.5" + lodash "^4.17.13" "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" @@ -141,12 +141,12 @@ dependencies: "@babel/types" "^7.4.4" -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== +"@babel/helper-member-expression-to-functions@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" + integrity sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.5.5" "@babel/helper-module-imports@^7.0.0": version "7.0.0" @@ -156,16 +156,16 @@ "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" - integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz#f84ff8a09038dcbca1fd4355661a500937165b4a" + integrity sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.4.4" "@babel/template" "^7.4.4" - "@babel/types" "^7.4.4" - lodash "^4.17.11" + "@babel/types" "^7.5.5" + lodash "^4.17.13" "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" @@ -180,11 +180,11 @@ integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" - integrity sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" + integrity sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw== dependencies: - lodash "^4.17.11" + lodash "^4.17.13" "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" @@ -197,15 +197,15 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz#aee41783ebe4f2d3ab3ae775e1cc6f1a90cefa27" - integrity sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg== +"@babel/helper-replace-supers@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" + integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.4.4" - "@babel/types" "^7.4.4" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" "@babel/helper-simple-access@^7.1.0": version "7.1.0" @@ -232,14 +232,14 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.5.4": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.4.tgz#2f00608aa10d460bde0ccf665d6dcf8477357cf0" - integrity sha512-6LJ6xwUEJP51w0sIgKyfvFMJvIb9mWAfohJp0+m6eHJigkFdcH8duZ1sfhn0ltJRzwUIT/yqqhdSfRpCpL7oow== +"@babel/helpers@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.5.tgz#63908d2a73942229d1e6685bc2a0e730dde3b75e" + integrity sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g== dependencies: "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.0" - "@babel/types" "^7.5.0" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" "@babel/highlight@^7.0.0": version "7.5.0" @@ -250,10 +250,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.0.tgz#3e0713dff89ad6ae37faec3b29dcfc5c979770b7" - integrity sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" + integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== "@babel/plugin-external-helpers@^7.0.0": version "7.2.0" @@ -263,11 +263,11 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz#5bc6a0537d286fcb4fd4e89975adbca334987007" - integrity sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz#a974cfae1e37c3110e71f3c6a2e48b8e71958cd4" + integrity sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A== dependencies: - "@babel/helper-create-class-features-plugin" "^7.5.0" + "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-export-default-from@^7.0.0": @@ -287,9 +287,9 @@ "@babel/plugin-syntax-nullish-coalescing-operator" "^7.2.0" "@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.4.tgz#250de35d867ce8260a31b1fdac6c4fc1baa99331" - integrity sha512-KCx0z3y7y8ipZUMAEEJOyNi11lMb/FOPUjjB113tfowgw0c16EGYos7worCKBcUAh2oG+OBnoUhsnTSoLpV9uA== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz#61939744f71ba76a3ae46b5eea18a54c16d22e58" + integrity sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -404,24 +404,24 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoping@^7.0.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz#c13279fabf6b916661531841a23c4b7dae29646d" - integrity sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz#a35f395e5402822f10d2119f6f8e045e3639a2ce" + integrity sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.11" + lodash "^4.17.13" "@babel/plugin-transform-classes@^7.0.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz#0ce4094cdafd709721076d3b9c38ad31ca715eb6" - integrity sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz#d094299d9bd680a14a2a0edae38305ad60fb4de9" + integrity sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.4.4" + "@babel/helper-define-map" "^7.5.5" "@babel/helper-function-name" "^7.1.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-replace-supers" "^7.5.5" "@babel/helper-split-export-declaration" "^7.4.4" globals "^11.1.0" @@ -502,12 +502,12 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-object-super@^7.0.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" - integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz#c70021df834073c65eb613b8679cc4a381d1a9f9" + integrity sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-replace-supers" "^7.5.5" "@babel/plugin-transform-parameters@^7.0.0": version "7.4.4" @@ -557,9 +557,9 @@ regenerator-transform "^0.14.0" "@babel/plugin-transform-runtime@^7.0.0", "@babel/plugin-transform-runtime@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.0.tgz#45242c2c9281158c5f06d25beebac63e498a284e" - integrity sha512-LmPIZOAgTLl+86gR9KjLXex6P/lRz1fWEjTz6V6QZMmKie51ja3tvzdwORqhHc4RWR8TcZ5pClpRWs0mlaA2ng== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.5.5.tgz#a6331afbfc59189d2135b2e09474457a8e3d28bc" + integrity sha512-6Xmeidsun5rkwnGfMOp6/z9nSzWpHFNVr2Jx7kwoq4mVatQfQx5S56drBgEHF+XQbKOdIaOiMIINvp/kAwMN+w== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -597,11 +597,11 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-typescript@^7.0.0": - version "7.5.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.5.2.tgz#ea7da440d29b8ccdb1bd02e18f6cfdc7ce6c16f5" - integrity sha512-r4zJOMbKY5puETm8+cIpaa0RQZG/sSASW1u0pj8qYklcERgVIbxVbP2wyJA7zI1//h7lEagQmXi9IL9iI5rfsA== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.5.5.tgz#6d862766f09b2da1cb1f7d505fe2aedab6b7d4b8" + integrity sha512-pehKf4m640myZu5B2ZviLaiBlxMCjSZ1qTEO459AXKX5GnPueyulJeCqZFs1nz/Ya2dDzXQ1NxZ/kKNWyD4h6w== dependencies: - "@babel/helper-create-class-features-plugin" "^7.5.0" + "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-typescript" "^7.2.0" @@ -615,25 +615,18 @@ regexpu-core "^4.5.4" "@babel/register@^7.0.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.4.4.tgz#370a68ba36f08f015a8b35d4864176c6b65d7a23" - integrity sha512-sn51H88GRa00+ZoMqCVgOphmswG4b7mhf9VOB0LUBAieykq2GnRFerlN+JQkO/ntT7wz4jaHNSRPg9IdMPEUkA== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.5.5.tgz#40fe0d474c8c8587b28d6ae18a03eddad3dac3c1" + integrity sha512-pdd5nNR+g2qDkXZlW1yRCWFlNrAn2PPdnZUB72zjX4l1Vv4fMRRLwyf+n/idFCLI1UgVGboUU8oVziwTBiyNKQ== dependencies: core-js "^3.0.0" find-cache-dir "^2.0.0" - lodash "^4.17.11" + lodash "^4.17.13" mkdirp "^0.5.1" pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.5.4": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.4.tgz#cb7d1ad7c6d65676e66b47186577930465b5271b" - integrity sha512-Na84uwyImZZc3FKf4aUF1tysApzwf3p2yuFBIyBfbzT5glzKTdvYI4KVW4kcgjrzoGUjC7w3YyCHcJKaRxsr2Q== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.5.5": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ== @@ -649,28 +642,28 @@ "@babel/parser" "^7.4.4" "@babel/types" "^7.4.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.0.tgz#4216d6586854ef5c3c4592dab56ec7eb78485485" - integrity sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" + integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.5.0" + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.5.5" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.5.0" - "@babel/types" "^7.5.0" + "@babel/parser" "^7.5.5" + "@babel/types" "^7.5.5" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.11" + lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.0.tgz#e47d43840c2e7f9105bc4d3a2c371b4d0c7832ab" - integrity sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ== +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" + integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== dependencies: esutils "^2.0.2" - lodash "^4.17.11" + lodash "^4.17.13" to-fast-properties "^2.0.0" "@cnakazawa/watch@^1.0.3": @@ -681,6 +674,23 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@emotion/is-prop-valid@^0.8.1": + version "0.8.2" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.2.tgz#b9692080da79041683021fcc32f96b40c54c59dc" + integrity sha512-ZQIMAA2kLUWiUeMZNJDTeCwYRx1l8SQL0kHktze4COT22occKpDML1GDUXP5/sxhOMrZO8vZw773ni4H5Snrsg== + dependencies: + "@emotion/memoize" "0.7.2" + +"@emotion/memoize@0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.2.tgz#7f4c71b7654068dfcccad29553520f984cc66b30" + integrity sha512-hnHhwQzvPCW1QjBWFyBtsETdllOM92BfrKWbUTmh9aeOlcVOiXvlPsK4104xH8NsaKfg86PTFsWkueQeUfMA/w== + +"@emotion/unitless@^0.7.0": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.4.tgz#a87b4b04e5ae14a88d48ebef15015f6b7d1f5677" + integrity sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ== + "@hapi/address@2.x.x": version "2.0.0" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.0.0.tgz#9f05469c88cb2fd3dcd624776b54ee95c312126a" @@ -692,9 +702,9 @@ integrity sha512-HOJ20Kc93DkDVvjwHyHawPwPkX44sIrbXazAUDiUXaY2R9JwQGo2PhFfnQtdrsIe4igjG2fPgMra7NYw7qhy0A== "@hapi/hoek@8.x.x": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.0.2.tgz#f63a5ff00e891a4e7aa98f11119f9515c6672032" - integrity sha512-O6o6mrV4P65vVccxymuruucb+GhP2zl9NLCG8OdoFRS8BEGw3vwpPp20wpAtpbQQxz1CEUtmxJGgWhjq1XA3qw== + version "8.1.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.1.0.tgz#8f7627b23ed9bf67088fc7f9669e48c63ad421bd" + integrity sha512-b1J4jxYnW+n6lC91V6Pqg9imP9BZq0HNCeM+3sbXg05rQsE9cGYrKFpZjyztVesGmNRE6R+QaEoWGATeIiUVjA== "@hapi/joi@^15.0.3": version "15.1.0" @@ -865,21 +875,62 @@ "@types/yargs" "^12.0.9" "@polkadot/ui-qr@^0.34.0-beta.86": - version "0.34.0-beta.86" - resolved "https://registry.yarnpkg.com/@polkadot/ui-qr/-/ui-qr-0.34.0-beta.86.tgz#3c2bc7fe0b39bd2e63e11466173d79a14e1f4fb9" - integrity sha512-+wch0GA+PWaM62sO8cLE4nzVNWQj/zuNgPuOD4wVxFNw0PyC+7AtDCkv8hgHrUarBfcONvP4mWqJ//9E+UTwpA== + version "0.34.0-beta.87" + resolved "https://registry.yarnpkg.com/@polkadot/ui-qr/-/ui-qr-0.34.0-beta.87.tgz#42b11220de952a825691b6ea8f3cc55ec28f1a22" + integrity sha512-Dtq40siV5uM/UFEHf0x4NF5RdQhaJ03gJhtCDOVcVeX2ynzIQAiYs3k9TYZlrs6IKnJw7eJEZX495ZdE1fkwGA== dependencies: "@babel/runtime" "^7.5.5" "@types/react-qr-reader" "^2.1.1" qrcode-generator "^1.4.3" react-qr-reader "^2.2.1" -"@react-native-community/cli-platform-android@^2.0.1", "@react-native-community/cli-platform-android@^2.6.2": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-2.6.2.tgz#4e7ce8784e6b4a3139c739ce15672c9c4007b9fb" - integrity sha512-1RsugyD24B9hMXgQNvy4MT+DzBYYEJahs8W0G4MwlXEuON5u+3/mqPiFU8bisewJaIktnF+L19fpFblgdtSRXw== +"@polkadot/util-crypto@^0.94.1": + version "0.94.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.94.1.tgz#64c076567060c15a752fe1bb046cc902d07a14ca" + integrity sha512-+JB2fjNQn6Kba29gd3R5Bg0GLo9dDsRqayumSkusq3AeXI9YEZmjwstze6gGbGZJscSoyuuoCTzljWOr/RIhzQ== + dependencies: + "@babel/runtime" "^7.5.5" + "@polkadot/util" "^0.94.1" + "@polkadot/wasm-crypto" "^0.13.1" + "@types/bip39" "^2.4.2" + "@types/bs58" "^4.0.0" + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^3.5.0" + "@types/xxhashjs" "^0.2.1" + base-x "3.0.5" + bip39 "^2.5.0" + blakejs "^1.1.0" + bs58 "^4.0.1" + js-sha3 "^0.8.0" + secp256k1 "^3.7.0" + tweetnacl "^1.0.1" + xxhashjs "^0.2.2" + +"@polkadot/util@^0.94.1": + version "0.94.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.94.1.tgz#5d1f73ffbf79b16009de45180e5184dfc2110800" + integrity sha512-HpKz0PDgYcvoh2xvT1e5n3H3soXce8vY5h3aq3vqmWfdSUoSo9wIfCfHrOo7Z130Z/qegqtAtJVj4+8434+Q8w== + dependencies: + "@babel/runtime" "^7.5.5" + "@types/bn.js" "^4.11.5" + "@types/deasync" "^0.1.0" + bn.js "^4.11.8" + camelcase "^5.3.1" + chalk "^2.4.2" + ip-regex "^4.1.0" + moment "^2.24.0" + +"@polkadot/wasm-crypto@^0.13.1": + version "0.13.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-0.13.1.tgz#602305b2ca86fc320a35ce820835e0e2dd9e646e" + integrity sha512-24a63FynhyBHEGxqoDMZHAcaSxJqnjBPnEcmXXYCN2lI7b4iKaJKF2t+/FUmY7XTST+xNgFTJZ7A/o8jjgC/mA== + +"@react-native-community/cli-platform-android@^2.0.1", "@react-native-community/cli-platform-android@^2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-2.7.0.tgz#511d1db12c52d29cb87b6e4e84d63030ffa2c38d" + integrity sha512-hO/gYqzLCeCFnLIgYiGlZhiQMAnMuTxNS6rCbC8leMnlGARzrarnWsepHhvottOKeSctVh0wzchLCLCBcw4zVA== dependencies: - "@react-native-community/cli-tools" "^2.4.1" + "@react-native-community/cli-tools" "^2.7.0" chalk "^2.4.2" execa "^1.0.0" jetifier "^1.6.2" @@ -887,19 +938,19 @@ slash "^2.0.0" xmldoc "^0.4.0" -"@react-native-community/cli-platform-ios@^2.0.1", "@react-native-community/cli-platform-ios@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-2.4.1.tgz#99b38c6b3feecf061ecf1243fe41013f4112a51c" - integrity sha512-EKfnN+ubIcCHbCCo2a1SlYcd4jLZDT12HfoLHhFg8WXG3/zFWc/vMNpBi+omrvT7Hoktr8cTtROXPg9cIS7FCQ== +"@react-native-community/cli-platform-ios@^2.0.1", "@react-native-community/cli-platform-ios@^2.8.0": + version "2.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-2.8.0.tgz#95cea3e8feab4d9525a96a9dcf56bd0d62633158" + integrity sha512-a6DD4fnfJij8FicQ/5+4zgsqxRO92o6unt2XKZexIM8bqH3i8U5pvUsccOhRnsaIjXUFMbLU5knozRrFSaJBoQ== dependencies: - "@react-native-community/cli-tools" "^2.4.1" + "@react-native-community/cli-tools" "^2.7.0" chalk "^2.4.2" xcode "^2.0.0" -"@react-native-community/cli-tools@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-2.4.1.tgz#5a23b92d0b486753add00a27d77d0ea9e8c331e1" - integrity sha512-3V5Atno3q5uBGseHcW8gM3d7Gpcr87LJvC3YbB6SwCCM7g93+94u+U1vm9j4KmHt2tnf3Q4urL4rUCrdxzvSfw== +"@react-native-community/cli-tools@^2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-2.7.0.tgz#b468ce74cb5ebf5789731d4d330740801679cf81" + integrity sha512-9rNoGiokyMkbQ97gAvQde4mpAw2M/GhPBtrQJb4WglgVoJhfj4kpe+qMCWNsOepCrID5JY2Y1nTDEq/v+ETyNA== dependencies: chalk "^2.4.2" lodash "^4.17.5" @@ -907,14 +958,14 @@ node-fetch "^2.5.0" "@react-native-community/cli@^2.0.1": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-2.6.2.tgz#b6bc86d4baafa51776304eff51f1162872f0da1e" - integrity sha512-aIwB068/re5TIc4qUnR1gH0Vc/oze3SVbU2sXRtWKa/TTXfHJo/LKqfc9YnYYK5Qerrl7zSmhB/mNpQ6Uc+/0Q== + version "2.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-2.8.0.tgz#346ff73ace6b2265d99ec217a8624b8735d19930" + integrity sha512-sN43IyvBtFtC1iOjx3pfKeo7DK4wkJxWiggR3QkkNQdyjuGT3RGXiYZVPu+zda6BPKdeGYpS+7UJrkGT+1tuFg== dependencies: "@hapi/joi" "^15.0.3" - "@react-native-community/cli-platform-android" "^2.6.2" - "@react-native-community/cli-platform-ios" "^2.4.1" - "@react-native-community/cli-tools" "^2.4.1" + "@react-native-community/cli-platform-android" "^2.7.0" + "@react-native-community/cli-platform-ios" "^2.8.0" + "@react-native-community/cli-tools" "^2.7.0" chalk "^2.4.2" commander "^2.19.0" compression "^1.7.1" @@ -963,9 +1014,9 @@ prettier "1.16.4" "@react-native-community/netinfo@^4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-4.1.1.tgz#b4793b26662df42eeb9b4d20ec49129e75fa9773" - integrity sha512-E5AQ2D0qR/uQ7heGSCT8LdDIqGM2Gle7bH8WoQO4zExn4pqz9ZJT1UyysjLnpJthejOU//owbydWqIZE+JNpSA== + version "4.1.3" + resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-4.1.3.tgz#77571619eb90ff59777a85a913fc30acd30b6020" + integrity sha512-c9ppXNFpKkXiKFJhik9Lzw62dosm+cAIvHl6OOGXp2D+1GlliIP+nMMtNapdppPoilRc33f4/GosqnL70viH9Q== "@react-navigation/core@~3.4.1": version "3.4.2" @@ -1019,6 +1070,39 @@ dependencies: "@babel/types" "^7.3.0" +"@types/base-x@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/base-x/-/base-x-3.0.0.tgz#a1365259d1d3fa3ff973ab543192a6bdd4cb2f90" + integrity sha512-vnqSlpsv9uFX5/z8GyKWAfWHhLGJDBkrgRRsnxlsX23DHOlNyqP/eHQiv4TwnYcZULzQIxaWA/xRWU9Dyy4qzw== + dependencies: + "@types/node" "*" + +"@types/bip39@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@types/bip39/-/bip39-2.4.2.tgz#f5d6617212be496bb998d3969f657f77a10c5287" + integrity sha512-Vo9lqOIRq8uoIzEVrV87ZvcIM0PN9t0K3oYZ/CS61fIYKCBdOIM7mlWzXuRvSXrDtVa1uUO2w1cdfufxTC0bzg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.5": + version "4.11.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.5.tgz#40e36197433f78f807524ec623afcf0169ac81dc" + integrity sha512-AEAZcIZga0JgVMHNtl1CprA/hXX7/wPt79AgR4XqaDt7jyj3QWYw6LPoOiznPtugDmlubUnAahMs2PFxGcQrng== + dependencies: + "@types/node" "*" + +"@types/bs58@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-4.0.0.tgz#baec75cb007b419ede3ec6b3410d2c8f14c92fc5" + integrity sha512-gYX+MHD4G/R+YGYwdhG5gbJj4LsEQGr3Vg6gVDAbe7xC5Bn8dNNG2Lpo6uDX/rT5dE7VBj0rGEFuV8L0AEx4Rg== + dependencies: + "@types/base-x" "*" + +"@types/deasync@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@types/deasync/-/deasync-0.1.0.tgz#b2bd6c3fcde3cf67b8be4c2f70136ba8f157b45a" + integrity sha512-jxUH53LtGvbIL3TX2hD/XQuAgYJeATtx9kDXq5XtCZrWQABsiCQPjWi/KQXECUF+p9FuR6/tawnEDjXlEr4rFA== + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -1044,20 +1128,37 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/json-schema@^7.0.3": + version "7.0.3" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" + integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== + "@types/markdown-it@^0.0.4": version "0.0.4" resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.4.tgz#c5f67365916044b342dae8d702724788ba0b5b74" integrity sha512-FWR7QB7EqBRq1s9BMk0ccOSOuRLfVEWYpHQYpFPaXtCoqN6dJx2ttdsdQbUxLLnAlKpYeVjveGGhQ3583TTa7g== +"@types/node@*": + version "12.6.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" + integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== + +"@types/pbkdf2@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.0.0.tgz#5d9ca5f12a78a08cc89ad72883ad4a30af359229" + integrity sha512-6J6MHaAlBJC/eVMy9jOwj9oHaprfutukfW/Dyt0NEnpQ/6HN6YQrpvLwzWdWDeWZIdenjGHlbYDzyEODO5Z+2Q== + dependencies: + "@types/node" "*" + "@types/prop-types@*": version "15.7.1" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6" integrity sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg== "@types/react-native@>=0.50.0": - version "0.60.1" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.1.tgz#b512fe7156df18ddb3860b4551cfa5de667e68b5" - integrity sha512-COOHdIDGEjpqacOm4bJmq4kmchPU6WiP0JeTzuESvqu4CzfeyMZ96eG+WYO8n3ebQjpN38Hqw+VwMPxe/BrhKg== + version "0.60.2" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.2.tgz#2dca78481a904419c2a5907288dd97d1090c6e3c" + integrity sha512-K4+/etirpv52xu24xAc++OdhbD0VQEt0Kq0h6dZrLU82OlA+I7BhpKF3JBvx9tbmrFaZDxhHp8N4TEvRYS4fdQ== dependencies: "@types/prop-types" "*" "@types/react" "*" @@ -1077,49 +1178,64 @@ "@types/prop-types" "*" csstype "^2.2.0" +"@types/secp256k1@^3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-3.5.0.tgz#0f3baf16b07488c6da2633a63b4160bcf8d0fd5b" + integrity sha512-ZE39QhkIaNK6xbKIp1VLN5O36r97LuslLmRnjAcT0sVDxcfvrk3zqp/VnIfmGza7J6jDxR8dIai3hsCxPYglPA== + dependencies: + "@types/node" "*" + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/xxhashjs@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/xxhashjs/-/xxhashjs-0.2.1.tgz#6cd06b2eca5228765ff45960cf2c2a557ddf109a" + integrity sha512-Akm13wkwsQylVnBokl/aiKLtSxndSjfgTjdvmSxXNehYy4NymwdfdJHwGhpV54wcYfmOByOp3ak8AGdUlvp0sA== + dependencies: + "@types/node" "*" + "@types/yargs@^12.0.2", "@types/yargs@^12.0.9": version "12.0.12" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== "@typescript-eslint/eslint-plugin@^1.5.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.12.0.tgz#96b4e08b5f998a198b8414508b1a289f9e8c549a" - integrity sha512-J/ZTZF+pLNqjXBGNfq5fahsoJ4vJOkYbitWPavA05IrZ7BXUaf4XWlhUB/ic1lpOGTRpLWF+PLAePjiHp6dz8g== + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.13.0.tgz#22fed9b16ddfeb402fd7bcde56307820f6ebc49f" + integrity sha512-WQHCozMnuNADiqMtsNzp96FNox5sOVpU8Xt4meaT4em8lOG1SrOv92/mUbEHQVh90sldKSfcOc/I0FOb/14G1g== dependencies: - "@typescript-eslint/experimental-utils" "1.12.0" + "@typescript-eslint/experimental-utils" "1.13.0" eslint-utils "^1.3.1" functional-red-black-tree "^1.0.1" regexpp "^2.0.1" tsutils "^3.7.0" -"@typescript-eslint/experimental-utils@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.12.0.tgz#98417ee2e0c6fe8d1e50d934a6535d9c0f4277b6" - integrity sha512-s0soOTMJloytr9GbPteMLNiO2HvJ+qgQkRNplABXiVw6vq7uQRvidkby64Gqt/nA7pys74HksHwRULaB/QRVyw== +"@typescript-eslint/experimental-utils@1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e" + integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg== dependencies: - "@typescript-eslint/typescript-estree" "1.12.0" + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "1.13.0" eslint-scope "^4.0.0" "@typescript-eslint/parser@^1.5.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.12.0.tgz#9965895ec4745578185965d63f21510f93a3f35a" - integrity sha512-0uzbaa9ZLCA5yMWJywnJJ7YVENKGWVUhJDV5UrMoldC5HoI54W5kkdPhTfmtFKpPFp93MIwmJj0/61ztvmz5Dw== + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" + integrity sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.12.0" - "@typescript-eslint/typescript-estree" "1.12.0" + "@typescript-eslint/experimental-utils" "1.13.0" + "@typescript-eslint/typescript-estree" "1.13.0" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/typescript-estree@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.12.0.tgz#d8dd0a7cffb5e3c0c3e98714042d83e316dfc9a9" - integrity sha512-nwN6yy//XcVhFs0ZyU+teJHB8tbCm7AIA8mu6E2r5hu6MajwYBY3Uwop7+rPZWUN/IUOHpL8C+iUPMDVYUU3og== +"@typescript-eslint/typescript-estree@1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" + integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw== dependencies: lodash.unescape "4.0.1" semver "5.5.0" @@ -1178,9 +1294,9 @@ acorn@^5.5.3: integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== acorn@^6.0.1, acorn@^6.0.7: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.0.tgz#67f0da2fc339d6cfb5d6fb244fd449f33cd8bbe3" - integrity sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw== + version "6.2.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" + integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" @@ -1494,10 +1610,11 @@ babel-plugin-dynamic-import-node@^2.3.0: object.assign "^4.1.0" babel-plugin-istanbul@^5.1.0: - version "5.1.4" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.4.tgz#841d16b9a58eeb407a0ddce622ba02fe87a752ba" - integrity sha512-dySz4VJMH+dpndj0wjJ8JPs/7i1TdSPb1nRrn56/92pKOF9VKC1FMFJmMXjzlGGusnCAqujP6PBCiKq0sVA+YQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" + integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== dependencies: + "@babel/helper-plugin-utils" "^7.0.0" find-up "^3.0.0" istanbul-lib-instrument "^3.3.0" test-exclude "^5.2.3" @@ -1509,6 +1626,21 @@ babel-plugin-jest-hoist@^24.6.0: dependencies: "@types/babel__traverse" "^7.0.6" +"babel-plugin-styled-components@>= 1": + version "1.10.6" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz#f8782953751115faf09a9f92431436912c34006b" + integrity sha512-gyQj/Zf1kQti66100PhrCRjI5ldjaze9O0M3emXRPAN80Zsf8+e1thpTpaXJXVHXtaM4/+dJEgZHyS9Its+8SA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.11" + +babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= + babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" @@ -1560,6 +1692,20 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base-x@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.5.tgz#d3ada59afed05b921ab581ec3112e6444ba0795a" + integrity sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA== + dependencies: + safe-buffer "^5.0.1" + +base-x@^3.0.2: + version "3.0.6" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.6.tgz#de047ec95f5f7b99ae63d830a2a894c96538b2cd" + integrity sha512-4PaF8u2+AlViJxRVjurkLTxpp7CaFRD/jo5rPT9ONnKxyhQ8f59yzamEvq7EkriG56yn5On4ONyaG75HLqr46w== + dependencies: + safe-buffer "^5.0.1" + base64-js@^1.1.2, base64-js@^1.2.3: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -1607,6 +1753,36 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip39@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.6.0.tgz#9e3a720b42ec8b3fbe4038f1e445317b6a99321c" + integrity sha512-RrnQRG2EgEoqO24ea+Q/fftuPUZLmrEM3qNhhGsA3PbaXaCW791LTzPuVyx/VprXQcTbPJ3K3UeTna8ZnVl2sg== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= + dependencies: + safe-buffer "^5.0.1" + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + bluebird@2.9.24: version "2.9.24" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.9.24.tgz#14a2e75f0548323dc35aa440d92007ca154e967c" @@ -1622,6 +1798,11 @@ bluebird@^3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== +bn.js@^4.11.8, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + bplist-creator@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" @@ -1660,6 +1841,11 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + browser-process-hrtime@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" @@ -1672,6 +1858,25 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" +browserify-aes@^1.0.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + bser@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.0.tgz#65fc784bf7f87c009b973c12db6546902fa9c7b5" @@ -1689,6 +1894,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -1738,11 +1948,16 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0: +camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelize@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" + integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1848,6 +2063,14 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2125,6 +2348,29 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + create-react-class@^15.6.3: version "15.6.3" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" @@ -2159,6 +2405,20 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= + +css-to-react-native@^2.2.2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.1.tgz#cf0f61e0514846e2d4dc188b0886e29d8bef64a2" + integrity sha512-yO+oEx1Lf+hDKasqQRVrAvzMCz825Huh1VMlEEDlRWyAhFb/FWb6I0KpEF1PkyKQ7NEdcx9d5M2ZEWgJAsgPvQ== + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^3.3.0" + cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.8" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" @@ -2176,6 +2436,11 @@ csstype@^2.2.0: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.6.tgz#c34f8226a94bbb10c32cc0d714afdf942291fc41" integrity sha512-RpFbQGUE74iyPgvr46U9t1xoQBM8T4BL8SxrN66Le2xYAPSaDJJKeztV3awugusb3g3G9iL8StmkBBXhcbbXhg== +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + cz-conventional-changelog@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-1.1.5.tgz#0a4d1550c4e2fb6a3aed8f6cd858c21760e119b8" @@ -2375,6 +2640,15 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2388,6 +2662,19 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +elliptic@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca" + integrity sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg== + 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" + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -2546,7 +2833,7 @@ eslint-scope@3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^4.0.0, eslint-scope@^4.0.3: +eslint-scope@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== @@ -2554,6 +2841,14 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-utils@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.0.tgz#e2c3c8dba768425f897cf0f9e51fe2e241485d4c" @@ -2567,9 +2862,9 @@ eslint-visitor-keys@^1.0.0: integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== eslint@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.1.tgz#4a32181d72cb999d6f54151df7d337131f81cda7" - integrity sha512-DyQRaMmORQ+JsWShYsSg4OPTjY56u1nCjAmICrE8vLWqyLKxhFXOthwMj1SA8xwfrv0CofLNVnqbfyhwCkaO0w== + version "6.1.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646" + integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" @@ -2577,7 +2872,7 @@ eslint@^6.0.1: cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.3" + eslint-scope "^5.0.0" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" espree "^6.0.0" @@ -2585,28 +2880,29 @@ eslint@^6.0.1: esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^3.1.0" + glob-parent "^5.0.0" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.2.2" + inquirer "^6.4.1" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.11" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" progress "^2.0.0" regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" espree@^6.0.0: version "6.0.0" @@ -2666,6 +2962,14 @@ eventemitter3@^3.0.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + exec-sh@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" @@ -2908,6 +3212,11 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -3148,6 +3457,13 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-parent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" + integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== + dependencies: + is-glob "^4.0.1" + glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -3279,11 +3595,36 @@ has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + hermesvm@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/hermesvm/-/hermesvm-0.1.0.tgz#4bfaf4ac682a2fd407b862ab641eb8deb232de83" integrity sha512-GbP6dKaVW/V2QpB+DZPxcmhBhJVFa9cHS/xRX7FD1MGfa6Z1aHHD83VDCwo3SgcqNj5yHlVbe9UgrK1PFGCXpw== +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" @@ -3399,7 +3740,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3470,7 +3811,7 @@ inquirer@3.3.0, inquirer@^3.0.6: strip-ansi "^4.0.0" through "^2.3.6" -inquirer@^6.2.2: +inquirer@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== @@ -3511,6 +3852,11 @@ invert-kv@^2.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== +ip-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.1.0.tgz#5ad62f685a14edb421abebc2fff8db94df67b455" + integrity sha512-pKnZpbgCTfH/1NLIlOduP/V+WRXzC2MOz3Qo8xmxk8C5GudJLgK5QyLVXOSWy3ParAH7Eemurl3xjv/WXYFvMA== + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -3637,7 +3983,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3692,6 +4038,11 @@ is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-what@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.2.4.tgz#da528659017bdd4b07892dfe4fd60da6ac500e98" + integrity sha512-0awkPsfVd85bYStP99EqLxKvhc5SiE70hSZCPxJN2SYZ5d+IkX+r1Ri0qnPWPnuRVFrqrEnI3JgFN3yrGtjXaw== + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -4154,6 +4505,11 @@ jetifier@^1.6.2, jetifier@^1.6.3: resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.3.tgz#61a95b29aefddfe3b6d81ee956f5e99f8b9cba19" integrity sha512-i0rb2nHVPZDPzFhgs9+yYxEDMh2z0iSHRD3vBQmvn98wlgWKwhmU2F3MUEEXfK+MLnKwLKqsCTvlcS1+CpDTUg== +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4469,12 +4825,7 @@ lodash@^3.3.1: resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= -lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" - integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== - -lodash@^4.17.15: +lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -4559,6 +4910,15 @@ markdown-it@^8.4.0: mdurl "^1.0.1" uc.micro "^1.0.5" +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + mdurl@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" @@ -4580,6 +4940,18 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memoize-one@^5.0.0: + version "5.0.5" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.0.5.tgz#8cd3809555723a07684afafcd6f756072ac75d7e" + integrity sha512-ey6EpYv0tEaIbM/nTDOpHciXUvd+ackQrJgEzBwemhZZIWZjcyodqEcrmqDy2BKRTM3a65kKBV4WtLXJDt26SQ== + +merge-anything@^2.2.4: + version "2.4.0" + resolved "https://registry.yarnpkg.com/merge-anything/-/merge-anything-2.4.0.tgz#86959caf02bb8969d1ae5e1b652862bc5fe54e44" + integrity sha512-MhJcPOEcDUIbwU0LnEfx5S9s9dfQ/KPu4g2UA5T5G1LRKS0XmpDvJ9+UUfTkfhge+nA1gStE4tJAvx6lXLs+rg== + dependencies: + is-what "^3.2.4" + merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" @@ -4930,6 +5302,16 @@ min-document@^2.19.0: dependencies: dom-walk "^0.1.0" +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -4999,7 +5381,7 @@ moment@2.19.3: resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" integrity sha1-vbmdJw1tf9p4zA+6zoVeJ/59pp8= -"moment@>= 2.9.0": +"moment@>= 2.9.0", moment@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== @@ -5045,7 +5427,7 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -nan@^2.12.1: +nan@^2.12.1, nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== @@ -5565,6 +5947,17 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +pbkdf2@^3.0.9: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + 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@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -5639,6 +6032,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss-value-parser@^3.3.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + pre-git@^3.14.0: version "3.17.1" resolved "https://registry.yarnpkg.com/pre-git/-/pre-git-3.17.1.tgz#1950d40151e067f7bc11f65a554d259f1c0df261" @@ -5719,7 +6117,7 @@ prompts@^2.0.1: kleur "^3.0.2" sisteransi "^1.0.0" -prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -5794,6 +6192,13 @@ ramda@0.25.0: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" integrity sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ== +randombytes@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -5815,14 +6220,14 @@ react-deep-force-update@^1.0.0: integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA== react-devtools-core@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.6.1.tgz#51af81ceada65209bbccb8b547a01187cd1cbf04" - integrity sha512-I/LSX+tpeTrGKaF1wXSfJ/kP+6iaP2JfshEjW8LtQBdz6c6HhzOJtjZXhqOUrAdysuey8M1/JgPY1flSVVt8Ig== + version "3.6.2" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.6.2.tgz#7d425f160c5928129fa9acdbdd9e80a334e09c8d" + integrity sha512-a5r2Er0PajtlvKYBUKzB3vW5qek8TbgQWwRruDEwTm3VnqVffHmnvApRil/lfkAa8ghXcESNizrtKu/18oG55Q== dependencies: shell-quote "^1.6.1" ws "^3.3.1" -react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: +react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== @@ -6161,14 +6566,14 @@ regenerate@^1.4.0: integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== regenerator-runtime@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" - integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== regenerator-transform@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.0.tgz#2ca9aaf7a2c239dd32e4761218425b8c7a86ecaf" - integrity sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w== + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" + integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== dependencies: private "^0.1.6" @@ -6358,6 +6763,14 @@ rimraf@~2.2.6: resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI= +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -6425,7 +6838,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -6488,6 +6901,20 @@ sdp@^2.6.0, sdp@^2.9.0: resolved "https://registry.yarnpkg.com/sdp/-/sdp-2.9.0.tgz#2eed2d9c0b26c81ff87593107895c68d6fb9a0a6" integrity sha512-XAVZQO4qsfzVTHorF49zCpkdxiGmPNjA8ps8RcJGtGP3QJ/A8I9/SVg/QnkAFDMXIyGbHZBBFwYBw6WdnhT96w== +secp256k1@^3.7.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.7.1.tgz#12e473e0e9a7c2f2d4d4818e722ad0e14cc1e2f1" + integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== + dependencies: + 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.4.1" + nan "^2.14.0" + safe-buffer "^5.1.2" + semver-regex@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" @@ -6508,10 +6935,10 @@ semver@5.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== -semver@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" - integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== +semver@^6.0.0, semver@^6.1.2: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== send@0.17.1: version "0.17.1" @@ -6572,6 +6999,14 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -6904,17 +7339,51 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +styled-components@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.3.2.tgz#4ca81918c812d3006f60ac5fdec7d6b64a9509cc" + integrity sha512-NppHzIFavZ3TsIU3R1omtddJ0Bv1+j50AKh3ZWyXHuFvJq1I8qkQ5mZ7uQgD89Y8zJNx2qRo6RqAH1BmoVafHw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@emotion/is-prop-valid" "^0.8.1" + "@emotion/unitless" "^0.7.0" + babel-plugin-styled-components ">= 1" + css-to-react-native "^2.2.2" + memoize-one "^5.0.0" + merge-anything "^2.2.4" + prop-types "^15.5.4" + react-is "^16.6.0" + stylis "^3.5.0" + stylis-rule-sheet "^0.0.10" + supports-color "^5.5.0" + +stylis-rule-sheet@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" + integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== + +stylis@^3.5.0: + version "3.5.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" + integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0: +supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -7088,9 +7557,9 @@ tslib@^1.8.1, tslib@^1.9.0: integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== tsutils@^3.7.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.14.0.tgz#bf8d5a7bae5369331fa0f2b0a5a10bd7f7396c77" - integrity sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw== + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.14.1.tgz#f1d2b93d2a0876481f2f1f98c25ba42bbd7ee860" + integrity sha512-kiuZzD1uUA5DxGj/uxbde+ymp6VVdAxdzOIlAFbYKrPyla8/uiJ9JLBm1QsPhOm4Muj0/+cWEDP99yoCUcSl6Q== dependencies: tslib "^1.8.1" @@ -7106,6 +7575,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +tweetnacl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.1.tgz#2594d42da73cd036bd0d2a54683dd35a6b55ca17" + integrity sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A== + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -7197,6 +7671,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +unorm@^1.3.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" + integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== + unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -7262,6 +7741,11 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== +v8-compile-cache@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== + validate-commit-msg@2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/validate-commit-msg/-/validate-commit-msg-2.14.0.tgz#e5383691012cbb270dcc0bc2a4effebe14890eac" @@ -7523,6 +8007,13 @@ xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xxhashjs@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" From 6ed5492b8a601756e468dddbd4c400d8365e6be1 Mon Sep 17 00:00:00 2001 From: YJ Date: Fri, 26 Jul 2019 16:54:02 +0200 Subject: [PATCH 006/101] feat: handle decoding via UOS --- src/components/QrView.js | 3 -- src/screens/AccountNew.js | 1 + src/screens/QrScanner.js | 92 +++++++++++++++++++++++---------------- 3 files changed, 55 insertions(+), 41 deletions(-) diff --git a/src/components/QrView.js b/src/components/QrView.js index de0b490759..4a8978cabf 100644 --- a/src/components/QrView.js +++ b/src/components/QrView.js @@ -16,7 +16,6 @@ 'use strict'; -// import { QrDisplayAddress } from '@polkadot/ui-qr'; import React from 'react'; import { Dimensions, StyleSheet, Image, View } from 'react-native'; @@ -29,8 +28,6 @@ export default class QrView extends React.PureComponent { displayQrCode = async (data) => { try { - console.log(props); - debugger; // TODO: let qr = props.network === 'substrate' ? await qrSubstrate(data) : await qrCode(data); let qr = await qrCode(data); this.setState({ diff --git a/src/screens/AccountNew.js b/src/screens/AccountNew.js index 1dbc3c5857..ebb6a2716b 100644 --- a/src/screens/AccountNew.js +++ b/src/screens/AccountNew.js @@ -51,6 +51,7 @@ class AccountNewView extends React.Component { const { accounts } = this.props; const selected = accounts.getNew(); const network = NETWORK_LIST[selected.networkKey]; + if (!selected) { return null; } diff --git a/src/screens/QrScanner.js b/src/screens/QrScanner.js index 8dc09dd523..96fbb02a79 100644 --- a/src/screens/QrScanner.js +++ b/src/screens/QrScanner.js @@ -17,7 +17,7 @@ 'use strict'; // import QrScan from '@polkadot/ui-qr'; -// import { decodeAddress } from '@polkadot/util-crypto'; +// import decodeAddress from '@polkadot/util-crypto'; import PropTypes from 'prop-types'; import React from 'react'; import { Alert, StyleSheet, Text, View } from 'react-native'; @@ -45,45 +45,62 @@ export default class Scanner extends React.PureComponent { if (scannerStore.isBusy()) { return; } - - debugger; - /* - TODO: - assuming the txRequestData comes as raw binary: - - const buffer = new ArrayBuffer(txRequestData); - const dataAsBytes = new Uint8Array(buffer); - - let payloadType = { - '7B': 'ethereum_legacy', - '53': 'substrate', - '45': 'ethereum - } - - switch(payloadType[dataAsBytes[0]]) { - case 'ethereum': - ... - case 'ethereum_legacy': - ... handle legacy Ethereum payload as JSON as done below - case 'substrate': - ... - } - */ + const utf8Encoder = new TextEncoder('utf-8'); + const utf8Encoded = utf8Encoder.encode(txRequestData.data); + const zerothByte = utf8Encoded[0].toString(16); + + let data = {}; try { - const data = JSON.parse(txRequestData.data); - if (data.action === undefined) { - return; + // decode payload appropriately via UOS + switch (zerothByte.toLowerCase()) { + case '7b': // Legacy Ethereum payload is JSON format + data = JSON.parse(txRequestData.data); + if (data.action === undefined) { + throw new Error('Could not determine action type.'); + } + break; + case '45': // Ethereum UOS payload + const firstByte = utf8Encoded[1].toString(16); + const action = firstByte === '00' || firstByte === '02' ? 'signData' : firstByte === '01' ? 'signTransaction' : null; + const address = utf8Encoded.slice(2, 22); + + data['action'] = action; + data['account'] = account; + + if (action === 'signData') { + data['rlp'] = utf8Encoded.slice(23); + } else if (action === 'signTransaction') { + data['data'] = utf8Encoded.slice(23); + } else { + throw new Error('Could not determine action type.'); + } + break; + case '53': // Substrate UOS payload + const firstByte = utf8Encoded[1].toString(16); + const secondByte = utf8Encoded[2].toString(16); + const crypto = firstByte === '00' ? 'ed25519' : firstByte === '01' ? 'sr25519' : null; + const action = secondByte === '00' || secondByte === '01' ? 'signData': secondByte === '02' || secondByte === '03' ? 'signTransaction' : null; + + data['crypto'] = crypto; + data['action'] = action; + data['account'] = utf8Encoded.slice(2, 33); + data['data'] = utf8Encoded.slice(33); + + break; + default: + throw new Error('we cannot handle the payload: ', txRequestData.data); } + if (!(await scannerStore.setData(data, accountsStore))) { - return; - } else { - if ('transaction' === scannerStore.getType()) { - this.props.navigation.navigate('TxDetails'); - } else { // message - this.props.navigation.navigate('MessageDetails'); - } - } + return; + } else { + if (scannerStore.getType() === 'transaction') { + this.props.navigation.navigate('TxDetails'); + } else { // message + this.props.navigation.navigate('MessageDetails'); + } + } } catch (e) { scannerStore.setBusy(); Alert.alert('Unable to parse transaction', e.message, [ @@ -112,8 +129,7 @@ export class QrScannerView extends React.PureComponent { } static propTypes = { - onBarCodeRead: PropTypes.func.isRequired, - onError: PropTypes.func.isRequired + onBarCodeRead: PropTypes.func.isRequired }; componentWillMount() { From 8673253ad0a628f465ec7062e65e32e9505f2e32 Mon Sep 17 00:00:00 2001 From: YJ Date: Mon, 29 Jul 2019 17:29:52 +0200 Subject: [PATCH 007/101] fix: decode substrate payload! --- package.json | 2 +- src/screens/QrScanner.js | 80 +++++++++++++++++++++++----------------- yarn.lock | 20 +++++----- 3 files changed, 58 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index 591659a75b..f3c5ace9a6 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "prop-types": "^15.6.1", "react": "16.8.6", "react-native": "0.60.3", - "react-native-camera": "^2.11.1", + "react-native-camera": "^3.0.0", "react-native-gesture-handler": "^1.3.0", "react-native-keyboard-aware-scroll-view": "^0.8.0", "react-native-markdown-renderer": "^3.2.8", diff --git a/src/screens/QrScanner.js b/src/screens/QrScanner.js index 96fbb02a79..36a7944673 100644 --- a/src/screens/QrScanner.js +++ b/src/screens/QrScanner.js @@ -33,6 +33,16 @@ export default class Scanner extends React.PureComponent { headerBackTitle: 'Scanner' }; + encodeString (value: string): Uint8Array { + const u8a = new Uint8Array(value.length); + + for (let i = 0; i < value.length; i++) { + u8a[i] = value.charCodeAt(i); + } + + return u8a; + } + render() { return ( @@ -45,62 +55,66 @@ export default class Scanner extends React.PureComponent { if (scannerStore.isBusy()) { return; } - const utf8Encoder = new TextEncoder('utf-8'); - const utf8Encoded = utf8Encoder.encode(txRequestData.data); - const zerothByte = utf8Encoded[0].toString(16); - let data = {}; + if (txRequestData.data) { // then this is Ethereum Legacy + if (data.action === undefined) { + throw new Error('Could not determine action type.'); + } + data = JSON.parse(txRequestData.data); + + if (!(await scannerStore.setData(data, accountsStore))) { + return; + } else { + if (scannerStore.getType() === 'transaction') { + this.props.navigation.navigate('TxDetails'); + } else { // message + this.props.navigation.navigate('MessageDetails'); + } + } + } + // parse past the frame information + let raw = txRequestData.rawData; + let rawAfterFrames = raw.slice(13); + + // can't scope variables to switch case blocks....fml + let zerothByte = rawAfterFrames.slice(0, 2); + let firstByte = rawAfterFrames.slice(2, 4); + let action; + let address; + try { // decode payload appropriately via UOS - switch (zerothByte.toLowerCase()) { - case '7b': // Legacy Ethereum payload is JSON format - data = JSON.parse(txRequestData.data); - if (data.action === undefined) { - throw new Error('Could not determine action type.'); - } - break; + switch (zerothByte) { case '45': // Ethereum UOS payload - const firstByte = utf8Encoded[1].toString(16); - const action = firstByte === '00' || firstByte === '02' ? 'signData' : firstByte === '01' ? 'signTransaction' : null; - const address = utf8Encoded.slice(2, 22); + action = firstByte === '00' || firstByte === '02' ? 'signData' : firstByte === '01' ? 'signTransaction' : null; + address = rawAfterFrames.slice(2, 22); data['action'] = action; data['account'] = account; if (action === 'signData') { - data['rlp'] = utf8Encoded.slice(23); + data['rlp'] = rawAfterFrames.slice(23); } else if (action === 'signTransaction') { - data['data'] = utf8Encoded.slice(23); + data['data'] = rawAfterFrames.slice(23); } else { throw new Error('Could not determine action type.'); } break; case '53': // Substrate UOS payload - const firstByte = utf8Encoded[1].toString(16); - const secondByte = utf8Encoded[2].toString(16); + const secondByte = rawAfterFrames.slice(4, 6); const crypto = firstByte === '00' ? 'ed25519' : firstByte === '01' ? 'sr25519' : null; - const action = secondByte === '00' || secondByte === '01' ? 'signData': secondByte === '02' || secondByte === '03' ? 'signTransaction' : null; + action = secondByte === '00' || secondByte === '01' ? 'signData': secondByte === '02' || secondByte === '03' ? 'signTransaction' : null; data['crypto'] = crypto; data['action'] = action; - data['account'] = utf8Encoded.slice(2, 33); - data['data'] = utf8Encoded.slice(33); - + data['account'] = rawAfterFrames.slice(6, 70); + data['data'] = rawAfterFrames.slice(70); + debugger; break; default: - throw new Error('we cannot handle the payload: ', txRequestData.data); + throw new Error('we cannot handle the payload: ', txRequestData); } - - if (!(await scannerStore.setData(data, accountsStore))) { - return; - } else { - if (scannerStore.getType() === 'transaction') { - this.props.navigation.navigate('TxDetails'); - } else { // message - this.props.navigation.navigate('MessageDetails'); - } - } } catch (e) { scannerStore.setBusy(); Alert.alert('Unable to parse transaction', e.message, [ diff --git a/yarn.lock b/yarn.lock index 2a71798286..e85388a1de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6174,9 +6174,9 @@ qs@~6.5.2: integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== query-string@^6.4.2: - version "6.8.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.1.tgz#62c54a7ef37d01b538c8fd56f95740c81d438a26" - integrity sha512-g6y0Lbq10a5pPQpjlFuojfMfV1Pd2Jw9h75ypiYPPia3Gcq2rgkKiIwbkS6JxH7c5f5u/B/sB+d13PU+g1eu4Q== + version "6.8.2" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.2.tgz#36cb7e452ae11a4b5e9efee83375e0954407b2f6" + integrity sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw== dependencies: decode-uri-component "^0.2.0" split-on-first "^1.0.0" @@ -6220,9 +6220,9 @@ react-deep-force-update@^1.0.0: integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA== react-devtools-core@^3.6.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.6.2.tgz#7d425f160c5928129fa9acdbdd9e80a334e09c8d" - integrity sha512-a5r2Er0PajtlvKYBUKzB3vW5qek8TbgQWwRruDEwTm3VnqVffHmnvApRil/lfkAa8ghXcESNizrtKu/18oG55Q== + version "3.6.3" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.6.3.tgz#977d95b684c6ad28205f0c62e1e12c5f16675814" + integrity sha512-+P+eFy/yo8Z/UH9J0DqHZuUM5+RI2wl249TNvMx3J2jpUomLQa4Zxl56GEotGfw3PIP1eI+hVf1s53FlUONStQ== dependencies: shell-quote "^1.6.1" ws "^3.3.1" @@ -6237,10 +6237,10 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-native-camera@^2.11.1: - version "2.11.1" - resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-2.11.1.tgz#a72062f59bb57c0cb2bd57fe6713fa23b2a90571" - integrity sha512-ZmPZHcY7UXEf7Z8PoJX/WhFtmLFtdRPBGDwemOLlPRVwTVyu/OXVINDUWCug4daBqV8Fs3X1O6V927+K2u2GfA== +react-native-camera@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-3.0.0.tgz#67427cda54bb67afa08aeae1320dd540b14d5cfd" + integrity sha512-U8o5Kiv0/Vpwkp+SGpovhVdFMpFJpiXwl7NJLQ6a5EFoAy0CYyMFyfw8aXinplNfLetb3iXv1FmXLNkoawEYDw== dependencies: prop-types "^15.6.2" From bbaeb3c8274bdddba6e82111ddb6efd666c2e4d7 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 29 Jul 2019 23:06:09 +0200 Subject: [PATCH 008/101] fix(): network selection --- .../app/src/main/assets/index.android.bundle | 16 +- src/components/AccountDetailsCard.js | 137 ------------------ src/constants.js | 68 +++------ src/screens/AccountBackup.js | 6 - src/screens/AccountNetworkChooser.js | 19 +-- src/stores/AccountsStore.js | 10 +- src/stores/ScannerStore.js | 13 +- src/util/account.js | 16 +- src/util/db.js | 4 +- 9 files changed, 56 insertions(+), 233 deletions(-) delete mode 100644 src/components/AccountDetailsCard.js diff --git a/android/app/src/main/assets/index.android.bundle b/android/app/src/main/assets/index.android.bundle index 032c635ba4..5dbe1ee8ed 100644 --- a/android/app/src/main/assets/index.android.bundle +++ b/android/app/src/main/assets/index.android.bundle @@ -119024,8 +119024,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e function accountId(_ref) { var address = _ref.address, - _ref$networkType = _ref.networkType, - networkType = _ref$networkType === void 0 ? 'ethereum' : _ref$networkType, + _ref$protocol = _ref.protocol, + protocol = _ref$protocol === void 0 ? 'ethereum' : _ref$protocol, _ref$chainId = _ref.chainId, chainId = _ref$chainId === void 0 ? '1' : _ref$chainId; @@ -119033,14 +119033,14 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e throw new Error("Couldn't create an accountId, missing address"); } - return networkType + ":0x" + address.toLowerCase() + "@" + chainId; + return protocol + ":0x" + address.toLowerCase() + "@" + chainId; } function empty() { var account = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return _objectSpread({ name: '', - networkType: _constants.NETWORK_TYPE.ethereum, + protocol: _constants.NETWORK_TYPE.ethereum, chainId: _constants.NETWORK_ID.frontier, seed: '', address: '00a329c0648769A73afAc7F9381E08FB43dBEA72', @@ -119180,11 +119180,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e function accountTxsKey(_ref) { var address = _ref.address, - networkType = _ref.networkType, + protocol = _ref.protocol, chainId = _ref.chainId; return 'account_txs_' + (0, _account.accountId)({ address: address, - networkType: networkType, + protocol: protocol, chainId: chainId }); } @@ -122930,7 +122930,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e tx = _context3.sent; _tx$chainId = tx.chainId, chainId = _tx$chainId === void 0 ? '1' : _tx$chainId; sender = accountsStore.getById({ - networkType: 'ethereum', + protocol: 'ethereum', chainId: chainId, address: txRequest.data.account }); @@ -122945,7 +122945,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e case 12: recipient = accountsStore.getById({ - networkType: 'ethereum', + protocol: 'ethereum', chainId: tx.chainId, address: tx.action }); diff --git a/src/components/AccountDetailsCard.js b/src/components/AccountDetailsCard.js deleted file mode 100644 index a1eb5172e7..0000000000 --- a/src/components/AccountDetailsCard.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2015-2019 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -// @flow - -import PropTypes from 'prop-types'; -import React from 'react'; -import { StyleSheet, Text, View } from 'react-native'; -import colors from '../colors'; -import { NETWORK_LIST } from '../constants'; -import AccountIcon from './AccountIcon'; -import TouchableItem from './TouchableItem'; - -export default class AccountDetailsCard extends React.PureComponent<{ - title: string, - address: string, - networkKey: string, - onPress: () => any -}> { - static propTypes = { - title: PropTypes.string.isRequired, - address: PropTypes.string.isRequired, - networkKey: PropTypes.string, - onPress: PropTypes.func - }; - - render() { - const { title, address, networkKey, onPress } = this.props; - const network = NETWORK_LIST[networkKey]; - - return ( - - - - - - - {title} - - Tap to edit account - - - - - 0x{address} - - - - - - {network.title} - - - - ); - } -} - -const styles = StyleSheet.create({ - body: { - padding: 20, - backgroundColor: colors.card_bg - }, - content: { - flexDirection: 'row', - backgroundColor: colors.card_bg - }, - icon: { - width: 70, - height: 70 - }, - desc: { - flexDirection: 'column', - paddingLeft: 10, - flex: 1 - }, - footer: { - backgroundColor: '#977CF6', - flexDirection: 'row-reverse', - padding: 5 - }, - titleText: { - fontSize: 20 - }, - editText: { - paddingTop: 12, - color: colors.bg_text_sec, - fontWeight: '500', - fontSize: 15 - }, - addressText: { - paddingTop: 20, - color: colors.bg, - fontWeight: '700', - fontSize: 16 - }, - footerText: { - color: colors.card_bg, - fontWeight: 'bold' - } -}); diff --git a/src/constants.js b/src/constants.js index c71bd1d4db..b3e1c610c4 100644 --- a/src/constants.js +++ b/src/constants.js @@ -2,84 +2,61 @@ import mapValues from 'lodash/mapValues'; import defaults from 'lodash/defaults'; import colors from './colors'; -export const NetworkTypes = Object.freeze({ +export const NetworkProtocols = Object.freeze({ ETHEREUM: 'ethereum', SUBSTRATE: 'substrate' }); -export const EthereumNetworkIds = Object.freeze({ - OLYMPIC: '0', - FRONTIER: '1', - EXPANSE: '2', - ROPSTEN: '3', - RINKEBY: '4', - GOERLI: '5', - UBIG: '8', - KOVAN: '42', - CLASSIC: '61', - SOKOL: '77', - CORE: '99', - MUSICOIN: '7762959' +export const EthereumNetworkKeys = Object.freeze({ + FRONTIER: 'e1', + ROPSTEN: 'e3', + RINKEBY: 'e4', + GOERLI: 'e5', + KOVAN: 'e42', + CLASSIC: 'e61', }); -export const SubstrateNetworkIds = Object.freeze({ - KUSAMA: 's0' +export const SubstrateNetworkKeys = Object.freeze({ + KUSAMA: 's2' }); const substrateNetworkRaw = { - [SubstrateNetworkIds.KUSAMA]: { - name: 'kusama', + [SubstrateNetworkKeys.KUSAMA]: { + title: 'Kusama', ss58Prefix: 2, balanceModuleId: 123 // This id need to be checked } }; const ethereumNetworkRaw = { - [EthereumNetworkIds.OLYMPIC]: {}, - [EthereumNetworkIds.FRONTIER]: { + [EthereumNetworkKeys.FRONTIER]: { title: 'Ethereum', color: '#977CF6', secondaryColor: colors.card_bg, - available: true }, - [EthereumNetworkIds.CLASSIC]: { + [EthereumNetworkKeys.CLASSIC]: { title: 'Ethereum Classic', color: '#8C7166', secondaryColor: colors.card_bg, - available: true }, - [EthereumNetworkIds.EXPANSE]: { - title: 'Expanse' - }, - [EthereumNetworkIds.ROPSTEN]: { + [EthereumNetworkKeys.ROPSTEN]: { title: 'Ropsten Testnet', - available: true - }, - [EthereumNetworkIds.RINKEBY]: { - title: 'Rinkeby Testnet' }, - [EthereumNetworkIds.GOERLI]: { + [EthereumNetworkKeys.GOERLI]: { title: 'Görli Testnet', - available: true }, - [EthereumNetworkIds.KOVAN]: { + [EthereumNetworkKeys.KOVAN]: { title: 'Kovan Testnet', - available: true - }, - [EthereumNetworkIds.SOKOL]: {}, - [EthereumNetworkIds.CORE]: {}, - [EthereumNetworkIds.MUSICOIN]: {} + } }; export const ETHEREUM_NETWORK_LIST = mapValues( ethereumNetworkRaw, (ethereumNetwork, ethereumChainId) => defaults(ethereumNetwork, { - protocol: NetworkTypes.ETHEREUM, + protocol: NetworkProtocols.ETHEREUM, color: '#F2E265', secondaryColor: colors.card_text, - available: false, - title: `Ethereum_${ethereumChainId}`, ethereumChainId: ethereumChainId }) ); @@ -88,10 +65,9 @@ const SUBSTRATE_NETWORK_LIST = mapValues( substrateNetworkRaw, (substrateNetwork, substrateNetworkId) => defaults(substrateNetwork, { - protocol: NetworkTypes.SUBSTRATE, - color: '#E6007A', - secondaryColor: colors.card_bg, - available: false + protocol: NetworkProtocols.SUBSTRATE, + color: '#4C4646', + secondaryColor: colors.card_bg }) ); diff --git a/src/screens/AccountBackup.js b/src/screens/AccountBackup.js index f90c22df96..0d912bebff 100644 --- a/src/screens/AccountBackup.js +++ b/src/screens/AccountBackup.js @@ -56,12 +56,6 @@ class AccountBackupView extends React.PureComponent { } componentWillUnmount() { - const { accounts } = this.props; - const selected = - accounts.getNew().address && accounts.getNew().address.length - ? accounts.getNew() - : accounts.getSelected(); - accounts.lockAccount(selected); AppState.removeEventListener('change', this._handleAppStateChange); } diff --git a/src/screens/AccountNetworkChooser.js b/src/screens/AccountNetworkChooser.js index 04593c9a6f..5defdd2d84 100644 --- a/src/screens/AccountNetworkChooser.js +++ b/src/screens/AccountNetworkChooser.js @@ -17,12 +17,11 @@ 'use strict'; import React from 'react'; -import filter from 'lodash/filter'; import { ScrollView, StyleSheet, Text } from 'react-native'; import { Subscribe } from 'unstated'; import colors from '../colors'; import TouchableItem from '../components/TouchableItem'; -import { ETHEREUM_NETWORK_LIST } from '../constants'; +import { NETWORK_LIST } from '../constants'; import AccountsStore from '../stores/AccountsStore'; export default class AccountNetworkChooser extends React.PureComponent { @@ -45,25 +44,21 @@ class AccountNetworkChooserView extends React.PureComponent { render() { const { navigation } = this.props; const { accounts } = this.props; - const availableEthereumNetworkList = filter( - ETHEREUM_NETWORK_LIST, - 'available' - ); return ( CHOOSE NETWORK - { availableEthereumNetworkList.map(network => ( + { Object.entries(NETWORK_LIST).map(([networkKey, networkParams]) => ( { - accounts.updateNew({ networkKey: network.ethereumChainId }); + accounts.updateNew({ networkKey, protocol: networkParams.protocol }); navigation.goBack(); }} > @@ -71,11 +66,11 @@ class AccountNetworkChooserView extends React.PureComponent { style={[ styles.cardText, { - color: network.secondaryColor + color: networkParams.secondaryColor } ]} > - {network.title} + {networkParams.title} ))} diff --git a/src/stores/AccountsStore.js b/src/stores/AccountsStore.js index c0f9ae9c1b..792979c216 100644 --- a/src/stores/AccountsStore.js +++ b/src/stores/AccountsStore.js @@ -24,7 +24,7 @@ import { decryptData, encryptData } from '../util/native'; export type Account = { name: string, address: string, - networkType: string, + protocol: string, networkKey: string, seed: string, encryptedSeed: string, @@ -156,14 +156,6 @@ export default class AccountsStore extends Container { return true; } - lockAccount(account) { - const acc = this.state.accounts.get(accountId(account)); - if (acc) { - delete acc.seed; - } - this.setState({}); - } - async checkPinForSelected(pin) { const account = this.getSelected(); if (account && account.encryptedSeed) { diff --git a/src/stores/ScannerStore.js b/src/stores/ScannerStore.js index efadcc142c..a0eb18989b 100644 --- a/src/stores/ScannerStore.js +++ b/src/stores/ScannerStore.js @@ -16,7 +16,7 @@ // @flow import { Container } from 'unstated'; -import { NETWORK_LIST, NetworkTypes } from '../constants'; +import { NETWORK_LIST, NetworkProtocols, EthereumNetworkKeys } from '../constants'; import { saveTx } from '../util/db'; import { brainWalletSign, decryptData, keccak, ethSign } from '../util/native'; import transaction from '../util/transaction'; @@ -99,10 +99,12 @@ export default class ScannerStore extends Container { throw new Error(`Scanned QR contains no valid transaction`); } const tx = await transaction(txRequest.data.rlp); - const { ethereumChainId: networkKey = '1' } = tx; + const { ethereumChainId = 1 } = tx; + const networkKey = 'e'+ethereumChainId; + // TODO cater for Substrate const sender = accountsStore.getById({ - networkType: NetworkTypes.ETHEREUM, + protocol: NetworkProtocols.ETHEREUM, networkKey, address: txRequest.data.account }); @@ -116,9 +118,10 @@ export default class ScannerStore extends Container { ); } + // TODO cater for Substrate const recipient = accountsStore.getById({ - networkType: NetworkTypes.ETHEREUM, - networkKey: tx.ethereumChainId, + protocol: NetworkProtocols.ETHEREUM, + networkKey: 'e'+tx.ethereumChainId, address: tx.action }); const dataToSign = await keccak(txRequest.data.rlp); diff --git a/src/util/account.js b/src/util/account.js index 0314fa1021..6b76bb3741 100644 --- a/src/util/account.js +++ b/src/util/account.js @@ -1,24 +1,24 @@ -import { EthereumNetworkIds, NetworkTypes } from '../constants'; +import { SubstrateNetworkKeys, NetworkProtocols } from '../constants'; export function accountId({ address, - networkType = 'ethereum', - networkKey = EthereumNetworkIds.FRONTIER + protocol = NetworkProtocols.SUBSTRATE, + networkKey = SubstrateNetworkKeys.FRONTIER }) { if (typeof address !== 'string' || address.length === 0) { - throw new Error(`Couldn't create an accountId, missing address`); + throw new Error(`Couldn't create an accountId, address missing`); } - return `${networkType}:0x${address.toLowerCase()}@${networkKey}`; + return `${protocol}_${networkKey}_${address.toLowerCase()}`; } export function empty(account = {}) { return { name: '', - networkType: NetworkTypes.ETHEREUM, - networkKey: EthereumNetworkIds.FRONTIER, + protocol: NetworkProtocols.SUBSTRATE, + networkKey: SubstrateNetworkKeys.KUSAMA, seed: '', // address for an empty seed phrase - address: '00a329c0648769A73afAc7F9381E08FB43dBEA72', + address: '', createdAt: new Date().getTime(), updatedAt: new Date().getTime(), archived: false, diff --git a/src/util/db.js b/src/util/db.js index f0462f8830..22235523da 100644 --- a/src/util/db.js +++ b/src/util/db.js @@ -43,8 +43,8 @@ const accountsStore = { sharedPreferencesName: 'accounts_v2' }; -function accountTxsKey({ address, networkType, networkKey }) { - return 'account_txs_' + accountId({ address, networkType, networkKey }); +function accountTxsKey({ address, protocol, networkKey }) { + return 'account_txs_' + accountId({ address, protocol, networkKey }); } function txKey(hash) { From 77a31efce5952c215192fd9cac608ef33eb6f64d Mon Sep 17 00:00:00 2001 From: YJ Date: Tue, 30 Jul 2019 12:40:48 +0200 Subject: [PATCH 009/101] Update src/components/QrView.js --- src/components/QrView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/QrView.js b/src/components/QrView.js index c16a1b23ba..68d5577342 100644 --- a/src/components/QrView.js +++ b/src/components/QrView.js @@ -47,7 +47,7 @@ export default class QrView extends React.PureComponent { } componentDidMount() { - this.displayQrCode(this.props.accountId); + this.displayQrCode(this.props.data); } componentWillReceiveProps(newProps) { From af2c36aaba7103c352b59f7181b49c44523d94c7 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Tue, 30 Jul 2019 14:55:42 +0200 Subject: [PATCH 010/101] fix(): backward compatible --- src/constants.js | 12 ++++++------ src/stores/ScannerStore.js | 4 ++-- src/util/account.js | 8 ++++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/constants.js b/src/constants.js index b3e1c610c4..8a12f85b44 100644 --- a/src/constants.js +++ b/src/constants.js @@ -8,12 +8,12 @@ export const NetworkProtocols = Object.freeze({ }); export const EthereumNetworkKeys = Object.freeze({ - FRONTIER: 'e1', - ROPSTEN: 'e3', - RINKEBY: 'e4', - GOERLI: 'e5', - KOVAN: 'e42', - CLASSIC: 'e61', + FRONTIER: '1', + ROPSTEN: '3', + RINKEBY: '4', + GOERLI: '5', + KOVAN: '42', + CLASSIC: '61', }); export const SubstrateNetworkKeys = Object.freeze({ diff --git a/src/stores/ScannerStore.js b/src/stores/ScannerStore.js index a0eb18989b..b648fa9e17 100644 --- a/src/stores/ScannerStore.js +++ b/src/stores/ScannerStore.js @@ -100,7 +100,7 @@ export default class ScannerStore extends Container { } const tx = await transaction(txRequest.data.rlp); const { ethereumChainId = 1 } = tx; - const networkKey = 'e'+ethereumChainId; + const networkKey = ethereumChainId; // TODO cater for Substrate const sender = accountsStore.getById({ @@ -121,7 +121,7 @@ export default class ScannerStore extends Container { // TODO cater for Substrate const recipient = accountsStore.getById({ protocol: NetworkProtocols.ETHEREUM, - networkKey: 'e'+tx.ethereumChainId, + networkKey: tx.ethereumChainId, address: tx.action }); const dataToSign = await keccak(txRequest.data.rlp); diff --git a/src/util/account.js b/src/util/account.js index 6b76bb3741..fa475d3da3 100644 --- a/src/util/account.js +++ b/src/util/account.js @@ -3,12 +3,16 @@ import { SubstrateNetworkKeys, NetworkProtocols } from '../constants'; export function accountId({ address, protocol = NetworkProtocols.SUBSTRATE, - networkKey = SubstrateNetworkKeys.FRONTIER + networkKey = SubstrateNetworkKeys.KUSAMA }) { if (typeof address !== 'string' || address.length === 0) { throw new Error(`Couldn't create an accountId, address missing`); } - return `${protocol}_${networkKey}_${address.toLowerCase()}`; + if (protocol === NetworkProtocols.SUBSTRATE){ + return `${protocol}:${address.toLowerCase()}`; + } else { + return `${protocol}:${address.toLowerCase()}@${networkKey}`; + } } export function empty(account = {}) { From a9c36ae44323e557afdb6ea7b4ccf90fc3928b7c Mon Sep 17 00:00:00 2001 From: Thibaut Date: Tue, 30 Jul 2019 17:46:23 +0200 Subject: [PATCH 011/101] fix(): Mock for a sparta account, add prefixes for substrate --- src/components/AccountCard.js | 4 +-- src/components/AccountIconChooser.js | 2 ++ src/constants.js | 41 ++++++++++++++++------------ src/screens/AccountEdit.js | 6 +--- src/screens/AccountNew.js | 7 ++++- src/stores/AccountsStore.js | 11 ++++---- src/util/account.js | 18 ++++++------ 7 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/components/AccountCard.js b/src/components/AccountCard.js index a85bbb36ef..435ee10815 100644 --- a/src/components/AccountCard.js +++ b/src/components/AccountCard.js @@ -20,7 +20,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import { StyleSheet, Text, View, ViewPropTypes } from 'react-native'; import colors from '../colors'; -import { NETWORK_LIST } from '../constants'; +import { NETWORK_LIST, NetworkProtocols } from '../constants'; import AccountIcon from './AccountIcon'; import TouchableItem from './TouchableItem'; @@ -71,7 +71,7 @@ export default class AccountCard extends React.PureComponent<{ minimumFontScale={0.01} style={styles.secondaryText} > - 0x{address} + {network.protocol === NetworkProtocols.ETHEREUM ? '0x' : ''}{address} diff --git a/src/components/AccountIconChooser.js b/src/components/AccountIconChooser.js index ae87b30e39..1448fc9bac 100644 --- a/src/components/AccountIconChooser.js +++ b/src/components/AccountIconChooser.js @@ -92,6 +92,7 @@ export default class AccountIconChooser extends React.PureComponent<{ }) } > + {/* TODO Cater for Substrate */} ); @@ -117,6 +118,7 @@ export default class AccountIconChooser extends React.PureComponent<{ minimumFontScale={0.01} style={styles.addressText} > + {/* TODO Cater for Substrate */} {value ? `0x${value}` : `Select an identicon`} diff --git a/src/constants.js b/src/constants.js index 8a12f85b44..99a8e22878 100644 --- a/src/constants.js +++ b/src/constants.js @@ -17,14 +17,31 @@ export const EthereumNetworkKeys = Object.freeze({ }); export const SubstrateNetworkKeys = Object.freeze({ - KUSAMA: 's2' + SUBSTRATE: 'substrate' +}); + +export const SubstratePrefixKeys = Object.freeze({ + KUSAMA: 'kusama', + POLKADOT: 'polkadot', +}); + +export const SubstratePrefixes = Object.freeze({ + [SubstratePrefixKeys.KUSAMA]: { + prefix: 2, + color: '#1e1e1e' + }, + [SubstratePrefixKeys.POLKADOT]: { + prefix: 0, + color: '#e6007a' + } }); -const substrateNetworkRaw = { - [SubstrateNetworkKeys.KUSAMA]: { - title: 'Kusama', - ss58Prefix: 2, - balanceModuleId: 123 // This id need to be checked +const SUBSTRATE_NETWORK_LIST = { + [SubstrateNetworkKeys.SUBSTRATE]: { + title: 'Substrate', + protocol: NetworkProtocols.SUBSTRATE, + color: '#4C4646', + secondaryColor: colors.card_bg } }; @@ -61,16 +78,6 @@ export const ETHEREUM_NETWORK_LIST = mapValues( }) ); -const SUBSTRATE_NETWORK_LIST = mapValues( - substrateNetworkRaw, - (substrateNetwork, substrateNetworkId) => - defaults(substrateNetwork, { - protocol: NetworkProtocols.SUBSTRATE, - color: '#4C4646', - secondaryColor: colors.card_bg - }) -); - export const NETWORK_LIST = Object.freeze( - Object.assign({}, ETHEREUM_NETWORK_LIST, SUBSTRATE_NETWORK_LIST) + Object.assign({}, SUBSTRATE_NETWORK_LIST, ETHEREUM_NETWORK_LIST) ); diff --git a/src/screens/AccountEdit.js b/src/screens/AccountEdit.js index 33d95000fd..7b1af91cc1 100644 --- a/src/screens/AccountEdit.js +++ b/src/screens/AccountEdit.js @@ -17,11 +17,10 @@ 'use strict'; import React from 'react'; -import { Clipboard, ScrollView, StyleSheet, Text } from 'react-native'; +import { ScrollView, StyleSheet, Text } from 'react-native'; import { Subscribe } from 'unstated'; import colors from '../colors'; import AccountCard from '../components/AccountCard'; -import Button from '../components/Button'; import TextInput from '../components/TextInput'; import AccountsStore from '../stores/AccountsStore'; @@ -53,9 +52,6 @@ export default class AccountEdit extends React.PureComponent { title={selected.name} address={selected.address} networkKey={selected.networkKey} - onPress={async () => { - await Clipboard.setString('0x' + selected.address); - }} /> ACCOUNT NAME { + // TODO remove this hardcoded address for SUBSTRATE + if (selected.networkKey === SubstrateNetworkKeys.SUBSTRATE) { + accounts.updateNew({ address:'5EjSNPzM9T6Nb19zb38TcwBQh5hNWG47noi7anXQT64BBJBx', seed:'this is sparta', publicKey:0x123 ,validBip39Seed: false }); + } + validateSeed(selected.seed, selected.validBip39Seed).valid && this.props.navigation.navigate('AccountBackup', { isNew: true, diff --git a/src/stores/AccountsStore.js b/src/stores/AccountsStore.js index 792979c216..3204295353 100644 --- a/src/stores/AccountsStore.js +++ b/src/stores/AccountsStore.js @@ -22,15 +22,16 @@ import { loadAccounts, saveAccount } from '../util/db'; import { decryptData, encryptData } from '../util/native'; export type Account = { - name: string, address: string, - protocol: string, + archived: boolean, + createdAt: number, + encryptedSeed: string, + name: string, networkKey: string, + protocol: string, + publicKey: number, seed: string, - encryptedSeed: string, - createdAt: number, updatedAt: number, - archived: boolean, validBip39Seed: boolean }; diff --git a/src/util/account.js b/src/util/account.js index fa475d3da3..da1807d8b3 100644 --- a/src/util/account.js +++ b/src/util/account.js @@ -3,13 +3,14 @@ import { SubstrateNetworkKeys, NetworkProtocols } from '../constants'; export function accountId({ address, protocol = NetworkProtocols.SUBSTRATE, - networkKey = SubstrateNetworkKeys.KUSAMA + publicKey, + networkKey = SubstrateNetworkKeys.SUBSTRATE }) { if (typeof address !== 'string' || address.length === 0) { throw new Error(`Couldn't create an accountId, address missing`); } if (protocol === NetworkProtocols.SUBSTRATE){ - return `${protocol}:${address.toLowerCase()}`; + return `${protocol}:${publicKey}`; } else { return `${protocol}:${address.toLowerCase()}@${networkKey}`; } @@ -17,16 +18,17 @@ export function accountId({ export function empty(account = {}) { return { + + address: '', + archived: false, + createdAt: new Date().getTime(), + encryptedSeed: null, name: '', protocol: NetworkProtocols.SUBSTRATE, - networkKey: SubstrateNetworkKeys.KUSAMA, + publicKey: 0x0, + networkKey: SubstrateNetworkKeys.SUBSTRATE, seed: '', - // address for an empty seed phrase - address: '', - createdAt: new Date().getTime(), updatedAt: new Date().getTime(), - archived: false, - encryptedSeed: null, validBip39Seed: false, ...account }; From 62943a4b76981a43d98f8e8763d0dcb40bcf4fd0 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Tue, 30 Jul 2019 18:11:25 +0200 Subject: [PATCH 012/101] fix(): address map for substrate accounts --- src/stores/AccountsStore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/AccountsStore.js b/src/stores/AccountsStore.js index 3204295353..2228e0d74a 100644 --- a/src/stores/AccountsStore.js +++ b/src/stores/AccountsStore.js @@ -22,7 +22,9 @@ import { loadAccounts, saveAccount } from '../util/db'; import { decryptData, encryptData } from '../util/native'; export type Account = { - address: string, + // `address` is a string for Ethereum accounts + // or a mapping { [SubstratePrefixKey] : address } e.g: { ['kusama']: 'FUwidsflk...', ['polkadot']: 'Exttskfj...'} + address: string | {[index:string]: string}, archived: boolean, createdAt: number, encryptedSeed: string, From 7c0b8d3c3c3d90d60f21e2a4dec560e149c72c3a Mon Sep 17 00:00:00 2001 From: Maciej Hirsz Date: Wed, 31 Jul 2019 12:46:18 +0200 Subject: [PATCH 013/101] fix: Duplicate function names in iOS --- .../app/src/main/java/io/parity/signer/EthkeyBridge.java | 4 ++-- ios/NativeSigner/EthkeyBridge.swift | 2 +- rust/signer/signer.h | 2 +- rust/signer/src/lib.rs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java index a9dbefe6b6..c389b77fdf 100644 --- a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java +++ b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java @@ -75,7 +75,7 @@ public void keccak(String data, Promise promise) { @ReactMethod public void blake2s(String data, Promise promise) { - promise.resolve(ethkeyBlake2s(data)); + promise.resolve(ethkeyBlake(data)); } @ReactMethod @@ -130,7 +130,7 @@ public void qrCodeHex(String data, Promise promise) { private static native String ethkeyBrainwalletSign(String seed, String message); private static native String ethkeyRlpItem(String data, int position); private static native String ethkeyKeccak(String data); - private static native String ethkeyBlake2s(String data); + private static native String ethkeyBlake(String data); private static native String ethkeyEthSign(String data); private static native String ethkeyBlockiesIcon(String seed); private static native String ethkeyRandomPhrase(); diff --git a/ios/NativeSigner/EthkeyBridge.swift b/ios/NativeSigner/EthkeyBridge.swift index 3beed3a83f..0807b2b130 100644 --- a/ios/NativeSigner/EthkeyBridge.swift +++ b/ios/NativeSigner/EthkeyBridge.swift @@ -68,7 +68,7 @@ class EthkeyBridge: NSObject { @objc func blake2s(_ data: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { var error: UInt32 = 0 var data_ptr = data.asPtr() - let hash_rust_str = blake2s(&error, &data_ptr) + let hash_rust_str = blake(&error, &data_ptr) let hash_rust_str_ptr = rust_string_ptr(hash_rust_str) let hash = String.fromStringPtr(ptr: hash_rust_str_ptr!.pointee) rust_string_ptr_destroy(hash_rust_str_ptr) diff --git a/rust/signer/signer.h b/rust/signer/signer.h index efc68a712c..7b0ec64b2d 100644 --- a/rust/signer/signer.h +++ b/rust/signer/signer.h @@ -54,7 +54,7 @@ struct rust_string* rlp_item(unsigned* error, const struct rust_string_ptr* rlp, struct rust_string* keccak256(unsigned* error, const struct rust_string_ptr* data); -struct rust_string* blake2s(unsigned* error, const struct rust_string_ptr* data); +struct rust_string* blake(unsigned* error, const struct rust_string_ptr* data); struct rust_string* eth_sign(unsigned* error, const struct rust_string_ptr* data); diff --git a/rust/signer/src/lib.rs b/rust/signer/src/lib.rs index dee6ba00b6..d3ac8ce270 100644 --- a/rust/signer/src/lib.rs +++ b/rust/signer/src/lib.rs @@ -26,7 +26,7 @@ use rlp::decode_list; use rustc_hex::{ToHex, FromHex}; use tiny_keccak::Keccak; use tiny_keccak::keccak256 as keccak; -use blake2_rfc::blake2s::blake2s as blake; +use blake2_rfc::blake2s::blake2s; use std::num::NonZeroU32; // 10240 is always non-zero, ergo this is safe @@ -142,11 +142,11 @@ export! { Some(keccak(&data).to_hex()) } - @Java_io_parity_signer_EthkeyBridge_ethkeyBlake2s - fn blake2s(data: &str) -> Option { + @Java_io_parity_signer_EthkeyBridge_ethkeyBlake + fn blake(data: &str) -> Option { let data: Vec = data.from_hex().ok()?; - Some(blake(32, &[], &data).as_bytes().to_hex()) + Some(blake2s(32, &[], &data).as_bytes().to_hex()) } @Java_io_parity_signer_EthkeyBridge_ethkeyBlockiesIcon From bec4e4bd05bcbcabbf023c598ae3a304b44eaea7 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Thu, 1 Aug 2019 13:24:01 +0200 Subject: [PATCH 014/101] fix(): init with PolaIcon file, types, add ui-shared and react-native-svg --- package.json | 2 ++ src/screens/AccountList.js | 6 +++++ src/screens/Polkadot.tsx | 49 ++++++++++++++++++++++++++++++++++++++ src/screens/types.ts | 15 ++++++++++++ yarn.lock | 19 +++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 src/screens/Polkadot.tsx create mode 100644 src/screens/types.ts diff --git a/package.json b/package.json index 6fc12c6f28..20de89f2fe 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "commit": "commit-wizard" }, "dependencies": { + "@polkadot/ui-shared": "^0.42.0-beta.24", "@react-native-community/netinfo": "^4.1.1", "bignumber.js": "^4.0.0", "hoist-non-react-statics": "^2.5.0", @@ -33,6 +34,7 @@ "react-native-popup-menu": "^0.15.6", "react-native-secure-storage": "git+https://github.com/debris/react-native-secure-storage.git", "react-native-simple-picker": "^2.1.0", + "react-native-svg": "^9.5.3", "react-native-tabs": "^1.0.9", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.1", diff --git a/src/screens/AccountList.js b/src/screens/AccountList.js index 80a32610fa..8fa65ab3c0 100644 --- a/src/screens/AccountList.js +++ b/src/screens/AccountList.js @@ -131,6 +131,12 @@ class AccountListView extends React.PureComponent { { hasNoAccount && this.showOnboardingMessage()} + Give ma a Polkadot identicon + { this.list = list; diff --git a/src/screens/Polkadot.tsx b/src/screens/Polkadot.tsx new file mode 100644 index 0000000000..3027b665fb --- /dev/null +++ b/src/screens/Polkadot.tsx @@ -0,0 +1,49 @@ +// Copyright 2018 @polkadot/react-identicon authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { Props as BaseProps } from './types'; + +import React from 'react'; +import { View } from 'react-native'; +import Svg, { Circle as SvgCircle } from 'react-native-svg'; +import generateIcon, { Circle } from '@polkadot/ui-shared/polkadotIcon'; + +interface Props extends BaseProps { + sixPoint?: boolean; +} + +export default class Identicon extends React.PureComponent { + public render (): React.ReactNode { + const { address, className, sixPoint, size, style } = this.props; + + return ( + + + {generateIcon(address, sixPoint).map(this.renderCircle)} + + + ); + } + + private renderCircle = ({ cx, cy, r, fill }: Circle, key: number): React.ReactNode => { + return ( + + ); + } +} diff --git a/src/screens/types.ts b/src/screens/types.ts new file mode 100644 index 0000000000..5c2e83397b --- /dev/null +++ b/src/screens/types.ts @@ -0,0 +1,15 @@ +// Copyright 2018 @polkadot/react-identicon authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export interface BaseProps { + className?: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + style?: Record; +} + +export interface Props extends BaseProps { + address: string; + publicKey: string; + size: number; +} diff --git a/yarn.lock b/yarn.lock index dbad4a435b..16f69debbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -633,6 +633,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" + integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ== + dependencies: + regenerator-runtime "^0.13.2" + "@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" @@ -857,6 +864,13 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^12.0.9" +"@polkadot/ui-shared@^0.42.0-beta.24": + version "0.42.0-beta.24" + resolved "https://registry.yarnpkg.com/@polkadot/ui-shared/-/ui-shared-0.42.0-beta.24.tgz#0ae1c5951d73e5f2506395814dd28c4aeb4db26d" + integrity sha512-rS9sKAl42iZEPvdDPUs0UWjcTN/75uwJgEgrpYiERWjcR+s6HPrGDsiRIdGjSMsCYuMOmso/Sc/RT4+moYV5Vg== + dependencies: + "@babel/runtime" "^7.5.5" + "@react-native-community/cli-platform-android@^2.0.1", "@react-native-community/cli-platform-android@^2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-2.6.2.tgz#4e7ce8784e6b4a3139c739ce15672c9c4007b9fb" @@ -5875,6 +5889,11 @@ react-native-simple-picker@^2.1.0: dependencies: prop-types "^15.5.10" +react-native-svg@^9.5.3: + version "9.5.3" + resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-9.5.3.tgz#2389f3ffd700c6441166496a1aeade31ead89c59" + integrity sha512-VUOe4TLz7RFdmm/XT9EH87VSwlRykx49qbwJMA+dh9eFM7KPY1qH3kEyN7uRCqJD2eE8toxt9NpjR6ByvtPNlA== + react-native-tab-view@^1.2.0, react-native-tab-view@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz#f113cd87485808f0c991abec937f70fa380478b9" From bfa75e2fd744218657306420f64118fd1d187a1e Mon Sep 17 00:00:00 2001 From: Thibaut Date: Thu, 1 Aug 2019 13:48:24 +0200 Subject: [PATCH 015/101] fix(): add @polkadot/util-crypto --- package.json | 1 + src/screens/AccountList.js | 1 + yarn.lock | 378 ++++++++++++++++++++++++++++++++++++- 3 files changed, 375 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 20de89f2fe..fd6b5bd5e8 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@polkadot/ui-shared": "^0.42.0-beta.24", + "@polkadot/util-crypto": "^0.94.1", "@react-native-community/netinfo": "^4.1.1", "bignumber.js": "^4.0.0", "hoist-non-react-statics": "^2.5.0", diff --git a/src/screens/AccountList.js b/src/screens/AccountList.js index 8fa65ab3c0..acf2b351f6 100644 --- a/src/screens/AccountList.js +++ b/src/screens/AccountList.js @@ -29,6 +29,7 @@ import Button from '../components/Button'; import AccountsStore from '../stores/AccountsStore'; import { accountId } from '../util/account'; import PopupMenu from '../components/PopupMenu'; +import { Identicon } from './Polkadot'; export default class AccountList extends React.PureComponent { static navigationOptions = { diff --git a/yarn.lock b/yarn.lock index 16f69debbc..a6cd266fff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -871,6 +871,47 @@ dependencies: "@babel/runtime" "^7.5.5" +"@polkadot/util-crypto@^0.94.1": + version "0.94.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.94.1.tgz#64c076567060c15a752fe1bb046cc902d07a14ca" + integrity sha512-+JB2fjNQn6Kba29gd3R5Bg0GLo9dDsRqayumSkusq3AeXI9YEZmjwstze6gGbGZJscSoyuuoCTzljWOr/RIhzQ== + dependencies: + "@babel/runtime" "^7.5.5" + "@polkadot/util" "^0.94.1" + "@polkadot/wasm-crypto" "^0.13.1" + "@types/bip39" "^2.4.2" + "@types/bs58" "^4.0.0" + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^3.5.0" + "@types/xxhashjs" "^0.2.1" + base-x "3.0.5" + bip39 "^2.5.0" + blakejs "^1.1.0" + bs58 "^4.0.1" + js-sha3 "^0.8.0" + secp256k1 "^3.7.0" + tweetnacl "^1.0.1" + xxhashjs "^0.2.2" + +"@polkadot/util@^0.94.1": + version "0.94.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.94.1.tgz#5d1f73ffbf79b16009de45180e5184dfc2110800" + integrity sha512-HpKz0PDgYcvoh2xvT1e5n3H3soXce8vY5h3aq3vqmWfdSUoSo9wIfCfHrOo7Z130Z/qegqtAtJVj4+8434+Q8w== + dependencies: + "@babel/runtime" "^7.5.5" + "@types/bn.js" "^4.11.5" + "@types/deasync" "^0.1.0" + bn.js "^4.11.8" + camelcase "^5.3.1" + chalk "^2.4.2" + ip-regex "^4.1.0" + moment "^2.24.0" + +"@polkadot/wasm-crypto@^0.13.1": + version "0.13.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-0.13.1.tgz#602305b2ca86fc320a35ce820835e0e2dd9e646e" + integrity sha512-24a63FynhyBHEGxqoDMZHAcaSxJqnjBPnEcmXXYCN2lI7b4iKaJKF2t+/FUmY7XTST+xNgFTJZ7A/o8jjgC/mA== + "@react-native-community/cli-platform-android@^2.0.1", "@react-native-community/cli-platform-android@^2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-2.6.2.tgz#4e7ce8784e6b4a3139c739ce15672c9c4007b9fb" @@ -1016,6 +1057,39 @@ dependencies: "@babel/types" "^7.3.0" +"@types/base-x@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/base-x/-/base-x-3.0.0.tgz#a1365259d1d3fa3ff973ab543192a6bdd4cb2f90" + integrity sha512-vnqSlpsv9uFX5/z8GyKWAfWHhLGJDBkrgRRsnxlsX23DHOlNyqP/eHQiv4TwnYcZULzQIxaWA/xRWU9Dyy4qzw== + dependencies: + "@types/node" "*" + +"@types/bip39@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@types/bip39/-/bip39-2.4.2.tgz#f5d6617212be496bb998d3969f657f77a10c5287" + integrity sha512-Vo9lqOIRq8uoIzEVrV87ZvcIM0PN9t0K3oYZ/CS61fIYKCBdOIM7mlWzXuRvSXrDtVa1uUO2w1cdfufxTC0bzg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.5": + version "4.11.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.5.tgz#40e36197433f78f807524ec623afcf0169ac81dc" + integrity sha512-AEAZcIZga0JgVMHNtl1CprA/hXX7/wPt79AgR4XqaDt7jyj3QWYw6LPoOiznPtugDmlubUnAahMs2PFxGcQrng== + dependencies: + "@types/node" "*" + +"@types/bs58@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-4.0.0.tgz#baec75cb007b419ede3ec6b3410d2c8f14c92fc5" + integrity sha512-gYX+MHD4G/R+YGYwdhG5gbJj4LsEQGr3Vg6gVDAbe7xC5Bn8dNNG2Lpo6uDX/rT5dE7VBj0rGEFuV8L0AEx4Rg== + dependencies: + "@types/base-x" "*" + +"@types/deasync@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@types/deasync/-/deasync-0.1.0.tgz#b2bd6c3fcde3cf67b8be4c2f70136ba8f157b45a" + integrity sha512-jxUH53LtGvbIL3TX2hD/XQuAgYJeATtx9kDXq5XtCZrWQABsiCQPjWi/KQXECUF+p9FuR6/tawnEDjXlEr4rFA== + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -1046,6 +1120,18 @@ resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.4.tgz#c5f67365916044b342dae8d702724788ba0b5b74" integrity sha512-FWR7QB7EqBRq1s9BMk0ccOSOuRLfVEWYpHQYpFPaXtCoqN6dJx2ttdsdQbUxLLnAlKpYeVjveGGhQ3583TTa7g== +"@types/node@*": + version "12.6.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" + integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== + +"@types/pbkdf2@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.0.0.tgz#5d9ca5f12a78a08cc89ad72883ad4a30af359229" + integrity sha512-6J6MHaAlBJC/eVMy9jOwj9oHaprfutukfW/Dyt0NEnpQ/6HN6YQrpvLwzWdWDeWZIdenjGHlbYDzyEODO5Z+2Q== + dependencies: + "@types/node" "*" + "@types/prop-types@*": version "15.7.1" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6" @@ -1067,11 +1153,25 @@ "@types/prop-types" "*" csstype "^2.2.0" +"@types/secp256k1@^3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-3.5.0.tgz#0f3baf16b07488c6da2633a63b4160bcf8d0fd5b" + integrity sha512-ZE39QhkIaNK6xbKIp1VLN5O36r97LuslLmRnjAcT0sVDxcfvrk3zqp/VnIfmGza7J6jDxR8dIai3hsCxPYglPA== + dependencies: + "@types/node" "*" + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== +"@types/xxhashjs@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/xxhashjs/-/xxhashjs-0.2.1.tgz#6cd06b2eca5228765ff45960cf2c2a557ddf109a" + integrity sha512-Akm13wkwsQylVnBokl/aiKLtSxndSjfgTjdvmSxXNehYy4NymwdfdJHwGhpV54wcYfmOByOp3ak8AGdUlvp0sA== + dependencies: + "@types/node" "*" + "@types/yargs@^12.0.2", "@types/yargs@^12.0.9": version "12.0.12" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" @@ -1550,6 +1650,20 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base-x@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.5.tgz#d3ada59afed05b921ab581ec3112e6444ba0795a" + integrity sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA== + dependencies: + safe-buffer "^5.0.1" + +base-x@^3.0.2: + version "3.0.6" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.6.tgz#de047ec95f5f7b99ae63d830a2a894c96538b2cd" + integrity sha512-4PaF8u2+AlViJxRVjurkLTxpp7CaFRD/jo5rPT9ONnKxyhQ8f59yzamEvq7EkriG56yn5On4ONyaG75HLqr46w== + dependencies: + safe-buffer "^5.0.1" + base64-js@^1.1.2, base64-js@^1.2.3: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -1597,6 +1711,36 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip39@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.6.0.tgz#9e3a720b42ec8b3fbe4038f1e445317b6a99321c" + integrity sha512-RrnQRG2EgEoqO24ea+Q/fftuPUZLmrEM3qNhhGsA3PbaXaCW791LTzPuVyx/VprXQcTbPJ3K3UeTna8ZnVl2sg== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= + dependencies: + safe-buffer "^5.0.1" + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + bluebird@2.9.24: version "2.9.24" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.9.24.tgz#14a2e75f0548323dc35aa440d92007ca154e967c" @@ -1612,6 +1756,11 @@ bluebird@^3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== +bn.js@^4.11.8, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + bplist-creator@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" @@ -1650,6 +1799,11 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + browser-process-hrtime@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" @@ -1662,6 +1816,25 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" +browserify-aes@^1.0.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + bser@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.0.tgz#65fc784bf7f87c009b973c12db6546902fa9c7b5" @@ -1679,6 +1852,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -1728,7 +1906,7 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0: +camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== @@ -1838,6 +2016,14 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2115,6 +2301,29 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + create-react-class@^15.6.3: version "15.6.3" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" @@ -2166,6 +2375,11 @@ csstype@^2.2.0: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.6.tgz#c34f8226a94bbb10c32cc0d714afdf942291fc41" integrity sha512-RpFbQGUE74iyPgvr46U9t1xoQBM8T4BL8SxrN66Le2xYAPSaDJJKeztV3awugusb3g3G9iL8StmkBBXhcbbXhg== +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + cz-conventional-changelog@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-1.1.5.tgz#0a4d1550c4e2fb6a3aed8f6cd858c21760e119b8" @@ -2365,6 +2579,15 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2378,6 +2601,19 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +elliptic@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca" + integrity sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg== + 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" + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -2656,6 +2892,14 @@ eventemitter3@^3.0.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + exec-sh@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" @@ -2898,6 +3142,11 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -3269,11 +3518,36 @@ has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + hermesvm@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/hermesvm/-/hermesvm-0.1.0.tgz#4bfaf4ac682a2fd407b862ab641eb8deb232de83" integrity sha512-GbP6dKaVW/V2QpB+DZPxcmhBhJVFa9cHS/xRX7FD1MGfa6Z1aHHD83VDCwo3SgcqNj5yHlVbe9UgrK1PFGCXpw== +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" @@ -3389,7 +3663,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3501,6 +3775,11 @@ invert-kv@^2.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== +ip-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.1.0.tgz#5ad62f685a14edb421abebc2fff8db94df67b455" + integrity sha512-pKnZpbgCTfH/1NLIlOduP/V+WRXzC2MOz3Qo8xmxk8C5GudJLgK5QyLVXOSWy3ParAH7Eemurl3xjv/WXYFvMA== + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -4144,6 +4423,11 @@ jetifier@^1.6.2, jetifier@^1.6.3: resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.3.tgz#61a95b29aefddfe3b6d81ee956f5e99f8b9cba19" integrity sha512-i0rb2nHVPZDPzFhgs9+yYxEDMh2z0iSHRD3vBQmvn98wlgWKwhmU2F3MUEEXfK+MLnKwLKqsCTvlcS1+CpDTUg== +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4544,6 +4828,15 @@ markdown-it@^8.4.0: mdurl "^1.0.1" uc.micro "^1.0.5" +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + mdurl@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" @@ -4915,6 +5208,16 @@ min-document@^2.19.0: dependencies: dom-walk "^0.1.0" +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -4984,7 +5287,7 @@ moment@2.19.3: resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" integrity sha1-vbmdJw1tf9p4zA+6zoVeJ/59pp8= -"moment@>= 2.9.0": +"moment@>= 2.9.0", moment@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== @@ -5030,7 +5333,7 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -nan@^2.12.1: +nan@^2.12.1, nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== @@ -5550,6 +5853,17 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +pbkdf2@^3.0.9: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + 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@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -5774,6 +6088,13 @@ ramda@0.25.0: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" integrity sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ== +randombytes@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -6334,6 +6655,14 @@ rimraf@~2.2.6: resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI= +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -6394,7 +6723,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -6452,6 +6781,20 @@ scheduler@^0.13.6: loose-envify "^1.1.0" object-assign "^4.1.1" +secp256k1@^3.7.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.7.1.tgz#12e473e0e9a7c2f2d4d4818e722ad0e14cc1e2f1" + integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== + dependencies: + 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.4.1" + nan "^2.14.0" + safe-buffer "^5.1.2" + semver-regex@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" @@ -6536,6 +6879,14 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -7070,6 +7421,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +tweetnacl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.1.tgz#2594d42da73cd036bd0d2a54683dd35a6b55ca17" + integrity sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A== + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -7161,6 +7517,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +unorm@^1.3.3: + version "1.6.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" + integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== + unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -7479,6 +7840,13 @@ xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xxhashjs@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" From 71391437b89d5f590b574ada1c500b19eb99268e Mon Sep 17 00:00:00 2001 From: Thibaut Date: Thu, 1 Aug 2019 13:59:40 +0200 Subject: [PATCH 016/101] fix(): add react-native-crypto with override and node-libs-react-native --- package.json | 8 ++ yarn.lock | 366 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 361 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index fd6b5bd5e8..8a00709ba7 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,12 @@ "bignumber.js": "^4.0.0", "hoist-non-react-statics": "^2.5.0", "lodash": "^4.17.15", + "node-libs-react-native": "^1.0.3", "prop-types": "^15.6.1", "react": "16.8.6", "react-native": "0.60.3", "react-native-camera": "^2.11.1", + "react-native-crypto": "^2.1.2", "react-native-gesture-handler": "^1.3.0", "react-native-keyboard-aware-scroll-view": "^0.8.0", "react-native-markdown-renderer": "^3.2.8", @@ -72,6 +74,12 @@ "/jest-setup.js" ] }, + "react-native": { + "crypto": "react-native-crypto" + }, + "browser": { + "crypto": "react-native-crypto" + }, "release": { "analyzeCommits": "simple-commit-message" }, diff --git a/yarn.lock b/yarn.lock index a6cd266fff..1578376ed0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1480,6 +1480,15 @@ asap@^2.0.0, asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" @@ -1492,6 +1501,14 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= +assert@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -1664,7 +1681,7 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base64-js@^1.1.2, base64-js@^1.2.3: +base64-js@^1.0.2, base64-js@^1.1.2, base64-js@^1.2.3: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== @@ -1756,7 +1773,7 @@ bluebird@^3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== -bn.js@^4.11.8, bn.js@^4.4.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== @@ -1816,7 +1833,7 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browserify-aes@^1.0.6: +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== @@ -1828,6 +1845,53 @@ browserify-aes@^1.0.6: inherits "^2.0.1" safe-buffer "^5.0.1" +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -1857,6 +1921,28 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= +buffer@^4.9.1: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +buffer@^5.0.6: + version "5.2.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" + integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -2239,11 +2325,23 @@ connect@^3.6.5: parseurl "~1.3.3" utils-merge "1.0.1" +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= + dependencies: + date-now "^0.1.4" + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + conventional-commit-message@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/conventional-commit-message/-/conventional-commit-message-1.1.0.tgz#ece8c661a168e983692e1d5a14875acb59510f6a" @@ -2301,6 +2399,14 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -2312,7 +2418,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.4: +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -2419,6 +2525,11 @@ data-urls@^1.0.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= + debounce@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" @@ -2533,6 +2644,14 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" @@ -2553,6 +2672,15 @@ diff-sequences@^24.3.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.3.0.tgz#0f20e8a1df1abddaf4d9c226680952e64118b975" integrity sha512-xLqpez+Zj9GKSnPWS0WZw1igGocZ+uua8+y+5dDNTT934N3QuY1sp2LkHzwiaYQGz60hMq0pjAshdeXm5VUOEw== +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -2572,6 +2700,11 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -2601,7 +2734,7 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -elliptic@^6.4.1: +elliptic@^6.0.0, elliptic@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca" integrity sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg== @@ -2892,7 +3025,12 @@ eventemitter3@^3.0.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== -evp_bytestokey@^1.0.3: +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== @@ -3597,6 +3735,11 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3604,6 +3747,11 @@ iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, ic dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" @@ -3668,6 +3816,16 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" @@ -3976,7 +4134,7 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -5157,6 +5315,14 @@ micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": version "1.40.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" @@ -5402,6 +5568,34 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= +node-libs-react-native@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/node-libs-react-native/-/node-libs-react-native-1.0.3.tgz#442b89ae93ca308f6464ff2f79686848bca85988" + integrity sha512-2X/M/DMB4hij2L0tsnJOiDhYR2N0YtetIhb/eN5+5vksLxjXwaFgLbSXWT3XExnGJpISDn8dYuYz6yvdndjjkg== + dependencies: + 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" + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -5655,6 +5849,11 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -5765,6 +5964,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pako@~1.0.5: + version "1.0.10" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" + integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -5772,6 +5976,18 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-asn1@^5.0.0: + version "5.1.4" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" + integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -5807,6 +6023,11 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + integrity sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo= + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -5853,7 +6074,14 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" -pbkdf2@^3.0.9: +pbkdf2@3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.8.tgz#2f8abf16ebecc82277945d748aba1d78761f61e2" + integrity sha1-L4q/FuvsyCJ3lF10irodeHYfYeI= + dependencies: + create-hmac "^1.1.2" + +pbkdf2@^3.0.3, pbkdf2@^3.0.9: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== @@ -5993,7 +6221,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: +process@^0.11.0, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= @@ -6037,6 +6265,18 @@ psl@^1.1.24, psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.2.0.tgz#df12b5b1b3a30f51c329eacbdef98f3a6e136dc6" integrity sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA== +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -6045,6 +6285,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -6078,6 +6323,16 @@ query-string@^6.4.2: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + quote@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/quote/-/quote-0.4.0.tgz#10839217f6c1362b89194044d29b233fd7f32f01" @@ -6088,7 +6343,7 @@ ramda@0.25.0: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" integrity sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ== -randombytes@^2.0.1: +randombytes@^2.0.0, randombytes@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -6140,6 +6395,21 @@ react-native-camera@^2.11.1: dependencies: prop-types "^15.6.2" +react-native-crypto@^2.0.1, react-native-crypto@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/react-native-crypto/-/react-native-crypto-2.1.2.tgz#cfe68cad51cd1f73a4202b7ac164f96c1144cb2a" + integrity sha1-z+aMrVHNH3OkICt6wWT5bBFEyyo= + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.4" + 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.8" + public-encrypt "^4.0.0" + react-native-fit-image@^1.5.2: version "1.5.4" resolved "https://registry.yarnpkg.com/react-native-fit-image/-/react-native-fit-image-1.5.4.tgz#73d2fccc7ad902cf2ffcd008a2a74749ad50134a" @@ -6185,6 +6455,14 @@ react-native-popup-menu@^0.15.6: resolved "https://registry.yarnpkg.com/react-native-popup-menu/-/react-native-popup-menu-0.15.6.tgz#ebf885c289028e330dd66d887e685a8b0c2de970" integrity sha512-ILFbQEofZQThVYAtVcOEgHJ+9wvn8992J+Oy/ByX83PoP88Meq3iw3pG1AwxMOoAPm/LjihtsDBqZ1lxjvosDg== +react-native-randombytes@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/react-native-randombytes/-/react-native-randombytes-3.5.3.tgz#b3bdcd11473cce106551a586244b98855e443cd1" + integrity sha512-n/7QwMrRJxHr+/3mt2KxqqacGylM+ssW+FfBTgXGzvwq5KzSohooEWf6Z6MTSByuJ/izP9VbSPtwomPwzvupKQ== + dependencies: + buffer "^4.9.1" + sjcl "^1.0.3" + react-native-safe-area-view@^0.14.1: version "0.14.6" resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.6.tgz#9a9d37d9f8f3887d60c4076eae7b5d2319539446" @@ -6392,7 +6670,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@~2.3.6: +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -6869,7 +7147,7 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.5: +setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= @@ -6959,6 +7237,11 @@ sisteransi@^1.0.0: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.2.tgz#ec57d64b6f25c4f26c0e2c7dd23f2d7f12f7e418" integrity sha512-ZcYcZcT69nSLAR2oLN2JwNmLkJEKGooFMCdvOkFrToUt/WfcRWqhIg4P4KwY4dmLbuyXIx4o4YmPsvMRJYJd/w== +sjcl@^1.0.3: + version "1.0.8" + resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a" + integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ== + slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" @@ -7135,6 +7418,17 @@ stream-buffers@~2.2.0: resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" integrity sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ= +stream-http@^2.3.1: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" @@ -7174,6 +7468,13 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string_decoder@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + dependencies: + safe-buffer "~5.1.0" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -7322,6 +7623,13 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= +timers-browserify@^2.0.2: + version "2.0.10" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" + integrity sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg== + dependencies: + setimmediate "^1.0.4" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7334,6 +7642,11 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -7409,6 +7722,11 @@ tsutils@^3.7.0: dependencies: tslib "^1.8.1" +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -7559,6 +7877,14 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -7577,6 +7903,20 @@ util.promisify@^1.0.0: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -7835,7 +8175,7 @@ xpipe@^1.0.5: resolved "https://registry.yarnpkg.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf" integrity sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98= -xtend@~4.0.1: +xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From 8d2366e4cca90dd2658b516b3e884dbfbb807ea2 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Thu, 1 Aug 2019 14:12:14 +0200 Subject: [PATCH 017/101] fix(): add import 'crypto' in Apps.js --- src/App.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.js b/src/App.js index 52e26eef5a..491d6c7e2c 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,8 @@ // along with Parity. If not, see . 'use strict'; + +import 'crypto'; import React, { Component } from 'react'; import { StatusBar } from 'react-native'; import { From 4b73fcc598c459db8b80f9d9452f8aeb2d4f0c2c Mon Sep 17 00:00:00 2001 From: Thibaut Date: Thu, 1 Aug 2019 14:23:47 +0200 Subject: [PATCH 018/101] fix(): add stream-browserify and overrides --- package.json | 7 +++++-- yarn.lock | 10 +++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8a00709ba7..e074530a50 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "react-native-tabs": "^1.0.9", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.1", + "stream-browserify": "^2.0.2", "unstated": "^2.1.1", "yarn": "^1.17.3" }, @@ -75,10 +76,12 @@ ] }, "react-native": { - "crypto": "react-native-crypto" + "crypto": "react-native-crypto", + "stream": "stream-browserify" }, "browser": { - "crypto": "react-native-crypto" + "crypto": "react-native-crypto", + "stream": "stream-browserify" }, "release": { "analyzeCommits": "simple-commit-message" diff --git a/yarn.lock b/yarn.lock index 1578376ed0..1b5a0fdbd1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3811,7 +3811,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -7413,6 +7413,14 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +stream-browserify@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + stream-buffers@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" From 0c331d3e711d312044a8cee0963dcefb03852502 Mon Sep 17 00:00:00 2001 From: Maciej Hirsz Date: Thu, 1 Aug 2019 17:59:17 +0200 Subject: [PATCH 019/101] feat: Expose `substrateAddress` in native.js --- .../java/io/parity/signer/EthkeyBridge.java | 10 +++ ios/NativeSigner/EthkeyBridge.swift | 11 ++++ rust/signer/Cargo.lock | 63 ++++++++++--------- rust/signer/Cargo.toml | 4 +- rust/signer/signer.h | 3 + rust/signer/src/lib.rs | 20 +++++- rust/signer/src/strate.rs | 28 +++++++-- rust/signer/src/util.rs | 20 ++++++ src/util/native.js | 4 ++ 9 files changed, 127 insertions(+), 36 deletions(-) diff --git a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java index d164990f8b..bc876be6ef 100644 --- a/android/app/src/main/java/io/parity/signer/EthkeyBridge.java +++ b/android/app/src/main/java/io/parity/signer/EthkeyBridge.java @@ -125,6 +125,15 @@ public void qrCodeHex(String data, Promise promise) { } } + @ReactMethod + public void substrateAddress(String seed, int prefix, Promise promise) { + try { + promise.resolve(substrateBrainwalletAddress(seed, prefix)); + } catch (Exception e) { + promise.reject("invalid phrase", "invalid phrase"); + } + } + private static native String ethkeyBrainwalletAddress(String seed); private static native String ethkeyBrainwalletBIP39Address(String seed); private static native String ethkeyBrainwalletSign(String seed, String message); @@ -138,4 +147,5 @@ public void qrCodeHex(String data, Promise promise) { private static native String ethkeyDecryptData(String data, String password); private static native String ethkeyQrCode(String data); private static native String ethkeyQrCodeHex(String data); + private static native String substrateBrainwalletAddress(String seed, int prefix); } diff --git a/ios/NativeSigner/EthkeyBridge.swift b/ios/NativeSigner/EthkeyBridge.swift index b9e414e36b..486d0ef9b7 100644 --- a/ios/NativeSigner/EthkeyBridge.swift +++ b/ios/NativeSigner/EthkeyBridge.swift @@ -169,4 +169,15 @@ class EthkeyBridge: NSObject { reject("Failed to generate blockies", nil, nil) } } + + @objc func substrateAddress(_ seed: String, version: UInt32, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { + var error: UInt32 = 0 + var seed_ptr = seed.asPtr() + let address_rust_str = substrate_brainwallet_address(&error, &seed_ptr, version) + let address_rust_str_ptr = rust_string_ptr(address_rust_str) + let address = String.fromStringPtr(ptr: address_rust_str_ptr!.pointee) + rust_string_ptr_destroy(address_rust_str_ptr) + rust_string_destroy(address_rust_str) + resolve(address) + } } diff --git a/rust/signer/Cargo.lock b/rust/signer/Cargo.lock index 8d456542f9..1af39c20e3 100644 --- a/rust/signer/Cargo.lock +++ b/rust/signer/Cargo.lock @@ -413,7 +413,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -506,7 +506,7 @@ dependencies = [ [[package]] name = "hmac" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -620,13 +620,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "merlin" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -951,19 +951,17 @@ dependencies = [ [[package]] name = "schnorrkel" -version = "0.1.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "curve25519-dalek 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -979,7 +977,7 @@ dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1050,22 +1048,11 @@ dependencies = [ "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "sha3" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "signer" version = "0.1.0" dependencies = [ + "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "blockies 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1076,9 +1063,10 @@ dependencies = [ "qrcodegen 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-hderive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1097,6 +1085,17 @@ dependencies = [ "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "substrate-bip39" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "subtle" version = "1.0.0" @@ -1135,7 +1134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1148,7 +1147,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1237,6 +1236,11 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "zeroize" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" @@ -1299,7 +1303,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" -"checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" +"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" "checksum hsl 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "575fb7f1167f3b88ed825e90eb14918ac460461fdeaa3965c6a50951dee1c970" "checksum inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" @@ -1315,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memzero 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "93c0d11ac30a033511ae414355d80f70d9f29a44a49140face477117a1ee90db" -"checksum merlin 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8c39467de91b004f5b9c06fac5bbc8e7d28309a205ee66905166b70804a71fea" +"checksum merlin 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66448a173ad394ef5ebf734efa724f3644dcffda083b1e89979da4461ddac079" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" "checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" @@ -1353,7 +1357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" -"checksum schnorrkel 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5eff518f9bed3d803a0d002af0ab96339b0ebbedde3bec98a684986134b7a39" +"checksum schnorrkel 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "547d3603273bf9e4086966bbf431a2335bafcc6c6ddff9755889c08b38c1c951" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scrypt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "656c79d0e90d0ab28ac86bf3c3d10bfbbac91450d3f190113b4e76d9fec3cfdd" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" @@ -1363,9 +1367,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" -"checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" +"checksum substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01dca13cf6c3b179864ab3292bd794e757618d35a7766b7c46050c614ba00829" "checksum syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d960b829a55e56db167e861ddb43602c003c7be0bee1d345021703fac2fb7c" @@ -1384,3 +1388,4 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" diff --git a/rust/signer/Cargo.toml b/rust/signer/Cargo.toml index 0815832b9a..e541d5417f 100644 --- a/rust/signer/Cargo.toml +++ b/rust/signer/Cargo.toml @@ -5,6 +5,7 @@ authors = ["debris "] edition = "2018" [dependencies] +base58 = "0.1.0" base64 = "0.10.1" blake2-rfc = "0.2.18" blockies = "0.3" @@ -13,9 +14,10 @@ jni = { version = "0.10.2", default-features = false, optional = true } libc = "0.2" rlp = { version = "0.3.0", features = ["ethereum"] } rustc-hex = "2.0.1" -schnorrkel = "0.1.0" +schnorrkel = "0.8" serde = "1.0" serde_json = "1.0" +substrate-bip39 = "0.3.1" tiny-bip39 = { version = "0.6.1", default-features = false } tiny-hderive = "0.1" tiny-keccak = "1.4" diff --git a/rust/signer/signer.h b/rust/signer/signer.h index 644ba3f1b5..33d926db51 100644 --- a/rust/signer/signer.h +++ b/rust/signer/signer.h @@ -71,3 +71,6 @@ struct rust_string* qrcode(unsigned* error, const struct rust_string_ptr* data); // qr code generator for hex-encoded binary struct rust_string* qrcode_hex(unsigned* error, const struct rust_string_ptr* data); + +// return keypair address, automatically picking BIP39 or parity phrases +struct rust_string* substrate_brainwallet_address(unsigned* error, const struct rust_string_ptr* seed, const unsigned prefix); diff --git a/rust/signer/src/lib.rs b/rust/signer/src/lib.rs index d3ac8ce270..b6cdeead61 100644 --- a/rust/signer/src/lib.rs +++ b/rust/signer/src/lib.rs @@ -211,11 +211,18 @@ export! { fn qrcode_hex(data: &str) -> Option { qrcode_bytes(&data.from_hex::>().ok()?) } + + @Java_io_parity_signer_EthkeyBridge_substrateBrainwalletAddress + fn substrate_brainwallet_address(seed: &str, prefix: u8) -> Option { + let keypair = strate::KeyPair::from_bip39_phrase(seed)?; + + Some(keypair.ss58_address(prefix)) + } } #[cfg(test)] mod tests { - use super::rlp_item; + use super::*; #[test] fn test_rlp_item() { @@ -227,4 +234,15 @@ mod tests { assert_eq!(rlp_item(rlp, 4), Some("0a".into())); assert_eq!(rlp_item(rlp, 5), Some("".into())); } + + #[test] + fn test_substrate_brainwallet_address() { + let phrase = "grant jaguar wish bench exact find voice habit tank pony state salmon"; + // Secret seed: 0xb139e4050f80172b44957ef9d1755ef5c96c296d63b8a2b50025bf477bd95224 + // Public key (hex): 0x944eeb240615f4a94f673f240a256584ba178e22dd7b67503a753968e2f95761 + let expected = "5FRAPSnpgmnXAnmPVv68fT6o7ntTvaZmkTED8jDttnXs9k4n"; + let generated = substrate_brainwallet_address(phrase, 42).unwrap(); + + assert_eq!(expected, generated); + } } diff --git a/rust/signer/src/strate.rs b/rust/signer/src/strate.rs index e644f81d89..05f607b51d 100644 --- a/rust/signer/src/strate.rs +++ b/rust/signer/src/strate.rs @@ -1,14 +1,32 @@ -use schnorrkel::MiniSecretKey; -use bip39::{Mnemonic, Seed, Language}; +use schnorrkel::keys::ExpansionMode; +use substrate_bip39::mini_secret_from_entropy; +use bip39::{Mnemonic, Language}; +use base58::ToBase58; pub struct KeyPair(schnorrkel::Keypair); impl KeyPair { pub fn from_bip39_phrase(phrase: &str) -> Option { let mnemonic = Mnemonic::from_phrase(phrase, Language::English).ok()?; - let seed = Seed::new(&mnemonic, ""); - let mini_secret_key = MiniSecretKey::from_bytes(&seed.as_bytes()[..32]).ok()?; + let mini_secret_key = mini_secret_from_entropy(mnemonic.entropy(), "").ok()?; - Some(KeyPair(mini_secret_key.expand_to_keypair())) + Some(KeyPair(mini_secret_key.expand_to_keypair(ExpansionMode::Ed25519))) } + + pub fn ss58_address(&self, prefix: u8) -> String { + let mut v = vec![prefix]; + v.extend_from_slice(&self.0.public.to_bytes()); + let r = ss58hash(&v); + v.extend_from_slice(&r.as_bytes()[0..2]); + v.to_base58() + } +} + +const PREFIX: &[u8] = b"SS58PRE"; + +fn ss58hash(data: &[u8]) -> blake2_rfc::blake2b::Blake2bResult { + let mut context = blake2_rfc::blake2b::Blake2b::new(64); + context.update(PREFIX); + context.update(data); + context.finalize() } diff --git a/rust/signer/src/util.rs b/rust/signer/src/util.rs index 9264f6cd7b..e6d43d981e 100644 --- a/rust/signer/src/util.rs +++ b/rust/signer/src/util.rs @@ -82,6 +82,16 @@ impl Argument<'static> for u32 { } } +#[cfg(not(feature = "jni"))] +impl Argument<'static> for u8 { + type Ext = u32; + type Env = Cell; + + fn convert(_: &Self::Env, val: Self::Ext) -> Self { + val as u8 + } +} + #[cfg(not(feature = "jni"))] impl<'a> Argument<'static> for &'a str { type Ext = *const StringPtr; @@ -143,6 +153,16 @@ impl<'jni> Argument<'jni> for u32 { } } +#[cfg(feature = "jni")] +impl<'jni> Argument<'jni> for u8 { + type Ext = jint; + type Env = JNIEnv<'jni>; + + fn convert(_: &Self::Env, val: Self::Ext) -> Self { + val as u8 + } +} + #[cfg(feature = "jni")] impl<'a, 'jni> Argument<'jni> for &'a str { type Ext = JString<'jni>; diff --git a/src/util/native.js b/src/util/native.js index 675f04ac48..e9db90f3b8 100644 --- a/src/util/native.js +++ b/src/util/native.js @@ -117,3 +117,7 @@ export function qrCode (data) { export function qrCodeHex (data) { return EthkeyBridge.qrCodeHex(data) } + +export function substrateAddress (seed, prefix) { + return EthkeyBridge.substrateAddress(seed, prefix); +} From 0414f3d3dd5b9c95341b94b44d80a426625a801e Mon Sep 17 00:00:00 2001 From: Thibaut Date: Fri, 2 Aug 2019 00:24:37 +0200 Subject: [PATCH 020/101] fix(): ideenticon visible --- android/app/build.gradle | 2 + .../io/parity/signer/MainApplication.java | 4 + android/settings.gradle | 4 + ios/NativeSigner.xcodeproj/project.pbxproj | 19 +- package.json | 71 +++- shim.js | 26 ++ src/App.js | 1 + src/screens/AccountList.js | 59 +-- src/screens/Polkadot.tsx | 4 +- yarn.lock | 374 +++++++++++++++++- 10 files changed, 517 insertions(+), 47 deletions(-) create mode 100644 shim.js diff --git a/android/app/build.gradle b/android/app/build.gradle index cfe6dd5cb2..7fdc9dca13 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -163,6 +163,8 @@ android { } dependencies { + implementation project(':react-native-svg') + implementation project(':react-native-randombytes') implementation project(':@react-native-community_netinfo') implementation project(':react-native-camera') implementation project(':react-native-secure-storage') diff --git a/android/app/src/main/java/io/parity/signer/MainApplication.java b/android/app/src/main/java/io/parity/signer/MainApplication.java index 92d640d324..2555ed7b46 100644 --- a/android/app/src/main/java/io/parity/signer/MainApplication.java +++ b/android/app/src/main/java/io/parity/signer/MainApplication.java @@ -3,6 +3,8 @@ import android.app.Application; import com.facebook.react.ReactApplication; +import com.horcrux.svg.SvgPackage; +import com.bitgo.randombytes.RandomBytesPackage; import com.reactnativecommunity.netinfo.NetInfoPackage; import org.reactnative.camera.RNCameraPackage; import com.reactlibrary.RNSecureStoragePackage; @@ -28,6 +30,8 @@ public boolean getUseDeveloperSupport() { protected List getPackages() { return Arrays.asList( new MainReactPackage(), + new SvgPackage(), + new RandomBytesPackage(), new NetInfoPackage(), new RNCameraPackage(), new RNSecureStoragePackage(), diff --git a/android/settings.gradle b/android/settings.gradle index 54aac200ff..c6515cea84 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,8 @@ rootProject.name = 'Parity Signer' +include ':react-native-svg' +project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') +include ':react-native-randombytes' +project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android') include ':@react-native-community_netinfo' project(':@react-native-community_netinfo').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/netinfo/android') include ':react-native-camera' diff --git a/ios/NativeSigner.xcodeproj/project.pbxproj b/ios/NativeSigner.xcodeproj/project.pbxproj index a36f2867a6..516116e43e 100644 --- a/ios/NativeSigner.xcodeproj/project.pbxproj +++ b/ios/NativeSigner.xcodeproj/project.pbxproj @@ -5,7 +5,6 @@ }; objectVersion = 46; objects = { - /* Begin PBXBuildFile section */ 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; @@ -65,6 +64,8 @@ EDCE1EC0CA1249279F03F2E2 /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E3DA81F74A0847378E71E280 /* Roboto-Medium.ttf */; }; EE896FB251B94030AC713B6F /* Roboto-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8C99AB759A004CEB88AC4455 /* Roboto-LightItalic.ttf */; }; F1569210427145DEBBB5B898 /* Manifold-CF-Extra-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = F198D2DE15BC4461B2308E3C /* Manifold-CF-Extra-Bold.otf */; }; + 9CE53E9B76FD4CE88D0778EC /* libRNRandomBytes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 170C0768897F45A7A496F2BE /* libRNRandomBytes.a */; }; + D6EED2987CEF454F865C09E0 /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D44E3C511D404074AF5AFDB9 /* libRNSVG.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -435,6 +436,10 @@ F2FB2DDD90964B3BB1FC813C /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = ""; }; F78A5174AF744169974591A9 /* libRNCNetInfo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNCNetInfo.a; sourceTree = ""; }; FAE70C1AAEEA45159C8CB0EA /* Roboto-ThinItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-ThinItalic.ttf"; path = "../res/fonts/Roboto-ThinItalic.ttf"; sourceTree = ""; }; + 520CF0A85F434C3DA3D3EFF4 /* RNRandomBytes.xcodeproj */ = {isa = PBXFileReference; name = "RNRandomBytes.xcodeproj"; path = "../node_modules/react-native-randombytes/RNRandomBytes.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; }; + 170C0768897F45A7A496F2BE /* libRNRandomBytes.a */ = {isa = PBXFileReference; name = "libRNRandomBytes.a"; path = "libRNRandomBytes.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; }; + C0205550495341279B513024 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; name = "RNSVG.xcodeproj"; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; }; + D44E3C511D404074AF5AFDB9 /* libRNSVG.a */ = {isa = PBXFileReference; name = "libRNSVG.a"; path = "libRNSVG.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -466,6 +471,8 @@ BB1BF6E8C2204EDEA0DEFB71 /* libRNSecureStorage.a in Frameworks */, BC281020BE04470E86371E16 /* libRNCNetInfo.a in Frameworks */, A174652260CA4A7785BEC78B /* libRNCamera.a in Frameworks */, + 9CE53E9B76FD4CE88D0778EC /* libRNRandomBytes.a in Frameworks */, + D6EED2987CEF454F865C09E0 /* libRNSVG.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -723,6 +730,8 @@ 8CC63279C525400CA35EAF96 /* RNSecureStorage.xcodeproj */, 28E4C30CA68041C98EE1012E /* RNCNetInfo.xcodeproj */, 8A220E0ECC914D32B35EF7FC /* RNCamera.xcodeproj */, + 520CF0A85F434C3DA3D3EFF4 /* RNRandomBytes.xcodeproj */, + C0205550495341279B513024 /* RNSVG.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -1324,6 +1333,8 @@ "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1348,6 +1359,8 @@ "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); "OTHER_LDFLAGS[arch=*]" = " -lc++"; PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1373,6 +1386,8 @@ "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", "$(SRCROOT)/../node_modules/@react-native-community/netinfo/ios", "$(SRCROOT)/../node_modules/react-native-camera/ios/**", + "$(SRCROOT)/../node_modules/react-native-randombytes", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = NativeSigner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -1409,6 +1424,8 @@ "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", "$(SRCROOT)/../node_modules/@react-native-community/netinfo/ios", "$(SRCROOT)/../node_modules/react-native-camera/ios/**", + "$(SRCROOT)/../node_modules/react-native-randombytes", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = NativeSigner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; diff --git a/package.json b/package.json index e074530a50..fc5add3874 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "ios": "yarn run build-rust-ios && react-native run-ios", "android": "yarn run build-rust-android && react-native run-android", "start": "yarn run ios", - "postinstall": "jetify", + "postinstall": "npx jetify && npx rn-nodeify --install --hack", "test": "jest", "lint": "eslint", "commit": "commit-wizard" @@ -22,27 +22,43 @@ "@polkadot/ui-shared": "^0.42.0-beta.24", "@polkadot/util-crypto": "^0.94.1", "@react-native-community/netinfo": "^4.1.1", + "@tradle/react-native-http": "^2.0.1", "bignumber.js": "^4.0.0", + "browserify-zlib": "^0.1.4", + "buffer": "^4.9.1", + "dns.js": "^1.0.1", "hoist-non-react-statics": "^2.5.0", + "https-browserify": "0.0.1", "lodash": "^4.17.15", "node-libs-react-native": "^1.0.3", "prop-types": "^15.6.1", + "punycode": "^1.4.1", "react": "16.8.6", "react-native": "0.60.3", "react-native-camera": "^2.11.1", "react-native-crypto": "^2.1.2", "react-native-gesture-handler": "^1.3.0", "react-native-keyboard-aware-scroll-view": "^0.8.0", + "react-native-level-fs": "^3.0.1", "react-native-markdown-renderer": "^3.2.8", + "react-native-os": "^1.2.4", "react-native-popup-menu": "^0.15.6", + "react-native-randombytes": "^3.5.3", "react-native-secure-storage": "git+https://github.com/debris/react-native-secure-storage.git", "react-native-simple-picker": "^2.1.0", "react-native-svg": "^9.5.3", "react-native-tabs": "^1.0.9", + "react-native-tcp": "^3.3.1", + "react-native-udp": "^2.6.1", "react-native-vector-icons": "^6.6.0", "react-navigation": "^3.11.1", + "readable-stream": "^1.0.33", "stream-browserify": "^2.0.2", + "string_decoder": "^0.10.31", + "timers-browserify": "^1.4.2", "unstated": "^2.1.1", + "url": "^0.10.3", + "vm-browserify": "0.0.4", "yarn": "^1.17.3" }, "devDependencies": { @@ -62,7 +78,8 @@ "pre-git": "^3.14.0", "prettier": "1.12.1", "react-test-renderer": "16.8.6", - "reactotron-react-native": "^2.1.5" + "reactotron-react-native": "^2.1.5", + "rn-nodeify": "tradle/rn-nodeify" }, "rnpm": { "assets": [ @@ -77,11 +94,55 @@ }, "react-native": { "crypto": "react-native-crypto", - "stream": "stream-browserify" + "stream": "stream-browserify", + "zlib": "browserify-zlib", + "console": "console-browserify", + "constants": "constants-browserify", + "dns": "dns.js", + "net": "react-native-tcp", + "domain": "domain-browser", + "http": "@tradle/react-native-http", + "https": "https-browserify", + "os": "react-native-os", + "path": "path-browserify", + "querystring": "querystring-es3", + "fs": "react-native-level-fs", + "_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", + "timers": "timers-browserify", + "tty": "tty-browserify", + "vm": "vm-browserify", + "tls": false }, "browser": { "crypto": "react-native-crypto", - "stream": "stream-browserify" + "stream": "stream-browserify", + "zlib": "browserify-zlib", + "console": "console-browserify", + "constants": "constants-browserify", + "dns": "dns.js", + "net": "react-native-tcp", + "domain": "domain-browser", + "http": "@tradle/react-native-http", + "https": "https-browserify", + "os": "react-native-os", + "path": "path-browserify", + "querystring": "querystring-es3", + "fs": "react-native-level-fs", + "_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", + "timers": "timers-browserify", + "tty": "tty-browserify", + "vm": "vm-browserify", + "tls": false }, "release": { "analyzeCommits": "simple-commit-message" @@ -96,4 +157,4 @@ "post-merge": [] } } -} +} \ No newline at end of file diff --git a/shim.js b/shim.js new file mode 100644 index 0000000000..812d6b45cd --- /dev/null +++ b/shim.js @@ -0,0 +1,26 @@ +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 ? '*' : '' +} + +// If using the crypto shim, uncomment the following line to ensure +// crypto is loaded first, so it can populate global.crypto +// require('crypto') diff --git a/src/App.js b/src/App.js index 491d6c7e2c..95a7208d28 100644 --- a/src/App.js +++ b/src/App.js @@ -18,6 +18,7 @@ 'use strict'; +import '../shim'; import 'crypto'; import React, { Component } from 'react'; import { StatusBar } from 'react-native'; diff --git a/src/screens/AccountList.js b/src/screens/AccountList.js index acf2b351f6..34b22d2d27 100644 --- a/src/screens/AccountList.js +++ b/src/screens/AccountList.js @@ -21,7 +21,6 @@ import React from 'react'; import { FlatList, StyleSheet, Text, View } from 'react-native'; import { Subscribe } from 'unstated'; - import colors from '../colors'; import AccountCard from '../components/AccountCard'; import Background from '../components/Background'; @@ -29,11 +28,11 @@ import Button from '../components/Button'; import AccountsStore from '../stores/AccountsStore'; import { accountId } from '../util/account'; import PopupMenu from '../components/PopupMenu'; -import { Identicon } from './Polkadot'; +import Identicon from './Polkadot'; export default class AccountList extends React.PureComponent { static navigationOptions = { - title: 'Accounts' + title: 'Accounts', }; render() { @@ -60,10 +59,10 @@ class AccountListView extends React.PureComponent { static propTypes = { accounts: PropTypes.arrayOf( PropTypes.shape({ - address: PropTypes.string.isRequired + address: PropTypes.string.isRequired, }) ).isRequired, - onAccountSelected: PropTypes.func.isRequired + onAccountSelected: PropTypes.func.isRequired, }; constructor(props) { @@ -94,22 +93,21 @@ class AccountListView extends React.PureComponent { showOnboardingMessage = () => { const { navigate } = this.props.navigation; const createLink = (text, navigation) => ( - navigate(navigation)} - > + navigate(navigation)}> {text} ); return ( - + - No account yet?{"\n"}{createLink('Create','AccountNew')} or {createLink('recover','AccountRecover')} an account to get started. + No account yet?{'\n'} + {createLink('Create', 'AccountNew')} or{' '} + {createLink('recover', 'AccountRecover')} an account to get started. - ) - } + ); + }; render() { const hasNoAccount = this.props.accounts.length < 1; @@ -123,20 +121,23 @@ class AccountListView extends React.PureComponent { navigate(value)} - menuTriggerIconName={"add"} + menuTriggerIconName={'add'} menuItems={[ { value: 'AccountNew', text: 'New Account' }, { value: 'AccountRecover', text: 'Recover Account' }, - { value: 'About', text: 'About' }]} + { value: 'About', text: 'About' }, + ]} /> - { hasNoAccount && this.showOnboardingMessage()} + {hasNoAccount && this.showOnboardingMessage()} Give ma a Polkadot identicon { @@ -161,7 +162,7 @@ class AccountListView extends React.PureComponent { }} enableEmptySections /> - { ! hasNoAccount && + {!hasNoAccount && (