ribaunt 0.2.4 → 0.2.6
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 +53 -11
- package/dist/cjs/index.d.ts +103 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +466 -44
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/redis.d.ts +16 -0
- package/dist/cjs/redis.d.ts.map +1 -1
- package/dist/cjs/redis.js +30 -0
- package/dist/cjs/redis.js.map +1 -1
- package/dist/cjs/risk.d.ts +4 -0
- package/dist/cjs/risk.d.ts.map +1 -1
- package/dist/cjs/risk.js +4 -0
- package/dist/cjs/risk.js.map +1 -1
- package/dist/hash-wasm.js +2671 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +429 -43
- package/dist/index.js.map +1 -1
- package/dist/redis.d.ts +16 -0
- package/dist/redis.d.ts.map +1 -1
- package/dist/redis.js +30 -0
- package/dist/redis.js.map +1 -1
- package/dist/risk.d.ts +4 -0
- package/dist/risk.d.ts.map +1 -1
- package/dist/risk.js +4 -0
- package/dist/risk.js.map +1 -1
- package/dist/solver-worker.d.ts.map +1 -1
- package/dist/solver-worker.js +17 -2
- package/dist/solver-worker.js.map +1 -1
- package/dist/solver.d.ts +23 -1
- package/dist/solver.d.ts.map +1 -1
- package/dist/solver.js +176 -1
- package/dist/solver.js.map +1 -1
- package/dist/wasm-solver.d.ts +29 -0
- package/dist/wasm-solver.d.ts.map +1 -1
- package/dist/wasm-solver.js +39 -5
- package/dist/wasm-solver.js.map +1 -1
- package/dist/widget-browser.d.ts +1 -1
- package/dist/widget-browser.d.ts.map +1 -1
- package/dist/widget-browser.js +1 -1
- package/dist/widget-browser.js.map +1 -1
- package/dist/widget-react.d.ts.map +1 -1
- package/dist/widget-react.js +12 -0
- package/dist/widget-react.js.map +1 -1
- package/dist/worker-client.d.ts +20 -1
- package/dist/worker-client.d.ts.map +1 -1
- package/dist/worker-client.js +18 -0
- package/dist/worker-client.js.map +1 -1
- package/package.json +9 -3
- package/SECURITY.md +0 -36
- package/demo/lib/ribaunt-solver.wasm +0 -0
- package/demo/lib/solver-worker.js +0 -174
- package/demo/lib/solver-worker.js.map +0 -1
- package/demo/lib/solver.js +0 -135
- package/demo/lib/solver.js.map +0 -1
- package/demo/lib/wasm-solver.js +0 -296
- package/demo/lib/wasm-solver.js.map +0 -1
- package/demo/lib/widget-browser.js +0 -9
- package/demo/lib/widget-browser.js.map +0 -1
- package/demo/lib/widget.js +0 -942
- package/demo/lib/widget.js.map +0 -1
- package/demo/lib/worker-client.js +0 -128
- package/demo/lib/worker-client.js.map +0 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Ribaunt is a stateless proof-of-work CAPTCHA library for Node.js and modern brow
|
|
|
15
15
|
- Stateless challenge tokens signed with your `RIBAUNT_SECRET`
|
|
16
16
|
- Browser widget for plain HTML apps
|
|
17
17
|
- React and Next.js-friendly wrapper via `ribaunt/widget-react`
|
|
18
|
-
- Server helpers for creating, solving, and verifying PoW challenges
|
|
18
|
+
- Server helpers for creating, solving, and verifying PoW challenges — `sha256` default with opt-in `argon2id` memory-hard
|
|
19
19
|
- Programmable risk engine (`assess()`) with caller-supplied signals, pluggable scorers, and `allow`/`challenge`/`block` policy
|
|
20
20
|
- Default process-local replay protection with support for remote replay stores
|
|
21
21
|
- CSS custom properties for theming
|
|
@@ -146,7 +146,7 @@ const challenges = await createChallenge(5, 4, 120);
|
|
|
146
146
|
|
|
147
147
|
| Parameter | Default | Description |
|
|
148
148
|
| --- | --- | --- |
|
|
149
|
-
| `difficulty` | `5` | Number of leading zeros required in the
|
|
149
|
+
| `difficulty` | `5` | Number of leading zeros required in the hash. Higher values increase solve time (SHA-256 `1..64`, Argon2id `1..8`). |
|
|
150
150
|
| `amount` | `4` | Number of challenges to create. |
|
|
151
151
|
| `ttlSeconds` | `30` | Challenge token lifetime in seconds. |
|
|
152
152
|
|
|
@@ -174,24 +174,27 @@ const challenges = await createChallenge({
|
|
|
174
174
|
For machine-to-machine checks, benchmark the Node client and send the same calibration shape:
|
|
175
175
|
|
|
176
176
|
```ts
|
|
177
|
-
import { calibrateNode } from 'ribaunt';
|
|
177
|
+
import { calibrateNode } from 'ribaunt'; // SHA-256
|
|
178
|
+
import { calibrateArgonNode } from 'ribaunt'; // Argon2id (memory-hard, ~6ms/hash)
|
|
178
179
|
|
|
179
180
|
const calibration = calibrateNode();
|
|
181
|
+
const argonCalibration = await calibrateArgonNode();
|
|
180
182
|
```
|
|
181
183
|
|
|
182
184
|
Browser calibration is also available from the widget entry point:
|
|
183
185
|
|
|
184
186
|
```ts
|
|
185
|
-
import { calibrateBrowser } from 'ribaunt/widget';
|
|
187
|
+
import { calibrateBrowser, calibrateArgonBrowser } from 'ribaunt/widget';
|
|
186
188
|
|
|
187
189
|
const calibration = await calibrateBrowser();
|
|
190
|
+
const argonCalibration = await calibrateArgonBrowser();
|
|
188
191
|
```
|
|
189
192
|
|
|
190
|
-
Both environments expose `calibrateClient` as
|
|
193
|
+
Both environments expose `calibrateClient` / `calibrateArgonClient` as cross-environment aliases:
|
|
191
194
|
|
|
192
195
|
```ts
|
|
193
|
-
import { calibrateClient } from 'ribaunt'; // Node
|
|
194
|
-
import { calibrateClient } from 'ribaunt/widget'; // browser
|
|
196
|
+
import { calibrateClient, calibrateArgonClient } from 'ribaunt'; // Node
|
|
197
|
+
import { calibrateClient, calibrateArgonClient } from 'ribaunt/widget'; // browser
|
|
195
198
|
```
|
|
196
199
|
|
|
197
200
|
### `selectWorkload(options)`
|
|
@@ -207,7 +210,16 @@ const workload = selectWorkload({
|
|
|
207
210
|
minDifficulty: 3,
|
|
208
211
|
maxDifficulty: 6,
|
|
209
212
|
});
|
|
210
|
-
// { difficulty: 3, amount: 5, estimatedAttempts: 20480 }
|
|
213
|
+
// { difficulty: 3, amount: 5, estimatedAttempts: 20480, algorithm: 'sha256' }
|
|
214
|
+
|
|
215
|
+
// Argon2id — profile abstracts m/t/p, workload stays device-aware:
|
|
216
|
+
const argonWorkload = selectWorkload({
|
|
217
|
+
algorithm: 'argon2id',
|
|
218
|
+
argonProfile: 'mobile', // 'mobile' | 'standard' → {m:8192,t:1,p:1} (high gated)
|
|
219
|
+
calibration: await calibrateArgonNode(),
|
|
220
|
+
targetDurationMs: 750,
|
|
221
|
+
});
|
|
222
|
+
// { difficulty: 1, amount: 5, estimatedAttempts: 80, algorithm:'argon2id', argon:{m:8192,t:1,p:1} }
|
|
211
223
|
```
|
|
212
224
|
|
|
213
225
|
### `assess(options)` — Risk Engine
|
|
@@ -322,15 +334,45 @@ const result = await verifySolution(tokens, solutions, { onEvent });
|
|
|
322
334
|
|
|
323
335
|
`verify-failure` events carry the same `reason` values as `VerifySolutionResult` (`invalid-token`, `expired-token`, `invalid-solution`, `context-mismatch`, `replay-detected`, `replay-store-unavailable`, `configuration-error`). Add aggregation over Windows, StatsD, or Prometheus yourself — Ribaunt only emits raw events.
|
|
324
336
|
|
|
325
|
-
### `solveChallenge(token, options?)`
|
|
337
|
+
### `solveChallenge(token, options?)` / `solveChallengeAsync(token, options?)`
|
|
326
338
|
|
|
327
|
-
|
|
339
|
+
`solveChallenge` solves SHA-256 challenges synchronously. This is mainly useful for tests and debugging. For `argon2id` (or mixed batches) use the async variant — it auto-detects `payload.alg` per token:
|
|
328
340
|
|
|
329
341
|
```ts
|
|
330
|
-
const solutions = solveChallenge(challenges, {
|
|
342
|
+
const solutions = solveChallenge(challenges, { // sha256 only, returns undefined for argon
|
|
331
343
|
maxDurationMs: 2000,
|
|
332
344
|
maxIterations: 500_000,
|
|
333
345
|
});
|
|
346
|
+
const solutions2 = await solveChallengeAsync(challenges); // sha256 and argon2id
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Browser entry points expose the same auto-detecting `solveChallenge` / `solveSingleChallenge` via `ribaunt/widget` (Web Crypto for SHA, `hash-wasm` `argon2id` for Argon) and `calibrateArgonBrowser`. Worker mode auto-selects `backend: 'argon2id'` for Argon tokens.
|
|
350
|
+
|
|
351
|
+
### Proof-of-Work Algorithm — `argon2id` opt-in
|
|
352
|
+
|
|
353
|
+
Default remains `sha256` (microsecond hashes, cheap verify). Opt in to memory-hard Argon2id for higher attacker cost:
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
const challenges = await createChallenge({
|
|
357
|
+
algorithm: 'argon2id',
|
|
358
|
+
argonProfile: 'mobile', // 'mobile' | 'standard' → {m:8192,t:1,p:1,hashLen:32} (HARD_MAX m=32768 t=3)
|
|
359
|
+
difficulty: 'auto',
|
|
360
|
+
calibration: await calibrateArgonNode(), // must match algorithm (sha cal ≠ argon cal)
|
|
361
|
+
targetDurationMs: 750,
|
|
362
|
+
minDifficulty: 1, maxDifficulty: 2, // argon caps at 8, defaults 1..2 (sha 3..6)
|
|
363
|
+
});
|
|
364
|
+
// tokens carry {alg:'argon2id',m,t,p,hashLen} and verify auto-dispatches
|
|
365
|
+
await verifySolution(tokens, await solveChallengeAsync(tokens));
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
`HARD_MAX` (`m=32768 t=3 p=1`) is library-enforced. `argonProfile` abstracts `m/t/p` so developers never pass raw memory params — the adaptive engine keeps it device-aware via `riskScore` + `calibration`. `assess({workload:{algorithm:'argon2id', argonProfile:'mobile'}})` threads the profile through. Demo: `demo/argon.html` (`pnpm demo` → `http://localhost:3000/argon.html`, `Network` shows real `/api/challenge/argon` when server is running, otherwise mock fallback).
|
|
369
|
+
|
|
370
|
+
**Performance (measured via `bench/memory-hard-server.ts` `hash-wasm@4.12.0`):** Argon mobile `~6ms/hash` Node, `~12ms` browser; `difficulty:1` ≈ `16` avg attempts → `~400ms` browser, `difficulty:2` → `256` avg → `~3s` (× `amount`). Use `difficulty:'auto'` with `calibrateArgonBrowser` for `~750ms` target. `high` profile is gated (Stage D).
|
|
371
|
+
|
|
372
|
+
```ts
|
|
373
|
+
// Risk-aware Argon
|
|
374
|
+
const a = await assess({ signals:{requestVelocity:120}, workload:{algorithm:'argon2id', argonProfile:'mobile'} });
|
|
375
|
+
if (a.action==='challenge') await createChallenge({...a.workload, algorithm:'argon2id'});
|
|
334
376
|
```
|
|
335
377
|
|
|
336
378
|
## Widget Configuration
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,6 +2,20 @@ import { DEFAULT_RISK_THRESHOLDS } from './risk.js';
|
|
|
2
2
|
import type { AssessOptions, RiskAssessment } from './risk.js';
|
|
3
3
|
export type { AssessOptions, AssessWorkloadOptions, RiskAssessment, RiskScorer, RiskSignals, RiskThresholds } from './risk.js';
|
|
4
4
|
export { DEFAULT_RISK_THRESHOLDS };
|
|
5
|
+
export type PowAlgorithm = 'sha256' | 'argon2id';
|
|
6
|
+
export type ArgonProfile = 'mobile' | 'standard';
|
|
7
|
+
export declare const HARD_MAX: {
|
|
8
|
+
readonly m: number;
|
|
9
|
+
readonly t: 3;
|
|
10
|
+
readonly p: 1;
|
|
11
|
+
readonly hashLen: 32;
|
|
12
|
+
};
|
|
13
|
+
export declare const ARGON_PROFILES: Record<ArgonProfile, {
|
|
14
|
+
m: number;
|
|
15
|
+
t: number;
|
|
16
|
+
p: number;
|
|
17
|
+
hashLen: number;
|
|
18
|
+
}>;
|
|
5
19
|
export type ChallengeToken = string;
|
|
6
20
|
export interface ChallengeSolution {
|
|
7
21
|
nonce: string;
|
|
@@ -21,11 +35,20 @@ export interface AdaptiveWorkloadOptions extends WorkloadBounds {
|
|
|
21
35
|
riskScore?: number;
|
|
22
36
|
targetDurationMs?: number;
|
|
23
37
|
calibration?: ClientCalibration;
|
|
38
|
+
algorithm?: PowAlgorithm;
|
|
39
|
+
argonProfile?: ArgonProfile;
|
|
24
40
|
}
|
|
25
41
|
export interface Workload {
|
|
26
42
|
difficulty: number;
|
|
27
43
|
amount: number;
|
|
28
44
|
estimatedAttempts: number;
|
|
45
|
+
algorithm: PowAlgorithm;
|
|
46
|
+
argon?: {
|
|
47
|
+
m: number;
|
|
48
|
+
t: number;
|
|
49
|
+
p: number;
|
|
50
|
+
hashLen: number;
|
|
51
|
+
};
|
|
29
52
|
}
|
|
30
53
|
export interface ChallengeOptions {
|
|
31
54
|
difficulty?: number | 'auto';
|
|
@@ -42,6 +65,8 @@ export interface ChallengeOptions {
|
|
|
42
65
|
maxAmount?: number;
|
|
43
66
|
rateLimiter?: RateLimiter;
|
|
44
67
|
onEvent?: (event: RibauntEvent) => void;
|
|
68
|
+
algorithm?: PowAlgorithm;
|
|
69
|
+
argonProfile?: ArgonProfile;
|
|
45
70
|
}
|
|
46
71
|
export interface ReplayStore {
|
|
47
72
|
consume(jti: string, expiresAt: number): Promise<boolean>;
|
|
@@ -75,6 +100,7 @@ export type RibauntEvent = {
|
|
|
75
100
|
type: 'challenge-issued';
|
|
76
101
|
difficulty: number;
|
|
77
102
|
amount: number;
|
|
103
|
+
algorithm?: PowAlgorithm;
|
|
78
104
|
} | {
|
|
79
105
|
type: 'verify-success';
|
|
80
106
|
} | {
|
|
@@ -101,6 +127,8 @@ export declare class LocalReplayStore implements ReplayStore {
|
|
|
101
127
|
}
|
|
102
128
|
/**
|
|
103
129
|
* Selects bounded proof-of-work using a server-owned risk floor and untrusted timing calibration.
|
|
130
|
+
* For `algorithm:'argon2id'` difficulty is capped to the argon max (default 2) and the returned
|
|
131
|
+
* workload carries `argon:{m,t,p}` derived from `argonProfile` so the device can comfortably solve it.
|
|
104
132
|
*/
|
|
105
133
|
export declare function selectWorkload(options?: AdaptiveWorkloadOptions): Workload;
|
|
106
134
|
/**
|
|
@@ -122,11 +150,86 @@ export declare function selectWorkload(options?: AdaptiveWorkloadOptions): Workl
|
|
|
122
150
|
* -> if challenge, delegate to existing selectWorkload() with riskScore
|
|
123
151
|
*/
|
|
124
152
|
export declare function assess(options: AssessOptions): Promise<RiskAssessment>;
|
|
153
|
+
/**
|
|
154
|
+
* Measures SHA-256 hashing speed on Node.js to calibrate adaptive workload selection.
|
|
155
|
+
* Runs a small benchmark to estimate device performance.
|
|
156
|
+
*
|
|
157
|
+
* @param iterations - Number of SHA-256 hashes to run (default: 128)
|
|
158
|
+
* @returns Calibration object with iterations and measured duration
|
|
159
|
+
*/
|
|
125
160
|
export declare function calibrateNode(iterations?: number): ClientCalibration;
|
|
161
|
+
/**
|
|
162
|
+
* Alias for calibrateNode - measures device hashing speed for adaptive workload.
|
|
163
|
+
*/
|
|
126
164
|
export declare const calibrateClient: typeof calibrateNode;
|
|
165
|
+
/**
|
|
166
|
+
* Calibrate Argon2id on Node — measures device speed for the memory-hard algorithm.
|
|
167
|
+
* Uses a smaller iteration default (16) because each hash is ~6ms (mobile) vs microseconds for SHA.
|
|
168
|
+
* The returned shape is identical to `calibrateNode()` so `selectWorkload({calibration, algorithm:'argon2id'})` can consume it.
|
|
169
|
+
* Keep SHA `calibrateNode()` for `algorithm:'sha256'` — mismatched calibration will over/under-estimate.
|
|
170
|
+
*/
|
|
171
|
+
export declare function calibrateArgonNode(iterations?: number): Promise<ClientCalibration>;
|
|
172
|
+
/**
|
|
173
|
+
* Alias for calibrateArgonNode - measures Argon2id performance for adaptive workload.
|
|
174
|
+
*/
|
|
175
|
+
export declare const calibrateArgonClient: typeof calibrateArgonNode;
|
|
176
|
+
/**
|
|
177
|
+
* Resets Argon2id module cache for testing purposes.
|
|
178
|
+
* Should not be called in production code.
|
|
179
|
+
*/
|
|
180
|
+
export declare function __resetArgonForTesting(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Creates cryptographically-signed challenge tokens for proof-of-work verification.
|
|
183
|
+
*
|
|
184
|
+
* Supports two call signatures:
|
|
185
|
+
* 1. `createChallenge(difficulty, amount, ttlSeconds)` - simple numeric params
|
|
186
|
+
* 2. `createChallenge(options)` - full options object with adaptive workload, rate limiting, etc.
|
|
187
|
+
*
|
|
188
|
+
* When `difficulty: 'auto'` is used, workload is selected based on risk score and calibration.
|
|
189
|
+
* Supports both SHA-256 and Argon2id algorithms (via `algorithm` option).
|
|
190
|
+
*
|
|
191
|
+
* @param difficultyOrOptions - Difficulty level (1-64) or options object
|
|
192
|
+
* @param amount - Number of challenges to create (default: 4)
|
|
193
|
+
* @param ttlSeconds - Token expiration in seconds (default: 30)
|
|
194
|
+
* @returns Array of signed challenge tokens
|
|
195
|
+
*/
|
|
127
196
|
export declare function createChallenge(difficulty?: number, amount?: number, ttlSeconds?: number): Promise<ChallengeToken[]>;
|
|
128
197
|
export declare function createChallenge(options: ChallengeOptions): Promise<ChallengeToken[]>;
|
|
198
|
+
/**
|
|
199
|
+
* Solves SHA-256 proof-of-work challenge(s) synchronously on Node.js.
|
|
200
|
+
* Does not support Argon2id challenges (use solveChallengeAsync for those).
|
|
201
|
+
*
|
|
202
|
+
* @param token - Single challenge token or array of tokens
|
|
203
|
+
* @param options - Optional constraints (maxIterations, maxDurationMs)
|
|
204
|
+
* @returns Solution(s) with nonce and hash, or undefined if unsolvable
|
|
205
|
+
*/
|
|
129
206
|
export declare function solveChallenge(token: ChallengeToken, options?: SolveChallengeOptions): ChallengeSolution | undefined;
|
|
130
207
|
export declare function solveChallenge(token: ChallengeToken[], options?: SolveChallengeOptions): ChallengeSolution[] | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Solves proof-of-work challenge(s) asynchronously on Node.js.
|
|
210
|
+
* Supports both SHA-256 and Argon2id challenges.
|
|
211
|
+
*
|
|
212
|
+
* @param token - Single challenge token or array of tokens
|
|
213
|
+
* @param options - Optional constraints (maxIterations, maxDurationMs)
|
|
214
|
+
* @returns Promise resolving to solution(s) with nonce and hash, or undefined if unsolvable
|
|
215
|
+
*/
|
|
216
|
+
export declare function solveChallengeAsync(token: ChallengeToken, options?: SolveChallengeOptions): Promise<ChallengeSolution | undefined>;
|
|
217
|
+
export declare function solveChallengeAsync(token: ChallengeToken[], options?: SolveChallengeOptions): Promise<ChallengeSolution[] | undefined>;
|
|
218
|
+
/**
|
|
219
|
+
* Verifies that a proof-of-work solution correctly solves the challenge token(s).
|
|
220
|
+
*
|
|
221
|
+
* Validation steps:
|
|
222
|
+
* 1. JWT signature and expiration check
|
|
223
|
+
* 2. Hash verification (recomputed hash matches difficulty)
|
|
224
|
+
* 3. Context binding check (if context was provided)
|
|
225
|
+
* 4. Replay prevention (via ReplayStore if configured)
|
|
226
|
+
*
|
|
227
|
+
* Supports batch verification with atomic replay detection.
|
|
228
|
+
*
|
|
229
|
+
* @param token - Challenge token(s) to verify
|
|
230
|
+
* @param nonce - Solution nonce(s) or ChallengeSolution object(s)
|
|
231
|
+
* @param options - Verification options (replay prevention, context, rate limiting)
|
|
232
|
+
* @returns Result indicating validity or specific failure reason
|
|
233
|
+
*/
|
|
131
234
|
export declare function verifySolution(token: ChallengeToken | ChallengeToken[], nonce: number | string | Array<number | string> | ChallengeSolution | ChallengeSolution[], options?: VerifySolutionOptions): Promise<VerifySolutionResult>;
|
|
132
235
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EAIxB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,aAAa,EAEb,cAAc,EAIf,MAAM,WAAW,CAAC;AAGnB,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC/H,OAAO,EAAE,uBAAuB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EAIxB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,aAAa,EAEb,cAAc,EAIf,MAAM,WAAW,CAAC;AAGnB,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC/H,OAAO,E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