@explorins/pers-sdk-react-native 1.5.25 → 1.5.27
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.
- package/README.md +84 -73
- package/dist/hooks/useAnalytics.d.ts +1 -65
- package/dist/hooks/useAnalytics.d.ts.map +1 -1
- package/dist/hooks/useTransactions.d.ts +2 -3
- package/dist/hooks/useTransactions.d.ts.map +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +735 -161
- package/dist/index.js.map +1 -1
- package/dist/providers/PersSDKProvider.d.ts.map +1 -1
- package/dist/providers/PersSDKProvider.js +11 -0
- package/dist/providers/react-native-auth-provider.d.ts.map +1 -1
- package/dist/providers/react-native-auth-provider.js +2 -2
- package/dist/providers/rn-dpop-provider.d.ts +19 -0
- package/dist/providers/rn-dpop-provider.d.ts.map +1 -0
- package/dist/providers/rn-dpop-provider.js +76 -0
- package/dist/storage/rn-secure-storage.d.ts +18 -0
- package/dist/storage/rn-secure-storage.d.ts.map +1 -0
- package/dist/storage/rn-secure-storage.js +102 -0
- package/package.json +6 -5
- package/src/hooks/useAnalytics.ts +4 -76
- package/src/hooks/useTransactions.ts +3 -3
- package/src/index.ts +24 -0
- package/src/providers/PersSDKProvider.tsx +13 -1
- package/src/providers/react-native-auth-provider.ts +2 -1
- package/src/providers/rn-dpop-provider.ts +88 -0
- package/src/storage/rn-secure-storage.ts +110 -0
package/README.md
CHANGED
|
@@ -14,8 +14,9 @@ A comprehensive React Native SDK for the PERS (Phygital Experience Rewards Syste
|
|
|
14
14
|
- **Donations**: Charitable giving and donation management
|
|
15
15
|
- **User Management**: Profile management and user operations
|
|
16
16
|
- **Web3 Support**: EVM-compatible chain wallet operations and blockchain interactions
|
|
17
|
-
- **Secure Storage**:
|
|
18
|
-
- **
|
|
17
|
+
- **Secure Storage**: Hybrid storage strategy using **Keychain** (High Security) for secrets and **AsyncStorage** for public data.
|
|
18
|
+
- **DPoP Integration**: Native C++ bridge for high-performance ECDSA signing via `react-native-quick-crypto`.
|
|
19
|
+
- **React Native Optimized**: Full platform support with automatic polyfills.
|
|
19
20
|
|
|
20
21
|
## Installation
|
|
21
22
|
|
|
@@ -23,28 +24,47 @@ A comprehensive React Native SDK for the PERS (Phygital Experience Rewards Syste
|
|
|
23
24
|
npm install @explorins/pers-sdk-react-native
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
### Required Dependencies
|
|
27
|
+
### Required Peer Dependencies
|
|
28
|
+
|
|
29
|
+
You must install `async-storage` manually as it is a peer dependency:
|
|
27
30
|
|
|
28
31
|
```bash
|
|
29
32
|
npm install @react-native-async-storage/async-storage
|
|
30
33
|
```
|
|
31
34
|
|
|
32
|
-
###
|
|
35
|
+
### Included Native Dependencies
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
# For secure keychain storage
|
|
36
|
-
npm install react-native-keychain
|
|
37
|
+
The SDK automatically installs the following native libraries. **You must rebuild your native app** (e.g., `npx expo run:android` or `cd ios && pod install`) after installing the SDK to link these native modules:
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
- `react-native-quick-crypto` (High-performance Crypto)
|
|
40
|
+
- `react-native-keychain` (Secure Storage)
|
|
41
|
+
- `react-native-passkey` (WebAuthn/Passkeys)
|
|
42
|
+
- `react-native-get-random-values` (Crypto Primitives)
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
npm install @explorins/pers-signer
|
|
44
|
+
### Optional Dependencies
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
```bash
|
|
47
|
+
# For URL Polyfills (Recommended if not already included in your app)
|
|
45
48
|
npm install react-native-url-polyfill
|
|
46
49
|
```
|
|
47
50
|
|
|
51
|
+
|
|
52
|
+
## Critical Setup Requirement: Passkeys
|
|
53
|
+
|
|
54
|
+
To enable Passkey authentication (WebAuthn) on iOS and Android, you **must** register your app's bundle information with the PERS backend.
|
|
55
|
+
|
|
56
|
+
**Please send the following information to the PERS Team (support@explorins.com):**
|
|
57
|
+
|
|
58
|
+
1. **iOS Bundle Identifier**: e.g., `com.yourcompany.app`
|
|
59
|
+
2. **Apple Team ID**: Your 10-character Apple Team ID (e.g., `R553XYJPW7`)
|
|
60
|
+
3. **Android Package Name**: e.g., `com.yourcompany.app`
|
|
61
|
+
4. **Android SHA-256 Certificate Fingerprint**:
|
|
62
|
+
* **Development**: The fingerprint from your local keystore or Expo development build.
|
|
63
|
+
* **Production**: The fingerprint from your Google Play Console signing key.
|
|
64
|
+
|
|
65
|
+
**Why is this required?**
|
|
66
|
+
The PERS Signer server must host an `apple-app-site-association` file (for iOS) and an `assetlinks.json` file (for Android) that explicitly trusts your application. Without this, the operating system will reject Passkey creation requests.
|
|
67
|
+
|
|
48
68
|
## Quick Start
|
|
49
69
|
|
|
50
70
|
### 1. Setup the Provider
|
|
@@ -70,18 +90,17 @@ export default function App() {
|
|
|
70
90
|
### 2. Authentication & Token Operations
|
|
71
91
|
|
|
72
92
|
```typescript
|
|
73
|
-
import {
|
|
93
|
+
import {
|
|
94
|
+
useAuth,
|
|
95
|
+
useTokens,
|
|
96
|
+
useRedemptions,
|
|
97
|
+
useTransactionSigner
|
|
98
|
+
} from '@explorins/pers-sdk-react-native';
|
|
74
99
|
|
|
75
100
|
function RewardScreen() {
|
|
76
|
-
const {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
login,
|
|
80
|
-
earnTokens,
|
|
81
|
-
redeemTokens,
|
|
82
|
-
getTokenBalance
|
|
83
|
-
} = usePersSDK();
|
|
84
|
-
|
|
101
|
+
const { user, isAuthenticated, login } = useAuth();
|
|
102
|
+
const { getTokens } = useTokens();
|
|
103
|
+
const { redeem } = useRedemptions();
|
|
85
104
|
const { signAndSubmitTransactionWithJWT, isSignerAvailable } = useTransactionSigner();
|
|
86
105
|
|
|
87
106
|
const handleLogin = async () => {
|
|
@@ -93,36 +112,27 @@ function RewardScreen() {
|
|
|
93
112
|
}
|
|
94
113
|
};
|
|
95
114
|
|
|
96
|
-
const
|
|
115
|
+
const handleLoadTokens = async () => {
|
|
97
116
|
try {
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
source: 'activity_completion',
|
|
101
|
-
metadata: { activity: 'hotel_checkin' }
|
|
102
|
-
});
|
|
103
|
-
console.log('Earned tokens:', result);
|
|
117
|
+
const tokens = await getTokens();
|
|
118
|
+
console.log('User tokens:', tokens);
|
|
104
119
|
} catch (error) {
|
|
105
|
-
console.error('
|
|
120
|
+
console.error('Failed to load tokens:', error);
|
|
106
121
|
}
|
|
107
122
|
};
|
|
108
123
|
|
|
109
124
|
const handleRedemption = async () => {
|
|
110
125
|
try {
|
|
111
126
|
// Step 1: Create redemption
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
rewardType: 'discount_voucher'
|
|
115
|
-
});
|
|
127
|
+
const redemptionId = 'redemption-id-from-ui';
|
|
128
|
+
const result = await redeem(redemptionId);
|
|
116
129
|
|
|
117
|
-
//
|
|
118
|
-
if
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
console.log('Transaction Hash:', txResult.transactionHash);
|
|
124
|
-
console.log('View on blockchain explorer: [Chain-specific URL]');
|
|
125
|
-
}
|
|
130
|
+
// Note: The redeem method automatically handles blockchain signing if required
|
|
131
|
+
// and if the signer is available.
|
|
132
|
+
|
|
133
|
+
if (result.isSigned) {
|
|
134
|
+
console.log('Redemption completed with blockchain signature!');
|
|
135
|
+
console.log('Transaction Hash:', result.transactionHash);
|
|
126
136
|
}
|
|
127
137
|
} catch (error) {
|
|
128
138
|
console.error('Redemption failed:', error);
|
|
@@ -139,8 +149,8 @@ function RewardScreen() {
|
|
|
139
149
|
<View>
|
|
140
150
|
<Text style={styles.welcome}>Welcome, {user?.identifier}!</Text>
|
|
141
151
|
|
|
142
|
-
<TouchableOpacity onPress={
|
|
143
|
-
<Text style={styles.buttonText}>
|
|
152
|
+
<TouchableOpacity onPress={handleLoadTokens} style={styles.button}>
|
|
153
|
+
<Text style={styles.buttonText}>Load Tokens</Text>
|
|
144
154
|
</TouchableOpacity>
|
|
145
155
|
|
|
146
156
|
<TouchableOpacity
|
|
@@ -185,20 +195,20 @@ const {
|
|
|
185
195
|
```typescript
|
|
186
196
|
// Token management
|
|
187
197
|
const {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
198
|
+
getTokens,
|
|
199
|
+
getActiveCreditToken,
|
|
200
|
+
getRewardTokens,
|
|
201
|
+
getTokenByContract
|
|
192
202
|
} = useTokens();
|
|
193
203
|
|
|
194
204
|
// Transaction history
|
|
195
205
|
const {
|
|
196
|
-
|
|
206
|
+
getUserTransactionHistory,
|
|
197
207
|
getTransactionById,
|
|
198
208
|
createTransaction
|
|
199
209
|
} = useTransactions();
|
|
200
210
|
|
|
201
|
-
//
|
|
211
|
+
// Blockchain transaction signing
|
|
202
212
|
const {
|
|
203
213
|
signAndSubmitTransactionWithJWT,
|
|
204
214
|
isSignerAvailable,
|
|
@@ -225,9 +235,9 @@ const {
|
|
|
225
235
|
|
|
226
236
|
// Redemption system
|
|
227
237
|
const {
|
|
228
|
-
|
|
238
|
+
redeem,
|
|
229
239
|
getUserRedemptions,
|
|
230
|
-
|
|
240
|
+
getActiveRedemptions
|
|
231
241
|
} = useRedemptions();
|
|
232
242
|
```
|
|
233
243
|
|
|
@@ -263,7 +273,7 @@ const {
|
|
|
263
273
|
} = useWeb3();
|
|
264
274
|
```
|
|
265
275
|
|
|
266
|
-
##
|
|
276
|
+
## EVM Blockchain Transaction Signing
|
|
267
277
|
|
|
268
278
|
The `useTransactionSigner` hook provides secure EVM blockchain transaction signing:
|
|
269
279
|
|
|
@@ -292,9 +302,9 @@ function BlockchainRedemption() {
|
|
|
292
302
|
const result = await signAndSubmitTransactionWithJWT(jwtToken);
|
|
293
303
|
|
|
294
304
|
if (result.success) {
|
|
295
|
-
console.log('
|
|
296
|
-
console.log('
|
|
297
|
-
console.log('
|
|
305
|
+
console.log('Transaction completed!');
|
|
306
|
+
console.log('Hash:', result.transactionHash);
|
|
307
|
+
console.log('View on blockchain explorer: [Chain-specific URL]');
|
|
298
308
|
|
|
299
309
|
// Handle post-transaction flow
|
|
300
310
|
if (result.shouldRedirect && result.redirectUrl) {
|
|
@@ -333,14 +343,14 @@ function BlockchainRedemption() {
|
|
|
333
343
|
style={[styles.button, !isSignerAvailable && styles.disabled]}
|
|
334
344
|
>
|
|
335
345
|
<Text style={styles.buttonText}>
|
|
336
|
-
|
|
346
|
+
Sign & Submit Transaction
|
|
337
347
|
</Text>
|
|
338
348
|
</TouchableOpacity>
|
|
339
349
|
);
|
|
340
350
|
}
|
|
341
351
|
```
|
|
342
352
|
|
|
343
|
-
##
|
|
353
|
+
## Security Features
|
|
344
354
|
|
|
345
355
|
### WebAuthn Authentication
|
|
346
356
|
- Device biometric authentication (fingerprint, face ID, PIN)
|
|
@@ -357,48 +367,49 @@ function BlockchainRedemption() {
|
|
|
357
367
|
- Secure transaction signing without exposing private keys
|
|
358
368
|
- Automatic session management with secure caching
|
|
359
369
|
|
|
360
|
-
##
|
|
370
|
+
## Platform Support
|
|
361
371
|
|
|
362
372
|
- **iOS**: Full support with Keychain integration
|
|
363
373
|
- **Android**: Full support with Keystore integration
|
|
364
374
|
- **Expo**: Compatible with Expo managed workflow
|
|
365
375
|
- **Web**: React Native Web compatibility
|
|
366
376
|
|
|
367
|
-
##
|
|
377
|
+
## Advanced Configuration
|
|
368
378
|
|
|
369
379
|
### Custom Authentication Provider
|
|
370
380
|
|
|
381
|
+
The SDK automatically uses `ReactNativeSecureStorage` for React Native (iOS/Android) and `LocalStorageTokenStorage` for Web. You can customize this if needed:
|
|
382
|
+
|
|
371
383
|
```typescript
|
|
372
|
-
import { createReactNativeAuthProvider } from '@explorins/pers-sdk-react-native';
|
|
384
|
+
import { createReactNativeAuthProvider, ReactNativeSecureStorage } from '@explorins/pers-sdk-react-native';
|
|
373
385
|
|
|
374
|
-
const authProvider = createReactNativeAuthProvider({
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
386
|
+
const authProvider = createReactNativeAuthProvider('your-project-key', {
|
|
387
|
+
keyPrefix: 'my_app_tokens_',
|
|
388
|
+
debug: true,
|
|
389
|
+
// Optional: Provide custom storage implementation
|
|
390
|
+
// customStorage: new ReactNativeSecureStorage('custom_prefix_')
|
|
378
391
|
});
|
|
379
392
|
```
|
|
380
393
|
|
|
381
394
|
### Error Handling Patterns
|
|
382
395
|
|
|
383
396
|
```typescript
|
|
384
|
-
import {
|
|
397
|
+
import { useTokens } from '@explorins/pers-sdk-react-native';
|
|
385
398
|
|
|
386
399
|
function ErrorHandlingExample() {
|
|
387
|
-
const {
|
|
400
|
+
const { getTokens } = useTokens();
|
|
388
401
|
const [error, setError] = useState<string | null>(null);
|
|
389
402
|
|
|
390
|
-
const
|
|
403
|
+
const handleLoadTokensWithErrorHandling = async () => {
|
|
391
404
|
try {
|
|
392
405
|
setError(null);
|
|
393
|
-
await
|
|
406
|
+
await getTokens();
|
|
394
407
|
} catch (err) {
|
|
395
408
|
// Handle specific error types
|
|
396
409
|
if (err.code === 'NETWORK_ERROR') {
|
|
397
410
|
setError('Network connection required');
|
|
398
411
|
} else if (err.code === 'INVALID_TOKEN') {
|
|
399
412
|
setError('Please log in again');
|
|
400
|
-
} else if (err.code === 'INSUFFICIENT_BALANCE') {
|
|
401
|
-
setError('Insufficient balance for this operation');
|
|
402
413
|
} else {
|
|
403
414
|
setError(err.message || 'An unexpected error occurred');
|
|
404
415
|
}
|
|
@@ -407,7 +418,7 @@ function ErrorHandlingExample() {
|
|
|
407
418
|
}
|
|
408
419
|
```
|
|
409
420
|
|
|
410
|
-
##
|
|
421
|
+
## Analytics Integration
|
|
411
422
|
|
|
412
423
|
```typescript
|
|
413
424
|
import { useAnalytics } from '@explorins/pers-sdk-react-native';
|
|
@@ -1,67 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
status?: string;
|
|
3
|
-
tokenType?: string;
|
|
4
|
-
triggerProcessType?: string;
|
|
5
|
-
tenantId?: string;
|
|
6
|
-
chainId?: number;
|
|
7
|
-
type?: string;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
10
|
-
type TransactionAnalyticsGroupBy = 'month' | 'week' | 'day' | 'year' | 'quarter' | 'tokenType' | 'status' | 'chainId' | 'triggerProcessType' | 'type' | 'senderAddress' | 'recipientAddress' | 'senderId' | 'recipientId' | 'senderOwnerType' | 'recipientOwnerType' | 'createdAt';
|
|
11
|
-
type TransactionAnalyticsMetric = 'count' | 'sum' | 'avg' | 'min' | 'max';
|
|
12
|
-
interface TransactionAnalyticsGroupByExpression {
|
|
13
|
-
expression: string;
|
|
14
|
-
alias: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Request DTO for transaction analytics
|
|
18
|
-
*
|
|
19
|
-
* @interface TransactionAnalyticsRequestDTO
|
|
20
|
-
*/
|
|
21
|
-
export interface TransactionAnalyticsRequestDTO {
|
|
22
|
-
filters?: TransactionAnalyticsFilters;
|
|
23
|
-
groupBy?: TransactionAnalyticsGroupBy[];
|
|
24
|
-
groupByExpressions?: TransactionAnalyticsGroupByExpression[];
|
|
25
|
-
metrics?: TransactionAnalyticsMetric[];
|
|
26
|
-
orderBy?: string;
|
|
27
|
-
orderDirection?: 'ASC' | 'DESC';
|
|
28
|
-
limit?: number;
|
|
29
|
-
startDate?: string;
|
|
30
|
-
endDate?: string;
|
|
31
|
-
}
|
|
32
|
-
interface TransactionAnalyticsResultItem {
|
|
33
|
-
[key: string]: string | number | Date | undefined;
|
|
34
|
-
count?: string;
|
|
35
|
-
sum?: number;
|
|
36
|
-
avg?: number;
|
|
37
|
-
min?: number;
|
|
38
|
-
max?: number;
|
|
39
|
-
tokentype?: string;
|
|
40
|
-
tokenType?: string;
|
|
41
|
-
year?: string;
|
|
42
|
-
month?: string;
|
|
43
|
-
type?: string;
|
|
44
|
-
senderaddress?: string;
|
|
45
|
-
senderAddress?: string;
|
|
46
|
-
recipientaddress?: string;
|
|
47
|
-
recipientAddress?: string;
|
|
48
|
-
triggerprocesstype?: string;
|
|
49
|
-
triggerProcessType?: string;
|
|
50
|
-
userid?: string;
|
|
51
|
-
userId?: string;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Response DTO for transaction analytics
|
|
55
|
-
*
|
|
56
|
-
* @interface TransactionAnalyticsResponseDTO
|
|
57
|
-
*/
|
|
58
|
-
export interface TransactionAnalyticsResponseDTO {
|
|
59
|
-
results: TransactionAnalyticsResultItem[];
|
|
60
|
-
totalGroups: number;
|
|
61
|
-
metadata: {
|
|
62
|
-
executionTime: string;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
1
|
+
import { TransactionAnalyticsRequestDTO, TransactionAnalyticsResponseDTO } from '@explorins/pers-shared';
|
|
65
2
|
/**
|
|
66
3
|
* React hook for analytics operations in the PERS SDK
|
|
67
4
|
*
|
|
@@ -96,5 +33,4 @@ export declare const useAnalytics: () => {
|
|
|
96
33
|
isAvailable: boolean;
|
|
97
34
|
};
|
|
98
35
|
export type AnalyticsHook = ReturnType<typeof useAnalytics>;
|
|
99
|
-
export {};
|
|
100
36
|
//# sourceMappingURL=useAnalytics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnalytics.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnalytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAnalytics.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnalytics.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,YAAY;uCAwBqC,8BAA8B,KAAG,QAAQ,+BAA+B,CAAC;;CAmBtI,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { TransactionRequestDTO, TransactionRequestResponseDTO, TransactionDTO, TransactionRole } from '@explorins/pers-shared';
|
|
2
|
-
import type { TransactionPaginationParams } from '@explorins/pers-sdk/transaction';
|
|
1
|
+
import type { TransactionRequestDTO, TransactionRequestResponseDTO, TransactionDTO, TransactionRole, TransactionPaginationRequestDTO } from '@explorins/pers-shared';
|
|
3
2
|
/**
|
|
4
3
|
* React hook for transaction operations in the PERS SDK
|
|
5
4
|
*
|
|
@@ -41,7 +40,7 @@ export declare const useTransactions: () => {
|
|
|
41
40
|
getTransactionById: (transactionId: string) => Promise<TransactionDTO | null>;
|
|
42
41
|
getUserTransactionHistory: (role?: TransactionRole) => Promise<TransactionDTO[]>;
|
|
43
42
|
getTenantTransactions: () => Promise<TransactionDTO[]>;
|
|
44
|
-
getPaginatedTransactions: (params:
|
|
43
|
+
getPaginatedTransactions: (params: TransactionPaginationRequestDTO) => Promise<any>;
|
|
45
44
|
exportTransactionsCSV: () => Promise<Blob>;
|
|
46
45
|
isAvailable: boolean;
|
|
47
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTransactions.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,eAAe,
|
|
1
|
+
{"version":3,"file":"useTransactions.d.ts","sourceRoot":"","sources":["../../src/hooks/useTransactions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,eAAe,EACf,+BAA+B,EAChC,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,eAAe;iCA8B4B,qBAAqB,KAAG,QAAQ,6BAA6B,CAAC;wCA8DvD,MAAM,KAAG,QAAQ,cAAc,GAAG,IAAI,CAAC;uCA6BxC,eAAe,KAAG,QAAQ,cAAc,EAAE,CAAC;iCAgBnD,QAAQ,cAAc,EAAE,CAAC;uCAcjB,+BAA+B,KAAG,QAAQ,GAAG,CAAC;iCAetD,QAAQ,IAAI,CAAC;;CAwBlE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,18 @@ import './polyfills';
|
|
|
53
53
|
* @see {@link ReactNativeAuthConfig} - Configuration interface
|
|
54
54
|
*/
|
|
55
55
|
export { createReactNativeAuthProvider, type ReactNativeAuthConfig } from './providers/react-native-auth-provider';
|
|
56
|
+
/**
|
|
57
|
+
* Secure Token Storage with Keychain Integration
|
|
58
|
+
*
|
|
59
|
+
* Implements the TokenStorage interface using React Native Keychain for sensitive data
|
|
60
|
+
* (Private Keys, Access Tokens) and AsyncStorage for configuration/public data.
|
|
61
|
+
*
|
|
62
|
+
* - Encryption: Hardware-backed keystore
|
|
63
|
+
* - Persistence: Survives app uninstall (on iOS usually) or clears on uninstall (Android) if configured
|
|
64
|
+
*
|
|
65
|
+
* @see {@link ReactNativeSecureStorage} - The implementation class
|
|
66
|
+
*/
|
|
67
|
+
export { ReactNativeSecureStorage } from './storage/rn-secure-storage';
|
|
56
68
|
/**
|
|
57
69
|
* Secure token storage using React Native AsyncStorage
|
|
58
70
|
*
|
|
@@ -60,8 +72,14 @@ export { createReactNativeAuthProvider, type ReactNativeAuthConfig } from './pro
|
|
|
60
72
|
* Integrates with React Native Keychain for enhanced security on supported devices.
|
|
61
73
|
*
|
|
62
74
|
* @see {@link AsyncStorageTokenStorage} - Secure storage implementation
|
|
75
|
+
* @deprecated Use ReactNativeSecureStorage for better security (Keychain integration)
|
|
63
76
|
*/
|
|
64
77
|
export { AsyncStorageTokenStorage, } from './storage/async-storage-token-storage';
|
|
78
|
+
/**
|
|
79
|
+
* React Native DPoP Crypto Provider
|
|
80
|
+
* implements DPoPCryptoProvider using react-native-quick-crypto
|
|
81
|
+
*/
|
|
82
|
+
export { ReactNativeDPoPProvider } from './providers/rn-dpop-provider';
|
|
65
83
|
/**
|
|
66
84
|
* Main PERS SDK provider and context for React Native applications
|
|
67
85
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,aAAa,CAAC;AAMrB;;;;;;;;GAQG;AACH,OAAO,EACL,6BAA6B,EAC7B,KAAK,qBAAqB,EAC3B,MAAM,wCAAwC,CAAC;AAMhD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,aAAa,CAAC;AAMrB;;;;;;;;GAQG;AACH,OAAO,EACL,6BAA6B,EAC7B,KAAK,qBAAqB,EAC3B,MAAM,wCAAwC,CAAC;AAMhD;;;;;;;;;;GAUG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;;;;;GAQG;AACH,OAAO,EACL,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAM/C;;;GAGG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAMvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,eAAe,EACf,UAAU,EACV,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,6BAA6B,CAAC;AAMrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,OAAO,EACP,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,YAAY,EACb,MAAM,SAAS,CAAC;AAMjB;;;;;;GAMG;AACH,OAAO,EACL,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAM9C;;;;;;;;GAQG;AACH,OAAO,EACL,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAMrB;;;;;;;;;;;;;;;GAeG;AACH,cAAc,wBAAwB,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,sBAAsB,EACvB,MAAM,0BAA0B,CAAC"}
|