@premai/reticle 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/reticle.d.ts +101 -115
- package/reticle.js +2 -2
- package/reticle_bg.js +662 -663
- package/reticle_bg.wasm +0 -0
- package/reticle_main.js +677 -671
package/reticle_main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* @ts-self-types="./reticle.d.ts" */
|
|
2
|
+
const { realFetch } = require(String.raw`./snippets/reticle-f25e928bd9723d28/src/fetchShim.js`);
|
|
2
3
|
|
|
3
4
|
class AttestHeaders {
|
|
4
5
|
static __wrap(ptr) {
|
|
5
|
-
ptr = ptr >>> 0;
|
|
6
6
|
const obj = Object.create(AttestHeaders.prototype);
|
|
7
7
|
obj.__wbg_ptr = ptr;
|
|
8
8
|
AttestHeadersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -38,7 +38,6 @@ exports.AttestHeaders = AttestHeaders;
|
|
|
38
38
|
|
|
39
39
|
class AttestResult {
|
|
40
40
|
static __wrap(ptr) {
|
|
41
|
-
ptr = ptr >>> 0;
|
|
42
41
|
const obj = Object.create(AttestResult.prototype);
|
|
43
42
|
obj.__wbg_ptr = ptr;
|
|
44
43
|
AttestResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -72,9 +71,58 @@ class AttestResult {
|
|
|
72
71
|
if (Symbol.dispose) AttestResult.prototype[Symbol.dispose] = AttestResult.prototype.free;
|
|
73
72
|
exports.AttestResult = AttestResult;
|
|
74
73
|
|
|
74
|
+
/**
|
|
75
|
+
* A parsed certificate revocation list
|
|
76
|
+
*/
|
|
77
|
+
class CRL {
|
|
78
|
+
static __wrap(ptr) {
|
|
79
|
+
const obj = Object.create(CRL.prototype);
|
|
80
|
+
obj.__wbg_ptr = ptr;
|
|
81
|
+
CRLFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
__destroy_into_raw() {
|
|
85
|
+
const ptr = this.__wbg_ptr;
|
|
86
|
+
this.__wbg_ptr = 0;
|
|
87
|
+
CRLFinalization.unregister(this);
|
|
88
|
+
return ptr;
|
|
89
|
+
}
|
|
90
|
+
free() {
|
|
91
|
+
const ptr = this.__destroy_into_raw();
|
|
92
|
+
wasm.__wbg_crl_free(ptr, 0);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Passes if the certificates are not in the certificate revocation list
|
|
96
|
+
* Throws `AttestationError` on fail
|
|
97
|
+
* @param {VerifiedChain} chain
|
|
98
|
+
*/
|
|
99
|
+
check_chain(chain) {
|
|
100
|
+
_assertClass(chain, VerifiedChain);
|
|
101
|
+
const ret = wasm.crl_check_chain(this.__wbg_ptr, chain.__wbg_ptr);
|
|
102
|
+
if (ret[1]) {
|
|
103
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Parses a certificate revocation list from DER format binary data
|
|
108
|
+
* @param {Uint8Array} list
|
|
109
|
+
* @returns {CRL}
|
|
110
|
+
*/
|
|
111
|
+
static from_der(list) {
|
|
112
|
+
const ptr0 = passArray8ToWasm0(list, wasm.__wbindgen_malloc);
|
|
113
|
+
const len0 = WASM_VECTOR_LEN;
|
|
114
|
+
const ret = wasm.crl_from_der(ptr0, len0);
|
|
115
|
+
if (ret[2]) {
|
|
116
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
117
|
+
}
|
|
118
|
+
return CRL.__wrap(ret[0]);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (Symbol.dispose) CRL.prototype[Symbol.dispose] = CRL.prototype.free;
|
|
122
|
+
exports.CRL = CRL;
|
|
123
|
+
|
|
75
124
|
class Client {
|
|
76
125
|
static __wrap(ptr) {
|
|
77
|
-
ptr = ptr >>> 0;
|
|
78
126
|
const obj = Object.create(Client.prototype);
|
|
79
127
|
obj.__wbg_ptr = ptr;
|
|
80
128
|
ClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -192,7 +240,6 @@ exports.Client = Client;
|
|
|
192
240
|
|
|
193
241
|
class ClientBuilder {
|
|
194
242
|
static __wrap(ptr) {
|
|
195
|
-
ptr = ptr >>> 0;
|
|
196
243
|
const obj = Object.create(ClientBuilder.prototype);
|
|
197
244
|
obj.__wbg_ptr = ptr;
|
|
198
245
|
ClientBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -223,7 +270,7 @@ class ClientBuilder {
|
|
|
223
270
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
224
271
|
const len0 = WASM_VECTOR_LEN;
|
|
225
272
|
const ret = wasm.clientbuilder_new(ptr0, len0);
|
|
226
|
-
this.__wbg_ptr = ret
|
|
273
|
+
this.__wbg_ptr = ret;
|
|
227
274
|
ClientBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
228
275
|
return this;
|
|
229
276
|
}
|
|
@@ -284,7 +331,6 @@ exports.ClientBuilder = ClientBuilder;
|
|
|
284
331
|
|
|
285
332
|
class Collateral {
|
|
286
333
|
static __wrap(ptr) {
|
|
287
|
-
ptr = ptr >>> 0;
|
|
288
334
|
const obj = Object.create(Collateral.prototype);
|
|
289
335
|
obj.__wbg_ptr = ptr;
|
|
290
336
|
CollateralFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -313,9 +359,150 @@ const CpuModule = Object.freeze({
|
|
|
313
359
|
});
|
|
314
360
|
exports.CpuModule = CpuModule;
|
|
315
361
|
|
|
362
|
+
class DecodedClaims {
|
|
363
|
+
static __wrap(ptr) {
|
|
364
|
+
const obj = Object.create(DecodedClaims.prototype);
|
|
365
|
+
obj.__wbg_ptr = ptr;
|
|
366
|
+
DecodedClaimsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
367
|
+
return obj;
|
|
368
|
+
}
|
|
369
|
+
__destroy_into_raw() {
|
|
370
|
+
const ptr = this.__wbg_ptr;
|
|
371
|
+
this.__wbg_ptr = 0;
|
|
372
|
+
DecodedClaimsFinalization.unregister(this);
|
|
373
|
+
return ptr;
|
|
374
|
+
}
|
|
375
|
+
free() {
|
|
376
|
+
const ptr = this.__destroy_into_raw();
|
|
377
|
+
wasm.__wbg_decodedclaims_free(ptr, 0);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (Symbol.dispose) DecodedClaims.prototype[Symbol.dispose] = DecodedClaims.prototype.free;
|
|
381
|
+
exports.DecodedClaims = DecodedClaims;
|
|
382
|
+
|
|
383
|
+
class EATToken {
|
|
384
|
+
static __wrap(ptr) {
|
|
385
|
+
const obj = Object.create(EATToken.prototype);
|
|
386
|
+
obj.__wbg_ptr = ptr;
|
|
387
|
+
EATTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
388
|
+
return obj;
|
|
389
|
+
}
|
|
390
|
+
__destroy_into_raw() {
|
|
391
|
+
const ptr = this.__wbg_ptr;
|
|
392
|
+
this.__wbg_ptr = 0;
|
|
393
|
+
EATTokenFinalization.unregister(this);
|
|
394
|
+
return ptr;
|
|
395
|
+
}
|
|
396
|
+
free() {
|
|
397
|
+
const ptr = this.__destroy_into_raw();
|
|
398
|
+
wasm.__wbg_eattoken_free(ptr, 0);
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* @param {string} from
|
|
402
|
+
* @returns {EATToken}
|
|
403
|
+
*/
|
|
404
|
+
static parse(from) {
|
|
405
|
+
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.eattoken_parse(ptr0, len0);
|
|
408
|
+
if (ret[2]) {
|
|
409
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
410
|
+
}
|
|
411
|
+
return EATToken.__wrap(ret[0]);
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* @param {KeyChain} keys
|
|
415
|
+
* @param {NvidiaNonce} nonce
|
|
416
|
+
* @returns {DecodedClaims}
|
|
417
|
+
*/
|
|
418
|
+
verify(keys, nonce) {
|
|
419
|
+
const ptr = this.__destroy_into_raw();
|
|
420
|
+
_assertClass(keys, KeyChain);
|
|
421
|
+
_assertClass(nonce, NvidiaNonce);
|
|
422
|
+
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
423
|
+
if (ret[2]) {
|
|
424
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
425
|
+
}
|
|
426
|
+
return DecodedClaims.__wrap(ret[0]);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
430
|
+
exports.EATToken = EATToken;
|
|
431
|
+
|
|
432
|
+
class ExportPem {
|
|
433
|
+
static __wrap(ptr) {
|
|
434
|
+
const obj = Object.create(ExportPem.prototype);
|
|
435
|
+
obj.__wbg_ptr = ptr;
|
|
436
|
+
ExportPemFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
437
|
+
return obj;
|
|
438
|
+
}
|
|
439
|
+
__destroy_into_raw() {
|
|
440
|
+
const ptr = this.__wbg_ptr;
|
|
441
|
+
this.__wbg_ptr = 0;
|
|
442
|
+
ExportPemFinalization.unregister(this);
|
|
443
|
+
return ptr;
|
|
444
|
+
}
|
|
445
|
+
free() {
|
|
446
|
+
const ptr = this.__destroy_into_raw();
|
|
447
|
+
wasm.__wbg_exportpem_free(ptr, 0);
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* @returns {Uint8Array}
|
|
451
|
+
*/
|
|
452
|
+
get ark() {
|
|
453
|
+
const ret = wasm.__wbg_get_exportpem_ark(this.__wbg_ptr);
|
|
454
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
455
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
456
|
+
return v1;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* @returns {Uint8Array}
|
|
460
|
+
*/
|
|
461
|
+
get ask() {
|
|
462
|
+
const ret = wasm.__wbg_get_exportpem_ask(this.__wbg_ptr);
|
|
463
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
464
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
465
|
+
return v1;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* @returns {Uint8Array}
|
|
469
|
+
*/
|
|
470
|
+
get vek() {
|
|
471
|
+
const ret = wasm.__wbg_get_exportpem_vek(this.__wbg_ptr);
|
|
472
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
473
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
474
|
+
return v1;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* @param {Uint8Array} arg0
|
|
478
|
+
*/
|
|
479
|
+
set ark(arg0) {
|
|
480
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
481
|
+
const len0 = WASM_VECTOR_LEN;
|
|
482
|
+
wasm.__wbg_set_exportpem_ark(this.__wbg_ptr, ptr0, len0);
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* @param {Uint8Array} arg0
|
|
486
|
+
*/
|
|
487
|
+
set ask(arg0) {
|
|
488
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
489
|
+
const len0 = WASM_VECTOR_LEN;
|
|
490
|
+
wasm.__wbg_set_exportpem_ask(this.__wbg_ptr, ptr0, len0);
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* @param {Uint8Array} arg0
|
|
494
|
+
*/
|
|
495
|
+
set vek(arg0) {
|
|
496
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
497
|
+
const len0 = WASM_VECTOR_LEN;
|
|
498
|
+
wasm.__wbg_set_exportpem_vek(this.__wbg_ptr, ptr0, len0);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if (Symbol.dispose) ExportPem.prototype[Symbol.dispose] = ExportPem.prototype.free;
|
|
502
|
+
exports.ExportPem = ExportPem;
|
|
503
|
+
|
|
316
504
|
class GatewayError {
|
|
317
505
|
static __wrap(ptr) {
|
|
318
|
-
ptr = ptr >>> 0;
|
|
319
506
|
const obj = Object.create(GatewayError.prototype);
|
|
320
507
|
obj.__wbg_ptr = ptr;
|
|
321
508
|
GatewayErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -366,9 +553,77 @@ const GpuModule = Object.freeze({
|
|
|
366
553
|
});
|
|
367
554
|
exports.GpuModule = GpuModule;
|
|
368
555
|
|
|
556
|
+
class Kds {
|
|
557
|
+
__destroy_into_raw() {
|
|
558
|
+
const ptr = this.__wbg_ptr;
|
|
559
|
+
this.__wbg_ptr = 0;
|
|
560
|
+
KdsFinalization.unregister(this);
|
|
561
|
+
return ptr;
|
|
562
|
+
}
|
|
563
|
+
free() {
|
|
564
|
+
const ptr = this.__destroy_into_raw();
|
|
565
|
+
wasm.__wbg_kds_free(ptr, 0);
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* @param {ParsedAttestation} attestation
|
|
569
|
+
* @returns {Promise<VerifiedChain>}
|
|
570
|
+
*/
|
|
571
|
+
fetch_certificates(attestation) {
|
|
572
|
+
_assertClass(attestation, ParsedAttestation);
|
|
573
|
+
const ret = wasm.kds_fetch_certificates(this.__wbg_ptr, attestation.__wbg_ptr);
|
|
574
|
+
return ret;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Fetches the certificate revocation list from AMD's KDS
|
|
578
|
+
* @param {ParsedAttestation} attestation
|
|
579
|
+
* @returns {Promise<CRL>}
|
|
580
|
+
*/
|
|
581
|
+
fetch_crl(attestation) {
|
|
582
|
+
_assertClass(attestation, ParsedAttestation);
|
|
583
|
+
const ret = wasm.kds_fetch_crl(this.__wbg_ptr, attestation.__wbg_ptr);
|
|
584
|
+
return ret;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* @param {string} cache_url
|
|
588
|
+
*/
|
|
589
|
+
constructor(cache_url) {
|
|
590
|
+
const ptr0 = passStringToWasm0(cache_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
591
|
+
const len0 = WASM_VECTOR_LEN;
|
|
592
|
+
const ret = wasm.kds_new(ptr0, len0);
|
|
593
|
+
if (ret[2]) {
|
|
594
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
595
|
+
}
|
|
596
|
+
this.__wbg_ptr = ret[0];
|
|
597
|
+
KdsFinalization.register(this, this.__wbg_ptr, this);
|
|
598
|
+
return this;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (Symbol.dispose) Kds.prototype[Symbol.dispose] = Kds.prototype.free;
|
|
602
|
+
exports.Kds = Kds;
|
|
603
|
+
|
|
604
|
+
class KeyChain {
|
|
605
|
+
static __wrap(ptr) {
|
|
606
|
+
const obj = Object.create(KeyChain.prototype);
|
|
607
|
+
obj.__wbg_ptr = ptr;
|
|
608
|
+
KeyChainFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
609
|
+
return obj;
|
|
610
|
+
}
|
|
611
|
+
__destroy_into_raw() {
|
|
612
|
+
const ptr = this.__wbg_ptr;
|
|
613
|
+
this.__wbg_ptr = 0;
|
|
614
|
+
KeyChainFinalization.unregister(this);
|
|
615
|
+
return ptr;
|
|
616
|
+
}
|
|
617
|
+
free() {
|
|
618
|
+
const ptr = this.__destroy_into_raw();
|
|
619
|
+
wasm.__wbg_keychain_free(ptr, 0);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
if (Symbol.dispose) KeyChain.prototype[Symbol.dispose] = KeyChain.prototype.free;
|
|
623
|
+
exports.KeyChain = KeyChain;
|
|
624
|
+
|
|
369
625
|
class Modules {
|
|
370
626
|
static __wrap(ptr) {
|
|
371
|
-
ptr = ptr >>> 0;
|
|
372
627
|
const obj = Object.create(Modules.prototype);
|
|
373
628
|
obj.__wbg_ptr = ptr;
|
|
374
629
|
ModulesFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -411,7 +666,6 @@ exports.Modules = Modules;
|
|
|
411
666
|
|
|
412
667
|
class NvidiaAttestResult {
|
|
413
668
|
static __wrap(ptr) {
|
|
414
|
-
ptr = ptr >>> 0;
|
|
415
669
|
const obj = Object.create(NvidiaAttestResult.prototype);
|
|
416
670
|
obj.__wbg_ptr = ptr;
|
|
417
671
|
NvidiaAttestResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -431,210 +685,29 @@ class NvidiaAttestResult {
|
|
|
431
685
|
if (Symbol.dispose) NvidiaAttestResult.prototype[Symbol.dispose] = NvidiaAttestResult.prototype.free;
|
|
432
686
|
exports.NvidiaAttestResult = NvidiaAttestResult;
|
|
433
687
|
|
|
434
|
-
class
|
|
688
|
+
class NvidiaNonce {
|
|
689
|
+
static __wrap(ptr) {
|
|
690
|
+
const obj = Object.create(NvidiaNonce.prototype);
|
|
691
|
+
obj.__wbg_ptr = ptr;
|
|
692
|
+
NvidiaNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
693
|
+
return obj;
|
|
694
|
+
}
|
|
435
695
|
__destroy_into_raw() {
|
|
436
696
|
const ptr = this.__wbg_ptr;
|
|
437
697
|
this.__wbg_ptr = 0;
|
|
438
|
-
|
|
698
|
+
NvidiaNonceFinalization.unregister(this);
|
|
439
699
|
return ptr;
|
|
440
700
|
}
|
|
441
701
|
free() {
|
|
442
702
|
const ptr = this.__destroy_into_raw();
|
|
443
|
-
wasm.
|
|
703
|
+
wasm.__wbg_nvidianonce_free(ptr, 0);
|
|
444
704
|
}
|
|
445
705
|
/**
|
|
446
|
-
* @
|
|
447
|
-
* @returns {Promise<Collateral>}
|
|
706
|
+
* @returns {NvidiaNonce}
|
|
448
707
|
*/
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
return ret;
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* @param {string} base_url
|
|
456
|
-
*/
|
|
457
|
-
constructor(base_url) {
|
|
458
|
-
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
459
|
-
const len0 = WASM_VECTOR_LEN;
|
|
460
|
-
const ret = wasm.pcs_new(ptr0, len0);
|
|
461
|
-
if (ret[2]) {
|
|
462
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
463
|
-
}
|
|
464
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
465
|
-
PcsFinalization.register(this, this.__wbg_ptr, this);
|
|
466
|
-
return this;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
if (Symbol.dispose) Pcs.prototype[Symbol.dispose] = Pcs.prototype.free;
|
|
470
|
-
exports.Pcs = Pcs;
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* Generic per-request query parameters.
|
|
474
|
-
*
|
|
475
|
-
* The `nonce` key is reserved and will be rejected.
|
|
476
|
-
*/
|
|
477
|
-
class QueryParams {
|
|
478
|
-
static __wrap(ptr) {
|
|
479
|
-
ptr = ptr >>> 0;
|
|
480
|
-
const obj = Object.create(QueryParams.prototype);
|
|
481
|
-
obj.__wbg_ptr = ptr;
|
|
482
|
-
QueryParamsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
483
|
-
return obj;
|
|
484
|
-
}
|
|
485
|
-
__destroy_into_raw() {
|
|
486
|
-
const ptr = this.__wbg_ptr;
|
|
487
|
-
this.__wbg_ptr = 0;
|
|
488
|
-
QueryParamsFinalization.unregister(this);
|
|
489
|
-
return ptr;
|
|
490
|
-
}
|
|
491
|
-
free() {
|
|
492
|
-
const ptr = this.__destroy_into_raw();
|
|
493
|
-
wasm.__wbg_queryparams_free(ptr, 0);
|
|
494
|
-
}
|
|
495
|
-
constructor() {
|
|
496
|
-
const ret = wasm.queryparams_new();
|
|
497
|
-
this.__wbg_ptr = ret >>> 0;
|
|
498
|
-
QueryParamsFinalization.register(this, this.__wbg_ptr, this);
|
|
499
|
-
return this;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Appends a query parameter.
|
|
503
|
-
*
|
|
504
|
-
* Reserved keywords for specific queries will get overwritten
|
|
505
|
-
* @param {string} key
|
|
506
|
-
* @param {string} value
|
|
507
|
-
* @returns {QueryParams}
|
|
508
|
-
*/
|
|
509
|
-
with(key, value) {
|
|
510
|
-
const ptr = this.__destroy_into_raw();
|
|
511
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
|
-
const len0 = WASM_VECTOR_LEN;
|
|
513
|
-
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
514
|
-
const len1 = WASM_VECTOR_LEN;
|
|
515
|
-
const ret = wasm.queryparams_with(ptr, ptr0, len0, ptr1, len1);
|
|
516
|
-
return QueryParams.__wrap(ret);
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
if (Symbol.dispose) QueryParams.prototype[Symbol.dispose] = QueryParams.prototype.free;
|
|
520
|
-
exports.QueryParams = QueryParams;
|
|
521
|
-
|
|
522
|
-
class QuoteVerifier {
|
|
523
|
-
__destroy_into_raw() {
|
|
524
|
-
const ptr = this.__wbg_ptr;
|
|
525
|
-
this.__wbg_ptr = 0;
|
|
526
|
-
QuoteVerifierFinalization.unregister(this);
|
|
527
|
-
return ptr;
|
|
528
|
-
}
|
|
529
|
-
free() {
|
|
530
|
-
const ptr = this.__destroy_into_raw();
|
|
531
|
-
wasm.__wbg_quoteverifier_free(ptr, 0);
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* @param {Collateral} collateral
|
|
535
|
-
* @param {TdxQuote} quote
|
|
536
|
-
*/
|
|
537
|
-
constructor(collateral, quote) {
|
|
538
|
-
_assertClass(collateral, Collateral);
|
|
539
|
-
var ptr0 = collateral.__destroy_into_raw();
|
|
540
|
-
_assertClass(quote, TdxQuote);
|
|
541
|
-
var ptr1 = quote.__destroy_into_raw();
|
|
542
|
-
const ret = wasm.quoteverifier_new(ptr0, ptr1);
|
|
543
|
-
this.__wbg_ptr = ret >>> 0;
|
|
544
|
-
QuoteVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
545
|
-
return this;
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* @param {TdxNonce} nonce
|
|
549
|
-
*/
|
|
550
|
-
verify(nonce) {
|
|
551
|
-
_assertClass(nonce, TdxNonce);
|
|
552
|
-
const ret = wasm.quoteverifier_verify(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
553
|
-
if (ret[1]) {
|
|
554
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
if (Symbol.dispose) QuoteVerifier.prototype[Symbol.dispose] = QuoteVerifier.prototype.free;
|
|
559
|
-
exports.QuoteVerifier = QuoteVerifier;
|
|
560
|
-
|
|
561
|
-
class ResponseHeaders {
|
|
562
|
-
static __wrap(ptr) {
|
|
563
|
-
ptr = ptr >>> 0;
|
|
564
|
-
const obj = Object.create(ResponseHeaders.prototype);
|
|
565
|
-
obj.__wbg_ptr = ptr;
|
|
566
|
-
ResponseHeadersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
567
|
-
return obj;
|
|
568
|
-
}
|
|
569
|
-
__destroy_into_raw() {
|
|
570
|
-
const ptr = this.__wbg_ptr;
|
|
571
|
-
this.__wbg_ptr = 0;
|
|
572
|
-
ResponseHeadersFinalization.unregister(this);
|
|
573
|
-
return ptr;
|
|
574
|
-
}
|
|
575
|
-
free() {
|
|
576
|
-
const ptr = this.__destroy_into_raw();
|
|
577
|
-
wasm.__wbg_responseheaders_free(ptr, 0);
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* @param {string} name
|
|
581
|
-
* @returns {string | undefined}
|
|
582
|
-
*/
|
|
583
|
-
get(name) {
|
|
584
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
585
|
-
const len0 = WASM_VECTOR_LEN;
|
|
586
|
-
const ret = wasm.responseheaders_get(this.__wbg_ptr, ptr0, len0);
|
|
587
|
-
let v2;
|
|
588
|
-
if (ret[0] !== 0) {
|
|
589
|
-
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
590
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
591
|
-
}
|
|
592
|
-
return v2;
|
|
593
|
-
}
|
|
594
|
-
/**
|
|
595
|
-
* @returns {string[]}
|
|
596
|
-
*/
|
|
597
|
-
keys() {
|
|
598
|
-
const ret = wasm.responseheaders_keys(this.__wbg_ptr);
|
|
599
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
600
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
601
|
-
return v1;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
if (Symbol.dispose) ResponseHeaders.prototype[Symbol.dispose] = ResponseHeaders.prototype.free;
|
|
605
|
-
exports.ResponseHeaders = ResponseHeaders;
|
|
606
|
-
|
|
607
|
-
class TcbLevels {
|
|
608
|
-
__destroy_into_raw() {
|
|
609
|
-
const ptr = this.__wbg_ptr;
|
|
610
|
-
this.__wbg_ptr = 0;
|
|
611
|
-
TcbLevelsFinalization.unregister(this);
|
|
612
|
-
return ptr;
|
|
613
|
-
}
|
|
614
|
-
free() {
|
|
615
|
-
const ptr = this.__destroy_into_raw();
|
|
616
|
-
wasm.__wbg_tcblevels_free(ptr, 0);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
if (Symbol.dispose) TcbLevels.prototype[Symbol.dispose] = TcbLevels.prototype.free;
|
|
620
|
-
exports.TcbLevels = TcbLevels;
|
|
621
|
-
|
|
622
|
-
class TdxNonce {
|
|
623
|
-
__destroy_into_raw() {
|
|
624
|
-
const ptr = this.__wbg_ptr;
|
|
625
|
-
this.__wbg_ptr = 0;
|
|
626
|
-
TdxNonceFinalization.unregister(this);
|
|
627
|
-
return ptr;
|
|
628
|
-
}
|
|
629
|
-
free() {
|
|
630
|
-
const ptr = this.__destroy_into_raw();
|
|
631
|
-
wasm.__wbg_tdxnonce_free(ptr, 0);
|
|
632
|
-
}
|
|
633
|
-
constructor() {
|
|
634
|
-
const ret = wasm.tdxnonce_generate();
|
|
635
|
-
this.__wbg_ptr = ret >>> 0;
|
|
636
|
-
TdxNonceFinalization.register(this, this.__wbg_ptr, this);
|
|
637
|
-
return this;
|
|
708
|
+
static generate() {
|
|
709
|
+
const ret = wasm.nvidianonce_generate();
|
|
710
|
+
return NvidiaNonce.__wrap(ret);
|
|
638
711
|
}
|
|
639
712
|
/**
|
|
640
713
|
* @returns {string}
|
|
@@ -643,7 +716,7 @@ class TdxNonce {
|
|
|
643
716
|
let deferred1_0;
|
|
644
717
|
let deferred1_1;
|
|
645
718
|
try {
|
|
646
|
-
const ret = wasm.
|
|
719
|
+
const ret = wasm.nvidianonce_to_hex(this.__wbg_ptr);
|
|
647
720
|
deferred1_0 = ret[0];
|
|
648
721
|
deferred1_1 = ret[1];
|
|
649
722
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -652,434 +725,248 @@ class TdxNonce {
|
|
|
652
725
|
}
|
|
653
726
|
}
|
|
654
727
|
}
|
|
655
|
-
if (Symbol.dispose)
|
|
656
|
-
exports.
|
|
728
|
+
if (Symbol.dispose) NvidiaNonce.prototype[Symbol.dispose] = NvidiaNonce.prototype.free;
|
|
729
|
+
exports.NvidiaNonce = NvidiaNonce;
|
|
657
730
|
|
|
658
|
-
|
|
731
|
+
/**
|
|
732
|
+
* Represents a parsed attestation report with some already
|
|
733
|
+
* parsed commonly accessed fields
|
|
734
|
+
*/
|
|
735
|
+
class ParsedAttestation {
|
|
659
736
|
static __wrap(ptr) {
|
|
660
|
-
|
|
661
|
-
const obj = Object.create(TdxQuote.prototype);
|
|
737
|
+
const obj = Object.create(ParsedAttestation.prototype);
|
|
662
738
|
obj.__wbg_ptr = ptr;
|
|
663
|
-
|
|
739
|
+
ParsedAttestationFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
664
740
|
return obj;
|
|
665
741
|
}
|
|
666
742
|
__destroy_into_raw() {
|
|
667
743
|
const ptr = this.__wbg_ptr;
|
|
668
744
|
this.__wbg_ptr = 0;
|
|
669
|
-
|
|
745
|
+
ParsedAttestationFinalization.unregister(this);
|
|
670
746
|
return ptr;
|
|
671
747
|
}
|
|
672
748
|
free() {
|
|
673
749
|
const ptr = this.__destroy_into_raw();
|
|
674
|
-
wasm.
|
|
750
|
+
wasm.__wbg_parsedattestation_free(ptr, 0);
|
|
675
751
|
}
|
|
676
752
|
/**
|
|
677
|
-
*
|
|
678
|
-
* @param {Uint8Array} quote
|
|
679
|
-
* @returns {TdxQuote}
|
|
753
|
+
* @returns {number}
|
|
680
754
|
*/
|
|
681
|
-
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
const ret = wasm.tdxquote_from_bytes(ptr0, len0);
|
|
685
|
-
if (ret[2]) {
|
|
686
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
687
|
-
}
|
|
688
|
-
return TdxQuote.__wrap(ret[0]);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
if (Symbol.dispose) TdxQuote.prototype[Symbol.dispose] = TdxQuote.prototype.free;
|
|
692
|
-
exports.TdxQuote = TdxQuote;
|
|
693
|
-
|
|
694
|
-
class DecodedClaims {
|
|
695
|
-
static __wrap(ptr) {
|
|
696
|
-
ptr = ptr >>> 0;
|
|
697
|
-
const obj = Object.create(DecodedClaims.prototype);
|
|
698
|
-
obj.__wbg_ptr = ptr;
|
|
699
|
-
DecodedClaimsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
700
|
-
return obj;
|
|
701
|
-
}
|
|
702
|
-
__destroy_into_raw() {
|
|
703
|
-
const ptr = this.__wbg_ptr;
|
|
704
|
-
this.__wbg_ptr = 0;
|
|
705
|
-
DecodedClaimsFinalization.unregister(this);
|
|
706
|
-
return ptr;
|
|
707
|
-
}
|
|
708
|
-
free() {
|
|
709
|
-
const ptr = this.__destroy_into_raw();
|
|
710
|
-
wasm.__wbg_nvidia__decodedclaims_free(ptr, 0);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
if (Symbol.dispose) DecodedClaims.prototype[Symbol.dispose] = DecodedClaims.prototype.free;
|
|
714
|
-
|
|
715
|
-
class EATToken {
|
|
716
|
-
static __wrap(ptr) {
|
|
717
|
-
ptr = ptr >>> 0;
|
|
718
|
-
const obj = Object.create(EATToken.prototype);
|
|
719
|
-
obj.__wbg_ptr = ptr;
|
|
720
|
-
EATTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
721
|
-
return obj;
|
|
722
|
-
}
|
|
723
|
-
__destroy_into_raw() {
|
|
724
|
-
const ptr = this.__wbg_ptr;
|
|
725
|
-
this.__wbg_ptr = 0;
|
|
726
|
-
EATTokenFinalization.unregister(this);
|
|
727
|
-
return ptr;
|
|
728
|
-
}
|
|
729
|
-
free() {
|
|
730
|
-
const ptr = this.__destroy_into_raw();
|
|
731
|
-
wasm.__wbg_nvidia__eattoken_free(ptr, 0);
|
|
755
|
+
cpu_fam_id() {
|
|
756
|
+
const ret = wasm.parsedattestation_cpu_fam_id(this.__wbg_ptr);
|
|
757
|
+
return ret;
|
|
732
758
|
}
|
|
733
759
|
/**
|
|
734
|
-
* @
|
|
735
|
-
* @returns {EATToken}
|
|
760
|
+
* @returns {number}
|
|
736
761
|
*/
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
const ret = wasm.eattoken_parse(ptr0, len0);
|
|
741
|
-
if (ret[2]) {
|
|
742
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
743
|
-
}
|
|
744
|
-
return EATToken.__wrap(ret[0]);
|
|
762
|
+
cpu_mod_id() {
|
|
763
|
+
const ret = wasm.parsedattestation_cpu_mod_id(this.__wbg_ptr);
|
|
764
|
+
return ret;
|
|
745
765
|
}
|
|
746
766
|
/**
|
|
747
|
-
*
|
|
748
|
-
* @param {
|
|
749
|
-
* @returns {
|
|
767
|
+
* Parses and constructs a new attestation report from a stream of binary data
|
|
768
|
+
* @param {Uint8Array} bytes
|
|
769
|
+
* @returns {ParsedAttestation}
|
|
750
770
|
*/
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
const ret = wasm.eattoken_verify(ptr, keys.__wbg_ptr, nonce.__wbg_ptr);
|
|
771
|
+
static new(bytes) {
|
|
772
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
773
|
+
const len0 = WASM_VECTOR_LEN;
|
|
774
|
+
const ret = wasm.parsedattestation_new(ptr0, len0);
|
|
756
775
|
if (ret[2]) {
|
|
757
776
|
throw takeFromExternrefTable0(ret[1]);
|
|
758
777
|
}
|
|
759
|
-
return
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
if (Symbol.dispose) EATToken.prototype[Symbol.dispose] = EATToken.prototype.free;
|
|
763
|
-
|
|
764
|
-
class KeyChain {
|
|
765
|
-
static __wrap(ptr) {
|
|
766
|
-
ptr = ptr >>> 0;
|
|
767
|
-
const obj = Object.create(KeyChain.prototype);
|
|
768
|
-
obj.__wbg_ptr = ptr;
|
|
769
|
-
KeyChainFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
770
|
-
return obj;
|
|
771
|
-
}
|
|
772
|
-
__destroy_into_raw() {
|
|
773
|
-
const ptr = this.__wbg_ptr;
|
|
774
|
-
this.__wbg_ptr = 0;
|
|
775
|
-
KeyChainFinalization.unregister(this);
|
|
776
|
-
return ptr;
|
|
777
|
-
}
|
|
778
|
-
free() {
|
|
779
|
-
const ptr = this.__destroy_into_raw();
|
|
780
|
-
wasm.__wbg_nvidia__keychain_free(ptr, 0);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
if (Symbol.dispose) KeyChain.prototype[Symbol.dispose] = KeyChain.prototype.free;
|
|
784
|
-
|
|
785
|
-
class NvidiaNonce {
|
|
786
|
-
static __wrap(ptr) {
|
|
787
|
-
ptr = ptr >>> 0;
|
|
788
|
-
const obj = Object.create(NvidiaNonce.prototype);
|
|
789
|
-
obj.__wbg_ptr = ptr;
|
|
790
|
-
NvidiaNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
791
|
-
return obj;
|
|
792
|
-
}
|
|
793
|
-
__destroy_into_raw() {
|
|
794
|
-
const ptr = this.__wbg_ptr;
|
|
795
|
-
this.__wbg_ptr = 0;
|
|
796
|
-
NvidiaNonceFinalization.unregister(this);
|
|
797
|
-
return ptr;
|
|
798
|
-
}
|
|
799
|
-
free() {
|
|
800
|
-
const ptr = this.__destroy_into_raw();
|
|
801
|
-
wasm.__wbg_nvidia__nvidianonce_free(ptr, 0);
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* @returns {NvidiaNonce}
|
|
805
|
-
*/
|
|
806
|
-
static generate() {
|
|
807
|
-
const ret = wasm.nvidianonce_generate();
|
|
808
|
-
return NvidiaNonce.__wrap(ret);
|
|
778
|
+
return ParsedAttestation.__wrap(ret[0]);
|
|
809
779
|
}
|
|
810
780
|
/**
|
|
811
|
-
*
|
|
781
|
+
* Verifies the attestation report against a certificate chain
|
|
782
|
+
* @param {VerifiedChain} chain
|
|
783
|
+
* @param {SevNonce} nonce
|
|
812
784
|
*/
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
deferred1_1 = ret[1];
|
|
820
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
821
|
-
} finally {
|
|
822
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
785
|
+
verify(chain, nonce) {
|
|
786
|
+
_assertClass(chain, VerifiedChain);
|
|
787
|
+
_assertClass(nonce, SevNonce);
|
|
788
|
+
const ret = wasm.parsedattestation_verify(this.__wbg_ptr, chain.__wbg_ptr, nonce.__wbg_ptr);
|
|
789
|
+
if (ret[1]) {
|
|
790
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
823
791
|
}
|
|
824
792
|
}
|
|
825
793
|
}
|
|
826
|
-
if (Symbol.dispose)
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Same as [`KeyChain:fetch_keychain`], put in for better wasm compatibility
|
|
830
|
-
* @returns {Promise<KeyChain>}
|
|
831
|
-
*/
|
|
832
|
-
function fetch_keychain() {
|
|
833
|
-
const ret = wasm.nvidia__fetch_keychain();
|
|
834
|
-
return ret;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
const nvidia = {};
|
|
838
|
-
nvidia.DecodedClaims = DecodedClaims;
|
|
839
|
-
nvidia.EATToken = EATToken;
|
|
840
|
-
nvidia.KeyChain = KeyChain;
|
|
841
|
-
nvidia.NvidiaNonce = NvidiaNonce;
|
|
842
|
-
nvidia.fetch_keychain = fetch_keychain;
|
|
843
|
-
exports.nvidia = nvidia;
|
|
794
|
+
if (Symbol.dispose) ParsedAttestation.prototype[Symbol.dispose] = ParsedAttestation.prototype.free;
|
|
795
|
+
exports.ParsedAttestation = ParsedAttestation;
|
|
844
796
|
|
|
845
|
-
|
|
846
|
-
* A parsed certificate revocation list
|
|
847
|
-
*/
|
|
848
|
-
class CRL {
|
|
849
|
-
static __wrap(ptr) {
|
|
850
|
-
ptr = ptr >>> 0;
|
|
851
|
-
const obj = Object.create(CRL.prototype);
|
|
852
|
-
obj.__wbg_ptr = ptr;
|
|
853
|
-
CRLFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
854
|
-
return obj;
|
|
855
|
-
}
|
|
797
|
+
class Pcs {
|
|
856
798
|
__destroy_into_raw() {
|
|
857
799
|
const ptr = this.__wbg_ptr;
|
|
858
800
|
this.__wbg_ptr = 0;
|
|
859
|
-
|
|
801
|
+
PcsFinalization.unregister(this);
|
|
860
802
|
return ptr;
|
|
861
803
|
}
|
|
862
804
|
free() {
|
|
863
805
|
const ptr = this.__destroy_into_raw();
|
|
864
|
-
wasm.
|
|
806
|
+
wasm.__wbg_pcs_free(ptr, 0);
|
|
865
807
|
}
|
|
866
808
|
/**
|
|
867
|
-
*
|
|
868
|
-
*
|
|
869
|
-
* @param {VerifiedChain} chain
|
|
809
|
+
* @param {TdxQuote} quote
|
|
810
|
+
* @returns {Promise<Collateral>}
|
|
870
811
|
*/
|
|
871
|
-
|
|
872
|
-
_assertClass(
|
|
873
|
-
const ret = wasm.
|
|
874
|
-
|
|
875
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
876
|
-
}
|
|
812
|
+
fetch_collateral(quote) {
|
|
813
|
+
_assertClass(quote, TdxQuote);
|
|
814
|
+
const ret = wasm.pcs_fetch_collateral(this.__wbg_ptr, quote.__wbg_ptr);
|
|
815
|
+
return ret;
|
|
877
816
|
}
|
|
878
817
|
/**
|
|
879
|
-
*
|
|
880
|
-
* @param {Uint8Array} list
|
|
881
|
-
* @returns {CRL}
|
|
818
|
+
* @param {string} base_url
|
|
882
819
|
*/
|
|
883
|
-
|
|
884
|
-
const ptr0 =
|
|
820
|
+
constructor(base_url) {
|
|
821
|
+
const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
885
822
|
const len0 = WASM_VECTOR_LEN;
|
|
886
|
-
const ret = wasm.
|
|
823
|
+
const ret = wasm.pcs_new(ptr0, len0);
|
|
887
824
|
if (ret[2]) {
|
|
888
825
|
throw takeFromExternrefTable0(ret[1]);
|
|
889
826
|
}
|
|
890
|
-
|
|
827
|
+
this.__wbg_ptr = ret[0];
|
|
828
|
+
PcsFinalization.register(this, this.__wbg_ptr, this);
|
|
829
|
+
return this;
|
|
891
830
|
}
|
|
892
831
|
}
|
|
893
|
-
if (Symbol.dispose)
|
|
832
|
+
if (Symbol.dispose) Pcs.prototype[Symbol.dispose] = Pcs.prototype.free;
|
|
833
|
+
exports.Pcs = Pcs;
|
|
894
834
|
|
|
895
|
-
|
|
835
|
+
/**
|
|
836
|
+
* Generic per-request query parameters.
|
|
837
|
+
*
|
|
838
|
+
* The `nonce` key is reserved and will be rejected.
|
|
839
|
+
*/
|
|
840
|
+
class QueryParams {
|
|
896
841
|
static __wrap(ptr) {
|
|
897
|
-
|
|
898
|
-
const obj = Object.create(ExportPem.prototype);
|
|
842
|
+
const obj = Object.create(QueryParams.prototype);
|
|
899
843
|
obj.__wbg_ptr = ptr;
|
|
900
|
-
|
|
844
|
+
QueryParamsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
901
845
|
return obj;
|
|
902
846
|
}
|
|
903
847
|
__destroy_into_raw() {
|
|
904
848
|
const ptr = this.__wbg_ptr;
|
|
905
849
|
this.__wbg_ptr = 0;
|
|
906
|
-
|
|
850
|
+
QueryParamsFinalization.unregister(this);
|
|
907
851
|
return ptr;
|
|
908
852
|
}
|
|
909
853
|
free() {
|
|
910
854
|
const ptr = this.__destroy_into_raw();
|
|
911
|
-
wasm.
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* @returns {Uint8Array}
|
|
915
|
-
*/
|
|
916
|
-
get ark() {
|
|
917
|
-
const ret = wasm.__wbg_get_sev__exportpem_ark(this.__wbg_ptr);
|
|
918
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
919
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
920
|
-
return v1;
|
|
921
|
-
}
|
|
922
|
-
/**
|
|
923
|
-
* @returns {Uint8Array}
|
|
924
|
-
*/
|
|
925
|
-
get ask() {
|
|
926
|
-
const ret = wasm.__wbg_get_sev__exportpem_ask(this.__wbg_ptr);
|
|
927
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
928
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
929
|
-
return v1;
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* @returns {Uint8Array}
|
|
933
|
-
*/
|
|
934
|
-
get vek() {
|
|
935
|
-
const ret = wasm.__wbg_get_sev__exportpem_vek(this.__wbg_ptr);
|
|
936
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
937
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
938
|
-
return v1;
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* @param {Uint8Array} arg0
|
|
942
|
-
*/
|
|
943
|
-
set ark(arg0) {
|
|
944
|
-
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
945
|
-
const len0 = WASM_VECTOR_LEN;
|
|
946
|
-
wasm.__wbg_set_sev__exportpem_ark(this.__wbg_ptr, ptr0, len0);
|
|
855
|
+
wasm.__wbg_queryparams_free(ptr, 0);
|
|
947
856
|
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
const len0 = WASM_VECTOR_LEN;
|
|
954
|
-
wasm.__wbg_set_sev__exportpem_ask(this.__wbg_ptr, ptr0, len0);
|
|
857
|
+
constructor() {
|
|
858
|
+
const ret = wasm.queryparams_new();
|
|
859
|
+
this.__wbg_ptr = ret;
|
|
860
|
+
QueryParamsFinalization.register(this, this.__wbg_ptr, this);
|
|
861
|
+
return this;
|
|
955
862
|
}
|
|
956
863
|
/**
|
|
957
|
-
*
|
|
864
|
+
* Appends a query parameter.
|
|
865
|
+
*
|
|
866
|
+
* Reserved keywords for specific queries will get overwritten
|
|
867
|
+
* @param {string} key
|
|
868
|
+
* @param {string} value
|
|
869
|
+
* @returns {QueryParams}
|
|
958
870
|
*/
|
|
959
|
-
|
|
960
|
-
const
|
|
871
|
+
with(key, value) {
|
|
872
|
+
const ptr = this.__destroy_into_raw();
|
|
873
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
961
874
|
const len0 = WASM_VECTOR_LEN;
|
|
962
|
-
|
|
875
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
876
|
+
const len1 = WASM_VECTOR_LEN;
|
|
877
|
+
const ret = wasm.queryparams_with(ptr, ptr0, len0, ptr1, len1);
|
|
878
|
+
return QueryParams.__wrap(ret);
|
|
963
879
|
}
|
|
964
880
|
}
|
|
965
|
-
if (Symbol.dispose)
|
|
881
|
+
if (Symbol.dispose) QueryParams.prototype[Symbol.dispose] = QueryParams.prototype.free;
|
|
882
|
+
exports.QueryParams = QueryParams;
|
|
966
883
|
|
|
967
|
-
class
|
|
884
|
+
class QuoteVerifier {
|
|
968
885
|
__destroy_into_raw() {
|
|
969
886
|
const ptr = this.__wbg_ptr;
|
|
970
887
|
this.__wbg_ptr = 0;
|
|
971
|
-
|
|
888
|
+
QuoteVerifierFinalization.unregister(this);
|
|
972
889
|
return ptr;
|
|
973
890
|
}
|
|
974
891
|
free() {
|
|
975
892
|
const ptr = this.__destroy_into_raw();
|
|
976
|
-
wasm.
|
|
977
|
-
}
|
|
978
|
-
/**
|
|
979
|
-
* @param {ParsedAttestation} attestation
|
|
980
|
-
* @returns {Promise<VerifiedChain>}
|
|
981
|
-
*/
|
|
982
|
-
fetch_certificates(attestation) {
|
|
983
|
-
_assertClass(attestation, ParsedAttestation);
|
|
984
|
-
const ret = wasm.kds_fetch_certificates(this.__wbg_ptr, attestation.__wbg_ptr);
|
|
985
|
-
return ret;
|
|
893
|
+
wasm.__wbg_quoteverifier_free(ptr, 0);
|
|
986
894
|
}
|
|
987
895
|
/**
|
|
988
|
-
*
|
|
989
|
-
* @param {
|
|
990
|
-
* @returns {Promise<CRL>}
|
|
896
|
+
* @param {Collateral} collateral
|
|
897
|
+
* @param {TdxQuote} quote
|
|
991
898
|
*/
|
|
992
|
-
|
|
993
|
-
_assertClass(
|
|
994
|
-
|
|
995
|
-
|
|
899
|
+
constructor(collateral, quote) {
|
|
900
|
+
_assertClass(collateral, Collateral);
|
|
901
|
+
var ptr0 = collateral.__destroy_into_raw();
|
|
902
|
+
_assertClass(quote, TdxQuote);
|
|
903
|
+
var ptr1 = quote.__destroy_into_raw();
|
|
904
|
+
const ret = wasm.quoteverifier_new(ptr0, ptr1);
|
|
905
|
+
this.__wbg_ptr = ret;
|
|
906
|
+
QuoteVerifierFinalization.register(this, this.__wbg_ptr, this);
|
|
907
|
+
return this;
|
|
996
908
|
}
|
|
997
909
|
/**
|
|
998
|
-
* @param {
|
|
910
|
+
* @param {TdxNonce} nonce
|
|
999
911
|
*/
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
912
|
+
verify(nonce) {
|
|
913
|
+
_assertClass(nonce, TdxNonce);
|
|
914
|
+
const ret = wasm.quoteverifier_verify(this.__wbg_ptr, nonce.__wbg_ptr);
|
|
915
|
+
if (ret[1]) {
|
|
916
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1006
917
|
}
|
|
1007
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
1008
|
-
KdsFinalization.register(this, this.__wbg_ptr, this);
|
|
1009
|
-
return this;
|
|
1010
918
|
}
|
|
1011
919
|
}
|
|
1012
|
-
if (Symbol.dispose)
|
|
920
|
+
if (Symbol.dispose) QuoteVerifier.prototype[Symbol.dispose] = QuoteVerifier.prototype.free;
|
|
921
|
+
exports.QuoteVerifier = QuoteVerifier;
|
|
1013
922
|
|
|
1014
|
-
|
|
1015
|
-
* Represents a parsed attestation report with some already
|
|
1016
|
-
* parsed commonly accessed fields
|
|
1017
|
-
*/
|
|
1018
|
-
class ParsedAttestation {
|
|
923
|
+
class ResponseHeaders {
|
|
1019
924
|
static __wrap(ptr) {
|
|
1020
|
-
|
|
1021
|
-
const obj = Object.create(ParsedAttestation.prototype);
|
|
925
|
+
const obj = Object.create(ResponseHeaders.prototype);
|
|
1022
926
|
obj.__wbg_ptr = ptr;
|
|
1023
|
-
|
|
927
|
+
ResponseHeadersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1024
928
|
return obj;
|
|
1025
929
|
}
|
|
1026
930
|
__destroy_into_raw() {
|
|
1027
931
|
const ptr = this.__wbg_ptr;
|
|
1028
932
|
this.__wbg_ptr = 0;
|
|
1029
|
-
|
|
933
|
+
ResponseHeadersFinalization.unregister(this);
|
|
1030
934
|
return ptr;
|
|
1031
935
|
}
|
|
1032
936
|
free() {
|
|
1033
937
|
const ptr = this.__destroy_into_raw();
|
|
1034
|
-
wasm.
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
* @returns {number}
|
|
1038
|
-
*/
|
|
1039
|
-
cpu_fam_id() {
|
|
1040
|
-
const ret = wasm.parsedattestation_cpu_fam_id(this.__wbg_ptr);
|
|
1041
|
-
return ret;
|
|
1042
|
-
}
|
|
1043
|
-
/**
|
|
1044
|
-
* @returns {number}
|
|
1045
|
-
*/
|
|
1046
|
-
cpu_mod_id() {
|
|
1047
|
-
const ret = wasm.parsedattestation_cpu_mod_id(this.__wbg_ptr);
|
|
1048
|
-
return ret;
|
|
938
|
+
wasm.__wbg_responseheaders_free(ptr, 0);
|
|
1049
939
|
}
|
|
1050
940
|
/**
|
|
1051
|
-
*
|
|
1052
|
-
* @
|
|
1053
|
-
* @returns {ParsedAttestation}
|
|
941
|
+
* @param {string} name
|
|
942
|
+
* @returns {string | undefined}
|
|
1054
943
|
*/
|
|
1055
|
-
|
|
1056
|
-
const ptr0 =
|
|
944
|
+
get(name) {
|
|
945
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1057
946
|
const len0 = WASM_VECTOR_LEN;
|
|
1058
|
-
const ret = wasm.
|
|
1059
|
-
|
|
1060
|
-
|
|
947
|
+
const ret = wasm.responseheaders_get(this.__wbg_ptr, ptr0, len0);
|
|
948
|
+
let v2;
|
|
949
|
+
if (ret[0] !== 0) {
|
|
950
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
951
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1061
952
|
}
|
|
1062
|
-
return
|
|
953
|
+
return v2;
|
|
1063
954
|
}
|
|
1064
955
|
/**
|
|
1065
|
-
*
|
|
1066
|
-
* @param {VerifiedChain} chain
|
|
1067
|
-
* @param {SevNonce} nonce
|
|
956
|
+
* @returns {string[]}
|
|
1068
957
|
*/
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1075
|
-
}
|
|
958
|
+
keys() {
|
|
959
|
+
const ret = wasm.responseheaders_keys(this.__wbg_ptr);
|
|
960
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
961
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
962
|
+
return v1;
|
|
1076
963
|
}
|
|
1077
964
|
}
|
|
1078
|
-
if (Symbol.dispose)
|
|
965
|
+
if (Symbol.dispose) ResponseHeaders.prototype[Symbol.dispose] = ResponseHeaders.prototype.free;
|
|
966
|
+
exports.ResponseHeaders = ResponseHeaders;
|
|
1079
967
|
|
|
1080
968
|
class SevNonce {
|
|
1081
969
|
static __wrap(ptr) {
|
|
1082
|
-
ptr = ptr >>> 0;
|
|
1083
970
|
const obj = Object.create(SevNonce.prototype);
|
|
1084
971
|
obj.__wbg_ptr = ptr;
|
|
1085
972
|
SevNonceFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -1093,7 +980,7 @@ class SevNonce {
|
|
|
1093
980
|
}
|
|
1094
981
|
free() {
|
|
1095
982
|
const ptr = this.__destroy_into_raw();
|
|
1096
|
-
wasm.
|
|
983
|
+
wasm.__wbg_sevnonce_free(ptr, 0);
|
|
1097
984
|
}
|
|
1098
985
|
/**
|
|
1099
986
|
* @returns {SevNonce}
|
|
@@ -1119,13 +1006,99 @@ class SevNonce {
|
|
|
1119
1006
|
}
|
|
1120
1007
|
}
|
|
1121
1008
|
if (Symbol.dispose) SevNonce.prototype[Symbol.dispose] = SevNonce.prototype.free;
|
|
1009
|
+
exports.SevNonce = SevNonce;
|
|
1010
|
+
|
|
1011
|
+
class TcbLevels {
|
|
1012
|
+
__destroy_into_raw() {
|
|
1013
|
+
const ptr = this.__wbg_ptr;
|
|
1014
|
+
this.__wbg_ptr = 0;
|
|
1015
|
+
TcbLevelsFinalization.unregister(this);
|
|
1016
|
+
return ptr;
|
|
1017
|
+
}
|
|
1018
|
+
free() {
|
|
1019
|
+
const ptr = this.__destroy_into_raw();
|
|
1020
|
+
wasm.__wbg_tcblevels_free(ptr, 0);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
if (Symbol.dispose) TcbLevels.prototype[Symbol.dispose] = TcbLevels.prototype.free;
|
|
1024
|
+
exports.TcbLevels = TcbLevels;
|
|
1025
|
+
|
|
1026
|
+
class TdxNonce {
|
|
1027
|
+
__destroy_into_raw() {
|
|
1028
|
+
const ptr = this.__wbg_ptr;
|
|
1029
|
+
this.__wbg_ptr = 0;
|
|
1030
|
+
TdxNonceFinalization.unregister(this);
|
|
1031
|
+
return ptr;
|
|
1032
|
+
}
|
|
1033
|
+
free() {
|
|
1034
|
+
const ptr = this.__destroy_into_raw();
|
|
1035
|
+
wasm.__wbg_tdxnonce_free(ptr, 0);
|
|
1036
|
+
}
|
|
1037
|
+
constructor() {
|
|
1038
|
+
const ret = wasm.tdxnonce_generate();
|
|
1039
|
+
this.__wbg_ptr = ret;
|
|
1040
|
+
TdxNonceFinalization.register(this, this.__wbg_ptr, this);
|
|
1041
|
+
return this;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* @returns {string}
|
|
1045
|
+
*/
|
|
1046
|
+
to_hex() {
|
|
1047
|
+
let deferred1_0;
|
|
1048
|
+
let deferred1_1;
|
|
1049
|
+
try {
|
|
1050
|
+
const ret = wasm.tdxnonce_to_hex(this.__wbg_ptr);
|
|
1051
|
+
deferred1_0 = ret[0];
|
|
1052
|
+
deferred1_1 = ret[1];
|
|
1053
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1054
|
+
} finally {
|
|
1055
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
if (Symbol.dispose) TdxNonce.prototype[Symbol.dispose] = TdxNonce.prototype.free;
|
|
1060
|
+
exports.TdxNonce = TdxNonce;
|
|
1061
|
+
|
|
1062
|
+
class TdxQuote {
|
|
1063
|
+
static __wrap(ptr) {
|
|
1064
|
+
const obj = Object.create(TdxQuote.prototype);
|
|
1065
|
+
obj.__wbg_ptr = ptr;
|
|
1066
|
+
TdxQuoteFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1067
|
+
return obj;
|
|
1068
|
+
}
|
|
1069
|
+
__destroy_into_raw() {
|
|
1070
|
+
const ptr = this.__wbg_ptr;
|
|
1071
|
+
this.__wbg_ptr = 0;
|
|
1072
|
+
TdxQuoteFinalization.unregister(this);
|
|
1073
|
+
return ptr;
|
|
1074
|
+
}
|
|
1075
|
+
free() {
|
|
1076
|
+
const ptr = this.__destroy_into_raw();
|
|
1077
|
+
wasm.__wbg_tdxquote_free(ptr, 0);
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Attempts to parse a quote from DCAP bytes.
|
|
1081
|
+
* @param {Uint8Array} quote
|
|
1082
|
+
* @returns {TdxQuote}
|
|
1083
|
+
*/
|
|
1084
|
+
static from_bytes(quote) {
|
|
1085
|
+
const ptr0 = passArray8ToWasm0(quote, wasm.__wbindgen_malloc);
|
|
1086
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1087
|
+
const ret = wasm.tdxquote_from_bytes(ptr0, len0);
|
|
1088
|
+
if (ret[2]) {
|
|
1089
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1090
|
+
}
|
|
1091
|
+
return TdxQuote.__wrap(ret[0]);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
if (Symbol.dispose) TdxQuote.prototype[Symbol.dispose] = TdxQuote.prototype.free;
|
|
1095
|
+
exports.TdxQuote = TdxQuote;
|
|
1122
1096
|
|
|
1123
1097
|
/**
|
|
1124
1098
|
* A chain which has been cryptographically verified
|
|
1125
1099
|
*/
|
|
1126
1100
|
class VerifiedChain {
|
|
1127
1101
|
static __wrap(ptr) {
|
|
1128
|
-
ptr = ptr >>> 0;
|
|
1129
1102
|
const obj = Object.create(VerifiedChain.prototype);
|
|
1130
1103
|
obj.__wbg_ptr = ptr;
|
|
1131
1104
|
VerifiedChainFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -1139,7 +1112,7 @@ class VerifiedChain {
|
|
|
1139
1112
|
}
|
|
1140
1113
|
free() {
|
|
1141
1114
|
const ptr = this.__destroy_into_raw();
|
|
1142
|
-
wasm.
|
|
1115
|
+
wasm.__wbg_verifiedchain_free(ptr, 0);
|
|
1143
1116
|
}
|
|
1144
1117
|
/**
|
|
1145
1118
|
* parses a triad of ark, ask and vek certificates in the PEM format,
|
|
@@ -1174,44 +1147,56 @@ class VerifiedChain {
|
|
|
1174
1147
|
}
|
|
1175
1148
|
}
|
|
1176
1149
|
if (Symbol.dispose) VerifiedChain.prototype[Symbol.dispose] = VerifiedChain.prototype.free;
|
|
1150
|
+
exports.VerifiedChain = VerifiedChain;
|
|
1177
1151
|
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1152
|
+
/**
|
|
1153
|
+
* @param {any} input
|
|
1154
|
+
* @param {any | null} [init]
|
|
1155
|
+
* @returns {Promise<any>}
|
|
1156
|
+
*/
|
|
1157
|
+
function fetch2(input, init) {
|
|
1158
|
+
const ret = wasm.fetch(input, isLikeNone(init) ? 0 : addToExternrefTable0(init));
|
|
1159
|
+
return ret;
|
|
1160
|
+
}
|
|
1161
|
+
exports.fetch = fetch2;
|
|
1186
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* Same as [`KeyChain:fetch_keychain`], put in for better wasm compatibility
|
|
1165
|
+
* @returns {Promise<KeyChain>}
|
|
1166
|
+
*/
|
|
1167
|
+
function fetch_keychain() {
|
|
1168
|
+
const ret = wasm.fetch_keychain();
|
|
1169
|
+
return ret;
|
|
1170
|
+
}
|
|
1171
|
+
exports.fetch_keychain = fetch_keychain;
|
|
1187
1172
|
function __wbg_get_imports() {
|
|
1188
1173
|
const import0 = {
|
|
1189
1174
|
__proto__: null,
|
|
1190
|
-
|
|
1175
|
+
__wbg___wbindgen_debug_string_edece8177ad01481: function(arg0, arg1) {
|
|
1191
1176
|
const ret = debugString(arg1);
|
|
1192
1177
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1193
1178
|
const len1 = WASM_VECTOR_LEN;
|
|
1194
1179
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1195
1180
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1196
1181
|
},
|
|
1197
|
-
|
|
1182
|
+
__wbg___wbindgen_is_function_5cd60d5cf78b4eef: function(arg0) {
|
|
1198
1183
|
const ret = typeof(arg0) === 'function';
|
|
1199
1184
|
return ret;
|
|
1200
1185
|
},
|
|
1201
|
-
|
|
1186
|
+
__wbg___wbindgen_is_object_b4593df85baada48: function(arg0) {
|
|
1202
1187
|
const val = arg0;
|
|
1203
1188
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1204
1189
|
return ret;
|
|
1205
1190
|
},
|
|
1206
|
-
|
|
1191
|
+
__wbg___wbindgen_is_string_dde0fd9020db4434: function(arg0) {
|
|
1207
1192
|
const ret = typeof(arg0) === 'string';
|
|
1208
1193
|
return ret;
|
|
1209
1194
|
},
|
|
1210
|
-
|
|
1195
|
+
__wbg___wbindgen_is_undefined_35bb9f4c7fd651d5: function(arg0) {
|
|
1211
1196
|
const ret = arg0 === undefined;
|
|
1212
1197
|
return ret;
|
|
1213
1198
|
},
|
|
1214
|
-
|
|
1199
|
+
__wbg___wbindgen_string_get_d109740c0d18f4d7: function(arg0, arg1) {
|
|
1215
1200
|
const obj = arg1;
|
|
1216
1201
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1217
1202
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1219,22 +1204,22 @@ function __wbg_get_imports() {
|
|
|
1219
1204
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1220
1205
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1221
1206
|
},
|
|
1222
|
-
|
|
1207
|
+
__wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
|
|
1223
1208
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1224
1209
|
},
|
|
1225
|
-
|
|
1210
|
+
__wbg__wbg_cb_unref_3fa391f3fcdb55f8: function(arg0) {
|
|
1226
1211
|
arg0._wbg_cb_unref();
|
|
1227
1212
|
},
|
|
1228
|
-
|
|
1229
|
-
arg0.abort();
|
|
1230
|
-
},
|
|
1231
|
-
__wbg_abort_7a67cb8f9383baa1: function(arg0, arg1) {
|
|
1213
|
+
__wbg_abort_89f7368e16055f5f: function(arg0, arg1) {
|
|
1232
1214
|
arg0.abort(arg1);
|
|
1233
1215
|
},
|
|
1234
|
-
|
|
1216
|
+
__wbg_abort_b363e6285472a358: function(arg0) {
|
|
1217
|
+
arg0.abort();
|
|
1218
|
+
},
|
|
1219
|
+
__wbg_append_263958599fd198c1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1235
1220
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1236
1221
|
}, arguments); },
|
|
1237
|
-
|
|
1222
|
+
__wbg_arrayBuffer_cb5d4748b5f3cad5: function() { return handleError(function (arg0) {
|
|
1238
1223
|
const ret = arg0.arrayBuffer();
|
|
1239
1224
|
return ret;
|
|
1240
1225
|
}, arguments); },
|
|
@@ -1242,11 +1227,11 @@ function __wbg_get_imports() {
|
|
|
1242
1227
|
const ret = AttestResult.__wrap(arg0);
|
|
1243
1228
|
return ret;
|
|
1244
1229
|
},
|
|
1245
|
-
|
|
1230
|
+
__wbg_call_13665d9f14390edc: function() { return handleError(function (arg0, arg1) {
|
|
1246
1231
|
const ret = arg0.call(arg1);
|
|
1247
1232
|
return ret;
|
|
1248
1233
|
}, arguments); },
|
|
1249
|
-
|
|
1234
|
+
__wbg_call_dfde26266607c996: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1250
1235
|
const ret = arg0.call(arg1, arg2);
|
|
1251
1236
|
return ret;
|
|
1252
1237
|
}, arguments); },
|
|
@@ -1266,19 +1251,23 @@ function __wbg_get_imports() {
|
|
|
1266
1251
|
const ret = Collateral.__wrap(arg0);
|
|
1267
1252
|
return ret;
|
|
1268
1253
|
},
|
|
1254
|
+
__wbg_crl_new: function(arg0) {
|
|
1255
|
+
const ret = CRL.__wrap(arg0);
|
|
1256
|
+
return ret;
|
|
1257
|
+
},
|
|
1269
1258
|
__wbg_crypto_48300657fced39f9: function(arg0) {
|
|
1270
1259
|
const ret = arg0.crypto;
|
|
1271
1260
|
return ret;
|
|
1272
1261
|
},
|
|
1273
|
-
|
|
1262
|
+
__wbg_done_54b8da57023b7ed2: function(arg0) {
|
|
1274
1263
|
const ret = arg0.done;
|
|
1275
1264
|
return ret;
|
|
1276
1265
|
},
|
|
1277
|
-
|
|
1266
|
+
__wbg_entries_8c373da97ea5ada5: function(arg0) {
|
|
1278
1267
|
const ret = arg0.entries();
|
|
1279
1268
|
return ret;
|
|
1280
1269
|
},
|
|
1281
|
-
|
|
1270
|
+
__wbg_fetch_2998af8c54e0997c: function(arg0, arg1) {
|
|
1282
1271
|
const ret = arg0.fetch(arg1);
|
|
1283
1272
|
return ret;
|
|
1284
1273
|
},
|
|
@@ -1300,27 +1289,37 @@ function __wbg_get_imports() {
|
|
|
1300
1289
|
__wbg_getRandomValues_76dfc69825c9c552: function() { return handleError(function (arg0, arg1) {
|
|
1301
1290
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1302
1291
|
}, arguments); },
|
|
1303
|
-
|
|
1292
|
+
__wbg_getTime_09f1dd40a44edb30: function(arg0) {
|
|
1304
1293
|
const ret = arg0.getTime();
|
|
1305
1294
|
return ret;
|
|
1306
1295
|
},
|
|
1307
|
-
|
|
1308
|
-
const ret = arg0[arg1 >>> 0];
|
|
1309
|
-
return ret;
|
|
1310
|
-
},
|
|
1311
|
-
__wbg_get_ed0642c4b9d31ddf: function() { return handleError(function (arg0, arg1) {
|
|
1296
|
+
__wbg_get_3e9a707ab7d352eb: function() { return handleError(function (arg0, arg1) {
|
|
1312
1297
|
const ret = Reflect.get(arg0, arg1);
|
|
1313
1298
|
return ret;
|
|
1314
1299
|
}, arguments); },
|
|
1315
|
-
|
|
1300
|
+
__wbg_get_98fdf51d029a75eb: function(arg0, arg1) {
|
|
1301
|
+
const ret = arg0[arg1 >>> 0];
|
|
1302
|
+
return ret;
|
|
1303
|
+
},
|
|
1304
|
+
__wbg_has_ef192b1f278770eb: function() { return handleError(function (arg0, arg1) {
|
|
1316
1305
|
const ret = Reflect.has(arg0, arg1);
|
|
1317
1306
|
return ret;
|
|
1318
1307
|
}, arguments); },
|
|
1319
|
-
|
|
1308
|
+
__wbg_headers_18f39f24d3837dc1: function(arg0) {
|
|
1320
1309
|
const ret = arg0.headers;
|
|
1321
1310
|
return ret;
|
|
1322
1311
|
},
|
|
1323
|
-
|
|
1312
|
+
__wbg_instanceof_Request_0b988f27c60a71ed: function(arg0) {
|
|
1313
|
+
let result;
|
|
1314
|
+
try {
|
|
1315
|
+
result = arg0 instanceof Request;
|
|
1316
|
+
} catch (_) {
|
|
1317
|
+
result = false;
|
|
1318
|
+
}
|
|
1319
|
+
const ret = result;
|
|
1320
|
+
return ret;
|
|
1321
|
+
},
|
|
1322
|
+
__wbg_instanceof_Response_ecfc823e8fb354e2: function(arg0) {
|
|
1324
1323
|
let result;
|
|
1325
1324
|
try {
|
|
1326
1325
|
result = arg0 instanceof Response;
|
|
@@ -1330,15 +1329,19 @@ function __wbg_get_imports() {
|
|
|
1330
1329
|
const ret = result;
|
|
1331
1330
|
return ret;
|
|
1332
1331
|
},
|
|
1333
|
-
|
|
1332
|
+
__wbg_isArray_94898ed3aad6947b: function(arg0) {
|
|
1334
1333
|
const ret = Array.isArray(arg0);
|
|
1335
1334
|
return ret;
|
|
1336
1335
|
},
|
|
1337
|
-
|
|
1336
|
+
__wbg_iterator_1441b47f341dc34f: function() {
|
|
1338
1337
|
const ret = Symbol.iterator;
|
|
1339
1338
|
return ret;
|
|
1340
1339
|
},
|
|
1341
|
-
|
|
1340
|
+
__wbg_keychain_new: function(arg0) {
|
|
1341
|
+
const ret = KeyChain.__wrap(arg0);
|
|
1342
|
+
return ret;
|
|
1343
|
+
},
|
|
1344
|
+
__wbg_length_56fcd3e2b7e0299d: function(arg0) {
|
|
1342
1345
|
const ret = arg0.length;
|
|
1343
1346
|
return ret;
|
|
1344
1347
|
},
|
|
@@ -1350,42 +1353,42 @@ function __wbg_get_imports() {
|
|
|
1350
1353
|
const ret = arg0.msCrypto;
|
|
1351
1354
|
return ret;
|
|
1352
1355
|
},
|
|
1353
|
-
|
|
1356
|
+
__wbg_new_02d162bc6cf02f60: function() {
|
|
1357
|
+
const ret = new Object();
|
|
1358
|
+
return ret;
|
|
1359
|
+
},
|
|
1360
|
+
__wbg_new_0_2722fcdb71a888a6: function() {
|
|
1354
1361
|
const ret = new Date();
|
|
1355
1362
|
return ret;
|
|
1356
1363
|
},
|
|
1357
|
-
|
|
1358
|
-
const ret = new
|
|
1364
|
+
__wbg_new_1f236d63ba0c4784: function(arg0, arg1) {
|
|
1365
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1359
1366
|
return ret;
|
|
1360
|
-
},
|
|
1361
|
-
|
|
1362
|
-
const ret = new
|
|
1367
|
+
},
|
|
1368
|
+
__wbg_new_7ddec6de44ff8f5d: function(arg0) {
|
|
1369
|
+
const ret = new Uint8Array(arg0);
|
|
1363
1370
|
return ret;
|
|
1364
1371
|
},
|
|
1365
|
-
|
|
1372
|
+
__wbg_new_af86d8f14640f1f3: function() { return handleError(function () {
|
|
1366
1373
|
const ret = new AbortController();
|
|
1367
1374
|
return ret;
|
|
1368
1375
|
}, arguments); },
|
|
1369
|
-
|
|
1370
|
-
const ret = new
|
|
1371
|
-
return ret;
|
|
1372
|
-
},
|
|
1373
|
-
__wbg_new_e3b04b4d53d1b593: function(arg0, arg1) {
|
|
1374
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1376
|
+
__wbg_new_ee0be486d8f01282: function() { return handleError(function () {
|
|
1377
|
+
const ret = new Headers();
|
|
1375
1378
|
return ret;
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1379
|
+
}, arguments); },
|
|
1380
|
+
__wbg_new_from_slice_269e35316ed2d061: function(arg0, arg1) {
|
|
1378
1381
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1379
1382
|
return ret;
|
|
1380
1383
|
},
|
|
1381
|
-
|
|
1384
|
+
__wbg_new_typed_c072c4ce9a2a0cdf: function(arg0, arg1) {
|
|
1382
1385
|
try {
|
|
1383
1386
|
var state0 = {a: arg0, b: arg1};
|
|
1384
1387
|
var cb0 = (arg0, arg1) => {
|
|
1385
1388
|
const a = state0.a;
|
|
1386
1389
|
state0.a = 0;
|
|
1387
1390
|
try {
|
|
1388
|
-
return
|
|
1391
|
+
return wasm_bindgen__convert__closures_____invoke__h61e8cb59c1b109c6(a, state0.b, arg0, arg1);
|
|
1389
1392
|
} finally {
|
|
1390
1393
|
state0.a = a;
|
|
1391
1394
|
}
|
|
@@ -1396,19 +1399,19 @@ function __wbg_get_imports() {
|
|
|
1396
1399
|
state0.a = 0;
|
|
1397
1400
|
}
|
|
1398
1401
|
},
|
|
1399
|
-
|
|
1402
|
+
__wbg_new_with_length_99887c91eae4abab: function(arg0) {
|
|
1400
1403
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1401
1404
|
return ret;
|
|
1402
1405
|
},
|
|
1403
|
-
|
|
1406
|
+
__wbg_new_with_str_and_init_ffe9977c986ea039: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1404
1407
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1405
1408
|
return ret;
|
|
1406
1409
|
}, arguments); },
|
|
1407
|
-
|
|
1410
|
+
__wbg_next_2a4e19f4f5083b0f: function(arg0) {
|
|
1408
1411
|
const ret = arg0.next;
|
|
1409
1412
|
return ret;
|
|
1410
1413
|
},
|
|
1411
|
-
|
|
1414
|
+
__wbg_next_6429a146bf756f93: function() { return handleError(function (arg0) {
|
|
1412
1415
|
const ret = arg0.next();
|
|
1413
1416
|
return ret;
|
|
1414
1417
|
}, arguments); },
|
|
@@ -1416,36 +1419,40 @@ function __wbg_get_imports() {
|
|
|
1416
1419
|
const ret = arg0.node;
|
|
1417
1420
|
return ret;
|
|
1418
1421
|
},
|
|
1419
|
-
__wbg_nvidia__keychain_new: function(arg0) {
|
|
1420
|
-
const ret = KeyChain.__wrap(arg0);
|
|
1421
|
-
return ret;
|
|
1422
|
-
},
|
|
1423
1422
|
__wbg_nvidiaattestresult_new: function(arg0) {
|
|
1424
1423
|
const ret = NvidiaAttestResult.__wrap(arg0);
|
|
1425
1424
|
return ret;
|
|
1426
1425
|
},
|
|
1426
|
+
__wbg_parsedattestation_new: function(arg0) {
|
|
1427
|
+
const ret = ParsedAttestation.__wrap(arg0);
|
|
1428
|
+
return ret;
|
|
1429
|
+
},
|
|
1427
1430
|
__wbg_process_b2fea42461d03994: function(arg0) {
|
|
1428
1431
|
const ret = arg0.process;
|
|
1429
1432
|
return ret;
|
|
1430
1433
|
},
|
|
1431
|
-
|
|
1434
|
+
__wbg_prototypesetcall_5f9bdc8d75e07276: function(arg0, arg1, arg2) {
|
|
1432
1435
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1433
1436
|
},
|
|
1434
|
-
|
|
1437
|
+
__wbg_queueMicrotask_78d584b53af520f5: function(arg0) {
|
|
1435
1438
|
const ret = arg0.queueMicrotask;
|
|
1436
1439
|
return ret;
|
|
1437
1440
|
},
|
|
1438
|
-
|
|
1441
|
+
__wbg_queueMicrotask_b39ea83c7f01971a: function(arg0) {
|
|
1439
1442
|
queueMicrotask(arg0);
|
|
1440
1443
|
},
|
|
1441
1444
|
__wbg_randomFillSync_ca9f178fb14c88cb: function() { return handleError(function (arg0, arg1) {
|
|
1442
1445
|
arg0.randomFillSync(arg1);
|
|
1443
1446
|
}, arguments); },
|
|
1447
|
+
__wbg_realFetch_65865cb56349aabc: function() { return handleError(function (arg0, arg1) {
|
|
1448
|
+
const ret = realFetch(arg0, arg1);
|
|
1449
|
+
return ret;
|
|
1450
|
+
}, arguments); },
|
|
1444
1451
|
__wbg_require_7a9419e39d796c95: function() { return handleError(function () {
|
|
1445
1452
|
const ret = module.require;
|
|
1446
1453
|
return ret;
|
|
1447
1454
|
}, arguments); },
|
|
1448
|
-
|
|
1455
|
+
__wbg_resolve_d17db9352f5a220e: function(arg0) {
|
|
1449
1456
|
const ret = Promise.resolve(arg0);
|
|
1450
1457
|
return ret;
|
|
1451
1458
|
},
|
|
@@ -1461,78 +1468,66 @@ function __wbg_get_imports() {
|
|
|
1461
1468
|
const ret = setTimeout(arg0, arg1);
|
|
1462
1469
|
return ret;
|
|
1463
1470
|
},
|
|
1464
|
-
|
|
1471
|
+
__wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1465
1472
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1466
1473
|
return ret;
|
|
1467
1474
|
}, arguments); },
|
|
1468
|
-
|
|
1475
|
+
__wbg_set_body_7f56457720e81672: function(arg0, arg1) {
|
|
1469
1476
|
arg0.body = arg1;
|
|
1470
1477
|
},
|
|
1471
|
-
|
|
1478
|
+
__wbg_set_cache_9ed01a3813d96de2: function(arg0, arg1) {
|
|
1472
1479
|
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1473
1480
|
},
|
|
1474
|
-
|
|
1481
|
+
__wbg_set_cause_02f710d8cce70c01: function(arg0, arg1) {
|
|
1475
1482
|
arg0.cause = arg1;
|
|
1476
1483
|
},
|
|
1477
|
-
|
|
1484
|
+
__wbg_set_credentials_55b92faec8dcc6a4: function(arg0, arg1) {
|
|
1478
1485
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1479
1486
|
},
|
|
1480
|
-
|
|
1487
|
+
__wbg_set_headers_97ed66619adb1e3e: function(arg0, arg1) {
|
|
1481
1488
|
arg0.headers = arg1;
|
|
1482
1489
|
},
|
|
1483
|
-
|
|
1490
|
+
__wbg_set_method_4d69a1a7e34c0aca: function(arg0, arg1, arg2) {
|
|
1484
1491
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1485
1492
|
},
|
|
1486
|
-
|
|
1493
|
+
__wbg_set_mode_dfc59bbbe25b1d14: function(arg0, arg1) {
|
|
1487
1494
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1488
1495
|
},
|
|
1489
|
-
|
|
1496
|
+
__wbg_set_name_e500733c75ec36b0: function(arg0, arg1, arg2) {
|
|
1490
1497
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
1491
1498
|
},
|
|
1492
|
-
|
|
1499
|
+
__wbg_set_signal_2a5bd3615938edbc: function(arg0, arg1) {
|
|
1493
1500
|
arg0.signal = arg1;
|
|
1494
1501
|
},
|
|
1495
|
-
|
|
1496
|
-
const ret = CRL.__wrap(arg0);
|
|
1497
|
-
return ret;
|
|
1498
|
-
},
|
|
1499
|
-
__wbg_sev__parsedattestation_new: function(arg0) {
|
|
1500
|
-
const ret = ParsedAttestation.__wrap(arg0);
|
|
1501
|
-
return ret;
|
|
1502
|
-
},
|
|
1503
|
-
__wbg_sev__verifiedchain_new: function(arg0) {
|
|
1504
|
-
const ret = VerifiedChain.__wrap(arg0);
|
|
1505
|
-
return ret;
|
|
1506
|
-
},
|
|
1507
|
-
__wbg_signal_9172c3282bfba2f5: function(arg0) {
|
|
1502
|
+
__wbg_signal_304beac95c8c5ea0: function(arg0) {
|
|
1508
1503
|
const ret = arg0.signal;
|
|
1509
1504
|
return ret;
|
|
1510
1505
|
},
|
|
1511
|
-
|
|
1506
|
+
__wbg_static_accessor_GLOBAL_THIS_02344c9b09eb08a9: function() {
|
|
1512
1507
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1513
1508
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1514
1509
|
},
|
|
1515
|
-
|
|
1510
|
+
__wbg_static_accessor_GLOBAL_ac6d4ac874d5cd54: function() {
|
|
1516
1511
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1517
1512
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1518
1513
|
},
|
|
1519
|
-
|
|
1514
|
+
__wbg_static_accessor_SELF_9b2406c23aeb2023: function() {
|
|
1520
1515
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1521
1516
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1522
1517
|
},
|
|
1523
|
-
|
|
1518
|
+
__wbg_static_accessor_WINDOW_b34d2126934e16ba: function() {
|
|
1524
1519
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1525
1520
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1526
1521
|
},
|
|
1527
|
-
|
|
1522
|
+
__wbg_status_0853c9f5752c7ee2: function(arg0) {
|
|
1528
1523
|
const ret = arg0.status;
|
|
1529
1524
|
return ret;
|
|
1530
1525
|
},
|
|
1531
|
-
|
|
1526
|
+
__wbg_stringify_ef0c105b1ccc3849: function() { return handleError(function (arg0) {
|
|
1532
1527
|
const ret = JSON.stringify(arg0);
|
|
1533
1528
|
return ret;
|
|
1534
1529
|
}, arguments); },
|
|
1535
|
-
|
|
1530
|
+
__wbg_subarray_7c6a0da8f3b4a1ba: function(arg0, arg1, arg2) {
|
|
1536
1531
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1537
1532
|
return ret;
|
|
1538
1533
|
},
|
|
@@ -1540,46 +1535,57 @@ function __wbg_get_imports() {
|
|
|
1540
1535
|
const ret = TdxQuote.__wrap(arg0);
|
|
1541
1536
|
return ret;
|
|
1542
1537
|
},
|
|
1543
|
-
|
|
1538
|
+
__wbg_text_99930d92d5f1b540: function() { return handleError(function (arg0) {
|
|
1544
1539
|
const ret = arg0.text();
|
|
1545
1540
|
return ret;
|
|
1546
1541
|
}, arguments); },
|
|
1547
|
-
|
|
1548
|
-
const ret = arg0.then(arg1
|
|
1542
|
+
__wbg_then_837494e384b37459: function(arg0, arg1) {
|
|
1543
|
+
const ret = arg0.then(arg1);
|
|
1549
1544
|
return ret;
|
|
1550
1545
|
},
|
|
1551
|
-
|
|
1552
|
-
const ret = arg0.then(arg1);
|
|
1546
|
+
__wbg_then_bd927500e8905df2: function(arg0, arg1, arg2) {
|
|
1547
|
+
const ret = arg0.then(arg1, arg2);
|
|
1553
1548
|
return ret;
|
|
1554
1549
|
},
|
|
1555
|
-
|
|
1550
|
+
__wbg_url_1a5ea6a8a7f22ff8: function(arg0, arg1) {
|
|
1551
|
+
const ret = arg1.url;
|
|
1552
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1553
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1554
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1555
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1556
|
+
},
|
|
1557
|
+
__wbg_url_f1cddff1f5b9519a: function(arg0, arg1) {
|
|
1556
1558
|
const ret = arg1.url;
|
|
1557
1559
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1558
1560
|
const len1 = WASM_VECTOR_LEN;
|
|
1559
1561
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1560
1562
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1561
1563
|
},
|
|
1562
|
-
|
|
1564
|
+
__wbg_value_9cc0518af87a489c: function(arg0) {
|
|
1563
1565
|
const ret = arg0.value;
|
|
1564
1566
|
return ret;
|
|
1565
1567
|
},
|
|
1568
|
+
__wbg_verifiedchain_new: function(arg0) {
|
|
1569
|
+
const ret = VerifiedChain.__wrap(arg0);
|
|
1570
|
+
return ret;
|
|
1571
|
+
},
|
|
1566
1572
|
__wbg_versions_215a3ab1c9d5745a: function(arg0) {
|
|
1567
1573
|
const ret = arg0.versions;
|
|
1568
1574
|
return ret;
|
|
1569
1575
|
},
|
|
1570
1576
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1571
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1572
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1577
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1962, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1578
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hae26513a56be1c77);
|
|
1573
1579
|
return ret;
|
|
1574
1580
|
},
|
|
1575
1581
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1576
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1577
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1582
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1787, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1583
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hba3e03ec0686df06);
|
|
1578
1584
|
return ret;
|
|
1579
1585
|
},
|
|
1580
1586
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1581
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1582
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1587
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 900, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1588
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hb48ee18b811a2652);
|
|
1583
1589
|
return ret;
|
|
1584
1590
|
},
|
|
1585
1591
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
@@ -1615,23 +1621,23 @@ function __wbg_get_imports() {
|
|
|
1615
1621
|
};
|
|
1616
1622
|
}
|
|
1617
1623
|
|
|
1618
|
-
function
|
|
1619
|
-
wasm.
|
|
1624
|
+
function wasm_bindgen__convert__closures_____invoke__hba3e03ec0686df06(arg0, arg1) {
|
|
1625
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hba3e03ec0686df06(arg0, arg1);
|
|
1620
1626
|
}
|
|
1621
1627
|
|
|
1622
|
-
function
|
|
1623
|
-
wasm.
|
|
1628
|
+
function wasm_bindgen__convert__closures_____invoke__hb48ee18b811a2652(arg0, arg1) {
|
|
1629
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb48ee18b811a2652(arg0, arg1);
|
|
1624
1630
|
}
|
|
1625
1631
|
|
|
1626
|
-
function
|
|
1627
|
-
const ret = wasm.
|
|
1632
|
+
function wasm_bindgen__convert__closures_____invoke__hae26513a56be1c77(arg0, arg1, arg2) {
|
|
1633
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__hae26513a56be1c77(arg0, arg1, arg2);
|
|
1628
1634
|
if (ret[1]) {
|
|
1629
1635
|
throw takeFromExternrefTable0(ret[0]);
|
|
1630
1636
|
}
|
|
1631
1637
|
}
|
|
1632
1638
|
|
|
1633
|
-
function
|
|
1634
|
-
wasm.
|
|
1639
|
+
function wasm_bindgen__convert__closures_____invoke__h61e8cb59c1b109c6(arg0, arg1, arg2, arg3) {
|
|
1640
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h61e8cb59c1b109c6(arg0, arg1, arg2, arg3);
|
|
1635
1641
|
}
|
|
1636
1642
|
|
|
1637
1643
|
|
|
@@ -1644,79 +1650,79 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1644
1650
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1645
1651
|
const AttestHeadersFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1646
1652
|
? { register: () => {}, unregister: () => {} }
|
|
1647
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_attestheaders_free(ptr
|
|
1653
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attestheaders_free(ptr, 1));
|
|
1648
1654
|
const AttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1649
1655
|
? { register: () => {}, unregister: () => {} }
|
|
1650
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr
|
|
1656
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attestresult_free(ptr, 1));
|
|
1651
1657
|
const CRLFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1652
1658
|
? { register: () => {}, unregister: () => {} }
|
|
1653
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1659
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_crl_free(ptr, 1));
|
|
1654
1660
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1655
1661
|
? { register: () => {}, unregister: () => {} }
|
|
1656
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr
|
|
1662
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr, 1));
|
|
1657
1663
|
const ClientBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1658
1664
|
? { register: () => {}, unregister: () => {} }
|
|
1659
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_clientbuilder_free(ptr
|
|
1665
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_clientbuilder_free(ptr, 1));
|
|
1660
1666
|
const CollateralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1661
1667
|
? { register: () => {}, unregister: () => {} }
|
|
1662
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_collateral_free(ptr
|
|
1668
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_collateral_free(ptr, 1));
|
|
1663
1669
|
const DecodedClaimsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1664
1670
|
? { register: () => {}, unregister: () => {} }
|
|
1665
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1671
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_decodedclaims_free(ptr, 1));
|
|
1666
1672
|
const EATTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1667
1673
|
? { register: () => {}, unregister: () => {} }
|
|
1668
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1674
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eattoken_free(ptr, 1));
|
|
1669
1675
|
const ExportPemFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1670
1676
|
? { register: () => {}, unregister: () => {} }
|
|
1671
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1677
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_exportpem_free(ptr, 1));
|
|
1672
1678
|
const GatewayErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1673
1679
|
? { register: () => {}, unregister: () => {} }
|
|
1674
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_gatewayerror_free(ptr
|
|
1680
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gatewayerror_free(ptr, 1));
|
|
1675
1681
|
const KdsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1676
1682
|
? { register: () => {}, unregister: () => {} }
|
|
1677
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1683
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_kds_free(ptr, 1));
|
|
1678
1684
|
const KeyChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1679
1685
|
? { register: () => {}, unregister: () => {} }
|
|
1680
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1686
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keychain_free(ptr, 1));
|
|
1681
1687
|
const ModulesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1682
1688
|
? { register: () => {}, unregister: () => {} }
|
|
1683
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr
|
|
1689
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_modules_free(ptr, 1));
|
|
1684
1690
|
const NvidiaAttestResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1685
1691
|
? { register: () => {}, unregister: () => {} }
|
|
1686
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr
|
|
1692
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_nvidiaattestresult_free(ptr, 1));
|
|
1687
1693
|
const NvidiaNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1688
1694
|
? { register: () => {}, unregister: () => {} }
|
|
1689
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1695
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_nvidianonce_free(ptr, 1));
|
|
1690
1696
|
const ParsedAttestationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1691
1697
|
? { register: () => {}, unregister: () => {} }
|
|
1692
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1698
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_parsedattestation_free(ptr, 1));
|
|
1693
1699
|
const PcsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1694
1700
|
? { register: () => {}, unregister: () => {} }
|
|
1695
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_pcs_free(ptr
|
|
1701
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_pcs_free(ptr, 1));
|
|
1696
1702
|
const QueryParamsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1697
1703
|
? { register: () => {}, unregister: () => {} }
|
|
1698
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_queryparams_free(ptr
|
|
1704
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_queryparams_free(ptr, 1));
|
|
1699
1705
|
const QuoteVerifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1700
1706
|
? { register: () => {}, unregister: () => {} }
|
|
1701
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_quoteverifier_free(ptr
|
|
1707
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_quoteverifier_free(ptr, 1));
|
|
1702
1708
|
const ResponseHeadersFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1703
1709
|
? { register: () => {}, unregister: () => {} }
|
|
1704
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_responseheaders_free(ptr
|
|
1710
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_responseheaders_free(ptr, 1));
|
|
1705
1711
|
const SevNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1706
1712
|
? { register: () => {}, unregister: () => {} }
|
|
1707
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1713
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sevnonce_free(ptr, 1));
|
|
1708
1714
|
const TcbLevelsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1709
1715
|
? { register: () => {}, unregister: () => {} }
|
|
1710
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_tcblevels_free(ptr
|
|
1716
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_tcblevels_free(ptr, 1));
|
|
1711
1717
|
const TdxNonceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1712
1718
|
? { register: () => {}, unregister: () => {} }
|
|
1713
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_tdxnonce_free(ptr
|
|
1719
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_tdxnonce_free(ptr, 1));
|
|
1714
1720
|
const TdxQuoteFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1715
1721
|
? { register: () => {}, unregister: () => {} }
|
|
1716
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_tdxquote_free(ptr
|
|
1722
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_tdxquote_free(ptr, 1));
|
|
1717
1723
|
const VerifiedChainFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1718
1724
|
? { register: () => {}, unregister: () => {} }
|
|
1719
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1725
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_verifiedchain_free(ptr, 1));
|
|
1720
1726
|
|
|
1721
1727
|
function addToExternrefTable0(obj) {
|
|
1722
1728
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1824,8 +1830,7 @@ function getDataViewMemory0() {
|
|
|
1824
1830
|
}
|
|
1825
1831
|
|
|
1826
1832
|
function getStringFromWasm0(ptr, len) {
|
|
1827
|
-
|
|
1828
|
-
return decodeText(ptr, len);
|
|
1833
|
+
return decodeText(ptr >>> 0, len);
|
|
1829
1834
|
}
|
|
1830
1835
|
|
|
1831
1836
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -1951,5 +1956,6 @@ let WASM_VECTOR_LEN = 0;
|
|
|
1951
1956
|
const wasmPath = `${__dirname}/reticle_bg.wasm`;
|
|
1952
1957
|
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
1953
1958
|
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
1954
|
-
let
|
|
1959
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
1960
|
+
let wasm = wasmInstance.exports;
|
|
1955
1961
|
wasm.__wbindgen_start();
|