@getpara/react-native-wallet 1.11.0 → 1.13.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import { ParaCore, Environment, decryptPrivateKeyAndDecryptShare, encryptPrivateKey, getAsymmetricKeyPair, getDerivedPrivateKeyAndDecrypt, getPublicKeyHex, getSHA256HashHex, parseCredentialCreationRes, } from '@getpara/web-sdk';
|
|
22
|
-
import * as Sentry from '@sentry/react-native';
|
|
23
22
|
import { ReactNativeUtils } from './ReactNativeUtils.js';
|
|
24
23
|
import { Passkey, } from 'react-native-passkey';
|
|
25
24
|
import { extractAuthInfo, PublicKeyStatus } from '@getpara/user-management-client';
|
|
@@ -45,14 +44,6 @@ export class ParaMobile extends ParaCore {
|
|
|
45
44
|
*/
|
|
46
45
|
constructor(env, apiKey, relyingPartyId, opts) {
|
|
47
46
|
super(env, apiKey, opts);
|
|
48
|
-
// starting with non-prod to see what kind of errors we get and if sensitive data is tracked
|
|
49
|
-
// will turn on in prod after monitoring
|
|
50
|
-
if (env !== Environment.PROD && env !== Environment.DEV) {
|
|
51
|
-
Sentry.init({
|
|
52
|
-
environment: env.toLowerCase(),
|
|
53
|
-
dsn: 'https://59cea0cfbbb30a646c4e9f2feea06da4@o4504568036720640.ingest.us.sentry.io/4508850922323968',
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
47
|
setEnv(env);
|
|
57
48
|
if (relyingPartyId) {
|
|
58
49
|
this.relyingPartyId = relyingPartyId;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { PlatformUtils, TPregenIdentifierType } from '@getpara/web-sdk';
|
|
2
2
|
import { Ctx } from '@getpara/web-sdk';
|
|
3
3
|
import { SignatureRes } from '@getpara/web-sdk';
|
|
4
|
-
import { BackupKitEmailProps, WalletType } from '@getpara/user-management-client';
|
|
4
|
+
import { BackupKitEmailProps, WalletType, SDKType } from '@getpara/user-management-client';
|
|
5
5
|
import { AsyncStorage } from '../AsyncStorage.js';
|
|
6
6
|
import { KeychainStorage } from '../KeychainStorage.js';
|
|
7
7
|
export declare class ReactNativeUtils implements PlatformUtils {
|
|
8
|
+
sdkType: SDKType;
|
|
8
9
|
disableProviderModal?: boolean | undefined;
|
|
9
10
|
localStorage: AsyncStorage;
|
|
10
11
|
sessionStorage: AsyncStorage;
|
|
@@ -47,6 +47,7 @@ function sendTransactionRequest(ctx, userId, walletId, protocolId, transaction,
|
|
|
47
47
|
}
|
|
48
48
|
export class ReactNativeUtils {
|
|
49
49
|
constructor() {
|
|
50
|
+
this.sdkType = 'REACT_NATIVE';
|
|
50
51
|
this.localStorage = new AsyncStorage();
|
|
51
52
|
this.sessionStorage = new AsyncStorage();
|
|
52
53
|
this.secureStorage = new KeychainStorage();
|
package/package.json
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-native-wallet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0-dev.0",
|
|
4
4
|
"description": "Para Wallet for React Native",
|
|
5
5
|
"homepage": "https://getpara.com",
|
|
6
6
|
"author": "Para Team <hello@getpara.com> (https://getpara.com)",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./shim": {
|
|
15
|
+
"default": "./dist/shim.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"react-native": {
|
|
19
|
+
".": "./dist/index.js",
|
|
20
|
+
"./shim": "./dist/shim.js"
|
|
21
|
+
},
|
|
22
|
+
"typesVersions": {
|
|
23
|
+
"*": {
|
|
24
|
+
"shim": [
|
|
25
|
+
"dist/shim.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"*": [
|
|
28
|
+
"dist/index.d.ts"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
10
32
|
"files": [
|
|
11
33
|
"dist",
|
|
12
34
|
"src",
|
|
@@ -17,16 +39,14 @@
|
|
|
17
39
|
"signer.xcframework",
|
|
18
40
|
"signer.aar"
|
|
19
41
|
],
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
},
|
|
42
|
+
"sideEffects": [
|
|
43
|
+
"dist/shim.js"
|
|
44
|
+
],
|
|
24
45
|
"dependencies": {
|
|
25
|
-
"@getpara/core-sdk": "1.
|
|
26
|
-
"@getpara/user-management-client": "1.
|
|
27
|
-
"@getpara/web-sdk": "1.
|
|
46
|
+
"@getpara/core-sdk": "1.12.0",
|
|
47
|
+
"@getpara/user-management-client": "1.12.0",
|
|
48
|
+
"@getpara/web-sdk": "1.12.0",
|
|
28
49
|
"@peculiar/webcrypto": "^1.5.0",
|
|
29
|
-
"@sentry/react-native": "^6.7.0",
|
|
30
50
|
"node-forge": "1.3.1",
|
|
31
51
|
"react-native-url-polyfill": "2.0.0",
|
|
32
52
|
"text-encoding": "0.7.0"
|
|
@@ -60,5 +80,8 @@
|
|
|
60
80
|
"publishConfig": {
|
|
61
81
|
"access": "public"
|
|
62
82
|
},
|
|
63
|
-
"
|
|
64
|
-
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build": "rm -rf dist && tsc",
|
|
85
|
+
"compile-signer": "bash ./scripts/compileSigner.sh"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
getSHA256HashHex,
|
|
13
13
|
parseCredentialCreationRes,
|
|
14
14
|
} from '@getpara/web-sdk';
|
|
15
|
-
import * as Sentry from '@sentry/react-native';
|
|
16
15
|
|
|
17
16
|
import { ReactNativeUtils } from './ReactNativeUtils.js';
|
|
18
17
|
import {
|
|
@@ -49,15 +48,6 @@ export class ParaMobile extends ParaCore {
|
|
|
49
48
|
constructor(env: Environment, apiKey?: string, relyingPartyId?: string, opts?: ConstructorOpts) {
|
|
50
49
|
super(env, apiKey, opts);
|
|
51
50
|
|
|
52
|
-
// starting with non-prod to see what kind of errors we get and if sensitive data is tracked
|
|
53
|
-
// will turn on in prod after monitoring
|
|
54
|
-
if (env !== Environment.PROD && env !== Environment.DEV) {
|
|
55
|
-
Sentry.init({
|
|
56
|
-
environment: env.toLowerCase(),
|
|
57
|
-
dsn: 'https://59cea0cfbbb30a646c4e9f2feea06da4@o4504568036720640.ingest.us.sentry.io/4508850922323968',
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
51
|
setEnv(env);
|
|
62
52
|
|
|
63
53
|
if (relyingPartyId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformUtils, TPregenIdentifierType } from '@getpara/web-sdk';
|
|
2
2
|
import { Ctx } from '@getpara/web-sdk';
|
|
3
3
|
import { SignatureRes } from '@getpara/web-sdk';
|
|
4
|
-
import { BackupKitEmailProps, KeyShareType, WalletScheme, WalletType } from '@getpara/user-management-client';
|
|
4
|
+
import { BackupKitEmailProps, KeyShareType, WalletScheme, WalletType, SDKType } from '@getpara/user-management-client';
|
|
5
5
|
import { NativeModules } from 'react-native';
|
|
6
6
|
|
|
7
7
|
import { AsyncStorage } from '../AsyncStorage.js';
|
|
@@ -55,6 +55,7 @@ async function sendTransactionRequest(
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export class ReactNativeUtils implements PlatformUtils {
|
|
58
|
+
sdkType: SDKType = 'REACT_NATIVE';
|
|
58
59
|
disableProviderModal?: boolean | undefined;
|
|
59
60
|
localStorage = new AsyncStorage();
|
|
60
61
|
sessionStorage = new AsyncStorage();
|