-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Timo Glastra <[email protected]> Co-authored-by: Jan <[email protected]>
- Loading branch information
1 parent
8361d94
commit e1097f9
Showing
73 changed files
with
6,945 additions
and
9,715 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
.yarn/patches/@sphereon-did-auth-siop-npm-0.3.2-unstable.0-6a34120d09.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,57 @@ | ||
{ | ||
"name": "expo-app", | ||
"version": "1.1.6", | ||
"main": "index.js", | ||
"version": "1.2.0", | ||
"main": "expo-router/entry", | ||
"private": true, | ||
"scripts": { | ||
"start": "TAMAGUI_TARGET=native APP_VARIANT=development expo start -c --dev-client", | ||
"android": "TAMAGUI_TARGET=native APP_VARIANT=development yarn expo run:android", | ||
"ios": "TAMAGUI_TARGET=native APP_VARIANT=development yarn expo run:ios", | ||
"prebuild": "TAMAGUI_TARGET=native APP_VARIANT=development expo prebuild --no-install" | ||
"start": "APP_VARIANT=development expo start -c --dev-client", | ||
"android": "APP_VARIANT=development yarn expo run:android", | ||
"ios": "APP_VARIANT=development yarn expo run:ios", | ||
"prebuild": "APP_VARIANT=development expo prebuild --no-install" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.18.9", | ||
"@hyperledger/anoncreds-react-native": "^0.1.0", | ||
"@hyperledger/aries-askar-react-native": "0.1.0", | ||
"@hyperledger/indy-vdr-react-native": "^0.1.0", | ||
"@hyperledger/anoncreds-react-native": "^0.2.1", | ||
"@hyperledger/aries-askar-react-native": "^0.2.0", | ||
"@hyperledger/indy-vdr-react-native": "^0.2.0", | ||
"@internal/agent": "*", | ||
"@internal/ui": "*", | ||
"@react-native-community/blur": "^4.3.2", | ||
"@react-native-community/netinfo": "^9.3.10", | ||
"@react-native-masked-view/masked-view": "^0.2.9", | ||
"@react-native-community/netinfo": "11.1.0", | ||
"@react-native-masked-view/masked-view": "0.3.0", | ||
"@react-navigation/native": "^6.1.6", | ||
"app": "*", | ||
"babel-plugin-module-resolver": "^4.1.0", | ||
"burnt": "^0.12.1", | ||
"expo": "^49.0.0", | ||
"expo-barcode-scanner": "~12.5.3", | ||
"expo-constants": "~14.4.2", | ||
"expo-dev-client": "~2.4.11", | ||
"expo-font": "~11.4.0", | ||
"expo-haptics": "~12.4.0", | ||
"expo-image": "~1.3.3", | ||
"expo-linear-gradient": "~12.3.0", | ||
"expo-linking": "~5.0.2", | ||
"expo-navigation-bar": "~2.3.0", | ||
"expo-router": "^2.0.0", | ||
"expo-secure-store": "~12.3.1", | ||
"expo-splash-screen": "~0.20.5", | ||
"expo-status-bar": "~1.6.0", | ||
"expo-system-ui": "~2.4.0", | ||
"expo-updates": "~0.18.13", | ||
"expo": "^50.0.0", | ||
"expo-barcode-scanner": "~12.9.3", | ||
"expo-constants": "~15.4.5", | ||
"expo-dev-client": "~3.3.10", | ||
"expo-font": "~11.10.3", | ||
"expo-haptics": "~12.8.1", | ||
"expo-image": "~1.10.6", | ||
"expo-linear-gradient": "~12.7.2", | ||
"expo-linking": "~6.2.2", | ||
"expo-navigation-bar": "~2.8.1", | ||
"expo-router": "~3.4.8", | ||
"expo-secure-store": "~12.8.1", | ||
"expo-splash-screen": "~0.26.4", | ||
"expo-status-bar": "~1.11.1", | ||
"expo-system-ui": "~2.9.3", | ||
"expo-updates": "~0.24.12", | ||
"react": "18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-native": "0.72.5", | ||
"react-native": "0.73.5", | ||
"react-native-fs": "^2.20.0", | ||
"react-native-gesture-handler": "~2.12.0", | ||
"react-native-get-random-values": "~1.9.0", | ||
"react-native-safe-area-context": "4.6.3", | ||
"react-native-screens": "~3.22.0", | ||
"react-native-svg": "13.9.0" | ||
"react-native-gesture-handler": "~2.14.0", | ||
"react-native-get-random-values": "~1.8.0", | ||
"react-native-safe-area-context": "4.8.2", | ||
"react-native-screens": "~3.29.0", | ||
"react-native-svg": "14.1.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.17.9", | ||
"@expo/metro-config": "~0.10.0", | ||
"@tamagui/babel-plugin": "latest", | ||
"babel-plugin-transform-inline-environment-variables": "^0.4.4", | ||
"metro-minify-terser": "^0.74.1", | ||
"@tamagui/babel-plugin": "1.91.4", | ||
"typescript": "^4.7.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
import { uuid } from '@aries-framework/core/build/utils/uuid' | ||
import { ariesAskar } from '@hyperledger/aries-askar-react-native' | ||
import * as SecureStore from 'expo-secure-store' | ||
|
||
const STORE_KEY = 'wallet-key' as const | ||
const STORE_KEY_LEGACY = 'wallet-key' as const | ||
const STORE_KEY_RAW = 'paradym-wallet-key-raw' as const | ||
|
||
const generateNewWalletKey = (): string => { | ||
return uuid() | ||
const generateNewWalletKey = (): { walletKey: string; keyDerivation: 'raw' } => { | ||
return { walletKey: ariesAskar.storeGenerateRawKey({}), keyDerivation: 'raw' } | ||
} | ||
|
||
export const getSecureWalletKey = async (): Promise<string> => { | ||
export const getSecureWalletKey = async (): Promise<{ | ||
walletKey: string | ||
keyDerivation: 'raw' | 'derive' | ||
}> => { | ||
const secureStoreAvailable = await SecureStore.isAvailableAsync() | ||
if (!secureStoreAvailable) throw new Error('SecureStore is not available on this device.') | ||
|
||
const walletKey = await SecureStore.getItemAsync(STORE_KEY) | ||
if (walletKey) return walletKey | ||
// New method: raw wallet key | ||
let walletKey = await SecureStore.getItemAsync(STORE_KEY_RAW) | ||
if (walletKey) return { walletKey, keyDerivation: 'raw' } | ||
|
||
// TODO: rotate the old wallet key to a new raw key | ||
// Old method: derived wallet key | ||
walletKey = await SecureStore.getItemAsync(STORE_KEY_LEGACY) | ||
if (walletKey) return { walletKey, keyDerivation: 'derive' } | ||
|
||
// No wallet key found, generate new method: raw wallet key | ||
const newWalletKey = generateNewWalletKey() | ||
await SecureStore.setItemAsync(STORE_KEY, newWalletKey) | ||
await SecureStore.setItemAsync(STORE_KEY_RAW, newWalletKey.keyDerivation) | ||
|
||
return newWalletKey | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,16 +31,14 @@ | |
"resolutions": { | ||
"@unimodules/react-native-adapter": "./noop", | ||
"@unimodules/core": "./noop", | ||
"ref-napi": "npm:@2060.io/[email protected]", | ||
"@cosmjs/amino": "npm:@cosmjs-rn/amino@^0.27.1", | ||
"@cosmjs/encoding": "npm:@cosmjs-rn/encoding@^0.27.1", | ||
"@cosmjs/math": "npm:@cosmjs-rn/math@^0.27.1", | ||
"@cosmjs/stargate": "npm:@cosmjs-rn/stargate@^0.27.1", | ||
"@cosmjs/tendermint-rpc": "npm:@cosmjs-rn/tendermint-rpc@^0.27.1", | ||
"@cosmjs/utils": "npm:@cosmjs-rn/utils@^0.27.1", | ||
"@cosmjs/proto-signing": "npm:@cosmjs-rn/proto-signing@^0.27.1", | ||
"@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1", | ||
"@sphereon/[email protected]": "patch:@sphereon/did-auth-siop@npm%3A0.3.2-unstable.0#./.yarn/patches/@sphereon-did-auth-siop-npm-0.3.2-unstable.0-6a34120d09.patch" | ||
"@cosmjs/crypto": "npm:@cosmjs-rn/crypto@^0.27.1" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.18.9", | ||
|
@@ -54,7 +52,6 @@ | |
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"expo-linking": "~5.0.2", | ||
"node-gyp": "^9.3.1", | ||
"prettier": "^2.7.1", | ||
"turbo": "^1.8.3", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.