@premai/reticle 0.5.0 → 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 +29 -58
- package/reticle.js +1 -1
- package/reticle_bg.js +111 -242
- package/reticle_bg.wasm +0 -0
- package/reticle_main.cjs +113 -244
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,12 +90,16 @@ 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
|
*/
|
|
130
100
|
with_pcs(pcs: Pcs): ClientBuilder;
|
|
131
101
|
/**
|
|
132
|
-
* sets
|
|
102
|
+
* sets the confidential policy provider to URL source with the specified url
|
|
133
103
|
*/
|
|
134
104
|
with_policies_url(url: string): ClientBuilder;
|
|
135
105
|
}
|
|
@@ -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
|
-
*
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const ret = wasm.client_attest_azure(this.__wbg_ptr);
|
|
213
|
-
return ret;
|
|
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>}
|
|
201
|
+
* Request unified `CvmReport` attestation from endpoint
|
|
202
|
+
* @param {CvmNonce} nonce
|
|
203
|
+
* @returns {Promise<AttestResponse>}
|
|
266
204
|
*/
|
|
267
|
-
|
|
268
|
-
_assertClass(nonce,
|
|
269
|
-
const ret = wasm.
|
|
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
|
|
@@ -386,7 +309,7 @@ export class ClientBuilder {
|
|
|
386
309
|
return ClientBuilder.__wrap(ret);
|
|
387
310
|
}
|
|
388
311
|
/**
|
|
389
|
-
* sets
|
|
312
|
+
* sets the confidential policy provider to URL source with the specified url
|
|
390
313
|
* @param {string} url
|
|
391
314
|
* @returns {ClientBuilder}
|
|
392
315
|
*/
|
|
@@ -395,7 +318,10 @@ export class ClientBuilder {
|
|
|
395
318
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
396
319
|
const len0 = WASM_VECTOR_LEN;
|
|
397
320
|
const ret = wasm.clientbuilder_with_policies_url(ptr, ptr0, len0);
|
|
398
|
-
|
|
321
|
+
if (ret[2]) {
|
|
322
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
323
|
+
}
|
|
324
|
+
return ClientBuilder.__wrap(ret[0]);
|
|
399
325
|
}
|
|
400
326
|
}
|
|
401
327
|
if (Symbol.dispose) ClientBuilder.prototype[Symbol.dispose] = ClientBuilder.prototype.free;
|
|
@@ -429,13 +355,49 @@ export const CpuModule = Object.freeze({
|
|
|
429
355
|
Azure: 2, "2": "Azure",
|
|
430
356
|
});
|
|
431
357
|
|
|
432
|
-
export class
|
|
358
|
+
export class CvmNonce {
|
|
433
359
|
static __wrap(ptr) {
|
|
434
|
-
const obj = Object.create(
|
|
360
|
+
const obj = Object.create(CvmNonce.prototype);
|
|
435
361
|
obj.__wbg_ptr = ptr;
|
|
436
|
-
|
|
362
|
+
CvmNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
437
363
|
return obj;
|
|
438
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 {
|
|
439
401
|
__destroy_into_raw() {
|
|
440
402
|
const ptr = this.__wbg_ptr;
|
|
441
403
|
this.__wbg_ptr = 0;
|
|
@@ -479,21 +441,6 @@ export class EATToken {
|
|
|
479
441
|
}
|
|
480
442
|
return EATToken.__wrap(ret[0]);
|
|
481
443
|
}
|
|
482
|
-
/**
|
|
483
|
-
* @param {KeyChain} keys
|
|
484
|
-
* @param {NvidiaNonce} nonce
|
|
485
|
-
* @returns {DecodedClaims}
|
|
486
|
-
*/
|
|
487
|
-
verify(keys, nonce) {
|
|
488
|
-
const ptr = this.__destroy_into_raw();
|
|
489
|
-
_assertClass(keys, KeyChain);
|
|
490
|
-
_assertClass(nonce, NvidiaNonce);
|
|
491
|
-
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
492
|
-
if (ret[2]) {
|
|
493
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
494
|
-
}
|
|
495
|
-
return DecodedClaims.__wrap(ret[0]);
|
|
496
|
-
}
|
|
497
444
|
}
|
|
498
445
|
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
499
446
|
|
|
@@ -726,26 +673,6 @@ export class Modules {
|
|
|
726
673
|
}
|
|
727
674
|
if (Symbol.dispose) Modules.prototype[Symbol.dispose] = Modules.prototype.free;
|
|
728
675
|
|
|
729
|
-
export class NvidiaAttestResult {
|
|
730
|
-
static __wrap(ptr) {
|
|
731
|
-
const obj = Object.create(NvidiaAttestResult.prototype);
|
|
732
|
-
obj.__wbg_ptr = ptr;
|
|
733
|
-
NvidiaAttestResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
734
|
-
return obj;
|
|
735
|
-
}
|
|
736
|
-
__destroy_into_raw() {
|
|
737
|
-
const ptr = this.__wbg_ptr;
|
|
738
|
-
this.__wbg_ptr = 0;
|
|
739
|
-
NvidiaAttestResultFinalization.unregister(this);
|
|
740
|
-
return ptr;
|
|
741
|
-
}
|
|
742
|
-
free() {
|
|
743
|
-
const ptr = this.__destroy_into_raw();
|
|
744
|
-
wasm.__wbg_nvidiaattestresult_free(ptr, 0);
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
if (Symbol.dispose) NvidiaAttestResult.prototype[Symbol.dispose] = NvidiaAttestResult.prototype.free;
|
|
748
|
-
|
|
749
676
|
export class NvidiaNonce {
|
|
750
677
|
static __wrap(ptr) {
|
|
751
678
|
const obj = Object.create(NvidiaNonce.prototype);
|
|
@@ -1250,18 +1177,14 @@ export function __wbg_arrayBuffer_cb5d4748b5f3cad5() { return handleError(functi
|
|
|
1250
1177
|
const ret = arg0.arrayBuffer();
|
|
1251
1178
|
return ret;
|
|
1252
1179
|
}, arguments); }
|
|
1253
|
-
export function
|
|
1254
|
-
const ret =
|
|
1180
|
+
export function __wbg_attestresponse_new(arg0) {
|
|
1181
|
+
const ret = AttestResponse.__wrap(arg0);
|
|
1255
1182
|
return ret;
|
|
1256
1183
|
}
|
|
1257
|
-
export function
|
|
1258
|
-
const ret =
|
|
1184
|
+
export function __wbg_attestresult_new(arg0) {
|
|
1185
|
+
const ret = AttestResult.__wrap(arg0);
|
|
1259
1186
|
return ret;
|
|
1260
1187
|
}
|
|
1261
|
-
export function __wbg_call_13665d9f14390edc() { return handleError(function (arg0, arg1) {
|
|
1262
|
-
const ret = arg0.call(arg1);
|
|
1263
|
-
return ret;
|
|
1264
|
-
}, arguments); }
|
|
1265
1188
|
export function __wbg_call_dfde26266607c996() { return handleError(function (arg0, arg1, arg2) {
|
|
1266
1189
|
const ret = arg0.call(arg1, arg2);
|
|
1267
1190
|
return ret;
|
|
@@ -1270,10 +1193,6 @@ export function __wbg_clearTimeout_333bba87532ab9d3(arg0) {
|
|
|
1270
1193
|
const ret = clearTimeout(arg0);
|
|
1271
1194
|
return ret;
|
|
1272
1195
|
}
|
|
1273
|
-
export function __wbg_clearTimeout_6b8d9a38b9263d65(arg0) {
|
|
1274
|
-
const ret = clearTimeout(arg0);
|
|
1275
|
-
return ret;
|
|
1276
|
-
}
|
|
1277
1196
|
export function __wbg_client_new(arg0) {
|
|
1278
1197
|
const ret = Client.__wrap(arg0);
|
|
1279
1198
|
return ret;
|
|
@@ -1302,7 +1221,7 @@ export function __wbg_fetch_074561c3e313c86f(arg0) {
|
|
|
1302
1221
|
const ret = fetch(arg0);
|
|
1303
1222
|
return ret;
|
|
1304
1223
|
}
|
|
1305
|
-
export function
|
|
1224
|
+
export function __wbg_fetch_0c64bd7df47b4e91(arg0, arg1) {
|
|
1306
1225
|
const ret = globalThis.fetch(arg0, arg1);
|
|
1307
1226
|
return ret;
|
|
1308
1227
|
}
|
|
@@ -1310,11 +1229,7 @@ export function __wbg_fetch_2998af8c54e0997c(arg0, arg1) {
|
|
|
1310
1229
|
const ret = arg0.fetch(arg1);
|
|
1311
1230
|
return ret;
|
|
1312
1231
|
}
|
|
1313
|
-
export function
|
|
1314
|
-
const ret = fetch(arg0);
|
|
1315
|
-
return ret;
|
|
1316
|
-
}
|
|
1317
|
-
export function __wbg_fetch_ee414d53c87db3c9(arg0) {
|
|
1232
|
+
export function __wbg_fetch_63a3ab5bfe08a9d6(arg0) {
|
|
1318
1233
|
const ret = globalThis.fetch(arg0);
|
|
1319
1234
|
return ret;
|
|
1320
1235
|
}
|
|
@@ -1332,10 +1247,6 @@ export function __wbg_getTime_09f1dd40a44edb30(arg0) {
|
|
|
1332
1247
|
const ret = arg0.getTime();
|
|
1333
1248
|
return ret;
|
|
1334
1249
|
}
|
|
1335
|
-
export function __wbg_get_3e9a707ab7d352eb() { return handleError(function (arg0, arg1) {
|
|
1336
|
-
const ret = Reflect.get(arg0, arg1);
|
|
1337
|
-
return ret;
|
|
1338
|
-
}, arguments); }
|
|
1339
1250
|
export function __wbg_get_98fdf51d029a75eb(arg0, arg1) {
|
|
1340
1251
|
const ret = arg0[arg1 >>> 0];
|
|
1341
1252
|
return ret;
|
|
@@ -1372,10 +1283,6 @@ export function __wbg_isArray_94898ed3aad6947b(arg0) {
|
|
|
1372
1283
|
const ret = Array.isArray(arg0);
|
|
1373
1284
|
return ret;
|
|
1374
1285
|
}
|
|
1375
|
-
export function __wbg_iterator_1441b47f341dc34f() {
|
|
1376
|
-
const ret = Symbol.iterator;
|
|
1377
|
-
return ret;
|
|
1378
|
-
}
|
|
1379
1286
|
export function __wbg_keychain_new(arg0) {
|
|
1380
1287
|
const ret = KeyChain.__wrap(arg0);
|
|
1381
1288
|
return ret;
|
|
@@ -1384,10 +1291,6 @@ export function __wbg_length_56fcd3e2b7e0299d(arg0) {
|
|
|
1384
1291
|
const ret = arg0.length;
|
|
1385
1292
|
return ret;
|
|
1386
1293
|
}
|
|
1387
|
-
export function __wbg_modules_new(arg0) {
|
|
1388
|
-
const ret = Modules.__wrap(arg0);
|
|
1389
|
-
return ret;
|
|
1390
|
-
}
|
|
1391
1294
|
export function __wbg_msCrypto_8c6d45a75ef1d3da(arg0) {
|
|
1392
1295
|
const ret = arg0.msCrypto;
|
|
1393
1296
|
return ret;
|
|
@@ -1427,7 +1330,7 @@ export function __wbg_new_typed_c072c4ce9a2a0cdf(arg0, arg1) {
|
|
|
1427
1330
|
const a = state0.a;
|
|
1428
1331
|
state0.a = 0;
|
|
1429
1332
|
try {
|
|
1430
|
-
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);
|
|
1431
1334
|
} finally {
|
|
1432
1335
|
state0.a = a;
|
|
1433
1336
|
}
|
|
@@ -1446,10 +1349,6 @@ export function __wbg_new_with_str_and_init_ffe9977c986ea039() { return handleEr
|
|
|
1446
1349
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1447
1350
|
return ret;
|
|
1448
1351
|
}, arguments); }
|
|
1449
|
-
export function __wbg_next_2a4e19f4f5083b0f(arg0) {
|
|
1450
|
-
const ret = arg0.next;
|
|
1451
|
-
return ret;
|
|
1452
|
-
}
|
|
1453
1352
|
export function __wbg_next_6429a146bf756f93() { return handleError(function (arg0) {
|
|
1454
1353
|
const ret = arg0.next();
|
|
1455
1354
|
return ret;
|
|
@@ -1462,10 +1361,6 @@ export function __wbg_now_81363d44c96dd239() {
|
|
|
1462
1361
|
const ret = Date.now();
|
|
1463
1362
|
return ret;
|
|
1464
1363
|
}
|
|
1465
|
-
export function __wbg_nvidiaattestresult_new(arg0) {
|
|
1466
|
-
const ret = NvidiaAttestResult.__wrap(arg0);
|
|
1467
|
-
return ret;
|
|
1468
|
-
}
|
|
1469
1364
|
export function __wbg_process_b2fea42461d03994(arg0) {
|
|
1470
1365
|
const ret = arg0.process;
|
|
1471
1366
|
return ret;
|
|
@@ -1491,17 +1386,12 @@ export function __wbg_resolve_d17db9352f5a220e(arg0) {
|
|
|
1491
1386
|
const ret = Promise.resolve(arg0);
|
|
1492
1387
|
return ret;
|
|
1493
1388
|
}
|
|
1494
|
-
export function __wbg_responseheaders_new(arg0) {
|
|
1495
|
-
const ret = ResponseHeaders.__wrap(arg0);
|
|
1496
|
-
return ret;
|
|
1497
|
-
}
|
|
1498
1389
|
export function __wbg_setTimeout_3a808dd861dd3c12(arg0, arg1) {
|
|
1499
1390
|
const ret = setTimeout(arg0, arg1);
|
|
1500
1391
|
return ret;
|
|
1501
1392
|
}
|
|
1502
|
-
export function
|
|
1503
|
-
|
|
1504
|
-
return ret;
|
|
1393
|
+
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1394
|
+
arg0[arg1] = arg2;
|
|
1505
1395
|
}
|
|
1506
1396
|
export function __wbg_set_a0e911be3da02782() { return handleError(function (arg0, arg1, arg2) {
|
|
1507
1397
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
@@ -1534,10 +1424,6 @@ export function __wbg_set_name_e500733c75ec36b0(arg0, arg1, arg2) {
|
|
|
1534
1424
|
export function __wbg_set_signal_2a5bd3615938edbc(arg0, arg1) {
|
|
1535
1425
|
arg0.signal = arg1;
|
|
1536
1426
|
}
|
|
1537
|
-
export function __wbg_sevquote_new(arg0) {
|
|
1538
|
-
const ret = SevQuote.__wrap(arg0);
|
|
1539
|
-
return ret;
|
|
1540
|
-
}
|
|
1541
1427
|
export function __wbg_signal_304beac95c8c5ea0(arg0) {
|
|
1542
1428
|
const ret = arg0.signal;
|
|
1543
1429
|
return ret;
|
|
@@ -1562,18 +1448,10 @@ export function __wbg_status_0853c9f5752c7ee2(arg0) {
|
|
|
1562
1448
|
const ret = arg0.status;
|
|
1563
1449
|
return ret;
|
|
1564
1450
|
}
|
|
1565
|
-
export function __wbg_stringify_ef0c105b1ccc3849() { return handleError(function (arg0) {
|
|
1566
|
-
const ret = JSON.stringify(arg0);
|
|
1567
|
-
return ret;
|
|
1568
|
-
}, arguments); }
|
|
1569
1451
|
export function __wbg_subarray_7c6a0da8f3b4a1ba(arg0, arg1, arg2) {
|
|
1570
1452
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1571
1453
|
return ret;
|
|
1572
1454
|
}
|
|
1573
|
-
export function __wbg_tdxquote_new(arg0) {
|
|
1574
|
-
const ret = TdxQuote.__wrap(arg0);
|
|
1575
|
-
return ret;
|
|
1576
|
-
}
|
|
1577
1455
|
export function __wbg_text_99930d92d5f1b540() { return handleError(function (arg0) {
|
|
1578
1456
|
const ret = arg0.text();
|
|
1579
1457
|
return ret;
|
|
@@ -1613,31 +1491,26 @@ export function __wbg_versions_215a3ab1c9d5745a(arg0) {
|
|
|
1613
1491
|
return ret;
|
|
1614
1492
|
}
|
|
1615
1493
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1616
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1617
|
-
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_);
|
|
1618
1496
|
return ret;
|
|
1619
1497
|
}
|
|
1620
1498
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1621
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1622
|
-
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_);
|
|
1623
1501
|
return ret;
|
|
1624
1502
|
}
|
|
1625
1503
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1626
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2103, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1627
|
-
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3c4a7dcd6cb00983);
|
|
1628
|
-
return ret;
|
|
1629
|
-
}
|
|
1630
|
-
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1631
1504
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1632
1505
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1633
1506
|
return ret;
|
|
1634
1507
|
}
|
|
1635
|
-
export function
|
|
1508
|
+
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1636
1509
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1637
1510
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1638
1511
|
return ret;
|
|
1639
1512
|
}
|
|
1640
|
-
export function
|
|
1513
|
+
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
1641
1514
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1642
1515
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1643
1516
|
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
@@ -1653,23 +1526,19 @@ export function __wbindgen_init_externref_table() {
|
|
|
1653
1526
|
table.set(offset + 2, true);
|
|
1654
1527
|
table.set(offset + 3, false);
|
|
1655
1528
|
}
|
|
1656
|
-
function
|
|
1657
|
-
wasm.
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
function wasm_bindgen__convert__closures_____invoke__h3c4a7dcd6cb00983(arg0, arg1) {
|
|
1661
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h3c4a7dcd6cb00983(arg0, arg1);
|
|
1529
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1530
|
+
wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1662
1531
|
}
|
|
1663
1532
|
|
|
1664
|
-
function
|
|
1665
|
-
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);
|
|
1666
1535
|
if (ret[1]) {
|
|
1667
1536
|
throw takeFromExternrefTable0(ret[0]);
|
|
1668
1537
|
}
|
|
1669
1538
|
}
|
|
1670
1539
|
|
|
1671
|
-
function
|
|
1672
|
-
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);
|
|
1673
1542
|
}
|
|
1674
1543
|
|
|
1675
1544
|
|
|
@@ -1680,9 +1549,9 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1680
1549
|
|
|
1681
1550
|
|
|
1682
1551
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1683
|
-
const
|
|
1552
|
+
const AttestResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1684
1553
|
? { register: () => {}, unregister: () => {} }
|
|
1685
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1554
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attestresponse_free(ptr, 1));
|
|
1686
1555
|
const AttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1687
1556
|
? { register: () => {}, unregister: () => {} }
|
|
1688
1557
|
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr, 1));
|
|
@@ -1704,6 +1573,9 @@ const ClientBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1704
1573
|
const CollateralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1705
1574
|
? { register: () => {}, unregister: () => {} }
|
|
1706
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));
|
|
1707
1579
|
const DecodedClaimsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1708
1580
|
? { register: () => {}, unregister: () => {} }
|
|
1709
1581
|
: new FinalizationRegistry(ptr => wasm.__wbg_decodedclaims_free(ptr, 1));
|
|
@@ -1725,9 +1597,6 @@ const KeyChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1725
1597
|
const ModulesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1726
1598
|
? { register: () => {}, unregister: () => {} }
|
|
1727
1599
|
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr, 1));
|
|
1728
|
-
const NvidiaAttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1729
|
-
? { register: () => {}, unregister: () => {} }
|
|
1730
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr, 1));
|
|
1731
1600
|
const NvidiaNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1732
1601
|
? { register: () => {}, unregister: () => {} }
|
|
1733
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
|
-
*
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
const ret = wasm.client_attest_azure(this.__wbg_ptr);
|
|
220
|
-
return ret;
|
|
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>}
|
|
208
|
+
* Request unified `CvmReport` attestation from endpoint
|
|
209
|
+
* @param {CvmNonce} nonce
|
|
210
|
+
* @returns {Promise<AttestResponse>}
|
|
273
211
|
*/
|
|
274
|
-
|
|
275
|
-
_assertClass(nonce,
|
|
276
|
-
const ret = wasm.
|
|
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
|
|
@@ -394,7 +317,7 @@ class ClientBuilder {
|
|
|
394
317
|
return ClientBuilder.__wrap(ret);
|
|
395
318
|
}
|
|
396
319
|
/**
|
|
397
|
-
* sets
|
|
320
|
+
* sets the confidential policy provider to URL source with the specified url
|
|
398
321
|
* @param {string} url
|
|
399
322
|
* @returns {ClientBuilder}
|
|
400
323
|
*/
|
|
@@ -403,7 +326,10 @@ class ClientBuilder {
|
|
|
403
326
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
404
327
|
const len0 = WASM_VECTOR_LEN;
|
|
405
328
|
const ret = wasm.clientbuilder_with_policies_url(ptr, ptr0, len0);
|
|
406
|
-
|
|
329
|
+
if (ret[2]) {
|
|
330
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
331
|
+
}
|
|
332
|
+
return ClientBuilder.__wrap(ret[0]);
|
|
407
333
|
}
|
|
408
334
|
}
|
|
409
335
|
if (Symbol.dispose) ClientBuilder.prototype[Symbol.dispose] = ClientBuilder.prototype.free;
|
|
@@ -440,13 +366,50 @@ const CpuModule = Object.freeze({
|
|
|
440
366
|
});
|
|
441
367
|
exports.CpuModule = CpuModule;
|
|
442
368
|
|
|
443
|
-
class
|
|
369
|
+
class CvmNonce {
|
|
444
370
|
static __wrap(ptr) {
|
|
445
|
-
const obj = Object.create(
|
|
371
|
+
const obj = Object.create(CvmNonce.prototype);
|
|
446
372
|
obj.__wbg_ptr = ptr;
|
|
447
|
-
|
|
373
|
+
CvmNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
448
374
|
return obj;
|
|
449
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 {
|
|
450
413
|
__destroy_into_raw() {
|
|
451
414
|
const ptr = this.__wbg_ptr;
|
|
452
415
|
this.__wbg_ptr = 0;
|
|
@@ -491,21 +454,6 @@ class EATToken {
|
|
|
491
454
|
}
|
|
492
455
|
return EATToken.__wrap(ret[0]);
|
|
493
456
|
}
|
|
494
|
-
/**
|
|
495
|
-
* @param {KeyChain} keys
|
|
496
|
-
* @param {NvidiaNonce} nonce
|
|
497
|
-
* @returns {DecodedClaims}
|
|
498
|
-
*/
|
|
499
|
-
verify(keys, nonce) {
|
|
500
|
-
const ptr = this.__destroy_into_raw();
|
|
501
|
-
_assertClass(keys, KeyChain);
|
|
502
|
-
_assertClass(nonce, NvidiaNonce);
|
|
503
|
-
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
504
|
-
if (ret[2]) {
|
|
505
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
506
|
-
}
|
|
507
|
-
return DecodedClaims.__wrap(ret[0]);
|
|
508
|
-
}
|
|
509
457
|
}
|
|
510
458
|
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
511
459
|
exports.EATToken = EATToken;
|
|
@@ -745,27 +693,6 @@ class Modules {
|
|
|
745
693
|
if (Symbol.dispose) Modules.prototype[Symbol.dispose] = Modules.prototype.free;
|
|
746
694
|
exports.Modules = Modules;
|
|
747
695
|
|
|
748
|
-
class NvidiaAttestResult {
|
|
749
|
-
static __wrap(ptr) {
|
|
750
|
-
const obj = Object.create(NvidiaAttestResult.prototype);
|
|
751
|
-
obj.__wbg_ptr = ptr;
|
|
752
|
-
NvidiaAttestResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
753
|
-
return obj;
|
|
754
|
-
}
|
|
755
|
-
__destroy_into_raw() {
|
|
756
|
-
const ptr = this.__wbg_ptr;
|
|
757
|
-
this.__wbg_ptr = 0;
|
|
758
|
-
NvidiaAttestResultFinalization.unregister(this);
|
|
759
|
-
return ptr;
|
|
760
|
-
}
|
|
761
|
-
free() {
|
|
762
|
-
const ptr = this.__destroy_into_raw();
|
|
763
|
-
wasm.__wbg_nvidiaattestresult_free(ptr, 0);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if (Symbol.dispose) NvidiaAttestResult.prototype[Symbol.dispose] = NvidiaAttestResult.prototype.free;
|
|
767
|
-
exports.NvidiaAttestResult = NvidiaAttestResult;
|
|
768
|
-
|
|
769
696
|
class NvidiaNonce {
|
|
770
697
|
static __wrap(ptr) {
|
|
771
698
|
const obj = Object.create(NvidiaNonce.prototype);
|
|
@@ -1285,18 +1212,14 @@ function __wbg_get_imports() {
|
|
|
1285
1212
|
const ret = arg0.arrayBuffer();
|
|
1286
1213
|
return ret;
|
|
1287
1214
|
}, arguments); },
|
|
1288
|
-
|
|
1289
|
-
const ret =
|
|
1215
|
+
__wbg_attestresponse_new: function(arg0) {
|
|
1216
|
+
const ret = AttestResponse.__wrap(arg0);
|
|
1290
1217
|
return ret;
|
|
1291
1218
|
},
|
|
1292
|
-
|
|
1293
|
-
const ret =
|
|
1219
|
+
__wbg_attestresult_new: function(arg0) {
|
|
1220
|
+
const ret = AttestResult.__wrap(arg0);
|
|
1294
1221
|
return ret;
|
|
1295
1222
|
},
|
|
1296
|
-
__wbg_call_13665d9f14390edc: function() { return handleError(function (arg0, arg1) {
|
|
1297
|
-
const ret = arg0.call(arg1);
|
|
1298
|
-
return ret;
|
|
1299
|
-
}, arguments); },
|
|
1300
1223
|
__wbg_call_dfde26266607c996: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1301
1224
|
const ret = arg0.call(arg1, arg2);
|
|
1302
1225
|
return ret;
|
|
@@ -1305,10 +1228,6 @@ function __wbg_get_imports() {
|
|
|
1305
1228
|
const ret = clearTimeout(arg0);
|
|
1306
1229
|
return ret;
|
|
1307
1230
|
},
|
|
1308
|
-
__wbg_clearTimeout_6b8d9a38b9263d65: function(arg0) {
|
|
1309
|
-
const ret = clearTimeout(arg0);
|
|
1310
|
-
return ret;
|
|
1311
|
-
},
|
|
1312
1231
|
__wbg_client_new: function(arg0) {
|
|
1313
1232
|
const ret = Client.__wrap(arg0);
|
|
1314
1233
|
return ret;
|
|
@@ -1337,7 +1256,7 @@ function __wbg_get_imports() {
|
|
|
1337
1256
|
const ret = fetch(arg0);
|
|
1338
1257
|
return ret;
|
|
1339
1258
|
},
|
|
1340
|
-
|
|
1259
|
+
__wbg_fetch_0c64bd7df47b4e91: function(arg0, arg1) {
|
|
1341
1260
|
const ret = globalThis.fetch(arg0, arg1);
|
|
1342
1261
|
return ret;
|
|
1343
1262
|
},
|
|
@@ -1345,11 +1264,7 @@ function __wbg_get_imports() {
|
|
|
1345
1264
|
const ret = arg0.fetch(arg1);
|
|
1346
1265
|
return ret;
|
|
1347
1266
|
},
|
|
1348
|
-
|
|
1349
|
-
const ret = fetch(arg0);
|
|
1350
|
-
return ret;
|
|
1351
|
-
},
|
|
1352
|
-
__wbg_fetch_ee414d53c87db3c9: function(arg0) {
|
|
1267
|
+
__wbg_fetch_63a3ab5bfe08a9d6: function(arg0) {
|
|
1353
1268
|
const ret = globalThis.fetch(arg0);
|
|
1354
1269
|
return ret;
|
|
1355
1270
|
},
|
|
@@ -1367,10 +1282,6 @@ function __wbg_get_imports() {
|
|
|
1367
1282
|
const ret = arg0.getTime();
|
|
1368
1283
|
return ret;
|
|
1369
1284
|
},
|
|
1370
|
-
__wbg_get_3e9a707ab7d352eb: function() { return handleError(function (arg0, arg1) {
|
|
1371
|
-
const ret = Reflect.get(arg0, arg1);
|
|
1372
|
-
return ret;
|
|
1373
|
-
}, arguments); },
|
|
1374
1285
|
__wbg_get_98fdf51d029a75eb: function(arg0, arg1) {
|
|
1375
1286
|
const ret = arg0[arg1 >>> 0];
|
|
1376
1287
|
return ret;
|
|
@@ -1407,10 +1318,6 @@ function __wbg_get_imports() {
|
|
|
1407
1318
|
const ret = Array.isArray(arg0);
|
|
1408
1319
|
return ret;
|
|
1409
1320
|
},
|
|
1410
|
-
__wbg_iterator_1441b47f341dc34f: function() {
|
|
1411
|
-
const ret = Symbol.iterator;
|
|
1412
|
-
return ret;
|
|
1413
|
-
},
|
|
1414
1321
|
__wbg_keychain_new: function(arg0) {
|
|
1415
1322
|
const ret = KeyChain.__wrap(arg0);
|
|
1416
1323
|
return ret;
|
|
@@ -1419,10 +1326,6 @@ function __wbg_get_imports() {
|
|
|
1419
1326
|
const ret = arg0.length;
|
|
1420
1327
|
return ret;
|
|
1421
1328
|
},
|
|
1422
|
-
__wbg_modules_new: function(arg0) {
|
|
1423
|
-
const ret = Modules.__wrap(arg0);
|
|
1424
|
-
return ret;
|
|
1425
|
-
},
|
|
1426
1329
|
__wbg_msCrypto_8c6d45a75ef1d3da: function(arg0) {
|
|
1427
1330
|
const ret = arg0.msCrypto;
|
|
1428
1331
|
return ret;
|
|
@@ -1462,7 +1365,7 @@ function __wbg_get_imports() {
|
|
|
1462
1365
|
const a = state0.a;
|
|
1463
1366
|
state0.a = 0;
|
|
1464
1367
|
try {
|
|
1465
|
-
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);
|
|
1466
1369
|
} finally {
|
|
1467
1370
|
state0.a = a;
|
|
1468
1371
|
}
|
|
@@ -1481,10 +1384,6 @@ function __wbg_get_imports() {
|
|
|
1481
1384
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1482
1385
|
return ret;
|
|
1483
1386
|
}, arguments); },
|
|
1484
|
-
__wbg_next_2a4e19f4f5083b0f: function(arg0) {
|
|
1485
|
-
const ret = arg0.next;
|
|
1486
|
-
return ret;
|
|
1487
|
-
},
|
|
1488
1387
|
__wbg_next_6429a146bf756f93: function() { return handleError(function (arg0) {
|
|
1489
1388
|
const ret = arg0.next();
|
|
1490
1389
|
return ret;
|
|
@@ -1497,10 +1396,6 @@ function __wbg_get_imports() {
|
|
|
1497
1396
|
const ret = Date.now();
|
|
1498
1397
|
return ret;
|
|
1499
1398
|
},
|
|
1500
|
-
__wbg_nvidiaattestresult_new: function(arg0) {
|
|
1501
|
-
const ret = NvidiaAttestResult.__wrap(arg0);
|
|
1502
|
-
return ret;
|
|
1503
|
-
},
|
|
1504
1399
|
__wbg_process_b2fea42461d03994: function(arg0) {
|
|
1505
1400
|
const ret = arg0.process;
|
|
1506
1401
|
return ret;
|
|
@@ -1526,17 +1421,12 @@ function __wbg_get_imports() {
|
|
|
1526
1421
|
const ret = Promise.resolve(arg0);
|
|
1527
1422
|
return ret;
|
|
1528
1423
|
},
|
|
1529
|
-
__wbg_responseheaders_new: function(arg0) {
|
|
1530
|
-
const ret = ResponseHeaders.__wrap(arg0);
|
|
1531
|
-
return ret;
|
|
1532
|
-
},
|
|
1533
1424
|
__wbg_setTimeout_3a808dd861dd3c12: function(arg0, arg1) {
|
|
1534
1425
|
const ret = setTimeout(arg0, arg1);
|
|
1535
1426
|
return ret;
|
|
1536
1427
|
},
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
return ret;
|
|
1428
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1429
|
+
arg0[arg1] = arg2;
|
|
1540
1430
|
},
|
|
1541
1431
|
__wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1542
1432
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
@@ -1569,10 +1459,6 @@ function __wbg_get_imports() {
|
|
|
1569
1459
|
__wbg_set_signal_2a5bd3615938edbc: function(arg0, arg1) {
|
|
1570
1460
|
arg0.signal = arg1;
|
|
1571
1461
|
},
|
|
1572
|
-
__wbg_sevquote_new: function(arg0) {
|
|
1573
|
-
const ret = SevQuote.__wrap(arg0);
|
|
1574
|
-
return ret;
|
|
1575
|
-
},
|
|
1576
1462
|
__wbg_signal_304beac95c8c5ea0: function(arg0) {
|
|
1577
1463
|
const ret = arg0.signal;
|
|
1578
1464
|
return ret;
|
|
@@ -1597,18 +1483,10 @@ function __wbg_get_imports() {
|
|
|
1597
1483
|
const ret = arg0.status;
|
|
1598
1484
|
return ret;
|
|
1599
1485
|
},
|
|
1600
|
-
__wbg_stringify_ef0c105b1ccc3849: function() { return handleError(function (arg0) {
|
|
1601
|
-
const ret = JSON.stringify(arg0);
|
|
1602
|
-
return ret;
|
|
1603
|
-
}, arguments); },
|
|
1604
1486
|
__wbg_subarray_7c6a0da8f3b4a1ba: function(arg0, arg1, arg2) {
|
|
1605
1487
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1606
1488
|
return ret;
|
|
1607
1489
|
},
|
|
1608
|
-
__wbg_tdxquote_new: function(arg0) {
|
|
1609
|
-
const ret = TdxQuote.__wrap(arg0);
|
|
1610
|
-
return ret;
|
|
1611
|
-
},
|
|
1612
1490
|
__wbg_text_99930d92d5f1b540: function() { return handleError(function (arg0) {
|
|
1613
1491
|
const ret = arg0.text();
|
|
1614
1492
|
return ret;
|
|
@@ -1648,31 +1526,26 @@ function __wbg_get_imports() {
|
|
|
1648
1526
|
return ret;
|
|
1649
1527
|
},
|
|
1650
1528
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1651
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1652
|
-
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_);
|
|
1653
1531
|
return ret;
|
|
1654
1532
|
},
|
|
1655
1533
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1656
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1657
|
-
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_);
|
|
1658
1536
|
return ret;
|
|
1659
1537
|
},
|
|
1660
1538
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1661
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2103, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1662
|
-
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3c4a7dcd6cb00983);
|
|
1663
|
-
return ret;
|
|
1664
|
-
},
|
|
1665
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1666
1539
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1667
1540
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1668
1541
|
return ret;
|
|
1669
1542
|
},
|
|
1670
|
-
|
|
1543
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1671
1544
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1672
1545
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1673
1546
|
return ret;
|
|
1674
1547
|
},
|
|
1675
|
-
|
|
1548
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1676
1549
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1677
1550
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1678
1551
|
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
@@ -1695,23 +1568,19 @@ function __wbg_get_imports() {
|
|
|
1695
1568
|
};
|
|
1696
1569
|
}
|
|
1697
1570
|
|
|
1698
|
-
function
|
|
1699
|
-
wasm.
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
function wasm_bindgen__convert__closures_____invoke__h3c4a7dcd6cb00983(arg0, arg1) {
|
|
1703
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h3c4a7dcd6cb00983(arg0, arg1);
|
|
1571
|
+
function wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
1572
|
+
wasm.wasm_bindgen_ac3a8ea93b796999___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1704
1573
|
}
|
|
1705
1574
|
|
|
1706
|
-
function
|
|
1707
|
-
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);
|
|
1708
1577
|
if (ret[1]) {
|
|
1709
1578
|
throw takeFromExternrefTable0(ret[0]);
|
|
1710
1579
|
}
|
|
1711
1580
|
}
|
|
1712
1581
|
|
|
1713
|
-
function
|
|
1714
|
-
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);
|
|
1715
1584
|
}
|
|
1716
1585
|
|
|
1717
1586
|
|
|
@@ -1722,9 +1591,9 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1722
1591
|
|
|
1723
1592
|
|
|
1724
1593
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1725
|
-
const
|
|
1594
|
+
const AttestResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1726
1595
|
? { register: () => {}, unregister: () => {} }
|
|
1727
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1596
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attestresponse_free(ptr, 1));
|
|
1728
1597
|
const AttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1729
1598
|
? { register: () => {}, unregister: () => {} }
|
|
1730
1599
|
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr, 1));
|
|
@@ -1746,6 +1615,9 @@ const ClientBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1746
1615
|
const CollateralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1747
1616
|
? { register: () => {}, unregister: () => {} }
|
|
1748
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));
|
|
1749
1621
|
const DecodedClaimsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1750
1622
|
? { register: () => {}, unregister: () => {} }
|
|
1751
1623
|
: new FinalizationRegistry(ptr => wasm.__wbg_decodedclaims_free(ptr, 1));
|
|
@@ -1767,9 +1639,6 @@ const KeyChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1767
1639
|
const ModulesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1768
1640
|
? { register: () => {}, unregister: () => {} }
|
|
1769
1641
|
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr, 1));
|
|
1770
|
-
const NvidiaAttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1771
|
-
? { register: () => {}, unregister: () => {} }
|
|
1772
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr, 1));
|
|
1773
1642
|
const NvidiaNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1774
1643
|
? { register: () => {}, unregister: () => {} }
|
|
1775
1644
|
: new FinalizationRegistry(ptr => wasm.__wbg_nvidianonce_free(ptr, 1));
|