react-native-security-suite 0.9.22 → 1.0.0-rc.2

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.
Files changed (189) hide show
  1. package/README.md +291 -69
  2. package/android/build.gradle +11 -0
  3. package/android/gradle.properties +1 -1
  4. package/android/src/main/java/com/securitysuite/CryptoConfig.java +106 -0
  5. package/android/src/main/java/com/securitysuite/CryptoUtils.java +155 -0
  6. package/android/src/main/java/com/securitysuite/EcdhKeyStore.java +60 -0
  7. package/android/src/main/java/com/securitysuite/HeaderSanitizer.java +75 -0
  8. package/android/src/main/java/com/securitysuite/JWSGenerator.java +237 -32
  9. package/android/src/main/java/com/securitysuite/JwsFetchPayload.java +81 -0
  10. package/android/src/main/java/com/securitysuite/Obfuscation.java +57 -0
  11. package/android/src/main/java/com/securitysuite/SecureStorageNative.java +211 -0
  12. package/android/src/main/java/com/securitysuite/SecureView.java +2 -10
  13. package/android/src/main/java/com/securitysuite/SecureWindowHelper.java +30 -0
  14. package/android/src/main/java/com/securitysuite/SecuritySuiteModule.java +317 -102
  15. package/android/src/main/java/com/securitysuite/Sslpinning.java +219 -106
  16. package/android/src/main/java/com/securitysuite/security/AppIntegrityChecker.java +133 -0
  17. package/android/src/main/java/com/securitysuite/security/EmulatorDetector.java +145 -0
  18. package/android/src/main/java/com/securitysuite/security/RuntimeDetector.java +234 -0
  19. package/android/src/test/java/com/securitysuite/JWSGeneratorTest.java +153 -0
  20. package/android/src/test/java/com/securitysuite/SecureStorageNativeTest.java +37 -0
  21. package/ios/CryptoConfig.swift +73 -0
  22. package/ios/JWSGenerator.swift +288 -0
  23. package/ios/JWSGeneratorTests.swift +168 -0
  24. package/ios/KeychainHelper.swift +104 -0
  25. package/ios/Obfuscation.swift +42 -0
  26. package/ios/SecureStorageNative.swift +84 -0
  27. package/ios/Security/AppIntegrityChecker.swift +85 -0
  28. package/ios/Security/EmulatorDetector.swift +45 -0
  29. package/ios/Security/RuntimeDetector.swift +107 -0
  30. package/ios/SecuritySuite.mm +28 -4
  31. package/ios/SecuritySuite.swift +427 -134
  32. package/ios/SslPinning.swift +242 -263
  33. package/lib/commonjs/clipboard/index.js +3 -0
  34. package/lib/commonjs/clipboard/index.js.map +1 -0
  35. package/lib/commonjs/crypto/index.js +29 -0
  36. package/lib/commonjs/crypto/index.js.map +1 -0
  37. package/lib/commonjs/device/index.js +40 -0
  38. package/lib/commonjs/device/index.js.map +1 -0
  39. package/lib/commonjs/errors.js +62 -0
  40. package/lib/commonjs/errors.js.map +1 -0
  41. package/lib/commonjs/index.js +220 -151
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/commonjs/integrity/index.js +40 -0
  44. package/lib/commonjs/integrity/index.js.map +1 -0
  45. package/lib/commonjs/jws.js +141 -0
  46. package/lib/commonjs/jws.js.map +1 -0
  47. package/lib/commonjs/legacy/cryptoOptions.js +29 -0
  48. package/lib/commonjs/legacy/cryptoOptions.js.map +1 -0
  49. package/lib/commonjs/native/bridge.js +23 -0
  50. package/lib/commonjs/native/bridge.js.map +1 -0
  51. package/lib/commonjs/network/index.js +3 -0
  52. package/lib/commonjs/network/index.js.map +1 -0
  53. package/lib/commonjs/risk/score.js +36 -0
  54. package/lib/commonjs/risk/score.js.map +1 -0
  55. package/lib/commonjs/runtime/index.js +31 -0
  56. package/lib/commonjs/runtime/index.js.map +1 -0
  57. package/lib/commonjs/screen/index.js +13 -0
  58. package/lib/commonjs/screen/index.js.map +1 -0
  59. package/lib/commonjs/securitySuite/index.js +42 -0
  60. package/lib/commonjs/securitySuite/index.js.map +1 -0
  61. package/lib/commonjs/storage/index.js +3 -0
  62. package/lib/commonjs/storage/index.js.map +1 -0
  63. package/lib/commonjs/types/detection.js +2 -0
  64. package/lib/commonjs/types/detection.js.map +1 -0
  65. package/lib/module/clipboard/index.js +3 -0
  66. package/lib/module/clipboard/index.js.map +1 -0
  67. package/lib/module/crypto/index.js +25 -0
  68. package/lib/module/crypto/index.js.map +1 -0
  69. package/lib/module/device/index.js +36 -0
  70. package/lib/module/device/index.js.map +1 -0
  71. package/lib/module/errors.js +55 -0
  72. package/lib/module/errors.js.map +1 -0
  73. package/lib/module/index.js +147 -148
  74. package/lib/module/index.js.map +1 -1
  75. package/lib/module/integrity/index.js +36 -0
  76. package/lib/module/integrity/index.js.map +1 -0
  77. package/lib/module/jws.js +127 -0
  78. package/lib/module/jws.js.map +1 -0
  79. package/lib/module/legacy/cryptoOptions.js +25 -0
  80. package/lib/module/legacy/cryptoOptions.js.map +1 -0
  81. package/lib/module/native/bridge.js +19 -0
  82. package/lib/module/native/bridge.js.map +1 -0
  83. package/lib/module/network/index.js +3 -0
  84. package/lib/module/network/index.js.map +1 -0
  85. package/lib/module/risk/score.js +32 -0
  86. package/lib/module/risk/score.js.map +1 -0
  87. package/lib/module/runtime/index.js +27 -0
  88. package/lib/module/runtime/index.js.map +1 -0
  89. package/lib/module/screen/index.js +5 -0
  90. package/lib/module/screen/index.js.map +1 -0
  91. package/lib/module/securitySuite/index.js +38 -0
  92. package/lib/module/securitySuite/index.js.map +1 -0
  93. package/lib/module/storage/index.js +3 -0
  94. package/lib/module/storage/index.js.map +1 -0
  95. package/lib/module/types/detection.js +2 -0
  96. package/lib/module/types/detection.js.map +1 -0
  97. package/lib/typescript/commonjs/docs/api-v1-proposal.d.ts +215 -0
  98. package/lib/typescript/commonjs/docs/api-v1-proposal.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/src/SecureView.d.ts +1 -1
  100. package/lib/typescript/commonjs/src/SecureView.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/clipboard/index.d.ts +2 -0
  102. package/lib/typescript/commonjs/src/clipboard/index.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/src/crypto/index.d.ts +15 -0
  104. package/lib/typescript/commonjs/src/crypto/index.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/src/device/index.d.ts +11 -0
  106. package/lib/typescript/commonjs/src/device/index.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/errors.d.ts +17 -0
  108. package/lib/typescript/commonjs/src/errors.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/helpers.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/src/index.d.ts +77 -24
  111. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/src/integrity/index.d.ts +6 -0
  113. package/lib/typescript/commonjs/src/integrity/index.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/src/jws.d.ts +44 -0
  115. package/lib/typescript/commonjs/src/jws.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/src/legacy/cryptoOptions.d.ts +35 -0
  117. package/lib/typescript/commonjs/src/legacy/cryptoOptions.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/src/native/bridge.d.ts +12 -0
  119. package/lib/typescript/commonjs/src/native/bridge.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/src/network/index.d.ts +2 -0
  121. package/lib/typescript/commonjs/src/network/index.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/src/risk/score.d.ts +12 -0
  123. package/lib/typescript/commonjs/src/risk/score.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/src/runtime/index.d.ts +6 -0
  125. package/lib/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/src/screen/index.d.ts +3 -0
  127. package/lib/typescript/commonjs/src/screen/index.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/src/securitySuite/index.d.ts +6 -0
  129. package/lib/typescript/commonjs/src/securitySuite/index.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/src/storage/index.d.ts +2 -0
  131. package/lib/typescript/commonjs/src/storage/index.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/src/types/detection.d.ts +41 -0
  133. package/lib/typescript/commonjs/src/types/detection.d.ts.map +1 -0
  134. package/lib/typescript/module/docs/api-v1-proposal.d.ts +215 -0
  135. package/lib/typescript/module/docs/api-v1-proposal.d.ts.map +1 -0
  136. package/lib/typescript/module/src/SecureView.d.ts +1 -1
  137. package/lib/typescript/module/src/SecureView.d.ts.map +1 -1
  138. package/lib/typescript/module/src/clipboard/index.d.ts +2 -0
  139. package/lib/typescript/module/src/clipboard/index.d.ts.map +1 -0
  140. package/lib/typescript/module/src/crypto/index.d.ts +15 -0
  141. package/lib/typescript/module/src/crypto/index.d.ts.map +1 -0
  142. package/lib/typescript/module/src/device/index.d.ts +11 -0
  143. package/lib/typescript/module/src/device/index.d.ts.map +1 -0
  144. package/lib/typescript/module/src/errors.d.ts +17 -0
  145. package/lib/typescript/module/src/errors.d.ts.map +1 -0
  146. package/lib/typescript/module/src/helpers.d.ts.map +1 -1
  147. package/lib/typescript/module/src/index.d.ts +77 -24
  148. package/lib/typescript/module/src/index.d.ts.map +1 -1
  149. package/lib/typescript/module/src/integrity/index.d.ts +6 -0
  150. package/lib/typescript/module/src/integrity/index.d.ts.map +1 -0
  151. package/lib/typescript/module/src/jws.d.ts +44 -0
  152. package/lib/typescript/module/src/jws.d.ts.map +1 -0
  153. package/lib/typescript/module/src/legacy/cryptoOptions.d.ts +35 -0
  154. package/lib/typescript/module/src/legacy/cryptoOptions.d.ts.map +1 -0
  155. package/lib/typescript/module/src/native/bridge.d.ts +12 -0
  156. package/lib/typescript/module/src/native/bridge.d.ts.map +1 -0
  157. package/lib/typescript/module/src/network/index.d.ts +2 -0
  158. package/lib/typescript/module/src/network/index.d.ts.map +1 -0
  159. package/lib/typescript/module/src/risk/score.d.ts +12 -0
  160. package/lib/typescript/module/src/risk/score.d.ts.map +1 -0
  161. package/lib/typescript/module/src/runtime/index.d.ts +6 -0
  162. package/lib/typescript/module/src/runtime/index.d.ts.map +1 -0
  163. package/lib/typescript/module/src/screen/index.d.ts +3 -0
  164. package/lib/typescript/module/src/screen/index.d.ts.map +1 -0
  165. package/lib/typescript/module/src/securitySuite/index.d.ts +6 -0
  166. package/lib/typescript/module/src/securitySuite/index.d.ts.map +1 -0
  167. package/lib/typescript/module/src/storage/index.d.ts +2 -0
  168. package/lib/typescript/module/src/storage/index.d.ts.map +1 -0
  169. package/lib/typescript/module/src/types/detection.d.ts +41 -0
  170. package/lib/typescript/module/src/types/detection.d.ts.map +1 -0
  171. package/package.json +2 -10
  172. package/src/clipboard/index.ts +1 -0
  173. package/src/crypto/index.ts +40 -0
  174. package/src/device/index.ts +47 -0
  175. package/src/errors.ts +84 -0
  176. package/src/index.tsx +293 -195
  177. package/src/integrity/index.ts +46 -0
  178. package/src/jws.ts +213 -0
  179. package/src/legacy/cryptoOptions.ts +84 -0
  180. package/src/native/bridge.ts +37 -0
  181. package/src/network/index.ts +1 -0
  182. package/src/risk/score.ts +49 -0
  183. package/src/runtime/index.ts +43 -0
  184. package/src/screen/index.ts +2 -0
  185. package/src/securitySuite/index.ts +45 -0
  186. package/src/storage/index.ts +1 -0
  187. package/src/types/detection.ts +46 -0
  188. package/android/src/main/java/com/securitysuite/StorageEncryption.java +0 -52
  189. package/ios/StorageEncryption.swift +0 -89
@@ -0,0 +1,6 @@
1
+ import type { AppIntegrityReport, BuildType } from '../types/detection';
2
+ export declare const AppIntegrity: {
3
+ verify(): Promise<AppIntegrityReport>;
4
+ };
5
+ export type { AppIntegrityReport, BuildType };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrity/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAoCxE,eAAO,MAAM,YAAY;cACb,OAAO,CAAC,kBAAkB,CAAC;CAKtC,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,44 @@
1
+ export type JwsAlgorithm = 'HS256' | 'HS384' | 'HS512';
2
+ export type JwsPayload = string | Record<string, unknown> | unknown[] | number | boolean | null | undefined;
3
+ export type JwsHeaderValue = string | number | boolean | null;
4
+ export type JwsHeaders = Record<string, JwsHeaderValue>;
5
+ export interface GenerateJWSOptions {
6
+ payload?: JwsPayload;
7
+ algorithm?: JwsAlgorithm;
8
+ headers?: JwsHeaders;
9
+ secret: string;
10
+ }
11
+ export interface JwsFetchOptions {
12
+ algorithm?: JwsAlgorithm;
13
+ headers?: JwsHeaders;
14
+ secret: string;
15
+ payload?: JwsPayload;
16
+ detached?: boolean;
17
+ headerName?: string;
18
+ }
19
+ export declare function isEmptyJwsPayload(payload: JwsPayload | undefined): boolean;
20
+ /**
21
+ * Normalizes a JWS payload to the exact UTF-8 string used for signing.
22
+ * Empty payload cases return an empty string (never "null" or "undefined").
23
+ */
24
+ export declare function normalizeJwsPayload(payload: JwsPayload | undefined): string;
25
+ export declare function validateJwsAlgorithm(algorithm: string | undefined): JwsAlgorithm;
26
+ export declare function validateJwsSecret(secret: unknown): string;
27
+ export declare function validateJwsHeaderKey(key: string): void;
28
+ export declare function validateJwsHeaderValue(key: string, value: unknown): JwsHeaderValue;
29
+ export declare function validateJwsHeaders(headers: unknown): JwsHeaders;
30
+ /**
31
+ * Resolves the JWS algorithm from options and/or protected headers.
32
+ */
33
+ export declare function resolveJwsAlgorithm(algorithm: JwsAlgorithm | undefined, headers: JwsHeaders): JwsAlgorithm;
34
+ export interface NativeGenerateJWSOptions {
35
+ payload: string;
36
+ algorithm: JwsAlgorithm;
37
+ secret: string;
38
+ headers: JwsHeaders;
39
+ detached: boolean;
40
+ }
41
+ export declare function toNativeGenerateJWSOptions(options: GenerateJWSOptions, detached?: boolean): NativeGenerateJWSOptions;
42
+ export declare function toNativeJwsFetchOptions(jws: JwsFetchOptions): NativeGenerateJWSOptions;
43
+ export declare function assertCompactJwsShape(jws: string): void;
44
+ //# sourceMappingURL=jws.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jws.d.ts","sourceRoot":"","sources":["../../../../src/jws.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC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Ac/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,OAAO,EAAE,UAAU,GAClB,YAAY,CAqBd;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,UAAQ,GACf,wBAAwB,CAa1B;AAED,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,eAAe,GACnB,wBAAwB,CAY1B;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOvD"}
@@ -0,0 +1,35 @@
1
+ /** Shared crypto option types used by legacy exports and the Crypto namespace. */
2
+ export type KeyAgreementAlgorithm = 'X25519' | 'ECDH' | (string & {});
3
+ export type KeyType = 'OKP' | 'EC' | (string & {});
4
+ export type EncryptionKeyAlgorithm = 'AES-256' | 'AES' | (string & {});
5
+ export type HmacAlgorithm = 'HMAC-SHA-256' | 'HMAC-SHA-384' | 'HMAC-SHA-512' | 'HmacSHA256' | 'HmacSHA384' | 'HmacSHA512' | (string & {});
6
+ export type CipherAlgorithm = 'AES-GCM' | 'AES/GCM/NoPadding' | (string & {});
7
+ export interface CryptoOptions {
8
+ keyAgreementAlgorithm: KeyAgreementAlgorithm;
9
+ encryptionKeyAlgorithm: EncryptionKeyAlgorithm;
10
+ keyType?: KeyType;
11
+ hmacAlgorithm?: HmacAlgorithm;
12
+ cipher?: CipherAlgorithm;
13
+ tagLength?: number;
14
+ ivLength?: number;
15
+ /** @deprecated Use `keyType` instead. */
16
+ keyFactoryAlgorithm?: KeyType;
17
+ /** @deprecated Use `hmacAlgorithm` instead. */
18
+ hmacKeyAlgorithm?: HmacAlgorithm;
19
+ /** @deprecated Use `cipher` instead. */
20
+ cipherTransformation?: CipherAlgorithm;
21
+ /** @deprecated Use `tagLength` instead. */
22
+ gcmTagLength?: number;
23
+ /** @deprecated Use `ivLength` instead. */
24
+ gcmIvLength?: number;
25
+ }
26
+ export declare function toNativeCryptoOptions(options?: CryptoOptions | null): {
27
+ keyAgreementAlgorithm: "X25519" | (string & {}) | "ECDH";
28
+ keyFactoryAlgorithm: (string & {}) | "OKP" | "EC";
29
+ encryptionKeyAlgorithm: (string & {}) | "AES-256" | "AES";
30
+ hmacKeyAlgorithm: (string & {}) | "HMAC-SHA-256" | "HMAC-SHA-384" | "HMAC-SHA-512" | "HmacSHA256" | "HmacSHA384" | "HmacSHA512";
31
+ cipherTransformation: (string & {}) | "AES-GCM" | "AES/GCM/NoPadding";
32
+ gcmTagLength: number;
33
+ gcmIvLength: number;
34
+ };
35
+ //# sourceMappingURL=cryptoOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cryptoOptions.d.ts","sourceRoot":"","sources":["../../../../../src/legacy/cryptoOptions.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtE,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEnD,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,KAAK,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEvE,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,cAAc,GACd,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,mBAAmB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE9E,MAAM,WAAW,aAAa;IAC5B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,eAAe,CAAC;IACvC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAYD,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;;;;;;;;EAmCnE"}
@@ -0,0 +1,12 @@
1
+ export interface SecuritySuiteNativeModule {
2
+ getPublicKey(): Promise<string>;
3
+ getSharedKey(serverPK: string, options: Record<string, unknown>): Promise<string>;
4
+ establishSharedKey?(serverPK: string, options: Record<string, unknown>): Promise<void>;
5
+ runtimeDetect(): Promise<Record<string, unknown>>;
6
+ appIntegrityVerify(): Promise<Record<string, unknown>>;
7
+ deviceGetEnvironment(): Promise<Record<string, unknown>>;
8
+ deviceHasSecurityRisk(): Promise<boolean>;
9
+ [key: string]: unknown;
10
+ }
11
+ export declare function getNativeModule(): SecuritySuiteNativeModule;
12
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../../../src/native/bridge.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,yBAAyB;IACxC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClF,kBAAkB,CAAC,CACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAClD,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACvD,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,wBAAgB,eAAe,IAAI,yBAAyB,CAc3D"}
@@ -0,0 +1,2 @@
1
+ /** Phase 2+ namespace placeholder — fetch remains on legacy export for v0.9 compat. */
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/network/index.ts"],"names":[],"mappings":"AAAA,uFAAuF"}
@@ -0,0 +1,12 @@
1
+ import type { AppIntegrityReport, DeviceEnvironment, RiskLevel, RuntimeThreatReport } from '../types/detection';
2
+ export declare function computeRiskScore(input: {
3
+ isRooted: boolean;
4
+ isJailbroken: boolean;
5
+ runtime: RuntimeThreatReport;
6
+ app: AppIntegrityReport;
7
+ environment: DeviceEnvironment;
8
+ }): {
9
+ riskScore: number;
10
+ riskLevel: RiskLevel;
11
+ };
12
+ //# sourceMappingURL=score.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../../../../src/risk/score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,GAAG,EAAE,kBAAkB,CAAC;IACxB,WAAW,EAAE,iBAAiB,CAAC;CAChC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAmC9C"}
@@ -0,0 +1,6 @@
1
+ import type { RuntimeThreatReport } from '../types/detection';
2
+ export declare const RuntimeSecurity: {
3
+ detect(): Promise<RuntimeThreatReport>;
4
+ };
5
+ export type { RuntimeThreatReport };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAiC9D,eAAO,MAAM,eAAe;cAChB,OAAO,CAAC,mBAAmB,CAAC;CAKvC,CAAC;AAEF,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Phase 2+ namespace placeholder — SecureView remains on legacy export for v0.9 compat. */
2
+ export { SecureView } from '../SecureView';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/screen/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { SecurityReport } from '../types/detection';
2
+ export declare const SecuritySuite: {
3
+ getSecurityReport(): Promise<SecurityReport>;
4
+ };
5
+ export type { SecurityReport };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/securitySuite/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,eAAO,MAAM,aAAa;yBACG,OAAO,CAAC,cAAc,CAAC;CAiCnD,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Phase 2+ namespace placeholder — SecureStorage remains on the legacy export for v0.9 compat. */
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/storage/index.ts"],"names":[],"mappings":"AAAA,mGAAmG"}
@@ -0,0 +1,41 @@
1
+ export interface RuntimeThreatReport {
2
+ debuggerAttached: boolean;
3
+ fridaDetected: boolean;
4
+ xposedDetected?: boolean;
5
+ substrateDetected?: boolean;
6
+ magiskDetected?: boolean;
7
+ suspiciousLibraries: string[];
8
+ suspiciousPorts: number[];
9
+ }
10
+ export type BuildType = 'debug' | 'release' | 'testflight';
11
+ export interface AppIntegrityReport {
12
+ validSignature: boolean;
13
+ installerTrusted?: boolean;
14
+ debuggable: boolean;
15
+ tampered: boolean;
16
+ buildType: BuildType;
17
+ signingCertificateSha256?: string;
18
+ installerPackage?: string | null;
19
+ bundleIdentifier?: string;
20
+ }
21
+ export interface DeviceEnvironment {
22
+ isEmulator: boolean;
23
+ isSimulator: boolean;
24
+ indicators: string[];
25
+ }
26
+ export interface DeviceSecurityReport {
27
+ isRooted: boolean;
28
+ isJailbroken: boolean;
29
+ isEmulator: boolean;
30
+ isSimulator: boolean;
31
+ environmentIndicators: string[];
32
+ }
33
+ export type RiskLevel = 'low' | 'medium' | 'high';
34
+ export interface SecurityReport {
35
+ device: DeviceSecurityReport;
36
+ runtime: RuntimeThreatReport;
37
+ app: AppIntegrityReport;
38
+ riskScore: number;
39
+ riskLevel: RiskLevel;
40
+ }
41
+ //# sourceMappingURL=detection.d.ts.map
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mB,CAAC;IAC7B,GAAG,EAAE,kBAAkB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;CACtB"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Proposed v1.0 TypeScript API — reference implementation for integrators.
3
+ * This file documents the target public surface; not yet wired to native code.
4
+ */
5
+ export declare enum SecurityErrorCode {
6
+ ROOT_DETECTED = "ROOT_DETECTED",
7
+ JAILBREAK_DETECTED = "JAILBREAK_DETECTED",
8
+ FRIDA_DETECTED = "FRIDA_DETECTED",
9
+ EMULATOR_DETECTED = "EMULATOR_DETECTED",
10
+ APP_TAMPERED = "APP_TAMPERED",
11
+ SSL_PINNING_FAILED = "SSL_PINNING_FAILED",
12
+ SECURE_STORAGE_UNAVAILABLE = "SECURE_STORAGE_UNAVAILABLE",
13
+ CRYPTO_KEY_NOT_FOUND = "CRYPTO_KEY_NOT_FOUND",
14
+ BIOMETRIC_AUTH_FAILED = "BIOMETRIC_AUTH_FAILED",
15
+ JWS_SIGNING_FAILED = "JWS_SIGNING_FAILED"
16
+ }
17
+ export declare class SecurityError extends Error {
18
+ readonly code: SecurityErrorCode;
19
+ readonly details?: Record<string, unknown> | undefined;
20
+ constructor(code: SecurityErrorCode, message: string, details?: Record<string, unknown> | undefined);
21
+ }
22
+ export interface DeviceEnvironment {
23
+ isEmulator: boolean;
24
+ isSimulator: boolean;
25
+ indicators: string[];
26
+ }
27
+ export interface DeviceSecurityNamespace {
28
+ /** @deprecated alias — use isCompromised() */
29
+ hasSecurityRisk(): Promise<boolean>;
30
+ isCompromised(): Promise<boolean>;
31
+ isRooted(): Promise<boolean>;
32
+ isJailbroken(): Promise<boolean>;
33
+ getEnvironment(): Promise<DeviceEnvironment>;
34
+ }
35
+ export interface RuntimeThreatReport {
36
+ debuggerAttached: boolean;
37
+ fridaDetected: boolean;
38
+ xposedDetected?: boolean;
39
+ substrateDetected?: boolean;
40
+ suspiciousLibraries: string[];
41
+ suspiciousPorts: number[];
42
+ }
43
+ export interface RuntimeSecurityNamespace {
44
+ detect(): Promise<RuntimeThreatReport>;
45
+ }
46
+ export type BuildType = 'debug' | 'release' | 'testflight';
47
+ export interface AppIntegrityReport {
48
+ validSignature: boolean;
49
+ installerTrusted?: boolean;
50
+ debuggable: boolean;
51
+ tampered: boolean;
52
+ buildType: BuildType;
53
+ }
54
+ export interface AppIntegrityNamespace {
55
+ verify(): Promise<AppIntegrityReport>;
56
+ requestPlayIntegrity?(options: {
57
+ nonce: string;
58
+ }): Promise<{
59
+ token: string;
60
+ }>;
61
+ requestAppAttest?(options: {
62
+ challenge: string;
63
+ }): Promise<{
64
+ keyId: string;
65
+ attestationObject: string;
66
+ }>;
67
+ }
68
+ export type KeychainAccessibility = 'whenUnlocked' | 'whenUnlockedThisDeviceOnly' | 'afterFirstUnlock' | 'whenPasscodeSetThisDeviceOnly';
69
+ export interface SecureStorageOptions {
70
+ service?: string;
71
+ requireAuthentication?: boolean;
72
+ accessibility?: KeychainAccessibility;
73
+ useStrongBox?: boolean;
74
+ authenticationPrompt?: string;
75
+ }
76
+ export interface SecureStorageNamespace {
77
+ setItem(key: string, value: string, options?: SecureStorageOptions): Promise<void>;
78
+ getItem(key: string, options?: SecureStorageOptions): Promise<string | null>;
79
+ removeItem(key: string, options?: SecureStorageOptions): Promise<void>;
80
+ getAllKeys(options?: Pick<SecureStorageOptions, 'service'>): Promise<string[]>;
81
+ clear(options?: Pick<SecureStorageOptions, 'service'>): Promise<void>;
82
+ multiSet(pairs: Array<[string, string]>, options?: SecureStorageOptions): Promise<void>;
83
+ multiGet(keys: string[], options?: SecureStorageOptions): Promise<readonly [string, string | null][]>;
84
+ multiRemove(keys: string[], options?: SecureStorageOptions): Promise<void>;
85
+ }
86
+ export interface CryptoNamespace {
87
+ randomBytes(length: number): Promise<string>;
88
+ randomUUID(): Promise<string>;
89
+ getPublicKey(options?: {
90
+ alias?: string;
91
+ algorithm?: 'X25519' | 'P-256';
92
+ }): Promise<string>;
93
+ establishSharedKey(serverPublicKey: string, options?: {
94
+ alias?: string;
95
+ ephemeral?: boolean;
96
+ returnSharedKey?: boolean;
97
+ }): Promise<string | void>;
98
+ encrypt(plaintext: string, options?: {
99
+ alias?: string;
100
+ }): Promise<string>;
101
+ decrypt(ciphertext: string, options?: {
102
+ alias?: string;
103
+ }): Promise<string>;
104
+ generateKeyPair(options: {
105
+ alias: string;
106
+ algorithm: 'X25519' | 'P-256' | 'Ed25519';
107
+ }): Promise<void>;
108
+ rotateKey(alias: string): Promise<void>;
109
+ deleteKey(alias: string): Promise<void>;
110
+ }
111
+ export type JwsAlgorithm = 'HS256' | 'HS384' | 'HS512' | 'ES256' | 'EdDSA';
112
+ export interface ReplayProtectedHeaders {
113
+ timestamp: number;
114
+ nonce: string;
115
+ request_id: string;
116
+ }
117
+ export interface JWSNamespace {
118
+ createReplayProtectedHeaders(): Promise<ReplayProtectedHeaders>;
119
+ generate(options: {
120
+ algorithm?: JwsAlgorithm;
121
+ secret?: string;
122
+ keyAlias?: string;
123
+ payload?: string | Record<string, unknown>;
124
+ headers?: Record<string, string | number | boolean | null>;
125
+ detached?: boolean;
126
+ canonical?: boolean;
127
+ }): Promise<string>;
128
+ generateKeyPair(options: {
129
+ alias: string;
130
+ algorithm: 'ES256' | 'EdDSA';
131
+ }): Promise<void>;
132
+ exportPublicKey(alias: string): Promise<string>;
133
+ }
134
+ export interface SslPinningConfig {
135
+ validDomains: string[];
136
+ pins: {
137
+ primary: string[];
138
+ backup?: string[];
139
+ };
140
+ certificateTransparency?: boolean;
141
+ }
142
+ export interface NetworkLoggerConfig {
143
+ enabled: boolean;
144
+ redactHeaders?: string[];
145
+ redactBodyFields?: string[];
146
+ }
147
+ export interface SecureNetworkNamespace {
148
+ fetch(url: string, options: {
149
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
150
+ headers?: Record<string, string>;
151
+ body?: string | Record<string, unknown>;
152
+ timeout?: number;
153
+ sslPinning?: SslPinningConfig;
154
+ /** @deprecated use sslPinning */
155
+ certificates?: string[];
156
+ /** @deprecated use sslPinning */
157
+ validDomains?: string[];
158
+ jws?: Parameters<JWSNamespace['generate']>[0] & {
159
+ headerName?: string;
160
+ };
161
+ }): Promise<{
162
+ status: number;
163
+ response: string;
164
+ json(): Promise<unknown>;
165
+ duration: string;
166
+ }>;
167
+ }
168
+ export interface ScreenSecurityOptions {
169
+ screenshots?: boolean;
170
+ screenRecording?: boolean;
171
+ appSwitcherBlur?: boolean;
172
+ }
173
+ export interface ScreenSecurityNamespace {
174
+ enable(options: ScreenSecurityOptions): Promise<void>;
175
+ disable(): Promise<void>;
176
+ isScreenRecording(): Promise<boolean>;
177
+ }
178
+ export interface SecureClipboardNamespace {
179
+ setString(value: string, options?: {
180
+ expiresInMs?: number;
181
+ }): Promise<void>;
182
+ clear(): Promise<void>;
183
+ }
184
+ export type RiskLevel = 'low' | 'medium' | 'high';
185
+ export interface SecurityReport {
186
+ device: {
187
+ isRooted: boolean;
188
+ isJailbroken: boolean;
189
+ isEmulator: boolean;
190
+ isSimulator: boolean;
191
+ environmentIndicators: string[];
192
+ };
193
+ runtime: RuntimeThreatReport;
194
+ app: AppIntegrityReport;
195
+ riskScore: number;
196
+ riskLevel: RiskLevel;
197
+ }
198
+ export interface SecuritySuiteConfig {
199
+ secureNetwork?: {
200
+ requireHttps?: boolean;
201
+ logger?: NetworkLoggerConfig;
202
+ };
203
+ secureStorage?: {
204
+ accessibility?: KeychainAccessibility;
205
+ requireAuthentication?: boolean;
206
+ };
207
+ crypto?: {
208
+ returnSharedKey?: boolean;
209
+ };
210
+ }
211
+ export interface SecuritySuiteNamespace {
212
+ configure(config: SecuritySuiteConfig): void;
213
+ getSecurityReport(): Promise<SecurityReport>;
214
+ }
215
+ //# sourceMappingURL=api-v1-proposal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-v1-proposal.d.ts","sourceRoot":"","sources":["../../../../docs/api-v1-proposal.ts"],"names":[],"mappings":"AAAA;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C;IAC7B,GAAG,EAAE,kBAAkB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,mBAAmB,CAAA;KAAE,CAAC;IACzE,aAAa,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,qBAAqB,CAAC;QAAC,qBAAqB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC3F,MAAM,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,iBAAiB,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CAC9C"}
@@ -1,2 +1,2 @@
1
- export declare const SecureView: (props: any) => import("react/jsx-runtime").JSX.Element;
1
+ export declare const SecureView: (props: any) => import("react").JSX.Element;
2
2
  //# sourceMappingURL=SecureView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SecureView.d.ts","sourceRoot":"","sources":["../../../../src/SecureView.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,UAAU,UAAW,GAAG,4CASpC,CAAC"}
1
+ {"version":3,"file":"SecureView.d.ts","sourceRoot":"","sources":["../../../../src/SecureView.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,UAAU,GAAI,OAAO,GAAG,gCASpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Phase 2+ namespace placeholder. */
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/clipboard/index.ts"],"names":[],"mappings":"AAAA,sCAAsC"}
@@ -0,0 +1,15 @@
1
+ import { type CryptoOptions } from '../legacy/cryptoOptions';
2
+ export interface EstablishSharedKeyOptions extends CryptoOptions {
3
+ /** @deprecated Prefer native-only flow; set true only for legacy compatibility. */
4
+ returnSharedKey?: boolean;
5
+ }
6
+ export declare const Crypto: {
7
+ getPublicKey(): Promise<string>;
8
+ /**
9
+ * Derives a shared encryption key natively without returning it to JavaScript.
10
+ * Call `encryptBySharedKey` / `decryptBySharedKey` afterward (legacy bridge methods).
11
+ */
12
+ establishSharedKey(serverPublicKey: string, options?: EstablishSharedKeyOptions): Promise<string | void>;
13
+ };
14
+ export type { CryptoOptions } from '../legacy/cryptoOptions';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/crypto/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,mFAAmF;IACnF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM;oBACD,OAAO,CAAC,MAAM,CAAC;IAI/B;;;OAGG;wCAEgB,MAAM,YACb,yBAAyB,GAClC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAc1B,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { DeviceEnvironment } from '../types/detection';
2
+ export declare const DeviceSecurity: {
3
+ /** @deprecated Use `isCompromised()` or `SecuritySuite.getSecurityReport()`. */
4
+ hasSecurityRisk(): Promise<boolean>;
5
+ isCompromised(): Promise<boolean>;
6
+ isRooted(): Promise<boolean>;
7
+ isJailbroken(): Promise<boolean>;
8
+ getEnvironment(): Promise<DeviceEnvironment>;
9
+ };
10
+ export type { DeviceEnvironment };
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/device/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAY5D,eAAO,MAAM,cAAc;IACzB,gFAAgF;uBAC7D,OAAO,CAAC,OAAO,CAAC;qBAIlB,OAAO,CAAC,OAAO,CAAC;gBAIrB,OAAO,CAAC,OAAO,CAAC;oBAOZ,OAAO,CAAC,OAAO,CAAC;sBAOd,OAAO,CAAC,iBAAiB,CAAC;CAK7C,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare enum SecurityErrorCode {
2
+ ROOT_DETECTED = "ROOT_DETECTED",
3
+ JAILBREAK_DETECTED = "JAILBREAK_DETECTED",
4
+ FRIDA_DETECTED = "FRIDA_DETECTED",
5
+ DEBUGGER_DETECTED = "DEBUGGER_DETECTED",
6
+ SSL_PINNING_FAILED = "SSL_PINNING_FAILED",
7
+ SECURE_STORAGE_UNAVAILABLE = "SECURE_STORAGE_UNAVAILABLE",
8
+ CRYPTO_KEY_NOT_FOUND = "CRYPTO_KEY_NOT_FOUND"
9
+ }
10
+ export declare class SecurityError extends Error {
11
+ readonly code: SecurityErrorCode;
12
+ readonly details?: Record<string, unknown>;
13
+ constructor(code: SecurityErrorCode, message: string, details?: Record<string, unknown>);
14
+ }
15
+ export declare function isSecurityError(error: unknown): error is SecurityError;
16
+ export declare function mapNativeError(error: unknown): SecurityError | Error;
17
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/errors.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,0BAA0B,+BAA+B;IACzD,oBAAoB,yBAAyB;CAC9C;AAgBD,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAGzC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAOpC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,KAAK,CAuCpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,OAO5C,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,QAMtC,CAAC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAO5C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,QAMtC,CAAC"}