@reclaimprotocol/client 0.1.29 → 0.1.32
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 +255 -234
- package/lib/api.d.ts +2 -0
- package/lib/api.js +2 -0
- package/lib/client.js +2 -0
- package/lib/enckeys.d.ts +1 -1
- package/lib/enckeys.js +2 -2
- package/lib/encoding.d.ts +4 -0
- package/lib/encoding.js +10 -0
- package/lib/feature-flags.d.ts +9 -0
- package/lib/feature-flags.js +19 -0
- package/lib/index.d.ts +4 -4
- package/lib/index.js +4 -4
- package/lib/jwks.d.ts +8 -8
- package/lib/jwks.js +38 -17
- package/lib/launch/destination.d.ts +14 -0
- package/lib/launch/destination.js +89 -0
- package/lib/launch/device.d.ts +30 -0
- package/lib/launch/device.js +168 -0
- package/lib/launch/environment.d.ts +224 -0
- package/lib/launch/environment.js +98 -0
- package/lib/launch/errors.d.ts +20 -0
- package/lib/launch/errors.js +25 -0
- package/lib/launch/extension.d.ts +42 -0
- package/lib/launch/extension.js +72 -0
- package/lib/launch/flow.d.ts +82 -0
- package/lib/launch/flow.js +222 -0
- package/lib/launch/index.d.ts +16 -0
- package/lib/launch/index.js +12 -0
- package/lib/launch/mobile.d.ts +77 -0
- package/lib/launch/mobile.js +124 -0
- package/lib/launch/modal.d.ts +50 -0
- package/lib/launch/modal.js +258 -0
- package/lib/launch/options.d.ts +74 -0
- package/lib/launch/options.js +20 -0
- package/lib/launch/portal.d.ts +28 -0
- package/lib/launch/portal.js +68 -0
- package/lib/launch/qr.d.ts +5 -0
- package/lib/launch/qr.js +28 -0
- package/lib/launch/target.d.ts +46 -0
- package/lib/launch/target.js +128 -0
- package/lib/launch/vendor/qrcodegen.d.ts +134 -0
- package/lib/launch/vendor/qrcodegen.js +822 -0
- package/lib/legacy-proof.d.ts +2 -0
- package/lib/legacy-proof.js +37 -7
- package/lib/proof-hash.d.ts +5 -5
- package/lib/proof-hash.js +1 -1
- package/lib/proof-recipe.d.ts +3 -3
- package/lib/proof-recipe.js +1 -1
- package/lib/proof-types.d.ts +35 -8
- package/lib/reclaim.d.ts +81 -70
- package/lib/reclaim.js +79 -130
- package/lib/request-proof.d.ts +60 -0
- package/lib/request-proof.js +241 -0
- package/lib/result.d.ts +46 -38
- package/lib/result.js +160 -100
- package/lib/routes.gen.d.ts +76 -28
- package/lib/routes.gen.js +24 -11
- package/lib/tee-binding.d.ts +1 -1
- package/lib/types/openapi.d.ts +1 -0
- package/lib/types/openapi.gen.d.ts +1598 -485
- package/lib/types/openapi.gen.js +5 -0
- package/lib/verification-clients.d.ts +28 -14
- package/lib/verification-clients.js +31 -11
- package/lib/verify-attestor-tee.d.ts +19 -2
- package/lib/verify-attestor-tee.js +40 -4
- package/lib/verify-tee.d.ts +10 -1
- package/lib/verify-tee.js +34 -10
- package/package.json +5 -1
- package/src/api.ts +9 -0
- package/src/client.ts +2 -0
- package/src/enckeys.ts +2 -2
- package/src/encoding.ts +12 -0
- package/src/feature-flags.ts +39 -0
- package/src/index.ts +13 -14
- package/src/jwks.ts +52 -30
- package/src/launch/destination.ts +111 -0
- package/src/launch/device.ts +242 -0
- package/src/launch/environment.ts +337 -0
- package/src/launch/errors.ts +49 -0
- package/src/launch/extension.ts +124 -0
- package/src/launch/flow.ts +369 -0
- package/src/launch/index.ts +42 -0
- package/src/launch/mobile.ts +184 -0
- package/src/launch/modal.ts +378 -0
- package/src/launch/options.ts +99 -0
- package/src/launch/portal.ts +104 -0
- package/src/launch/qr.ts +37 -0
- package/src/launch/target.ts +150 -0
- package/src/launch/vendor/qrcodegen.ts +1034 -0
- package/src/proof-hash.ts +6 -6
- package/src/proof-recipe.ts +3 -3
- package/src/proof-types.ts +36 -8
- package/src/reclaim.ts +185 -218
- package/src/{legacy-proof.ts → request-proof.ts} +81 -36
- package/src/result.ts +238 -172
- package/src/routes.gen.ts +24 -11
- package/src/tee-binding.ts +1 -1
- package/src/types/openapi.gen.ts +1603 -485
- package/src/types/openapi.ts +3 -1
- package/src/verification-clients.ts +33 -19
- package/src/verify-attestor-tee.ts +66 -8
- package/src/verify-tee.ts +44 -13
- package/lib/api-client.d.ts +0 -31
- package/lib/api-client.js +0 -112
- package/lib/api-consts.d.ts +0 -4
- package/lib/api-consts.js +0 -4
- package/lib/api-errors.d.ts +0 -13
- package/lib/api-errors.js +0 -30
- package/lib/eip712.d.ts +0 -20
- package/lib/eip712.js +0 -108
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QR Code generator library (TypeScript)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Project Nayuki. (MIT License)
|
|
5
|
+
* https://www.nayuki.io/page/qr-code-generator-library
|
|
6
|
+
* https://github.com/nayuki/QR-Code-generator (typescript-javascript/qrcodegen.ts)
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
9
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
10
|
+
* the Software without restriction, including without limitation the rights to
|
|
11
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
12
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
13
|
+
* subject to the following conditions:
|
|
14
|
+
* - The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
* - The Software is provided "as is", without warranty of any kind, express or
|
|
17
|
+
* implied, including but not limited to the warranties of merchantability,
|
|
18
|
+
* fitness for a particular purpose and noninfringement. In no event shall the
|
|
19
|
+
* authors or copyright holders be liable for any claim, damages or other
|
|
20
|
+
* liability, whether in an action of contract, tort or otherwise, arising from,
|
|
21
|
+
* out of or in connection with the Software or the use or other dealings in the
|
|
22
|
+
* Software.
|
|
23
|
+
*
|
|
24
|
+
* ---
|
|
25
|
+
*
|
|
26
|
+
* Vendored here, NOT an npm dependency. The launch-API plan requires the QR
|
|
27
|
+
* modal to work with zero configuration, and `qrcode` (the usual npm encoder)
|
|
28
|
+
* is deliberately not a dependency of this package.
|
|
29
|
+
*
|
|
30
|
+
* Adaptations from the upstream source (kept otherwise verbatim, including
|
|
31
|
+
* comments):
|
|
32
|
+
* - Flattened the `namespace qrcodegen { ... }` / `namespace
|
|
33
|
+
* qrcodegen.QrCode { ... }` / `namespace qrcodegen.QrSegment { ... }`
|
|
34
|
+
* wrappers into plain top-level declarations, and renamed the
|
|
35
|
+
* namespace-merged `QrCode.Ecc` / `QrSegment.Mode` helper classes to
|
|
36
|
+
* standalone `QrCodeEcc` / `QrSegmentMode` — this package's
|
|
37
|
+
* `tsconfig.json` sets `erasableSyntaxOnly`, which Node's native TS
|
|
38
|
+
* type-stripping (`node --test tests/*.test.ts`) requires, and a
|
|
39
|
+
* `namespace` with runtime content isn't erasable.
|
|
40
|
+
* - Rewrote every constructor-parameter-property (`constructor(public
|
|
41
|
+
* readonly x: T)`) into an explicit field declaration plus a body
|
|
42
|
+
* assignment, for the same `erasableSyntaxOnly` reason: those also
|
|
43
|
+
* generate code beyond type erasure.
|
|
44
|
+
* - Dropped the `"use strict"` prologue (redundant in an ES module).
|
|
45
|
+
* No changes to the encoding algorithm itself (mode selection, version
|
|
46
|
+
* sizing, Reed–Solomon ECC, masking, penalty scoring).
|
|
47
|
+
*
|
|
48
|
+
* This directory is named `vendor` on purpose: `eslint.config.js` already
|
|
49
|
+
* ignores that directory name, so this file keeps upstream's style rather
|
|
50
|
+
* than being reformatted to this repo's conventions.
|
|
51
|
+
*/
|
|
52
|
+
type bit = number;
|
|
53
|
+
type byte = number;
|
|
54
|
+
type int = number;
|
|
55
|
+
export declare class QrCode {
|
|
56
|
+
static encodeText(text: string, ecl: QrCodeEcc): QrCode;
|
|
57
|
+
static encodeBinary(data: Readonly<Array<byte>>, ecl: QrCodeEcc): QrCode;
|
|
58
|
+
static encodeSegments(segs: Readonly<Array<QrSegment>>, ecl: QrCodeEcc, minVersion?: int, maxVersion?: int, mask?: int, boostEcl?: boolean): QrCode;
|
|
59
|
+
readonly size: int;
|
|
60
|
+
readonly mask: int;
|
|
61
|
+
readonly version: int;
|
|
62
|
+
readonly errorCorrectionLevel: QrCodeEcc;
|
|
63
|
+
private readonly modules;
|
|
64
|
+
private readonly isFunction;
|
|
65
|
+
constructor(version: int, errorCorrectionLevel: QrCodeEcc, dataCodewords: Readonly<Array<byte>>, msk: int);
|
|
66
|
+
getModule(x: int, y: int): boolean;
|
|
67
|
+
private drawFunctionPatterns;
|
|
68
|
+
private drawFormatBits;
|
|
69
|
+
private drawVersion;
|
|
70
|
+
private drawFinderPattern;
|
|
71
|
+
private drawAlignmentPattern;
|
|
72
|
+
private setFunctionModule;
|
|
73
|
+
private addEccAndInterleave;
|
|
74
|
+
private drawCodewords;
|
|
75
|
+
private applyMask;
|
|
76
|
+
private getPenaltyScore;
|
|
77
|
+
private getAlignmentPatternPositions;
|
|
78
|
+
private static getNumRawDataModules;
|
|
79
|
+
private static getNumDataCodewords;
|
|
80
|
+
private static reedSolomonComputeDivisor;
|
|
81
|
+
private static reedSolomonComputeRemainder;
|
|
82
|
+
private static reedSolomonMultiply;
|
|
83
|
+
private finderPenaltyCountPatterns;
|
|
84
|
+
private finderPenaltyTerminateAndCount;
|
|
85
|
+
private finderPenaltyAddHistory;
|
|
86
|
+
static readonly MIN_VERSION: int;
|
|
87
|
+
static readonly MAX_VERSION: int;
|
|
88
|
+
private static readonly PENALTY_N1;
|
|
89
|
+
private static readonly PENALTY_N2;
|
|
90
|
+
private static readonly PENALTY_N3;
|
|
91
|
+
private static readonly PENALTY_N4;
|
|
92
|
+
private static readonly ECC_CODEWORDS_PER_BLOCK;
|
|
93
|
+
private static readonly NUM_ERROR_CORRECTION_BLOCKS;
|
|
94
|
+
}
|
|
95
|
+
export declare class QrSegment {
|
|
96
|
+
static makeBytes(data: Readonly<Array<byte>>): QrSegment;
|
|
97
|
+
static makeNumeric(digits: string): QrSegment;
|
|
98
|
+
static makeAlphanumeric(text: string): QrSegment;
|
|
99
|
+
static makeSegments(text: string): Array<QrSegment>;
|
|
100
|
+
static makeEci(assignVal: int): QrSegment;
|
|
101
|
+
static isNumeric(text: string): boolean;
|
|
102
|
+
static isAlphanumeric(text: string): boolean;
|
|
103
|
+
readonly mode: QrSegmentMode;
|
|
104
|
+
readonly numChars: int;
|
|
105
|
+
private readonly bitData;
|
|
106
|
+
constructor(mode: QrSegmentMode, numChars: int, bitData: Array<bit>);
|
|
107
|
+
getData(): Array<bit>;
|
|
108
|
+
static getTotalBits(segs: Readonly<Array<QrSegment>>, version: int): number;
|
|
109
|
+
private static toUtf8ByteArray;
|
|
110
|
+
private static readonly NUMERIC_REGEX;
|
|
111
|
+
private static readonly ALPHANUMERIC_REGEX;
|
|
112
|
+
private static readonly ALPHANUMERIC_CHARSET;
|
|
113
|
+
}
|
|
114
|
+
export declare class QrCodeEcc {
|
|
115
|
+
static readonly LOW: QrCodeEcc;
|
|
116
|
+
static readonly MEDIUM: QrCodeEcc;
|
|
117
|
+
static readonly QUARTILE: QrCodeEcc;
|
|
118
|
+
static readonly HIGH: QrCodeEcc;
|
|
119
|
+
readonly ordinal: int;
|
|
120
|
+
readonly formatBits: int;
|
|
121
|
+
private constructor();
|
|
122
|
+
}
|
|
123
|
+
export declare class QrSegmentMode {
|
|
124
|
+
static readonly NUMERIC: QrSegmentMode;
|
|
125
|
+
static readonly ALPHANUMERIC: QrSegmentMode;
|
|
126
|
+
static readonly BYTE: QrSegmentMode;
|
|
127
|
+
static readonly KANJI: QrSegmentMode;
|
|
128
|
+
static readonly ECI: QrSegmentMode;
|
|
129
|
+
readonly modeBits: int;
|
|
130
|
+
private readonly numBitsCharCount;
|
|
131
|
+
private constructor();
|
|
132
|
+
numCharCountBits(ver: int): int;
|
|
133
|
+
}
|
|
134
|
+
export {};
|