@umutcansu/react-native-pinvault 0.0.0-stage → 2.3.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.
- package/CHANGELOG.md +55 -0
- package/LICENSE +21 -0
- package/README.md +386 -2
- package/RNPinVault.podspec +43 -0
- package/android/build.gradle +68 -0
- package/android/consumer-rules.pro +25 -0
- package/android/src/main/AndroidManifest.xml +16 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/ConfigParser.kt +300 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/JsEnvironmentGuard.kt +53 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/NativeSecurity.kt +239 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/PinVaultModule.kt +410 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/PinVaultNetworking.kt +296 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/PinVaultPackage.kt +25 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/PinnedFetch.kt +131 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/ResultMapper.kt +188 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/StrictJson.kt +225 -0
- package/android/src/main/java/io/github/umutcansu/pinvault/reactnative/VaultTokenStore.kt +63 -0
- package/ios/Core/ConfigParser.swift +276 -0
- package/ios/Core/JSEnvironmentGuard.swift +129 -0
- package/ios/Core/NativeSecurity.swift +197 -0
- package/ios/Core/PinnedFetch.swift +119 -0
- package/ios/Core/ReactNetworking.swift +172 -0
- package/ios/Core/ResultMapper.swift +163 -0
- package/ios/Core/StrictJSON.swift +214 -0
- package/ios/Core/VaultTokenStore.swift +66 -0
- package/ios/PinVaultBridge.swift +412 -0
- package/ios/PinVaultReactNetworking.swift +47 -0
- package/ios/RNPinVault.h +7 -0
- package/ios/RNPinVault.mm +293 -0
- package/ios/RNPinVaultURLRequestHandler.mm +92 -0
- package/lib/module/NativePinVault.js +13 -0
- package/lib/module/NativePinVault.js.map +1 -0
- package/lib/module/index.js +312 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativePinVault.d.ts +50 -0
- package/lib/typescript/src/NativePinVault.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +150 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +346 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +128 -4
- package/src/NativePinVault.ts +72 -0
- package/src/index.ts +385 -0
- package/src/types.ts +351 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// PinVault for React Native: a thin, typed bridge over the native PinVault
|
|
4
|
+
// libraries. Pinning, keys, signature checks and vault decryption all stay
|
|
5
|
+
// native; this file only shapes inputs and outputs and runs the app's
|
|
6
|
+
// environment guard. Nothing here stores anything (no AsyncStorage) and nothing
|
|
7
|
+
// here logs outside development builds.
|
|
8
|
+
import NativePinVault from "./NativePinVault.js";
|
|
9
|
+
export * from "./types.js";
|
|
10
|
+
|
|
11
|
+
/** Error codes of rejected promises. */
|
|
12
|
+
|
|
13
|
+
/** A rejected PinVault call. `exception` is the native exception (class name + message). */
|
|
14
|
+
export class PinVaultError extends Error {
|
|
15
|
+
constructor(code, message, exception = null) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.name = 'PinVaultError';
|
|
18
|
+
this.code = code;
|
|
19
|
+
this.exception = exception;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const KNOWN_CODES = new Set(['E_INVALID_CONFIG', 'E_INVALID_ARGUMENT', 'E_NOT_STARTED', 'E_FETCH', 'E_NO_ACTIVITY', 'E_NATIVE', 'E_NETWORKING_NOT_PINNED']);
|
|
23
|
+
|
|
24
|
+
/** Native rejections → PinVaultError (keeps the native code, message and exception). */
|
|
25
|
+
function toPinVaultError(error) {
|
|
26
|
+
if (error instanceof PinVaultError) return error;
|
|
27
|
+
const e = error ?? {};
|
|
28
|
+
const code = typeof e.code === 'string' && KNOWN_CODES.has(e.code) ? e.code : 'E_NATIVE';
|
|
29
|
+
const message = typeof e.message === 'string' ? e.message : 'PinVault native call failed';
|
|
30
|
+
const info = e.userInfo ?? null;
|
|
31
|
+
const exception = info && typeof info.exceptionName === 'string' ? {
|
|
32
|
+
name: info.exceptionName,
|
|
33
|
+
message: typeof info.exceptionMessage === 'string' ? info.exceptionMessage : null
|
|
34
|
+
} : null;
|
|
35
|
+
return new PinVaultError(code, message, exception);
|
|
36
|
+
}
|
|
37
|
+
async function call(promise) {
|
|
38
|
+
try {
|
|
39
|
+
return await promise;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
throw toPinVaultError(error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ── Strict JSON ─────────────────────────────────────────────────────────────
|
|
46
|
+
// JSON.stringify silently drops functions and turns NaN into null; the native
|
|
47
|
+
// parser could then not refuse them. Anything that is not plain data is refused here.
|
|
48
|
+
|
|
49
|
+
/** The native parsers' nesting limit (the root object is level 0). */
|
|
50
|
+
const MAX_DEPTH = 8;
|
|
51
|
+
function assertPlainData(value, path, code, depth = 0) {
|
|
52
|
+
// Before recursing further: a deep structure would otherwise overflow the JS stack.
|
|
53
|
+
if (depth > MAX_DEPTH) throw new PinVaultError(code, `${path}: nested too deeply`);
|
|
54
|
+
if (value === null) return;
|
|
55
|
+
switch (typeof value) {
|
|
56
|
+
case 'string':
|
|
57
|
+
case 'boolean':
|
|
58
|
+
return;
|
|
59
|
+
case 'number':
|
|
60
|
+
if (!Number.isFinite(value)) throw new PinVaultError(code, `${path}: not a finite number`);
|
|
61
|
+
return;
|
|
62
|
+
case 'object':
|
|
63
|
+
{
|
|
64
|
+
if (Array.isArray(value)) {
|
|
65
|
+
value.forEach((item, i) => {
|
|
66
|
+
if (item === undefined) throw new PinVaultError(code, `${path}[${i}]: undefined in a list`);
|
|
67
|
+
assertPlainData(item, `${path}[${i}]`, code, depth + 1);
|
|
68
|
+
});
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const proto = Object.getPrototypeOf(value);
|
|
72
|
+
if (proto !== Object.prototype && proto !== null) {
|
|
73
|
+
throw new PinVaultError(code, `${path}: must be a plain object`);
|
|
74
|
+
}
|
|
75
|
+
for (const [k, v] of Object.entries(value)) {
|
|
76
|
+
if (v === undefined) continue; // an optional field left out
|
|
77
|
+
assertPlainData(v, `${path}.${k}`, code, depth + 1);
|
|
78
|
+
}
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
default:
|
|
82
|
+
throw new PinVaultError(code, `${path}: ${typeof value} is not allowed`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function strictJson(value, path, code) {
|
|
86
|
+
assertPlainData(value, path, code);
|
|
87
|
+
return JSON.stringify(value);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ── Environment guard ───────────────────────────────────────────────────────
|
|
91
|
+
|
|
92
|
+
export const DEFAULT_GUARD_TIMEOUT_MS = 5000;
|
|
93
|
+
let guardSubscription = null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Runs the app's guard with a timeout. Anything but a `true` within the time —
|
|
97
|
+
* `false`, another value, a thrown error, a rejected promise, no answer — is a refusal.
|
|
98
|
+
*/
|
|
99
|
+
export async function evaluateGuard(guard, operation, timeoutMs) {
|
|
100
|
+
let timer;
|
|
101
|
+
try {
|
|
102
|
+
const verdict = await Promise.race([Promise.resolve().then(() => guard(operation)), new Promise(resolve => {
|
|
103
|
+
timer = setTimeout(() => resolve(false), timeoutMs);
|
|
104
|
+
})]);
|
|
105
|
+
return verdict === true;
|
|
106
|
+
} catch (error) {
|
|
107
|
+
if (__DEV__) console.warn(`PinVault: environmentGuard threw for ${operation}; refused`, error);
|
|
108
|
+
return false;
|
|
109
|
+
} finally {
|
|
110
|
+
if (timer !== undefined) clearTimeout(timer);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const GUARDED_OPERATIONS = new Set(['INIT', 'ENROLL', 'FETCH_FILE', 'UNLOCK_FILE']);
|
|
114
|
+
function installGuard(guard, timeoutMs) {
|
|
115
|
+
guardSubscription?.remove();
|
|
116
|
+
guardSubscription = null;
|
|
117
|
+
if (!guard) return;
|
|
118
|
+
// The JS answer must arrive before the native deadline; leave it a little room.
|
|
119
|
+
const jsTimeout = Math.max(50, timeoutMs - 100);
|
|
120
|
+
guardSubscription = NativePinVault.onGuardRequest(request => {
|
|
121
|
+
const operation = request.operation;
|
|
122
|
+
if (!GUARDED_OPERATIONS.has(operation)) {
|
|
123
|
+
NativePinVault.answerGuard(request.requestId, false);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
void evaluateGuard(guard, operation, jsTimeout).then(allowed => NativePinVault.answerGuard(request.requestId, allowed));
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ── Start / config ──────────────────────────────────────────────────────────
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Starts PinVault (`PinVault.init(context, config)` / `PinVault.shared.start(config:)`).
|
|
134
|
+
* Fail closed: until it returns `{ type: 'ready' }`, every pinned request is refused.
|
|
135
|
+
* An invalid config rejects with `E_INVALID_CONFIG` (unknown keys and wrong types included).
|
|
136
|
+
*/
|
|
137
|
+
export async function start(config) {
|
|
138
|
+
if (config === null || typeof config !== 'object' || Array.isArray(config)) {
|
|
139
|
+
throw new PinVaultError('E_INVALID_CONFIG', 'config: must be an object');
|
|
140
|
+
}
|
|
141
|
+
const {
|
|
142
|
+
environmentGuard,
|
|
143
|
+
environmentGuardTimeoutMs,
|
|
144
|
+
...rest
|
|
145
|
+
} = config;
|
|
146
|
+
if (environmentGuard !== undefined && typeof environmentGuard !== 'function') {
|
|
147
|
+
throw new PinVaultError('E_INVALID_CONFIG', 'config.environmentGuard: must be a function');
|
|
148
|
+
}
|
|
149
|
+
const timeoutMs = environmentGuardTimeoutMs ?? DEFAULT_GUARD_TIMEOUT_MS;
|
|
150
|
+
if (typeof timeoutMs !== 'number' || !Number.isInteger(timeoutMs) || timeoutMs < 100 || timeoutMs > 30000) {
|
|
151
|
+
throw new PinVaultError('E_INVALID_CONFIG', 'config.environmentGuardTimeoutMs: an integer between 100 and 30000');
|
|
152
|
+
}
|
|
153
|
+
const nativeConfig = {
|
|
154
|
+
...rest
|
|
155
|
+
};
|
|
156
|
+
if (environmentGuard) nativeConfig.environmentGuard = {
|
|
157
|
+
timeoutMs
|
|
158
|
+
};
|
|
159
|
+
const json = strictJson(nativeConfig, 'config', 'E_INVALID_CONFIG');
|
|
160
|
+
installGuard(environmentGuard, timeoutMs);
|
|
161
|
+
return call(NativePinVault.start(json));
|
|
162
|
+
}
|
|
163
|
+
export const updateNow = () => call(NativePinVault.updateNow());
|
|
164
|
+
export const currentVersion = () => call(NativePinVault.currentVersion());
|
|
165
|
+
export const hostPinVersions = () => call(NativePinVault.hostPinVersions());
|
|
166
|
+
|
|
167
|
+
/** Active pins of a host (Base64, no `sha256/`), or null when the host has no entry. */
|
|
168
|
+
export async function pinsForHost(hostname) {
|
|
169
|
+
const result = await call(NativePinVault.pinsForHost(hostname));
|
|
170
|
+
return result.pins;
|
|
171
|
+
}
|
|
172
|
+
export const signingStatus = configApiId => call(NativePinVault.signingStatus(configApiId ?? null));
|
|
173
|
+
export const isForceUpdate = () => call(NativePinVault.isForceUpdate());
|
|
174
|
+
/** Drops the active pins; the next `start` begins again (watermarks kept). */
|
|
175
|
+
export const reset = () => call(NativePinVault.reset());
|
|
176
|
+
export const schedulePeriodicUpdates = intervalHours => call(NativePinVault.schedulePeriodicUpdates(intervalHours ?? null));
|
|
177
|
+
export const cancelPeriodicUpdates = () => call(NativePinVault.cancelPeriodicUpdates());
|
|
178
|
+
/** Library debug logs. Ignored (returns false) in release builds of the app. */
|
|
179
|
+
export const enableDebugLogging = () => call(NativePinVault.enableDebugLogging());
|
|
180
|
+
|
|
181
|
+
// ── Pinned HTTP ─────────────────────────────────────────────────────────────
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* A request through the native pinned client (`PinVault.getClient()` /
|
|
185
|
+
* `PinVault.shared.session()`): pin check, attestation token, pin-mismatch
|
|
186
|
+
* recovery. HTTPS only; it never falls back to an unpinned path. A pin
|
|
187
|
+
* mismatch rejects with `E_FETCH` (`exception.name` e.g. `SSLPeerUnverifiedException`).
|
|
188
|
+
*/
|
|
189
|
+
export async function fetch(url, init = {}) {
|
|
190
|
+
if (typeof url !== 'string') throw new PinVaultError('E_INVALID_ARGUMENT', 'url: must be a string');
|
|
191
|
+
if (init === null || typeof init !== 'object' || Array.isArray(init)) {
|
|
192
|
+
throw new PinVaultError('E_INVALID_ARGUMENT', 'init: must be an object');
|
|
193
|
+
}
|
|
194
|
+
const json = strictJson({
|
|
195
|
+
...init,
|
|
196
|
+
url
|
|
197
|
+
}, 'request', 'E_INVALID_ARGUMENT');
|
|
198
|
+
const response = await call(NativePinVault.fetch(json));
|
|
199
|
+
return {
|
|
200
|
+
...response,
|
|
201
|
+
ok: response.status >= 200 && response.status < 300
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ── Enrollment ──────────────────────────────────────────────────────────────
|
|
206
|
+
|
|
207
|
+
/** The device id PinVault sends (`ANDROID_ID` / `identifierForVendor`, lowercased). */
|
|
208
|
+
export const deviceId = () => call(NativePinVault.deviceId());
|
|
209
|
+
|
|
210
|
+
/** Token or enrollment-code enrollment. The token goes to native memory for this call only. */
|
|
211
|
+
export const enrollForResult = (token, label) => call(NativePinVault.enrollForResult(token, label ?? null));
|
|
212
|
+
export const autoEnrollForResult = () => call(NativePinVault.autoEnrollForResult());
|
|
213
|
+
export const checkPendingEnrollment = () => call(NativePinVault.checkPendingEnrollment());
|
|
214
|
+
export const isEnrolled = label => call(NativePinVault.isEnrolled(label ?? null));
|
|
215
|
+
export const isEnrollmentPending = label => call(NativePinVault.isEnrollmentPending(label ?? null));
|
|
216
|
+
export const enrollmentVerificationCode = label => call(NativePinVault.enrollmentVerificationCode(label ?? null));
|
|
217
|
+
export const enrolledClientCN = label => call(NativePinVault.enrolledClientCN(label ?? null));
|
|
218
|
+
export const enrolledClientNotAfter = label => call(NativePinVault.enrolledClientNotAfter(label ?? null));
|
|
219
|
+
export const unenroll = (label, options = {}) => call(NativePinVault.unenroll(label ?? null, options.wipeVaultFiles === true));
|
|
220
|
+
export const identityKeySecurityLevel = label => call(NativePinVault.identityKeySecurityLevel(label ?? null));
|
|
221
|
+
|
|
222
|
+
// ── Vault files ─────────────────────────────────────────────────────────────
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The access token of a `TOKEN` / `TOKEN_MTLS` file. Kept in native memory only
|
|
226
|
+
* (never written to disk, gone when the process ends); `null` forgets it.
|
|
227
|
+
*/
|
|
228
|
+
export const setVaultToken = (key, token) => call(NativePinVault.setVaultToken(key, token));
|
|
229
|
+
/** Forgets every vault token (e.g. on a `REENROLL_REQUIRED` event). Returns how many there were. */
|
|
230
|
+
export const clearVaultTokens = () => call(NativePinVault.clearVaultTokens());
|
|
231
|
+
|
|
232
|
+
/** Downloads and stores a file. `token` = `setVaultToken(key, token)` before the download. */
|
|
233
|
+
export const fetchFile = (key, options = {}) => call(NativePinVault.fetchFile(key, options.token ?? null));
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The stored copy (checked on every read), or null — `fileStatus` says why.
|
|
237
|
+
* Files behind the screen lock never open here: use `unlockFile`.
|
|
238
|
+
* Keep the content in memory only as long as you need it, and never log it.
|
|
239
|
+
*/
|
|
240
|
+
export const loadFile = (key, encoding = 'utf8') => call(NativePinVault.loadFile(key, encoding));
|
|
241
|
+
export const fileStatus = key => call(NativePinVault.fileStatus(key));
|
|
242
|
+
|
|
243
|
+
/** Shows the native screen-lock prompt (BiometricPrompt / LAContext), then returns the content. */
|
|
244
|
+
export const unlockFile = (key, prompt, encoding = 'utf8') => call(NativePinVault.unlockFile(key, strictJson({
|
|
245
|
+
...prompt,
|
|
246
|
+
encoding
|
|
247
|
+
}, 'prompt', 'E_INVALID_ARGUMENT')));
|
|
248
|
+
export const isFileLocked = key => call(NativePinVault.isFileLocked(key));
|
|
249
|
+
export const hasFile = key => call(NativePinVault.hasFile(key));
|
|
250
|
+
export const fileVersion = key => call(NativePinVault.fileVersion(key));
|
|
251
|
+
export const clearFile = key => call(NativePinVault.clearFile(key));
|
|
252
|
+
export const syncAllFiles = () => call(NativePinVault.syncAllFiles());
|
|
253
|
+
|
|
254
|
+
// ── Attestation ─────────────────────────────────────────────────────────────
|
|
255
|
+
|
|
256
|
+
export const attestNow = configApiId => call(NativePinVault.attestNow(configApiId ?? null));
|
|
257
|
+
/** `PinVault-Token` for your own client (a bearer credential: never log or store it). */
|
|
258
|
+
export const fetchAttestationToken = host => call(NativePinVault.fetchAttestationToken(host ?? null));
|
|
259
|
+
export const attestationStatus = configApiId => call(NativePinVault.attestationStatus(configApiId ?? null));
|
|
260
|
+
export const attestationHeaderName = () => 'PinVault-Token';
|
|
261
|
+
|
|
262
|
+
// ── Events ──────────────────────────────────────────────────────────────────
|
|
263
|
+
|
|
264
|
+
/** Connection telemetry (`onConnectionEvent`). Returns a subscription; call `remove()` when done. */
|
|
265
|
+
export function addConnectionListener(listener) {
|
|
266
|
+
return NativePinVault.onConnectionEvent(event => listener(event));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** Everything above as one object, like `PinVault.shared` / the Kotlin `PinVault` object. */
|
|
270
|
+
const PinVault = {
|
|
271
|
+
start,
|
|
272
|
+
updateNow,
|
|
273
|
+
currentVersion,
|
|
274
|
+
hostPinVersions,
|
|
275
|
+
pinsForHost,
|
|
276
|
+
signingStatus,
|
|
277
|
+
isForceUpdate,
|
|
278
|
+
reset,
|
|
279
|
+
schedulePeriodicUpdates,
|
|
280
|
+
cancelPeriodicUpdates,
|
|
281
|
+
enableDebugLogging,
|
|
282
|
+
fetch,
|
|
283
|
+
deviceId,
|
|
284
|
+
enrollForResult,
|
|
285
|
+
autoEnrollForResult,
|
|
286
|
+
checkPendingEnrollment,
|
|
287
|
+
isEnrolled,
|
|
288
|
+
isEnrollmentPending,
|
|
289
|
+
enrollmentVerificationCode,
|
|
290
|
+
enrolledClientCN,
|
|
291
|
+
enrolledClientNotAfter,
|
|
292
|
+
unenroll,
|
|
293
|
+
identityKeySecurityLevel,
|
|
294
|
+
setVaultToken,
|
|
295
|
+
clearVaultTokens,
|
|
296
|
+
fetchFile,
|
|
297
|
+
loadFile,
|
|
298
|
+
fileStatus,
|
|
299
|
+
unlockFile,
|
|
300
|
+
isFileLocked,
|
|
301
|
+
hasFile,
|
|
302
|
+
fileVersion,
|
|
303
|
+
clearFile,
|
|
304
|
+
syncAllFiles,
|
|
305
|
+
attestNow,
|
|
306
|
+
fetchAttestationToken,
|
|
307
|
+
attestationStatus,
|
|
308
|
+
attestationHeaderName,
|
|
309
|
+
addConnectionListener
|
|
310
|
+
};
|
|
311
|
+
export default PinVault;
|
|
312
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativePinVault","PinVaultError","Error","constructor","code","message","exception","name","KNOWN_CODES","Set","toPinVaultError","error","e","has","info","userInfo","exceptionName","exceptionMessage","call","promise","MAX_DEPTH","assertPlainData","value","path","depth","Number","isFinite","Array","isArray","forEach","item","i","undefined","proto","Object","getPrototypeOf","prototype","k","v","entries","strictJson","JSON","stringify","DEFAULT_GUARD_TIMEOUT_MS","guardSubscription","evaluateGuard","guard","operation","timeoutMs","timer","verdict","Promise","race","resolve","then","setTimeout","__DEV__","console","warn","clearTimeout","GUARDED_OPERATIONS","installGuard","remove","jsTimeout","Math","max","onGuardRequest","request","answerGuard","requestId","allowed","start","config","environmentGuard","environmentGuardTimeoutMs","rest","isInteger","nativeConfig","json","updateNow","currentVersion","hostPinVersions","pinsForHost","hostname","result","pins","signingStatus","configApiId","isForceUpdate","reset","schedulePeriodicUpdates","intervalHours","cancelPeriodicUpdates","enableDebugLogging","fetch","url","init","response","ok","status","deviceId","enrollForResult","token","label","autoEnrollForResult","checkPendingEnrollment","isEnrolled","isEnrollmentPending","enrollmentVerificationCode","enrolledClientCN","enrolledClientNotAfter","unenroll","options","wipeVaultFiles","identityKeySecurityLevel","setVaultToken","key","clearVaultTokens","fetchFile","loadFile","encoding","fileStatus","unlockFile","prompt","isFileLocked","hasFile","fileVersion","clearFile","syncAllFiles","attestNow","fetchAttestationToken","host","attestationStatus","attestationHeaderName","addConnectionListener","listener","onConnectionEvent","event","PinVault"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,cAAc,MAA6B,qBAAkB;AAsBpE,cAAc,YAAS;;AAEvB;;AAcA;AACA,OAAO,MAAMC,aAAa,SAASC,KAAK,CAAC;EAIvCC,WAAWA,CAACC,IAAuB,EAAEC,OAAe,EAAEC,SAAqC,GAAG,IAAI,EAAE;IAClG,KAAK,CAACD,OAAO,CAAC;IACd,IAAI,CAACE,IAAI,GAAG,eAAe;IAC3B,IAAI,CAACH,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACE,SAAS,GAAGA,SAAS;EAC5B;AACF;AAEA,MAAME,WAAgC,GAAG,IAAIC,GAAG,CAAC,CAC/C,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,eAAe,EACf,UAAU,EACV,yBAAyB,CAC1B,CAAC;;AAEF;AACA,SAASC,eAAeA,CAACC,KAAc,EAAiB;EACtD,IAAIA,KAAK,YAAYV,aAAa,EAAE,OAAOU,KAAK;EAChD,MAAMC,CAAC,GAAID,KAAK,IAAI,CAAC,CAA+D;EACpF,MAAMP,IAAI,GAAG,OAAOQ,CAAC,CAACR,IAAI,KAAK,QAAQ,IAAII,WAAW,CAACK,GAAG,CAACD,CAAC,CA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ACrBC;AACF,CAAU;AAEV,eAAeI,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type TurboModule, type CodegenTypes } from 'react-native';
|
|
2
|
+
export type GuardRequest = {
|
|
3
|
+
requestId: string;
|
|
4
|
+
operation: string;
|
|
5
|
+
};
|
|
6
|
+
export interface Spec extends TurboModule {
|
|
7
|
+
start(configJson: string): Promise<CodegenTypes.UnsafeObject>;
|
|
8
|
+
updateNow(): Promise<CodegenTypes.UnsafeObject>;
|
|
9
|
+
currentVersion(): Promise<number>;
|
|
10
|
+
hostPinVersions(): Promise<CodegenTypes.UnsafeObject>;
|
|
11
|
+
pinsForHost(hostname: string): Promise<CodegenTypes.UnsafeObject>;
|
|
12
|
+
signingStatus(configApiId: string | null): Promise<CodegenTypes.UnsafeObject>;
|
|
13
|
+
isForceUpdate(): Promise<boolean>;
|
|
14
|
+
reset(): Promise<void>;
|
|
15
|
+
schedulePeriodicUpdates(intervalHours: number | null): Promise<boolean>;
|
|
16
|
+
cancelPeriodicUpdates(): Promise<void>;
|
|
17
|
+
enableDebugLogging(): Promise<boolean>;
|
|
18
|
+
fetch(requestJson: string): Promise<CodegenTypes.UnsafeObject>;
|
|
19
|
+
deviceId(): Promise<string | null>;
|
|
20
|
+
enrollForResult(token: string, label: string | null): Promise<CodegenTypes.UnsafeObject>;
|
|
21
|
+
autoEnrollForResult(): Promise<CodegenTypes.UnsafeObject>;
|
|
22
|
+
checkPendingEnrollment(): Promise<CodegenTypes.UnsafeObject>;
|
|
23
|
+
isEnrolled(label: string | null): Promise<boolean>;
|
|
24
|
+
isEnrollmentPending(label: string | null): Promise<boolean>;
|
|
25
|
+
enrollmentVerificationCode(label: string | null): Promise<string | null>;
|
|
26
|
+
enrolledClientCN(label: string | null): Promise<string | null>;
|
|
27
|
+
enrolledClientNotAfter(label: string | null): Promise<number | null>;
|
|
28
|
+
unenroll(label: string | null, wipeVaultFiles: boolean): Promise<void>;
|
|
29
|
+
identityKeySecurityLevel(label: string | null): Promise<string | null>;
|
|
30
|
+
setVaultToken(key: string, token: string | null): Promise<void>;
|
|
31
|
+
clearVaultTokens(): Promise<number>;
|
|
32
|
+
fetchFile(key: string, token: string | null): Promise<CodegenTypes.UnsafeObject>;
|
|
33
|
+
loadFile(key: string, encoding: string): Promise<string | null>;
|
|
34
|
+
fileStatus(key: string): Promise<string>;
|
|
35
|
+
unlockFile(key: string, promptJson: string): Promise<CodegenTypes.UnsafeObject>;
|
|
36
|
+
isFileLocked(key: string): Promise<boolean>;
|
|
37
|
+
hasFile(key: string): Promise<boolean>;
|
|
38
|
+
fileVersion(key: string): Promise<number>;
|
|
39
|
+
clearFile(key: string): Promise<void>;
|
|
40
|
+
syncAllFiles(): Promise<CodegenTypes.UnsafeObject>;
|
|
41
|
+
attestNow(configApiId: string | null): Promise<CodegenTypes.UnsafeObject>;
|
|
42
|
+
fetchAttestationToken(host: string | null): Promise<CodegenTypes.UnsafeObject>;
|
|
43
|
+
attestationStatus(configApiId: string | null): Promise<CodegenTypes.UnsafeObject>;
|
|
44
|
+
answerGuard(requestId: string, allowed: boolean): void;
|
|
45
|
+
readonly onConnectionEvent: CodegenTypes.EventEmitter<CodegenTypes.UnsafeObject>;
|
|
46
|
+
readonly onGuardRequest: CodegenTypes.EventEmitter<GuardRequest>;
|
|
47
|
+
}
|
|
48
|
+
declare const _default: Spec;
|
|
49
|
+
export default _default;
|
|
50
|
+
//# sourceMappingURL=NativePinVault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativePinVault.d.ts","sourceRoot":"","sources":["../../../src/NativePinVault.ts"],"names":[],"mappings":"AAQA,OAAO,E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UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAChF,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAGnD,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAC1E,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAC/E,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAGlF,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAGvD,QAAQ,CAAC,iBAAiB,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IACjF,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;CAClE;;AAED,wBAAoE"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { AttestationStatus, AttestationTokenResult, ClientCertEnrollmentResult, ContentEncoding, EnvironmentGuard, GuardedOperation, InitResult, KeySecurityLevel, PinVaultConfig, PinVaultConnectionEvent, PinVaultRequestInit, PinVaultResponse, SigningStatus, UpdateResult, VaultFileResult, VaultFileStatus, VaultFileUnlockPrompt, VaultFileUnlockResult } from './types.js';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
/** Error codes of rejected promises. */
|
|
4
|
+
export type PinVaultErrorCode =
|
|
5
|
+
/** The config (or a request) was refused by the strict native parser or a builder rule. */
|
|
6
|
+
'E_INVALID_CONFIG' | 'E_INVALID_ARGUMENT'
|
|
7
|
+
/** An operation that needs `start()` first. */
|
|
8
|
+
| 'E_NOT_STARTED'
|
|
9
|
+
/** The pinned request failed: pin mismatch, TLS, network, timeout, size limit. */
|
|
10
|
+
| 'E_FETCH' | 'E_NO_ACTIVITY' | 'E_NATIVE'
|
|
11
|
+
/** `requirePinnedReactNativeNetworking`: React Native's own networking is not pinned. */
|
|
12
|
+
| 'E_NETWORKING_NOT_PINNED';
|
|
13
|
+
/** A rejected PinVault call. `exception` is the native exception (class name + message). */
|
|
14
|
+
export declare class PinVaultError extends Error {
|
|
15
|
+
readonly code: PinVaultErrorCode;
|
|
16
|
+
readonly exception: {
|
|
17
|
+
name: string;
|
|
18
|
+
message: string | null;
|
|
19
|
+
} | null;
|
|
20
|
+
constructor(code: PinVaultErrorCode, message: string, exception?: PinVaultError['exception']);
|
|
21
|
+
}
|
|
22
|
+
export declare const DEFAULT_GUARD_TIMEOUT_MS = 5000;
|
|
23
|
+
/**
|
|
24
|
+
* Runs the app's guard with a timeout. Anything but a `true` within the time —
|
|
25
|
+
* `false`, another value, a thrown error, a rejected promise, no answer — is a refusal.
|
|
26
|
+
*/
|
|
27
|
+
export declare function evaluateGuard(guard: EnvironmentGuard, operation: GuardedOperation, timeoutMs: number): Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Starts PinVault (`PinVault.init(context, config)` / `PinVault.shared.start(config:)`).
|
|
30
|
+
* Fail closed: until it returns `{ type: 'ready' }`, every pinned request is refused.
|
|
31
|
+
* An invalid config rejects with `E_INVALID_CONFIG` (unknown keys and wrong types included).
|
|
32
|
+
*/
|
|
33
|
+
export declare function start(config: PinVaultConfig): Promise<InitResult>;
|
|
34
|
+
export declare const updateNow: () => Promise<UpdateResult>;
|
|
35
|
+
export declare const currentVersion: () => Promise<number>;
|
|
36
|
+
export declare const hostPinVersions: () => Promise<Record<string, number>>;
|
|
37
|
+
/** Active pins of a host (Base64, no `sha256/`), or null when the host has no entry. */
|
|
38
|
+
export declare function pinsForHost(hostname: string): Promise<string[] | null>;
|
|
39
|
+
export declare const signingStatus: (configApiId?: string) => Promise<SigningStatus | null>;
|
|
40
|
+
export declare const isForceUpdate: () => Promise<boolean>;
|
|
41
|
+
/** Drops the active pins; the next `start` begins again (watermarks kept). */
|
|
42
|
+
export declare const reset: () => Promise<void>;
|
|
43
|
+
export declare const schedulePeriodicUpdates: (intervalHours?: number) => Promise<boolean>;
|
|
44
|
+
export declare const cancelPeriodicUpdates: () => Promise<void>;
|
|
45
|
+
/** Library debug logs. Ignored (returns false) in release builds of the app. */
|
|
46
|
+
export declare const enableDebugLogging: () => Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* A request through the native pinned client (`PinVault.getClient()` /
|
|
49
|
+
* `PinVault.shared.session()`): pin check, attestation token, pin-mismatch
|
|
50
|
+
* recovery. HTTPS only; it never falls back to an unpinned path. A pin
|
|
51
|
+
* mismatch rejects with `E_FETCH` (`exception.name` e.g. `SSLPeerUnverifiedException`).
|
|
52
|
+
*/
|
|
53
|
+
export declare function fetch(url: string, init?: PinVaultRequestInit): Promise<PinVaultResponse>;
|
|
54
|
+
/** The device id PinVault sends (`ANDROID_ID` / `identifierForVendor`, lowercased). */
|
|
55
|
+
export declare const deviceId: () => Promise<string | null>;
|
|
56
|
+
/** Token or enrollment-code enrollment. The token goes to native memory for this call only. */
|
|
57
|
+
export declare const enrollForResult: (token: string, label?: string) => Promise<ClientCertEnrollmentResult>;
|
|
58
|
+
export declare const autoEnrollForResult: () => Promise<ClientCertEnrollmentResult>;
|
|
59
|
+
export declare const checkPendingEnrollment: () => Promise<ClientCertEnrollmentResult>;
|
|
60
|
+
export declare const isEnrolled: (label?: string) => Promise<boolean>;
|
|
61
|
+
export declare const isEnrollmentPending: (label?: string) => Promise<boolean>;
|
|
62
|
+
export declare const enrollmentVerificationCode: (label?: string) => Promise<string | null>;
|
|
63
|
+
export declare const enrolledClientCN: (label?: string) => Promise<string | null>;
|
|
64
|
+
export declare const enrolledClientNotAfter: (label?: string) => Promise<number | null>;
|
|
65
|
+
export declare const unenroll: (label?: string, options?: {
|
|
66
|
+
wipeVaultFiles?: boolean;
|
|
67
|
+
}) => Promise<void>;
|
|
68
|
+
export declare const identityKeySecurityLevel: (label?: string) => Promise<KeySecurityLevel | null>;
|
|
69
|
+
/**
|
|
70
|
+
* The access token of a `TOKEN` / `TOKEN_MTLS` file. Kept in native memory only
|
|
71
|
+
* (never written to disk, gone when the process ends); `null` forgets it.
|
|
72
|
+
*/
|
|
73
|
+
export declare const setVaultToken: (key: string, token: string | null) => Promise<void>;
|
|
74
|
+
/** Forgets every vault token (e.g. on a `REENROLL_REQUIRED` event). Returns how many there were. */
|
|
75
|
+
export declare const clearVaultTokens: () => Promise<number>;
|
|
76
|
+
/** Downloads and stores a file. `token` = `setVaultToken(key, token)` before the download. */
|
|
77
|
+
export declare const fetchFile: (key: string, options?: {
|
|
78
|
+
token?: string;
|
|
79
|
+
}) => Promise<VaultFileResult>;
|
|
80
|
+
/**
|
|
81
|
+
* The stored copy (checked on every read), or null — `fileStatus` says why.
|
|
82
|
+
* Files behind the screen lock never open here: use `unlockFile`.
|
|
83
|
+
* Keep the content in memory only as long as you need it, and never log it.
|
|
84
|
+
*/
|
|
85
|
+
export declare const loadFile: (key: string, encoding?: ContentEncoding) => Promise<string | null>;
|
|
86
|
+
export declare const fileStatus: (key: string) => Promise<VaultFileStatus>;
|
|
87
|
+
/** Shows the native screen-lock prompt (BiometricPrompt / LAContext), then returns the content. */
|
|
88
|
+
export declare const unlockFile: (key: string, prompt: VaultFileUnlockPrompt, encoding?: ContentEncoding) => Promise<VaultFileUnlockResult>;
|
|
89
|
+
export declare const isFileLocked: (key: string) => Promise<boolean>;
|
|
90
|
+
export declare const hasFile: (key: string) => Promise<boolean>;
|
|
91
|
+
export declare const fileVersion: (key: string) => Promise<number>;
|
|
92
|
+
export declare const clearFile: (key: string) => Promise<void>;
|
|
93
|
+
export declare const syncAllFiles: () => Promise<Record<string, VaultFileResult>>;
|
|
94
|
+
export declare const attestNow: (configApiId?: string) => Promise<AttestationStatus>;
|
|
95
|
+
/** `PinVault-Token` for your own client (a bearer credential: never log or store it). */
|
|
96
|
+
export declare const fetchAttestationToken: (host?: string) => Promise<AttestationTokenResult>;
|
|
97
|
+
export declare const attestationStatus: (configApiId?: string) => Promise<AttestationStatus>;
|
|
98
|
+
export declare const attestationHeaderName: () => string;
|
|
99
|
+
/** Connection telemetry (`onConnectionEvent`). Returns a subscription; call `remove()` when done. */
|
|
100
|
+
export declare function addConnectionListener(listener: (event: PinVaultConnectionEvent) => void): {
|
|
101
|
+
remove(): void;
|
|
102
|
+
};
|
|
103
|
+
/** Everything above as one object, like `PinVault.shared` / the Kotlin `PinVault` object. */
|
|
104
|
+
declare const PinVault: {
|
|
105
|
+
readonly start: typeof start;
|
|
106
|
+
readonly updateNow: () => Promise<UpdateResult>;
|
|
107
|
+
readonly currentVersion: () => Promise<number>;
|
|
108
|
+
readonly hostPinVersions: () => Promise<Record<string, number>>;
|
|
109
|
+
readonly pinsForHost: typeof pinsForHost;
|
|
110
|
+
readonly signingStatus: (configApiId?: string) => Promise<SigningStatus | null>;
|
|
111
|
+
readonly isForceUpdate: () => Promise<boolean>;
|
|
112
|
+
readonly reset: () => Promise<void>;
|
|
113
|
+
readonly schedulePeriodicUpdates: (intervalHours?: number) => Promise<boolean>;
|
|
114
|
+
readonly cancelPeriodicUpdates: () => Promise<void>;
|
|
115
|
+
readonly enableDebugLogging: () => Promise<boolean>;
|
|
116
|
+
readonly fetch: typeof fetch;
|
|
117
|
+
readonly deviceId: () => Promise<string | null>;
|
|
118
|
+
readonly enrollForResult: (token: string, label?: string) => Promise<ClientCertEnrollmentResult>;
|
|
119
|
+
readonly autoEnrollForResult: () => Promise<ClientCertEnrollmentResult>;
|
|
120
|
+
readonly checkPendingEnrollment: () => Promise<ClientCertEnrollmentResult>;
|
|
121
|
+
readonly isEnrolled: (label?: string) => Promise<boolean>;
|
|
122
|
+
readonly isEnrollmentPending: (label?: string) => Promise<boolean>;
|
|
123
|
+
readonly enrollmentVerificationCode: (label?: string) => Promise<string | null>;
|
|
124
|
+
readonly enrolledClientCN: (label?: string) => Promise<string | null>;
|
|
125
|
+
readonly enrolledClientNotAfter: (label?: string) => Promise<number | null>;
|
|
126
|
+
readonly unenroll: (label?: string, options?: {
|
|
127
|
+
wipeVaultFiles?: boolean;
|
|
128
|
+
}) => Promise<void>;
|
|
129
|
+
readonly identityKeySecurityLevel: (label?: string) => Promise<KeySecurityLevel | null>;
|
|
130
|
+
readonly setVaultToken: (key: string, token: string | null) => Promise<void>;
|
|
131
|
+
readonly clearVaultTokens: () => Promise<number>;
|
|
132
|
+
readonly fetchFile: (key: string, options?: {
|
|
133
|
+
token?: string;
|
|
134
|
+
}) => Promise<VaultFileResult>;
|
|
135
|
+
readonly loadFile: (key: string, encoding?: ContentEncoding) => Promise<string | null>;
|
|
136
|
+
readonly fileStatus: (key: string) => Promise<VaultFileStatus>;
|
|
137
|
+
readonly unlockFile: (key: string, prompt: VaultFileUnlockPrompt, encoding?: ContentEncoding) => Promise<VaultFileUnlockResult>;
|
|
138
|
+
readonly isFileLocked: (key: string) => Promise<boolean>;
|
|
139
|
+
readonly hasFile: (key: string) => Promise<boolean>;
|
|
140
|
+
readonly fileVersion: (key: string) => Promise<number>;
|
|
141
|
+
readonly clearFile: (key: string) => Promise<void>;
|
|
142
|
+
readonly syncAllFiles: () => Promise<Record<string, VaultFileResult>>;
|
|
143
|
+
readonly attestNow: (configApiId?: string) => Promise<AttestationStatus>;
|
|
144
|
+
readonly fetchAttestationToken: (host?: string) => Promise<AttestationTokenResult>;
|
|
145
|
+
readonly attestationStatus: (configApiId?: string) => Promise<AttestationStatus>;
|
|
146
|
+
readonly attestationHeaderName: () => string;
|
|
147
|
+
readonly addConnectionListener: typeof addConnectionListener;
|
|
148
|
+
};
|
|
149
|
+
export default PinVault;
|
|
150
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,YAAS,CAAC;AAEjB,cAAc,YAAS,CAAC;AAExB,wCAAwC;AACxC,MAAM,MAAM,iBAAiB;AAC3B,2FAA2F;AACzF,kBAAkB,GAClB,oBAAoB;AACtB,+CAA+C;GAC7C,eAAe;AACjB,kFAAkF;GAChF,SAAS,GACT,eAAe,GACf,UAAU;AACZ,yFAAyF;GACvF,yBAAyB,CAAC;AAE9B,4FAA4F;AAC5F,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;gBAExD,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,aAAa,CAAC,WAAW,CAAQ;CAMnG;AAqFD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAI7C;;;GAGG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,gBAAgB,EACvB,SAAS,EAAE,gBAAg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