@premai/reticle 0.5.1 → 0.6.0
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/package.json +1 -1
- package/reticle.d.ts +28 -57
- package/reticle.js +1 -1
- package/reticle_bg.js +108 -201
- package/reticle_bg.wasm +0 -0
- package/reticle_main.cjs +110 -203
package/package.json
CHANGED
package/reticle.d.ts
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
-
export class
|
|
4
|
+
export class AttestResponse {
|
|
5
5
|
private constructor();
|
|
6
6
|
free(): void;
|
|
7
7
|
[Symbol.dispose](): void;
|
|
8
|
-
cpu(): ResponseHeaders | undefined;
|
|
9
|
-
gpu(): ResponseHeaders | undefined;
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
export class AttestResult {
|
|
13
11
|
private constructor();
|
|
14
12
|
free(): void;
|
|
15
13
|
[Symbol.dispose](): void;
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Returns the response headers returned by the attestation request.
|
|
16
|
+
*/
|
|
17
|
+
headers(): ResponseHeaders;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the Modules that the remote party attested.
|
|
20
|
+
*/
|
|
17
21
|
modules(): Modules;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the manifest as serde serialized data. This means that it will
|
|
24
|
+
* go through JSON representation first. You can expect this to preserve the
|
|
25
|
+
* same format as the JSON report inside the CVM.
|
|
26
|
+
*/
|
|
27
|
+
pod_report(): any;
|
|
18
28
|
}
|
|
19
29
|
|
|
20
30
|
export class AzureNonce {
|
|
@@ -60,54 +70,10 @@ export class Client {
|
|
|
60
70
|
* - Returns the list of attested modules
|
|
61
71
|
*/
|
|
62
72
|
attest(): Promise<AttestResult>;
|
|
63
|
-
attest_azure(): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* Completes end-to-end nvidia attestation. Generates nonce and validates claims all in one
|
|
66
|
-
*/
|
|
67
|
-
attest_nvidia(): Promise<ResponseHeaders>;
|
|
68
|
-
/**
|
|
69
|
-
* Performs end-to-end sev-snp attestation. Generates nonce and validates claims all in one
|
|
70
|
-
*/
|
|
71
|
-
attest_sev(): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Performs end-to-end tdx attestation. Generates nonce and validates claims all in one
|
|
74
|
-
*/
|
|
75
|
-
attest_tdx(): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Requests and parses an Azure Quote
|
|
78
|
-
*/
|
|
79
|
-
request_azure(nonce: AzureNonce): Promise<AzureQuote>;
|
|
80
|
-
/**
|
|
81
|
-
* Gather available attestable modules from remote attestation endpoint
|
|
82
|
-
*/
|
|
83
|
-
request_modules(): Promise<Modules>;
|
|
84
|
-
/**
|
|
85
|
-
* Requests and parses an Nvidia EATToken attestation from the attestation server
|
|
86
|
-
*
|
|
87
|
-
* ### Warning
|
|
88
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
89
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
90
|
-
* please refer to [`Self::attest_nvidia`]
|
|
91
|
-
*/
|
|
92
|
-
request_nvidia(nonce: NvidiaNonce): Promise<NvidiaAttestResult>;
|
|
93
73
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* ### Warning
|
|
97
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
98
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
99
|
-
* please refer to [`Self::attest_sev`]
|
|
100
|
-
*/
|
|
101
|
-
request_sev(nonce: SevNonce): Promise<SevQuote>;
|
|
102
|
-
/**
|
|
103
|
-
* Requests and parses a TDX quote
|
|
104
|
-
*
|
|
105
|
-
* ### Warning
|
|
106
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
107
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
108
|
-
* please refer to [`Self::attest_tdx`]
|
|
74
|
+
* Request unified `CvmReport` attestation from endpoint
|
|
109
75
|
*/
|
|
110
|
-
|
|
76
|
+
request_attestation(nonce: CvmNonce): Promise<AttestResponse>;
|
|
111
77
|
set_query(query_params: QueryParams): void;
|
|
112
78
|
}
|
|
113
79
|
|
|
@@ -124,6 +90,10 @@ export class ClientBuilder {
|
|
|
124
90
|
* Sets custom KDS for AMD collateral server
|
|
125
91
|
*/
|
|
126
92
|
with_kds(kds: Kds): ClientBuilder;
|
|
93
|
+
/**
|
|
94
|
+
* Sets the Trustbase URL where to look for measurements (golden values)
|
|
95
|
+
*/
|
|
96
|
+
with_measurements_url(url: string): ClientBuilder;
|
|
127
97
|
/**
|
|
128
98
|
* Sets custom PCS for Intel collateral server
|
|
129
99
|
*/
|
|
@@ -146,6 +116,14 @@ export enum CpuModule {
|
|
|
146
116
|
Azure = 2,
|
|
147
117
|
}
|
|
148
118
|
|
|
119
|
+
export class CvmNonce {
|
|
120
|
+
private constructor();
|
|
121
|
+
free(): void;
|
|
122
|
+
[Symbol.dispose](): void;
|
|
123
|
+
static generate(): CvmNonce;
|
|
124
|
+
to_hex(): string;
|
|
125
|
+
}
|
|
126
|
+
|
|
149
127
|
export class DecodedClaims {
|
|
150
128
|
private constructor();
|
|
151
129
|
free(): void;
|
|
@@ -157,7 +135,6 @@ export class EATToken {
|
|
|
157
135
|
free(): void;
|
|
158
136
|
[Symbol.dispose](): void;
|
|
159
137
|
static parse(from: string): EATToken;
|
|
160
|
-
verify(keys: KeyChain, nonce: NvidiaNonce): DecodedClaims;
|
|
161
138
|
}
|
|
162
139
|
|
|
163
140
|
export class ExportPem {
|
|
@@ -206,12 +183,6 @@ export class Modules {
|
|
|
206
183
|
has_gpu(): boolean;
|
|
207
184
|
}
|
|
208
185
|
|
|
209
|
-
export class NvidiaAttestResult {
|
|
210
|
-
private constructor();
|
|
211
|
-
free(): void;
|
|
212
|
-
[Symbol.dispose](): void;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
186
|
export class NvidiaNonce {
|
|
216
187
|
private constructor();
|
|
217
188
|
free(): void;
|
package/reticle.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./reticle_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
AttestResponse, AttestResult, AzureNonce, AzureQuote, CRL, Client, ClientBuilder, Collateral, CpuModule, CvmNonce, DecodedClaims, EATToken, ExportPem, GatewayError, GpuModule, Kds, KeyChain, Modules, NvidiaNonce, Pcs, QueryParams, ResponseHeaders, SevNonce, SevQuote, TcbLevels, TdxNonce, TdxQuote, TdxQuoteVerifier, VerifiedChain, fetch, fetch_keychain
|
|
9
9
|
} from "./reticle_bg.js";
|
package/reticle_bg.js
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class AttestResponse {
|
|
2
2
|
static __wrap(ptr) {
|
|
3
|
-
const obj = Object.create(
|
|
3
|
+
const obj = Object.create(AttestResponse.prototype);
|
|
4
4
|
obj.__wbg_ptr = ptr;
|
|
5
|
-
|
|
5
|
+
AttestResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
6
6
|
return obj;
|
|
7
7
|
}
|
|
8
8
|
__destroy_into_raw() {
|
|
9
9
|
const ptr = this.__wbg_ptr;
|
|
10
10
|
this.__wbg_ptr = 0;
|
|
11
|
-
|
|
11
|
+
AttestResponseFinalization.unregister(this);
|
|
12
12
|
return ptr;
|
|
13
13
|
}
|
|
14
14
|
free() {
|
|
15
15
|
const ptr = this.__destroy_into_raw();
|
|
16
|
-
wasm.
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @returns {ResponseHeaders | undefined}
|
|
20
|
-
*/
|
|
21
|
-
cpu() {
|
|
22
|
-
const ret = wasm.attestheaders_cpu(this.__wbg_ptr);
|
|
23
|
-
return ret === 0 ? undefined : ResponseHeaders.__wrap(ret);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @returns {ResponseHeaders | undefined}
|
|
27
|
-
*/
|
|
28
|
-
gpu() {
|
|
29
|
-
const ret = wasm.attestheaders_gpu(this.__wbg_ptr);
|
|
30
|
-
return ret === 0 ? undefined : ResponseHeaders.__wrap(ret);
|
|
16
|
+
wasm.__wbg_attestresponse_free(ptr, 0);
|
|
31
17
|
}
|
|
32
18
|
}
|
|
33
|
-
if (Symbol.dispose)
|
|
19
|
+
if (Symbol.dispose) AttestResponse.prototype[Symbol.dispose] = AttestResponse.prototype.free;
|
|
34
20
|
|
|
35
21
|
export class AttestResult {
|
|
36
22
|
static __wrap(ptr) {
|
|
@@ -50,19 +36,31 @@ export class AttestResult {
|
|
|
50
36
|
wasm.__wbg_attestresult_free(ptr, 0);
|
|
51
37
|
}
|
|
52
38
|
/**
|
|
53
|
-
*
|
|
39
|
+
* Returns the response headers returned by the attestation request.
|
|
40
|
+
* @returns {ResponseHeaders}
|
|
54
41
|
*/
|
|
55
42
|
headers() {
|
|
56
43
|
const ret = wasm.attestresult_headers(this.__wbg_ptr);
|
|
57
|
-
return
|
|
44
|
+
return ResponseHeaders.__wrap(ret);
|
|
58
45
|
}
|
|
59
46
|
/**
|
|
47
|
+
* Returns the Modules that the remote party attested.
|
|
60
48
|
* @returns {Modules}
|
|
61
49
|
*/
|
|
62
50
|
modules() {
|
|
63
51
|
const ret = wasm.attestresult_modules(this.__wbg_ptr);
|
|
64
52
|
return Modules.__wrap(ret);
|
|
65
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns the manifest as serde serialized data. This means that it will
|
|
56
|
+
* go through JSON representation first. You can expect this to preserve the
|
|
57
|
+
* same format as the JSON report inside the CVM.
|
|
58
|
+
* @returns {any}
|
|
59
|
+
*/
|
|
60
|
+
pod_report() {
|
|
61
|
+
const ret = wasm.attestresult_pod_report(this.__wbg_ptr);
|
|
62
|
+
return ret;
|
|
63
|
+
}
|
|
66
64
|
}
|
|
67
65
|
if (Symbol.dispose) AttestResult.prototype[Symbol.dispose] = AttestResult.prototype.free;
|
|
68
66
|
|
|
@@ -109,12 +107,6 @@ export class AzureNonce {
|
|
|
109
107
|
if (Symbol.dispose) AzureNonce.prototype[Symbol.dispose] = AzureNonce.prototype.free;
|
|
110
108
|
|
|
111
109
|
export class AzureQuote {
|
|
112
|
-
static __wrap(ptr) {
|
|
113
|
-
const obj = Object.create(AzureQuote.prototype);
|
|
114
|
-
obj.__wbg_ptr = ptr;
|
|
115
|
-
AzureQuoteFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
116
|
-
return obj;
|
|
117
|
-
}
|
|
118
110
|
__destroy_into_raw() {
|
|
119
111
|
const ptr = this.__wbg_ptr;
|
|
120
112
|
this.__wbg_ptr = 0;
|
|
@@ -206,97 +198,13 @@ export class Client {
|
|
|
206
198
|
return ret;
|
|
207
199
|
}
|
|
208
200
|
/**
|
|
209
|
-
*
|
|
201
|
+
* Request unified `CvmReport` attestation from endpoint
|
|
202
|
+
* @param {CvmNonce} nonce
|
|
203
|
+
* @returns {Promise<AttestResponse>}
|
|
210
204
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Completes end-to-end nvidia attestation. Generates nonce and validates claims all in one
|
|
217
|
-
* @returns {Promise<ResponseHeaders>}
|
|
218
|
-
*/
|
|
219
|
-
attest_nvidia() {
|
|
220
|
-
const ret = wasm.client_attest_nvidia(this.__wbg_ptr);
|
|
221
|
-
return ret;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Performs end-to-end sev-snp attestation. Generates nonce and validates claims all in one
|
|
225
|
-
* @returns {Promise<void>}
|
|
226
|
-
*/
|
|
227
|
-
attest_sev() {
|
|
228
|
-
const ret = wasm.client_attest_sev(this.__wbg_ptr);
|
|
229
|
-
return ret;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Performs end-to-end tdx attestation. Generates nonce and validates claims all in one
|
|
233
|
-
* @returns {Promise<void>}
|
|
234
|
-
*/
|
|
235
|
-
attest_tdx() {
|
|
236
|
-
const ret = wasm.client_attest_tdx(this.__wbg_ptr);
|
|
237
|
-
return ret;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Requests and parses an Azure Quote
|
|
241
|
-
* @param {AzureNonce} nonce
|
|
242
|
-
* @returns {Promise<AzureQuote>}
|
|
243
|
-
*/
|
|
244
|
-
request_azure(nonce) {
|
|
245
|
-
_assertClass(nonce, AzureNonce);
|
|
246
|
-
const ret = wasm.client_request_azure(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
247
|
-
return ret;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Gather available attestable modules from remote attestation endpoint
|
|
251
|
-
* @returns {Promise<Modules>}
|
|
252
|
-
*/
|
|
253
|
-
request_modules() {
|
|
254
|
-
const ret = wasm.client_request_modules(this.__wbg_ptr);
|
|
255
|
-
return ret;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Requests and parses an Nvidia EATToken attestation from the attestation server
|
|
259
|
-
*
|
|
260
|
-
* ### Warning
|
|
261
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
262
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
263
|
-
* please refer to [`Self::attest_nvidia`]
|
|
264
|
-
* @param {NvidiaNonce} nonce
|
|
265
|
-
* @returns {Promise<NvidiaAttestResult>}
|
|
266
|
-
*/
|
|
267
|
-
request_nvidia(nonce) {
|
|
268
|
-
_assertClass(nonce, NvidiaNonce);
|
|
269
|
-
const ret = wasm.client_request_nvidia(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
270
|
-
return ret;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Requests and parses a SEV-SNP attestation from the attestation server.
|
|
274
|
-
*
|
|
275
|
-
* ### Warning
|
|
276
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
277
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
278
|
-
* please refer to [`Self::attest_sev`]
|
|
279
|
-
* @param {SevNonce} nonce
|
|
280
|
-
* @returns {Promise<SevQuote>}
|
|
281
|
-
*/
|
|
282
|
-
request_sev(nonce) {
|
|
283
|
-
_assertClass(nonce, SevNonce);
|
|
284
|
-
const ret = wasm.client_request_sev(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
285
|
-
return ret;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Requests and parses a TDX quote
|
|
289
|
-
*
|
|
290
|
-
* ### Warning
|
|
291
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
292
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
293
|
-
* please refer to [`Self::attest_tdx`]
|
|
294
|
-
* @param {TdxNonce} nonce
|
|
295
|
-
* @returns {Promise<TdxQuote>}
|
|
296
|
-
*/
|
|
297
|
-
request_tdx(nonce) {
|
|
298
|
-
_assertClass(nonce, TdxNonce);
|
|
299
|
-
const ret = wasm.client_request_tdx(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
205
|
+
request_attestation(nonce) {
|
|
206
|
+
_assertClass(nonce, CvmNonce);
|
|
207
|
+
const ret = wasm.client_request_attestation(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
300
208
|
return ret;
|
|
301
209
|
}
|
|
302
210
|
/**
|
|
@@ -373,6 +281,21 @@ export class ClientBuilder {
|
|
|
373
281
|
const ret = wasm.clientbuilder_with_kds(ptr, ptr0);
|
|
374
282
|
return ClientBuilder.__wrap(ret);
|
|
375
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Sets the Trustbase URL where to look for measurements (golden values)
|
|
286
|
+
* @param {string} url
|
|
287
|
+
* @returns {ClientBuilder}
|
|
288
|
+
*/
|
|
289
|
+
with_measurements_url(url) {
|
|
290
|
+
const ptr = this.__destroy_into_raw();
|
|
291
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
|
+
const len0 = WASM_VECTOR_LEN;
|
|
293
|
+
const ret = wasm.clientbuilder_with_measurements_url(ptr, ptr0, len0);
|
|
294
|
+
if (ret[2]) {
|
|
295
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
296
|
+
}
|
|
297
|
+
return ClientBuilder.__wrap(ret[0]);
|
|
298
|
+
}
|
|
376
299
|
/**
|
|
377
300
|
* Sets custom PCS for Intel collateral server
|
|
378
301
|
* @param {Pcs} pcs
|
|
@@ -432,13 +355,49 @@ export const CpuModule = Object.freeze({
|
|
|
432
355
|
Azure: 2, "2": "Azure",
|
|
433
356
|
});
|
|
434
357
|
|
|
435
|
-
export class
|
|
358
|
+
export class CvmNonce {
|
|
436
359
|
static __wrap(ptr) {
|
|
437
|
-
const obj = Object.create(
|
|
360
|
+
const obj = Object.create(CvmNonce.prototype);
|
|
438
361
|
obj.__wbg_ptr = ptr;
|
|
439
|
-
|
|
362
|
+
CvmNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
440
363
|
return obj;
|
|
441
364
|
}
|
|
365
|
+
__destroy_into_raw() {
|
|
366
|
+
const ptr = this.__wbg_ptr;
|
|
367
|
+
this.__wbg_ptr = 0;
|
|
368
|
+
CvmNonceFinalization.unregister(this);
|
|
369
|
+
return ptr;
|
|
370
|
+
}
|
|
371
|
+
free() {
|
|
372
|
+
const ptr = this.__destroy_into_raw();
|
|
373
|
+
wasm.__wbg_cvmnonce_free(ptr, 0);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* @returns {CvmNonce}
|
|
377
|
+
*/
|
|
378
|
+
static generate() {
|
|
379
|
+
const ret = wasm.cvmnonce_generate();
|
|
380
|
+
return CvmNonce.__wrap(ret);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* @returns {string}
|
|
384
|
+
*/
|
|
385
|
+
to_hex() {
|
|
386
|
+
let deferred1_0;
|
|
387
|
+
let deferred1_1;
|
|
388
|
+
try {
|
|
389
|
+
const ret = wasm.cvmnonce_to_hex(this.__wbg_ptr);
|
|
390
|
+
deferred1_0 = ret[0];
|
|
391
|
+
deferred1_1 = ret[1];
|
|
392
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
393
|
+
} finally {
|
|
394
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (Symbol.dispose) CvmNonce.prototype[Symbol.dispose] = CvmNonce.prototype.free;
|
|
399
|
+
|
|
400
|
+
export class DecodedClaims {
|
|
442
401
|
__destroy_into_raw() {
|
|
443
402
|
const ptr = this.__wbg_ptr;
|
|
444
403
|
this.__wbg_ptr = 0;
|
|
@@ -482,21 +441,6 @@ export class EATToken {
|
|
|
482
441
|
}
|
|
483
442
|
return EATToken.__wrap(ret[0]);
|
|
484
443
|
}
|
|
485
|
-
/**
|
|
486
|
-
* @param {KeyChain} keys
|
|
487
|
-
* @param {NvidiaNonce} nonce
|
|
488
|
-
* @returns {DecodedClaims}
|
|
489
|
-
*/
|
|
490
|
-
verify(keys, nonce) {
|
|
491
|
-
const ptr = this.__destroy_into_raw();
|
|
492
|
-
_assertClass(keys, KeyChain);
|
|
493
|
-
_assertClass(nonce, NvidiaNonce);
|
|
494
|
-
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
495
|
-
if (ret[2]) {
|
|
496
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
497
|
-
}
|
|
498
|
-
return DecodedClaims.__wrap(ret[0]);
|
|
499
|
-
}
|
|
500
444
|
}
|
|
501
445
|
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
502
446
|
|
|
@@ -729,26 +673,6 @@ export class Modules {
|
|
|
729
673
|
}
|
|
730
674
|
if (Symbol.dispose) Modules.prototype[Symbol.dispose] = Modules.prototype.free;
|
|
731
675
|
|
|
732
|
-
export class NvidiaAttestResult {
|
|
733
|
-
static __wrap(ptr) {
|
|
734
|
-
const obj = Object.create(NvidiaAttestResult.prototype);
|
|
735
|
-
obj.__wbg_ptr = ptr;
|
|
736
|
-
NvidiaAttestResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
737
|
-
return obj;
|
|
738
|
-
}
|
|
739
|
-
__destroy_into_raw() {
|
|
740
|
-
const ptr = this.__wbg_ptr;
|
|
741
|
-
this.__wbg_ptr = 0;
|
|
742
|
-
NvidiaAttestResultFinalization.unregister(this);
|
|
743
|
-
return ptr;
|
|
744
|
-
}
|
|
745
|
-
free() {
|
|
746
|
-
const ptr = this.__destroy_into_raw();
|
|
747
|
-
wasm.__wbg_nvidiaattestresult_free(ptr, 0);
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
if (Symbol.dispose) NvidiaAttestResult.prototype[Symbol.dispose] = NvidiaAttestResult.prototype.free;
|
|
751
|
-
|
|
752
676
|
export class NvidiaNonce {
|
|
753
677
|
static __wrap(ptr) {
|
|
754
678
|
const obj = Object.create(NvidiaNonce.prototype);
|
|
@@ -1253,12 +1177,12 @@ export function __wbg_arrayBuffer_cb5d4748b5f3cad5() { return handleError(functi
|
|
|
1253
1177
|
const ret = arg0.arrayBuffer();
|
|
1254
1178
|
return ret;
|
|
1255
1179
|
}, arguments); }
|
|
1256
|
-
export function
|
|
1257
|
-
const ret =
|
|
1180
|
+
export function __wbg_attestresponse_new(arg0) {
|
|
1181
|
+
const ret = AttestResponse.__wrap(arg0);
|
|
1258
1182
|
return ret;
|
|
1259
1183
|
}
|
|
1260
|
-
export function
|
|
1261
|
-
const ret =
|
|
1184
|
+
export function __wbg_attestresult_new(arg0) {
|
|
1185
|
+
const ret = AttestResult.__wrap(arg0);
|
|
1262
1186
|
return ret;
|
|
1263
1187
|
}
|
|
1264
1188
|
export function __wbg_call_dfde26266607c996() { return handleError(function (arg0, arg1, arg2) {
|
|
@@ -1297,18 +1221,18 @@ export function __wbg_fetch_074561c3e313c86f(arg0) {
|
|
|
1297
1221
|
const ret = fetch(arg0);
|
|
1298
1222
|
return ret;
|
|
1299
1223
|
}
|
|
1224
|
+
export function __wbg_fetch_0c64bd7df47b4e91(arg0, arg1) {
|
|
1225
|
+
const ret = globalThis.fetch(arg0, arg1);
|
|
1226
|
+
return ret;
|
|
1227
|
+
}
|
|
1300
1228
|
export function __wbg_fetch_2998af8c54e0997c(arg0, arg1) {
|
|
1301
1229
|
const ret = arg0.fetch(arg1);
|
|
1302
1230
|
return ret;
|
|
1303
1231
|
}
|
|
1304
|
-
export function
|
|
1232
|
+
export function __wbg_fetch_63a3ab5bfe08a9d6(arg0) {
|
|
1305
1233
|
const ret = globalThis.fetch(arg0);
|
|
1306
1234
|
return ret;
|
|
1307
1235
|
}
|
|
1308
|
-
export function __wbg_fetch_afeeccd67d9f27cd(arg0, arg1) {
|
|
1309
|
-
const ret = globalThis.fetch(arg0, arg1);
|
|
1310
|
-
return ret;
|
|
1311
|
-
}
|
|
1312
1236
|
export function __wbg_gatewayerror_new(arg0) {
|
|
1313
1237
|
const ret = GatewayError.__wrap(arg0);
|
|
1314
1238
|
return ret;
|
|
@@ -1367,10 +1291,6 @@ export function __wbg_length_56fcd3e2b7e0299d(arg0) {
|
|
|
1367
1291
|
const ret = arg0.length;
|
|
1368
1292
|
return ret;
|
|
1369
1293
|
}
|
|
1370
|
-
export function __wbg_modules_new(arg0) {
|
|
1371
|
-
const ret = Modules.__wrap(arg0);
|
|
1372
|
-
return ret;
|
|
1373
|
-
}
|
|
1374
1294
|
export function __wbg_msCrypto_8c6d45a75ef1d3da(arg0) {
|
|
1375
1295
|
const ret = arg0.msCrypto;
|
|
1376
1296
|
return ret;
|
|
@@ -1410,7 +1330,7 @@ export function __wbg_new_typed_c072c4ce9a2a0cdf(arg0, arg1) {
|
|
|
1410
1330
|
const a = state0.a;
|
|
1411
1331
|
state0.a = 0;
|
|
1412
1332
|
try {
|
|
1413
|
-
return
|
|
1333
|
+
return wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1414
1334
|
} finally {
|
|
1415
1335
|
state0.a = a;
|
|
1416
1336
|
}
|
|
@@ -1441,10 +1361,6 @@ export function __wbg_now_81363d44c96dd239() {
|
|
|
1441
1361
|
const ret = Date.now();
|
|
1442
1362
|
return ret;
|
|
1443
1363
|
}
|
|
1444
|
-
export function __wbg_nvidiaattestresult_new(arg0) {
|
|
1445
|
-
const ret = NvidiaAttestResult.__wrap(arg0);
|
|
1446
|
-
return ret;
|
|
1447
|
-
}
|
|
1448
1364
|
export function __wbg_process_b2fea42461d03994(arg0) {
|
|
1449
1365
|
const ret = arg0.process;
|
|
1450
1366
|
return ret;
|
|
@@ -1470,14 +1386,13 @@ export function __wbg_resolve_d17db9352f5a220e(arg0) {
|
|
|
1470
1386
|
const ret = Promise.resolve(arg0);
|
|
1471
1387
|
return ret;
|
|
1472
1388
|
}
|
|
1473
|
-
export function __wbg_responseheaders_new(arg0) {
|
|
1474
|
-
const ret = ResponseHeaders.__wrap(arg0);
|
|
1475
|
-
return ret;
|
|
1476
|
-
}
|
|
1477
1389
|
export function __wbg_setTimeout_3a808dd861dd3c12(arg0, arg1) {
|
|
1478
1390
|
const ret = setTimeout(arg0, arg1);
|
|
1479
1391
|
return ret;
|
|
1480
1392
|
}
|
|
1393
|
+
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1394
|
+
arg0[arg1] = arg2;
|
|
1395
|
+
}
|
|
1481
1396
|
export function __wbg_set_a0e911be3da02782() { return handleError(function (arg0, arg1, arg2) {
|
|
1482
1397
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1483
1398
|
return ret;
|
|
@@ -1509,10 +1424,6 @@ export function __wbg_set_name_e500733c75ec36b0(arg0, arg1, arg2) {
|
|
|
1509
1424
|
export function __wbg_set_signal_2a5bd3615938edbc(arg0, arg1) {
|
|
1510
1425
|
arg0.signal = arg1;
|
|
1511
1426
|
}
|
|
1512
|
-
export function __wbg_sevquote_new(arg0) {
|
|
1513
|
-
const ret = SevQuote.__wrap(arg0);
|
|
1514
|
-
return ret;
|
|
1515
|
-
}
|
|
1516
1427
|
export function __wbg_signal_304beac95c8c5ea0(arg0) {
|
|
1517
1428
|
const ret = arg0.signal;
|
|
1518
1429
|
return ret;
|
|
@@ -1541,10 +1452,6 @@ export function __wbg_subarray_7c6a0da8f3b4a1ba(arg0, arg1, arg2) {
|
|
|
1541
1452
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1542
1453
|
return ret;
|
|
1543
1454
|
}
|
|
1544
|
-
export function __wbg_tdxquote_new(arg0) {
|
|
1545
|
-
const ret = TdxQuote.__wrap(arg0);
|
|
1546
|
-
return ret;
|
|
1547
|
-
}
|
|
1548
1455
|
export function __wbg_text_99930d92d5f1b540() { return handleError(function (arg0) {
|
|
1549
1456
|
const ret = arg0.text();
|
|
1550
1457
|
return ret;
|
|
@@ -1584,13 +1491,13 @@ export function __wbg_versions_215a3ab1c9d5745a(arg0) {
|
|
|
1584
1491
|
return ret;
|
|
1585
1492
|
}
|
|
1586
1493
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1587
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1588
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1494
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2508, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1495
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___wasm_bindgen_ac3a8ea93b796999___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ac3a8ea93b796999___JsError___true_);
|
|
1589
1496
|
return ret;
|
|
1590
1497
|
}
|
|
1591
1498
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1592
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1593
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1499
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2288, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1500
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_);
|
|
1594
1501
|
return ret;
|
|
1595
1502
|
}
|
|
1596
1503
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
@@ -1619,19 +1526,19 @@ export function __wbindgen_init_externref_table() {
|
|
|
1619
1526
|
table.set(offset + 2, true);
|
|
1620
1527
|
table.set(offset + 3, false);
|
|
1621
1528
|
}
|
|
1622
|
-
function
|
|
1623
|
-
wasm.
|
|
1529
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1530
|
+
wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1624
1531
|
}
|
|
1625
1532
|
|
|
1626
|
-
function
|
|
1627
|
-
const ret = wasm.
|
|
1533
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___wasm_bindgen_ac3a8ea93b796999___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ac3a8ea93b796999___JsError___true_(arg0, arg1, arg2) {
|
|
1534
|
+
const ret = wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___wasm_bindgen_ac3a8ea93b796999___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ac3a8ea93b796999___JsError___true_(arg0, arg1, arg2);
|
|
1628
1535
|
if (ret[1]) {
|
|
1629
1536
|
throw takeFromExternrefTable0(ret[0]);
|
|
1630
1537
|
}
|
|
1631
1538
|
}
|
|
1632
1539
|
|
|
1633
|
-
function
|
|
1634
|
-
wasm.
|
|
1540
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
1541
|
+
wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1635
1542
|
}
|
|
1636
1543
|
|
|
1637
1544
|
|
|
@@ -1642,9 +1549,9 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1642
1549
|
|
|
1643
1550
|
|
|
1644
1551
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1645
|
-
const
|
|
1552
|
+
const AttestResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1646
1553
|
? { register: () => {}, unregister: () => {} }
|
|
1647
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1554
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attestresponse_free(ptr, 1));
|
|
1648
1555
|
const AttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1649
1556
|
? { register: () => {}, unregister: () => {} }
|
|
1650
1557
|
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr, 1));
|
|
@@ -1666,6 +1573,9 @@ const ClientBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1666
1573
|
const CollateralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1667
1574
|
? { register: () => {}, unregister: () => {} }
|
|
1668
1575
|
: new FinalizationRegistry(ptr => wasm.__wbg_collateral_free(ptr, 1));
|
|
1576
|
+
const CvmNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1577
|
+
? { register: () => {}, unregister: () => {} }
|
|
1578
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cvmnonce_free(ptr, 1));
|
|
1669
1579
|
const DecodedClaimsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1670
1580
|
? { register: () => {}, unregister: () => {} }
|
|
1671
1581
|
: new FinalizationRegistry(ptr => wasm.__wbg_decodedclaims_free(ptr, 1));
|
|
@@ -1687,9 +1597,6 @@ const KeyChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1687
1597
|
const ModulesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1688
1598
|
? { register: () => {}, unregister: () => {} }
|
|
1689
1599
|
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr, 1));
|
|
1690
|
-
const NvidiaAttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1691
|
-
? { register: () => {}, unregister: () => {} }
|
|
1692
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr, 1));
|
|
1693
1600
|
const NvidiaNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1694
1601
|
? { register: () => {}, unregister: () => {} }
|
|
1695
1602
|
: new FinalizationRegistry(ptr => wasm.__wbg_nvidianonce_free(ptr, 1));
|
package/reticle_bg.wasm
CHANGED
|
Binary file
|
package/reticle_main.cjs
CHANGED
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
/* @ts-self-types="./reticle.d.ts" */
|
|
2
2
|
|
|
3
|
-
class
|
|
3
|
+
class AttestResponse {
|
|
4
4
|
static __wrap(ptr) {
|
|
5
|
-
const obj = Object.create(
|
|
5
|
+
const obj = Object.create(AttestResponse.prototype);
|
|
6
6
|
obj.__wbg_ptr = ptr;
|
|
7
|
-
|
|
7
|
+
AttestResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
8
8
|
return obj;
|
|
9
9
|
}
|
|
10
10
|
__destroy_into_raw() {
|
|
11
11
|
const ptr = this.__wbg_ptr;
|
|
12
12
|
this.__wbg_ptr = 0;
|
|
13
|
-
|
|
13
|
+
AttestResponseFinalization.unregister(this);
|
|
14
14
|
return ptr;
|
|
15
15
|
}
|
|
16
16
|
free() {
|
|
17
17
|
const ptr = this.__destroy_into_raw();
|
|
18
|
-
wasm.
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @returns {ResponseHeaders | undefined}
|
|
22
|
-
*/
|
|
23
|
-
cpu() {
|
|
24
|
-
const ret = wasm.attestheaders_cpu(this.__wbg_ptr);
|
|
25
|
-
return ret === 0 ? undefined : ResponseHeaders.__wrap(ret);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @returns {ResponseHeaders | undefined}
|
|
29
|
-
*/
|
|
30
|
-
gpu() {
|
|
31
|
-
const ret = wasm.attestheaders_gpu(this.__wbg_ptr);
|
|
32
|
-
return ret === 0 ? undefined : ResponseHeaders.__wrap(ret);
|
|
18
|
+
wasm.__wbg_attestresponse_free(ptr, 0);
|
|
33
19
|
}
|
|
34
20
|
}
|
|
35
|
-
if (Symbol.dispose)
|
|
36
|
-
exports.
|
|
21
|
+
if (Symbol.dispose) AttestResponse.prototype[Symbol.dispose] = AttestResponse.prototype.free;
|
|
22
|
+
exports.AttestResponse = AttestResponse;
|
|
37
23
|
|
|
38
24
|
class AttestResult {
|
|
39
25
|
static __wrap(ptr) {
|
|
@@ -53,19 +39,31 @@ class AttestResult {
|
|
|
53
39
|
wasm.__wbg_attestresult_free(ptr, 0);
|
|
54
40
|
}
|
|
55
41
|
/**
|
|
56
|
-
*
|
|
42
|
+
* Returns the response headers returned by the attestation request.
|
|
43
|
+
* @returns {ResponseHeaders}
|
|
57
44
|
*/
|
|
58
45
|
headers() {
|
|
59
46
|
const ret = wasm.attestresult_headers(this.__wbg_ptr);
|
|
60
|
-
return
|
|
47
|
+
return ResponseHeaders.__wrap(ret);
|
|
61
48
|
}
|
|
62
49
|
/**
|
|
50
|
+
* Returns the Modules that the remote party attested.
|
|
63
51
|
* @returns {Modules}
|
|
64
52
|
*/
|
|
65
53
|
modules() {
|
|
66
54
|
const ret = wasm.attestresult_modules(this.__wbg_ptr);
|
|
67
55
|
return Modules.__wrap(ret);
|
|
68
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns the manifest as serde serialized data. This means that it will
|
|
59
|
+
* go through JSON representation first. You can expect this to preserve the
|
|
60
|
+
* same format as the JSON report inside the CVM.
|
|
61
|
+
* @returns {any}
|
|
62
|
+
*/
|
|
63
|
+
pod_report() {
|
|
64
|
+
const ret = wasm.attestresult_pod_report(this.__wbg_ptr);
|
|
65
|
+
return ret;
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
68
|
if (Symbol.dispose) AttestResult.prototype[Symbol.dispose] = AttestResult.prototype.free;
|
|
71
69
|
exports.AttestResult = AttestResult;
|
|
@@ -114,12 +112,6 @@ if (Symbol.dispose) AzureNonce.prototype[Symbol.dispose] = AzureNonce.prototype.
|
|
|
114
112
|
exports.AzureNonce = AzureNonce;
|
|
115
113
|
|
|
116
114
|
class AzureQuote {
|
|
117
|
-
static __wrap(ptr) {
|
|
118
|
-
const obj = Object.create(AzureQuote.prototype);
|
|
119
|
-
obj.__wbg_ptr = ptr;
|
|
120
|
-
AzureQuoteFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
121
|
-
return obj;
|
|
122
|
-
}
|
|
123
115
|
__destroy_into_raw() {
|
|
124
116
|
const ptr = this.__wbg_ptr;
|
|
125
117
|
this.__wbg_ptr = 0;
|
|
@@ -213,97 +205,13 @@ class Client {
|
|
|
213
205
|
return ret;
|
|
214
206
|
}
|
|
215
207
|
/**
|
|
216
|
-
*
|
|
208
|
+
* Request unified `CvmReport` attestation from endpoint
|
|
209
|
+
* @param {CvmNonce} nonce
|
|
210
|
+
* @returns {Promise<AttestResponse>}
|
|
217
211
|
*/
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Completes end-to-end nvidia attestation. Generates nonce and validates claims all in one
|
|
224
|
-
* @returns {Promise<ResponseHeaders>}
|
|
225
|
-
*/
|
|
226
|
-
attest_nvidia() {
|
|
227
|
-
const ret = wasm.client_attest_nvidia(this.__wbg_ptr);
|
|
228
|
-
return ret;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Performs end-to-end sev-snp attestation. Generates nonce and validates claims all in one
|
|
232
|
-
* @returns {Promise<void>}
|
|
233
|
-
*/
|
|
234
|
-
attest_sev() {
|
|
235
|
-
const ret = wasm.client_attest_sev(this.__wbg_ptr);
|
|
236
|
-
return ret;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Performs end-to-end tdx attestation. Generates nonce and validates claims all in one
|
|
240
|
-
* @returns {Promise<void>}
|
|
241
|
-
*/
|
|
242
|
-
attest_tdx() {
|
|
243
|
-
const ret = wasm.client_attest_tdx(this.__wbg_ptr);
|
|
244
|
-
return ret;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Requests and parses an Azure Quote
|
|
248
|
-
* @param {AzureNonce} nonce
|
|
249
|
-
* @returns {Promise<AzureQuote>}
|
|
250
|
-
*/
|
|
251
|
-
request_azure(nonce) {
|
|
252
|
-
_assertClass(nonce, AzureNonce);
|
|
253
|
-
const ret = wasm.client_request_azure(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
254
|
-
return ret;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Gather available attestable modules from remote attestation endpoint
|
|
258
|
-
* @returns {Promise<Modules>}
|
|
259
|
-
*/
|
|
260
|
-
request_modules() {
|
|
261
|
-
const ret = wasm.client_request_modules(this.__wbg_ptr);
|
|
262
|
-
return ret;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Requests and parses an Nvidia EATToken attestation from the attestation server
|
|
266
|
-
*
|
|
267
|
-
* ### Warning
|
|
268
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
269
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
270
|
-
* please refer to [`Self::attest_nvidia`]
|
|
271
|
-
* @param {NvidiaNonce} nonce
|
|
272
|
-
* @returns {Promise<NvidiaAttestResult>}
|
|
273
|
-
*/
|
|
274
|
-
request_nvidia(nonce) {
|
|
275
|
-
_assertClass(nonce, NvidiaNonce);
|
|
276
|
-
const ret = wasm.client_request_nvidia(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
277
|
-
return ret;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Requests and parses a SEV-SNP attestation from the attestation server.
|
|
281
|
-
*
|
|
282
|
-
* ### Warning
|
|
283
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
284
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
285
|
-
* please refer to [`Self::attest_sev`]
|
|
286
|
-
* @param {SevNonce} nonce
|
|
287
|
-
* @returns {Promise<SevQuote>}
|
|
288
|
-
*/
|
|
289
|
-
request_sev(nonce) {
|
|
290
|
-
_assertClass(nonce, SevNonce);
|
|
291
|
-
const ret = wasm.client_request_sev(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
292
|
-
return ret;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Requests and parses a TDX quote
|
|
296
|
-
*
|
|
297
|
-
* ### Warning
|
|
298
|
-
* This method exposes core functionality and does not perform cryptographic
|
|
299
|
-
* or measurement checks on the attestation. If you want to perform end-to-end attestation
|
|
300
|
-
* please refer to [`Self::attest_tdx`]
|
|
301
|
-
* @param {TdxNonce} nonce
|
|
302
|
-
* @returns {Promise<TdxQuote>}
|
|
303
|
-
*/
|
|
304
|
-
request_tdx(nonce) {
|
|
305
|
-
_assertClass(nonce, TdxNonce);
|
|
306
|
-
const ret = wasm.client_request_tdx(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
212
|
+
request_attestation(nonce) {
|
|
213
|
+
_assertClass(nonce, CvmNonce);
|
|
214
|
+
const ret = wasm.client_request_attestation(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
307
215
|
return ret;
|
|
308
216
|
}
|
|
309
217
|
/**
|
|
@@ -381,6 +289,21 @@ class ClientBuilder {
|
|
|
381
289
|
const ret = wasm.clientbuilder_with_kds(ptr, ptr0);
|
|
382
290
|
return ClientBuilder.__wrap(ret);
|
|
383
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Sets the Trustbase URL where to look for measurements (golden values)
|
|
294
|
+
* @param {string} url
|
|
295
|
+
* @returns {ClientBuilder}
|
|
296
|
+
*/
|
|
297
|
+
with_measurements_url(url) {
|
|
298
|
+
const ptr = this.__destroy_into_raw();
|
|
299
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
300
|
+
const len0 = WASM_VECTOR_LEN;
|
|
301
|
+
const ret = wasm.clientbuilder_with_measurements_url(ptr, ptr0, len0);
|
|
302
|
+
if (ret[2]) {
|
|
303
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
304
|
+
}
|
|
305
|
+
return ClientBuilder.__wrap(ret[0]);
|
|
306
|
+
}
|
|
384
307
|
/**
|
|
385
308
|
* Sets custom PCS for Intel collateral server
|
|
386
309
|
* @param {Pcs} pcs
|
|
@@ -443,13 +366,50 @@ const CpuModule = Object.freeze({
|
|
|
443
366
|
});
|
|
444
367
|
exports.CpuModule = CpuModule;
|
|
445
368
|
|
|
446
|
-
class
|
|
369
|
+
class CvmNonce {
|
|
447
370
|
static __wrap(ptr) {
|
|
448
|
-
const obj = Object.create(
|
|
371
|
+
const obj = Object.create(CvmNonce.prototype);
|
|
449
372
|
obj.__wbg_ptr = ptr;
|
|
450
|
-
|
|
373
|
+
CvmNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
451
374
|
return obj;
|
|
452
375
|
}
|
|
376
|
+
__destroy_into_raw() {
|
|
377
|
+
const ptr = this.__wbg_ptr;
|
|
378
|
+
this.__wbg_ptr = 0;
|
|
379
|
+
CvmNonceFinalization.unregister(this);
|
|
380
|
+
return ptr;
|
|
381
|
+
}
|
|
382
|
+
free() {
|
|
383
|
+
const ptr = this.__destroy_into_raw();
|
|
384
|
+
wasm.__wbg_cvmnonce_free(ptr, 0);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* @returns {CvmNonce}
|
|
388
|
+
*/
|
|
389
|
+
static generate() {
|
|
390
|
+
const ret = wasm.cvmnonce_generate();
|
|
391
|
+
return CvmNonce.__wrap(ret);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* @returns {string}
|
|
395
|
+
*/
|
|
396
|
+
to_hex() {
|
|
397
|
+
let deferred1_0;
|
|
398
|
+
let deferred1_1;
|
|
399
|
+
try {
|
|
400
|
+
const ret = wasm.cvmnonce_to_hex(this.__wbg_ptr);
|
|
401
|
+
deferred1_0 = ret[0];
|
|
402
|
+
deferred1_1 = ret[1];
|
|
403
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
404
|
+
} finally {
|
|
405
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
if (Symbol.dispose) CvmNonce.prototype[Symbol.dispose] = CvmNonce.prototype.free;
|
|
410
|
+
exports.CvmNonce = CvmNonce;
|
|
411
|
+
|
|
412
|
+
class DecodedClaims {
|
|
453
413
|
__destroy_into_raw() {
|
|
454
414
|
const ptr = this.__wbg_ptr;
|
|
455
415
|
this.__wbg_ptr = 0;
|
|
@@ -494,21 +454,6 @@ class EATToken {
|
|
|
494
454
|
}
|
|
495
455
|
return EATToken.__wrap(ret[0]);
|
|
496
456
|
}
|
|
497
|
-
/**
|
|
498
|
-
* @param {KeyChain} keys
|
|
499
|
-
* @param {NvidiaNonce} nonce
|
|
500
|
-
* @returns {DecodedClaims}
|
|
501
|
-
*/
|
|
502
|
-
verify(keys, nonce) {
|
|
503
|
-
const ptr = this.__destroy_into_raw();
|
|
504
|
-
_assertClass(keys, KeyChain);
|
|
505
|
-
_assertClass(nonce, NvidiaNonce);
|
|
506
|
-
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
507
|
-
if (ret[2]) {
|
|
508
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
509
|
-
}
|
|
510
|
-
return DecodedClaims.__wrap(ret[0]);
|
|
511
|
-
}
|
|
512
457
|
}
|
|
513
458
|
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
514
459
|
exports.EATToken = EATToken;
|
|
@@ -748,27 +693,6 @@ class Modules {
|
|
|
748
693
|
if (Symbol.dispose) Modules.prototype[Symbol.dispose] = Modules.prototype.free;
|
|
749
694
|
exports.Modules = Modules;
|
|
750
695
|
|
|
751
|
-
class NvidiaAttestResult {
|
|
752
|
-
static __wrap(ptr) {
|
|
753
|
-
const obj = Object.create(NvidiaAttestResult.prototype);
|
|
754
|
-
obj.__wbg_ptr = ptr;
|
|
755
|
-
NvidiaAttestResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
756
|
-
return obj;
|
|
757
|
-
}
|
|
758
|
-
__destroy_into_raw() {
|
|
759
|
-
const ptr = this.__wbg_ptr;
|
|
760
|
-
this.__wbg_ptr = 0;
|
|
761
|
-
NvidiaAttestResultFinalization.unregister(this);
|
|
762
|
-
return ptr;
|
|
763
|
-
}
|
|
764
|
-
free() {
|
|
765
|
-
const ptr = this.__destroy_into_raw();
|
|
766
|
-
wasm.__wbg_nvidiaattestresult_free(ptr, 0);
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
if (Symbol.dispose) NvidiaAttestResult.prototype[Symbol.dispose] = NvidiaAttestResult.prototype.free;
|
|
770
|
-
exports.NvidiaAttestResult = NvidiaAttestResult;
|
|
771
|
-
|
|
772
696
|
class NvidiaNonce {
|
|
773
697
|
static __wrap(ptr) {
|
|
774
698
|
const obj = Object.create(NvidiaNonce.prototype);
|
|
@@ -1288,12 +1212,12 @@ function __wbg_get_imports() {
|
|
|
1288
1212
|
const ret = arg0.arrayBuffer();
|
|
1289
1213
|
return ret;
|
|
1290
1214
|
}, arguments); },
|
|
1291
|
-
|
|
1292
|
-
const ret =
|
|
1215
|
+
__wbg_attestresponse_new: function(arg0) {
|
|
1216
|
+
const ret = AttestResponse.__wrap(arg0);
|
|
1293
1217
|
return ret;
|
|
1294
1218
|
},
|
|
1295
|
-
|
|
1296
|
-
const ret =
|
|
1219
|
+
__wbg_attestresult_new: function(arg0) {
|
|
1220
|
+
const ret = AttestResult.__wrap(arg0);
|
|
1297
1221
|
return ret;
|
|
1298
1222
|
},
|
|
1299
1223
|
__wbg_call_dfde26266607c996: function() { return handleError(function (arg0, arg1, arg2) {
|
|
@@ -1332,18 +1256,18 @@ function __wbg_get_imports() {
|
|
|
1332
1256
|
const ret = fetch(arg0);
|
|
1333
1257
|
return ret;
|
|
1334
1258
|
},
|
|
1259
|
+
__wbg_fetch_0c64bd7df47b4e91: function(arg0, arg1) {
|
|
1260
|
+
const ret = globalThis.fetch(arg0, arg1);
|
|
1261
|
+
return ret;
|
|
1262
|
+
},
|
|
1335
1263
|
__wbg_fetch_2998af8c54e0997c: function(arg0, arg1) {
|
|
1336
1264
|
const ret = arg0.fetch(arg1);
|
|
1337
1265
|
return ret;
|
|
1338
1266
|
},
|
|
1339
|
-
|
|
1267
|
+
__wbg_fetch_63a3ab5bfe08a9d6: function(arg0) {
|
|
1340
1268
|
const ret = globalThis.fetch(arg0);
|
|
1341
1269
|
return ret;
|
|
1342
1270
|
},
|
|
1343
|
-
__wbg_fetch_afeeccd67d9f27cd: function(arg0, arg1) {
|
|
1344
|
-
const ret = globalThis.fetch(arg0, arg1);
|
|
1345
|
-
return ret;
|
|
1346
|
-
},
|
|
1347
1271
|
__wbg_gatewayerror_new: function(arg0) {
|
|
1348
1272
|
const ret = GatewayError.__wrap(arg0);
|
|
1349
1273
|
return ret;
|
|
@@ -1402,10 +1326,6 @@ function __wbg_get_imports() {
|
|
|
1402
1326
|
const ret = arg0.length;
|
|
1403
1327
|
return ret;
|
|
1404
1328
|
},
|
|
1405
|
-
__wbg_modules_new: function(arg0) {
|
|
1406
|
-
const ret = Modules.__wrap(arg0);
|
|
1407
|
-
return ret;
|
|
1408
|
-
},
|
|
1409
1329
|
__wbg_msCrypto_8c6d45a75ef1d3da: function(arg0) {
|
|
1410
1330
|
const ret = arg0.msCrypto;
|
|
1411
1331
|
return ret;
|
|
@@ -1445,7 +1365,7 @@ function __wbg_get_imports() {
|
|
|
1445
1365
|
const a = state0.a;
|
|
1446
1366
|
state0.a = 0;
|
|
1447
1367
|
try {
|
|
1448
|
-
return
|
|
1368
|
+
return wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1449
1369
|
} finally {
|
|
1450
1370
|
state0.a = a;
|
|
1451
1371
|
}
|
|
@@ -1476,10 +1396,6 @@ function __wbg_get_imports() {
|
|
|
1476
1396
|
const ret = Date.now();
|
|
1477
1397
|
return ret;
|
|
1478
1398
|
},
|
|
1479
|
-
__wbg_nvidiaattestresult_new: function(arg0) {
|
|
1480
|
-
const ret = NvidiaAttestResult.__wrap(arg0);
|
|
1481
|
-
return ret;
|
|
1482
|
-
},
|
|
1483
1399
|
__wbg_process_b2fea42461d03994: function(arg0) {
|
|
1484
1400
|
const ret = arg0.process;
|
|
1485
1401
|
return ret;
|
|
@@ -1505,14 +1421,13 @@ function __wbg_get_imports() {
|
|
|
1505
1421
|
const ret = Promise.resolve(arg0);
|
|
1506
1422
|
return ret;
|
|
1507
1423
|
},
|
|
1508
|
-
__wbg_responseheaders_new: function(arg0) {
|
|
1509
|
-
const ret = ResponseHeaders.__wrap(arg0);
|
|
1510
|
-
return ret;
|
|
1511
|
-
},
|
|
1512
1424
|
__wbg_setTimeout_3a808dd861dd3c12: function(arg0, arg1) {
|
|
1513
1425
|
const ret = setTimeout(arg0, arg1);
|
|
1514
1426
|
return ret;
|
|
1515
1427
|
},
|
|
1428
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1429
|
+
arg0[arg1] = arg2;
|
|
1430
|
+
},
|
|
1516
1431
|
__wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1517
1432
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1518
1433
|
return ret;
|
|
@@ -1544,10 +1459,6 @@ function __wbg_get_imports() {
|
|
|
1544
1459
|
__wbg_set_signal_2a5bd3615938edbc: function(arg0, arg1) {
|
|
1545
1460
|
arg0.signal = arg1;
|
|
1546
1461
|
},
|
|
1547
|
-
__wbg_sevquote_new: function(arg0) {
|
|
1548
|
-
const ret = SevQuote.__wrap(arg0);
|
|
1549
|
-
return ret;
|
|
1550
|
-
},
|
|
1551
1462
|
__wbg_signal_304beac95c8c5ea0: function(arg0) {
|
|
1552
1463
|
const ret = arg0.signal;
|
|
1553
1464
|
return ret;
|
|
@@ -1576,10 +1487,6 @@ function __wbg_get_imports() {
|
|
|
1576
1487
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1577
1488
|
return ret;
|
|
1578
1489
|
},
|
|
1579
|
-
__wbg_tdxquote_new: function(arg0) {
|
|
1580
|
-
const ret = TdxQuote.__wrap(arg0);
|
|
1581
|
-
return ret;
|
|
1582
|
-
},
|
|
1583
1490
|
__wbg_text_99930d92d5f1b540: function() { return handleError(function (arg0) {
|
|
1584
1491
|
const ret = arg0.text();
|
|
1585
1492
|
return ret;
|
|
@@ -1619,13 +1526,13 @@ function __wbg_get_imports() {
|
|
|
1619
1526
|
return ret;
|
|
1620
1527
|
},
|
|
1621
1528
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1622
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1623
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1529
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2508, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1530
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___wasm_bindgen_ac3a8ea93b796999___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ac3a8ea93b796999___JsError___true_);
|
|
1624
1531
|
return ret;
|
|
1625
1532
|
},
|
|
1626
1533
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1627
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1628
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1534
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2288, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1535
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_);
|
|
1629
1536
|
return ret;
|
|
1630
1537
|
},
|
|
1631
1538
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
@@ -1661,19 +1568,19 @@ function __wbg_get_imports() {
|
|
|
1661
1568
|
};
|
|
1662
1569
|
}
|
|
1663
1570
|
|
|
1664
|
-
function
|
|
1665
|
-
wasm.
|
|
1571
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1572
|
+
wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1666
1573
|
}
|
|
1667
1574
|
|
|
1668
|
-
function
|
|
1669
|
-
const ret = wasm.
|
|
1575
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___wasm_bindgen_ac3a8ea93b796999___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ac3a8ea93b796999___JsError___true_(arg0, arg1, arg2) {
|
|
1576
|
+
const ret = wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___wasm_bindgen_ac3a8ea93b796999___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ac3a8ea93b796999___JsError___true_(arg0, arg1, arg2);
|
|
1670
1577
|
if (ret[1]) {
|
|
1671
1578
|
throw takeFromExternrefTable0(ret[0]);
|
|
1672
1579
|
}
|
|
1673
1580
|
}
|
|
1674
1581
|
|
|
1675
|
-
function
|
|
1676
|
-
wasm.
|
|
1582
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
1583
|
+
wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined___js_sys_373c24d75c7f8d62___Function_fn_wasm_bindgen_ac3a8ea93b796999___JsValue_____wasm_bindgen_ac3a8ea93b796999___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1677
1584
|
}
|
|
1678
1585
|
|
|
1679
1586
|
|
|
@@ -1684,9 +1591,9 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1684
1591
|
|
|
1685
1592
|
|
|
1686
1593
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1687
|
-
const
|
|
1594
|
+
const AttestResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1688
1595
|
? { register: () => {}, unregister: () => {} }
|
|
1689
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1596
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attestresponse_free(ptr, 1));
|
|
1690
1597
|
const AttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1691
1598
|
? { register: () => {}, unregister: () => {} }
|
|
1692
1599
|
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr, 1));
|
|
@@ -1708,6 +1615,9 @@ const ClientBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1708
1615
|
const CollateralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1709
1616
|
? { register: () => {}, unregister: () => {} }
|
|
1710
1617
|
: new FinalizationRegistry(ptr => wasm.__wbg_collateral_free(ptr, 1));
|
|
1618
|
+
const CvmNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1619
|
+
? { register: () => {}, unregister: () => {} }
|
|
1620
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cvmnonce_free(ptr, 1));
|
|
1711
1621
|
const DecodedClaimsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1712
1622
|
? { register: () => {}, unregister: () => {} }
|
|
1713
1623
|
: new FinalizationRegistry(ptr => wasm.__wbg_decodedclaims_free(ptr, 1));
|
|
@@ -1729,9 +1639,6 @@ const KeyChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1729
1639
|
const ModulesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1730
1640
|
? { register: () => {}, unregister: () => {} }
|
|
1731
1641
|
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr, 1));
|
|
1732
|
-
const NvidiaAttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1733
|
-
? { register: () => {}, unregister: () => {} }
|
|
1734
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr, 1));
|
|
1735
1642
|
const NvidiaNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1736
1643
|
? { register: () => {}, unregister: () => {} }
|
|
1737
1644
|
: new FinalizationRegistry(ptr => wasm.__wbg_nvidianonce_free(ptr, 1));
|