@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 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**: Multiple storage strategies with React Native Keychain
18
- - **React Native Optimized**: Full platform support with automatic polyfills
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
- ### Optional Dependencies (Recommended)
35
+ ### Included Native Dependencies
33
36
 
34
- ```bash
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
- # For crypto operations
39
- npm install react-native-get-random-values
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
- # For blockchain transaction signing
42
- npm install @explorins/pers-signer
44
+ ### Optional Dependencies
43
45
 
44
- # For URL polyfills
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 { usePersSDK, useTransactionSigner } from '@explorins/pers-sdk-react-native';
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
- user,
78
- isAuthenticated,
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 handleEarnTokens = async () => {
115
+ const handleLoadTokens = async () => {
97
116
  try {
98
- const result = await earnTokens({
99
- amount: 100,
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('Earn failed:', 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 redemption = await redeemTokens({
113
- amount: 50,
114
- rewardType: 'discount_voucher'
115
- });
127
+ const redemptionId = 'redemption-id-from-ui';
128
+ const result = await redeem(redemptionId);
116
129
 
117
- // Step 2: Sign blockchain transaction
118
- if (redemption.requiresBlockchainSigning && isSignerAvailable) {
119
- const txResult = await signAndSubmitTransactionWithJWT(redemption.jwtToken);
120
-
121
- if (txResult.success) {
122
- console.log('Redemption completed!');
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={handleEarnTokens} style={styles.button}>
143
- <Text style={styles.buttonText}>Earn 100 Tokens</Text>
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
- getTokenBalance,
189
- earnTokens,
190
- redeemTokens,
191
- transferTokens
198
+ getTokens,
199
+ getActiveCreditToken,
200
+ getRewardTokens,
201
+ getTokenByContract
192
202
  } = useTokens();
193
203
 
194
204
  // Transaction history
195
205
  const {
196
- getTransactions,
206
+ getUserTransactionHistory,
197
207
  getTransactionById,
198
208
  createTransaction
199
209
  } = useTransactions();
200
210
 
201
- // 🌟 Blockchain transaction signing
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
- createRedemption,
238
+ redeem,
229
239
  getUserRedemptions,
230
- getRedemptionTypes
240
+ getActiveRedemptions
231
241
  } = useRedemptions();
232
242
  ```
233
243
 
@@ -263,7 +273,7 @@ const {
263
273
  } = useWeb3();
264
274
  ```
265
275
 
266
- ## 🔐 EVM Blockchain Transaction Signing
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('🎉 Transaction completed!');
296
- console.log('📄 Hash:', result.transactionHash);
297
- console.log('🔗 View on blockchain explorer: [Chain-specific URL]');
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
- 🔐 Sign & Submit Transaction
346
+ Sign & Submit Transaction
337
347
  </Text>
338
348
  </TouchableOpacity>
339
349
  );
340
350
  }
341
351
  ```
342
352
 
343
- ## 🛡️ Security Features
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
- ## 📱 Platform Support
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
- ## 🔧 Advanced Configuration
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
- projectKey: 'your-project-key',
376
- storage: 'keychain', // 'asyncStorage' | 'keychain' | 'memory'
377
- biometricPrompt: 'Authenticate to access your rewards'
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 { usePersSDK } from '@explorins/pers-sdk-react-native';
397
+ import { useTokens } from '@explorins/pers-sdk-react-native';
385
398
 
386
399
  function ErrorHandlingExample() {
387
- const { earnTokens } = usePersSDK();
400
+ const { getTokens } = useTokens();
388
401
  const [error, setError] = useState<string | null>(null);
389
402
 
390
- const handleEarnWithErrorHandling = async () => {
403
+ const handleLoadTokensWithErrorHandling = async () => {
391
404
  try {
392
405
  setError(null);
393
- await earnTokens({ amount: 100, source: 'activity' });
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
- ## 📊 Analytics Integration
421
+ ## Analytics Integration
411
422
 
412
423
  ```typescript
413
424
  import { useAnalytics } from '@explorins/pers-sdk-react-native';
@@ -1,67 +1,4 @@
1
- interface TransactionAnalyticsFilters {
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":"AAIA,UAAU,2BAA2B;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,KAAK,2BAA2B,GAC5B,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,GAC7C,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,oBAAoB,GAAG,MAAM,GAClE,eAAe,GAAG,kBAAkB,GAAG,UAAU,GAAG,aAAa,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,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AE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,8BAA8B,EAAE,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
+ {"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: TransactionPaginationParams) => Promise<any>;
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,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,2BAA2B,KAAG,QAAQ,GAAG,CAAC;iCAelD,QAAQ,IAAI,CAAC;;CAwBlE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
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
  *
@@ -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;;;;;;;GAOG;AACH,OAAO,EACL,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAM/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,aAAa,CAAC;AAMrB;;;;;;;;GAQG;AACH,OAAO,EAC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